Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

docsearch.js

Package Overview
Dependencies
Maintainers
5
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docsearch.js - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3

docs/_site/about/index.html

6

CHANGELOG.md

@@ -0,1 +1,7 @@

<a name="2.1.3"></a>
## [2.1.3](https://github.com/algolia/docsearch/compare/v2.1.2...v2.1.3) (2016-08-03)
<a name="2.1.2"></a>

@@ -2,0 +8,0 @@ ## [2.1.2](https://github.com/algolia/docsearch/compare/v2.1.1...v2.1.2) (2016-07-22)

28

dist/npm/src/lib/DocSearch.js

@@ -19,5 +19,5 @@ 'use strict';

var _algoliasearch = require('algoliasearch');
var _algoliasearchLite = require('algoliasearch/lite');
var _algoliasearch2 = _interopRequireDefault(_algoliasearch);
var _algoliasearchLite2 = _interopRequireDefault(_algoliasearchLite);

@@ -40,5 +40,5 @@ var _autocompleteJs = require('autocomplete.js');

var _npmZepto = require('npm-zepto');
var _autocompleteJsZeptoJs = require('autocomplete.js/zepto.js');
var _npmZepto2 = _interopRequireDefault(_npmZepto);
var _autocompleteJsZeptoJs2 = _interopRequireDefault(_autocompleteJsZeptoJs);

@@ -106,3 +106,3 @@ /**

this.client = (0, _algoliasearch2['default'])(this.appId, this.apiKey);
this.client = (0, _algoliasearchLite2['default'])(this.appId, this.apiKey);
this.client.addAlgoliaAgent('docsearch.js ' + _versionJs2['default']);

@@ -178,3 +178,3 @@

var middleOfInput = input.offset().left + input.width() / 2;
var middleOfWindow = (0, _npmZepto2['default'])(document).width() / 2;
var middleOfWindow = (0, _autocompleteJsZeptoJs2['default'])(document).width() / 2;

@@ -188,3 +188,3 @@ if (isNaN(middleOfWindow)) {

var autocompleteWrapper = (0, _npmZepto2['default'])('.algolia-autocomplete');
var autocompleteWrapper = (0, _autocompleteJsZeptoJs2['default'])('.algolia-autocomplete');
if (!autocompleteWrapper.hasClass(alignClass)) {

@@ -218,9 +218,9 @@ autocompleteWrapper.addClass(alignClass);

value: function bindSearchBoxEvent(autocomplete) {
(0, _npmZepto2['default'])(".searchbox [type='reset']").on("click", function () {
(0, _npmZepto2['default'])("input#docsearch").focus();
(0, _npmZepto2['default'])(this).addClass("hide");
(0, _autocompleteJsZeptoJs2['default'])(".searchbox [type='reset']").on("click", function () {
(0, _autocompleteJsZeptoJs2['default'])("input#docsearch").focus();
(0, _autocompleteJsZeptoJs2['default'])(this).addClass("hide");
autocomplete.autocomplete.setVal("");
});
(0, _npmZepto2['default'])("input#docsearch").on("keyup", function () {
(0, _autocompleteJsZeptoJs2['default'])("input#docsearch").on("keyup", function () {
var searchbox = document.querySelector("input#docsearch");

@@ -245,4 +245,4 @@ var reset = document.querySelector(".searchbox [type='reset']");

value: function getInputFromSelector(selector) {
var input = (0, _npmZepto2['default'])(selector).filter('input');
return input.length ? (0, _npmZepto2['default'])(input[0]) : null;
var input = (0, _autocompleteJsZeptoJs2['default'])(selector).filter('input');
return input.length ? (0, _autocompleteJsZeptoJs2['default'])(input[0]) : null;
}

@@ -262,3 +262,3 @@ }, {

var groupedHits = _utilsJs2['default'].groupBy(hits, 'lvl0');
_npmZepto2['default'].each(groupedHits, function (level, collection) {
_autocompleteJsZeptoJs2['default'].each(groupedHits, function (level, collection) {
var groupedHitsByLvl1 = _utilsJs2['default'].groupBy(collection, 'lvl1');

@@ -265,0 +265,0 @@ var flattenedHits = _utilsJs2['default'].flattenAndFlagFirst(groupedHitsByLvl1, 'isSubCategoryHeader');

@@ -9,5 +9,5 @@ 'use strict';

var _npmZepto = require('npm-zepto');
var _autocompleteJsZeptoJs = require('autocomplete.js/zepto.js');
var _npmZepto2 = _interopRequireDefault(_npmZepto);
var _autocompleteJsZeptoJs2 = _interopRequireDefault(_autocompleteJsZeptoJs);

@@ -43,3 +43,3 @@ var utils = {

}
var newObject = _npmZepto2['default'].extend({}, object, object[property]);
var newObject = _autocompleteJsZeptoJs2['default'].extend({}, object, object[property]);
delete newObject[property];

@@ -81,3 +81,3 @@ return newObject;

var newCollection = {};
_npmZepto2['default'].each(collection, function (index, item) {
_autocompleteJsZeptoJs2['default'].each(collection, function (index, item) {
if (item[property] === undefined) {

@@ -84,0 +84,0 @@ throw new Error('[groupBy]: Object has no key ' + property);

@@ -6,3 +6,3 @@ 'use strict';

});
exports['default'] = '2.1.2';
exports['default'] = '2.1.3';
module.exports = exports['default'];
{
"name": "docsearch.js",
"version": "2.1.2",
"version": "2.1.3",
"description": "Add an autocomplete dropdown to your documentation",

@@ -64,8 +64,7 @@ "main": "dist/npm/index.js",

"dependencies": {
"algoliasearch": "^3.15.0",
"autocomplete.js": "^0.20.0",
"algoliasearch": "^3.18.0",
"autocomplete.js": "^0.21.3",
"hogan.js": "^3.0.2",
"npm-zepto": "^1.1.7",
"to-factory": "^1.0.0"
}
}
import Hogan from 'hogan.js';
import algoliasearch from 'algoliasearch';
import algoliasearch from 'algoliasearch/lite';
import autocomplete from 'autocomplete.js';

@@ -7,3 +7,3 @@ import templates from './templates.js';

import version from './version.js';
import $ from 'npm-zepto';
import $ from 'autocomplete.js/zepto.js';

@@ -10,0 +10,0 @@ /**

@@ -1,2 +0,2 @@

import $ from 'npm-zepto';
import $ from 'autocomplete.js/zepto.js';

@@ -3,0 +3,0 @@ let utils = {

@@ -1,1 +0,1 @@

export default '2.1.2';
export default '2.1.3';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc