@vertigis/workflow 5.43.0 → 5.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Activator.d.ts +1 -1
- package/Hooks.d.ts +11 -2
- package/IActivityHandler.d.ts +2 -2
- package/ProgramInspectorFacility.d.ts +1 -1
- package/ProgramInspectorFacility.js +1 -1
- package/TemplateUtils.js +1 -1
- package/Validation.d.ts +32 -26
- package/Validation.js +1 -1
- package/activities/app/GetApplicationInfo.d.ts +2 -2
- package/activities/app/GetApplicationInfo.js +1 -1
- package/activities/app/GetUserInfo.d.ts +2 -2
- package/activities/app/GetUserInfo.js +1 -1
- package/activities/app/RunCommand.d.ts +2 -2
- package/activities/app/RunCommand.js +1 -1
- package/activities/app/RunOperation.d.ts +2 -2
- package/activities/app/RunOperation.js +1 -1
- package/activities/app/applicationData.d.ts +6 -0
- package/activities/arcgis/AddFeatureLayer.d.ts +2 -2
- package/activities/arcgis/AddFeatureLayer.js +1 -1
- package/activities/arcgis/AddFeatures.d.ts +2 -2
- package/activities/arcgis/AddGraphics.d.ts +1 -1
- package/activities/arcgis/BufferServiceTask.d.ts +1 -1
- package/activities/arcgis/CastGeometry.js +1 -1
- package/activities/arcgis/ClearGraphics.d.ts +1 -1
- package/activities/arcgis/ClipEngineTask.js +1 -1
- package/activities/arcgis/ClosestFacilityTask.d.ts +1 -1
- package/activities/arcgis/ConvertValueToArcGisFieldType.d.ts +2 -2
- package/activities/arcgis/CreateFeatureSet.d.ts +2 -2
- package/activities/arcgis/CreateFeatureSet.js +1 -1
- package/activities/arcgis/CreateGraphic.d.ts +3 -3
- package/activities/arcgis/CreateGraphic.js +1 -1
- package/activities/arcgis/CreatePoint.d.ts +2 -2
- package/activities/arcgis/CreatePoint.js +1 -1
- package/activities/arcgis/DeleteAttachments.js +1 -1
- package/activities/arcgis/DeleteFeatures.d.ts +2 -2
- package/activities/arcgis/ExtendedSpatialReferenceInfoEngineTask.d.ts +1 -1
- package/activities/arcgis/FeatureSetFromJson.d.ts +3 -3
- package/activities/arcgis/FeatureSetFromJson.js +1 -1
- package/activities/arcgis/GenerateWebmapForReport.d.ts +2 -2
- package/activities/arcgis/Geocode.d.ts +1 -1
- package/activities/arcgis/Geocode.js +1 -1
- package/activities/arcgis/GeometryFromJson.d.ts +3 -3
- package/activities/arcgis/GeometryFromJson.js +1 -1
- package/activities/arcgis/Geoprocessing.d.ts +1 -1
- package/activities/arcgis/GeoprocessingAsync.d.ts +1 -1
- package/activities/arcgis/GeoprocessingAsync.js +1 -1
- package/activities/arcgis/GetAttributeValue.d.ts +2 -2
- package/activities/arcgis/GetAttributeValue.js +1 -1
- package/activities/arcgis/GetCentroid.d.ts +2 -2
- package/activities/arcgis/GetCentroid.js +1 -1
- package/activities/arcgis/GetCodedValueDomain.js +1 -1
- package/activities/arcgis/GetCurrentPosition.js +1 -1
- package/activities/arcgis/GetFeatureGeometry.d.ts +2 -2
- package/activities/arcgis/GetFeatureGeometry.js +1 -1
- package/activities/arcgis/GetFeatureLayerInfo.d.ts +4 -2
- package/activities/arcgis/GetFeatureLayerInfo.js +1 -1
- package/activities/arcgis/GetFeatureSetExtent.d.ts +2 -2
- package/activities/arcgis/GetFeatureSetExtent.js +1 -1
- package/activities/arcgis/GetFeatureSetObjectIds.d.ts +2 -2
- package/activities/arcgis/GetFeatureSetObjectIds.js +1 -1
- package/activities/arcgis/GetFormElementItemsFromFeatures.js +1 -1
- package/activities/arcgis/GetGeometryExtent.d.ts +2 -2
- package/activities/arcgis/GetGeometryExtent.js +1 -1
- package/activities/arcgis/GetGraphics.d.ts +1 -1
- package/activities/arcgis/GetLayer.d.ts +1 -1
- package/activities/arcgis/GetLayerDefinitionExpression.d.ts +1 -1
- package/activities/arcgis/GetLayerProperty.d.ts +1 -1
- package/activities/arcgis/GetLayerVisibility.d.ts +1 -1
- package/activities/arcgis/GetMap.d.ts +1 -1
- package/activities/arcgis/GetMapScreenshot.d.ts +1 -1
- package/activities/arcgis/GetPortalUser.d.ts +4 -6
- package/activities/arcgis/GetPortalUser.js +1 -1
- package/activities/arcgis/GetTable.d.ts +1 -1
- package/activities/arcgis/GetViewExtent.d.ts +1 -1
- package/activities/arcgis/GetViewpoint.d.ts +1 -1
- package/activities/arcgis/MapProvider.d.ts +23 -2
- package/activities/arcgis/MapProvider.js +1 -1
- package/activities/arcgis/ProjectServiceTask.d.ts +2 -2
- package/activities/arcgis/QueryAttachmentInfos.js +1 -1
- package/activities/arcgis/QueryTask.d.ts +2 -2
- package/activities/arcgis/QueryTask.js +1 -1
- package/activities/arcgis/RelationServiceTask.js +1 -1
- package/activities/arcgis/RelationshipQueryTask.d.ts +1 -1
- package/activities/arcgis/RemoveFeatureSetFields.d.ts +3 -0
- package/activities/arcgis/RemoveGraphics.d.ts +1 -1
- package/activities/arcgis/RemoveLayer.d.ts +1 -1
- package/activities/arcgis/RendererFromJson.d.ts +3 -3
- package/activities/arcgis/RendererFromJson.js +1 -1
- package/activities/arcgis/ResetLayerDefinitionExpression.d.ts +24 -0
- package/activities/arcgis/ResetLayerDefinitionExpression.js +1 -0
- package/activities/arcgis/ReverseGeocode.d.ts +2 -2
- package/activities/arcgis/ReverseGeocode.js +1 -1
- package/activities/arcgis/RouteTask.d.ts +1 -1
- package/activities/arcgis/RunPrint.d.ts +3 -3
- package/activities/arcgis/RunReport.d.ts +3 -3
- package/activities/arcgis/RunWorkflow.d.ts +1 -1
- package/activities/arcgis/RunWorkflow.js +1 -1
- package/activities/arcgis/SendLayerToAttributeTable.d.ts +2 -2
- package/activities/arcgis/SendLayerToAttributeTable.js +1 -1
- package/activities/arcgis/ServiceAreaTask.d.ts +1 -1
- package/activities/arcgis/SetFeaturePopup.d.ts +1 -1
- package/activities/arcgis/SetImageryLayerOptions.d.ts +3 -3
- package/activities/arcgis/SetLayerDefinitionExpression.d.ts +1 -1
- package/activities/arcgis/SetLayerPopup.d.ts +1 -1
- package/activities/arcgis/SetLayerProperty.d.ts +1 -1
- package/activities/arcgis/SetLayerVisibility.d.ts +1 -1
- package/activities/arcgis/SetMap.d.ts +2 -2
- package/activities/arcgis/SetMap.js +1 -1
- package/activities/arcgis/SetViewExtent.d.ts +1 -1
- package/activities/arcgis/SetViewpoint.d.ts +1 -1
- package/activities/arcgis/ShowFeaturePopup.d.ts +1 -1
- package/activities/arcgis/ShowResults.d.ts +4 -3
- package/activities/arcgis/ShowResults.js +1 -1
- package/activities/arcgis/SortFeatureSet.d.ts +2 -2
- package/activities/arcgis/SortFeatureSet.js +1 -1
- package/activities/arcgis/SymbolFromJson.d.ts +3 -3
- package/activities/arcgis/SymbolFromJson.js +1 -1
- package/activities/arcgis/TypeChecking.d.ts +0 -7
- package/activities/arcgis/TypeChecking.js +1 -1
- package/activities/arcgis/UpdateFeatures.d.ts +2 -2
- package/activities/arcgis/libs/arcGisRestApi.d.ts +20 -1
- package/activities/arcgis/shared.d.ts +3 -3
- package/activities/arcgis/shared.js +1 -1
- package/activities/arcgis/tools.d.ts +2 -2
- package/activities/arcgis/tools.js +1 -1
- package/activities/browser/GetBrowserInfo.d.ts +2 -2
- package/activities/browser/GetBrowserInfo.js +1 -1
- package/activities/constants.js +1 -1
- package/activities/core/Annotation.d.ts +2 -2
- package/activities/core/Annotation.js +1 -1
- package/activities/core/ChannelProvider.d.ts +4 -4
- package/activities/core/ChannelProvider.js +1 -1
- package/activities/core/Container.d.ts +1 -1
- package/activities/core/ConvertToJson.d.ts +1 -1
- package/activities/core/{RunSubworkflow.d.ts → ExecuteFunction.d.ts} +4 -4
- package/activities/core/ExecuteFunction.js +1 -0
- package/activities/core/Exit.d.ts +1 -1
- package/activities/core/FormatDate.d.ts +39 -1
- package/activities/core/FormatDate.js +1 -1
- package/activities/core/{Subworkflow.d.ts → Function.d.ts} +6 -6
- package/activities/core/Function.js +1 -0
- package/activities/core/GetWorkflowInputs.d.ts +2 -2
- package/activities/core/ParseUrl.js +1 -1
- package/activities/core/Placeholder.d.ts +2 -2
- package/activities/core/Placeholder.js +1 -1
- package/activities/core/SetProperty.d.ts +1 -1
- package/activities/core/TextReplace.d.ts +1 -0
- package/activities/core/TextReplace.js +1 -1
- package/activities/core/TryCatch.d.ts +1 -1
- package/activities/core/WebRequest.d.ts +1 -1
- package/activities/core/converters.d.ts +1 -1
- package/activities/essentials/GetEssentialsSite.d.ts +1 -1
- package/activities/essentials/RunEssentialsWorkflow.d.ts +1 -1
- package/activities/essentials/RunEssentialsWorkflow.js +1 -1
- package/activities/forms/AddFormElement.d.ts +4 -2
- package/activities/forms/AddFormElement.js +1 -1
- package/activities/forms/DisplayForm.d.ts +2 -2
- package/activities/forms/FormActor.d.ts +56 -0
- package/activities/forms/FormActor.js +1 -0
- package/activities/forms/FormRenderer.d.ts +6 -42
- package/activities/forms/FormRenderer.js +1 -1
- package/activities/forms/GetFormElementItemsFromCollection.d.ts +2 -2
- package/activities/forms/GetFormElementItemsFromCollection.js +1 -1
- package/activities/forms/GetFormElementProperty.d.ts +2 -2
- package/activities/forms/GetFormElementProperty.js +1 -1
- package/activities/forms/GetFormElementValue.d.ts +2 -2
- package/activities/forms/GetFormElementValue.js +1 -1
- package/activities/forms/SetCurrentFormElementItem.js +1 -1
- package/activities/forms/SetFormElementEvent.d.ts +1 -1
- package/activities/forms/SetFormElementEvent.js +1 -1
- package/activities/index.js +1 -1
- package/activities/math/Random.d.ts +2 -2
- package/activities/math/Random.js +1 -1
- package/activities/ui/Alert.d.ts +1 -1
- package/activities/ui/Confirm.d.ts +1 -1
- package/activities/ui/Prompt.d.ts +1 -1
- package/activities/wab/OpenWidget.d.ts +2 -2
- package/activities/wab/OpenWidget.js +1 -1
- package/activities/wab/PublishWidgetData.d.ts +2 -2
- package/activities/wab/PublishWidgetData.js +1 -1
- package/definition/ActivityInput.d.ts +1 -1
- package/definition/Program.d.ts +11 -6
- package/definition/ProgramInspector.d.ts +9 -2
- package/definition/ProgramInspector.js +1 -1
- package/execution/ActivityContext.js +1 -1
- package/execution/AmbientState.d.ts +5 -5
- package/execution/AmbientState.js +1 -1
- package/execution/AmbientStateProxy.d.ts +4 -4
- package/execution/Engine.d.ts +6 -9
- package/execution/Engine.js +1 -1
- package/execution/ModuleLoader.d.ts +1 -1
- package/execution/ProgramRunner.js +1 -1
- package/execution/util.js +1 -1
- package/forms/FormComponent.d.ts +1 -1
- package/forms/FormDefinition.d.ts +6 -21
- package/forms/FormDefinition.js +1 -1
- package/forms/FormHost.d.ts +19 -7
- package/forms/FormHost.js +1 -1
- package/forms/FormPresenterHost.d.ts +18 -6
- package/forms/components/AutoComplete.js +1 -1
- package/forms/components/ButtonBar.js +1 -1
- package/forms/components/CheckBox.js +1 -1
- package/forms/components/CheckGroup.js +1 -1
- package/forms/components/DateRangePicker.js +1 -1
- package/forms/components/DateTimePicker.js +1 -1
- package/forms/components/DateTimeTextField.js +1 -1
- package/forms/components/Form.js +1 -1
- package/forms/components/FormElement.js +1 -1
- package/forms/components/GeometryPicker.js +1 -1
- package/forms/components/ItemPicker.js +1 -1
- package/forms/components/Number.js +1 -1
- package/forms/components/NumberRangeSlider.js +1 -1
- package/forms/components/NumberSlider.js +1 -1
- package/forms/components/RadioGroup.js +1 -1
- package/forms/components/Scanner.js +1 -1
- package/forms/components/Section.js +1 -1
- package/forms/components/TextBox.js +1 -1
- package/forms/components/TimePicker.js +1 -1
- package/forms/customNumberFormat.js +1 -1
- package/forms/dateUtilities.d.ts +15 -3
- package/forms/dateUtilities.js +1 -1
- package/forms/index.d.ts +2 -4
- package/forms/numberFormatter.d.ts +0 -13
- package/forms/numberFormatter.js +1 -1
- package/forms/numberUtilities.js +1 -1
- package/forms/presenter.d.ts +3 -3
- package/forms/textUtilities.js +1 -1
- package/forms/utils.d.ts +1 -1
- package/forms/utils.js +1 -1
- package/libs/version.d.ts +1 -1
- package/libs/version.js +1 -1
- package/package.json +10 -9
- package/activities/core/RunSubworkflow.js +0 -1
- package/activities/core/Subworkflow.js +0 -1
package/Activator.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import Bluebird from "bluebird";
|
|
|
4
4
|
*/
|
|
5
5
|
interface IFacilityFactory {
|
|
6
6
|
/** Activates an instance. */
|
|
7
|
-
(type: string): PromiseLike<
|
|
7
|
+
(type: string): PromiseLike<object> | object | undefined;
|
|
8
8
|
}
|
|
9
9
|
/** Implemented by facilities to uniquely identify that facility. */
|
|
10
10
|
export interface IFacility {
|
package/Hooks.d.ts
CHANGED
|
@@ -12,12 +12,21 @@ interface IActivityHandlerConstructorWithTwoFacilities<T1, T2> {
|
|
|
12
12
|
}
|
|
13
13
|
/** Do not reference. */
|
|
14
14
|
interface IActivityHandlerWithFacility<T> {
|
|
15
|
-
execute
|
|
15
|
+
execute: {
|
|
16
|
+
(inputs: any, context: IActivityContext, facility: T, ...args: any[]): Promise<object> | object;
|
|
17
|
+
[basisPropertyName]?: IFacility;
|
|
18
|
+
};
|
|
16
19
|
}
|
|
17
20
|
/** Do not reference. */
|
|
18
21
|
interface IActivityHandlerWithTwoFacilities<T1, T2> {
|
|
19
|
-
execute
|
|
22
|
+
execute: {
|
|
23
|
+
(inputs: any, context: IActivityContext, facility1: T1, facility2: T2, ...args: any[]): Promise<object>;
|
|
24
|
+
[basisPropertyName]?: IFacility;
|
|
25
|
+
[basisTwoPropertyName]?: IFacility;
|
|
26
|
+
};
|
|
20
27
|
}
|
|
28
|
+
declare const basisPropertyName = "AB6BF11D-6ED6-45F2-8FCB-B9BECC39A905:Basis";
|
|
29
|
+
declare const basisTwoPropertyName = "AB6BF11D-6ED6-45F2-8FCB-B9BECC39A905:BasisTwo";
|
|
21
30
|
/**
|
|
22
31
|
* Decorates activity handlers which require a facility.
|
|
23
32
|
* @public
|
package/IActivityHandler.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type Bluebird from "bluebird";
|
|
|
7
7
|
*/
|
|
8
8
|
export interface IActivityHandler {
|
|
9
9
|
/** Executes the logic for an activity. */
|
|
10
|
-
execute(inputs:
|
|
10
|
+
execute(inputs: object, context: IActivityContext, ...args: any[]): PromiseLike<object> | object;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Describes ambient-level state.
|
|
@@ -17,7 +17,7 @@ export interface IAmbientState {
|
|
|
17
17
|
/** Indicates the ActivityContexts with group name monikers that are in scope. */
|
|
18
18
|
activityContexts: Record<string, any>;
|
|
19
19
|
/** Indicates the completion object. */
|
|
20
|
-
completion: Bluebird<
|
|
20
|
+
completion: Bluebird<object>;
|
|
21
21
|
/** Indicates the environment for expressions evaluation. */
|
|
22
22
|
environment: Record<string, any>;
|
|
23
23
|
/** Indicates the resources for expression evaluation. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ProgramInspector } from "./definition/ProgramInspector";
|
|
2
2
|
interface ResolveArgs {
|
|
3
3
|
id?: string;
|
|
4
|
-
program?: string |
|
|
4
|
+
program?: string | object;
|
|
5
5
|
url?: string;
|
|
6
6
|
}
|
|
7
7
|
/** @product This is intended for internal use only within VertiGIS Studio products. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import esriRequest from"@arcgis/core/request";import Bluebird from"bluebird";import{Dictionary}from"./Collections.js";import{ProgramInspector}from"./definition/ProgramInspector.js";class ProgramInspectorFacility{constructor(){this._cache=new Dictionary}resolveInspector(o,n=!0,i){return Bluebird.attempt(()=>{if(!o)return this.downloadAndResolveInspector(void 0,i);var r="string"==typeof o?o:o.program||o.url;if(n){const t="string"==typeof o?o:o.id||o.url;if(void 0!==t&&null!==t){var e=this._cache.find(t);return void 0!==e?e:(this._cache.assign(t,this.downloadAndResolveInspector(r,i).catch(r=>(this._cache.remove(t),Bluebird.reject(r)))),this._cache.find(t))}}return this.downloadAndResolveInspector(r,i)})}downloadAndResolveInspector(r,e){if(r instanceof ProgramInspector)return Bluebird.resolve(r);if("object"==typeof r)return this.createInspector(r);const t=e||this.loadWorkflow;return t(r).then(this.createInspector).catch(r=>Bluebird.reject(r))}loadWorkflow(r){var e=r.match(/^(.*?)\/home\/item\.html\?id=(.*?)(
|
|
1
|
+
import esriRequest from"@arcgis/core/request";import Bluebird from"bluebird";import{Dictionary}from"./Collections.js";import{ProgramInspector}from"./definition/ProgramInspector.js";class ProgramInspectorFacility{constructor(){this._cache=new Dictionary}resolveInspector(o,n=!0,i){return Bluebird.attempt(()=>{if(!o)return this.downloadAndResolveInspector(void 0,i);var r="string"==typeof o?o:o.program||o.url;if(n){const t="string"==typeof o?o:o.id||o.url;if(void 0!==t&&null!==t){var e=this._cache.find(t);return void 0!==e?e:(this._cache.assign(t,this.downloadAndResolveInspector(r,i).catch(r=>(this._cache.remove(t),Bluebird.reject(r)))),this._cache.find(t))}}return this.downloadAndResolveInspector(r,i)})}downloadAndResolveInspector(r,e){if(r instanceof ProgramInspector)return Bluebird.resolve(r);if("object"==typeof r)return this.createInspector(r);const t=e||this.loadWorkflow;return t(r).then(this.createInspector).catch(r=>Bluebird.reject(r))}loadWorkflow(r){var e=r.match(/^(.*?)\/home\/item\.html\?id=(.*?)(#.*)?$/);return null!=e&&(r=`${e[1]}/sharing/rest/content/items/${e[2]}/data?f=json`),Bluebird.resolve(esriRequest(r)).then(r=>Bluebird.resolve(r.data))}createInspector(e){return Bluebird.attempt(function(){if(e instanceof ProgramInspector)return e;const r=new ProgramInspector;return r.import(e),r})}}export{ProgramInspectorFacility};
|
package/TemplateUtils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function findTokenInstances(n){const t=[];if(!n)return t;const e=/{\s*([
|
|
1
|
+
function findTokenInstances(n){const t=[];if(!n)return t;const e=/{\s*([^{}]*[^\s{}])\s*}/gm;let r=e.exec(n);for(;r;){var o=r[1],s=e.lastIndex,a=s-r[0].length;t.push({token:o,start:a,end:s}),r=e.exec(n)}return t}function getTokenValueString(n,t){return void 0===t?`{${n}}`:null===t?"":String(t)}function replacePlaceholders(n,t,e){let r="",o=0;for(const a of t){var s=a.token;if(o>a.start){console.error("Invalid token data. Data must be supplied in order",t),r=n;break}o<a.start&&(r+=n.substring(o,a.start),o=a.start),r+=e[s],o=a.end}return r+=n.substring(o),{markdown:r}}function valueOrEmptyString(n){return null==n?"":n}export{findTokenInstances,getTokenValueString,replacePlaceholders,valueOrEmptyString};
|
package/Validation.d.ts
CHANGED
|
@@ -1,28 +1,34 @@
|
|
|
1
|
+
type TNever = {
|
|
2
|
+
/**
|
|
3
|
+
* This property exists to stop TNever also including other types.
|
|
4
|
+
* At time of writing, it seems to affect all that we use: `T[]`, `boolean`, `string` and `number`.
|
|
5
|
+
*/
|
|
6
|
+
neverType: string;
|
|
7
|
+
};
|
|
1
8
|
/** An object used to facilitate activity input validation. */
|
|
2
9
|
export declare namespace validation {
|
|
3
|
-
|
|
4
|
-
export const never: TNever;
|
|
10
|
+
const never: TNever;
|
|
5
11
|
/**
|
|
6
12
|
* Coerces an array out of a value.
|
|
7
13
|
* @param inputName The name of the input being checked.
|
|
8
14
|
* @param value The value of the input.
|
|
9
15
|
*/
|
|
10
|
-
|
|
16
|
+
function array<T>(inputName: string, value: T | T[] | undefined | null): T[] | undefined;
|
|
11
17
|
/**
|
|
12
18
|
* Coerces an array out of a value.
|
|
13
19
|
* @param inputName The name of the input being checked.
|
|
14
20
|
* @param value The value of the input.
|
|
15
21
|
* @param defaultValue The value to use if `value` is `undefined` or `null`. When this is `validation.never` the function will throw an `ActivityInputError` instead.
|
|
16
22
|
*/
|
|
17
|
-
|
|
23
|
+
function array<T>(inputName: string, value: T | T[] | undefined | null, defaultValue: undefined): T[] | undefined;
|
|
18
24
|
/**
|
|
19
25
|
* Coerces an array out of a value.
|
|
20
26
|
* @param inputName The name of the input being checked.
|
|
21
27
|
* @param value The value of the input.
|
|
22
28
|
* @param defaultValue The value to use if `value` is `undefined` or `null`. When this is `validation.never` the function will throw an `ActivityInputError` instead.
|
|
23
29
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
function array<T>(inputName: string, value: T | T[] | undefined | null, defaultValue: T | T[] | TNever): T[];
|
|
31
|
+
function isBoolean(value: boolean | TNever): value is boolean;
|
|
26
32
|
/**
|
|
27
33
|
* Checks if the given value is a boolean. If not a default value is returned instead.
|
|
28
34
|
* When `defaultValue` is `validation.never`, an error is thrown instead.
|
|
@@ -31,7 +37,7 @@ export declare namespace validation {
|
|
|
31
37
|
* @param defaultValue The value to use if `value` is `undefined` or `null`. When this is `validation.never` the function will throw an `ActivityInputError` instead.
|
|
32
38
|
* @returns `value` if it is a boolean, `defaultValue` if it is a boolean. Otherwise an ActivityInputError is thrown.
|
|
33
39
|
*/
|
|
34
|
-
|
|
40
|
+
function boolean(inputName: string, value: any): boolean | undefined;
|
|
35
41
|
/**
|
|
36
42
|
* Checks if the given value is a boolean. If not a default value is returned instead.
|
|
37
43
|
* When `defaultValue` is `validation.never`, an error is thrown instead.
|
|
@@ -40,7 +46,7 @@ export declare namespace validation {
|
|
|
40
46
|
* @param defaultValue The value to use if `value` is `undefined` or `null`. When this is `validation.never` the function will throw an `ActivityInputError` instead.
|
|
41
47
|
* @returns `value` if it is a boolean, `defaultValue` if it is a boolean. Otherwise an ActivityInputError is thrown.
|
|
42
48
|
*/
|
|
43
|
-
|
|
49
|
+
function boolean(inputName: string, value: any, defaultValue: undefined): boolean | undefined;
|
|
44
50
|
/**
|
|
45
51
|
* Checks if the given value is a boolean. If not a default value is returned instead.
|
|
46
52
|
* When `defaultValue` is `validation.never`, an error is thrown instead.
|
|
@@ -49,7 +55,7 @@ export declare namespace validation {
|
|
|
49
55
|
* @param defaultValue The value to use if `value` is `undefined` or `null`. When this is `validation.never` the function will throw an `ActivityInputError` instead.
|
|
50
56
|
* @returns `value` if it is a boolean, `defaultValue` if it is a boolean. Otherwise an ActivityInputError is thrown.
|
|
51
57
|
*/
|
|
52
|
-
|
|
58
|
+
function boolean(inputName: string, value: any, defaultValue: boolean | TNever): boolean;
|
|
53
59
|
/**
|
|
54
60
|
* Checks if the given value is defined and throws an error if not.
|
|
55
61
|
* @param inputName The name of the input being checked.
|
|
@@ -57,7 +63,7 @@ export declare namespace validation {
|
|
|
57
63
|
* @returns The supplied value, if it is defined.
|
|
58
64
|
* @throws An `ActivityInputError` if `value` is `undefined` or `null`.
|
|
59
65
|
*/
|
|
60
|
-
|
|
66
|
+
function exists<T>(inputName: string, value: T | undefined): T;
|
|
61
67
|
/**
|
|
62
68
|
* Checks if the given value is defined and throws an error if not.
|
|
63
69
|
* @param inputName The name of the input being checked.
|
|
@@ -66,10 +72,10 @@ export declare namespace validation {
|
|
|
66
72
|
* @returns The supplied value, if it is defined. Otherwise, `defaultValue` if it is not `validation.never`.
|
|
67
73
|
* @throws An `ActivityInputError` if `value` is `undefined` or `null` and `defaultValue` is `validation.never`.
|
|
68
74
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
75
|
+
function exists<T>(inputName: string, value: T | undefined, defaultValue: T | TNever): T;
|
|
76
|
+
function id(inputName: string, value: any): string | number | undefined;
|
|
77
|
+
function id(inputName: string, value: any, defaultValue: undefined): string | number | undefined;
|
|
78
|
+
function id(inputName: string, value: any, defaultValue: string | number | TNever): string | number;
|
|
73
79
|
/**
|
|
74
80
|
* Checks if the given value is a number or a type that can be converted into one.
|
|
75
81
|
* If so, the numeric value is returned.
|
|
@@ -77,7 +83,7 @@ export declare namespace validation {
|
|
|
77
83
|
* @param inputName The name of the input being checked.
|
|
78
84
|
* @param value The value of the input.
|
|
79
85
|
*/
|
|
80
|
-
|
|
86
|
+
function number(inputName: string, value: number): number;
|
|
81
87
|
/**
|
|
82
88
|
* Checks if the given value is a number or a type that can be converted into one.
|
|
83
89
|
* If so, the numeric value is returned.
|
|
@@ -85,7 +91,7 @@ export declare namespace validation {
|
|
|
85
91
|
* @param inputName The name of the input being checked.
|
|
86
92
|
* @param value The value of the input.
|
|
87
93
|
*/
|
|
88
|
-
|
|
94
|
+
function number(inputName: string, value: number | undefined): number | undefined;
|
|
89
95
|
/**
|
|
90
96
|
* Checks if the given value is a number or a type that can be converted into one.
|
|
91
97
|
* If so, the numeric value is returned.
|
|
@@ -93,7 +99,7 @@ export declare namespace validation {
|
|
|
93
99
|
* @param inputName The name of the input being checked.
|
|
94
100
|
* @param value The value of the input.
|
|
95
101
|
*/
|
|
96
|
-
|
|
102
|
+
function number(inputName: string, value: any): number | undefined;
|
|
97
103
|
/**
|
|
98
104
|
* Checks if the given value is a number or a type that can be converted into one.
|
|
99
105
|
* If so, the numeric value is returned.
|
|
@@ -102,7 +108,7 @@ export declare namespace validation {
|
|
|
102
108
|
* @param value The value of the input.
|
|
103
109
|
* @param defaultValue A value to return if `value` could not be converted to a number.
|
|
104
110
|
*/
|
|
105
|
-
|
|
111
|
+
function number(inputName: string, value: any, defaultValue: undefined): number | undefined;
|
|
106
112
|
/**
|
|
107
113
|
* Checks if the given value is a number or a type that can be converted into one.
|
|
108
114
|
* If so, the numeric value is returned.
|
|
@@ -111,20 +117,20 @@ export declare namespace validation {
|
|
|
111
117
|
* @param value The value of the input.
|
|
112
118
|
* @param defaultValue A value to return if `value` could not be converted to a number. If `validation.never`, an `ActivityInputError` is thrown instead.
|
|
113
119
|
*/
|
|
114
|
-
|
|
120
|
+
function number(inputName: string, value: any, defaultValue: number | TNever): number;
|
|
115
121
|
/**
|
|
116
122
|
* Checks if the given value is a string.
|
|
117
123
|
* @param inputName The name of the input being checked.
|
|
118
124
|
* @param value The value of the input.
|
|
119
125
|
*/
|
|
120
|
-
|
|
126
|
+
function string(inputName: string, value: string): string;
|
|
121
127
|
/**
|
|
122
128
|
* Checks if the given value is a string.
|
|
123
129
|
* If so, the value is returned. If not, undefined is returned.
|
|
124
130
|
* @param inputName The name of the input being checked.
|
|
125
131
|
* @param value The value of the input.
|
|
126
132
|
*/
|
|
127
|
-
|
|
133
|
+
function string(inputName: string, value: any): string | undefined;
|
|
128
134
|
/**
|
|
129
135
|
* Checks if the given value is a string.
|
|
130
136
|
* If so, the value is returned. If not, the default value is returned.
|
|
@@ -132,7 +138,7 @@ export declare namespace validation {
|
|
|
132
138
|
* @param value The value of the input.
|
|
133
139
|
* @param defaultValue The value to return if `value` is not a string.
|
|
134
140
|
*/
|
|
135
|
-
|
|
141
|
+
function string(inputName: string, value: any, defaultValue: undefined): string | undefined;
|
|
136
142
|
/**
|
|
137
143
|
* Checks if the given value is a string.
|
|
138
144
|
* If so, the value is returned. If not, the default value is returned
|
|
@@ -141,11 +147,11 @@ export declare namespace validation {
|
|
|
141
147
|
* @param value The value of the input.
|
|
142
148
|
* @param defaultValue The value to return if `value` is not a string.
|
|
143
149
|
*/
|
|
144
|
-
|
|
150
|
+
function string(inputName: string, value: any, defaultValue: string | TNever): string;
|
|
145
151
|
/** Checks if an input object contains a url or an esri layer with a url. */
|
|
146
|
-
|
|
152
|
+
function urlOrLayer(inputs: {
|
|
147
153
|
url?: string;
|
|
148
|
-
layer?: __esri.Layer;
|
|
154
|
+
layer?: __esri.Layer | __esri.SubtypeSublayer;
|
|
149
155
|
}): string;
|
|
150
|
-
export {};
|
|
151
156
|
}
|
|
157
|
+
export {};
|
package/Validation.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ActivityInputError}from"./Errors.js";var validation;!function(
|
|
1
|
+
import SubtypeSublayer from"@arcgis/core/layers/support/SubtypeSublayer";import{ActivityInputError}from"./Errors.js";function isNever(r){return r===validation.never}var validation;!function(r){function n(r){return"boolean"==typeof r}r.never={neverType:"TNever"},r.array=function(r,t,e){if(null!=t)return t instanceof Array?t:[t];if(isNever(e))throw new ActivityInputError(r,"array");return 2<arguments.length?e:void 0},r.isBoolean=n,r.boolean=function(r,t,e){if(null==t){if(isNever(e))throw new ActivityInputError(r,"boolean");return 2<arguments.length?e:void 0}if(n(t))return t;if(2<arguments.length){if(isNever(e))throw new ActivityInputError(r,"boolean");return e}throw new ActivityInputError(r,"boolean")},r.exists=function(r,t,e){if(null!=t)return t;if(2<arguments.length&&!isNever(e))return e;throw new ActivityInputError(r,"exists")},r.id=function(r,t,e){if(null==t){if(isNever(e))throw new ActivityInputError(r,"id");return 2<arguments.length?e:void 0}if("string"==typeof t)return t;if("number"==typeof t&&0*t==0)return t;if(2<arguments.length){if(isNever(e))throw new ActivityInputError(r,"id");return e}throw new ActivityInputError(r,"id")},r.number=function(r,t,e){if(null==t){if(isNever(e))throw new ActivityInputError(r,"number");return 2<arguments.length?e:void 0}var n=t.valueOf();if("number"==typeof n)return n;if("boolean"==typeof n)return n?1:0;if("string"==typeof n){n=parseFloat(t);if(!isNaN(n))return n}if(2<arguments.length){if(isNever(e))throw new ActivityInputError(r,"number");return e}throw new ActivityInputError(r,"number")},r.string=function(r,t,e){if(null==t){if(isNever(e))throw new ActivityInputError(r,"string");return 2<arguments.length?e:void 0}if("string"==typeof t)return t;if(2<arguments.length){if(isNever(e))throw new ActivityInputError(r,"string");return e}throw new ActivityInputError(r,"string")},r.urlOrLayer=function(e){if(null!=e){let r=e.url,t=e.layer;if(!r&&t?.url&&(t instanceof SubtypeSublayer&&(t=t.parent),r=void 0!==t.layerId&&null!==t.layerId?`${t.url}/${t.layerId}`:t.url),r)return r}throw new ActivityInputError("url or layer","url or layer input is required. layer must have a valid url property.")}}(validation=validation||{});export{validation};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IActivityHandler } from "../../IActivityHandler";
|
|
2
2
|
/**
|
|
3
3
|
* Defines outputs from the GetApplicationInfo activity.
|
|
4
4
|
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
@@ -11,5 +11,5 @@ export interface GetApplicationInfoOutputs {
|
|
|
11
11
|
export declare class GetApplicationInfo implements IActivityHandler {
|
|
12
12
|
static readonly action = "gcx:wf:app::GetApplicationInfo";
|
|
13
13
|
static readonly suite = "gcx:wf:builtin";
|
|
14
|
-
execute(
|
|
14
|
+
execute(): GetApplicationInfoOutputs;
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
class GetApplicationInfo{execute(
|
|
1
|
+
class GetApplicationInfo{execute(){return{name:"Unknown",version:void 0,info:{}}}}GetApplicationInfo.action="gcx:wf:app::GetApplicationInfo",GetApplicationInfo.suite="gcx:wf:builtin";export{GetApplicationInfo};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IActivityHandler
|
|
1
|
+
import type { IActivityHandler } from "../../IActivityHandler";
|
|
2
2
|
/**
|
|
3
3
|
* Defines outputs from the GetUserInfo activity.
|
|
4
4
|
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
@@ -11,5 +11,5 @@ export interface GetUserInfoOutputs {
|
|
|
11
11
|
export declare class GetUserInfo implements IActivityHandler {
|
|
12
12
|
static readonly action = "gcx:wf:app::GetUserInfo";
|
|
13
13
|
static readonly suite = "gcx:wf:builtin";
|
|
14
|
-
execute(
|
|
14
|
+
execute(): GetUserInfoOutputs;
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ActivityNotImplementedError}from"../../Errors.js";class GetUserInfo{execute(
|
|
1
|
+
import{ActivityNotImplementedError}from"../../Errors.js";class GetUserInfo{execute(){throw new ActivityNotImplementedError(GetUserInfo.action)}}GetUserInfo.action="gcx:wf:app::GetUserInfo",GetUserInfo.suite="gcx:wf:builtin";export{GetUserInfo};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IActivityHandler,
|
|
1
|
+
import type { IActivityHandler, EmptyOutputs } from "../../IActivityHandler";
|
|
2
2
|
/**
|
|
3
3
|
* Inputs for the RunCommand activity.
|
|
4
4
|
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
@@ -13,5 +13,5 @@ export interface RunCommandInputs {
|
|
|
13
13
|
export declare class RunCommand implements IActivityHandler {
|
|
14
14
|
static readonly action = "gcx:wf:app::RunCommand";
|
|
15
15
|
static readonly suite = "gcx:wf:builtin";
|
|
16
|
-
execute(inputs: RunCommandInputs
|
|
16
|
+
execute(inputs: RunCommandInputs): EmptyOutputs;
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ActivityNotImplementedError}from"../../Errors.js";class RunCommand{execute(m
|
|
1
|
+
import{ActivityNotImplementedError}from"../../Errors.js";class RunCommand{execute(m){throw new ActivityNotImplementedError(RunCommand.action)}}RunCommand.action="gcx:wf:app::RunCommand",RunCommand.suite="gcx:wf:builtin";export{RunCommand};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IActivityHandler
|
|
1
|
+
import type { IActivityHandler } from "../../IActivityHandler";
|
|
2
2
|
/**
|
|
3
3
|
* Inputs for the RunOperation activity.
|
|
4
4
|
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
@@ -21,5 +21,5 @@ export interface RunOperationOutputs {
|
|
|
21
21
|
export declare class RunOperation implements IActivityHandler {
|
|
22
22
|
static readonly action = "gcx:wf:app::RunOperation";
|
|
23
23
|
static readonly suite = "gcx:wf:builtin";
|
|
24
|
-
execute(inputs: RunOperationInputs
|
|
24
|
+
execute(inputs: RunOperationInputs): RunOperationOutputs;
|
|
25
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ActivityNotImplementedError}from"../../Errors.js";class RunOperation{execute(t
|
|
1
|
+
import{ActivityNotImplementedError}from"../../Errors.js";class RunOperation{execute(t){throw new ActivityNotImplementedError(RunOperation.action)}}RunOperation.action="gcx:wf:app::RunOperation",RunOperation.suite="gcx:wf:builtin";export{RunOperation};
|
|
@@ -10,3 +10,9 @@ export declare const ApplicationDataDocumentProperty = "__VSWF_ApplicationData__
|
|
|
10
10
|
* @returns The key for retrieving the item from Local Storage.
|
|
11
11
|
*/
|
|
12
12
|
export declare function getLocalStorageKey(dataKey: string, appID?: string): string;
|
|
13
|
+
export type DocumentWithApplicationData = Document & {
|
|
14
|
+
/**
|
|
15
|
+
* Data stored in memory for Get/Set/Remove Application Data.
|
|
16
|
+
*/
|
|
17
|
+
[ApplicationDataDocumentProperty]: Record<string, any>;
|
|
18
|
+
};
|
|
@@ -17,7 +17,7 @@ export interface AddFeatureLayerOutputs {
|
|
|
17
17
|
export declare class AddFeatureLayer implements IActivityHandler {
|
|
18
18
|
static readonly action = "gcx:wf:arcgis::AddFeatureLayer";
|
|
19
19
|
static readonly suite = "gcx:wf:builtin";
|
|
20
|
-
execute(inputs: AddFeatureLayerInputs, _context: IActivityContext,
|
|
20
|
+
execute(inputs: AddFeatureLayerInputs, _context: IActivityContext, MapProviderType: typeof MapProvider): Promise<AddFeatureLayerOutputs>;
|
|
21
21
|
/** Override within a host implementation for custom behaviour. */
|
|
22
|
-
protected addLayerToMap(
|
|
22
|
+
protected addLayerToMap(mapProvider: MapProvider, layer: __esri.FeatureLayer): void;
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate}from"tslib";import Collection from"@arcgis/core/core/Collection";import FeatureLayer from"@arcgis/core/layers/FeatureLayer";import{activate}from"../../Hooks.js";import{validation}from"../../Validation.js";import{MapProvider}from"./MapProvider.js";import{featuresToArray}from"./tools.js";let AddFeatureLayer=class{async execute(e,a,r){var
|
|
1
|
+
import{__decorate}from"tslib";import Collection from"@arcgis/core/core/Collection";import FeatureLayer from"@arcgis/core/layers/FeatureLayer";import{activate}from"../../Hooks.js";import{validation}from"../../Validation.js";import{MapProvider}from"./MapProvider.js";import{featuresToArray}from"./tools.js";let AddFeatureLayer=class{async execute(e,a,r){var i=featuresToArray(validation.exists("features",e.features)),t=validation.string("displayName",e.displayName,validation.never);const o=validation.array("fields",e.fields,validation.never),d=r.create();await d.load();let s;r=o.filter(e=>"oid"===e.type)[0];return r?.name&&(i=new Collection(i),s=new FeatureLayer({fields:o,objectIdField:r.name,title:t,source:i}),this.addLayerToMap(d,s)),{layer:s}}addLayerToMap(e,a){e.view.map.add(a),e.setInitialDefinitionExpression(a.id,void 0,a.definitionExpression)}};AddFeatureLayer.action="gcx:wf:arcgis::AddFeatureLayer",AddFeatureLayer.suite="gcx:wf:builtin",AddFeatureLayer=__decorate([activate(MapProvider)],AddFeatureLayer);export{AddFeatureLayer};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApplyEditResult,
|
|
1
|
+
import type { ApplyEditResult, ApplyEditsResponse } from "./libs/arcGisRestApi";
|
|
2
2
|
import type { IActivityHandler, IActivityContext } from "../../IActivityHandler";
|
|
3
3
|
/** Defines inputs for the AddFeatures activity. */
|
|
4
4
|
export interface AddFeaturesInputs {
|
|
@@ -23,5 +23,5 @@ export declare class AddFeatures implements IActivityHandler {
|
|
|
23
23
|
static readonly suite = "gcx:wf:builtin";
|
|
24
24
|
execute(inputs: AddFeaturesInputs, context: IActivityContext): Promise<AddFeaturesOutputs>;
|
|
25
25
|
/** Called after the apply edit operation completes. */
|
|
26
|
-
protected onApplyEditsComplete(
|
|
26
|
+
protected onApplyEditsComplete(results: ApplyEditsResponse): void;
|
|
27
27
|
}
|
|
@@ -23,5 +23,5 @@ export interface AddGraphicsOutputs {
|
|
|
23
23
|
export declare class AddGraphics implements IActivityHandler {
|
|
24
24
|
static readonly action = "gcx:wf:arcgis::AddGraphicsLayerFeatures";
|
|
25
25
|
static readonly suite = "gcx:wf:builtin";
|
|
26
|
-
execute(inputs: AddGraphicsInputs, _context: IActivityContext,
|
|
26
|
+
execute(inputs: AddGraphicsInputs, _context: IActivityContext, MapProviderType: typeof MapProvider): Promise<AddGraphicsOutputs>;
|
|
27
27
|
}
|
|
@@ -29,5 +29,5 @@ export interface BufferServiceTaskOutputs {
|
|
|
29
29
|
export declare class BufferServiceTask implements IActivityHandler {
|
|
30
30
|
static readonly action = "gcx:wf:arcgis::BufferServiceTask";
|
|
31
31
|
static readonly suite = "gcx:wf:builtin";
|
|
32
|
-
execute(inputs: BufferServiceTaskInputs, context: IActivityContext,
|
|
32
|
+
execute(inputs: BufferServiceTaskInputs, context: IActivityContext, MapProviderType: typeof MapProvider): Promise<BufferServiceTaskOutputs>;
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{validation}from"../../Validation.js";class CastGeometry{execute(e){var t=validation.exists("geometry",e.geometry);const a={};switch(t.type){case"point":a.point=t;break;case"
|
|
1
|
+
import{validation}from"../../Validation.js";class CastGeometry{execute(e){var t=validation.exists("geometry",e.geometry);const a={};switch(t.type){case"point":a.point=t;break;case"polygon":a.polygon=t;break;case"polyline":a.polyline=t;break;case"extent":a.extent=t;break;case"multipoint":a.multipoint=t;break;case"mesh":break;default:a.polygon=t}return a}}CastGeometry.action="gcx:wf:arcgis::CastGeometry",CastGeometry.suite="gcx:wf:builtin";export{CastGeometry};
|
|
@@ -8,5 +8,5 @@ export interface ClearGraphicsInputs {
|
|
|
8
8
|
export declare class ClearGraphics implements IActivityHandler {
|
|
9
9
|
static readonly action = "gcx:wf:arcgis::ClearGraphicsLayer";
|
|
10
10
|
static readonly suite = "gcx:wf:builtin";
|
|
11
|
-
execute(inputs: ClearGraphicsInputs, _context: IActivityContext,
|
|
11
|
+
execute(inputs: ClearGraphicsInputs, _context: IActivityContext, MapProviderType: typeof MapProvider): Promise<EmptyOutputs>;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{clip}from"@arcgis/core/geometry/geometryEngineAsync";import{validation}from"../../Validation.js";import{extentOf}from"./tools.js";class ClipEngineTask{async execute(e){var i=validation.exists("geometry",e.geometry);let t=validation.exists("extent",e.extent);return
|
|
1
|
+
import{clip}from"@arcgis/core/geometry/geometryEngineAsync";import{validation}from"../../Validation.js";import{extentOf}from"./tools.js";class ClipEngineTask{async execute(e){var i=validation.exists("geometry",e.geometry);let t=validation.exists("extent",e.extent);return"polygon"===t.type&&(t=extentOf([t])),{geometry:await clip(i,t)}}}ClipEngineTask.action="gcx:wf:arcgis::ClipEngineTask",ClipEngineTask.suite="gcx:wf:builtin";export{ClipEngineTask};
|
|
@@ -86,5 +86,5 @@ export interface ClosestFacilityTaskOutputs {
|
|
|
86
86
|
export declare class ClosestFacilityTask implements IActivityHandler {
|
|
87
87
|
static readonly action = "gcx:wf:arcgis::ClosestFacilityTask";
|
|
88
88
|
static readonly suite = "gcx:wf:builtin";
|
|
89
|
-
execute(inputs: ClosestFacilityTaskInputs, context: IActivityContext,
|
|
89
|
+
execute(inputs: ClosestFacilityTaskInputs, context: IActivityContext, MapProviderType: typeof MapProvider): Promise<ClosestFacilityTaskOutputs>;
|
|
90
90
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { IActivityHandler } from "../../IActivityHandler";
|
|
2
2
|
export interface ConvertValueToArcGisFieldTypeInputs {
|
|
3
|
-
value:
|
|
3
|
+
value: object;
|
|
4
4
|
type: "double" | "integer" | "long" | "oid" | "single" | "small-integer" | string;
|
|
5
5
|
}
|
|
6
6
|
export interface ConvertValueToArcGisFieldTypeOutputs {
|
|
7
|
-
result:
|
|
7
|
+
result: object;
|
|
8
8
|
}
|
|
9
9
|
export declare class ConvertValueToArcGisFieldType implements IActivityHandler {
|
|
10
10
|
static readonly action = "gcx:wf:arcgis::ConvertValueToArcGisFieldType";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IActivityHandler
|
|
1
|
+
import type { IActivityHandler } from "../../IActivityHandler";
|
|
2
2
|
/** Defines inputs for the Create Feature Set activity. */
|
|
3
3
|
export interface CreateFeatureSetInputs {
|
|
4
4
|
geometries?: __esri.Geometry | __esri.Geometry[];
|
|
@@ -13,5 +13,5 @@ export interface CreateFeatureSetOutputs {
|
|
|
13
13
|
export declare class CreateFeatureSet implements IActivityHandler {
|
|
14
14
|
static readonly action = "gcx:wf:arcgis::CreateFeatureSet";
|
|
15
15
|
static readonly suite = "gcx:wf:builtin";
|
|
16
|
-
execute(inputs: CreateFeatureSetInputs
|
|
16
|
+
execute(inputs: CreateFeatureSetInputs): Promise<CreateFeatureSetOutputs>;
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import Graphic from"@arcgis/core/Graphic";import FeatureSet from"@arcgis/core/rest/support/FeatureSet";import{validation}from"../../Validation.js";class CreateFeatureSet{async execute(e
|
|
1
|
+
import Graphic from"@arcgis/core/Graphic";import FeatureSet from"@arcgis/core/rest/support/FeatureSet";import{validation}from"../../Validation.js";class CreateFeatureSet{async execute(e){var t=validation.array("geometry",e.geometries,[]).map(e=>new Graphic({geometry:e})),r=validation.array("feature",e.features,[]),e=validation.array("fields",e.fields,[]);const a=new FeatureSet({features:[...t,...r],fields:e});for(const i of a.features)if(i?.geometry?.type){a.geometryType=i.geometry.type;break}return{featureSet:a}}}CreateFeatureSet.action="gcx:wf:arcgis::CreateFeatureSet",CreateFeatureSet.suite="gcx:wf:builtin";export{CreateFeatureSet};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IActivityHandler
|
|
1
|
+
import type { IActivityHandler } from "../../IActivityHandler";
|
|
2
2
|
/** Defines inputs for the Create Graphic activity. */
|
|
3
3
|
export interface CreateGraphicInputs {
|
|
4
|
-
attributes?:
|
|
4
|
+
attributes?: object;
|
|
5
5
|
geometry?: __esri.Geometry;
|
|
6
6
|
symbol?: __esri.Symbol;
|
|
7
7
|
}
|
|
@@ -13,5 +13,5 @@ export interface CreateGraphicOutputs {
|
|
|
13
13
|
export declare class CreateGraphic implements IActivityHandler {
|
|
14
14
|
static readonly action = "gcx:wf:arcgis::CreateGraphic";
|
|
15
15
|
static readonly suite = "gcx:wf:builtin";
|
|
16
|
-
execute(inputs: CreateGraphicInputs
|
|
16
|
+
execute(inputs: CreateGraphicInputs): CreateGraphicOutputs;
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import Graphic from"@arcgis/core/Graphic";class CreateGraphic{execute(e
|
|
1
|
+
import Graphic from"@arcgis/core/Graphic";class CreateGraphic{execute(e){return{feature:new Graphic({attributes:e.attributes,geometry:e.geometry,symbol:e.symbol})}}}CreateGraphic.action="gcx:wf:arcgis::CreateGraphic",CreateGraphic.suite="gcx:wf:builtin";export{CreateGraphic};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IActivityHandler
|
|
1
|
+
import type { IActivityHandler } from "../../IActivityHandler";
|
|
2
2
|
/** Defines inputs for the Create Point activity. */
|
|
3
3
|
export interface CreatePointInputs {
|
|
4
4
|
x: number;
|
|
@@ -13,5 +13,5 @@ export interface CreatePointOutputs {
|
|
|
13
13
|
export declare class CreatePoint implements IActivityHandler {
|
|
14
14
|
static readonly action = "gcx:wf:arcgis::CreatePoint";
|
|
15
15
|
static readonly suite = "gcx:wf:builtin";
|
|
16
|
-
execute(inputs: CreatePointInputs
|
|
16
|
+
execute(inputs: CreatePointInputs): CreatePointOutputs;
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import Point from"@arcgis/core/geometry/Point";import SpatialReference from"@arcgis/core/geometry/SpatialReference";class CreatePoint{execute(e
|
|
1
|
+
import Point from"@arcgis/core/geometry/Point";import SpatialReference from"@arcgis/core/geometry/SpatialReference";class CreatePoint{execute(e){let t="object"==typeof e.spatialReference?e.spatialReference:void 0;return"number"==typeof e.spatialReference?t=new SpatialReference({wkid:e.spatialReference}):"string"==typeof e.spatialReference&&(t=new SpatialReference({wkt:e.spatialReference})),{point:new Point({x:e.x,y:e.y,spatialReference:t})}}}CreatePoint.action="gcx:wf:arcgis::CreatePoint",CreatePoint.suite="gcx:wf:builtin";export{CreatePoint};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{GenericActivityError}from"../../Errors.js";import{validation}from"../../Validation.js";import{addToPath,post}from"./tools.js";class DeleteAttachments{async execute(t,e){var a=validation.urlOrLayer(t).trim(),i=validation.number("objectId",t.objectId,validation.never),n=validation.array("attachmentIds",t.attachmentIds,validation.never).join(","),r=validation.string("gdbVersion",t.gdbVersion),t=validation.number("timeout",t.timeout,void 0),i=addToPath(a,`${i}/deleteAttachments`);const o={attachmentIds:n};r&&(o.gdbVersion=r);e=(await post(i,o,t,e.cancellationToken.signal))
|
|
1
|
+
import{GenericActivityError}from"../../Errors.js";import{validation}from"../../Validation.js";import{addToPath,post}from"./tools.js";class DeleteAttachments{async execute(t,e){var a=validation.urlOrLayer(t).trim(),i=validation.number("objectId",t.objectId,validation.never),n=validation.array("attachmentIds",t.attachmentIds,validation.never).join(","),r=validation.string("gdbVersion",t.gdbVersion),t=validation.number("timeout",t.timeout,void 0),i=addToPath(a,`${i}/deleteAttachments`);const o={attachmentIds:n};r&&(o.gdbVersion=r);var e=(await post(i,o,t,e.cancellationToken.signal))["deleteAttachmentResults"];if(!e)throw new GenericActivityError('Error running the "Delete Attachments" activity. The response did not include the required "deleteAttachmentResults" property.');return{results:e}}}DeleteAttachments.action="gcx:wf:arcgis::DeleteAttachments",DeleteAttachments.suite="gcx:wf:builtin";export{DeleteAttachments};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApplyEditResult,
|
|
1
|
+
import type { ApplyEditResult, ApplyEditsResponse } from "./libs/arcGisRestApi";
|
|
2
2
|
import type { IActivityHandler, IActivityContext } from "../../IActivityHandler";
|
|
3
3
|
/** Defines inputs for the DeleteFeatures activity. */
|
|
4
4
|
export interface DeleteFeaturesInputs {
|
|
@@ -26,5 +26,5 @@ export declare class DeleteFeatures implements IActivityHandler {
|
|
|
26
26
|
static readonly suite = "gcx:wf:builtin";
|
|
27
27
|
execute(inputs: DeleteFeaturesInputs, context: IActivityContext): Promise<DeleteFeaturesOutputs>;
|
|
28
28
|
/** Called after the apply edit operation completes. */
|
|
29
|
-
protected onApplyEditsComplete(
|
|
29
|
+
protected onApplyEditsComplete(results: ApplyEditsResponse): void;
|
|
30
30
|
}
|
|
@@ -13,5 +13,5 @@ export interface ExtendedSpatialReferenceInfoEngineTaskOutputs {
|
|
|
13
13
|
export declare class ExtendedSpatialReferenceInfoEngineTask implements IActivityHandler {
|
|
14
14
|
static readonly action = "gcx:wf:arcgis::ExtendedSpatialReferenceInfoEngineTask";
|
|
15
15
|
static readonly suite = "gcx:wf:builtin";
|
|
16
|
-
execute(inputs: ExtendedSpatialReferenceInfoEngineTaskInputs, _context: IActivityContext,
|
|
16
|
+
execute(inputs: ExtendedSpatialReferenceInfoEngineTaskInputs, _context: IActivityContext, MapProviderType: typeof MapProvider): Promise<ExtendedSpatialReferenceInfoEngineTaskOutputs>;
|
|
17
17
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { IActivityHandler
|
|
1
|
+
import type { IActivityHandler } from "../../IActivityHandler";
|
|
2
2
|
/** Defines inputs for the FeatureSet From JSON activity. */
|
|
3
3
|
export interface FeatureSetFromJsonInputs {
|
|
4
4
|
/** The FeatureSet JSON as a string or object. */
|
|
5
|
-
json: string |
|
|
5
|
+
json: string | object;
|
|
6
6
|
}
|
|
7
7
|
/** Defines outputs for the FeatureSet From JSON activity. */
|
|
8
8
|
export interface FeatureSetFromJsonOutputs {
|
|
@@ -12,5 +12,5 @@ export interface FeatureSetFromJsonOutputs {
|
|
|
12
12
|
export declare class FeatureSetFromJson implements IActivityHandler {
|
|
13
13
|
static readonly action = "gcx:wf:arcgis::FeatureSetFromJson";
|
|
14
14
|
static readonly suite = "gcx:wf:builtin";
|
|
15
|
-
execute(inputs: FeatureSetFromJsonInputs
|
|
15
|
+
execute(inputs: FeatureSetFromJsonInputs): Promise<FeatureSetFromJsonOutputs>;
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import FeatureSet from"@arcgis/core/rest/support/FeatureSet";class FeatureSetFromJson{async execute(e
|
|
1
|
+
import FeatureSet from"@arcgis/core/rest/support/FeatureSet";class FeatureSetFromJson{async execute(e){if(!e.json)return{featureSet:void 0};e="string"==typeof e.json?JSON.parse(e.json):e.json;return{featureSet:FeatureSet.fromJSON(e)}}}FeatureSetFromJson.action="gcx:wf:arcgis::FeatureSetFromJson",FeatureSetFromJson.suite="gcx:wf:builtin";export{FeatureSetFromJson};
|
|
@@ -14,7 +14,7 @@ export interface GenerateWebmapForReportOutputs {
|
|
|
14
14
|
export declare class GenerateWebmapForReport implements IActivityHandler {
|
|
15
15
|
static readonly action = "gcx:wf:geocortex::GenerateWebmapForReport";
|
|
16
16
|
static readonly suite = "gcx:wf:builtin";
|
|
17
|
-
execute(inputs: GenerateWebmapForReportInputs, context: IActivityContext,
|
|
18
|
-
getWebmap(mapProvider: MapProvider, scale?: number, trivia?: any): Promise<Webmap>;
|
|
17
|
+
execute(inputs: GenerateWebmapForReportInputs, context: IActivityContext, MapProviderType: typeof MapProvider): Promise<GenerateWebmapForReportOutputs>;
|
|
18
|
+
getWebmap(mapProvider: MapProvider, scale?: number, trivia?: Record<string, any>): Promise<Webmap>;
|
|
19
19
|
getWgs84Extent(extent: __esri.Extent): Promise<__esri.Extent>;
|
|
20
20
|
}
|
|
@@ -33,5 +33,5 @@ export interface GeocodeOutputs {
|
|
|
33
33
|
export declare class Geocode implements IActivityHandler {
|
|
34
34
|
static readonly action = "gcx:wf:arcgis::Geocode";
|
|
35
35
|
static readonly suite = "gcx:wf:builtin";
|
|
36
|
-
execute(inputs: GeocodeInputs, context: IActivityContext,
|
|
36
|
+
execute(inputs: GeocodeInputs, context: IActivityContext, MapProviderType: typeof MapProvider): Promise<GeocodeOutputs>;
|
|
37
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate}from"tslib";import SpatialReference from"@arcgis/core/geometry/SpatialReference";import AddressCandidate from"@arcgis/core/rest/support/AddressCandidate";import{activate}from"../../Hooks.js";import{validation}from"../../Validation.js";import{MapProvider}from"./MapProvider.js";import{addToPath,
|
|
1
|
+
import{__decorate}from"tslib";import SpatialReference from"@arcgis/core/geometry/SpatialReference";import AddressCandidate from"@arcgis/core/rest/support/AddressCandidate";import{activate}from"../../Hooks.js";import{validation}from"../../Validation.js";import{MapProvider}from"./MapProvider.js";import{addToPath,performRequest}from"./tools.js";let Geocode=class{async execute(e,t,o){var a=validation.string("url",e.url,validation.never),a=addToPath(a,"findAddressCandidates"),i=validation.number("timeout",e.timeout,void 0),r=validation.number("maxLocations",e.maxLocations,void 0);const n=validation.exists("outFields",e.outFields,"*"),s=e.searchExtent,d=e.location;var c=validation.number("distance",e.distance,void 0),l=e.address;const f={maxLocations:r,singleLine:"string"==typeof l?l:void 0,outSR:o.getOutSR(e.outSpatialReference),outFields:n instanceof Array?n.toString():n,searchExtent:s instanceof Array?s.toString():s,location:d instanceof Array?d.toString():d,distance:c};if("object"==typeof l&&null!==l)for(const v in l){var m=l[v];"string"==typeof m&&(f[v]=m)}const p=await performRequest(a,f,i,t.cancellationToken.signal),u=SpatialReference.fromJSON(p.spatialReference);t=(p.candidates||[]).map(e=>{const t=AddressCandidate.fromJSON(e);return t.location.spatialReference=u,t});return{candidate:t[0],candidates:t,spatialReference:u}}};Geocode.action="gcx:wf:arcgis::Geocode",Geocode.suite="gcx:wf:builtin",Geocode=__decorate([activate(MapProvider)],Geocode);export{Geocode};
|