@everymatrix/general-multi-select 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/general-multi-select-c46368a0.js +208 -0
  3. package/dist/cjs/general-multi-select.cjs.entry.js +10 -0
  4. package/dist/cjs/general-multi-select.cjs.js +25 -0
  5. package/dist/cjs/index-5b495c2d.js +1262 -0
  6. package/dist/cjs/index.cjs.js +10 -0
  7. package/dist/cjs/loader.cjs.js +15 -0
  8. package/dist/collection/collection-manifest.json +12 -0
  9. package/dist/collection/components/general-multi-select/general-multi-select.css +144 -0
  10. package/dist/collection/components/general-multi-select/general-multi-select.js +319 -0
  11. package/dist/collection/components/general-multi-select/index.js +1 -0
  12. package/dist/collection/components/static/dropdown.svg +2 -0
  13. package/dist/collection/components/static/dropup.svg +1 -0
  14. package/dist/collection/index.js +1 -0
  15. package/dist/collection/utils/utils.js +3 -0
  16. package/dist/esm/app-globals-0f993ce5.js +3 -0
  17. package/dist/esm/general-multi-select-1ba05f04.js +206 -0
  18. package/dist/esm/general-multi-select.entry.js +2 -0
  19. package/dist/esm/general-multi-select.js +20 -0
  20. package/dist/esm/index-4b050939.js +1234 -0
  21. package/dist/esm/index.js +2 -0
  22. package/dist/esm/loader.js +11 -0
  23. package/dist/general-multi-select/app-globals-0f993ce5.js +1 -0
  24. package/dist/general-multi-select/general-multi-select-1ba05f04.js +1 -0
  25. package/dist/general-multi-select/general-multi-select.entry.js +1 -0
  26. package/dist/general-multi-select/general-multi-select.esm.js +1 -0
  27. package/dist/general-multi-select/index-4b050939.js +2 -0
  28. package/dist/general-multi-select/index.esm.js +1 -0
  29. package/dist/index.cjs.js +1 -0
  30. package/dist/index.js +1 -0
  31. package/dist/static/dropdown.svg +2 -0
  32. package/dist/static/dropup.svg +1 -0
  33. package/dist/stencil.config.dev.js +19 -0
  34. package/dist/stencil.config.js +19 -0
  35. package/dist/storybook/main.js +43 -0
  36. package/dist/storybook/preview.js +9 -0
  37. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-multi-select/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
  38. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-multi-select/.stencil/packages/stencil/general-multi-select/stencil.config.d.ts +2 -0
  39. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-multi-select/.stencil/packages/stencil/general-multi-select/stencil.config.dev.d.ts +2 -0
  40. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-multi-select/.stencil/packages/stencil/general-multi-select/storybook/main.d.ts +3 -0
  41. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-multi-select/.stencil/packages/stencil/general-multi-select/storybook/preview.d.ts +70 -0
  42. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-multi-select/.stencil/tools/plugins/index.d.ts +3 -0
  43. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-multi-select/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
  44. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-multi-select/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
  45. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-multi-select/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
  46. package/dist/types/components/general-multi-select/general-multi-select.d.ts +68 -0
  47. package/dist/types/components/general-multi-select/index.d.ts +1 -0
  48. package/dist/types/components.d.ts +105 -0
  49. package/dist/types/index.d.ts +1 -0
  50. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  51. package/dist/types/utils/utils.d.ts +1 -0
  52. package/loader/cdn.js +1 -0
  53. package/loader/index.cjs.js +1 -0
  54. package/loader/index.d.ts +24 -0
  55. package/loader/index.es2017.js +1 -0
  56. package/loader/index.js +2 -0
  57. package/loader/package.json +11 -0
  58. package/package.json +27 -0
@@ -0,0 +1,2 @@
1
+ export { G as GeneralMultiSelect } from './general-multi-select-1ba05f04.js';
2
+ import './index-4b050939.js';
@@ -0,0 +1,11 @@
1
+ import { b as bootstrapLazy } from './index-4b050939.js';
2
+ export { s as setNonce } from './index-4b050939.js';
3
+ import { g as globalScripts } from './app-globals-0f993ce5.js';
4
+
5
+ const defineCustomElements = async (win, options) => {
6
+ if (typeof window === 'undefined') return undefined;
7
+ await globalScripts();
8
+ return bootstrapLazy([["general-multi-select",[[1,"general-multi-select",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"options":[16],"maxVisibleChips":[2,"max-visible-chips"],"placeholder":[1],"selectedValues":[32],"dropdownOpen":[32],"overflowOpen":[32],"popoverStyle":[32],"clear":[64]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
9
+ };
10
+
11
+ export { defineCustomElements };
@@ -0,0 +1 @@
1
+ const o=()=>{};export{o as g}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,g as i,h as o}from"./index-4b050939.js";function s(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function r(t,e){const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function a(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}const n=class{constructor(o){t(this,o),this.change=e(this,"change",7),this.handleOutsideClick=t=>{t.composedPath().includes(this.el)||(this.dropdownOpen=!1,this.overflowOpen=!1)},this.toggleDropdown=t=>{t.stopPropagation(),this.dropdownOpen=!this.dropdownOpen,this.overflowOpen=!1},this.isSelected=t=>this.selectedValues.includes(t),this.selectItem=t=>{this.isSelected(t.value)||(this.selectedValues=[...this.selectedValues,t.value],this.change.emit(this.selectedValues))},this.toggleItem=t=>{this.isSelected(t.value)?this.removeItem(t.value):this.selectItem(t)},this.removeItem=(t,e)=>{e&&e.stopPropagation(),this.selectedValues=this.selectedValues.filter((e=>e!==t)),this.change.emit(this.selectedValues)},this.downIcon=i("../static/dropdown.svg"),this.upIcon=i("../static/dropup.svg"),this.isTouch="ontouchstart"in window,this.openOverflow=()=>{this.isTouch||(this.computePopoverPosition(),this.overflowOpen=!0)},this.closeOverflow=()=>{this.isTouch||(this.overflowOpen=!1)},this.toggleOverflow=t=>{t.stopPropagation(),this.computePopoverPosition(),this.overflowOpen=!this.overflowOpen},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.options=[],this.maxVisibleChips=2,this.placeholder="",this.selectedValues=[],this.dropdownOpen=!1,this.overflowOpen=!1,this.popoverStyle={top:"0px",left:"0px"}}handleClientStylingChange(t,e){t!=e&&s(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&r(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&a(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&s(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl))}async clear(){this.selectedValues=[],this.change.emit(this.selectedValues)}componentWillLoad(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}get selectedOptions(){return this.options.filter((t=>this.isSelected(t.value)))}get visibleChips(){return this.selectedOptions.slice(0,this.maxVisibleChips)}get hiddenChips(){return this.selectedOptions.slice(this.maxVisibleChips)}computePopoverPosition(){if(this.overflowChipEl&&this.el){const{left:t}=this.overflowChipEl.getBoundingClientRect(),{left:e,height:i}=this.el.getBoundingClientRect();this.popoverStyle={top:i-10+"px",left:t-e+"px"}}}render(){var t;return o("div",{key:"50b48397be3ede1907ab2c2abcd1cf2f43f69c13",class:"general-multi-select-container",ref:t=>this.stylingContainer=t},o("div",{key:"696a1bb1f221f8f5cf290fac040af10e2e5a115e",class:"multi-select-container",ref:t=>this.el=t},o("div",{key:"9ea92f01787b26d43054573a11896cf65065b073",class:"flex-row",onClick:this.toggleDropdown},o("div",{key:"f79720ca3ec383ee7f95b09483698ee18119c79a",class:"control"},this.visibleChips.map((t=>o("span",{class:"chip"},o("div",{class:"chip-text",title:t.text},t.text),o("div",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))),this.hiddenChips.length>0&&o("span",{key:"25e9e527c33dd7a315dacb10cc51084fe69b9b7e",class:"chip overflow-chip",ref:t=>this.overflowChipEl=t,onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow,onClick:this.toggleOverflow},"•••"),0===this.selectedValues.length&&o("span",{key:"b061de660a55f7a0d41ce9aa650108d3f38a9dc0",class:"placeholder"},this.placeholder)),o("div",{key:"f83b6517e88b3976cdc18590f8f1233cb2515230",class:"arrow"},o("img",{key:"1b61a49090237057b98e5ce8a4f7c1e3bfc9d4ba",class:"info-icon",src:this.dropdownOpen?this.upIcon:this.downIcon,style:{width:"18px"}}))),this.dropdownOpen&&o("div",{key:"e5b081007bcbdd251ce5ac235c1f19f17852c420",class:"dropdown"},this.options.map((t=>o("div",{class:{"dropdown-item":!0,selected:this.isSelected(t.value)},onClick:()=>this.toggleItem(t)},t.text)))),this.overflowOpen&&!!(null===(t=this.hiddenChips)||void 0===t?void 0:t.length)&&o("div",{key:"f8e3289042c69c569bebcd0a40d90f31261c6c12",class:"overflow-popover",style:{top:this.popoverStyle.top,left:this.popoverStyle.left},onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow},this.hiddenChips.map((t=>o("span",{class:"chip"},o("span",{class:"chip-text",title:t.text},t.text),o("span",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))))))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};n.style='.multi-select-container{position:relative;font-family:"Inter", sans-serif;margin-top:4px;width:100%}.flex-row{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;padding:8px 12px;padding-right:4px;border-radius:4px;background:var(--emw-selector-color-background, #e8ebef);cursor:pointer}.control{flex:1;display:flex;align-items:center;flex-wrap:nowrap;overflow:hidden}.control:focus-within{border-color:var(--emw--color-primary, #fed275);box-shadow:0 0 0 2px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.chip{display:inline-flex;align-items:center;background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-typography, #555);border-radius:4px;padding:2px 8px;margin-right:6px;font-size:0.875rem;line-height:1.2;justify-content:space-between;flex:0 1 auto;min-width:0}.chip-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overflow-chip{background:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-300, #333);width:20px;text-align:center;display:block}.remove-btn{background:none;border:none;font-size:1rem;margin-left:6px;cursor:pointer;color:var(--emw--color-gray-150, #6f6f6f)}.remove-btn:hover{color:var(--emw--color-error, red)}.placeholder{color:var(--emw--color-gray-150, #6f6f6f);font-size:0.875rem;padding:3px 8px;line-height:1.2}.arrow{margin-left:auto;font-size:0.8rem;width:20px;color:var(--emw--color-gray-150, #6f6f6f)}.dropdown{position:absolute;top:calc(100% + 4px);left:0;width:100%;max-height:240px;overflow-y:auto;border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;background:var(--emw--color-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:10}.dropdown-item{padding:10px 14px;cursor:pointer;font-size:0.875rem;line-height:1.4;transition:background 0.2s}.dropdown-item:hover{background:var(--emw--color-gray-100, #f4f5f7)}.dropdown-item.selected{background:var(--emw--color-primary-variant, #bae7ff);color:var(--emw--color-primary, #0050b3);font-weight:500}.overflow-popover{position:absolute;top:var(--overflow-top, 0px);left:var(--overflow-left, 0px);max-width:200px;padding:12px;display:flex;flex-wrap:wrap;gap:6px;border:1px solid var(--emw--color-gray-100, #d0d5dd);border-radius:6px;background:var(--emw--color-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:20}';export{n as G}
@@ -0,0 +1 @@
1
+ export{G as general_multi_select}from"./general-multi-select-1ba05f04.js";import"./index-4b050939.js";
@@ -0,0 +1 @@
1
+ import{p as e,b as l}from"./index-4b050939.js";export{s as setNonce}from"./index-4b050939.js";import{g as n}from"./app-globals-0f993ce5.js";(()=>{const l=import.meta.url,n={};return""!==l&&(n.resourcesUrl=new URL(".",l).href),e(n)})().then((async e=>(await n(),l([["general-multi-select",[[1,"general-multi-select",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],options:[16],maxVisibleChips:[2,"max-visible-chips"],placeholder:[1],selectedValues:[32],dropdownOpen:[32],overflowOpen:[32],popoverStyle:[32],clear:[64]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}]]]],e))));
@@ -0,0 +1,2 @@
1
+ var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),m=!1,p=[],y=[],v=(e,t)=>n=>{e.push(n),m||(m=!0,t&&4&f.l?w(b):f.raf(b))},$=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{$(p),$(y),(m=p.length>0)&&f.raf(b)},w=e=>h().then(e),g=v(y,!0),S=e=>{const t=new URL(e,f.o);return t.origin!==u.location.origin?t.href:t.pathname},j={},k=e=>"object"==(e=typeof e)||"function"===e;function O(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>C,map:()=>M,ok:()=>E,unwrap:()=>L,unwrapErr:()=>R});var E=e=>({isOk:!0,isErr:!1,value:e}),C=e=>({isOk:!1,isErr:!0,value:e});function M(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>E(e))):E(n)}if(e.isErr)return C(e.value);throw"should never get here"}var P,x,L=e=>{if(e.isOk)return e.value;throw e.value},R=e=>{if(e.isErr)return e.value;throw e.value},T=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!k(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?U(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=U(e,null);return u.u=t,i.length>0&&(u.h=i),u.m=o,u},U=(e,t)=>({l:0,p:e,i:t,v:null,h:null,u:null,m:null}),A={},F=(e,t,l)=>{const o=(e=>n(e).$hostElement$)(e);return{emit:e=>N(o,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},N=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},W=new WeakMap,D=e=>"sc-"+e.$,H=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=G(n),s=G(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=k(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(V);t=t.replace(_,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},q=/\s/,G=e=>e?e.split(q):[],V="Capture",_=RegExp(V+"$"),z=(e,t,n)=>{const l=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.u||j,s=t.u||j;for(const e of B(Object.keys(o)))e in s||H(l,e,o[e],void 0,n,t.l);for(const e of B(Object.keys(s)))H(l,e,o[e],s[e],n,t.l)};function B(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var I=!1,J=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.v=a.createTextNode(l.i);else if(o=l.v=a.createElement(l.p),z(null,l,I),null!=P&&o["s-si"]!==P&&o.classList.add(o["s-si"]=P),l.h)for(r=0;r<l.h.length;++r)s=J(e,l,r),s&&o.appendChild(s);return o["s-hn"]=x,o},K=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=J(null,n,o),r&&(l[o].v=r,ee(i,r,t)))},Q=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.v;Z(t),e&&e.remove()}}},X=(e,t,n=!1)=>e.p===t.p&&(!!n||e.m===t.m),Y=(e,t,n=!1)=>{const l=t.v=e.v,o=e.h,s=t.h,r=t.i;null===r?(z(e,t,I),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],m=l.length-1,p=l[0],y=l[m];for(;i<=f&&c<=m;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==p)p=l[++c];else if(null==y)y=l[--m];else if(X(h,p,o))Y(h,p,o),h=t[++i],p=l[++c];else if(X(d,y,o))Y(d,y,o),d=t[--f],y=l[--m];else if(X(h,y,o))Y(h,y,o),ee(e,h.v,d.v.nextSibling),h=t[++i],y=l[--m];else if(X(d,p,o))Y(d,p,o),ee(e,d.v,h.v),d=t[--f],p=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].m&&t[a].m===p.m){u=a;break}u>=0?(r=t[u],r.p!==p.p?s=J(t&&t[c],n,u):(Y(r,p,o),t[u]=void 0,s=r.v),p=l[++c]):(s=J(t&&t[c],n,c),p=l[++c]),s&&ee(h.v.parentNode,s,h.v)}i>f?K(e,null==l[m+1]?null:l[m+1].v,n,l,c,m):c>m&&Q(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),K(l,null,t,s,0,s.length-1)):null!==o&&Q(o,0,o.length-1)):e.i!==r&&(l.data=r)},Z=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Z)},ee=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),te=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},ne=(e,t)=>{if(e.l|=16,!(4&e.l))return te(e,e.j),g((()=>le(e,t)));e.l|=512},le=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return t&&(l=ae(n,"componentWillLoad")),oe(l,(()=>re(e,n,t)))},oe=(e,t)=>se(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),se=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,re=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.k,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=D(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=W.get(e=e.head||e);if(r||W.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const t=null!=(n=f.O)?n:O(a);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);ie(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>ce(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},ie=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.k,s=e.C||U(null,null),r=(e=>e&&e.p===A)(t)?t:T(null,null,t);if(x=l.tagName,o.M&&(r.u=r.u||{},o.M.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.p=null,r.l|=4,e.C=r,r.v=s.v=l.shadowRoot||l,P=l["s-sc"],Y(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},ce=e=>{const t=e.$hostElement$,n=e.t,l=e.j;64&e.l||(e.l|=64,fe(t),ae(n,"componentDidLoad"),e.P(t),l||ue()),e.L(t),e.S&&(e.S(),e.S=void 0),512&e.l&&w((()=>ne(e,!1))),e.l&=-517},ue=()=>{fe(a.documentElement),w((()=>N(u,"appload",{detail:{namespace:"general-multi-select"}})))},ae=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},fe=e=>e.classList.add("hydrated"),he=(e,t,l)=>{var o,r;const i=e.prototype;if(t.R||t.T||e.watchers){e.watchers&&!t.T&&(t.T=e.watchers);const c=Object.entries(null!=(o=t.R)?o:{});if(c.map((([e,[o]])=>{31&o||2&l&&32&o?Object.defineProperty(i,e,{get(){return((e,t)=>n(this).U.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.U.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||k(e)?e:2&t?parseFloat(e):1&t?e+"":e)(l,o.R[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.U.set(t,l),a)){if(o.T&&128&u){const e=o.T[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&ne(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0}):1&l&&64&o&&Object.defineProperty(i,e,{value(...t){var l;const o=n(this);return null==(l=null==o?void 0:o.A)?void 0:l.then((()=>{var n;return null==(n=o.t)?void 0:n[e](...t)}))}})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.T)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.T)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.M)||o.push([e,s])),s}))]))}}return e},de=e=>{ae(e,"disconnectedCallback")},me=(e,l={})=>{var o;const h=[],m=l.exclude||[],p=u.customElements,y=a.head,v=y.querySelector("meta[charset]"),$=a.createElement("style"),b=[];let w,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],$:l[1],R:l[2],F:l[3]};4&c.l&&(S=!0),c.R=l[2],c.M=[],c.T=null!=(o=l[4])?o:{};const u=c.$,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,k:n,U:new Map};l.A=new Promise((e=>l.L=e)),l.N=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),g?b.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.k,o=()=>{};if(1&t.l)(null==t?void 0:t.t)||(null==t?void 0:t.N)&&t.N.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){te(t,t.j=n);break}}l.R&&Object.entries(l.R).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.W){const e=(e=>{const t=e.$.replace(/-/g,"_"),n=e.W;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.$}#${t.D}" was not found`);l.isProxied||(n.T=l.watchers,he(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=D(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>ne(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);(null==e?void 0:e.t)?de(e.t):(null==e?void 0:e.N)&&e.N.then((()=>de(e.t)))}})()))}componentOnReady(){return n(this).N}};c.W=e[0],m.includes(u)||p.get(u)||(h.push(u),p.define(u,he(a,c,1)))}))})),h.length>0&&(S&&($.textContent+=c),$.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const e=null!=(o=f.O)?o:O(a);null!=e&&$.setAttribute("nonce",e),y.insertBefore($,v?v.nextSibling:y.firstChild)}g=!1,b.length?b.map((e=>e.connectedCallback())):f.jmp((()=>w=setTimeout(ue,30)))},pe=e=>f.O=e;export{me as b,F as c,S as g,T as h,h as p,l as r,pe as s}
@@ -0,0 +1 @@
1
+ export{G as GeneralMultiSelect}from"./general-multi-select-1ba05f04.js";import"./index-4b050939.js";
@@ -0,0 +1 @@
1
+ module.exports = require('./cjs/index.cjs.js');
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './esm/index.js';
@@ -0,0 +1,2 @@
1
+ <!-- License: GPL. Made by Automattic: https://github.com/Automattic/gridicons -->
2
+ <svg width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="0" fill="none" width="24" height="24"/><g><path d="M7 10l5 5 5-5"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="#000000" width="24" height="24" viewBox="0 0 24 24"><path d="M7 14l5-5 5 5z"/></svg>
@@ -0,0 +1,19 @@
1
+ import { sass } from "@stencil/sass";
2
+ export const config = {
3
+ namespace: 'general-multi-select',
4
+ taskQueue: 'async',
5
+ sourceMap: false,
6
+ minifyJs: true,
7
+ extras: {
8
+ experimentalImportInjection: true
9
+ },
10
+ plugins: [sass()],
11
+ outputTargets: [
12
+ {
13
+ type: 'www'
14
+ },
15
+ {
16
+ type: 'docs-readme'
17
+ }
18
+ ]
19
+ };
@@ -0,0 +1,19 @@
1
+ import { cleanPackageJsonStencil } from "../../../tools/plugins";
2
+ import { sass } from "@stencil/sass";
3
+ export const config = {
4
+ namespace: 'general-multi-select',
5
+ taskQueue: 'async',
6
+ sourceMap: false,
7
+ minifyJs: true,
8
+ hashFileNames: false,
9
+ extras: {
10
+ experimentalImportInjection: true
11
+ },
12
+ plugins: [cleanPackageJsonStencil(), sass()],
13
+ outputTargets: [
14
+ {
15
+ type: 'dist',
16
+ esmLoaderPath: '../loader'
17
+ }
18
+ ]
19
+ };
@@ -0,0 +1,43 @@
1
+ import path from "path";
2
+ import { getStoryFiles, detectUsedPackages, parseTsConfig, exec, filterParsedPathsByUsedPackages } from "../../../../libs/common/src/storybook/storybook-utils";
3
+ const config = {
4
+ stories: ['../**/*.@(mdx|stories.@(js|ts|tsx))'],
5
+ addons: ['@storybook/addon-essentials', '@storybook/addon-interactions', 'storybook-dark-mode'],
6
+ docs: {
7
+ defaultName: 'Documentation',
8
+ autodocs: 'tag'
9
+ },
10
+ framework: {
11
+ name: '@storybook/web-components-vite',
12
+ options: {}
13
+ },
14
+ // Async viteFinal to build dependent packages before finalizing configuration.
15
+ viteFinal: async (config) => {
16
+ const storyFiles = getStoryFiles(path.resolve(__dirname, '../'));
17
+ const usedPackages = detectUsedPackages(storyFiles);
18
+ const buildPromises = usedPackages.map(async (pkg) => {
19
+ try {
20
+ console.log(`Building package ${pkg}...`);
21
+ const { stdout, stderr } = await exec(`nx run ${pkg}:build`);
22
+ console.log(`Built package ${pkg}: ${stdout}`);
23
+ if (stderr) {
24
+ console.error(`Build warning/error for package ${pkg}: ${stderr}`);
25
+ }
26
+ }
27
+ catch (error) {
28
+ console.error(`Error building package ${pkg}:`, error);
29
+ }
30
+ });
31
+ await Promise.all(buildPromises);
32
+ const parsedPaths = parseTsConfig() || {};
33
+ const filteredParsedPaths = filterParsedPathsByUsedPackages(parsedPaths, usedPackages);
34
+ return Object.assign(Object.assign({}, config), { resolve: {
35
+ alias: Object.assign({}, filteredParsedPaths)
36
+ }, define: {
37
+ process: {
38
+ env: {}
39
+ }
40
+ } });
41
+ }
42
+ };
43
+ export default config;
@@ -0,0 +1,9 @@
1
+ import { themes } from "@storybook/theming";
2
+ export const parameters = {
3
+ darkMode: {
4
+ dark: Object.assign(Object.assign({}, themes.dark), { appBg: 'black' }),
5
+ light: Object.assign(Object.assign({}, themes.normal), { appBg: 'green' }),
6
+ current: 'light',
7
+ stylePreview: true
8
+ }
9
+ };
@@ -0,0 +1,39 @@
1
+ /// <reference types="node" />
2
+ import { exec as execCallback } from 'child_process';
3
+ export declare const exec: typeof execCallback.__promisify__;
4
+ /**
5
+ * Recursively retrieves all story files (.stories.ts/.stories.tsx) in a directory.
6
+ * @param dir The directory to search.
7
+ * @returns Array of story file paths.
8
+ */
9
+ export declare const getStoryFiles: (dir: string) => string[];
10
+ /**
11
+ * Detects which internal packages are used in the provided story files.
12
+ * It looks at every import that starts with the given package alias prefix,
13
+ * then extracts the package name (the segment immediately following the prefix).
14
+ *
15
+ * @param stories Array of story file paths.
16
+ * @returns Array of unique package names (e.g. ['foo', 'bar']).
17
+ */
18
+ export declare const detectUsedPackages: (stories: string[]) => string[];
19
+ /**
20
+ * Extracts all import paths from a file using the TypeScript compiler API.
21
+ * @param filePath The file path to parse.
22
+ * @returns Array of import strings.
23
+ */
24
+ export declare const extractImports: (filePath: string) => string[];
25
+ /**
26
+ * Parses the tsconfig paths and resolves them to absolute paths.
27
+ * @param tsconfigPath The path to the tsconfig file.
28
+ * @returns An object mapping alias keys to absolute paths.
29
+ */
30
+ export declare const parseTsConfig: () => Record<string, string> | null;
31
+ /**
32
+ * Filters the parsed tsconfig alias mapping to only include keys that correspond
33
+ * to the used packages.
34
+ *
35
+ * @param parsedPaths The full alias mapping from tsconfig.
36
+ * @param usedPackages Array of package names that are used (e.g. ['foo', 'bar']).
37
+ * @returns Filtered alias mapping.
38
+ */
39
+ export declare const filterParsedPathsByUsedPackages: (parsedPaths: Record<string, string>, usedPackages: string[]) => Record<string, string>;
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -0,0 +1,3 @@
1
+ import type { StorybookConfig } from '@storybook/web-components-vite';
2
+ declare const config: StorybookConfig;
3
+ export default config;
@@ -0,0 +1,70 @@
1
+ export declare const parameters: {
2
+ darkMode: {
3
+ dark: {
4
+ appBg: string;
5
+ base: "light" | "dark";
6
+ colorPrimary: string;
7
+ colorSecondary: string;
8
+ appContentBg: string;
9
+ appPreviewBg: string;
10
+ appBorderColor: string;
11
+ appBorderRadius: number;
12
+ fontBase: string;
13
+ fontCode: string;
14
+ textColor: string;
15
+ textInverseColor: string;
16
+ textMutedColor: string;
17
+ barTextColor: string;
18
+ barHoverColor: string;
19
+ barSelectedColor: string;
20
+ barBg: string;
21
+ buttonBg: string;
22
+ buttonBorder: string;
23
+ booleanBg: string;
24
+ booleanSelectedBg: string;
25
+ inputBg: string;
26
+ inputBorder: string;
27
+ inputTextColor: string;
28
+ inputBorderRadius: number;
29
+ brandTitle?: string;
30
+ brandUrl?: string;
31
+ brandImage?: string;
32
+ brandTarget?: string;
33
+ gridCellSize?: number;
34
+ };
35
+ light: {
36
+ appBg: string;
37
+ base: "light" | "dark";
38
+ colorPrimary: string;
39
+ colorSecondary: string;
40
+ appContentBg: string;
41
+ appPreviewBg: string;
42
+ appBorderColor: string;
43
+ appBorderRadius: number;
44
+ fontBase: string;
45
+ fontCode: string;
46
+ textColor: string;
47
+ textInverseColor: string;
48
+ textMutedColor: string;
49
+ barTextColor: string;
50
+ barHoverColor: string;
51
+ barSelectedColor: string;
52
+ barBg: string;
53
+ buttonBg: string;
54
+ buttonBorder: string;
55
+ booleanBg: string;
56
+ booleanSelectedBg: string;
57
+ inputBg: string;
58
+ inputBorder: string;
59
+ inputTextColor: string;
60
+ inputBorderRadius: number;
61
+ brandTitle?: string;
62
+ brandUrl?: string;
63
+ brandImage?: string;
64
+ brandTarget?: string;
65
+ gridCellSize?: number;
66
+ };
67
+ current: string;
68
+ stylePreview: boolean;
69
+ };
70
+ };
@@ -0,0 +1,3 @@
1
+ export * from "./vite-chunk-plugin";
2
+ export * from "./stencil-clean-deps-plugin";
3
+ export * from "./vite-clean-deps-plugin";
@@ -0,0 +1,5 @@
1
+ export declare function cleanPackageJsonStencil(): {
2
+ name: string;
3
+ apply: string;
4
+ buildEnd(): void;
5
+ };
@@ -0,0 +1,6 @@
1
+ export declare function viteChunkPlugin(): {
2
+ name: string;
3
+ config(config: any, { command }: {
4
+ command: any;
5
+ }): void;
6
+ };
@@ -0,0 +1,4 @@
1
+ export declare function cleanPackageJsonVite(widgetName: any): {
2
+ name: string;
3
+ closeBundle(): void;
4
+ };
@@ -0,0 +1,68 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ export declare class GeneralMultiSelect {
3
+ /**
4
+ * Client custom styling via message bus
5
+ */
6
+ mbSource: string;
7
+ /**
8
+ * Client custom styling via string
9
+ */
10
+ clientStyling: string;
11
+ /**
12
+ * Client custom styling via css file url
13
+ */
14
+ clientStylingUrl: string;
15
+ /** The list of available items. Each item has `text` and `value`. */
16
+ options: Array<{
17
+ text: string;
18
+ value: any;
19
+ }>;
20
+ /** How many chips to show before hiding extras */
21
+ maxVisibleChips: number;
22
+ /** Placeholder text when nothing is selected, need to be translated when you use this property */
23
+ placeholder: string;
24
+ /** Selected item values */
25
+ selectedValues: any[];
26
+ /** Is main dropdown open? */
27
+ dropdownOpen: boolean;
28
+ /** Is overflow popover open? */
29
+ overflowOpen: boolean;
30
+ /** Emits when selection changes */
31
+ change: EventEmitter<any[]>;
32
+ /** Inline style for positioning the overflow popover */
33
+ popoverStyle: {
34
+ top: string;
35
+ left: string;
36
+ };
37
+ private overflowChipEl?;
38
+ private stylingContainer;
39
+ private stylingSubscription;
40
+ private el;
41
+ handleClientStylingChange(newValue: any, oldValue: any): void;
42
+ handleClientStylingUrlChange(newValue: any, oldValue: any): void;
43
+ handleMbSourceChange(newValue: any, oldValue: any): void;
44
+ componentDidLoad(): void;
45
+ clear(): Promise<void>;
46
+ componentWillLoad(): void;
47
+ disconnectedCallback(): void;
48
+ private handleOutsideClick;
49
+ private toggleDropdown;
50
+ private isSelected;
51
+ private selectItem;
52
+ private toggleItem;
53
+ private removeItem;
54
+ private get selectedOptions();
55
+ private get visibleChips();
56
+ private get hiddenChips();
57
+ downIcon: string;
58
+ upIcon: string;
59
+ /** Touch-capable device? */
60
+ private isTouch;
61
+ /** Open overflow popover */
62
+ private openOverflow;
63
+ /** Close overflow popover */
64
+ private closeOverflow;
65
+ private computePopoverPosition;
66
+ private toggleOverflow;
67
+ render(): any;
68
+ }
@@ -0,0 +1 @@
1
+ export { GeneralMultiSelect } from './general-multi-select';
@@ -0,0 +1,105 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ /**
4
+ * This is an autogenerated file created by the Stencil compiler.
5
+ * It contains typing information for all components that exist in this project.
6
+ */
7
+ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ export namespace Components {
9
+ interface GeneralMultiSelect {
10
+ "clear": () => Promise<void>;
11
+ /**
12
+ * Client custom styling via string
13
+ */
14
+ "clientStyling": string;
15
+ /**
16
+ * Client custom styling via css file url
17
+ */
18
+ "clientStylingUrl": string;
19
+ /**
20
+ * How many chips to show before hiding extras
21
+ */
22
+ "maxVisibleChips": number;
23
+ /**
24
+ * Client custom styling via message bus
25
+ */
26
+ "mbSource": string;
27
+ /**
28
+ * The list of available items. Each item has `text` and `value`.
29
+ */
30
+ "options": Array<{ text: string; value: any }>;
31
+ /**
32
+ * Placeholder text when nothing is selected, need to be translated when you use this property
33
+ */
34
+ "placeholder": string;
35
+ }
36
+ }
37
+ export interface GeneralMultiSelectCustomEvent<T> extends CustomEvent<T> {
38
+ detail: T;
39
+ target: HTMLGeneralMultiSelectElement;
40
+ }
41
+ declare global {
42
+ interface HTMLGeneralMultiSelectElementEventMap {
43
+ "change": any[];
44
+ }
45
+ interface HTMLGeneralMultiSelectElement extends Components.GeneralMultiSelect, HTMLStencilElement {
46
+ addEventListener<K extends keyof HTMLGeneralMultiSelectElementEventMap>(type: K, listener: (this: HTMLGeneralMultiSelectElement, ev: GeneralMultiSelectCustomEvent<HTMLGeneralMultiSelectElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
47
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
48
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
49
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
50
+ removeEventListener<K extends keyof HTMLGeneralMultiSelectElementEventMap>(type: K, listener: (this: HTMLGeneralMultiSelectElement, ev: GeneralMultiSelectCustomEvent<HTMLGeneralMultiSelectElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
51
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
52
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
53
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
54
+ }
55
+ var HTMLGeneralMultiSelectElement: {
56
+ prototype: HTMLGeneralMultiSelectElement;
57
+ new (): HTMLGeneralMultiSelectElement;
58
+ };
59
+ interface HTMLElementTagNameMap {
60
+ "general-multi-select": HTMLGeneralMultiSelectElement;
61
+ }
62
+ }
63
+ declare namespace LocalJSX {
64
+ interface GeneralMultiSelect {
65
+ /**
66
+ * Client custom styling via string
67
+ */
68
+ "clientStyling"?: string;
69
+ /**
70
+ * Client custom styling via css file url
71
+ */
72
+ "clientStylingUrl"?: string;
73
+ /**
74
+ * How many chips to show before hiding extras
75
+ */
76
+ "maxVisibleChips"?: number;
77
+ /**
78
+ * Client custom styling via message bus
79
+ */
80
+ "mbSource"?: string;
81
+ /**
82
+ * Emits when selection changes
83
+ */
84
+ "onChange"?: (event: GeneralMultiSelectCustomEvent<any[]>) => void;
85
+ /**
86
+ * The list of available items. Each item has `text` and `value`.
87
+ */
88
+ "options"?: Array<{ text: string; value: any }>;
89
+ /**
90
+ * Placeholder text when nothing is selected, need to be translated when you use this property
91
+ */
92
+ "placeholder"?: string;
93
+ }
94
+ interface IntrinsicElements {
95
+ "general-multi-select": GeneralMultiSelect;
96
+ }
97
+ }
98
+ export { LocalJSX as JSX };
99
+ declare module "@stencil/core" {
100
+ export namespace JSX {
101
+ interface IntrinsicElements {
102
+ "general-multi-select": LocalJSX.GeneralMultiSelect & JSXBase.HTMLAttributes<HTMLGeneralMultiSelectElement>;
103
+ }
104
+ }
105
+ }
@@ -0,0 +1 @@
1
+ export * from './components/general-multi-select';