diff --git a/bundle.css b/bundle.css
index 692c08b..35952de 100644
--- a/bundle.css
+++ b/bundle.css
@@ -1,4 +1,4 @@
@import url(https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0);
-list-box ul{display:grid;position:absolute;margin:0;box-shadow:var(--box-shadow);background-color:var(--theme-element-background);grid-template-columns:1fr;max-height:10rem;padding:0;border-radius:.375rem;color:var(--theme-text-primary-on-light);z-index:9;overflow-y:auto;max-width:100%}list-box li{display:flex;align-items:center;padding:0 .75rem;min-height:2rem;color:var(--theme-text-primary-on-light);cursor:pointer;background-color:var(--theme-element-background)}list-box li[hidden]{display:none}list-box li:hover,.list-box__item--active{background-color:var(--list-background-on-hover-color)}list-box li mark{font-weight:600;background-color:unset}text-input{--text-input__small-font-size: .75rem;--text-input__error-line-height: 1rem;--text-input__label__left-padding: .25rem;position:relative;padding-top:1.25rem;font-size:1rem;display:block;overflow-x:clip}.text-input__input{width:100%;box-sizing:border-box;border:none;border-bottom:1px solid #ddd;outline:none;padding:.1rem 0 .1em var(--text-input__label__left-padding);font-size:1rem;color:var(--theme-text-primary-on-light)}.text-input__input[disabled]{opacity:.5;cursor:default;background:#fff}.text-input__input:focus{border-bottom:1px solid var(--theme-primary)}.text-input__input::placeholder{color:rgba(0,0,0,0);user-select:none;-webkit-user-select:none}text-input.placeholder-shown .text-input__input::placeholder{color:var(--theme-text-hint-on-light)}.text-input__label{position:absolute;color:var(--theme-text-hint-on-light);bottom:2.25rem;left:0;margin:0;pointer-events:none;transform-origin:0 0;transform:translate3d(var(--text-input__label__left-padding), 1rem, 0);transition:.1s ease-in-out}.text-input__input:not(:focus):not(:placeholder-shown)+.text-input__label{color:var(--theme-text-hint-on-light)}.text-input__input:focus+.text-input__label{transform:translate(var(--text-input__label__left-padding), -0.375rem);font-size:var(--text-input__small-font-size);color:var(--theme-primary)}.text-input__input:not(:placeholder-shown)+.text-input__label{transform:translate(var(--text-input__label__left-padding), -0.375rem);font-size:var(--text-input__small-font-size)}text-input.placeholder-shown .text-input__label{transform:translate(var(--text-input__label__left-padding), -0.375rem);font-size:var(--text-input__small-font-size)}.text-input__input:invalid+.text-input__label{color:var(--theme-input-border-error)}.text-input__input:invalid{border-bottom:1px solid var(--theme-input-border-error)}.text-input__input:invalid:not(:focus):not(:placeholder-shown)+.text-input__label{color:var(--theme-input-border-error)}.text-input__error{margin:0;font-size:var(--text-input__small-font-size);height:var(--text-input__error-line-height);color:var(--theme-input-border-error);padding-left:var(--text-input__label__left-padding);text-align:start}.text-input--with-right-icon .text-input__input,.text-input--select .text-input__input{padding-right:1rem}.text-input__trailing-icon{position:absolute;right:0;bottom:1rem;font-size:1rem;cursor:pointer;color:var(--theme-text-secondary-on-light)}text-input[disabled] .text-input__trailing-icon{display:none !important}text-input[disabled] .text-input__input{padding-right:0 !important}.text-input__input[type=number]::-webkit-outer-spin-button,.text-input__input[type=number]::-webkit-inner-spin-button,.text-input__input[type=number]{-webkit-appearance:none;margin:0;-moz-appearance:textfield !important}.text-input__trailing-icon:hover{color:var(--theme-text-primary-on-light)}.text-input__input:placeholder-shown+label+.text-input__trailing-icon{display:none}.text-input__input:not(:placeholder-shown)+label+.text-input__trailing-icon{display:block}.text-input__input[readonly]{cursor:pointer}.material-symbols-outlined{font-variation-settings:"FILL" 0,"wght" 400,"GRAD" 0,"opsz" 48}select-input{height:4rem;width:100%;display:inline-block}select-input list-box{display:none;margin-top:-0.875rem;position:relative}select-input text-input{cursor:pointer}select-input text-input .text-input__trailing-icon{pointer-events:none}typeahead-input{display:inline-block;width:100%;height:4rem}typeahead-input list-box{display:none;margin-top:-0.825rem;position:relative}typeahead-input.dropdown-select text-input .text-input__input{pointer-events:none}edit-text{display:inline-block;max-width:100%}.edit-text__popup{max-width:100%;min-width:8rem;width:auto;box-shadow:var(--box-shadow);position:absolute;border:none;margin:-0.7rem 0 0 -0.75rem;padding:0}.edit-text__popup text-input{width:calc(100% - 1rem);padding-top:0;margin:.5rem .5rem 1rem}.edit-text__popup .text-input__error{height:unset}.edit-text__popup::backdrop{background:rgba(0,0,0,0)}.edit-text__popup .text-input--with-right-icon .text-input__input{padding-right:0}edit-text .edit-text__text{text-decoration:underline;cursor:pointer;font-weight:normal}edit-text[disabled] .edit-text__text{text-decoration:none;cursor:default;pointer-events:none}edit-text[incorrect] .edit-text__text{color:var(--theme-input-border-error)}.edit-text__text[empty-value]{font-style:italic}.snackbar-container{--snackbar-background-color: rgb(51, 51, 51);--snackbar-background-color-hover: rgb(84, 84, 84);--snackbar-text-label-color: rgba(255, 255, 255, 0.87);--snackbar-text-action-color: rgb(187, 134, 252);--snackbar-text-action-disabled-color: rgb(140, 140, 140);z-index:8;margin:.5rem;position:fixed;right:0;bottom:0;left:0;display:flex;align-items:start;justify-content:center;box-sizing:border-box;flex-direction:column;pointer-events:none}.snackbar{pointer-events:all;margin:.5rem;background-color:var(--snackbar-background-color);min-width:344px;box-shadow:var(--box-shadow);max-width:672px;border-radius:4px;display:flex;align-items:center;justify-content:flex-start}@media(max-width: 480px),(max-width: 344px){.snackbar__surface{min-width:100%}}.snackbar__label{color:var(--snackbar-text-label-color)}.snackbar__label{font-size:.875rem;line-height:1.25rem;font-weight:400;letter-spacing:.012rem;flex-grow:1;box-sizing:border-box;margin:0;padding:1rem}.snackbar__buttons{margin-left:.5rem;margin-right:.5rem;display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.snackbar__button-ok{background:var(--snackbar-background-color);color:var(--snackbar-text-action-color);border:none;cursor:pointer;padding:.5rem 1rem;border-radius:.25rem;margin-right:.5rem}.snackbar__button-ok:disabled,.snackbar__button-close:disabled{border:none;color:var(--snackbar-text-action-disabled-color);pointer-events:none}.snackbar__button-ok:hover,.snackbar__button-close:hover{background:var(--snackbar-background-color-hover)}.snackbar__button-close{background:var(--snackbar-background-color);color:var(--snackbar-text-label-color);border:none;cursor:pointer;font-size:1rem;width:1.5rem;height:1.5rem;border-radius:50%;padding:0}.visually-hidden{display:none !important}
+list-box ul{display:grid;position:absolute;margin:0;box-shadow:var(--box-shadow);background-color:var(--theme-element-background);grid-template-columns:1fr;max-height:10rem;padding:0;border-radius:.375rem;color:var(--theme-text-primary-on-light);z-index:9;overflow-y:auto;max-width:100%}list-box li{display:flex;align-items:center;padding:0 .75rem;min-height:2rem;color:var(--theme-text-primary-on-light);cursor:pointer;background-color:var(--theme-element-background)}list-box li[hidden]{display:none}list-box li:hover,.list-box__item--active{background-color:var(--list-background-on-hover-color)}list-box li mark{font-weight:600;background-color:unset}text-input{--text-input__small-font-size: .75rem;--text-input__error-line-height: 1rem;--text-input__label__left-padding: .25rem;position:relative;padding-top:1.25rem;font-size:1rem;display:block;overflow-x:clip}.text-input__input{width:100%;box-sizing:border-box;border:none;border-bottom:1px solid #ddd;outline:none;padding:.1rem 0 .1em var(--text-input__label__left-padding);font-size:1rem;color:var(--theme-text-primary-on-light)}.text-input__input[disabled]{opacity:.5;cursor:default;background:#fff}.text-input__input:focus{border-bottom:1px solid var(--theme-primary)}.text-input__input::placeholder{color:rgba(0,0,0,0);user-select:none;-webkit-user-select:none}text-input.placeholder-shown .text-input__input::placeholder{color:var(--theme-text-hint-on-light)}.text-input__label{position:absolute;color:var(--theme-text-hint-on-light);bottom:2.25rem;left:0;margin:0;pointer-events:none;transform-origin:0 0;transform:translate3d(var(--text-input__label__left-padding), 1rem, 0);transition:.1s ease-in-out}.text-input__input:not(:focus):not(:placeholder-shown)+.text-input__label{color:var(--theme-text-hint-on-light)}.text-input__input:focus+.text-input__label{transform:translate(var(--text-input__label__left-padding), -0.375rem);font-size:var(--text-input__small-font-size);color:var(--theme-primary)}.text-input__input:not(:placeholder-shown)+.text-input__label{transform:translate(var(--text-input__label__left-padding), -0.375rem);font-size:var(--text-input__small-font-size)}text-input.placeholder-shown .text-input__label{transform:translate(var(--text-input__label__left-padding), -0.375rem);font-size:var(--text-input__small-font-size)}.text-input__input:invalid+.text-input__label{color:var(--theme-input-border-error)}.text-input__input:invalid{border-bottom:1px solid var(--theme-input-border-error)}.text-input__input:invalid:not(:focus):not(:placeholder-shown)+.text-input__label{color:var(--theme-input-border-error)}.text-input__error{margin:0;font-size:var(--text-input__small-font-size);height:var(--text-input__error-line-height);color:var(--theme-input-border-error);padding-left:var(--text-input__label__left-padding);text-align:start}.text-input--with-right-icon .text-input__input,.text-input--select .text-input__input{padding-right:1rem}.text-input__trailing-icon{position:absolute;right:0;bottom:1rem;font-size:1rem;cursor:pointer;color:var(--theme-text-secondary-on-light)}text-input[disabled] .text-input__trailing-icon{display:none !important}text-input[disabled] .text-input__input{padding-right:0 !important}.text-input__input[type=number]::-webkit-outer-spin-button,.text-input__input[type=number]::-webkit-inner-spin-button,.text-input__input[type=number]{-webkit-appearance:none;margin:0;-moz-appearance:textfield !important}.text-input__trailing-icon:hover{color:var(--theme-text-primary-on-light)}.text-input__input:placeholder-shown+label+.text-input__trailing-icon{display:none}.text-input__input:not(:placeholder-shown)+label+.text-input__trailing-icon{display:block}.text-input__input[readonly]{cursor:pointer}.material-symbols-outlined{font-variation-settings:"FILL" 0,"wght" 400,"GRAD" 0,"opsz" 48}select-input{height:4rem;width:100%;display:inline-block}select-input list-box{display:none;margin-top:3rem;position:fixed;z-index:9}select-input list-box[open]{display:block}select-input text-input{cursor:pointer}select-input text-input .text-input__trailing-icon{pointer-events:none}typeahead-input{display:inline-block;width:100%;height:4rem}typeahead-input list-box{display:none;margin-top:3rem;position:fixed;z-index:9}typeahead-input list-box[open]{display:block}typeahead-input.dropdown-select text-input .text-input__input{pointer-events:none}edit-text{display:inline-block;max-width:100%}.edit-text__popup{max-width:100%;min-width:8rem;width:auto;box-shadow:var(--box-shadow);position:absolute;border:none;margin:-0.7rem 0 0 -0.75rem;padding:0}.edit-text__popup text-input{width:calc(100% - 1rem);padding-top:0;margin:.5rem .5rem 1rem}.edit-text__popup .text-input__error{height:unset}.edit-text__popup::backdrop{background:rgba(0,0,0,0)}.edit-text__popup .text-input--with-right-icon .text-input__input{padding-right:0}edit-text .edit-text__text{text-decoration:underline;cursor:pointer;font-weight:normal}edit-text[disabled] .edit-text__text{text-decoration:none;cursor:default;pointer-events:none}edit-text[incorrect] .edit-text__text{color:var(--theme-input-border-error)}.edit-text__text[empty-value]{font-style:italic}.snackbar-container{--snackbar-background-color: rgb(51, 51, 51);--snackbar-background-color-hover: rgb(84, 84, 84);--snackbar-text-label-color: rgba(255, 255, 255, 0.87);--snackbar-text-action-color: rgb(187, 134, 252);--snackbar-text-action-disabled-color: rgb(140, 140, 140);z-index:8;margin:.5rem;position:fixed;right:0;bottom:0;left:0;display:flex;align-items:start;justify-content:center;box-sizing:border-box;flex-direction:column;pointer-events:none}.snackbar{pointer-events:all;margin:.5rem;background-color:var(--snackbar-background-color);min-width:344px;box-shadow:var(--box-shadow);max-width:672px;border-radius:4px;display:flex;align-items:center;justify-content:flex-start}@media(max-width: 480px),(max-width: 344px){.snackbar__surface{min-width:100%}}.snackbar__label{color:var(--snackbar-text-label-color)}.snackbar__label{font-size:.875rem;line-height:1.25rem;font-weight:400;letter-spacing:.012rem;flex-grow:1;box-sizing:border-box;margin:0;padding:1rem}.snackbar__buttons{margin-left:.5rem;margin-right:.5rem;display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.snackbar__button-ok{background:var(--snackbar-background-color);color:var(--snackbar-text-action-color);border:none;cursor:pointer;padding:.5rem 1rem;border-radius:.25rem;margin-right:.5rem}.snackbar__button-ok:disabled,.snackbar__button-close:disabled{border:none;color:var(--snackbar-text-action-disabled-color);pointer-events:none}.snackbar__button-ok:hover,.snackbar__button-close:hover{background:var(--snackbar-background-color-hover)}.snackbar__button-close{background:var(--snackbar-background-color);color:var(--snackbar-text-label-color);border:none;cursor:pointer;font-size:1rem;width:1.5rem;height:1.5rem;border-radius:50%;padding:0}.visually-hidden{display:none !important}
/*# sourceMappingURL=bundle.css.map*/
\ No newline at end of file
diff --git a/bundle.css.map b/bundle.css.map
index 54e0849..5c41b33 100644
--- a/bundle.css.map
+++ b/bundle.css.map
@@ -1 +1 @@
-{"version":3,"file":"bundle.css","mappings":";AAAQ,YCCJ,aACA,kBACA,SACA,6BACA,iDACA,0BACA,iBACA,UACA,sBACA,yCACA,UACA,gBAGA,eAGJ,YACI,aACA,mBACA,iBACA,gBACA,yCACA,eACA,iDAGJ,oBACI,aAGJ,0CACI,uDAGJ,iBACI,gBACA,uBCtCJ,WAGI,sCAEA,sCACA,0CAIA,kBAEA,oBACA,eAGA,cACA,gBAGJ,mBACI,WACA,sBAEA,YACA,6BAEA,aAGA,4DACA,eACA,yCAEJ,6BACI,WACA,eACA,gBAEJ,yBACI,6CAEJ,gCAGI,oBACA,iBACA,yBAEJ,6DAEI,sCAEJ,mBACI,kBACA,sCACA,eACA,OACA,SAIA,oBACA,qBACA,uEACA,2BAEJ,0EAEI,sCAEJ,4CAEI,uEACA,6CACA,2BAEJ,8DAEI,uEACA,6CAEJ,gDAEI,uEACA,6CAEJ,8CAEI,sCAGJ,2BACI,wDAGJ,kFAEI,sCAGJ,mBACI,SACA,6CACA,4CACA,sCACA,oDACA,iBAGJ,uFACI,mBAGJ,2BACI,kBACA,QACA,YACA,eACA,eACA,2CAGJ,gDACI,wBAGJ,wCACI,2BAIJ,sJAGI,wBACA,SACA,qCAGJ,iCACI,yCAGJ,sEACI,aAGJ,4EACI,cAGJ,6BACI,eAGJ,2BACI,8DACQ,CC9JZ,aACI,YACA,WACA,qBAGJ,sBACI,aACA,qBACA,kBAGJ,wBACI,eAGJ,mDACI,oBCjBJ,gBACI,qBACA,WACA,YAGJ,yBACI,aACA,qBACA,kBAGJ,8DACI,oBCbJ,UACE,qBACA,eAGF,kBACE,eACA,eACA,WACA,6BACA,kBACA,YACA,4BACA,UAGF,6BACE,wBACA,cACA,wBAGF,qCACE,aAGF,4BACE,yBAGF,kEACE,gBAGF,2BACE,0BACA,eACA,mBAGF,qCACE,qBACA,eACA,oBAGF,sCACE,sCAGF,8BACE,kBClDF,oBACI,6CACA,mDACA,uDACA,iDACA,0DACA,UACA,aACA,eACA,QACA,SACA,OACA,aACA,kBACA,uBACA,sBACA,sBACA,oBAGJ,UACI,mBACA,aACA,kDACA,gBACA,6BACA,gBACA,kBACA,aACA,mBACA,2BAGJ,4CACI,mBACI,gBAIR,iBACI,uCAGJ,iBACI,kBACA,oBACA,gBACA,uBACA,YACA,sBACA,SACA,aAIJ,mBACI,kBACA,mBACA,aACA,cACA,mBACA,sBAGJ,qBACI,4CACA,wCACA,YACA,eACA,mBACA,qBACA,mBAGJ,+DACI,YACA,iDACA,oBAGJ,yDACI,kDAGJ,wBACI,4CACA,uCACA,YACA,eACA,eACA,aACA,cACA,kBACA,UNtFJ,iBACE,wB","sources":["webpack://elsciUi/./src/style.scss","webpack://elsciUi/./src/ListBox/ListBox.scss","webpack://elsciUi/./src/TextInput/TextInput.scss","webpack://elsciUi/./src/SelectInput/SelectInput.scss","webpack://elsciUi/./src/TypeAheadInput/TypeAheadInput.scss","webpack://elsciUi/./src/EditText/EditText.scss","webpack://elsciUi/./src/SnackBar/SnackBar.scss"],"sourcesContent":["@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0');\n@import './ListBox/ListBox.scss';\n@import './TextInput/TextInput.scss';\n@import './SelectInput/SelectInput.scss';\n@import './TypeAheadInput/TypeAheadInput.scss';\n@import './EditText/EditText.scss';\n@import './SnackBar/SnackBar.scss';\n\n.visually-hidden {\n display: none !important;\n}","list-box ul {\n display: grid;\n position: absolute;\n margin: 0;\n box-shadow: var(--box-shadow);\n background-color: var(--theme-element-background);\n grid-template-columns: 1fr;\n max-height: 10rem;\n padding: 0;\n border-radius: 0.375rem;\n color: var(--theme-text-primary-on-light);\n z-index: 9;\n overflow-y: auto;\n // For now we want to limit dropdown width to 100%, but previous logic is not removed, and we can return to\n // calculated width if necessary.\n max-width: 100%;\n}\n\nlist-box li {\n display: flex;\n align-items: center;\n padding: 0 0.75rem;\n min-height: 2rem;\n color: var(--theme-text-primary-on-light);\n cursor: pointer;\n background-color: var(--theme-element-background);\n}\n\nlist-box li[hidden] {\n display: none;\n}\n\nlist-box li:hover, .list-box__item--active {\n background-color: var(--list-background-on-hover-color);\n}\n\nlist-box li mark {\n font-weight: 600;\n background-color: unset;\n}","text-input {\n /*We probably shouldn't do it, but the label can be declared outside of md-text-input when it relates\n to several fields at the time. So declaring the var at the root level for now.*/\n --text-input__small-font-size: .75rem;\n /*We use another line height for errors because if line-height = font-size, error message is hidden at the bottom*/\n --text-input__error-line-height: 1rem;\n --text-input__label__left-padding: .25rem;\n /*we need to use transform for labels, and they work only for absolutely positioned elements.\n And those in turn need some non-statically position parent - otherwise it'll be positioned relative\n to some other grand-parent and will fly away somewhere*/\n position: relative;\n /*leaving space for label to fly to when the field is active*/\n padding-top: 1.25rem;\n font-size: 1rem;\n /* Html template of this component has its own style where \"display : none\" this trick allows element\n to be hidden until main css file is loaded */\n display: block;\n overflow-x: clip;\n}\n\n.text-input__input {\n width: 100%;\n box-sizing: border-box;\n\n border: none;\n border-bottom: 1px solid #DDD;\n /*when input is focused it has an outline which we don't want*/\n outline: none;\n /* without line-height highlight in input looks better */\n //line-height: 1.5rem;\n padding: .1rem 0 .1em var(--text-input__label__left-padding);\n font-size: 1rem;\n color: var(--theme-text-primary-on-light);\n}\n.text-input__input[disabled] {\n opacity : .5;\n cursor : default;\n background: white;\n}\n.text-input__input:focus {\n border-bottom: 1px solid var(--theme-primary);\n}\n.text-input__input::placeholder {\n /*We need a placeholder because it's the only way of checking if something is entered into the field w/o\n using JS. There's a pseudo-class :placeholder-shown which allows us to control where the label is positioned.*/\n color: transparent;\n user-select: none;\n -webkit-user-select: none;\n}\ntext-input.placeholder-shown .text-input__input::placeholder {\n /* If we need a real placeholder, we set color to it. */\n color: var(--theme-text-hint-on-light);\n}\n.text-input__label {\n position: absolute;\n color: var(--theme-text-hint-on-light);\n bottom: 2.25rem;\n left: 0;\n margin: 0;\n\n /*Label overlays the input and acts like a placeholder, so to act as a placeholder it should\n behave as if it didn't exist. */\n pointer-events: none;\n transform-origin: 0 0;\n transform: translate3d(var(--text-input__label__left-padding), 1rem, 0);\n transition: .1s ease-in-out;\n}\n.text-input__input:not(:focus):not(:placeholder-shown)+.text-input__label {\n /*when we entered something and leave the field it's better to make the label grey instead of black*/\n color: var(--theme-text-hint-on-light);\n}\n.text-input__input:focus + .text-input__label {\n /*when we focus on the input, the label should jump on top of the field*/\n transform: translate(var(--text-input__label__left-padding), -0.375rem);\n font-size: var(--text-input__small-font-size);\n color: var(--theme-primary);\n}\n.text-input__input:not(:placeholder-shown) + .text-input__label {\n /*when placeholder isn't shown - it means we entered something into the field, so the label must stay at the top*/\n transform: translate(var(--text-input__label__left-padding), -0.375rem);\n font-size: var(--text-input__small-font-size);\n}\ntext-input.placeholder-shown .text-input__label {\n /*when input has real placeholder, input label must be in the top all time*/\n transform: translate(var(--text-input__label__left-padding), -0.375rem);\n font-size: var(--text-input__small-font-size);\n}\n.text-input__input:invalid + .text-input__label {\n /*when we focus on the input, the label should jump on top of the field*/\n color: var(--theme-input-border-error);\n}\n\n.text-input__input:invalid {\n border-bottom: 1px solid var(--theme-input-border-error);\n}\n\n.text-input__input:invalid:not(:focus):not(:placeholder-shown)+.text-input__label {\n /*when we entered something and leave the field it's better to make the label grey instead of black*/\n color: var(--theme-input-border-error);\n}\n\n.text-input__error {\n margin : 0;\n font-size: var(--text-input__small-font-size);\n height: var(--text-input__error-line-height);\n color: var(--theme-input-border-error);\n padding-left: var(--text-input__label__left-padding);\n text-align: start;\n}\n\n.text-input--with-right-icon .text-input__input, .text-input--select .text-input__input {\n padding-right: 1rem;\n}\n\n.text-input__trailing-icon {\n position: absolute;\n right: 0;\n bottom: 1rem;\n font-size: 1rem;\n cursor: pointer;\n color: var(--theme-text-secondary-on-light);\n}\n\ntext-input[disabled] .text-input__trailing-icon {\n display: none !important;\n}\n\ntext-input[disabled] .text-input__input {\n padding-right: 0 !important;\n}\n\n/* Hide stepper buttons */\n.text-input__input[type='number']::-webkit-outer-spin-button,\n.text-input__input[type='number']::-webkit-inner-spin-button,\n.text-input__input[type='number'] {\n -webkit-appearance: none;\n margin: 0;\n -moz-appearance: textfield !important;\n}\n\n.text-input__trailing-icon:hover {\n color: var(--theme-text-primary-on-light);\n}\n\n.text-input__input:placeholder-shown + label + .text-input__trailing-icon {\n display: none;\n}\n\n.text-input__input:not(:placeholder-shown) + label + .text-input__trailing-icon {\n display: block;\n}\n\n.text-input__input[readonly] {\n cursor: pointer;\n}\n\n.material-symbols-outlined {\n font-variation-settings:\n 'FILL' 0,\n 'wght' 400,\n 'GRAD' 0,\n 'opsz' 48\n}","select-input {\n height: 4rem;\n width: 100%;\n display: inline-block;\n}\n\nselect-input list-box {\n display: none;\n margin-top: -0.875rem;\n position: relative;\n}\n\nselect-input text-input {\n cursor: pointer;\n}\n\nselect-input text-input .text-input__trailing-icon{\n pointer-events: none;\n}\n","typeahead-input {\n display: inline-block;\n width: 100%;\n height: 4rem;\n}\n\ntypeahead-input list-box {\n display: none;\n margin-top: -0.825rem;\n position: relative;\n}\n\ntypeahead-input.dropdown-select text-input .text-input__input {\n pointer-events: none;\n}","edit-text {\n display: inline-block;\n max-width: 100%;\n}\n\n.edit-text__popup {\n max-width: 100%;\n min-width: 8rem;\n width: auto;\n box-shadow: var(--box-shadow);\n position: absolute;\n border: none;\n margin: -0.7rem 0 0 -0.75rem;\n padding: 0;\n}\n\n.edit-text__popup text-input {\n width: calc(100% - 1rem);\n padding-top: 0;\n margin: .5rem .5rem 1rem;\n}\n\n.edit-text__popup .text-input__error {\n height: unset;\n}\n\n.edit-text__popup::backdrop {\n background: transparent;\n}\n\n.edit-text__popup .text-input--with-right-icon .text-input__input {\n padding-right: 0;\n}\n\nedit-text .edit-text__text {\n text-decoration: underline;\n cursor: pointer;\n font-weight: normal;\n}\n\nedit-text[disabled] .edit-text__text {\n text-decoration: none;\n cursor: default;\n pointer-events: none;\n}\n\nedit-text[incorrect] .edit-text__text{\n color: var(--theme-input-border-error);\n}\n\n.edit-text__text[empty-value] {\n font-style: italic;\n}\n","\n.snackbar-container {\n --snackbar-background-color: rgb(51, 51, 51);\n --snackbar-background-color-hover: rgb(84, 84, 84);\n --snackbar-text-label-color: rgba(255, 255, 255, 0.87);\n --snackbar-text-action-color: rgb(187, 134, 252);\n --snackbar-text-action-disabled-color: rgb(140, 140, 140);\n z-index : 8;\n margin : 0.5rem;\n position : fixed;\n right : 0;\n bottom : 0;\n left : 0;\n display : flex;\n align-items : start;\n justify-content : center;\n box-sizing : border-box;\n flex-direction: column;\n pointer-events: none;\n}\n\n.snackbar {\n pointer-events: all;\n margin: 0.5rem;\n background-color : var(--snackbar-background-color);\n min-width : 344px;\n box-shadow : var(--box-shadow);\n max-width : 672px;\n border-radius : 4px;\n display : flex;\n align-items : center;\n justify-content : flex-start;\n}\n\n@media (max-width : 480px), (max-width : 344px){\n .snackbar__surface{\n min-width : 100%;\n }\n}\n\n.snackbar__label{\n color : var(--snackbar-text-label-color);\n}\n\n.snackbar__label{\n font-size : 0.875rem;\n line-height : 1.25rem;\n font-weight : 400;\n letter-spacing : 0.012rem;\n flex-grow : 1;\n box-sizing : border-box;\n margin : 0;\n padding : 1rem;\n}\n\n\n.snackbar__buttons {\n margin-left : 0.5rem;\n margin-right : 0.5rem;\n display : flex;\n flex-shrink : 0;\n align-items : center;\n box-sizing : border-box;\n}\n\n.snackbar__button-ok {\n background: var(--snackbar-background-color);\n color : var(--snackbar-text-action-color);\n border: none;\n cursor: pointer;\n padding: 0.5rem 1rem;\n border-radius: 0.25rem;\n margin-right: 0.5rem;\n}\n\n.snackbar__button-ok:disabled, .snackbar__button-close:disabled {\n border: none;\n color: var(--snackbar-text-action-disabled-color);\n pointer-events: none;\n}\n\n.snackbar__button-ok:hover, .snackbar__button-close:hover{\n background: var(--snackbar-background-color-hover);\n}\n\n.snackbar__button-close {\n background: var(--snackbar-background-color);\n color : var(--snackbar-text-label-color);\n border: none;\n cursor: pointer;\n font-size: 1rem;\n width: 1.5rem;\n height: 1.5rem;\n border-radius: 50%;\n padding: 0;\n}\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"bundle.css","mappings":";AAAQ,YCCJ,aACA,kBACA,SACA,6BACA,iDACA,0BACA,iBACA,UACA,sBACA,yCACA,UACA,gBAGA,eAGJ,YACI,aACA,mBACA,iBACA,gBACA,yCACA,eACA,iDAGJ,oBACI,aAGJ,0CACI,uDAGJ,iBACI,gBACA,uBCtCJ,WAGI,sCAEA,sCACA,0CAIA,kBAEA,oBACA,eAGA,cACA,gBAGJ,mBACI,WACA,sBAEA,YACA,6BAEA,aAGA,4DACA,eACA,yCAEJ,6BACI,WACA,eACA,gBAEJ,yBACI,6CAEJ,gCAGI,oBACA,iBACA,yBAEJ,6DAEI,sCAEJ,mBACI,kBACA,sCACA,eACA,OACA,SAIA,oBACA,qBACA,uEACA,2BAEJ,0EAEI,sCAEJ,4CAEI,uEACA,6CACA,2BAEJ,8DAEI,uEACA,6CAEJ,gDAEI,uEACA,6CAEJ,8CAEI,sCAGJ,2BACI,wDAGJ,kFAEI,sCAGJ,mBACI,SACA,6CACA,4CACA,sCACA,oDACA,iBAGJ,uFACI,mBAGJ,2BACI,kBACA,QACA,YACA,eACA,eACA,2CAGJ,gDACI,wBAGJ,wCACI,2BAIJ,sJAGI,wBACA,SACA,qCAGJ,iCACI,yCAGJ,sEACI,aAGJ,4EACI,cAGJ,6BACI,eAGJ,2BACI,8DACQ,CC9JZ,aACI,YACA,WACA,qBAGJ,sBACI,aACA,gBAGA,eACA,UAGJ,4BACI,cAGJ,wBACI,eAGJ,mDACI,oBCxBJ,gBACI,qBACA,WACA,YAGJ,yBACI,aACA,gBAGA,eACA,UAGJ,+BACI,cAGJ,8DACI,oBCpBJ,UACE,qBACA,eAGF,kBACE,eACA,eACA,WACA,6BACA,kBACA,YACA,4BACA,UAGF,6BACE,wBACA,cACA,wBAGF,qCACE,aAGF,4BACE,yBAGF,kEACE,gBAGF,2BACE,0BACA,eACA,mBAGF,qCACE,qBACA,eACA,oBAGF,sCACE,sCAGF,8BACE,kBClDF,oBACI,6CACA,mDACA,uDACA,iDACA,0DACA,UACA,aACA,eACA,QACA,SACA,OACA,aACA,kBACA,uBACA,sBACA,sBACA,oBAGJ,UACI,mBACA,aACA,kDACA,gBACA,6BACA,gBACA,kBACA,aACA,mBACA,2BAGJ,4CACI,mBACI,gBAIR,iBACI,uCAGJ,iBACI,kBACA,oBACA,gBACA,uBACA,YACA,sBACA,SACA,aAIJ,mBACI,kBACA,mBACA,aACA,cACA,mBACA,sBAGJ,qBACI,4CACA,wCACA,YACA,eACA,mBACA,qBACA,mBAGJ,+DACI,YACA,iDACA,oBAGJ,yDACI,kDAGJ,wBACI,4CACA,uCACA,YACA,eACA,eACA,aACA,cACA,kBACA,UNtFJ,iBACE,wB","sources":["webpack://elsciUi/./src/style.scss","webpack://elsciUi/./src/ListBox/ListBox.scss","webpack://elsciUi/./src/TextInput/TextInput.scss","webpack://elsciUi/./src/SelectInput/SelectInput.scss","webpack://elsciUi/./src/TypeAheadInput/TypeAheadInput.scss","webpack://elsciUi/./src/EditText/EditText.scss","webpack://elsciUi/./src/SnackBar/SnackBar.scss"],"sourcesContent":["@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0');\n@import './ListBox/ListBox.scss';\n@import './TextInput/TextInput.scss';\n@import './SelectInput/SelectInput.scss';\n@import './TypeAheadInput/TypeAheadInput.scss';\n@import './EditText/EditText.scss';\n@import './SnackBar/SnackBar.scss';\n\n.visually-hidden {\n display: none !important;\n}","list-box ul {\n display: grid;\n position: absolute;\n margin: 0;\n box-shadow: var(--box-shadow);\n background-color: var(--theme-element-background);\n grid-template-columns: 1fr;\n max-height: 10rem;\n padding: 0;\n border-radius: 0.375rem;\n color: var(--theme-text-primary-on-light);\n z-index: 9;\n overflow-y: auto;\n // For now we want to limit dropdown width to 100%, but previous logic is not removed, and we can return to\n // calculated width if necessary.\n max-width: 100%;\n}\n\nlist-box li {\n display: flex;\n align-items: center;\n padding: 0 0.75rem;\n min-height: 2rem;\n color: var(--theme-text-primary-on-light);\n cursor: pointer;\n background-color: var(--theme-element-background);\n}\n\nlist-box li[hidden] {\n display: none;\n}\n\nlist-box li:hover, .list-box__item--active {\n background-color: var(--list-background-on-hover-color);\n}\n\nlist-box li mark {\n font-weight: 600;\n background-color: unset;\n}","text-input {\n /*We probably shouldn't do it, but the label can be declared outside of md-text-input when it relates\n to several fields at the time. So declaring the var at the root level for now.*/\n --text-input__small-font-size: .75rem;\n /*We use another line height for errors because if line-height = font-size, error message is hidden at the bottom*/\n --text-input__error-line-height: 1rem;\n --text-input__label__left-padding: .25rem;\n /*we need to use transform for labels, and they work only for absolutely positioned elements.\n And those in turn need some non-statically position parent - otherwise it'll be positioned relative\n to some other grand-parent and will fly away somewhere*/\n position: relative;\n /*leaving space for label to fly to when the field is active*/\n padding-top: 1.25rem;\n font-size: 1rem;\n /* Html template of this component has its own style where \"display : none\" this trick allows element\n to be hidden until main css file is loaded */\n display: block;\n overflow-x: clip;\n}\n\n.text-input__input {\n width: 100%;\n box-sizing: border-box;\n\n border: none;\n border-bottom: 1px solid #DDD;\n /*when input is focused it has an outline which we don't want*/\n outline: none;\n /* without line-height highlight in input looks better */\n //line-height: 1.5rem;\n padding: .1rem 0 .1em var(--text-input__label__left-padding);\n font-size: 1rem;\n color: var(--theme-text-primary-on-light);\n}\n.text-input__input[disabled] {\n opacity : .5;\n cursor : default;\n background: white;\n}\n.text-input__input:focus {\n border-bottom: 1px solid var(--theme-primary);\n}\n.text-input__input::placeholder {\n /*We need a placeholder because it's the only way of checking if something is entered into the field w/o\n using JS. There's a pseudo-class :placeholder-shown which allows us to control where the label is positioned.*/\n color: transparent;\n user-select: none;\n -webkit-user-select: none;\n}\ntext-input.placeholder-shown .text-input__input::placeholder {\n /* If we need a real placeholder, we set color to it. */\n color: var(--theme-text-hint-on-light);\n}\n.text-input__label {\n position: absolute;\n color: var(--theme-text-hint-on-light);\n bottom: 2.25rem;\n left: 0;\n margin: 0;\n\n /*Label overlays the input and acts like a placeholder, so to act as a placeholder it should\n behave as if it didn't exist. */\n pointer-events: none;\n transform-origin: 0 0;\n transform: translate3d(var(--text-input__label__left-padding), 1rem, 0);\n transition: .1s ease-in-out;\n}\n.text-input__input:not(:focus):not(:placeholder-shown)+.text-input__label {\n /*when we entered something and leave the field it's better to make the label grey instead of black*/\n color: var(--theme-text-hint-on-light);\n}\n.text-input__input:focus + .text-input__label {\n /*when we focus on the input, the label should jump on top of the field*/\n transform: translate(var(--text-input__label__left-padding), -0.375rem);\n font-size: var(--text-input__small-font-size);\n color: var(--theme-primary);\n}\n.text-input__input:not(:placeholder-shown) + .text-input__label {\n /*when placeholder isn't shown - it means we entered something into the field, so the label must stay at the top*/\n transform: translate(var(--text-input__label__left-padding), -0.375rem);\n font-size: var(--text-input__small-font-size);\n}\ntext-input.placeholder-shown .text-input__label {\n /*when input has real placeholder, input label must be in the top all time*/\n transform: translate(var(--text-input__label__left-padding), -0.375rem);\n font-size: var(--text-input__small-font-size);\n}\n.text-input__input:invalid + .text-input__label {\n /*when we focus on the input, the label should jump on top of the field*/\n color: var(--theme-input-border-error);\n}\n\n.text-input__input:invalid {\n border-bottom: 1px solid var(--theme-input-border-error);\n}\n\n.text-input__input:invalid:not(:focus):not(:placeholder-shown)+.text-input__label {\n /*when we entered something and leave the field it's better to make the label grey instead of black*/\n color: var(--theme-input-border-error);\n}\n\n.text-input__error {\n margin : 0;\n font-size: var(--text-input__small-font-size);\n height: var(--text-input__error-line-height);\n color: var(--theme-input-border-error);\n padding-left: var(--text-input__label__left-padding);\n text-align: start;\n}\n\n.text-input--with-right-icon .text-input__input, .text-input--select .text-input__input {\n padding-right: 1rem;\n}\n\n.text-input__trailing-icon {\n position: absolute;\n right: 0;\n bottom: 1rem;\n font-size: 1rem;\n cursor: pointer;\n color: var(--theme-text-secondary-on-light);\n}\n\ntext-input[disabled] .text-input__trailing-icon {\n display: none !important;\n}\n\ntext-input[disabled] .text-input__input {\n padding-right: 0 !important;\n}\n\n/* Hide stepper buttons */\n.text-input__input[type='number']::-webkit-outer-spin-button,\n.text-input__input[type='number']::-webkit-inner-spin-button,\n.text-input__input[type='number'] {\n -webkit-appearance: none;\n margin: 0;\n -moz-appearance: textfield !important;\n}\n\n.text-input__trailing-icon:hover {\n color: var(--theme-text-primary-on-light);\n}\n\n.text-input__input:placeholder-shown + label + .text-input__trailing-icon {\n display: none;\n}\n\n.text-input__input:not(:placeholder-shown) + label + .text-input__trailing-icon {\n display: block;\n}\n\n.text-input__input[readonly] {\n cursor: pointer;\n}\n\n.material-symbols-outlined {\n font-variation-settings:\n 'FILL' 0,\n 'wght' 400,\n 'GRAD' 0,\n 'opsz' 48\n}","select-input {\n height: 4rem;\n width: 100%;\n display: inline-block;\n}\n\nselect-input list-box {\n display: none;\n margin-top: 3rem;\n // We use a fixed position because we want to specify the location ourselves (related to the browser window,\n // not closest positioned relative)\n position: fixed;\n z-index: 9;\n}\n\nselect-input list-box[open] {\n display: block;\n}\n\nselect-input text-input {\n cursor: pointer;\n}\n\nselect-input text-input .text-input__trailing-icon{\n pointer-events: none;\n}\n","typeahead-input {\n display: inline-block;\n width: 100%;\n height: 4rem;\n}\n\ntypeahead-input list-box {\n display: none;\n margin-top: 3rem;\n // We use a fixed position because we want to specify the location ourselves (related to the browser window,\n // not closest positioned relative)\n position: fixed;\n z-index: 9;\n}\n\ntypeahead-input list-box[open] {\n display: block;\n}\n\ntypeahead-input.dropdown-select text-input .text-input__input {\n pointer-events: none;\n}","edit-text {\n display: inline-block;\n max-width: 100%;\n}\n\n.edit-text__popup {\n max-width: 100%;\n min-width: 8rem;\n width: auto;\n box-shadow: var(--box-shadow);\n position: absolute;\n border: none;\n margin: -0.7rem 0 0 -0.75rem;\n padding: 0;\n}\n\n.edit-text__popup text-input {\n width: calc(100% - 1rem);\n padding-top: 0;\n margin: .5rem .5rem 1rem;\n}\n\n.edit-text__popup .text-input__error {\n height: unset;\n}\n\n.edit-text__popup::backdrop {\n background: transparent;\n}\n\n.edit-text__popup .text-input--with-right-icon .text-input__input {\n padding-right: 0;\n}\n\nedit-text .edit-text__text {\n text-decoration: underline;\n cursor: pointer;\n font-weight: normal;\n}\n\nedit-text[disabled] .edit-text__text {\n text-decoration: none;\n cursor: default;\n pointer-events: none;\n}\n\nedit-text[incorrect] .edit-text__text{\n color: var(--theme-input-border-error);\n}\n\n.edit-text__text[empty-value] {\n font-style: italic;\n}\n","\n.snackbar-container {\n --snackbar-background-color: rgb(51, 51, 51);\n --snackbar-background-color-hover: rgb(84, 84, 84);\n --snackbar-text-label-color: rgba(255, 255, 255, 0.87);\n --snackbar-text-action-color: rgb(187, 134, 252);\n --snackbar-text-action-disabled-color: rgb(140, 140, 140);\n z-index : 8;\n margin : 0.5rem;\n position : fixed;\n right : 0;\n bottom : 0;\n left : 0;\n display : flex;\n align-items : start;\n justify-content : center;\n box-sizing : border-box;\n flex-direction: column;\n pointer-events: none;\n}\n\n.snackbar {\n pointer-events: all;\n margin: 0.5rem;\n background-color : var(--snackbar-background-color);\n min-width : 344px;\n box-shadow : var(--box-shadow);\n max-width : 672px;\n border-radius : 4px;\n display : flex;\n align-items : center;\n justify-content : flex-start;\n}\n\n@media (max-width : 480px), (max-width : 344px){\n .snackbar__surface{\n min-width : 100%;\n }\n}\n\n.snackbar__label{\n color : var(--snackbar-text-label-color);\n}\n\n.snackbar__label{\n font-size : 0.875rem;\n line-height : 1.25rem;\n font-weight : 400;\n letter-spacing : 0.012rem;\n flex-grow : 1;\n box-sizing : border-box;\n margin : 0;\n padding : 1rem;\n}\n\n\n.snackbar__buttons {\n margin-left : 0.5rem;\n margin-right : 0.5rem;\n display : flex;\n flex-shrink : 0;\n align-items : center;\n box-sizing : border-box;\n}\n\n.snackbar__button-ok {\n background: var(--snackbar-background-color);\n color : var(--snackbar-text-action-color);\n border: none;\n cursor: pointer;\n padding: 0.5rem 1rem;\n border-radius: 0.25rem;\n margin-right: 0.5rem;\n}\n\n.snackbar__button-ok:disabled, .snackbar__button-close:disabled {\n border: none;\n color: var(--snackbar-text-action-disabled-color);\n pointer-events: none;\n}\n\n.snackbar__button-ok:hover, .snackbar__button-close:hover{\n background: var(--snackbar-background-color-hover);\n}\n\n.snackbar__button-close {\n background: var(--snackbar-background-color);\n color : var(--snackbar-text-label-color);\n border: none;\n cursor: pointer;\n font-size: 1rem;\n width: 1.5rem;\n height: 1.5rem;\n border-radius: 50%;\n padding: 0;\n}\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/index.bundle.js b/index.bundle.js
index ccddc8f..e4b9c98 100644
--- a/index.bundle.js
+++ b/index.bundle.js
@@ -1,7 +1,7 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.elsciUi=e():t.elsciUi=e()}(self,(()=>(()=>{"use strict";var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{EditText:()=>u,SelectInput:()=>o,TextInput:()=>a,TypeAheadInput:()=>h});class i{#t;#e;#i;#s;constructor(t){this.#t=t,this.#e=t.querySelector("input"),this.#i=!0,this.#s=""}get isValid(){return this.#i}get errorMessage(){return this.#s}checkValidity(){this.setCustomValidity(""),this.#e.checkValidity();let t=this.#e.validity;return t.valid&&(t=this.#n()),this.#i=t.valid,this.#s=this.#l(t),this.isValid}setCustomValidity(t){this.#e.setCustomValidity(t),this.#i=this.#e.validity.valid,this.#s=t}#n(){const{badInput:t,customError:e,patternMismatch:i,typeMismatch:s,valid:n,rangeOverflow:l,rangeUnderflow:a,tooLong:r,tooShort:h,valueMissing:o,stepMismatch:u}=this.#e.validity,d=Object.assign({},{badInput:t,customError:e,patternMismatch:i,typeMismatch:s,valid:n,rangeOverflow:l,rangeUnderflow:a,tooLong:r,tooShort:h,valueMissing:o,stepMismatch:u},this.#a(),this.#r(),this.#h());return d.valid=!(d.valueMissing||d.rangeUnderflow||d.rangeOverflow||d.stepMismatch),d}#a(){const t=this.#e.value.trim();return{valueMissing:this.#t.hasAttribute("required")&&""===t}}#r(){if("number"!==this.#e.type)return{rangeUnderflow:!1,rangeOverflow:!1};const{min:t,max:e,value:i}=this.#e;return{rangeUnderflow:""!==t&&+i<+t,rangeOverflow:""!==e&&+i>+e}}#h(){if("number"!==this.#e.type)return{stepMismatch:!1};const t=this.#t.getAttribute("number-type");return t&&"integer"===t?{stepMismatch:!Number.isInteger(this.#e.valueAsNumber)}:{stepMismatch:!1}}#l(t){const e="number"===this.#e.type,{badInput:i,rangeOverflow:s,rangeUnderflow:n,tooLong:l,tooShort:a,valueMissing:r,stepMismatch:h}=t;if(e&&i)return"Invalid number";if(e&&h){if("1"===this.#e.step)return"Must be an integer";const t=this.#t.getAttribute("number-type");if(t&&"integer"===t)return"Must be an integer"}return s?"Greater than "+this.#e.max:n?"Less than "+this.#e.min:l?"Max length is "+this.#e.maxLength:a?"Min length is "+this.#e.minLength:!i&&r?"Required":this.#e.validationMessage}}const s=Object.freeze({Shift:"ShiftLeft",Esc:"Escape",Enter:"Enter",Up:"ArrowUp",Down:"ArrowDown"}),n=(t,...e)=>{let i=t[0];for(let n=0;n/g,">").replace(/"/g,""").replace(/'/g,"'"):"",i+=t[n+1];var s;return i};function l(t){const e=document.createElement("span");document.body.appendChild(e),e.textContent=t,e.style.fontSize="1rem",e.style.visibility="hidden",e.style.position="absolute";const i=Math.ceil(e.getBoundingClientRect().width)+1;return e.remove(),i}class a extends HTMLElement{static#o=new Set(["autocomplete","autofocus","disabled","max","maxlength","min","minlength","name","pattern","readonly","step","type","value","placeholder"]);#e;#u;#d;#p={onTrailingIconClick:[],onChangeValue:[],onInput:[]};#c;#m=[];connectedCallback(){this.innerHTML=this.#g(),this.#e=this.querySelector("input"),this.#u=this.querySelector(".text-input__error"),this.#d=new i(this),this.#b(),this.#E(),this.hasAttribute("value")&&(this.value=this.getAttribute("value"))}disconnectedCallback(){this.setAttribute("value",this.value),window.removeEventListener("visibilitychange",this.#y.bind(this),{capture:!0})}addValidator(t){this.#m.push(t)}get value(){return this.rawValue.trim()}get rawValue(){return this.#e.value}set value(t){this.#e.value=function(t){return!(void 0===t||!Number.isFinite(t))}(t)||"string"==typeof t?t:"",this.#c=this.#e.value,this.checkValidity()}checkValidity(){if(!this.#d.checkValidity())return this.errorMessage=this.#d.errorMessage,!1;this.errorMessage=this.#d.errorMessage;for(const t of this.#m){const e=t.validate(this,this.value);if(!e.isValid)return this.errorMessage=e.errorMessage,this.focus(),!1}return!0}get errorMessage(){return this.#u.textContent}set errorMessage(t){t&&(this.#c=null),this.#d.setCustomValidity(t),this.#u.textContent=this.#d.errorMessage}onTrailingIconClick(t){this.#p.onTrailingIconClick.push(t)}onInput(t){this.#p.onInput.push(t)}onChangeValue(t){this.#p.onChangeValue.push(t)}focus(t){this.#e.focus(t)}setDisabled(t){this.toggleAttribute("disabled",t),this.#e.toggleAttribute("disabled",t)}#w(t){"number"!==this.#e.type||t.key!==s.Up&&t.key!==s.Down||t.preventDefault(),t.key!==s.Enter||t.repeat||this.#v()}#f(){const t=this.checkValidity();this.#p.onInput.forEach((e=>e(this.value,t)))}#v(){this.#c!==this.value&&this.#V()}#x(){this.#p.onTrailingIconClick.forEach((t=>t()))}#V(){this.checkValidity()&&(this.#c=this.value,this.#p.onChangeValue.forEach((t=>t(this.value))))}#b(){for(const t of this.attributes)a.#o.has(t.name)&&this.#e.setAttribute(t.name,t.value);"number"!==this.getAttribute("type")||this.hasAttribute("step")||this.#e.setAttribute("step","any"),this.hasAttribute("placeholder")&&this.classList.add("placeholder-shown")}#E(){this.#e.addEventListener("keydown",this.#w.bind(this)),this.#e.addEventListener("input",this.#f.bind(this)),this.#e.addEventListener("focusout",this.#v.bind(this)),this.querySelector(".text-input__trailing-icon").addEventListener("click",this.#x.bind(this)),window.addEventListener("visibilitychange",this.#y.bind(this),{capture:!0})}#y(){document.activeElement===this.#e&&this.#e.blur()}#g(){const t=this.getAttribute("data-icon")||"";return n`
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.elsciUi=e():t.elsciUi=e()}(self,(()=>(()=>{"use strict";var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{EditText:()=>u,SelectInput:()=>o,TextInput:()=>a,TypeAheadInput:()=>h});class i{#t;#e;#i;#s;constructor(t){this.#t=t,this.#e=t.querySelector("input"),this.#i=!0,this.#s=""}get isValid(){return this.#i}get errorMessage(){return this.#s}checkValidity(){this.setCustomValidity(""),this.#e.checkValidity();let t=this.#e.validity;return t.valid&&(t=this.#n()),this.#i=t.valid,this.#s=this.#l(t),this.isValid}setCustomValidity(t){this.#e.setCustomValidity(t),this.#i=this.#e.validity.valid,this.#s=t}#n(){const{badInput:t,customError:e,patternMismatch:i,typeMismatch:s,valid:n,rangeOverflow:l,rangeUnderflow:a,tooLong:r,tooShort:h,valueMissing:o,stepMismatch:u}=this.#e.validity,d=Object.assign({},{badInput:t,customError:e,patternMismatch:i,typeMismatch:s,valid:n,rangeOverflow:l,rangeUnderflow:a,tooLong:r,tooShort:h,valueMissing:o,stepMismatch:u},this.#a(),this.#r(),this.#h());return d.valid=!(d.valueMissing||d.rangeUnderflow||d.rangeOverflow||d.stepMismatch),d}#a(){const t=this.#e.value.trim();return{valueMissing:this.#t.hasAttribute("required")&&""===t}}#r(){if("number"!==this.#e.type)return{rangeUnderflow:!1,rangeOverflow:!1};const{min:t,max:e,value:i}=this.#e;return{rangeUnderflow:""!==t&&+i<+t,rangeOverflow:""!==e&&+i>+e}}#h(){if("number"!==this.#e.type)return{stepMismatch:!1};const t=this.#t.getAttribute("number-type");return t&&"integer"===t?{stepMismatch:!Number.isInteger(this.#e.valueAsNumber)}:{stepMismatch:!1}}#l(t){const e="number"===this.#e.type,{badInput:i,rangeOverflow:s,rangeUnderflow:n,tooLong:l,tooShort:a,valueMissing:r,stepMismatch:h}=t;if(e&&i)return"Invalid number";if(e&&h){if("1"===this.#e.step)return"Must be an integer";const t=this.#t.getAttribute("number-type");if(t&&"integer"===t)return"Must be an integer"}return s?"Greater than "+this.#e.max:n?"Less than "+this.#e.min:l?"Max length is "+this.#e.maxLength:a?"Min length is "+this.#e.minLength:!i&&r?"Required":this.#e.validationMessage}}const s=Object.freeze({Shift:"ShiftLeft",Esc:"Escape",Enter:"Enter",Up:"ArrowUp",Down:"ArrowDown"}),n=(t,...e)=>{let i=t[0];for(let n=0;n/g,">").replace(/"/g,""").replace(/'/g,"'"):"",i+=t[n+1];var s;return i};function l(t){const e=document.createElement("span");document.body.appendChild(e),e.textContent=t,e.style.fontSize="1rem",e.style.visibility="hidden",e.style.position="absolute";const i=Math.ceil(e.getBoundingClientRect().width)+1;return e.remove(),i}class a extends HTMLElement{static#o=new Set(["autocomplete","autofocus","disabled","max","maxlength","min","minlength","name","pattern","readonly","step","type","value","placeholder"]);#e;#u;#d;#p={onTrailingIconClick:[],onChangeValue:[],onInput:[]};#c;#m=[];connectedCallback(){this.innerHTML=this.#g(),this.#e=this.querySelector("input"),this.#u=this.querySelector(".text-input__error"),this.#d=new i(this),this.#b(),this.#E(),this.hasAttribute("value")&&(this.value=this.getAttribute("value"))}disconnectedCallback(){this.setAttribute("value",this.value),window.removeEventListener("visibilitychange",this.#v.bind(this),{capture:!0})}addValidator(t){this.#m.push(t)}get value(){return this.rawValue.trim()}get rawValue(){return this.#e.value}set value(t){this.#e.value=function(t){return!(void 0===t||!Number.isFinite(t))}(t)||"string"==typeof t?t:"",this.#c=this.#e.value,this.checkValidity()}checkValidity(){if(!this.#d.checkValidity())return this.errorMessage=this.#d.errorMessage,!1;this.errorMessage=this.#d.errorMessage;for(const t of this.#m){const e=t.validate(this,this.value);if(!e.isValid)return this.errorMessage=e.errorMessage,this.focus(),!1}return!0}get errorMessage(){return this.#u.textContent}set errorMessage(t){t&&(this.#c=null),this.#d.setCustomValidity(t),this.#u.textContent=this.#d.errorMessage}onTrailingIconClick(t){this.#p.onTrailingIconClick.push(t)}onInput(t){this.#p.onInput.push(t)}onChangeValue(t){this.#p.onChangeValue.push(t)}focus(t){this.#e.focus(t)}setDisabled(t){this.toggleAttribute("disabled",t),this.#e.toggleAttribute("disabled",t)}#w(t){"number"!==this.#e.type||t.key!==s.Up&&t.key!==s.Down||t.preventDefault(),t.key!==s.Enter||t.repeat||this.#y()}#f(){const t=this.checkValidity();this.#p.onInput.forEach((e=>e(this.value,t)))}#y(){this.#c!==this.value&&this.#V()}#x(){this.#p.onTrailingIconClick.forEach((t=>t()))}#V(){this.checkValidity()&&(this.#c=this.value,this.#p.onChangeValue.forEach((t=>t(this.value))))}#b(){for(const t of this.attributes)a.#o.has(t.name)&&this.#e.setAttribute(t.name,t.value);"number"!==this.getAttribute("type")||this.hasAttribute("step")||this.#e.setAttribute("step","any"),this.hasAttribute("placeholder")&&this.classList.add("placeholder-shown")}#E(){this.#e.addEventListener("keydown",this.#w.bind(this)),this.#e.addEventListener("input",this.#f.bind(this)),this.#e.addEventListener("focusout",this.#y.bind(this)),this.querySelector(".text-input__trailing-icon").addEventListener("click",this.#x.bind(this)),window.addEventListener("visibilitychange",this.#v.bind(this),{capture:!0})}#v(){document.activeElement===this.#e&&this.#e.blur()}#g(){const t=this.getAttribute("data-icon")||"";return n`
${t}
-
`}static get is(){return"text-input"}}window.customElements.get(a.is)||window.customElements.define(a.is,a);class r extends HTMLElement{#A;#C=[];#k=0;#S=-1;#M=(t,e)=>t.displayName.localeCompare(e.displayName);#p={onOptionClick:[]};get options(){return this.#C}set options(t){this.#I(t),this.innerHTML=this.#g(),this.#A=this.querySelector("ul"),this.#T(),this.#E()}set comparator(t){this.#M=t}set filter(t){const e=t.toLowerCase();for(const t of this.querySelectorAll("li")){const{displayName:i}=this.#C[t.dataset.index],s=i.toLowerCase().indexOf(e);t.innerHTML=this.#L(i,s,e.length),t.toggleAttribute("hidden",-1===s)}const i=this.#D();i&&(i.hasAttribute("hidden")?this.#O():i.scrollIntoView({block:"nearest"}))}show(){this.style.display="block",this.#T()}hide(){this.style.display="none",this.#O()}selectNextItem(){const t=this.#N();if(this.hasSelectedElement()){const e=t.indexOf(this.#D());if(t.length-1<=e)return;this.#$(t[e+1].dataset.index)}else{if(0===t.length)return;this.#$(t[0].dataset.index)}}selectPrevItem(){const t=this.#N();if(this.hasSelectedElement()){const e=t.indexOf(this.#D());if(0===e)return;this.#$(t[e-1].dataset.index)}else{if(0===t.length)return;this.#$(t[t.length-1].dataset.index)}}triggerClickOnSelectedItem(){this.hasSelectedElement()&&this.#D().dispatchEvent(new MouseEvent("mousedown"))}hasSelectedElement(){return null!=this.#D()}isVisible(){return"none"!==window.getComputedStyle(this).display}onOptionClick(t){this.#p.onOptionClick.push(t)}connectedCallback(){this.innerHTML=this.#g(),this.#A=this.querySelector("ul"),this.#E()}#I(t){"function"==typeof this.#M?this.#C=[...t].sort(this.#M):this.#C=t}#N(){return[...this.#A.querySelectorAll("li:not([hidden])")]}#E(){this.#A.addEventListener("mousedown",(t=>{t.preventDefault()}));for(const t of this.querySelectorAll("li"))t.addEventListener("mousedown",(()=>{const e=this.#C[t.dataset.index];this.#p.onOptionClick.forEach((t=>t(e)))}))}#g(){return`\n
\n ${this.#C.map(((t,e)=>n`
${t.displayName}
`)).join("")}\n
`}#T(){const t=this.parentElement.getBoundingClientRect();0===this.#k&&(this.#k=Math.max(...this.#C.map((t=>l(t.displayName))),0));const e=Math.max(this.#k+24+22,t.width),i=document.documentElement.clientWidth-t.left;this.#A.style.right=e>i?0:null,this.#A.style.width=`${Math.min(e,document.documentElement.clientWidth)}px`}#D(){return this.querySelector(`li[data-index="${this.#S}"]`)}#$(t){this.#O(),this.#S=t;const e=this.#D();e.classList.add("list-box__item--active"),e.scrollIntoView({block:"nearest"})}#O(){this.#S>=0&&(this.#D().classList.remove("list-box__item--active"),this.#S=-1)}#L(t,e,i){if(e>=0){const s=t.substring(0,e),l=t.substring(e,e+i),a=t.substring(e+i);return n`${s}${l}${a}`}return t}static get is(){return"list-box"}}window.customElements.get(r.is)||window.customElements.define(r.is,r);class h extends HTMLElement{#e;#q;#_;#P=null;#U;#p={onChangeValue:[]};connectedCallback(){this.innerHTML=this.#g(),this.#e=this.querySelector("text-input"),this.#q=this.querySelector("list-box"),this.#U=this.hasAttribute("shouldMatchOptions"),this.#E()}get value(){return this.#_}get rawValue(){return this.#e.value}set value(t){this.#_=t,this.#e.value=t&&t.displayName?t.displayName:""}set initialValue(t){this.value=t,this.#P=t}set options(t){this.#q.options=t,this.#H()}set errorMessage(t){this.#e.errorMessage=t}checkValidity(){return this.#j()&&this.#e.checkValidity()}onChangeValue(t){this.#p.onChangeValue.push(t)}setDisabled(t){this.toggleAttribute("disabled",t),this.#e.setDisabled(t)}#f(){this.errorMessage="",this.#H(),this.#q.isVisible()||this.#q.show()}#R(){this.#H(),this.#q.show()}#B(){this.#K()}#F(t){this.value=t,this.#K()}#W(){this.value={displayName:""},this.#e.querySelector("input").focus()}#z(t){switch([s.Up,s.Down].includes(t.code)&&(t.preventDefault(),t.stopImmediatePropagation()),t.key){case s.Esc:this.#K();break;case s.Enter:this.#q.isVisible()&&(this.#q.hasSelectedElement()?this.#q.triggerClickOnSelectedItem():this.#K());break;case s.Down:this.#q.isVisible()||this.#q.show(),this.#q.selectNextItem();break;case s.Up:this.#q.isVisible()||this.#q.show(),this.#q.selectPrevItem()}}#G(){this.#V()}#K(){this.#q.hide(),this.#V()}#V(){this.#j()&&this.#X()&&(this.#P=this.value,this.#p.onChangeValue.forEach((t=>t(this.value))))}#j(){const t=this.#e.value;if(""===t)return this.#_=null,!0;if(this.value&&this.value.displayName===t)return this.errorMessage="",!0;if(!this.#U)return this.errorMessage="",this.#_={displayName:t},!0;for(const e of this.#q.options)if(e.displayName===t)return this.errorMessage="",this.#_=e,this.#e.value=e.displayName,!0;return this.#_=null,this.errorMessage="Select from list",!1}#H(){this.hasAttribute("nofiltering")||(this.#q.filter=this.#e.value)}#X(){return this.#P!==this.value}#E(){const t=this.#e.querySelector("input");this.addEventListener("keydown",this.#z.bind(this)),this.addEventListener("keyup",(t=>{t.stopPropagation()})),t.addEventListener("input",this.#f.bind(this)),t.addEventListener("blur",this.#B.bind(this)),t.addEventListener("focus",this.#R.bind(this)),this.#e.onTrailingIconClick(this.#W.bind(this)),this.#e.onChangeValue(this.#G.bind(this)),this.#q.onOptionClick(this.#F.bind(this))}#g(){const t=this.hasAttribute("required")?"required":"",e=this.hasAttribute("disabled")?"disabled":"",i=this.hasAttribute("no-icon")?"":"close";return n`
+ `}static get is(){return"text-input"}}window.customElements.get(a.is)||window.customElements.define(a.is,a);class r extends HTMLElement{#A;#C=[];#k=0;#S=-1;#M=(t,e)=>t.displayName.localeCompare(e.displayName);#p={onOptionClick:[]};#I;get options(){return this.#C}set options(t){this.#T(t),this.innerHTML=this.#g(),this.#A=this.querySelector("ul"),this.#L(),this.#E()}set comparator(t){this.#M=t}set filter(t){const e=t.toLowerCase();for(const t of this.querySelectorAll("li")){const{displayName:i}=this.#C[t.dataset.index],s=i.toLowerCase().indexOf(e);t.innerHTML=this.#D(i,s,e.length),t.toggleAttribute("hidden",-1===s)}const i=this.#O();i&&(i.hasAttribute("hidden")?this.#$():i.scrollIntoView({block:"nearest"}))}show(){document.addEventListener("wheel",this.#I,{capture:!0,passive:!1}),this.toggleAttribute("open",!0),this.#L()}hide(){document.removeEventListener("wheel",this.#I,{capture:!0,passive:!1}),this.toggleAttribute("open",!1),this.#$()}selectNextItem(){const t=this.#N();if(this.hasSelectedElement()){const e=t.indexOf(this.#O());if(t.length-1<=e)return;this.#q(t[e+1].dataset.index)}else{if(0===t.length)return;this.#q(t[0].dataset.index)}}selectPrevItem(){const t=this.#N();if(this.hasSelectedElement()){const e=t.indexOf(this.#O());if(0===e)return;this.#q(t[e-1].dataset.index)}else{if(0===t.length)return;this.#q(t[t.length-1].dataset.index)}}triggerClickOnSelectedItem(){this.hasSelectedElement()&&this.#O().dispatchEvent(new MouseEvent("mousedown"))}hasSelectedElement(){return null!=this.#O()}isVisible(){return this.hasAttribute("open")}onOptionClick(t){this.#p.onOptionClick.push(t)}connectedCallback(){this.innerHTML=this.#g(),this.#A=this.querySelector("ul"),this.#E(),this.#I=t=>{if(this.contains(t.target)){const e=t.deltaY<0,i=t.deltaY>0,s=0===this.#A.scrollTop,n=this.#A.scrollTop+this.#A.clientHeight>=this.#A.scrollHeight;(e&s||i&n)&&(t.stopPropagation(),t.preventDefault())}else t.stopPropagation(),t.preventDefault()}}#T(t){"function"==typeof this.#M?this.#C=[...t].sort(this.#M):this.#C=t}#N(){return[...this.#A.querySelectorAll("li:not([hidden])")]}#E(){this.#A.addEventListener("mousedown",(t=>{t.preventDefault()}));for(const t of this.querySelectorAll("li"))t.addEventListener("mousedown",(()=>{const e=this.#C[t.dataset.index];this.#p.onOptionClick.forEach((t=>t(e)))}))}#g(){return`\n
\n ${this.#C.map(((t,e)=>n`
${t.displayName}
`)).join("")}\n
`}#L(){const t=this.parentElement.getBoundingClientRect();0===this.#k&&(this.#k=Math.max(...this.#C.map((t=>l(t.displayName))),0));const e=Math.max(this.#k+24+22,t.width),i=document.documentElement.clientWidth-t.left;this.#A.style.right=e>i?0:null,this.#A.style.width=`${Math.min(e,document.documentElement.clientWidth)}px`,this.style.width=`${Math.min(e,document.documentElement.clientWidth)}px`,this.style.top=`${t.top}px`}#O(){return this.querySelector(`li[data-index="${this.#S}"]`)}#q(t){this.#$(),this.#S=t;const e=this.#O();e.classList.add("list-box__item--active"),e.scrollIntoView({block:"nearest"})}#$(){this.#S>=0&&(this.#O().classList.remove("list-box__item--active"),this.#S=-1)}#D(t,e,i){if(e>=0){const s=t.substring(0,e),l=t.substring(e,e+i),a=t.substring(e+i);return n`${s}${l}${a}`}return t}static get is(){return"list-box"}}window.customElements.get(r.is)||window.customElements.define(r.is,r);class h extends HTMLElement{#e;#_;#P;#U=null;#H;#p={onChangeValue:[]};connectedCallback(){this.innerHTML=this.#g(),this.#e=this.querySelector("text-input"),this.#_=this.querySelector("list-box"),this.#H=this.hasAttribute("shouldMatchOptions"),this.#E()}get value(){return this.#P}get rawValue(){return this.#e.value}set value(t){this.#P=t,this.#e.value=t&&t.displayName?t.displayName:""}set initialValue(t){this.value=t,this.#U=t}set options(t){this.#_.options=t,this.#F()}set errorMessage(t){this.#e.errorMessage=t}checkValidity(){return this.#j()&&this.#e.checkValidity()}onChangeValue(t){this.#p.onChangeValue.push(t)}setDisabled(t){this.toggleAttribute("disabled",t),this.#e.setDisabled(t)}#f(){this.errorMessage="",this.#F(),this.#_.isVisible()||this.#_.show()}#R(){this.#F(),this.#_.show()}#B(){this.#K()}#W(t){this.value=t,this.#K()}#z(){this.value={displayName:""},this.#e.querySelector("input").focus()}#Y(t){switch([s.Up,s.Down].includes(t.code)&&(t.preventDefault(),t.stopImmediatePropagation()),t.key){case s.Esc:this.#K();break;case s.Enter:this.#_.isVisible()&&(this.#_.hasSelectedElement()?this.#_.triggerClickOnSelectedItem():this.#K());break;case s.Down:this.#_.isVisible()||this.#_.show(),this.#_.selectNextItem();break;case s.Up:this.#_.isVisible()||this.#_.show(),this.#_.selectPrevItem()}}#G(){this.#V()}#K(){this.#_.hide(),this.#V()}#V(){this.#j()&&this.#X()&&(this.#U=this.value,this.#p.onChangeValue.forEach((t=>t(this.value))))}#j(){const t=this.#e.value;if(""===t)return this.#P=null,!0;if(this.value&&this.value.displayName===t)return this.errorMessage="",!0;if(!this.#H)return this.errorMessage="",this.#P={displayName:t},!0;for(const e of this.#_.options)if(e.displayName===t)return this.errorMessage="",this.#P=e,this.#e.value=e.displayName,!0;return this.#P=null,this.errorMessage="Select from list",!1}#F(){this.hasAttribute("nofiltering")||(this.#_.filter=this.#e.value)}#X(){return this.#U!==this.value}#E(){const t=this.#e.querySelector("input");this.addEventListener("keydown",this.#Y.bind(this)),this.addEventListener("keyup",(t=>{t.stopPropagation()})),t.addEventListener("input",this.#f.bind(this)),t.addEventListener("blur",this.#B.bind(this)),t.addEventListener("focus",this.#R.bind(this)),this.#e.onTrailingIconClick(this.#z.bind(this)),this.#e.onChangeValue(this.#G.bind(this)),this.#_.onOptionClick(this.#W.bind(this))}#g(){const t=this.hasAttribute("required")?"required":"",e=this.hasAttribute("disabled")?"disabled":"",i=this.hasAttribute("no-icon")?"":"close";return n`
- `}static get is(){return"typeahead-input"}}window.customElements.get(h.is)||window.customElements.define(h.is,h);class o extends HTMLElement{#e;#q;#_;#P=null;#p={onShowDropdown:[],onChangeValue:[]};get value(){return this.#_}set value(t){this.#e.value=t&&t.displayName?t.displayName:"",this.#_=t}set options(t){this.#q.options=t}set comparator(t){this.#q.comparator=t}setDisabled(t){this.toggleAttribute("disabled",t),this.#e.setDisabled(t)}showDropdown(){this.#q.show(),this.#p.onShowDropdown.forEach((t=>t()))}onShowDropdown(t){this.#p.onShowDropdown.push(t)}onChangeValue(t){this.#p.onChangeValue.push(t)}checkValidity(){return this.#j()}connectedCallback(){this.innerHTML=this.#g(),this.#e=this.querySelector("text-input"),this.#q=this.querySelector("list-box"),this.#E()}#E(){this.addEventListener("keydown",this.#z.bind(this));const t=this.#e.querySelector("input");t.addEventListener("focus",this.#R.bind(this)),t.addEventListener("focusout",this.#Y.bind(this)),t.addEventListener("click",this.#J.bind(this)),this.#q.onOptionClick(this.#F.bind(this))}#R(){this.showDropdown()}#Y(){this.#K()}#F(t){this.#e.value=t.displayName,this.#_=t,this.#K()}#J(){this.showDropdown()}#z(t){switch([s.Up,s.Down].includes(t.code)&&(t.preventDefault(),t.stopImmediatePropagation()),t.key){case s.Esc:t.preventDefault(),this.#K(),this.#e.focus();break;case s.Enter:this.#q.isVisible()&&(t.stopPropagation(),this.#q.hasSelectedElement()?this.#q.triggerClickOnSelectedItem():this.#q.hide());break;case s.Down:this.#q.isVisible()||this.#q.show(),this.#q.selectNextItem();break;case s.Up:this.#q.isVisible()||this.#q.show(),this.#q.selectPrevItem()}}#K(){this.#q.hide(),this.#V()}#V(){this.#j()&&this.#P!==this.value&&(this.#P=this.value,this.#p.onChangeValue.forEach((t=>t(this.value))))}#j(){return this.#e.hasAttribute("required")&&!this.#e.value?this.#e.errorMessage="Required":this.#e.errorMessage="",this.#e.checkValidity()}#g(){const t=this.hasAttribute("required")?"required":"",e=this.hasAttribute("disabled")?"disabled":"";return n`
+ `}static get is(){return"typeahead-input"}}window.customElements.get(h.is)||window.customElements.define(h.is,h);class o extends HTMLElement{#e;#_;#P;#U=null;#p={onShowDropdown:[],onChangeValue:[]};get value(){return this.#P}set value(t){this.#e.value=t&&t.displayName?t.displayName:"",this.#P=t}set options(t){this.#_.options=t}set comparator(t){this.#_.comparator=t}setDisabled(t){this.toggleAttribute("disabled",t),this.#e.setDisabled(t)}showDropdown(){this.#_.show(),this.#p.onShowDropdown.forEach((t=>t()))}onShowDropdown(t){this.#p.onShowDropdown.push(t)}onChangeValue(t){this.#p.onChangeValue.push(t)}checkValidity(){return this.#j()}connectedCallback(){this.innerHTML=this.#g(),this.#e=this.querySelector("text-input"),this.#_=this.querySelector("list-box"),this.#E()}#E(){this.addEventListener("keydown",this.#Y.bind(this));const t=this.#e.querySelector("input");t.addEventListener("focus",this.#R.bind(this)),t.addEventListener("focusout",this.#J.bind(this)),t.addEventListener("click",this.#Q.bind(this)),this.#_.onOptionClick(this.#W.bind(this))}#R(){this.showDropdown()}#J(){this.#K()}#W(t){this.#e.value=t.displayName,this.#P=t,this.#K()}#Q(){this.showDropdown()}#Y(t){switch([s.Up,s.Down].includes(t.code)&&(t.preventDefault(),t.stopImmediatePropagation()),t.key){case s.Esc:t.preventDefault(),this.#K(),this.#e.focus();break;case s.Enter:this.#_.isVisible()&&(t.stopPropagation(),this.#_.hasSelectedElement()?this.#_.triggerClickOnSelectedItem():this.#_.hide());break;case s.Down:this.#_.isVisible()||this.#_.show(),this.#_.selectNextItem();break;case s.Up:this.#_.isVisible()||this.#_.show(),this.#_.selectPrevItem()}}#K(){this.#_.hide(),this.#V()}#V(){this.#j()&&this.#U!==this.value&&(this.#U=this.value,this.#p.onChangeValue.forEach((t=>t(this.value))))}#j(){return this.#e.hasAttribute("required")&&!this.#e.value?this.#e.errorMessage="Required":this.#e.errorMessage="",this.#e.checkValidity()}#g(){const t=this.hasAttribute("required")?"required":"",e=this.hasAttribute("disabled")?"disabled":"";return n`
- `}static get is(){return"select-input"}}window.customElements.get(o.is)||window.customElements.define(o.is,o);class u extends HTMLElement{#Q;#i=!0;#Z;#tt="";#et="";#it=t=>t;#st=new ResizeObserver(this.#nt.bind(this));#p={onChangeValue:[]};connectedCallback(){this.innerHTML=this.#g(),this.#Q={text:this.querySelector(".edit-text__text"),popup:this.querySelector(".edit-text__popup"),input:this.querySelector("text-input")},this.#E(),this.#st.observe(document.body),this.#lt(),this.#at()}disconnectedCallback(){this.#st.unobserve(document.body)}onChange(t){this.#p.onChangeValue.push(t)}checkValidity(){return this.#Q.input.checkValidity()}toggleIncorrectAttribute(t){this.toggleAttribute("incorrect",t)}addExternalValidator(t){this.#Q.input.addValidator(t)}addValidator(t){this.#Q.input.addValidator(t)}get value(){return this.#Q.input.value}set value(t){this.#Q.input.value=t,this.#at()}set displayTextTransformer(t){this.#it=t}#rt(){return this.getAttribute("value")}#ht(){let t=this.#it(this.#rt());return this.#ot()&&(t=+t),`${this.#et}${t}${this.#tt}`}#E(){this.#Q.text.addEventListener("click",this.#ut.bind(this)),this.addEventListener("click",this.#dt.bind(this)),this.#Q.popup.addEventListener("keydown",this.#z.bind(this)),this.#Q.input.onInput(this.#f.bind(this)),this.#Q.popup.addEventListener("cancel",this.#pt.bind(this))}#ut(){this.toggleIncorrectAttribute(!1),this.#ct(),this.#nt(),this.#Q.popup.showModal(),this.#Q.input.focus()}#f(t,e){this.#i=e}#pt(){this.#Q.input.value=this.#Z}#mt(){this.checkValidity()&&(this.#Q.popup.close(),this.#gt())}#dt(t){t.preventDefault(),t.stopPropagation(),t.target===this.#Q.popup&&(this.#Q.popup.close(),this.#gt())}#gt(){if(!this.#i)return void(this.#Q.input.value=this.#rt());this.#rt()!==this.#Q.input.value&&this.#Q.input.value.length&&(this.#at(),this.#p.onChangeValue.forEach((t=>t(this.#rt()))));const t=this.#Q.input.rawValue;0!==t.length||this.#Q.input.hasAttribute("required")?(this.#Z=t,this.#Q.text.toggleAttribute("empty-value",!1)):this.#bt()}#bt(){this.#Q.text.textContent="set",this.#Q.text.toggleAttribute("empty-value",!0),this.removeAttribute("value"),this.removeAttribute("title")}#z(t){t.stopPropagation(),t.repeat||t.key===s.Enter&&!t.repeat&&this.#i&&this.#mt()}#ct(){this.hasAttribute("value")&&(this.#Z=this.getAttribute("value"),this.#Q.input.value=this.#Z)}#at(){this.setAttribute("value",this.#Q.input.value),this.setAttribute("title",this.#Q.input.value),this.#Q.text.toggleAttribute("empty-value",!1);let t=this.#rt();"string"==typeof t&&t.length>0?this.#Q.text.textContent=this.#ht():this.#bt()}#nt(){let{top:t,left:e}=this.getBoundingClientRect();this.#Q.popup.style.top=t+window.scrollY+"px",this.#Q.popup.style.left=e+window.scrollX+"px",this.hasAttribute("max-width")?this.#Q.popup.style.width=l(this.#Q.input.rawValue)+16+"px":this.#Q.popup.style["max-width"]=Math.max(this.offsetWidth+16,128)+"px"}#ot(){return"number"===this.getAttribute("type")}#lt(){this.hasAttribute("suffix")&&(this.#tt=this.getAttribute("suffix")),this.hasAttribute("prefix")&&(this.#et=this.getAttribute("prefix")),this.hasAttribute("max-width")&&(this.#Q.popup.style["max-width"]=this.getAttribute("max-width")+"px",this.#Q.input.style["max-width"]=this.getAttribute("max-width")-16+"px"),this.hasAttribute("min-width")&&(this.#Q.popup.style["min-width"]=this.getAttribute("min-width")+"px",this.#Q.input.style["min-width"]=this.getAttribute("min-width")-16+"px"),this.#Q.input.value=this.#rt(),this.hasAttribute("scale")&&(this.displayTextTransformer=t=>function(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}(t,parseInt(this.getAttribute("scale"))))}#g(){const t=this.hasAttribute("required")?"required":"",e=this.getAttribute("type")||"text";let i="";this.hasAttribute("step")&&(i=`step="${this.getAttribute("step")}"`);let s="";this.hasAttribute("min")&&(s=`min="${this.getAttribute("min")}"`);let n="";this.hasAttribute("max")&&(n=`max="${this.getAttribute("max")}"`);let l="";this.hasAttribute("minlength")&&(l=`minlength="${this.getAttribute("minlength")}"`);let a="";this.hasAttribute("maxlength")&&(a=`maxlength="${this.getAttribute("maxlength")}"`);let r="";this.hasAttribute("pattern")&&(r=`pattern="${this.getAttribute("pattern")}"`);let h="";return this.hasAttribute("number-type")&&(h=`number-type="${this.getAttribute("number-type")}"`),`\n `}static get is(){return"edit-text"}}return window.customElements.get(u.is)||window.customElements.define(u.is,u),e})()));
+ `}static get is(){return"select-input"}}window.customElements.get(o.is)||window.customElements.define(o.is,o);class u extends HTMLElement{#Z;#i=!0;#tt;#et="";#it="";#st=t=>t;#nt=new ResizeObserver(this.#lt.bind(this));#p={onChangeValue:[]};connectedCallback(){this.innerHTML=this.#g(),this.#Z={text:this.querySelector(".edit-text__text"),popup:this.querySelector(".edit-text__popup"),input:this.querySelector("text-input")},this.#E(),this.#nt.observe(document.body),this.#at(),this.#rt()}disconnectedCallback(){this.#nt.unobserve(document.body)}onChange(t){this.#p.onChangeValue.push(t)}checkValidity(){return this.#Z.input.checkValidity()}toggleIncorrectAttribute(t){this.toggleAttribute("incorrect",t)}addExternalValidator(t){this.#Z.input.addValidator(t)}addValidator(t){this.#Z.input.addValidator(t)}get value(){return this.#Z.input.value}set value(t){this.#Z.input.value=t,this.#rt()}set displayTextTransformer(t){this.#st=t}#ht(){return this.getAttribute("value")}#ot(){let t=this.#st(this.#ht());return this.#ut()&&(t=+t),`${this.#it}${t}${this.#et}`}#E(){this.#Z.text.addEventListener("click",this.#dt.bind(this)),this.addEventListener("click",this.#pt.bind(this)),this.#Z.popup.addEventListener("keydown",this.#Y.bind(this)),this.#Z.input.onInput(this.#f.bind(this)),this.#Z.popup.addEventListener("cancel",this.#ct.bind(this))}#dt(){this.toggleIncorrectAttribute(!1),this.#mt(),this.#lt(),this.#Z.popup.showModal(),this.#Z.input.focus()}#f(t,e){this.#i=e}#ct(){this.#Z.input.value=this.#tt}#gt(){this.checkValidity()&&(this.#Z.popup.close(),this.#bt())}#pt(t){t.preventDefault(),t.stopPropagation(),t.target===this.#Z.popup&&(this.#Z.popup.close(),this.#bt())}#bt(){if(!this.#i)return void(this.#Z.input.value=this.#ht());this.#ht()!==this.#Z.input.value&&this.#Z.input.value.length&&(this.#rt(),this.#p.onChangeValue.forEach((t=>t(this.#ht()))));const t=this.#Z.input.rawValue;0!==t.length||this.#Z.input.hasAttribute("required")?(this.#tt=t,this.#Z.text.toggleAttribute("empty-value",!1)):this.#Et()}#Et(){this.#Z.text.textContent="set",this.#Z.text.toggleAttribute("empty-value",!0),this.removeAttribute("value"),this.removeAttribute("title")}#Y(t){t.stopPropagation(),t.repeat||t.key===s.Enter&&!t.repeat&&this.#i&&this.#gt()}#mt(){this.hasAttribute("value")&&(this.#tt=this.getAttribute("value"),this.#Z.input.value=this.#tt)}#rt(){this.setAttribute("value",this.#Z.input.value),this.setAttribute("title",this.#Z.input.value),this.#Z.text.toggleAttribute("empty-value",!1);let t=this.#ht();"string"==typeof t&&t.length>0?this.#Z.text.textContent=this.#ot():this.#Et()}#lt(){let{top:t,left:e}=this.getBoundingClientRect();this.#Z.popup.style.top=t+window.scrollY+"px",this.#Z.popup.style.left=e+window.scrollX+"px",this.hasAttribute("max-width")?this.#Z.popup.style.width=l(this.#Z.input.rawValue)+16+"px":this.#Z.popup.style["max-width"]=Math.max(this.offsetWidth+16,128)+"px"}#ut(){return"number"===this.getAttribute("type")}#at(){this.hasAttribute("suffix")&&(this.#et=this.getAttribute("suffix")),this.hasAttribute("prefix")&&(this.#it=this.getAttribute("prefix")),this.hasAttribute("max-width")&&(this.#Z.popup.style["max-width"]=this.getAttribute("max-width")+"px",this.#Z.input.style["max-width"]=this.getAttribute("max-width")-16+"px"),this.hasAttribute("min-width")&&(this.#Z.popup.style["min-width"]=this.getAttribute("min-width")+"px",this.#Z.input.style["min-width"]=this.getAttribute("min-width")-16+"px"),this.#Z.input.value=this.#ht(),this.hasAttribute("scale")&&(this.displayTextTransformer=t=>function(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}(t,parseInt(this.getAttribute("scale"))))}#g(){const t=this.hasAttribute("required")?"required":"",e=this.getAttribute("type")||"text";let i="";this.hasAttribute("step")&&(i=`step="${this.getAttribute("step")}"`);let s="";this.hasAttribute("min")&&(s=`min="${this.getAttribute("min")}"`);let n="";this.hasAttribute("max")&&(n=`max="${this.getAttribute("max")}"`);let l="";this.hasAttribute("minlength")&&(l=`minlength="${this.getAttribute("minlength")}"`);let a="";this.hasAttribute("maxlength")&&(a=`maxlength="${this.getAttribute("maxlength")}"`);let r="";this.hasAttribute("pattern")&&(r=`pattern="${this.getAttribute("pattern")}"`);let h="";return this.hasAttribute("number-type")&&(h=`number-type="${this.getAttribute("number-type")}"`),`\n `}static get is(){return"edit-text"}}return window.customElements.get(u.is)||window.customElements.define(u.is,u),e})()));
//# sourceMappingURL=index.bundle.js.map
\ No newline at end of file
diff --git a/index.bundle.js.map b/index.bundle.js.map
index e16e98c..075d3b1 100644
--- a/index.bundle.js.map
+++ b/index.bundle.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.bundle.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,G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IAAI2L,EAAc,GACdvN,KAAKuB,aAAa,aAClBgM,EAAc,YAAYvN,KAAK4B,aAAa,eAChD,IAAI4L,EAAiB,GAGrB,OAFIxN,KAAKuB,aAAa,iBAClBiM,EAAiB,gBAAgBxN,KAAK4B,aAAa,mBAChD,qUAMeoL,kCACAE,kCACAC,kCACAC,kCACAC,kCACAC,kCACAC,kCACAC,wCACMP,uEAGhC,CAEA,aAAWlG,GACP,MAAO,WACX,E,OAIClC,OAAOmC,eAAe5H,IAAIgM,EAASrE,KACpClC,OAAOmC,eAAetI,OAAO0M,EAASrE,GAAIqE,G","sources":["webpack://elsciUi/webpack/universalModuleDefinition","webpack://elsciUi/webpack/bootstrap","webpack://elsciUi/webpack/runtime/define property getters","webpack://elsciUi/webpack/runtime/hasOwnProperty shorthand","webpack://elsciUi/webpack/runtime/make namespace object","webpack://elsciUi/./src/TextInput/TextInputValidityState.js","webpack://elsciUi/./src/utils.js","webpack://elsciUi/./src/TextInput/TextInput.js","webpack://elsciUi/./src/ListBox/ListBox.js","webpack://elsciUi/./src/TypeAheadInput/TypeAheadInput.js","webpack://elsciUi/./src/SelectInput/SelectInput.js","webpack://elsciUi/./src/EditText/EditText.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"elsciUi\"] = factory();\n\telse\n\t\troot[\"elsciUi\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export default class TextInputValidityState {\n\t#textInput;\n\t#inputElement;\n\t#isValid;\n\t#errorMessage;\n\n\tconstructor(textInput) {\n\t\tthis.#textInput = textInput\n\t\tthis.#inputElement = textInput.querySelector('input');\n\t\tthis.#isValid = true;\n\t\tthis.#errorMessage = \"\";\n\t}\n\n\tget isValid() {\n\t\treturn this.#isValid;\n\t}\n\n\tget errorMessage() {\n\t\treturn this.#errorMessage;\n\t}\n\n\tcheckValidity() {\n\t\t// reset custom validity\n\t\tthis.setCustomValidity(\"\");\n\t\tthis.#inputElement.checkValidity();\n\t\t// if the input element is valid, then check custom validity\n\t\tlet validity = this.#inputElement.validity;\n\t\tif (validity.valid) {\n\t\t\tvalidity = this.#getCustomValidity();\n\t\t}\n\t\tthis.#isValid = validity.valid;\n\t\tthis.#errorMessage = this.#getValidationMessage(validity);\n\t\treturn this.isValid;\n\t}\n\n\tsetCustomValidity(message) {\n\t\tthis.#inputElement.setCustomValidity(message);\n\t\tthis.#isValid = this.#inputElement.validity.valid;\n\t\tthis.#errorMessage = message;\n\t}\n\n\t/**\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/ValidityState\n\t * Here we add our own validation steps, and update the validity state properties.\n\t * - valueMissing: if the input element is required and the trimmed text is empty (contains only whitespaces).\n\t * - rangeUnderflow: if the input element is a number and the value is less than the min attribute.\n\t * - rangeOverflow: if the input element is a number and the value is greater than the max attribute.\n\t */\n\t#getCustomValidity() {\n\t\tconst {badInput, customError, patternMismatch, typeMismatch, valid, rangeOverflow, rangeUnderflow, tooLong,\n\t\t\ttooShort, valueMissing, stepMismatch} = this.#inputElement.validity;\n\t\tconst cv = Object.assign({},\n\t\t\t{badInput, customError, patternMismatch, typeMismatch, valid, rangeOverflow, rangeUnderflow, tooLong,\n\t\t\t\ttooShort, valueMissing, stepMismatch},\n\t\t\tthis.#isBlanknessConstraintViolated(),\n\t\t\tthis.#isRangeConstraintViolated(),\n\t\t\tthis.#isStepConstraintViolated()\n\t\t);\n\t\tcv.valid = !cv.valueMissing && !cv.rangeUnderflow && !cv.rangeOverflow && !cv.stepMismatch;\n\t\treturn cv;\n\t}\n\n\t/**\n\t * Checks if the input element is required and the trimmed text is empty (contains only whitespaces).\n\t * @returns {{valueMissing: (*|boolean)}}\n\t */\n\t#isBlanknessConstraintViolated() {\n\t\tconst trimmedText = this.#inputElement.value.trim();\n\t\treturn {valueMissing: this.#textInput.hasAttribute(\"required\") && trimmedText === \"\"};\n\t}\n\n\t/**\n\t * This is a workaround for the fact that the browser does not validate decimals properly. It takes only\n\t * first 18 digits of the decimal number and then compares it with the min and max attributes.\n\t * So if the min attribute is 0 and the value is -0.0000000000000000001, then the browser will not\n\t * consider it as a range underflow (after conversion it becomes -0 => 0).\n\t * This is why we have to check the value manually.\n\t */\n\t#isRangeConstraintViolated() {\n\t\tif (this.#inputElement.type !== \"number\")\n\t\t\treturn {rangeUnderflow: false, rangeOverflow: false};\n\t\tconst {min, max, value} = this.#inputElement;\n\t\treturn {rangeUnderflow: (min !== \"\" && +value < +min), rangeOverflow: (max !== \"\" && +value > +max)};\n\t}\n\n\t/**\n\t * This method serves to supplement internal validation to determine whether a float qualifies as an integer.\n\t * The internal validation for an input type=\"number\" step=\"1\" doesn't consistently cover all cases.\n\t * For example, the number 2.00000001 might be considered an integer by the internal validator.\n\t * So we are using attribute 'number-type=\"integer\"'\n\t * The aim is to widen this validation range. Now, the comparison for an integer works correctly when a number\n\t * has no more than 16 digits. However, if a number has 17 digits or more, this function returns incorrect result.\n\t *\n\t * We use StepMismatch property because internal validation writes this error to this property\n\t * StepMismatch property of a ValidityState object indicates if the value of an , after having been edited\n\t * by the user, does not conform to the constraints set by the element's step attribute.\n\t *\n\t * @return {{stepMismatch: boolean}}\n\t */\n\t#isStepConstraintViolated() {\n\t\tif (this.#inputElement.type !== \"number\")\n\t\t\treturn {stepMismatch: false};\n\t\tconst numberType = this.#textInput.getAttribute('number-type');\n\t\tif (!numberType || numberType !== \"integer\")\n\t\t\treturn {stepMismatch: false};\n\t\tconst stepMismatch = !Number.isInteger(this.#inputElement.valueAsNumber);\n\t\treturn {stepMismatch: stepMismatch};\n\t}\n\n\t#getValidationMessage(validityState) {\n\t\tconst isTypeNumber = this.#inputElement.type === \"number\";\n\t\tconst {badInput, rangeOverflow, rangeUnderflow, tooLong, tooShort, valueMissing, stepMismatch} = validityState;\n\t\tif (isTypeNumber && badInput)\n\t\t\treturn \"Invalid number\";\n\t\tif (isTypeNumber && stepMismatch) {\n\t\t\tif (this.#inputElement.step === \"1\" ){\n\t\t\t\t// Here we checked floats because if step is 1, then the value must be an integer.\n\t\t\t\t// Now we can use attribute 'number-type=\"integer\"', but we have previously written inputs,\n\t\t\t\t// that's why don't want to remove this code\n\t\t\t\treturn \"Must be an integer\";\n\t\t\t}\n\t\t\tconst numberType = this.#textInput.getAttribute('number-type');\n\t\t\tif (numberType && numberType === \"integer\") {\n\t\t\t\treturn \"Must be an integer\";\n\t\t\t}\n\t\t}\n\t\tif (rangeOverflow)\n\t\t\treturn \"Greater than \" + this.#inputElement.max;\n\t\tif (rangeUnderflow)\n\t\t\treturn \"Less than \" + this.#inputElement.min;\n\t\tif (tooLong)\n\t\t\treturn \"Max length is \" + this.#inputElement.maxLength;\n\t\tif (tooShort)\n\t\t\treturn \"Min length is \" + this.#inputElement.minLength;\n\t\tif (!badInput && valueMissing)\n\t\t\treturn \"Required\";\n\t\treturn this.#inputElement.validationMessage;\n\t}\n}","export const KeyCode = Object.freeze({\n \"Shift\": \"ShiftLeft\",\n \"Esc\": \"Escape\",\n \"Enter\": \"Enter\",\n \"Up\": \"ArrowUp\",\n \"Down\": \"ArrowDown\"\n});\n\n/**\n * @param {string} unsafe\n * @returns {string}\n */\nexport const safeText = (unsafe) => {\n if (!unsafe)\n return ''\n return unsafe\n .replace(/&/g, \"&\")\n .replace(//g, \">\")\n .replace(/\"/g, \""\")\n .replace(/'/g, \"'\");\n}\n\n/**\n * To be used when generating HTML via string interpolation e.g. {@code safeHtml`
${variables}
`} -\n * these variables will go through this function and have to be escaped should such string be shown on UI.\n *\n * @param {TemplateStringsArray} strings\n * @param {string[]} values\n * @returns {string}\n */\nexport const safeHtml = (strings, ...values) => {\n let result = strings[0];\n for (let i = 0; i < values.length; i++) {\n result += safeText(String(values[i]));\n result += strings[i + 1];\n }\n return result;\n}\n\n/* @param {String} text */\nexport function getTextWidth(text) {\n const span = document.createElement(\"span\");\n document.body.appendChild(span)\n span.textContent = text;\n span.style.fontSize = '1rem';\n span.style.visibility = 'hidden';\n span.style.position = 'absolute';\n const width = Math.ceil(span.getBoundingClientRect().width) + 1;\n span.remove();\n return width;\n}\n\nfunction getCssStyle(element, prop) {\n return window.getComputedStyle(element, null).getPropertyValue(prop);\n}\n\nexport function isFiniteNumber (value) {\n if (typeof value !== 'undefined' && Number.isFinite(value)) {\n return true\n }\n else return false\n}\n\n/**\n * Function that rounds a number to a specified number of decimal places.\n * @param {number} number\n * @param {number} decimalPlaces\n * @return {number}\n */\nexport function roundToDecimalPlaces(number, decimalPlaces) {\n const multiplier = Math.pow(10, decimalPlaces);\n return Math.round(number * multiplier) / multiplier;\n}","// @ts-check\nimport TextInputValidityState from \"./TextInputValidityState.js\";\nimport {isFiniteNumber, KeyCode, safeHtml} from \"../utils.js\"\n\n/**\n * @typedef {import(\"../InputValidator.js\").default} InputValidator\n */\nexport default class TextInput extends HTMLElement {\n static #INPUT_ATTRIBUTES = new Set([\"autocomplete\", \"autofocus\", \"disabled\", \"max\", \"maxlength\",\n \"min\", \"minlength\", \"name\", \"pattern\", \"readonly\", \"step\", \"type\", \"value\", \"placeholder\"\n /* \"required\" - we do not want to set attribute required when render text-input, because in this case all\n required inputs becomes red, as solution we just leave it in the root element and do this validation manually */]);\n /** @type {HTMLInputElement} */\n #inputElement;\n /** @type {HTMLElement} */\n #errorElement;\n /** @type {TextInputValidityState} */\n #validityState;\n #callbacks = {\n /** @type {Function[]} */\n onTrailingIconClick: [],\n /** @type {Function[]} */\n onChangeValue: [],\n /** @type {Function[]} */\n onInput: []\n };\n /** @type {string} */\n #lastChangedValue;\n /** @type {InputValidator[]} */\n #validators = [];\n\n connectedCallback() {\n this.innerHTML = this.#htmlTemplate();\n this.#inputElement = this.querySelector(\"input\");\n this.#errorElement = this.querySelector(\".text-input__error\");\n this.#validityState = new TextInputValidityState(this);\n this.#fillInputAttributes();\n this.#addListeners();\n if (this.hasAttribute(\"value\"))\n this.value = this.getAttribute(\"value\");\n }\n\n disconnectedCallback() {\n // Save value to attribute, because it will be lost after element is removed from DOM and reinserted.\n // The case is happening when user adds new element to the table and then sorts it by reinserting rows.\n this.setAttribute(\"value\", this.value);\n window.removeEventListener(\"visibilitychange\", this.#onVisibilityChange.bind(this), { capture: true });\n }\n\n /** @param {InputValidator} validator */\n addValidator(validator) {\n this.#validators.push(validator);\n }\n\n /**\n * Returns trimmed value of the input.\n * @returns {string}\n */\n get value() {\n return this.rawValue.trim();\n }\n\n /**\n * Returns raw value of the input.\n * @returns {string}\n */\n get rawValue() {\n return this.#inputElement.value;\n }\n\n /** @param {string | null} value */\n set value(value) {\n this.#inputElement.value = (isFiniteNumber(value) || typeof value == \"string\")? value : '';\n this.#lastChangedValue = this.#inputElement.value\n this.checkValidity();\n }\n\n checkValidity() {\n if (!this.#validityState.checkValidity()){\n this.errorMessage = this.#validityState.errorMessage;\n return false;\n }\n this.errorMessage = this.#validityState.errorMessage;\n for (const validator of this.#validators) {\n const result = validator.validate(this, this.value);\n if (!result.isValid) {\n this.errorMessage = result.errorMessage;\n this.focus()\n return false;\n }\n }\n return true;\n }\n\n get errorMessage() {\n return this.#errorElement.textContent;\n }\n\n set errorMessage(message) {\n // We reset lastChangedValue because if the same invalid value is entered again, we want to validate this value\n if (message){\n this.#lastChangedValue = null;\n }\n this.#validityState.setCustomValidity(message);\n this.#errorElement.textContent = this.#validityState.errorMessage;\n }\n\n /** @param {Function} callback */\n onTrailingIconClick(callback) {\n this.#callbacks.onTrailingIconClick.push(callback);\n }\n /** @param {Function} callback */\n onInput(callback) {\n this.#callbacks.onInput.push(callback);\n }\n /** @param {Function} callback */\n onChangeValue(callback) {\n this.#callbacks.onChangeValue.push(callback);\n }\n\n // @ts-ignore\n focus(options) {\n this.#inputElement.focus(options)\n }\n\n /** @param {boolean} isDisabled */\n setDisabled(isDisabled) {\n this.toggleAttribute(\"disabled\", isDisabled);\n this.#inputElement.toggleAttribute(\"disabled\", isDisabled);\n }\n\n /** @param {KeyboardEvent} event */\n #onKeyDown(event) {\n if (this.#inputElement.type === \"number\" && (event.key === KeyCode.Up || event.key === KeyCode.Down))\n event.preventDefault();\n if (event.key === KeyCode.Enter && !event.repeat)\n this.#onChange();\n }\n\n #onInput() {\n const isValid = this.checkValidity();\n this.#callbacks.onInput.forEach(callback => callback(this.value, isValid));\n }\n\n #onChange() {\n // We validate if the current value is not equal to the last changed value\n if (this.#lastChangedValue !== this.value)\n this.#validateAndNotify();\n }\n\n #onTrailingIconClick() {\n this.#callbacks.onTrailingIconClick.forEach(callback => callback());\n }\n\n #validateAndNotify() {\n if (this.checkValidity()) {\n this.#lastChangedValue = this.value;\n this.#callbacks.onChangeValue.forEach(callback => callback(this.value));\n }\n }\n\n #fillInputAttributes() {\n for (const attribute of this.attributes)\n if (TextInput.#INPUT_ATTRIBUTES.has(attribute.name))\n this.#inputElement.setAttribute(attribute.name, attribute.value)\n // For number inputs, if step is not specified then it is set to 1 by default, and it is not possible to enter\n // decimal w/o validation error. So, if step is not specified, then we set it to \"any\" to allow decimal values.\n if (this.getAttribute(\"type\") === \"number\" && !this.hasAttribute(\"step\"))\n this.#inputElement.setAttribute(\"step\", \"any\");\n if (this.hasAttribute(\"placeholder\"))\n this.classList.add(\"placeholder-shown\");\n }\n\n #addListeners() {\n this.#inputElement.addEventListener(\"keydown\", this.#onKeyDown.bind(this));\n this.#inputElement.addEventListener(\"input\", this.#onInput.bind(this));\n this.#inputElement.addEventListener(\"focusout\", this.#onChange.bind(this));\n this.querySelector('.text-input__trailing-icon').addEventListener(\"click\", this.#onTrailingIconClick.bind(this));\n window.addEventListener(\"visibilitychange\", this.#onVisibilityChange.bind(this), { capture: true });\n }\n\n /**\n * This method is called when user:\n * - closes the tab\n * - closes browser window\n * - refreshes the page\n * - navigates to another page\n * - navigates to another tab\n * - minimizes the browser window\n *\n * It is needed to blur the input element, because if it is focused, then it might be not saved to the database.\n * Blurring the input element will trigger the change event, if the value was changed.\n *\n * Note: If the user closes the tab or browser window, then there is no guarantee that asynchronous requests\n * (XHR or fetch) will be sent. So, if the user closes the tab or browser window, then the value\n * of the input element might not be saved to the database.\n */\n #onVisibilityChange() {\n if (document.activeElement === this.#inputElement)\n this.#inputElement.blur();\n }\n\n #htmlTemplate() {\n const trailingIconName = this.getAttribute(\"data-icon\") || \"\";\n return safeHtml`\n \n ${trailingIconName}\n `;\n }\n\n static get is() {\n return 'text-input';\n }\n}\n\n// Checking, is a custom element already defined\nif(!window.customElements.get(TextInput.is)){\n window.customElements.define(TextInput.is, TextInput);\n}\n","import {getTextWidth, safeHtml} from \"../utils.js\";\n\nexport default class ListBox extends HTMLElement {\n #listElement;\n #values = [];\n #maxItemWidth = 0;\n #selectedElementIndex = -1;\n /** @type {function|null} */\n #comparator = (a, b) => a.displayName.localeCompare(b.displayName);\n #callbacks = {\n onOptionClick: []\n }\n\n /**\n * @returns {{displayName:string}[]}\n */\n get options() {\n return this.#values;\n }\n\n /**\n * @param {{displayName:string}[]}values\n */\n set options(values) {\n this.#setValues(values);\n this.innerHTML = this.#htmlTemplate();\n this.#listElement = this.querySelector(\"ul\");\n this.#updatePosition();\n this.#addListeners();\n }\n\n /** @param {function|null} comparator */\n set comparator(comparator) {\n this.#comparator = comparator;\n }\n\n /**\n * @param {string} filter\n */\n set filter(filter) {\n const searchString = filter.toLowerCase();\n for (const li of this.querySelectorAll(\"li\")) {\n const {displayName} = this.#values[li.dataset.index];\n const indexOf = displayName.toLowerCase().indexOf(searchString);\n li.innerHTML = this.#getMarkedText(displayName, indexOf, searchString.length);\n li.toggleAttribute('hidden', indexOf === -1);\n }\n const selectedElement = this.#getSelectedElement();\n if (selectedElement) {\n if (selectedElement.hasAttribute('hidden'))\n this.#resetCurrentSelection();\n else\n selectedElement.scrollIntoView({block: \"nearest\"});\n }\n }\n\n show() {\n this.style.display = 'block';\n this.#updatePosition();\n }\n\n hide() {\n this.style.display = 'none';\n this.#resetCurrentSelection();\n }\n\n selectNextItem() {\n const visibleElements = this.#getVisibleElements();\n if (!this.hasSelectedElement()) {\n if (visibleElements.length === 0)\n return;\n this.#setSelectedElement(visibleElements[0].dataset.index);\n } else {\n const indexOf = visibleElements.indexOf(this.#getSelectedElement());\n if (visibleElements.length - 1 <= indexOf) // is last item?\n return;\n this.#setSelectedElement(visibleElements[indexOf + 1].dataset.index);\n }\n }\n\n selectPrevItem() {\n const visibleElements = this.#getVisibleElements();\n if (!this.hasSelectedElement()) {\n if (visibleElements.length === 0)\n return;\n this.#setSelectedElement(visibleElements[visibleElements.length - 1].dataset.index);\n } else {\n const indexOf = visibleElements.indexOf(this.#getSelectedElement());\n if (indexOf === 0) // is first item?\n return;\n this.#setSelectedElement(visibleElements[indexOf - 1].dataset.index);\n }\n }\n\n triggerClickOnSelectedItem() {\n if (this.hasSelectedElement())\n this.#getSelectedElement().dispatchEvent(new MouseEvent('mousedown'));\n }\n\n hasSelectedElement() {\n return this.#getSelectedElement() != null;\n }\n\n isVisible() {\n return window.getComputedStyle(this).display !== 'none'\n }\n\n onOptionClick(cb) {\n this.#callbacks.onOptionClick.push(cb);\n }\n\n connectedCallback() {\n this.innerHTML = this.#htmlTemplate();\n this.#listElement = this.querySelector(\"ul\");\n this.#addListeners();\n }\n\n /**\n * @param {{displayName:string}[]}values\n */\n #setValues(values) {\n if (typeof this.#comparator === \"function\") {\n this.#values = [...values].sort(this.#comparator);\n } else {\n this.#values = values\n }\n }\n\n #getVisibleElements() {\n return [...this.#listElement.querySelectorAll('li:not([hidden])')];\n }\n\n #addListeners() {\n this.#listElement.addEventListener(\"mousedown\", (evt)=>{\n // When we use TypeAhead Input or Select Input in dialog and click on scroll bar, dialog takes focus\n // and list box is closed. So we need to prevent the default behavior of the mousedown event\n evt.preventDefault();\n })\n for (const li of this.querySelectorAll(\"li\")) {\n li.addEventListener('mousedown', () => {\n const option = this.#values[li.dataset.index];\n this.#callbacks.onOptionClick.forEach(cb => cb(option));\n });\n }\n }\n\n #htmlTemplate() {\n return `\n
\n ${this.#values.map((value, i) =>\n safeHtml`
${value.displayName}
`\n ).join('')}\n
`;\n }\n\n #updatePosition() {\n const parentClientRect = this.parentElement.getBoundingClientRect();\n if (this.#maxItemWidth === 0) // calculate max item width only once\n this.#maxItemWidth = Math.max(...this.#values.map(value => getTextWidth(value.displayName)), 0);\n // if parent element width is greater than max item width, set list width to parent width\n const widthToBe = Math.max(this.#maxItemWidth + 24/*paddings*/ + 22/*scrollbar*/, parentClientRect.width);\n // max allowed width is the distance from the left side of parent element to the right side of the page\n const maxAllowedWidth = document.documentElement.clientWidth - parentClientRect.left\n if (widthToBe > maxAllowedWidth) { // can't fit to the right side, so put it to the left side\n this.#listElement.style.right = 0;\n } else {\n this.#listElement.style.right = null;\n }\n this.#listElement.style.width = `${Math.min(widthToBe, document.documentElement.clientWidth)}px`;\n }\n\n #getSelectedElement() {\n return this.querySelector(`li[data-index=\"${this.#selectedElementIndex}\"]`);\n }\n\n #setSelectedElement(elementIndex) {\n this.#resetCurrentSelection();\n this.#selectedElementIndex = elementIndex;\n const element = this.#getSelectedElement();\n element.classList.add('list-box__item--active');\n element.scrollIntoView({block: \"nearest\"});\n }\n\n #resetCurrentSelection() {\n if (this.#selectedElementIndex >= 0) {\n const selectedElement = this.#getSelectedElement();\n selectedElement.classList.remove('list-box__item--active');\n this.#selectedElementIndex = -1;\n }\n }\n\n #getMarkedText(text, startIndex, length) {\n if (startIndex >= 0) {\n const before = text.substring(0, startIndex);\n const match = text.substring(startIndex, startIndex + length);\n const after = text.substring(startIndex + length);\n // wrap whole text in span to prevent swallowing spaces\n return safeHtml`${before}${match}${after}`;\n } else {\n return text;\n }\n }\n\n static get is() {\n return 'list-box';\n }\n}\n\n// Checking, is a custom element already defined\nif(!window.customElements.get(ListBox.is)){\n window.customElements.define(ListBox.is, ListBox);\n}\n","import '../TextInput/TextInput.js';\nimport '../ListBox/ListBox.js';\nimport { KeyCode, safeHtml } from \"../utils.js\"\n\nexport default class TypeAheadInput extends HTMLElement {\n /**\n * @type {TextInput}\n */\n #inputElement;\n /**\n * @type {ListBox}\n */\n #dropdownElement;\n #currentValue;\n #lastValidValue = null;\n #shouldMatchOptions;\n #callbacks = {\n onChangeValue: []\n }\n\n connectedCallback() {\n this.innerHTML = this.#htmlTemplate();\n this.#inputElement = this.querySelector(\"text-input\");\n this.#dropdownElement = this.querySelector(\"list-box\");\n this.#shouldMatchOptions = this.hasAttribute(\"shouldMatchOptions\")\n this.#addListeners();\n }\n\n get value() {\n return this.#currentValue;\n }\n\n get rawValue() {\n return this.#inputElement.value;\n }\n\n set value(value) {\n this.#currentValue = value;\n this.#inputElement.value = value && value.displayName ? value.displayName : \"\";\n }\n\n /**\n * Sets the initial value of the input, as well as the last valid value.\n */\n set initialValue(value) {\n this.value = value;\n this.#lastValidValue = value;\n }\n\n set options(options) {\n this.#dropdownElement.options = options;\n this.#filterDatalist();\n }\n\n set errorMessage(message) {\n this.#inputElement.errorMessage = message;\n }\n\n checkValidity() {\n return this.#validate() && this.#inputElement.checkValidity();\n }\n\n onChangeValue(callback) {\n this.#callbacks.onChangeValue.push(callback);\n }\n\n /** @param {boolean} isDisabled */\n setDisabled(isDisabled) {\n this.toggleAttribute(\"disabled\", isDisabled);\n this.#inputElement.setDisabled(isDisabled);\n }\n\n\n #onInput() {\n this.errorMessage = \"\";\n this.#filterDatalist();\n if (!this.#dropdownElement.isVisible())\n this.#dropdownElement.show();\n }\n\n #onFocus() {\n this.#filterDatalist();\n this.#dropdownElement.show();\n }\n\n #onBlur() {\n this.#hideDropdownAndValidate();\n }\n\n #onOptionClick(option) {\n this.value = option;\n this.#hideDropdownAndValidate();\n }\n\n #onClearIconClick() {\n this.value = {displayName: \"\"};\n this.#inputElement.querySelector('input').focus();\n }\n\n #onKeydown(event) {\n if ([KeyCode.Up, KeyCode.Down].includes(event.code)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n switch (event.key) {\n case KeyCode.Esc: {\n this.#hideDropdownAndValidate();\n break;\n }\n case KeyCode.Enter: {\n if (this.#dropdownElement.isVisible())\n if (this.#dropdownElement.hasSelectedElement())\n this.#dropdownElement.triggerClickOnSelectedItem();\n else\n this.#hideDropdownAndValidate();\n break;\n }\n case KeyCode.Down: {\n if (!this.#dropdownElement.isVisible())\n this.#dropdownElement.show();\n this.#dropdownElement.selectNextItem();\n break;\n }\n case KeyCode.Up: {\n if (!this.#dropdownElement.isVisible())\n this.#dropdownElement.show();\n this.#dropdownElement.selectPrevItem();\n break;\n }\n }\n }\n\n #onInputValueChange() {\n this.#validateAndNotify();\n }\n\n #hideDropdownAndValidate() {\n this.#dropdownElement.hide();\n this.#validateAndNotify();\n }\n\n #validateAndNotify() {\n if (this.#validate() && this.#isValueChanged()) {\n this.#lastValidValue = this.value;\n this.#callbacks.onChangeValue.forEach(callback => callback(this.value));\n }\n }\n\n #validate() {\n const inputText = this.#inputElement.value;\n if (inputText === \"\") {\n this.#currentValue = null;\n return true; // assume that value is valid if it is empty, otherwise required attribute should be set\n }\n if (this.value && this.value.displayName === inputText) {\n this.errorMessage = \"\";\n return true; // assume that value is valid if it is the same as the initial value\n }\n if (!this.#shouldMatchOptions) {\n this.errorMessage = \"\";\n this.#currentValue = {displayName: inputText};\n return true; // assume that value is valid if it should not match to any option\n }\n for (const option of this.#dropdownElement.options) {\n if (option.displayName === inputText) {\n this.errorMessage = \"\";\n this.#currentValue = option;\n this.#inputElement.value = option.displayName;\n return true;\n }\n }\n this.#currentValue = null;\n this.errorMessage = \"Select from list\";\n return false;\n }\n\n #filterDatalist() {\n // We use attribute \"nofiltering\" when make filtration ourselves\n if (this.hasAttribute('nofiltering'))\n return\n this.#dropdownElement.filter = this.#inputElement.value;\n }\n\n #isValueChanged() {\n return this.#lastValidValue !== this.value;\n }\n\n #addListeners() {\n const input = this.#inputElement.querySelector(\"input\");\n this.addEventListener(\"keydown\", this.#onKeydown.bind(this));\n this.addEventListener(\"keyup\", (event)=>{event.stopPropagation()});\n input.addEventListener(\"input\", this.#onInput.bind(this));\n input.addEventListener(\"blur\", this.#onBlur.bind(this));\n input.addEventListener('focus', this.#onFocus.bind(this));\n this.#inputElement.onTrailingIconClick(this.#onClearIconClick.bind(this));\n this.#inputElement.onChangeValue(this.#onInputValueChange.bind(this));\n this.#dropdownElement.onOptionClick(this.#onOptionClick.bind(this));\n }\n\n #htmlTemplate() {\n const requiredAttribute = this.hasAttribute(\"required\") ? \"required\" : \"\";\n const disabledAttribute = this.hasAttribute(\"disabled\") ? \"disabled\" : \"\";\n const iconName = this.hasAttribute(\"no-icon\") ? \"\" : \"close\";\n return safeHtml`\n \n `;\n }\n\n static get is() {\n return 'typeahead-input';\n }\n}\n\n// Checking, is a custom element already defined\nif(!window.customElements.get(TypeAheadInput.is)){\n window.customElements.define(TypeAheadInput.is, TypeAheadInput);\n}\n","import {KeyCode, safeHtml} from \"../utils.js\";\n\nexport default class SelectInput extends HTMLElement {\n #inputElement;\n #dropdownElement;\n #currentValue;\n #lastValidValue = null;\n\n #callbacks = {\n onShowDropdown: [],\n onChangeValue: []\n }\n\n get value() {\n return this.#currentValue;\n }\n\n set value(value) {\n this.#inputElement.value = value && value.displayName ? value.displayName : \"\";\n this.#currentValue = value;\n }\n\n set options(options) {\n this.#dropdownElement.options = options;\n }\n\n /** @param {function|null} comparator */\n set comparator(comparator) {\n this.#dropdownElement.comparator = comparator;\n }\n\n /** @param {boolean} isDisabled */\n setDisabled(isDisabled) {\n this.toggleAttribute(\"disabled\", isDisabled);\n this.#inputElement.setDisabled(isDisabled);\n }\n\n showDropdown() {\n this.#dropdownElement.show();\n this.#callbacks.onShowDropdown.forEach(callback => callback());\n }\n\n onShowDropdown(callback) {\n this.#callbacks.onShowDropdown.push(callback);\n }\n\n onChangeValue(callback) {\n this.#callbacks.onChangeValue.push(callback);\n }\n\n checkValidity() {\n return this.#validate();\n }\n\n connectedCallback() {\n this.innerHTML = this.#htmlTemplate();\n this.#inputElement = this.querySelector(\"text-input\");\n this.#dropdownElement = this.querySelector(\"list-box\");\n this.#addListeners();\n }\n\n #addListeners() {\n this.addEventListener(\"keydown\", this.#onKeydown.bind(this));\n const input = this.#inputElement.querySelector(\"input\");\n input.addEventListener('focus', this.#onFocus.bind(this));\n input.addEventListener(\"focusout\", this.#onFocusout.bind(this));\n input.addEventListener(\"click\", this.#onInputClick.bind(this));\n this.#dropdownElement.onOptionClick(this.#onOptionClick.bind(this));\n }\n\n #onFocus() {\n this.showDropdown();\n }\n\n #onFocusout() {\n this.#hideDropdownAndValidate();\n }\n\n #onOptionClick(option) {\n this.#inputElement.value = option.displayName;\n this.#currentValue = option;\n this.#hideDropdownAndValidate();\n }\n\n #onInputClick() {\n this.showDropdown();\n }\n\n #onKeydown(event) {\n if ([KeyCode.Up, KeyCode.Down].includes(event.code)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n switch (event.key) {\n case KeyCode.Esc: {\n event.preventDefault();\n this.#hideDropdownAndValidate();\n this.#inputElement.focus();\n break;\n }\n case KeyCode.Enter: {\n if (this.#dropdownElement.isVisible()) {\n event.stopPropagation();\n if (this.#dropdownElement.hasSelectedElement())\n this.#dropdownElement.triggerClickOnSelectedItem();\n else\n this.#dropdownElement.hide();\n }\n break;\n }\n case KeyCode.Down: {\n if (!this.#dropdownElement.isVisible())\n this.#dropdownElement.show();\n this.#dropdownElement.selectNextItem();\n break;\n }\n case KeyCode.Up: {\n if (!this.#dropdownElement.isVisible())\n this.#dropdownElement.show();\n this.#dropdownElement.selectPrevItem();\n break;\n }\n }\n }\n\n #hideDropdownAndValidate() {\n this.#dropdownElement.hide();\n this.#validateAndNotify();\n }\n\n #validateAndNotify() {\n if (this.#validate() && this.#lastValidValue !== this.value) {\n this.#lastValidValue = this.value;\n this.#callbacks.onChangeValue.forEach(callback => callback(this.value))\n }\n }\n\n #validate() {\n if (this.#inputElement.hasAttribute(\"required\") && !this.#inputElement.value)\n this.#inputElement.errorMessage = \"Required\";\n else\n this.#inputElement.errorMessage = \"\";\n return this.#inputElement.checkValidity();\n }\n\n #htmlTemplate() {\n const requiredAttribute = this.hasAttribute(\"required\") ? \"required\" : \"\";\n const disabledAttribute = this.hasAttribute(\"disabled\") ? \"disabled\" : \"\";\n return safeHtml`\n \n `;\n }\n\n static get is() {\n return 'select-input';\n }\n}\n\n// Checking, is a custom element already defined\nif(!window.customElements.get(SelectInput.is)){\n window.customElements.define(SelectInput.is, SelectInput);\n}\n","import {getTextWidth, KeyCode, roundToDecimalPlaces} from \"../utils.js\";\n\nexport default class EditText extends HTMLElement {\n #children;\n #isValid = true;\n #lastEnteredValue;\n #suffix = \"\";\n #prefix = \"\";\n #displayTextTransformer = (value) => value;\n\n #resizeObserver = new ResizeObserver(this.#updatePopupPosition.bind(this));\n\n #callbacks = {\n onChangeValue: []\n }\n\n connectedCallback() {\n this.innerHTML = this.#htmlTemplate();\n this.#children = {\n text: this.querySelector(\".edit-text__text\"),\n popup: this.querySelector(\".edit-text__popup\"),\n input: this.querySelector('text-input')\n };\n this.#addListeners();\n this.#resizeObserver.observe(document.body);\n this.#initAttributes();\n this.#updateTextValue();\n }\n\n disconnectedCallback() {\n this.#resizeObserver.unobserve(document.body);\n }\n\n onChange(cb) {\n this.#callbacks.onChangeValue.push(cb);\n }\n\n checkValidity() {\n return this.#children.input.checkValidity();\n }\n\n /** @param {boolean} isIncorrect */\n toggleIncorrectAttribute(isIncorrect) {\n this.toggleAttribute('incorrect', isIncorrect)\n }\n\n /**\n * @deprecated\n * @param {InputValidator} validator\n * */\n addExternalValidator(validator) {\n this.#children.input.addValidator(validator);\n }\n\n /** @param {InputValidator} validator */\n addValidator(validator) {\n this.#children.input.addValidator(validator);\n }\n\n get value() {\n return this.#children.input.value;\n }\n\n set value(value) {\n this.#children.input.value = value;\n this.#updateTextValue();\n }\n\n set displayTextTransformer(f) {\n this.#displayTextTransformer = f;\n }\n\n #getValueAttr() {\n return this.getAttribute(\"value\");\n }\n\n #getDisplayName() {\n let val = this.#displayTextTransformer(this.#getValueAttr());\n if (this.#isNumberType())\n val = +val;\n return `${this.#prefix}${val}${this.#suffix}`\n }\n\n #addListeners() {\n this.#children.text.addEventListener(\"click\", this.#showPopup.bind(this));\n // Beware of \"mousedown\" because click event still could be triggered on the element below edit-text\n this.addEventListener('click', this.#onClickOutsideOfInput.bind(this));\n this.#children.popup.addEventListener('keydown', this.#onKeydown.bind(this));\n this.#children.input.onInput(this.#onInput.bind(this));\n this.#children.popup.addEventListener(\"cancel\", this.#onEscape.bind(this));\n }\n\n #showPopup() {\n this.toggleIncorrectAttribute(false);\n this.#updateInputValue();\n this.#updatePopupPosition();\n this.#children.popup.showModal();\n this.#children.input.focus();\n }\n\n #onInput(_, isValid) {\n this.#isValid = isValid;\n }\n\n #onEscape() {\n this.#children.input.value = this.#lastEnteredValue;\n }\n\n #onEnter() {\n if (this.checkValidity()) {\n this.#children.popup.close();\n this.#updateDisplayTextAndNotifyIfChanged();\n }\n }\n\n #onClickOutsideOfInput(event) {\n event.preventDefault();\n event.stopPropagation();\n if (event.target !== this.#children.popup)\n return;\n this.#children.popup.close();\n this.#updateDisplayTextAndNotifyIfChanged();\n }\n\n #updateDisplayTextAndNotifyIfChanged() {\n if (!this.#isValid){\n this.#children.input.value = this.#getValueAttr();\n return\n }\n if (this.#getValueAttr() !== this.#children.input.value && this.#children.input.value.length) {\n this.#updateTextValue();\n this.#callbacks.onChangeValue.forEach(cb => cb(this.#getValueAttr()));\n }\n const value = this.#children.input.rawValue;\n if (value.length === 0 && !this.#children.input.hasAttribute(\"required\")) {\n this.#setEmptyValue();\n } else {\n this.#lastEnteredValue = value;\n this.#children.text.toggleAttribute('empty-value', false)\n }\n }\n\n #setEmptyValue() {\n this.#children.text.textContent = \"set\";\n this.#children.text.toggleAttribute('empty-value', true)\n this.removeAttribute('value');\n this.removeAttribute('title');\n }\n\n #onKeydown(evt) {\n evt.stopPropagation();\n if (evt.repeat) return\n if (evt.key === KeyCode.Enter && !evt.repeat && this.#isValid)\n this.#onEnter();\n }\n\n #updateInputValue() {\n if (this.hasAttribute('value')) {\n this.#lastEnteredValue = this.getAttribute(\"value\");\n this.#children.input.value = this.#lastEnteredValue;\n }\n }\n\n #updateTextValue() {\n this.setAttribute(\"value\", this.#children.input.value);\n this.setAttribute('title', this.#children.input.value);\n this.#children.text.toggleAttribute('empty-value', false)\n let value = this.#getValueAttr();\n if (typeof value === \"string\" && value.length > 0) {\n this.#children.text.textContent = this.#getDisplayName();\n } else {\n this.#setEmptyValue();\n }\n }\n\n #updatePopupPosition() {\n let {top, left} = this.getBoundingClientRect();\n this.#children.popup.style.top = top + window.scrollY + \"px\";\n this.#children.popup.style.left = left + window.scrollX + \"px\";\n if (!this.hasAttribute('max-width')) {\n this.#children.popup.style['max-width'] = Math.max(this.offsetWidth + 16, 128) + \"px\";\n } else {\n this.#children.popup.style.width = getTextWidth(this.#children.input.rawValue) + 16 + \"px\";\n }\n }\n\n #isNumberType() {\n return this.getAttribute(\"type\") === \"number\"\n }\n\n #initAttributes() {\n if (this.hasAttribute(\"suffix\"))\n this.#suffix = this.getAttribute(\"suffix\");\n if (this.hasAttribute(\"prefix\"))\n this.#prefix = this.getAttribute(\"prefix\");\n if (this.hasAttribute(\"max-width\")) {\n this.#children.popup.style['max-width'] = this.getAttribute(\"max-width\") + 'px';\n this.#children.input.style['max-width'] = this.getAttribute(\"max-width\") - 16 + 'px';\n }\n if (this.hasAttribute(\"min-width\")) {\n this.#children.popup.style['min-width'] = this.getAttribute(\"min-width\") + 'px';\n this.#children.input.style['min-width'] = this.getAttribute(\"min-width\") - 16 + 'px';\n }\n\n this.#children.input.value = this.#getValueAttr();\n if (this.hasAttribute(\"scale\"))\n this.displayTextTransformer = (text) => roundToDecimalPlaces(text, parseInt(this.getAttribute(\"scale\")));\n }\n\n #htmlTemplate() {\n const requiredAttr = this.hasAttribute(\"required\") ? \"required\" : \"\";\n const typeAttr = this.getAttribute(\"type\") || \"text\";\n let stepAttr = \"\";\n if (this.hasAttribute(\"step\"))\n stepAttr = `step=\"${this.getAttribute(\"step\")}\"`\n let minAttr = \"\";\n if (this.hasAttribute(\"min\"))\n minAttr = `min=\"${this.getAttribute(\"min\")}\"`\n let maxAttr = \"\";\n if (this.hasAttribute(\"max\"))\n maxAttr = `max=\"${this.getAttribute(\"max\")}\"`\n let minLengthAttr = \"\";\n if (this.hasAttribute(\"minlength\"))\n minLengthAttr = `minlength=\"${this.getAttribute(\"minlength\")}\"`\n let maxLengthAttr = \"\";\n if (this.hasAttribute(\"maxlength\"))\n maxLengthAttr = `maxlength=\"${this.getAttribute(\"maxlength\")}\"`\n let patternAttr = \"\";\n if (this.hasAttribute(\"pattern\"))\n patternAttr = `pattern=\"${this.getAttribute(\"pattern\")}\"`\n let numberTypeAttr = \"\";\n if (this.hasAttribute(\"number-type\"))\n numberTypeAttr = `number-type=\"${this.getAttribute(\"number-type\")}\"`\n return `\n `;\n }\n\n static get is() {\n return 'edit-text';\n }\n}\n\n// Checking, is a custom element already defined\nif (!window.customElements.get(EditText.is)) {\n window.customElements.define(EditText.is, EditText);\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","TextInputValidityState","constructor","textInput","this","querySelector","isValid","errorMessage","checkValidity","setCustomValidity","validity","valid","message","badInput","customError","patternMismatch","typeMismatch","rangeOverflow","rangeUnderflow","tooLong","tooShort","valueMissing","stepMismatch","cv","assign","trimmedText","trim","hasAttribute","type","min","max","numberType","getAttribute","Number","isInteger","valueAsNumber","validityState","isTypeNumber","step","maxLength","minLength","validationMessage","KeyCode","freeze","safeHtml","strings","values","result","i","length","unsafe","String","replace","getTextWidth","text","span","document","createElement","body","appendChild","textContent","style","fontSize","visibility","position","width","Math","ceil","getBoundingClientRect","remove","TextInput","HTMLElement","static","Set","onTrailingIconClick","onChangeValue","onInput","connectedCallback","innerHTML","disconnectedCallback","setAttribute","window","removeEventListener","bind","capture","addValidator","validator","push","rawValue","isFinite","isFiniteNumber","validate","focus","callback","options","setDisabled","isDisabled","toggleAttribute","event","Up","Down","preventDefault","Enter","repeat","forEach","attribute","attributes","has","name","classList","add","addEventListener","activeElement","blur","trailingIconName","is","customElements","ListBox","a","b","displayName","localeCompare","onOptionClick","comparator","filter","searchString","toLowerCase","li","querySelectorAll","dataset","index","indexOf","selectedElement","scrollIntoView","block","show","display","hide","selectNextItem","visibleElements","hasSelectedElement","selectPrevItem","triggerClickOnSelectedItem","dispatchEvent","MouseEvent","isVisible","getComputedStyle","cb","sort","evt","option","map","title","join","parentClientRect","parentElement","widthToBe","maxAllowedWidth","documentElement","clientWidth","left","right","elementIndex","element","startIndex","before","substring","match","after","TypeAheadInput","initialValue","includes","code","stopImmediatePropagation","Esc","inputText","input","stopPropagation","requiredAttribute","disabledAttribute","iconName","SelectInput","onShowDropdown","showDropdown","EditText","ResizeObserver","popup","observe","unobserve","onChange","toggleIncorrectAttribute","isIncorrect","addExternalValidator","displayTextTransformer","f","val","showModal","_","close","target","removeAttribute","top","scrollY","scrollX","offsetWidth","number","decimalPlaces","multiplier","pow","round","roundToDecimalPlaces","parseInt","requiredAttr","typeAttr","stepAttr","minAttr","maxAttr","minLengthAttr","maxLengthAttr","patternAttr","numberTypeAttr"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"index.bundle.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,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AQC,GACzC,MAAMC,EAAarJ,KAAKsJ,IAAI,GAAIF,GAChC,OAAOpJ,KAAKuJ,MAAMJ,EAASE,GAAcA,CAC7C,CKqIoDG,CAAqBpK,EAAMqK,SAASvN,KAAK4B,aAAa,WACtG,CAEA,KACI,MAAM4L,EAAexN,KAAKuB,aAAa,YAAc,WAAa,GAC5DkM,EAAWzN,KAAK4B,aAAa,SAAW,OAC9C,IAAI8L,EAAW,GACX1N,KAAKuB,aAAa,UAClBmM,EAAW,SAAS1N,KAAK4B,aAAa,YAC1C,IAAI+L,EAAU,GACV3N,KAAKuB,aAAa,SAClBoM,EAAU,QAAQ3N,KAAK4B,aAAa,WACxC,IAAIgM,EAAU,GACV5N,KAAKuB,aAAa,SAClBqM,EAAU,QAAQ5N,KAAK4B,aAAa,WACxC,IAAIiM,EAAgB,GAChB7N,KAAKuB,aAAa,eAClBsM,EAAgB,cAAc7N,KAAK4B,aAAa,iBACpD,IAAIkM,EAAgB,GAChB9N,KAAKuB,aAAa,eAClBuM,EAAgB,cAAc9N,KAAK4B,aAAa,iBACpD,IAAImM,EAAc,GACd/N,KAAKuB,aAAa,aAClBwM,EAAc,YAAY/N,KAAK4B,aAAa,eAChD,IAAIoM,EAAiB,GAGrB,OAFIhO,KAAKuB,aAAa,iBAClByM,EAAiB,gBAAgBhO,KAAK4B,aAAa,mBAChD,qUAMe4L,kCACAE,kCACAC,kCACAC,kCACAC,kCACAC,kCACAC,kCACAC,wCACMP,uEAGhC,CAEA,aAAW1G,GACP,MAAO,WACX,E,OAIClC,OAAOmC,eAAe5H,IAAI0M,EAAS/E,KACpClC,OAAOmC,eAAetI,OAAOoN,EAAS/E,GAAI+E,G","sources":["webpack://elsciUi/webpack/universalModuleDefinition","webpack://elsciUi/webpack/bootstrap","webpack://elsciUi/webpack/runtime/define property getters","webpack://elsciUi/webpack/runtime/hasOwnProperty shorthand","webpack://elsciUi/webpack/runtime/make namespace object","webpack://elsciUi/./src/TextInput/TextInputValidityState.js","webpack://elsciUi/./src/utils.js","webpack://elsciUi/./src/TextInput/TextInput.js","webpack://elsciUi/./src/ListBox/ListBox.js","webpack://elsciUi/./src/TypeAheadInput/TypeAheadInput.js","webpack://elsciUi/./src/SelectInput/SelectInput.js","webpack://elsciUi/./src/EditText/EditText.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"elsciUi\"] = factory();\n\telse\n\t\troot[\"elsciUi\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export default class TextInputValidityState {\n\t#textInput;\n\t#inputElement;\n\t#isValid;\n\t#errorMessage;\n\n\tconstructor(textInput) {\n\t\tthis.#textInput = textInput\n\t\tthis.#inputElement = textInput.querySelector('input');\n\t\tthis.#isValid = true;\n\t\tthis.#errorMessage = \"\";\n\t}\n\n\tget isValid() {\n\t\treturn this.#isValid;\n\t}\n\n\tget errorMessage() {\n\t\treturn this.#errorMessage;\n\t}\n\n\tcheckValidity() {\n\t\t// reset custom validity\n\t\tthis.setCustomValidity(\"\");\n\t\tthis.#inputElement.checkValidity();\n\t\t// if the input element is valid, then check custom validity\n\t\tlet validity = this.#inputElement.validity;\n\t\tif (validity.valid) {\n\t\t\tvalidity = this.#getCustomValidity();\n\t\t}\n\t\tthis.#isValid = validity.valid;\n\t\tthis.#errorMessage = this.#getValidationMessage(validity);\n\t\treturn this.isValid;\n\t}\n\n\tsetCustomValidity(message) {\n\t\tthis.#inputElement.setCustomValidity(message);\n\t\tthis.#isValid = this.#inputElement.validity.valid;\n\t\tthis.#errorMessage = message;\n\t}\n\n\t/**\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/ValidityState\n\t * Here we add our own validation steps, and update the validity state properties.\n\t * - valueMissing: if the input element is required and the trimmed text is empty (contains only whitespaces).\n\t * - rangeUnderflow: if the input element is a number and the value is less than the min attribute.\n\t * - rangeOverflow: if the input element is a number and the value is greater than the max attribute.\n\t */\n\t#getCustomValidity() {\n\t\tconst {badInput, customError, patternMismatch, typeMismatch, valid, rangeOverflow, rangeUnderflow, tooLong,\n\t\t\ttooShort, valueMissing, stepMismatch} = this.#inputElement.validity;\n\t\tconst cv = Object.assign({},\n\t\t\t{badInput, customError, patternMismatch, typeMismatch, valid, rangeOverflow, rangeUnderflow, tooLong,\n\t\t\t\ttooShort, valueMissing, stepMismatch},\n\t\t\tthis.#isBlanknessConstraintViolated(),\n\t\t\tthis.#isRangeConstraintViolated(),\n\t\t\tthis.#isStepConstraintViolated()\n\t\t);\n\t\tcv.valid = !cv.valueMissing && !cv.rangeUnderflow && !cv.rangeOverflow && !cv.stepMismatch;\n\t\treturn cv;\n\t}\n\n\t/**\n\t * Checks if the input element is required and the trimmed text is empty (contains only whitespaces).\n\t * @returns {{valueMissing: (*|boolean)}}\n\t */\n\t#isBlanknessConstraintViolated() {\n\t\tconst trimmedText = this.#inputElement.value.trim();\n\t\treturn {valueMissing: this.#textInput.hasAttribute(\"required\") && trimmedText === \"\"};\n\t}\n\n\t/**\n\t * This is a workaround for the fact that the browser does not validate decimals properly. It takes only\n\t * first 18 digits of the decimal number and then compares it with the min and max attributes.\n\t * So if the min attribute is 0 and the value is -0.0000000000000000001, then the browser will not\n\t * consider it as a range underflow (after conversion it becomes -0 => 0).\n\t * This is why we have to check the value manually.\n\t */\n\t#isRangeConstraintViolated() {\n\t\tif (this.#inputElement.type !== \"number\")\n\t\t\treturn {rangeUnderflow: false, rangeOverflow: false};\n\t\tconst {min, max, value} = this.#inputElement;\n\t\treturn {rangeUnderflow: (min !== \"\" && +value < +min), rangeOverflow: (max !== \"\" && +value > +max)};\n\t}\n\n\t/**\n\t * This method serves to supplement internal validation to determine whether a float qualifies as an integer.\n\t * The internal validation for an input type=\"number\" step=\"1\" doesn't consistently cover all cases.\n\t * For example, the number 2.00000001 might be considered an integer by the internal validator.\n\t * So we are using attribute 'number-type=\"integer\"'\n\t * The aim is to widen this validation range. Now, the comparison for an integer works correctly when a number\n\t * has no more than 16 digits. However, if a number has 17 digits or more, this function returns incorrect result.\n\t *\n\t * We use StepMismatch property because internal validation writes this error to this property\n\t * StepMismatch property of a ValidityState object indicates if the value of an , after having been edited\n\t * by the user, does not conform to the constraints set by the element's step attribute.\n\t *\n\t * @return {{stepMismatch: boolean}}\n\t */\n\t#isStepConstraintViolated() {\n\t\tif (this.#inputElement.type !== \"number\")\n\t\t\treturn {stepMismatch: false};\n\t\tconst numberType = this.#textInput.getAttribute('number-type');\n\t\tif (!numberType || numberType !== \"integer\")\n\t\t\treturn {stepMismatch: false};\n\t\tconst stepMismatch = !Number.isInteger(this.#inputElement.valueAsNumber);\n\t\treturn {stepMismatch: stepMismatch};\n\t}\n\n\t#getValidationMessage(validityState) {\n\t\tconst isTypeNumber = this.#inputElement.type === \"number\";\n\t\tconst {badInput, rangeOverflow, rangeUnderflow, tooLong, tooShort, valueMissing, stepMismatch} = validityState;\n\t\tif (isTypeNumber && badInput)\n\t\t\treturn \"Invalid number\";\n\t\tif (isTypeNumber && stepMismatch) {\n\t\t\tif (this.#inputElement.step === \"1\" ){\n\t\t\t\t// Here we checked floats because if step is 1, then the value must be an integer.\n\t\t\t\t// Now we can use attribute 'number-type=\"integer\"', but we have previously written inputs,\n\t\t\t\t// that's why don't want to remove this code\n\t\t\t\treturn \"Must be an integer\";\n\t\t\t}\n\t\t\tconst numberType = this.#textInput.getAttribute('number-type');\n\t\t\tif (numberType && numberType === \"integer\") {\n\t\t\t\treturn \"Must be an integer\";\n\t\t\t}\n\t\t}\n\t\tif (rangeOverflow)\n\t\t\treturn \"Greater than \" + this.#inputElement.max;\n\t\tif (rangeUnderflow)\n\t\t\treturn \"Less than \" + this.#inputElement.min;\n\t\tif (tooLong)\n\t\t\treturn \"Max length is \" + this.#inputElement.maxLength;\n\t\tif (tooShort)\n\t\t\treturn \"Min length is \" + this.#inputElement.minLength;\n\t\tif (!badInput && valueMissing)\n\t\t\treturn \"Required\";\n\t\treturn this.#inputElement.validationMessage;\n\t}\n}","export const KeyCode = Object.freeze({\n \"Shift\": \"ShiftLeft\",\n \"Esc\": \"Escape\",\n \"Enter\": \"Enter\",\n \"Up\": \"ArrowUp\",\n \"Down\": \"ArrowDown\"\n});\n\n/**\n * @param {string} unsafe\n * @returns {string}\n */\nexport const safeText = (unsafe) => {\n if (!unsafe)\n return ''\n return unsafe\n .replace(/&/g, \"&\")\n .replace(//g, \">\")\n .replace(/\"/g, \""\")\n .replace(/'/g, \"'\");\n}\n\n/**\n * To be used when generating HTML via string interpolation e.g. {@code safeHtml`
${variables}
`} -\n * these variables will go through this function and have to be escaped should such string be shown on UI.\n *\n * @param {TemplateStringsArray} strings\n * @param {string[]} values\n * @returns {string}\n */\nexport const safeHtml = (strings, ...values) => {\n let result = strings[0];\n for (let i = 0; i < values.length; i++) {\n result += safeText(String(values[i]));\n result += strings[i + 1];\n }\n return result;\n}\n\n/* @param {String} text */\nexport function getTextWidth(text) {\n const span = document.createElement(\"span\");\n document.body.appendChild(span)\n span.textContent = text;\n span.style.fontSize = '1rem';\n span.style.visibility = 'hidden';\n span.style.position = 'absolute';\n const width = Math.ceil(span.getBoundingClientRect().width) + 1;\n span.remove();\n return width;\n}\n\nfunction getCssStyle(element, prop) {\n return window.getComputedStyle(element, null).getPropertyValue(prop);\n}\n\nexport function isFiniteNumber (value) {\n if (typeof value !== 'undefined' && Number.isFinite(value)) {\n return true\n }\n else return false\n}\n\n/**\n * Function that rounds a number to a specified number of decimal places.\n * @param {number} number\n * @param {number} decimalPlaces\n * @return {number}\n */\nexport function roundToDecimalPlaces(number, decimalPlaces) {\n const multiplier = Math.pow(10, decimalPlaces);\n return Math.round(number * multiplier) / multiplier;\n}","// @ts-check\nimport TextInputValidityState from \"./TextInputValidityState.js\";\nimport {isFiniteNumber, KeyCode, safeHtml} from \"../utils.js\"\n\n/**\n * @typedef {import(\"../InputValidator.js\").default} InputValidator\n */\nexport default class TextInput extends HTMLElement {\n static #INPUT_ATTRIBUTES = new Set([\"autocomplete\", \"autofocus\", \"disabled\", \"max\", \"maxlength\",\n \"min\", \"minlength\", \"name\", \"pattern\", \"readonly\", \"step\", \"type\", \"value\", \"placeholder\"\n /* \"required\" - we do not want to set attribute required when render text-input, because in this case all\n required inputs becomes red, as solution we just leave it in the root element and do this validation manually */]);\n /** @type {HTMLInputElement} */\n #inputElement;\n /** @type {HTMLElement} */\n #errorElement;\n /** @type {TextInputValidityState} */\n #validityState;\n #callbacks = {\n /** @type {Function[]} */\n onTrailingIconClick: [],\n /** @type {Function[]} */\n onChangeValue: [],\n /** @type {Function[]} */\n onInput: []\n };\n /** @type {string} */\n #lastChangedValue;\n /** @type {InputValidator[]} */\n #validators = [];\n\n connectedCallback() {\n this.innerHTML = this.#htmlTemplate();\n this.#inputElement = this.querySelector(\"input\");\n this.#errorElement = this.querySelector(\".text-input__error\");\n this.#validityState = new TextInputValidityState(this);\n this.#fillInputAttributes();\n this.#addListeners();\n if (this.hasAttribute(\"value\"))\n this.value = this.getAttribute(\"value\");\n }\n\n disconnectedCallback() {\n // Save value to attribute, because it will be lost after element is removed from DOM and reinserted.\n // The case is happening when user adds new element to the table and then sorts it by reinserting rows.\n this.setAttribute(\"value\", this.value);\n window.removeEventListener(\"visibilitychange\", this.#onVisibilityChange.bind(this), { capture: true });\n }\n\n /** @param {InputValidator} validator */\n addValidator(validator) {\n this.#validators.push(validator);\n }\n\n /**\n * Returns trimmed value of the input.\n * @returns {string}\n */\n get value() {\n return this.rawValue.trim();\n }\n\n /**\n * Returns raw value of the input.\n * @returns {string}\n */\n get rawValue() {\n return this.#inputElement.value;\n }\n\n /** @param {string | null} value */\n set value(value) {\n this.#inputElement.value = (isFiniteNumber(value) || typeof value == \"string\")? value : '';\n this.#lastChangedValue = this.#inputElement.value\n this.checkValidity();\n }\n\n checkValidity() {\n if (!this.#validityState.checkValidity()){\n this.errorMessage = this.#validityState.errorMessage;\n return false;\n }\n this.errorMessage = this.#validityState.errorMessage;\n for (const validator of this.#validators) {\n const result = validator.validate(this, this.value);\n if (!result.isValid) {\n this.errorMessage = result.errorMessage;\n this.focus()\n return false;\n }\n }\n return true;\n }\n\n get errorMessage() {\n return this.#errorElement.textContent;\n }\n\n set errorMessage(message) {\n // We reset lastChangedValue because if the same invalid value is entered again, we want to validate this value\n if (message){\n this.#lastChangedValue = null;\n }\n this.#validityState.setCustomValidity(message);\n this.#errorElement.textContent = this.#validityState.errorMessage;\n }\n\n /** @param {Function} callback */\n onTrailingIconClick(callback) {\n this.#callbacks.onTrailingIconClick.push(callback);\n }\n /** @param {Function} callback */\n onInput(callback) {\n this.#callbacks.onInput.push(callback);\n }\n /** @param {Function} callback */\n onChangeValue(callback) {\n this.#callbacks.onChangeValue.push(callback);\n }\n\n // @ts-ignore\n focus(options) {\n this.#inputElement.focus(options)\n }\n\n /** @param {boolean} isDisabled */\n setDisabled(isDisabled) {\n this.toggleAttribute(\"disabled\", isDisabled);\n this.#inputElement.toggleAttribute(\"disabled\", isDisabled);\n }\n\n /** @param {KeyboardEvent} event */\n #onKeyDown(event) {\n if (this.#inputElement.type === \"number\" && (event.key === KeyCode.Up || event.key === KeyCode.Down))\n event.preventDefault();\n if (event.key === KeyCode.Enter && !event.repeat)\n this.#onChange();\n }\n\n #onInput() {\n const isValid = this.checkValidity();\n this.#callbacks.onInput.forEach(callback => callback(this.value, isValid));\n }\n\n #onChange() {\n // We validate if the current value is not equal to the last changed value\n if (this.#lastChangedValue !== this.value)\n this.#validateAndNotify();\n }\n\n #onTrailingIconClick() {\n this.#callbacks.onTrailingIconClick.forEach(callback => callback());\n }\n\n #validateAndNotify() {\n if (this.checkValidity()) {\n this.#lastChangedValue = this.value;\n this.#callbacks.onChangeValue.forEach(callback => callback(this.value));\n }\n }\n\n #fillInputAttributes() {\n for (const attribute of this.attributes)\n if (TextInput.#INPUT_ATTRIBUTES.has(attribute.name))\n this.#inputElement.setAttribute(attribute.name, attribute.value)\n // For number inputs, if step is not specified then it is set to 1 by default, and it is not possible to enter\n // decimal w/o validation error. So, if step is not specified, then we set it to \"any\" to allow decimal values.\n if (this.getAttribute(\"type\") === \"number\" && !this.hasAttribute(\"step\"))\n this.#inputElement.setAttribute(\"step\", \"any\");\n if (this.hasAttribute(\"placeholder\"))\n this.classList.add(\"placeholder-shown\");\n }\n\n #addListeners() {\n this.#inputElement.addEventListener(\"keydown\", this.#onKeyDown.bind(this));\n this.#inputElement.addEventListener(\"input\", this.#onInput.bind(this));\n this.#inputElement.addEventListener(\"focusout\", this.#onChange.bind(this));\n this.querySelector('.text-input__trailing-icon').addEventListener(\"click\", this.#onTrailingIconClick.bind(this));\n window.addEventListener(\"visibilitychange\", this.#onVisibilityChange.bind(this), { capture: true });\n }\n\n /**\n * This method is called when user:\n * - closes the tab\n * - closes browser window\n * - refreshes the page\n * - navigates to another page\n * - navigates to another tab\n * - minimizes the browser window\n *\n * It is needed to blur the input element, because if it is focused, then it might be not saved to the database.\n * Blurring the input element will trigger the change event, if the value was changed.\n *\n * Note: If the user closes the tab or browser window, then there is no guarantee that asynchronous requests\n * (XHR or fetch) will be sent. So, if the user closes the tab or browser window, then the value\n * of the input element might not be saved to the database.\n */\n #onVisibilityChange() {\n if (document.activeElement === this.#inputElement)\n this.#inputElement.blur();\n }\n\n #htmlTemplate() {\n const trailingIconName = this.getAttribute(\"data-icon\") || \"\";\n return safeHtml`\n \n ${trailingIconName}\n `;\n }\n\n static get is() {\n return 'text-input';\n }\n}\n\n// Checking, is a custom element already defined\nif(!window.customElements.get(TextInput.is)){\n window.customElements.define(TextInput.is, TextInput);\n}\n","import {getTextWidth, safeHtml} from \"../utils.js\";\n\nexport default class ListBox extends HTMLElement {\n #listElement;\n #values = [];\n #maxItemWidth = 0;\n #selectedElementIndex = -1;\n /** @type {function|null} */\n #comparator = (a, b) => a.displayName.localeCompare(b.displayName);\n #callbacks = {\n onOptionClick: []\n }\n #preventScrollFunction;\n\n /**\n * @returns {{displayName:string}[]}\n */\n get options() {\n return this.#values;\n }\n\n /**\n * @param {{displayName:string}[]}values\n */\n set options(values) {\n this.#setValues(values);\n this.innerHTML = this.#htmlTemplate();\n this.#listElement = this.querySelector(\"ul\");\n this.#updatePosition();\n this.#addListeners();\n }\n\n /** @param {function|null} comparator */\n set comparator(comparator) {\n this.#comparator = comparator;\n }\n\n /**\n * @param {string} filter\n */\n set filter(filter) {\n const searchString = filter.toLowerCase();\n for (const li of this.querySelectorAll(\"li\")) {\n const {displayName} = this.#values[li.dataset.index];\n const indexOf = displayName.toLowerCase().indexOf(searchString);\n li.innerHTML = this.#getMarkedText(displayName, indexOf, searchString.length);\n li.toggleAttribute('hidden', indexOf === -1);\n }\n const selectedElement = this.#getSelectedElement();\n if (selectedElement) {\n if (selectedElement.hasAttribute('hidden'))\n this.#resetCurrentSelection();\n else\n selectedElement.scrollIntoView({block: \"nearest\"});\n }\n }\n\n show() {\n document.addEventListener(\"wheel\", this.#preventScrollFunction, {capture: true, passive: false});\n this.toggleAttribute('open', true)\n this.#updatePosition();\n }\n\n hide() {\n document.removeEventListener(\"wheel\", this.#preventScrollFunction, {capture: true, passive: false});\n this.toggleAttribute('open', false)\n this.#resetCurrentSelection();\n }\n\n selectNextItem() {\n const visibleElements = this.#getVisibleElements();\n if (!this.hasSelectedElement()) {\n if (visibleElements.length === 0)\n return;\n this.#setSelectedElement(visibleElements[0].dataset.index);\n } else {\n const indexOf = visibleElements.indexOf(this.#getSelectedElement());\n if (visibleElements.length - 1 <= indexOf) // is last item?\n return;\n this.#setSelectedElement(visibleElements[indexOf + 1].dataset.index);\n }\n }\n\n selectPrevItem() {\n const visibleElements = this.#getVisibleElements();\n if (!this.hasSelectedElement()) {\n if (visibleElements.length === 0)\n return;\n this.#setSelectedElement(visibleElements[visibleElements.length - 1].dataset.index);\n } else {\n const indexOf = visibleElements.indexOf(this.#getSelectedElement());\n if (indexOf === 0) // is first item?\n return;\n this.#setSelectedElement(visibleElements[indexOf - 1].dataset.index);\n }\n }\n\n triggerClickOnSelectedItem() {\n if (this.hasSelectedElement())\n this.#getSelectedElement().dispatchEvent(new MouseEvent('mousedown'));\n }\n\n hasSelectedElement() {\n return this.#getSelectedElement() != null;\n }\n\n isVisible() {\n return this.hasAttribute('open')\n }\n\n onOptionClick(cb) {\n this.#callbacks.onOptionClick.push(cb);\n }\n\n connectedCallback() {\n this.innerHTML = this.#htmlTemplate();\n this.#listElement = this.querySelector(\"ul\");\n this.#addListeners();\n // This function is needed to stop scrolling all page, except of list-box\n // Otherwise select and typeahead inputs can be scrolled, but list-box fixed in the page\n this.#preventScrollFunction = (evt)=> {\n if (!this.contains(evt.target)) {\n // When scrolling outside the list-box\n evt.stopPropagation();\n evt.preventDefault();\n } else {\n const isScrollingUp = evt.deltaY < 0;\n const isScrollingDown = evt.deltaY > 0;\n const isListScrolledToItsTop = this.#listElement.scrollTop === 0;\n const isListScrolledToItsBottom = this.#listElement.scrollTop + this.#listElement.clientHeight >= this.#listElement.scrollHeight;\n const nothingToScrollUp = isScrollingUp & isListScrolledToItsTop;\n const nothingToScrollDown = isScrollingDown & isListScrolledToItsBottom;\n if (nothingToScrollUp || nothingToScrollDown){\n evt.stopPropagation();\n evt.preventDefault();\n }\n }\n };\n }\n\n /**\n * @param {{displayName:string}[]}values\n */\n #setValues(values) {\n if (typeof this.#comparator === \"function\") {\n this.#values = [...values].sort(this.#comparator);\n } else {\n this.#values = values\n }\n }\n\n #getVisibleElements() {\n return [...this.#listElement.querySelectorAll('li:not([hidden])')];\n }\n\n #addListeners() {\n this.#listElement.addEventListener(\"mousedown\", (evt)=>{\n // When we use TypeAhead Input or Select Input in dialog and click on scroll bar, dialog takes focus\n // and list box is closed. So we need to prevent the default behavior of the mousedown event\n evt.preventDefault();\n })\n for (const li of this.querySelectorAll(\"li\")) {\n li.addEventListener('mousedown', () => {\n const option = this.#values[li.dataset.index];\n this.#callbacks.onOptionClick.forEach(cb => cb(option));\n });\n }\n }\n\n #htmlTemplate() {\n return `\n
\n ${this.#values.map((value, i) =>\n safeHtml`
${value.displayName}
`\n ).join('')}\n
`;\n }\n\n #updatePosition() {\n const parentClientRect = this.parentElement.getBoundingClientRect();\n if (this.#maxItemWidth === 0) // calculate max item width only once\n this.#maxItemWidth = Math.max(...this.#values.map(value => getTextWidth(value.displayName)), 0);\n // if parent element width is greater than max item width, set list width to parent width\n const widthToBe = Math.max(this.#maxItemWidth + 24/*paddings*/ + 22/*scrollbar*/, parentClientRect.width);\n // max allowed width is the distance from the left side of parent element to the right side of the page\n const maxAllowedWidth = document.documentElement.clientWidth - parentClientRect.left\n if (widthToBe > maxAllowedWidth) { // can't fit to the right side, so put it to the left side\n this.#listElement.style.right = 0;\n } else {\n this.#listElement.style.right = null;\n }\n this.#listElement.style.width = `${Math.min(widthToBe, document.documentElement.clientWidth)}px`;\n this.style.width = `${Math.min(widthToBe, document.documentElement.clientWidth)}px`;\n this.style.top = `${parentClientRect.top}px`;\n }\n\n #getSelectedElement() {\n return this.querySelector(`li[data-index=\"${this.#selectedElementIndex}\"]`);\n }\n\n #setSelectedElement(elementIndex) {\n this.#resetCurrentSelection();\n this.#selectedElementIndex = elementIndex;\n const element = this.#getSelectedElement();\n element.classList.add('list-box__item--active');\n element.scrollIntoView({block: \"nearest\"});\n }\n\n #resetCurrentSelection() {\n if (this.#selectedElementIndex >= 0) {\n const selectedElement = this.#getSelectedElement();\n selectedElement.classList.remove('list-box__item--active');\n this.#selectedElementIndex = -1;\n }\n }\n\n #getMarkedText(text, startIndex, length) {\n if (startIndex >= 0) {\n const before = text.substring(0, startIndex);\n const match = text.substring(startIndex, startIndex + length);\n const after = text.substring(startIndex + length);\n // wrap whole text in span to prevent swallowing spaces\n return safeHtml`${before}${match}${after}`;\n } else {\n return text;\n }\n }\n\n static get is() {\n return 'list-box';\n }\n}\n\n// Checking, is a custom element already defined\nif(!window.customElements.get(ListBox.is)){\n window.customElements.define(ListBox.is, ListBox);\n}\n","import '../TextInput/TextInput.js';\nimport '../ListBox/ListBox.js';\nimport { KeyCode, safeHtml } from \"../utils.js\"\n\nexport default class TypeAheadInput extends HTMLElement {\n /**\n * @type {TextInput}\n */\n #inputElement;\n /**\n * @type {ListBox}\n */\n #dropdownElement;\n #currentValue;\n #lastValidValue = null;\n #shouldMatchOptions;\n #callbacks = {\n onChangeValue: []\n }\n\n connectedCallback() {\n this.innerHTML = this.#htmlTemplate();\n this.#inputElement = this.querySelector(\"text-input\");\n this.#dropdownElement = this.querySelector(\"list-box\");\n this.#shouldMatchOptions = this.hasAttribute(\"shouldMatchOptions\")\n this.#addListeners();\n }\n\n get value() {\n return this.#currentValue;\n }\n\n get rawValue() {\n return this.#inputElement.value;\n }\n\n set value(value) {\n this.#currentValue = value;\n this.#inputElement.value = value && value.displayName ? value.displayName : \"\";\n }\n\n /**\n * Sets the initial value of the input, as well as the last valid value.\n */\n set initialValue(value) {\n this.value = value;\n this.#lastValidValue = value;\n }\n\n set options(options) {\n this.#dropdownElement.options = options;\n this.#filterDatalist();\n }\n\n set errorMessage(message) {\n this.#inputElement.errorMessage = message;\n }\n\n checkValidity() {\n return this.#validate() && this.#inputElement.checkValidity();\n }\n\n onChangeValue(callback) {\n this.#callbacks.onChangeValue.push(callback);\n }\n\n /** @param {boolean} isDisabled */\n setDisabled(isDisabled) {\n this.toggleAttribute(\"disabled\", isDisabled);\n this.#inputElement.setDisabled(isDisabled);\n }\n\n\n #onInput() {\n this.errorMessage = \"\";\n this.#filterDatalist();\n if (!this.#dropdownElement.isVisible())\n this.#dropdownElement.show();\n }\n\n #onFocus() {\n this.#filterDatalist();\n this.#dropdownElement.show();\n }\n\n #onBlur() {\n this.#hideDropdownAndValidate();\n }\n\n #onOptionClick(option) {\n this.value = option;\n this.#hideDropdownAndValidate();\n }\n\n #onClearIconClick() {\n this.value = {displayName: \"\"};\n this.#inputElement.querySelector('input').focus();\n }\n\n #onKeydown(event) {\n if ([KeyCode.Up, KeyCode.Down].includes(event.code)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n switch (event.key) {\n case KeyCode.Esc: {\n this.#hideDropdownAndValidate();\n break;\n }\n case KeyCode.Enter: {\n if (this.#dropdownElement.isVisible())\n if (this.#dropdownElement.hasSelectedElement())\n this.#dropdownElement.triggerClickOnSelectedItem();\n else\n this.#hideDropdownAndValidate();\n break;\n }\n case KeyCode.Down: {\n if (!this.#dropdownElement.isVisible())\n this.#dropdownElement.show();\n this.#dropdownElement.selectNextItem();\n break;\n }\n case KeyCode.Up: {\n if (!this.#dropdownElement.isVisible())\n this.#dropdownElement.show();\n this.#dropdownElement.selectPrevItem();\n break;\n }\n }\n }\n\n #onInputValueChange() {\n this.#validateAndNotify();\n }\n\n #hideDropdownAndValidate() {\n this.#dropdownElement.hide();\n this.#validateAndNotify();\n }\n\n #validateAndNotify() {\n if (this.#validate() && this.#isValueChanged()) {\n this.#lastValidValue = this.value;\n this.#callbacks.onChangeValue.forEach(callback => callback(this.value));\n }\n }\n\n #validate() {\n const inputText = this.#inputElement.value;\n if (inputText === \"\") {\n this.#currentValue = null;\n return true; // assume that value is valid if it is empty, otherwise required attribute should be set\n }\n if (this.value && this.value.displayName === inputText) {\n this.errorMessage = \"\";\n return true; // assume that value is valid if it is the same as the initial value\n }\n if (!this.#shouldMatchOptions) {\n this.errorMessage = \"\";\n this.#currentValue = {displayName: inputText};\n return true; // assume that value is valid if it should not match to any option\n }\n for (const option of this.#dropdownElement.options) {\n if (option.displayName === inputText) {\n this.errorMessage = \"\";\n this.#currentValue = option;\n this.#inputElement.value = option.displayName;\n return true;\n }\n }\n this.#currentValue = null;\n this.errorMessage = \"Select from list\";\n return false;\n }\n\n #filterDatalist() {\n // We use attribute \"nofiltering\" when make filtration ourselves\n if (this.hasAttribute('nofiltering'))\n return\n this.#dropdownElement.filter = this.#inputElement.value;\n }\n\n #isValueChanged() {\n return this.#lastValidValue !== this.value;\n }\n\n #addListeners() {\n const input = this.#inputElement.querySelector(\"input\");\n this.addEventListener(\"keydown\", this.#onKeydown.bind(this));\n this.addEventListener(\"keyup\", (event)=>{event.stopPropagation()});\n input.addEventListener(\"input\", this.#onInput.bind(this));\n input.addEventListener(\"blur\", this.#onBlur.bind(this));\n input.addEventListener('focus', this.#onFocus.bind(this));\n this.#inputElement.onTrailingIconClick(this.#onClearIconClick.bind(this));\n this.#inputElement.onChangeValue(this.#onInputValueChange.bind(this));\n this.#dropdownElement.onOptionClick(this.#onOptionClick.bind(this));\n }\n\n #htmlTemplate() {\n const requiredAttribute = this.hasAttribute(\"required\") ? \"required\" : \"\";\n const disabledAttribute = this.hasAttribute(\"disabled\") ? \"disabled\" : \"\";\n const iconName = this.hasAttribute(\"no-icon\") ? \"\" : \"close\";\n return safeHtml`\n \n `;\n }\n\n static get is() {\n return 'typeahead-input';\n }\n}\n\n// Checking, is a custom element already defined\nif(!window.customElements.get(TypeAheadInput.is)){\n window.customElements.define(TypeAheadInput.is, TypeAheadInput);\n}\n","import {KeyCode, safeHtml} from \"../utils.js\";\n\nexport default class SelectInput extends HTMLElement {\n #inputElement;\n #dropdownElement;\n #currentValue;\n #lastValidValue = null;\n\n #callbacks = {\n onShowDropdown: [],\n onChangeValue: []\n }\n\n get value() {\n return this.#currentValue;\n }\n\n set value(value) {\n this.#inputElement.value = value && value.displayName ? value.displayName : \"\";\n this.#currentValue = value;\n }\n\n set options(options) {\n this.#dropdownElement.options = options;\n }\n\n /** @param {function|null} comparator */\n set comparator(comparator) {\n this.#dropdownElement.comparator = comparator;\n }\n\n /** @param {boolean} isDisabled */\n setDisabled(isDisabled) {\n this.toggleAttribute(\"disabled\", isDisabled);\n this.#inputElement.setDisabled(isDisabled);\n }\n\n showDropdown() {\n this.#dropdownElement.show();\n this.#callbacks.onShowDropdown.forEach(callback => callback());\n }\n\n onShowDropdown(callback) {\n this.#callbacks.onShowDropdown.push(callback);\n }\n\n onChangeValue(callback) {\n this.#callbacks.onChangeValue.push(callback);\n }\n\n checkValidity() {\n return this.#validate();\n }\n\n connectedCallback() {\n this.innerHTML = this.#htmlTemplate();\n this.#inputElement = this.querySelector(\"text-input\");\n this.#dropdownElement = this.querySelector(\"list-box\");\n this.#addListeners();\n }\n\n #addListeners() {\n this.addEventListener(\"keydown\", this.#onKeydown.bind(this));\n const input = this.#inputElement.querySelector(\"input\");\n input.addEventListener('focus', this.#onFocus.bind(this));\n input.addEventListener(\"focusout\", this.#onFocusout.bind(this));\n input.addEventListener(\"click\", this.#onInputClick.bind(this));\n this.#dropdownElement.onOptionClick(this.#onOptionClick.bind(this));\n }\n\n #onFocus() {\n this.showDropdown();\n }\n\n #onFocusout() {\n this.#hideDropdownAndValidate();\n }\n\n #onOptionClick(option) {\n this.#inputElement.value = option.displayName;\n this.#currentValue = option;\n this.#hideDropdownAndValidate();\n }\n\n #onInputClick() {\n this.showDropdown();\n }\n\n #onKeydown(event) {\n if ([KeyCode.Up, KeyCode.Down].includes(event.code)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n switch (event.key) {\n case KeyCode.Esc: {\n event.preventDefault();\n this.#hideDropdownAndValidate();\n this.#inputElement.focus();\n break;\n }\n case KeyCode.Enter: {\n if (this.#dropdownElement.isVisible()) {\n event.stopPropagation();\n if (this.#dropdownElement.hasSelectedElement())\n this.#dropdownElement.triggerClickOnSelectedItem();\n else\n this.#dropdownElement.hide();\n }\n break;\n }\n case KeyCode.Down: {\n if (!this.#dropdownElement.isVisible())\n this.#dropdownElement.show();\n this.#dropdownElement.selectNextItem();\n break;\n }\n case KeyCode.Up: {\n if (!this.#dropdownElement.isVisible())\n this.#dropdownElement.show();\n this.#dropdownElement.selectPrevItem();\n break;\n }\n }\n }\n\n #hideDropdownAndValidate() {\n this.#dropdownElement.hide();\n this.#validateAndNotify();\n }\n\n #validateAndNotify() {\n if (this.#validate() && this.#lastValidValue !== this.value) {\n this.#lastValidValue = this.value;\n this.#callbacks.onChangeValue.forEach(callback => callback(this.value))\n }\n }\n\n #validate() {\n if (this.#inputElement.hasAttribute(\"required\") && !this.#inputElement.value)\n this.#inputElement.errorMessage = \"Required\";\n else\n this.#inputElement.errorMessage = \"\";\n return this.#inputElement.checkValidity();\n }\n\n #htmlTemplate() {\n const requiredAttribute = this.hasAttribute(\"required\") ? \"required\" : \"\";\n const disabledAttribute = this.hasAttribute(\"disabled\") ? \"disabled\" : \"\";\n return safeHtml`\n \n `;\n }\n\n static get is() {\n return 'select-input';\n }\n}\n\n// Checking, is a custom element already defined\nif(!window.customElements.get(SelectInput.is)){\n window.customElements.define(SelectInput.is, SelectInput);\n}\n","import {getTextWidth, KeyCode, roundToDecimalPlaces} from \"../utils.js\";\n\nexport default class EditText extends HTMLElement {\n #children;\n #isValid = true;\n #lastEnteredValue;\n #suffix = \"\";\n #prefix = \"\";\n #displayTextTransformer = (value) => value;\n\n #resizeObserver = new ResizeObserver(this.#updatePopupPosition.bind(this));\n\n #callbacks = {\n onChangeValue: []\n }\n\n connectedCallback() {\n this.innerHTML = this.#htmlTemplate();\n this.#children = {\n text: this.querySelector(\".edit-text__text\"),\n popup: this.querySelector(\".edit-text__popup\"),\n input: this.querySelector('text-input')\n };\n this.#addListeners();\n this.#resizeObserver.observe(document.body);\n this.#initAttributes();\n this.#updateTextValue();\n }\n\n disconnectedCallback() {\n this.#resizeObserver.unobserve(document.body);\n }\n\n onChange(cb) {\n this.#callbacks.onChangeValue.push(cb);\n }\n\n checkValidity() {\n return this.#children.input.checkValidity();\n }\n\n /** @param {boolean} isIncorrect */\n toggleIncorrectAttribute(isIncorrect) {\n this.toggleAttribute('incorrect', isIncorrect)\n }\n\n /**\n * @deprecated\n * @param {InputValidator} validator\n * */\n addExternalValidator(validator) {\n this.#children.input.addValidator(validator);\n }\n\n /** @param {InputValidator} validator */\n addValidator(validator) {\n this.#children.input.addValidator(validator);\n }\n\n get value() {\n return this.#children.input.value;\n }\n\n set value(value) {\n this.#children.input.value = value;\n this.#updateTextValue();\n }\n\n set displayTextTransformer(f) {\n this.#displayTextTransformer = f;\n }\n\n #getValueAttr() {\n return this.getAttribute(\"value\");\n }\n\n #getDisplayName() {\n let val = this.#displayTextTransformer(this.#getValueAttr());\n if (this.#isNumberType())\n val = +val;\n return `${this.#prefix}${val}${this.#suffix}`\n }\n\n #addListeners() {\n this.#children.text.addEventListener(\"click\", this.#showPopup.bind(this));\n // Beware of \"mousedown\" because click event still could be triggered on the element below edit-text\n this.addEventListener('click', this.#onClickOutsideOfInput.bind(this));\n this.#children.popup.addEventListener('keydown', this.#onKeydown.bind(this));\n this.#children.input.onInput(this.#onInput.bind(this));\n this.#children.popup.addEventListener(\"cancel\", this.#onEscape.bind(this));\n }\n\n #showPopup() {\n this.toggleIncorrectAttribute(false);\n this.#updateInputValue();\n this.#updatePopupPosition();\n this.#children.popup.showModal();\n this.#children.input.focus();\n }\n\n #onInput(_, isValid) {\n this.#isValid = isValid;\n }\n\n #onEscape() {\n this.#children.input.value = this.#lastEnteredValue;\n }\n\n #onEnter() {\n if (this.checkValidity()) {\n this.#children.popup.close();\n this.#updateDisplayTextAndNotifyIfChanged();\n }\n }\n\n #onClickOutsideOfInput(event) {\n event.preventDefault();\n event.stopPropagation();\n if (event.target !== this.#children.popup)\n return;\n this.#children.popup.close();\n this.#updateDisplayTextAndNotifyIfChanged();\n }\n\n #updateDisplayTextAndNotifyIfChanged() {\n if (!this.#isValid){\n this.#children.input.value = this.#getValueAttr();\n return\n }\n if (this.#getValueAttr() !== this.#children.input.value && this.#children.input.value.length) {\n this.#updateTextValue();\n this.#callbacks.onChangeValue.forEach(cb => cb(this.#getValueAttr()));\n }\n const value = this.#children.input.rawValue;\n if (value.length === 0 && !this.#children.input.hasAttribute(\"required\")) {\n this.#setEmptyValue();\n } else {\n this.#lastEnteredValue = value;\n this.#children.text.toggleAttribute('empty-value', false)\n }\n }\n\n #setEmptyValue() {\n this.#children.text.textContent = \"set\";\n this.#children.text.toggleAttribute('empty-value', true)\n this.removeAttribute('value');\n this.removeAttribute('title');\n }\n\n #onKeydown(evt) {\n evt.stopPropagation();\n if (evt.repeat) return\n if (evt.key === KeyCode.Enter && !evt.repeat && this.#isValid)\n this.#onEnter();\n }\n\n #updateInputValue() {\n if (this.hasAttribute('value')) {\n this.#lastEnteredValue = this.getAttribute(\"value\");\n this.#children.input.value = this.#lastEnteredValue;\n }\n }\n\n #updateTextValue() {\n this.setAttribute(\"value\", this.#children.input.value);\n this.setAttribute('title', this.#children.input.value);\n this.#children.text.toggleAttribute('empty-value', false)\n let value = this.#getValueAttr();\n if (typeof value === \"string\" && value.length > 0) {\n this.#children.text.textContent = this.#getDisplayName();\n } else {\n this.#setEmptyValue();\n }\n }\n\n #updatePopupPosition() {\n let {top, left} = this.getBoundingClientRect();\n this.#children.popup.style.top = top + window.scrollY + \"px\";\n this.#children.popup.style.left = left + window.scrollX + \"px\";\n if (!this.hasAttribute('max-width')) {\n this.#children.popup.style['max-width'] = Math.max(this.offsetWidth + 16, 128) + \"px\";\n } else {\n this.#children.popup.style.width = getTextWidth(this.#children.input.rawValue) + 16 + \"px\";\n }\n }\n\n #isNumberType() {\n return this.getAttribute(\"type\") === \"number\"\n }\n\n #initAttributes() {\n if (this.hasAttribute(\"suffix\"))\n this.#suffix = this.getAttribute(\"suffix\");\n if (this.hasAttribute(\"prefix\"))\n this.#prefix = this.getAttribute(\"prefix\");\n if (this.hasAttribute(\"max-width\")) {\n this.#children.popup.style['max-width'] = this.getAttribute(\"max-width\") + 'px';\n this.#children.input.style['max-width'] = this.getAttribute(\"max-width\") - 16 + 'px';\n }\n if (this.hasAttribute(\"min-width\")) {\n this.#children.popup.style['min-width'] = this.getAttribute(\"min-width\") + 'px';\n this.#children.input.style['min-width'] = this.getAttribute(\"min-width\") - 16 + 'px';\n }\n\n this.#children.input.value = this.#getValueAttr();\n if (this.hasAttribute(\"scale\"))\n this.displayTextTransformer = (text) => roundToDecimalPlaces(text, parseInt(this.getAttribute(\"scale\")));\n }\n\n #htmlTemplate() {\n const requiredAttr = this.hasAttribute(\"required\") ? \"required\" : \"\";\n const typeAttr = this.getAttribute(\"type\") || \"text\";\n let stepAttr = \"\";\n if (this.hasAttribute(\"step\"))\n stepAttr = `step=\"${this.getAttribute(\"step\")}\"`\n let minAttr = \"\";\n if (this.hasAttribute(\"min\"))\n minAttr = `min=\"${this.getAttribute(\"min\")}\"`\n let maxAttr = \"\";\n if (this.hasAttribute(\"max\"))\n maxAttr = `max=\"${this.getAttribute(\"max\")}\"`\n let minLengthAttr = \"\";\n if (this.hasAttribute(\"minlength\"))\n minLengthAttr = `minlength=\"${this.getAttribute(\"minlength\")}\"`\n let maxLengthAttr = \"\";\n if (this.hasAttribute(\"maxlength\"))\n maxLengthAttr = `maxlength=\"${this.getAttribute(\"maxlength\")}\"`\n let patternAttr = \"\";\n if (this.hasAttribute(\"pattern\"))\n patternAttr = `pattern=\"${this.getAttribute(\"pattern\")}\"`\n let numberTypeAttr = \"\";\n if (this.hasAttribute(\"number-type\"))\n numberTypeAttr = `number-type=\"${this.getAttribute(\"number-type\")}\"`\n return `\n `;\n }\n\n static get is() {\n return 'edit-text';\n }\n}\n\n// Checking, is a custom element already defined\nif (!window.customElements.get(EditText.is)) {\n window.customElements.define(EditText.is, EditText);\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","TextInputValidityState","constructor","textInput","this","querySelector","isValid","errorMessage","checkValidity","setCustomValidity","validity","valid","message","badInput","customError","patternMismatch","typeMismatch","rangeOverflow","rangeUnderflow","tooLong","tooShort","valueMissing","stepMismatch","cv","assign","trimmedText","trim","hasAttribute","type","min","max","numberType","getAttribute","Number","isInteger","valueAsNumber","validityState","isTypeNumber","step","maxLength","minLength","validationMessage","KeyCode","freeze","safeHtml","strings","values","result","i","length","unsafe","String","replace","getTextWidth","text","span","document","createElement","body","appendChild","textContent","style","fontSize","visibility","position","width","Math","ceil","getBoundingClientRect","remove","TextInput","HTMLElement","static","Set","onTrailingIconClick","onChangeValue","onInput","connectedCallback","innerHTML","disconnectedCallback","setAttribute","window","removeEventListener","bind","capture","addValidator","validator","push","rawValue","isFinite","isFiniteNumber","validate","focus","callback","options","setDisabled","isDisabled","toggleAttribute","event","Up","Down","preventDefault","Enter","repeat","forEach","attribute","attributes","has","name","classList","add","addEventListener","activeElement","blur","trailingIconName","is","customElements","ListBox","a","b","displayName","localeCompare","onOptionClick","comparator","filter","searchString","toLowerCase","li","querySelectorAll","dataset","index","indexOf","selectedElement","scrollIntoView","block","show","passive","hide","selectNextItem","visibleElements","hasSelectedElement","selectPrevItem","triggerClickOnSelectedItem","dispatchEvent","MouseEvent","isVisible","cb","evt","contains","target","isScrollingUp","deltaY","isScrollingDown","isListScrolledToItsTop","scrollTop","isListScrolledToItsBottom","clientHeight","scrollHeight","stopPropagation","sort","option","map","title","join","parentClientRect","parentElement","widthToBe","maxAllowedWidth","documentElement","clientWidth","left","right","top","elementIndex","element","startIndex","before","substring","match","after","TypeAheadInput","initialValue","includes","code","stopImmediatePropagation","Esc","inputText","input","requiredAttribute","disabledAttribute","iconName","SelectInput","onShowDropdown","showDropdown","EditText","ResizeObserver","popup","observe","unobserve","onChange","toggleIncorrectAttribute","isIncorrect","addExternalValidator","displayTextTransformer","f","val","showModal","_","close","removeAttribute","scrollY","scrollX","offsetWidth","number","decimalPlaces","multiplier","pow","round","roundToDecimalPlaces","parseInt","requiredAttr","typeAttr","stepAttr","minAttr","maxAttr","minLengthAttr","maxLengthAttr","patternAttr","numberTypeAttr"],"sourceRoot":""}
\ No newline at end of file
diff --git a/tmp_tsoutput/ListBox/ListBox.js b/tmp_tsoutput/ListBox/ListBox.js
index 2a3e129..ce3fd89 100644
--- a/tmp_tsoutput/ListBox/ListBox.js
+++ b/tmp_tsoutput/ListBox/ListBox.js
@@ -9,6 +9,7 @@ export default class ListBox extends HTMLElement {
#callbacks = {
onOptionClick: []
};
+ #preventScrollFunction;
/**
* @returns {{displayName:string}[]}
*/
@@ -49,11 +50,13 @@ export default class ListBox extends HTMLElement {
}
}
show() {
- this.style.display = 'block';
+ document.addEventListener("wheel", this.#preventScrollFunction, { capture: true, passive: false });
+ this.toggleAttribute('open', true);
this.#updatePosition();
}
hide() {
- this.style.display = 'none';
+ document.removeEventListener("wheel", this.#preventScrollFunction, { capture: true, passive: false });
+ this.toggleAttribute('open', false);
this.#resetCurrentSelection();
}
selectNextItem() {
@@ -92,7 +95,7 @@ export default class ListBox extends HTMLElement {
return this.#getSelectedElement() != null;
}
isVisible() {
- return window.getComputedStyle(this).display !== 'none';
+ return this.hasAttribute('open');
}
onOptionClick(cb) {
this.#callbacks.onOptionClick.push(cb);
@@ -101,6 +104,27 @@ export default class ListBox extends HTMLElement {
this.innerHTML = this.#htmlTemplate();
this.#listElement = this.querySelector("ul");
this.#addListeners();
+ // This function is needed to stop scrolling all page, except of list-box
+ // Otherwise select and typeahead inputs can be scrolled, but list-box fixed in the page
+ this.#preventScrollFunction = (evt) => {
+ if (!this.contains(evt.target)) {
+ // When scrolling outside the list-box
+ evt.stopPropagation();
+ evt.preventDefault();
+ }
+ else {
+ const isScrollingUp = evt.deltaY < 0;
+ const isScrollingDown = evt.deltaY > 0;
+ const isListScrolledToItsTop = this.#listElement.scrollTop === 0;
+ const isListScrolledToItsBottom = this.#listElement.scrollTop + this.#listElement.clientHeight >= this.#listElement.scrollHeight;
+ const nothingToScrollUp = isScrollingUp & isListScrolledToItsTop;
+ const nothingToScrollDown = isScrollingDown & isListScrolledToItsBottom;
+ if (nothingToScrollUp || nothingToScrollDown) {
+ evt.stopPropagation();
+ evt.preventDefault();
+ }
+ }
+ };
}
/**
* @param {{displayName:string}[]}values
@@ -150,6 +174,8 @@ export default class ListBox extends HTMLElement {
this.#listElement.style.right = null;
}
this.#listElement.style.width = `${Math.min(widthToBe, document.documentElement.clientWidth)}px`;
+ this.style.width = `${Math.min(widthToBe, document.documentElement.clientWidth)}px`;
+ this.style.top = `${parentClientRect.top}px`;
}
#getSelectedElement() {
return this.querySelector(`li[data-index="${this.#selectedElementIndex}"]`);