Title

Global

Methods

# protected _bindErrorHandler()

Makes the controller listen for the EVENT_SEND_ERROR event and show the error toast to the user

.

Makes the controller listen for the EVENT_SEND_ERROR event and show the error toast to the user

View Source LocalizedController.js, line 339

# protected _bindMessageHandler()

Makes the controller listen for the EVENT_SEND_MESSAGE event and show the toast to the user

.

Makes the controller listen for the EVENT_SEND_MESSAGE event and show the toast to the user

View Source LocalizedController.js, line 352

# protected _getLoader(message, optionsopt) → {ion-loading}

Instantiates a new Spinner

API:

    const loader = controller._getLoader('message', options);
    await loader.present();
    ...

Instantiates a new Spinner

API:

    const loader = controller._getLoader('message', options);
    await loader.present();
    ...
    await loader.dismiss();

for styling the class

Parameters:
Name Type Attributes Description
message string
options object <optional>

accepts params:

  • duration duration in ms. (no duration or 0) makes the spinner stay until dismissed (defaults to 0);
  • cssClass css class to append. defaults to 'ion-loading'
  • translucent defaults to true

View Source LocalizedController.js, line 308

a spinner

ion-loading

# bindLocale(controller, pageNameopt, enableValidationsopt)

Adds the locale info to the model.

Adds the locale info to the model.

Parameters:
Name Type Attributes Description
controller LocalizedController
pageName string <optional>
enableValidations boolean <optional>

defaults to false. If provided enabled Ionic Inputs form validations

View Source LocalizedController.js, line 329

# closeIonicModal()

Deprecated:
  • Yes

View Source LocalizedController.js, line 81

Parameters:
Name Type Description
tabName
props

View Source LocalizedController.js, line 374

# on(eventName, handler, options)

Override just for the special case of EVENT_SSAPP_HAS_LOADED to set it on document body and not the element it self because its raised on the body level

.

Override just for the special case of EVENT_SSAPP_HAS_LOADED to set it on document body and not the element it self because its raised on the body level

Parameters:
Name Type Description
eventName
handler
options

View Source LocalizedController.js, line 388

# refresh(detailopt)

Calls Refresh on the controller

.

Calls Refresh on the controller

Parameters:
Name Type Attributes Description
detail Object <optional>

option props to pass on the event

View Source LocalizedController.js, line 365

# async showAlert(message, options) → {HTMLElement}

Shows an alert with the specified message.

Shows an alert with the specified message.

Standard Usage:

  const alert = await controller.showAlert('this is an alert message');
  const { role } = await alert.onDidDismiss();
  console.log('onDidDismiss resolved with role', role);
  if (role === 'confirm') ...
  if (role === 'cancel') ...
Parameters:
Name Type Description
message string
options object

object with additional configuration options:

  {
    cssClass: '...' css class to be used. defaults to 'ssapp-alert'
    header: '...' Title text (optional)
    subHeader: '...' subTitle text (optional)
    buttons: [
      {
        text: '...' button text,
        role: '...' sets a role to be caught by the handler method
        cssClass: '...' additional styling
        handler: (e) => {      (optional and not recommended)
           console.log(e);
        }
      }
    ]
  }

defaults to:

  {
   buttons: [
     {
       text: 'Ok',
       role: 'confirm'
     },
     {
       text: 'Cancel',
       role: 'cancel'
     }
   ]
  }

View Source LocalizedController.js, line 205

HTMLElement

# showBarcodeScanner(propsopt, callback)

Integrates with PdmBarcodeScannerController.

Integrates with PdmBarcodeScannerController. that mean that element needs to be somewhere, typically inside ion-tabs

Parameters:
Name Type Attributes Description
props Object <optional>

props to pass to scanner:

  • title: the modal title. falls back to its barcode-title prop
callback function

View Source LocalizedController.js, line 107

# async showConfirm(message, confirmText, cancelText) → {Promise.<HTMLElement>}

Shows a confirmation Popup

.

Shows a confirmation Popup

Parameters:
Name Type Default Description
message string

the message

confirmText string

the ok button text

cancelText string Cancel

the cancel button text

View Source LocalizedController.js, line 241

Promise.<HTMLElement>

# showErrorToast(message, erropt)

Shows a Toast via showToast with

  • header: 'Error'
  • cssClass: 'danger
  • button: 'Close'
.

Shows a Toast via showToast with

  • header: 'Error'
  • cssClass: 'danger
  • button: 'Close'
Parameters:
Name Type Attributes Description
message string
err err <optional>

View Source LocalizedController.js, line 94

# showIonicModal(modalName, swipeToCloseopt, paramsopt)

Shows an Ionic model

.

Shows an Ionic model

Parameters:
Name Type Attributes Description
modalName string

the modal's name registered via:

    customElements.define('registration-modal', class extends HTMLElement{
         connectedCallback(){
             this.innerHTML = `
                 
                     Title
                     
                         Content
                     
                 `
             }
         });
swipeToClose boolean <optional>

enables slideToClose when available. defaults to false

params object <optional>

passes param to modal (ionic functionality)

Deprecated:
  • Yes

View Source LocalizedController.js, line 62

# async showPopup(popupOptions:, callbackopt) → {Promise.<HTMLElement>}

Parameters:
Name Type Attributes Description
popupOptions: Object

{ message: string; generic message confirmText: string; cancel button label cancelText: string; cancel button label options: alert ionic options }

callback function <optional>

View Source LocalizedController.js, line 268

Promise.<HTMLElement>

# showToast(message, headeropt, cssClassopt, button, buttonHandler)

Shows Toast Alert

.

Shows Toast Alert

Parameters:
Name Type Attributes Description
message string
header string <optional>

if given will be presenter in the header

cssClass string | Array.<string> <optional>
button string

the text on the close button

buttonHandler function

View Source LocalizedController.js, line 131