@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 rgba from"color-rgba";export default class WorkflowColor{
|
|
1
|
+
import rgba from"color-rgba";export default class WorkflowColor{constructor(t){if(this.values=[0,0,0,1],"string"==typeof t){if(this.values=rgba(t),0===this.values.length)throw new Error("Invalid rgb value: "+t)}else this.values=[...t]}get a(){return this.values[3]}get b(){return this.values[2]}get g(){return this.values[1]}get r(){return this.values[0]}static fromJSON(t){if(4!==t.length)throw new Error("Invalid JSON. The array must contain four values.");return new WorkflowColor(t)}clone(){return new WorkflowColor(this.values)}equals(t){const{r:r,g:s,b:e,a:i}=t;return this.r===r&&this.g===s&&this.b===e&&this.a===i}toCss(){return 1===this.a?`rgb(${this.r},${this.g},${this.b})`:`rgba(${this.r},${this.g},${this.b},${this.a})`}toJSON(){return[...this.values]}toString(){return`rgba(${this.r},${this.g},${this.b},${this.a})`}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import Button from"@vertigis/react-ui/Button";import{NoIcon}from"@vertigis/react-ui/icons";import{styled,useTheme}from"@vertigis/react-ui/styles";import clsx from"clsx";import*as React from"react";import{forwardRef,Children,useMemo,Suspense,lazy}from"react";import WorkflowColor from"../branding/WorkflowColor.js";import{createPalette}from"../branding/createPalette.js";import{getBorderStyle,getEmphasis,getIconPosition,getItemColors,getItemSize,getShowBorder}from"../utils.js";function emphasisToButtonProps(e,o){switch(o&&(e="high"),e){case"low":return{variant:"text",color:"inherit"};case"custom":case"medium":return{variant:"outlined",color:"inherit"};case"high":return{variant:"contained",color:"primary"};default:throw new Error(`Invalid value "${e}" for Emphasis.`)}}function generateButtonOverrides(e,o){const t=e=>Object.fromEntries(Object.entries(e).map(([e,o])=>[e,o.toCss()])),r=e&&t(createPalette(e)),n=o&&t(createPalette(o)),{accentIconForeground:s,buttonForegroundDisabled:a,buttonIcon:i,buttonIconDisabled:d,buttonIconHover:u,buttonBorderDisabled:l,buttonBorderHover:c,emphasizedButtonBackgroundDisabled:m}=r??{},{buttonBackgroundDisabled:b,emphasizedButtonBorderDisabled:g,emphasizedButtonBorderHover:B,emphasizedButtonForegroundDisabled:p,primaryBackground:h}=n??{};return{accentIconForeground:s,buttonBackground:o?.toCss(),buttonBackgroundDisabled:b,buttonBackgroundHover:e?.toCss(),buttonBorder:e?.toCss(),buttonBorderDisabled:l,buttonBorderHover:c,buttonForeground:e?.toCss(),buttonForegroundDisabled:a,buttonForegroundHover:o?.toCss(),buttonIcon:i,buttonIconDisabled:d,buttonIconHover:u,emphasizedButtonBackground:e?.toCss(),emphasizedButtonBackgroundDisabled:m,emphasizedButtonBackgroundHover:o?.toCss(),emphasizedButtonBorder:o?.toCss(),emphasizedButtonBorderDisabled:g,emphasizedButtonBorderHover:B,emphasizedButtonForeground:o?.toCss(),emphasizedButtonForegroundDisabled:p,emphasizedButtonForegroundHover:e?.toCss(),primaryBackground:h}}const PREFIX="WorkflowButton";export const buttonClasses={iconOnly:`${PREFIX}-icon-only`,iconStacked:`${PREFIX}-icon-stacked`,styleRounded:`${PREFIX}-rounded`,border:`${PREFIX}-border`,noBorder:`${PREFIX}-noBorder`};export default forwardRef(({children:e,className:o,disabled:t,item:r,onClick:n,title:s},a)=>{const i=useTheme(),d=r.appearance??{},{backgroundColor:u,foregroundColor:l}=getItemColors(d,i),c=useMemo(()=>{const e=u||l?generateButtonOverrides(l?new WorkflowColor(l):void 0,u?new WorkflowColor(u):void 0):void 0,o=e?Object.fromEntries(Object.keys(e).map(o=>e[o]&&[[`--${o}`],e[o]]).filter(e=>!!e)):{};return styled(Button)({[`&.${buttonClasses.iconOnly}`]:{minWidth:"auto",padding:8,lineHeight:0,"&.MuiButton-sizeSmall":{padding:6},"&.MuiButton-sizeLarge":{padding:10},"& .MuiButton-startIcon":{margin:0},"& .MuiButton-endIcon":{margin:0}},[`&.${buttonClasses.iconStacked}`]:{flexDirection:"column","& .MuiButton-startIcon":{marginTop:6,marginRight:0,marginLeft:0},"& .MuiButton-endIcon":{marginBottom:6,marginRight:0,marginLeft:0}},[`&.${buttonClasses.styleRounded}`]:{borderRadius:"1000px"},[`&.${buttonClasses.noBorder}`]:{border:0,outline:0},[`&.${buttonClasses.border}`]:{border:1,borderStyle:"solid"},[`&.${buttonClasses.border}:hover`]:{border:1,borderStyle:"solid",borderColor:"transparent"},...o})},[u,l]),{icon:m}=d,b=getIconPosition(d.iconPosition),g=useMemo(()=>{let e;return m&&(e=lazy(()=>import("@vertigis/react-ui/icons").then(e=>Promise.resolve({default:e[m]??NoIcon})))),e},[m]);let B,p;if(g){const e=React.createElement(Suspense,{fallback:m},React.createElement(g,null));switch(b){case"above":case"before":B=e;break;case"below":case"after":p=e}}const h=getEmphasis(d.emphasis),f=getShowBorder(h,d.showBorder),C=getItemSize(d.size),I=getBorderStyle(d.borderStyle),v=(B??p)&&0===Children.toArray(e).length,k=clsx(
|
|
1
|
+
import Button from"@vertigis/react-ui/Button";import{NoIcon}from"@vertigis/react-ui/icons";import{styled,useTheme}from"@vertigis/react-ui/styles";import clsx from"clsx";import*as React from"react";import{forwardRef,Children,useMemo,Suspense,lazy}from"react";import WorkflowColor from"../branding/WorkflowColor.js";import{createPalette}from"../branding/createPalette.js";import{getBorderStyle,getEmphasis,getIconPosition,getItemColors,getItemSize,getShowBorder}from"../utils.js";function emphasisToButtonProps(e,o){switch(o&&(e="high"),e){case"low":return{variant:"text",color:"inherit"};case"custom":case"medium":return{variant:"outlined",color:"inherit"};case"high":return{variant:"contained",color:"primary"};default:throw new Error(`Invalid value "${e}" for Emphasis.`)}}function generateButtonOverrides(e,o){const t=e=>Object.fromEntries(Object.entries(e).map(([e,o])=>[e,o.toCss()])),r=e&&t(createPalette(e)),n=o&&t(createPalette(o)),{accentIconForeground:s,buttonForegroundDisabled:a,buttonIcon:i,buttonIconDisabled:d,buttonIconHover:u,buttonBorderDisabled:l,buttonBorderHover:c,emphasizedButtonBackgroundDisabled:m}=r??{},{buttonBackgroundDisabled:b,emphasizedButtonBorderDisabled:g,emphasizedButtonBorderHover:B,emphasizedButtonForegroundDisabled:p,primaryBackground:h}=n??{};return{accentIconForeground:s,buttonBackground:o?.toCss(),buttonBackgroundDisabled:b,buttonBackgroundHover:e?.toCss(),buttonBorder:e?.toCss(),buttonBorderDisabled:l,buttonBorderHover:c,buttonForeground:e?.toCss(),buttonForegroundDisabled:a,buttonForegroundHover:o?.toCss(),buttonIcon:i,buttonIconDisabled:d,buttonIconHover:u,emphasizedButtonBackground:e?.toCss(),emphasizedButtonBackgroundDisabled:m,emphasizedButtonBackgroundHover:o?.toCss(),emphasizedButtonBorder:o?.toCss(),emphasizedButtonBorderDisabled:g,emphasizedButtonBorderHover:B,emphasizedButtonForeground:o?.toCss(),emphasizedButtonForegroundDisabled:p,emphasizedButtonForegroundHover:e?.toCss(),primaryBackground:h}}const PREFIX="WorkflowButton";export const buttonClasses={iconOnly:`${PREFIX}-icon-only`,iconStacked:`${PREFIX}-icon-stacked`,styleRounded:`${PREFIX}-rounded`,border:`${PREFIX}-border`,noBorder:`${PREFIX}-noBorder`};export default forwardRef(({children:e,className:o,disabled:t,item:r,onClick:n,title:s},a)=>{const i=useTheme(),d=r.appearance??{},{backgroundColor:u,foregroundColor:l}=getItemColors(d,i),c=useMemo(()=>{const e=u||l?generateButtonOverrides(l?new WorkflowColor(l):void 0,u?new WorkflowColor(u):void 0):void 0,o=e?Object.fromEntries(Object.keys(e).map(o=>e[o]&&[[`--${o}`],e[o]]).filter(e=>!!e)):{};return styled(Button)({[`&.${buttonClasses.iconOnly}`]:{minWidth:"auto",padding:8,lineHeight:0,"&.MuiButton-sizeSmall":{padding:6},"&.MuiButton-sizeLarge":{padding:10},"& .MuiButton-startIcon":{margin:0},"& .MuiButton-endIcon":{margin:0}},[`&.${buttonClasses.iconStacked}`]:{flexDirection:"column","& .MuiButton-startIcon":{marginTop:6,marginRight:0,marginLeft:0},"& .MuiButton-endIcon":{marginBottom:6,marginRight:0,marginLeft:0}},[`&.${buttonClasses.styleRounded}`]:{borderRadius:"1000px"},[`&.${buttonClasses.noBorder}`]:{border:0,outline:0},[`&.${buttonClasses.border}`]:{border:1,borderStyle:"solid"},[`&.${buttonClasses.border}:hover`]:{border:1,borderStyle:"solid",borderColor:"transparent"},...o})},[u,l]),{icon:m}=d,b=getIconPosition(d.iconPosition),g=useMemo(()=>{let e;return m&&(e=lazy(()=>import("@vertigis/react-ui/icons").then(e=>Promise.resolve({default:e[m]??NoIcon})))),e},[m]);let B,p;if(g){const e=React.createElement(Suspense,{fallback:m},React.createElement(g,null));switch(b){case"above":case"before":B=e;break;case"below":case"after":p=e}}const h=getEmphasis(d.emphasis),f=getShowBorder(h,d.showBorder),C=getItemSize(d.size),I=getBorderStyle(d.borderStyle),v=(B??p)&&0===Children.toArray(e).length,k=clsx(o,{[buttonClasses.iconOnly]:v,[buttonClasses.iconStacked]:!v&&("above"===b||"below"===b),[buttonClasses.styleRounded]:"rounded"===I,[buttonClasses.border]:f,[buttonClasses.noBorder]:!f});return React.createElement(c,{className:k,disabled:t,endIcon:p,onClick:n,ref:a,size:C,startIcon:B,title:s,...emphasisToButtonProps(h,r.default)},e)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buttonBaseClasses}from"@vertigis/react-ui/ButtonBase";import BaseDateTimePicker from"@vertigis/react-ui/DateTimePicker";import FormHelperText from"@vertigis/react-ui/FormHelperText";import{clockClasses}from"@vertigis/react-ui/TimeClock";import{styled}from"@vertigis/react-ui/styles";import*as React from"react";import{forwardRef,useContext,useEffect,useMemo,useRef,useState}from"react";import{areValuesEqual,getAmPm,getDateBounds,getNewElementValue,makeProperValue}from"../dateUtilities.js";import HostContext from"../hostContext.js";import{getKeyString}from"../keyboard.js";import{isInvalidError}from"../textUtilities.js";import{makeUniqueId}from"../utils.js";import DateTimeTextField from"./DateTimeTextField.js";import FormElement from"./FormElement.js";import{useFocusCallback}from"./common.js";const StylableDateTimePicker=e=>{const{className:t,slotProps:r,...o}=e;return React.createElement(BaseDateTimePicker,{slotProps:{...r,actionBar:{sx:{display:"none"}},popper:{...r?.popper,className:t}},...o})},StyledDateTimePicker=styled(StylableDateTimePicker)(({theme:{palette:e}})=>({[`& .${clockClasses.amButton}, .${clockClasses.pmButton}`]:{[`&.${buttonBaseClasses.focusVisible}`]:{color:e.action.active}}})),DateTimePicker=forwardRef(({className:e,element:t,enabled:r,error:o,format:a,name:s,prompt:i,setProperty:
|
|
1
|
+
import{buttonBaseClasses}from"@vertigis/react-ui/ButtonBase";import BaseDateTimePicker from"@vertigis/react-ui/DateTimePicker";import FormHelperText from"@vertigis/react-ui/FormHelperText";import{clockClasses}from"@vertigis/react-ui/TimeClock";import{styled}from"@vertigis/react-ui/styles";import*as React from"react";import{forwardRef,useContext,useEffect,useMemo,useRef,useState}from"react";import{areValuesEqual,getAmPm,getDateBounds,getNewElementValue,makeProperValue}from"../dateUtilities.js";import HostContext from"../hostContext.js";import{getKeyString}from"../keyboard.js";import{isInvalidError}from"../textUtilities.js";import{makeUniqueId}from"../utils.js";import DateTimeTextField from"./DateTimeTextField.js";import FormElement from"./FormElement.js";import{useFocusCallback}from"./common.js";const StylableDateTimePicker=e=>{const{className:t,slotProps:r,...o}=e;return React.createElement(BaseDateTimePicker,{slotProps:{...r,actionBar:{sx:{display:"none"}},popper:{...r?.popper,className:t}},...o})},StyledDateTimePicker=styled(StylableDateTimePicker)(({theme:{palette:e}})=>({[`& .${clockClasses.amButton}, .${clockClasses.pmButton}`]:{[`&.${buttonBaseClasses.focusVisible}`]:{color:e.action.active}}})),DateTimePicker=forwardRef(({className:e,element:t,enabled:r,error:o,format:a,name:s,prompt:i,setProperty:m,setValue:l,tooltip:n,value:c},u)=>{const p=useContext(HostContext),[d,f]=useState(!1),[T,k]=useState(!1),[x,E]=useState(!1),[g,D]=useState(null),P=useRef(),v={locale:p.deriveLocale(),timezone:(new Intl.DateTimeFormat).resolvedOptions().timeZone},F=useRef(!0),C=useFocusCallback(r,s,p),y=p.renderText(n),R="datetime",B=isInvalidError(o);useEffect(()=>{const e=makeProperValue(c),t=getNewElementValue(e,R,v);areValuesEqual(c,t)||l(t,!1),D(e||null)},[c]),useEffect(()=>{if(!x&&!T)if(d)B||m("error",{status:"invalid"});else{if(B&&m("error",void 0),F.current)return void(F.current=!1);S()}F.current=!1},[d,T,x]);const S=()=>{const e=getNewElementValue(g,R,v);areValuesEqual(c,e)||l(e)},b=e=>{"enter"!==getKeyString(e)||S()},{min:V,max:j}=getDateBounds(a),w=getAmPm(a),N=useMemo(()=>`${makeUniqueId(s)}-input`,[s]),I=p.renderText(i);return React.createElement(FormElement,{className:e,element:t,inputId:N,name:s,ref:u},e=>React.createElement(React.Fragment,null,B&&React.createElement(FormHelperText,{component:"div",error:!0,role:"alert"},P.current),React.createElement(StyledDateTimePicker,{ampm:w,disabled:!r,key:"date-picker",inputRef:e=>{C(e),e&&(P.current=e.dataset.formatString)},maxDateTime:j,minDateTime:V,onChange:e=>D(e),onClose:()=>E(!1),onError:e=>f(!!e),onOpen:()=>E(!0),open:x,slots:{textField:DateTimeTextField},slotProps:{textField:{error:!!o,id:N,inputProps:{...e,placeholder:I},onBlur:()=>k(!1),onFocus:()=>k(!0),onKeyDown:b,title:y}},value:g})))});export default DateTimePicker;
|
|
@@ -6,14 +6,14 @@ interface FormLabelNumberFieldProps {
|
|
|
6
6
|
endAdornment?: React.ReactNode;
|
|
7
7
|
id?: string;
|
|
8
8
|
inputProps: InputBaseProps["inputProps"];
|
|
9
|
-
onChange: (value: number | undefined) => void;
|
|
10
|
-
onKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
11
|
-
startAdornment?: React.ReactNode;
|
|
12
9
|
label: string;
|
|
13
|
-
value: number;
|
|
14
10
|
max: number;
|
|
15
11
|
maxDecimalPlaces?: number;
|
|
16
12
|
min: number;
|
|
13
|
+
onChange: (value: number | undefined) => void;
|
|
14
|
+
onKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
15
|
+
startAdornment?: React.ReactNode;
|
|
16
|
+
value: number;
|
|
17
17
|
}
|
|
18
18
|
declare const FormLabelNumberField: (props: FormLabelNumberFieldProps) => React.JSX.Element;
|
|
19
19
|
export default FormLabelNumberField;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { ListItemProps } from "@vertigis/react-ui/ListItem";
|
|
3
3
|
interface GeometryPickerListItemProps extends ListItemProps {
|
|
4
|
-
/**
|
|
5
|
-
* Numeric index referring to this item's position in the list.
|
|
6
|
-
*/
|
|
7
|
-
itemIndex: number;
|
|
8
4
|
/**
|
|
9
5
|
* Callback for when the user presses "Delete" while this item is focused.
|
|
10
6
|
*/
|
|
11
7
|
deleteItem: (itemIndex: number) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Numeric index referring to this item's position in the list.
|
|
10
|
+
*/
|
|
11
|
+
itemIndex: number;
|
|
12
12
|
/**
|
|
13
13
|
* Callback for updating the highlight style of the associated graphic on the map.
|
|
14
14
|
*/
|
|
@@ -12,13 +12,13 @@ interface StyledDialogProps {
|
|
|
12
12
|
clearCaption: string;
|
|
13
13
|
doneCaption: string;
|
|
14
14
|
format: string;
|
|
15
|
-
helperText: React.JSX.Element | null;
|
|
16
15
|
height: number;
|
|
16
|
+
helperText: React.JSX.Element | null;
|
|
17
17
|
host: FormHostMembers;
|
|
18
|
+
onClose: (confirm: boolean, dataUrl: string | undefined) => void;
|
|
18
19
|
title: React.JSX.Element | null;
|
|
19
20
|
undoCaption: string;
|
|
20
21
|
width: number;
|
|
21
|
-
onClose: (confirm: boolean, dataUrl: string | undefined) => void;
|
|
22
22
|
}
|
|
23
23
|
declare const SignatureDialog: ({ cancelCaption, clearCaption, doneCaption, format, height, helperText, host, title, undoCaption, width, onClose, }: StyledDialogProps) => React.JSX.Element;
|
|
24
24
|
export default SignatureDialog;
|
|
@@ -13,8 +13,6 @@ export type HistoryItem = DrawingHistoryItem | ImageHistoryItem;
|
|
|
13
13
|
* A history item for the end user drawing a line on the dialog.
|
|
14
14
|
*/
|
|
15
15
|
type DrawingHistoryItem = {
|
|
16
|
-
/** The tool used to draw the line. This determines which canvas the line is drawn onto. */
|
|
17
|
-
tool: ToolType;
|
|
18
16
|
/** The style for the ends of the line. */
|
|
19
17
|
lineCap: CanvasLineCap;
|
|
20
18
|
/** The thickness of the line. */
|
|
@@ -23,22 +21,24 @@ type DrawingHistoryItem = {
|
|
|
23
21
|
points: Point[];
|
|
24
22
|
/** The style used to draw the line. This is typically a colour. */
|
|
25
23
|
strokeStyle: string | CanvasGradient | CanvasPattern;
|
|
24
|
+
/** The tool used to draw the line. This determines which canvas the line is drawn onto. */
|
|
25
|
+
tool: ToolType;
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
28
|
* A history item for re-editing an existing sketch.
|
|
29
29
|
* This replaces the `DrawingHistoryItem` entries from the initial editing of the form.
|
|
30
30
|
*/
|
|
31
31
|
type ImageHistoryItem = {
|
|
32
|
-
/** The pen tool is specified here to ensure the image is drawn on the correct canvas. */
|
|
33
|
-
tool: "pen";
|
|
34
32
|
/** A data url representing the previous annotations. */
|
|
35
33
|
dataUrl: string;
|
|
34
|
+
/** The pen tool is specified here to ensure the image is drawn on the correct canvas. */
|
|
35
|
+
tool: "pen";
|
|
36
36
|
};
|
|
37
37
|
export interface SketchDialogResult {
|
|
38
38
|
dataUrl: string;
|
|
39
|
+
height: number;
|
|
39
40
|
history: HistoryItem[];
|
|
40
41
|
width: number;
|
|
41
|
-
height: number;
|
|
42
42
|
}
|
|
43
43
|
interface StyledDialogProps {
|
|
44
44
|
dataUrl: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import Box from"@vertigis/react-ui/Box";import FormLabel,{formLabelClasses}from"@vertigis/react-ui/FormLabel";import{styled}from"@vertigis/react-ui/styles";import clsx from"clsx";import{useCallback}from"react";import*as React from"react";import{hasContent,isMarkdown,markdownToText}from"../textUtilities.js";import{getAccessibleDescriptionId,getDescriptionId,getLabelId}from"../utils.js";import{formClasses}from"./Form.js";import Markdown from"./Markdown.js";export function renderTitle(e,r,t,o,s){return hasContent(t)?React.createElement(FormLabel,{className:formClasses.formElementTitle,component:s,htmlFor:o,id:getLabelId(e),required:!!r},React.createElement(Markdown,{inline:!0,text:t})):null}const DescriptionMarkdown=styled(Markdown)(({theme:{palette:e}})=>({[`&.${formLabelClasses.disabled}`]:{color:e.text.disabled}," p:first-of-type":{marginTop:0}}));export function renderDescription(e,r,t,o){return hasContent(e)?React.createElement(DescriptionMarkdown,{className:clsx(o,{[formLabelClasses.disabled]:!t}),id:getDescriptionId(r),text:e}):null}export function renderAccessibleDescription(e,r,t,o){let s=o.translateText(e);if(!s){const e=o.translateText(r);s=isMarkdown(e)?markdownToText(e.markdown):e}return s?React.createElement(Box,{hidden:!0,id:getAccessibleDescriptionId(t)},s):null}const ErrorMarkdown=styled(Markdown)(({theme:{palette:e}})=>({color:e.custom.errorText,fontStyle:"italic",backgroundColor:e.custom.errorBackground}));export function renderError(e){return hasContent(e)?React.createElement(ErrorMarkdown,{role:"alert",text:e}):null}export function useFocusCallback(e,r,t){return useCallback(e=>{Array.isArray(e?.thumbRefs)&&e.thumbRefs.length>0&&(e=e.thumbRefs[0].current),null===e||e.disabled||t.renderFocus(e,r)},[e,r,t])}
|
|
1
|
+
import Box from"@vertigis/react-ui/Box";import FormLabel,{formLabelClasses}from"@vertigis/react-ui/FormLabel";import{styled}from"@vertigis/react-ui/styles";import clsx from"clsx";import{useCallback}from"react";import*as React from"react";import{hasContent,isMarkdown,markdownToText}from"../textUtilities.js";import{getAccessibleDescriptionId,getDescriptionId,getLabelId}from"../utils.js";import{formClasses}from"./Form.js";import Markdown from"./Markdown.js";export function renderTitle(e,r,t,o,s){return hasContent(t)?React.createElement(FormLabel,{className:formClasses.formElementTitle,component:s,htmlFor:o,id:getLabelId(e),required:!!r},React.createElement(Markdown,{inline:!0,text:t})):null}const DescriptionMarkdown=styled(Markdown)(({theme:{palette:e}})=>({[`&.${formLabelClasses.disabled}`]:{color:e.text.disabled}," p:first-of-type":{marginTop:0}}));export function renderDescription(e,r,t,o){return hasContent(e)?React.createElement(DescriptionMarkdown,{className:clsx(o,{[formLabelClasses.disabled]:!1===t}),id:getDescriptionId(r),text:e}):null}export function renderAccessibleDescription(e,r,t,o){let s=o.translateText(e);if(!s){const e=o.translateText(r);s=isMarkdown(e)?markdownToText(e.markdown):e}return s?React.createElement(Box,{hidden:!0,id:getAccessibleDescriptionId(t)},s):null}const ErrorMarkdown=styled(Markdown)(({theme:{palette:e}})=>({color:e.custom.errorText,fontStyle:"italic",backgroundColor:e.custom.errorBackground}));export function renderError(e){return hasContent(e)?React.createElement(ErrorMarkdown,{role:"alert",text:e}):null}export function useFocusCallback(e,r,t){return useCallback(e=>{Array.isArray(e?.thumbRefs)&&e.thumbRefs.length>0&&(e=e.thumbRefs[0].current),null===e||e.disabled||t.renderFocus(e,r)},[e,r,t])}
|
package/forms/dateUtilities.d.ts
CHANGED
|
@@ -103,8 +103,8 @@ export declare function getLocaleDateFormatTokenPosition(token: "yyyy" | "dd" |
|
|
|
103
103
|
* start and end dates
|
|
104
104
|
*/
|
|
105
105
|
type DateRangeLike = (Date | number | string)[] | {
|
|
106
|
-
startDate: Date | string;
|
|
107
106
|
endDate: Date | string;
|
|
107
|
+
startDate: Date | string;
|
|
108
108
|
};
|
|
109
109
|
/**
|
|
110
110
|
* Attempts to convert user input into a valid DateRangeRef if possible. If arrays of dates,
|
|
@@ -126,8 +126,8 @@ type PartialValue = void | boolean | number | string | {
|
|
|
126
126
|
[name: string]: any;
|
|
127
127
|
format?: PartialValue | void;
|
|
128
128
|
locale?: string;
|
|
129
|
-
timezone?: string;
|
|
130
129
|
refValueType?: string;
|
|
130
|
+
timezone?: string;
|
|
131
131
|
value?: number;
|
|
132
132
|
};
|
|
133
133
|
export declare function makeProperValue(value: number | string | PartialValue): Date | undefined;
|
|
@@ -7,12 +7,12 @@ import type * as defs from "../FormDefinition";
|
|
|
7
7
|
export type Text = string | defs.MarkdownRef;
|
|
8
8
|
/** Properties common to all Elements, except the Header. */
|
|
9
9
|
export interface ElementBase {
|
|
10
|
+
/** Indicates the name of the style that will be applied to the element. */
|
|
11
|
+
readonly styleName?: string;
|
|
10
12
|
/** Indicates the type of the element. */
|
|
11
13
|
readonly type?: string;
|
|
12
14
|
/** Indicates that the element is visible or not. */
|
|
13
15
|
readonly visible?: boolean;
|
|
14
|
-
/** Indicates the name of the style that will be applied to the element. */
|
|
15
|
-
readonly styleName?: string;
|
|
16
16
|
}
|
|
17
17
|
/** Exposes the Element.enabled and Element.error properties. */
|
|
18
18
|
export interface EditableElement {
|
package/forms/index.d.ts
CHANGED
|
@@ -83,13 +83,13 @@ export type PropertyChangeEvent<TSettableProps, TSetProperty> = Unionize<{
|
|
|
83
83
|
export interface FormElementRegistration<TProps extends FormElementProps<any> = FormElementProps, TSettableProps extends SettablePropsFromProps<TProps> = SettablePropsFromProps<TProps>> {
|
|
84
84
|
/** The React component definition of the form element. */
|
|
85
85
|
component: React.ComponentType<TProps>;
|
|
86
|
-
/** The unique identifier of the element. */
|
|
87
|
-
id: string;
|
|
88
86
|
/**
|
|
89
87
|
* Generate the initial properties of the form element. This will be assigned to
|
|
90
88
|
* the element properties before first render.
|
|
91
89
|
*/
|
|
92
90
|
getInitialProperties?: () => Partial<TSettableProps>;
|
|
91
|
+
/** The unique identifier of the element. */
|
|
92
|
+
id: string;
|
|
93
93
|
/**
|
|
94
94
|
* This function will be invoked prior to updating a property of the element
|
|
95
95
|
* state. It will be invoked even if the element isn't currently visible.
|
|
@@ -42,14 +42,6 @@ export declare enum NumberDisplayFormat {
|
|
|
42
42
|
* Options supported by {@link format}.
|
|
43
43
|
*/
|
|
44
44
|
export interface FormatOptions {
|
|
45
|
-
/**
|
|
46
|
-
* The locale to use when formatting the number.
|
|
47
|
-
*/
|
|
48
|
-
locale: string;
|
|
49
|
-
/**
|
|
50
|
-
* The number format. See {@link NumberFormatter.format}.
|
|
51
|
-
*/
|
|
52
|
-
format?: NumberDisplayFormat;
|
|
53
45
|
/**
|
|
54
46
|
* See NumberFormat.currency.
|
|
55
47
|
*/
|
|
@@ -58,10 +50,18 @@ export interface FormatOptions {
|
|
|
58
50
|
* The custom number format. Required for a format type of 'Custom'
|
|
59
51
|
*/
|
|
60
52
|
customDisplayFormat?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The number format. See {@link NumberFormatter.format}.
|
|
55
|
+
*/
|
|
56
|
+
format?: NumberDisplayFormat;
|
|
61
57
|
/**
|
|
62
58
|
* See NumberFormat.precision.
|
|
63
59
|
*/
|
|
64
60
|
fractionalDigits?: number;
|
|
61
|
+
/**
|
|
62
|
+
* The locale to use when formatting the number.
|
|
63
|
+
*/
|
|
64
|
+
locale: string;
|
|
65
65
|
}
|
|
66
66
|
export declare const DEFAULT_CURRENCY = "USD";
|
|
67
67
|
export declare const DEFAULT_CUSTOM_FORMAT = "#.##";
|
|
@@ -93,8 +93,8 @@ export declare function areValuesEqual(elementValue: defs.Value | undefined, new
|
|
|
93
93
|
* We use string rather than React.Node so that we can share this between runtime and designer without discrepancies between the typings.
|
|
94
94
|
*/
|
|
95
95
|
interface Mark {
|
|
96
|
-
value: number;
|
|
97
96
|
label?: string;
|
|
97
|
+
value: number;
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
100
|
* Gets marks to be used with the @vertigis/react-ui/Slider component.
|
package/forms/utils.d.ts
CHANGED
|
@@ -4,6 +4,12 @@ import type { ElementTuple } from "./FormDefinition";
|
|
|
4
4
|
import type * as defs from "./FormDefinition";
|
|
5
5
|
import type { FormElementProps } from "./index";
|
|
6
6
|
import type { Theme } from "@vertigis/react-ui/styles";
|
|
7
|
+
export interface DebounceResult {
|
|
8
|
+
/** Do not invoke the scheduled function at all. */
|
|
9
|
+
cancel: () => void;
|
|
10
|
+
/** Invoke the scheduled function immediately, without any further delay. */
|
|
11
|
+
now: () => void;
|
|
12
|
+
}
|
|
7
13
|
/**
|
|
8
14
|
* Constraints for a property that may specify a default value and bounds.
|
|
9
15
|
*/
|
|
@@ -33,12 +39,6 @@ export interface PropertyConstraintsWithMinimum<T> extends PropertyConstraints<T
|
|
|
33
39
|
export interface FormElementPropertyConstraints {
|
|
34
40
|
[key: string]: PropertyConstraints<any> | undefined;
|
|
35
41
|
}
|
|
36
|
-
export interface DebounceResult {
|
|
37
|
-
/** Invoke the scheduled function immediately, without any further delay. */
|
|
38
|
-
now: () => void;
|
|
39
|
-
/** Do not invoke the scheduled function at all. */
|
|
40
|
-
cancel: () => void;
|
|
41
|
-
}
|
|
42
42
|
/**
|
|
43
43
|
* Exporting text since it was split out from here into it's own file as part of the designer
|
|
44
44
|
* CRA migration. This was necessary since babel does not support namespaces.
|
|
@@ -151,12 +151,6 @@ export declare function isNumberRef(value: defs.Value | undefined): value is def
|
|
|
151
151
|
export declare function sanitizeGeometryRef(value: defs.Value | undefined): defs.GeometryRef | undefined;
|
|
152
152
|
/** @product This is intended for internal use only within VertiGIS Studio products. */
|
|
153
153
|
export declare function createGeometryRef(format: defs.GeometryFormat): defs.GeometryRef;
|
|
154
|
-
export interface DebounceResult {
|
|
155
|
-
/** Invoke the scheduled function immediately, without any further delay. */
|
|
156
|
-
now: () => void;
|
|
157
|
-
/** Do not invoke the scheduled function at all. */
|
|
158
|
-
cancel: () => void;
|
|
159
|
-
}
|
|
160
154
|
/**
|
|
161
155
|
* Creates a debounced function that will invoke the given function
|
|
162
156
|
* only after the function has not been called for the duration of the delay.
|
package/libs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "5.
|
|
1
|
+
export declare const VERSION = "5.50.0+14";
|
package/libs/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION="5.
|
|
1
|
+
export const VERSION="5.50.0+14";
|
package/package.json
CHANGED
package/ui/UIService.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import type { ElementType, ReactNode } from "react";
|
|
|
6
6
|
* to allow Web to call its version.
|
|
7
7
|
*/
|
|
8
8
|
export declare class UIService {
|
|
9
|
-
private _children;
|
|
10
9
|
private _DialogComponent;
|
|
10
|
+
private _children;
|
|
11
11
|
private resolve;
|
|
12
12
|
private root;
|
|
13
13
|
private readonly rootElementId;
|
|
@@ -16,8 +16,8 @@ export declare class UIService {
|
|
|
16
16
|
* @param rootElementId The id of the element in the DOM that will contain the dialog.
|
|
17
17
|
*/
|
|
18
18
|
constructor(rootElementId: string);
|
|
19
|
-
displayDialog: (children: (closeDialog: () => void) => ReactNode, DialogComponent: ElementType<any>) => Promise<void>;
|
|
20
19
|
closeDialog: () => void;
|
|
20
|
+
displayDialog: (children: (closeDialog: () => void) => ReactNode, DialogComponent: ElementType<any>) => Promise<void>;
|
|
21
21
|
renderDialog: (open: boolean) => null | undefined;
|
|
22
22
|
wrapProviders: (content: React.JSX.Element) => React.JSX.Element;
|
|
23
23
|
}
|
package/ui/UIService.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import React from"react";import{createRoot}from"react-dom/client";export class UIService{constructor(e){this.
|
|
1
|
+
import React from"react";import{createRoot}from"react-dom/client";export class UIService{constructor(e){this.closeDialog=()=>{this.renderDialog(!1),this.resolve(),this._children=void 0,this._DialogComponent=void 0,this.resolve=void 0},this.displayDialog=(e,o)=>new Promise(t=>{this._children=e(this.closeDialog),this._DialogComponent=o,this.resolve=t,this.renderDialog(!0)}),this.renderDialog=e=>{const o=this._DialogComponent,t=this._children;if(!o)return null;if(!this.root){const e=document.getElementById(this.rootElementId);this.root=createRoot(e)}this.root.render(this.wrapProviders(React.createElement(o,{open:e},t)))},this.wrapProviders=e=>(console.warn("UIService.wrapProviders should be overridden by the client."),e),this.rootElementId=e}}
|