ES6 Native @mentions

Overview

Tribute

CDNJS version Build Status

A cross-browser @mention engine written in ES6, no dependencies. Tested in Firefox, Chrome, iOS Safari, Safari, IE 9+, Edge 12+, Android 4+, and Windows Phone.

Installing

There are a few ways to install Tribute; Bower, as an NPM Module, or by downloading from the dist folder in this repo.

NPM Module

You can install Tribute by running:

npm install tributejs

Or by adding Tribute to your package.json file.

Import into your ES6 code.

import Tribute from "tributejs";

Ruby Gem

To use Tribute within a Rails project, you can add the following to the app's Gemfile:

gem 'tribute'

Then, add the following to app/assets/javascripts/application.js:

*= require tribute

And in app/assets/stylesheets/application.css:

//= require tribute

Webpack

To add Tribute to your webpack build process, start by adding it to your package.json and running npm install.

After installing, you need to update your Babel module loader to not exclude Tribute from being compiled by Webpack:

{
    test: /\.js$/,
    loader: 'babel',
    exclude: /node_modules\/(?!tributejs)/
}

Download or Clone

Or you can download the repo or clone it localy with this command:

git clone [email protected]:zurb/tribute.git

You can then copy the files in the dist directory to your project.

<link rel="stylesheet" href="js/tribute.css" />
<script src="js/tribute.js"></script>

That's it! Now you are ready to initialize Tribute.

Initializing

There are two ways to initialize Tribute, by passing an array of "collections" or by passing one collection object.

var tribute = new Tribute({
  values: [
    { key: "Phil Heartman", value: "pheartman" },
    { key: "Gordon Ramsey", value: "gramsey" }
  ]
});

You can pass multiple collections on initialization by passing in an array of collection objects to collection.

var tribute = new Tribute({
  collection: []
});

Attaching to elements

Once initialized, Tribute can be attached to an input, textarea, or an element that supports contenteditable.

<div id="caaanDo">I'm Mr. Meeseeks, look at me!</div>

<div class="mentionable">Some text here.</div>
<div class="mentionable">Some more text over here.</div>

<script>
  tribute.attach(document.getElementById("caaanDo"));

  // also works with NodeList
  tribute.attach(document.querySelectorAll(".mentionable"));
</script>

A Collection

Collections are configuration objects for Tribute, you can have multiple for each instance. This is useful for scenarios where you may want to match multiple trigger keys, such as @ for users and # for projects.

Collection object shown with defaults:

{
  // symbol or string that starts the lookup
  trigger: '@',

  // element to target for @mentions
  iframe: null,

  // class added in the flyout menu for active item
  selectClass: 'highlight',

  // class added to the menu container
  containerClass: 'tribute-container',

  // class added to each list item
  itemClass: '',

  // function called on select that returns the content to insert
  selectTemplate: function (item) {
    return '@' + item.original.value;
  },

  // template for displaying item in menu
  menuItemTemplate: function (item) {
    return item.string;
  },

  // template for when no match is found (optional),
  // If no template is provided, menu is hidden.
  noMatchTemplate: null,

  // specify an alternative parent container for the menu
  // container must be a positioned element for the menu to appear correctly ie. `position: relative;`
  // default container is the body
  menuContainer: document.body,

  // column to search against in the object (accepts function or string)
  lookup: 'key',

  // column that contains the content to insert by default
  fillAttr: 'value',

  // REQUIRED: array of objects to match or a function that returns data (see 'Loading remote data' for an example)
  values: [],

  // When your values function is async, an optional loading template to show
  loadingItemTemplate: null,

  // specify whether a space is required before the trigger string
  requireLeadingSpace: true,

  // specify whether a space is allowed in the middle of mentions
  allowSpaces: false,

  // optionally specify a custom suffix for the replace text
  // (defaults to empty space if undefined)
  replaceTextSuffix: '\n',

  // specify whether the menu should be positioned.  Set to false and use in conjuction with menuContainer to create an inline menu
  // (defaults to true)
  positionMenu: true,

  // when the spacebar is hit, select the current match
  spaceSelectsMatch: false,

  // turn tribute into an autocomplete
  autocompleteMode: false,

  // Customize the elements used to wrap matched strings within the results list
  // defaults to <span></span> if undefined
  searchOpts: {
    pre: '<span>',
    post: '</span>',
    skip: false // true will skip local search, useful if doing server-side search
  },

  // Limits the number of items in the menu
  menuItemLimit: 25,

  // specify the minimum number of characters that must be typed before menu appears
  menuShowMinLength: 0
}

Dynamic lookup column

The lookup column can also be passed a function to construct a string to query against. This is useful if your payload has multiple attributes that you would like to query against but you can't modify the payload returned from the server to include a concatenated lookup column.

{
  lookup: function (person, mentionText) {
    return person.name + person.email;
  }
}

Template Item

Both the selectTemplate and the menuItemTemplate have access to the item object. This is a meta object containing the matched object from your values collection, wrapped in a search result.

{
  index: 0;
  original: {
  } // your original object from values array
  score: 5;
  string: "<span>J</span><span>o</span>rdan Hum<span>p</span>hreys";
}

Trigger tribute programmatically

Tribute can be manually triggered by calling an instances showMenuForCollection method. This is great for trigging tribute on an input by clicking an anchor or button element.

<a id="activateInput">@mention</a>

Then you can bind a mousedown event to the anchor and call showMenuForCollection.

activateLink.addEventListener("mousedown", function(e) {
  e.preventDefault();
  var input = document.getElementById("test");

  tribute.showMenuForCollection(input);
});

Note that showMenuForCollection has an optional second parameter called collectionIndex that defaults to 0. This allows you to specify which collection you want to trigger with the first index starting at 0.

For example, if you want to trigger the second collection you would use the following snippet: tribute.showMenuForCollection(input, 1);

Events

Replaced

You can bind to the tribute-replaced event to know when we have updated your targeted Tribute element.

If your element has an ID of myElement:

document
  .getElementById("myElement")
  .addEventListener("tribute-replaced", function(e) {
    console.log(
      "Original event that triggered text replacement:",
      e.detail.event
    );
    console.log("Matched item:", e.detail.item);
  });

No Match

You can bind to the tribute-no-match event to know when no match is found in your collection.

If your element has an ID of myElement:

document
  .getElementById("myElement")
  .addEventListener("tribute-no-match", function(e) {
    console.log("No match found!");
  });

Active State Detection

You can bind to the tribute-active-true or tribute-active-false events to detect when the menu is open or closed respectively.

document
  .getElementById("myElement")
  .addEventListener("tribute-active-true", function(e) {
    console.log("Menu opened!");
  });
document
  .getElementById("myElement")
  .addEventListener("tribute-active-false", function(e) {
    console.log("Menu closed!");
  });

Tips

Some useful approaches to common roadblocks when implementing @mentions.

Updating a collection with new data

You can update an instance of Tribute on the fly. If you have new data you want to insert into the current active collection you can access the collection values array directly:

tribute.appendCurrent([
  { name: "Howard Johnson", occupation: "Panda Wrangler", age: 27 },
  { name: "Fluffy Croutons", occupation: "Crouton Fluffer", age: 32 }
]);

This would update the first configuration object in the collection array with new values. You can access and update any attribute on the collection in this way.

You can also append new values to an arbitrary collection by passing an index to append.

tribute.append(2, [
  { name: "Howard Johnson", occupation: "Panda Wrangler", age: 27 },
  { name: "Fluffy Croutons", occupation: "Crouton Fluffer", age: 32 }
]);

This will append the new values to the third collection.

Programmatically detecting an active Tribute dropdown

If you need to know when Tribute is active you can access the isActive property of an instance.

if (tribute.isActive) {
  console.log("Somebody is being mentioned!");
} else {
  console.log("Who's this guy talking to?");
}

Links inside contenteditable are not clickable.

If you want to embed a link in your selectTemplate then you need to make sure that the anchor is wrapped in an element with contenteditable="false". This makes the anchor clickable and fixes issues with matches being modifiable.

var tribute = new Tribute({
  values: [
    {
      key: "Jordan Humphreys",
      value: "Jordan Humphreys",
      email: "[email protected]"
    },
    {
      key: "Sir Walter Riley",
      value: "Sir Walter Riley",
      email: "[email protected]"
    }
  ],
  selectTemplate: function(item) {
    return (
      '<span contenteditable="false"><a href="http://zurb.com" target="_blank" title="' +
      item.original.email +
      '">' +
      item.original.value +
      "</a></span>"
    );
  }
});

How do I add an image to the items in the list?

You can override the default menuItemTemplate with your own output on initialization. This allows you to replace the innerHTML of the li of each item in the list. You can use item.string to return the markup for the fuzzy match.

{
  //..other config options
  menuItemTemplate: function (item) {
    return '<img src="'+item.original.avatar_url + '">' + item.string;
  }
}

Embedding Tribute in a scrollable container.

Sometimes you may need to have the Tribute menu attach to a scrollable parent element so that if the user scrolls the container the menu will scroll with it. To do this, you can set menuContainer to the node that is the scrollable parent.

{
  //..other config options
  menuContainer: document.getElementById("wrapper");
}

Loading remote data

If your data set is large or would like to pre filter your data you can load dynamically by setting the values to a function.

{
  //..other config options
  // function retrieving an array of objects
  values: function (text, cb) {
    remoteSearch(text, users => cb(users));
  },
  lookup: 'name',
  fillAttr: 'name'
}

You would then define a function, in this case remoteSearch, that returns your data from the backend.

function remoteSearch(text, cb) {
  var URL = "YOUR DATA ENDPOINT";
  xhr = new XMLHttpRequest();
  xhr.onreadystatechange = function() {
    if (xhr.readyState === 4) {
      if (xhr.status === 200) {
        var data = JSON.parse(xhr.responseText);
        cb(data);
      } else if (xhr.status === 403) {
        cb([]);
      }
    }
  };
  xhr.open("GET", URL + "?q=" + text, true);
  xhr.send();
}

Hide menu when no match is returned

If you want the menu to not show when no match is found, you can set your noMatchTemplate config to the following:

noMatchTemplate: function () {
  return '<span style:"visibility: hidden;"></span>';
}

Detaching Tribute instances

When you want to remove Tribute from an element you can call detach.

tribute.detach(document.getElementById("caaanDo"));

This will remove all event listeners from the DOM that are associated with that element.

Trigger on multiple character strings

It is also possible to configure Tribute to trigger on a string consisting of multiple characters.

This example shows the usage of Tribute for autocompletion of variables:

var tribute = new Tribute({
  trigger: "{{",
  values: [
    { key: "red", value: "#FF0000" },
    { key: "green", value: "#00FF00" }
  ],
  selectTemplate: function(item) {
    return "{{" + item.original.key + "}}";
  },
  menuItemTemplate: function(item) {
    return item.original.key + " = " + item.original.value;
  }
});

Framework Support

Vue.js — vue-tribute by @syropian

AngularJS 1.5+ — angular-tribute by ZURB

Angular 2+ - ngx-tribute by Ladder.io

Ruby — tribute-rb by ZURB

Ember – ember-tribute by MalayaliRobz

WYSIWYG Editor Support

Brought to you by

ZURB, the creators of Helio

Design successful products by rapidly revealing key user behaviors. Helio makes it easy to get reactions on your designs quickly so your team can focus on solving the right problems, right now.

Comments
  • Search is not fired after Backspace, when previous result is empty

    Search is not fired after Backspace, when previous result is empty

    How can we reproduce this bug?

    1. Step one Create a simple <div class="mentionable">Some text.</div> and initialize a tribute var tribute = new Tribute({ values: [ {key: 'Phil Heartman', value: 'pheartman'}, {key: 'Gordon Ramsey', value: 'gramsey'} ]}); Apply tribute to the element tribute.attach(document.querySelectorAll('.mentionable'));

    2. Step two Start typing @P - 'Phil Heartman' option is shown image Type anything (not to match the option) @Py - no option is shown image

    3. Step three Press Backspace - @P text is left

    What did you expect to happen? 'Phil Heartman' option is shown

    What happened instead? No option is shown. Need to type something again for search to be called.

    Link (jsfiddle/plunkr) or Screenshot: image

    bug 
    opened by TetianaP 19
  • When mention container is bottom of screen positioning (bottom) is incorrect

    When mention container is bottom of screen positioning (bottom) is incorrect

    How can we reproduce this bug?

    1. Step one Go to the demo page: https://zurb.github.io/tribute/example/
    2. Step two Scroll down to a place until the traditional form elements are visible at the bottom of the page
    3. Step three Now start typing '@' you would notice that the menuContainer would be positioned incorrectly (bottom value is incorrectly calculated when top = 'auto')

    What did you expect to happen? I expect the menuContainer to be positioned closer to the input or contenteditable div What happened instead? It was positioned incorrectly as shown in the attached GIF

    chrome-capture

    Link (jsfiddle/plunkr/codepen) or Screenshot: You can fork this Codepen as a base for reproducing your issue: https://codepen.io/mrsweaters/pen/OxxdWv?editors=1010#0

    opened by vick-subbu 15
  • Brunch Error

    Brunch Error

    Hi. I ran into this error when I tried to use 2.0.1 with brunch 2.8.2.

    error: Resolving deps of node_modules/tributejs/dist/tribute.js failed. Could not load module './TributeEvents' from './node_modules/tributejs/dist'. Make sure the file actually exists.
    

    Is this a brunch issue?

    opened by victorsolis 15
  • Trigger suggestions popup (menu show) ?

    Trigger suggestions popup (menu show) ?

    Hello friends,

    Is there a way to trigger suggestions popup programmatically?

    I've tried

    tribute.showMenuFor($('.editor').get(0), true);
    

    but it doesn't work.

    Currently I'm trying to show menu with dispatching keydown + keyup events, not sure if this will work.

    opened by antongorodezkiy 14
  • Fix IE type errors

    Fix IE type errors

    I have been getting several type errors on IE 11 like these:

    • Unable to get property 'substring' of undefined or null reference
    • Unable to get property 'selectionStart' of undefined or null reference
    • Unable to get property 'value' of undefined or null reference

    These are mainly generated from getTextPrecedingCurrentSelection() and I have no idea of why they happened (they didn't happen on Chrome, FF, etc). Though I have been trying to fix them, however I honestly say that my fixes didn't handle the main cause but just resolved the problems that faced my eyes.

    Hope to clarify these errors and provide a stable solution.

    opened by firstor 13
  • Add a

    Add a "nothingFound" event

    It would be great if an event was fired when a user tried to search something and there were no matches in the collection. When trying to be judicious about sending large collections to the client, having this event could let us update the list on the fly with another large page of data without loading it all up front.

    opened by mattschwarz 13
  • Autocomplete issue when insert template has markup

    Autocomplete issue when insert template has markup

    As you will be able to see from the last image, i'm using div with contenteditable="true".

    First you need to setup selectTemplate to look something like this:

    {
       selectTemplate: function (item) {
          return '<span class="handle">' + item.original.username + '</span>';
       },
    
       values: [
          { name: 'Allen Iverson', username: 'alleniverson' },
          { name: 'Basketball HOF', username: 'Hoophall' }
       ]
    }
    
    .editor { color: #000; } 
    .handle { color: #1b95e0; }
    

    How can we reproduce this bug?

    1. Start mentioning "Basketball HOF"
    2. Mention someone
    3. "Backspace" delete handle to look like this: @Hooph
    4. You see autocomplete list again, hit enter to mention @Hoophall again
    5. Continue typing

    What did you expect to happen? I expected to have text with black colour again. (see image) screen shot 2016-09-23 at 09 35 12

    What happened instead? I got all text blue. (see result image and markup) screen shot 2016-09-23 at 09 34 08

    screen shot 2016-09-23 at 09 33 33

    bug 
    opened by dgrubelic 11
  • Tribute menu wrong position when body is scrolled on contenteditable elements

    Tribute menu wrong position when body is scrolled on contenteditable elements

    When the window is scrolled it's correctly taken into account by getTextAreaOrInputUnderlinePosition. However its contenteditable sibling getContentEditableCaretPosition does not consider window scroll

    A quick fix I used was to add this block of at the bottom of getContentEditableCaretPosition

    var doc = document.documentElement
    var windowLeft = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0)
    var windowTop = (window.pageYOffset || doc.scrollTop)  - (doc.clientTop || 0)
    
    coordinates.top += windowTop
    coordinates.left += windowLeft
    

    A better fix would take into account the scroll of every parent having a scroll, not only the window. (For instance if there is an overflow: auto on an ancestor element)

    bug 
    opened by dmail 11
  • Mention menu wrongly positioned in version 3.1.0

    Mention menu wrongly positioned in version 3.1.0

    In version 3.1.0 there's a change regarding positioning. In my case, this broke the positioning of the mentions window. I have a comment box on the right of the screen (I'm just using Bootstrap columns, nothing special) and the mentions box now appears on the left side of the screen. The tribute-container div is a child of the <body> and it has the style top: 413px; left: 449px; position: absolute; display: block; which wouldn't even be the correct positioning if it was relative to the comment box. The vertical position does seem to be correct though, it's only the horizontal positioning that is broken.

    If you need more info, I'll be glad to help.

    bug 
    opened by ThomHurks 10
  • Uncaught TypeError: event.cancelBubble is not a function

    Uncaught TypeError: event.cancelBubble is not a function

    I can't provide too many details because this was sent to me by a user, and I can't replicate it so it seems to affect only certain users for some bizarre reason, but he's getting this exception in the Chrome Developer tools:

    Uncaught TypeError: event.cancelBubble is not a function
    at HTMLDocument.bringBackDefault (new_rightclick.js:87)
    DevTools failed to load SourceMap: Could not load content for https://myserver.com/script/tribute.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
    

    Obviously, tribute.min.js.map doesn't exist on my server, and I can't seem to find a file in the repository for it. It seems related to this: https://www.redmine.org/issues/32450

    But I can't figure out how this should be resolved, either...

    opened by InterLinked1 9
  • Typings file doesn't compile

    Typings file doesn't compile

    How can we reproduce this bug? Try to reference the typings file and compile your code. The generic constructor throws an error. An older version of the file works fine, but doesn't support all the features.

    The changes I did on https://github.com/PieterVerledens/tribute allow me to use tribute and compile my project.

    Is anyone using the typings file as is without any issues?

    opened by PieterVerledens 9
  • Option to use DOM elements instead of HTML strings as templates

    Option to use DOM elements instead of HTML strings as templates

    It would be nice to have the option to pass an HTML element to the template properties (like menuItemTemplate) instead of passing an HTML.

    This would be nice for situations in which we have an already implemented UI component (in Svelte, Vue, or React) for the menu.

    If this was possible, we wouldn't need to use noMatchTemplate for fallback as the UI component would handle that.

    I'm new to this library so if this is already possible, kindly let me know. :)

    opened by gyenabubakar 0
  • Bump @babel/core from 7.9.0 to 7.20.7

    Bump @babel/core from 7.9.0 to 7.20.7

    Bumps @babel/core from 7.9.0 to 7.20.7.

    Release notes

    Sourced from @​babel/core's releases.

    v7.20.7 (2022-12-22)

    Thanks @​wsypower for your first PR!

    :eyeglasses: Spec Compliance

    • babel-helper-member-expression-to-functions, babel-helper-replace-supers, babel-plugin-proposal-class-properties, babel-plugin-transform-classes
    • babel-helpers, babel-plugin-proposal-class-properties, babel-plugin-transform-classes, babel-plugin-transform-object-super

    :bug: Bug Fix

    • babel-parser, babel-plugin-transform-typescript
    • babel-traverse
    • babel-plugin-transform-typescript, babel-traverse
    • babel-plugin-transform-block-scoping
    • babel-plugin-proposal-async-generator-functions, babel-preset-env
    • babel-generator, babel-plugin-proposal-optional-chaining
    • babel-plugin-transform-react-jsx, babel-types
    • babel-core, babel-helpers, babel-plugin-transform-computed-properties, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
    • babel-helper-member-expression-to-functions, babel-helper-replace-supers, babel-plugin-proposal-class-properties, babel-plugin-transform-classes
    • babel-generator

    :nail_care: Polish

    • babel-plugin-transform-block-scoping, babel-traverse

    :house: Internal

    • babel-helper-define-map, babel-plugin-transform-property-mutators
    • babel-core, babel-plugin-proposal-class-properties, babel-plugin-transform-block-scoping, babel-plugin-transform-classes, babel-plugin-transform-destructuring, babel-plugin-transform-parameters, babel-plugin-transform-regenerator, babel-plugin-transform-runtime, babel-preset-env, babel-traverse

    :running_woman: Performance

    Committers: 6

    ... (truncated)

    Changelog

    Sourced from @​babel/core's changelog.

    v7.20.7 (2022-12-22)

    :eyeglasses: Spec Compliance

    • babel-helper-member-expression-to-functions, babel-helper-replace-supers, babel-plugin-proposal-class-properties, babel-plugin-transform-classes
    • babel-helpers, babel-plugin-proposal-class-properties, babel-plugin-transform-classes, babel-plugin-transform-object-super

    :bug: Bug Fix

    • babel-parser, babel-plugin-transform-typescript
    • babel-traverse
    • babel-plugin-transform-typescript, babel-traverse
    • babel-plugin-transform-block-scoping
    • babel-plugin-proposal-async-generator-functions, babel-preset-env
    • babel-generator, babel-plugin-proposal-optional-chaining
    • babel-plugin-transform-react-jsx, babel-types
    • babel-core, babel-helpers, babel-plugin-transform-computed-properties, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
    • babel-helper-member-expression-to-functions, babel-helper-replace-supers, babel-plugin-proposal-class-properties, babel-plugin-transform-classes
    • babel-generator

    :nail_care: Polish

    • babel-plugin-transform-block-scoping, babel-traverse

    :house: Internal

    • babel-helper-define-map, babel-plugin-transform-property-mutators
    • babel-core, babel-plugin-proposal-class-properties, babel-plugin-transform-block-scoping, babel-plugin-transform-classes, babel-plugin-transform-destructuring, babel-plugin-transform-parameters, babel-plugin-transform-regenerator, babel-plugin-transform-runtime, babel-preset-env, babel-traverse

    :running_woman: Performance

    v7.20.6 (2022-11-28)

    :bug: Bug Fix

    v7.20.5 (2022-11-28)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump puppeteer from 2.1.1 to 19.4.1

    Bump puppeteer from 2.1.1 to 19.4.1

    Bumps puppeteer from 2.1.1 to 19.4.1.

    Release notes

    Sourced from puppeteer's releases.

    puppeteer-core: v19.4.1

    19.4.1 (2022-12-16)

    Bug Fixes

    • improve a11y snapshot handling if the tree is not correct (#9405) (02fe501), closes #9404
    • remove oopif expectations and fix oopif flakiness (#9375) (810e0cd)

    puppeteer: v19.4.1

    19.4.1 (2022-12-16)

    Miscellaneous Chores

    • puppeteer: Synchronize puppeteer versions

    Dependencies

    • The following workspace dependencies were updated
      • dependencies
        • puppeteer-core bumped from 19.4.0 to 19.4.1

    puppeteer-core: v19.4.0

    19.4.0 (2022-12-07)

    Features

    • ability to send headers via ws connection to browser in node.js environment (#9314) (937fffa), closes #7218
    • chromium: roll to Chromium 109.0.5412.0 (r1069273) (#9364) (1875da6), closes #9233
    • puppeteer-core: keydown supports commands (#9357) (b7ebc5d)

    Bug Fixes

    puppeteer: v19.4.0

    19.4.0 (2022-12-07)

    Features

    Dependencies

    ... (truncated)

    Commits
    • 848c849 chore: release main (#9395)
    • fe986c6 chore: trigger reindexing on doc deployment (#9425)
    • f0951aa docs: use a number of documented versions for indexing (#9424)
    • 68c53df chore(deps): Bump loader-utils from 2.0.2 to 2.0.4 in /website (#9423)
    • 69b03df chore(deps): Bump @​angular-devkit/schematics from 15.0.3 to 15.0.4 (#9420)
    • fa05a1c chore(deps): Bump @​angular-devkit/core from 15.0.3 to 15.0.4 (#9414)
    • 0f0e717 chore(deps): Bump @​angular-devkit/architect from 0.1402.10 to 0.1500.4 (#9415)
    • cd073ab chore(deps): Bump ws from 8.10.0 to 8.11.0 (#9412)
    • cd8eec3 chore(deps): Bump @​angular-devkit/schematics from 14.2.8 to 15.0.3 (#9413)
    • 28cedac chore: Revert Dependabot config (#9411)
    • Additional commits viewable in compare view
    Maintainer changes

    This version was pushed to npm by google-wombot, a new releaser for puppeteer since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump rollup-plugin-sass from 1.2.2 to 1.12.17

    Bump rollup-plugin-sass from 1.2.2 to 1.12.17

    Bumps rollup-plugin-sass from 1.2.2 to 1.12.17.

    Release notes

    Sourced from rollup-plugin-sass's releases.

    1.12.15

    Hi all,

    In this release we provide one bug fix (to a recently unnoticed duplicate css bug), and a test suite where we test out, and show, how to extract sass variables to resulting *.js modules.

    What's Changed

    Full Changelog: https://github.com/elycruz/rollup-plugin-sass/compare/1.12.14...1.12.15

    Thank you, and Happy Coding!

    • rollup-plugin-sass admins

    Dependency Updates and Watch Feature

    In this Release

    • dev-deps - Upgraded packages reported to having vulnerabilities to their safe versions.
    • dev-deps - Updated 'ava' version to allow builds on certain versions (there was a "moderate" vulnerability in ava that was blocking our package from being built on *nix systems see #97 ).
    • dev-deps - Updated typescript version and added 'downlevel-dts' version of the project's '*.d.ts' files (the whole typescript backward compatibility setup is now in place).
    • plugin - Updated our plugin's custom 'sass file' importer to enforce file load order in the defined 'async' importer - the async importer can sometimes load files out of order, which could result in sass content being compiled in incorrect order (when using the plugin's output (as a function) feature) - This enforces the load order by chaining each legacy importer done call to a promise (which chained, and awaited for, on subsequent importer calls).
    • plugin - Merged in changes related to #96 "Add sass files to rollup watch list" - forces files to be added to rollup's watch list, when rollup is running in 'watch' mode.

    Merged PRs

    Thank you to our Contributers!

    New Contributors

    Full Changelog: https://github.com/differui/rollup-plugin-sass/compare/1.2.12...1.12.13

    Typescript Downgrade and Node 16 (CI/CD) Race Condition Fix

    In this release:

    Fixes:

    • #89 - (CI/CD) Race condition, in Node 16, fixed. Code in plugin implementation (surrounding sass module custom importer) now enforces sync calls to resolve module ensuring the same behavior across current versions of node.

    Improvements:

    ... (truncated)

    Commits
    • 067c850 Updated package version.
    • d9ee5ba Merge branch 'master' of github.com:elycruz/rollup-plugin-sass into dev
    • 2f4fd7a Added .nvmrc file.
    • e750e7a Merge pull request #107 from elycruz/dependabot/npm_and_yarn/minimatch-3.1.2
    • 4c4420f Bump minimatch from 3.0.4 to 3.1.2
    • f4b2e64 issue-#72 - Updated package version.
    • 7e708df issue-#72 - Regenerated package-lock.json.
    • d3044c6 issue-#72 - Updated package version.
    • 195176c Merge pull request #105 from elycruz/dev
    • e49b37a Merge pull request #104elycruz/issue-#72
    • Additional commits viewable in compare view
    Maintainer changes

    This version was pushed to npm by elycruz, a new releaser for rollup-plugin-sass since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump decode-uri-component from 0.2.0 to 0.2.2

    Bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies 
    opened by dependabot[bot] 0
Releases(5.1.3)
  • 5.1.3(Mar 25, 2020)

  • 5.1.2(Mar 6, 2020)

  • 5.1.1(Mar 6, 2020)

    • Fix backspace bug by adding a default noMatchTemplate instead of an empty string https://github.com/zurb/tribute/commit/189bf57ba71db52cff8c386742518efee45c2dda

    Closes: https://github.com/zurb/tribute/issues/385

    Thanks @mxgl for your help with this!

    Source code(tar.gz)
    Source code(zip)
  • 5.1.0(Mar 6, 2020)

    • Add tribute-active-true and tribute-active-false events to detect when menu is open and closed. https://github.com/zurb/tribute/pull/426

    Thanks @Postlagerkarte for your help with this!

    Source code(tar.gz)
    Source code(zip)
  • 5.0.1(Mar 3, 2020)

    • Adds Typescript definition for showMenuForCollection https://github.com/zurb/tribute/pull/299

    Thanks to @fightknights for this contribution!

    Source code(tar.gz)
    Source code(zip)
  • 5.0.0(Mar 3, 2020)

    In this release:

    • Switch from Gulp to Rollup
    • Add menuShowMinLength so you can require the user to enter X number of characters before showing the menu.
    • Adds ES Module support.
    Source code(tar.gz)
    Source code(zip)
  • 4.1.3(Feb 21, 2020)

  • 4.1.2(Feb 21, 2020)

    This release contains the following updates:

    • Add searchOpts to configuration type definition https://github.com/zurb/tribute/pull/381
    • Add configuration to set list item class https://github.com/zurb/tribute/pull/380
    • Better support for composition on contenteditable https://github.com/zurb/tribute/pull/395

    Thanks to @mattwiller and @hyojin for their contributions!

    Source code(tar.gz)
    Source code(zip)
  • 4.1.1(Nov 26, 2019)

    Here are the highlights of this release:

    • Support for multiple trigger characters: https://github.com/zurb/tribute/pull/334
    • Support for custom container class: https://github.com/zurb/tribute/pull/295
    • Emit input event on replace: https://github.com/zurb/tribute/pull/363

    Thank you to @BrennaEpp, @peschuster, @claudiobmgrtnr for their contributions to this release!

    Source code(tar.gz)
    Source code(zip)
  • 4.0.0(Oct 3, 2019)

    This release improves the dropdown positioning, npm package publication and z-index customization issues.

    Changes:

    • BREAKING CHANGE: We have removed z-index from the JavaScript, it is now only set in the CSS so it can be overridden in your own styles. https://github.com/zurb/tribute/pull/307
    • Menu Positioning: Improve menu positioning when the input isn't the lowest element on the page. https://github.com/zurb/tribute/pull/331
    • NPM package missing files: Fixed an issue where the src directory was not included in the NPM release and some other smaller build improvements. https://github.com/zurb/tribute/pull/317, https://github.com/zurb/tribute/pull/316, https://github.com/zurb/tribute/pull/315

    Thanks to @iskandiar, @aldhsu, @DanielRuf for their contributions to this release!

    Source code(tar.gz)
    Source code(zip)
  • 3.7.3(Aug 30, 2019)

    This is a release to cleanup the build folder that was causing conflicts with TypeScript as well as upgrade to Babel 7.

    • Remove old build setup https://github.com/zurb/tribute/pull/312
    • Upgrade to Babel 7 https://github.com/zurb/tribute/pull/309

    Thanks @sibiraj-sr and @DanielRuf for the help with this!

    Source code(tar.gz)
    Source code(zip)
  • 3.7.2(Aug 2, 2019)

    • Updated several vulnerable development dependencies.
    • Add context and instance to tribute-replaced event. https://github.com/zurb/tribute/pull/237
    • Skip local search: https://github.com/zurb/tribute/pull/271
    new Tribute({ searchOpts: { skip: true } });
    
    • Fix cursor up and down not working on textarea with autocomplete. https://github.com/zurb/tribute/pull/280
    • Accurately find li in html templates: https://github.com/zurb/tribute/pull/297

    Thanks to @andreynering, @onhate, @Postlagerkarte, and @mlturner88 for your help with this release!

    Source code(tar.gz)
    Source code(zip)
  • 3.7.1(May 7, 2019)

    • Improve performance for large lists by introducing an optional limit, menuItemLimit. @andreynering https://github.com/zurb/tribute/pull/240

    Thanks!

    Source code(tar.gz)
    Source code(zip)
  • 3.7.0(May 6, 2019)

    • Fix highlight for cursor interaction with the menu: @MalayaliRobz https://github.com/zurb/tribute/pull/222
    • Error fetching remote values: @badz0 https://github.com/zurb/tribute/pull/225
    • Basic test coverage, thanks @MalayaliRobz https://github.com/zurb/tribute/pull/253
    • Fix z-index typo. https://github.com/zurb/tribute/commit/8af42420e2faa206a8a4c1095489a124f61e8fa2

    Thank you all for contributing and reporting for this release!

    Source code(tar.gz)
    Source code(zip)
  • 3.6.0(Feb 27, 2019)

    • Add support for autocomplete mode: https://github.com/zurb/tribute/pull/197
    • Fix menu highlight and scroll functionality: https://github.com/zurb/tribute/pull/191
    • Several security updates and readme changes.
    • Added test framework.

    Special thanks to @MalayaliRobz and @rcavezza for your help on this release!

    Source code(tar.gz)
    Source code(zip)
  • 3.5.3(Jan 30, 2019)

  • 3.5.2(Jan 30, 2019)

    Without a default noMatchTemplate then hitting backspace will not trigger the dropdown again. https://github.com/zurb/tribute/issues/53#issuecomment-458854736

    Source code(tar.gz)
    Source code(zip)
  • 3.5.1(Jan 21, 2019)

    3.5.0 introduced an update that bound to mouseup instead of mousedown. This release reverts that change and cleans out some old unused bindings.

    Source code(tar.gz)
    Source code(zip)
  • 3.5.0(Jan 4, 2019)

    This update fixes some position issues on mobile-size device screens of the menu as well as introduces some new configuration options.

    • Correctly position menu on mobile devices with limited screen real estate. https://github.com/zurb/tribute/pull/177 Thank you @fynnfeldpausch!
    • Use mouseup instead of mousedown for event binding. https://github.com/zurb/tribute/pull/176 Thank you again @fynnfeldpausch!
    • Return mention text in lookup when lookup is a function. https://github.com/zurb/tribute/commit/3e805c5ef6653d9ee4675043114661ef89cabd99
    lookup: function (item, mentionText) {
     ...
    }
    
    • Add support for selecting match when spacebar is pressed. This is disabled by default and can been enabled by setting spaceSelectsMatch to true in your config. https://github.com/zurb/tribute/commit/994fbf2d1632a383cc45f232df87e0a5ec0e21fa Thank you @htmltiger for the suggestion.

    Thank you to everyone who contributed to this release!

    Source code(tar.gz)
    Source code(zip)
  • 3.4.0(Nov 13, 2018)

    This release have several bug fixes and security updates:

    • Security updates to build system: https://github.com/zurb/tribute/commit/93f522fc04f71fefa062fd119366521dbd223e7a, https://github.com/zurb/tribute/commit/13d15269b039c3a69eb12ad2addaafd2e348d44c, https://github.com/zurb/tribute/commit/f9afedd83eefa6a4e449581c84c502ebb9dc0c3a
    • Fix Shadow DOM compatibility. https://github.com/zurb/tribute/commit/bfa3ba72610253fa0a5f4018e21249f1c5998873
    • Fix allowSpaces configuration: https://github.com/zurb/tribute/commit/8b42cc9437f4d9b340d7a88305bb2a2c0bd40be5

    Thank you to everyone who helped make this release possible including @fishgrind and @BorntraegerMarc!

    Source code(tar.gz)
    Source code(zip)
  • 3.3.5(Sep 19, 2018)

  • 3.3.4(Aug 22, 2018)

  • 3.3.3(Aug 6, 2018)

  • 3.3.2(Aug 3, 2018)

  • 3.3.1(Aug 1, 2018)

  • 3.3.0(Aug 1, 2018)

  • 3.2.0(Feb 15, 2018)

  • 3.1.3(Oct 10, 2017)

  • 3.1.2(Oct 9, 2017)

  • 3.1.1(Oct 3, 2017)

Selectize is the hybrid of a textbox and