@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
|
@@ -1,113 +1,150 @@
|
|
|
1
|
-
import * as defs from "./FormDefinition";
|
|
2
|
-
import { FormatOptions } from "./numberFormatter";
|
|
3
|
-
import { PropertyConstraints, PropertyConstraintsWithDefault } from "./utils";
|
|
4
|
-
/**
|
|
5
|
-
* Configuration for cleaning up a {@link defs.NumberFormat} used in producing a {@link defs.NumberConstraints}.
|
|
6
|
-
*
|
|
7
|
-
* This is a bit meta.
|
|
8
|
-
* * A `NumberConstraints` is used at runtime to ensure the value that a user entered is valid.
|
|
9
|
-
* * The `NumberConstraints` is generated from a `NumberFormat` which may only be partially defined, or may have values that are out of range.
|
|
10
|
-
* * We need to populate and validate the `NumberFormat` first of all before we can generate a valid `NumberConstraints`.
|
|
11
|
-
*/
|
|
12
|
-
export interface NumberFormatConfiguration {
|
|
13
|
-
[key: string]: PropertyConstraints<any> | undefined;
|
|
14
|
-
lowerBound: PropertyConstraints<number>;
|
|
15
|
-
precision: PropertyConstraintsWithDefault<number>;
|
|
16
|
-
step: PropertyConstraintsWithDefault<number>;
|
|
17
|
-
upperBound: PropertyConstraints<number>;
|
|
18
|
-
}
|
|
19
|
-
export declare const defaultNumberFormatConfiguration: NumberFormatConfiguration;
|
|
20
|
-
/**
|
|
21
|
-
* Returns constraints to be used to ensure a value is a valid number for a form element.
|
|
22
|
-
*
|
|
23
|
-
* Non-numeric or missing values are replaced by defaults.
|
|
24
|
-
*
|
|
25
|
-
* The step is sanitized as follows:
|
|
26
|
-
* 1. If it is not a number it is set to 1.
|
|
27
|
-
* 2. If it is <= zero it is set to 1. (The @vertigis/react-ui/Slider gets stuck on the minimum value if the step is zero.)
|
|
28
|
-
* 2. It cannot be greater than the full range. (max-min)
|
|
29
|
-
* @param numberFormat The formatting options to use, typically configured on a Form Element.
|
|
30
|
-
* @param partialNumberFormatConfiguration Additional configuration specific to the caller. These are combined with the defaults.
|
|
31
|
-
* @returns A {@link defs.NumberConstraints} containing values that can be safely used in a component.
|
|
32
|
-
*/
|
|
33
|
-
export declare function getNumberConstraints(numberFormat: defs.NumberFormat | undefined, partialNumberFormatConfiguration?: Partial<NumberFormatConfiguration>): defs.NumberConstraints;
|
|
34
|
-
/**
|
|
35
|
-
* Counts the number of decimal places in the specified
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* @param
|
|
41
|
-
* @returns The number of decimal places in `
|
|
42
|
-
*/
|
|
43
|
-
export declare function
|
|
44
|
-
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* @param
|
|
51
|
-
* @returns The number of decimal places
|
|
52
|
-
*/
|
|
53
|
-
export declare function
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
|
|
113
|
-
|
|
1
|
+
import * as defs from "./FormDefinition";
|
|
2
|
+
import { FormatOptions } from "./numberFormatter";
|
|
3
|
+
import { PropertyConstraints, PropertyConstraintsWithDefault } from "./utils";
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for cleaning up a {@link defs.NumberFormat} used in producing a {@link defs.NumberConstraints}.
|
|
6
|
+
*
|
|
7
|
+
* This is a bit meta.
|
|
8
|
+
* * A `NumberConstraints` is used at runtime to ensure the value that a user entered is valid.
|
|
9
|
+
* * The `NumberConstraints` is generated from a `NumberFormat` which may only be partially defined, or may have values that are out of range.
|
|
10
|
+
* * We need to populate and validate the `NumberFormat` first of all before we can generate a valid `NumberConstraints`.
|
|
11
|
+
*/
|
|
12
|
+
export interface NumberFormatConfiguration {
|
|
13
|
+
[key: string]: PropertyConstraints<any> | undefined;
|
|
14
|
+
lowerBound: PropertyConstraints<number>;
|
|
15
|
+
precision: PropertyConstraintsWithDefault<number>;
|
|
16
|
+
step: PropertyConstraintsWithDefault<number>;
|
|
17
|
+
upperBound: PropertyConstraints<number>;
|
|
18
|
+
}
|
|
19
|
+
export declare const defaultNumberFormatConfiguration: NumberFormatConfiguration;
|
|
20
|
+
/**
|
|
21
|
+
* Returns constraints to be used to ensure a value is a valid number for a form element.
|
|
22
|
+
*
|
|
23
|
+
* Non-numeric or missing values are replaced by defaults.
|
|
24
|
+
*
|
|
25
|
+
* The step is sanitized as follows:
|
|
26
|
+
* 1. If it is not a number it is set to 1.
|
|
27
|
+
* 2. If it is <= zero it is set to 1. (The @vertigis/react-ui/Slider gets stuck on the minimum value if the step is zero.)
|
|
28
|
+
* 2. It cannot be greater than the full range. (max-min)
|
|
29
|
+
* @param numberFormat The formatting options to use, typically configured on a Form Element.
|
|
30
|
+
* @param partialNumberFormatConfiguration Additional configuration specific to the caller. These are combined with the defaults.
|
|
31
|
+
* @returns A {@link defs.NumberConstraints} containing values that can be safely used in a component.
|
|
32
|
+
*/
|
|
33
|
+
export declare function getNumberConstraints(numberFormat: defs.NumberFormat | undefined, partialNumberFormatConfiguration?: Partial<NumberFormatConfiguration>): defs.NumberConstraints;
|
|
34
|
+
/**
|
|
35
|
+
* Counts the number of decimal places in the specified custom format string and returns the result.
|
|
36
|
+
* The supplied value is treated as one of Microsoft's [Custom numeric format strings](https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings)
|
|
37
|
+
*
|
|
38
|
+
* There are lots of unusual ways you can combine the supported characters, but for simplicity, we support the most common use case
|
|
39
|
+
* which is using `#` and numeric characters as placeholders.
|
|
40
|
+
* @param customFormat The custom format to be inspected.
|
|
41
|
+
* @returns The number of decimal places in `customFormat`.
|
|
42
|
+
*/
|
|
43
|
+
export declare function countDecimalsInCustomFormat(customFormat: string | undefined): number;
|
|
44
|
+
/**
|
|
45
|
+
* Counts the number of decimal places in the specified number and returns the result.
|
|
46
|
+
* This uses Intl.NumberFormat rather than number.toString() to ensure that large numbers don't get converted to an exponential format.
|
|
47
|
+
*
|
|
48
|
+
* Despite this, it may not be accurate for very large numbers as it seems the decimal places might still be ignored.
|
|
49
|
+
* e.g. `(10 ** 21.5) + 0.123456789 and `(10 ** 21.5)` both return "3162277660168379400000".
|
|
50
|
+
* @param value The value to be inspected.
|
|
51
|
+
* @returns The number of decimal places in `value`.
|
|
52
|
+
*/
|
|
53
|
+
export declare function countDecimalsInValue(value: number): number;
|
|
54
|
+
/**
|
|
55
|
+
* Determines how many decimal places should be used in presenting values to the user.
|
|
56
|
+
*
|
|
57
|
+
* There must be at least enough decimal places for the step size, although there could be more.
|
|
58
|
+
* @param precision A precision value, likely from element.format.precision.
|
|
59
|
+
* @param step The step size being used. This must be a validated step size from a NumberConstraints.
|
|
60
|
+
* @param partialNumberFormatConfiguration Any configuration to normalize the supplied precision.
|
|
61
|
+
* @returns The number of decimal places to be used to display values.
|
|
62
|
+
*/
|
|
63
|
+
export declare function sanitizePrecision(precision: number | undefined, step: number, partialNumberFormatConfiguration?: Partial<NumberFormatConfiguration>): number;
|
|
64
|
+
/**
|
|
65
|
+
* Combines the provided configuration with the default and returns a new {@link NumberFormatConfiguration}.
|
|
66
|
+
* @param partialConfiguration Configuration to be added with the defaults.
|
|
67
|
+
* @returns The full set of constraints to use.
|
|
68
|
+
*/
|
|
69
|
+
export declare function getNumberFormatConfiguration(partialConfiguration: Partial<NumberFormatConfiguration> | undefined): NumberFormatConfiguration;
|
|
70
|
+
/**
|
|
71
|
+
* Compares a value with some constraints and returns an adjusted value that satisfies the constraints. There are three considerations:
|
|
72
|
+
* 1. The value must be >= `minimum`. Otherwise it is changed to `minimum`.
|
|
73
|
+
* 2. The value must be <= `maximum`. Otherwise it is changed to `maximum`.
|
|
74
|
+
* 3. The value must land on a valid step between the bounds. Otherwise it is moved to the nearest step.
|
|
75
|
+
* This can only be enforced if `minimum` or `maximum` is specified.
|
|
76
|
+
*
|
|
77
|
+
* It is assumed that the supplied `numberConstraints` satisfy the following criteria:
|
|
78
|
+
* * `maximum` must not be less than or equal to `minimum`.
|
|
79
|
+
* * If `maximum` and `minimum` are both defined:
|
|
80
|
+
* * `maximum` must be a whole number of steps greater than `minimum`.
|
|
81
|
+
* * `step` must not be greater than `maximum - minimum`.
|
|
82
|
+
* @param value The value to be inspected.
|
|
83
|
+
* @param numberConstraints The constraints to be applied to the value.
|
|
84
|
+
* @returns A new value which satisfies the constraints.
|
|
85
|
+
*/
|
|
86
|
+
export declare function enforceConstraints(value: number, numberConstraints: defs.NumberConstraints): number;
|
|
87
|
+
/**
|
|
88
|
+
* Retrieves the effective number slider values after applying various validation checks and bounds.
|
|
89
|
+
* @param values The initial input values based on which the result is computed.
|
|
90
|
+
* @param numberConstraints
|
|
91
|
+
* @returns A sorted numeric array with user entered values, if valid and default values if not.
|
|
92
|
+
*/
|
|
93
|
+
export declare function getNumberSliderValues(values: defs.Value | undefined, numberConstraints: defs.NumberConstraints, singleValue?: boolean): number[];
|
|
94
|
+
/**
|
|
95
|
+
* Checks if a form element's value is equal to the supplied value.
|
|
96
|
+
* @param elementValue The current value of a Form Element.
|
|
97
|
+
* @param newValue A new value for the Form Element.
|
|
98
|
+
* @returns True if the element's current value and the new value are equal, false otherwise.
|
|
99
|
+
*/
|
|
100
|
+
export declare function areValuesEqual(elementValue: defs.Value | undefined, newValue: defs.NumberRef | undefined): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* A mark on the slider. This is a copy of the interface by the same name in @mui/base/useSlider.
|
|
103
|
+
* We use string rather than React.Node so that we can share this between runtime and designer without discrepancies between the typings.
|
|
104
|
+
*/
|
|
105
|
+
export interface Mark {
|
|
106
|
+
value: number;
|
|
107
|
+
label?: string;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Gets marks to be used with the @vertigis/react-ui/Slider component.
|
|
111
|
+
*
|
|
112
|
+
* Returning `true` is a shortcut to tell the Slider to generate its own marks based on the step size.
|
|
113
|
+
* This is only possible when `showMinMaxLabels` is false, though, as they are also rendered as marks.
|
|
114
|
+
* When `showMinMaxLabels` and `showTickMarks` are both true, we need to manually generate all of the marks.
|
|
115
|
+
* @param maximum The highest allowed value.
|
|
116
|
+
* @param minimum The lowest allowed value.
|
|
117
|
+
* @param step: The amount of change between values.
|
|
118
|
+
* @param formatOptions The FormatOptions for formatting text on the labels.
|
|
119
|
+
* @param showMinMaxLabels True if labels should be included for min and max, false otherwise.
|
|
120
|
+
* @param showTickMarks True if tick marsks should be shown, false otherwise.
|
|
121
|
+
* @returns The value for the marks property for the slider.
|
|
122
|
+
*/
|
|
123
|
+
export declare function getMarks(maximum: number, minimum: number, step: number, formatOptions: FormatOptions, showMinMaxLabels: boolean, showTickMarks: boolean): boolean | Mark[];
|
|
124
|
+
/**
|
|
125
|
+
* Rounds a value to the specified number of decimals in a way that should avoid rounding errors.
|
|
126
|
+
* This is based on an example found here:
|
|
127
|
+
* https://medium.com/swlh/how-to-round-to-a-certain-number-of-decimal-places-in-javascript-ed74c471c1b8
|
|
128
|
+
* @param value The value to be rounded.
|
|
129
|
+
* @param decimalPlaces The number of decimal places to round to.
|
|
130
|
+
* @returns An accurately rounded value.
|
|
131
|
+
*/
|
|
132
|
+
export declare function roundAccurately(value: number, decimalPlaces: number): number;
|
|
133
|
+
/**
|
|
134
|
+
* Details about a symbol that is used to represent currency or percentage.
|
|
135
|
+
*/
|
|
136
|
+
type SymbolInfo = {
|
|
137
|
+
/**
|
|
138
|
+
* Whether the symbol should appear at the start (before the value) or end (after it).
|
|
139
|
+
*/
|
|
140
|
+
position: "start" | "end";
|
|
141
|
+
/**
|
|
142
|
+
* The symbol to displayed.
|
|
143
|
+
*/
|
|
144
|
+
symbol: string;
|
|
145
|
+
symbolCount?: number;
|
|
146
|
+
integerCount?: number;
|
|
147
|
+
};
|
|
148
|
+
export declare function getCurrencySymbolInfo(locale: string, currency: string): SymbolInfo | undefined;
|
|
149
|
+
export declare function getPercentSymbolInfo(locale: string): SymbolInfo | undefined;
|
|
150
|
+
export {};
|
package/forms/numberUtilities.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{format}from"./numberFormatter.js";import{isNumberRef,isNumeric}from"./utils.js";const defaultNumberFormatConfiguration={lowerBound:{default:0},precision:{default:3,minimum:-20,maximum:20},step:{default:1},upperBound:{default:100}};function getNumberConstraints(e,r){var{lowerBound:
|
|
1
|
+
import{format}from"./numberFormatter.js";import{isNumberRef,isNumeric}from"./utils.js";const defaultNumberFormatConfiguration={lowerBound:{default:0},precision:{default:3,minimum:-20,maximum:20},step:{default:1},upperBound:{default:100}};function getNumberConstraints(e,r){var{lowerBound:t,upperBound:n}=e=e||{};let{precision:i,step:u}=e;var o,r=getNumberFormatConfiguration(r);let a=isNumeric(t)?t:r.lowerBound.default,m=isNumeric(n)?n:r.upperBound.default;return void 0!==m&&void 0!==a&&m<=a&&(a=r.lowerBound.default,m=r.upperBound.default),i="number"!=typeof i||Number.isNaN(i)?r.precision.default:i,void 0!==r.precision.minimum&&(i=Math.max(i,r.precision.minimum)),void 0!==r.precision.maximum&&(i=Math.min(i,r.precision.maximum)),i<0?(o=Math.pow(10,-1*i),void 0!==u&&u%o==0||(u=o)):(u=isNumeric(u)&&0<u?u:r.step.default,void 0!==m&&void 0!==a&&(u=Math.min(u,m-a),o=(m-a)/u,Number.isInteger(o)||(r=countDecimalsInValue(u),m=roundAccurately(a+Math.floor(o)*u,r)))),{maximum:m,minimum:a,step:u}}const intlNumberFormat=new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:20,useGrouping:!1}),customDecimals=/\.([#\d]+)/;function countDecimalsInCustomFormat(e){if(e){e=customDecimals.exec(e);if(e)return e[1].length}return 0}function countDecimalsInValue(e){if(Number.isInteger(e))return 0;const r=intlNumberFormat.format(e);e=r.indexOf(".");return-1===e?0:r.length-e-1}function sanitizePrecision(e,r,t){t=getNumberFormatConfiguration(t);void 0===e&&(e=t.precision.default);r=countDecimalsInValue(r);return Math.max(r,e)}function getNumberFormatConfiguration(e){const r={lowerBound:{...defaultNumberFormatConfiguration.lowerBound},precision:{...defaultNumberFormatConfiguration.precision},step:{...defaultNumberFormatConfiguration.step},upperBound:{...defaultNumberFormatConfiguration.upperBound}};if(void 0!==e)for(const t in e)r[t]=Object.assign(r[t]||{},e[t]);return r}function enforceConstraints(e,r){var t,n,{maximum:i,minimum:u,step:r}=r;return void 0!==u?(t=(e-u)/r,Number.isInteger(t)||(n=countDecimalsInValue(r),e=roundAccurately(u+Math.round(t)*r,n))):void 0!==i&&(t=(i-e)/r,Number.isInteger(t)||(n=countDecimalsInValue(r),e=roundAccurately(i-Math.round(t)*r,n))),void 0!==u&&e<u&&(e=u),e=void 0!==i&&i<e?i:e}function getNumberSliderValues(e,r,t=!1){let n=[],i=NaN,u=NaN;if("string"==typeof e){const a=e.split("\n").filter(e=>""!==e);e=a.map(e=>(e=>(e=(e||"").trim(),isNumeric(e)?parseFloat(e):NaN))(e))}else"number"==typeof e?i=e:"number"==typeof e?.numeric&&(i=e.numeric);if(Array.isArray(e)&&1<=e.length&&(i=e[0],u=e[1]),void 0===i||isNaN(i)||(i=enforceConstraints(i,r),void 0===u||isNaN(u)?t&&n.push(i):(u=enforceConstraints(u,r),n.push(i,u))),n=n.sort((e,r)=>e-r),n.length===(t?1:2))return n;var o=r.maximum,e=r.minimum;return t?[enforceConstraints((e+o)/2,r)]:[e,o]}function areValuesEqual(e,r){if(void 0===e&&void 0===r||null===e&&null===r)return!0;var t,n;return!(!isNumberRef(e)||!isNumberRef(r))&&(e.display===r.display&&e.refValueType===r.refValueType&&e.numeric===r.numeric&&(t=e.format,n=r.format,void 0===t&&void 0===n||void 0!==t&&void 0!==n&&(t.currency===n.currency&&t.customDisplayFormat===n.customDisplayFormat&&t.displayFormat===n.displayFormat&&t.lowerBound===n.lowerBound&&t.precision===n.precision&&t.step===n.step&&t.upperBound===n.upperBound)))}function getMarks(r,t,n,e,i,u){if(i&&u){const o=[{value:t,label:format(e,t)}];for(let e=t+n;e<r;e+=n)o.push({value:e});return o.push({value:r,label:format(e,r)}),o}return i&&!u?[{value:t,label:format(e,t)},{value:r,label:format(e,r)}]:u}function roundAccurately(e,r){return Number(Math.round(Number(e+`e${r}`))+`e-${r}`)}function getCurrencySymbolInfo(e,r){const t=new Intl.NumberFormat(e,{style:"currency",currency:r,minimumFractionDigits:0,maximumFractionDigits:0,useGrouping:!1}),n=t.formatToParts(0);e=n.filter(e=>"currency"===e.type)[0],r=n.filter(e=>"integer"===e.type)[0];if(e&&r)return{position:n.indexOf(e)<n.indexOf(r)?"start":"end",symbol:e.value}}function getPercentSymbolInfo(e){const r=new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:0,maximumFractionDigits:0,useGrouping:!1}),t=r.formatToParts(0);var n=t.filter(e=>"percentSign"===e.type)[0],e=t.filter(e=>"integer"===e.type)[0];if(n&&e)return{position:t.indexOf(n)<t.indexOf(e)?"start":"end",symbol:n.value}}export{defaultNumberFormatConfiguration,getNumberConstraints,countDecimalsInCustomFormat,countDecimalsInValue,sanitizePrecision,getNumberFormatConfiguration,enforceConstraints,getNumberSliderValues,areValuesEqual,getMarks,roundAccurately,getCurrencySymbolInfo,getPercentSymbolInfo};
|
package/forms/presenter.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { FormPresenterHost } from "./FormComponent";
|
|
2
|
-
export declare function refresh(component: {}): void;
|
|
3
|
-
/**
|
|
4
|
-
* Refreshes an element.
|
|
5
|
-
* @param host The host for the presenter.
|
|
6
|
-
* @param name The name of the element to refresh.
|
|
7
|
-
*/
|
|
8
|
-
export declare function refreshForm(host: FormPresenterHost, container: Element): void;
|
|
9
|
-
/**
|
|
10
|
-
* Releases the underlying visual for the element.
|
|
11
|
-
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
12
|
-
* @param element The element to release from.
|
|
13
|
-
*/
|
|
14
|
-
export declare function releaseForm(container: HTMLElement): void;
|
|
15
|
-
/** Renders a component's visual. */
|
|
16
|
-
export declare function render(component: {}): any;
|
|
17
|
-
/**
|
|
18
|
-
* Renders an element with a placeholder.
|
|
19
|
-
* @param owner
|
|
20
|
-
*/
|
|
21
|
-
export declare function renderNone(component: {}): any;
|
|
1
|
+
import { FormPresenterHost } from "./FormComponent";
|
|
2
|
+
export declare function refresh(component: {}): void;
|
|
3
|
+
/**
|
|
4
|
+
* Refreshes an element.
|
|
5
|
+
* @param host The host for the presenter.
|
|
6
|
+
* @param name The name of the element to refresh.
|
|
7
|
+
*/
|
|
8
|
+
export declare function refreshForm(host: FormPresenterHost, container: Element): void;
|
|
9
|
+
/**
|
|
10
|
+
* Releases the underlying visual for the element.
|
|
11
|
+
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
12
|
+
* @param element The element to release from.
|
|
13
|
+
*/
|
|
14
|
+
export declare function releaseForm(container: HTMLElement): void;
|
|
15
|
+
/** Renders a component's visual. */
|
|
16
|
+
export declare function render(component: {}): any;
|
|
17
|
+
/**
|
|
18
|
+
* Renders an element with a placeholder.
|
|
19
|
+
* @param owner
|
|
20
|
+
*/
|
|
21
|
+
export declare function renderNone(component: {}): any;
|
package/forms/presenter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createElement}from"react";import*as React from"react";import{unmountComponentAtNode,render as reactRender}from"react-dom";import{FormComponent}from"./FormComponent.js";import{FormComponentTypes,FormElementTypes}from"./constants.js";import{renderComponent,
|
|
1
|
+
import{createElement}from"react";import*as React from"react";import{unmountComponentAtNode,render as reactRender}from"react-dom";import{FormComponent}from"./FormComponent.js";import Custom from"./components/Custom.js";import{FormComponentTypes,FormElementTypes}from"./constants.js";import{renderComponent,renderNone as renderers_renderNone}from"./renderers.js";import{getElementProps}from"./utils.js";function refresh(e){e instanceof FormComponent&&e.forceUpdate()}function refreshForm(e,r){reactRender(React.createElement(FormComponent,{host:e,type:"form",children:[]}),r)}function releaseForm(e){unmountComponentAtNode(e)}function render(e){if(e instanceof FormComponent){var r=e.props.type;if(r!==FormComponentTypes.ELEMENT&&r!==FormComponentTypes.SECTION)return renderComponent(e);var n=e.prepare();if(null==n)return;r=n.type;if("string"!=typeof r)return;if(r===FormElementTypes.CUSTOM)return createElement(Custom,getElementProps(e,n));if(e.elementRegistration)return createElement(e.elementRegistration.component,getElementProps(e,n))}}function renderNone(e){if(e instanceof FormComponent)return renderers_renderNone(e)}export{refresh,refreshForm,releaseForm,render,renderNone};
|
package/forms/renderers.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FormComponent } from "./FormComponent";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function renderNone(component: FormComponent): any;
|
|
7
|
-
/** @product This is intended for internal use only within VertiGIS Studio products. */
|
|
8
|
-
export declare function renderElement(type: string, component: FormComponent, element: Element): JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormComponent } from "./FormComponent";
|
|
3
|
+
/** @product This is intended for internal use only within VertiGIS Studio products. */
|
|
4
|
+
export declare function renderComponent(component: FormComponent): JSX.Element | null;
|
|
5
|
+
export declare function renderNone(component: FormComponent): any;
|
package/forms/renderers.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import Box from"@vertigis/react-ui/Box";import*as React from"react";import AccordionGroup from"./components/AccordionGroup.js";import
|
|
1
|
+
import Box from"@vertigis/react-ui/Box";import*as React from"react";import AccordionGroup from"./components/AccordionGroup.js";import Form,{formClasses}from"./components/Form.js";import{FormComponentTypes}from"./constants.js";function renderComponent(e){switch(e.props.type){case FormComponentTypes.FORM:return React.createElement(Form,{component:e});case FormComponentTypes.HEADER:return renderBox(e.props.children,formClasses.header);case FormComponentTypes.MAIN:return renderBox(e.props.children,formClasses.main);case FormComponentTypes.FOOTER:return renderBox(e.props.children,formClasses.footer);case FormComponentTypes.BODY:return renderBox(e.props.children,formClasses.body);case FormComponentTypes.ROW:return renderBox(e.props.children,formClasses.row);case FormComponentTypes.ACCORDIONGROUP:return React.createElement(AccordionGroup,{component:e});default:return null}}function renderNone(e){return renderBox([`--- Unsupported Form Element (name=${e.props.name}) ---`],"None")}function renderBox(e,r){return React.createElement(Box,{className:r},e)}export{renderComponent,renderNone};
|
package/forms/textUtilities.d.ts
CHANGED
|
@@ -1,23 +1,33 @@
|
|
|
1
|
-
import { markdownToSafeHtml } from "@vertigis/react-ui/utils/markdown";
|
|
2
|
-
import * as defs from "./FormDefinition";
|
|
3
|
-
/**
|
|
4
|
-
* Ensures the supplied string can be rendered literally in markdown by
|
|
5
|
-
* escaping any characters that have special meaning in
|
|
6
|
-
* markdown syntax.
|
|
7
|
-
*
|
|
8
|
-
* This method assumes that we are using a markdown parser that complies
|
|
9
|
-
* with the commonmark specification. (http://commonmark.org/)
|
|
10
|
-
* As such, the only escaping performed is that which is necessary for
|
|
11
|
-
* the features suppored by commonmark.
|
|
12
|
-
*
|
|
13
|
-
* You can test commonmark behaviour here: http://spec.commonmark.org/dingus/
|
|
14
|
-
*
|
|
15
|
-
* @param literalString A string to be treated literally in markdown.
|
|
16
|
-
*/
|
|
17
|
-
export declare function escapeTextForMarkdown(literalString: string): string;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { markdownToSafeHtml } from "@vertigis/react-ui/utils/markdown";
|
|
2
|
+
import * as defs from "./FormDefinition";
|
|
3
|
+
/**
|
|
4
|
+
* Ensures the supplied string can be rendered literally in markdown by
|
|
5
|
+
* escaping any characters that have special meaning in
|
|
6
|
+
* markdown syntax.
|
|
7
|
+
*
|
|
8
|
+
* This method assumes that we are using a markdown parser that complies
|
|
9
|
+
* with the commonmark specification. (http://commonmark.org/)
|
|
10
|
+
* As such, the only escaping performed is that which is necessary for
|
|
11
|
+
* the features suppored by commonmark.
|
|
12
|
+
*
|
|
13
|
+
* You can test commonmark behaviour here: http://spec.commonmark.org/dingus/
|
|
14
|
+
*
|
|
15
|
+
* @param literalString A string to be treated literally in markdown.
|
|
16
|
+
*/
|
|
17
|
+
export declare function escapeTextForMarkdown(literalString: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* Returns the underlying content from a `defs.Text` input.
|
|
20
|
+
* This function does not perform any translation or markdown rendering.
|
|
21
|
+
* Its sole purpose is to expose the string from inside the relevant object,
|
|
22
|
+
* or return the input itself if it's already a string or undefined.
|
|
23
|
+
* @param text The text to extract content from.
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
export declare function getContent(text: defs.Text | undefined): string | undefined;
|
|
27
|
+
export declare function hasContent(text: defs.Text | undefined): text is defs.Text;
|
|
28
|
+
export declare function isMarkdown(text: (Partial<defs.MarkdownRef> & defs.Text) | undefined | null): text is defs.MarkdownRef;
|
|
29
|
+
export declare function isStatus(text: (Partial<defs.StatusRef> & defs.Text) | undefined | null): text is defs.StatusRef;
|
|
30
|
+
export declare function isInvalidError(text: (Partial<defs.StatusRef> & defs.Text) | undefined | null): boolean;
|
|
31
|
+
export declare function markdownToText(markdown: string): string;
|
|
32
|
+
export declare function textToHtml(text: string): string;
|
|
33
|
+
export { markdownToSafeHtml };
|
package/forms/textUtilities.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{markdownToSafeHtml}from"@vertigis/react-ui/utils/markdown";const htmlContent=document.createElement("div"),textContent=document.createElement("div"),textNode=document.createTextNode("");htmlContent.appendChild(textNode);const markdownCharsRegExp=/[\\`*_{}[\]()#+\-.!>~]/g,markdownCodeBlockSpacesRegExp=/^[ ]{4}/gm,markdownCodeBlockTabRegExp=/^[ ]{0,3}[ ]{1}/gm,markdownLineBreakSuffixRegExp=/[ ]{2}$/gm;function escapeTextForMarkdown(t){let e=t.replace(markdownCharsRegExp,"\\$&");return e=e.replace(markdownCodeBlockSpacesRegExp," "),e=e.replace(markdownCodeBlockTabRegExp," "),e=e.replace(markdownLineBreakSuffixRegExp," "),e}function
|
|
1
|
+
import{markdownToSafeHtml}from"@vertigis/react-ui/utils/markdown";const htmlContent=document.createElement("div"),textContent=document.createElement("div"),textNode=document.createTextNode("");htmlContent.appendChild(textNode);const markdownCharsRegExp=/[\\`*_{}[\]()#+\-.!>~]/g,markdownCodeBlockSpacesRegExp=/^[ ]{4}/gm,markdownCodeBlockTabRegExp=/^[ ]{0,3}[ ]{1}/gm,markdownLineBreakSuffixRegExp=/[ ]{2}$/gm;function escapeTextForMarkdown(t){let e=t.replace(markdownCharsRegExp,"\\$&");return e=e.replace(markdownCodeBlockSpacesRegExp," "),e=e.replace(markdownCodeBlockTabRegExp," "),e=e.replace(markdownLineBreakSuffixRegExp," "),e}function getContent(t){return isMarkdown(t)?t.markdown:isStatus(t)?t.status:t}function hasContent(t){return!!getContent(t)}function isMarkdown(t){return null!=t&&"string"==typeof t.markdown}function isStatus(t){return null!=t&&"string"==typeof t.status}function isInvalidError(t){return isStatus(t)&&"invalid"===t.status}function markdownToText(t){return textContent.innerHTML=markdownToSafeHtml(t),textContent.innerText}function textToHtml(t){return textNode.data=t,htmlContent.innerHTML}export{escapeTextForMarkdown,getContent,hasContent,isMarkdown,isStatus,isInvalidError,markdownToText,textToHtml,markdownToSafeHtml};
|