Merge fix-sum-overflow (lts-4.2) into lts-4.3 and adapt to the 4.3
code structure.
In 4.3 the rounding is centralized in NumberUtils.roundResult (not
TbUtils.toInt as in 4.2), so the fix moves there: rename toInt(double)
to toLong(double) and have the precision=0 path return a long.
BigDecimal.intValue() returned only the low-order 32 bits, so a
calculated field SUM above ~2.1B wrapped to a negative number
(e.g. 3,980,173,734 -> -314,793,562) when "Decimals by default"
was 0 (the UI default).
The 4.2 TbUtils.toLong addition is dropped since TbUtils.toInt is
not used in 4.3 (CF rounding flows through NumberUtils only).
SimpleCalculatedFieldState.createResultJson gains a Long branch so
the JSON node is emitted as a numeric long; the aggregation path
already routes through JacksonUtil.toString, which handles Long
transparently.
SimpleCalculatedFieldState.formatResult cast the double result down to
int via TbUtils.toInt when "Decimals by default" was 0 (the UI default).
BigDecimal.intValue() returns only the low-order 32 bits, so a sum
above ~2.1B wrapped to a negative number (e.g. 3,980,173,734 ->
-314,793,562).
Add TbUtils.toLong(double) alongside toInt (toInt is left untouched to
preserve TBEL script behavior), switch the CF precision=0 path to it,
and add a Long branch in createResultJson so the JSON node is emitted
as a numeric long
--no-bytecode is only required for the Windows target; running pkg as a
single multi-target invocation applied it to Linux too, dropping V8
bytecode from the Linux exe. Split into two pkg invocations so Linux
keeps bytecode and only the Windows build relaxes it.
- Split the settings dialog into a resizable two-pane layout (left:
resources/HTML/CSS/JS tabs; right: live preview) using split.js,
with a fullscreen toggle that resets the tab animation duration to
avoid jank during expand.
- Split ContainerFunctionEditorCompleter into HTML- and Angular-mode
variants so the autocomplete suggests `container` only in HTML
mode (Angular mode has no container argument).
- Mark the widget with previewWidth/previewHeight 100% and
overflowVisible: true in its controllerScript typeParameters so
the basic config preview fills its slot.
ImageService.replaceBase64WithImageUrl rewrites base64 data URIs into
system-image URLs at save time. After install, the DB image is a
'tb-image;...' URL while the JSON file still carries a base64 data URI —
naive string compare always reported a diff and caused every system
bundle to be re-saved on every patch run.