@vertigis/workflow 5.48.2 → 5.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/Collections.d.ts +27 -27
  2. package/Collections.js +1 -1
  3. package/EnumUtils.d.ts +5 -5
  4. package/EnumUtils.js +1 -1
  5. package/Errors.d.ts +27 -27
  6. package/Hooks.d.ts +2 -2
  7. package/IActivityHandler.d.ts +14 -14
  8. package/LanguageStringUtils.js +1 -1
  9. package/ProgramInspectorFacility.d.ts +1 -1
  10. package/ProgramInspectorFacility.js +1 -1
  11. package/Task.d.ts +3 -3
  12. package/Task.js +1 -1
  13. package/TemplateUtils.d.ts +2 -2
  14. package/Validation.d.ts +10 -1
  15. package/Validation.js +1 -1
  16. package/activities/app/GetApplicationData.d.ts +1 -1
  17. package/activities/app/GetApplicationData.js +1 -1
  18. package/activities/app/RemoveApplicationData.d.ts +1 -1
  19. package/activities/app/RemoveApplicationData.js +1 -1
  20. package/activities/app/SetApplicationData.d.ts +1 -1
  21. package/activities/app/SetApplicationData.js +1 -1
  22. package/activities/arcgis/AddFeatures.d.ts +7 -4
  23. package/activities/arcgis/AddFeatures.js +1 -1
  24. package/activities/arcgis/AreaEngineTask.d.ts +1 -1
  25. package/activities/arcgis/AreaEngineTask.js +1 -1
  26. package/activities/arcgis/BufferEngineTask.d.ts +1 -1
  27. package/activities/arcgis/BufferEngineTask.js +1 -1
  28. package/activities/arcgis/CastGeometry.d.ts +4 -4
  29. package/activities/arcgis/CompareGeometries.d.ts +1 -1
  30. package/activities/arcgis/CompareGeometries.js +1 -1
  31. package/activities/arcgis/DeleteFeatures.d.ts +7 -3
  32. package/activities/arcgis/DeleteFeatures.js +1 -1
  33. package/activities/arcgis/DifferenceEngineTask.d.ts +1 -1
  34. package/activities/arcgis/DifferenceEngineTask.js +1 -1
  35. package/activities/arcgis/FlipEngineTask.d.ts +1 -1
  36. package/activities/arcgis/FlipEngineTask.js +1 -1
  37. package/activities/arcgis/GenerateArcGisToken.d.ts +2 -2
  38. package/activities/arcgis/GeoprocessingAsync.d.ts +2 -2
  39. package/activities/arcgis/GetAttributeValue.d.ts +1 -0
  40. package/activities/arcgis/GetAttributeValues.d.ts +1 -0
  41. package/activities/arcgis/GetCurrentPosition.d.ts +28 -28
  42. package/activities/arcgis/GetFeatureGeometries.d.ts +2 -2
  43. package/activities/arcgis/GetFeatureSetExtent.d.ts +2 -2
  44. package/activities/arcgis/GetFormElementItemsFromFeatures.d.ts +2 -2
  45. package/activities/arcgis/GetFormElementItemsFromFeatures.js +1 -1
  46. package/activities/arcgis/GetGeometryExtent.d.ts +2 -2
  47. package/activities/arcgis/LengthEngineTask.d.ts +1 -1
  48. package/activities/arcgis/LengthEngineTask.js +1 -1
  49. package/activities/arcgis/MapProvider.d.ts +92 -92
  50. package/activities/arcgis/MapProvider.js +1 -1
  51. package/activities/arcgis/NearestCoordinateEngineTask.d.ts +6 -6
  52. package/activities/arcgis/NearestVertexEngineTask.d.ts +6 -6
  53. package/activities/arcgis/NearestVerticesEngineTask.d.ts +6 -6
  54. package/activities/arcgis/ProjectServiceTask.js +1 -1
  55. package/activities/arcgis/ResetLayerDefinitionExpression.d.ts +2 -2
  56. package/activities/arcgis/RunPrint.d.ts +2 -2
  57. package/activities/arcgis/RunPrint.js +1 -1
  58. package/activities/arcgis/RunReport.js +1 -1
  59. package/activities/arcgis/RunWorkflow.d.ts +4 -4
  60. package/activities/arcgis/RunWorkflow.js +1 -1
  61. package/activities/arcgis/SetImageryLayerOptions.d.ts +2 -2
  62. package/activities/arcgis/SetLayerDefinitionExpression.d.ts +2 -2
  63. package/activities/arcgis/SetLayerProperty.d.ts +2 -2
  64. package/activities/arcgis/SetLayerVisibility.d.ts +2 -2
  65. package/activities/arcgis/SetViewExtent.d.ts +4 -4
  66. package/activities/arcgis/SetViewpoint.d.ts +2 -2
  67. package/activities/arcgis/TypeChecking.d.ts +3 -3
  68. package/activities/arcgis/UpdateFeatures.d.ts +6 -3
  69. package/activities/arcgis/UpdateFeatures.js +1 -1
  70. package/activities/arcgis/libs/arcGisRestApi.d.ts +4 -4
  71. package/activities/arcgis/libs/shared.d.ts +9 -0
  72. package/activities/arcgis/libs/shared.js +1 -0
  73. package/activities/arcgis/printing.d.ts +14 -14
  74. package/activities/arcgis/runUtils.d.ts +2 -2
  75. package/activities/arcgis/runUtils.js +1 -1
  76. package/activities/arcgis/shared.d.ts +9 -2
  77. package/activities/arcgis/shared.js +1 -1
  78. package/activities/core/CalculateDate.d.ts +1 -1
  79. package/activities/core/CalculateDate.js +1 -1
  80. package/activities/core/ChannelProvider.d.ts +42 -42
  81. package/activities/core/ChannelProvider.js +1 -1
  82. package/activities/core/ForEach.d.ts +4 -4
  83. package/activities/core/FormatDate.d.ts +21 -21
  84. package/activities/core/FormatDate.js +1 -1
  85. package/activities/core/GetFirstItem.d.ts +1 -0
  86. package/activities/core/GetItemAtIndex.d.ts +1 -0
  87. package/activities/core/GetLastItem.d.ts +1 -0
  88. package/activities/core/GetWorkflowInputs.d.ts +6 -2
  89. package/activities/core/Log.d.ts +1 -1
  90. package/activities/core/Log.js +1 -1
  91. package/activities/core/Loop.d.ts +2 -2
  92. package/activities/core/ParseJson.d.ts +1 -0
  93. package/activities/core/WebRequest.d.ts +2 -2
  94. package/activities/csv/ParseCsv.d.ts +1 -0
  95. package/activities/essentials/GetEssentialsSite.d.ts +2 -2
  96. package/activities/essentials/RunEssentialsWorkflow.d.ts +2 -2
  97. package/activities/essentials/RunEssentialsWorkflow.js +1 -1
  98. package/activities/forms/DisplayForm.d.ts +6 -6
  99. package/activities/forms/DisplayForm.js +1 -1
  100. package/activities/forms/FormActor.d.ts +22 -22
  101. package/activities/forms/FormRenderer.d.ts +2 -2
  102. package/activities/forms/FormRenderer.js +1 -1
  103. package/activities/forms/GetFormElementItemsFromCollection.d.ts +7 -7
  104. package/activities/forms/GetFormElementItemsFromCollection.js +1 -1
  105. package/activities/forms/SetFormElementProperty.d.ts +1 -1
  106. package/activities/math/Max.d.ts +1 -1
  107. package/activities/math/Max.js +1 -1
  108. package/activities/math/Min.d.ts +1 -1
  109. package/activities/math/Min.js +1 -1
  110. package/activities/server/RunApplication.d.ts +2 -2
  111. package/activities/server/RunPython.d.ts +4 -4
  112. package/activities/ui/DialogContent.d.ts +6 -6
  113. package/activities/ui/DialogProvider.d.ts +5 -5
  114. package/activities/ui/DialogProvider.js +1 -1
  115. package/definition/ActivityInput.d.ts +6 -6
  116. package/definition/ProgramInspector.d.ts +118 -118
  117. package/definition/ProgramInspector.js +1 -1
  118. package/definition/Reference.d.ts +2 -2
  119. package/definition/Resource.d.ts +15 -15
  120. package/definition/Transition.d.ts +4 -4
  121. package/diagnostics/ConsoleDebugLogger.d.ts +2 -2
  122. package/diagnostics/ConsoleDebugLogger.js +1 -1
  123. package/execution/ActivityContext.d.ts +35 -35
  124. package/execution/ActivityContext.js +1 -1
  125. package/execution/ActivityContextProxy.d.ts +7 -7
  126. package/execution/ActivityContextProxy.js +1 -1
  127. package/execution/AmbientState.d.ts +29 -29
  128. package/execution/AmbientState.js +1 -1
  129. package/execution/AmbientStateProxy.d.ts +10 -10
  130. package/execution/AmbientStateProxy.js +1 -1
  131. package/execution/AsyncContext.d.ts +1 -1
  132. package/execution/AsyncContext.js +1 -1
  133. package/execution/Engine.d.ts +27 -28
  134. package/execution/Engine.js +1 -1
  135. package/execution/IDebugSession.d.ts +10 -10
  136. package/execution/MonikerFrame.d.ts +2 -2
  137. package/execution/MonikerFrame.js +1 -1
  138. package/execution/Proxy.d.ts +1 -1
  139. package/execution/Proxy.js +1 -1
  140. package/execution/StepContext.d.ts +1 -1
  141. package/execution/StepContext.js +1 -1
  142. package/execution/TransitionContext.d.ts +1 -1
  143. package/execution/TransitionContext.js +1 -1
  144. package/forms/ExclusiveTimer.d.ts +2 -2
  145. package/forms/ExclusiveTimer.js +1 -1
  146. package/forms/FormComponent.d.ts +7 -7
  147. package/forms/FormComponent.js +1 -1
  148. package/forms/FormDefinition.d.ts +50 -42
  149. package/forms/FormHost.d.ts +161 -146
  150. package/forms/FormHost.js +1 -1
  151. package/forms/FormPresenterHost.d.ts +42 -42
  152. package/forms/MutuallyExclusiveSectionGroup.d.ts +6 -6
  153. package/forms/MutuallyExclusiveSectionGroup.js +1 -1
  154. package/forms/NumberParser.d.ts +2 -2
  155. package/forms/branding/WorkflowColor.d.ts +5 -5
  156. package/forms/branding/WorkflowColor.js +1 -1
  157. package/forms/components/AutoComplete.js +1 -1
  158. package/forms/components/Button.js +1 -1
  159. package/forms/components/DateTimePicker.js +1 -1
  160. package/forms/components/Form.js +1 -1
  161. package/forms/components/FormLabelNumberField.d.ts +4 -4
  162. package/forms/components/GeometryPickerListItem.d.ts +4 -4
  163. package/forms/components/ItemPicker.js +1 -1
  164. package/forms/components/NumberRangeSlider.js +1 -1
  165. package/forms/components/NumberSlider.js +1 -1
  166. package/forms/components/Scanner.js +1 -1
  167. package/forms/components/SignatureDialog.d.ts +2 -2
  168. package/forms/components/SketchDialog.d.ts +5 -5
  169. package/forms/components/common.js +1 -1
  170. package/forms/dateUtilities.d.ts +2 -2
  171. package/forms/elements/types.d.ts +2 -2
  172. package/forms/index.d.ts +2 -2
  173. package/forms/numberFormatter.d.ts +8 -8
  174. package/forms/numberUtilities.d.ts +1 -1
  175. package/forms/utils.d.ts +6 -12
  176. package/libs/version.d.ts +1 -1
  177. package/libs/version.js +1 -1
  178. package/package.json +1 -1
  179. package/ui/UIService.d.ts +2 -2
  180. package/ui/UIService.js +1 -1
@@ -1 +1 @@
1
- import Bluebird from"bluebird";import{Activator}from"../Activator.js";import{getStringsForProgram}from"../LanguageStringUtils.js";import{Task}from"../Task.js";import{ProgramInspector,canonicalizeLocale}from"../definition/ProgramInspector.js";import{getCachedFormElements}from"../execution/ActivityLoader.js";import{BuiltInFormElements}from"../forms/manifest.js";import{check as checkLicense}from"../licensing/LicenseChecker.js";import{run}from"./ProgramRunner.js";export class Engine{constructor(e){this._getFormElementRegistration=e=>this.formElements[e],this._registerFormElement=e=>{const{id:t}=e;if(this.formElements[t]){const r={...this.formElements[t],...e};this.formElements[t]=r}else this.formElements[t]=e},this.activator=new Activator,this.environment={},this.trivia={getFormElementRegistration:this._getFormElementRegistration,registerFormElement:this._registerFormElement},this.factories=[],this.implementations={},this.formElements={...getCachedFormElements(),...BuiltInFormElements},this.appSkuCode=e}setExternalEventHandler(e){this.externalEventCallback=e}removeExternalEventHandler(e){e===this.externalEventCallback&&(this.externalEventCallback=void 0)}static buildOptions(e,t){(t={...t||{}}).locale=canonicalizeLocale(t.locale),t.locale||(t.locale=e.getDefaultLocale()),t.logLevel=t.logLevel||"log";const r=new Proxy({},{get:(e,t)=>t}),n=getStringsForProgram(e,t);return t.environment={activities:r,encodeHtml:function(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):""},getText:function(e){if("string"==typeof e&&"@"===e.charAt(0)){const t=e.slice(1);if(t in n)return n[t]}return e},strings:n,...t.environment||{}},t}createHandler(e,t){const r=this.implementations[e];if(void 0!==r){const e=Bluebird.resolve(r);return e.isFulfilled()?new(e.value()):e.then(function(e){return Bluebird.attempt(function(){return new e})})}for(const r of this.factories){const n=r.create(e,this._registerFormElement,t);if(void 0!==n)return n}}run(e,t){return Task.attempt(()=>{let r;e instanceof ProgramInspector?r=e:(r=new ProgramInspector,r.import(e)),checkLicense(r.program,this.appSkuCode),t=Engine.buildOptions(r,t);const n=r.resolveStart(t?t.start:void 0);return run(this,r,t,n)})}enqueueExternalEvent(e){this.externalEventCallback&&this.externalEventCallback(e)}}
1
+ import Bluebird from"bluebird";import{Activator}from"../Activator.js";import{getStringsForProgram}from"../LanguageStringUtils.js";import{Task}from"../Task.js";import{ProgramInspector,canonicalizeLocale}from"../definition/ProgramInspector.js";import{getCachedFormElements}from"../execution/ActivityLoader.js";import{BuiltInFormElements}from"../forms/manifest.js";import{check as checkLicense}from"../licensing/LicenseChecker.js";import{run}from"./ProgramRunner.js";export class Engine{constructor(e){this.activator=new Activator,this.environment={},this.factories=[],this.formElements={...getCachedFormElements(),...BuiltInFormElements},this.implementations={},this.trivia={},this._getFormElementRegistration=e=>this.formElements[e],this._registerFormElement=e=>{const{id:t}=e;if(this.formElements[t]){const r={...this.formElements[t],...e};this.formElements[t]=r}else this.formElements[t]=e},this.appSkuCode=e,this.trivia.getFormElementRegistration=this._getFormElementRegistration,this.trivia.registerFormElement=this._registerFormElement}static buildOptions(e,t){(t={...t||{}}).locale=canonicalizeLocale(t.locale),t.locale||(t.locale=e.getDefaultLocale()),t.logLevel=t.logLevel||"log";const r=new Proxy({},{get:(e,t)=>t}),n=getStringsForProgram(e,t);return t.environment={activities:r,encodeHtml:function(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):""},getText:function(e){if("string"==typeof e&&"@"===e.charAt(0)){const t=e.slice(1);if(t in n)return n[t]}return e},strings:n,...t.environment||{}},t}createHandler(e,t){const r=this.implementations[e];if(void 0!==r){const e=Bluebird.resolve(r);return e.isFulfilled()?new(e.value()):e.then(function(e){return Bluebird.attempt(function(){return new e})})}for(const r of this.factories){const n=r.create(e,this._registerFormElement,t);if(void 0!==n)return n}}enqueueExternalEvent(e){this.externalEventCallback&&this.externalEventCallback(e)}removeExternalEventHandler(e){e===this.externalEventCallback&&(this.externalEventCallback=void 0)}run(e,t){return Task.attempt(()=>{let r;e instanceof ProgramInspector?r=e:(r=new ProgramInspector,r.import(e)),checkLicense(r.program,this.appSkuCode),t=Engine.buildOptions(r,t);const n=r.resolveStart(t?t.start:void 0);return run(this,r,t,n)})}setExternalEventHandler(e){this.externalEventCallback=e}}
@@ -3,18 +3,18 @@ import type { ProgramInspector } from "../definition/ProgramInspector";
3
3
  import type Bluebird from "bluebird";
4
4
  /** Contains information about an activity. */
5
5
  export interface IActivityState {
6
- /** Indicates the identifier of this state. */
7
- id: any;
8
6
  /** Indicates the activity. */
9
7
  activity?: Activity;
10
- /** Indicates the number of passes on the current step. */
11
- passes?: number;
12
8
  /** Indicates the error that was caught. */
13
9
  caught?: Error;
10
+ /** Indicates the identifier of this state. */
11
+ id: any;
14
12
  /** Indicates the inputs. */
15
13
  inputs: Record<string, any>;
16
14
  /** Indicates the outputs. */
17
15
  outputs: Record<string, any>;
16
+ /** Indicates the number of passes on the current step. */
17
+ passes?: number;
18
18
  /** Indicates the completion promise. */
19
19
  promise?: Bluebird<Error[]>;
20
20
  }
@@ -30,14 +30,14 @@ export interface IMonikerFrame {
30
30
  * @product This is intended for internal use only within VertiGIS Studio products.
31
31
  */
32
32
  export interface IDebugSession {
33
- /** Indicates the program being run. */
34
- inspector?: ProgramInspector;
33
+ /** Breaks execution of the program being debugged. */
34
+ break: () => void;
35
+ /** Continues execution of the program being debugged. */
36
+ continue: () => void;
35
37
  /** Indicates the activity currently being run. */
36
38
  frame?: IMonikerFrame;
39
+ /** Indicates the program being run. */
40
+ inspector?: ProgramInspector;
37
41
  /** Indicates the monikers for which activities may draw input from. */
38
42
  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
43
  }
@@ -2,10 +2,10 @@ import type ActivityContext from "./ActivityContext";
2
2
  import type { IMonikerFrame } from "./IDebugSession";
3
3
  import type { Task } from "../Task";
4
4
  declare class MonikerFrame implements IMonikerFrame {
5
- cancellationResolve: () => void;
6
5
  cancellationToken: Task<void>;
7
- index: number;
8
6
  current?: ActivityContext;
7
+ index: number;
9
8
  state: Record<string, ActivityContext>;
9
+ cancellationResolve: () => void;
10
10
  }
11
11
  export {};
@@ -1 +1 @@
1
- class MonikerFrame{constructor(){this.cancellationResolve=()=>{},this.cancellationToken={},this.index=-1,this.state={}}}export default MonikerFrame;
1
+ class MonikerFrame{constructor(){this.cancellationToken={},this.index=-1,this.state={},this.cancellationResolve=()=>{}}}export default MonikerFrame;
@@ -1,5 +1,5 @@
1
1
  declare class Proxy<T> {
2
- get target(): T;
3
2
  constructor(target: T);
3
+ get target(): T;
4
4
  }
5
5
  export {};
@@ -1 +1 @@
1
- let guard=!0;export function clearGuard(){guard=!1}class Proxy{get target(){}constructor(r){Object.defineProperty(this,"target",{get(){if(!1===guard)return guard=!0,r}})}}export default Proxy;
1
+ let guard=!0;export function clearGuard(){guard=!1}class Proxy{constructor(r){Object.defineProperty(this,"target",{get(){if(!1===guard)return guard=!0,r}})}get target(){}}export default Proxy;
@@ -1,6 +1,6 @@
1
1
  import ActivityContext from "./ActivityContext";
2
2
  declare class StepContext extends ActivityContext {
3
- protected transferInline(): void;
4
3
  goto(): void;
4
+ protected transferInline(): void;
5
5
  }
6
6
  export {};
@@ -1 +1 @@
1
- import ActivityContext from"./ActivityContext.js";class StepContext extends ActivityContext{transferInline(){if(this.promise.isFulfilled()){const t=this.ambient,i=this.marshalError();void 0!==i?t.bubble(i):this.repeat?t.start(this.activity,this):(this.callBranch&&t.call(),this.forkBranch&&t.fork(),t.enqueue(this.activity,this.jumpBranch))}}goto(){const t=this.frame,i=this.ambient;if(i.goto(t)){const e=this.recent,s=void 0!==e?e.context:this;t.current=s,s.repeat=!0,i.halted=!1,i.execute()}}}export default StepContext;
1
+ import ActivityContext from"./ActivityContext.js";class StepContext extends ActivityContext{goto(){const t=this.frame,i=this.ambient;if(i.goto(t)){const e=this.recent,s=void 0!==e?e.context:this;t.current=s,s.repeat=!0,i.halted=!1,i.execute()}}transferInline(){if(this.promise.isFulfilled()){const t=this.ambient,i=this.marshalError();void 0!==i?t.bubble(i):this.repeat?t.start(this.activity,this):(this.callBranch&&t.call(),this.forkBranch&&t.fork(),t.enqueue(this.activity,this.jumpBranch))}}}export default StepContext;
@@ -2,7 +2,7 @@ import ActivityContext from "./ActivityContext";
2
2
  import type { Transition } from "../definition/Transition";
3
3
  declare class TransitionContext extends ActivityContext {
4
4
  activity: Transition;
5
- private test;
6
5
  protected transferInline(): void;
6
+ private test;
7
7
  }
8
8
  export {};
@@ -1 +1 @@
1
- import ActivityContext from"./ActivityContext.js";import{isLiteral}from"./util.js";class TransitionContext extends ActivityContext{constructor(){super(...arguments),this.activity={}}test(){let t,i;const e=this.outputs;for(const o in e){if(void 0!==t&&void 0!==i)return!1;if(i=e[o],!isLiteral(i))return!1;if(void 0===t)t=i,i=void 0;else if(t!==i)return!1}return void 0===t||(void 0!==i||("boolean"==typeof t?t:"number"==typeof t?t>0:"string"==typeof t&&t.length>0))}transferInline(){if(this.promise.isFulfilled()){const t=this.ambient,i=this.marshalError();void 0!==i?t.bubble(i):this.test()?t.start(this.activity.target):t.next()}}}export default TransitionContext;
1
+ import ActivityContext from"./ActivityContext.js";import{isLiteral}from"./util.js";class TransitionContext extends ActivityContext{constructor(){super(...arguments),this.activity={}}transferInline(){if(this.promise.isFulfilled()){const t=this.ambient,i=this.marshalError();void 0!==i?t.bubble(i):this.test()?t.start(this.activity.target):t.next()}}test(){let t,i;const e=this.outputs;for(const o in e){if(void 0!==t&&void 0!==i)return!1;if(i=e[o],!isLiteral(i))return!1;if(void 0===t)t=i,i=void 0;else if(t!==i)return!1}return void 0===t||(void 0!==i||("boolean"==typeof t?t:"number"==typeof t?t>0:"string"==typeof t&&t.length>0))}}export default TransitionContext;
@@ -2,12 +2,12 @@ import Bluebird from "bluebird";
2
2
  export declare class ExclusiveTimer {
3
3
  /** Indicates if the timer is running. */
4
4
  get cancellationToken(): Bluebird<void>;
5
- /** Starts the timer if the timer is not yet started. */
6
- start(duration: number, action: () => void): void;
7
5
  /** Completely resets the timer (stop and reset to zero). */
8
6
  reset(): void;
9
7
  /** Resumes the timer. */
10
8
  resume(action?: () => void): void;
9
+ /** Starts the timer if the timer is not yet started. */
10
+ start(duration: number, action: () => void): void;
11
11
  /** Completely resets the timer unless immediately resumed. */
12
12
  suspend(): void;
13
13
  }
@@ -1 +1 @@
1
- import Bluebird from"bluebird";let current,callback,cancellationResolve,cancellationToken,delay,defer,immediate;function invoke(){if(delay=void 0,void 0===defer){const e=callback;callback=void 0,e()}}export class ExclusiveTimer{get cancellationToken(){return current!==this?(void 0===immediate&&(immediate=Bluebird.resolve()),immediate):(void 0===cancellationToken&&(cancellationToken=new Bluebird(e=>cancellationResolve=e)),cancellationToken)}start(e,i){current!==this&&"function"==typeof i&&(void 0!==current&&current.reset(),current=this,callback=i,delay=setTimeout(invoke,e))}reset(){current===this&&(callback=void 0,current=void 0,void 0!==delay&&(clearTimeout(delay),delay=void 0),void 0!==defer&&(clearTimeout(defer),defer=void 0),void 0!==cancellationResolve&&(cancellationResolve(),cancellationResolve=void 0,cancellationToken=void 0))}resume(e){current===this&&(void 0!==callback&&("function"==typeof e&&(callback=e),void 0===delay&&(delay=setTimeout(invoke))),void 0!==defer&&(clearTimeout(defer),defer=void 0))}suspend(){current===this&&void 0===defer&&(defer=setTimeout(()=>this.reset()))}}
1
+ import Bluebird from"bluebird";let current,callback,cancellationResolve,cancellationToken,delay,defer,immediate;function invoke(){if(delay=void 0,void 0===defer){const e=callback;callback=void 0,e()}}export class ExclusiveTimer{get cancellationToken(){return current!==this?(void 0===immediate&&(immediate=Bluebird.resolve()),immediate):(void 0===cancellationToken&&(cancellationToken=new Bluebird(e=>cancellationResolve=e)),cancellationToken)}reset(){current===this&&(callback=void 0,current=void 0,void 0!==delay&&(clearTimeout(delay),delay=void 0),void 0!==defer&&(clearTimeout(defer),defer=void 0),void 0!==cancellationResolve&&(cancellationResolve(),cancellationResolve=void 0,cancellationToken=void 0))}resume(e){current===this&&(void 0!==callback&&("function"==typeof e&&(callback=e),void 0===delay&&(delay=setTimeout(invoke))),void 0!==defer&&(clearTimeout(defer),defer=void 0))}start(e,i){current!==this&&"function"==typeof i&&(void 0!==current&&current.reset(),current=this,callback=i,delay=setTimeout(invoke,e))}suspend(){current===this&&void 0===defer&&(defer=setTimeout(()=>this.reset()))}}
@@ -4,40 +4,40 @@ import type { FormPresenterHost } from "./FormPresenterHost";
4
4
  import type { FormElementProps, FormElementRegistration } from "./index";
5
5
  export type { FormPresenterHost };
6
6
  export interface EventValueTypes {
7
- changed: defs.Value | undefined;
8
7
  cancel: string | undefined;
8
+ changed: defs.Value | undefined;
9
9
  clicked: defs.Value | undefined;
10
10
  custom: any;
11
11
  dragged: defs.NumberRef | number[];
12
12
  suggest: defs.Value | undefined;
13
13
  }
14
14
  export interface EventArgumentTypes {
15
- changed: boolean | string;
16
15
  cancel: never;
16
+ changed: boolean | string;
17
17
  clicked: undefined;
18
18
  custom: any;
19
19
  dragged: never;
20
20
  suggest: string;
21
21
  }
22
22
  export interface FormComponentProps {
23
+ children: React.JSX.Element[];
23
24
  host: FormPresenterHost;
24
- type?: "form" | "body" | "row" | "header" | "main" | "footer" | "element" | "section" | "accordionGroup" | "tabGroup";
25
25
  name?: string;
26
- children: React.JSX.Element[];
26
+ type?: "form" | "body" | "row" | "header" | "main" | "footer" | "element" | "section" | "accordionGroup" | "tabGroup";
27
27
  }
28
28
  /** @product This is intended for internal use only within VertiGIS Studio products. */
29
29
  export declare class FormComponent extends Component<FormComponentProps, object> {
30
- id: string | undefined;
31
30
  autoInput: boolean | undefined;
32
31
  enabled: boolean;
32
+ id: string | undefined;
33
33
  timer: any;
34
34
  get elementRegistration(): FormElementRegistration | undefined;
35
35
  private get element();
36
36
  prepare(): defs.Element | undefined;
37
- render(): any;
38
37
  raiseEvent: <K extends keyof EventValueTypes>(eventName: K, eventValue: EventValueTypes[K], argument?: EventArgumentTypes[K], item?: string, cancellationToken?: PromiseLike<void> | undefined) => void;
39
- setProperty: FormElementProps<any>["setProperty"];
38
+ render(): any;
40
39
  setItemProperty: FormElementProps<any>["setItemProperty"];
40
+ setProperty: FormElementProps<any>["setProperty"];
41
41
  setValue: FormElementProps["setValue"];
42
42
  }
43
43
  export declare class FormElementComponent extends FormComponent {
@@ -1 +1 @@
1
- import{Component}from"react";import{makeId}from"./utils.js";export class FormComponent extends Component{constructor(){super(...arguments),this.enabled=!1,this.raiseEvent=(e,t,s,n,o)=>this.props.host?.post(e,{name:this.props.name,value:t,argument:s,item:n,cancellationToken:o}),this.setProperty=(e,t,s=!0)=>{const n=this.props.host,o=this.props.name;n.assignElementProperty(o,e,t,void 0,s)},this.setItemProperty=(e,t,s,n)=>{const o=this.props.host,i=this.props.name;o.assignElementItemProperty(i,e,t,s,n)},this.setValue=(e,t=!0)=>this.setProperty("value",e,t)}get elementRegistration(){const{host:e}=this.props;if(isFormRenderer(e))return e.getElementRegistration(this.element)}get element(){const{host:e,name:t}=this.props;if(t)return e.find(t)}prepare(){void 0===this.id&&(this.id=makeId()),this.enabled=!0;const e=this.props.host;if(!1===e.enabled&&(this.enabled=!1),void 0!==this.element){const t=e.find(this.element.section);void 0!==t&&!1===t.enabled&&(this.enabled=!1),!1===this.element.enabled&&(this.enabled=!1)}return this.element}render(){return this.props.host.renderVisual(this)}}export class FormElementComponent extends FormComponent{componentDidMount(){const e=this.props;e.host.refs[e.name]=this}componentDidUpdate(){const e=this.props;e.host.refs[e.name]=this}componentWillUnmount(){const e=this.props;e.host.refs[e.name]=void 0}}function isFormRenderer(e){return!!e&&"function"==typeof e.getElementRegistration}
1
+ import{Component}from"react";import{makeId}from"./utils.js";export class FormComponent extends Component{constructor(){super(...arguments),this.enabled=!1,this.raiseEvent=(e,t,s,n,o)=>this.props.host?.post(e,{name:this.props.name,value:t,argument:s,item:n,cancellationToken:o}),this.setItemProperty=(e,t,s,n)=>{const o=this.props.host,i=this.props.name;o.assignElementItemProperty(i,e,t,s,n)},this.setProperty=(e,t,s=!0)=>{const n=this.props.host,o=this.props.name;n.assignElementProperty(o,e,t,void 0,s)},this.setValue=(e,t=!0)=>this.setProperty("value",e,t)}get elementRegistration(){const{host:e}=this.props;if(isFormRenderer(e))return e.getElementRegistration(this.element)}get element(){const{host:e,name:t}=this.props;if(t)return e.find(t)}prepare(){void 0===this.id&&(this.id=makeId()),this.enabled=!0;const e=this.props.host;if(!1===e.enabled&&(this.enabled=!1),void 0!==this.element){const t=e.find(this.element.section);void 0!==t&&!1===t.enabled&&(this.enabled=!1),!1===this.element.enabled&&(this.enabled=!1)}return this.element}render(){return this.props.host.renderVisual(this)}}export class FormElementComponent extends FormComponent{componentDidMount(){const e=this.props;e.host.refs[e.name]=this}componentDidUpdate(){const e=this.props;e.host.refs[e.name]=this}componentWillUnmount(){const e=this.props;e.host.refs[e.name]=void 0}}function isFormRenderer(e){return!!e&&"function"==typeof e.getElementRegistration}
@@ -57,39 +57,39 @@ export type TitleLocation = "above" | "beside";
57
57
  export type Value = boolean | number | number[] | string | DataRef | DateRangeRef | DateTimeRef | FilesRef | GeometryRef | ItemsRef | NumberRef | ScanRef | SignatureRef | SketchRef;
58
58
  /** References data for a data-based value. */
59
59
  export interface DataRef {
60
- /** Indicates the type of data. */
61
- type: string;
62
- /** Discriminates this object from others. */
63
- format?: void;
64
60
  /** Indicates the data. */
65
61
  data?: any;
62
+ /** Discriminates this object from others. */
63
+ format?: void;
64
+ /** Indicates the type of data. */
65
+ type: string;
66
66
  }
67
67
  export interface DateRangeRef {
68
68
  /**
69
- * The lower end of the date range. The time is set to midnight local time,
69
+ * The upper end of the date range. The time is set to midnight local time,
70
70
  * based on the user's time-zone.
71
71
  * */
72
- startDate: Date;
72
+ endDate: Date;
73
73
  /**
74
- * The upper end of the date range. The time is set to midnight local time,
74
+ * The lower end of the date range. The time is set to midnight local time,
75
75
  * based on the user's time-zone.
76
76
  * */
77
- endDate: Date;
77
+ startDate: Date;
78
78
  }
79
79
  /** References data for a date-based value. */
80
80
  export interface DateTimeRef {
81
- /** Indicates the format for the date/time value. */
82
- format: DateTimeFormat;
83
81
  /** Indicates the display form for the date/time value. */
84
82
  display: string;
83
+ /** Indicates the format for the date/time value. */
84
+ format: DateTimeFormat;
85
85
  /** Indicates the value for the date/time value. */
86
86
  value: number;
87
87
  }
88
88
  export interface FilesRef {
89
- /** Discriminates this object from others. */
90
- format?: void;
91
89
  /** Indicates the files. */
92
90
  files: File[];
91
+ /** Discriminates this object from others. */
92
+ format?: void;
93
93
  }
94
94
  /** References a geometry. */
95
95
  export interface GeometryRef {
@@ -111,10 +111,10 @@ export interface ItemsRef {
111
111
  * @product This is intended for internal use only within VertiGIS Studio products.
112
112
  */
113
113
  export interface NumberRef {
114
- /** Indicates the format for the number. */
115
- format: NumberFormat;
116
114
  /** Indicates the display value. */
117
115
  display: string;
116
+ /** Indicates the format for the number. */
117
+ format: NumberFormat;
118
118
  /** Indicates the numeric value. */
119
119
  numeric: number;
120
120
  }
@@ -126,10 +126,10 @@ export interface MarkdownRef {
126
126
  markdown: string;
127
127
  }
128
128
  export interface ScanRef {
129
- /** Type of barcode scanned. */
130
- scanType?: "barcode" | "qrcode";
131
129
  /** Type of entry method. */
132
130
  entryMethod: "camera" | "manual";
131
+ /** Type of barcode scanned. */
132
+ scanType?: "barcode" | "qrcode";
133
133
  /** Indicates the returned scanner data. */
134
134
  value: string;
135
135
  }
@@ -311,6 +311,14 @@ export interface Element {
311
311
  orientation?: Orientation;
312
312
  /** Indicates that the element is in overlay mode. */
313
313
  overlay?: boolean;
314
+ /**
315
+ * Indicates if the current value should be retained when the element is refreshed.
316
+ * This is used in conjunction with dependsOn when options in an element are valid
317
+ * for more than one option in the element that it depends upon.
318
+ * This does not just mean the items have the same value, but they have the same meaning.
319
+ * Default is false.
320
+ */
321
+ persistValueOnRefresh?: boolean;
314
322
  /** Indicates the prompt for the element. */
315
323
  prompt?: Text;
316
324
  /** Indicates if the element is read only. */
@@ -325,12 +333,12 @@ export interface Element {
325
333
  * The row that this element belongs to. Row numbers increase downwards.
326
334
  */
327
335
  rowNumber?: number;
336
+ /** Indicates whether to support barcode scanning, qrcode scanning or both (used by Scanner). If undefined (default) allow both. */
337
+ scanType?: "barcode" | "qrcode" | "both";
328
338
  /** Indicates the enclosing section. */
329
339
  section?: SectionRef;
330
340
  /** Indicates if the user can select one item, several items or no items. */
331
341
  selectionMode?: "single" | "multiple" | "none";
332
- /** Indicates whether to support barcode scanning, qrcode scanning or both (used by Scanner). If undefined (default) allow both. */
333
- scanType?: "barcode" | "qrcode" | "both";
334
342
  /** Indicates if the items can be filtered by the user. */
335
343
  showFilter?: boolean;
336
344
  /** Indicates if the minimum/maximum labels should be displayed by the user (used by NumberRangeSlider) */
@@ -398,43 +406,43 @@ export interface ItemAppearance {
398
406
  export interface Item {
399
407
  /** Settings controlling the appearance of the item. */
400
408
  appearance?: ItemAppearance;
409
+ /** Indicates the checked state for the item. */
410
+ checked?: boolean;
411
+ /** Indicates if the item is a default. */
412
+ default?: boolean;
413
+ /** Indicates the enabled state for the item. */
414
+ enabled?: boolean;
401
415
  /** Indicates the placement of the item. */
402
416
  index?: number;
403
417
  /** Indicates the label for the item. */
404
418
  label?: Text;
419
+ /** Indicates the style name to be used. */
420
+ styleName?: string;
421
+ /** Indicates the tooltip for the element. */
422
+ tooltip?: Text;
423
+ /** Indicates if the element triggers validation when submitting. */
424
+ validates?: boolean;
405
425
  /** Indicates the value for the item. */
406
426
  value?: Value;
407
- /** Indicates the enabled state for the item. */
408
- enabled?: boolean;
409
- /** Indicates the checked state for the item. */
410
- checked?: boolean;
411
427
  /** Indicates the visible state for the item. */
412
428
  visible?: boolean;
413
- /** Indicates if the item is a default. */
414
- default?: boolean;
415
- /** Indicates if the element triggers validation when submitting. */
416
- validates?: boolean;
417
- /** Indicates the tooltip for the element. */
418
- tooltip?: Text;
419
- /** Indicates the style name to be used. */
420
- styleName?: string;
421
429
  }
422
430
  /** @product This is intended for internal use only within VertiGIS Studio products. */
423
431
  export interface Event {
424
- /** Indicates the name of the element raising the event. */
425
- name?: string;
432
+ /** Indicates the argument for the event. */
433
+ argument?: Value | ExternalEvent;
434
+ /** Indicates the cancellation token fro the event. */
435
+ cancellationToken?: PromiseLike<void>;
426
436
  /** Indicates the item of the element raising the event. */
427
437
  item?: string;
428
- /** Indicates the type of the event. */
429
- type?: EventType;
438
+ /** Indicates the name of the element raising the event. */
439
+ name?: string;
430
440
  /** Indicates the routing key of the event. */
431
441
  routingKey?: string;
432
- /** Indicates the argument for the event. */
433
- argument?: Value | ExternalEvent;
442
+ /** Indicates the type of the event. */
443
+ type?: EventType;
434
444
  /** Indicates the value associated with the element or item. */
435
445
  value?: Value;
436
- /** Indicates the cancellation token fro the event. */
437
- cancellationToken?: PromiseLike<void>;
438
446
  }
439
447
  /** Allows tracking the current state of the AutoComplete element between renders. */
440
448
  export interface AutoCompleteState {
@@ -447,12 +455,12 @@ export interface AutoCompleteState {
447
455
  }
448
456
  /** @product This is intended for internal use only within VertiGIS Studio products. */
449
457
  export interface GeometryState {
450
- /** Indicates the application specific context. */
451
- context?: object;
452
- /** Indicates the content. */
453
- content?: object;
454
458
  /** Indicates the checked state. */
455
459
  checked?: boolean;
460
+ /** Indicates the content. */
461
+ content?: object;
462
+ /** Indicates the application specific context. */
463
+ context?: object;
456
464
  /** Indicates the focused state. */
457
465
  focused?: boolean;
458
466
  /** Indicates the pending state. */