How to use the svelte.createEventDispatcher function in svelte

To help you get started, we’ve selected a few svelte examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SAP / luigi / core / src / App.html View on Github external
GenericHelpers,
    StateHelpers,
    RoutingHelpers,
    IframeHelpers,
    AuthHelpers
  } from './utilities/helpers';
  import { LuigiI18N, LuigiConfig, LuigiElements } from './core-api';
  import { Navigation } from './navigation/services/navigation';
  import { Routing } from './services/routing';
  import { Iframe } from './services/iframe';
  import { SplitViewSvc } from './services/split-view';
  import { ViewGroupPreloading } from './services/preloading';
  import { MessagesListeners } from './services/messages-listeners';
  import { thirdPartyCookiesStatus } from './utilities/third-party-cookies-check.js';

  const dispatch = createEventDispatcher();

  export let store;
  export let getTranslation;

  let showLoadingIndicator = false;

  let mfSplitView = {
    displayed: false
  };
  let splitViewValues;

  /// MFs
  let modalIframe;
  let modalIframeData;
  let modal;
  let splitViewIframe;
github SAP / luigi / core / src / navigation / TopNav.html View on Github external
import ContextSwitcher from './ContextSwitcher.html';
  import ProductSwitcher from './ProductSwitcher.html';
  import {
    beforeUpdate,
    createEventDispatcher,
    onMount,
    getContext
  } from 'svelte';
  import { LuigiAuth, LuigiConfig, LuigiI18N } from '../core-api';
  import {
    AuthHelpers,
    NavigationHelpers,
    StateHelpers
  } from '../utilities/helpers';

  const dispatch = createEventDispatcher();

  export let authorizationEnabled;
  export let autologinEnabled;
  export let isLoggedIn = false;
  export let hideNavComponent;
  export let responsiveNavSetting;
  export let pathData;
  let previousPathData;
  export let pathParams;
  export let dropDownStates = {};
  export let children;
  export let selectedNode;
  export let visibleNodeCount;
  export let totalBadgeNode;
  export let isProductSwitcherAvailable;
  export let productSwitcherConfig;