@vertigis/workflow 5.36.0 → 5.37.1
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 -101
- 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/AddFeatureLayer.d.ts +23 -23
- package/activities/arcgis/AddFeatureLayer.js +1 -1
- package/activities/arcgis/AddFeatures.d.ts +27 -27
- package/activities/arcgis/AddGraphics.d.ts +27 -27
- package/activities/arcgis/ArcadeScript.d.ts +17 -18
- package/activities/arcgis/AreaEngineTask.d.ts +20 -20
- package/activities/arcgis/BufferEngineTask.d.ts +27 -27
- 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/ClosestFacilityTask.d.ts +90 -90
- package/activities/arcgis/ClosestFacilityTask.js +1 -1
- package/activities/arcgis/CompareGeometries.d.ts +19 -19
- 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/DeleteAttachments.d.ts +22 -22
- package/activities/arcgis/DeleteFeatures.d.ts +30 -30
- package/activities/arcgis/DensifyEngineTask.d.ts +20 -20
- package/activities/arcgis/DifferenceEngineTask.d.ts +23 -23
- package/activities/arcgis/DistanceEngineTask.d.ts +20 -20
- 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/FromGeoCoordinateStringServiceTask.d.ts +24 -24
- package/activities/arcgis/GeneralizeEngineTask.d.ts +22 -22
- 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/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/GetLayer.d.ts +21 -21
- package/activities/arcgis/GetLayerDefinitionExpression.d.ts +18 -18
- package/activities/arcgis/GetLayerProperty.d.ts +18 -18
- package/activities/arcgis/GetLayerVisibility.d.ts +18 -18
- package/activities/arcgis/GetMap.d.ts +11 -11
- 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/GetViewExtent.d.ts +16 -16
- package/activities/arcgis/GetViewpoint.d.ts +12 -12
- package/activities/arcgis/IntersectEngineTask.d.ts +20 -20
- package/activities/arcgis/LabelPointsServiceTask.d.ts +18 -18
- package/activities/arcgis/LengthEngineTask.d.ts +20 -20
- 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/NearestVerticesEngineTask.d.ts +34 -34
- package/activities/arcgis/OffsetEngineTask.d.ts +25 -25
- 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/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/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/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/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/SetLayerDefinitionExpression.d.ts +21 -21
- package/activities/arcgis/SetLayerDefinitionExpression.js +1 -1
- package/activities/arcgis/SetLayerPopup.d.ts +12 -12
- package/activities/arcgis/SetLayerProperty.d.ts +23 -23
- package/activities/arcgis/SetLayerVisibility.d.ts +23 -23
- package/activities/arcgis/SetMap.d.ts +14 -14
- package/activities/arcgis/SetViewExtent.d.ts +27 -27
- package/activities/arcgis/SetViewpoint.d.ts +23 -23
- package/activities/arcgis/ShowFeaturePopup.d.ts +11 -11
- package/activities/arcgis/ShowResults.d.ts +51 -51
- package/activities/arcgis/SimplifyEngineTask.d.ts +15 -15
- 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/UnionServiceTask.d.ts +20 -20
- package/activities/arcgis/UpdateAttachment.d.ts +29 -29
- package/activities/arcgis/UpdateFeatures.d.ts +27 -27
- package/activities/arcgis/libs/arcGisRestApi.d.ts +18 -18
- package/activities/arcgis/runUtils.d.ts +93 -93
- package/activities/arcgis/shared.d.ts +61 -61
- package/activities/arcgis/tools.d.ts +42 -40
- 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/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/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/CompleteForm.d.ts +11 -11
- package/activities/forms/DisplayForm.d.ts +48 -49
- 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 -140
- 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/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/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/SetFormElementProperty.d.ts +32 -19
- package/activities/forms/SetFormElementProperty.js +1 -1
- package/activities/forms/ShowFormElement.d.ts +15 -15
- 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/Engine.d.ts +84 -85
- package/execution/IDebugSession.d.ts +43 -44
- package/execution/ModuleLoader.d.ts +42 -42
- 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 -47
- package/forms/FormComponent.js +1 -1
- package/forms/FormDefinition.d.ts +451 -452
- package/forms/FormElement.d.ts +24 -59
- package/forms/FormElement.js +1 -1
- package/forms/FormHost.d.ts +225 -231
- package/forms/FormHost.js +1 -1
- package/forms/FormPresenterHost.d.ts +62 -74
- package/forms/MutuallyExclusiveSectionGroup.d.ts +41 -41
- package/forms/NumberParser.d.ts +27 -26
- 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 -8
- package/forms/components/ButtonBar.d.ts +8 -8
- package/forms/components/CheckBox.d.ts +7 -7
- package/forms/components/CheckGroup.d.ts +8 -8
- package/forms/components/Custom.d.ts +7 -7
- package/forms/components/DatePicker.d.ts +8 -8
- package/forms/components/DatePicker.js +1 -1
- package/forms/components/DateRangePicker.d.ts +12 -12
- package/forms/components/DateRangePicker.js +1 -1
- package/forms/components/DateTimePicker.d.ts +8 -8
- 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 -17
- 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/ItemPicker.d.ts +15 -17
- package/forms/components/ItemPicker.js +1 -1
- package/forms/components/ListBox.d.ts +8 -8
- package/forms/components/Markdown.d.ts +14 -14
- package/forms/components/Number.d.ts +8 -8
- package/forms/components/Number.js +1 -1
- package/forms/components/NumberRangeSlider.d.ts +12 -12
- package/forms/components/NumberSlider.d.ts +11 -11
- package/forms/components/RadioGroup.d.ts +8 -8
- 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/Text.d.ts +8 -8
- package/forms/components/TextArea.d.ts +7 -7
- package/forms/components/TextBox.d.ts +7 -7
- package/forms/components/TimePicker.d.ts +8 -8
- package/forms/components/TimePicker.js +1 -1
- package/forms/constants.d.ts +81 -81
- package/forms/dateUtilities.d.ts +102 -103
- 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 -108
- package/forms/keyboard.d.ts +9 -9
- package/forms/listUtilities.d.ts +3 -3
- package/forms/manifest.d.ts +3 -3
- package/forms/manifest.js +1 -1
- package/forms/numberFormatter.d.ts +90 -94
- package/forms/numberFormatter.js +1 -1
- package/forms/numberUtilities.d.ts +150 -150
- 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 -146
- 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 +1 @@
|
|
|
1
|
-
import{Dictionary,Iterator,Stash}from"../Collections.js";class ProgramInspector{constructor(){this.incidents=new IncidentList,this.components=new ComponentList(this.incidents),this.forms=new FormList(this.incidents),this.references=new ReferenceList(this.incidents),this.steps=new StepList(this.incidents),this.transitions=new TransitionList(this.incidents),this.program=makeBlankProgram()}newId(t){return"number"==typeof t&&(this.incidents.nextId=t),this.incidents.newId()}exists(t){return void 0!==this.incidents.findFor(t)}find(t){t=this.incidents.find(t);return void 0!==t?t.resource:void 0}findComponent(t){return this.components.findWith(t)}findForm(t){return this.forms.findWith(t)}findReference(t){return this.references.findWith(t)}findStep(t){return this.steps.findWith(t)}findTransition(t){return this.transitions.findWith(t)}all(){return iterate(this.incidents)}allComponents(){return this.components.all()}allForms(){return this.forms.all()}allReferences(){return this.references.all()}allSteps(){return this.steps.all()}allTransitions(){return this.transitions.all()}addComponent(){return this.components.add().resource}addForm(){return this.forms.add().resource}addReference(){return this.references.add().resource}addStep(){return this.steps.add().resource}addTransition(r,n){const i=this.steps.findFor(r),s=this.steps.findFor(n);if(void 0!==i&&void 0!==s){let t=i.transitions;void 0===t&&(t=i.transitions=new Dictionary);let e=s.transitions;void 0===e&&(e=s.transitions=new Dictionary);const o=this.transitions.add(),a=o.resource;return o.source=i,a.source=r,t.assign(o.token,o),o.target=s,a.target=n,e.assign(o.token,o),i.branches=void 0,a}}cacheComponents(){return this.components.cache()}cacheForms(){return this.forms.cache()}cacheReference(){return this.references.cache()}cacheSteps(){return this.steps.cache()}cacheTransitions(){return this.transitions.cache()}relate(t,e){const r=1<arguments.length?branchToToken(e):void 0;return Iterator.from(t).map(t=>this.incidents.relate(t,r))}remove(e,n){const i=this;function r(t){let e=0;!1===n&&i.isComponent(t)&&(e+=i.remove(i.relate(t)));const r=i.incidents.findFor(t);return void 0!==r&&(e+=r.master.unlink(r),i.start===r.resource&&(i.start=void 0)),e}if(Array.isArray(e)||e instanceof Iterator){let t=0;const s=Iterator.from(e);for(;s.next();)t+=r(s.current);return t}return 0<r(e)}removeComponent(t){return this.components.removeFor(t)}removeForm(t){return this.forms.removeFor(t)}removeReference(t){return this.references.removeFor(t)}removeStep(t){return!!this.steps.removeFor(t)&&(this.start===t&&(this.start=void 0),!0)}removeTransition(t){return this.transitions.removeFor(t)}shift(t,e){const r=this.incidents.findFor(t);return void 0!==r&&r.master.shift(r,e)}shiftComponent(t,e){return this.components.shiftFor(t,e)}shiftForm(t,e){return this.forms.shiftFor(t,e)}shiftReference(t,e){return this.references.shiftFor(t,e)}shiftStep(t,e){return this.steps.shiftFor(t,e)}shiftTransition(t,e){return this.transitions.shiftFor(t,e)}rename(t,e){const r=this.incidents.findFor(t);return void 0!==r?r.master.rename(r,e):void 0}renameComponent(t,e){return this.components.renameFor(t,e)}renameForm(t,e){return this.forms.renameFor(t,e)}renameReference(t,e){return this.references.renameFor(t,e)}renameStep(t,e){return this.steps.renameFor(t,e)}renameTransition(t,e){return this.transitions.renameFor(t,e)}changeStart(t){return!!this.isStep(t)&&(this.start=t,!0)}changeBranch(t,e){const r=this.transitions.findFor(t);return void 0!==r&&(r.source.branches=void 0,t.branch=void 0!==literalType(e)?e:void 0,!0)}changeParent(t,e){let r=void 0;if(r=this.steps.findFor(t),void 0===r&&(r=this.transitions.findFor(t)),void 0===r)return!1;let n=void 0;return(null==e||(n=this.components.findFor(e),void 0!==n))&&(r.master.changeParent(r,n),!0)}changeSource(t,e){const r=this.transitions.findFor(t);if(void 0===r)return!1;const n=this.steps.findFor(e);if(void 0===n)return!1;r.source.branches=void 0,r.source!==r.target&&r.source.transitions.remove(r.token);let i=n.transitions;return void 0===i&&(i=n.transitions=new Dictionary),r.source=n,t.source=e,n.branches=void 0,i.assign(r.token,r),!0}changeTarget(t,e){const r=this.transitions.findFor(t);if(void 0===r)return!1;const n=this.steps.findFor(e);if(void 0===n)return!1;r.target!==r.source&&r.target.transitions.remove(r.token);let i=n.transitions;return void 0===i&&(i=n.transitions=new Dictionary),r.target=n,t.target=e,i.assign(r.token,r),!0}isComponent(t){return void 0!==this.components.findFor(t)}isParent(t,e){return this.isActivity(e)&&e.parent===t}isForm(t){return void 0!==this.forms.findFor(t)}isActivity(t){return this.isStep(t)||this.isTransition(t)}isReference(t){return void 0!==this.references.findFor(t)}isStep(t){return void 0!==this.steps.findFor(t)}isTransition(t){return void 0!==this.transitions.findFor(t)}isSource(t,e){return this.isTransition(t)&&t.source===e}isTarget(t,e){return this.isTransition(t)&&t.target===e}getDeploymentConfig(){return this.program.deploymentConfig||{supportedApps:{}}}getDefaultLocale(){return navigator.language||navigator.userLanguage||"inv"}getStrings(t){var e,r=this.program.strings||{};t=t||this.getDefaultLocale();let n={...r.inv||{}};return"inv"===t||(t=canonicalizeLocale(t))&&(t!==(e=parseLocale(t).language)&&e in r&&(n={...n,...r[e]}),t in r&&(n={...n,...r[t]})),n}realize(){this.program.components=this.allComponents().list(),this.program.forms=this.allForms().list(),this.program.references=this.allReferences().list(),this.program.steps=this.allSteps().list(),this.program.transitions=this.allTransitions().list(),this.program.start=this.start;const t=this.allComponents();for(;t.next();)t.current.steps.length=0,t.current.transitions.length=0;const e=this.allSteps();for(;e.next();){const n=e.current;n.transitions.length=0;const i=n.parent;void 0!==i&&i.steps.push(n)}const r=this.allTransitions();for(;r.next();){const s=r.current,o=s.parent;void 0!==o&&o.transitions.push(s),s.source.transitions.push(s),s.target!==s.source&&s.target.transitions.push(s)}}release(){this.program.components.length=0,this.program.forms.length=0,this.program.references.length=0,this.program.steps.length=0,this.program.transitions.length=0,this.program.start=void 0;const t=this.allComponents();for(;t.next();)t.current.steps.length=0,t.current.transitions.length=0;const e=this.allSteps();for(;e.next();)e.current.transitions.length=0}resolveStart(t){if("number"==typeof t)return this.findStep(t);if("string"==typeof t)return this.findStep(t);if("object"!=typeof t||null===t)return this.start;var e=t.id;if("number"==typeof e)return this.findStep(e);t=t.name;return"string"==typeof t?this.findStep(t):void 0}import(t,n,s){if("object"!=typeof(t="string"==typeof t?JSON.parse(t):t)||null===t)return{};"function"!=typeof s&&(s=void 0),n=!1!==n;const i={},o={},a=this,c=new Stash;function u(t,e){copyResource(t,e);let r=t.id,n=t.name;void 0!==s&&("number"==typeof(i=s(r,n))?(r=i,n=void 0):"string"==typeof i?(r=void 0,n=i):"object"==typeof i&&null!==i?(r=i.id,n=i.name):!0!==i&&(r=void 0,n=void 0)),"number"==typeof r&&(a.shift(e,r),o[r]=e),"string"==typeof n&&a.rename(e,n);var i="number"==typeof r?"id$"+r:"auto";return c.write(i,t,e),e}function h(t,e,r){var n=e.id;if("number"!=typeof n)return u(e,r());t+=n,n=i[t];return u(e,void 0===n?i[t]=r():n)}function r(){return a.addComponent()}function d(t){const e=h("component$",t,r);return F(t.steps,t=>l(t,e)),F(t.transitions,t=>g(t,e)),e}function e(){return a.addForm()}function f(){return a.addReference()}function p(){return a.addStep()}function l(t,e){const r=h("step$",t,p);return a.changeParent(r,y(t.parent,d)||r.parent||e),F(t.transitions,t=>g(t,n?e:void 0,r)),r}const m=this.addStep();function v(){return a.addTransition(m,m)}function g(t,e,r){var n=h("transition$",t,v);a.changeParent(n,y(t.parent,d)||n.parent||e);e=n.source!==m?n.source:void 0;a.changeSource(n,y(t.source,l)||e||r);e=n.target!==m?n.target:void 0;return a.changeTarget(n,y(t.target,l)||e||r),n}function y(t,e){if(isObject(t)){var r=t.id,r="number"==typeof r?"id$"+r:"auto";return c.read(r,t)||e(t)}}function F(t,e){if(Array.isArray(t))for(const r of t)y(r,e)}copyResource(t,this.program),F(t.components,d),F(t.forms,function(t){return h("form$",t,e)}),F(t.references,function(t){return h("reference$",t,f)}),F(t.steps,l),F(t.transitions,g),o.start=y(t.start,l),void 0===s&&(this.start=o.start);let k=void 0;function L(t){return void 0===k&&(k=a.addStep(),a.changeParent(k,t)),k}const b=this.relate(m);for(;b.next();){k=void 0;var S=b.current;S.source===m&&this.changeSource(S,L(S.parent)),S.target===m&&this.changeTarget(S,L(S.parent))}return this.removeStep(m),this.realize(),o}export(){this.realize();const t=new ProgramInspector;t.import(this.program,!1);const e=t.program;e.steps=minifyArray(e.steps,function(e){return e.transitions=minifyArray(e.transitions,function(t){return t.source===e&&t.parent===e.parent&&(t.parent=void 0,t.source=void 0,t.target=t.target!==t.source?{id:t.target.id}:void 0,!0)}),void 0===e.parent}),e.transitions=minifyArray(e.transitions,function(t){return void 0===t.parent&&void 0!==t.source&&(t.source={id:t.source.id},t.target={id:t.target.id},!0)}),e.components=minifyArray(e.components,function(t){return t.steps=minifyArray(t.steps,function(t){return!(t.parent=void 0)}),t.transitions=minifyArray(t.transitions,function(t){return void 0!==t.parent&&(t.parent=void 0,t.source={id:t.source.id},t.target={id:t.target.id},!0)}),!0}),e.forms=minifyArray(e.forms),e.references=minifyArray(e.references);var r=t.start;return e.start=void 0!==r?{id:r.id}:void 0,e}reset(){this.incidents.clear(),this.components.clear(),this.forms.clear(),this.references.clear(),this.steps.clear(),this.transitions.clear(),this.incidents.nextId=1,this.program=makeBlankProgram(),this.start=void 0}toJSON(){return this.export()}}function iterate(t){return void 0===t?Iterator.empty:t.iterate().filter(function(t,e){return 0===String(e).lastIndexOf("token$",0)}).map(t=>t.resource,t=>t.id)}class IncidentList extends Dictionary{constructor(){super(...arguments),this.nextId=1}findFor(t){if(null!=t){var e=this.find(t.id);if(void 0!==e&&e.resource===t)return e}}newId(){let t=this.nextId;for(;this.exists(t);)t++;return this.nextId=t+1,t}relate(t,e){const r=this.findFor(t);return void 0!==r?r.master.relate(r,e):Iterator.empty}}class ResourceList extends Dictionary{constructor(t){super(),this.incidents=t}all(){return iterate(this)}cache(){let t=this.cacheLookup;if(void 0!==t)return t;t=this.cacheLookup={};const e=this.iterate();for(;e.next();){var r=e.current.resource,n=(t[r.id]=r).name;void 0!==n&&(t["$"+n]=r)}return t}findFor(t){t=this.incidents.findFor(t);return this.test(t)?t:void 0}test(t){return void 0!==t&&t.master===this}findWith(t){"string"==typeof t&&(t=this.qualify(t));t=this.incidents.find(t);return this.test(t)?t.resource:void 0}shift(t,e){this.incidents.remove(t.resource.id),"number"!=typeof e&&(e=this.incidents.newId());const r=this.incidents.assign(t.resource.id=e,t);void 0!==r&&this.incidents.assign(r.resource.id=this.incidents.newId(),r),this.cacheLookup=void 0}shiftFor(t,e){t=this.findFor(t);return void 0!==t&&(this.shift(t,e),!0)}rename(t,e){var r=t.resource.name;if(void 0!==r&&this.incidents.remove(this.qualify(r)),"string"==typeof e){e=this.qualify(t.resource.name=e);const n=this.incidents.assign(e,t);void 0!==n&&(n.resource.name=void 0)}else t.resource.name=void 0;return this.cacheLookup=void 0,r}renameFor(t,e){t=this.findFor(t);return void 0!==t&&(this.rename(t,e),!0)}add(){const t={},e=t.resource=this.create();return t.token=generateToken(),t.master=this,e.id=this.incidents.newId(),this.assign(t.token,t),this.incidents.assign(e.id,t),this.cacheLookup=void 0,t}removeFor(t){t=this.findFor(t);return void 0!==t&&(this.unlink(t),!0)}unlink(t){this.remove(t.token),this.cacheLookup=void 0;var e=t.resource.id;this.incidents.remove(e);t=t.resource.name;return void 0!==t&&this.incidents.remove(this.qualify(t)),1}relate(t,e){return Iterator.empty}changeParent(t,e){var r=t.parent;void 0!==r&&this.siblings(r).remove(t.token),void 0!==e?(t.parent=e,t.resource.parent=e.resource,this.siblings(e).assign(t.token,t)):(t.parent=void 0,t.resource.parent=void 0)}}class ComponentList extends ResourceList{create(){return{steps:[],transitions:[]}}qualify(t){return"component$"+t}unlink(t){super.unlink(t);const e=t.steps;if(void 0!==e){const n=e.iterate();for(;n.next();)n.current.resource.parent=void 0}const r=t.transitions;if(void 0!==r){const i=r.iterate();for(;i.next();)i.current.resource.parent=void 0}return 1}relate(t,e){const r=iterate(t.steps);t=iterate(t.transitions);return r.concat(t)}}class FormList extends ResourceList{create(){return{defaults:{},elements:{}}}qualify(t){return"form$"+t}}class ReferenceList extends ResourceList{create(){return{}}qualify(t){return"reference$"+t}}class StepList extends ResourceList{create(){return{inputs:{},transitions:[]}}qualify(t){return"activity$"+t}siblings(t){return t.steps||(t.steps=new Dictionary)}unlink(t){let e=super.unlink(t);void 0!==t.parent&&t.parent.steps.remove(t.token);const r=t.transitions;if(void 0!==r){const n=r.iterate();for(;n.next();)e+=n.current.master.unlink(n.current)}return e}relate(t,e){var r=t.transitions;if(void 0===r)return Iterator.empty;if(void 0===e)return iterate(r);let n=t.branches;if(void 0===n){n=t.branches={};for(const s of iterate(r).list().sort(compareTransitions))if(s.source===t.resource){var i=branchToToken(s.branch);const o=n[i];void 0===o?n[i]=s:Array.isArray(o)?o.push(s):n[i]=[o,s]}}return n[e]||Iterator.empty}}class TransitionList extends ResourceList{create(){return{inputs:{}}}qualify(t){return"activity$"+t}siblings(t){return t.transitions||(t.transitions=new Dictionary)}unlink(t){return super.unlink(t),t.source.branches=void 0,t.source.transitions.remove(t.token),t.target.transitions.remove(t.token),void 0!==t.parent&&t.parent.transitions.remove(t.token),1}relate(t,e){return t.source!==t.target?[t.source.resource,t.target.resource]:t.source.resource}}const safeProps={id:!1,name:!1,components:!1,forms:!1,references:!1,steps:!1,transitions:!1,start:!1,parent:!1,source:!1,target:!1};function copyResource(t,e){for(const r in t)!1!==safeProps[r]&&(e[r]=deepClone(t[r]))}function deepClone(t){if(null!=t){if(Array.isArray(t))return t.map(deepClone);if("object"!=typeof t)return t;{const r={};for(const n in t){var e=t[n];null!=e&&(r[n]=e)}return r}}}function isObject(t){return!Array.isArray(t)&&("object"==typeof t&&null!==t)}function makeBlankProgram(){return{components:[],forms:[],references:[],steps:[],transitions:[]}}function minifyArray(e,r){let n=0;for(let t=0;t<e.length;t++){var i=e[t];void 0!==r&&!r(i)||(e[n++]=i)}return e.length=n,0<e.length?e:void 0}function literalType(t){var e=typeof t;switch(e){case"boolean":case"number":case"string":return e}}function branchToToken(t){var e=literalType(t);return void 0!==e?e+"$"+t:"blank"}function hasInputs(t){for(const e in t)return!0;return!1}function compareTransitions(t,e){return"number"==typeof t.rank?"number"!=typeof e.rank||t<e?-1:e<t?1:0:"number"==typeof e.rank?1:hasInputs(t)?hasInputs(e)?0:-1:hasInputs(e)?1:0}const generateToken=function(){let t,e;function r(){t=0,e="token$"+(new Date).valueOf()+"$"}r();return function(){return 1073741824<=t&&r(),e+t++}}();function parseLocale(t){if("string"==typeof t){const e=t.split("-");if(!(e.length<1||3<e.length||e.some(t=>0===t.length))){const r={language:e[0].toLowerCase()};return 2==e.length?2==e[1].length?r.territory=e[1].toUpperCase():r.script=e[1][0].toUpperCase()+e[1].slice(1).toLowerCase():3===e.length&&(r.script=e[1][0].toUpperCase()+e[1].slice(1).toLowerCase(),r.territory=e[2].toUpperCase()),r}}}function canonicalizeLocale(e){e=parseLocale(e);if(e){let t=e.language;return e.script&&(t+="-"+e.script),e.territory&&(t+="-"+e.territory),t}}export{ProgramInspector,IncidentList,ResourceList,ComponentList,FormList,ReferenceList,StepList,TransitionList,parseLocale,canonicalizeLocale};
|
|
1
|
+
import{Dictionary,Iterator,Stash}from"../Collections.js";class ProgramInspector{constructor(){this.incidents=new IncidentList,this.components=new ComponentList(this.incidents),this.forms=new FormList(this.incidents),this.references=new ReferenceList(this.incidents),this.steps=new StepList(this.incidents),this.transitions=new TransitionList(this.incidents),this.program=makeBlankProgram()}newId(t){return"number"==typeof t&&(this.incidents.nextId=t),this.incidents.newId()}exists(t){return void 0!==this.incidents.findFor(t)}find(t){t=this.incidents.find(t);return void 0!==t?t.resource:void 0}findComponent(t){return this.components.findWith(t)}findForm(t){return this.forms.findWith(t)}findReference(t){return this.references.findWith(t)}findStep(t){return this.steps.findWith(t)}findTransition(t){return this.transitions.findWith(t)}all(){return iterate(this.incidents)}allComponents(){return this.components.all()}allForms(){return this.forms.all()}allReferences(){return this.references.all()}allSteps(){return this.steps.all()}allTransitions(){return this.transitions.all()}addComponent(){return this.components.add().resource}addForm(){return this.forms.add().resource}addReference(){return this.references.add().resource}addStep(){return this.steps.add().resource}addTransition(r,n){const i=this.steps.findFor(r),s=this.steps.findFor(n);if(void 0!==i&&void 0!==s){let t=i.transitions;void 0===t&&(t=i.transitions=new Dictionary);let e=s.transitions;void 0===e&&(e=s.transitions=new Dictionary);const o=this.transitions.add(),a=o.resource;return o.source=i,a.source=r,t.assign(o.token,o),o.target=s,a.target=n,e.assign(o.token,o),i.branches=void 0,a}}cacheComponents(){return this.components.cache()}cacheForms(){return this.forms.cache()}cacheReference(){return this.references.cache()}cacheSteps(){return this.steps.cache()}cacheTransitions(){return this.transitions.cache()}relate(t,e){const r=1<arguments.length?branchToToken(e):void 0;return Iterator.from(t).map(t=>this.incidents.relate(t,r))}remove(e,n){const i=this;function r(t){let e=0;!1===n&&i.isComponent(t)&&(e+=i.remove(i.relate(t)));const r=i.incidents.findFor(t);return void 0!==r&&(e+=r.master.unlink(r),i.start===r.resource&&(i.start=void 0)),e}if(Array.isArray(e)||e instanceof Iterator){let t=0;const s=Iterator.from(e);for(;s.next();)t+=r(s.current);return t}return 0<r(e)}removeComponent(t){return this.components.removeFor(t)}removeForm(t){return this.forms.removeFor(t)}removeReference(t){return this.references.removeFor(t)}removeStep(t){return!!this.steps.removeFor(t)&&(this.start===t&&(this.start=void 0),!0)}removeTransition(t){return this.transitions.removeFor(t)}shift(t,e){const r=this.incidents.findFor(t);return void 0!==r&&r.master.shift(r,e)}shiftComponent(t,e){return this.components.shiftFor(t,e)}shiftForm(t,e){return this.forms.shiftFor(t,e)}shiftReference(t,e){return this.references.shiftFor(t,e)}shiftStep(t,e){return this.steps.shiftFor(t,e)}shiftTransition(t,e){return this.transitions.shiftFor(t,e)}rename(t,e){const r=this.incidents.findFor(t);return void 0!==r?r.master.rename(r,e):void 0}renameComponent(t,e){return this.components.renameFor(t,e)}renameForm(t,e){return this.forms.renameFor(t,e)}renameReference(t,e){return this.references.renameFor(t,e)}renameStep(t,e){return this.steps.renameFor(t,e)}renameTransition(t,e){return this.transitions.renameFor(t,e)}changeStart(t){return!!this.isStep(t)&&(this.start=t,!0)}changeBranch(t,e){const r=this.transitions.findFor(t);return void 0!==r&&(r.source.branches=void 0,t.branch=void 0!==literalType(e)?e:void 0,!0)}changeParent(t,e){let r=this.steps.findFor(t);if(void 0===r&&(r=this.transitions.findFor(t)),void 0===r)return!1;let n;return(null==e||(n=this.components.findFor(e),void 0!==n))&&(r.master.changeParent(r,n),!0)}changeSource(t,e){const r=this.transitions.findFor(t);if(void 0===r)return!1;const n=this.steps.findFor(e);if(void 0===n)return!1;r.source.branches=void 0,r.source!==r.target&&r.source.transitions.remove(r.token);let i=n.transitions;return void 0===i&&(i=n.transitions=new Dictionary),r.source=n,t.source=e,n.branches=void 0,i.assign(r.token,r),!0}changeTarget(t,e){const r=this.transitions.findFor(t);if(void 0===r)return!1;const n=this.steps.findFor(e);if(void 0===n)return!1;r.target!==r.source&&r.target.transitions.remove(r.token);let i=n.transitions;return void 0===i&&(i=n.transitions=new Dictionary),r.target=n,t.target=e,i.assign(r.token,r),!0}isComponent(t){return void 0!==this.components.findFor(t)}isParent(t,e){return this.isActivity(e)&&e.parent===t}isForm(t){return void 0!==this.forms.findFor(t)}isActivity(t){return this.isStep(t)||this.isTransition(t)}isReference(t){return void 0!==this.references.findFor(t)}isStep(t){return void 0!==this.steps.findFor(t)}isTransition(t){return void 0!==this.transitions.findFor(t)}isSource(t,e){return this.isTransition(t)&&t.source===e}isTarget(t,e){return this.isTransition(t)&&t.target===e}getDeploymentConfig(){return this.program.deploymentConfig||{supportedApps:{}}}getDefaultLocale(){return navigator.language||navigator.userLanguage||"inv"}getStrings(t){var e,r=this.program.strings||{};t=t||this.getDefaultLocale();let n={...r.inv||{}};return"inv"===t||(t=canonicalizeLocale(t))&&(t!==(e=parseLocale(t).language)&&e in r&&(n={...n,...r[e]}),t in r&&(n={...n,...r[t]})),n}realize(){this.program.components=this.allComponents().list(),this.program.forms=this.allForms().list(),this.program.references=this.allReferences().list(),this.program.steps=this.allSteps().list(),this.program.transitions=this.allTransitions().list(),this.program.start=this.start;const t=this.allComponents();for(;t.next();)t.current.steps=[],t.current.transitions=[];const e=this.allSteps();for(;e.next();){const n=e.current;n.transitions=[];const i=n.parent;void 0!==i&&i.steps.push(n)}const r=this.allTransitions();for(;r.next();){const s=r.current,o=s.parent;void 0!==o&&o.transitions.push(s),s.source.transitions.push(s),s.target!==s.source&&s.target.transitions.push(s)}}release(){this.program.components=[],this.program.forms=[],this.program.references=[],this.program.steps=[],this.program.transitions=[],this.program.start=void 0;const t=this.allComponents();for(;t.next();)t.current.steps=[],t.current.transitions=[];const e=this.allSteps();for(;e.next();)e.current.transitions=[]}resolveStart(t){if("number"==typeof t)return this.findStep(t);if("string"==typeof t)return this.findStep(t);if("object"!=typeof t||null===t)return this.start;var e=t.id;if("number"==typeof e)return this.findStep(e);t=t.name;return"string"==typeof t?this.findStep(t):void 0}import(t,n,s){if("object"!=typeof(t="string"==typeof t?JSON.parse(t):t)||null===t)return{};"function"!=typeof s&&(s=void 0),n=!1!==n;const i={},o={},a=this,c=new Stash;function u(t,e){copyResource(t,e);let r=t.id,n=t.name;void 0!==s&&("number"==typeof(i=s(r,n))?(r=i,n=void 0):"string"==typeof i?(r=void 0,n=i):"object"==typeof i&&null!==i?(r=i.id,n=i.name):!0!==i&&(r=void 0,n=void 0)),"number"==typeof r&&(a.shift(e,r),o[r]=e),"string"==typeof n&&a.rename(e,n);var i="number"==typeof r?"id$"+r:"auto";return c.write(i,t,e),e}function d(t,e,r){var n=e.id;if("number"!=typeof n)return u(e,r());t+=n,n=i[t];return u(e,void 0===n?i[t]=r():n)}function r(){return a.addComponent()}function h(t){const e=d("component$",t,r);return y(t.steps,t=>m(t,e)),y(t.transitions,t=>v(t,e)),e}function e(){return a.addForm()}function f(){return a.addReference()}function p(){return a.addStep()}function m(t,e){const r=d("step$",t,p);return a.changeParent(r,g(t.parent,h)||r.parent||e),y(t.transitions,t=>v(t,n?e:void 0,r)),r}const l=this.addStep();function v(t,e,r){var n=d("transition$",t,()=>a.addTransition(l,l));a.changeParent(n,g(t.parent,h)||n.parent||e);e=n.source!==l?n.source:void 0;a.changeSource(n,g(t.source,m)||e||r);e=n.target!==l?n.target:void 0;return a.changeTarget(n,g(t.target,m)||e||r),n}function g(t,e){if(isObject(t)){var r=t.id,r="number"==typeof r?"id$"+r:"auto";return c.read(r,t)||e(t)}}function y(t,e){if(Array.isArray(t))for(const r of t)g(r,e)}copyResource(t,this.program),y(t.components,h),y(t.forms,function(t){return d("form$",t,e)}),y(t.references,function(t){return d("reference$",t,f)}),y(t.steps,m),y(t.transitions,v),o.start=g(t.start,m),void 0===s&&(this.start=o.start);let F;function k(t){return void 0===F&&(F=a.addStep(),a.changeParent(F,t)),F}const L=this.relate(l);for(;L.next();){F=void 0;var b=L.current;b.source===l&&this.changeSource(b,k(b.parent)),b.target===l&&this.changeTarget(b,k(b.parent))}return this.removeStep(l),this.realize(),o}export(){this.realize();const t=new ProgramInspector;t.import(this.program,!1);const e=t.program;e.steps=minifyArray(e.steps,function(e){return e.transitions=minifyArray(e.transitions,function(t){return t.source===e&&t.parent===e.parent&&(t.parent=void 0,t.source=void 0,t.target=t.target!==t.source?{id:t.target.id}:void 0,!0)}),void 0===e.parent}),e.transitions=minifyArray(e.transitions,function(t){return void 0===t.parent&&void 0!==t.source&&(t.source={id:t.source.id},t.target={id:t.target.id},!0)}),e.components=minifyArray(e.components,function(t){return t.steps=minifyArray(t.steps,function(t){return!(t.parent=void 0)}),t.transitions=minifyArray(t.transitions,function(t){return void 0!==t.parent&&(t.parent=void 0,t.source={id:t.source.id},t.target={id:t.target.id},!0)}),!0}),e.forms=minifyArray(e.forms),e.references=minifyArray(e.references);var r=t.start;return e.start=void 0!==r?{id:r.id}:void 0,e}reset(){this.incidents.clear(),this.components.clear(),this.forms.clear(),this.references.clear(),this.steps.clear(),this.transitions.clear(),this.incidents.nextId=1,this.program=makeBlankProgram(),this.start=void 0}toJSON(){return this.export()}}function iterate(t){return void 0===t?Iterator.empty:t.iterate().filter(function(t,e){return 0===String(e).lastIndexOf("token$",0)}).map(t=>t.resource,t=>t.id)}class IncidentList extends Dictionary{constructor(){super(...arguments),this.nextId=1}findFor(t){if(null!=t){var e=this.find(t.id);if(void 0!==e&&e.resource===t)return e}}newId(){let t=this.nextId;for(;this.exists(t);)t++;return this.nextId=t+1,t}relate(t,e){const r=this.findFor(t);return void 0!==r?r.master.relate(r,e):Iterator.empty}}class ResourceList extends Dictionary{constructor(t){super(),this.incidents=t}all(){return iterate(this)}cache(){let t=this.cacheLookup;if(void 0!==t)return t;t=this.cacheLookup={};const e=this.iterate();for(;e.next();){var r=e.current.resource,n=(t[r.id]=r).name;void 0!==n&&(t["$"+n]=r)}return t}findFor(t){t=this.incidents.findFor(t);return this.test(t)?t:void 0}test(t){return void 0!==t&&t.master===this}findWith(t){"string"==typeof t&&(t=this.qualify(t));t=this.incidents.find(t);return this.test(t)?t.resource:void 0}shift(t,e){this.incidents.remove(t.resource.id),"number"!=typeof e&&(e=this.incidents.newId());const r=this.incidents.assign(t.resource.id=e,t);void 0!==r&&this.incidents.assign(r.resource.id=this.incidents.newId(),r),this.cacheLookup=void 0}shiftFor(t,e){t=this.findFor(t);return void 0!==t&&(this.shift(t,e),!0)}rename(t,e){var r=t.resource.name;if(void 0!==r&&this.incidents.remove(this.qualify(r)),"string"==typeof e){e=this.qualify(t.resource.name=e);const n=this.incidents.assign(e,t);void 0!==n&&(n.resource.name=void 0)}else t.resource.name=void 0;return this.cacheLookup=void 0,r}renameFor(t,e){t=this.findFor(t);return void 0!==t&&(this.rename(t,e),!0)}add(){const t={},e=t.resource=this.create();return t.token=generateToken(),t.master=this,e.id=this.incidents.newId(),this.assign(t.token,t),this.incidents.assign(e.id,t),this.cacheLookup=void 0,t}removeFor(t){t=this.findFor(t);return void 0!==t&&(this.unlink(t),!0)}unlink(t){this.remove(t.token),this.cacheLookup=void 0;var e=t.resource.id;this.incidents.remove(e);t=t.resource.name;return void 0!==t&&this.incidents.remove(this.qualify(t)),1}relate(t,e){return Iterator.empty}changeParent(t,e){var r=t.parent;void 0!==r&&this.siblings(r).remove(t.token),void 0!==e?(t.parent=e,t.resource.parent=e.resource,this.siblings(e).assign(t.token,t)):(t.parent=void 0,t.resource.parent=void 0)}}class ComponentList extends ResourceList{create(){return{steps:[],transitions:[]}}qualify(t){return"component$"+t}unlink(t){super.unlink(t);const e=t.steps;if(void 0!==e){const n=e.iterate();for(;n.next();)n.current.resource.parent=void 0}const r=t.transitions;if(void 0!==r){const i=r.iterate();for(;i.next();)i.current.resource.parent=void 0}return 1}relate(t,e){const r=iterate(t.steps);t=iterate(t.transitions);return r.concat(t)}}class FormList extends ResourceList{create(){return{defaults:{},elements:{}}}qualify(t){return"form$"+t}}class ReferenceList extends ResourceList{create(){return{suite:"",path:""}}qualify(t){return"reference$"+t}}class StepList extends ResourceList{create(){return{inputs:{},transitions:[]}}qualify(t){return"activity$"+t}siblings(t){return t.steps||(t.steps=new Dictionary)}unlink(t){let e=super.unlink(t);void 0!==t.parent&&t.parent.steps.remove(t.token);const r=t.transitions;if(void 0!==r){const n=r.iterate();for(;n.next();)e+=n.current.master.unlink(n.current)}return e}relate(t,e){var r=t.transitions;if(void 0===r)return Iterator.empty;if(void 0===e)return iterate(r);let n=t.branches;if(void 0===n){n=t.branches={};for(const s of iterate(r).list().sort(compareTransitions))if(s.source===t.resource){var i=branchToToken(s.branch);const o=n[i];void 0===o?n[i]=s:Array.isArray(o)?o.push(s):n[i]=[o,s]}}return n[e]||Iterator.empty}}class TransitionList extends ResourceList{create(){return{inputs:{}}}qualify(t){return"activity$"+t}siblings(t){return t.transitions||(t.transitions=new Dictionary)}unlink(t){return super.unlink(t),t.source.branches=void 0,t.source.transitions.remove(t.token),t.target.transitions.remove(t.token),void 0!==t.parent&&t.parent.transitions.remove(t.token),1}relate(t,e){return t.source!==t.target?[t.source.resource,t.target.resource]:t.source.resource}}const safeProps={id:!1,name:!1,components:!1,elements:!0,forms:!1,references:!1,steps:!1,transitions:!1,start:!1,parent:!1,source:!1,target:!1,suite:!0,path:!0};function copyResource(t,e){for(const r in t)!1!==safeProps[r]&&(e[r]=deepClone(t[r]))}function deepClone(t){if(null!=t){if(Array.isArray(t))return t.map(deepClone);if("object"!=typeof t)return t;{const r={};for(const n in t){var e=t[n];null!=e&&(r[n]=e)}return r}}}function isObject(t){return!Array.isArray(t)&&("object"==typeof t&&null!==t)}function makeBlankProgram(){return{components:[],forms:[],references:[],steps:[],transitions:[]}}function minifyArray(e,r){let n=0;for(let t=0;t<e.length;t++){var i=e[t];void 0!==r&&!r(i)||(e[n++]=i)}return e.length=n,0<e.length?e:void 0}function literalType(t){var e=typeof t;switch(e){case"boolean":case"number":case"string":return e}}function branchToToken(t){var e=literalType(t);return void 0!==e?e+"$"+t:"blank"}function hasInputs(t){for(const e in t)return!0;return!1}function compareTransitions(t,e){return"number"==typeof t.rank?"number"!=typeof e.rank||t<e?-1:e<t?1:0:"number"==typeof e.rank?1:hasInputs(t)?hasInputs(e)?0:-1:hasInputs(e)?1:0}const generateToken=function(){let t,e;function r(){t=0,e="token$"+(new Date).valueOf()+"$"}r();return function(){return 1073741824<=t&&r(),e+t++}}();function parseLocale(t){if("string"==typeof t){const e=t.split("-");if(!(e.length<1||3<e.length||e.some(t=>0===t.length))){const r={language:e[0].toLowerCase()};return 2==e.length?2==e[1].length?r.territory=e[1].toUpperCase():r.script=e[1][0].toUpperCase()+e[1].slice(1).toLowerCase():3===e.length&&(r.script=e[1][0].toUpperCase()+e[1].slice(1).toLowerCase(),r.territory=e[2].toUpperCase()),r}}}function canonicalizeLocale(e){e=parseLocale(e);if(e){let t=e.language;return e.script&&(t+="-"+e.script),e.territory&&(t+="-"+e.territory),t}}export{ProgramInspector,IncidentList,ResourceList,ComponentList,FormList,ReferenceList,StepList,TransitionList,parseLocale,canonicalizeLocale};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Resource } from "./Resource";
|
|
2
|
-
/**
|
|
3
|
-
* Defines a reference for w workflow.
|
|
4
|
-
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
5
|
-
*/
|
|
6
|
-
export interface Reference extends Resource {
|
|
7
|
-
/** Indicates the suite to load. */
|
|
8
|
-
suite
|
|
9
|
-
/** Indicates the location of the source code to load. */
|
|
10
|
-
path
|
|
11
|
-
}
|
|
1
|
+
import { Resource } from "./Resource";
|
|
2
|
+
/**
|
|
3
|
+
* Defines a reference for w workflow.
|
|
4
|
+
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
5
|
+
*/
|
|
6
|
+
export interface Reference extends Resource {
|
|
7
|
+
/** Indicates the suite to load. */
|
|
8
|
+
suite: string;
|
|
9
|
+
/** Indicates the location of the source code to load. */
|
|
10
|
+
path: string;
|
|
11
|
+
}
|
package/definition/Resource.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
/** Defines the resource for a program. */
|
|
2
|
-
export interface Resource {
|
|
3
|
-
/** Indicates the identifier of the resource for id-based lookups. */
|
|
4
|
-
id?: number;
|
|
5
|
-
/** Indicates the name of the resource for name-based lookups. */
|
|
6
|
-
name?: string;
|
|
7
|
-
/** Indicates the label for annotation of the resource on a design surface. */
|
|
8
|
-
title?: string;
|
|
9
|
-
/** Indicates the description for annotation of the resource on a design surface. */
|
|
10
|
-
description?: string;
|
|
11
|
-
/** Indicates the position of the resource on a design surface. */
|
|
12
|
-
position?: string;
|
|
13
|
-
/** Indicates the look of the resource on a design surface. */
|
|
14
|
-
look?: string;
|
|
15
|
-
/** Indicates the purpose of the resource on a design surface. */
|
|
16
|
-
purpose?: string;
|
|
17
|
-
/** Information about how the program is licensed. */
|
|
18
|
-
licenseInfo?: {
|
|
19
|
-
/** The ID of the licensee that created the program. */
|
|
20
|
-
licenseeId?: string;
|
|
21
|
-
/** The url of the license endpoint for on-premises workflows. */
|
|
22
|
-
licenseUrl?: string;
|
|
23
|
-
};
|
|
24
|
-
/** The version of VertiGIS Studio Workflow Designer used to create this workflow. */
|
|
25
|
-
designerVersion?: string;
|
|
26
|
-
}
|
|
1
|
+
/** Defines the resource for a program. */
|
|
2
|
+
export interface Resource {
|
|
3
|
+
/** Indicates the identifier of the resource for id-based lookups. */
|
|
4
|
+
id?: number;
|
|
5
|
+
/** Indicates the name of the resource for name-based lookups. */
|
|
6
|
+
name?: string;
|
|
7
|
+
/** Indicates the label for annotation of the resource on a design surface. */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** Indicates the description for annotation of the resource on a design surface. */
|
|
10
|
+
description?: string;
|
|
11
|
+
/** Indicates the position of the resource on a design surface. */
|
|
12
|
+
position?: string;
|
|
13
|
+
/** Indicates the look of the resource on a design surface. */
|
|
14
|
+
look?: string;
|
|
15
|
+
/** Indicates the purpose of the resource on a design surface. */
|
|
16
|
+
purpose?: string;
|
|
17
|
+
/** Information about how the program is licensed. */
|
|
18
|
+
licenseInfo?: {
|
|
19
|
+
/** The ID of the licensee that created the program. */
|
|
20
|
+
licenseeId?: string;
|
|
21
|
+
/** The url of the license endpoint for on-premises workflows. */
|
|
22
|
+
licenseUrl?: string;
|
|
23
|
+
};
|
|
24
|
+
/** The version of VertiGIS Studio Workflow Designer used to create this workflow. */
|
|
25
|
+
designerVersion?: string;
|
|
26
|
+
}
|
package/definition/Step.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Activity } from "./Activity";
|
|
2
|
-
import { Transition } from "./Transition";
|
|
3
|
-
/** Describes a step in a workflow. */
|
|
4
|
-
export interface Step extends Activity {
|
|
5
|
-
/** Indicates the activity should be consumed asynchronously. */
|
|
6
|
-
async?: boolean;
|
|
7
|
-
/** Indicates the full list of transitions to or from this step. */
|
|
8
|
-
transitions?: Transition[];
|
|
9
|
-
}
|
|
1
|
+
import { Activity } from "./Activity";
|
|
2
|
+
import { Transition } from "./Transition";
|
|
3
|
+
/** Describes a step in a workflow. */
|
|
4
|
+
export interface Step extends Activity {
|
|
5
|
+
/** Indicates the activity should be consumed asynchronously. */
|
|
6
|
+
async?: boolean;
|
|
7
|
+
/** Indicates the full list of transitions to or from this step. */
|
|
8
|
+
transitions?: Transition[];
|
|
9
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Activity } from "./Activity";
|
|
2
|
-
import { Step } from "./Step";
|
|
3
|
-
/** Defines a transition. */
|
|
4
|
-
export interface Transition extends Activity {
|
|
5
|
-
/** Indicates the branch of that the transition participates in. */
|
|
6
|
-
branch?: boolean | number | string;
|
|
7
|
-
/** Indicates the source of this transition (what was previous). */
|
|
8
|
-
source?: Step;
|
|
9
|
-
/** Indicates the target of this transition (what is next). */
|
|
10
|
-
target?: Step;
|
|
11
|
-
/** Indicates the precedence for this transition. */
|
|
12
|
-
rank?: number;
|
|
13
|
-
/** Indicates the type of connector for the source on a design surface. */
|
|
14
|
-
sourceConnector?: string;
|
|
15
|
-
/** Indicates the type of connector for the target on a design surface. */
|
|
16
|
-
targetConnector?: string;
|
|
17
|
-
}
|
|
1
|
+
import { Activity } from "./Activity";
|
|
2
|
+
import { Step } from "./Step";
|
|
3
|
+
/** Defines a transition. */
|
|
4
|
+
export interface Transition extends Activity {
|
|
5
|
+
/** Indicates the branch of that the transition participates in. */
|
|
6
|
+
branch?: boolean | number | string;
|
|
7
|
+
/** Indicates the source of this transition (what was previous). */
|
|
8
|
+
source?: Step;
|
|
9
|
+
/** Indicates the target of this transition (what is next). */
|
|
10
|
+
target?: Step;
|
|
11
|
+
/** Indicates the precedence for this transition. */
|
|
12
|
+
rank?: number;
|
|
13
|
+
/** Indicates the type of connector for the source on a design surface. */
|
|
14
|
+
sourceConnector?: string;
|
|
15
|
+
/** Indicates the type of connector for the target on a design surface. */
|
|
16
|
+
targetConnector?: string;
|
|
17
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IDebugSession } from "../execution/IDebugSession";
|
|
2
|
-
/**
|
|
3
|
-
* A helper class for logging activity debug session information to the console.
|
|
4
|
-
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
5
|
-
*/
|
|
6
|
-
export declare class ConsoleDebugLogger {
|
|
7
|
-
private lastId;
|
|
8
|
-
/** Accepts a debug session object. */
|
|
9
|
-
onSession(session: IDebugSession): void;
|
|
10
|
-
}
|
|
1
|
+
import { IDebugSession } from "../execution/IDebugSession";
|
|
2
|
+
/**
|
|
3
|
+
* A helper class for logging activity debug session information to the console.
|
|
4
|
+
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ConsoleDebugLogger {
|
|
7
|
+
private lastId;
|
|
8
|
+
/** Accepts a debug session object. */
|
|
9
|
+
onSession(session: IDebugSession): void;
|
|
10
|
+
}
|
package/diagnostics/logging.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Supported logging levels.
|
|
3
|
-
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
4
|
-
*/
|
|
5
|
-
export
|
|
1
|
+
/**
|
|
2
|
+
* Supported logging levels.
|
|
3
|
+
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
4
|
+
*/
|
|
5
|
+
export type LogLevel = "error" | "warning" | "log" | "info" | "debug";
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
declare
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*
|
|
19
|
-
* @param
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
export {};
|
|
1
|
+
import { IActivityHandler } from "../IActivityHandler";
|
|
2
|
+
import { ProgramInspector } from "../definition/ProgramInspector";
|
|
3
|
+
import { Reference } from "../definition/Reference";
|
|
4
|
+
import { FormElementRegistration } from "../index";
|
|
5
|
+
import { IActivityHandlerFactory } from "./Engine";
|
|
6
|
+
declare const formElementCache: Record<string, FormElementRegistration<any>>;
|
|
7
|
+
export declare function getCachedFormElements(): typeof formElementCache;
|
|
8
|
+
/**
|
|
9
|
+
* Implements a methodology for loading activity handlers using the module loader.
|
|
10
|
+
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ActivityLoader implements IActivityHandlerFactory {
|
|
13
|
+
static defaultReference: Reference;
|
|
14
|
+
/** The default references. */
|
|
15
|
+
references: Reference[];
|
|
16
|
+
/**
|
|
17
|
+
* Creates an activity handler.
|
|
18
|
+
* @param action
|
|
19
|
+
* @param inspector
|
|
20
|
+
*/
|
|
21
|
+
create(action: string, registerFormElement: (registration: FormElementRegistration) => void, inspector?: ProgramInspector): PromiseLike<IActivityHandler | undefined> | IActivityHandler | undefined;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
package/execution/Engine.d.ts
CHANGED
|
@@ -1,85 +1,84 @@
|
|
|
1
|
-
import { Activator } from "../Activator";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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
|
-
private
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
run(
|
|
84
|
-
|
|
85
|
-
}
|
|
1
|
+
import { Activator } from "../Activator";
|
|
2
|
+
import { IActivityHandler } from "../IActivityHandler";
|
|
3
|
+
import { Task } from "../Task";
|
|
4
|
+
import { Program } from "../definition/Program";
|
|
5
|
+
import { ProgramInspector } from "../definition/ProgramInspector";
|
|
6
|
+
import { Step } from "../definition/Step";
|
|
7
|
+
import { LogLevel } from "../diagnostics/logging";
|
|
8
|
+
import { FormElementRegistration } from "../index";
|
|
9
|
+
import { IDebugSession } from "./IDebugSession";
|
|
10
|
+
/**
|
|
11
|
+
* Describes run options for a run operation.
|
|
12
|
+
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
13
|
+
*/
|
|
14
|
+
export interface RunOptions {
|
|
15
|
+
/** Indicates a completion promise that is raced with the underlying promise (cancellation). */
|
|
16
|
+
cancellationToken?: PromiseLike<any>;
|
|
17
|
+
/** Indicates a debugger callback. */
|
|
18
|
+
debug?: (session: IDebugSession) => void;
|
|
19
|
+
/** Indicates the locale for the program being run. */
|
|
20
|
+
locale?: string;
|
|
21
|
+
/** Indicates the logging level for the program being run. */
|
|
22
|
+
logLevel?: LogLevel;
|
|
23
|
+
/** Indicates any environment that may be relevant to the program being run. */
|
|
24
|
+
environment?: {};
|
|
25
|
+
/** Indicates any inputs that may be relevant to the program being run. */
|
|
26
|
+
inputs?: {};
|
|
27
|
+
/** Indicates any trivia that may be relevant to the program being run. */
|
|
28
|
+
trivia?: {};
|
|
29
|
+
/** Indicates the start step to start at. */
|
|
30
|
+
start?: Step | number | string;
|
|
31
|
+
/** Allow a master workflow to pass state to a target workflow. */
|
|
32
|
+
state?: Record<string, any>;
|
|
33
|
+
/** Indicates any language strings that the workflow has access to from the context it is being run in. */
|
|
34
|
+
strings?: Record<string, string>;
|
|
35
|
+
}
|
|
36
|
+
/** Represents an activity handler class. */
|
|
37
|
+
export interface ActivityHandlerClass {
|
|
38
|
+
new (): IActivityHandler;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Describes an activity handler class.
|
|
42
|
+
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
43
|
+
*/
|
|
44
|
+
export type IActivityHandlerImplementation = PromiseLike<ActivityHandlerClass> | ActivityHandlerClass;
|
|
45
|
+
/**
|
|
46
|
+
* Describes an activity handler factory.
|
|
47
|
+
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
48
|
+
*/
|
|
49
|
+
export interface IActivityHandlerFactory {
|
|
50
|
+
/** Creates an activity handler. */
|
|
51
|
+
create(action: string, registerFormElement: (registration: FormElementRegistration) => void, inspector?: ProgramInspector): PromiseLike<IActivityHandler | undefined> | IActivityHandler | undefined;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Exposes functionality capable of running workflows.
|
|
55
|
+
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
56
|
+
*/
|
|
57
|
+
export declare class Engine {
|
|
58
|
+
constructor(appSkuCode?: string);
|
|
59
|
+
private _getFormElementRegistration;
|
|
60
|
+
private _registerFormElement;
|
|
61
|
+
/** Indicates the SKU code of the app being run. */
|
|
62
|
+
appSkuCode: string | undefined;
|
|
63
|
+
/** Indicates the activator to use for any workflow. */
|
|
64
|
+
activator: Activator;
|
|
65
|
+
/** Indicates the default environment for any workflow. */
|
|
66
|
+
environment: {};
|
|
67
|
+
/** Indicates the default trivia for any workflow. */
|
|
68
|
+
trivia: {
|
|
69
|
+
getFormElementRegistration: (id: string) => FormElementRegistration | undefined;
|
|
70
|
+
registerFormElement: (elReg: FormElementRegistration) => void;
|
|
71
|
+
};
|
|
72
|
+
/** Indicates the factories to use to create activity handlers. */
|
|
73
|
+
factories: IActivityHandlerFactory[];
|
|
74
|
+
/** Indicates the implementations to use to create activity handlers. */
|
|
75
|
+
implementations: Record<string, IActivityHandlerImplementation>;
|
|
76
|
+
formElements: Record<string, FormElementRegistration<any>>;
|
|
77
|
+
/** Builds the run options, augmenting the environment. */
|
|
78
|
+
static buildOptions(inspector: ProgramInspector, options: RunOptions | undefined): RunOptions;
|
|
79
|
+
/** Creates a handler for the given action. */
|
|
80
|
+
createHandler(action: string, inspector?: ProgramInspector): PromiseLike<IActivityHandler | undefined> | IActivityHandler | undefined;
|
|
81
|
+
/** Runs a program and returns a promise for the outputs. */
|
|
82
|
+
run(document: Program, options?: RunOptions): Task<{}>;
|
|
83
|
+
run(inspector: ProgramInspector, options?: RunOptions): Task<{}>;
|
|
84
|
+
}
|
|
@@ -1,44 +1,43 @@
|
|
|
1
|
-
import Bluebird from "bluebird";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
}
|
|
1
|
+
import Bluebird from "bluebird";
|
|
2
|
+
import { Activity } from "../definition/Activity";
|
|
3
|
+
import { ProgramInspector } from "../definition/ProgramInspector";
|
|
4
|
+
/** Contains information about an activity. */
|
|
5
|
+
export interface IActivityState {
|
|
6
|
+
/** Indicates the identifier of this state. */
|
|
7
|
+
id: any;
|
|
8
|
+
/** Indicates the activity. */
|
|
9
|
+
activity?: Activity;
|
|
10
|
+
/** Indicates the number of passes on the current step. */
|
|
11
|
+
passes?: number;
|
|
12
|
+
/** Indicates the error that was caught. */
|
|
13
|
+
caught?: Error;
|
|
14
|
+
/** Indicates the inputs. */
|
|
15
|
+
inputs: Record<string, any>;
|
|
16
|
+
/** Indicates the outputs. */
|
|
17
|
+
outputs: Record<string, any>;
|
|
18
|
+
/** Indicates the completion promise. */
|
|
19
|
+
promise?: Bluebird<Error[]>;
|
|
20
|
+
}
|
|
21
|
+
/** Contains information about a debug event. */
|
|
22
|
+
export interface IMonikerFrame {
|
|
23
|
+
/** Indicates the activity currently being run. */
|
|
24
|
+
current?: IActivityState;
|
|
25
|
+
/** Indicates the activity states. */
|
|
26
|
+
state: Record<string, IActivityState>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Exposes information and controls for debugging a running workflow.
|
|
30
|
+
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
31
|
+
*/
|
|
32
|
+
export interface IDebugSession {
|
|
33
|
+
/** Indicates the program being run. */
|
|
34
|
+
inspector?: ProgramInspector;
|
|
35
|
+
/** Indicates the activity currently being run. */
|
|
36
|
+
frame?: IMonikerFrame;
|
|
37
|
+
/** Indicates the monikers for which activities may draw input from. */
|
|
38
|
+
stack: IMonikerFrame[];
|
|
39
|
+
/** Breaks execution of the program being debugged. */
|
|
40
|
+
break(): void;
|
|
41
|
+
/** Continues execution of the program being debugged. */
|
|
42
|
+
continue(): void;
|
|
43
|
+
}
|