@vertigis/workflow 5.35.1 → 5.37.0
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/Activator.d.ts +25 -25
- package/Collections.d.ts +83 -91
- package/EnumUtils.d.ts +28 -28
- package/Errors.d.ts +155 -155
- package/Hooks.d.ts +32 -32
- package/IActivityHandler.d.ts +101 -106
- package/LanguageStringUtils.d.ts +16 -17
- package/LanguageStringUtils.js +1 -1
- package/ProgramInspectorFacility.d.ts +23 -24
- package/Task.d.ts +56 -56
- package/TemplateUtils.d.ts +28 -28
- package/Validation.d.ts +151 -26
- package/Validation.js +1 -1
- package/activities/app/GetApplicationData.d.ts +15 -12
- package/activities/app/GetApplicationData.js +1 -1
- package/activities/app/GetApplicationInfo.d.ts +15 -15
- package/activities/app/GetUserInfo.d.ts +15 -15
- package/activities/app/PublishEvent.d.ts +14 -14
- package/activities/app/RemoveApplicationData.d.ts +14 -11
- package/activities/app/RemoveApplicationData.js +1 -1
- package/activities/app/RunCommand.d.ts +17 -17
- package/activities/app/RunOperation.d.ts +25 -25
- package/activities/app/SetApplicationData.d.ts +13 -10
- package/activities/app/SetApplicationData.js +1 -1
- package/activities/app/applicationData.d.ts +12 -0
- package/activities/app/applicationData.js +1 -0
- package/activities/arcgis/AddAttachment.d.ts +22 -22
- package/activities/arcgis/AddAttachment.js +1 -1
- package/activities/arcgis/AddFeatureLayer.d.ts +23 -23
- package/activities/arcgis/AddFeatureLayer.js +1 -1
- package/activities/arcgis/AddFeatures.d.ts +27 -27
- package/activities/arcgis/AddFeatures.js +1 -1
- package/activities/arcgis/AddGraphics.d.ts +27 -27
- package/activities/arcgis/AddGraphics.js +1 -1
- package/activities/arcgis/ArcadeScript.d.ts +17 -18
- package/activities/arcgis/ArcadeScript.js +1 -1
- package/activities/arcgis/AreaEngineTask.d.ts +20 -20
- package/activities/arcgis/AreaEngineTask.js +1 -1
- package/activities/arcgis/BufferEngineTask.d.ts +27 -27
- package/activities/arcgis/BufferEngineTask.js +1 -1
- package/activities/arcgis/BufferServiceTask.d.ts +33 -33
- package/activities/arcgis/BufferServiceTask.js +1 -1
- package/activities/arcgis/CastGeometry.d.ts +23 -23
- package/activities/arcgis/ClearGraphics.d.ts +12 -12
- package/activities/arcgis/ClearGraphics.js +1 -1
- package/activities/arcgis/ClipEngineTask.d.ts +18 -18
- package/activities/arcgis/ClipEngineTask.js +1 -1
- package/activities/arcgis/ClosestFacilityTask.d.ts +90 -90
- package/activities/arcgis/ClosestFacilityTask.js +1 -1
- package/activities/arcgis/CompareGeometries.d.ts +19 -19
- package/activities/arcgis/CompareGeometries.js +1 -1
- package/activities/arcgis/ConvertValueToArcGisFieldType.d.ts +13 -0
- package/activities/arcgis/ConvertValueToArcGisFieldType.js +1 -0
- package/activities/arcgis/CreateFeatureSet.d.ts +16 -16
- package/activities/arcgis/CreateFeatureSet.js +1 -1
- package/activities/arcgis/CreateGraphic.d.ts +17 -17
- package/activities/arcgis/CreateGraphic.js +1 -1
- package/activities/arcgis/CreatePoint.d.ts +17 -17
- package/activities/arcgis/CutEngineTask.d.ts +18 -18
- package/activities/arcgis/CutEngineTask.js +1 -1
- package/activities/arcgis/DeleteAttachments.d.ts +22 -22
- package/activities/arcgis/DeleteAttachments.js +1 -1
- package/activities/arcgis/DeleteFeatures.d.ts +30 -30
- package/activities/arcgis/DeleteFeatures.js +1 -1
- package/activities/arcgis/DensifyEngineTask.d.ts +20 -20
- package/activities/arcgis/DensifyEngineTask.js +1 -1
- package/activities/arcgis/DifferenceEngineTask.d.ts +23 -23
- package/activities/arcgis/DifferenceEngineTask.js +1 -1
- package/activities/arcgis/DistanceEngineTask.d.ts +20 -20
- package/activities/arcgis/DistanceEngineTask.js +1 -1
- package/activities/arcgis/DistanceServiceTask.d.ts +24 -24
- package/activities/arcgis/DistanceServiceTask.js +1 -1
- package/activities/arcgis/ExtendedSpatialReferenceInfoEngineTask.d.ts +17 -17
- package/activities/arcgis/FeatureSetFromJson.d.ts +16 -16
- package/activities/arcgis/FeatureTableMap.d.ts +12 -12
- package/activities/arcgis/FlipEngineTask.d.ts +21 -21
- package/activities/arcgis/FlipEngineTask.js +1 -1
- package/activities/arcgis/FromGeoCoordinateStringServiceTask.d.ts +24 -24
- package/activities/arcgis/GeneralizeEngineTask.d.ts +22 -22
- package/activities/arcgis/GeneralizeEngineTask.js +1 -1
- package/activities/arcgis/GenerateArcGisToken.d.ts +23 -23
- package/activities/arcgis/GenerateWebmapForReport.d.ts +20 -20
- package/activities/arcgis/GenerateWebmapForReport.js +1 -1
- package/activities/arcgis/Geocode.d.ts +37 -38
- package/activities/arcgis/Geocode.js +1 -1
- package/activities/arcgis/GeometryFromJson.d.ts +16 -16
- package/activities/arcgis/Geoprocessing.d.ts +25 -26
- package/activities/arcgis/Geoprocessing.js +1 -1
- package/activities/arcgis/GeoprocessingAsync.d.ts +36 -37
- package/activities/arcgis/GeoprocessingAsync.js +1 -1
- package/activities/arcgis/GetAttributeValue.d.ts +22 -22
- package/activities/arcgis/GetAttributeValues.d.ts +20 -20
- package/activities/arcgis/GetCentroid.d.ts +16 -16
- package/activities/arcgis/GetCodedValueDomain.d.ts +29 -29
- package/activities/arcgis/GetCodedValueDomain.js +1 -1
- package/activities/arcgis/GetCurrentPosition.d.ts +46 -46
- package/activities/arcgis/GetFeatureGeometries.d.ts +20 -20
- package/activities/arcgis/GetFeatureGeometry.d.ts +18 -18
- package/activities/arcgis/GetFeatureLayerInfo.d.ts +22 -22
- package/activities/arcgis/GetFeatureLayerInfo.js +1 -1
- package/activities/arcgis/GetFeatureSetExtent.d.ts +18 -18
- package/activities/arcgis/GetFeatureSetObjectIds.d.ts +20 -20
- package/activities/arcgis/GetFormElementItemsFromFeatures.d.ts +49 -50
- package/activities/arcgis/GetFormElementItemsFromFeatures.js +1 -1
- package/activities/arcgis/GetGeometryExtent.d.ts +17 -17
- package/activities/arcgis/GetGraphics.d.ts +19 -19
- package/activities/arcgis/GetGraphics.js +1 -1
- package/activities/arcgis/GetLayer.d.ts +21 -21
- package/activities/arcgis/GetLayer.js +1 -1
- package/activities/arcgis/GetLayerDefinitionExpression.d.ts +18 -18
- package/activities/arcgis/GetLayerDefinitionExpression.js +1 -1
- package/activities/arcgis/GetLayerProperty.d.ts +18 -18
- package/activities/arcgis/GetLayerProperty.js +1 -1
- package/activities/arcgis/GetLayerVisibility.d.ts +18 -18
- package/activities/arcgis/GetLayerVisibility.js +1 -1
- package/activities/arcgis/GetMap.d.ts +11 -11
- package/activities/arcgis/GetMap.js +1 -1
- package/activities/arcgis/GetMapScreenshot.d.ts +18 -18
- package/activities/arcgis/GetPortalUser.d.ts +20 -20
- package/activities/arcgis/GetTable.d.ts +18 -18
- package/activities/arcgis/GetTable.js +1 -1
- package/activities/arcgis/GetViewExtent.d.ts +16 -16
- package/activities/arcgis/GetViewExtent.js +1 -1
- package/activities/arcgis/GetViewpoint.d.ts +12 -12
- package/activities/arcgis/GetViewpoint.js +1 -1
- package/activities/arcgis/IntersectEngineTask.d.ts +20 -20
- package/activities/arcgis/IntersectEngineTask.js +1 -1
- package/activities/arcgis/LabelPointsServiceTask.d.ts +18 -18
- package/activities/arcgis/LengthEngineTask.d.ts +20 -20
- package/activities/arcgis/LengthEngineTask.js +1 -1
- package/activities/arcgis/MapProvider.d.ts +133 -132
- package/activities/arcgis/MapProvider.js +1 -1
- package/activities/arcgis/NearestCoordinateEngineTask.d.ts +26 -26
- package/activities/arcgis/NearestVertexEngineTask.d.ts +26 -26
- package/activities/arcgis/NearestVertexEngineTask.js +1 -1
- package/activities/arcgis/NearestVerticesEngineTask.d.ts +34 -34
- package/activities/arcgis/NearestVerticesEngineTask.js +1 -1
- package/activities/arcgis/OffsetEngineTask.d.ts +25 -25
- package/activities/arcgis/OffsetEngineTask.js +1 -1
- package/activities/arcgis/ProjectServiceTask.d.ts +27 -27
- package/activities/arcgis/ProjectServiceTask.js +1 -1
- package/activities/arcgis/QueryAttachmentInfos.d.ts +21 -21
- package/activities/arcgis/QueryAttachmentInfos.js +1 -1
- package/activities/arcgis/QueryTask.d.ts +77 -77
- package/activities/arcgis/QueryTask.js +1 -1
- package/activities/arcgis/RefreshLayer.d.ts +12 -12
- package/activities/arcgis/RegisterCorsUrl.d.ts +21 -21
- package/activities/arcgis/RelateEngineTask.d.ts +22 -22
- package/activities/arcgis/RelateEngineTask.js +1 -1
- package/activities/arcgis/RelationServiceTask.d.ts +29 -29
- package/activities/arcgis/RelationServiceTask.js +1 -1
- package/activities/arcgis/RelationshipQueryTask.d.ts +37 -38
- package/activities/arcgis/RelationshipQueryTask.js +1 -1
- package/activities/arcgis/RemoveFeatureSetFields.d.ts +22 -22
- package/activities/arcgis/RemoveFeatureSetFields.js +1 -1
- package/activities/arcgis/RemoveGraphics.d.ts +14 -14
- package/activities/arcgis/RemoveGraphics.js +1 -1
- package/activities/arcgis/RemoveLayer.d.ts +16 -16
- package/activities/arcgis/RemoveLayer.js +1 -1
- package/activities/arcgis/RendererFromJson.d.ts +16 -16
- package/activities/arcgis/ReshapeServiceTask.d.ts +20 -20
- package/activities/arcgis/ReverseGeocode.d.ts +31 -31
- package/activities/arcgis/ReverseGeocode.js +1 -1
- package/activities/arcgis/RotateEngineTask.d.ts +20 -20
- package/activities/arcgis/RotateEngineTask.js +1 -1
- package/activities/arcgis/RouteTask.d.ts +91 -91
- package/activities/arcgis/RouteTask.js +1 -1
- package/activities/arcgis/RunPrint.d.ts +33 -34
- package/activities/arcgis/RunPrint.js +1 -1
- package/activities/arcgis/RunReport.d.ts +37 -38
- package/activities/arcgis/RunReport.js +1 -1
- package/activities/arcgis/RunWorkflow.d.ts +51 -52
- package/activities/arcgis/SendLayerToAttributeTable.d.ts +10 -10
- package/activities/arcgis/ServiceAreaTask.d.ts +87 -87
- package/activities/arcgis/ServiceAreaTask.js +1 -1
- package/activities/arcgis/SetFeatureAttribute.d.ts +15 -15
- package/activities/arcgis/SetFeatureGeometry.d.ts +13 -13
- package/activities/arcgis/SetFeaturePopup.d.ts +12 -12
- package/activities/arcgis/SetFeatureSymbol.d.ts +13 -13
- package/activities/arcgis/SetImageryLayerOptions.d.ts +27 -27
- package/activities/arcgis/SetImageryLayerOptions.js +1 -1
- package/activities/arcgis/SetLayerDefinitionExpression.d.ts +21 -21
- package/activities/arcgis/SetLayerDefinitionExpression.js +1 -1
- package/activities/arcgis/SetLayerPopup.d.ts +12 -12
- package/activities/arcgis/SetLayerPopup.js +1 -1
- package/activities/arcgis/SetLayerProperty.d.ts +23 -23
- package/activities/arcgis/SetLayerProperty.js +1 -1
- package/activities/arcgis/SetLayerVisibility.d.ts +23 -23
- package/activities/arcgis/SetLayerVisibility.js +1 -1
- package/activities/arcgis/SetMap.d.ts +14 -14
- package/activities/arcgis/SetViewExtent.d.ts +27 -27
- package/activities/arcgis/SetViewExtent.js +1 -1
- package/activities/arcgis/SetViewpoint.d.ts +23 -23
- package/activities/arcgis/SetViewpoint.js +1 -1
- package/activities/arcgis/ShowFeaturePopup.d.ts +11 -11
- package/activities/arcgis/ShowFeaturePopup.js +1 -1
- package/activities/arcgis/ShowResults.d.ts +51 -51
- package/activities/arcgis/SimplifyEngineTask.d.ts +15 -15
- package/activities/arcgis/SimplifyEngineTask.js +1 -1
- package/activities/arcgis/SortFeatureSet.d.ts +20 -20
- package/activities/arcgis/SymbolFromJson.d.ts +16 -16
- package/activities/arcgis/ToGeoCoordinateStringServiceTask.d.ts +30 -30
- package/activities/arcgis/TypeChecking.d.ts +46 -46
- package/activities/arcgis/UnionEngineTask.d.ts +19 -19
- package/activities/arcgis/UnionEngineTask.js +1 -1
- package/activities/arcgis/UnionServiceTask.d.ts +20 -20
- package/activities/arcgis/UpdateAttachment.d.ts +29 -29
- package/activities/arcgis/UpdateAttachment.js +1 -1
- package/activities/arcgis/UpdateFeatures.d.ts +27 -27
- package/activities/arcgis/UpdateFeatures.js +1 -1
- package/activities/arcgis/libs/arcGisRestApi.d.ts +18 -25
- package/activities/arcgis/runUtils.d.ts +93 -93
- package/activities/arcgis/shared.d.ts +61 -61
- package/activities/arcgis/tools.d.ts +42 -49
- package/activities/arcgis/tools.js +1 -1
- package/activities/browser/GetBrowserInfo.d.ts +13 -13
- package/activities/browser/InjectCss.d.ts +11 -11
- package/activities/constants.d.ts +19 -19
- package/activities/core/AddItem.d.ts +12 -12
- package/activities/core/AddItems.d.ts +12 -12
- package/activities/core/Annotation.d.ts +8 -8
- package/activities/core/Cast.d.ts +16 -16
- package/activities/core/ChannelProvider.d.ts +89 -90
- package/activities/core/ChannelProvider.js +1 -1
- package/activities/core/ClearItems.d.ts +10 -10
- package/activities/core/Container.d.ts +7 -7
- package/activities/core/ConvertBytesToText.d.ts +14 -14
- package/activities/core/ConvertDataTableToFeatureSet.d.ts +12 -12
- package/activities/core/ConvertTextToBytes.d.ts +14 -14
- package/activities/core/ConvertToJson.d.ts +16 -16
- package/activities/core/ConvertToJson.js +1 -1
- package/activities/core/CreateFile.d.ts +18 -18
- package/activities/core/CreateValue.d.ts +21 -21
- package/activities/core/DecodeUriComponent.d.ts +14 -14
- package/activities/core/Delay.d.ts +18 -18
- package/activities/core/EncodeUriComponent.d.ts +14 -14
- package/activities/core/Evaluate.d.ts +18 -18
- package/activities/core/EvaluateAsync.d.ts +18 -18
- package/activities/core/Exit.d.ts +7 -7
- package/activities/core/ForEach.d.ts +25 -26
- package/activities/core/FormatDate.d.ts +23 -23
- package/activities/core/GetBase64StringFromBytes.d.ts +15 -15
- package/activities/core/GetBase64StringFromFile.d.ts +15 -15
- package/activities/core/GetBytesFromBase64String.d.ts +15 -15
- package/activities/core/GetFirstItem.d.ts +14 -14
- package/activities/core/GetItemAtIndex.d.ts +15 -15
- package/activities/core/GetLastItem.d.ts +14 -14
- package/activities/core/GetLogLevel.d.ts +9 -9
- package/activities/core/GetTextFromFile.d.ts +16 -16
- package/activities/core/GetWorkflowInputs.d.ts +12 -12
- package/activities/core/If.d.ts +18 -18
- package/activities/core/Log.d.ts +14 -14
- package/activities/core/Log.js +1 -1
- package/activities/core/Loop.d.ts +27 -27
- package/activities/core/Loop.js +1 -1
- package/activities/core/ParseJson.d.ts +16 -16
- package/activities/core/ParseNumber.d.ts +12 -12
- package/activities/core/ParseUrl.d.ts +24 -25
- package/activities/core/ParseUrl.js +1 -1
- package/activities/core/Placeholder.d.ts +6 -6
- package/activities/core/RegexMatches.d.ts +17 -17
- package/activities/core/RegexReplace.d.ts +18 -18
- package/activities/core/RemoveItem.d.ts +14 -14
- package/activities/core/RunActivity.d.ts +12 -13
- package/activities/core/RunSubworkflow.d.ts +14 -15
- package/activities/core/SetLogLevel.d.ts +9 -9
- package/activities/core/SetProperty.d.ts +15 -15
- package/activities/core/SetWorkflowOutput.d.ts +12 -12
- package/activities/core/Subworkflow.d.ts +14 -15
- package/activities/core/Switch.d.ts +19 -19
- package/activities/core/TextReplace.d.ts +16 -16
- package/activities/core/Throw.d.ts +12 -12
- package/activities/core/TryCatch.d.ts +12 -12
- package/activities/core/WebRequest.d.ts +49 -50
- package/activities/core/WebRequest.js +1 -1
- package/activities/core/converters.d.ts +10 -10
- package/activities/csv/ConvertCsvToDataTable.d.ts +15 -15
- package/activities/csv/ConvertDataTableToCsv.d.ts +15 -15
- package/activities/essentials/GetEssentialsSite.d.ts +225 -225
- package/activities/essentials/RunEssentialsWorkflow.d.ts +25 -26
- package/activities/essentials/RunEssentialsWorkflow.js +1 -1
- package/activities/essentials/RunEssentialsWorkflowActivity.d.ts +17 -18
- package/activities/forms/ActivateFormElement.d.ts +13 -13
- package/activities/forms/ActivateFormElement.js +1 -1
- package/activities/forms/AddFormElement.d.ts +18 -18
- package/activities/forms/ClearFormElementError.d.ts +13 -13
- package/activities/forms/ClearFormElementError.js +1 -1
- package/activities/forms/CompleteForm.d.ts +11 -11
- package/activities/forms/DisplayForm.d.ts +48 -49
- package/activities/forms/DisplayForm.js +1 -1
- package/activities/forms/Errors.d.ts +18 -18
- package/activities/forms/FilterFormElementItems.d.ts +16 -16
- package/activities/forms/FormElementMap.d.ts +13 -13
- package/activities/forms/FormRenderer.d.ts +139 -134
- package/activities/forms/FormRenderer.js +1 -1
- package/activities/forms/GetFormElementItemsFromCollection.d.ts +49 -50
- package/activities/forms/GetFormElementItemsFromCollection.js +1 -1
- package/activities/forms/GetFormElementProperty.d.ts +19 -19
- package/activities/forms/GetFormElementValue.d.ts +17 -17
- package/activities/forms/GetFormEventData.d.ts +17 -17
- package/activities/forms/HideFormElement.d.ts +13 -13
- package/activities/forms/HideFormElement.js +1 -1
- package/activities/forms/PropagateFormEvent.d.ts +10 -10
- package/activities/forms/SetCurrentFormElementItem.d.ts +18 -18
- package/activities/forms/SetCurrentFormElementItem.js +1 -1
- package/activities/forms/SetFormElementError.d.ts +17 -17
- package/activities/forms/SetFormElementError.js +1 -1
- package/activities/forms/SetFormElementEvent.d.ts +18 -18
- package/activities/forms/SetFormElementItemProperty.d.ts +34 -21
- package/activities/forms/SetFormElementItemProperty.js +1 -1
- package/activities/forms/SetFormElementItems.d.ts +18 -19
- package/activities/forms/SetFormElementItems.js +1 -1
- package/activities/forms/SetFormElementProperty.d.ts +32 -19
- package/activities/forms/SetFormElementProperty.js +1 -1
- package/activities/forms/ShowFormElement.d.ts +15 -15
- package/activities/forms/ShowFormElement.js +1 -1
- package/activities/image/GetImageMetadata.d.ts +16 -16
- package/activities/image/RotateImage.d.ts +15 -15
- package/activities/index.d.ts +4 -2
- package/activities/index.js +1 -1
- package/activities/main.d.ts +1 -1
- package/activities/math/Abs.d.ts +14 -14
- package/activities/math/Cos.d.ts +14 -14
- package/activities/math/Max.d.ts +16 -16
- package/activities/math/Min.d.ts +16 -16
- package/activities/math/Pow.d.ts +15 -15
- package/activities/math/Random.d.ts +10 -10
- package/activities/math/Sin.d.ts +14 -14
- package/activities/math/Sqrt.d.ts +14 -14
- package/activities/math/Tan.d.ts +14 -14
- package/activities/pdf/AddGeoreferenceToPdf.d.ts +19 -19
- package/activities/pdf/AddImageToPdf.d.ts +63 -0
- package/activities/pdf/AddImageToPdf.js +1 -0
- package/activities/pdf/AddTextToPdf.d.ts +59 -0
- package/activities/pdf/AddTextToPdf.js +1 -0
- package/activities/pdf/CreatePdf.d.ts +49 -0
- package/activities/pdf/CreatePdf.js +1 -0
- package/activities/pdf/ExtractPdfPages.d.ts +17 -17
- package/activities/pdf/MergePdfs.d.ts +15 -15
- package/activities/server/CopyFile.d.ts +10 -10
- package/activities/server/CreateDirectory.d.ts +9 -9
- package/activities/server/CreateDownload.d.ts +18 -18
- package/activities/server/CreateEmailAttachment.d.ts +16 -16
- package/activities/server/CreateZipFromDirectory.d.ts +12 -12
- package/activities/server/DeleteDirectory.d.ts +9 -9
- package/activities/server/DeleteFile.d.ts +9 -9
- package/activities/server/DirectoryExists.d.ts +13 -13
- package/activities/server/ExtractZipToDirectory.d.ts +11 -11
- package/activities/server/FileExists.d.ts +13 -13
- package/activities/server/GetDirectoriesInDirectory.d.ts +14 -14
- package/activities/server/GetFilesInDirectory.d.ts +14 -14
- package/activities/server/MoveFile.d.ts +10 -10
- package/activities/server/ReadFile.d.ts +14 -14
- package/activities/server/ReadFileBytes.d.ts +13 -13
- package/activities/server/RunApplication.d.ts +22 -22
- package/activities/server/RunPython.d.ts +23 -23
- package/activities/server/SendEmail.d.ts +16 -16
- package/activities/server/SqlNonQuery.d.ts +18 -18
- package/activities/server/SqlQuery.d.ts +18 -18
- package/activities/server/SqlQueryUnsafe.d.ts +18 -18
- package/activities/server/WriteFile.d.ts +11 -11
- package/activities/server/WriteFileBytes.d.ts +10 -10
- package/activities/ui/Alert.d.ts +17 -17
- package/activities/ui/Confirm.d.ts +24 -24
- package/activities/ui/Prompt.d.ts +26 -26
- package/activities/wab/OpenWidget.d.ts +10 -10
- package/activities/wab/PublishWidgetData.d.ts +11 -11
- package/activities/xlsx/ConvertDataTableToXlsx.d.ts +15 -15
- package/activities/xlsx/ConvertXlsxToDataSet.d.ts +15 -15
- package/constants.d.ts +2 -2
- package/definition/Activity.d.ts +12 -13
- package/definition/ActivityInput.d.ts +31 -31
- package/definition/Component.d.ts +10 -10
- package/definition/DeploymentConfig.d.ts +4 -5
- package/definition/Form.d.ts +5 -5
- package/definition/Program.d.ts +29 -30
- package/definition/ProgramInspector.d.ts +290 -288
- package/definition/ProgramInspector.js +1 -1
- package/definition/Reference.d.ts +11 -11
- package/definition/Resource.d.ts +26 -26
- package/definition/Step.d.ts +9 -9
- package/definition/Transition.d.ts +17 -17
- package/diagnostics/ConsoleDebugLogger.d.ts +10 -10
- package/diagnostics/logging.d.ts +5 -5
- package/execution/ActivityLoader.d.ts +23 -24
- package/execution/ActivityLoader.js +1 -1
- package/execution/Engine.d.ts +84 -85
- package/execution/Engine.js +1 -1
- package/execution/IDebugSession.d.ts +43 -44
- package/execution/ModuleLoader.d.ts +42 -42
- package/execution/ModuleLoader.js +1 -1
- package/execution/ProgramRunner.d.ts +1 -1
- package/execution/ProgramRunner.js +1 -1
- package/forms/Calendar.d.ts +89 -89
- package/forms/ExclusiveTimer.d.ts +13 -13
- package/forms/FormComponent.d.ts +47 -30
- package/forms/FormComponent.js +1 -1
- package/forms/FormDefinition.d.ts +451 -457
- package/forms/FormElement.d.ts +24 -59
- package/forms/FormElement.js +1 -1
- package/forms/FormHost.d.ts +225 -233
- package/forms/FormHost.js +1 -1
- package/forms/FormPresenterHost.d.ts +62 -76
- package/forms/MutuallyExclusiveSectionGroup.d.ts +41 -41
- package/forms/NumberParser.d.ts +27 -25
- package/forms/NumberParser.js +1 -1
- package/forms/common.d.ts +67 -62
- package/forms/common.js +1 -1
- package/forms/components/AccordionGroup.d.ts +15 -15
- package/forms/components/AutoComplete.d.ts +8 -7
- package/forms/components/AutoComplete.js +1 -1
- package/forms/components/ButtonBar.d.ts +8 -13
- package/forms/components/ButtonBar.js +1 -1
- package/forms/components/CheckBox.d.ts +7 -7
- package/forms/components/CheckBox.js +1 -1
- package/forms/components/CheckGroup.d.ts +8 -7
- package/forms/components/CheckGroup.js +1 -1
- package/forms/components/Custom.d.ts +7 -7
- package/forms/components/Custom.js +1 -1
- package/forms/components/DatePicker.d.ts +8 -7
- package/forms/components/DatePicker.js +1 -1
- package/forms/components/DateRangePicker.d.ts +12 -11
- package/forms/components/DateRangePicker.js +1 -1
- package/forms/components/DateTimePicker.d.ts +8 -7
- package/forms/components/DateTimePicker.js +1 -1
- package/forms/components/DropDownList.d.ts +8 -7
- package/forms/components/DropDownList.js +1 -1
- package/forms/components/FilePicker.d.ts +10 -9
- package/forms/components/FilePicker.js +1 -1
- package/forms/components/Form.d.ts +23 -23
- package/forms/components/Form.js +1 -1
- package/forms/components/FormLabelNumberField.d.ts +17 -15
- package/forms/components/FormLabelNumberField.js +1 -1
- package/forms/components/GeometryPicker.d.ts +5 -4
- package/forms/components/GeometryPicker.js +1 -1
- package/forms/components/GeometryPickerListItem.d.ts +23 -23
- package/forms/components/HorizontalRule.d.ts +7 -7
- package/forms/components/Image.d.ts +7 -7
- package/forms/components/Image.js +1 -1
- package/forms/components/ItemPicker.d.ts +15 -17
- package/forms/components/ItemPicker.js +1 -1
- package/forms/components/ListBox.d.ts +8 -7
- package/forms/components/ListBox.js +1 -1
- package/forms/components/Markdown.d.ts +14 -15
- package/forms/components/Markdown.js +1 -1
- package/forms/components/Number.d.ts +8 -7
- package/forms/components/Number.js +1 -1
- package/forms/components/NumberRangeSlider.d.ts +12 -12
- package/forms/components/NumberRangeSlider.js +1 -1
- package/forms/components/NumberSlider.d.ts +11 -10
- package/forms/components/NumberSlider.js +1 -1
- package/forms/components/RadioGroup.d.ts +8 -7
- package/forms/components/RadioGroup.js +1 -1
- package/forms/components/Scanner.d.ts +11 -9
- package/forms/components/Scanner.js +1 -1
- package/forms/components/Section.d.ts +14 -14
- package/forms/components/Section.js +1 -1
- package/forms/components/Signature.d.ts +12 -11
- package/forms/components/Signature.js +1 -1
- package/forms/components/SignatureDialog.d.ts +22 -22
- package/forms/components/SignatureDialog.js +1 -1
- package/forms/components/Text.d.ts +8 -8
- package/forms/components/TextArea.d.ts +7 -7
- package/forms/components/TextArea.js +1 -1
- package/forms/components/TextBox.d.ts +7 -21
- package/forms/components/TextBox.js +1 -1
- package/forms/components/TimePicker.d.ts +8 -7
- package/forms/components/TimePicker.js +1 -1
- package/forms/constants.d.ts +81 -81
- package/forms/dateUtilities.d.ts +102 -117
- package/forms/dateUtilities.js +1 -1
- package/forms/elements/AutoComplete.d.ts +13 -13
- package/forms/elements/ButtonBar.d.ts +9 -9
- package/forms/elements/CheckBox.d.ts +7 -7
- package/forms/elements/CheckGroup.d.ts +11 -11
- package/forms/elements/Custom.d.ts +7 -7
- package/forms/elements/DatePicker.d.ts +6 -6
- package/forms/elements/DateRangePicker.d.ts +6 -6
- package/forms/elements/DateTimePicker.d.ts +6 -6
- package/forms/elements/DropDownList.d.ts +6 -6
- package/forms/elements/FilePicker.d.ts +8 -8
- package/forms/elements/GeometryPicker.d.ts +18 -18
- package/forms/elements/Header.d.ts +10 -10
- package/forms/elements/HorizontalRule.d.ts +2 -2
- package/forms/elements/Image.d.ts +2 -2
- package/forms/elements/ItemPicker.d.ts +13 -13
- package/forms/elements/ListBox.d.ts +11 -11
- package/forms/elements/Number.d.ts +11 -11
- package/forms/elements/NumberRangeSlider.d.ts +10 -10
- package/forms/elements/NumberSlider.d.ts +6 -6
- package/forms/elements/PasswordBox.d.ts +5 -5
- package/forms/elements/RadioGroup.d.ts +6 -6
- package/forms/elements/Scanner.d.ts +19 -19
- package/forms/elements/Section.d.ts +2 -2
- package/forms/elements/Signature.d.ts +16 -16
- package/forms/elements/Text.d.ts +2 -2
- package/forms/elements/TextArea.d.ts +7 -7
- package/forms/elements/TextBox.d.ts +5 -5
- package/forms/elements/TimePicker.d.ts +6 -6
- package/forms/elements/types.d.ts +83 -83
- package/forms/index.d.ts +124 -72
- package/forms/keyboard.d.ts +9 -9
- package/forms/listUtilities.d.ts +3 -0
- package/forms/listUtilities.js +1 -0
- package/forms/manifest.d.ts +3 -0
- package/forms/manifest.js +1 -0
- package/forms/numberFormatter.d.ts +90 -94
- package/forms/numberFormatter.js +1 -1
- package/forms/numberUtilities.d.ts +150 -113
- package/forms/numberUtilities.js +1 -1
- package/forms/presenter.d.ts +21 -21
- package/forms/presenter.js +1 -1
- package/forms/renderers.d.ts +5 -8
- package/forms/renderers.js +1 -1
- package/forms/textUtilities.d.ts +33 -23
- package/forms/textUtilities.js +1 -1
- package/forms/utils.d.ts +177 -132
- package/forms/utils.js +1 -1
- package/index.d.ts +2 -2
- package/libs/version.d.ts +1 -1
- package/libs/version.js +1 -1
- package/licensing/LicenseChecker.d.ts +1 -1
- package/licensing/Watermark.d.ts +7 -7
- package/package.json +9 -11
- package/activities/app/constants.d.ts +0 -1
- package/activities/app/constants.js +0 -1
package/forms/index.d.ts
CHANGED
|
@@ -1,72 +1,124 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
*
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { EventArgumentTypes, EventValueTypes } from "./FormComponent";
|
|
3
|
+
import { defs } from "./FormHost";
|
|
4
|
+
import { FormatOptions } from "./numberFormatter";
|
|
5
|
+
export { Orientation, TitleLocation } from "./constants";
|
|
6
|
+
export type { Text } from "./elements/types";
|
|
7
|
+
/**
|
|
8
|
+
* Details about an event to be fired when the value property is updated.
|
|
9
|
+
* If `false`, no event is fired.
|
|
10
|
+
* If `true`, the event is fired with the event object just containing the element's value.
|
|
11
|
+
* If an object containing `"argument"` or `"item" properties, the event is fired and those properties are included in the event object.
|
|
12
|
+
*/
|
|
13
|
+
type EventOptions = Partial<Pick<defs.Event, "argument" | "item">> | boolean;
|
|
14
|
+
export interface ITranslateTextFunction {
|
|
15
|
+
(content: string): string;
|
|
16
|
+
(content: defs.MarkdownRef | defs.StatusRef): defs.MarkdownRef;
|
|
17
|
+
(content: defs.Text | undefined): string | defs.MarkdownRef | undefined;
|
|
18
|
+
}
|
|
19
|
+
/** @public */
|
|
20
|
+
export interface FormElementProps<TValue = undefined> extends FormElementSettableProps<TValue>, FormElementGettableProps {
|
|
21
|
+
className?: string;
|
|
22
|
+
/** Coerces a number from a value. */
|
|
23
|
+
coerceNumber: (value: string) => number;
|
|
24
|
+
/**
|
|
25
|
+
* Derives the current locale set by the host application (or default if undefined) will be returned.
|
|
26
|
+
*/
|
|
27
|
+
deriveLocale: () => string;
|
|
28
|
+
enabled: boolean;
|
|
29
|
+
/** Formats a value into a string. */
|
|
30
|
+
formatNumber: (value: number, options?: FormatOptions) => string;
|
|
31
|
+
id: string;
|
|
32
|
+
name: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* A callback function to raise an event. The `custom` event accepts any
|
|
35
|
+
* value as the eventValue. Use the Get Form Event Data to access the event
|
|
36
|
+
* data in a sub-workflow of the Display Form activity.
|
|
37
|
+
* @param eventName The name of the event to raise. Currently only `custom`
|
|
38
|
+
* is permitted.
|
|
39
|
+
* @param eventValue The value of the event.
|
|
40
|
+
*/
|
|
41
|
+
raiseEvent: <K extends keyof EventValueTypes>(eventName: K, eventValue: EventValueTypes[K], argument?: EventArgumentTypes[K], item?: string, cancellationToken?: PromiseLike<void>) => void;
|
|
42
|
+
/** Renders the focus. */
|
|
43
|
+
renderFocus: (target: Node, name?: string) => boolean;
|
|
44
|
+
/** Renders a component's state. */
|
|
45
|
+
renderState(name: string, type: string, state?: {}): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Renders form text as a string.
|
|
48
|
+
* If `text` is a reference to a language string (e.g. `"@my-language-string"`), it is translated.
|
|
49
|
+
* If `text` is a `MarkdownRef`, it is converted to plain text.
|
|
50
|
+
*/
|
|
51
|
+
renderText: (text: defs.Text | undefined) => string;
|
|
52
|
+
/**
|
|
53
|
+
* Set a property on an item in the element.
|
|
54
|
+
* @param property The name of the property to set.
|
|
55
|
+
* @param value The new value to set.
|
|
56
|
+
*/
|
|
57
|
+
setItemProperty: <K extends keyof FormElementItemSettableProps>(item: string, property: K, value: FormElementItemProps[K]) => void;
|
|
58
|
+
/**
|
|
59
|
+
* Set a property on the element.
|
|
60
|
+
* @param property The name of the property to set.
|
|
61
|
+
* @param value The new value to set.
|
|
62
|
+
*/
|
|
63
|
+
setProperty: <K extends keyof FormElementSettableProps<TValue>>(property: K, value: this[K], event?: EventOptions) => void;
|
|
64
|
+
/**
|
|
65
|
+
* Sets the `value` property of the element. Equivalent to calling
|
|
66
|
+
* `setProperty("value", value)`.
|
|
67
|
+
*
|
|
68
|
+
* Setting the value will raise the `change` event on the element.
|
|
69
|
+
*
|
|
70
|
+
* @param value The new value to set.
|
|
71
|
+
*/
|
|
72
|
+
setValue: (value: this["value"], event?: EventOptions) => void;
|
|
73
|
+
/** Translates the supplied value. */
|
|
74
|
+
translateText: ITranslateTextFunction;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Properties of a Form Element that can be read via the component's properties.
|
|
78
|
+
*/
|
|
79
|
+
interface FormElementGettableProps extends Pick<defs.Element, "accessibleDescription" | "autoActivate" | "checked" | "collapsed" | "current" | "customType" | "delay" | "description" | "error" | "fileTypes" | "format" | "itemLabel" | "items" | "label" | "manualEntry" | "maxLength" | "minLength" | "orientation" | "prompt" | "readOnly" | "require" | "scanType" | "selectionMode" | "showFilter" | "showMinMaxLabels" | "showTickMarks" | "size" | "state" | "title" | "tooltip" | "type" | "wrap"> {
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Properties of a Form Element that can be set using `SetProperty()`.
|
|
83
|
+
* Any properties defined here can also be read via the component's properties.
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
export interface FormElementSettableProps<TValue = undefined> extends Pick<defs.Element, "autoActivate" | "checked" | "collapsed" | "current" | "error" | "items" | "label" | "state"> {
|
|
87
|
+
/** The value of the element. */
|
|
88
|
+
value: TValue;
|
|
89
|
+
}
|
|
90
|
+
/** @public */
|
|
91
|
+
export interface FormElementItemProps extends FormElementItemSettableProps, Pick<defs.Item, "default" | "enabled" | "index" | "label" | "styleName" | "tooltip" | "validates" | "value" | "visible"> {
|
|
92
|
+
}
|
|
93
|
+
/** @public */
|
|
94
|
+
export interface FormElementItemSettableProps extends Pick<defs.Item, "checked"> {
|
|
95
|
+
}
|
|
96
|
+
type SettablePropsFromProps<TProps extends FormElementProps> = Omit<TProps, keyof FormElementProps> & FormElementSettableProps<TProps["value"]>;
|
|
97
|
+
type Unionize<T> = T[keyof T];
|
|
98
|
+
/** @public */
|
|
99
|
+
export type PropertyChangeEvent<TSettableProps, TSetProperty> = Unionize<{
|
|
100
|
+
[K in keyof Required<TSettableProps>]: {
|
|
101
|
+
properties: Readonly<TSettableProps>;
|
|
102
|
+
property: K;
|
|
103
|
+
setProperty: TSetProperty;
|
|
104
|
+
};
|
|
105
|
+
}>;
|
|
106
|
+
/** @public */
|
|
107
|
+
export interface FormElementRegistration<TProps extends FormElementProps<any> = FormElementProps, TSettableProps extends SettablePropsFromProps<TProps> = SettablePropsFromProps<TProps>> {
|
|
108
|
+
/** The React component definition of the form element. */
|
|
109
|
+
component: React.ComponentType<TProps>;
|
|
110
|
+
/** The unique identifier of the element. */
|
|
111
|
+
id: string;
|
|
112
|
+
/**
|
|
113
|
+
* Generate the initial properties of the form element. This will be assigned to
|
|
114
|
+
* the element properties before first render.
|
|
115
|
+
*/
|
|
116
|
+
getInitialProperties?: () => Partial<TSettableProps>;
|
|
117
|
+
/**
|
|
118
|
+
* This function will be invoked prior to updating a property of the element
|
|
119
|
+
* state. It will be invoked even if the element isn't currently visible.
|
|
120
|
+
*
|
|
121
|
+
* @returns Either a new value, an error message, or nothing.
|
|
122
|
+
*/
|
|
123
|
+
onPropertyChange?: (event: PropertyChangeEvent<TSettableProps, TProps["setProperty"]>) => void;
|
|
124
|
+
}
|
package/forms/keyboard.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export interface KeyboardEvent {
|
|
2
|
-
altKey: boolean;
|
|
3
|
-
ctrlKey: boolean;
|
|
4
|
-
metaKey: boolean;
|
|
5
|
-
shiftKey: boolean;
|
|
6
|
-
key: string;
|
|
7
|
-
}
|
|
8
|
-
/** @product This is intended for internal use only within VertiGIS Studio products. */
|
|
9
|
-
export declare function getKeyString(event: KeyboardEvent): string;
|
|
1
|
+
export interface KeyboardEvent {
|
|
2
|
+
altKey: boolean;
|
|
3
|
+
ctrlKey: boolean;
|
|
4
|
+
metaKey: boolean;
|
|
5
|
+
shiftKey: boolean;
|
|
6
|
+
key: string;
|
|
7
|
+
}
|
|
8
|
+
/** @product This is intended for internal use only within VertiGIS Studio products. */
|
|
9
|
+
export declare function getKeyString(event: KeyboardEvent): string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isItemsRef}from"./utils.js";function arrayEqual(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function areValuesEqual(r,e){return r===e||void 0!==r&&void 0!==e&&(!!isItemsRef(r)&&itemArrayEqual(r.items,e.items))}function itemArrayEqual(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}export{arrayEqual,areValuesEqual};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import AutoComplete from"./components/AutoComplete.js";import ButtonBar from"./components/ButtonBar.js";import CheckBox from"./components/CheckBox.js";import CheckGroup from"./components/CheckGroup.js";import Custom from"./components/Custom.js";import DatePicker from"./components/DatePicker.js";import DateRangePicker from"./components/DateRangePicker.js";import DateTimePicker from"./components/DateTimePicker.js";import DropDownList from"./components/DropDownList.js";import FilePicker from"./components/FilePicker.js";import GeometryPicker from"./components/GeometryPicker.js";import HorizontalRule from"./components/HorizontalRule.js";import Image from"./components/Image.js";import ItemPicker from"./components/ItemPicker.js";import ListBox from"./components/ListBox.js";import Number from"./components/Number.js";import NumberRangeSlider from"./components/NumberRangeSlider.js";import NumberSlider from"./components/NumberSlider.js";import RadioGroup from"./components/RadioGroup.js";import Scanner from"./components/Scanner.js";import Section from"./components/Section.js";import Signature from"./components/Signature.js";import Text from"./components/Text.js";import TextArea from"./components/TextArea.js";import TextBox from"./components/TextBox.js";import TimePicker from"./components/TimePicker.js";import{FormElementTypes}from"./constants.js";const BuiltInFormElements={[FormElementTypes.AUTOCOMPLETE]:{id:FormElementTypes.AUTOCOMPLETE,component:AutoComplete},[FormElementTypes.BUTTONBAR]:{id:FormElementTypes.BUTTONBAR,component:ButtonBar},[FormElementTypes.CHECKBOX]:{id:FormElementTypes.CHECKBOX,component:CheckBox},[FormElementTypes.CHECKGROUP]:{id:FormElementTypes.CHECKGROUP,component:CheckGroup},[FormElementTypes.CUSTOM]:{id:FormElementTypes.CUSTOM,component:Custom},[FormElementTypes.DATEPICKER]:{id:FormElementTypes.DATEPICKER,component:DatePicker},[FormElementTypes.DATERANGEPICKER]:{id:FormElementTypes.DATERANGEPICKER,component:DateRangePicker},[FormElementTypes.DATETIMEPICKER]:{id:FormElementTypes.DATETIMEPICKER,component:DateTimePicker},[FormElementTypes.DROPDOWNLIST]:{id:FormElementTypes.DROPDOWNLIST,component:DropDownList},[FormElementTypes.FILEPICKER]:{id:FormElementTypes.FILEPICKER,component:FilePicker},[FormElementTypes.GEOMETRYPICKER]:{id:FormElementTypes.GEOMETRYPICKER,component:GeometryPicker},[FormElementTypes.HORIZONTALRULE]:{id:FormElementTypes.HORIZONTALRULE,component:HorizontalRule},[FormElementTypes.IMAGE]:{id:FormElementTypes.IMAGE,component:Image},[FormElementTypes.ITEMPICKER]:{id:FormElementTypes.ITEMPICKER,component:ItemPicker},[FormElementTypes.LISTBOX]:{id:FormElementTypes.LISTBOX,component:ListBox},[FormElementTypes.NUMBER]:{id:FormElementTypes.NUMBER,component:Number},[FormElementTypes.NUMBERRANGESLIDER]:{id:FormElementTypes.NUMBERRANGESLIDER,component:NumberRangeSlider},[FormElementTypes.NUMBERSLIDER]:{id:FormElementTypes.NUMBERSLIDER,component:NumberSlider},[FormElementTypes.PASSWORDBOX]:{id:FormElementTypes.PASSWORDBOX,component:TextBox},[FormElementTypes.RADIOGROUP]:{id:FormElementTypes.RADIOGROUP,component:RadioGroup},[FormElementTypes.SCANNER]:{id:FormElementTypes.SCANNER,component:Scanner},[FormElementTypes.SECTION]:{id:FormElementTypes.SECTION,component:Section},[FormElementTypes.SIGNATURE]:{id:FormElementTypes.SIGNATURE,component:Signature},[FormElementTypes.TEXT]:{id:FormElementTypes.TEXT,component:Text},[FormElementTypes.TEXTAREA]:{id:FormElementTypes.TEXTAREA,component:TextArea},[FormElementTypes.TEXTBOX]:{id:FormElementTypes.TEXTBOX,component:TextBox},[FormElementTypes.TIMEPICKER]:{id:FormElementTypes.TIMEPICKER,component:TimePicker}};export{BuiltInFormElements};
|
|
@@ -1,94 +1,90 @@
|
|
|
1
|
-
export { isNumeric } from "./utils";
|
|
2
|
-
/**
|
|
3
|
-
* Pre-defined format specifiers for use with format().
|
|
4
|
-
*/
|
|
5
|
-
export declare enum NumberDisplayFormat {
|
|
6
|
-
/**
|
|
7
|
-
* A localized representation of a number with a decimal separator and group
|
|
8
|
-
* separators (e.g. "12,345.67", "-42" for en-US locale).
|
|
9
|
-
*/
|
|
10
|
-
NUMBER = "n",
|
|
11
|
-
/**
|
|
12
|
-
* A localized representation of a number with a decimal separator (e.g.
|
|
13
|
-
* "12345.67", "-42" for en-US locale).
|
|
14
|
-
*/
|
|
15
|
-
FIXED_POINT = "f",
|
|
16
|
-
/**
|
|
17
|
-
* A localized representation of a monetary amount in a specific currency
|
|
18
|
-
* (e.g. "$123.45" for USD, "£123.45" for GBP for en-US locale).
|
|
19
|
-
*/
|
|
20
|
-
CURRENCY = "c",
|
|
21
|
-
/**
|
|
22
|
-
* Same as CURRENCY, except that in many locales, negative values may be displayed in
|
|
23
|
-
* parentheses instead of using a "-" sign.
|
|
24
|
-
*/
|
|
25
|
-
ACCOUNTING = "a",
|
|
26
|
-
/**
|
|
27
|
-
* A localized representation of a percentage (e.g. 0.99 -\> "99%" in the
|
|
28
|
-
* en-US locale).
|
|
29
|
-
*/
|
|
30
|
-
PERCENT = "p",
|
|
31
|
-
/**
|
|
32
|
-
* An invariant representation of a number (e.g. "12345.67"). Guarantees
|
|
33
|
-
* that the number can be parsed back into the same number, regardless of
|
|
34
|
-
* locale.
|
|
35
|
-
*/
|
|
36
|
-
ROUND_TRIP = "r",
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* The
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
*/
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
*
|
|
60
|
-
*/
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
*
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
*
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
*
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
* @param options Specifies the format settings to use.
|
|
92
|
-
* @param num The number to format.
|
|
93
|
-
*/
|
|
94
|
-
export declare function format(options: FormatOptions, num: number): string;
|
|
1
|
+
export { isNumeric } from "./utils";
|
|
2
|
+
/**
|
|
3
|
+
* Pre-defined format specifiers for use with format().
|
|
4
|
+
*/
|
|
5
|
+
export declare enum NumberDisplayFormat {
|
|
6
|
+
/**
|
|
7
|
+
* A localized representation of a number with a decimal separator and group
|
|
8
|
+
* separators (e.g. "12,345.67", "-42" for en-US locale).
|
|
9
|
+
*/
|
|
10
|
+
NUMBER = "n",
|
|
11
|
+
/**
|
|
12
|
+
* A localized representation of a number with a decimal separator (e.g.
|
|
13
|
+
* "12345.67", "-42" for en-US locale).
|
|
14
|
+
*/
|
|
15
|
+
FIXED_POINT = "f",
|
|
16
|
+
/**
|
|
17
|
+
* A localized representation of a monetary amount in a specific currency
|
|
18
|
+
* (e.g. "$123.45" for USD, "£123.45" for GBP for en-US locale).
|
|
19
|
+
*/
|
|
20
|
+
CURRENCY = "c",
|
|
21
|
+
/**
|
|
22
|
+
* Same as CURRENCY, except that in many locales, negative values may be displayed in
|
|
23
|
+
* parentheses instead of using a "-" sign.
|
|
24
|
+
*/
|
|
25
|
+
ACCOUNTING = "a",
|
|
26
|
+
/**
|
|
27
|
+
* A localized representation of a percentage (e.g. 0.99 -\> "99%" in the
|
|
28
|
+
* en-US locale).
|
|
29
|
+
*/
|
|
30
|
+
PERCENT = "p",
|
|
31
|
+
/**
|
|
32
|
+
* An invariant representation of a number (e.g. "12345.67"). Guarantees
|
|
33
|
+
* that the number can be parsed back into the same number, regardless of
|
|
34
|
+
* locale.
|
|
35
|
+
*/
|
|
36
|
+
ROUND_TRIP = "r",
|
|
37
|
+
/**
|
|
38
|
+
* A custom format string.
|
|
39
|
+
*/
|
|
40
|
+
CUSTOM = "custom"
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Options supported by {@link format}.
|
|
44
|
+
*/
|
|
45
|
+
export interface FormatOptions {
|
|
46
|
+
/**
|
|
47
|
+
* The locale to use when formatting the number.
|
|
48
|
+
*/
|
|
49
|
+
locale: string;
|
|
50
|
+
/**
|
|
51
|
+
* The number format. See {@link NumberFormatter.format}.
|
|
52
|
+
*/
|
|
53
|
+
format?: NumberDisplayFormat;
|
|
54
|
+
/**
|
|
55
|
+
* See NumberFormat.currency.
|
|
56
|
+
*/
|
|
57
|
+
currency?: string;
|
|
58
|
+
/**
|
|
59
|
+
* The custom number format. Required for a format type of 'Custom'
|
|
60
|
+
*/
|
|
61
|
+
customDisplayFormat?: string;
|
|
62
|
+
/**
|
|
63
|
+
* See NumberFormat.precision.
|
|
64
|
+
*/
|
|
65
|
+
fractionalDigits?: number;
|
|
66
|
+
}
|
|
67
|
+
export declare const DEFAULT_CURRENCY = "USD";
|
|
68
|
+
export declare const DEFAULT_CUSTOM_FORMAT = "#.##";
|
|
69
|
+
export declare const DEFAULT_FRACTIONAL_DIGITS = 4;
|
|
70
|
+
export declare const SUPPORTED_CURRENCIES: string[];
|
|
71
|
+
/**
|
|
72
|
+
* Formats a number for display in the current locale.
|
|
73
|
+
*
|
|
74
|
+
* @param num The number to format.
|
|
75
|
+
*/
|
|
76
|
+
export declare function format(num: number): string;
|
|
77
|
+
/**
|
|
78
|
+
* Formats a number for display.
|
|
79
|
+
*
|
|
80
|
+
* @param format See {@link NumberFormatter.format}.
|
|
81
|
+
* @param num The number to format.
|
|
82
|
+
*/
|
|
83
|
+
export declare function format(format: string, num: number): string;
|
|
84
|
+
/**
|
|
85
|
+
* Formats a number for display.
|
|
86
|
+
*
|
|
87
|
+
* @param options Specifies the format settings to use.
|
|
88
|
+
* @param num The number to format.
|
|
89
|
+
*/
|
|
90
|
+
export declare function format(options: FormatOptions, num: number): string;
|
package/forms/numberFormatter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_LOCALE}from"../constants.js";export{isNumeric}from"./utils.js";var NumberDisplayFormat;!function(t){t.NUMBER="n",t.FIXED_POINT="f",t.CURRENCY="c",t.ACCOUNTING="a",t.PERCENT="p",t.ROUND_TRIP="r",t.
|
|
1
|
+
import{DEFAULT_LOCALE}from"../constants.js";export{isNumeric}from"./utils.js";var NumberDisplayFormat;!function(t){t.NUMBER="n",t.FIXED_POINT="f",t.CURRENCY="c",t.ACCOUNTING="a",t.PERCENT="p",t.ROUND_TRIP="r",t.CUSTOM="custom"}(NumberDisplayFormat=NumberDisplayFormat||{});const DEFAULT_CURRENCY="USD",DEFAULT_CUSTOM_FORMAT="#.##",DEFAULT_FRACTIONAL_DIGITS=4,SUPPORTED_CURRENCIES=["ADP","AED","AFA","AFN","ALK","ALL","AMD","ANG","AOA","AOK","AON","AOR","ARA","ARL","ARM","ARP","ARS","ATS","AUD","AWG","AZM","AZN","BAD","BAM","BAN","BBD","BDT","BEC","BEF","BEL","BGL","BGM","BGN","BGO","BHD","BIF","BMD","BND","BOB","BOL","BOP","BOV","BRB","BRC","BRE","BRL","BRN","BRR","BRZ","BSD","BTN","BUK","BWP","BYB","BYN","BYR","BZD","CAD","CDF","CHE","CHF","CHW","CLE","CLF","CLP","CNH","CNX","CNY","COP","COU","CRC","CSD","CSK","CUC","CUP","CVE","CYP","CZK","DDM","DEM","DJF","DKK","DOP","DZD","ECS","ECV","EEK","EGP","ERN","ESA","ESB","ESP","ETB","EUR","FIM","FJD","FKP","FRF","GBP","GEK","GEL","GHC","GHS","GIP","GMD","GNF","GNS","GQE","GRD","GTQ","GWE","GWP","GYD","HKD","HNL","HRD","HRK","HTG","HUF","IDR","IEP","ILP","ILR","ILS","INR","IQD","IRR","ISJ","ISK","ITL","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRH","KRO","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LTT","LUC","LUF","LUL","LVL","LVR","LYD","MAD","MAF","MCF","MDC","MDL","MGA","MGF","MKD","MKN","MLF","MMK","MNT","MOP","MRO","MRU","MTL","MTP","MUR","MVP","MVR","MWK","MXN","MXP","MXV","MYR","MZE","MZM","MZN","NAD","NGN","NIC","NIO","NLG","NOK","NPR","NZD","OMR","PAB","PEI","PEN","PES","PGK","PHP","PKR","PLN","PLZ","PTE","PYG","QAR","RHD","ROL","RON","RSD","RUB","RUR","RWF","SAR","SBD","SCR","SDD","SDG","SDP","SEK","SGD","SHP","SIT","SKK","SLL","SOS","SRD","SRG","SSP","STD","STN","SUR","SVC","SYP","SZL","THB","TJR","TJS","TMM","TMT","TND","TOP","TPE","TRL","TRY","TTD","TWD","TZS","UAH","UAK","UGS","UGX","USD","USN","USS","UYI","UYP","UYU","UYW","UZS","VEB","VEF","VES","VND","VNN","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XEU","XFO","XFU","XOF","XPD","XPF","XPT","XRE","XSU","XTS","XUA","XXX","YDD","YER","YUD","YUM","YUN","YUR","ZAL","ZAR","ZMK","ZMW","ZRN","ZRZ","ZWD","ZWL","ZWR"];function format(...t){return globalFormatter.format.apply(globalFormatter,t)}class NumberFormatter{format(...t){let r=NaN,a={locale:DEFAULT_LOCALE};if(1===t.length?r=t[0]:2<=arguments.length&&(r=t[1],a="string"==typeof t[0]?{format:t[0],locale:DEFAULT_LOCALE}:t[0]||a),null===r||void 0===r||isNaN(r))return"";let e=a.format||NumberDisplayFormat.NUMBER;if(e===NumberDisplayFormat.CUSTOM&&(e=a.customDisplayFormat||DEFAULT_CUSTOM_FORMAT),e===NumberDisplayFormat.ROUND_TRIP)return r.toString();var m=e.toLowerCase();m===NumberDisplayFormat.CURRENCY||m===NumberDisplayFormat.ACCOUNTING?(i=a.currency||DEFAULT_CURRENCY,e=m,e+=a.fractionalDigits??"",e+=i?`$${i}`:""):m!==NumberDisplayFormat.NUMBER&&m!==NumberDisplayFormat.FIXED_POINT&&m!==NumberDisplayFormat.PERCENT||(e=m,e+=a.fractionalDigits??"");const D=[a.locale];var i=`${D.join(";")}|${e}`;let N=numberFormatters.get(i);return N||(N=[],1===(m=e.split(";",3)).length?(N[0]=this._createNumberFormatter(D,m[0]),N[1]=N[0],N[2]=N[0]):2===m.length?(N[0]=this._createNumberFormatter(D,m[0]),N[1]=this._createNumberFormatter(D,m[1]),N[2]=N[0]):3===m.length&&(N[0]=this._createNumberFormatter(D,m[0]),N[1]=this._createNumberFormatter(D,m[1]),N[2]=this._createNumberFormatter(D,m[2])),numberFormatters.set(i,N)),0<r?N[0](r):r<0?N[1](r):N[2](r)}_createNumberFormatter(r,t){const a={};let e=t.match(standardFormatPattern);if(e){var m=e[1].toLowerCase(),D=Math.min(20,parseInt(e[2]));let t=e[3];m===NumberDisplayFormat.CURRENCY||m===NumberDisplayFormat.ACCOUNTING?t=(t||DEFAULT_CURRENCY).toUpperCase():(t="",void 0===a.minimumFractionDigits&&(a.minimumFractionDigits=0),void 0===a.maximumFractionDigits&&(a.maximumFractionDigits=Math.max(DEFAULT_FRACTIONAL_DIGITS,a.minimumFractionDigits))),m===NumberDisplayFormat.PERCENT?a.style="percent":m===NumberDisplayFormat.ACCOUNTING?a.currencySign="accounting":m===NumberDisplayFormat.FIXED_POINT&&(a.useGrouping=!1),isNaN(D)||(a.minimumFractionDigits=D,a.maximumFractionDigits=D);const E=t?new Intl.NumberFormat(r,{style:"currency",currency:t,...a}):new Intl.NumberFormat(r,a);return t=>E.format(t)}var i,N;e=t.match(/[0#]+|\.|,|%|\\.|(["'])[^\1]+\1|[^0#.,\\'"]+/g);let R=!1,F="",o="",n="",s="";a.minimumFractionDigits=0,a.maximumFractionDigits=0,a.useGrouping=!1;for(i of e)switch(i[0]){case".":R=!0;break;case",":a.useGrouping=!0;break;case"%":a.style="percent";break;case"0":case"#":R?o+=i:F+=i;break;default:0===i.indexOf('"')||0===i.indexOf("'")?i=i.slice(1,-1):0===i.indexOf("\\")&&(i=i.slice(1)),F||o?s+=i:n+=i}if(!F||0<=(N=F.indexOf("0"))&&(a.minimumIntegerDigits=F.length-N),o&&(N=o.lastIndexOf("0"),a.minimumFractionDigits=0<=N?N+1:0,a.maximumFractionDigits=Math.min(20,o.length)),F||o){const C=new Intl.NumberFormat(r,a);return t=>`${n}${C.format(t)}${s}`}return()=>n+s}}const numberFormatters=new Map,standardFormatPattern=/^([acfnp])(\d*)(?:\$([a-zA-Z]{3}))?$/i,globalFormatter=new NumberFormatter;export{NumberDisplayFormat,DEFAULT_CURRENCY,DEFAULT_CUSTOM_FORMAT,DEFAULT_FRACTIONAL_DIGITS,SUPPORTED_CURRENCIES,format};
|