@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.
- package/Collections.d.ts +27 -27
- package/Collections.js +1 -1
- package/EnumUtils.d.ts +5 -5
- package/EnumUtils.js +1 -1
- package/Errors.d.ts +27 -27
- package/Hooks.d.ts +2 -2
- package/IActivityHandler.d.ts +14 -14
- package/LanguageStringUtils.js +1 -1
- package/ProgramInspectorFacility.d.ts +1 -1
- package/ProgramInspectorFacility.js +1 -1
- package/Task.d.ts +3 -3
- package/Task.js +1 -1
- package/TemplateUtils.d.ts +2 -2
- package/Validation.d.ts +10 -1
- package/Validation.js +1 -1
- package/activities/app/GetApplicationData.d.ts +1 -1
- package/activities/app/GetApplicationData.js +1 -1
- package/activities/app/RemoveApplicationData.d.ts +1 -1
- package/activities/app/RemoveApplicationData.js +1 -1
- package/activities/app/SetApplicationData.d.ts +1 -1
- package/activities/app/SetApplicationData.js +1 -1
- package/activities/arcgis/AddFeatures.d.ts +7 -4
- package/activities/arcgis/AddFeatures.js +1 -1
- package/activities/arcgis/AreaEngineTask.d.ts +1 -1
- package/activities/arcgis/AreaEngineTask.js +1 -1
- package/activities/arcgis/BufferEngineTask.d.ts +1 -1
- package/activities/arcgis/BufferEngineTask.js +1 -1
- package/activities/arcgis/CastGeometry.d.ts +4 -4
- package/activities/arcgis/CompareGeometries.d.ts +1 -1
- package/activities/arcgis/CompareGeometries.js +1 -1
- package/activities/arcgis/DeleteFeatures.d.ts +7 -3
- package/activities/arcgis/DeleteFeatures.js +1 -1
- package/activities/arcgis/DifferenceEngineTask.d.ts +1 -1
- package/activities/arcgis/DifferenceEngineTask.js +1 -1
- package/activities/arcgis/FlipEngineTask.d.ts +1 -1
- package/activities/arcgis/FlipEngineTask.js +1 -1
- package/activities/arcgis/GenerateArcGisToken.d.ts +2 -2
- package/activities/arcgis/GeoprocessingAsync.d.ts +2 -2
- package/activities/arcgis/GetAttributeValue.d.ts +1 -0
- package/activities/arcgis/GetAttributeValues.d.ts +1 -0
- package/activities/arcgis/GetCurrentPosition.d.ts +28 -28
- package/activities/arcgis/GetFeatureGeometries.d.ts +2 -2
- package/activities/arcgis/GetFeatureSetExtent.d.ts +2 -2
- package/activities/arcgis/GetFormElementItemsFromFeatures.d.ts +2 -2
- package/activities/arcgis/GetFormElementItemsFromFeatures.js +1 -1
- package/activities/arcgis/GetGeometryExtent.d.ts +2 -2
- package/activities/arcgis/LengthEngineTask.d.ts +1 -1
- package/activities/arcgis/LengthEngineTask.js +1 -1
- package/activities/arcgis/MapProvider.d.ts +92 -92
- package/activities/arcgis/MapProvider.js +1 -1
- package/activities/arcgis/NearestCoordinateEngineTask.d.ts +6 -6
- package/activities/arcgis/NearestVertexEngineTask.d.ts +6 -6
- package/activities/arcgis/NearestVerticesEngineTask.d.ts +6 -6
- package/activities/arcgis/ProjectServiceTask.js +1 -1
- package/activities/arcgis/ResetLayerDefinitionExpression.d.ts +2 -2
- package/activities/arcgis/RunPrint.d.ts +2 -2
- package/activities/arcgis/RunPrint.js +1 -1
- package/activities/arcgis/RunReport.js +1 -1
- package/activities/arcgis/RunWorkflow.d.ts +4 -4
- package/activities/arcgis/RunWorkflow.js +1 -1
- package/activities/arcgis/SetImageryLayerOptions.d.ts +2 -2
- package/activities/arcgis/SetLayerDefinitionExpression.d.ts +2 -2
- package/activities/arcgis/SetLayerProperty.d.ts +2 -2
- package/activities/arcgis/SetLayerVisibility.d.ts +2 -2
- package/activities/arcgis/SetViewExtent.d.ts +4 -4
- package/activities/arcgis/SetViewpoint.d.ts +2 -2
- package/activities/arcgis/TypeChecking.d.ts +3 -3
- package/activities/arcgis/UpdateFeatures.d.ts +6 -3
- package/activities/arcgis/UpdateFeatures.js +1 -1
- package/activities/arcgis/libs/arcGisRestApi.d.ts +4 -4
- package/activities/arcgis/libs/shared.d.ts +9 -0
- package/activities/arcgis/libs/shared.js +1 -0
- package/activities/arcgis/printing.d.ts +14 -14
- package/activities/arcgis/runUtils.d.ts +2 -2
- package/activities/arcgis/runUtils.js +1 -1
- package/activities/arcgis/shared.d.ts +9 -2
- package/activities/arcgis/shared.js +1 -1
- package/activities/core/CalculateDate.d.ts +1 -1
- package/activities/core/CalculateDate.js +1 -1
- package/activities/core/ChannelProvider.d.ts +42 -42
- package/activities/core/ChannelProvider.js +1 -1
- package/activities/core/ForEach.d.ts +4 -4
- package/activities/core/FormatDate.d.ts +21 -21
- package/activities/core/FormatDate.js +1 -1
- package/activities/core/GetFirstItem.d.ts +1 -0
- package/activities/core/GetItemAtIndex.d.ts +1 -0
- package/activities/core/GetLastItem.d.ts +1 -0
- package/activities/core/GetWorkflowInputs.d.ts +6 -2
- package/activities/core/Log.d.ts +1 -1
- package/activities/core/Log.js +1 -1
- package/activities/core/Loop.d.ts +2 -2
- package/activities/core/ParseJson.d.ts +1 -0
- package/activities/core/WebRequest.d.ts +2 -2
- package/activities/csv/ParseCsv.d.ts +1 -0
- package/activities/essentials/GetEssentialsSite.d.ts +2 -2
- package/activities/essentials/RunEssentialsWorkflow.d.ts +2 -2
- package/activities/essentials/RunEssentialsWorkflow.js +1 -1
- package/activities/forms/DisplayForm.d.ts +6 -6
- package/activities/forms/DisplayForm.js +1 -1
- package/activities/forms/FormActor.d.ts +22 -22
- package/activities/forms/FormRenderer.d.ts +2 -2
- package/activities/forms/FormRenderer.js +1 -1
- package/activities/forms/GetFormElementItemsFromCollection.d.ts +7 -7
- package/activities/forms/GetFormElementItemsFromCollection.js +1 -1
- package/activities/forms/SetFormElementProperty.d.ts +1 -1
- package/activities/math/Max.d.ts +1 -1
- package/activities/math/Max.js +1 -1
- package/activities/math/Min.d.ts +1 -1
- package/activities/math/Min.js +1 -1
- package/activities/server/RunApplication.d.ts +2 -2
- package/activities/server/RunPython.d.ts +4 -4
- package/activities/ui/DialogContent.d.ts +6 -6
- package/activities/ui/DialogProvider.d.ts +5 -5
- package/activities/ui/DialogProvider.js +1 -1
- package/definition/ActivityInput.d.ts +6 -6
- package/definition/ProgramInspector.d.ts +118 -118
- package/definition/ProgramInspector.js +1 -1
- package/definition/Reference.d.ts +2 -2
- package/definition/Resource.d.ts +15 -15
- package/definition/Transition.d.ts +4 -4
- package/diagnostics/ConsoleDebugLogger.d.ts +2 -2
- package/diagnostics/ConsoleDebugLogger.js +1 -1
- package/execution/ActivityContext.d.ts +35 -35
- package/execution/ActivityContext.js +1 -1
- package/execution/ActivityContextProxy.d.ts +7 -7
- package/execution/ActivityContextProxy.js +1 -1
- package/execution/AmbientState.d.ts +29 -29
- package/execution/AmbientState.js +1 -1
- package/execution/AmbientStateProxy.d.ts +10 -10
- package/execution/AmbientStateProxy.js +1 -1
- package/execution/AsyncContext.d.ts +1 -1
- package/execution/AsyncContext.js +1 -1
- package/execution/Engine.d.ts +27 -28
- package/execution/Engine.js +1 -1
- package/execution/IDebugSession.d.ts +10 -10
- package/execution/MonikerFrame.d.ts +2 -2
- package/execution/MonikerFrame.js +1 -1
- package/execution/Proxy.d.ts +1 -1
- package/execution/Proxy.js +1 -1
- package/execution/StepContext.d.ts +1 -1
- package/execution/StepContext.js +1 -1
- package/execution/TransitionContext.d.ts +1 -1
- package/execution/TransitionContext.js +1 -1
- package/forms/ExclusiveTimer.d.ts +2 -2
- package/forms/ExclusiveTimer.js +1 -1
- package/forms/FormComponent.d.ts +7 -7
- package/forms/FormComponent.js +1 -1
- package/forms/FormDefinition.d.ts +50 -42
- package/forms/FormHost.d.ts +161 -146
- package/forms/FormHost.js +1 -1
- package/forms/FormPresenterHost.d.ts +42 -42
- package/forms/MutuallyExclusiveSectionGroup.d.ts +6 -6
- package/forms/MutuallyExclusiveSectionGroup.js +1 -1
- package/forms/NumberParser.d.ts +2 -2
- package/forms/branding/WorkflowColor.d.ts +5 -5
- package/forms/branding/WorkflowColor.js +1 -1
- package/forms/components/AutoComplete.js +1 -1
- package/forms/components/Button.js +1 -1
- package/forms/components/DateTimePicker.js +1 -1
- package/forms/components/Form.js +1 -1
- package/forms/components/FormLabelNumberField.d.ts +4 -4
- package/forms/components/GeometryPickerListItem.d.ts +4 -4
- package/forms/components/ItemPicker.js +1 -1
- package/forms/components/NumberRangeSlider.js +1 -1
- package/forms/components/NumberSlider.js +1 -1
- package/forms/components/Scanner.js +1 -1
- package/forms/components/SignatureDialog.d.ts +2 -2
- package/forms/components/SketchDialog.d.ts +5 -5
- package/forms/components/common.js +1 -1
- package/forms/dateUtilities.d.ts +2 -2
- package/forms/elements/types.d.ts +2 -2
- package/forms/index.d.ts +2 -2
- package/forms/numberFormatter.d.ts +8 -8
- package/forms/numberUtilities.d.ts +1 -1
- package/forms/utils.d.ts +6 -12
- package/libs/version.d.ts +1 -1
- package/libs/version.js +1 -1
- package/package.json +1 -1
- package/ui/UIService.d.ts +2 -2
- package/ui/UIService.js +1 -1
package/execution/Engine.js
CHANGED
|
@@ -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.
|
|
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,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""},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
|
-
/**
|
|
34
|
-
|
|
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.
|
|
1
|
+
class MonikerFrame{constructor(){this.cancellationToken={},this.index=-1,this.state={},this.cancellationResolve=()=>{}}}export default MonikerFrame;
|
package/execution/Proxy.d.ts
CHANGED
package/execution/Proxy.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
let guard=!0;export function clearGuard(){guard=!1}class 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;
|
package/execution/StepContext.js
CHANGED
|
@@ -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))}}
|
|
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))}
|
|
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
|
}
|
package/forms/ExclusiveTimer.js
CHANGED
|
@@ -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)}
|
|
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&¤t.reset(),current=this,callback=i,delay=setTimeout(invoke,e))}suspend(){current===this&&void 0===defer&&(defer=setTimeout(()=>this.reset()))}}
|
package/forms/FormComponent.d.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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 {
|
package/forms/FormComponent.js
CHANGED
|
@@ -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.
|
|
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
|
|
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
|
-
|
|
72
|
+
endDate: Date;
|
|
73
73
|
/**
|
|
74
|
-
* The
|
|
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
|
-
|
|
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
|
|
425
|
-
|
|
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
|
|
429
|
-
|
|
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
|
|
433
|
-
|
|
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. */
|