How to use the @ephox/alloy.AlloyTriggers.emit function in @ephox/alloy

To help you get started, we’ve selected a few @ephox/alloy 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 tinymce / tinymce / modules / tinymce / src / themes / silver / main / ts / ui / general / Button.ts View on Github external
return (comp: AlloyComponent) => {
    if (buttonType === 'custom') {
      AlloyTriggers.emitWith(comp, formActionEvent, {
        name,
        value: { }
      });
    } else if (buttonType === 'submit') {
      AlloyTriggers.emit(comp, formSubmitEvent);
    } else if (buttonType === 'cancel') {
      AlloyTriggers.emit(comp, formCancelEvent);
    } else {
      // tslint:disable-next-line:no-console
      console.error('Unknown button type: ', buttonType);
    }
  };
};
github tinymce / tinymce / modules / tinymce / src / themes / silver / main / ts / ui / general / Button.ts View on Github external
return (comp: AlloyComponent) => {
    if (buttonType === 'custom') {
      AlloyTriggers.emitWith(comp, formActionEvent, {
        name,
        value: { }
      });
    } else if (buttonType === 'submit') {
      AlloyTriggers.emit(comp, formSubmitEvent);
    } else if (buttonType === 'cancel') {
      AlloyTriggers.emit(comp, formCancelEvent);
    } else {
      // tslint:disable-next-line:no-console
      console.error('Unknown button type: ', buttonType);
    }
  };
};
github tinymce / tinymce / modules / tinymce / src / themes / silver / main / ts / ui / dialog / imagetools / EditPanel.ts View on Github external
  const emitEnable = (component) => AlloyTriggers.emit(component, ImageToolsEvents.external.enable());
github tinymce / tinymce / modules / tinymce / src / themes / silver / main / ts / ui / dialog / imagetools / EditPanel.ts View on Github external
  const emitDisable = (component) => AlloyTriggers.emit(component, ImageToolsEvents.external.disable());
  const emitEnable = (component) => AlloyTriggers.emit(component, ImageToolsEvents.external.enable());
github tinymce / tinymce / src / themes / silver / main / ts / ui / dialog / TextField.ts View on Github external
execute: (comp) => {
        AlloyTriggers.emit(comp, formSubmitEvent);
        return Option.some(true);
      },
    }),
github tinymce / tinymce / modules / tinymce / src / themes / silver / main / ts / ui / dialog / Collection.ts View on Github external
onSetValue: (comp, items) => {
          setContents(comp, items);
          if (spec.columns === 'auto') {
            detectSize(comp, 5, 'tox-collection__item').each(({ numRows, numColumns }) => {
              Keying.setGridSize(comp, numRows, numColumns);
            });
          }

          AlloyTriggers.emit(comp, formResizeEvent);
        }
      }),
github tinymce / tinymce / modules / tinymce / src / themes / silver / main / ts / ui / dialog / ColorPicker.ts View on Github external
Form.getField(rgbForm, 'hex').each((hexField) => {
                AlloyTriggers.emit(hexField, NativeEvents.input());
              });
            });
github tinymce / tinymce / modules / tinymce / src / themes / silver / main / ts / ui / dialog / TextField.ts View on Github external
execute: (comp) => {
        AlloyTriggers.emit(comp, formSubmitEvent);
        return Option.some(true);
      },
    }),