For the publicly available ones I only have exposed mx.ui.get from the Client API within a Pluggable widget. The call can be found here:
You do need to make sure you install the Client API with npm install. See package json:
And add it to your compiler options:
From a more fancy version of the ArcGIS widget, not available in the Marketplace, with Mendix modals whilst loading I have implemented the progress modal like this:
// display either blocking Mendix progress bar or a loading indicator when the view is updating
whenTrue(view, "updating", () => {
if (props.loadingModal) {
progressIdRef.current = mx.ui.showProgress(props.loadingModalMessage, true);
} else if (!props.loadingModal && loadingDiv.current) {
loadingDiv.current.style.visibility = "";
}
// console.error(logNode + "updating..");
});
// hide the loading indicator when the view stops updating
whenFalse(view, "updating", () => {
if (props.loadingModal && progressIdRef.current) {
mx.ui.hideProgress(progressIdRef.current);
} else if (!props.loadingModal && loadingDiv.current) {
loadingDiv.current.style.visibility = "hidden";
}
// console.error(logNode + "updating done..");
});
Two additions:
return (
<div className="mapDiv" ref={mapDiv}>
{!props.loadingModal ? (
<div id="loading" ref={loadingDiv}>
</div>
) : null}
</div>
);
This is not possible yet with the Pluggable widgets API. How I have solved this in multiple widgets is by loading the Client API and using the Mx.ui.showProgress function.