Mostly required to log errors properly
In the regex below, the command: will only match urls that are of the command scheme. To match any urls, remove 'command:' Note that this is intended to be used on matches from the above and does not match the pattern in a raw feature template string.
A regex to find a value wrapped in curly braces. Used to find 'double wrapped' replacement tokens, which should not be replaced as they are likely part of command parameters.
Attempt to execute the given string as an Arcade script, using the given feature as context If the script contains '$map' or '$layer' variables these will also be added to the execution context. Please note that '$layer' requires that the feature itself come from a FeatureLayer, and non-FeatureLayers in the map are not accessible through the '$map' global.
The script to run.
The feature to use as context for the script.
Arcade scripts can return string or numeric values. Scripts that query other datasources return a promise of this value.
Uses a bracket counting method to find potential tokens to replace within a template string, eg: {FIELD_NAME} We use this method (rather than a regex) as some replacement tokens can be Arcade scripts, which potentially contain curly braces themselves. To ensure complete accuracy, curly braces inside quotes inside a token will be ignored, so this doesn't cause issues: {$feature.FIELD + "}"}
The template string to process
'Type Guard' for arcade scripts. Checks a string for arcade globals '$feature' '$map' '$layer' '$view' If it doesn't contain one of these we are not going to try to process it.
A very loose type guard to detect promises made by ESRI, which are not instances of Promise but can be treated as such. Watch out with this though, as the presence of a 'then' method does not mean that everything in the Promise spec has been implemented.
The object to test.
Determines whether two Geocortex Essentials features are structurally equal
Structural equality means that two objects are equal because they have equal values.
It differs from reference equality, which indicates that two object references are equal because they reference the same physical object.
Note: This comparison does not take geometry into account
true
if the two objects are equal; otherwise, false
.
Matches an anchor tag