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

@lrnwebcomponents/simple-search

Package Overview
Dependencies
Maintainers
4
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lrnwebcomponents/simple-search - npm Package Compare versions

Comparing version 0.0.31 to 0.0.32

2

build/es5-amd/lib/simple-search-content.js

@@ -9,3 +9,3 @@ define([

$_documentContainer.innerHTML =
'<dom-module id="simple-search-content">\n <style>\n :host #content {\n @apply --simple-search-content;\n }\n :host #content [match-number]{\n color: var(--simple-search-match-text-color, #000);\n background-color: var(--simple-search-match-bg-color, #f0f0f0);\n border: 1px solid; \n border-color: var(--simple-search-match-border-color, #ddd);\n padding: 0.1em 0.25em;\n border-radius: 0.1em;\n font-weight: bold;\n @apply --simple-search-match;\n }\n </style>\n <template>\n <span id="content">\n <template is="dom-repeat" items="[[_searchedContent]]">\n <span match-number$="[[item.matchNumber]]" tabindex$="[[_getTabIndex(item.matchNumber)]]">[[item.text]]</span>\n </template>\n </span>\n </template>\n\n \n</dom-module>';
'<dom-module id="simple-search-content">\n<template>\n <style>\n :host #content {\n @apply --simple-search-content;\n }\n :host #content[match-number]{\n color: var(--simple-search-match-text-color, #000);\n background-color: var(--simple-search-match-bg-color, #f0f0f0);\n border: 1px solid; \n border-color: var(--simple-search-match-border-color, #ddd);\n padding: 0.16px 4px;\n border-radius: 0.16px;\n font-weight: bold;\n @apply --simple-search-match;\n }\n </style>\n <span id="content">\n <template is="dom-repeat" items="[[_searchedContent]]">\n <span match-number$="[[item.matchNumber]]" tabindex$="[[_getTabIndex(item.matchNumber)]]">[[item.text]]</span>\n </template>\n </span>\n </template>\n\n \n</dom-module>';
document.head.appendChild($_documentContainer);

@@ -12,0 +12,0 @@ (0, _polymerLegacy.Polymer)({

@@ -9,12 +9,12 @@ define([

"use strict";
function _templateObject_cdd7b250e11811e882b5795e59a56fc5() {
function _templateObject_65298500e70611e8979fc12d0292bd30() {
var data = babelHelpers.taggedTemplateLiteral(
[
'\n <custom-style>\n <style is="custom-style">\n :host {\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n width: 100%;\n }\n :host #input {\n flex-grow: 2;\n margin-right: 0.25em;\n --paper-input-container-input-color: var(--simple-search-input-text-color, #000);\n --paper-input-container-focus-color: var(--simple-search-input-line-color, #000);\n --paper-input-container-color: var(--simple-search-input-placeholder-color, #222);\n color: var(--simple-search-input-placeholder-color, #222);\n @apply --simple-search-container;\n }\n :host #xofy {\n margin: 8px;\n }\n :host button {\n margin: 8px 0 8px;\n color: var(--simple-search-button-color, #111);\n background-color: var(--simple-search-button-bg-color, #eee);\n border-color: var(--simple-search-button-border-color, #ccc);\n @apply --simple-search-button;\n }\n :host button:not([disabled]):focus,\n :host button:not([disabled]):hover {\n cursor: pointer;\n color: var(--simple-search-button-hover-color, #000);\n background-color: var(--simple-search-button-hover-bg-color, #fff);\n border-color: var(--simple-search-button-hover-border-color, #ddd);\n @apply --simple-search-button-hover;\n }\n :host button[disabled] {\n cursor: not-allowed;\n color: var(--simple-search-button-disabled-color, #999);\n background-color: var(--simple-search-button-disabled-bg-color, #eee);\n border-color: var(--simple-search-button-disabled-border-color, #ccc);\n @apply --simple-search-button-disabled;\n }\n :host button:not([controls]) {\n display: none;\n }\n :host [shrink-hide] {\n display: none;\n }\n </style>\n </custom-style>\n <paper-input id="input" always-float-label$="[[alwaysFloatLabel]]" label="[[searchInputLabel]]" no-label-float$="[[noLabelFloat]]">\n <iron-icon icon="[[searchInputIcon]]" slot="prefix"></iron-icon>\n </paper-input>\n <div id="xofy" shrink-hide$="[[noSearch]]"></div>\n <div shrink-hide$="[[noResults]]">\n <button id="prev" aria-label="[[prevButtonLabel]]" aria-role="button" controls$="[[controls]]" disabled$="[[prevButtonDisabled]]" tabindex="0">\n <iron-icon icon="[[prevButtonIcon]]"></iron-icon>\n </button>\n <paper-tooltip for="prev">[[prevButtonLabel]]</paper-tooltip>\n <button id="next" aria-label="[[nextButtonLabel]]" aria-role="button" controls$="[[controls]]" disabled$="[[nextButtonDisabled]]" tabindex="0">\n <iron-icon icon$="[[nextButtonIcon]]"></iron-icon>\n </button>\n <paper-tooltip for="next">[[nextButtonLabel]]</paper-tooltip>\n </div>\n'
'\n <custom-style>\n <style is="custom-style">\n :host {\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n width: 100%;\n }\n :host #input {\n flex-grow: 2;\n margin-right: 4px;\n --paper-input-container-input-color: var(--simple-search-input-text-color, #000);\n --paper-input-container-focus-color: var(--simple-search-input-line-color, #000);\n --paper-input-container-color: var(--simple-search-input-placeholder-color, #222);\n color: var(--simple-search-input-placeholder-color, #222);\n @apply --simple-search-container;\n }\n :host #xofy {\n margin: 8px;\n }\n :host button {\n margin: 8px 0 8px;\n color: var(--simple-search-button-color, #111);\n background-color: var(--simple-search-button-bg-color, #eee);\n border-color: var(--simple-search-button-border-color, #ccc);\n @apply --simple-search-button;\n }\n :host button:not([disabled]):focus,\n :host button:not([disabled]):hover {\n cursor: pointer;\n color: var(--simple-search-button-hover-color, #000);\n background-color: var(--simple-search-button-hover-bg-color, #fff);\n border-color: var(--simple-search-button-hover-border-color, #ddd);\n @apply --simple-search-button-hover;\n }\n :host button[disabled] {\n cursor: not-allowed;\n color: var(--simple-search-button-disabled-color, #999);\n background-color: var(--simple-search-button-disabled-bg-color, #eee);\n border-color: var(--simple-search-button-disabled-border-color, #ccc);\n @apply --simple-search-button-disabled;\n }\n :host button:not([controls]) {\n display: none;\n }\n :host [shrink-hide] {\n display: none;\n }\n </style>\n </custom-style>\n <paper-input id="input" always-float-label$="[[alwaysFloatLabel]]" label="[[searchInputLabel]]" no-label-float$="[[noLabelFloat]]">\n <iron-icon icon="[[searchInputIcon]]" slot="prefix"></iron-icon>\n </paper-input>\n <div id="xofy" shrink-hide$="[[noSearch]]"></div>\n <div shrink-hide$="[[noResults]]">\n <button id="prev" aria-label="[[prevButtonLabel]]" aria-role="button" controls$="[[controls]]" disabled$="[[prevButtonDisabled]]" tabindex="0">\n <iron-icon icon="[[prevButtonIcon]]"></iron-icon>\n </button>\n <paper-tooltip for="prev">[[prevButtonLabel]]</paper-tooltip>\n <button id="next" aria-label="[[nextButtonLabel]]" aria-role="button" controls$="[[controls]]" disabled$="[[nextButtonDisabled]]" tabindex="0">\n <iron-icon icon$="[[nextButtonIcon]]"></iron-icon>\n </button>\n <paper-tooltip for="next">[[nextButtonLabel]]</paper-tooltip>\n </div>\n'
],
[
'\n <custom-style>\n <style is="custom-style">\n :host {\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n width: 100%;\n }\n :host #input {\n flex-grow: 2;\n margin-right: 0.25em;\n --paper-input-container-input-color: var(--simple-search-input-text-color, #000);\n --paper-input-container-focus-color: var(--simple-search-input-line-color, #000);\n --paper-input-container-color: var(--simple-search-input-placeholder-color, #222);\n color: var(--simple-search-input-placeholder-color, #222);\n @apply --simple-search-container;\n }\n :host #xofy {\n margin: 8px;\n }\n :host button {\n margin: 8px 0 8px;\n color: var(--simple-search-button-color, #111);\n background-color: var(--simple-search-button-bg-color, #eee);\n border-color: var(--simple-search-button-border-color, #ccc);\n @apply --simple-search-button;\n }\n :host button:not([disabled]):focus,\n :host button:not([disabled]):hover {\n cursor: pointer;\n color: var(--simple-search-button-hover-color, #000);\n background-color: var(--simple-search-button-hover-bg-color, #fff);\n border-color: var(--simple-search-button-hover-border-color, #ddd);\n @apply --simple-search-button-hover;\n }\n :host button[disabled] {\n cursor: not-allowed;\n color: var(--simple-search-button-disabled-color, #999);\n background-color: var(--simple-search-button-disabled-bg-color, #eee);\n border-color: var(--simple-search-button-disabled-border-color, #ccc);\n @apply --simple-search-button-disabled;\n }\n :host button:not([controls]) {\n display: none;\n }\n :host [shrink-hide] {\n display: none;\n }\n </style>\n </custom-style>\n <paper-input id="input" always-float-label\\$="[[alwaysFloatLabel]]" label="[[searchInputLabel]]" no-label-float\\$="[[noLabelFloat]]">\n <iron-icon icon="[[searchInputIcon]]" slot="prefix"></iron-icon>\n </paper-input>\n <div id="xofy" shrink-hide\\$="[[noSearch]]"></div>\n <div shrink-hide\\$="[[noResults]]">\n <button id="prev" aria-label="[[prevButtonLabel]]" aria-role="button" controls\\$="[[controls]]" disabled\\$="[[prevButtonDisabled]]" tabindex="0">\n <iron-icon icon="[[prevButtonIcon]]"></iron-icon>\n </button>\n <paper-tooltip for="prev">[[prevButtonLabel]]</paper-tooltip>\n <button id="next" aria-label="[[nextButtonLabel]]" aria-role="button" controls\\$="[[controls]]" disabled\\$="[[nextButtonDisabled]]" tabindex="0">\n <iron-icon icon\\$="[[nextButtonIcon]]"></iron-icon>\n </button>\n <paper-tooltip for="next">[[nextButtonLabel]]</paper-tooltip>\n </div>\n'
'\n <custom-style>\n <style is="custom-style">\n :host {\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n width: 100%;\n }\n :host #input {\n flex-grow: 2;\n margin-right: 4px;\n --paper-input-container-input-color: var(--simple-search-input-text-color, #000);\n --paper-input-container-focus-color: var(--simple-search-input-line-color, #000);\n --paper-input-container-color: var(--simple-search-input-placeholder-color, #222);\n color: var(--simple-search-input-placeholder-color, #222);\n @apply --simple-search-container;\n }\n :host #xofy {\n margin: 8px;\n }\n :host button {\n margin: 8px 0 8px;\n color: var(--simple-search-button-color, #111);\n background-color: var(--simple-search-button-bg-color, #eee);\n border-color: var(--simple-search-button-border-color, #ccc);\n @apply --simple-search-button;\n }\n :host button:not([disabled]):focus,\n :host button:not([disabled]):hover {\n cursor: pointer;\n color: var(--simple-search-button-hover-color, #000);\n background-color: var(--simple-search-button-hover-bg-color, #fff);\n border-color: var(--simple-search-button-hover-border-color, #ddd);\n @apply --simple-search-button-hover;\n }\n :host button[disabled] {\n cursor: not-allowed;\n color: var(--simple-search-button-disabled-color, #999);\n background-color: var(--simple-search-button-disabled-bg-color, #eee);\n border-color: var(--simple-search-button-disabled-border-color, #ccc);\n @apply --simple-search-button-disabled;\n }\n :host button:not([controls]) {\n display: none;\n }\n :host [shrink-hide] {\n display: none;\n }\n </style>\n </custom-style>\n <paper-input id="input" always-float-label\\$="[[alwaysFloatLabel]]" label="[[searchInputLabel]]" no-label-float\\$="[[noLabelFloat]]">\n <iron-icon icon="[[searchInputIcon]]" slot="prefix"></iron-icon>\n </paper-input>\n <div id="xofy" shrink-hide\\$="[[noSearch]]"></div>\n <div shrink-hide\\$="[[noResults]]">\n <button id="prev" aria-label="[[prevButtonLabel]]" aria-role="button" controls\\$="[[controls]]" disabled\\$="[[prevButtonDisabled]]" tabindex="0">\n <iron-icon icon="[[prevButtonIcon]]"></iron-icon>\n </button>\n <paper-tooltip for="prev">[[prevButtonLabel]]</paper-tooltip>\n <button id="next" aria-label="[[nextButtonLabel]]" aria-role="button" controls\\$="[[controls]]" disabled\\$="[[nextButtonDisabled]]" tabindex="0">\n <iron-icon icon\\$="[[nextButtonIcon]]"></iron-icon>\n </button>\n <paper-tooltip for="next">[[nextButtonLabel]]</paper-tooltip>\n </div>\n'
]
);
_templateObject_cdd7b250e11811e882b5795e59a56fc5 = function() {
_templateObject_65298500e70611e8979fc12d0292bd30 = function() {
return data;

@@ -26,3 +26,3 @@ };

_template: (0, _polymerLegacy.html)(
_templateObject_cdd7b250e11811e882b5795e59a56fc5()
_templateObject_65298500e70611e8979fc12d0292bd30()
),

@@ -29,0 +29,0 @@ is: "simple-search",

@@ -9,2 +9,3 @@ import {

$_documentContainer.innerHTML = `<dom-module id="simple-search-content">
<template>
<style>

@@ -14,3 +15,3 @@ :host #content {

}
:host #content [match-number]{
:host #content[match-number]{
color: var(--simple-search-match-text-color, #000);

@@ -20,4 +21,4 @@ background-color: var(--simple-search-match-bg-color, #f0f0f0);

border-color: var(--simple-search-match-border-color, #ddd);
padding: 0.1em 0.25em;
border-radius: 0.1em;
padding: 0.16px 4px;
border-radius: 0.16px;
font-weight: bold;

@@ -27,3 +28,2 @@ @apply --simple-search-match;

</style>
<template>
<span id="content">

@@ -30,0 +30,0 @@ <template is="dom-repeat" items="[[_searchedContent]]">

@@ -21,3 +21,3 @@ import {

flex-grow: 2;
margin-right: 0.25em;
margin-right: 4px;
--paper-input-container-input-color: var(--simple-search-input-text-color, #000);

@@ -24,0 +24,0 @@ --paper-input-container-focus-color: var(--simple-search-input-line-color, #000);

@@ -7,2 +7,3 @@ import { html, Polymer } from "@polymer/polymer/polymer-legacy.js";

$_documentContainer.innerHTML = `<dom-module id="simple-search-content">
<template>
<style>

@@ -12,3 +13,3 @@ :host #content {

}
:host #content [match-number]{
:host #content[match-number]{
color: var(--simple-search-match-text-color, #000);

@@ -18,4 +19,4 @@ background-color: var(--simple-search-match-bg-color, #f0f0f0);

border-color: var(--simple-search-match-border-color, #ddd);
padding: 0.1em 0.25em;
border-radius: 0.1em;
padding: 0.16px 4px;
border-radius: 0.16px;
font-weight: bold;

@@ -25,3 +26,2 @@ @apply --simple-search-match;

</style>
<template>
<span id="content">

@@ -28,0 +28,0 @@ <template is="dom-repeat" items="[[_searchedContent]]">

@@ -14,3 +14,3 @@ {

},
"version": "0.0.31",
"version": "0.0.32",
"description": "Automated conversion of simple-search",

@@ -45,3 +45,3 @@ "repository": {

"devDependencies": {
"@lrnwebcomponents/deduping-fix": "^0.0.31",
"@lrnwebcomponents/deduping-fix": "^0.0.32",
"@polymer/iron-component-page": "github:PolymerElements/iron-component-page",

@@ -66,3 +66,3 @@ "@polymer/iron-demo-helpers": "3.0.2",

],
"gitHead": "df7c0cfb6358da01b0a3c518a9bd700722411e9a"
"gitHead": "7aa2b90f1a43ae6ea6ee25e0f38d9a09a893218a"
}

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

define(["./node_modules/@polymer/polymer/polymer-legacy.js","./node_modules/@polymer/iron-icons/iron-icons.js","./node_modules/@polymer/paper-input/paper-input.js","./node_modules/@polymer/paper-tooltip/paper-tooltip.js","./lib/simple-search-content.js"],function(_polymerLegacy){"use strict";function _templateObject_cdd7b250e11811e882b5795e59a56fc5(){var data=babelHelpers.taggedTemplateLiteral(["\n <custom-style>\n <style is=\"custom-style\">\n :host {\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n width: 100%;\n }\n :host #input {\n flex-grow: 2;\n margin-right: 0.25em;\n --paper-input-container-input-color: var(--simple-search-input-text-color, #000);\n --paper-input-container-focus-color: var(--simple-search-input-line-color, #000);\n --paper-input-container-color: var(--simple-search-input-placeholder-color, #222);\n color: var(--simple-search-input-placeholder-color, #222);\n @apply --simple-search-container;\n }\n :host #xofy {\n margin: 8px;\n }\n :host button {\n margin: 8px 0 8px;\n color: var(--simple-search-button-color, #111);\n background-color: var(--simple-search-button-bg-color, #eee);\n border-color: var(--simple-search-button-border-color, #ccc);\n @apply --simple-search-button;\n }\n :host button:not([disabled]):focus,\n :host button:not([disabled]):hover {\n cursor: pointer;\n color: var(--simple-search-button-hover-color, #000);\n background-color: var(--simple-search-button-hover-bg-color, #fff);\n border-color: var(--simple-search-button-hover-border-color, #ddd);\n @apply --simple-search-button-hover;\n }\n :host button[disabled] {\n cursor: not-allowed;\n color: var(--simple-search-button-disabled-color, #999);\n background-color: var(--simple-search-button-disabled-bg-color, #eee);\n border-color: var(--simple-search-button-disabled-border-color, #ccc);\n @apply --simple-search-button-disabled;\n }\n :host button:not([controls]) {\n display: none;\n }\n :host [shrink-hide] {\n display: none;\n }\n </style>\n </custom-style>\n <paper-input id=\"input\" always-float-label$=\"[[alwaysFloatLabel]]\" label=\"[[searchInputLabel]]\" no-label-float$=\"[[noLabelFloat]]\">\n <iron-icon icon=\"[[searchInputIcon]]\" slot=\"prefix\"></iron-icon>\n </paper-input>\n <div id=\"xofy\" shrink-hide$=\"[[noSearch]]\"></div>\n <div shrink-hide$=\"[[noResults]]\">\n <button id=\"prev\" aria-label=\"[[prevButtonLabel]]\" aria-role=\"button\" controls$=\"[[controls]]\" disabled$=\"[[prevButtonDisabled]]\" tabindex=\"0\">\n <iron-icon icon=\"[[prevButtonIcon]]\"></iron-icon>\n </button>\n <paper-tooltip for=\"prev\">[[prevButtonLabel]]</paper-tooltip>\n <button id=\"next\" aria-label=\"[[nextButtonLabel]]\" aria-role=\"button\" controls$=\"[[controls]]\" disabled$=\"[[nextButtonDisabled]]\" tabindex=\"0\">\n <iron-icon icon$=\"[[nextButtonIcon]]\"></iron-icon>\n </button>\n <paper-tooltip for=\"next\">[[nextButtonLabel]]</paper-tooltip>\n </div>\n"],["\n <custom-style>\n <style is=\"custom-style\">\n :host {\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n width: 100%;\n }\n :host #input {\n flex-grow: 2;\n margin-right: 0.25em;\n --paper-input-container-input-color: var(--simple-search-input-text-color, #000);\n --paper-input-container-focus-color: var(--simple-search-input-line-color, #000);\n --paper-input-container-color: var(--simple-search-input-placeholder-color, #222);\n color: var(--simple-search-input-placeholder-color, #222);\n @apply --simple-search-container;\n }\n :host #xofy {\n margin: 8px;\n }\n :host button {\n margin: 8px 0 8px;\n color: var(--simple-search-button-color, #111);\n background-color: var(--simple-search-button-bg-color, #eee);\n border-color: var(--simple-search-button-border-color, #ccc);\n @apply --simple-search-button;\n }\n :host button:not([disabled]):focus,\n :host button:not([disabled]):hover {\n cursor: pointer;\n color: var(--simple-search-button-hover-color, #000);\n background-color: var(--simple-search-button-hover-bg-color, #fff);\n border-color: var(--simple-search-button-hover-border-color, #ddd);\n @apply --simple-search-button-hover;\n }\n :host button[disabled] {\n cursor: not-allowed;\n color: var(--simple-search-button-disabled-color, #999);\n background-color: var(--simple-search-button-disabled-bg-color, #eee);\n border-color: var(--simple-search-button-disabled-border-color, #ccc);\n @apply --simple-search-button-disabled;\n }\n :host button:not([controls]) {\n display: none;\n }\n :host [shrink-hide] {\n display: none;\n }\n </style>\n </custom-style>\n <paper-input id=\"input\" always-float-label\\$=\"[[alwaysFloatLabel]]\" label=\"[[searchInputLabel]]\" no-label-float\\$=\"[[noLabelFloat]]\">\n <iron-icon icon=\"[[searchInputIcon]]\" slot=\"prefix\"></iron-icon>\n </paper-input>\n <div id=\"xofy\" shrink-hide\\$=\"[[noSearch]]\"></div>\n <div shrink-hide\\$=\"[[noResults]]\">\n <button id=\"prev\" aria-label=\"[[prevButtonLabel]]\" aria-role=\"button\" controls\\$=\"[[controls]]\" disabled\\$=\"[[prevButtonDisabled]]\" tabindex=\"0\">\n <iron-icon icon=\"[[prevButtonIcon]]\"></iron-icon>\n </button>\n <paper-tooltip for=\"prev\">[[prevButtonLabel]]</paper-tooltip>\n <button id=\"next\" aria-label=\"[[nextButtonLabel]]\" aria-role=\"button\" controls\\$=\"[[controls]]\" disabled\\$=\"[[nextButtonDisabled]]\" tabindex=\"0\">\n <iron-icon icon\\$=\"[[nextButtonIcon]]\"></iron-icon>\n </button>\n <paper-tooltip for=\"next\">[[nextButtonLabel]]</paper-tooltip>\n </div>\n"]);_templateObject_cdd7b250e11811e882b5795e59a56fc5=function(){return data};return data}(0,_polymerLegacy.Polymer)({_template:(0,_polymerLegacy.html)(_templateObject_cdd7b250e11811e882b5795e59a56fc5()),is:"simple-search",properties:{alwaysFloatLabel:{type:Boolean,value:!1},caseSensitive:{type:Boolean,value:null},controls:{type:String,value:null},nextButtonDisabled:{type:Boolean,computed:"_isNavButtonDisabled(resultPointer,resultCount,resultsSpan,1)"},nextButtonIcon:{type:String,value:"arrow-forward"},nextButtonLabel:{type:String,value:"next result"},noLabelFloat:{type:Boolean,value:!1},noResults:{type:Boolean,computed:"_hasNoResults(resultCount)"},noSearch:{type:Boolean,computed:"_hasNoSearch(searchTerms)"},prevButtonDisabled:{type:Boolean,computed:"_isNavButtonDisabled(resultPointer,resultCount,resultsSpan,-1)"},prevButtonIcon:{type:String,value:"arrow-back"},prevButtonLabel:{type:String,value:"previous result"},resultCount:{type:Number,value:0},resultPointer:{type:Number,value:0},resultsSpan:{type:String,computed:"_getResultsSpan(noSearch,resultPointer,resultCount)"},searchInputIcon:{type:String,value:"search"},searchInputLabel:{type:String,value:"search"},searchTerms:{type:Array,value:[]},target:{type:Object,value:null}},ready:function ready(){var root=this,search=root.$.input;root._getSearchText(search.value);root.addEventListener("change",function(){root._getSearchText(search.value);root.resultCount=0;root.resultPointer=0;root.fire("search",root)});root.$.prev.addEventListener("tap",function(){root._navigateResults(-1)});root.$.next.addEventListener("tap",function(){root._navigateResults(1)})},_hasNoResults:function _hasNoResults(resultCount){return 1>resultCount},_hasNoSearch:function _hasNoSearch(searchTerms){return 1>searchTerms.length},_getResultsSpan:function _getResultsSpan(noSearch,resultPointer,resultCount){var html="";if(0<resultCount&&0<resultPointer){html=resultPointer+"/"+resultCount}else{html=" "+resultCount}this.$.xofy.innerHTML=html;return this.$.xofy.innerHTML},_navigateResults:function _navigateResults(increment){if(0<this.resultPointer+increment&&this.resultPointer+increment<=this.resultCount){this.resultPointer+=increment;this.fire("goto-result",this.resultPointer)}},_isNavButtonDisabled:function _isNavButtonDisabled(resultPointer,resultCount,resultsSpan,increment){return""==resultsSpan||0>=resultPointer+increment||resultPointer+increment>resultCount},_getSearchText:function _getSearchText(find){var temp=[];if(find!==void 0&&null!==find){temp=find.split(/[\"\']/gm);for(var i=0;i<temp.length;i++){temp[i]=temp[i].trim();if(""===temp[i])temp.splice(i,1)}}this.set("searchTerms",temp.slice(0))},findMatches:function findMatches(content){for(var root=this,terms=root.searchTerms,modifier=this.caseSensitive?"gm":"gim",results=content.slice(0),updateResults=function(find){for(var i=0;i<results.length;i++){if(!1===results[i].matched){var regex=new RegExp("\\b"+find+"\\b",modifier),text=results[i].text,start=text.search(regex),end=start+find.length;if(-1<start){root.resultCount+=1;var pre=text.slice(0,start),match=text.slice(start,end),post=text.slice(end,text.length),update=results.splice(i,1,{matched:!1,text:pre,searchObject:root},{matched:!0,matchNumber:root.resultCount,text:match,searchObject:root},{matched:!1,text:post,searchObject:root})}}}},i=0;i<terms.length;i++){updateResults(terms[i])}root.resultPointer=0;return results}})});
define(["./node_modules/@polymer/polymer/polymer-legacy.js","./node_modules/@polymer/iron-icons/iron-icons.js","./node_modules/@polymer/paper-input/paper-input.js","./node_modules/@polymer/paper-tooltip/paper-tooltip.js","./lib/simple-search-content.js"],function(_polymerLegacy){"use strict";function _templateObject_65298500e70611e8979fc12d0292bd30(){var data=babelHelpers.taggedTemplateLiteral(["\n <custom-style>\n <style is=\"custom-style\">\n :host {\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n width: 100%;\n }\n :host #input {\n flex-grow: 2;\n margin-right: 4px;\n --paper-input-container-input-color: var(--simple-search-input-text-color, #000);\n --paper-input-container-focus-color: var(--simple-search-input-line-color, #000);\n --paper-input-container-color: var(--simple-search-input-placeholder-color, #222);\n color: var(--simple-search-input-placeholder-color, #222);\n @apply --simple-search-container;\n }\n :host #xofy {\n margin: 8px;\n }\n :host button {\n margin: 8px 0 8px;\n color: var(--simple-search-button-color, #111);\n background-color: var(--simple-search-button-bg-color, #eee);\n border-color: var(--simple-search-button-border-color, #ccc);\n @apply --simple-search-button;\n }\n :host button:not([disabled]):focus,\n :host button:not([disabled]):hover {\n cursor: pointer;\n color: var(--simple-search-button-hover-color, #000);\n background-color: var(--simple-search-button-hover-bg-color, #fff);\n border-color: var(--simple-search-button-hover-border-color, #ddd);\n @apply --simple-search-button-hover;\n }\n :host button[disabled] {\n cursor: not-allowed;\n color: var(--simple-search-button-disabled-color, #999);\n background-color: var(--simple-search-button-disabled-bg-color, #eee);\n border-color: var(--simple-search-button-disabled-border-color, #ccc);\n @apply --simple-search-button-disabled;\n }\n :host button:not([controls]) {\n display: none;\n }\n :host [shrink-hide] {\n display: none;\n }\n </style>\n </custom-style>\n <paper-input id=\"input\" always-float-label$=\"[[alwaysFloatLabel]]\" label=\"[[searchInputLabel]]\" no-label-float$=\"[[noLabelFloat]]\">\n <iron-icon icon=\"[[searchInputIcon]]\" slot=\"prefix\"></iron-icon>\n </paper-input>\n <div id=\"xofy\" shrink-hide$=\"[[noSearch]]\"></div>\n <div shrink-hide$=\"[[noResults]]\">\n <button id=\"prev\" aria-label=\"[[prevButtonLabel]]\" aria-role=\"button\" controls$=\"[[controls]]\" disabled$=\"[[prevButtonDisabled]]\" tabindex=\"0\">\n <iron-icon icon=\"[[prevButtonIcon]]\"></iron-icon>\n </button>\n <paper-tooltip for=\"prev\">[[prevButtonLabel]]</paper-tooltip>\n <button id=\"next\" aria-label=\"[[nextButtonLabel]]\" aria-role=\"button\" controls$=\"[[controls]]\" disabled$=\"[[nextButtonDisabled]]\" tabindex=\"0\">\n <iron-icon icon$=\"[[nextButtonIcon]]\"></iron-icon>\n </button>\n <paper-tooltip for=\"next\">[[nextButtonLabel]]</paper-tooltip>\n </div>\n"],["\n <custom-style>\n <style is=\"custom-style\">\n :host {\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n width: 100%;\n }\n :host #input {\n flex-grow: 2;\n margin-right: 4px;\n --paper-input-container-input-color: var(--simple-search-input-text-color, #000);\n --paper-input-container-focus-color: var(--simple-search-input-line-color, #000);\n --paper-input-container-color: var(--simple-search-input-placeholder-color, #222);\n color: var(--simple-search-input-placeholder-color, #222);\n @apply --simple-search-container;\n }\n :host #xofy {\n margin: 8px;\n }\n :host button {\n margin: 8px 0 8px;\n color: var(--simple-search-button-color, #111);\n background-color: var(--simple-search-button-bg-color, #eee);\n border-color: var(--simple-search-button-border-color, #ccc);\n @apply --simple-search-button;\n }\n :host button:not([disabled]):focus,\n :host button:not([disabled]):hover {\n cursor: pointer;\n color: var(--simple-search-button-hover-color, #000);\n background-color: var(--simple-search-button-hover-bg-color, #fff);\n border-color: var(--simple-search-button-hover-border-color, #ddd);\n @apply --simple-search-button-hover;\n }\n :host button[disabled] {\n cursor: not-allowed;\n color: var(--simple-search-button-disabled-color, #999);\n background-color: var(--simple-search-button-disabled-bg-color, #eee);\n border-color: var(--simple-search-button-disabled-border-color, #ccc);\n @apply --simple-search-button-disabled;\n }\n :host button:not([controls]) {\n display: none;\n }\n :host [shrink-hide] {\n display: none;\n }\n </style>\n </custom-style>\n <paper-input id=\"input\" always-float-label\\$=\"[[alwaysFloatLabel]]\" label=\"[[searchInputLabel]]\" no-label-float\\$=\"[[noLabelFloat]]\">\n <iron-icon icon=\"[[searchInputIcon]]\" slot=\"prefix\"></iron-icon>\n </paper-input>\n <div id=\"xofy\" shrink-hide\\$=\"[[noSearch]]\"></div>\n <div shrink-hide\\$=\"[[noResults]]\">\n <button id=\"prev\" aria-label=\"[[prevButtonLabel]]\" aria-role=\"button\" controls\\$=\"[[controls]]\" disabled\\$=\"[[prevButtonDisabled]]\" tabindex=\"0\">\n <iron-icon icon=\"[[prevButtonIcon]]\"></iron-icon>\n </button>\n <paper-tooltip for=\"prev\">[[prevButtonLabel]]</paper-tooltip>\n <button id=\"next\" aria-label=\"[[nextButtonLabel]]\" aria-role=\"button\" controls\\$=\"[[controls]]\" disabled\\$=\"[[nextButtonDisabled]]\" tabindex=\"0\">\n <iron-icon icon\\$=\"[[nextButtonIcon]]\"></iron-icon>\n </button>\n <paper-tooltip for=\"next\">[[nextButtonLabel]]</paper-tooltip>\n </div>\n"]);_templateObject_65298500e70611e8979fc12d0292bd30=function(){return data};return data}(0,_polymerLegacy.Polymer)({_template:(0,_polymerLegacy.html)(_templateObject_65298500e70611e8979fc12d0292bd30()),is:"simple-search",properties:{alwaysFloatLabel:{type:Boolean,value:!1},caseSensitive:{type:Boolean,value:null},controls:{type:String,value:null},nextButtonDisabled:{type:Boolean,computed:"_isNavButtonDisabled(resultPointer,resultCount,resultsSpan,1)"},nextButtonIcon:{type:String,value:"arrow-forward"},nextButtonLabel:{type:String,value:"next result"},noLabelFloat:{type:Boolean,value:!1},noResults:{type:Boolean,computed:"_hasNoResults(resultCount)"},noSearch:{type:Boolean,computed:"_hasNoSearch(searchTerms)"},prevButtonDisabled:{type:Boolean,computed:"_isNavButtonDisabled(resultPointer,resultCount,resultsSpan,-1)"},prevButtonIcon:{type:String,value:"arrow-back"},prevButtonLabel:{type:String,value:"previous result"},resultCount:{type:Number,value:0},resultPointer:{type:Number,value:0},resultsSpan:{type:String,computed:"_getResultsSpan(noSearch,resultPointer,resultCount)"},searchInputIcon:{type:String,value:"search"},searchInputLabel:{type:String,value:"search"},searchTerms:{type:Array,value:[]},target:{type:Object,value:null}},ready:function ready(){var root=this,search=root.$.input;root._getSearchText(search.value);root.addEventListener("change",function(){root._getSearchText(search.value);root.resultCount=0;root.resultPointer=0;root.fire("search",root)});root.$.prev.addEventListener("tap",function(){root._navigateResults(-1)});root.$.next.addEventListener("tap",function(){root._navigateResults(1)})},_hasNoResults:function _hasNoResults(resultCount){return 1>resultCount},_hasNoSearch:function _hasNoSearch(searchTerms){return 1>searchTerms.length},_getResultsSpan:function _getResultsSpan(noSearch,resultPointer,resultCount){var html="";if(0<resultCount&&0<resultPointer){html=resultPointer+"/"+resultCount}else{html=" "+resultCount}this.$.xofy.innerHTML=html;return this.$.xofy.innerHTML},_navigateResults:function _navigateResults(increment){if(0<this.resultPointer+increment&&this.resultPointer+increment<=this.resultCount){this.resultPointer+=increment;this.fire("goto-result",this.resultPointer)}},_isNavButtonDisabled:function _isNavButtonDisabled(resultPointer,resultCount,resultsSpan,increment){return""==resultsSpan||0>=resultPointer+increment||resultPointer+increment>resultCount},_getSearchText:function _getSearchText(find){var temp=[];if(find!==void 0&&null!==find){temp=find.split(/[\"\']/gm);for(var i=0;i<temp.length;i++){temp[i]=temp[i].trim();if(""===temp[i])temp.splice(i,1)}}this.set("searchTerms",temp.slice(0))},findMatches:function findMatches(content){for(var root=this,terms=root.searchTerms,modifier=this.caseSensitive?"gm":"gim",results=content.slice(0),updateResults=function(find){for(var i=0;i<results.length;i++){if(!1===results[i].matched){var regex=new RegExp("\\b"+find+"\\b",modifier),text=results[i].text,start=text.search(regex),end=start+find.length;if(-1<start){root.resultCount+=1;var pre=text.slice(0,start),match=text.slice(start,end),post=text.slice(end,text.length),update=results.splice(i,1,{matched:!1,text:pre,searchObject:root},{matched:!0,matchNumber:root.resultCount,text:match,searchObject:root},{matched:!1,text:post,searchObject:root})}}}},i=0;i<terms.length;i++){updateResults(terms[i])}root.resultPointer=0;return results}})});

@@ -12,3 +12,3 @@ import{html,Polymer}from"./node_modules/@polymer/polymer/polymer-legacy.js";import"./node_modules/@polymer/iron-icons/iron-icons.js";import"./node_modules/@polymer/paper-input/paper-input.js";import"./node_modules/@polymer/paper-tooltip/paper-tooltip.js";import"./lib/simple-search-content.js";Polymer({_template:html`

flex-grow: 2;
margin-right: 0.25em;
margin-right: 4px;
--paper-input-container-input-color: var(--simple-search-input-text-color, #000);

@@ -15,0 +15,0 @@ --paper-input-container-focus-color: var(--simple-search-input-line-color, #000);

@@ -94,3 +94,3 @@ import { html, Polymer } from "@polymer/polymer/polymer-legacy.js";

flex-grow: 2;
margin-right: 0.25em;
margin-right: 4px;
--paper-input-container-input-color: var(--simple-search-input-text-color, #000);

@@ -97,0 +97,0 @@ --paper-input-container-focus-color: var(--simple-search-input-line-color, #000);

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("@polymer/polymer/polymer-legacy.js"),require("@polymer/polymer/lib/legacy/polymer.dom.js"),require("@polymer/iron-icons/iron-icons.js"),require("@polymer/paper-input/paper-input.js"),require("@polymer/paper-tooltip/paper-tooltip.js")):"function"==typeof define&&define.amd?define(["@polymer/polymer/polymer-legacy.js","@polymer/polymer/lib/legacy/polymer.dom.js","@polymer/iron-icons/iron-icons.js","@polymer/paper-input/paper-input.js","@polymer/paper-tooltip/paper-tooltip.js"],t):t(e.polymerLegacy_js,e.polymer_dom_js)}(this,function(e,t){"use strict";var n=document.createElement("div");function o(){var e,t,n=(e=['\n <custom-style>\n <style is="custom-style">\n :host {\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n width: 100%;\n }\n :host #input {\n flex-grow: 2;\n margin-right: 0.25em;\n --paper-input-container-input-color: var(--simple-search-input-text-color, #000);\n --paper-input-container-focus-color: var(--simple-search-input-line-color, #000);\n --paper-input-container-color: var(--simple-search-input-placeholder-color, #222);\n color: var(--simple-search-input-placeholder-color, #222);\n @apply --simple-search-container;\n }\n :host #xofy {\n margin: 8px;\n }\n :host button {\n margin: 8px 0 8px;\n color: var(--simple-search-button-color, #111);\n background-color: var(--simple-search-button-bg-color, #eee);\n border-color: var(--simple-search-button-border-color, #ccc);\n @apply --simple-search-button;\n }\n :host button:not([disabled]):focus,\n :host button:not([disabled]):hover {\n cursor: pointer;\n color: var(--simple-search-button-hover-color, #000);\n background-color: var(--simple-search-button-hover-bg-color, #fff);\n border-color: var(--simple-search-button-hover-border-color, #ddd);\n @apply --simple-search-button-hover;\n }\n :host button[disabled] {\n cursor: not-allowed;\n color: var(--simple-search-button-disabled-color, #999);\n background-color: var(--simple-search-button-disabled-bg-color, #eee);\n border-color: var(--simple-search-button-disabled-border-color, #ccc);\n @apply --simple-search-button-disabled;\n }\n :host button:not([controls]) {\n display: none;\n }\n :host [shrink-hide] {\n display: none;\n }\n </style>\n </custom-style>\n <paper-input id="input" always-float-label$="[[alwaysFloatLabel]]" label="[[searchInputLabel]]" no-label-float$="[[noLabelFloat]]">\n <iron-icon icon="[[searchInputIcon]]" slot="prefix"></iron-icon>\n </paper-input>\n <div id="xofy" shrink-hide$="[[noSearch]]"></div>\n <div shrink-hide$="[[noResults]]">\n <button id="prev" aria-label="[[prevButtonLabel]]" aria-role="button" controls$="[[controls]]" disabled$="[[prevButtonDisabled]]" tabindex="0">\n <iron-icon icon="[[prevButtonIcon]]"></iron-icon>\n </button>\n <paper-tooltip for="prev">[[prevButtonLabel]]</paper-tooltip>\n <button id="next" aria-label="[[nextButtonLabel]]" aria-role="button" controls$="[[controls]]" disabled$="[[nextButtonDisabled]]" tabindex="0">\n <iron-icon icon$="[[nextButtonIcon]]"></iron-icon>\n </button>\n <paper-tooltip for="next">[[nextButtonLabel]]</paper-tooltip>\n </div>\n'],(t=['\n <custom-style>\n <style is="custom-style">\n :host {\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n width: 100%;\n }\n :host #input {\n flex-grow: 2;\n margin-right: 0.25em;\n --paper-input-container-input-color: var(--simple-search-input-text-color, #000);\n --paper-input-container-focus-color: var(--simple-search-input-line-color, #000);\n --paper-input-container-color: var(--simple-search-input-placeholder-color, #222);\n color: var(--simple-search-input-placeholder-color, #222);\n @apply --simple-search-container;\n }\n :host #xofy {\n margin: 8px;\n }\n :host button {\n margin: 8px 0 8px;\n color: var(--simple-search-button-color, #111);\n background-color: var(--simple-search-button-bg-color, #eee);\n border-color: var(--simple-search-button-border-color, #ccc);\n @apply --simple-search-button;\n }\n :host button:not([disabled]):focus,\n :host button:not([disabled]):hover {\n cursor: pointer;\n color: var(--simple-search-button-hover-color, #000);\n background-color: var(--simple-search-button-hover-bg-color, #fff);\n border-color: var(--simple-search-button-hover-border-color, #ddd);\n @apply --simple-search-button-hover;\n }\n :host button[disabled] {\n cursor: not-allowed;\n color: var(--simple-search-button-disabled-color, #999);\n background-color: var(--simple-search-button-disabled-bg-color, #eee);\n border-color: var(--simple-search-button-disabled-border-color, #ccc);\n @apply --simple-search-button-disabled;\n }\n :host button:not([controls]) {\n display: none;\n }\n :host [shrink-hide] {\n display: none;\n }\n </style>\n </custom-style>\n <paper-input id="input" always-float-label\\$="[[alwaysFloatLabel]]" label="[[searchInputLabel]]" no-label-float\\$="[[noLabelFloat]]">\n <iron-icon icon="[[searchInputIcon]]" slot="prefix"></iron-icon>\n </paper-input>\n <div id="xofy" shrink-hide\\$="[[noSearch]]"></div>\n <div shrink-hide\\$="[[noResults]]">\n <button id="prev" aria-label="[[prevButtonLabel]]" aria-role="button" controls\\$="[[controls]]" disabled\\$="[[prevButtonDisabled]]" tabindex="0">\n <iron-icon icon="[[prevButtonIcon]]"></iron-icon>\n </button>\n <paper-tooltip for="prev">[[prevButtonLabel]]</paper-tooltip>\n <button id="next" aria-label="[[nextButtonLabel]]" aria-role="button" controls\\$="[[controls]]" disabled\\$="[[nextButtonDisabled]]" tabindex="0">\n <iron-icon icon\\$="[[nextButtonIcon]]"></iron-icon>\n </button>\n <paper-tooltip for="next">[[nextButtonLabel]]</paper-tooltip>\n </div>\n'])||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return o=function(){return n},n}n.setAttribute("style","display: none;"),n.innerHTML='<dom-module id="simple-search-content">\n <style>\n :host #content {\n @apply --simple-search-content;\n }\n :host #content [match-number]{\n color: var(--simple-search-match-text-color, #000);\n background-color: var(--simple-search-match-bg-color, #f0f0f0);\n border: 1px solid; \n border-color: var(--simple-search-match-border-color, #ddd);\n padding: 0.1em 0.25em;\n border-radius: 0.1em;\n font-weight: bold;\n @apply --simple-search-match;\n }\n </style>\n <template>\n <span id="content">\n <template is="dom-repeat" items="[[_searchedContent]]">\n <span match-number$="[[item.matchNumber]]" tabindex$="[[_getTabIndex(item.matchNumber)]]">[[item.text]]</span>\n </template>\n </span>\n </template>\n\n \n</dom-module>',document.head.appendChild(n),e.Polymer({is:"simple-search-content",properties:{content:{type:String,value:null}},enableSearch:function(e){var n=this,o=[{matched:!1,text:n.content}];null===o[0].text&&(o[0].text=t.dom(n).innerHTML),n.setContent(o),e.addEventListener("search",function(){n.setContent(o),n.setContent(e.findMatches(o))}),e.addEventListener("goto-result",function(e){n.focus(e.detail)})},setContent:function(e){this._searchedContent=e},focus:function(e){var t=this.$.content.querySelector('[match-number="'+e+'"]');null!=t&&t.focus()},_getTabIndex:function(e){return null!=e?"1":""}}),e.Polymer({_template:e.html(o()),is:"simple-search",properties:{alwaysFloatLabel:{type:Boolean,value:!1},caseSensitive:{type:Boolean,value:null},controls:{type:String,value:null},nextButtonDisabled:{type:Boolean,computed:"_isNavButtonDisabled(resultPointer,resultCount,resultsSpan,1)"},nextButtonIcon:{type:String,value:"arrow-forward"},nextButtonLabel:{type:String,value:"next result"},noLabelFloat:{type:Boolean,value:!1},noResults:{type:Boolean,computed:"_hasNoResults(resultCount)"},noSearch:{type:Boolean,computed:"_hasNoSearch(searchTerms)"},prevButtonDisabled:{type:Boolean,computed:"_isNavButtonDisabled(resultPointer,resultCount,resultsSpan,-1)"},prevButtonIcon:{type:String,value:"arrow-back"},prevButtonLabel:{type:String,value:"previous result"},resultCount:{type:Number,value:0},resultPointer:{type:Number,value:0},resultsSpan:{type:String,computed:"_getResultsSpan(noSearch,resultPointer,resultCount)"},searchInputIcon:{type:String,value:"search"},searchInputLabel:{type:String,value:"search"},searchTerms:{type:Array,value:[]},target:{type:Object,value:null}},ready:function(){var e=this,t=e.$.input;e._getSearchText(t.value),e.addEventListener("change",function(n){e._getSearchText(t.value),e.resultCount=0,e.resultPointer=0,e.fire("search",e)}),e.$.prev.addEventListener("tap",function(t){e._navigateResults(-1)}),e.$.next.addEventListener("tap",function(t){e._navigateResults(1)})},_hasNoResults:function(e){return e<1},_hasNoSearch:function(e){return e.length<1},_getResultsSpan:function(e,t,n){var o="";return o=n>0&&t>0?t+"/"+n:" "+n,this.$.xofy.innerHTML=o,this.$.xofy.innerHTML},_navigateResults:function(e){this.resultPointer+e>0&&this.resultPointer+e<=this.resultCount&&(this.resultPointer+=e,this.fire("goto-result",this.resultPointer))},_isNavButtonDisabled:function(e,t,n,o){return""==n||e+o<=0||e+o>t},_getSearchText:function(e){var t=new Array;if(null!=e){t=e.split(/[\"\']/gm);for(var n=0;n<t.length;n++)t[n]=t[n].trim(),""===t[n]&&t.splice(n,1)}this.set("searchTerms",t.slice(0))},findMatches:function(e){for(var t=this,n=t.searchTerms,o=this.caseSensitive?"gm":"gim",r=e.slice(0),l=function(e){for(var n=0;n<r.length;n++)if(!1===r[n].matched){var l=new RegExp("\\b"+e+"\\b",o),a=r[n].text,i=a.search(l),s=i+e.length;if(i>-1){t.resultCount+=1;var c=a.slice(0,i),p=a.slice(i,s),u=a.slice(s,a.length);r.splice(n,1,{matched:!1,text:c,searchObject:t},{matched:!0,matchNumber:t.resultCount,text:p,searchObject:t},{matched:!1,text:u,searchObject:t})}}},a=0;a<n.length;a++)l(n[a]);return t.resultPointer=0,r}})});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(require("@polymer/iron-icons/iron-icons.js"),require("@polymer/paper-input/paper-input.js"),require("@polymer/paper-tooltip/paper-tooltip.js"),require("@polymer/polymer/polymer-legacy.js"),require("@polymer/polymer/lib/legacy/polymer.dom.js")):"function"==typeof define&&define.amd?define(["@polymer/iron-icons/iron-icons.js","@polymer/paper-input/paper-input.js","@polymer/paper-tooltip/paper-tooltip.js","@polymer/polymer/polymer-legacy.js","@polymer/polymer/lib/legacy/polymer.dom.js"],n):n(null,null,null,e.polymerLegacy_js,e.polymer_dom_js)}(this,function(e,n,t,o,r){"use strict";var l=document.createElement("div");function a(){var e,n,t=(e=['\n <custom-style>\n <style is="custom-style">\n :host {\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n width: 100%;\n }\n :host #input {\n flex-grow: 2;\n margin-right: 4px;\n --paper-input-container-input-color: var(--simple-search-input-text-color, #000);\n --paper-input-container-focus-color: var(--simple-search-input-line-color, #000);\n --paper-input-container-color: var(--simple-search-input-placeholder-color, #222);\n color: var(--simple-search-input-placeholder-color, #222);\n @apply --simple-search-container;\n }\n :host #xofy {\n margin: 8px;\n }\n :host button {\n margin: 8px 0 8px;\n color: var(--simple-search-button-color, #111);\n background-color: var(--simple-search-button-bg-color, #eee);\n border-color: var(--simple-search-button-border-color, #ccc);\n @apply --simple-search-button;\n }\n :host button:not([disabled]):focus,\n :host button:not([disabled]):hover {\n cursor: pointer;\n color: var(--simple-search-button-hover-color, #000);\n background-color: var(--simple-search-button-hover-bg-color, #fff);\n border-color: var(--simple-search-button-hover-border-color, #ddd);\n @apply --simple-search-button-hover;\n }\n :host button[disabled] {\n cursor: not-allowed;\n color: var(--simple-search-button-disabled-color, #999);\n background-color: var(--simple-search-button-disabled-bg-color, #eee);\n border-color: var(--simple-search-button-disabled-border-color, #ccc);\n @apply --simple-search-button-disabled;\n }\n :host button:not([controls]) {\n display: none;\n }\n :host [shrink-hide] {\n display: none;\n }\n </style>\n </custom-style>\n <paper-input id="input" always-float-label$="[[alwaysFloatLabel]]" label="[[searchInputLabel]]" no-label-float$="[[noLabelFloat]]">\n <iron-icon icon="[[searchInputIcon]]" slot="prefix"></iron-icon>\n </paper-input>\n <div id="xofy" shrink-hide$="[[noSearch]]"></div>\n <div shrink-hide$="[[noResults]]">\n <button id="prev" aria-label="[[prevButtonLabel]]" aria-role="button" controls$="[[controls]]" disabled$="[[prevButtonDisabled]]" tabindex="0">\n <iron-icon icon="[[prevButtonIcon]]"></iron-icon>\n </button>\n <paper-tooltip for="prev">[[prevButtonLabel]]</paper-tooltip>\n <button id="next" aria-label="[[nextButtonLabel]]" aria-role="button" controls$="[[controls]]" disabled$="[[nextButtonDisabled]]" tabindex="0">\n <iron-icon icon$="[[nextButtonIcon]]"></iron-icon>\n </button>\n <paper-tooltip for="next">[[nextButtonLabel]]</paper-tooltip>\n </div>\n'],(n=['\n <custom-style>\n <style is="custom-style">\n :host {\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n width: 100%;\n }\n :host #input {\n flex-grow: 2;\n margin-right: 4px;\n --paper-input-container-input-color: var(--simple-search-input-text-color, #000);\n --paper-input-container-focus-color: var(--simple-search-input-line-color, #000);\n --paper-input-container-color: var(--simple-search-input-placeholder-color, #222);\n color: var(--simple-search-input-placeholder-color, #222);\n @apply --simple-search-container;\n }\n :host #xofy {\n margin: 8px;\n }\n :host button {\n margin: 8px 0 8px;\n color: var(--simple-search-button-color, #111);\n background-color: var(--simple-search-button-bg-color, #eee);\n border-color: var(--simple-search-button-border-color, #ccc);\n @apply --simple-search-button;\n }\n :host button:not([disabled]):focus,\n :host button:not([disabled]):hover {\n cursor: pointer;\n color: var(--simple-search-button-hover-color, #000);\n background-color: var(--simple-search-button-hover-bg-color, #fff);\n border-color: var(--simple-search-button-hover-border-color, #ddd);\n @apply --simple-search-button-hover;\n }\n :host button[disabled] {\n cursor: not-allowed;\n color: var(--simple-search-button-disabled-color, #999);\n background-color: var(--simple-search-button-disabled-bg-color, #eee);\n border-color: var(--simple-search-button-disabled-border-color, #ccc);\n @apply --simple-search-button-disabled;\n }\n :host button:not([controls]) {\n display: none;\n }\n :host [shrink-hide] {\n display: none;\n }\n </style>\n </custom-style>\n <paper-input id="input" always-float-label\\$="[[alwaysFloatLabel]]" label="[[searchInputLabel]]" no-label-float\\$="[[noLabelFloat]]">\n <iron-icon icon="[[searchInputIcon]]" slot="prefix"></iron-icon>\n </paper-input>\n <div id="xofy" shrink-hide\\$="[[noSearch]]"></div>\n <div shrink-hide\\$="[[noResults]]">\n <button id="prev" aria-label="[[prevButtonLabel]]" aria-role="button" controls\\$="[[controls]]" disabled\\$="[[prevButtonDisabled]]" tabindex="0">\n <iron-icon icon="[[prevButtonIcon]]"></iron-icon>\n </button>\n <paper-tooltip for="prev">[[prevButtonLabel]]</paper-tooltip>\n <button id="next" aria-label="[[nextButtonLabel]]" aria-role="button" controls\\$="[[controls]]" disabled\\$="[[nextButtonDisabled]]" tabindex="0">\n <iron-icon icon\\$="[[nextButtonIcon]]"></iron-icon>\n </button>\n <paper-tooltip for="next">[[nextButtonLabel]]</paper-tooltip>\n </div>\n'])||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}})));return a=function(){return t},t}l.setAttribute("style","display: none;"),l.innerHTML='<dom-module id="simple-search-content">\n<template>\n <style>\n :host #content {\n @apply --simple-search-content;\n }\n :host #content[match-number]{\n color: var(--simple-search-match-text-color, #000);\n background-color: var(--simple-search-match-bg-color, #f0f0f0);\n border: 1px solid; \n border-color: var(--simple-search-match-border-color, #ddd);\n padding: 0.16px 4px;\n border-radius: 0.16px;\n font-weight: bold;\n @apply --simple-search-match;\n }\n </style>\n <span id="content">\n <template is="dom-repeat" items="[[_searchedContent]]">\n <span match-number$="[[item.matchNumber]]" tabindex$="[[_getTabIndex(item.matchNumber)]]">[[item.text]]</span>\n </template>\n </span>\n </template>\n\n \n</dom-module>',document.head.appendChild(l),o.Polymer({is:"simple-search-content",properties:{content:{type:String,value:null}},enableSearch:function(e){var n=this,t=[{matched:!1,text:n.content}];null===t[0].text&&(t[0].text=r.dom(n).innerHTML),n.setContent(t),e.addEventListener("search",function(){n.setContent(t),n.setContent(e.findMatches(t))}),e.addEventListener("goto-result",function(e){n.focus(e.detail)})},setContent:function(e){this._searchedContent=e},focus:function(e){var n=this.$.content.querySelector('[match-number="'+e+'"]');null!=n&&n.focus()},_getTabIndex:function(e){return null!=e?"1":""}}),o.Polymer({_template:o.html(a()),is:"simple-search",properties:{alwaysFloatLabel:{type:Boolean,value:!1},caseSensitive:{type:Boolean,value:null},controls:{type:String,value:null},nextButtonDisabled:{type:Boolean,computed:"_isNavButtonDisabled(resultPointer,resultCount,resultsSpan,1)"},nextButtonIcon:{type:String,value:"arrow-forward"},nextButtonLabel:{type:String,value:"next result"},noLabelFloat:{type:Boolean,value:!1},noResults:{type:Boolean,computed:"_hasNoResults(resultCount)"},noSearch:{type:Boolean,computed:"_hasNoSearch(searchTerms)"},prevButtonDisabled:{type:Boolean,computed:"_isNavButtonDisabled(resultPointer,resultCount,resultsSpan,-1)"},prevButtonIcon:{type:String,value:"arrow-back"},prevButtonLabel:{type:String,value:"previous result"},resultCount:{type:Number,value:0},resultPointer:{type:Number,value:0},resultsSpan:{type:String,computed:"_getResultsSpan(noSearch,resultPointer,resultCount)"},searchInputIcon:{type:String,value:"search"},searchInputLabel:{type:String,value:"search"},searchTerms:{type:Array,value:[]},target:{type:Object,value:null}},ready:function(){var e=this,n=e.$.input;e._getSearchText(n.value),e.addEventListener("change",function(t){e._getSearchText(n.value),e.resultCount=0,e.resultPointer=0,e.fire("search",e)}),e.$.prev.addEventListener("tap",function(n){e._navigateResults(-1)}),e.$.next.addEventListener("tap",function(n){e._navigateResults(1)})},_hasNoResults:function(e){return e<1},_hasNoSearch:function(e){return e.length<1},_getResultsSpan:function(e,n,t){var o="";return o=t>0&&n>0?n+"/"+t:" "+t,this.$.xofy.innerHTML=o,this.$.xofy.innerHTML},_navigateResults:function(e){this.resultPointer+e>0&&this.resultPointer+e<=this.resultCount&&(this.resultPointer+=e,this.fire("goto-result",this.resultPointer))},_isNavButtonDisabled:function(e,n,t,o){return""==t||e+o<=0||e+o>n},_getSearchText:function(e){var n=new Array;if(null!=e){n=e.split(/[\"\']/gm);for(var t=0;t<n.length;t++)n[t]=n[t].trim(),""===n[t]&&n.splice(t,1)}this.set("searchTerms",n.slice(0))},findMatches:function(e){for(var n=this,t=n.searchTerms,o=this.caseSensitive?"gm":"gim",r=e.slice(0),l=function(e){for(var t=0;t<r.length;t++)if(!1===r[t].matched){var l=new RegExp("\\b"+e+"\\b",o),a=r[t].text,i=a.search(l),s=i+e.length;if(i>-1){n.resultCount+=1;var c=a.slice(0,i),p=a.slice(i,s),u=a.slice(s,a.length);r.splice(t,1,{matched:!1,text:c,searchObject:n},{matched:!0,matchNumber:n.resultCount,text:p,searchObject:n},{matched:!1,text:u,searchObject:n})}}},a=0;a<t.length;a++)l(t[a]);return n.resultPointer=0,r}})});
//# sourceMappingURL=simple-search.umd.js.map

@@ -94,3 +94,3 @@ import { html, Polymer } from "@polymer/polymer/polymer-legacy.js";

flex-grow: 2;
margin-right: 0.25em;
margin-right: 4px;
--paper-input-container-input-color: var(--simple-search-input-text-color, #000);

@@ -97,0 +97,0 @@ --paper-input-container-focus-color: var(--simple-search-input-line-color, #000);

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

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