choicesjs-stencil
Advanced tools
Comparing version 1.3.1 to 1.4.0
@@ -0,1 +1,7 @@ | ||
# 1.4.0 | ||
- Updated `@stencil/core` to version `1.5.4`. | ||
- Removed unnecessary event definitions. | ||
- Fixed method definitions: `highlightItem` and `unhighlightItem`. | ||
## 1.3.1 | ||
@@ -2,0 +8,0 @@ |
@@ -1,1 +0,27 @@ | ||
!function(e,t,s,n,i,r,c,o,l,a,u,h,d,p){for(u=e.ChoicesJSStencil=e.ChoicesJSStencil||{},(h=t.createElement("style")).innerHTML="choicesjs-stencil{visibility:hidden}.hydrated{visibility:inherit}",h.setAttribute("data-styles",""),d=t.head.querySelector("meta[charset]"),t.head.insertBefore(h,d?d.nextSibling:t.head.firstChild),function(e,t,s){(e["s-apps"]=e["s-apps"]||[]).push("ChoicesJSStencil"),s.componentOnReady||(s.componentOnReady=function(){var t=this;function s(s){if(t.nodeName.indexOf("-")>0){for(var n=e["s-apps"],i=0,r=0;r<n.length;r++)if(e[n[r]].componentOnReady){if(e[n[r]].componentOnReady(t,s))return;i++}if(i<n.length)return void(e["s-cr"]=e["s-cr"]||[]).push([t,s])}s(null)}return e.Promise?new e.Promise(s):{then:s}})}(e,0,a),i=i||u.resourcesUrl,h=(d=t.querySelectorAll("script")).length-1;h>=0&&!(p=d[h]).src&&!p.hasAttribute("data-resources-url");h--);d=p.getAttribute("data-resources-url"),!i&&d&&(i=d),!i&&p.src&&(i=(d=p.src.split("/").slice(0,-1)).join("/")+(d.length?"/":"")+"choicesjsstencil/"),h=t.createElement("script"),function(e,t,s,n){return!(t.search.indexOf("core=esm")>0)&&(!(!(t.search.indexOf("core=es5")>0||"file:"===t.protocol)&&e.customElements&&e.customElements.define&&e.fetch&&e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")&&"noModule"in s)||function(e){try{return new Function('import("")'),!1}catch(e){}return!0}())}(e,e.location,h)?h.src=i+"choicesjsstencil.a8oybfe2.js":(h.src=i+"choicesjsstencil.bjzdhsni.js",h.setAttribute("type","module"),h.setAttribute("crossorigin",!0)),h.setAttribute("data-resources-url",i),h.setAttribute("data-namespace","choicesjsstencil"),t.head.appendChild(h)}(window,document,0,0,0,0,0,0,0,HTMLElement.prototype); | ||
(function(doc){ | ||
var scriptElm = doc.scripts[doc.scripts.length - 1]; | ||
var warn = ['[choicesjsstencil] Deprecated script, please remove: ' + scriptElm.outerHTML]; | ||
warn.push('To improve performance it is recommended to set the differential scripts in the head as follows:') | ||
var parts = scriptElm.src.split('/'); | ||
parts.pop(); | ||
parts.push('choicesjsstencil'); | ||
var url = parts.join('/'); | ||
var scriptElm = doc.createElement('script'); | ||
scriptElm.setAttribute('type', 'module'); | ||
scriptElm.src = url + '/choicesjsstencil.esm.js'; | ||
doc.head.appendChild(scriptElm); | ||
warn.push(scriptElm.outerHTML); | ||
scriptElm = doc.createElement('script'); | ||
scriptElm.setAttribute('nomodule', ''); | ||
scriptElm.src = url + '/choicesjsstencil.js'; | ||
doc.head.appendChild(scriptElm); | ||
warn.push(scriptElm.outerHTML); | ||
console.warn(warn.join('\n')); | ||
})(document); |
{ | ||
"components": [ | ||
{ | ||
"tag": "choicesjs-stencil", | ||
"dependencies": [], | ||
"componentClass": "ChoicesJSStencil", | ||
"componentPath": "components/choicesjs-stencil/choicesjs-stencil.js", | ||
"styles": { | ||
"$": { | ||
"stylePaths": [ | ||
"components/choicesjs-stencil/choicesjs-stencil.scss" | ||
] | ||
} | ||
}, | ||
"props": [ | ||
{ | ||
"name": "addItemFilterFn", | ||
"attr": "add-item-filter-fn" | ||
}, | ||
{ | ||
"name": "addItems", | ||
"type": "Boolean", | ||
"attr": "add-items" | ||
}, | ||
{ | ||
"name": "addItemText", | ||
"type": "String", | ||
"attr": "add-item-text" | ||
}, | ||
{ | ||
"name": "appendValue", | ||
"type": "String", | ||
"attr": "append-value" | ||
}, | ||
{ | ||
"name": "callbackOnCreateTemplates", | ||
"attr": "callback-on-create-templates" | ||
}, | ||
{ | ||
"name": "callbackOnInit", | ||
"attr": "callback-on-init" | ||
}, | ||
{ | ||
"name": "choices", | ||
"attr": "choices" | ||
}, | ||
{ | ||
"name": "classNames", | ||
"attr": "class-names" | ||
}, | ||
{ | ||
"name": "delimiter", | ||
"type": "String", | ||
"attr": "delimiter" | ||
}, | ||
{ | ||
"name": "duplicateItemsAllowed", | ||
"type": "Boolean", | ||
"attr": "duplicate-items-allowed" | ||
}, | ||
{ | ||
"name": "editItems", | ||
"type": "Boolean", | ||
"attr": "edit-items" | ||
}, | ||
{ | ||
"name": "fuseOptions", | ||
"attr": "fuse-options" | ||
}, | ||
{ | ||
"name": "items", | ||
"attr": "items" | ||
}, | ||
{ | ||
"name": "itemSelectText", | ||
"type": "String", | ||
"attr": "item-select-text" | ||
}, | ||
{ | ||
"name": "loadingText", | ||
"type": "String", | ||
"attr": "loading-text" | ||
}, | ||
{ | ||
"name": "maxItemCount", | ||
"type": "Number", | ||
"attr": "max-item-count" | ||
}, | ||
{ | ||
"name": "maxItemText", | ||
"type": "String", | ||
"attr": "max-item-text" | ||
}, | ||
{ | ||
"name": "name", | ||
"type": "String", | ||
"attr": "name" | ||
}, | ||
{ | ||
"name": "noChoicesText", | ||
"type": "String", | ||
"attr": "no-choices-text" | ||
}, | ||
{ | ||
"name": "noResultsText", | ||
"type": "String", | ||
"attr": "no-results-text" | ||
}, | ||
{ | ||
"name": "paste", | ||
"type": "Boolean", | ||
"attr": "paste" | ||
}, | ||
{ | ||
"name": "placeholder", | ||
"type": "Any", | ||
"attr": "placeholder" | ||
}, | ||
{ | ||
"name": "placeholderValue", | ||
"type": "String", | ||
"attr": "placeholder-value" | ||
}, | ||
{ | ||
"name": "position", | ||
"type": "String", | ||
"attr": "position" | ||
}, | ||
{ | ||
"name": "prependValue", | ||
"type": "String", | ||
"attr": "prepend-value" | ||
}, | ||
{ | ||
"name": "removeItemButton", | ||
"type": "Boolean", | ||
"attr": "remove-item-button" | ||
}, | ||
{ | ||
"name": "removeItems", | ||
"type": "Boolean", | ||
"attr": "remove-items" | ||
}, | ||
{ | ||
"name": "renderChoiceLimit", | ||
"type": "Number", | ||
"attr": "render-choice-limit" | ||
}, | ||
{ | ||
"name": "renderSelectedChoices", | ||
"type": "String", | ||
"attr": "render-selected-choices" | ||
}, | ||
{ | ||
"name": "resetScrollPosition", | ||
"type": "Boolean", | ||
"attr": "reset-scroll-position" | ||
}, | ||
{ | ||
"name": "searchChoices", | ||
"type": "Boolean", | ||
"attr": "search-choices" | ||
}, | ||
{ | ||
"name": "searchEnabled", | ||
"type": "Boolean", | ||
"attr": "search-enabled" | ||
}, | ||
{ | ||
"name": "searchFields", | ||
"type": "String", | ||
"attr": "search-fields" | ||
}, | ||
{ | ||
"name": "searchFloor", | ||
"type": "Number", | ||
"attr": "search-floor" | ||
}, | ||
{ | ||
"name": "searchPlaceholderValue", | ||
"type": "String", | ||
"attr": "search-placeholder-value" | ||
}, | ||
{ | ||
"name": "searchResultLimit", | ||
"type": "Number", | ||
"attr": "search-result-limit" | ||
}, | ||
{ | ||
"name": "shouldSort", | ||
"type": "Boolean", | ||
"attr": "should-sort" | ||
}, | ||
{ | ||
"name": "shouldSortItems", | ||
"type": "Boolean", | ||
"attr": "should-sort-items" | ||
}, | ||
{ | ||
"name": "silent", | ||
"type": "Boolean", | ||
"attr": "silent" | ||
}, | ||
{ | ||
"name": "sortFn", | ||
"attr": "sort-fn" | ||
}, | ||
{ | ||
"name": "type", | ||
"type": "String", | ||
"attr": "type" | ||
}, | ||
{ | ||
"name": "uniqueItemText", | ||
"type": "String", | ||
"attr": "unique-item-text" | ||
}, | ||
{ | ||
"name": "value", | ||
"type": "String", | ||
"attr": "value" | ||
} | ||
], | ||
"methods": [ | ||
{ | ||
"name": "ajax" | ||
}, | ||
{ | ||
"name": "clearChoices" | ||
}, | ||
{ | ||
"name": "clearInput" | ||
}, | ||
{ | ||
"name": "clearStore" | ||
}, | ||
{ | ||
"name": "disable" | ||
}, | ||
{ | ||
"name": "enable" | ||
}, | ||
{ | ||
"name": "getValue" | ||
}, | ||
{ | ||
"name": "hideDropdown" | ||
}, | ||
{ | ||
"name": "highlightAll" | ||
}, | ||
{ | ||
"name": "highlightItem" | ||
}, | ||
{ | ||
"name": "removeActiveItems" | ||
}, | ||
{ | ||
"name": "removeActiveItemsByValue" | ||
}, | ||
{ | ||
"name": "removeHighlightedItems" | ||
}, | ||
{ | ||
"name": "setChoiceByValue" | ||
}, | ||
{ | ||
"name": "setChoices" | ||
}, | ||
{ | ||
"name": "setValue" | ||
}, | ||
{ | ||
"name": "showDropdown" | ||
}, | ||
{ | ||
"name": "unhighlightAll" | ||
}, | ||
{ | ||
"name": "unhighlightItem" | ||
} | ||
], | ||
"hostElement": { | ||
"name": "root" | ||
}, | ||
"events": [ | ||
{ | ||
"event": "addItem", | ||
"method": "addItemEvent" | ||
}, | ||
{ | ||
"event": "change", | ||
"method": "changeEvent" | ||
}, | ||
{ | ||
"event": "choice", | ||
"method": "choiceEvent" | ||
}, | ||
{ | ||
"event": "hideDropdown", | ||
"method": "hideDropdownEvent" | ||
}, | ||
{ | ||
"event": "highlightItem", | ||
"method": "highlightItemEvent" | ||
}, | ||
{ | ||
"event": "removeItem", | ||
"method": "removeItemEvent" | ||
}, | ||
{ | ||
"event": "search", | ||
"method": "searchEvent" | ||
}, | ||
{ | ||
"event": "showDropdown", | ||
"method": "showDropdownEvent" | ||
}, | ||
{ | ||
"event": "unhighlightItem", | ||
"method": "unhighlightItemEvent" | ||
} | ||
] | ||
} | ||
"entries": [ | ||
"components/choicesjs-stencil/choicesjs-stencil.js" | ||
], | ||
"collections": [], | ||
"compiler": { | ||
"name": "@stencil/core", | ||
"version": "0.18.1", | ||
"typescriptVersion": "3.3.3" | ||
"version": "1.5.4", | ||
"typescriptVersion": "3.6.3" | ||
}, | ||
"collections": [], | ||
"bundles": [ | ||
@@ -333,0 +12,0 @@ { |
@@ -0,1 +1,2 @@ | ||
import { h } from "@stencil/core"; | ||
import { getValues, filterObject, isDefined } from './utils'; | ||
@@ -92,2 +93,4 @@ export class ChoicesJSStencil { | ||
}; | ||
// destroy choices element to restore previous dom structure | ||
// so vdom can replace the element correctly | ||
this.destroy(); | ||
@@ -170,295 +173,1169 @@ switch (this.type) { | ||
static get is() { return "choicesjs-stencil"; } | ||
static get originalStyleUrls() { return { | ||
"$": ["choicesjs-stencil.scss"] | ||
}; } | ||
static get styleUrls() { return { | ||
"$": ["choicesjs-stencil.css"] | ||
}; } | ||
static get properties() { return { | ||
"addItemFilterFn": { | ||
"type": "Any", | ||
"attr": "add-item-filter-fn" | ||
"type": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "'single' | 'multiple' | 'text'", | ||
"resolved": "\"multiple\" | \"single\" | \"text\"", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": true, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "type", | ||
"reflect": false | ||
}, | ||
"addItems": { | ||
"type": Boolean, | ||
"attr": "add-items" | ||
"value": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string", | ||
"resolved": "string", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "value", | ||
"reflect": false | ||
}, | ||
"addItemText": { | ||
"type": String, | ||
"attr": "add-item-text" | ||
"name": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string", | ||
"resolved": "string", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "name", | ||
"reflect": false | ||
}, | ||
"ajax": { | ||
"method": true | ||
"silent": { | ||
"type": "boolean", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "boolean", | ||
"resolved": "boolean", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "silent", | ||
"reflect": false | ||
}, | ||
"appendValue": { | ||
"type": String, | ||
"attr": "append-value" | ||
"items": { | ||
"type": "unknown", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "Array<any>", | ||
"resolved": "any[]", | ||
"references": { | ||
"Array": { | ||
"location": "global" | ||
} | ||
} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
} | ||
}, | ||
"callbackOnCreateTemplates": { | ||
"type": "Any", | ||
"attr": "callback-on-create-templates" | ||
}, | ||
"callbackOnInit": { | ||
"type": "Any", | ||
"attr": "callback-on-init" | ||
}, | ||
"choices": { | ||
"type": "Any", | ||
"attr": "choices" | ||
"type": "unknown", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "Array<any>", | ||
"resolved": "any[]", | ||
"references": { | ||
"Array": { | ||
"location": "global" | ||
} | ||
} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
} | ||
}, | ||
"classNames": { | ||
"type": "Any", | ||
"attr": "class-names" | ||
"renderChoiceLimit": { | ||
"type": "number", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "number", | ||
"resolved": "number", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "render-choice-limit", | ||
"reflect": false | ||
}, | ||
"clearChoices": { | ||
"method": true | ||
"maxItemCount": { | ||
"type": "number", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "number", | ||
"resolved": "number", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "max-item-count", | ||
"reflect": false | ||
}, | ||
"clearInput": { | ||
"method": true | ||
"addItems": { | ||
"type": "boolean", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "boolean", | ||
"resolved": "boolean", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "add-items", | ||
"reflect": false | ||
}, | ||
"clearStore": { | ||
"method": true | ||
"removeItems": { | ||
"type": "boolean", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "boolean", | ||
"resolved": "boolean", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "remove-items", | ||
"reflect": false | ||
}, | ||
"delimiter": { | ||
"type": String, | ||
"attr": "delimiter" | ||
"removeItemButton": { | ||
"type": "boolean", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "boolean", | ||
"resolved": "boolean", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "remove-item-button", | ||
"reflect": false | ||
}, | ||
"disable": { | ||
"method": true | ||
"editItems": { | ||
"type": "boolean", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "boolean", | ||
"resolved": "boolean", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "edit-items", | ||
"reflect": false | ||
}, | ||
"duplicateItemsAllowed": { | ||
"type": Boolean, | ||
"attr": "duplicate-items-allowed" | ||
"type": "boolean", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "boolean", | ||
"resolved": "boolean", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "duplicate-items-allowed", | ||
"reflect": false | ||
}, | ||
"editItems": { | ||
"type": Boolean, | ||
"attr": "edit-items" | ||
"delimiter": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string", | ||
"resolved": "string", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "delimiter", | ||
"reflect": false | ||
}, | ||
"enable": { | ||
"method": true | ||
"paste": { | ||
"type": "boolean", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "boolean", | ||
"resolved": "boolean", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "paste", | ||
"reflect": false | ||
}, | ||
"fuseOptions": { | ||
"type": "Any", | ||
"attr": "fuse-options" | ||
"searchEnabled": { | ||
"type": "boolean", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "boolean", | ||
"resolved": "boolean", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "search-enabled", | ||
"reflect": false | ||
}, | ||
"getValue": { | ||
"method": true | ||
"searchChoices": { | ||
"type": "boolean", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "boolean", | ||
"resolved": "boolean", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "search-choices", | ||
"reflect": false | ||
}, | ||
"hideDropdown": { | ||
"method": true | ||
"searchFields": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "Array<string> | string", | ||
"resolved": "string | string[]", | ||
"references": { | ||
"Array": { | ||
"location": "global" | ||
} | ||
} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "search-fields", | ||
"reflect": false | ||
}, | ||
"highlightAll": { | ||
"method": true | ||
"searchFloor": { | ||
"type": "number", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "number", | ||
"resolved": "number", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "search-floor", | ||
"reflect": false | ||
}, | ||
"highlightItem": { | ||
"method": true | ||
"searchResultLimit": { | ||
"type": "number", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "number", | ||
"resolved": "number", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "search-result-limit", | ||
"reflect": false | ||
}, | ||
"items": { | ||
"type": "Any", | ||
"attr": "items" | ||
"position": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "'auto' | 'top' | 'bottom'", | ||
"resolved": "\"auto\" | \"bottom\" | \"top\"", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "position", | ||
"reflect": false | ||
}, | ||
"itemSelectText": { | ||
"type": String, | ||
"attr": "item-select-text" | ||
"resetScrollPosition": { | ||
"type": "boolean", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "boolean", | ||
"resolved": "boolean", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "reset-scroll-position", | ||
"reflect": false | ||
}, | ||
"loadingText": { | ||
"type": String, | ||
"attr": "loading-text" | ||
"addItemFilterFn": { | ||
"type": "unknown", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "ItemFilterFn", | ||
"resolved": "(value: string) => boolean", | ||
"references": { | ||
"ItemFilterFn": { | ||
"location": "import", | ||
"path": "./interfaces" | ||
} | ||
} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
} | ||
}, | ||
"maxItemCount": { | ||
"type": Number, | ||
"attr": "max-item-count" | ||
"shouldSort": { | ||
"type": "boolean", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "boolean", | ||
"resolved": "boolean", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "should-sort", | ||
"reflect": false | ||
}, | ||
"maxItemText": { | ||
"type": String, | ||
"attr": "max-item-text" | ||
"shouldSortItems": { | ||
"type": "boolean", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "boolean", | ||
"resolved": "boolean", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "should-sort-items", | ||
"reflect": false | ||
}, | ||
"name": { | ||
"type": String, | ||
"attr": "name" | ||
"sortFn": { | ||
"type": "unknown", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "SortFn", | ||
"resolved": "(el1: any, el2: any) => number", | ||
"references": { | ||
"SortFn": { | ||
"location": "import", | ||
"path": "./interfaces" | ||
} | ||
} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
} | ||
}, | ||
"noChoicesText": { | ||
"type": String, | ||
"attr": "no-choices-text" | ||
"placeholder": { | ||
"type": "any", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "boolean | string", | ||
"resolved": "boolean | string", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "placeholder", | ||
"reflect": false | ||
}, | ||
"noResultsText": { | ||
"type": String, | ||
"attr": "no-results-text" | ||
"placeholderValue": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string", | ||
"resolved": "string", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "placeholder-value", | ||
"reflect": false | ||
}, | ||
"passedElement": { | ||
"elementRef": true | ||
"searchPlaceholderValue": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string", | ||
"resolved": "string", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "search-placeholder-value", | ||
"reflect": false | ||
}, | ||
"paste": { | ||
"type": Boolean, | ||
"attr": "paste" | ||
"prependValue": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string", | ||
"resolved": "string", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "prepend-value", | ||
"reflect": false | ||
}, | ||
"placeholder": { | ||
"type": "Any", | ||
"attr": "placeholder" | ||
"appendValue": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string", | ||
"resolved": "string", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "append-value", | ||
"reflect": false | ||
}, | ||
"placeholderValue": { | ||
"type": String, | ||
"attr": "placeholder-value" | ||
"renderSelectedChoices": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "'always' | 'auto'", | ||
"resolved": "\"always\" | \"auto\"", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "render-selected-choices", | ||
"reflect": false | ||
}, | ||
"position": { | ||
"type": String, | ||
"attr": "position" | ||
"loadingText": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string", | ||
"resolved": "string", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "loading-text", | ||
"reflect": false | ||
}, | ||
"prependValue": { | ||
"type": String, | ||
"attr": "prepend-value" | ||
"noResultsText": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string | NoResultsTextFn", | ||
"resolved": "(() => string) | string", | ||
"references": { | ||
"NoResultsTextFn": { | ||
"location": "import", | ||
"path": "./interfaces" | ||
} | ||
} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "no-results-text", | ||
"reflect": false | ||
}, | ||
"removeActiveItems": { | ||
"method": true | ||
"noChoicesText": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string | NoChoicesTextFn", | ||
"resolved": "(() => string) | string", | ||
"references": { | ||
"NoChoicesTextFn": { | ||
"location": "import", | ||
"path": "./interfaces" | ||
} | ||
} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "no-choices-text", | ||
"reflect": false | ||
}, | ||
"removeActiveItemsByValue": { | ||
"method": true | ||
"itemSelectText": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string", | ||
"resolved": "string", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "item-select-text", | ||
"reflect": false | ||
}, | ||
"removeHighlightedItems": { | ||
"method": true | ||
"addItemText": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string | AddItemTextFn", | ||
"resolved": "((value: string) => string) | string", | ||
"references": { | ||
"AddItemTextFn": { | ||
"location": "import", | ||
"path": "./interfaces" | ||
} | ||
} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "add-item-text", | ||
"reflect": false | ||
}, | ||
"removeItemButton": { | ||
"type": Boolean, | ||
"attr": "remove-item-button" | ||
"maxItemText": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string | MaxItemTextFn", | ||
"resolved": "((maxItemCount: number) => string) | string", | ||
"references": { | ||
"MaxItemTextFn": { | ||
"location": "import", | ||
"path": "./interfaces" | ||
} | ||
} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "max-item-text", | ||
"reflect": false | ||
}, | ||
"removeItems": { | ||
"type": Boolean, | ||
"attr": "remove-items" | ||
"uniqueItemText": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "UniqueItemText", | ||
"resolved": "((value: string) => string) | string", | ||
"references": { | ||
"UniqueItemText": { | ||
"location": "import", | ||
"path": "./interfaces" | ||
} | ||
} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "unique-item-text", | ||
"reflect": false | ||
}, | ||
"renderChoiceLimit": { | ||
"type": Number, | ||
"attr": "render-choice-limit" | ||
"classNames": { | ||
"type": "unknown", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "ClassNames", | ||
"resolved": "{ containerOuter?: string; containerInner?: string; input?: string; inputCloned?: string; list?: string; listItems?: string; listSingle?: string; listDropdown?: string; item?: string; itemSelectable?: string; itemDisabled?: string; itemOption?: string; group?: string; groupHeading?: string; placeholder?: string; button?: string; activeState?: string; focusState?: string; openState?: string; disabledState?: string; highlightedState?: string; hiddenState?: string; flippedState?: string; loadingState?: string; noResults?: string; noChoices?: string; }", | ||
"references": { | ||
"ClassNames": { | ||
"location": "import", | ||
"path": "./interfaces" | ||
} | ||
} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
} | ||
}, | ||
"renderSelectedChoices": { | ||
"type": String, | ||
"attr": "render-selected-choices" | ||
"fuseOptions": { | ||
"type": "unknown", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "FuseOptions", | ||
"resolved": "{ caseSensitive?: boolean; minMatchCharLength?: number; shouldSort?: boolean; tokenize?: boolean; tokenSeparator?: RegExp; matchAllTokens?: boolean; findAllMatches?: boolean; verbose?: boolean; id?: string; keys?: string[] | object[] | WeightedField[]; location?: number; threshold?: number; distance?: number; maxPatternLength?: number; }", | ||
"references": { | ||
"FuseOptions": { | ||
"location": "import", | ||
"path": "./interfaces" | ||
} | ||
} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
} | ||
}, | ||
"resetScrollPosition": { | ||
"type": Boolean, | ||
"attr": "reset-scroll-position" | ||
"callbackOnInit": { | ||
"type": "unknown", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "OnInit", | ||
"resolved": "() => void", | ||
"references": { | ||
"OnInit": { | ||
"location": "import", | ||
"path": "./interfaces" | ||
} | ||
} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
} | ||
}, | ||
"root": { | ||
"elementRef": true | ||
"callbackOnCreateTemplates": { | ||
"type": "unknown", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "OnCreateTemplates", | ||
"resolved": "(template: any) => any", | ||
"references": { | ||
"OnCreateTemplates": { | ||
"location": "import", | ||
"path": "./interfaces" | ||
} | ||
} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
} | ||
} | ||
}; } | ||
static get methods() { return { | ||
"highlightItem": { | ||
"complexType": { | ||
"signature": "(item: HTMLElement, runEvent?: boolean) => Promise<this>", | ||
"parameters": [{ | ||
"tags": [], | ||
"text": "" | ||
}, { | ||
"tags": [], | ||
"text": "" | ||
}], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
}, | ||
"HTMLElement": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"searchChoices": { | ||
"type": Boolean, | ||
"attr": "search-choices" | ||
"unhighlightItem": { | ||
"complexType": { | ||
"signature": "(item: HTMLElement) => Promise<this>", | ||
"parameters": [{ | ||
"tags": [], | ||
"text": "" | ||
}], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
}, | ||
"HTMLElement": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"searchEnabled": { | ||
"type": Boolean, | ||
"attr": "search-enabled" | ||
"highlightAll": { | ||
"complexType": { | ||
"signature": "() => Promise<this>", | ||
"parameters": [], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"searchFields": { | ||
"type": String, | ||
"attr": "search-fields" | ||
"unhighlightAll": { | ||
"complexType": { | ||
"signature": "() => Promise<this>", | ||
"parameters": [], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"searchFloor": { | ||
"type": Number, | ||
"attr": "search-floor" | ||
"removeActiveItemsByValue": { | ||
"complexType": { | ||
"signature": "(value: string) => Promise<this>", | ||
"parameters": [{ | ||
"tags": [], | ||
"text": "" | ||
}], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"searchPlaceholderValue": { | ||
"type": String, | ||
"attr": "search-placeholder-value" | ||
"removeActiveItems": { | ||
"complexType": { | ||
"signature": "(excludedId?: number) => Promise<this>", | ||
"parameters": [{ | ||
"tags": [], | ||
"text": "" | ||
}], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"searchResultLimit": { | ||
"type": Number, | ||
"attr": "search-result-limit" | ||
"removeHighlightedItems": { | ||
"complexType": { | ||
"signature": "(runEvent?: boolean) => Promise<this>", | ||
"parameters": [{ | ||
"tags": [], | ||
"text": "" | ||
}], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"setChoiceByValue": { | ||
"method": true | ||
"showDropdown": { | ||
"complexType": { | ||
"signature": "(focusInput?: boolean) => Promise<this>", | ||
"parameters": [{ | ||
"tags": [], | ||
"text": "" | ||
}], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"setChoices": { | ||
"method": true | ||
"hideDropdown": { | ||
"complexType": { | ||
"signature": "(blurInput?: boolean) => Promise<this>", | ||
"parameters": [{ | ||
"tags": [], | ||
"text": "" | ||
}], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"getValue": { | ||
"complexType": { | ||
"signature": "(valueOnly?: boolean) => Promise<string | string[]>", | ||
"parameters": [{ | ||
"tags": [], | ||
"text": "" | ||
}], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
}, | ||
"Array": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<string | string[]>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"setValue": { | ||
"method": true | ||
"complexType": { | ||
"signature": "(args: any[]) => Promise<this>", | ||
"parameters": [{ | ||
"tags": [], | ||
"text": "" | ||
}], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
}, | ||
"Array": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"shouldSort": { | ||
"type": Boolean, | ||
"attr": "should-sort" | ||
"setChoiceByValue": { | ||
"complexType": { | ||
"signature": "(value: string | string[]) => Promise<this>", | ||
"parameters": [{ | ||
"tags": [], | ||
"text": "" | ||
}], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
}, | ||
"Array": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"shouldSortItems": { | ||
"type": Boolean, | ||
"attr": "should-sort-items" | ||
"setChoices": { | ||
"complexType": { | ||
"signature": "(choices: any[], value: string, label: string, replaceChoices?: boolean) => Promise<this>", | ||
"parameters": [{ | ||
"tags": [], | ||
"text": "" | ||
}, { | ||
"tags": [], | ||
"text": "" | ||
}, { | ||
"tags": [], | ||
"text": "" | ||
}, { | ||
"tags": [], | ||
"text": "" | ||
}], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
}, | ||
"Array": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"showDropdown": { | ||
"method": true | ||
"clearChoices": { | ||
"complexType": { | ||
"signature": "() => Promise<this>", | ||
"parameters": [], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"silent": { | ||
"type": Boolean, | ||
"attr": "silent" | ||
"clearStore": { | ||
"complexType": { | ||
"signature": "() => Promise<this>", | ||
"parameters": [], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"sortFn": { | ||
"type": "Any", | ||
"attr": "sort-fn" | ||
"clearInput": { | ||
"complexType": { | ||
"signature": "() => Promise<this>", | ||
"parameters": [], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"type": { | ||
"type": String, | ||
"attr": "type" | ||
"enable": { | ||
"complexType": { | ||
"signature": "() => Promise<this>", | ||
"parameters": [], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"unhighlightAll": { | ||
"method": true | ||
"disable": { | ||
"complexType": { | ||
"signature": "() => Promise<this>", | ||
"parameters": [], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
}, | ||
"unhighlightItem": { | ||
"method": true | ||
}, | ||
"uniqueItemText": { | ||
"type": String, | ||
"attr": "unique-item-text" | ||
}, | ||
"value": { | ||
"type": String, | ||
"attr": "value" | ||
"ajax": { | ||
"complexType": { | ||
"signature": "(fn: AjaxFn) => Promise<this>", | ||
"parameters": [{ | ||
"tags": [], | ||
"text": "" | ||
}], | ||
"references": { | ||
"Promise": { | ||
"location": "global" | ||
}, | ||
"AjaxFn": { | ||
"location": "import", | ||
"path": "./interfaces" | ||
} | ||
}, | ||
"return": "Promise<this>" | ||
}, | ||
"docs": { | ||
"text": "", | ||
"tags": [] | ||
} | ||
} | ||
}; } | ||
static get events() { return [{ | ||
"name": "addItem", | ||
"method": "addItemEvent", | ||
"bubbles": true, | ||
"cancelable": true, | ||
"composed": true | ||
}, { | ||
"name": "removeItem", | ||
"method": "removeItemEvent", | ||
"bubbles": true, | ||
"cancelable": true, | ||
"composed": true | ||
}, { | ||
"name": "highlightItem", | ||
"method": "highlightItemEvent", | ||
"bubbles": true, | ||
"cancelable": true, | ||
"composed": true | ||
}, { | ||
"name": "unhighlightItem", | ||
"method": "unhighlightItemEvent", | ||
"bubbles": true, | ||
"cancelable": true, | ||
"composed": true | ||
}, { | ||
"name": "choice", | ||
"method": "choiceEvent", | ||
"bubbles": true, | ||
"cancelable": true, | ||
"composed": true | ||
}, { | ||
"name": "change", | ||
"method": "changeEvent", | ||
"bubbles": true, | ||
"cancelable": true, | ||
"composed": true | ||
}, { | ||
"name": "search", | ||
"method": "searchEvent", | ||
"bubbles": true, | ||
"cancelable": true, | ||
"composed": true | ||
}, { | ||
"name": "showDropdown", | ||
"method": "showDropdownEvent", | ||
"bubbles": true, | ||
"cancelable": true, | ||
"composed": true | ||
}, { | ||
"name": "hideDropdown", | ||
"method": "hideDropdownEvent", | ||
"bubbles": true, | ||
"cancelable": true, | ||
"composed": true | ||
}]; } | ||
static get style() { return "/**style-placeholder:choicesjs-stencil:**/"; } | ||
static get elementRef() { return "root"; } | ||
} |
@@ -0,1 +1,8 @@ | ||
/** | ||
* Filter out entries from an object. | ||
* | ||
* @param obj - object to filter. | ||
* @param fn - filter function. | ||
* @returns a new object without the entries satisfying the filter function. | ||
*/ | ||
export function filterObject(obj, fn) { | ||
@@ -10,5 +17,17 @@ return Object.keys(obj).reduce((accum, property) => { | ||
} | ||
/** | ||
* Check if given parameter is not undefined. | ||
* | ||
* @param value - value to check. | ||
* @returns whether the value is defined. | ||
*/ | ||
export function isDefined(value) { | ||
return typeof value !== 'undefined'; | ||
} | ||
/** | ||
* Returns the list of values. | ||
* | ||
* @param value - Value or list of values. | ||
* @returns List of values. | ||
*/ | ||
export function getValues(value) { | ||
@@ -15,0 +34,0 @@ return typeof value !== 'undefined' |
@@ -1,2 +0,1 @@ | ||
// ChoicesJSStencil: CommonJS Main | ||
module.exports = require('../esm/index.js'); | ||
module.exports = require('./cjs/index.cjs.js'); |
@@ -1,1 +0,3 @@ | ||
module.exports = require('../cjs/es5/choicesjsstencil.define.js'); | ||
module.exports = require('../cjs/loader.cjs.js'); | ||
module.exports.applyPolyfills = function() { return Promise.resolve() }; |
@@ -1,1 +0,13 @@ | ||
export declare function defineCustomElements(win: any, opts?: any): Promise<void>; | ||
export * from '../types/components'; | ||
export interface CustomElementsDefineOptions { | ||
exclude?: string[]; | ||
resourcesUrl?: string; | ||
syncQueue?: boolean; | ||
jmp?: (c: Function) => any; | ||
raf?: (c: FrameRequestCallback) => number; | ||
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void; | ||
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void; | ||
} | ||
export declare function defineCustomElements(win: Window, opts?: CustomElementsDefineOptions): Promise<void>; | ||
export declare function applyPolyfills(): Promise<void>; |
{ | ||
"name": "loader", | ||
"name": "choicesjsstencil-loader", | ||
"typings": "./index.d.ts", | ||
"module": "./index.js", | ||
"module": "./index.mjs", | ||
"main": "./index.cjs.js", | ||
"jsnext:main": "./index.es2017.js", | ||
"es2015": "./index.es2017.js", | ||
"es2017": "./index.es2017.js" | ||
"node:main": "./node-main.js", | ||
"jsnext:main": "./index.es2017.mjs", | ||
"es2015": "./index.es2017.mjs", | ||
"es2017": "./index.es2017.mjs", | ||
"unpkg": "./cdn.js" | ||
} |
@@ -8,9 +8,4 @@ /* tslint:disable */ | ||
import './stencil.core'; | ||
import { HTMLStencilElement, JSXBase } from './stencil.core'; | ||
import { | ||
Element, | ||
} from './stencil.core'; | ||
import { | ||
AddItemTextFn, | ||
@@ -30,5 +25,3 @@ AjaxFn, | ||
export namespace Components { | ||
interface ChoicesjsStencil { | ||
@@ -56,3 +49,3 @@ 'addItemFilterFn': ItemFilterFn; | ||
'highlightAll': () => Promise<this>; | ||
'highlightItem': (item: Element, runEvent?: boolean) => Promise<this>; | ||
'highlightItem': (item: HTMLElement, runEvent?: boolean) => Promise<this>; | ||
'itemSelectText': string; | ||
@@ -95,7 +88,23 @@ 'items': Array<any>; | ||
'unhighlightAll': () => Promise<this>; | ||
'unhighlightItem': (item: Element) => Promise<this>; | ||
'unhighlightItem': (item: HTMLElement) => Promise<this>; | ||
'uniqueItemText': UniqueItemText; | ||
'value': string; | ||
} | ||
interface ChoicesjsStencilAttributes extends StencilHTMLAttributes { | ||
} | ||
declare global { | ||
interface HTMLChoicesjsStencilElement extends Components.ChoicesjsStencil, HTMLStencilElement {} | ||
var HTMLChoicesjsStencilElement: { | ||
prototype: HTMLChoicesjsStencilElement; | ||
new (): HTMLChoicesjsStencilElement; | ||
}; | ||
interface HTMLElementTagNameMap { | ||
'choicesjs-stencil': HTMLChoicesjsStencilElement; | ||
} | ||
} | ||
declare namespace LocalJSX { | ||
interface ChoicesjsStencil { | ||
'addItemFilterFn'?: ItemFilterFn; | ||
@@ -121,11 +130,2 @@ 'addItemText'?: string | AddItemTextFn; | ||
'noResultsText'?: string | NoResultsTextFn; | ||
'onAddItem'?: (event: CustomEvent) => void; | ||
'onChange'?: (event: CustomEvent) => void; | ||
'onChoice'?: (event: CustomEvent) => void; | ||
'onHideDropdown'?: (event: CustomEvent) => void; | ||
'onHighlightItem'?: (event: CustomEvent) => void; | ||
'onRemoveItem'?: (event: CustomEvent) => void; | ||
'onSearch'?: (event: CustomEvent) => void; | ||
'onShowDropdown'?: (event: CustomEvent) => void; | ||
'onUnhighlightItem'?: (event: CustomEvent) => void; | ||
'paste'?: boolean; | ||
@@ -155,29 +155,19 @@ 'placeholder'?: boolean | string; | ||
} | ||
} | ||
declare global { | ||
interface StencilElementInterfaces { | ||
'ChoicesjsStencil': Components.ChoicesjsStencil; | ||
interface IntrinsicElements { | ||
'choicesjs-stencil': ChoicesjsStencil; | ||
} | ||
} | ||
interface StencilIntrinsicElements { | ||
'choicesjs-stencil': Components.ChoicesjsStencilAttributes; | ||
} | ||
export { LocalJSX as JSX }; | ||
interface HTMLChoicesjsStencilElement extends Components.ChoicesjsStencil, HTMLStencilElement {} | ||
var HTMLChoicesjsStencilElement: { | ||
prototype: HTMLChoicesjsStencilElement; | ||
new (): HTMLChoicesjsStencilElement; | ||
}; | ||
interface HTMLElementTagNameMap { | ||
'choicesjs-stencil': HTMLChoicesjsStencilElement | ||
declare module "@stencil/core" { | ||
export namespace JSX { | ||
interface IntrinsicElements { | ||
'choicesjs-stencil': LocalJSX.ChoicesjsStencil & JSXBase.HTMLAttributes<HTMLChoicesjsStencilElement>; | ||
} | ||
} | ||
} | ||
interface ElementTagNameMap { | ||
'choicesjs-stencil': HTMLChoicesjsStencilElement; | ||
} | ||
} |
@@ -1,2 +0,1 @@ | ||
import { EventEmitter } from '../../stencil.core'; | ||
import { AjaxFn, ClassNames, FuseOptions, IChoicesProps, IChoicesMethods, ItemFilterFn, NoResultsTextFn, NoChoicesTextFn, AddItemTextFn, MaxItemTextFn, SortFn, OnInit, OnCreateTemplates, UniqueItemText } from './interfaces'; | ||
@@ -47,17 +46,7 @@ export declare class ChoicesJSStencil implements IChoicesProps, IChoicesMethods { | ||
callbackOnCreateTemplates: OnCreateTemplates; | ||
addItemEvent: EventEmitter; | ||
removeItemEvent: EventEmitter; | ||
highlightItemEvent: EventEmitter; | ||
unhighlightItemEvent: EventEmitter; | ||
choiceEvent: EventEmitter; | ||
changeEvent: EventEmitter; | ||
searchEvent: EventEmitter; | ||
showDropdownEvent: EventEmitter; | ||
hideDropdownEvent: EventEmitter; | ||
readonly passedElement: HTMLElement; | ||
private readonly root; | ||
private choice; | ||
private element; | ||
highlightItem(item: Element, runEvent?: boolean): Promise<this>; | ||
unhighlightItem(item: Element): Promise<this>; | ||
highlightItem(item: HTMLElement, runEvent?: boolean): Promise<this>; | ||
unhighlightItem(item: HTMLElement): Promise<this>; | ||
highlightAll(): Promise<this>; | ||
@@ -64,0 +53,0 @@ unhighlightAll(): Promise<this>; |
@@ -64,3 +64,9 @@ /** | ||
export interface ComponentInstance { | ||
export interface ComponentInterface { | ||
connectedCallback?: () => void; | ||
disconnectedCallback?: () => void; | ||
componentWillRender?: () => Promise<void> | void; | ||
componentDidRender?: () => void; | ||
/** | ||
@@ -108,20 +114,4 @@ * The component is about to load and it has not | ||
/** | ||
* The component did unload and the element | ||
* will be destroyed. | ||
*/ | ||
componentDidUnload?: () => void; | ||
render?: () => any; | ||
/** | ||
* Used to dynamically set host element attributes. | ||
* Should be placed directly above render() | ||
*/ | ||
hostData?: () => { | ||
class?: {[className: string]: boolean}; | ||
style?: any; | ||
[attrName: string]: any; | ||
}; | ||
[memberName: string]: any; | ||
@@ -138,6 +128,2 @@ } | ||
export interface EventListenerEnable { | ||
(instance: any, eventName: string, enabled: boolean, attachTo?: string|Element, passive?: boolean): void; | ||
} | ||
export interface QueueApi { | ||
@@ -155,137 +141,191 @@ tick: (cb: RafCallback) => void; | ||
/** | ||
* This file gets copied to all distributions of stencil component collections. | ||
* - no imports | ||
*/ | ||
export interface HTMLStencilElement extends HTMLElement { | ||
componentOnReady(): Promise<this>; | ||
forceUpdate(): void; | ||
} | ||
declare global { | ||
interface HTMLStencilElement extends HTMLElement { | ||
componentOnReady(): Promise<this>; | ||
forceUpdate(): void; | ||
} | ||
interface StencilHTMLAttributes extends JSXElements.HTMLAttributes {} | ||
interface StencilIntrinsicElements extends JSXElements.DefaultIntrinsicElements {} | ||
interface StencilElementInterfaces {} | ||
interface StencilGlobalHTMLAttributes {} | ||
declare namespace LocalJSX { | ||
export interface Element {} | ||
export interface IntrinsicElements {} | ||
} | ||
export { LocalJSX as JSX }; | ||
export namespace JSXElements { | ||
export interface DefaultIntrinsicElements { | ||
export namespace JSXBase { | ||
export interface IntrinsicElements { | ||
// Stencil elements | ||
slot: JSXElements.SlotAttributes; | ||
slot: JSXBase.SlotAttributes; | ||
// HTML | ||
a: JSXElements.AnchorHTMLAttributes<HTMLAnchorElement>; | ||
abbr: JSXElements.HTMLAttributes; | ||
address: JSXElements.HTMLAttributes; | ||
area: JSXElements.AreaHTMLAttributes<HTMLAreaElement>; | ||
article: JSXElements.HTMLAttributes; | ||
aside: JSXElements.HTMLAttributes; | ||
audio: JSXElements.AudioHTMLAttributes<HTMLAudioElement>; | ||
b: JSXElements.HTMLAttributes; | ||
base: JSXElements.BaseHTMLAttributes<HTMLBaseElement>; | ||
bdi: JSXElements.HTMLAttributes; | ||
bdo: JSXElements.HTMLAttributes; | ||
big: JSXElements.HTMLAttributes; | ||
blockquote: JSXElements.BlockquoteHTMLAttributes<HTMLQuoteElement>; | ||
body: JSXElements.HTMLAttributes<HTMLBodyElement>; | ||
br: JSXElements.HTMLAttributes<HTMLBRElement>; | ||
button: JSXElements.ButtonHTMLAttributes<HTMLButtonElement>; | ||
canvas: JSXElements.CanvasHTMLAttributes<HTMLCanvasElement>; | ||
caption: JSXElements.HTMLAttributes<HTMLTableCaptionElement>; | ||
cite: JSXElements.HTMLAttributes; | ||
code: JSXElements.HTMLAttributes; | ||
col: JSXElements.ColHTMLAttributes<HTMLTableColElement>; | ||
colgroup: JSXElements.ColgroupHTMLAttributes<HTMLTableColElement>; | ||
data: JSXElements.HTMLAttributes<HTMLDataElement>; | ||
datalist: JSXElements.HTMLAttributes<HTMLDataListElement>; | ||
dd: JSXElements.HTMLAttributes; | ||
del: JSXElements.DelHTMLAttributes<HTMLModElement>; | ||
details: JSXElements.DetailsHTMLAttributes<HTMLElement>; | ||
dfn: JSXElements.HTMLAttributes; | ||
dialog: JSXElements.DialogHTMLAttributes<HTMLDialogElement>; | ||
div: JSXElements.HTMLAttributes<HTMLDivElement>; | ||
dl: JSXElements.HTMLAttributes<HTMLDListElement>; | ||
dt: JSXElements.HTMLAttributes; | ||
em: JSXElements.HTMLAttributes; | ||
embed: JSXElements.EmbedHTMLAttributes<HTMLEmbedElement>; | ||
fieldset: JSXElements.FieldsetHTMLAttributes<HTMLFieldSetElement>; | ||
figcaption: JSXElements.HTMLAttributes; | ||
figure: JSXElements.HTMLAttributes; | ||
footer: JSXElements.HTMLAttributes; | ||
form: JSXElements.FormHTMLAttributes<HTMLFormElement>; | ||
h1: JSXElements.HTMLAttributes<HTMLHeadingElement>; | ||
h2: JSXElements.HTMLAttributes<HTMLHeadingElement>; | ||
h3: JSXElements.HTMLAttributes<HTMLHeadingElement>; | ||
h4: JSXElements.HTMLAttributes<HTMLHeadingElement>; | ||
h5: JSXElements.HTMLAttributes<HTMLHeadingElement>; | ||
h6: JSXElements.HTMLAttributes<HTMLHeadingElement>; | ||
head: JSXElements.HTMLAttributes<HTMLHeadElement>; | ||
header: JSXElements.HTMLAttributes; | ||
hgroup: JSXElements.HTMLAttributes; | ||
hr: JSXElements.HTMLAttributes<HTMLHRElement>; | ||
html: JSXElements.HTMLAttributes<HTMLHtmlElement>; | ||
i: JSXElements.HTMLAttributes; | ||
iframe: JSXElements.IframeHTMLAttributes<HTMLIFrameElement>; | ||
img: JSXElements.ImgHTMLAttributes<HTMLImageElement>; | ||
input: JSXElements.InputHTMLAttributes<HTMLInputElement>; | ||
ins: JSXElements.InsHTMLAttributes<HTMLModElement>; | ||
kbd: JSXElements.HTMLAttributes; | ||
keygen: JSXElements.KeygenHTMLAttributes<HTMLElement>; | ||
label: JSXElements.LabelHTMLAttributes<HTMLLabelElement>; | ||
legend: JSXElements.HTMLAttributes<HTMLLegendElement>; | ||
li: JSXElements.LiHTMLAttributes<HTMLLIElement>; | ||
link: JSXElements.LinkHTMLAttributes<HTMLLinkElement>; | ||
main: JSXElements.HTMLAttributes; | ||
map: JSXElements.MapHTMLAttributes<HTMLMapElement>; | ||
mark: JSXElements.HTMLAttributes; | ||
menu: JSXElements.MenuHTMLAttributes<HTMLMenuElement>; | ||
menuitem: JSXElements.HTMLAttributes; | ||
meta: JSXElements.MetaHTMLAttributes<HTMLMetaElement>; | ||
meter: JSXElements.MeterHTMLAttributes<HTMLMeterElement>; | ||
nav: JSXElements.HTMLAttributes; | ||
noscript: JSXElements.HTMLAttributes; | ||
object: JSXElements.ObjectHTMLAttributes<HTMLObjectElement>; | ||
ol: JSXElements.OlHTMLAttributes<HTMLOListElement>; | ||
optgroup: JSXElements.OptgroupHTMLAttributes<HTMLOptGroupElement>; | ||
option: JSXElements.OptionHTMLAttributes<HTMLOptionElement>; | ||
output: JSXElements.OutputHTMLAttributes<HTMLOutputElement>; | ||
p: JSXElements.HTMLAttributes<HTMLParagraphElement>; | ||
param: JSXElements.ParamHTMLAttributes<HTMLParamElement>; | ||
picture: JSXElements.HTMLAttributes<HTMLPictureElement>; | ||
pre: JSXElements.HTMLAttributes<HTMLPreElement>; | ||
progress: JSXElements.ProgressHTMLAttributes<HTMLProgressElement>; | ||
q: JSXElements.QuoteHTMLAttributes<HTMLQuoteElement>; | ||
rp: JSXElements.HTMLAttributes; | ||
rt: JSXElements.HTMLAttributes; | ||
ruby: JSXElements.HTMLAttributes; | ||
s: JSXElements.HTMLAttributes; | ||
samp: JSXElements.HTMLAttributes; | ||
script: JSXElements.ScriptHTMLAttributes<HTMLScriptElement>; | ||
section: JSXElements.HTMLAttributes; | ||
select: JSXElements.SelectHTMLAttributes<HTMLSelectElement>; | ||
small: JSXElements.HTMLAttributes; | ||
source: JSXElements.SourceHTMLAttributes<HTMLSourceElement>; | ||
span: JSXElements.HTMLAttributes<HTMLSpanElement>; | ||
strong: JSXElements.HTMLAttributes; | ||
style: JSXElements.StyleHTMLAttributes<HTMLStyleElement>; | ||
sub: JSXElements.HTMLAttributes; | ||
summary: JSXElements.HTMLAttributes; | ||
sup: JSXElements.HTMLAttributes; | ||
table: JSXElements.TableHTMLAttributes<HTMLTableElement>; | ||
tbody: JSXElements.HTMLAttributes<HTMLTableSectionElement>; | ||
td: JSXElements.TdHTMLAttributes<HTMLTableDataCellElement>; | ||
textarea: JSXElements.TextareaHTMLAttributes<HTMLTextAreaElement>; | ||
tfoot: JSXElements.HTMLAttributes<HTMLTableSectionElement>; | ||
th: JSXElements.ThHTMLAttributes<HTMLTableHeaderCellElement>; | ||
thead: JSXElements.HTMLAttributes<HTMLTableSectionElement>; | ||
time: JSXElements.TimeHTMLAttributes<HTMLTimeElement>; | ||
title: JSXElements.HTMLAttributes<HTMLTitleElement>; | ||
tr: JSXElements.HTMLAttributes<HTMLTableRowElement>; | ||
track: JSXElements.TrackHTMLAttributes<HTMLTrackElement>; | ||
u: JSXElements.HTMLAttributes; | ||
ul: JSXElements.HTMLAttributes<HTMLUListElement>; | ||
'var': JSXElements.HTMLAttributes; | ||
video: JSXElements.VideoHTMLAttributes<HTMLVideoElement>; | ||
wbr: JSXElements.HTMLAttributes; | ||
a: JSXBase.AnchorHTMLAttributes<HTMLAnchorElement>; | ||
abbr: JSXBase.HTMLAttributes; | ||
address: JSXBase.HTMLAttributes; | ||
area: JSXBase.AreaHTMLAttributes<HTMLAreaElement>; | ||
article: JSXBase.HTMLAttributes; | ||
aside: JSXBase.HTMLAttributes; | ||
audio: JSXBase.AudioHTMLAttributes<HTMLAudioElement>; | ||
b: JSXBase.HTMLAttributes; | ||
base: JSXBase.BaseHTMLAttributes<HTMLBaseElement>; | ||
bdi: JSXBase.HTMLAttributes; | ||
bdo: JSXBase.HTMLAttributes; | ||
big: JSXBase.HTMLAttributes; | ||
blockquote: JSXBase.BlockquoteHTMLAttributes<HTMLQuoteElement>; | ||
body: JSXBase.HTMLAttributes<HTMLBodyElement>; | ||
br: JSXBase.HTMLAttributes<HTMLBRElement>; | ||
button: JSXBase.ButtonHTMLAttributes<HTMLButtonElement>; | ||
canvas: JSXBase.CanvasHTMLAttributes<HTMLCanvasElement>; | ||
caption: JSXBase.HTMLAttributes<HTMLTableCaptionElement>; | ||
cite: JSXBase.HTMLAttributes; | ||
code: JSXBase.HTMLAttributes; | ||
col: JSXBase.ColHTMLAttributes<HTMLTableColElement>; | ||
colgroup: JSXBase.ColgroupHTMLAttributes<HTMLTableColElement>; | ||
data: JSXBase.HTMLAttributes<HTMLDataElement>; | ||
datalist: JSXBase.HTMLAttributes<HTMLDataListElement>; | ||
dd: JSXBase.HTMLAttributes; | ||
del: JSXBase.DelHTMLAttributes<HTMLModElement>; | ||
details: JSXBase.DetailsHTMLAttributes<HTMLElement>; | ||
dfn: JSXBase.HTMLAttributes; | ||
dialog: JSXBase.DialogHTMLAttributes<HTMLDialogElement>; | ||
div: JSXBase.HTMLAttributes<HTMLDivElement>; | ||
dl: JSXBase.HTMLAttributes<HTMLDListElement>; | ||
dt: JSXBase.HTMLAttributes; | ||
em: JSXBase.HTMLAttributes; | ||
embed: JSXBase.EmbedHTMLAttributes<HTMLEmbedElement>; | ||
fieldset: JSXBase.FieldsetHTMLAttributes<HTMLFieldSetElement>; | ||
figcaption: JSXBase.HTMLAttributes; | ||
figure: JSXBase.HTMLAttributes; | ||
footer: JSXBase.HTMLAttributes; | ||
form: JSXBase.FormHTMLAttributes<HTMLFormElement>; | ||
h1: JSXBase.HTMLAttributes<HTMLHeadingElement>; | ||
h2: JSXBase.HTMLAttributes<HTMLHeadingElement>; | ||
h3: JSXBase.HTMLAttributes<HTMLHeadingElement>; | ||
h4: JSXBase.HTMLAttributes<HTMLHeadingElement>; | ||
h5: JSXBase.HTMLAttributes<HTMLHeadingElement>; | ||
h6: JSXBase.HTMLAttributes<HTMLHeadingElement>; | ||
head: JSXBase.HTMLAttributes<HTMLHeadElement>; | ||
header: JSXBase.HTMLAttributes; | ||
hgroup: JSXBase.HTMLAttributes; | ||
hr: JSXBase.HTMLAttributes<HTMLHRElement>; | ||
html: JSXBase.HTMLAttributes<HTMLHtmlElement>; | ||
i: JSXBase.HTMLAttributes; | ||
iframe: JSXBase.IframeHTMLAttributes<HTMLIFrameElement>; | ||
img: JSXBase.ImgHTMLAttributes<HTMLImageElement>; | ||
input: JSXBase.InputHTMLAttributes<HTMLInputElement>; | ||
ins: JSXBase.InsHTMLAttributes<HTMLModElement>; | ||
kbd: JSXBase.HTMLAttributes; | ||
keygen: JSXBase.KeygenHTMLAttributes<HTMLElement>; | ||
label: JSXBase.LabelHTMLAttributes<HTMLLabelElement>; | ||
legend: JSXBase.HTMLAttributes<HTMLLegendElement>; | ||
li: JSXBase.LiHTMLAttributes<HTMLLIElement>; | ||
link: JSXBase.LinkHTMLAttributes<HTMLLinkElement>; | ||
main: JSXBase.HTMLAttributes; | ||
map: JSXBase.MapHTMLAttributes<HTMLMapElement>; | ||
mark: JSXBase.HTMLAttributes; | ||
menu: JSXBase.MenuHTMLAttributes<HTMLMenuElement>; | ||
menuitem: JSXBase.HTMLAttributes; | ||
meta: JSXBase.MetaHTMLAttributes<HTMLMetaElement>; | ||
meter: JSXBase.MeterHTMLAttributes<HTMLMeterElement>; | ||
nav: JSXBase.HTMLAttributes; | ||
noscript: JSXBase.HTMLAttributes; | ||
object: JSXBase.ObjectHTMLAttributes<HTMLObjectElement>; | ||
ol: JSXBase.OlHTMLAttributes<HTMLOListElement>; | ||
optgroup: JSXBase.OptgroupHTMLAttributes<HTMLOptGroupElement>; | ||
option: JSXBase.OptionHTMLAttributes<HTMLOptionElement>; | ||
output: JSXBase.OutputHTMLAttributes<HTMLOutputElement>; | ||
p: JSXBase.HTMLAttributes<HTMLParagraphElement>; | ||
param: JSXBase.ParamHTMLAttributes<HTMLParamElement>; | ||
picture: JSXBase.HTMLAttributes<HTMLPictureElement>; | ||
pre: JSXBase.HTMLAttributes<HTMLPreElement>; | ||
progress: JSXBase.ProgressHTMLAttributes<HTMLProgressElement>; | ||
q: JSXBase.QuoteHTMLAttributes<HTMLQuoteElement>; | ||
rp: JSXBase.HTMLAttributes; | ||
rt: JSXBase.HTMLAttributes; | ||
ruby: JSXBase.HTMLAttributes; | ||
s: JSXBase.HTMLAttributes; | ||
samp: JSXBase.HTMLAttributes; | ||
script: JSXBase.ScriptHTMLAttributes<HTMLScriptElement>; | ||
section: JSXBase.HTMLAttributes; | ||
select: JSXBase.SelectHTMLAttributes<HTMLSelectElement>; | ||
small: JSXBase.HTMLAttributes; | ||
source: JSXBase.SourceHTMLAttributes<HTMLSourceElement>; | ||
span: JSXBase.HTMLAttributes<HTMLSpanElement>; | ||
strong: JSXBase.HTMLAttributes; | ||
style: JSXBase.StyleHTMLAttributes<HTMLStyleElement>; | ||
sub: JSXBase.HTMLAttributes; | ||
summary: JSXBase.HTMLAttributes; | ||
sup: JSXBase.HTMLAttributes; | ||
table: JSXBase.TableHTMLAttributes<HTMLTableElement>; | ||
tbody: JSXBase.HTMLAttributes<HTMLTableSectionElement>; | ||
td: JSXBase.TdHTMLAttributes<HTMLTableDataCellElement>; | ||
textarea: JSXBase.TextareaHTMLAttributes<HTMLTextAreaElement>; | ||
tfoot: JSXBase.HTMLAttributes<HTMLTableSectionElement>; | ||
th: JSXBase.ThHTMLAttributes<HTMLTableHeaderCellElement>; | ||
thead: JSXBase.HTMLAttributes<HTMLTableSectionElement>; | ||
time: JSXBase.TimeHTMLAttributes<HTMLTimeElement>; | ||
title: JSXBase.HTMLAttributes<HTMLTitleElement>; | ||
tr: JSXBase.HTMLAttributes<HTMLTableRowElement>; | ||
track: JSXBase.TrackHTMLAttributes<HTMLTrackElement>; | ||
u: JSXBase.HTMLAttributes; | ||
ul: JSXBase.HTMLAttributes<HTMLUListElement>; | ||
'var': JSXBase.HTMLAttributes; | ||
video: JSXBase.VideoHTMLAttributes<HTMLVideoElement>; | ||
wbr: JSXBase.HTMLAttributes; | ||
// SVG | ||
animate: JSXBase.SVGAttributes; | ||
circle: JSXBase.SVGAttributes; | ||
clipPath: JSXBase.SVGAttributes; | ||
defs: JSXBase.SVGAttributes; | ||
desc: JSXBase.SVGAttributes; | ||
ellipse: JSXBase.SVGAttributes; | ||
feBlend: JSXBase.SVGAttributes; | ||
feColorMatrix: JSXBase.SVGAttributes; | ||
feComponentTransfer: JSXBase.SVGAttributes; | ||
feComposite: JSXBase.SVGAttributes; | ||
feConvolveMatrix: JSXBase.SVGAttributes; | ||
feDiffuseLighting: JSXBase.SVGAttributes; | ||
feDisplacementMap: JSXBase.SVGAttributes; | ||
feDistantLight: JSXBase.SVGAttributes; | ||
feDropShadow: JSXBase.SVGAttributes; | ||
feFlood: JSXBase.SVGAttributes; | ||
feFuncA: JSXBase.SVGAttributes; | ||
feFuncB: JSXBase.SVGAttributes; | ||
feFuncG: JSXBase.SVGAttributes; | ||
feFuncR: JSXBase.SVGAttributes; | ||
feGaussianBlur: JSXBase.SVGAttributes; | ||
feImage: JSXBase.SVGAttributes; | ||
feMerge: JSXBase.SVGAttributes; | ||
feMergeNode: JSXBase.SVGAttributes; | ||
feMorphology: JSXBase.SVGAttributes; | ||
feOffset: JSXBase.SVGAttributes; | ||
fePointLight: JSXBase.SVGAttributes; | ||
feSpecularLighting: JSXBase.SVGAttributes; | ||
feSpotLight: JSXBase.SVGAttributes; | ||
feTile: JSXBase.SVGAttributes; | ||
feTurbulence: JSXBase.SVGAttributes; | ||
filter: JSXBase.SVGAttributes; | ||
foreignObject: JSXBase.SVGAttributes; | ||
g: JSXBase.SVGAttributes; | ||
image: JSXBase.SVGAttributes; | ||
line: JSXBase.SVGAttributes; | ||
linearGradient: JSXBase.SVGAttributes; | ||
marker: JSXBase.SVGAttributes; | ||
mask: JSXBase.SVGAttributes; | ||
metadata: JSXBase.SVGAttributes; | ||
path: JSXBase.SVGAttributes; | ||
pattern: JSXBase.SVGAttributes; | ||
polygon: JSXBase.SVGAttributes; | ||
polyline: JSXBase.SVGAttributes; | ||
radialGradient: JSXBase.SVGAttributes; | ||
rect: JSXBase.SVGAttributes; | ||
stop: JSXBase.SVGAttributes; | ||
svg: JSXBase.SVGAttributes; | ||
switch: JSXBase.SVGAttributes; | ||
symbol: JSXBase.SVGAttributes; | ||
text: JSXBase.SVGAttributes; | ||
textPath: JSXBase.SVGAttributes; | ||
tspan: JSXBase.SVGAttributes; | ||
use: JSXBase.SVGAttributes; | ||
view: JSXBase.SVGAttributes; | ||
} | ||
@@ -375,2 +415,3 @@ | ||
export interface DialogHTMLAttributes<T> extends HTMLAttributes<T> { | ||
onClose?: (event: Event) => void; | ||
open?: boolean; | ||
@@ -419,3 +460,5 @@ returnValue?: string; | ||
frameborder?: number | string; | ||
importance?: 'low' | 'auto' | 'high'; | ||
height?: number | string; | ||
loading?: 'lazy' | 'auto' | 'eager'; | ||
marginHeight?: number; | ||
@@ -438,3 +481,5 @@ marginheight?: string | number; | ||
decoding?: 'async' | 'auto' | 'sync'; | ||
importance?: 'low' | 'auto' | 'high'; | ||
height?: number | string; | ||
loading?: 'lazy' | 'auto' | 'eager'; | ||
sizes?: string; | ||
@@ -528,2 +573,3 @@ src?: string; | ||
hreflang?: string; | ||
importance?: 'low' | 'auto' | 'high'; | ||
integrity?: string; | ||
@@ -556,2 +602,29 @@ media?: string; | ||
src?: string; | ||
// https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Media_events | ||
onAbort?: (event: Event) => void; | ||
onCanPlay?: (event: Event) => void; | ||
onCanPlayThrough?: (event: Event) => void; | ||
onDurationChange?: (event: Event) => void; | ||
onEmptied?: (event: Event) => void; | ||
onEnded?: (event: Event) => void; | ||
onError?: (event: Event) => void; | ||
onInterruptBegin?: (event: Event) => void; | ||
onInterruptEnd?: (event: Event) => void; | ||
onLoadedData?: (event: Event) => void; | ||
onLoadedMetaData?: (event: Event) => void; | ||
onLoadStart?: (event: Event) => void; | ||
onMozAudioAvailable?: (event: Event) => void; | ||
onPause?: (event: Event) => void; | ||
onPlay?: (event: Event) => void; | ||
onPlaying?: (event: Event) => void; | ||
onProgress?: (event: Event) => void; | ||
onRateChange?: (event: Event) => void; | ||
onSeeked?: (event: Event) => void; | ||
onSeeking?: (event: Event) => void; | ||
onStalled?: (event: Event) => void; | ||
onSuspend?: (event: Event) => void; | ||
onTimeUpdate?: (event: Event) => void; | ||
onVolumeChange?: (event: Event) => void; | ||
onWaiting?: (event: Event) => void; | ||
} | ||
@@ -637,2 +710,3 @@ | ||
defer?: boolean; | ||
importance?: 'low' | 'auto' | 'high'; | ||
integrity?: string; | ||
@@ -732,6 +806,5 @@ nonce?: string; | ||
export interface HTMLAttributes<T = HTMLElement> extends StencilGlobalHTMLAttributes, DOMAttributes { | ||
export interface HTMLAttributes<T = HTMLElement> extends DOMAttributes<T> { | ||
// vdom specific | ||
innerHTML?: string; | ||
ref?: (elm?: T) => void; | ||
key?: string | number; | ||
@@ -741,3 +814,3 @@ | ||
accessKey?: string; | ||
class?: string | { [className: string]: boolean }; | ||
class?: string | { [className: string]: boolean }; | ||
contentEditable?: boolean | string; | ||
@@ -752,6 +825,5 @@ contenteditable?: boolean | string; | ||
lang?: string; | ||
slot?: string; | ||
spellCheck?: boolean; | ||
spellcheck?: boolean | string; | ||
style?: { [key: string]: string }; | ||
style?: { [key: string]: string | undefined }; | ||
tabIndex?: number; | ||
@@ -767,2 +839,3 @@ tabindex?: number | string; | ||
radiogroup?: string; | ||
part?: string; | ||
@@ -805,3 +878,3 @@ // WAI-ARIA | ||
export interface SVGAttributes extends StencilGlobalHTMLAttributes, DOMAttributes { | ||
export interface SVGAttributes<T = SVGElement> extends DOMAttributes<T> { | ||
// Attributes which also defined in HTMLAttributes | ||
@@ -819,3 +892,3 @@ // See comment in SVGDOMPropertyConfig.js | ||
name?: string; | ||
style?: { [key: string]: any; }; | ||
style?: { [key: string]: string | undefined }; | ||
target?: string; | ||
@@ -1072,3 +1145,6 @@ type?: string; | ||
export interface DOMAttributes { | ||
export interface DOMAttributes<T = Element> { | ||
ref?: (elm?: T) => void; | ||
slot?: string; | ||
// Clipboard Events | ||
@@ -1169,2 +1245,24 @@ onCopy?: (event: ClipboardEvent) => void; | ||
// Pointer Events | ||
onPointerDown?: (event: PointerEvent) => void; | ||
onPointerDownCapture?: (event: PointerEvent) => void; | ||
onPointerMove?: (event: PointerEvent) => void; | ||
onPointerMoveCapture?: (event: PointerEvent) => void; | ||
onPointerUp?: (event: PointerEvent) => void; | ||
onPointerUpCapture?: (event: PointerEvent) => void; | ||
onPointerCancel?: (event: PointerEvent) => void; | ||
onPointerCancelCapture?: (event: PointerEvent) => void; | ||
onPointerEnter?: (event: PointerEvent) => void; | ||
onPointerEnterCapture?: (event: PointerEvent) => void; | ||
onPointerLeave?: (event: PointerEvent) => void; | ||
onPointerLeaveCapture?: (event: PointerEvent) => void; | ||
onPointerOver?: (event: PointerEvent) => void; | ||
onPointerOverCapture?: (event: PointerEvent) => void; | ||
onPointerOut?: (event: PointerEvent) => void; | ||
onPointerOutCapture?: (event: PointerEvent) => void; | ||
onGotPointerCapture?: (event: PointerEvent) => void; | ||
onGotPointerCaptureCapture?: (event: PointerEvent) => void; | ||
onLostPointerCapture?: (event: PointerEvent) => void; | ||
onLostPointerCaptureCapture?: (event: PointerEvent) => void; | ||
// UI Events | ||
@@ -1192,22 +1290,51 @@ onScroll?: (event: UIEvent) => void; | ||
export interface Hyperscript { | ||
(sel: any): VNode; | ||
(sel: Node, data: VNodeData): VNode; | ||
(sel: any, data: VNodeData): VNode; | ||
(sel: any, text: string): VNode; | ||
(sel: any, children: Array<VNode | undefined | null>): VNode; | ||
(sel: any, data: VNodeData, text: string): VNode; | ||
(sel: any, data: VNodeData, children: Array<VNode | undefined | null>): VNode; | ||
(sel: any, data: VNodeData, children: VNode): VNode; | ||
} | ||
export interface VNodeData { | ||
class?: {[className: string]: boolean}; | ||
style?: any; | ||
[attrName: string]: any; | ||
} | ||
export type ChildType = VNode | number | string; | ||
export type PropsType = VNodeProdData | number | string | null; | ||
export interface VNodeProdData { | ||
key?: string | number; | ||
class?: {[className: string]: boolean} | string; | ||
className?: {[className: string]: boolean} | string; | ||
style?: any; | ||
[key: string]: any; | ||
} | ||
export interface FunctionalUtilities { | ||
forEach: (children: FVNode[], cb: (vnode: ChildNode, index: number, array: FVNode[]) => void) => void; | ||
map: (children: FVNode[], cb: (vnode: ChildNode, index: number, array: FVNode[]) => ChildNode) => FVNode[]; | ||
forEach: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => void) => void; | ||
map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[]; | ||
} | ||
export interface FunctionalComponent<T = {}> { | ||
(props: T, children: FVNode[], utils: FunctionalUtilities): FVNode | FVNode[]; | ||
(props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[]; | ||
} | ||
export interface FVNode { | ||
// using v prefixes largely so closure has no issue property renaming | ||
vtag?: string | number | Function; | ||
vkey?: string | number; | ||
vtext?: string; | ||
vchildren?: FVNode[]; | ||
vattrs?: any; | ||
vname?: string; | ||
ishost?: boolean; | ||
isSlotFallback?: boolean; | ||
isSlotReference?: boolean; | ||
export interface VNode { | ||
$tag$?: string | number | Function; | ||
$key$?: string | number; | ||
$text$?: string; | ||
$children$?: VNode[]; | ||
$attrs$?: any; | ||
$name$?: string; | ||
$flags$: number; | ||
$elm$?: any; | ||
} | ||
@@ -1219,5 +1346,5 @@ | ||
vtext?: string; | ||
vchildren?: ChildNode[]; | ||
vchildren?: VNode[]; | ||
vattrs?: any; | ||
vname?: string; | ||
} |
{ | ||
"name": "choicesjs-stencil", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"description": "Select Web Component which wraps ChoicesJS library using StencilJS", | ||
@@ -11,3 +11,3 @@ "repository": { | ||
"main": "dist/index.js", | ||
"module": "dist/esm/es5/index.js", | ||
"module": "dist/index.mjs", | ||
"types": "dist/types/components.d.ts", | ||
@@ -40,4 +40,4 @@ "collection": "dist/collection/collection-manifest.json", | ||
"@babel/plugin-syntax-dynamic-import": "7.2.0", | ||
"@stencil/core": "0.18.1", | ||
"@stencil/sass": "0.1.1", | ||
"@stencil/core": "1.5.4", | ||
"@stencil/sass": "1.0.1", | ||
"@stencil/utils": "0.0.5", | ||
@@ -53,4 +53,4 @@ "@types/jest": "21.1.8", | ||
"tslint-eslint-rules": "5.4.0", | ||
"typedoc": "0.14.2", | ||
"workbox-build": "3.4.1" | ||
"typedoc": "0.15.0", | ||
"workbox-build": "4.3.1" | ||
}, | ||
@@ -57,0 +57,0 @@ "optionalDependencies": { |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
817219
12949
0
5
65
11