@vertigis/workflow 5.49.0 → 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/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 +1 -1
- 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/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 +42 -42
- package/forms/FormHost.d.ts +148 -148
- 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/Button.js +1 -1
- package/forms/components/DateTimePicker.js +1 -1
- package/forms/components/FormLabelNumberField.d.ts +4 -4
- package/forms/components/GeometryPickerListItem.d.ts +4 -4
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ActivityAbortedError}from"../../Errors.js";import{FormHost,defs}from"../../forms/FormHost.js";import{FormElementTypes}from"../../forms/constants.js";import{getContent}from"../../forms/textUtilities.js";import{text}from"../../forms/utils.js";import{FormElementNotFoundError,NoFormElementAvailableError}from"./Errors.js";export{defs};function toMarkdownRef(e,t){return"string"!=typeof t?t:{markdown:t}}const guid="F889738A-EBE2-4D52-8B46-3E24CC6E30F6:";export class FormRenderer extends FormHost{static create(){return new this}static createCustom(){const e=new this;return e.custom=!0,e}static register(e){e.factories.push(e=>e===this.type?this:void 0)}addElement(e,t,r,o){if(t===FormElementTypes.HEADER)throw new Error("A form cannot contain more than one header element.");const{elements:n}=this.form;if(n[e])throw new Error(`Element already present: ${e}`);const s={};if("object"==typeof r)for(const e in r)s[e]=r[e];s.type=t;const i=o?.targetElementName;let m=o?.relativePosition,l=!1;const a=()=>{let e=-1;for(const t of Object.values(n))void 0!==t.rowNumber&&(e=Math.max(e,t.rowNumber));return e};let c,f;if(i&&m&&n[i]){let e=0,r=0;const o=n[i];switch("header"===o.section?m="above":"footer"===o.section?(m="below",e=a()):(e=o.rowNumber,r=o.rowIndex,o.type!==FormElementTypes.SECTION&&t!==FormElementTypes.SECTION||(r=0,"before"===m?m="above":"after"===m&&(m="below"))),m){case"before":l=!1,c=e,f=r;break;case"after":l=!1,c=e,f=r+1;break;case"above":l=!0,c=e,f=0;break;default:l=!0,c=e+1,f=0}}else void 0!==s.rowNumber&&void 0!==s.rowIndex?(c=s.rowNumber||0,f=s.rowIndex||0):(c=a()+1,f=0);s.rowNumber=c,s.rowIndex=f;for(const e of Object.values(n)){const{rowNumber:t,rowIndex:r}=e;void 0!==t&&void 0!==r&&(l?t>=c&&e.rowNumber++:t===c&&r>=f&&e.rowIndex++)}n[e]=s;const u=[];for(const e of Object.keys(n)){const t=n[e];t.type===FormElementTypes.SECTION&&(u[t.rowNumber]={name:e})}const p=e=>{for(;e>=0;){const t=u[e];if(t)return t;e--}};for(const e of Object.values(n))void 0===e.rowNumber||e.rowNumber<c||e.type!==FormElementTypes.SECTION&&(e.section=p(e.rowNumber));return this.invalidate(),s}assignElementProperty(e,t,r,o=!1,n=!0){o&&(r=toMarkdownRef(t,r));const s=this.getElement(e);if(s[t]===r)return;const i={},m=this.getElementRegistration(s);if(m?.onPropertyChange)try{const e=(t,r)=>{i[t]!==r&&(i[t]=r,m.onPropertyChange({properties:{...s,...i},property:t,setProperty:e}))};e(t,r)}catch(o){throw console.error(`Error setting element property.\nElement: "${e}"\nProperty: "${t}"\nValue: ${r}\n`,o),o}else i[t]=r;for(const e of Object.keys(i))s[e]=i[e];if(m&&"value"in i&&!1!==n){const t={..."object"==typeof n?n:{},name:e,value:i.value};this.post("changed",t)}this.refresh()}
|
|
1
|
+
import{ActivityAbortedError}from"../../Errors.js";import{FormHost,defs}from"../../forms/FormHost.js";import{FormElementTypes}from"../../forms/constants.js";import{getContent}from"../../forms/textUtilities.js";import{text}from"../../forms/utils.js";import{FormElementNotFoundError,NoFormElementAvailableError}from"./Errors.js";export{defs};function toMarkdownRef(e,t){return"string"!=typeof t?t:{markdown:t}}const guid="F889738A-EBE2-4D52-8B46-3E24CC6E30F6:";export class FormRenderer extends FormHost{static create(){return new this}static createCustom(){const e=new this;return e.custom=!0,e}static register(e){e.factories.push(e=>e===this.type?this:void 0)}addElement(e,t,r,o){if(t===FormElementTypes.HEADER)throw new Error("A form cannot contain more than one header element.");const{elements:n}=this.form;if(n[e])throw new Error(`Element already present: ${e}`);const s={};if("object"==typeof r)for(const e in r)s[e]=r[e];s.type=t;const i=o?.targetElementName;let m=o?.relativePosition,l=!1;const a=()=>{let e=-1;for(const t of Object.values(n))void 0!==t.rowNumber&&(e=Math.max(e,t.rowNumber));return e};let c,f;if(i&&m&&n[i]){let e=0,r=0;const o=n[i];switch("header"===o.section?m="above":"footer"===o.section?(m="below",e=a()):(e=o.rowNumber,r=o.rowIndex,o.type!==FormElementTypes.SECTION&&t!==FormElementTypes.SECTION||(r=0,"before"===m?m="above":"after"===m&&(m="below"))),m){case"before":l=!1,c=e,f=r;break;case"after":l=!1,c=e,f=r+1;break;case"above":l=!0,c=e,f=0;break;default:l=!0,c=e+1,f=0}}else void 0!==s.rowNumber&&void 0!==s.rowIndex?(c=s.rowNumber||0,f=s.rowIndex||0):(c=a()+1,f=0);s.rowNumber=c,s.rowIndex=f;for(const e of Object.values(n)){const{rowNumber:t,rowIndex:r}=e;void 0!==t&&void 0!==r&&(l?t>=c&&e.rowNumber++:t===c&&r>=f&&e.rowIndex++)}n[e]=s;const u=[];for(const e of Object.keys(n)){const t=n[e];t.type===FormElementTypes.SECTION&&(u[t.rowNumber]={name:e})}const p=e=>{for(;e>=0;){const t=u[e];if(t)return t;e--}};for(const e of Object.values(n))void 0===e.rowNumber||e.rowNumber<c||e.type!==FormElementTypes.SECTION&&(e.section=p(e.rowNumber));return this.invalidate(),s}assignElementItemProperty(e,t,r,o,n){const s=this.getElement(e),i=s.items||{};if(i[t][r]=n?toMarkdownRef(r,o):o,"checked"===r&&[FormElementTypes.CHECKGROUP,FormElementTypes.ITEMPICKER,FormElementTypes.LISTBOX].includes(s.type)){const e=[];for(const t in i){const r=i[t];r.checked&&e.push(r)}s.value=0===e.length?void 0:{refValueType:"items",items:e}}this.refresh(e)}assignElementProperty(e,t,r,o=!1,n=!0){o&&(r=toMarkdownRef(t,r));const s=this.getElement(e);if(s[t]===r)return;const i={},m=this.getElementRegistration(s);if(m?.onPropertyChange)try{const e=(t,r)=>{i[t]!==r&&(i[t]=r,m.onPropertyChange({properties:{...s,...i},property:t,setProperty:e}))};e(t,r)}catch(o){throw console.error(`Error setting element property.\nElement: "${e}"\nProperty: "${t}"\nValue: ${r}\n`,o),o}else i[t]=r;for(const e of Object.keys(i))s[e]=i[e];if(m&&"value"in i&&!1!==n){const t={..."object"==typeof n?n:{},name:e,value:i.value};this.post("changed",t)}this.refresh()}assignItemsToElement(e,t,r){const o=this.getElement(e);let n=o.items||{};!1!==r&&(n={});for(const e in t)n[e]=t[e];o.items=n,o.type!==FormElementTypes.GEOMETRYPICKER&&o.type!==FormElementTypes.ITEMPICKER||delete o.state,this.invalidate(e)}cancelTool(){}deriveLocale(){return this.state?.locale??super.deriveLocale()}dispose(){if(super.dispose()){const e=this.state;return null!=e&&e.completion.isPending()&&e.reject(new ActivityAbortedError),!0}return!1}filterItems(e,t){const r=this.find(e);if(null==r)return!1;const o=r.items;if(null==o)return!1;if("string"!=typeof t)return t;let n=!1;const s={},i=t.toLowerCase().split(/\s+/);for(const e in o){const t=o[e],r=this.renderText(t.label).toLowerCase().split(/\s+/);for(const o of i)if(o.length>0)for(const i of r)i.length>0&&0===i.indexOf(o)&&(n=!0,s[e]=t)}return r.items=s,this.invalidate(e),n}getElement(e,t){let r;if(e){if("string"!=typeof e)return e;r=e}else t?.name&&(r=t.name);if(r){const e=this.form.elements[r];if(!e)throw new FormElementNotFoundError(r);return e}throw new NoFormElementAvailableError}getElementName(e,t){if(e){if("string"==typeof e)return e;for(const t in this.form.elements)if(this.form.elements[t]===e)return t;throw new FormElementNotFoundError(e)}if(t?.name)return t.name;throw new NoFormElementAvailableError}getElementRegistration(e){return this.state?.trivia?.getFormElementRegistration?.(e.customType??e.type)}hideElement(e){e.visible=!1,this.invalidate()}isRelated(e){return this.state?.trivia?.isDescendantOf?.(e.state)}load(e,t){const r=super.load(e,t);if(r&&this.form?.elements)for(const e in this.form.elements){let t=this.form.elements[e];const r=this.getElementRegistration(t);r&&r.getInitialProperties&&(t={...t,...r.getInitialProperties()},this.form.elements[e]=t)}return r}renderText(e){return super.renderText(this.getText(e))}setCurrentItem(e,t,r){const o=this.getElement(e);if(!o||!o.items)return!1;let n;switch(r){case"index":n=(e,t,r)=>{const n=Object.keys(o.items);return n.length>0&&e===n[r]};break;case"item":n=(e,t,r)=>r===t;break;case"key":n=(e,t,r)=>r===e;break;case"label":n=(e,t,r)=>getContent(r)===getContent(t.label);break;case"value":n=(e,t,r)=>r===t.value;break;default:throw new Error("Unsupported value for itemMatchType: "+r)}for(const r in o.items)if(n(r,o.items[r],t))return o.current=r,[FormElementTypes.AUTOCOMPLETE,FormElementTypes.DROPDOWNLIST,FormElementTypes.RADIOGROUP].includes(o.type)&&(o.label=o.items[r].label,o.value=o.items[r].value),this.invalidate(e),this.cascade(e),!0;return!1}setElementError(e,t,r=!1){this.errors[e]=r?toMarkdownRef("error",t):t}showElement(e){e.visible=!0,this.invalidate()}spinNoBlock(){return this.spin()}translateText(e){return super.translateText(this.getText(e))}getText(e){const t=this.state;if(void 0!==t){const r=t.environment.getText;if("function"==typeof r){if(text.isMarkdown(e))return{markdown:r(e.markdown)};if(text.isStatus(e))return{markdown:r(`@form-element-status-${e.status}`)};if(e&&"@"===e[0]){const t=r(e);if(t)return t}}}return e}}FormRenderer.type=guid+"FormRenderer";
|
|
@@ -12,12 +12,7 @@ export interface GetFormElementItemsFromCollectionOutputs {
|
|
|
12
12
|
export declare class GetFormElementItemsFromCollection implements IActivityHandler {
|
|
13
13
|
static readonly action = "gcx:wf:forms::GetFormElementItemsFromCollection";
|
|
14
14
|
static readonly suite = "gcx:wf:builtin";
|
|
15
|
-
|
|
16
|
-
* Checks if there is a field name that matches the supplied label.
|
|
17
|
-
* @param label The label input to be checked.
|
|
18
|
-
* @param propertyNames The names of all valid properties.
|
|
19
|
-
*/
|
|
20
|
-
private _isLabelFieldName;
|
|
15
|
+
execute(inputs: GetFormElementItemsFromCollectionInputs): GetFormElementItemsFromCollectionOutputs;
|
|
21
16
|
/**
|
|
22
17
|
* Returns the property name to use based on the supplied value.
|
|
23
18
|
* If no match is found, `undefined` is returned.
|
|
@@ -36,11 +31,16 @@ export declare class GetFormElementItemsFromCollection implements IActivityHandl
|
|
|
36
31
|
*/
|
|
37
32
|
private _getPropertyValue;
|
|
38
33
|
private _getTokenValues;
|
|
34
|
+
/**
|
|
35
|
+
* Checks if there is a field name that matches the supplied label.
|
|
36
|
+
* @param label The label input to be checked.
|
|
37
|
+
* @param propertyNames The names of all valid properties.
|
|
38
|
+
*/
|
|
39
|
+
private _isLabelFieldName;
|
|
39
40
|
/**
|
|
40
41
|
* Gets all of the property names that are valid for the specified object.
|
|
41
42
|
* We can't simply rely on `Object.keys(obj)` as it could be inheriting properties.
|
|
42
43
|
* Instead, we check every prototype.
|
|
43
44
|
*/
|
|
44
45
|
private getPropertyNames;
|
|
45
|
-
execute(inputs: GetFormElementItemsFromCollectionInputs): GetFormElementItemsFromCollectionOutputs;
|
|
46
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as TemplateUtils from"../../TemplateUtils.js";import{validation}from"../../Validation.js";import{text}from"../../forms/utils.js";export class GetFormElementItemsFromCollection{
|
|
1
|
+
import*as TemplateUtils from"../../TemplateUtils.js";import{validation}from"../../Validation.js";import{text}from"../../forms/utils.js";export class GetFormElementItemsFromCollection{execute(e){const t=e.labelFieldName||void 0,l=validation.array("collection",e.collection,validation.never),o={},r=l.length>0?this.getPropertyNames(l[0]):[],i=this._isLabelFieldName(t,r),n=i?[]:TemplateUtils.findTokenInstances(t);for(let a=0;a<l.length;++a){const s=l[a];let m;if(i)m=s[e.labelFieldName];else if(t){const e=this._getTokenValues(n,r,s);m=TemplateUtils.replacePlaceholders(t,n,e)}else m=s;null==m&&(m="");const c={};e.valueFieldName?c.value=s[e.valueFieldName]:c.value={refValueType:"data",type:"object",data:s},text.isMarkdown(m)?c.label=m:c.label=m.toString(),o[a]=c}return{items:o}}_getPropertyName(e,t){return t.includes(e)?e:void 0}_getPropertyValue(e,t,l){const o=this._getPropertyName(e,t);return o?TemplateUtils.valueOrEmptyString(l[o]):void 0}_getTokenValues(e,t,l){const o={};for(const r of e){const e=r.token;if(!Object.keys(o).includes(e)){const r=this._getPropertyValue(e,t,l),i=TemplateUtils.getTokenValueString(e,r);o[e]=text.escapeTextForMarkdown(i)}}return o}_isLabelFieldName(e,t){if(null==e||0===t.length)return!1;return e===this._getPropertyName(e,t)}getPropertyNames(e){const t=[];if(!e)return t;for(const l in e)"function"!=typeof e[l]&&t.push(l);return t}}GetFormElementItemsFromCollection.action="gcx:wf:forms::GetFormElementItemsFromCollection",GetFormElementItemsFromCollection.suite="gcx:wf:builtin";
|
package/activities/math/Max.d.ts
CHANGED
|
@@ -12,6 +12,6 @@ export interface MaxOutputs {
|
|
|
12
12
|
export declare class Max implements IActivityHandler {
|
|
13
13
|
static readonly action = "gcx:wf:math::Max";
|
|
14
14
|
static readonly suite = "gcx:wf:builtin";
|
|
15
|
-
private addValuesToArray;
|
|
16
15
|
execute(inputs: MaxInputs): MaxOutputs;
|
|
16
|
+
private addValuesToArray;
|
|
17
17
|
}
|
package/activities/math/Max.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{validation}from"../../Validation.js";export class Max{
|
|
1
|
+
import{validation}from"../../Validation.js";export class Max{execute(a){validation.exists("value1",a.value1);const e=[];return this.addValuesToArray(a.value1,e),null!==a.value2&&void 0!==a.value2&&this.addValuesToArray(a.value2,e),{result:Math.max(...e)}}addValuesToArray(a,e){"number"==typeof a?e.push(a):e.push(...a)}}Max.action="gcx:wf:math::Max",Max.suite="gcx:wf:builtin";
|
package/activities/math/Min.d.ts
CHANGED
|
@@ -12,6 +12,6 @@ export interface MinOutputs {
|
|
|
12
12
|
export declare class Min implements IActivityHandler {
|
|
13
13
|
static readonly action = "gcx:wf:math::Min";
|
|
14
14
|
static readonly suite = "gcx:wf:builtin";
|
|
15
|
-
private addValuesToArray;
|
|
16
15
|
execute(inputs: MinInputs): MinOutputs;
|
|
16
|
+
private addValuesToArray;
|
|
17
17
|
}
|
package/activities/math/Min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{validation}from"../../Validation.js";export class Min{
|
|
1
|
+
import{validation}from"../../Validation.js";export class Min{execute(a){validation.exists("value1",a.value1);const i=[];return this.addValuesToArray(a.value1,i),null!==a.value2&&void 0!==a.value2&&this.addValuesToArray(a.value2,i),{result:Math.min(...i)}}addValuesToArray(a,i){"number"==typeof a?i.push(a):i.push(...a)}}Min.action="gcx:wf:math::Min",Min.suite="gcx:wf:builtin";
|
|
@@ -8,12 +8,12 @@ export interface RunApplicationInputs {
|
|
|
8
8
|
}
|
|
9
9
|
/** Defines outputs from the RunApplication activity. */
|
|
10
10
|
export interface RunApplicationOutputs {
|
|
11
|
+
/** @description The text written by the application to the standard error stream. */
|
|
12
|
+
errorData: string;
|
|
11
13
|
/** @description The exit code of the application. */
|
|
12
14
|
exitCode: number;
|
|
13
15
|
/** @description The text written by the application to the standard output stream. */
|
|
14
16
|
outputData: string;
|
|
15
|
-
/** @description The text written by the application to the standard error stream. */
|
|
16
|
-
errorData: string;
|
|
17
17
|
}
|
|
18
18
|
export declare class RunApplication implements IActivityHandler {
|
|
19
19
|
static readonly action = "gcx:wf:server::RunApplication";
|
|
@@ -7,14 +7,14 @@ export interface RunPythonInputs {
|
|
|
7
7
|
}
|
|
8
8
|
/** Defines outputs from the RunPython activity. */
|
|
9
9
|
export interface RunPythonOutputs {
|
|
10
|
-
/** @description The text output of the Python script. */
|
|
11
|
-
result: string;
|
|
12
|
-
/** @description Whether the Python script completed successfully. */
|
|
13
|
-
success: boolean;
|
|
14
10
|
/** @description Any error messages written by the script. */
|
|
15
11
|
error: string;
|
|
16
12
|
/** @description The exit code returned by the script. An exit code other than zero usually indicates a failure. */
|
|
17
13
|
exitCode: number;
|
|
14
|
+
/** @description The text output of the Python script. */
|
|
15
|
+
result: string;
|
|
16
|
+
/** @description Whether the Python script completed successfully. */
|
|
17
|
+
success: boolean;
|
|
18
18
|
}
|
|
19
19
|
export declare class RunPython implements IActivityHandler {
|
|
20
20
|
static readonly action = "gcx:wf:server::RunPython";
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { MarkdownRef } from "../../forms/FormDefinition";
|
|
3
3
|
export interface AlertContentProps {
|
|
4
|
-
text: string | MarkdownRef;
|
|
5
|
-
title: string | undefined;
|
|
6
4
|
getText: (key: string) => string;
|
|
7
5
|
onClose: () => void;
|
|
6
|
+
text: string | MarkdownRef;
|
|
7
|
+
title: string | undefined;
|
|
8
8
|
}
|
|
9
9
|
export declare const AlertContent: ({ text, title, getText, onClose }: AlertContentProps) => React.JSX.Element;
|
|
10
10
|
export interface ConfirmContentProps {
|
|
11
|
-
text: string | MarkdownRef;
|
|
12
|
-
title: string | undefined;
|
|
13
11
|
getText: (key: string) => string;
|
|
14
12
|
onClose: (result: boolean) => void;
|
|
13
|
+
text: string | MarkdownRef;
|
|
14
|
+
title: string | undefined;
|
|
15
15
|
}
|
|
16
16
|
export declare const ConfirmContent: ({ text, title, getText, onClose }: ConfirmContentProps) => React.JSX.Element;
|
|
17
17
|
export interface PromptContentProps {
|
|
18
|
-
description: string | MarkdownRef;
|
|
19
18
|
defaultText: string | undefined;
|
|
20
|
-
|
|
19
|
+
description: string | MarkdownRef;
|
|
21
20
|
getText: (key: string) => string;
|
|
22
21
|
onClose: (result: string | null) => void;
|
|
22
|
+
title: string | undefined;
|
|
23
23
|
}
|
|
24
24
|
export declare const PromptContent: ({ description, defaultText, title, getText, onClose, }: PromptContentProps) => React.JSX.Element;
|
|
@@ -5,14 +5,14 @@ import type { MarkdownRef } from "../../forms/FormDefinition";
|
|
|
5
5
|
import type { UIService } from "../../ui/UIService";
|
|
6
6
|
export declare class DialogProvider {
|
|
7
7
|
static type: string;
|
|
8
|
-
static create(getText: (key: string) => string): DialogProvider;
|
|
9
|
-
static register(activator: Activator): void;
|
|
10
|
-
protected _getText: (key: string) => string;
|
|
11
|
-
constructor(getText: (key: string) => string);
|
|
12
|
-
uiService: UIService | undefined;
|
|
13
8
|
AlertContent: (props: AlertContentProps) => React.JSX.Element;
|
|
14
9
|
ConfirmContent: (props: ConfirmContentProps) => React.JSX.Element;
|
|
15
10
|
PromptContent: (props: PromptContentProps) => React.JSX.Element;
|
|
11
|
+
uiService: UIService | undefined;
|
|
12
|
+
protected _getText: (key: string) => string;
|
|
13
|
+
constructor(getText: (key: string) => string);
|
|
14
|
+
static create(getText: (key: string) => string): DialogProvider;
|
|
15
|
+
static register(activator: Activator): void;
|
|
16
16
|
showAlert(text: string | MarkdownRef, title?: string): Promise<void>;
|
|
17
17
|
showConfirm(text: string | MarkdownRef, title?: string): Promise<boolean>;
|
|
18
18
|
showPrompt(description: string | MarkdownRef, defaultText?: string, title?: string): Promise<string | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import Dialog from"@vertigis/react-ui/Dialog";import React from"react";import{AlertContent,ConfirmContent,PromptContent}from"./DialogContent.js";export class DialogProvider{static create(t){return new this(t)}static register(t){t.factories.push(t=>t===this.type?this:void 0)}
|
|
1
|
+
import Dialog from"@vertigis/react-ui/Dialog";import React from"react";import{AlertContent,ConfirmContent,PromptContent}from"./DialogContent.js";export class DialogProvider{constructor(t){this._getText=t,this.AlertContent=AlertContent,this.ConfirmContent=ConfirmContent,this.PromptContent=PromptContent}static create(t){return new this(t)}static register(t){t.factories.push(t=>t===this.type?this:void 0)}async showAlert(t,e){return this.uiService.displayDialog(i=>React.createElement(this.AlertContent,{getText:this._getText,onClose:i,text:t,title:e}),Dialog)}async showConfirm(t,e){let i=!1;return await this.uiService.displayDialog(o=>React.createElement(this.ConfirmContent,{getText:this._getText,onClose:t=>{i=t,o()},text:t,title:e}),Dialog),i}async showPrompt(t,e,i){let o=null;return await this.uiService.displayDialog(r=>React.createElement(this.PromptContent,{defaultText:e,description:t,getText:this._getText,onClose:t=>{o=t,r()},title:i}),Dialog),o}}DialogProvider.type="8F03DBFB-C0F4-499D-B176-70F51AF11E40:DialogProvider";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { PropertySet } from "../Collections";
|
|
2
2
|
/** Defines an annotation for an activity input. */
|
|
3
3
|
export interface Annotation {
|
|
4
|
-
/** Specifies the kind of annotation. */
|
|
5
|
-
kind?: AnnotationKind;
|
|
6
|
-
/** Specifies the character index of the term for the annotation. */
|
|
7
|
-
index: number;
|
|
8
4
|
/** Specifies the character count of the term for the annotation. */
|
|
9
5
|
count: number;
|
|
6
|
+
/** Specifies the character index of the term for the annotation. */
|
|
7
|
+
index: number;
|
|
8
|
+
/** Specifies the kind of annotation. */
|
|
9
|
+
kind?: AnnotationKind;
|
|
10
10
|
}
|
|
11
11
|
/** Defines an expression-based activity input. */
|
|
12
12
|
export interface Expression {
|
|
@@ -14,12 +14,12 @@ export interface Expression {
|
|
|
14
14
|
accessors?: string[];
|
|
15
15
|
/** Specifies annotations for the source expression. */
|
|
16
16
|
annotations?: Annotation[];
|
|
17
|
-
/** Indicates the type of the expression. */
|
|
18
|
-
type?: string;
|
|
19
17
|
/** Indicates the compiled code of the expression. */
|
|
20
18
|
code?: string;
|
|
21
19
|
/** Indicates the source (original code) of the expression. */
|
|
22
20
|
source?: string;
|
|
21
|
+
/** Indicates the type of the expression. */
|
|
22
|
+
type?: string;
|
|
23
23
|
/** Indicates extra values for a parameterized expression. */
|
|
24
24
|
values?: PropertySet;
|
|
25
25
|
}
|
|
@@ -27,47 +27,41 @@ interface NameIdMapper {
|
|
|
27
27
|
* @product This is intended for internal use only within VertiGIS Studio products.
|
|
28
28
|
*/
|
|
29
29
|
export declare class ProgramInspector {
|
|
30
|
-
/**
|
|
31
|
-
|
|
30
|
+
/** The id of the editor created this ProgramInspector. */
|
|
31
|
+
readonly editorId: string | undefined;
|
|
32
|
+
/** Indicates the program being built. */
|
|
33
|
+
program: Program;
|
|
34
|
+
/** Indicates the starting step. */
|
|
35
|
+
start: Step | undefined;
|
|
32
36
|
/** Indicates the components being built. */
|
|
33
37
|
protected components: ComponentList;
|
|
34
38
|
/** Indicates the forms being built. */
|
|
35
39
|
protected forms: FormList;
|
|
36
40
|
/** Any validation issues that have been hidden by the author in the designer. */
|
|
37
41
|
protected hiddenValidationIssues: Set<string>;
|
|
42
|
+
/** Indicates the map of incidents. */
|
|
43
|
+
protected incidents: IncidentList;
|
|
38
44
|
/** Indicates the references being built. */
|
|
39
45
|
protected references: ReferenceList;
|
|
40
46
|
/** Indicates the steps being built. */
|
|
41
47
|
protected steps: StepList;
|
|
42
48
|
/** Indicates the transitions being built. */
|
|
43
49
|
protected transitions: TransitionList;
|
|
44
|
-
/** Indicates the program being built. */
|
|
45
|
-
program: Program;
|
|
46
|
-
/** Indicates the starting step. */
|
|
47
|
-
start: Step | undefined;
|
|
48
|
-
/** The id of the editor created this ProgramInspector. */
|
|
49
|
-
readonly editorId: string | undefined;
|
|
50
50
|
/**
|
|
51
51
|
* Creates a new instance of the `ProgramInspector` class.
|
|
52
52
|
* @param editorId (optional) The id of the editor created this ProgramInspector.
|
|
53
53
|
*/
|
|
54
54
|
constructor(editorId?: string);
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
|
|
65
|
-
/** Retrieves the reference for the given identifier or name. */
|
|
66
|
-
findReference(nameId: number | string): Reference | undefined;
|
|
67
|
-
/** Retrieves the reference for the given identifier or name. */
|
|
68
|
-
findStep(nameId: number | string): Step | undefined;
|
|
69
|
-
/** Iterates over all the assets. */
|
|
70
|
-
findTransition(nameId: number | string): Transition | undefined;
|
|
55
|
+
/** Adds a new component. */
|
|
56
|
+
addComponent(): Component;
|
|
57
|
+
/** Adds a new form. */
|
|
58
|
+
addForm(): Form;
|
|
59
|
+
/** Adds a reference. */
|
|
60
|
+
addReference(): Reference;
|
|
61
|
+
/** Adds a new step. */
|
|
62
|
+
addStep(): Step;
|
|
63
|
+
/** Adds a new transition. */
|
|
64
|
+
addTransition(source: Step, target: Step): Transition | undefined;
|
|
71
65
|
/** Iterates over all the assets. */
|
|
72
66
|
all(): Iterator<Resource>;
|
|
73
67
|
/** Iterates over the components. */
|
|
@@ -80,16 +74,6 @@ export declare class ProgramInspector {
|
|
|
80
74
|
allSteps(): Iterator<Step>;
|
|
81
75
|
/** Iterates over the transitions. */
|
|
82
76
|
allTransitions(): Iterator<Transition>;
|
|
83
|
-
/** Adds a new component. */
|
|
84
|
-
addComponent(): Component;
|
|
85
|
-
/** Adds a new form. */
|
|
86
|
-
addForm(): Form;
|
|
87
|
-
/** Adds a reference. */
|
|
88
|
-
addReference(): Reference;
|
|
89
|
-
/** Adds a new step. */
|
|
90
|
-
addStep(): Step;
|
|
91
|
-
/** Adds a new transition. */
|
|
92
|
-
addTransition(source: Step, target: Step): Transition | undefined;
|
|
93
77
|
/** Forms a lookup cache of the components. */
|
|
94
78
|
cacheComponents(): Record<string, Component>;
|
|
95
79
|
/** Forms a lookup cache of the forms. */
|
|
@@ -100,6 +84,78 @@ export declare class ProgramInspector {
|
|
|
100
84
|
cacheSteps(): Record<string, Step>;
|
|
101
85
|
/** Forms a lookup cache of the transitions. */
|
|
102
86
|
cacheTransitions(): Record<string, Transition>;
|
|
87
|
+
/** Changes the branch of the given step or transition. */
|
|
88
|
+
changeBranch(transition: Transition, branch: boolean | number | string): boolean;
|
|
89
|
+
/** Changes the parent of the given step or transition. */
|
|
90
|
+
changeParent(activity: Activity, parent: Component | undefined): boolean;
|
|
91
|
+
/** Changes the source of the given transition. */
|
|
92
|
+
changeSource(transition: Transition, source: Step | undefined): boolean;
|
|
93
|
+
/** Changes the starting step. */
|
|
94
|
+
changeStart(step: Step): boolean;
|
|
95
|
+
/** Changes the target of the given transition. */
|
|
96
|
+
changeTarget(transition: Transition, target: Step | undefined): boolean;
|
|
97
|
+
/** Checks to see if the given identifier exists. */
|
|
98
|
+
exists(resource: Resource | undefined): boolean;
|
|
99
|
+
/** Exports the program. */
|
|
100
|
+
export(): Program;
|
|
101
|
+
/** Retrieves the resource for the given identifier. */
|
|
102
|
+
find(id: number): Resource | undefined;
|
|
103
|
+
/** Retrieves the component for the given identifier or name. */
|
|
104
|
+
findComponent(nameId: number | string): Component | undefined;
|
|
105
|
+
/** Retrieves the form for the given identifier or name. */
|
|
106
|
+
findForm(nameId: number | string): Form | undefined;
|
|
107
|
+
/** Retrieves the reference for the given identifier or name. */
|
|
108
|
+
findReference(nameId: number | string): Reference | undefined;
|
|
109
|
+
/** Retrieves the reference for the given identifier or name. */
|
|
110
|
+
findStep(nameId: number | string): Step | undefined;
|
|
111
|
+
/** Iterates over all the assets. */
|
|
112
|
+
findTransition(nameId: number | string): Transition | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* Retrieves the default locale for the workflow.
|
|
115
|
+
*/
|
|
116
|
+
getDefaultLocale(): string;
|
|
117
|
+
/** Returns deployment configuration details. */
|
|
118
|
+
getDeploymentConfig(): DeploymentConfig;
|
|
119
|
+
/**
|
|
120
|
+
* This method returns the ids of Validation Issues that have been hidden by the author in the designer.
|
|
121
|
+
* @returns The ids of Validation Issues that have been hidden by the author in the designer.
|
|
122
|
+
*/
|
|
123
|
+
getHiddenValidationIssues(): Set<string>;
|
|
124
|
+
/**
|
|
125
|
+
* Retrieves the string lookups for the given locale.
|
|
126
|
+
* @param locale The locale of the strings to retrieve. Defaults to the invariant strings.
|
|
127
|
+
*/
|
|
128
|
+
getStrings(locale?: string): Record<string, string>;
|
|
129
|
+
/**
|
|
130
|
+
* Imports a workflow program (must be pure JSON).
|
|
131
|
+
* @param program The program as JSON or as a JSON-string.
|
|
132
|
+
* @param compact Instructs the parsing to assume compact form.
|
|
133
|
+
* @param mapper Indicates how identifiers and names should get preserved.
|
|
134
|
+
*/
|
|
135
|
+
import(program: Program | string, compact?: boolean, mapper?: NameIdMapper): ImportResults;
|
|
136
|
+
/** Tests if the given resource is an activity. */
|
|
137
|
+
isActivity(resource: Resource): resource is Activity;
|
|
138
|
+
/** Tests if the given resource is a component */
|
|
139
|
+
isComponent(resource: Resource | undefined): resource is Component;
|
|
140
|
+
/** Tests if the given resource is a form. */
|
|
141
|
+
isForm(resource: Resource | undefined): resource is Form;
|
|
142
|
+
/** Tests if the given resource is a member of the component. */
|
|
143
|
+
isParent(component: Component, resource: Resource): resource is Activity;
|
|
144
|
+
/** Tests if the given resource is a reference. */
|
|
145
|
+
isReference(resource: Resource | undefined): resource is Reference;
|
|
146
|
+
/** Tests if the given resource is the source for the given transition. */
|
|
147
|
+
isSource(transition: Transition, resource: Resource): resource is Step;
|
|
148
|
+
/** Tests if the given resource is a step. */
|
|
149
|
+
isStep(resource: Resource | undefined): resource is Step;
|
|
150
|
+
/** Tests if the given resource is the target for the given transition. */
|
|
151
|
+
isTarget(transition: Transition, resource: Resource): resource is Step;
|
|
152
|
+
/** Tests if the given resource is a transition. */
|
|
153
|
+
isTransition(resource: Resource | undefined): resource is Transition;
|
|
154
|
+
/** Yields a new identifier that is not currently in use. */
|
|
155
|
+
newId(nextId?: number): number;
|
|
156
|
+
/** Attempts to align the underlying program with the actual state of the inspector. */
|
|
157
|
+
/** Use this to get a static view of the program (say for saving a project). */
|
|
158
|
+
realize(): void;
|
|
103
159
|
/** Relates components to steps and transitions. */
|
|
104
160
|
relate(components: Iterable<Component>): Iterator<Activity>;
|
|
105
161
|
/** Relates steps to transitions. */
|
|
@@ -108,6 +164,7 @@ export declare class ProgramInspector {
|
|
|
108
164
|
relate(transitions: Iterable<Transition>): Iterator<Step>;
|
|
109
165
|
/** Relates resources to resources. */
|
|
110
166
|
relate(member: Iterable<Resource>): Iterator<Resource>;
|
|
167
|
+
release(): void;
|
|
111
168
|
/** Removes the given resource. */
|
|
112
169
|
remove(resource: Resource, orphan?: boolean): boolean;
|
|
113
170
|
/** Removes the given resources via an iterator. */
|
|
@@ -124,18 +181,6 @@ export declare class ProgramInspector {
|
|
|
124
181
|
removeStep(resource: Resource): boolean;
|
|
125
182
|
/** Removes the given transition. */
|
|
126
183
|
removeTransition(resource: Resource): boolean;
|
|
127
|
-
/** Renames the given component to another identifer. */
|
|
128
|
-
shift(resource: Resource, id: number): false | void;
|
|
129
|
-
/** Renames the given component to another identifer. */
|
|
130
|
-
shiftComponent(resource: Resource, id: number): boolean;
|
|
131
|
-
/** Shifts the given form to another identifier. */
|
|
132
|
-
shiftForm(resource: Resource, id: number): boolean;
|
|
133
|
-
/** Shifts the given step to another identifier. */
|
|
134
|
-
shiftReference(resource: Resource, id: number): boolean;
|
|
135
|
-
/** Shifts the given step to another identifier. */
|
|
136
|
-
shiftStep(resource: Resource, id: number): boolean;
|
|
137
|
-
/** Renames the given transition to another identifier. */
|
|
138
|
-
shiftTransition(resource: Resource, id: number): boolean;
|
|
139
184
|
/** Renames the given resource. */
|
|
140
185
|
rename(resource: Resource, name: string): string | undefined;
|
|
141
186
|
/** Renames the given componnent. */
|
|
@@ -148,72 +193,27 @@ export declare class ProgramInspector {
|
|
|
148
193
|
renameStep(resource: Resource, name: string): boolean;
|
|
149
194
|
/** Renames the given transition. */
|
|
150
195
|
renameTransition(resource: Resource, name: string): boolean;
|
|
151
|
-
/** Changes the starting step. */
|
|
152
|
-
changeStart(step: Step): boolean;
|
|
153
|
-
/** Changes the branch of the given step or transition. */
|
|
154
|
-
changeBranch(transition: Transition, branch: boolean | number | string): boolean;
|
|
155
|
-
/** Changes the parent of the given step or transition. */
|
|
156
|
-
changeParent(activity: Activity, parent: Component | undefined): boolean;
|
|
157
|
-
/** Changes the source of the given transition. */
|
|
158
|
-
changeSource(transition: Transition, source: Step | undefined): boolean;
|
|
159
|
-
/** Changes the target of the given transition. */
|
|
160
|
-
changeTarget(transition: Transition, target: Step | undefined): boolean;
|
|
161
|
-
/** Tests if the given resource is a component */
|
|
162
|
-
isComponent(resource: Resource | undefined): resource is Component;
|
|
163
|
-
/** Tests if the given resource is a member of the component. */
|
|
164
|
-
isParent(component: Component, resource: Resource): resource is Activity;
|
|
165
|
-
/** Tests if the given resource is a form. */
|
|
166
|
-
isForm(resource: Resource | undefined): resource is Form;
|
|
167
|
-
/** Tests if the given resource is an activity. */
|
|
168
|
-
isActivity(resource: Resource): resource is Activity;
|
|
169
|
-
/** Tests if the given resource is a reference. */
|
|
170
|
-
isReference(resource: Resource | undefined): resource is Reference;
|
|
171
|
-
/** Tests if the given resource is a step. */
|
|
172
|
-
isStep(resource: Resource | undefined): resource is Step;
|
|
173
|
-
/** Tests if the given resource is a transition. */
|
|
174
|
-
isTransition(resource: Resource | undefined): resource is Transition;
|
|
175
|
-
/** Tests if the given resource is the source for the given transition. */
|
|
176
|
-
isSource(transition: Transition, resource: Resource): resource is Step;
|
|
177
|
-
/** Tests if the given resource is the target for the given transition. */
|
|
178
|
-
isTarget(transition: Transition, resource: Resource): resource is Step;
|
|
179
|
-
/** Returns deployment configuration details. */
|
|
180
|
-
getDeploymentConfig(): DeploymentConfig;
|
|
181
|
-
/**
|
|
182
|
-
* Retrieves the default locale for the workflow.
|
|
183
|
-
*/
|
|
184
|
-
getDefaultLocale(): string;
|
|
185
|
-
/**
|
|
186
|
-
* This method returns the ids of Validation Issues that have been hidden by the author in the designer.
|
|
187
|
-
* @returns The ids of Validation Issues that have been hidden by the author in the designer.
|
|
188
|
-
*/
|
|
189
|
-
getHiddenValidationIssues(): Set<string>;
|
|
190
|
-
/**
|
|
191
|
-
* Retrieves the string lookups for the given locale.
|
|
192
|
-
* @param locale The locale of the strings to retrieve. Defaults to the invariant strings.
|
|
193
|
-
*/
|
|
194
|
-
getStrings(locale?: string): Record<string, string>;
|
|
195
|
-
/** Attempts to align the underlying program with the actual state of the inspector. */
|
|
196
|
-
/** Use this to get a static view of the program (say for saving a project). */
|
|
197
|
-
realize(): void;
|
|
198
|
-
release(): void;
|
|
199
|
-
resolveStart(start?: Step | number | string): Step | undefined;
|
|
200
|
-
/**
|
|
201
|
-
* Imports a workflow program (must be pure JSON).
|
|
202
|
-
* @param program The program as JSON or as a JSON-string.
|
|
203
|
-
* @param compact Instructs the parsing to assume compact form.
|
|
204
|
-
* @param mapper Indicates how identifiers and names should get preserved.
|
|
205
|
-
*/
|
|
206
|
-
import(program: Program | string, compact?: boolean, mapper?: NameIdMapper): ImportResults;
|
|
207
|
-
/** Exports the program. */
|
|
208
|
-
export(): Program;
|
|
209
196
|
/** Resets the entire state. */
|
|
210
197
|
reset(): void;
|
|
198
|
+
resolveStart(start?: Step | number | string): Step | undefined;
|
|
199
|
+
/** Renames the given component to another identifer. */
|
|
200
|
+
shift(resource: Resource, id: number): false | void;
|
|
201
|
+
/** Renames the given component to another identifer. */
|
|
202
|
+
shiftComponent(resource: Resource, id: number): boolean;
|
|
203
|
+
/** Shifts the given form to another identifier. */
|
|
204
|
+
shiftForm(resource: Resource, id: number): boolean;
|
|
205
|
+
/** Shifts the given step to another identifier. */
|
|
206
|
+
shiftReference(resource: Resource, id: number): boolean;
|
|
207
|
+
/** Shifts the given step to another identifier. */
|
|
208
|
+
shiftStep(resource: Resource, id: number): boolean;
|
|
209
|
+
/** Renames the given transition to another identifier. */
|
|
210
|
+
shiftTransition(resource: Resource, id: number): boolean;
|
|
211
211
|
toJSON(): Program;
|
|
212
212
|
}
|
|
213
213
|
interface Incident<TResource extends Resource> {
|
|
214
|
-
token: string;
|
|
215
214
|
master?: ResourceList<TResource, Incident<TResource>>;
|
|
216
215
|
resource?: TResource;
|
|
216
|
+
token: string;
|
|
217
217
|
}
|
|
218
218
|
declare class IncidentList extends Dictionary<Incident<Resource>> {
|
|
219
219
|
nextId: number;
|
|
@@ -224,16 +224,15 @@ declare class IncidentList extends Dictionary<Incident<Resource>> {
|
|
|
224
224
|
declare abstract class ResourceList<T extends Resource, TIncident extends Incident<T>> extends Dictionary<TIncident> {
|
|
225
225
|
incidents: IncidentList;
|
|
226
226
|
protected cacheLookup: Record<string, T> | undefined;
|
|
227
|
-
abstract qualify(name: string): string;
|
|
228
|
-
abstract create(): T;
|
|
229
227
|
constructor(incidents: IncidentList);
|
|
228
|
+
add(): TIncident;
|
|
230
229
|
all(): Iterator<T>;
|
|
231
230
|
cache(): Record<string, T>;
|
|
231
|
+
changeParent(this: StepList | TransitionList, incident: StepIncident | TransitionIncident, parent: ComponentIncident | undefined): void;
|
|
232
232
|
findFor(resource: Resource | undefined): TIncident | undefined;
|
|
233
|
-
test(incident: Incident<Resource> | undefined): incident is TIncident;
|
|
234
233
|
findWith(nameId: number | string): T | undefined;
|
|
235
|
-
|
|
236
|
-
|
|
234
|
+
relate(_incident: Incident<Resource>, _branch: string | undefined): Iterable<Resource>;
|
|
235
|
+
removeFor(resource: Resource | undefined): boolean;
|
|
237
236
|
/**
|
|
238
237
|
* Renames the specified item, returning the old name.
|
|
239
238
|
* @param incident The thing to be renamed.
|
|
@@ -241,11 +240,12 @@ declare abstract class ResourceList<T extends Resource, TIncident extends Incide
|
|
|
241
240
|
*/
|
|
242
241
|
rename(incident: TIncident, name: string | undefined): string | undefined;
|
|
243
242
|
renameFor(resource: Resource | undefined, name: string): boolean;
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
shift(incident: TIncident, id: number): void;
|
|
244
|
+
shiftFor(resource: Resource | undefined, id: number): boolean;
|
|
245
|
+
test(incident: Incident<Resource> | undefined): incident is TIncident;
|
|
246
246
|
unlink(incident: Incident<Resource>): number;
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
abstract create(): T;
|
|
248
|
+
abstract qualify(name: string): string;
|
|
249
249
|
}
|
|
250
250
|
interface ComponentIncident extends Incident<Component> {
|
|
251
251
|
steps?: Dictionary<StepIncident>;
|
|
@@ -254,8 +254,8 @@ interface ComponentIncident extends Incident<Component> {
|
|
|
254
254
|
declare class ComponentList extends ResourceList<Component, ComponentIncident> {
|
|
255
255
|
create(): Component;
|
|
256
256
|
qualify(name: string): string;
|
|
257
|
-
unlink(incident: ComponentIncident): number;
|
|
258
257
|
relate(incident: ComponentIncident): Iterable<Activity>;
|
|
258
|
+
unlink(incident: ComponentIncident): number;
|
|
259
259
|
}
|
|
260
260
|
declare class FormList extends ResourceList<Form, Incident<Form>> {
|
|
261
261
|
create(): Form;
|
|
@@ -266,17 +266,17 @@ declare class ReferenceList extends ResourceList<Reference, Incident<Reference>>
|
|
|
266
266
|
qualify(name: string): string;
|
|
267
267
|
}
|
|
268
268
|
interface StepIncident extends Incident<Step> {
|
|
269
|
+
branches?: Record<string, Transition | Transition[]>;
|
|
269
270
|
master?: StepList;
|
|
270
271
|
parent?: ComponentIncident;
|
|
271
|
-
branches?: Record<string, Transition | Transition[]>;
|
|
272
272
|
transitions?: Dictionary<TransitionIncident>;
|
|
273
273
|
}
|
|
274
274
|
declare class StepList extends ResourceList<Step, StepIncident> {
|
|
275
275
|
create(): Step;
|
|
276
276
|
qualify(name: string): string;
|
|
277
|
+
relate(incident: StepIncident, branch: string): Iterable<Transition>;
|
|
277
278
|
siblings(incident: ComponentIncident): Dictionary<StepIncident | TransitionIncident>;
|
|
278
279
|
unlink(incident: StepIncident): number;
|
|
279
|
-
relate(incident: StepIncident, branch: string): Iterable<Transition>;
|
|
280
280
|
}
|
|
281
281
|
interface TransitionIncident extends Incident<Transition> {
|
|
282
282
|
master?: TransitionList;
|
|
@@ -287,9 +287,9 @@ interface TransitionIncident extends Incident<Transition> {
|
|
|
287
287
|
declare class TransitionList extends ResourceList<Transition, TransitionIncident> {
|
|
288
288
|
create(): Transition;
|
|
289
289
|
qualify(name: string): string;
|
|
290
|
+
relate(incident: TransitionIncident): Iterable<Step>;
|
|
290
291
|
siblings(incident: ComponentIncident): Dictionary<StepIncident | TransitionIncident>;
|
|
291
292
|
unlink(incident: TransitionIncident): number;
|
|
292
|
-
relate(incident: TransitionIncident): Iterable<Step>;
|
|
293
293
|
}
|
|
294
294
|
export type LocaleParts = {
|
|
295
295
|
language: string;
|