@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.
Files changed (453) hide show
  1. package/Activator.d.ts +25 -25
  2. package/Collections.d.ts +83 -91
  3. package/EnumUtils.d.ts +28 -28
  4. package/Errors.d.ts +155 -155
  5. package/Hooks.d.ts +32 -32
  6. package/IActivityHandler.d.ts +101 -101
  7. package/LanguageStringUtils.d.ts +16 -17
  8. package/LanguageStringUtils.js +1 -1
  9. package/ProgramInspectorFacility.d.ts +23 -24
  10. package/Task.d.ts +56 -56
  11. package/TemplateUtils.d.ts +28 -28
  12. package/Validation.d.ts +151 -26
  13. package/Validation.js +1 -1
  14. package/activities/app/GetApplicationData.d.ts +15 -12
  15. package/activities/app/GetApplicationData.js +1 -1
  16. package/activities/app/GetApplicationInfo.d.ts +15 -15
  17. package/activities/app/GetUserInfo.d.ts +15 -15
  18. package/activities/app/PublishEvent.d.ts +14 -14
  19. package/activities/app/RemoveApplicationData.d.ts +14 -11
  20. package/activities/app/RemoveApplicationData.js +1 -1
  21. package/activities/app/RunCommand.d.ts +17 -17
  22. package/activities/app/RunOperation.d.ts +25 -25
  23. package/activities/app/SetApplicationData.d.ts +13 -10
  24. package/activities/app/SetApplicationData.js +1 -1
  25. package/activities/app/applicationData.d.ts +12 -0
  26. package/activities/app/applicationData.js +1 -0
  27. package/activities/arcgis/AddAttachment.d.ts +22 -22
  28. package/activities/arcgis/AddFeatureLayer.d.ts +23 -23
  29. package/activities/arcgis/AddFeatureLayer.js +1 -1
  30. package/activities/arcgis/AddFeatures.d.ts +27 -27
  31. package/activities/arcgis/AddGraphics.d.ts +27 -27
  32. package/activities/arcgis/ArcadeScript.d.ts +17 -18
  33. package/activities/arcgis/AreaEngineTask.d.ts +20 -20
  34. package/activities/arcgis/BufferEngineTask.d.ts +27 -27
  35. package/activities/arcgis/BufferServiceTask.d.ts +33 -33
  36. package/activities/arcgis/BufferServiceTask.js +1 -1
  37. package/activities/arcgis/CastGeometry.d.ts +23 -23
  38. package/activities/arcgis/ClearGraphics.d.ts +12 -12
  39. package/activities/arcgis/ClearGraphics.js +1 -1
  40. package/activities/arcgis/ClipEngineTask.d.ts +18 -18
  41. package/activities/arcgis/ClosestFacilityTask.d.ts +90 -90
  42. package/activities/arcgis/ClosestFacilityTask.js +1 -1
  43. package/activities/arcgis/CompareGeometries.d.ts +19 -19
  44. package/activities/arcgis/ConvertValueToArcGisFieldType.d.ts +13 -0
  45. package/activities/arcgis/ConvertValueToArcGisFieldType.js +1 -0
  46. package/activities/arcgis/CreateFeatureSet.d.ts +16 -16
  47. package/activities/arcgis/CreateFeatureSet.js +1 -1
  48. package/activities/arcgis/CreateGraphic.d.ts +17 -17
  49. package/activities/arcgis/CreateGraphic.js +1 -1
  50. package/activities/arcgis/CreatePoint.d.ts +17 -17
  51. package/activities/arcgis/CutEngineTask.d.ts +18 -18
  52. package/activities/arcgis/DeleteAttachments.d.ts +22 -22
  53. package/activities/arcgis/DeleteFeatures.d.ts +30 -30
  54. package/activities/arcgis/DensifyEngineTask.d.ts +20 -20
  55. package/activities/arcgis/DifferenceEngineTask.d.ts +23 -23
  56. package/activities/arcgis/DistanceEngineTask.d.ts +20 -20
  57. package/activities/arcgis/DistanceServiceTask.d.ts +24 -24
  58. package/activities/arcgis/DistanceServiceTask.js +1 -1
  59. package/activities/arcgis/ExtendedSpatialReferenceInfoEngineTask.d.ts +17 -17
  60. package/activities/arcgis/FeatureSetFromJson.d.ts +16 -16
  61. package/activities/arcgis/FeatureTableMap.d.ts +12 -12
  62. package/activities/arcgis/FlipEngineTask.d.ts +21 -21
  63. package/activities/arcgis/FromGeoCoordinateStringServiceTask.d.ts +24 -24
  64. package/activities/arcgis/GeneralizeEngineTask.d.ts +22 -22
  65. package/activities/arcgis/GenerateArcGisToken.d.ts +23 -23
  66. package/activities/arcgis/GenerateWebmapForReport.d.ts +20 -20
  67. package/activities/arcgis/GenerateWebmapForReport.js +1 -1
  68. package/activities/arcgis/Geocode.d.ts +37 -38
  69. package/activities/arcgis/Geocode.js +1 -1
  70. package/activities/arcgis/GeometryFromJson.d.ts +16 -16
  71. package/activities/arcgis/Geoprocessing.d.ts +25 -26
  72. package/activities/arcgis/Geoprocessing.js +1 -1
  73. package/activities/arcgis/GeoprocessingAsync.d.ts +36 -37
  74. package/activities/arcgis/GeoprocessingAsync.js +1 -1
  75. package/activities/arcgis/GetAttributeValue.d.ts +22 -22
  76. package/activities/arcgis/GetAttributeValues.d.ts +20 -20
  77. package/activities/arcgis/GetCentroid.d.ts +16 -16
  78. package/activities/arcgis/GetCodedValueDomain.d.ts +29 -29
  79. package/activities/arcgis/GetCodedValueDomain.js +1 -1
  80. package/activities/arcgis/GetCurrentPosition.d.ts +46 -46
  81. package/activities/arcgis/GetFeatureGeometries.d.ts +20 -20
  82. package/activities/arcgis/GetFeatureGeometry.d.ts +18 -18
  83. package/activities/arcgis/GetFeatureLayerInfo.d.ts +22 -22
  84. package/activities/arcgis/GetFeatureSetExtent.d.ts +18 -18
  85. package/activities/arcgis/GetFeatureSetObjectIds.d.ts +20 -20
  86. package/activities/arcgis/GetFormElementItemsFromFeatures.d.ts +49 -50
  87. package/activities/arcgis/GetFormElementItemsFromFeatures.js +1 -1
  88. package/activities/arcgis/GetGeometryExtent.d.ts +17 -17
  89. package/activities/arcgis/GetGraphics.d.ts +19 -19
  90. package/activities/arcgis/GetLayer.d.ts +21 -21
  91. package/activities/arcgis/GetLayerDefinitionExpression.d.ts +18 -18
  92. package/activities/arcgis/GetLayerProperty.d.ts +18 -18
  93. package/activities/arcgis/GetLayerVisibility.d.ts +18 -18
  94. package/activities/arcgis/GetMap.d.ts +11 -11
  95. package/activities/arcgis/GetMapScreenshot.d.ts +18 -18
  96. package/activities/arcgis/GetPortalUser.d.ts +20 -20
  97. package/activities/arcgis/GetTable.d.ts +18 -18
  98. package/activities/arcgis/GetViewExtent.d.ts +16 -16
  99. package/activities/arcgis/GetViewpoint.d.ts +12 -12
  100. package/activities/arcgis/IntersectEngineTask.d.ts +20 -20
  101. package/activities/arcgis/LabelPointsServiceTask.d.ts +18 -18
  102. package/activities/arcgis/LengthEngineTask.d.ts +20 -20
  103. package/activities/arcgis/MapProvider.d.ts +133 -132
  104. package/activities/arcgis/MapProvider.js +1 -1
  105. package/activities/arcgis/NearestCoordinateEngineTask.d.ts +26 -26
  106. package/activities/arcgis/NearestVertexEngineTask.d.ts +26 -26
  107. package/activities/arcgis/NearestVerticesEngineTask.d.ts +34 -34
  108. package/activities/arcgis/OffsetEngineTask.d.ts +25 -25
  109. package/activities/arcgis/ProjectServiceTask.d.ts +27 -27
  110. package/activities/arcgis/ProjectServiceTask.js +1 -1
  111. package/activities/arcgis/QueryAttachmentInfos.d.ts +21 -21
  112. package/activities/arcgis/QueryTask.d.ts +77 -77
  113. package/activities/arcgis/QueryTask.js +1 -1
  114. package/activities/arcgis/RefreshLayer.d.ts +12 -12
  115. package/activities/arcgis/RegisterCorsUrl.d.ts +21 -21
  116. package/activities/arcgis/RelateEngineTask.d.ts +22 -22
  117. package/activities/arcgis/RelationServiceTask.d.ts +29 -29
  118. package/activities/arcgis/RelationServiceTask.js +1 -1
  119. package/activities/arcgis/RelationshipQueryTask.d.ts +37 -38
  120. package/activities/arcgis/RelationshipQueryTask.js +1 -1
  121. package/activities/arcgis/RemoveFeatureSetFields.d.ts +22 -22
  122. package/activities/arcgis/RemoveFeatureSetFields.js +1 -1
  123. package/activities/arcgis/RemoveGraphics.d.ts +14 -14
  124. package/activities/arcgis/RemoveGraphics.js +1 -1
  125. package/activities/arcgis/RemoveLayer.d.ts +16 -16
  126. package/activities/arcgis/RendererFromJson.d.ts +16 -16
  127. package/activities/arcgis/ReshapeServiceTask.d.ts +20 -20
  128. package/activities/arcgis/ReverseGeocode.d.ts +31 -31
  129. package/activities/arcgis/ReverseGeocode.js +1 -1
  130. package/activities/arcgis/RotateEngineTask.d.ts +20 -20
  131. package/activities/arcgis/RouteTask.d.ts +91 -91
  132. package/activities/arcgis/RouteTask.js +1 -1
  133. package/activities/arcgis/RunPrint.d.ts +33 -34
  134. package/activities/arcgis/RunPrint.js +1 -1
  135. package/activities/arcgis/RunReport.d.ts +37 -38
  136. package/activities/arcgis/RunReport.js +1 -1
  137. package/activities/arcgis/RunWorkflow.d.ts +51 -52
  138. package/activities/arcgis/SendLayerToAttributeTable.d.ts +10 -10
  139. package/activities/arcgis/ServiceAreaTask.d.ts +87 -87
  140. package/activities/arcgis/ServiceAreaTask.js +1 -1
  141. package/activities/arcgis/SetFeatureAttribute.d.ts +15 -15
  142. package/activities/arcgis/SetFeatureGeometry.d.ts +13 -13
  143. package/activities/arcgis/SetFeaturePopup.d.ts +12 -12
  144. package/activities/arcgis/SetFeatureSymbol.d.ts +13 -13
  145. package/activities/arcgis/SetImageryLayerOptions.d.ts +27 -27
  146. package/activities/arcgis/SetLayerDefinitionExpression.d.ts +21 -21
  147. package/activities/arcgis/SetLayerDefinitionExpression.js +1 -1
  148. package/activities/arcgis/SetLayerPopup.d.ts +12 -12
  149. package/activities/arcgis/SetLayerProperty.d.ts +23 -23
  150. package/activities/arcgis/SetLayerVisibility.d.ts +23 -23
  151. package/activities/arcgis/SetMap.d.ts +14 -14
  152. package/activities/arcgis/SetViewExtent.d.ts +27 -27
  153. package/activities/arcgis/SetViewpoint.d.ts +23 -23
  154. package/activities/arcgis/ShowFeaturePopup.d.ts +11 -11
  155. package/activities/arcgis/ShowResults.d.ts +51 -51
  156. package/activities/arcgis/SimplifyEngineTask.d.ts +15 -15
  157. package/activities/arcgis/SortFeatureSet.d.ts +20 -20
  158. package/activities/arcgis/SymbolFromJson.d.ts +16 -16
  159. package/activities/arcgis/ToGeoCoordinateStringServiceTask.d.ts +30 -30
  160. package/activities/arcgis/TypeChecking.d.ts +46 -46
  161. package/activities/arcgis/UnionEngineTask.d.ts +19 -19
  162. package/activities/arcgis/UnionServiceTask.d.ts +20 -20
  163. package/activities/arcgis/UpdateAttachment.d.ts +29 -29
  164. package/activities/arcgis/UpdateFeatures.d.ts +27 -27
  165. package/activities/arcgis/libs/arcGisRestApi.d.ts +18 -18
  166. package/activities/arcgis/runUtils.d.ts +93 -93
  167. package/activities/arcgis/shared.d.ts +61 -61
  168. package/activities/arcgis/tools.d.ts +42 -40
  169. package/activities/arcgis/tools.js +1 -1
  170. package/activities/browser/GetBrowserInfo.d.ts +13 -13
  171. package/activities/browser/InjectCss.d.ts +11 -11
  172. package/activities/constants.d.ts +19 -19
  173. package/activities/core/AddItem.d.ts +12 -12
  174. package/activities/core/AddItems.d.ts +12 -12
  175. package/activities/core/Annotation.d.ts +8 -8
  176. package/activities/core/Cast.d.ts +16 -16
  177. package/activities/core/ChannelProvider.d.ts +89 -90
  178. package/activities/core/ChannelProvider.js +1 -1
  179. package/activities/core/ClearItems.d.ts +10 -10
  180. package/activities/core/Container.d.ts +7 -7
  181. package/activities/core/ConvertBytesToText.d.ts +14 -14
  182. package/activities/core/ConvertDataTableToFeatureSet.d.ts +12 -12
  183. package/activities/core/ConvertTextToBytes.d.ts +14 -14
  184. package/activities/core/ConvertToJson.d.ts +16 -16
  185. package/activities/core/ConvertToJson.js +1 -1
  186. package/activities/core/CreateFile.d.ts +18 -18
  187. package/activities/core/CreateValue.d.ts +21 -21
  188. package/activities/core/DecodeUriComponent.d.ts +14 -14
  189. package/activities/core/Delay.d.ts +18 -18
  190. package/activities/core/EncodeUriComponent.d.ts +14 -14
  191. package/activities/core/Evaluate.d.ts +18 -18
  192. package/activities/core/EvaluateAsync.d.ts +18 -18
  193. package/activities/core/Exit.d.ts +7 -7
  194. package/activities/core/ForEach.d.ts +25 -26
  195. package/activities/core/FormatDate.d.ts +23 -23
  196. package/activities/core/GetBase64StringFromBytes.d.ts +15 -15
  197. package/activities/core/GetBase64StringFromFile.d.ts +15 -15
  198. package/activities/core/GetBytesFromBase64String.d.ts +15 -15
  199. package/activities/core/GetFirstItem.d.ts +14 -14
  200. package/activities/core/GetItemAtIndex.d.ts +15 -15
  201. package/activities/core/GetLastItem.d.ts +14 -14
  202. package/activities/core/GetLogLevel.d.ts +9 -9
  203. package/activities/core/GetTextFromFile.d.ts +16 -16
  204. package/activities/core/GetWorkflowInputs.d.ts +12 -12
  205. package/activities/core/If.d.ts +18 -18
  206. package/activities/core/Log.d.ts +14 -14
  207. package/activities/core/Log.js +1 -1
  208. package/activities/core/Loop.d.ts +27 -27
  209. package/activities/core/Loop.js +1 -1
  210. package/activities/core/ParseJson.d.ts +16 -16
  211. package/activities/core/ParseNumber.d.ts +12 -12
  212. package/activities/core/ParseUrl.d.ts +24 -25
  213. package/activities/core/ParseUrl.js +1 -1
  214. package/activities/core/Placeholder.d.ts +6 -6
  215. package/activities/core/RegexMatches.d.ts +17 -17
  216. package/activities/core/RegexReplace.d.ts +18 -18
  217. package/activities/core/RemoveItem.d.ts +14 -14
  218. package/activities/core/RunActivity.d.ts +12 -13
  219. package/activities/core/RunSubworkflow.d.ts +14 -15
  220. package/activities/core/SetLogLevel.d.ts +9 -9
  221. package/activities/core/SetProperty.d.ts +15 -15
  222. package/activities/core/SetWorkflowOutput.d.ts +12 -12
  223. package/activities/core/Subworkflow.d.ts +14 -15
  224. package/activities/core/Switch.d.ts +19 -19
  225. package/activities/core/TextReplace.d.ts +16 -16
  226. package/activities/core/Throw.d.ts +12 -12
  227. package/activities/core/TryCatch.d.ts +12 -12
  228. package/activities/core/WebRequest.d.ts +49 -50
  229. package/activities/core/converters.d.ts +10 -10
  230. package/activities/csv/ConvertCsvToDataTable.d.ts +15 -15
  231. package/activities/csv/ConvertDataTableToCsv.d.ts +15 -15
  232. package/activities/essentials/GetEssentialsSite.d.ts +225 -225
  233. package/activities/essentials/RunEssentialsWorkflow.d.ts +25 -26
  234. package/activities/essentials/RunEssentialsWorkflowActivity.d.ts +17 -18
  235. package/activities/forms/ActivateFormElement.d.ts +13 -13
  236. package/activities/forms/ActivateFormElement.js +1 -1
  237. package/activities/forms/AddFormElement.d.ts +18 -18
  238. package/activities/forms/ClearFormElementError.d.ts +13 -13
  239. package/activities/forms/CompleteForm.d.ts +11 -11
  240. package/activities/forms/DisplayForm.d.ts +48 -49
  241. package/activities/forms/Errors.d.ts +18 -18
  242. package/activities/forms/FilterFormElementItems.d.ts +16 -16
  243. package/activities/forms/FormElementMap.d.ts +13 -13
  244. package/activities/forms/FormRenderer.d.ts +139 -140
  245. package/activities/forms/FormRenderer.js +1 -1
  246. package/activities/forms/GetFormElementItemsFromCollection.d.ts +49 -50
  247. package/activities/forms/GetFormElementItemsFromCollection.js +1 -1
  248. package/activities/forms/GetFormElementProperty.d.ts +19 -19
  249. package/activities/forms/GetFormElementValue.d.ts +17 -17
  250. package/activities/forms/GetFormEventData.d.ts +17 -17
  251. package/activities/forms/HideFormElement.d.ts +13 -13
  252. package/activities/forms/PropagateFormEvent.d.ts +10 -10
  253. package/activities/forms/SetCurrentFormElementItem.d.ts +18 -18
  254. package/activities/forms/SetCurrentFormElementItem.js +1 -1
  255. package/activities/forms/SetFormElementError.d.ts +17 -17
  256. package/activities/forms/SetFormElementEvent.d.ts +18 -18
  257. package/activities/forms/SetFormElementItemProperty.d.ts +34 -21
  258. package/activities/forms/SetFormElementItemProperty.js +1 -1
  259. package/activities/forms/SetFormElementItems.d.ts +18 -19
  260. package/activities/forms/SetFormElementProperty.d.ts +32 -19
  261. package/activities/forms/SetFormElementProperty.js +1 -1
  262. package/activities/forms/ShowFormElement.d.ts +15 -15
  263. package/activities/image/GetImageMetadata.d.ts +16 -16
  264. package/activities/image/RotateImage.d.ts +15 -15
  265. package/activities/index.d.ts +4 -2
  266. package/activities/index.js +1 -1
  267. package/activities/main.d.ts +1 -1
  268. package/activities/math/Abs.d.ts +14 -14
  269. package/activities/math/Cos.d.ts +14 -14
  270. package/activities/math/Max.d.ts +16 -16
  271. package/activities/math/Min.d.ts +16 -16
  272. package/activities/math/Pow.d.ts +15 -15
  273. package/activities/math/Random.d.ts +10 -10
  274. package/activities/math/Sin.d.ts +14 -14
  275. package/activities/math/Sqrt.d.ts +14 -14
  276. package/activities/math/Tan.d.ts +14 -14
  277. package/activities/pdf/AddGeoreferenceToPdf.d.ts +19 -19
  278. package/activities/pdf/AddImageToPdf.d.ts +63 -0
  279. package/activities/pdf/AddImageToPdf.js +1 -0
  280. package/activities/pdf/AddTextToPdf.d.ts +59 -0
  281. package/activities/pdf/AddTextToPdf.js +1 -0
  282. package/activities/pdf/CreatePdf.d.ts +49 -0
  283. package/activities/pdf/CreatePdf.js +1 -0
  284. package/activities/pdf/ExtractPdfPages.d.ts +17 -17
  285. package/activities/pdf/MergePdfs.d.ts +15 -15
  286. package/activities/server/CopyFile.d.ts +10 -10
  287. package/activities/server/CreateDirectory.d.ts +9 -9
  288. package/activities/server/CreateDownload.d.ts +18 -18
  289. package/activities/server/CreateEmailAttachment.d.ts +16 -16
  290. package/activities/server/CreateZipFromDirectory.d.ts +12 -12
  291. package/activities/server/DeleteDirectory.d.ts +9 -9
  292. package/activities/server/DeleteFile.d.ts +9 -9
  293. package/activities/server/DirectoryExists.d.ts +13 -13
  294. package/activities/server/ExtractZipToDirectory.d.ts +11 -11
  295. package/activities/server/FileExists.d.ts +13 -13
  296. package/activities/server/GetDirectoriesInDirectory.d.ts +14 -14
  297. package/activities/server/GetFilesInDirectory.d.ts +14 -14
  298. package/activities/server/MoveFile.d.ts +10 -10
  299. package/activities/server/ReadFile.d.ts +14 -14
  300. package/activities/server/ReadFileBytes.d.ts +13 -13
  301. package/activities/server/RunApplication.d.ts +22 -22
  302. package/activities/server/RunPython.d.ts +23 -23
  303. package/activities/server/SendEmail.d.ts +16 -16
  304. package/activities/server/SqlNonQuery.d.ts +18 -18
  305. package/activities/server/SqlQuery.d.ts +18 -18
  306. package/activities/server/SqlQueryUnsafe.d.ts +18 -18
  307. package/activities/server/WriteFile.d.ts +11 -11
  308. package/activities/server/WriteFileBytes.d.ts +10 -10
  309. package/activities/ui/Alert.d.ts +17 -17
  310. package/activities/ui/Confirm.d.ts +24 -24
  311. package/activities/ui/Prompt.d.ts +26 -26
  312. package/activities/wab/OpenWidget.d.ts +10 -10
  313. package/activities/wab/PublishWidgetData.d.ts +11 -11
  314. package/activities/xlsx/ConvertDataTableToXlsx.d.ts +15 -15
  315. package/activities/xlsx/ConvertXlsxToDataSet.d.ts +15 -15
  316. package/constants.d.ts +2 -2
  317. package/definition/Activity.d.ts +12 -13
  318. package/definition/ActivityInput.d.ts +31 -31
  319. package/definition/Component.d.ts +10 -10
  320. package/definition/DeploymentConfig.d.ts +4 -5
  321. package/definition/Form.d.ts +5 -5
  322. package/definition/Program.d.ts +29 -30
  323. package/definition/ProgramInspector.d.ts +290 -288
  324. package/definition/ProgramInspector.js +1 -1
  325. package/definition/Reference.d.ts +11 -11
  326. package/definition/Resource.d.ts +26 -26
  327. package/definition/Step.d.ts +9 -9
  328. package/definition/Transition.d.ts +17 -17
  329. package/diagnostics/ConsoleDebugLogger.d.ts +10 -10
  330. package/diagnostics/logging.d.ts +5 -5
  331. package/execution/ActivityLoader.d.ts +23 -24
  332. package/execution/Engine.d.ts +84 -85
  333. package/execution/IDebugSession.d.ts +43 -44
  334. package/execution/ModuleLoader.d.ts +42 -42
  335. package/execution/ProgramRunner.d.ts +1 -1
  336. package/execution/ProgramRunner.js +1 -1
  337. package/forms/Calendar.d.ts +89 -89
  338. package/forms/ExclusiveTimer.d.ts +13 -13
  339. package/forms/FormComponent.d.ts +47 -47
  340. package/forms/FormComponent.js +1 -1
  341. package/forms/FormDefinition.d.ts +451 -452
  342. package/forms/FormElement.d.ts +24 -59
  343. package/forms/FormElement.js +1 -1
  344. package/forms/FormHost.d.ts +225 -231
  345. package/forms/FormHost.js +1 -1
  346. package/forms/FormPresenterHost.d.ts +62 -74
  347. package/forms/MutuallyExclusiveSectionGroup.d.ts +41 -41
  348. package/forms/NumberParser.d.ts +27 -26
  349. package/forms/NumberParser.js +1 -1
  350. package/forms/common.d.ts +67 -62
  351. package/forms/common.js +1 -1
  352. package/forms/components/AccordionGroup.d.ts +15 -15
  353. package/forms/components/AutoComplete.d.ts +8 -8
  354. package/forms/components/ButtonBar.d.ts +8 -8
  355. package/forms/components/CheckBox.d.ts +7 -7
  356. package/forms/components/CheckGroup.d.ts +8 -8
  357. package/forms/components/Custom.d.ts +7 -7
  358. package/forms/components/DatePicker.d.ts +8 -8
  359. package/forms/components/DatePicker.js +1 -1
  360. package/forms/components/DateRangePicker.d.ts +12 -12
  361. package/forms/components/DateRangePicker.js +1 -1
  362. package/forms/components/DateTimePicker.d.ts +8 -8
  363. package/forms/components/DateTimePicker.js +1 -1
  364. package/forms/components/DropDownList.d.ts +8 -7
  365. package/forms/components/DropDownList.js +1 -1
  366. package/forms/components/FilePicker.d.ts +10 -9
  367. package/forms/components/FilePicker.js +1 -1
  368. package/forms/components/Form.d.ts +23 -23
  369. package/forms/components/Form.js +1 -1
  370. package/forms/components/FormLabelNumberField.d.ts +17 -17
  371. package/forms/components/GeometryPicker.d.ts +5 -4
  372. package/forms/components/GeometryPicker.js +1 -1
  373. package/forms/components/GeometryPickerListItem.d.ts +23 -23
  374. package/forms/components/HorizontalRule.d.ts +7 -7
  375. package/forms/components/Image.d.ts +7 -7
  376. package/forms/components/ItemPicker.d.ts +15 -17
  377. package/forms/components/ItemPicker.js +1 -1
  378. package/forms/components/ListBox.d.ts +8 -8
  379. package/forms/components/Markdown.d.ts +14 -14
  380. package/forms/components/Number.d.ts +8 -8
  381. package/forms/components/Number.js +1 -1
  382. package/forms/components/NumberRangeSlider.d.ts +12 -12
  383. package/forms/components/NumberSlider.d.ts +11 -11
  384. package/forms/components/RadioGroup.d.ts +8 -8
  385. package/forms/components/Scanner.d.ts +11 -9
  386. package/forms/components/Scanner.js +1 -1
  387. package/forms/components/Section.d.ts +14 -14
  388. package/forms/components/Section.js +1 -1
  389. package/forms/components/Signature.d.ts +12 -11
  390. package/forms/components/Signature.js +1 -1
  391. package/forms/components/SignatureDialog.d.ts +22 -22
  392. package/forms/components/Text.d.ts +8 -8
  393. package/forms/components/TextArea.d.ts +7 -7
  394. package/forms/components/TextBox.d.ts +7 -7
  395. package/forms/components/TimePicker.d.ts +8 -8
  396. package/forms/components/TimePicker.js +1 -1
  397. package/forms/constants.d.ts +81 -81
  398. package/forms/dateUtilities.d.ts +102 -103
  399. package/forms/dateUtilities.js +1 -1
  400. package/forms/elements/AutoComplete.d.ts +13 -13
  401. package/forms/elements/ButtonBar.d.ts +9 -9
  402. package/forms/elements/CheckBox.d.ts +7 -7
  403. package/forms/elements/CheckGroup.d.ts +11 -11
  404. package/forms/elements/Custom.d.ts +7 -7
  405. package/forms/elements/DatePicker.d.ts +6 -6
  406. package/forms/elements/DateRangePicker.d.ts +6 -6
  407. package/forms/elements/DateTimePicker.d.ts +6 -6
  408. package/forms/elements/DropDownList.d.ts +6 -6
  409. package/forms/elements/FilePicker.d.ts +8 -8
  410. package/forms/elements/GeometryPicker.d.ts +18 -18
  411. package/forms/elements/Header.d.ts +10 -10
  412. package/forms/elements/HorizontalRule.d.ts +2 -2
  413. package/forms/elements/Image.d.ts +2 -2
  414. package/forms/elements/ItemPicker.d.ts +13 -13
  415. package/forms/elements/ListBox.d.ts +11 -11
  416. package/forms/elements/Number.d.ts +11 -11
  417. package/forms/elements/NumberRangeSlider.d.ts +10 -10
  418. package/forms/elements/NumberSlider.d.ts +6 -6
  419. package/forms/elements/PasswordBox.d.ts +5 -5
  420. package/forms/elements/RadioGroup.d.ts +6 -6
  421. package/forms/elements/Scanner.d.ts +19 -19
  422. package/forms/elements/Section.d.ts +2 -2
  423. package/forms/elements/Signature.d.ts +16 -16
  424. package/forms/elements/Text.d.ts +2 -2
  425. package/forms/elements/TextArea.d.ts +7 -7
  426. package/forms/elements/TextBox.d.ts +5 -5
  427. package/forms/elements/TimePicker.d.ts +6 -6
  428. package/forms/elements/types.d.ts +83 -83
  429. package/forms/index.d.ts +124 -108
  430. package/forms/keyboard.d.ts +9 -9
  431. package/forms/listUtilities.d.ts +3 -3
  432. package/forms/manifest.d.ts +3 -3
  433. package/forms/manifest.js +1 -1
  434. package/forms/numberFormatter.d.ts +90 -94
  435. package/forms/numberFormatter.js +1 -1
  436. package/forms/numberUtilities.d.ts +150 -150
  437. package/forms/numberUtilities.js +1 -1
  438. package/forms/presenter.d.ts +21 -21
  439. package/forms/presenter.js +1 -1
  440. package/forms/renderers.d.ts +5 -8
  441. package/forms/renderers.js +1 -1
  442. package/forms/textUtilities.d.ts +33 -23
  443. package/forms/textUtilities.js +1 -1
  444. package/forms/utils.d.ts +177 -146
  445. package/forms/utils.js +1 -1
  446. package/index.d.ts +2 -2
  447. package/libs/version.d.ts +1 -1
  448. package/libs/version.js +1 -1
  449. package/licensing/LicenseChecker.d.ts +1 -1
  450. package/licensing/Watermark.d.ts +7 -7
  451. package/package.json +9 -11
  452. package/activities/app/constants.d.ts +0 -1
  453. package/activities/app/constants.js +0 -1
@@ -1,18 +1,18 @@
1
- import { IActivityHandler, IActivityContext, EmptyOutputs } from "../../IActivityHandler";
2
- import * as defs from "../../forms/FormDefinition";
3
- import { DisplayFormOutputs } from "./DisplayForm";
4
- export interface AddFormElementInputs {
5
- form: DisplayFormOutputs;
6
- /** The ID of the form element to add. */
7
- elementName: string;
8
- /** The type of form element to add. */
9
- elementType: "AutoComplete" | "ButtonBar" | "CheckBox" | "CheckGroup" | "Custom" | "DatePicker" | "DateRangePicker" | "DateTimePicker" | "DropDownList" | "FilePicker" | "GeometryPicker" | "HorizontalRule" | "Image" | "ItemPicker" | "ListBox" | "Number" | "NumberRangeSlider" | "NumberSlider" | "PasswordBox" | "RadioGroup" | "Scanner" | "Section" | "Signature" | "Text" | "TextArea" | "TextBox" | "TimePicker" | string;
10
- /** The definition of the form element to add. */
11
- element: defs.Element;
12
- targetForm?: DisplayFormOutputs;
13
- }
14
- export declare class AddFormElement implements IActivityHandler {
15
- static readonly action = "gcx:wf:forms::AddFormElement";
16
- static readonly suite = "gcx:wf:builtin";
17
- execute(inputs: AddFormElementInputs, context: IActivityContext): EmptyOutputs;
18
- }
1
+ import { IActivityHandler, IActivityContext, EmptyOutputs } from "../../IActivityHandler";
2
+ import * as defs from "../../forms/FormDefinition";
3
+ import { DisplayFormOutputs } from "./DisplayForm";
4
+ export interface AddFormElementInputs {
5
+ form: DisplayFormOutputs;
6
+ /** The ID of the form element to add. */
7
+ elementName: string;
8
+ /** The type of form element to add. */
9
+ elementType: "AutoComplete" | "ButtonBar" | "CheckBox" | "CheckGroup" | "Custom" | "DatePicker" | "DateRangePicker" | "DateTimePicker" | "DropDownList" | "FilePicker" | "GeometryPicker" | "HorizontalRule" | "Image" | "ItemPicker" | "ListBox" | "Number" | "NumberRangeSlider" | "NumberSlider" | "PasswordBox" | "RadioGroup" | "Scanner" | "Section" | "Signature" | "Text" | "TextArea" | "TextBox" | "TimePicker" | string;
10
+ /** The definition of the form element to add. */
11
+ element: defs.Element;
12
+ targetForm?: DisplayFormOutputs;
13
+ }
14
+ export declare class AddFormElement implements IActivityHandler {
15
+ static readonly action = "gcx:wf:forms::AddFormElement";
16
+ static readonly suite = "gcx:wf:builtin";
17
+ execute(inputs: AddFormElementInputs, context: IActivityContext): EmptyOutputs;
18
+ }
@@ -1,13 +1,13 @@
1
- import { IActivityHandler, EmptyOutputs } from "../../IActivityHandler";
2
- import * as defs from "../../forms/FormDefinition";
3
- import { DisplayFormOutputs } from "./DisplayForm";
4
- export interface ClearFormElementErrorInputs {
5
- form: DisplayFormOutputs;
6
- /** The ID of the form element to clear the errors from. */
7
- elementName?: string | defs.Element;
8
- }
9
- export declare class ClearFormElementError implements IActivityHandler {
10
- static readonly action = "gcx:wf:forms::ClearFormElementError";
11
- static readonly suite = "gcx:wf:builtin";
12
- execute(inputs: ClearFormElementErrorInputs): EmptyOutputs;
13
- }
1
+ import { IActivityHandler, EmptyOutputs } from "../../IActivityHandler";
2
+ import * as defs from "../../forms/FormDefinition";
3
+ import { DisplayFormOutputs } from "./DisplayForm";
4
+ export interface ClearFormElementErrorInputs {
5
+ form: DisplayFormOutputs;
6
+ /** The ID of the form element to clear the errors from. */
7
+ elementName?: string | defs.Element;
8
+ }
9
+ export declare class ClearFormElementError implements IActivityHandler {
10
+ static readonly action = "gcx:wf:forms::ClearFormElementError";
11
+ static readonly suite = "gcx:wf:builtin";
12
+ execute(inputs: ClearFormElementErrorInputs): EmptyOutputs;
13
+ }
@@ -1,11 +1,11 @@
1
- import { IActivityHandler, EmptyOutputs } from "../../IActivityHandler";
2
- import { DisplayFormOutputs } from "./DisplayForm";
3
- export interface CompleteFormInputs {
4
- form: DisplayFormOutputs;
5
- result: string;
6
- }
7
- export declare class CompleteForm implements IActivityHandler {
8
- static readonly action = "gcx:wf:forms::CompleteForm";
9
- static readonly suite = "gcx:wf:builtin";
10
- execute(inputs: CompleteFormInputs): EmptyOutputs;
11
- }
1
+ import { IActivityHandler, EmptyOutputs } from "../../IActivityHandler";
2
+ import { DisplayFormOutputs } from "./DisplayForm";
3
+ export interface CompleteFormInputs {
4
+ form: DisplayFormOutputs;
5
+ result: string;
6
+ }
7
+ export declare class CompleteForm implements IActivityHandler {
8
+ static readonly action = "gcx:wf:forms::CompleteForm";
9
+ static readonly suite = "gcx:wf:builtin";
10
+ execute(inputs: CompleteFormInputs): EmptyOutputs;
11
+ }
@@ -1,49 +1,48 @@
1
- import { Lookup } from "../../Collections";
2
- import { IActivityHandler, IActivityContext } from "../../IActivityHandler";
3
- import { FormRenderer, defs } from "./FormRenderer";
4
- /** Defines the inputs for a display form activity. */
5
- export interface DisplayFormInputs {
6
- /** Indicates a name of the form (local to the running workflow). */
7
- name: string;
8
- /** Indicates the form resource to load if not yet loaded. */
9
- form: defs.Form;
10
- /** Indicates the form template to load if not yet loaded. */
11
- template?: defs.Form;
12
- /** Indicates what container to use when displaying the form. */
13
- container?: "default" | "modal" | string;
14
- /** Indicates what region to use when activating the form's container. */
15
- region?: string;
16
- /** Indicates that the form should be reset. */
17
- reset?: boolean;
18
- }
19
- /**
20
- * Defines the outputs for a display form activity.
21
- * @public
22
- */
23
- export interface DisplayFormOutputs {
24
- /** Indicates the state of the form. */
25
- state: Lookup<defs.Element>;
26
- /** Indicates the result for the form (if set, causes the form to exit on the next pass). */
27
- result?: string;
28
- }
29
- /** Displays a form. */
30
- export declare class DisplayForm implements IActivityHandler {
31
- static renderers: Lookup<FormRenderer>;
32
- /**
33
- * Creates a form renderer if it does not exist.
34
- * @param inputs The inputs to create the renderer.
35
- * @param context The context to use to create the renderer.
36
- * @param type The type of FormRenderer (subclass) to create.
37
- */
38
- static createRenderer(inputs: DisplayFormInputs, context: IActivityContext, type: typeof FormRenderer): FormRenderer;
39
- static readonly action = "gcx:wf:forms:form:DisplayForm";
40
- static readonly suite = "gcx:wf:builtin";
41
- /** Performs the operation on behalf of the engine. */
42
- execute(inputs: DisplayFormInputs, context: IActivityContext, type: typeof FormRenderer): Promise<DisplayFormOutputs>;
43
- /**
44
- * Updates the references in the `ElementMap` for all of the elements
45
- * contained in `displayFormOutputs`.
46
- * @param displayFormOutputs The outputs of the `DisplayForm` activity.
47
- */
48
- private static updateElementMap;
49
- }
1
+ import { IActivityHandler, IActivityContext } from "../../IActivityHandler";
2
+ import { FormRenderer, defs } from "./FormRenderer";
3
+ /** Defines the inputs for a display form activity. */
4
+ export interface DisplayFormInputs {
5
+ /** Indicates a name of the form (local to the running workflow). */
6
+ name: string;
7
+ /** Indicates the form resource to load if not yet loaded. */
8
+ form: defs.Form;
9
+ /** Indicates the form template to load if not yet loaded. */
10
+ template?: defs.Form;
11
+ /** Indicates what container to use when displaying the form. */
12
+ container?: "default" | "modal" | string;
13
+ /** Indicates what region to use when activating the form's container. */
14
+ region?: string;
15
+ /** Indicates that the form should be reset. */
16
+ reset?: boolean;
17
+ }
18
+ /**
19
+ * Defines the outputs for a display form activity.
20
+ * @public
21
+ */
22
+ export interface DisplayFormOutputs {
23
+ /** Indicates the state of the form. */
24
+ state: Record<string, defs.Element>;
25
+ /** Indicates the result for the form (if set, causes the form to exit on the next pass). */
26
+ result?: string;
27
+ }
28
+ /** Displays a form. */
29
+ export declare class DisplayForm implements IActivityHandler {
30
+ static renderers: Record<string, FormRenderer | undefined>;
31
+ /**
32
+ * Creates a form renderer if it does not exist.
33
+ * @param inputs The inputs to create the renderer.
34
+ * @param context The context to use to create the renderer.
35
+ * @param type The type of FormRenderer (subclass) to create.
36
+ */
37
+ static createRenderer(inputs: DisplayFormInputs, context: IActivityContext, type: typeof FormRenderer): FormRenderer;
38
+ static readonly action = "gcx:wf:forms:form:DisplayForm";
39
+ static readonly suite = "gcx:wf:builtin";
40
+ /** Performs the operation on behalf of the engine. */
41
+ execute(inputs: DisplayFormInputs, context: IActivityContext, type: typeof FormRenderer): Promise<DisplayFormOutputs>;
42
+ /**
43
+ * Updates the references in the `ElementMap` for all of the elements
44
+ * contained in `displayFormOutputs`.
45
+ * @param displayFormOutputs The outputs of the `DisplayForm` activity.
46
+ */
47
+ private static updateElementMap;
48
+ }
@@ -1,18 +1,18 @@
1
- import { ActivityError } from "../../Errors";
2
- import { Element } from "../../forms/FormDefinition";
3
- /**
4
- * Defines an error that occurs when an attempt was made to access a form
5
- * element using a name that was not found, or to find the name of an element
6
- * which wasn't present in the form.
7
- */
8
- export declare class FormElementNotFoundError extends ActivityError {
9
- constructor(element: string | Element);
10
- }
11
- /**
12
- * Defines an error that occurs when an attempt was made to run an activity
13
- * that requires an element without specifying an element either directly via
14
- * an activity input or indirectly via a form event.
15
- */
16
- export declare class NoFormElementAvailableError extends ActivityError {
17
- constructor();
18
- }
1
+ import { ActivityError } from "../../Errors";
2
+ import { Element } from "../../forms/FormDefinition";
3
+ /**
4
+ * Defines an error that occurs when an attempt was made to access a form
5
+ * element using a name that was not found, or to find the name of an element
6
+ * which wasn't present in the form.
7
+ */
8
+ export declare class FormElementNotFoundError extends ActivityError {
9
+ constructor(element: string | Element);
10
+ }
11
+ /**
12
+ * Defines an error that occurs when an attempt was made to run an activity
13
+ * that requires an element without specifying an element either directly via
14
+ * an activity input or indirectly via a form event.
15
+ */
16
+ export declare class NoFormElementAvailableError extends ActivityError {
17
+ constructor();
18
+ }
@@ -1,16 +1,16 @@
1
- import { IActivityHandler } from "../../IActivityHandler";
2
- import * as defs from "../../forms/FormDefinition";
3
- import { DisplayFormOutputs } from "./DisplayForm";
4
- export interface FilterFormElementItemsInputs {
5
- form: DisplayFormOutputs;
6
- elementName?: string | defs.Element;
7
- phrase?: string;
8
- }
9
- export interface FilterFormElementItemsOutputs {
10
- result: boolean;
11
- }
12
- export declare class FilterFormElementItems implements IActivityHandler {
13
- static readonly action = "gcx:wf:forms::FilterFormElementItems";
14
- static readonly suite = "gcx:wf:builtin";
15
- execute(inputs: FilterFormElementItemsInputs): FilterFormElementItemsOutputs;
16
- }
1
+ import { IActivityHandler } from "../../IActivityHandler";
2
+ import * as defs from "../../forms/FormDefinition";
3
+ import { DisplayFormOutputs } from "./DisplayForm";
4
+ export interface FilterFormElementItemsInputs {
5
+ form: DisplayFormOutputs;
6
+ elementName?: string | defs.Element;
7
+ phrase?: string;
8
+ }
9
+ export interface FilterFormElementItemsOutputs {
10
+ result: boolean;
11
+ }
12
+ export declare class FilterFormElementItems implements IActivityHandler {
13
+ static readonly action = "gcx:wf:forms::FilterFormElementItems";
14
+ static readonly suite = "gcx:wf:builtin";
15
+ execute(inputs: FilterFormElementItemsInputs): FilterFormElementItemsOutputs;
16
+ }
@@ -1,13 +1,13 @@
1
- import { DisplayFormOutputs } from "./DisplayForm";
2
- import { defs } from "./FormRenderer";
3
- /**
4
- * Gets the form associated with the specified element.
5
- * @param element A form element.
6
- */
7
- export declare function getFormForElement(element: defs.Element): DisplayFormOutputs | undefined;
8
- /**
9
- * Sets the form associated with the specified element.
10
- * @param element A form element.
11
- * @param displayFormOutputs A set of form outputs, which are used to identify a form.
12
- */
13
- export declare function setFormForElement(element: defs.Element, displayFormOutputs: DisplayFormOutputs): void;
1
+ import { DisplayFormOutputs } from "./DisplayForm";
2
+ import { defs } from "./FormRenderer";
3
+ /**
4
+ * Gets the form associated with the specified element.
5
+ * @param element A form element.
6
+ */
7
+ export declare function getFormForElement(element: defs.Element): DisplayFormOutputs | undefined;
8
+ /**
9
+ * Sets the form associated with the specified element.
10
+ * @param element A form element.
11
+ * @param displayFormOutputs A set of form outputs, which are used to identify a form.
12
+ */
13
+ export declare function setFormForElement(element: defs.Element, displayFormOutputs: DisplayFormOutputs): void;
@@ -1,140 +1,139 @@
1
- import { Activator } from "../../Activator";
2
- import { Lookup } from "../../Collections";
3
- import { FormHost, defs } from "../../forms/FormHost";
4
- import { FormElementRegistration } from "../../forms/index";
5
- export { defs };
6
- /** Defines what the renderer exposes. */
7
- export interface FormActor {
8
- /** Returns the element with the given name. If the element does not exist an error will be thrown. */
9
- getElement(element: string | defs.Element, event?: defs.Event): defs.Element;
10
- getElementRegistration(element: defs.Element): FormElementRegistration | undefined;
11
- /** Returns the name of the given element. If the element does not exist an error will be thrown. */
12
- getElementName(element: defs.Element | string, event?: defs.Event): string;
13
- /** Sets element visibility to false. */
14
- hideElement(element: defs.Element): void;
15
- /** Sets element visibility to true. */
16
- showElement(element: defs.Element): void;
17
- /** Assigns an error message to an element. */
18
- setElementError(elementName: string, error: string | undefined, markdown?: boolean): void;
19
- /** Finds the specified item and sets it as the current one. Returns true if a match was found, false otherwise. */
20
- setCurrentItem(elementName: string, value: defs.Value | defs.Text | defs.Item, matchType: defs.ItemMatchType): boolean;
21
- /**
22
- * Assigns a property to an element, or overwrites an existing property.
23
- * @param elementName The name of the element to be updated.
24
- * @param propertyName The name of the property of the element to be updated.
25
- * @param propertyValue The new value for the element's property.
26
- * @param markdown (optional) True if the value should be treated as markdown, false otherwise. The default value is false.
27
- * @param event (optional) Only relevant when `propertyName` is `"value"`. If a boolean value, indicates whether or not to post a "changed" event. If a `Partial<defs.Element>` specifies some of the properties of the event to be posted. Any `name` and `value` provided here are ignored. The default value is true.
28
- */
29
- assignElementProperty(elementName: string, propertyName: string, propertyValue: any, markdown?: boolean, event?: Partial<defs.Event> | boolean): void;
30
- /** Assigns an items property to an element. */
31
- assignItemsToElement(elementName: string, items: Lookup<defs.Item>, reset?: boolean): void;
32
- /** Assigns a property to an element item, or overwrites an existing property. */
33
- assignElementItemProperty(elementName: string, itemKey: string, propertyName: string, propertyValue: any, markdown?: boolean): void;
34
- /** Filters the items of an element based on heuristics. */
35
- filterItems(elementName: string, phrase: string): boolean;
36
- /**
37
- * Adds the supplied element to the form.
38
- * @param elementName The unique name for the element.
39
- * @param type The type of element to add.
40
- * @param element The contents of the element to add.
41
- */
42
- addElement(elementName: string, type: string, element: defs.Element): defs.Element;
43
- }
44
- /**
45
- * Renders a form on behalf of the DisplayForm activity.
46
- * @public
47
- */
48
- export declare class FormRenderer extends FormHost implements FormActor {
49
- static type: string;
50
- /** Creates a form renderer. */
51
- static create(): FormRenderer;
52
- /** Creates a custom form renderer. */
53
- static createCustom(): FormRenderer;
54
- /** Register this renderer class as the form renderer. */
55
- static register(activator: Activator): void;
56
- addElement(elementName: string, type: string, element: defs.Element): defs.Element;
57
- assignElementProperty(elementName: string, propertyName: string, propertyValue: any, markdown?: boolean, event?: Partial<defs.Event> | boolean): void;
58
- assignElementItemProperty(elementName: string, itemKey: string, propertyName: string, propertyValue: any, markdown?: boolean): void;
59
- assignItemsToElement(elementName: string, items: Lookup<defs.Item>, reset?: boolean): void;
60
- cancelTool(): void;
61
- deriveLocale(): string;
62
- /** Disposes the form renderer. */
63
- dispose(): boolean;
64
- /** Filters the items of an element based on heuristics. */
65
- filterItems(elementName: string, input: string): boolean;
66
- /**
67
- * Returns the specified element or throws an error with a helpful message
68
- * if the element does not exist. Throwing an error now makes it easier
69
- * to debug than further downstream when it could be less obvious.
70
- * Having a shared method allows us to have consistent behaviour and a
71
- * consistent message.
72
- *
73
- * If the supplied element is already an instance of an Element, it is
74
- * returned.
75
- *
76
- * If it is a string, it is looked up.
77
- *
78
- * If an element was not supplied, we check the supplied event to attempt
79
- * to get the element name from there and subsequently look it up.
80
- *
81
- * This method throws a FormElementNotFoundError if an element name was
82
- * supplied but not found, or if the element named in the event was not
83
- * found.
84
- *
85
- * This method throws a NoFormElementAvailableError if no element name was
86
- * specified and there was none specified in the event either.
87
- *
88
- * @param element The name of a form element, or the element itself.
89
- * @param event The event for the form.
90
- */
91
- getElement(element: string | defs.Element, event?: defs.Event): defs.Element;
92
- /**
93
- * Returns the name of the specified element or throws an error with a
94
- * helpful message if the element does not exist. Throwing an error now
95
- * makes it easier to debug than further downstream when it could be less
96
- * obvious. Having a shared method allows us to have consistent behaviour
97
- * and a consistent message.
98
- * If the supplied element is already a string, it is returned.
99
- *
100
- * If it is an actual instance of Element, it is looked up.
101
- *
102
- * If an element was not supplied, we check the supplied event to attempt
103
- * to get the element name from there.
104
- *
105
- * This method throws a FormElementNotFoundError if an element instance was
106
- * supplied but not found.
107
- *
108
- * This method throws a NoFormElementAvailableError if no element name was
109
- * specified and there was none in the event either.
110
- *
111
- * @param element The name of a form element, or the element itself.
112
- * @param event The event for the form.
113
- */
114
- getElementName(element: defs.Element | string, event?: defs.Event): string;
115
- getElementRegistration(element: defs.Element): FormElementRegistration | undefined;
116
- protected getText(content: defs.Text): defs.Text;
117
- hideElement(element: defs.Element): void;
118
- /**
119
- * Checks to see if the other FormRenderer is related to this one.
120
- * If two forms share the same ambient state, they belong to the
121
- * same workflow. Otherwise they may yet be related if the other belongs to
122
- * a workflow that is an ancestor of the current workflow.
123
- * @param other The other FormRenderer to compare to this one.
124
- */
125
- isRelated(other: FormRenderer): any;
126
- /** Loads the form. */
127
- load(): boolean;
128
- /** Loads the form with a new definition. */
129
- load(form: defs.Form, template?: defs.Form): boolean;
130
- /** Renders form text as HTML. */
131
- renderHtml(content: defs.Text, htmlContentCategory?: defs.HTMLContentCategory): string;
132
- /** Renders form text as plain text. */
133
- renderText(content: defs.Text): string;
134
- setCurrentItem(elementName: string, searchValue: defs.Value | defs.Text | defs.Item, itemMatchType: defs.ItemMatchType): boolean;
135
- setElementError(elementName: string, error: string | undefined, markdown?: boolean): void;
136
- showElement(element: defs.Element): void;
137
- /** Used to request that the form spins without blocking the application. */
138
- spinNoBlock(): boolean;
139
- translateText(content: defs.Text): string | defs.MarkdownRef;
140
- }
1
+ import { Activator } from "../../Activator";
2
+ import { FormHost, defs } from "../../forms/FormHost";
3
+ import { FormElementRegistration } from "../../forms/index";
4
+ export { defs };
5
+ /** Defines what the renderer exposes. */
6
+ export interface FormActor {
7
+ /** Returns the element with the given name. If the element does not exist an error will be thrown. */
8
+ getElement(element: string | defs.Element | undefined, event?: defs.Event): defs.Element;
9
+ getElementRegistration(element: defs.Element): FormElementRegistration | undefined;
10
+ /** Returns the name of the given element. If the element does not exist an error will be thrown. */
11
+ getElementName(element: defs.Element | string | undefined, event?: defs.Event): string;
12
+ /** Sets element visibility to false. */
13
+ hideElement(element: defs.Element): void;
14
+ /** Sets element visibility to true. */
15
+ showElement(element: defs.Element): void;
16
+ /** Assigns an error message to an element. */
17
+ setElementError(elementName: string, error: string | undefined, markdown?: boolean): void;
18
+ /** Finds the specified item and sets it as the current one. Returns true if a match was found, false otherwise. */
19
+ setCurrentItem(elementName: string, value: defs.Value | defs.Text | defs.Item, matchType: defs.ItemMatchType): boolean;
20
+ /**
21
+ * Assigns a property to an element, or overwrites an existing property.
22
+ * @param elementName The name of the element to be updated.
23
+ * @param propertyName The name of the property of the element to be updated.
24
+ * @param propertyValue The new value for the element's property.
25
+ * @param markdown (optional) True if the value should be treated as markdown, false otherwise. The default value is false.
26
+ * @param event (optional) Only relevant when `propertyName` is `"value"`. If a boolean value, indicates whether or not to post a "changed" event. If a `Partial<defs.Element>` specifies some of the properties of the event to be posted. Any `name` and `value` provided here are ignored. The default value is true.
27
+ */
28
+ assignElementProperty(elementName: string, propertyName: string, propertyValue: any, markdown?: boolean, event?: Partial<defs.Event> | boolean): void;
29
+ /** Assigns an items property to an element. */
30
+ assignItemsToElement(elementName: string, items: Record<string, defs.Item>, reset?: boolean): void;
31
+ /** Assigns a property to an element item, or overwrites an existing property. */
32
+ assignElementItemProperty(elementName: string, itemKey: string, propertyName: string, propertyValue: any, markdown?: boolean): void;
33
+ /** Filters the items of an element based on heuristics. */
34
+ filterItems(elementName: string, phrase: string): boolean;
35
+ /**
36
+ * Adds the supplied element to the form.
37
+ * @param elementName The unique name for the element.
38
+ * @param type The type of element to add.
39
+ * @param element The contents of the element to add.
40
+ */
41
+ addElement(elementName: string, type: string, element: defs.Element): defs.Element;
42
+ }
43
+ /**
44
+ * Renders a form on behalf of the DisplayForm activity.
45
+ * @public
46
+ */
47
+ export declare class FormRenderer extends FormHost implements FormActor {
48
+ static type: string;
49
+ /** Creates a form renderer. */
50
+ static create(): FormRenderer;
51
+ /** Creates a custom form renderer. */
52
+ static createCustom(): FormRenderer;
53
+ /** Register this renderer class as the form renderer. */
54
+ static register(activator: Activator): void;
55
+ addElement(elementName: string, type: string, element: defs.Element): defs.Element;
56
+ assignElementProperty(elementName: string, propertyName: string, propertyValue: any, markdown?: boolean, event?: Partial<defs.Event> | boolean): void;
57
+ assignElementItemProperty(elementName: string, itemKey: string, propertyName: string, propertyValue: any, markdown?: boolean): void;
58
+ assignItemsToElement(elementName: string, items: Record<string, defs.Item>, reset?: boolean): void;
59
+ cancelTool(): void;
60
+ deriveLocale(): string;
61
+ /** Disposes the form renderer. */
62
+ dispose(): boolean;
63
+ /** Filters the items of an element based on heuristics. */
64
+ filterItems(elementName: string, input: string): boolean;
65
+ /**
66
+ * Returns the specified element or throws an error with a helpful message
67
+ * if the element does not exist. Throwing an error now makes it easier
68
+ * to debug than further downstream when it could be less obvious.
69
+ * Having a shared method allows us to have consistent behaviour and a
70
+ * consistent message.
71
+ *
72
+ * If the supplied element is already an instance of an Element, it is
73
+ * returned.
74
+ *
75
+ * If it is a string, it is looked up.
76
+ *
77
+ * If an element was not supplied, we check the supplied event to attempt
78
+ * to get the element name from there and subsequently look it up.
79
+ *
80
+ * This method throws a FormElementNotFoundError if an element name was
81
+ * supplied but not found, or if the element named in the event was not
82
+ * found.
83
+ *
84
+ * This method throws a NoFormElementAvailableError if no element name was
85
+ * specified and there was none specified in the event either.
86
+ *
87
+ * @param element The name of a form element, or the element itself.
88
+ * @param event The event for the form.
89
+ */
90
+ getElement(element: string | defs.Element | undefined, event?: defs.Event): defs.Element;
91
+ /**
92
+ * Returns the name of the specified element or throws an error with a
93
+ * helpful message if the element does not exist. Throwing an error now
94
+ * makes it easier to debug than further downstream when it could be less
95
+ * obvious. Having a shared method allows us to have consistent behaviour
96
+ * and a consistent message.
97
+ * If the supplied element is already a string, it is returned.
98
+ *
99
+ * If it is an actual instance of Element, it is looked up.
100
+ *
101
+ * If an element was not supplied, we check the supplied event to attempt
102
+ * to get the element name from there.
103
+ *
104
+ * This method throws a FormElementNotFoundError if an element instance was
105
+ * supplied but not found.
106
+ *
107
+ * This method throws a NoFormElementAvailableError if no element name was
108
+ * specified and there was none in the event either.
109
+ *
110
+ * @param element The name of a form element, or the element itself.
111
+ * @param event The event for the form.
112
+ */
113
+ getElementName(element: defs.Element | string | undefined, event?: defs.Event): string;
114
+ getElementRegistration(element: defs.Element): FormElementRegistration | undefined;
115
+ protected getText(content: defs.Text | undefined): defs.Text | undefined;
116
+ hideElement(element: defs.Element): void;
117
+ /**
118
+ * Checks to see if the other FormRenderer is related to this one.
119
+ * If two forms share the same ambient state, they belong to the
120
+ * same workflow. Otherwise they may yet be related if the other belongs to
121
+ * a workflow that is an ancestor of the current workflow.
122
+ * @param other The other FormRenderer to compare to this one.
123
+ */
124
+ isRelated(other: FormRenderer): any;
125
+ /** Loads the form. */
126
+ load(): boolean;
127
+ /** Loads the form with a new definition. */
128
+ load(form: defs.Form, template?: defs.Form): boolean;
129
+ /** Renders form text as HTML. */
130
+ renderHtml(content: defs.Text, htmlContentCategory?: defs.HTMLContentCategory): string;
131
+ /** Renders form text as plain text. */
132
+ renderText(content: defs.Text | undefined): string;
133
+ setCurrentItem(elementName: string, searchValue: defs.Value | defs.Text | defs.Item, itemMatchType: defs.ItemMatchType): boolean;
134
+ setElementError(elementName: string, error: string | undefined, markdown?: boolean): void;
135
+ showElement(element: defs.Element): void;
136
+ /** Used to request that the form spins without blocking the application. */
137
+ spinNoBlock(): boolean;
138
+ translateText(content: defs.Text): string | defs.MarkdownRef | undefined;
139
+ }