Update several Spina-related attributes to be static in prep for Spina 2.
Review Request #12903 — Created March 21, 2023 and submitted
The new Spina-based classes recently introduced made use of a nice
feature we had in Spina 1 where you could reference private methods or
include inline functions in event handlers.
Unfortunately, this was only allowed because these mappings were being
rebuilt for every single instance of every class. Plus, they weren't
accessible outside of those classes, meaning other subclasses couldn't
merge them in.
Spina 2 will be addressing the access/merging limitation by expecting
each of these to be static. Unfortunately, that means we can no longer
specify private methods or inline functions. Instead, we need to revert
back to the earlier approach of passing in strings representing function
This change prepares for that by changing
private _functions(), and specifying them in the maps. It also
converts some templates that were defined as instance variables to be
The event mappings and some other state will be made static in the
upcoming move to Spina 2.
All unit tests pass.
Also tested along with upcoming changes for Spina 2.
Audited all TypeScript in the codebase, making sure there weren't any
classes remaining that needed to be updated, both for this change and
the final move to