@revolist/revo-dropdown
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -206,4 +206,12 @@ 'use strict'; | ||
componentDidRender() { | ||
if (this.dropdown && this.appendTo === 'body') { | ||
document.body.appendChild(this.dropdown); | ||
if (this.dropdown) { | ||
if (this.appendTo === 'body') { | ||
document.body.appendChild(this.dropdown); | ||
} | ||
else if (this.appendTo !== 'current' && typeof this.appendTo === 'string') { | ||
const el = document.querySelector(this.appendTo); | ||
if (el instanceof HTMLElement) { | ||
el.appendChild(this.dropdown); | ||
} | ||
} | ||
} | ||
@@ -272,3 +280,3 @@ if (this.isVisible) { | ||
} | ||
return (index.h(index.Host, Object.assign({ key: '9b4840cef7955b7e7a5f34d3d2a456f1e363c538' }, props), index.h("label", { key: '23866fde0eca91234111f6d333cfa582aae73c3c' }, this.placeholder), index.h("div", { key: '0da332d891dcbc29433c9c9d23763fbaec606686', class: "rv-dr-root" }, this.autocomplete ? this.renderAutocomplete() : this.renderSelect(), index.h("span", { key: '4ac81967781a5c216dd9549fb9f1c15ac17d3be6', class: "actions" }, index.h(ArrowRenderer, { key: 'f2e83bfee9823eda08651fc130261beb99b58195' })), index.h("fieldset", { key: '1f48470d2aa79d6d09fa1d0493742752a62ce824' }, index.h("legend", { key: 'b93ce701b5b3f2b001807b626993f942bcf84df2' }, index.h("span", { key: '76c13d6ce0ef33794dacdcc9eec6d1a34eded858' }, this.placeholder)))), list)); | ||
return (index.h(index.Host, Object.assign({ key: 'c76b30c10b5d5727112a1912be87324b54af9c57' }, props), index.h("label", { key: 'a7bb046d9863866d356c2b61c5af5402d96dd260' }, this.placeholder), index.h("div", { key: '7c04280ed41bae735b82346e2f96ca0a980b3a58', class: "rv-dr-root" }, this.autocomplete ? this.renderAutocomplete() : this.renderSelect(), index.h("span", { key: '1ba2e9d1d18c3e9f3fece999d6fc7bbf8fb4947f', class: "actions" }, index.h(ArrowRenderer, { key: '2249cb5299f24011e47fe38ea36afe3effba3c94' })), index.h("fieldset", { key: '1ad14cb273cfd420aaf6c847b950e780f748c63c' }, index.h("legend", { key: 'cc3810362cb47b96c56487ee833de6bc90a594e8' }, index.h("span", { key: '4bfccee1d4e13fda7eadf428c250ae58f30f9d2e' }, this.placeholder)))), list)); | ||
} | ||
@@ -275,0 +283,0 @@ showAutoComplete() { |
@@ -110,4 +110,12 @@ import { h, Host } from "@stencil/core"; | ||
componentDidRender() { | ||
if (this.dropdown && this.appendTo === 'body') { | ||
document.body.appendChild(this.dropdown); | ||
if (this.dropdown) { | ||
if (this.appendTo === 'body') { | ||
document.body.appendChild(this.dropdown); | ||
} | ||
else if (this.appendTo !== 'current' && typeof this.appendTo === 'string') { | ||
const el = document.querySelector(this.appendTo); | ||
if (el instanceof HTMLElement) { | ||
el.appendChild(this.dropdown); | ||
} | ||
} | ||
} | ||
@@ -176,3 +184,3 @@ if (this.isVisible) { | ||
} | ||
return (h(Host, Object.assign({ key: '9b4840cef7955b7e7a5f34d3d2a456f1e363c538' }, props), h("label", { key: '23866fde0eca91234111f6d333cfa582aae73c3c' }, this.placeholder), h("div", { key: '0da332d891dcbc29433c9c9d23763fbaec606686', class: "rv-dr-root" }, this.autocomplete ? this.renderAutocomplete() : this.renderSelect(), h("span", { key: '4ac81967781a5c216dd9549fb9f1c15ac17d3be6', class: "actions" }, h(ArrowRenderer, { key: 'f2e83bfee9823eda08651fc130261beb99b58195' })), h("fieldset", { key: '1f48470d2aa79d6d09fa1d0493742752a62ce824' }, h("legend", { key: 'b93ce701b5b3f2b001807b626993f942bcf84df2' }, h("span", { key: '76c13d6ce0ef33794dacdcc9eec6d1a34eded858' }, this.placeholder)))), list)); | ||
return (h(Host, Object.assign({ key: 'c76b30c10b5d5727112a1912be87324b54af9c57' }, props), h("label", { key: 'a7bb046d9863866d356c2b61c5af5402d96dd260' }, this.placeholder), h("div", { key: '7c04280ed41bae735b82346e2f96ca0a980b3a58', class: "rv-dr-root" }, this.autocomplete ? this.renderAutocomplete() : this.renderSelect(), h("span", { key: '1ba2e9d1d18c3e9f3fece999d6fc7bbf8fb4947f', class: "actions" }, h(ArrowRenderer, { key: '2249cb5299f24011e47fe38ea36afe3effba3c94' })), h("fieldset", { key: '1ad14cb273cfd420aaf6c847b950e780f748c63c' }, h("legend", { key: 'cc3810362cb47b96c56487ee833de6bc90a594e8' }, h("span", { key: '4bfccee1d4e13fda7eadf428c250ae58f30f9d2e' }, this.placeholder)))), list)); | ||
} | ||
@@ -412,4 +420,4 @@ showAutoComplete() { | ||
"complexType": { | ||
"original": "'body' | 'current'", | ||
"resolved": "\"body\" | \"current\"", | ||
"original": "'body' | 'current' | string", | ||
"resolved": "string", | ||
"references": {} | ||
@@ -416,0 +424,0 @@ }, |
@@ -202,4 +202,12 @@ import { h, r as registerInstance, c as createEvent, H as Host } from './index-0be0f203.js'; | ||
componentDidRender() { | ||
if (this.dropdown && this.appendTo === 'body') { | ||
document.body.appendChild(this.dropdown); | ||
if (this.dropdown) { | ||
if (this.appendTo === 'body') { | ||
document.body.appendChild(this.dropdown); | ||
} | ||
else if (this.appendTo !== 'current' && typeof this.appendTo === 'string') { | ||
const el = document.querySelector(this.appendTo); | ||
if (el instanceof HTMLElement) { | ||
el.appendChild(this.dropdown); | ||
} | ||
} | ||
} | ||
@@ -268,3 +276,3 @@ if (this.isVisible) { | ||
} | ||
return (h(Host, Object.assign({ key: '9b4840cef7955b7e7a5f34d3d2a456f1e363c538' }, props), h("label", { key: '23866fde0eca91234111f6d333cfa582aae73c3c' }, this.placeholder), h("div", { key: '0da332d891dcbc29433c9c9d23763fbaec606686', class: "rv-dr-root" }, this.autocomplete ? this.renderAutocomplete() : this.renderSelect(), h("span", { key: '4ac81967781a5c216dd9549fb9f1c15ac17d3be6', class: "actions" }, h(ArrowRenderer, { key: 'f2e83bfee9823eda08651fc130261beb99b58195' })), h("fieldset", { key: '1f48470d2aa79d6d09fa1d0493742752a62ce824' }, h("legend", { key: 'b93ce701b5b3f2b001807b626993f942bcf84df2' }, h("span", { key: '76c13d6ce0ef33794dacdcc9eec6d1a34eded858' }, this.placeholder)))), list)); | ||
return (h(Host, Object.assign({ key: 'c76b30c10b5d5727112a1912be87324b54af9c57' }, props), h("label", { key: 'a7bb046d9863866d356c2b61c5af5402d96dd260' }, this.placeholder), h("div", { key: '7c04280ed41bae735b82346e2f96ca0a980b3a58', class: "rv-dr-root" }, this.autocomplete ? this.renderAutocomplete() : this.renderSelect(), h("span", { key: '1ba2e9d1d18c3e9f3fece999d6fc7bbf8fb4947f', class: "actions" }, h(ArrowRenderer, { key: '2249cb5299f24011e47fe38ea36afe3effba3c94' })), h("fieldset", { key: '1ad14cb273cfd420aaf6c847b950e780f748c63c' }, h("legend", { key: 'cc3810362cb47b96c56487ee833de6bc90a594e8' }, h("span", { key: '4bfccee1d4e13fda7eadf428c250ae58f30f9d2e' }, this.placeholder)))), list)); | ||
} | ||
@@ -271,0 +279,0 @@ showAutoComplete() { |
@@ -1,2 +0,2 @@ | ||
import{p as e,b as o}from"./p-d2fb933e.js";export{s as setNonce}from"./p-d2fb933e.js";import{g as t}from"./p-e1255160.js";var a=()=>{const o=import.meta.url;const t={};if(o!==""){t.resourcesUrl=new URL(".",o).href}return e(t)};a().then((async e=>{await t();return o([["p-a8fcebfc",[[0,"revo-dropdown",{dataLabel:[1,"data-label"],value:[1032],currentFilter:[1032,"current-filter"],dataId:[1,"data-id"],autoClose:[4,"auto-close"],source:[16],placeholder:[1],appendTo:[1,"append-to"],filter:[1],maxHeight:[2,"max-height"],hasFilter:[4,"has-filter"],autocomplete:[4],autoFocus:[4,"auto-focus"],template:[16],currentItem:[32],isVisible:[32],doClose:[64],doOpen:[64],doChange:[64]},[[5,"mousedown","onMouseUp"],[4,"keydown","onKey"]],{value:["onValueChanged"]}],[0,"revo-list",{sourceItems:[16],isFocused:[4,"is-focused"],selectedIndex:[2,"selected-index"],template:[16],currentItem:[32],refresh:[64]},[[4,"keydown","onKey"]],{selectedIndex:["valueChanged"]}]]]],e)})); | ||
import{p as e,b as o}from"./p-d2fb933e.js";export{s as setNonce}from"./p-d2fb933e.js";import{g as t}from"./p-e1255160.js";var a=()=>{const o=import.meta.url;const t={};if(o!==""){t.resourcesUrl=new URL(".",o).href}return e(t)};a().then((async e=>{await t();return o([["p-f2ce53d3",[[0,"revo-dropdown",{dataLabel:[1,"data-label"],value:[1032],currentFilter:[1032,"current-filter"],dataId:[1,"data-id"],autoClose:[4,"auto-close"],source:[16],placeholder:[1],appendTo:[1,"append-to"],filter:[1],maxHeight:[2,"max-height"],hasFilter:[4,"has-filter"],autocomplete:[4],autoFocus:[4,"auto-focus"],template:[16],currentItem:[32],isVisible:[32],doClose:[64],doOpen:[64],doChange:[64]},[[5,"mousedown","onMouseUp"],[4,"keydown","onKey"]],{value:["onValueChanged"]}],[0,"revo-list",{sourceItems:[16],isFocused:[4,"is-focused"],selectedIndex:[2,"selected-index"],template:[16],currentItem:[32],refresh:[64]},[[4,"keydown","onKey"]],{selectedIndex:["valueChanged"]}]]]],e)})); | ||
//# sourceMappingURL=revo-dropdown.esm.js.map |
@@ -15,3 +15,3 @@ /* eslint-disable */ | ||
*/ | ||
"appendTo": 'body' | 'current'; | ||
"appendTo": 'body' | 'current' | string; | ||
/** | ||
@@ -140,3 +140,3 @@ * Should dropdown autoclose on changeValue | ||
*/ | ||
"appendTo"?: 'body' | 'current'; | ||
"appendTo"?: 'body' | 'current' | string; | ||
/** | ||
@@ -143,0 +143,0 @@ * Should dropdown autoclose on changeValue |
@@ -46,3 +46,3 @@ import { VNode, EventEmitter } from '../../stencil-public-runtime'; | ||
*/ | ||
appendTo: 'body' | 'current'; | ||
appendTo: 'body' | 'current' | string; | ||
/** | ||
@@ -49,0 +49,0 @@ * Filter criteria |
{ | ||
"name": "@revolist/revo-dropdown", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "Minimalistic dropdown with keyboard support and search", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
@@ -204,4 +204,12 @@ import { h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client'; | ||
componentDidRender() { | ||
if (this.dropdown && this.appendTo === 'body') { | ||
document.body.appendChild(this.dropdown); | ||
if (this.dropdown) { | ||
if (this.appendTo === 'body') { | ||
document.body.appendChild(this.dropdown); | ||
} | ||
else if (this.appendTo !== 'current' && typeof this.appendTo === 'string') { | ||
const el = document.querySelector(this.appendTo); | ||
if (el instanceof HTMLElement) { | ||
el.appendChild(this.dropdown); | ||
} | ||
} | ||
} | ||
@@ -270,3 +278,3 @@ if (this.isVisible) { | ||
} | ||
return (h(Host, Object.assign({ key: '9b4840cef7955b7e7a5f34d3d2a456f1e363c538' }, props), h("label", { key: '23866fde0eca91234111f6d333cfa582aae73c3c' }, this.placeholder), h("div", { key: '0da332d891dcbc29433c9c9d23763fbaec606686', class: "rv-dr-root" }, this.autocomplete ? this.renderAutocomplete() : this.renderSelect(), h("span", { key: '4ac81967781a5c216dd9549fb9f1c15ac17d3be6', class: "actions" }, h(ArrowRenderer, { key: 'f2e83bfee9823eda08651fc130261beb99b58195' })), h("fieldset", { key: '1f48470d2aa79d6d09fa1d0493742752a62ce824' }, h("legend", { key: 'b93ce701b5b3f2b001807b626993f942bcf84df2' }, h("span", { key: '76c13d6ce0ef33794dacdcc9eec6d1a34eded858' }, this.placeholder)))), list)); | ||
return (h(Host, Object.assign({ key: 'c76b30c10b5d5727112a1912be87324b54af9c57' }, props), h("label", { key: 'a7bb046d9863866d356c2b61c5af5402d96dd260' }, this.placeholder), h("div", { key: '7c04280ed41bae735b82346e2f96ca0a980b3a58', class: "rv-dr-root" }, this.autocomplete ? this.renderAutocomplete() : this.renderSelect(), h("span", { key: '1ba2e9d1d18c3e9f3fece999d6fc7bbf8fb4947f', class: "actions" }, h(ArrowRenderer, { key: '2249cb5299f24011e47fe38ea36afe3effba3c94' })), h("fieldset", { key: '1ad14cb273cfd420aaf6c847b950e780f748c63c' }, h("legend", { key: 'cc3810362cb47b96c56487ee833de6bc90a594e8' }, h("span", { key: '4bfccee1d4e13fda7eadf428c250ae58f30f9d2e' }, this.placeholder)))), list)); | ||
} | ||
@@ -273,0 +281,0 @@ showAutoComplete() { |
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 too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2366265
49656