sdi_appstate-ui

This bundle contains the components for the user interface of map.apps SDI app state management.

Usage

App states are saved in the map.apps SDI database on the server, so it is required to install and configure the map.apps SDI savestate backend web application on the application server. You can find detailed installation instructions in the map.apps SDI product documentation.

Configuration Reference

The following sections describe the configurable components and properties.

FilteredAppStateStoreFactory

If the listOwnSharedAppStates property is true, only the app states for the currently logged-in user are shown in the list.

{
    "sdi_appstate-ui": {
        "FilteredAppStateStoreFactory": {
            "listOwnSharedAppStates": false
        }
    }
}

StateController

The askBeforeLoading property can be used to control whether a confirmation dialog should be shown before an app state is loaded.

The default value is true.

NOTE: When loading an app state from the list in map.apps Manager, a confirmation dialog is never displayed. The app will always open in a new browser tab.

Example

{
    "sdi_appstate-ui": {
        "StateController": {
            "askBeforeLoading": true
        }
    }
}

Configure role-alias and aria-labels for StateDetail Widget

The StateDetails widget for editing an app state includes a matrix for setting the user permissions on that app state. You can configure the labels of the user roles in that permission matrix, that means how the roles "public", "private", and all other roles that the current user possesses, are denoted.

You can change the labels by overriding the corresponding properties in the internationalization (i18n) files of the sdi_appstate-ui bundle as documented in map.apps.

The following example from a custom bundle.js file demonstrates the configuration of new labels for the special roles _public_ and _private_, as well as for the roleXY.

{
    "sdi_appstate-ui": {
        "stateDetails": {
            "permissions": {
                "roleAlias": {
                    "_public_": "Owner",
                    "_private_": "Everyone",
                    "roleXY": "Role YZ"
                },
                "ariaLabels": {
                    "viewCheckbox": "${role} may view",
                    "editCheckbox": "${role} may edit"
                }
            }
        }
    }
}

As you can see in the example, you can also modify 'aria-labels'. These define what a screen reader will read when the user tabs over the view and edit checkboxes.

StateDetailsModelFactory

The visibilityOptions property controls the options that will be displayed in the permission matrix.

The allowedRoles property controls the user roles that a state can be shared with.

The enableUpdateMapChanges property controls whether users could update the app state data when edit an app state.

{
    "sdi_appstate-ui": {
        "StateDetailsModelFactory": {
            "visibilityOptions": [
                "PUBLIC",
                "PRIVATE",
                "ROLES",
                "VIEW",
                "EDIT"
            ],
            "allowedRoles": [
                "role1",
                "role2"
            ],
            "enableUpdateMapChanges": true
        }
    }
}

StateColumnExtender

The showLinkButton property controls whether to show the "Create link" button next to every app state in the app state list.

{
    "sdi_appstate-ui": {
        "StateColumnExtender": {
            "showLinkButton": true
        }
    }
}