A panel component that extends GirafeResizableElement. Used as main Left and Right panels on the app. It has a state toggle manager that can activate or deactivate toggle paths based on changes in its state. It also has methods to shows/hide itself based on the state toggle paths and state.
To have the toggle on the state working, the component must have this structure, with a slot="main" and children with the data-toggle-path set:
Optional
MDN Reference
Protected
Closes the panel by deactivating all state toggles and hiding itself.
Deserialize an element and set the current element state to the deserialized one
The element serialization as returned by the serialize method
When the component is disconnected from the DOM all the callbacks will be unregistered
Hide the component (display: none).
Convert the string in parameter with uHtml and return it. This allows to convert a string with html in a right html object. For example, htmlUnsafe('
NOTE REG: We cannot just use truthy here, because javascript comparaison table is really problematic. For example: 0 == false [] == false "" == false And there are cases where we want to check null or undefined, because 0 can be a right value. More here : https://dorey.github.io/JavaScript-Equality-Table/
Re-Render the component. The method should be called when the component has already been rendered and needs to be updated.
Render the component's template.
Renders a hidden span with the name of the component. Useful to render a placeholder for not visible component.
Returns the serialization of the current element. This method should be overwritten by child classes
An object describing the current element serialized
Show the component (display: block).
In the templates, sometimes for accessibility reasons, we have to support the KeyDown Event In those case, we often juste want to do the same as the click event when Enter or Space is pressed Then this method can be used : it just calls the click event on the same element
Subscribes with to the state changes made on
Unsubscribe all callbacks