client/src/luigi-client.js
function showConfirmationModal(settings) {
        window.parent.postMessage(
          {
            msg: 'luigi.ux.confirmationModal.show',
            data: {
              settings
            }
          },
          '*'
        );
        promises.confirmationModal = {};
        promises.confirmationModal.promise = new Promise((resolve, reject) => {
          promises.confirmationModal.resolveFn = resolve;
          promises.confirmationModal.rejectFn = reject;
        });
        return promises.confirmationModal.promise;
      }
function showConfirmationModal(settings) {
        window.parent.postMessage(
          {
            msg: 'luigi.ux.confirmationModal.show',
            data: {
              settings
            }
          },
          '*'
        );
        promises.confirmationModal = {};
        promises.confirmationModal.promise = new Promise((resolve, reject) => {
          promises.confirmationModal.resolveFn = resolve;
          promises.confirmationModal.rejectFn = reject;
        });
        return promises.confirmationModal.promise;
      }
function showConfirmationModal ( settings ) { window . parent . postMessage ( { msg : 'luigi.ux.confirmationModal.show' , data : { settings } } , '*' ) ; promises . confirmationModal = { } ; promises . confirmationModal . promise = new Promise ( ( resolve , reject ) => { promises . confirmationModal . resolveFn = resolve ; promises . confirmationModal . rejectFn = reject ; } ) ; return promises . confirmationModal . promise ; }
Shows a confirmation modal.
@param {Object} [settings] the settings the confirmation modal. If no value is provided for any of the fields, a default value is set for it
@param {string} [settings.header="Confirmation"] the content of the modal header
@param {string} [settings.body="Are you sure you want to do this?"] the content of the modal body
@param {string} [settings.buttonConfirm="Yes"] the label for the modal confirm button
@param {string} [settings.buttonDismiss="No"] the label for the modal dismiss button
@returns {promise} which is resolved when accepting the confirmation modal and rejected when dismissing it
Shows a confirmation modal .