@smart-webcomponents-angular/passwordtextbox 19.0.8 → 25.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/passwordtextbox/smart.element.mjs +16 -3
- package/esm2020/passwordtextbox/smart.passwordtextbox.mjs +46 -35
- package/fesm2015/smart-webcomponents-angular-passwordtextbox.mjs +59 -36
- package/fesm2015/smart-webcomponents-angular-passwordtextbox.mjs.map +1 -1
- package/fesm2020/smart-webcomponents-angular-passwordtextbox.mjs +59 -36
- package/fesm2020/smart-webcomponents-angular-passwordtextbox.mjs.map +1 -1
- package/index.d.ts +6083 -5194
- package/package.json +20 -17
- package/passwordtextbox/smart.element.d.ts +6 -2
- package/passwordtextbox/smart.passwordtextbox.d.ts +35 -32
- package/source/modules/smart.passwordtextbox.js +2 -2
- package/source/smart.button.js +3 -3
- package/source/smart.element.js +3 -3
- package/source/smart.input.js +3 -3
- package/source/smart.passwordtextbox.js +3 -3
- package/source/smart.tooltip.js +2 -2
- package/styles/font/smart-icons.eot +0 -0
- package/styles/font/smart-icons.svg +14 -0
- package/styles/font/smart-icons.ttf +0 -0
- package/styles/font/smart-icons.woff +0 -0
- package/styles/font/smart-icons.woff2 +0 -0
- package/styles/smart.base.css +2 -2
- package/styles/smart.common.css +1 -1
- package/styles/smart.passwordtextbox.css +1 -1
package/source/smart.input.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
/* Smart UI
|
|
3
|
-
Copyright (c) 2011-
|
|
2
|
+
/* Smart UI v25.5.5 (2026-02-24)
|
|
3
|
+
Copyright (c) 2011-2024 jQWidgets.
|
|
4
4
|
License: https://htmlelements.com/license/ */ //
|
|
5
5
|
|
|
6
|
-
Smart("smart-input",class extends Smart.BaseElement{static get properties(){return{autoCompleteDelay:{value:100,type:"number"},dataSource:{type:"any",value:[],reflectToAttribute:!1},dropDownClassList:{value:[],type:"array",reflectToAttribute:!1},dropDownDataSource:{type:"any",reflectToAttribute:!1,value:[]},dropDownHeight:{type:"any",value:200},dropDownOpenMode:{allowedValues:["default","manual"],value:"default",type:"string"},dropDownAppendTo:{value:null,type:"any"},dropDownWidth:{type:"any",value:null},dropDownButtonPosition:{allowedValues:["none","left","right"],value:"none",type:"string"},dropDownOpenPosition:{allowedValues:["bottom","top","auto"],value:"bottom",type:"string"},dropDownPlaceholder:{type:"string",value:""},hint:{type:"string",value:""},inputPurpose:{type:"string",value:"off"},items:{type:"number",value:8},minLength:{type:"number",value:1},maxLength:{type:"number",value:99999999},name:{value:"",type:"string"},prefix:{value:"",type:"string",reflectToAttribute:!1},suffix:{value:"",type:"string",reflectToAttribute:!1},onAffixClick:{value:null,type:"any",reflectToAttribute:!1},opened:{value:!1,type:"boolean"},query:{type:"string",value:""},queryMode:{allowedValues:["contains","containsIgnoreCase","doesNotContain","doesNotContainIgnoreCase","equals","equalsIgnoreCase","startsWith","startsWithIgnoreCase","endsWith","endsWithIgnoreCase"],type:"string",value:"containsIgnoreCase"},placeholder:{value:"",type:"string"},readonly:{type:"boolean",value:!1},sorted:{value:!1,type:"boolean"},sortDirection:{value:"asc",type:"string"},selectedIndex:{type:"number",value:-1},selectedValue:{type:"any",value:""},selectedValues:{value:[],type:"array"},type:{type:"string"},value:{type:"string",value:""},innerHTML:{type:"string",reflectToAttribute:!1}}}static get styleUrls(){return["smart.textbox.css"]}template(){return'<div id="inputContainer" role="presentation"><div id="optionsContainer" inner-h-t-m-l=\'{{innerHTML}}\' class="smart-hidden"></div><span class="smart-input-prefix" id="prefix" inner-h-t-m-l=\'{{prefix}}\'></span><input maxlength=\'[[maxLength]]\' class="smart-input" id=\'input\' readonly=\'[[readonly]]\' placeholder=\'[[placeholder]]\' type=\'[[type]]\' name=\'[[name]]\' value=\'{{value::keyup}}\' disabled=\'[[disabled]]\' aria-label="[[placeholder]]" /><span class="smart-hidden smart-hint" id="span">[[hint]]</span><span id="suffix" class="smart-input-suffix" inner-h-t-m-l=\'{{suffix}}\'></span><div id="dropDownButton" tabindex=-1 class="smart-drop-down-button" role="button" aria-label="Toggle popup"><div id="arrow" class="arrow" aria-hidden="true"></div></div></div>'}static get listeners(){return{"input.focus":"_focusHandler","input.blur":"_blurHandler","input.keydown":"_keyDownHandler","input.keyup":"_keyUpHandler","input.keypress":"_keyPressHandler","input.paste":"_pasteHandler","prefix.click":"_prefixClick","suffix.click":"_suffixClick","dropDownButton.down":"_dropDownButtonDownHandler","inputContainer.down":"_downHandler","document.up":"_documentUpHandler"}}_prefixClick(e){const t=this;if(t.onAffixClick)if("string"==typeof t.onAffixClick){const o=t.onAffixClick.replace("()","");window[o]&&window[o].apply(t,e)}else t.onAffixClick(e)}_suffixClick(e){const t=this;if("string"==typeof t.onAffixClick){const o=t.onAffixClick.replace("()","");window[o]&&window[o].apply(t,e)}else t.onAffixClick(e)}get selectedIndexes(){return this.isCompleted?[this.selectedIndex]:[]}set selectedIndexes(e){if(!this.isCompleted)return;const t=this;if(e&&void 0!==e[0]){if(this.selectedIndex=e[0],null===this.dataSource)return;const o=this.dataSource[this.selectedIndex];if(!o)return;const a=this.context;this.context=this,this.$.input.dataValue=this.selectedValue="string"==typeof o?o:o.value,this.setAttribute("data-value",this.$.input.dataValue);let l=t.dataSource;"string"==typeof l&&(l=t.$.deserialize(l,"array"));for(let e=0;e<l.length;e++){let o=l[e];"string"!=typeof o&&"number"!=typeof o&&(o.value===t.$.input.dataValue?o.selected=!0:o.selected=!1)}this.context=a}else{const e=this.context;this.context=this,this.$.input.dataValue=this.selectedValue="",this.setAttribute("data-value",this.$.input.dataValue),this.selectedIndex=-1;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),o&&Array.isArray(o))for(let e=0;e<o.length;e++){let a=o[e];"string"!=typeof a&&(a.value===t.$.input.dataValue?a.selected=!0:a.selected=!1)}this.context=e}}focus(){this.$.input.focus()}select(){const e=this;e.readonly?e.$.input.focus():e.$.input.select()}_documentUpHandler(e){const t=this,o=t.shadowRoot||t.isInShadowDOM?e.originalEvent.composedPath()[0]:e.originalEvent.target;o!==t&&o!==t.$.dropDownButton&&o!==t.$.input&&o!==t.$.arrow?t.$.scrollView.contains(o.shadowParent||o)?t._isPointerDown&&(t._isPointerDown=!1,t.opened&&(t._preventLookup=!0),t.$.input.focus()):(t.opened&&(t._preventLookup=!0),"manual"===t.dropDownOpenMode||t._isPointerDown||t.close(),t._isPointerDown=!1):t._isPointerDown=!1}_focusHandler(){const e=this;e.setAttribute("focus",""),e.readonly||0!==e.minLength||0!==e.$.input.value.length||e._preventLookup?(e.$.fireEvent("focus"),delete e._preventLookup):e._lookup()}_blurHandler(){const e=this;e.opened||e.removeAttribute("focus"),e.opened||e.$.fireEvent("blur"),e._refreshSelectedIndex(),delete e._preventLookup}_pasteHandler(e){const t=this,o=t.$.input,a=o.value,l=o.selectionStart,r=o.selectionEnd;if(!e.clipboardData&&!window.clipboardData)return;if(t.disabled)return;const i=(e.clipboardData||window.clipboardData).getData("text");let n=a.slice(0,l)+i;n.length,n+=a.slice(r),t.setAttribute("data-value",n),t._refreshSelectedIndex()}_refreshSelectedIndex(){const e=this;let t=e.dataSource;if(t){let o=-1,a=null;if(e.dataSource instanceof Promise)return;if("function"==typeof e.dataSource)return;"string"==typeof t&&(t=e.$.deserialize(t,"array"));for(let l=0;l<t.length;l++){let r=t[l];if("number"!=typeof r&&"boolean"!=typeof r||(r=""+r),"string"==typeof r){if(r===e.value){o=l,a=e.value;break}}else r&&(delete r.selected,r.label===e.value&&(o=l,a=r.value,r.selected=!0))}e.set("selectedIndex",o,!1),e.set("selectedValue",a,!1),-1===e.selectedIndex&&(e.$.input.dataValue=null)}}selectItem(e){const t=this;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),o)for(let a=0;a<o.length;a++){const l=o[a];if(t.set("selectedIndex",-1),t.set("value",""),t.$.input.dataValue=null,"string"==typeof l){if(l===e)return t.set("selectedIndex",a,!1),t.set("value",t.$.input.dataValue=e),void t.setAttribute("data-value",t.$.input.dataValue)}else if(l.value===e)return t.set("selectedIndex",a,!1),t.set("value",l.label),t.$.input.dataValue=e,void t.setAttribute("data-value",t.$.input.dataValue)}else t.set("value",t.$.input.dataValue=e),t.setAttribute("data-value",t.$.input.dataValue),t.set("selectedIndex",-1,!1)}getItem(e){const t=this;if(t.dataSource)for(let o=0;o<t.dataSource.length;o++){const a=t.dataSource[o];if(a.value===e)return a}return null}getPrevItem(){const e=this,t=e.getSelectedItem();if(e.dataSource&&t)for(let o=0;o<e.dataSource.length;o++)if(e.dataSource[o].value===t.value)return e.dataSource[o-1];return null}getNextItem(){const e=this,t=e.getSelectedItem();if(e.dataSource&&t)for(let o=0;o<e.dataSource.length;o++)if(e.dataSource[o].value===t.value)return e.dataSource[o+1];return null}getSelectedItem(){const e=this;return e.dataSource&&0===e.dataSource.length?{label:e.value,value:e.$.input.dataValue?e.$.input.dataValue:e.value}:{label:e.value,value:void 0!==e.$.input.dataValue?e.$.input.dataValue:e.value}}_refreshMenu(){const e=this;e.$.menu.classList.remove("scroll"),e.$.scrollView.computedVerticalScrollBarVisibility&&e.$.menu.classList.add("scroll")}_fromHTMLEntities(e){const t=this,o=t._textArea?t._textArea:document.createElement("textarea");return o.innerHTML=e,t._textArea=o,o.value}_performSelect(){const e=this,t=e.$.menu.querySelector(".active");let o="",a="";t&&(o=t.getAttribute("data-label"),o=e._fromHTMLEntities(o),a=t.dataValue);let l=e.value,r=e.$.input.dataValue;e.set("value",o),e.$.input.dataValue=a,e.setAttribute("data-value",a),t&&e.set("selectedIndex",t.index),e.set("selectedValues",[e.$.input.dataValue]),e.set("selectedValue",e.$.input.dataValue);let i=e.dataSource;if("string"==typeof i&&(i=e.$.deserialize(i,"array")),i&&Array.isArray(i))for(let t=0;t<i.length;t++){let o=i[t];"string"!=typeof o&&"number"!=typeof o&&(o.value===e.$.input.dataValue?o.selected=!0:o.selected=!1)}e.close(),o===l&&a===r||(e.$.fireEvent("change",{value:a,label:o,oldValue:r,oldLabel:l}),e._updateTargetValue())}_open(){const e=this;if(e.opened)return;const t=window.scrollX,o=window.scrollY;let a=e.getBoundingClientRect(),l=0,r=0;if(e.timer&&clearTimeout(e.timer),e.getRootNode()&&e.getRootNode().host)e.getRootNode().host.shadowRoot.appendChild(e.$.scrollView);else if(e.dropDownAppendTo){if("body"===e.dropDownAppendTo||e.dropDownAppendTo===document.body)document.body.appendChild(e.$.scrollView);else if(e.dropDownAppendTo instanceof HTMLElement)e.dropDownAppendTo.appendChild(e.$.scrollView);else if("string"==typeof dropDownAppendTo){let t=document.getElementById(e.dropDownAppendTo);t instanceof HTMLElement?t.appendChild(e.$.scrollView):document.body.appendChild(e.$.scrollView)}}else document.body.appendChild(e.$.scrollView);if(e.setAttribute("aria-owns",e.$.scrollView.id),e.readonly||e.$.input.setAttribute("aria-controls",e.$.scrollView.id),e.$.scrollView.enableShadowDOM&&!e._importedStyle&&(e.$.scrollView.importStyle(e._getStyleUrl("smart.textbox.css")),e._importedStyle=!0),"static"!==getComputedStyle(document.body).position){const e=document.body.getBoundingClientRect();l=e.left,r=e.top}if(e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.style.left=-3+a.left+t-l+"px",e.$.scrollView.classList.remove("open"),e.$.scrollView.removeAttribute("top"),"bottom"===e.dropDownOpenPosition)e.$.scrollView.style.top=a.bottom+o-r+1+"px";else if("top"===e.dropDownOpenPosition)e.$.scrollView.style.top=a.top-e.$.scrollView.offsetHeight+o-r-2+"px",e.$.scrollView.setAttribute("top","");else if("auto"===e.dropDownOpenPosition){e.$.scrollView.style.top=a.bottom+o-r+1+"px";const t=a.top-e.$.scrollView.offsetHeight+o-r-2;window.innerHeight<parseInt(e.$.scrollView.style.top)+e.$.scrollView.offsetHeight-o?t>=0&&(e.$.scrollView.style.top=t+"px",e.$.scrollView.setAttribute("top","")):e.$.scrollView.style.top=a.bottom+o-r+1+"px"}if(e.dropDownAppendTo&&"body"!==e.dropDownAppendTo){e.$.scrollView.style.position="absolute",e.$.scrollView.style.width="auto",e.$.scrollView.style.height="auto";const t=e.$.scrollView.parentNode.getBoundingClientRect();e.$.scrollView.style.top=a.bottom-t.top+"px","top"===e.dropDownOpenPosition&&(e.$.scrollView.style.top=a.top-t.top-e.$.scrollView.offsetHeight+"px"),e.$.scrollView.style.left=-3+a.left-t.left+"px",e.dropDownHeight&&(e.$.scrollView.style.height=e.dropDownHeight),e.dropDownWidth&&(e.$.scrollView.style.width=e.dropDownWidth)}e.opening=!0,e._positionTimer&&clearInterval(e._positionTimer),e.dropDownAppendTo||(e._positionTimer=setInterval((()=>{const t=e.getBoundingClientRect();if(e.opening)e.opening=!1,a=t;else if(Math.abs(parseInt(t.top)-parseInt(a.top))>=10||Math.abs(parseInt(t.left)-parseInt(a.left))>=10){const o=window.scrollX,a=window.scrollY;return e.$.scrollView.style.left=-3+t.left+o-l+"px",void("bottom"===e.dropDownOpenPosition?e.$.scrollView.style.top=t.bottom+a-r+1+"px":"top"===e.dropDownOpenPosition?e.$.scrollView.style.top=t.top-e.$.scrollView.offsetHeight+a-r+1+"px":"auto"===e.dropDownOpenPosition&&(e.$.scrollView.removeAttribute("top"),e.$.scrollView.style.top=t.bottom+a-r+1+"px",window.innerHeight<parseInt(e.$.scrollView.style.top)+e.$.scrollView.offsetHeight-a?(e.$.scrollView.style.top=t.top-e.$.scrollView.offsetHeight+a-r+1+"px",e.$.scrollView.setAttribute("top","")):e.$.scrollView.style.top=t.bottom+a-r+1+"px"))}}),50)),e.$.scrollView.onpointerdown=function(t){e._isPointerDown=!0,t.stopPropagation(),t.preventDefault()},requestAnimationFrame((function(){const t=e.dropDownWidth;if(e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._refreshMenu(),e.$.scrollView.setAttribute("open",""),e.setAttribute("open",""),e.$.dropDownButton.setAttribute("open",""),e.$.input.setAttribute("open",""),t&&"string"==typeof t&&-1!==t.indexOf("%")){const o=parseFloat(t)/100;e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",e.offsetWidth*o+"px")}else if("auto"!==t&&t)e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",parseFloat(t)+"px");else if("auto"===t){if(e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.$.scrollViewerContainer.classList.contains("vscroll")){const t=e.$.scrollView.offsetWidth+parseFloat(getComputedStyle(e.$.scrollView).getPropertyValue("--smart-scroll-bar-size"));e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",t+"px")}}else{e.$.menu.style.width="auto";let t=e.$.menu.offsetWidth;const o=e.$.menu.querySelectorAll("li");for(let t=0;t<o.length;t++)e._maxDropDownWidth=Math.max((o[t].firstElementChild||o[t]).offsetWidth,e._maxDropDownWidth);e.$.scrollView.computedVerticalScrollBarVisibility&&(t+=e.$.scrollView.$&&e.$.scrollView.$.verticalScrollBar?e.$.scrollView.$.verticalScrollBar.offsetWidth:30),e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",Math.max(t,e.offsetWidth-8)+"px"),e.$.menu.style.width=""}(e.shadowRoot||e.isInShadowDOM)&&e.$.scrollView._scrollView&&Smart.ScrollBar&&requestAnimationFrame((()=>{e.$.scrollView._scrollView&&e.$.scrollView._scrollView.vScrollBar.refresh()}))})),e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._refreshMenu(),e.set("opened",!0),e.setAttribute("aria-expanded",!0),e.$.fireEvent("open")}close(){const e=this;return!!e.opened&&(e.timer&&clearTimeout(e.timer),e.timer=setTimeout((function(){e.$.scrollView.parentNode&&!e.opened&&(e.$.scrollView.remove(),e.removeAttribute("aria-owns"),e.readonly||e.$.input.removeAttribute("aria-controls"))}),1e3),e._positionTimer&&clearInterval(e._positionTimer),e.$.scrollView.removeAttribute("open"),e.$.dropDownButton.removeAttribute("open"),e.$.input.removeAttribute("open"),e.removeAttribute("open"),e.set("opened",!1),e.setAttribute("aria-expanded",!1),e.$.input.focus(),e.$.fireEvent("close"),!0)}refresh(){const e=this;e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._getDataSourceFromOption(),e.close()}_lookup(e){const t=this;t.query=t.$.input.value;const o=t.context;if(t.context=t,t.selectedIndex=-1,t.selectedValue=null,t.context=o,t.$.input.readonly&&(t._incrementalSearchQuery||(t._incrementalSearchQuery=""),t._incrementalSearchQuery+=e.key,t._incrementalSearchTimer&&clearTimeout(t._incrementalSearchTimer),t.query=t._incrementalSearchQuery,t._incrementalSearchTimer=setTimeout((function(){t._incrementalSearchQuery=""}),700)),t.query.length<t.minLength)return void t.close();const a=function(e){clearTimeout(t._autoCompleteTimeout),t._autoCompleteTimeout=setTimeout((()=>{const o=t.context;t.context=t,t._process(e),t.context=o}),t.autoCompleteDelay)};"function"==typeof t.dataSource?t.dataSource(t.query,a):a(t.dataSource)}_downHandler(e){const t=this;t.readonly&&t._dropDownButtonDownHandler(e)}_dropDownButtonDownHandler(e){const t=this;return"manual"!==t.dropDownOpenMode&&(t._toggle(),t.focus()),e.preventDefault(),e.stopPropagation(),e.originalEvent.preventDefault(),e.originalEvent.stopPropagation(),t._isPointerDown=!0,!1}_toggle(){const e=this;e.opened?e.close():e.open()}open(){const e=this;function t(t){e._process(t);const o=e.$.menu.querySelector(".active");if(o){const t=e.$.input.dataValue;for(let a=0;a<e.$.menu.children.length;a++){const l=e.$.menu.children[a],r=l.getAttribute("data-label"),i=l.dataValue;if(void 0!==t&&i===t||void 0===t&&r===e.$.input.value){o.classList.remove("active"),l.classList.add("active"),e._setActiveDescendant(l),e.$.input.dataValue=i,e.setAttribute("data-value",i);break}}}e.ensureVisible(),e.$.input.focus(),setTimeout((function(){e.$.input.focus()}),25)}e.dropDownDataSource&&(Array.isArray(e.dropDownDataSource)&&e.dropDownDataSource.length>0||"function"==typeof e.dropDownDataSource)?(e.query="","function"==typeof e.dropDownDataSource?e.dropDownDataSource(e.query,t):t(e.dropDownDataSource)):(e.query="","function"==typeof e.dataSource?e.dataSource(e.query,t):t(e.dataSource))}_process(e){const t=this;"string"==typeof e&&(e=t.$.deserialize(e,"array")),e=t.readonly?e.filter((function(){return!0})):e.filter((function(e){return""===e||(t.matcher?t.matcher(e):t._matcher(e))})),e=t._sorter(e),t.sorted&&(e.sort(((e,t)=>void 0!==e.label?e.label.localeCompare(t.label):e.localeCompare(t))),"desc"===t.sortDirection&&e.reverse()),!e.length&&t.opened&&""===t.dropDownPlaceholder&&t.close(),0===e.length&&!0!==t.allowItemsAdd&&""===t.dropDownPlaceholder||(t.query.length>0?t._render(e.slice(0,t.items)):t._render(e),t._open(),t.$.scrollView.refresh&&t.$.scrollView.refresh(),t._refreshMenu(),t.ensureVisible())}_matcher(e){const t=this.query;switch(null===e&&(e="null"),e=""+(e=e.label||e),this.queryMode){case"startsWith":return e.startsWith(t);case"startsWithIgnoreCase":return e.toLowerCase().startsWith(t.toLowerCase());case"doesNotContain":return e.indexOf(t)<0;case"doesNotContainIgnoreCase":return e.toLowerCase().indexOf(t.toLowerCase())<0;case"contains":return e.indexOf(t)>-1;default:case"containsIgnoreCase":return~e.toLowerCase().indexOf(t.toLowerCase());case"equals":return 0===e.localeCompare(t);case"equalsIgnoreCase":return 0===e.toLowerCase().localeCompare(t.toLowerCase());case"endsWith":return e.endsWith(t);case"endsWithIgnoreCase":return e.toLowerCase().endsWith(t.toLowerCase())}}_sorter(e){const t=this;let o,a=[],l=[],r=[];if(e&&""===e[0])return e;for(;o=e.shift();){let e=o.label||o;e=""+e,e.toLowerCase().indexOf(t.query.toLowerCase())?~e.indexOf(t.query)?l.push(o):r.push(o):a.push(o)}return a.concat(l,r)}_highlighter(e){const t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return this.query?e.replace(new RegExp("("+t+")","ig"),(function(e,t){return"<strong>"+t+"</strong>"})):e}_render(e){const t=this;let o=0,a=-1,l=null;const r=e.map((function(e){let r=e,i=e;"object"==typeof e&&(r=e.label,i=void 0!==e.value?e.value:r),r=""+r,r=r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""");const n=document.createElement("li"),s=document.createElement("a");if(s.href="javascript:void(0)",n.id=t.id+"Item"+Math.floor(65536*(1+Math.random())).toString(16).substring(1),n.setAttribute("data-label",r),n.index=o++,n.dataValue=i,"string"==typeof i?n.setAttribute("value",i):n.setAttribute("value",JSON.stringify(i)),n.setAttribute("role","option"),n.setAttribute("aria-label",r),void 0!==e.menuLabel?(r=e.menuLabel,s.innerHTML=r):s.innerHTML=t.highlighter?t.highlighter(r):t._highlighter(r),s.setAttribute("aria-hidden",!0),e.disabled&&n.classList.add("smart-disabled"),void 0!==e.visible&&!1===e.visible&&n.classList.add("smart-hidden"),e.icon&&(s.classList.add("icon"),s.classList.add(e.icon)),e.prefix){const t=document.createElement("span");t.innerHTML=e.prefix,s.classList.add("has-prefix"),s.innerHTML=t.innerHTML+s.innerHTML}if(e.suffix){const t=document.createElement("span");t.innerHTML=e.suffix,s.classList.add("has-suffix"),s.innerHTML=s.innerHTML+t.innerHTML}if(e.dataset)for(let t in e.dataset)n.setAttribute("data-"+t,e.dataset[t]);if(e.className){const t=e.className.split(" ");for(let e=0;e<t.length;e++)n.classList.add(t[e].trim())}return void 0!==t.selectedValue&&void 0!==e.value&&""!==t.selectedValue&&t.selectedValue===e.value&&(e.selected=!0,l=e,a=n.index,n.classList.add("active")),n.appendChild(s),n}));function i(){const e=t.$.menu.getElementsByClassName("active");e[0]&&e[0].classList.remove("active"),this.classList.add("active"),t._setActiveDescendant(this)}-1===a&&r.length>0&&(r[0].classList.add("active"),t._setActiveDescendant(r[0])),l&&(t.$.input.value=l.label,t.$.input.dataValue=l.value,t.setAttribute("data-value",t.$.input.dataValue)),t.$.menu.innerHTML="",0===r.length&&t.dropDownPlaceholder&&(t.$.menu.innerHTML='<div class="smart-flex smart-truncate smart-quiet" style="padding:10px; align-items: center;">'+t.dropDownPlaceholder+"</div>");for(let e=0;e<r.length;e++){const o=r[e];t.$.menu.appendChild(o),o.onmouseenter=i,o.onmouseleave=function(){this.classList.remove("active"),t._setActiveDescendant(null)},o.onclick=i}}ensureVisible(){const e=this,t=e.$.menu.querySelector(".active");t&&(t.offsetTop+t.offsetHeight>=e.$.scrollView.scrollTop+e.$.scrollView.offsetHeight&&(e.$.scrollView.scrollTop=t.offsetTop+t.offsetHeight),(t.offsetTop<=e.$.scrollView.scrollTop||t.offsetTop>=e.$.scrollView.scrollTop+e.$.scrollView.offsetHeight)&&(e.$.scrollView.scrollTop=t.offsetTop),0===[...e.$.menu.children].indexOf(t)?e.$.scrollView.scrollTop=0:[...e.$.menu.children].indexOf(t)===e.$.menu.children.length-1&&(e.$.scrollView.scrollTop=e.$.scrollView.scrollHeight))}_next(){const e=this,t=e.$.menu.querySelector(".active");if(!t){const t=e.$.menu.firstElementChild;return t.classList.add("active"),void e._setActiveDescendant(t)}t.classList.remove("active");let o=t.nextElementSibling;o||(o=e.$.menu.firstElementChild),o.classList.add("active"),e._setActiveDescendant(o),e.ensureVisible()}_prev(){const e=this,t=e.$.menu.querySelector(".active");if(!t){const t=e.$.menu.firstElementChild;return t.classList.add("active"),void e._setActiveDescendant(t)}t.classList.remove("active");let o=t.previousElementSibling;o||(o=e.$.menu.lastElementChild),o.classList.add("active"),e._setActiveDescendant(o),e.ensureVisible()}_move(e){const t=this;if(t.readonly&&!t.opened){if("ArrowUp"===e.key){const o=t.getPrevItem();o&&t.selectItem(o.value),e.preventDefault()}if("ArrowDown"===e.key){const o=t.getNextItem();o&&t.selectItem(o.value),e.preventDefault()}}if(t.opened){switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),t._prev();break;case 40:e.preventDefault(),t._next()}e.stopPropagation()}}_keyDownHandler(e){const t=this;if(t._suppressKeyPressRepeat=![40,38,9,13,27,16,17,18].includes(e.keyCode),t._oldValue=t.$.input.value,!(e.shiftKey||e.altKey||e.ctrlKey))return t.opened&&"Escape"===e.key?(t.close(),e.stopPropagation(),void e.preventDefault()):void t._move(e)}_keyPressHandler(e){this._suppressKeyPressRepeat||e.shiftKey||e.altKey||e.ctrlKey||this._move(e)}_keyUpHandler(e){const t=this;if(!(e.shiftKey||"F2"===e.key||"a"===e.key&&e.ctrlKey))switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:40===e.keyCode&&e.altKey&&t.open(),38===e.keyCode&&e.altKey&&t.close();break;case 9:case 13:if(!t.opened)return;if(!t.readonly&&!t.$.menu.querySelector(".active")){const o=t.$.input.value;return t._performSelect(),t.value=t.$.input.value=o,e.stopPropagation(),void e.preventDefault()}t._performSelect(),e.stopPropagation(),e.preventDefault();break;case 27:if(!t.opened)return;t.close(),e.stopPropagation(),e.preventDefault();break;default:t._lookupTimer&&clearTimeout(t._lookupTimer),t._lookupTimer=setTimeout((()=>{if(t._lookup(e),!t.opened||e.ctrlKey||e.shiftKey||(e.stopPropagation(),e.preventDefault()),t.$.fireEvent("changing",{value:t.$.input.value,oldValue:t._oldValue}),t.dataSource&&t.dataSource.length&&"function"!=typeof t.dataSource)for(let e=0;e<t.dataSource.length;e++){const o=t.dataSource[e];if("string"==typeof o){if(o===t.$.input.value){t.$.input.dataValue=t.$.input.value,t.setAttribute("data-value",t.$.input.dataValue);break}}else if(void 0!==o.label&&o.label===t.$.input.value){t.$.input.dataValue=o.value,t.setAttribute("data-value",o.value);break}}else t.$.input.dataValue=t.$.input.value,t.setAttribute("data-value",t.$.input.dataValue);t._updateTargetValue()}),300)}}clearValue(){const e=this;e.$.input.value="",e.$.input.dataValue="",e.removeAttribute("data-value"),e.set("value",""),e.set("selectedIndex",-1),e.set("selectedValues",[e.$.input.dataValue]),e.set("selectedValue",e.$.input.dataValue)}propertyChangedHandler(e,t,o){super.propertyChangedHandler(e,t,o);const a=this;if("innerHTML"===e&&(a._getDataSourceFromOption(),a._setSelection(!1)),"selectedValue"===e){let e=-1;if(a.dataSource&&Array.isArray(a.dataSource)&&a.dataSource.forEach(((t,a)=>{"string"==typeof t?t===o&&(e=a):t&&t.value===o&&(e=a)})),e>=0){const t=a.context;a.context=a,a.selectedIndex=e,a.context=t}a._setSelection()}if("selectedIndex"===e){let e=a.dataSource;if(a.selectedValue=null,e&&Array.isArray(e))for(let t=0;t<e.length;t++){let o=e[t];"string"!=typeof o&&"number"!=typeof o&&(o.selected=!1)}a._setSelection()}else if("dataSource"===e){if(a.dataSource&&Array.isArray(a.dataSource)){let e=-1;if(a.dataSource.forEach(((t,o)=>{t.selected&&(e=o)})),e>=0){const t=a.context;a.context=a,a.selectedIndex=e,a.context=t}}a._setSelection(!1)}else if("dropDownClassList"===e){const e=a.$.scrollView;for(let o=0,a=t.length;o<a;o+=1)e.classList.remove(t[o]);for(let t=0,a=o.length;t<a;t+=1)e.classList.add(o[t])}else if("dropDownHeight"===e)"auto"!==a.dropDownHeight?a.$.scrollView.style.setProperty("--smart-input-drop-down-menu-height",a.dropDownHeight+"px"):a.$.scrollView.style.setProperty("--smart-input-drop-down-menu-height","auto");else if("opened"===e)a.opened=t,o?a.open():a.close();else if("placeholder"===e){if(a.readonly){const e=a.getAttribute("aria-label");if(e&&e!==t)return;o?a.setAttribute("aria-label",o):a.removeAttribute("aria-label")}}else if("selectedValues"===e)if(null===o)a.$.input.value="",a.$.input.dataValue=o,a.setAttribute("data-value",o),a._refreshSelectedIndex();else{const e=o.join(","),t=a.value;if(a.$.input.dataValue=e,e&&-1===e.indexOf(",")){let e=-1,t=o[0];if(a.dataSource&&Array.isArray(a.dataSource)&&a.dataSource.forEach(((a,l)=>{"string"==typeof a?a!==o&&a!==t||(e=l):a&&a.value===t&&(e=l)})),e>=0){const t=a.context;a.context=a,a.selectedIndex=e,a.context=t}}a._setSelection(),a.propertyChangedHandler("value",t,a.value)}else"value"===e?(a.displayMember!==a.valueMember&&"string"!=typeof o?(a.set("value",o[a.displayMember]),a.$.input.dataValue=o[a.valueMember],a.setAttribute("data-value",a.$.input.dataValue)):(a.$.input.value=a.$.input.dataValue=o,a.setAttribute("data-value",o)),a._refreshSelectedIndex()):"readonly"===e?(a._setAriaRelations(),a._setInputPurpose()):"theme"===e||"rightToLeft"===e?a.$.scrollView[e]=o:"inputPurpose"===e?a._setInputPurpose():"inverted"===e?o?a.$.scrollView.setAttribute("inverted",""):a.$.scrollView.removeAttribute("inverted"):"disabled"!==e&&"unfocusable"!==e||a._setFocusable()}_updateTargetValue(){const e=this;if(e.dataset.target){const t=document.querySelector(e.dataset.target);if(t){const o=e.dataset.property,a=e.value;o&&void 0!==t[o]&&(t[o]=a)}}}detached(){super.detached(),this.close(),this.removeAttribute("focus")}_getDataSourceFromOption(){const e=this;if(e.innerHTML.indexOf("<option")>=0){e.$.optionsContainer.innerHTML=e.innerHTML.trim();const t=e.querySelectorAll("option");let o=[];for(let e=0;e<t.length;e++){const a=t[e],l=a.hasAttribute("selected")||a.hasAttribute("is-selected")&&"false"!==a.getAttribute("is-selected");let r=(""+a.textContent).trim();const i=(""+a.innerHTML).trim(),n=a.hasAttribute("value")?a.getAttribute("value"):r,s=a.hasAttribute("disabled"),u=a.hasAttribute("label")?a.getAttribute("label"):null;u&&(r=u),o.push({label:r,menuLabel:i,value:n,disabled:s,selected:l,className:a.className,dataset:a.dataset}),a.classList.add("smart-hidden")}e.dataSource=o}}render(){const e=this,t=e.dropDownClassList;if(e._getDataSourceFromOption(),e.selectedValues&&e.selectedValues.length){const t=e.selectedValues.join(",");e.value=t}e._createElement&&e._createElement();const o=e.$.scrollView;for(let e=0,a=t.length;e<a;e+=1)o.classList.add(t[e]);e.opened&&(e.opened=!1,e.open());const a=e.$.menu;a&&(a.setAttribute("role","presentation"),o.appendChild(a)),"auto"!==e.dropDownHeight?o.style.setProperty("--smart-input-drop-down-menu-height",e.dropDownHeight+"px"):o.style.setProperty("--smart-input-drop-down-menu-height","auto"),o.classList.add("smart-input-drop-down-menu");for(let t=0;t<e.classList.length;t++){const a=e.classList[t];"smart-element"!==a&&"smart-input"!==a&&o.classList.add(a+"-drop-down-menu")}o.id=e.id+"_"+e.tagName.toLowerCase()+"_menu_"+Math.floor(65536*(1+Math.random())).toString(16).substring(1),o.ownerElement=e;let l=e.dataSource;if("string"==typeof l&&(l=e.$.deserialize(l,"array")),l&&l.length&&Array.isArray(l)){let t=-1;if(l.forEach(((e,o)=>{e.selected&&(t=o)})),t>=0){e.selectedIndex=t;const o=l[t];e.selectedValue="string"==typeof o?l[t]:l[t].value}}e._setAriaRelations(),e._setInputPurpose(),e._setSelection(),e.isInitialized=!0,e.hasAttribute("tabindex")&&(e.readonly||(e.$.input.setAttribute("tabindex",e.getAttribute("tabindex")),e.removeAttribute("tabindex"))),super.render()}_setSelection(e){const t=this;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),t.selectedIndex>=0&&o&&o.length>0){let a=o[t.selectedIndex];if("number"!=typeof a&&"boolean"!=typeof a||(a=""+a),"string"==typeof a){let o=t.$.input.dataValue,l=t.value;t.set("value",a),t.$.input.dataValue=a,t.$.input.setAttribute("data-value",a),t.selectedValues=[t.$.input.dataValue],t.isInitialized&&!1!==e&&(t.$.fireEvent("change",{value:t.value,label:t.label,oldValue:o,oldLabel:l}),t._updateTargetValue())}else{let o=t.$.input.dataValue,l=t.value;a&&(void 0!==a.value?(t.set("value",void 0!==a.value?a.value+"":""),t.$.input.dataValue=a.value,t.$.input.setAttribute("data-value",a.value),t.selectedValues=[t.$.input.dataValue]):a.label&&(t.selectedValues=[a.value]),a.label&&t.set("value",a.label)),t.isInitialized&&!1!==e&&(t.$.fireEvent("change",{value:t.$.input.dataValue,label:a.value,oldValue:o,oldLabel:l}),t._updateTargetValue())}}}_createElement(){const e=this,t=document.createElement("ul"),o=document.createElement("smart-scroll-viewer");o.rightToLeft=e.rightToLeft,o.theme=e.theme,o.horizontalScrollBarVisibility="hidden",e.inverted?o.setAttribute("inverted",""):o.removeAttribute("inverted"),e.$.scrollView=o,e.$.menu=t,e._setFocusable();const a=e.$.input;e.$.menu.onpointerdown=function(t){const o=t.target.closest("li"),l=e.$.menu.querySelector(".active");l&&o&&(l.classList.remove("active"),o.classList.add("active")),t.stopPropagation(),t.preventDefault(),setTimeout((()=>{e._performSelect(),o&&o.parentNode&&e.$.fireEvent("itemClick",{index:[...o.parentNode.children].indexOf(o),item:o,label:o.getAttribute("aria-label"),value:o.dataValue}),a.focus()}),50)},e.$.menu.onpointerup=function(t){t.stopPropagation(),t.preventDefault(),e.$.scrollView.$.verticalScrollBar.thumbCapture&&(e.$.scrollView.$.verticalScrollBar.thumbCapture=!1)}}_setAriaRelations(){const e=this,t=e.getAttribute("aria-label");e.readonly?(e.setAttribute("role","button"),!t&&e.placeholder&&e.setAttribute("aria-label",e.placeholder),e.removeAttribute("aria-readonly"),e.$.input.setAttribute("aria-hidden",!0),e.$.input.removeAttribute("aria-activedescendant"),e.$.input.removeAttribute("aria-controls"),e.$.dropDownButton.setAttribute("aria-hidden",!0)):(e.setAttribute("role","combobox"),t&&t===e.placeholder&&e.removeAttribute("aria-label"),e.$.input.setAttribute("role","searchbox"),e.$.input.removeAttribute("aria-hidden",!0),e.$.dropDownButton.removeAttribute("aria-hidden")),e.setAttribute("aria-expanded",e.opened),e.setAttribute("aria-haspopup","listbox"),e.setAttribute("aria-owns",e.$.scrollView.id),e.$.scrollView.setAttribute("role","listbox")}_setActiveDescendant(e){const t=this;t.readonly||(e?t.setAttribute("aria-activedescendant",e.id):t.removeAttribute("aria-activedescendant"))}_setInputPurpose(){const e=this;e.readonly?e.$.input.removeAttribute("autocomplete"):e.$.input.setAttribute("autocomplete",e.inputPurpose)}_setFocusable(){const e=this;e.disabled||e.unfocusable?e.$.input.setAttribute("tabindex",-1):e.$.input.removeAttribute("tabindex")}});
|
|
6
|
+
Smart("smart-input",class extends Smart.BaseElement{static get properties(){return{autoAdjustWidth:{value:!1,type:"boolean"},autoCompleteDelay:{value:100,type:"number"},dataSource:{type:"any",value:[],reflectToAttribute:!1},dropDownClassList:{value:[],type:"array",reflectToAttribute:!1},dropDownDataSource:{type:"any",reflectToAttribute:!1,value:[]},dropDownHeight:{type:"any",value:200},dropDownMaxHeight:{type:"any",value:""},dropDownOpenMode:{allowedValues:["default","manual"],value:"default",type:"string"},dropDownAppendTo:{value:null,type:"any"},dropDownWidth:{type:"any",value:null},dropDownButtonPosition:{allowedValues:["none","left","right"],value:"none",type:"string"},dropDownOpenPosition:{allowedValues:["bottom","top","auto"],value:"bottom",type:"string"},dropDownPlaceholder:{type:"string",value:""},hint:{type:"string",value:""},inputPurpose:{type:"string",value:"off"},items:{type:"number",value:8},minLength:{type:"number",value:1},maxLength:{type:"number",value:99999999},name:{value:"",type:"string"},prefix:{value:"",type:"string",reflectToAttribute:!1},suffix:{value:"",type:"string",reflectToAttribute:!1},onAffixClick:{value:null,type:"any",reflectToAttribute:!1},opened:{value:!1,type:"boolean"},query:{type:"string",value:""},queryMode:{allowedValues:["contains","containsIgnoreCase","doesNotContain","doesNotContainIgnoreCase","equals","equalsIgnoreCase","startsWith","startsWithIgnoreCase","endsWith","endsWithIgnoreCase"],type:"string",value:"containsIgnoreCase"},placeholder:{value:"",type:"string"},readonly:{type:"boolean",value:!1},sorted:{value:!1,type:"boolean"},sortDirection:{value:"asc",type:"string"},selectedIndex:{type:"number",value:-1},selectedValue:{type:"any",value:""},selectedValues:{value:[],type:"array"},type:{type:"string"},value:{type:"string",value:""},innerHTML:{type:"string",reflectToAttribute:!1}}}static get styleUrls(){return["smart.textbox.css"]}template(){return'<div id="inputContainer" role="presentation"><div id="optionsContainer" inner-h-t-m-l=\'{{innerHTML}}\' class="smart-hidden"></div><span class="smart-input-prefix" id="prefix" inner-h-t-m-l=\'{{prefix}}\'></span><input maxlength=\'[[maxLength]]\' class="smart-input" id=\'input\' readonly=\'[[readonly]]\' placeholder=\'[[placeholder]]\' type=\'[[type]]\' name=\'[[name]]\' value=\'{{value::keyup}}\' disabled=\'[[disabled]]\' /><span class="smart-hidden smart-hint" id="span">[[hint]]</span><span id="suffix" class="smart-input-suffix" inner-h-t-m-l=\'{{suffix}}\'></span><div id="dropDownButton" tabindex=-1 class="smart-drop-down-button" role="button" aria-label="Toggle popup"><div id="arrow" class="arrow" aria-hidden="true"></div></div></div>'}static get listeners(){return{"input.focus":"_focusHandler","input.blur":"_blurHandler","input.keydown":"_keyDownHandler","input.keyup":"_keyUpHandler","input.keypress":"_keyPressHandler","input.paste":"_pasteHandler","input.input":"_inputHandler","prefix.click":"_prefixClick","suffix.click":"_suffixClick","dropDownButton.down":"_dropDownButtonDownHandler","inputContainer.down":"_downHandler","document.up":"_documentUpHandler"}}_inputHandler(){const e=this;e.autoAdjustWidth&&e._autoAdjustWidth()}get selectionStart(){return this.$&&this.$.input?this.$.input.selectionStart:0}set selectionStart(e){this.$&&this.$.input&&(this.$.input.selectionStart=e)}get selectionEnd(){return this.$&&this.$.input?this.$.input.selectionEnd:0}set selectionEnd(e){this.$&&this.$.input&&(this.$.input.selectionEnd=e)}_prefixClick(e){const t=this;if(t.onAffixClick)if("string"==typeof t.onAffixClick){const o=t.onAffixClick.replace("()","");window[o]&&window[o].apply(t,e)}else t.onAffixClick(e)}_suffixClick(e){const t=this;if("string"==typeof t.onAffixClick){const o=t.onAffixClick.replace("()","");window[o]&&window[o].apply(t,e)}else t.onAffixClick(e)}get selectedIndexes(){return this.isCompleted?[this.selectedIndex]:[]}set selectedIndexes(e){if(!this.isCompleted)return;const t=this;if(e&&void 0!==e[0]){if(this.selectedIndex=e[0],null===this.dataSource)return;const o=this.dataSource[this.selectedIndex];if(!o)return;const l=this.context;this.context=this,this.$.input.dataValue=this.selectedValue="string"==typeof o?o:o.value,this.setAttribute("data-value",this.$.input.dataValue);let a=t.dataSource;"string"==typeof a&&(a=t.$.deserialize(a,"array"));for(let e=0;e<a.length;e++){let o=a[e];"string"!=typeof o&&"number"!=typeof o&&(o.value===t.$.input.dataValue?o.selected=!0:o.selected=!1)}this.context=l}else{const e=this.context;this.context=this,this.$.input.dataValue=this.selectedValue="",this.setAttribute("data-value",this.$.input.dataValue),this.selectedIndex=-1;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),o&&Array.isArray(o))for(let e=0;e<o.length;e++){let l=o[e];"string"!=typeof l&&(l.value===t.$.input.dataValue?l.selected=!0:l.selected=!1)}this.context=e}}focus(){this.$.input.focus()}select(){const e=this;e.readonly?e.$.input.focus():e.$.input.select()}_documentUpHandler(e){const t=this,o=t.shadowRoot||t.isInShadowDOM?e.originalEvent.composedPath()[0]:e.originalEvent.target;o!==t&&o!==t.$.dropDownButton&&o!==t.$.input&&o!==t.$.arrow?t.$.scrollView.contains(o.shadowParent||o)?t._isPointerDown&&(t._isPointerDown=!1,t.opened&&(t._preventLookup=!0),t.$.input.focus()):(t.opened&&(t._preventLookup=!0),"manual"===t.dropDownOpenMode||t._isPointerDown||t.close(),t._isPointerDown=!1):t._isPointerDown=!1}_focusHandler(){const e=this;e.setAttribute("focus",""),e.readonly||0!==e.minLength||0!==e.$.input.value.length||e._preventLookup?(e.$.fireEvent("focus"),delete e._preventLookup):e._lookup()}_blurHandler(){const e=this;e.opened||e.removeAttribute("focus"),e.opened||e.$.fireEvent("blur"),e._autoAdjustWidth(),e._refreshSelectedIndex(),delete e._preventLookup}_pasteHandler(e){const t=this,o=t.$.input,l=o.value,a=o.selectionStart,i=o.selectionEnd;if(!e.clipboardData&&!window.clipboardData)return;if(t.disabled)return;const r=(e.clipboardData||window.clipboardData).getData("text");let n=l.slice(0,a)+r;n.length,n+=l.slice(i),t.setAttribute("data-value",n),t._refreshSelectedIndex()}_refreshSelectedIndex(){const e=this;let t=e.dataSource;if(t){let o=-1,l=null;if(e.dataSource instanceof Promise)return;if("function"==typeof e.dataSource)return;"string"==typeof t&&(t=e.$.deserialize(t,"array"));for(let a=0;a<t.length;a++){let i=t[a];if("number"!=typeof i&&"boolean"!=typeof i||(i=""+i),"string"==typeof i){if(i===e.value){o=a,l=e.value;break}}else i&&(delete i.selected,i.label===e.value&&(o=a,l=i.value,i.selected=!0))}e.set("selectedIndex",o,!1),e.set("selectedValue",l,!1),-1===e.selectedIndex&&(e.$.input.dataValue=null),e._autoAdjustWidth()}}selectItem(e){const t=this;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),o)for(let l=0;l<o.length;l++){const a=o[l];if(t.value,t.set("selectedIndex",-1),t.set("value",""),t.$.input.dataValue=null,"string"==typeof a){if(a===e)return t.set("selectedIndex",l,!1),t.set("value",t.$.input.dataValue=e),t.setAttribute("data-value",t.$.input.dataValue),void t._setSelection()}else if(a.value===e)return t.set("selectedIndex",l,!1),t.set("value",a.label),t.$.input.dataValue=e,t.setAttribute("data-value",t.$.input.dataValue),void t._setSelection()}else t.set("value",t.$.input.dataValue=e),t.setAttribute("data-value",t.$.input.dataValue),t.set("selectedIndex",-1,!1);t._autoAdjustWidth()}getItem(e){const t=this;if(t.dataSource)for(let o=0;o<t.dataSource.length;o++){const l=t.dataSource[o];if(l.value===e)return l}return null}getPrevItem(){const e=this,t=e.getSelectedItem();if(e.dataSource&&t)for(let o=0;o<e.dataSource.length;o++)if(e.dataSource[o].value===t.value)return e.dataSource[o-1];return null}getNextItem(){const e=this,t=e.getSelectedItem();if(e.dataSource&&t)for(let o=0;o<e.dataSource.length;o++)if(e.dataSource[o].value===t.value)return e.dataSource[o+1];return null}getSelectedItem(){const e=this;return e.dataSource&&0===e.dataSource.length?{label:e.value,value:e.$.input.dataValue?e.$.input.dataValue:e.value}:{label:e.value,value:void 0!==e.$.input.dataValue?e.$.input.dataValue:e.value}}_refreshMenu(){const e=this;e.$.menu.classList.remove("scroll"),e.$.scrollView.computedVerticalScrollBarVisibility&&e.$.menu.classList.add("scroll")}_fromHTMLEntities(e){const t=this,o=t._textArea?t._textArea:document.createElement("textarea");return o.innerHTML=e,t._textArea=o,o.value}_performSelect(){const e=this,t=e.$.menu.querySelector(".active");let o="",l="";t&&(o=t.getAttribute("data-label"),o=e._fromHTMLEntities(o),l=t.dataValue);let a=e.value,i=e.$.input.dataValue;e.set("value",o),e.$.input.dataValue=l,e.setAttribute("data-value",l),t&&e.set("selectedIndex",t.index),e.set("selectedValues",[e.$.input.dataValue]),e.set("selectedValue",e.$.input.dataValue);let r=e.dataSource;if("string"==typeof r&&(r=e.$.deserialize(r,"array")),r&&Array.isArray(r))for(let t=0;t<r.length;t++){let o=r[t];"string"!=typeof o&&"number"!=typeof o&&(o.value===e.$.input.dataValue?o.selected=!0:o.selected=!1)}e.close(),o===a&&l===i||(e.$.fireEvent("change",{value:l,label:o,oldValue:i,oldLabel:a}),e._updateTargetValue())}_open(){const e=this;if(e.opened)return;const t=window.scrollX,o=window.scrollY;let l=e.getBoundingClientRect(),a=0,i=0;if(e.timer&&clearTimeout(e.timer),e.getRootNode()&&e.getRootNode().host)e.getRootNode().host.shadowRoot.appendChild(e.$.scrollView);else if(e.dropDownAppendTo){if("body"===e.dropDownAppendTo||e.dropDownAppendTo===document.body)document.body.appendChild(e.$.scrollView);else if(e.dropDownAppendTo instanceof HTMLElement)e.dropDownAppendTo.appendChild(e.$.scrollView);else if("string"==typeof dropDownAppendTo){let t=document.getElementById(e.dropDownAppendTo);t instanceof HTMLElement?t.appendChild(e.$.scrollView):document.body.appendChild(e.$.scrollView)}}else document.body.appendChild(e.$.scrollView);if(e.setAttribute("aria-owns",e.$.scrollView.id),e.readonly||e.$.input.setAttribute("aria-controls",e.$.scrollView.id),e.$.scrollView.enableShadowDOM&&!e._importedStyle&&(e.$.scrollView.importStyle(e._getStyleUrl("smart.textbox.css")),e._importedStyle=!0),"static"!==getComputedStyle(document.body).position){const e=document.body.getBoundingClientRect();a=e.left,i=e.top}if(e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.style.left=-3+l.left+t-a+"px",e.$.scrollView.classList.remove("open"),e.$.scrollView.removeAttribute("top"),"bottom"===e.dropDownOpenPosition)e.$.scrollView.style.top=l.bottom+o-i+1+"px";else if("top"===e.dropDownOpenPosition)e.$.scrollView.style.top=l.top-e.$.scrollView.offsetHeight+o-i-2+"px",e.$.scrollView.setAttribute("top","");else if("auto"===e.dropDownOpenPosition){e.$.scrollView.style.top=l.bottom+o-i+1+"px";const t=l.top-e.$.scrollView.offsetHeight+o-i-2;window.innerHeight<parseInt(e.$.scrollView.style.top)+e.$.scrollView.offsetHeight-o?t>=0&&(e.$.scrollView.style.top=t+"px",e.$.scrollView.setAttribute("top","")):e.$.scrollView.style.top=l.bottom+o-i+1+"px"}if(e.dropDownAppendTo&&"body"!==e.dropDownAppendTo){e.$.scrollView.style.position="absolute",e.$.scrollView.style.width="auto",e.$.scrollView.style.height="auto";const t=e.$.scrollView.parentNode.getBoundingClientRect();e.$.scrollView.style.top=l.bottom-t.top+"px","top"===e.dropDownOpenPosition&&(e.$.scrollView.style.top=l.top-t.top-e.$.scrollView.offsetHeight+"px"),e.$.scrollView.style.left=-3+l.left-t.left+"px",e.dropDownHeight&&(e.$.scrollView.style.height=e.dropDownHeight),e.dropDownWidth&&(e.$.scrollView.style.width=e.dropDownWidth)}""!==e.dropDownMaxHeight&&e.$.scrollView.offsetHeight>e.dropDownMaxHeight&&e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-height",e.dropDownMaxHeight+"px"),e.opening=!0,e._positionTimer&&clearInterval(e._positionTimer),e.dropDownAppendTo||(e._positionTimer=setInterval((()=>{const t=e.getBoundingClientRect();if(e.opening)e.opening=!1,l=t;else if(Math.abs(parseInt(t.top)-parseInt(l.top))>=10||Math.abs(parseInt(t.left)-parseInt(l.left))>=10){const o=window.scrollX,l=window.scrollY;return e.$.scrollView.style.left=-3+t.left+o-a+"px",void("bottom"===e.dropDownOpenPosition?e.$.scrollView.style.top=t.bottom+l-i+1+"px":"top"===e.dropDownOpenPosition?e.$.scrollView.style.top=t.top-e.$.scrollView.offsetHeight+l-i+1+"px":"auto"===e.dropDownOpenPosition&&(e.$.scrollView.removeAttribute("top"),e.$.scrollView.style.top=t.bottom+l-i+1+"px",window.innerHeight<parseInt(e.$.scrollView.style.top)+e.$.scrollView.offsetHeight-l?(e.$.scrollView.style.top=t.top-e.$.scrollView.offsetHeight+l-i+1+"px",e.$.scrollView.setAttribute("top","")):e.$.scrollView.style.top=t.bottom+l-i+1+"px"))}}),50)),e.$.scrollView.onpointerdown=function(t){e._isPointerDown=!0,t.stopPropagation(),t.preventDefault()},requestAnimationFrame((function(){const o=e.dropDownWidth;if(e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._refreshMenu(),e.$.scrollView.setAttribute("open",""),e.setAttribute("open",""),e.$.dropDownButton.setAttribute("open",""),e.$.input.setAttribute("open",""),o&&"string"==typeof o&&-1!==o.indexOf("%")){const t=parseFloat(o)/100;e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",e.offsetWidth*t+"px")}else if("auto"!==o&&o)e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",parseFloat(o)+"px");else if("auto"===o){if(e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.$.scrollViewerContainer.classList.contains("vscroll")){const t=e.$.scrollView.offsetWidth+parseFloat(getComputedStyle(e.$.scrollView).getPropertyValue("--smart-scroll-bar-size"));e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",t+"px")}}else{e.$.menu.style.width="auto";let t=e.$.menu.offsetWidth;const o=e.$.menu.querySelectorAll("li");for(let t=0;t<o.length;t++)e._maxDropDownWidth=Math.max((o[t].firstElementChild||o[t]).offsetWidth,e._maxDropDownWidth);e.$.scrollView.computedVerticalScrollBarVisibility&&(t+=e.$.scrollView.$&&e.$.scrollView.$.verticalScrollBar?e.$.scrollView.$.verticalScrollBar.offsetWidth:30),e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",Math.max(t,e.offsetWidth-8)+"px"),e.$.menu.style.width=""}const i=parseInt(e.$.scrollView.style.left),r=e.$.scrollView.offsetWidth;i+r>document.body.offsetWidth&&(e.$.scrollView.style.left=-3+l.right+t-a-r+"px"),(e.shadowRoot||e.isInShadowDOM)&&e.$.scrollView._scrollView&&Smart.ScrollBar&&requestAnimationFrame((()=>{e.$.scrollView._scrollView&&e.$.scrollView._scrollView.vScrollBar.refresh()}))})),e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._refreshMenu(),e.set("opened",!0),e.setAttribute("aria-expanded",!0),e.$.fireEvent("open")}close(){const e=this;return!!e.opened&&(e.timer&&clearTimeout(e.timer),e.timer=setTimeout((function(){e.$.scrollView.parentNode&&!e.opened&&(e.$.scrollView.remove(),e.removeAttribute("aria-owns"),e.readonly||e.$.input.removeAttribute("aria-controls"))}),1e3),e._positionTimer&&clearInterval(e._positionTimer),e.$.scrollView.removeAttribute("open"),e.$.dropDownButton.removeAttribute("open"),e.$.input.removeAttribute("open"),e.removeAttribute("open"),e.set("opened",!1),e.setAttribute("aria-expanded",!1),e.$.input.focus(),e.$.fireEvent("close"),!0)}refresh(){const e=this;e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._getDataSourceFromOption(),e.close()}_lookup(e){const t=this;t.query=t.$.input.value;const o=t.context;if(t.context=t,t.selectedIndex=-1,t.selectedValue=null,t.context=o,t.$.input.readonly&&(t._incrementalSearchQuery||(t._incrementalSearchQuery=""),t._incrementalSearchQuery+=e.key,t._incrementalSearchTimer&&clearTimeout(t._incrementalSearchTimer),t.query=t._incrementalSearchQuery,t._incrementalSearchTimer=setTimeout((function(){t._incrementalSearchQuery=""}),700)),t.query.length<t.minLength)return void t.close();const l=function(e){clearTimeout(t._autoCompleteTimeout),t._autoCompleteTimeout=setTimeout((()=>{const o=t.context;t.context=t,t._process(e),t.context=o}),t.autoCompleteDelay)};"function"==typeof t.dataSource?t.dataSource(t.query,l):l(t.dataSource)}_downHandler(e){const t=this;t.disabled||t.readonly&&t._dropDownButtonDownHandler(e)}_dropDownButtonDownHandler(e){const t=this;if(!t.disabled)return"manual"!==t.dropDownOpenMode&&(t._toggle(),t.focus()),e.preventDefault(),e.stopPropagation(),e.originalEvent.preventDefault(),e.originalEvent.stopPropagation(),t._isPointerDown=!0,!1}_toggle(){const e=this;e.opened?e.close():e.open()}open(){const e=this;function t(t){e._process(t);const o=e.$.menu.querySelector(".active");if(o){const t=e.$.input.dataValue;for(let l=0;l<e.$.menu.children.length;l++){const a=e.$.menu.children[l],i=a.getAttribute("data-label"),r=a.dataValue;if(void 0!==t&&r===t||void 0===t&&i===e.$.input.value){o.classList.remove("active"),a.classList.add("active"),e._setActiveDescendant(a),e.$.input.dataValue=r,e.setAttribute("data-value",r);break}}}e.ensureVisible(),e.$.input.focus(),setTimeout((function(){e.$.input.focus()}),25)}e.dropDownDataSource&&(Array.isArray(e.dropDownDataSource)&&e.dropDownDataSource.length>0||"function"==typeof e.dropDownDataSource)?(e.query="","function"==typeof e.dropDownDataSource?e.dropDownDataSource(e.query,t):t(e.dropDownDataSource)):(e.query="","function"==typeof e.dataSource?e.dataSource(e.query,t):t(e.dataSource))}_process(e){const t=this;"string"==typeof e&&(e=t.$.deserialize(e,"array")),t.readonly,e=e.filter((function(e){return""===e||(t.matcher?t.matcher(e):t._matcher(e))})),e=t._sorter(e),t.sorted&&(e.sort(((e,t)=>void 0!==e.label?e.label.localeCompare(t.label):e.localeCompare(t))),"desc"===t.sortDirection&&e.reverse()),!e.length&&t.opened&&""===t.dropDownPlaceholder&&t.close(),0===e.length&&!0!==t.allowItemsAdd&&""===t.dropDownPlaceholder||(t.query.length>0?t.readonly?t._render(e):t._render(e.slice(0,t.items)):t._render(e),t._open(),t.$.scrollView.refresh&&t.$.scrollView.refresh(),t._refreshMenu(),t.ensureVisible())}_matcher(e){const t=this.query;switch(null===e&&(e="null"),e=""+(e=e.label||e),this.queryMode){case"startsWith":return e.startsWith(t);case"startsWithIgnoreCase":return e.toLowerCase().startsWith(t.toLowerCase());case"doesNotContain":return e.indexOf(t)<0;case"doesNotContainIgnoreCase":return e.toLowerCase().indexOf(t.toLowerCase())<0;case"contains":return e.indexOf(t)>-1;default:case"containsIgnoreCase":return~e.toLowerCase().indexOf(t.toLowerCase());case"equals":return 0===e.localeCompare(t);case"equalsIgnoreCase":return 0===e.toLowerCase().localeCompare(t.toLowerCase());case"endsWith":return e.endsWith(t);case"endsWithIgnoreCase":return e.toLowerCase().endsWith(t.toLowerCase())}}_sorter(e){const t=this;let o,l=[],a=[],i=[];if(e&&""===e[0])return e;for(;o=e.shift();){let e=o.label||o;e=""+e,e.toLowerCase().indexOf(t.query.toLowerCase())?~e.indexOf(t.query)?a.push(o):i.push(o):l.push(o)}return l.concat(a,i)}_highlighter(e){const t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return this.query?e.replace(new RegExp("("+t+")","ig"),(function(e,t){return"<strong>"+t+"</strong>"})):e}_render(e){const t=this;let o=0,l=-1,a=null;const i=e.map((function(e){let i=e,r=e;"object"==typeof e&&(i=e.label,r=void 0!==e.value?e.value:i,t.displayMember&&void 0!==e[t.displayMember]&&(i=e[t.displayMember]),t.valueMember&&void 0!==e[t.valueMember]&&(r=e[t.valueMember])),i=""+i,i=i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""");const n=document.createElement("li"),s=document.createElement("a");if(s.href="javascript:void(0)",n.id=t.id+"Item"+Math.floor(65536*(1+Math.random())).toString(16).substring(1),n.setAttribute("data-label",i),n.index=o++,n.dataValue=r,"string"==typeof r?n.setAttribute("value",r):n.setAttribute("value",JSON.stringify(r)),n.setAttribute("role","option"),n.setAttribute("aria-label",i),void 0!==e.menuLabel?(i=e.menuLabel,s.innerHTML=i):s.innerHTML=t.highlighter?t.highlighter(i):t._highlighter(i),s.setAttribute("aria-hidden",!0),e.disabled&&n.classList.add("smart-disabled"),void 0!==e.visible&&!1===e.visible&&n.classList.add("smart-hidden"),e.icon&&(s.classList.add("icon"),s.classList.add(e.icon)),e.prefix){const t=document.createElement("span");t.innerHTML=e.prefix,s.classList.add("has-prefix"),s.innerHTML=t.innerHTML+s.innerHTML}if(e.suffix){const t=document.createElement("span");t.innerHTML=e.suffix,s.classList.add("has-suffix"),s.innerHTML=s.innerHTML+t.innerHTML}if(e.dataset)for(let t in e.dataset)n.setAttribute("data-"+t,e.dataset[t]);if(e.className){const t=e.className.split(" ");for(let e=0;e<t.length;e++)n.classList.add(t[e].trim())}return void 0!==t.selectedValue&&void 0!==e.value&&""!==t.selectedValue&&t.selectedValue===e.value&&(e.selected=!0,a=e,l=n.index,n.classList.add("active")),n.appendChild(s),n}));function r(){const e=t.$.menu.getElementsByClassName("active");e[0]&&e[0].classList.remove("active"),this.classList.add("active"),t._setActiveDescendant(this),t._autoAdjustWidth()}-1===l&&i.length>0&&(i[0].classList.add("active"),t._setActiveDescendant(i[0])),a&&(t.$.input.value=a.label,t.$.input.dataValue=a.value,t.setAttribute("data-value",t.$.input.dataValue)),t.$.menu.innerHTML="",0===i.length&&t.dropDownPlaceholder&&(t.$.menu.innerHTML='<div class="smart-flex smart-truncate smart-quiet" style="padding:10px; align-items: center;">'+t.dropDownPlaceholder+"</div>");for(let e=0;e<i.length;e++){const o=i[e];t.$.menu.appendChild(o),o.onmouseenter=r,o.onmouseleave=function(){this.classList.remove("active"),t._setActiveDescendant(null)},o.onclick=r}}ensureVisible(e){const t=this;let o=t.$.menu.querySelector(".active");if(!o){if(!e)return;{const l=[...t.$.menu.children];for(let t=0;t<l.length;t++){const a=l[t];(a===e||a&&a.value===e)&&(o=a)}}}if(o)o.offsetTop+o.offsetHeight>=t.$.scrollView.scrollTop+t.$.scrollView.offsetHeight&&(t.$.scrollView.scrollTop=o.offsetTop+o.offsetHeight),(o.offsetTop<=t.$.scrollView.scrollTop||o.offsetTop>=t.$.scrollView.scrollTop+t.$.scrollView.offsetHeight)&&(t.$.scrollView.scrollTop=o.offsetTop),0===[...t.$.menu.children].indexOf(o)?t.$.scrollView.scrollTop=0:[...t.$.menu.children].indexOf(o)===t.$.menu.children.length-1&&(t.$.scrollView.scrollTop=t.$.scrollView.scrollHeight);else if(t.dataSource){let o=-1;if(t.dataSource.forEach(((t,l)=>{(t===e||t&&(t.value===e||t.label===e))&&(o=l)})),o>=0){const e=34*o;return void(t.$.scrollView.scrollTop=e)}}}_next(){const e=this,t=e.$.menu.querySelector(".active");if(!t){const t=e.$.menu.firstElementChild;if(!t)return;return t.classList.add("active"),void e._setActiveDescendant(t)}t.classList.remove("active");let o=t.nextElementSibling;o||(o=e.$.menu.firstElementChild),o&&(o.classList.add("active"),e._setActiveDescendant(o),e.ensureVisible())}_prev(){const e=this,t=e.$.menu.querySelector(".active");if(!t){const t=e.$.menu.firstElementChild;if(!t)return;return t.classList.add("active"),void e._setActiveDescendant(t)}t.classList.remove("active");let o=t.previousElementSibling;o||(o=e.$.menu.lastElementChild),o&&(o.classList.add("active"),e._setActiveDescendant(o),e.ensureVisible())}_move(e){const t=this;if(t.readonly&&!t.opened){if("ArrowUp"===e.key){const o=t.getPrevItem();o&&t.selectItem(o.value),e.preventDefault()}if("ArrowDown"===e.key){const o=t.getNextItem();o&&t.selectItem(o.value),e.preventDefault()}}if(t.opened){switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),t._prev();break;case 40:e.preventDefault(),t._next()}e.stopPropagation()}}_keyDownHandler(e){const t=this;if(t._suppressKeyPressRepeat=![40,38,9,13,27,16,17,18].includes(e.keyCode),t._oldValue=t.$.input.value,!(e.shiftKey||e.altKey||e.ctrlKey)){if(t.opened&&"Escape"===e.key)return t.close(),e.stopPropagation(),void e.preventDefault();t._autoAdjustWidth(),t._move(e)}}_keyPressHandler(e){this._suppressKeyPressRepeat||e.shiftKey||e.altKey||e.ctrlKey||this._move(e)}_autoAdjustWidth(){const e=this;if(e.autoAdjustWidth){const t=document.createElement("span");t.textContent=e.$.input.value||e.placeholder||" ",t.style.minWidth="30px",t.classList.add("smart-element"),t.style.position="absolute",e._measureStyle||(e._measureStyle=getComputedStyle(e)),t.style.fontSize=e._measureStyle.fontSize,t.style.fontFamily=e._measureStyle.fontFamily,t.style.fontWeight=e._measureStyle.fontWeight,document.body.appendChild(t);let o=0;e.readonly&&(o=30),e.style.width=t.offsetWidth+10+o+"px",t.remove()}}_keyUpHandler(e){const t=this;if(!(e.shiftKey||"F2"===e.key||"a"===e.key&&e.ctrlKey))switch(t._autoAdjustWidth(),e.keyCode){case 40:case 38:case 16:case 17:case 18:40===e.keyCode&&e.altKey&&t.open(),38===e.keyCode&&e.altKey&&t.close();break;case 9:case 13:if(!t.opened)return;if(!t.readonly&&!t.$.menu.querySelector(".active")){const o=t.$.input.value;return t._performSelect(),t.value=t.$.input.value=o,e.stopPropagation(),void e.preventDefault()}t._performSelect(),e.stopPropagation(),e.preventDefault();break;case 27:if(!t.opened)return;t.close(),e.stopPropagation(),e.preventDefault();break;default:t._lookupTimer&&clearTimeout(t._lookupTimer),t._lookupTimer=setTimeout((()=>{if(t._lookup(e),!t.opened||e.ctrlKey||e.shiftKey||(e.stopPropagation(),e.preventDefault()),t.$.fireEvent("changing",{value:t.$.input.value,oldValue:t._oldValue}),t.dataSource&&t.dataSource.length&&"function"!=typeof t.dataSource)for(let e=0;e<t.dataSource.length;e++){const o=t.dataSource[e];if("string"==typeof o){if(o===t.$.input.value){t.$.input.dataValue=t.$.input.value,t.setAttribute("data-value",t.$.input.dataValue);break}}else if(void 0!==o.label&&o.label===t.$.input.value){t.$.input.dataValue=o.value,t.setAttribute("data-value",o.value);break}}else t.$.input.dataValue=t.$.input.value,t.setAttribute("data-value",t.$.input.dataValue);t._updateTargetValue()}),300)}}clearValue(){const e=this;e.$.input.value="",e.$.input.dataValue="",e.removeAttribute("data-value"),e.set("value",""),e.set("selectedIndex",-1),e.set("selectedValues",[e.$.input.dataValue]),e.set("selectedValue",e.$.input.dataValue)}propertyChangedHandler(e,t,o){super.propertyChangedHandler(e,t,o);const l=this;if("innerHTML"===e&&(l._getDataSourceFromOption(),l._setSelection(!1)),"selectedValue"===e){let e=-1;if(l.dataSource&&Array.isArray(l.dataSource)&&l.dataSource.forEach(((t,l)=>{"string"==typeof t?t===o&&(e=l):t&&t.value===o&&(e=l)})),e>=0){const t=l.context;l.context=l,l.selectedIndex=e,l.context=t}l._setSelection()}if("selectedIndex"===e){let e=l.dataSource;if(l.selectedValue=null,e&&Array.isArray(e))for(let t=0;t<e.length;t++){let o=e[t];"string"!=typeof o&&"number"!=typeof o&&(o.selected=!1)}l._setSelection()}else if("dataSource"===e){if(l.dataSource&&Array.isArray(l.dataSource)){let e=-1;if(l.dataSource.forEach(((t,o)=>{t.selected&&(e=o)})),e>=0){const t=l.context;l.context=l,l.selectedIndex=e,l.context=t}}l._setSelection(!1)}else if("dropDownClassList"===e){const e=l.$.scrollView;for(let o=0,l=t.length;o<l;o+=1)e.classList.remove(t[o]);for(let t=0,l=o.length;t<l;t+=1)e.classList.add(o[t])}else if("dropDownHeight"===e)"auto"!==l.dropDownHeight?l.$.scrollView.style.setProperty("--smart-input-drop-down-menu-height",l.dropDownHeight+"px"):l.$.scrollView.style.setProperty("--smart-input-drop-down-menu-height","auto");else if("opened"===e)l.opened=t,o?l.open():l.close();else if("placeholder"===e){if(l.readonly){const e=l.getAttribute("aria-label");if(e&&e!==t)return;o?l.setAttribute("aria-label",o):l.removeAttribute("aria-label")}}else if("selectedValues"===e)if(null==o)l.$.input.value="",l.$.input.dataValue=o,l.setAttribute("data-value",o),l._refreshSelectedIndex();else{const e=o.join(","),t=l.value;if(l.$.input.dataValue=e,e&&-1===e.indexOf(",")){let e=-1,t=o[0];if(l.dataSource&&Array.isArray(l.dataSource)&&l.dataSource.forEach(((l,a)=>{"string"==typeof l?l!==o&&l!==t||(e=a):l&&l.value===t&&(e=a)})),e>=0){const t=l.context;l.context=l,l.selectedIndex=e,l.context=t}}l._setSelection(),l.propertyChangedHandler("value",t,l.value)}else"value"===e?(l.displayMember!==l.valueMember&&"string"!=typeof o?(l.set("value",o[l.displayMember]),l.$.input.dataValue=o[l.valueMember],l.setAttribute("data-value",l.$.input.dataValue)):(l.$.input.value=l.$.input.dataValue=o,l.setAttribute("data-value",o)),l._refreshSelectedIndex()):"readonly"===e?(l._setAriaRelations(),l._setInputPurpose()):"theme"===e||"rightToLeft"===e?l.$.scrollView[e]=o:"inputPurpose"===e?l._setInputPurpose():"inverted"===e?o?l.$.scrollView.setAttribute("inverted",""):l.$.scrollView.removeAttribute("inverted"):"disabled"!==e&&"unfocusable"!==e||l._setFocusable()}_updateTargetValue(){const e=this;if(e.dataset.target){const t=document.querySelector(e.dataset.target);if(t){const o=e.dataset.property,l=e.value;o&&void 0!==t[o]&&(t[o]=l)}}}detached(){super.detached(),this.close(),this.removeAttribute("focus")}_getDataSourceFromOption(){const e=this;if(e.innerHTML.indexOf("<option")>=0||e.innerHTML.indexOf("<smart-list-item")>=0||e.innerHTML.indexOf("<smart-input-item")>=0){e.$.optionsContainer&&(e.$.optionsContainer.innerHTML=e.innerHTML.trim());let t=e.querySelectorAll("option");0===t.length&&(t=e.querySelectorAll("smart-list-item"),0===t.length&&(t=e.querySelectorAll("smart-input-item")));let o=[];for(let e=0;e<t.length;e++){const l=t[e],a=l.hasAttribute("selected")||l.hasAttribute("is-selected")&&"false"!==l.getAttribute("is-selected");let i=(""+l.textContent).trim();const r=(""+l.innerHTML).trim(),n=l.hasAttribute("value")?l.getAttribute("value"):i,s=l.hasAttribute("disabled"),u=l.hasAttribute("label")?l.getAttribute("label"):null;u&&(i=u),o.push({label:i,menuLabel:r,value:n,disabled:s,selected:a,className:l.className,dataset:l.dataset}),l.classList.add("smart-hidden")}e.dataSource=o}}render(){const e=this,t=e.dropDownClassList;if(e._getDataSourceFromOption(),e.selectedValues&&e.selectedValues.length){const t=e.selectedValues.join(",");e.value=t}e._createElement&&e._createElement();const o=e.$.scrollView;for(let e=0,l=t.length;e<l;e+=1)o.classList.add(t[e]);e.opened&&(e.opened=!1,e.open());const l=e.$.menu;l&&(l.setAttribute("role","presentation"),o.appendChild(l)),"auto"!==e.dropDownHeight?o.style.setProperty("--smart-input-drop-down-menu-height",e.dropDownHeight+"px"):o.style.setProperty("--smart-input-drop-down-menu-height","auto"),o.classList.add("smart-input-drop-down-menu");for(let t=0;t<e.classList.length;t++){const l=e.classList[t];"smart-element"!==l&&"smart-input"!==l&&o.classList.add(l+"-drop-down-menu")}o.id=e.id+"_"+e.tagName.toLowerCase()+"_menu_"+Math.floor(65536*(1+Math.random())).toString(16).substring(1),o.ownerElement=e;let a=e.dataSource;if("string"==typeof a&&(a=e.$.deserialize(a,"array")),a&&a.length&&Array.isArray(a)){let t=-1;if(a.forEach(((e,o)=>{e.selected&&(t=o)})),t>=0){e.selectedIndex=t;const o=a[t];e.selectedValue="string"==typeof o?a[t]:a[t].value}}e._setAriaRelations(),e._setInputPurpose(),e._setSelection(),e.isInitialized=!0,e.hasAttribute("tabindex")&&(e.readonly||(e.$.input.setAttribute("tabindex",e.getAttribute("tabindex")),e.removeAttribute("tabindex"))),e._autoAdjustWidth(),super.render()}_setSelection(e){const t=this;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),t.selectedIndex>=0&&o&&o.length>0){let l=o[t.selectedIndex];if("number"!=typeof l&&"boolean"!=typeof l||(l=""+l),"string"==typeof l){let o=t.$.input.dataValue,a=t.value;t.set("value",l),t.$.input.dataValue=l,t.$.input.setAttribute("data-value",l),t.selectedValues=[t.$.input.dataValue],t.isInitialized&&!1!==e&&(t.$.fireEvent("change",{value:t.value,label:t.label,oldValue:o,oldLabel:a}),t._updateTargetValue())}else{let o=t.$.input.dataValue,a=t.value;l&&(void 0!==l.value?(t.set("value",void 0!==l.value?l.value+"":""),t.$.input.dataValue=l.value,t.$.input.setAttribute("data-value",l.value),t.selectedValues=[t.$.input.dataValue]):l.label&&(t.selectedValues=[l.value]),l.label&&t.set("value",l.label)),t.isInitialized&&!1!==e&&(t.$.fireEvent("change",{value:t.$.input.dataValue,label:l.value,oldValue:o,oldLabel:a}),t._updateTargetValue())}}}_createElement(){const e=this,t=document.createElement("ul"),o=document.createElement("smart-scroll-viewer");o.rightToLeft=e.rightToLeft,o.theme=e.theme,o.horizontalScrollBarVisibility="hidden",e.inverted?o.setAttribute("inverted",""):o.removeAttribute("inverted"),e.$.scrollView=o,e.$.menu=t,e._setFocusable();const l=e.$.input;e.$.menu.onpointerdown=function(t){const o=t.target.closest("li"),a=e.$.menu.querySelector(".active");a&&o&&(a.classList.remove("active"),o.classList.add("active")),t.stopPropagation(),t.preventDefault(),setTimeout((()=>{e._performSelect(),o&&o.parentNode&&e.$.fireEvent("itemClick",{index:[...o.parentNode.children].indexOf(o),item:o,label:o.getAttribute("aria-label"),value:o.dataValue}),l.focus()}),50)},e.$.menu.onpointerup=function(t){t.stopPropagation(),t.preventDefault(),e.$.scrollView.$.verticalScrollBar.thumbCapture&&(e.$.scrollView.$.verticalScrollBar.thumbCapture=!1)}}_setAriaRelations(){const e=this,t=e.getAttribute("aria-label");if(e.readonly){e.setAttribute("role","presentation"),!t&&e.placeholder&&e.setAttribute("aria-label",e.placeholder);const o=t||(e.placeholder?e.placeholder:"Input");e.$.input.setAttribute("aria-label",o),e.removeAttribute("aria-readonly"),e.$.input.removeAttribute("aria-activedescendant"),e.$.input.removeAttribute("aria-controls"),e.$.dropDownButton.setAttribute("aria-hidden",!0)}else{e.setAttribute("role","combobox"),t&&t===e.placeholder&&e.removeAttribute("aria-label");const o=t||(e.placeholder?e.placeholder:"Input");e.$.input.setAttribute("aria-label",o),e.$.input.setAttribute("role","searchbox"),e.$.input.removeAttribute("aria-hidden",!0),e.$.dropDownButton.removeAttribute("aria-hidden")}e.setAttribute("aria-expanded",e.opened),e.setAttribute("aria-haspopup","listbox"),e.setAttribute("aria-owns",e.$.scrollView.id),e.$.scrollView.setAttribute("role","listbox")}_setActiveDescendant(e){const t=this;t.readonly||(e?t.setAttribute("aria-activedescendant",e.id):t.removeAttribute("aria-activedescendant"))}_setInputPurpose(){const e=this;e.readonly?e.$.input.removeAttribute("autocomplete"):e.$.input.setAttribute("autocomplete",e.inputPurpose)}_setFocusable(){const e=this;e.disabled||e.unfocusable?e.$.input.setAttribute("tabindex",-1):e.$.input.removeAttribute("tabindex")}});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
/* Smart UI
|
|
3
|
-
Copyright (c) 2011-
|
|
2
|
+
/* Smart UI v25.5.5 (2026-02-24)
|
|
3
|
+
Copyright (c) 2011-2024 jQWidgets.
|
|
4
4
|
License: https://htmlelements.com/license/ */ //
|
|
5
5
|
|
|
6
|
-
Smart("smart-password-text-box",class extends Smart.BaseElement{static get properties(){return{autoFocus:{value:!1,type:"boolean"},hint:{value:"",reflectToAttribute:!0,type:"string"},label:{value:"",reflectToAttribute:!0,type:"string"},maxLength:{value:null,type:"number?"},minLength:{value:2,type:"number"},messages:{value:{en:{passwordStrength:"Password strength",short:"Short",weak:"Weak",far:"Far",good:"Good",strong:"Strong",showPassword:"Show password"}},type:"object",extend:!0},name:{value:"",type:"string"},passwordStrength:{value:null,type:"function?",reflectToAttribute:!1},placeholder:{value:"",type:"string"},selectAllOnFocus:{value:!1,type:"boolean"},showPasswordIcon:{value:!1,type:"boolean"},showPasswordStrength:{value:!1,type:"boolean"},tooltipArrow:{value:!1,type:"boolean"},tooltipDelay:{value:0,type:"number"},tooltipPosition:{allowedValues:["bottom","top","left","right","absolute"],value:"top",type:"string"},tooltipTemplate:{value:null,type:"string?"},type:{value:"password",type:"string",defaultReflectToAttribute:!0,readonly:!0},value:{value:"",reflectToAttribute:!1,type:"string"}}}static get listeners(){return{"document.up":"_documentUpHandler",mouseenter:"_mouseEventsHandler",mouseleave:"_mouseEventsHandler","passwordIcon.down":"_showPassword","input.change":"_textBoxChangeHandler","input.paste":"_textBoxChangeHandler","input.keyup":"_textBoxChangeHandler","input.blur":"_blurHandler","input.focus":"_focusHandler"}}static get requires(){return{"Smart.Tooltip":"smart.tooltip.js"}}static get styleUrls(){return["smart.textbox.css","smart.passwordtextbox.css"]}template(){return'<div id="container" role="presentation"><span id="label" class="smart-label">[[label]]</span><div id="innerContainer" class="smart-content" role="presentation"><input class="smart-input" type="password" id="input"\n disabled="[[disabled]]"\n maxlength="[[maxLength]]"\n minlength="[[minLength]]"\n name="[[name]]"\n placeholder="[[placeholder]]"\n readonly="[[readonly]]"\n value="[[value]]"/><span id="passwordIcon" title="Show Password" class="smart-password-icon smart-hidden" role="button" aria-label="Show Password"></span></div><span id="hint" class="smart-hint">[[hint]]</span><smart-tooltip id="tooltip"\n open-mode="manual"\n arrow="[[tooltipArrow]]"\n right-to-left="[[rightToLeft]]"\n tooltip-template="[[tooltipTemplate]]"\n position="[[tooltipPosition]]"\n delay="[[tooltipDelay]]"></smart-tooltip></div>'}propertyChangedHandler(e,t,
|
|
6
|
+
Smart("smart-password-text-box",class extends Smart.BaseElement{static get properties(){return{autoFocus:{value:!1,type:"boolean"},hint:{value:"",reflectToAttribute:!0,type:"string"},label:{value:"",reflectToAttribute:!0,type:"string"},maxLength:{value:null,type:"number?"},minLength:{value:2,type:"number"},messages:{value:{en:{passwordStrength:"Password strength",short:"Short",weak:"Weak",far:"Far",good:"Good",strong:"Strong",showPassword:"Show password"}},type:"object",extend:!0},name:{value:"",type:"string"},passwordStrength:{value:null,type:"function?",reflectToAttribute:!1},placeholder:{value:"",type:"string"},selectAllOnFocus:{value:!1,type:"boolean"},showPasswordIcon:{value:!1,type:"boolean"},showPasswordStrength:{value:!1,type:"boolean"},tooltipArrow:{value:!1,type:"boolean"},tooltipDelay:{value:0,type:"number"},tooltipPosition:{allowedValues:["bottom","top","left","right","absolute"],value:"top",type:"string"},tooltipTemplate:{value:null,type:"string?"},type:{value:"password",type:"string",defaultReflectToAttribute:!0,readonly:!0},value:{value:"",reflectToAttribute:!1,type:"string"}}}static get listeners(){return{"document.up":"_documentUpHandler",mouseenter:"_mouseEventsHandler",mouseleave:"_mouseEventsHandler","passwordIcon.down":"_showPassword","input.change":"_textBoxChangeHandler","input.paste":"_textBoxChangeHandler","input.keyup":"_textBoxChangeHandler","input.blur":"_blurHandler","input.focus":"_focusHandler"}}static get requires(){return{"Smart.Tooltip":"smart.tooltip.js"}}static get styleUrls(){return["smart.textbox.css","smart.passwordtextbox.css"]}template(){return'<div id="container" role="presentation"><span id="label" class="smart-label">[[label]]</span><div id="innerContainer" class="smart-content" role="presentation"><input class="smart-input" type="password" id="input"\n disabled="[[disabled]]"\n maxlength="[[maxLength]]"\n minlength="[[minLength]]"\n name="[[name]]"\n placeholder="[[placeholder]]"\n readonly="[[readonly]]"\n value="[[value]]"/><span id="passwordIcon" title="Show Password" class="smart-password-icon smart-hidden" role="button" aria-label="Show Password"></span></div><span id="hint" class="smart-hint">[[hint]]</span><smart-tooltip id="tooltip"\n open-mode="manual"\n arrow="[[tooltipArrow]]"\n right-to-left="[[rightToLeft]]"\n tooltip-template="[[tooltipTemplate]]"\n position="[[tooltipPosition]]"\n delay="[[tooltipDelay]]"></smart-tooltip></div>'}propertyChangedHandler(e,t,a){const s=this;let o;switch(e){case"locale":case"messages":case"passwordStrength":o=s._evaluatePasswordStrength(),s._updateTooltipString(o),s.$.passwordIcon.setAttribute("title",s.localize("showPassword")),s._updatePasswordStrengthStyles(o);break;case"tooltipPosition":s.$.tooltip.position=s.tooltipPosition;break;case"tooltipTemplate":s.$.tooltip.tooltipTemplate=s.tooltipTemplate;break;case"value":o=s._evaluatePasswordStrength(),s._updateTooltipString(o),s._updatePasswordStrengthStyles(o);break;case"disabled":case"unfocusable":s._setFocusable();break;case"readonly":break;default:super.propertyChangedHandler(e,t,a)}}_setFocusable(){const e=this;e.disabled||e.unfocusable?e.$.input.tabIndex=-1:e.$.input.removeAttribute("tabindex")}render(){this._createElement(),super.render()}focus(){this.$.input.focus()}blur(){this.$.input.blur()}reset(){const e=this;e.$.input.value=e.value=e._initializationValue}_createElement(){const e=this;e.autoFocus&&e.$.input.focus(),e.$.input.autocomplete="new-password",e.$.addClass("smart-input"),e._setFocusable(),e.$.tooltip.selector=e.$.innerContainer,e.$.passwordIcon.setAttribute("title",e.localize("showPassword")),e._updateTooltipString("short"),e._updatePasswordStrengthStyles(),e._initializationValue=e.value,e.value.length>0?e.$.addClass("has-value"):e.$.removeClass("has-value"),e._handleHintContainer(),e.shadowRoot&&(e.$.tooltip.style.display="none",requestAnimationFrame((()=>e.$.tooltip.style.display=""))),e.$.label.id||(e.$.label.id=e.id+"Label"),e.$.hint.id||(e.$.hint.id=e.id+"Hint"),e.setAttribute("role","presentation"),e.$.innerContainer.removeAttribute("aria-describedby"),e.$.input.setAttribute("aria-describedby",e.$.tooltip.id+" "+e.$.hint.id),e.$.input.setAttribute("aria-labelledby",e.$.label.id);const t=e.$.label.textContent.trim(),a=t||(e.placeholder?e.placeholder:"Input");e.$.input.setAttribute("aria-label",a)}_handleHintContainer(){const e=this;if(!e.hint)return;const t=e.$.hint;if("function"==typeof e.hint){const a=e.value;e.hint(a,t)?e.$.addClass("invalid"):e.$.removeClass("invalid")}else"string"==typeof e.hint&&(t.innerHTML=e.hint,e.$.removeClass("invalid"))}_focusHandler(){const e=this;e.disabled||(e.selectAllOnFocus&&e.$.input.select(),e.showPasswordIcon&&(e.className.indexOf("smart-validation")>=0?e.$.passwordIcon.style.marginRight="30px":e.$.passwordIcon.style.marginRight="",e.$passwordIcon.removeClass("smart-hidden")),e.setAttribute("focus",""),e._valueBeforeChange=e.value,e.$.fireEvent("focus"),e.showPasswordStrength&&(e._tooltipOpened||(e.$.tooltip.open(),e._tooltipOpened=!0)))}_blurHandler(){const e=this;e.disabled||e._passwordIconPressed||(e._valueBeforeChange!==e.value&&(e.$.fireEvent("change",{value:e.value,oldValue:e._valueBeforeChange}),e._valueBeforeChange=""),e.showPasswordIcon&&e.$passwordIcon.addClass("smart-hidden"),e.removeAttribute("focus"),e.value.length>0?e.$.addClass("has-value"):e.$.removeClass("has-value"),e.$.fireEvent("blur"),e._tooltipOpened&&(e.$.tooltip.close(),e._tooltipOpened=!1))}_showPassword(){const e=this;!e.disabled&&e.showPasswordIcon&&(e.$.input.type="text",e._passwordIconPressed=!0)}_documentUpHandler(){const e=this;!e.disabled&&e.showPasswordIcon&&e._passwordIconPressed&&(e.$.input.type="password",e._passwordIconPressed=!1,e.$.input.focus())}_textBoxChangeHandler(e){const t=this;if(t.disabled||t.readonly)return;const a=t.value;if(t.value=t.$.input.value,t.$.input){const s=t.$.input.value;a!==s&&t.$.fireEvent("changing",{oldValue:a,value:s}),e&&"Enter"===e.key&&(t.$.fireEvent("change",{value:t.value,oldValue:t._valueBeforeChange}),t._valueBeforeChange=t.value)}e&&"keyup"!==e.type&&e.stopPropagation();let s=t._evaluatePasswordStrength();t._updateTooltipString(s),t._updatePasswordStrengthStyles(s)}_updatePasswordStrengthStyles(e){const t=this,a=["short","weak","far","good","strong"];e=e||"short";for(let e=0;e<a.length;e++)t.$container.removeClass("smart-password-"+a[e]);t.disabled||t.$container.addClass("smart-password-"+e)}_evaluatePasswordStrength(){const e=this,t=e.$.input.value,a=t.length,s="<>@!#$%^&*()_+[]{}?:;|'\"\\,./~`-=";if(e.disabled)return;if(e.passwordStrength)return e.passwordStrength(t,s);let o=0,n=0,r=0,l=0;for(var i=0;i<a;i++){const e=t.charAt(i),a=t.charCodeAt(i);a>64&&a<91||a>96&&a<123||a>127&&a<155||a>159&&a<166?o+=1:!1!==isNaN(e)?-1===s.indexOf(e)||(r+=1):n+=1}return l=o+n+2*r+o*n/2+a,a<8?"short":l<20?"weak":l<30?"far":l<40?"good":"strong"}refresh(){}_keyUpHandler(){}_mouseWheelHandler(){}_resizeHandler(){}_selectStartHandler(){}_setDropDownSize(){}_styleChangedHandler(){}_mouseEventsHandler(e){"mouseenter"===e.type?this.setAttribute("hover",""):this.removeAttribute("hover")}_updateTooltipString(e){const t=this;t.$.tooltip.value='<span class="password-strength-label">'+t.localize("passwordStrength")+': </span><span class="password-strength-value">'+t.localize(e)+"</span>"}});
|
package/source/smart.tooltip.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
/* Smart UI
|
|
3
|
-
Copyright (c) 2011-
|
|
2
|
+
/* Smart UI v25.5.5 (2026-02-24)
|
|
3
|
+
Copyright (c) 2011-2024 jQWidgets.
|
|
4
4
|
License: https://htmlelements.com/license/ */ //
|
|
5
5
|
|
|
6
6
|
Smart("smart-tooltip",class extends Smart.ContentElement{static get properties(){return{arrow:{value:!1,type:"boolean"},arrowDirection:{allowedValues:["bottom","top","left","right"],value:"bottom",type:"string"},align:{allowedValues:["left","center","right"],value:"center",type:"string"},delay:{value:0,type:"number"},messages:{extend:!0,value:{en:{invalidSelector:'{{elementType}}: "{{property}}" must be a String, an HTMLElement or null.',htmlTemplateNotSuported:"{{elementType}}: Browser doesn't support HTMLTemplate elements.",invalidTemplate:'{{elementType}}: "{{property}}" property accepts a string that must match the id of an HTMLTemplate element from the DOM.',invalidNode:'{{elementType}}: Invalid parameter "{{node}}" when calling {{method}}.'}},type:"object"},iframeRect:{value:null,type:"object?"},offset:{value:[],type:"array"},openMode:{allowedValues:["click","focus","hover","manual"],value:"hover",type:"string"},position:{allowedValues:["bottom","top","left","right","absolute","auto"],value:"top",type:"string"},selector:{value:null,type:"any?"},tooltipTemplate:{value:null,type:"any"},value:{value:"",type:"string",reflectToAttribute:!1},visible:{value:!1,type:"boolean"}}}static get styleUrls(){return["smart.tooltip.css"]}template(){return'<div id="container" role="presentation">\n <div id="content" class="smart-tooltip-content" inner-h-t-m-l="[[innerHTML]]" role="presentation">\n <content></content>\n </div>\n </div>'}propertyChangedHandler(e,t,n){super.propertyChangedHandler(e,t,n);const o=this;let l;switch(e){case"align":o._applyPosition(n);break;case"openMode":o.close(),o._handleEventListeners(t),o._handleResize();break;case"selector":o._oldOwnerElement=o._ownerElement,o._handleSelector(n,t),o._handleEventListeners();break;case"tooltipTemplate":o._handleTemplate(t);break;case"value":o.tooltipTemplate?o._handleTemplate():o.$.content.innerHTML=o.value;break;case"visible":l=n?"open":"close",o.$.fireEvent(l,{owner:o._ownerElement},o.isInShadowDOM?{composed:!0,bubbles:!0,cancelable:!0}:void 0);break;case"position":return void o._applyPosition(t)}o._applyPosition()}ready(){super.ready()}render(){const e=this;super.render(),e.getAttribute("role")||e.setAttribute("role","tooltip"),e._isParentPositionStatic="static"===window.getComputedStyle(e.parentElement||document.querySelector("body")).position,e._handleSelector(e.selector),e.visible&&e._applyPosition(),e._handleEventListeners(),e._handleResize(),e.value=e.$.content.innerHTML=e.value?e.value:e.innerHTML,e._handleTemplate()}appendChild(e){const t=this;if(!t.isCompleted){const e=Array.prototype.slice.call(arguments,2);return HTMLElement.prototype.appendChild.apply(t,e.concat(Array.prototype.slice.call(arguments)))}e?(t.$.content.appendChild(e),t._applyPosition()):t.error(t.localize("invalidNode",{elementType:t.nodeName.toLowerCase(),method:"appendChild",node:"node"}))}close(){const e=this;if(e._isOpening&&clearTimeout(e._isOpening),!e.visible)return;const t=e.isInShadowDOM?{composed:!0,bubbles:!0,cancelable:!0}:void 0;e.$.fireEvent("closing",{owner:e._ownerElement},t).defaultPrevented||(e.$.fireEvent("close",{owner:e._ownerElement},t),e.visible=!1)}clear(){const e=this.$.content;if(e)for(;e.childNodes.length;)e.removeChild(e.firstChild)}insertBefore(e,t){const n=this;if(!n.isCompleted){const e=Array.prototype.slice.call(arguments,2);return HTMLElement.prototype.insertBefore.apply(n,e.concat(Array.prototype.slice.call(arguments)))}e&&t?(n.$.content.insertBefore(e,t),n._applyPosition()):n.error(n.localize("invalidNode",{elementType:n.nodeName.toLowerCase(),method:"insertBefore",node:"newNode/referenceNode"}))}open(){const e=this;e.disabled||e.readonly||e.visible||(clearTimeout(e._isOpening),e._isOpening=setTimeout((function(){const t=e.isInShadowDOM?{composed:!0,bubbles:!0,cancelable:!0}:void 0;if(e.$.fireEvent("opening",{owner:e._ownerElement},t).defaultPrevented)return void clearTimeout(e._isOpening);e._applyPosition(),e.$.fireEvent("open",{owner:e._ownerElement},t);const n=e.context;e.context=e,e.visible=!0,e.context=n}),e.delay))}removeChild(e){const t=this;if(!t.isCompleted){const e=Array.prototype.slice.call(arguments,2);return HTMLElement.prototype.insertBefore.apply(t,e.concat(Array.prototype.slice.call(arguments)))}e?(t.$.content.removeChild(e),t._applyPosition()):t.error(t.localize("invalidNode",{elementType:t.nodeName.toLowerCase(),method:"removeChild",node:"node"}))}reposition(){const e=this;e.isRendered&&e._applyPosition()}toggle(){const e=this;e.visible?e.close():e.open()}_getDomElementPosition(e){let t=[],n=e.parentElement;for(;n&&"BODY"!==n.nodeName;)t.push(n),n=!this.enableShadowDOM||n.parentElement?n.parentElement:n.getRootNode().host;return t}_getElementAndOwnerRelation(e){const t=this._getDomElementPosition(e||this),n=t.length;let o=null;for(let e=0;e<n;e++)if("static"!==window.getComputedStyle(t[e]).getPropertyValue("position")){o=t[e];break}return o}_applyPosition(e){const t=this;if(!t._ownerElement)return;if(!t.parentElement)return;t._isParentPositionStatic="static"===window.getComputedStyle(t.parentElement).position;const n=t._ownerElement.getBoundingClientRect(),o=t.parentElement?t.parentElement.getBoundingClientRect():{top:0,left:0};let l,i;t.parentElement&&"BODY"===t.parentElement.nodeName.toUpperCase()?(l=n.top+window.scrollY,i=n.left+window.scrollX):(l=n.top-o.top,i=n.left-o.left);const r=t.position,s=t.iframeRect;let a,p={top:n.top,left:n.left,right:n.right,width:n.width,height:n.height,nonStaticParent:t._getElementAndOwnerRelation()};switch(s&&(p.top+=s.top,p.left+=s.left,p.right+=s.right),r){case"auto":case"bottom":case"top":case"left":case"right":{t.style.left="";const e=t["_position"+r.charAt(0).toUpperCase()+r.slice(1)](i,l,p);l=e.top,i=e.left,a=e.translate;break}case"absolute":e?(t.style.top=t.style.left="",l=i=0):(l=parseFloat(t.style.top),i=parseFloat(t.style.left))}const d=t.getAttribute("arrow-direction");a?t.$.container.style.setProperty("--smart-tooltip-arrow-translate",a+"px"):t.$.container.style.removeProperty("--smart-tooltip-arrow-translate"),void 0===l||isNaN(l)||(l+=("auto"===r&&"top"===d?-1:1)*parseInt(t.offset[1])||0,t.style.top=l+"px"),void 0===i||isNaN(i)||(i+=("auto"===r&&"left"===d?-1:1)*parseInt(t.offset[0])||0,t.style.left=i+"px")}_positionAuto(e,t,n){const o=this;let l,i,r=o.parentElement;for(;r;){if("hidden"===getComputedStyle(r).getPropertyValue("overflow")){l=r;break}r=r.parentElement}if(l)i=l.getBoundingClientRect();else{const e=document.scrollingElement;let t,n;document.scrollingElement?(t=e.offsetWidth,n=e.offsetHeight):(t=window.innerWidth,n=window.innerHeight),l=document.body,i={width:t,height:n,left:0,top:0,right:t,bottom:n}}const s=parseFloat(window.getComputedStyle(o).getPropertyValue("--smart-tooltip-arrow-width"))||0;let a=o._positionTop(e,t,n),p=n.nonStaticParent,d=o.offsetWidth/2-s,c=0,f=0,m=a.left,h=i.right-(m+f+o.offsetWidth),u=Math.min(0,h);if(m<=0&&h>0&&(m=Math.min(e,m+h)),u<=0&&(u=Math.sign(u)*(Math.abs(u)+i.right-(e+n.width))),p){const e=p.getBoundingClientRect();c=e.top,f=e.left}return a.top+c>=i.top?(m<=0&&(m=e),t=a.top,{left:e=Math.max(i.left-f,m+u),top:t,translate:Math.max(-d,Math.min(d,a.left-e))}):(a=o._positionBottom(e,t,n),a.top+o.offsetHeight+c<=i.bottom?(m=a.left,m<=0&&(m=e),t=a.top,{left:e=Math.max(i.left-f,m+u),top:t,translate:Math.max(-d,Math.min(d,a.left-e))}):(a=o._positionLeft(e,t,n),t=a.top,d=o.offsetHeight/2-s,t=Math.max(i.top-c,a.top+Math.min(0,i.bottom-(a.top+c+o.offsetHeight))),a.left+f>=i.left?e=a.left:(a=o._positionRight(e,t,n),e=a.left+o.offsetWidth+f<=i.right?a.left:i.right-o.offsetWidth),{left:e,top:t,translate:Math.max(-d,Math.min(d,a.top-t))}))}_getRelativeParentOffset(e){const t=this,n=t._ownerElement;let o=t._getElementAndOwnerRelation(n),l=0,i=0;if(!e)return{left:i,top:l};for(;e&&o&&e!==o;)l+=o.offsetTop,i+=o.offsetLeft,o=t._getElementAndOwnerRelation(o);return{left:i,top:l}}_positionTop(e,t,n){const o=this,l=o._getRelativeParentOffset(n.nonStaticParent);if(o.set("arrowDirection","bottom"),null===n.nonStaticParent)return t=n.top+window.scrollY-o.offsetHeight,{left:(e=o._getAlignmentOffset(n.left,o.offsetWidth,n.width)+window.scrollX)+l.left,top:t+l.top};if(o._isParentPositionStatic){if(t=o._ownerElement.offsetTop-o.offsetHeight,e=o._getAlignmentOffset(o._ownerElement.offsetLeft,o.offsetWidth,n.width),o._ownerElement instanceof SVGElement){const n=o._ownerElement.getBoundingClientRect(),l=o._ownerElement.parentNode.getBoundingClientRect();t=n.top-l.top-o.offsetHeight/2,e=o._getAlignmentOffset(n.left,o.offsetWidth,l.left)}return{left:e+l.left,top:t+l.top}}if(o._ownerElement instanceof SVGElement&&o._ownerElement.parentElement){const n=o._ownerElement.getBoundingClientRect(),i=o._ownerElement.parentNode.getBoundingClientRect();return t=n.top-i.top-o.offsetHeight,{left:(e=o._getAlignmentOffset(n.left-i.left,o.offsetWidth,n.width))+l.left,top:t+l.top}}return t-=o.offsetHeight,{left:(e=o._getAlignmentOffset(e,o.offsetWidth,n.width))+l.left,top:t+l.top}}_positionBottom(e,t,n){const o=this,l=o._getRelativeParentOffset(n.nonStaticParent);return o.set("arrowDirection","top"),null===n.nonStaticParent?(t=n.top+window.scrollY+n.height,{left:(e=o._getAlignmentOffset(n.left,o.offsetWidth,n.width)+window.scrollX)+l.left,top:t+l.top}):o._isParentPositionStatic?(t=o._ownerElement.offsetTop+n.height,{left:(e=o._getAlignmentOffset(o._ownerElement.offsetLeft,o.offsetWidth,n.width))+l.left,top:t+l.top}):(t+=n.height,{left:(e=o._getAlignmentOffset(e,o.offsetWidth,n.width))+l.left,top:t+l.top})}_getAlignmentOffset(e,t,n){switch(this.align){case"left":return e;case"right":return e-t+n;default:return e-t/2+n/2}}_positionLeft(e,t,n){const o=this,l=o._getRelativeParentOffset(n.nonStaticParent);return o.set("arrowDirection","right"),null===n.nonStaticParent?(t=n.top+window.scrollY+n.height/2-o.$.content.offsetHeight/2,{left:(e=n.left+window.scrollX-o.offsetWidth)+l.left,top:t+l.top}):o._isParentPositionStatic?(t=o._ownerElement.offsetTop+n.height/2-o.$.content.offsetHeight/2,{left:(e=o._ownerElement.offsetLeft-o.offsetWidth)+l.left,top:t+l.top}):(t=t+n.height/2-o.$.content.offsetHeight/2,{left:(e-=o.offsetWidth)+l.left,top:t+l.top})}_positionRight(e,t,n){const o=this,l=o._getRelativeParentOffset(n.nonStaticParent);return o.set("arrowDirection","left"),null===n.nonStaticParent?(t=n.top+window.scrollY+n.height/2-o.$.content.offsetHeight/2,{left:(e=n.left+window.scrollX+n.width)+l.left,top:t+l.top}):o._isParentPositionStatic?(t=o._ownerElement.offsetTop+n.height/2-o.$.content.offsetHeight/2,{left:(e=o._ownerElement.offsetLeft+n.width)+l.left,top:t+l.top}):(t=t+n.height/2-o.$.content.offsetHeight/2,{left:(e+=n.width)+l.left,top:t+l.top})}_eventsHandler(e){const t=this;t.disabled||t.readonly||("click"!==e.type?"mouseenter"===e.type||"focus"===e.type?this.open():this.close():t.visible?this.close():this.open())}_handleEventListeners(e){const t=this;if(t._oldOwnerElement&&"manual"!==t.openMode){let e=t._oldOwnerElement.getAttribute("aria-describedby");e&&"tooltip"===t.getAttribute("role")&&(e===t.id?t._oldOwnerElement.removeAttribute("aria-describedby"):(e=e.replace(" "+t.id,""),e=e.replace(t.id+" ",""),t._oldOwnerElement.setAttribute("aria-describedby",e))),t._oldOwnerElement.$.unlisten("mouseenter.tooltip"),t._oldOwnerElement.$.unlisten("mouseleave.tooltip"),t._oldOwnerElement.$.unlisten("focus.tooltip"),t._oldOwnerElement.$.unlisten("blur.tooltip"),t._oldOwnerElement.$.unlisten("click.tooltip"),t._oldOwnerElement=null}if(t._ownerElement){if(e)switch(e){case"hover":t._ownerElement.$.unlisten("mouseenter.tooltip"),t._ownerElement.$.unlisten("mouseleave.tooltip");break;case"focus":t._ownerElement.$.unlisten("focus.tooltip"),t._ownerElement.$.unlisten("blur.tooltip");break;case"click":t._ownerElement.$.unlisten("click.tooltip")}if("manual"!==t.openMode)switch(t._ownerElement instanceof Smart.BaseElement||(t._ownerElement.$=Smart.Utilities.Extend(t._ownerElement)),t.openMode){case"hover":t._ownerElement.$.listen("mouseenter.tooltip",t._eventsHandler.bind(t)),t._ownerElement.$.listen("mouseleave.tooltip",t._eventsHandler.bind(t));break;case"focus":t._ownerElement.$.listen("focus.tooltip",t._eventsHandler.bind(t)),t._ownerElement.$.listen("blur.tooltip",t._eventsHandler.bind(t));break;case"click":t._ownerElement.$.listen("click.tooltip",t._eventsHandler.bind(t))}}}_handleResize(){const e=this;function t(){e._applyPosition()}"click"===e.openMode?window.addEventListener("resize",t):window.removeEventListener("resize",t)}_handleSelector(e,t){const n=this;if(t&&t.removeAttribute&&t.removeAttribute("aria-describedby"),"string"==typeof e)n._ownerElement=e.length>0?document.getElementById(e):void 0;else if(e&&e.nodeType===Node.ELEMENT_NODE)n._ownerElement=e;else{if(null===e)return void(n._ownerElement=void 0);n.error(n.localize("invalidSelector",{elementType:n.nodeName.toLowerCase(),property:"selector"}))}if(!n._ownerElement||"tooltip"!==n.getAttribute("role"))return;if(!n.value)return;const o=n._ownerElement?n._ownerElement.getAttribute("aria-describedby"):null;o?o.indexOf(n.id)<0&&n._ownerElement.setAttribute("aria-describedby",o+" "+n.id):n._ownerElement.setAttribute("aria-describedby",n.id)}_handleTemplate(e){const t=this;let n=t.tooltipTemplate;if(e&&(t.$.content.innerHTML=t.value?t.value:""),null===n||!n)return;if("function"==typeof t.tooltipTemplate)return void t.tooltipTemplate(t.$.content,{value:t.value});if(!("content"in document.createElement("template")))return void t.error(t.localize("htmlTemplateNotSuported",{elementType:t.nodeName.toLowerCase()}));if(n=document.getElementById(n),null===n||!("content"in n))return void t.error(t.localize("invalidTemplate",{elementType:t.nodeName.toLowerCase(),property:"template"}));const o=n.content,l=o.childNodes.length,i=/{{\w+}}/g;let r,s=[];for(let e=0;e<l;e++)for(r=i.exec(o.childNodes[e].innerHTML);r;)s.push({childNodeIndex:e,bindingString:r[0]}),r=i.exec(o.childNodes[e].innerHTML);const a=s.length;let p,d,c=document.importNode(n.content,!0);for(let e=0;e<a;e++){p=c.childNodes[s[e].childNodeIndex],d=s.length;for(let n=0;n<d;n++)p.innerHTML=p.innerHTML.replace(s[e].bindingString,t.value)}t.$.content.innerHTML="";for(let e=0;e<c.childNodes.length;e++)c.childNodes[e].outerHTML&&(t.$.content.innerHTML+=c.childNodes[e].outerHTML)}}),function(){const e=()=>{const e=document.querySelectorAll('[data-toggle="tooltip"');if(e.length>0)for(let t=0;t<e.length;t++){if(!e[t].hasAttribute("data-title"))continue;const n=document.createElement("smart-tooltip");n.selector=e[t],n.innerHTML=e[t].getAttribute("data-title"),document.body.appendChild(n),e[t].hasAttribute("data-placement")&&(n.position=e[t].getAttribute("data-placement"))}};"complete"===document.readyState?e():(window.removeEventListener("load",e),window.addEventListener("load",e))}();
|
|
Binary file
|
|
@@ -162,6 +162,14 @@
|
|
|
162
162
|
|
|
163
163
|
<glyph glyph-name="cloud" unicode="" d="M1071 207q0-89-62-151t-152-63h-607q-103 0-177 73t-73 177q0 74 40 135t104 91q-1 16-1 24 0 118 84 202t202 84q88 0 159-49t105-129q39 35 93 35 59 0 101-42t42-101q0-42-23-77 72-17 119-75t46-134z" horiz-adv-x="1071.4" />
|
|
164
164
|
|
|
165
|
+
<glyph glyph-name="heart" unicode="" d="M500-79q-14 0-25 10l-348 336q-5 5-15 15t-31 37-38 54-30 67-13 77q0 123 71 192t196 70q34 0 70-12t67-33 54-38 42-38q20 20 42 38t54 38 67 33 70 12q125 0 196-70t71-192q0-123-128-251l-347-335q-10-10-25-10z" horiz-adv-x="1000" />
|
|
166
|
+
|
|
167
|
+
<glyph glyph-name="thumbs-up-1" unicode="" d="M143 100q0 15-11 25t-25 11-25-11-11-25 11-25 25-11 25 11 11 25z m643 321q0 29-22 50t-50 22h-196q0 32 27 89t26 89q0 55-17 81t-72 27q-14-15-21-48t-17-70-33-61q-13-13-43-51-2-3-13-16t-18-23-19-24-22-25-22-19-22-15-20-6h-18v-357h18q7 0 18-1t18-4 21-6 20-7 20-6 16-6q118-41 191-41h67q107 0 107 93 0 15-2 31 16 9 26 30t10 41-10 38q29 28 29 67 0 14-5 31t-14 26q18 1 30 26t12 45z m71 1q0-50-27-91 5-18 5-38 0-43-21-81 1-12 1-24 0-56-33-99 0-78-48-123t-126-45h-72q-54 0-106 13t-121 36q-65 23-77 23h-161q-29 0-50 21t-21 50v357q0 30 21 51t50 21h153q20 13 77 86 32 42 60 72 13 14 19 48t17 70 35 60q22 21 50 21 47 0 84-18t57-57 20-104q0-51-27-107h98q58 0 101-42t42-100z" horiz-adv-x="857.1" />
|
|
168
|
+
|
|
169
|
+
<glyph glyph-name="flag" unicode="" d="M179 707q0-40-36-61v-707q0-7-5-12t-13-6h-36q-7 0-12 6t-6 12v707q-35 21-35 61 0 30 21 51t50 21 51-21 21-51z m821-36v-425q0-14-7-22t-22-15q-120-65-206-65-34 0-69 12t-60 27-65 27-79 12q-107 0-259-81-10-5-19-5-14 0-25 10t-10 25v415q0 17 17 30 12 8 44 24 132 67 235 67 60 0 112-16t122-49q21-11 49-11 30 0 65 12t62 26 49 26 30 12q15 0 25-10t11-26z" horiz-adv-x="1000" />
|
|
170
|
+
|
|
171
|
+
<glyph glyph-name="music" unicode="" d="M857 725v-625q0-28-19-50t-48-33-58-18-53-6-54 6-58 18-48 33-19 50 19 50 48 33 58 18 54 6q58 0 107-22v300l-429-132v-396q0-28-19-50t-48-33-58-18-53-6-54 6-58 18-48 33-19 50 19 50 48 34 58 17 54 6q58 0 107-21v539q0 17 10 32t28 20l464 142q7 3 16 3 22 0 38-16t15-38z" horiz-adv-x="857.1" />
|
|
172
|
+
|
|
165
173
|
<glyph glyph-name="list-check-solid" unicode="" d="M297 775c19-17 21-46 4-66l-141-156c-9-10-21-15-34-15s-25 4-34 13l-78 78c-19 19-19 48 0 67s48 18 66 0l43-43 108 119c17 19 47 21 66 4z m0-312c19-17 21-47 4-66l-141-157c-9-9-21-15-34-15s-25 5-34 14l-78 78c-19 18-19 48 0 66s48 18 66 0l43-43 108 119c17 20 47 21 66 4z m141 200c0 34 27 62 62 62h438c34 0 62-28 62-62s-28-63-62-63h-438c-35 0-62 28-62 63z m0-313c0 35 27 63 62 63h438c34 0 62-28 62-63s-28-62-62-62h-438c-35 0-62 27-62 62z m-125-312c0 34 27 62 62 62h563c34 0 62-28 62-62s-28-63-62-63h-563c-35 0-62 28-62 63z m-219 93a94 94 0 1 0 0-187 94 94 0 1 0 0 187z" horiz-adv-x="1000" />
|
|
166
174
|
|
|
167
175
|
<glyph glyph-name="kanban" unicode="" d="M1 725c0 69 47 125 107 125h785c59 0 107-56 107-125v-500c0-69-48-125-107-125h-143c-13 0-25 2-36 7v-132c0-69-48-125-107-125h-214c-59 0-107 56-107 125v382c-11-4-23-7-36-7h-142c-60 0-107 56-107 125v250z m356-750c0-23 16-42 36-42h214c20 0 36 19 36 42v792h-286v-792z m-71 792h-178c-20 0-36-19-36-42v-250c0-23 16-42 36-42h142c20 0 36 19 36 42v292z m428 0v-542c0-23 16-42 36-42h143c19 0 35 19 35 42v500c0 23-16 42-35 42h-179z" horiz-adv-x="1000" />
|
|
@@ -170,6 +178,10 @@
|
|
|
170
178
|
|
|
171
179
|
<glyph glyph-name="grid" unicode="" d="M39 850c-11 0-20-5-28-15-7-9-11-22-11-35v-850c0-55 35-100 77-100v0h846c42 0 77 45 77 100v850c0 13-4 26-11 35-7 10-17 15-27 15h-923z m38-100h846v-200h-846v200z m0-300h192v-200h-192v200z m269 0h577v-200h-577v200z m-269-300h192v-200h-192l0 200z m269 0h577v-200h-577v200z" horiz-adv-x="1000" />
|
|
172
180
|
|
|
181
|
+
<glyph glyph-name="group-53" unicode="" d="M563 819c0 17-14 31-32 31-17 0-31-14-31-31v-938c0-17 14-31 31-31 18 0 32 14 32 31v94h156c52 0 94 42 94 94v125c0 52-42 94-94 94h-156v125h343c52 0 94 42 94 93v125c0 52-42 94-94 94h-343v94z m0-156v-188h343c18 0 32 14 32 31v125c0 18-14 32-32 32h-343z m0-438v-187h156c17 0 31 14 31 31v125c0 17-14 31-31 31h-156z m-282 500h157v-62h-157c-17 0-31-14-31-32v-125c0-17 14-31 31-31h157v-62h-157c-51 0-93 42-93 93v125c0 52 42 94 93 94z m157-437h-344c-52 0-94-42-94-94v-125c0-52 42-94 94-94h344v63h-344c-17 0-31 14-31 31v125c0 17 14 31 31 31h344v63z" horiz-adv-x="1000" />
|
|
182
|
+
|
|
183
|
+
<glyph glyph-name="group-54" unicode="" d="M356 350c-11 0-21-4-28-11-7-6-12-15-12-25 0-10 5-19 12-26 7-6 17-10 28-10h55l-27-32c-5-5-8-11-9-18-1-7 1-14 4-20 3-6 8-11 14-15 7-3 14-5 21-5 29 0 48-25 36-50 0 0 0 0 0 0-5-11-15-19-28-22 0 0 0 0 0 0-13-2-26 2-35 10-4 4-8 6-13 8-5 2-10 3-15 3-5 0-10-1-15-3-5-2-9-4-13-8-3-3-6-7-8-11-2-5-3-9-3-14 0-5 1-10 3-14 2-4 5-8 8-12 28-25 68-36 106-29 38 7 71 31 86 64 22 50-1 103-44 131l44 50c4 6 7 12 8 19 1 7 0 13-4 20-3 6-8 11-14 15-6 3-13 5-21 5h-136z m335 0c-9 1-19-2-27-7l-78-54c-4-3-8-7-10-11-3-4-5-8-5-13-1-5-1-9 1-14 1-5 3-9 6-13 3-4 7-7 12-9 4-3 9-4 14-5 5 0 10 0 15 1 5 1 10 3 14 6l15 11v-162c0-10 5-19 12-26 7-7 17-10 28-10 10 0 20 3 27 10 7 7 12 16 12 26v234c0 9-4 18-11 24-6 7-15 11-25 12z m-394 469c-10 0-20-4-28-11-7-7-11-16-11-25v-36h-117c-43 0-78-33-78-72v-722c0-39 35-72 78-72h781c43 0 78 33 78 72v722c0 39-35 72-78 72h-117v36c0 9-4 18-12 25-7 7-17 11-27 11-11 0-21-4-28-11-7-7-11-16-11-25v-36h-391v36c0 9-4 18-11 25-8 7-18 11-28 11z m-156-144h117v-36c0-10 4-19 11-26 8-7 18-11 28-11 10 0 20 4 28 11 7 7 11 16 11 26v36h391v-36c0-10 4-19 11-26 7-7 17-11 28-11 10 0 20 4 27 11 8 7 12 16 12 26v36h117v-145h-781v145z m0-217h781v-505h-781v505z" horiz-adv-x="1000" />
|
|
184
|
+
|
|
173
185
|
<glyph glyph-name="first_page" unicode="" d="M250 600h84v-500h-84v500z m518-441l-59-59-250 250 250 250 59-59-192-191z" horiz-adv-x="1000" />
|
|
174
186
|
|
|
175
187
|
<glyph glyph-name="keyboard_arrow_down" unicode="" d="M309 524l191-192 191 192 59-59-250-250-250 250z" horiz-adv-x="1000" />
|
|
@@ -282,6 +294,8 @@
|
|
|
282
294
|
|
|
283
295
|
<glyph glyph-name="sort-number-down" unicode="" d="M751 683q0 35-24 65t-58 29q-29 0-46-21t-17-52 20-53 58-21q28 0 48 15t19 38z m-340-643q0-6-6-13l-178-178q-5-5-13-5-6 0-12 5l-179 179q-8 9-4 19 4 11 17 11h107v768q0 8 5 13t13 5h107q8 0 13-5t5-13v-768h107q8 0 13-5t5-13z m402-132v-64h-262v64h93v241q0 4 0 10t1 10v9h-2l-3-7q-5-7-15-17l-35-33-45 48 107 104h68v-365h93z m16 742q0-34-7-67t-23-64-38-53-55-37-71-14q-35 0-60 9-14 5-24 9l22 63q9-4 17-6 21-8 42-8 47 0 75 33t37 81h-1q-11-13-34-20t-47-8q-59 0-97 40t-37 96q0 59 40 99t101 41q69 0 115-53t45-141z" horiz-adv-x="857.4" />
|
|
284
296
|
|
|
297
|
+
<glyph glyph-name="thumbs-up-alt" unicode="" d="M143 100q0 15-11 25t-25 11q-15 0-25-11t-11-25q0-15 11-25t25-11q15 0 25 11t11 25z m89 286v-357q0-15-10-25t-26-11h-160q-15 0-25 11t-11 25v357q0 14 11 25t25 10h160q15 0 26-10t10-25z m661 0q0-48-31-83 9-25 9-43 1-42-24-76 9-31 0-66-9-31-31-52 5-62-27-101-36-43-110-44h-72q-37 0-80 9t-68 16-67 22q-69 24-88 25-15 0-25 11t-11 25v357q0 14 10 25t24 11q13 1 42 33t57 67q38 49 56 67 10 10 17 27t10 27 8 34q4 22 7 34t11 29 19 28q10 11 25 11 25 0 46-6t33-15 22-22 14-25 7-28 2-25 1-22q0-21-6-43t-10-33-16-31q-1-4-5-10t-6-13-5-13h155q43 0 75-32t32-75z" horiz-adv-x="928.6" />
|
|
298
|
+
|
|
285
299
|
<glyph glyph-name="youtube-play" unicode="" d="M397 221l270 139-270 141v-280z m103 481q94 0 181-3t128-5l41-2q0 0 9-1t13-2 13-2 16-5 16-7 17-11 16-15q4-3 9-10t16-33 15-56q4-36 7-76t3-64v-98q1-81-10-162-4-30-14-55t-18-35l-8-9q-7-8-16-15t-17-10-16-7-16-5-13-2-13-2-9-1q-140-11-350-11-115 2-201 4t-111 4l-28 3-20 2q-20 3-30 5t-29 12-31 23q-4 3-9 10t-16 33-15 56q-4 36-7 76t-3 64v98q-1 81 10 162 4 31 14 55t18 35l8 9q8 9 16 15t17 11 16 7 16 5 13 2 13 2 9 1q140 10 350 10z" horiz-adv-x="1000" />
|
|
286
300
|
|
|
287
301
|
<glyph glyph-name="trello" unicode="" d="M393 100v571q0 8-5 13t-13 5h-268q-8 0-13-5t-5-13v-571q0-8 5-13t13-5h268q8 0 13 5t5 13z m375 214v357q0 8-5 13t-13 5h-268q-8 0-13-5t-5-13v-357q0-7 5-12t13-6h268q8 0 13 6t5 12z m89 429v-786q0-14-10-25t-26-11h-785q-15 0-25 11t-11 25v786q0 14 11 25t25 11h785q15 0 26-11t10-25z" horiz-adv-x="857.1" />
|
|
Binary file
|
|
Binary file
|
|
Binary file
|