# All files / domain/lwcBuilderEvent lwcBuilderEvent.js

75% Statements 12/16
50% Branches 4/8
100% Functions 2/2
100% Lines 12/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37

    14x
    2x
    2x
    2x
    2x
    2x
    2x
    2x

    1x

    4x
    2x
    2x

     /*
     * Copyright (c) 2021, salesforce.com, inc.
     * All rights reserved.
     * Licensed under the BSD 3-Clause license.
     * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
     */

    class Payload {
      componentName;
      css;
      html;
      js;
      meta;
      svg;
      test;

      constructor(component) {
        this.componentName = component.componentName;
        this.js = component.js;
        this.meta = component.meta;
        Iif (component.withCss) this.css = component.css;
        Iif (component.withHtml) this.html = component.html;
        Iif (component.withSvg) this.svg = component.svg;
        Iif (component.withTest) this.test = component.test;
      }
    }

    export default class LWCBuilderEvent {
      type; // Options: create_button_clicked
      payload; // Payload object

      constructor(type, payload) {
        this.type = type;
        this.payload = new Payload(payload);
      }
    }