Repository - API - Source
isOnMobileDevice
, which tries its best to detect whether the current user is running on a mobile device.LocalRouter
route parameter types: nullableStringParameter
and nullableNumberParameter
.(feature) Add mountDataContainer
and mountLazyDataContainer
, which mounts on top of a data container (<script type="application/json">{...}</script>
),
which is parsed and passed in as the very first argument of the mountable data container function.
Note: The mountable data container function does not receive a reference to the data container. It is intended to work independent of its data container.
useSortable
.mountJsxAndWrap
function.LocalRouter
must keep existing query parameters to not break any pages.escapeRegexp()
function and remove dependency to escape-string-regexp
(since it is not compatible with IE 11).useLiveRef()
.DataContainer
.initializeDumpedToasts()
.message
in ToastManagerInterface.add()
.FetchClient
.FetchClient
.FetchClient
.!default
in toast SCSS.LoaderInterface
.FetchClient
.onSetCallback
to useDebounced
. This callback is called every time the value is updated..neutral()
, .positive()
and .negative()
convenience method to ToastManager
.options
in FetchClient.request()
optional.OverlayLoader
UI component.ToastManager
UI component.preact
+ update tsconfig.encodeCookieOptions
.createComponentInitializer
+ ComponentManager
.mojaveIntegration.FetchClientInterface
.FetchClient
.AjaxResponse
interface.form-helpers
.Sortable
events more strict..
.lax
as default Same-Site
for cookies.LocalRouter
.Sortable
.extend()
+ merge()
.useDebounced()
hook.useSortable()
hook more robust against heavily re-rendered elementsuseLiveRef()
hook._mojave-dragged-item
class on dragged item in sortable.initDismissableContainer()
.initDismissableContainer()
.destroy
option in return value for initDismissableContainer()
.hasOwnProperty()
.toStringArray
.z-index
in Sortable after drag.getCookie()
method to read a cookie string set with formatCookieString()
.getCookie()
has been added.formatCookieString()
and setCookie()
. Additionally {sameSite: "strict"}
is set as a default. Other possible values include "lax"
and null
. null
will hinder the sameSite
attribute of being set in a cookie.toggleClass
.HTMLElement[]
instead of a CSS selector into all mount*
versions to directly mount on specific elements.item
+ before
in the Sortable
result (to integrate with the new RAD bundle).Sortable::destroy()
.useSortable()
hook.json
storeInLocalStorage()
and fetchFromLocalStorage()
.classes()
is now variadic and can also take string arguments. Also any truthy/falsy values are now supported in objects.null
as element to parseElementAsJson()
popup-interaction::initDismissableContainer()
now returns the close function. This way you can wire up your own close buttons, so
that they are handled correctly.popup-interaction::initDismissableContainer()
can now handle multiple opener triggers.ts-toolbelt
is a required dependency.(parallel release to 4.6.0
)
formatDateTime()
and formatDateTime()
.DateFormatter
.popup-interaction::initDismissableContainer()
and popup-interaction::registerBodyClickHandler()
.MediaQueryMatcher
.useMediaQueryMatcher(mediaQueryMatcher)
.dom/wire/wireSourceTargetLists()
mediaQueryMatcher()
as a for attaching event listeners to window.matchMedia()
without checking for the existence of addListener()
or addEventListener()
yourself.storage/local-storage::persistedToggle
params
are set in mountJsx
, they only need to be a partial set of the props of the component now (as the rest can come from the mounted JSON container).onOff
for easy event use in (preact) hooks.mount
into three methods:mount
for mounting function
smountClass
for mounting StandaloneComponent
smountJsx
for mounting Preact components (functional and class)mountLazy
into three methods:mountLazy
for mounting function
smountLazyClass
for mounting StandaloneComponent
smountLazyJsx
for mounting Preact components (functional and class){ type: "func"|"class"|"jsx" }
property from derived mojave.MountOptions
s.mojave.MountOptions
's specific implementations have been updated to add support for automatic parameter inference:mojave.ClassMountOptions
has been made generic: mojave.ClassMountOptions<TClass extends mojave.MountableClass>
mojave.FunctionMountOptions
has been made generic: mojave.FunctionMountOptions<TFunction extends mojave.MountableFunction>
mojave.ComponentMountOptions
has been made generic: mojave.ComponentMountOptions<TComponent extends ComponentClass<any> | FunctionComponent<any>>
formatDateTime()
and formatDateTime()
.DateFormatter
.isStatusFailure()
.initFromGlobalData()
if the element is not missing, but has an invalid structure. Ignore missing keys.hasOwnProperty()
in all of mojave's functions.inNextFrame()
timing function.initFromGlobalData()
.initFromGlobalData()
.toggleClass()
.isChildElement()
.scrollToElement()
.request()
. Also several type guard helper functions were added, to more easily handle failed requests.parseElementAsJson()
that automatically parses JSON from the content of a node and removes HTML escaping.getScrollParent()
, that fetches a scrollable parent of an element.onNextAnimationFrame()
.hasOwnProperty()
.hydrate
option when mounting JSX components. It decides whether hydrate: false/undefined
-> the body is parsed as JSON (and passed as props) and the mounting node is removedhydrate: true
-> the mounting node is left untouched and preact mounts on this node (if possible). The content is not parsed as JSON.getData()
, setData()
, getAttr()
, addClass()
and removeClass()
mount()
function.mount()
function: support JSX, classes and functions. Also simplify the function interface.mountLazy()
function, that mirrors the mount()
function, except that it loads the component lazily.mount*()
can now also mount functions.safeParseJson()
as a safe and easy way to parse JSON.preact
was bumped to 10.xcreate*Element()
dom/form
. Inline the implementation instead.unistore
. Implement it yourself instead.index::mountJsxWithStore()
. No alternative present, you need to wrap it yourself.ui/Slug
is no longer a default export but instead a named export.dom/form
. Inline the implementation instead.unistore
. Implement it yourself instead.index::mountJsxWithStore()
. No alternative present, you need to wrap it yourself.