q2-tecton-elements 1.10.9 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{icons-4595ee47.js → icons-9bd0febe.js} +10 -0
- package/dist/cjs/{index-a55d3c34.js → index-f5807a6a.js} +12 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-btn_2.cjs.entry.js +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +5 -3
- package/dist/cjs/q2-card.cjs.entry.js +89 -0
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +4 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +26 -7
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +23 -18
- package/dist/cjs/q2-icon.cjs.entry.js +2 -2
- package/dist/cjs/q2-input.cjs.entry.js +12 -7
- package/dist/cjs/q2-loc.cjs.entry.js +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +1 -1
- package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +118 -0
- package/dist/cjs/q2-radio-group.cjs.entry.js +48 -3
- package/dist/cjs/q2-radio.cjs.entry.js +8 -3
- package/dist/cjs/q2-section.cjs.entry.js +1 -1
- package/dist/cjs/q2-select.cjs.entry.js +18 -8
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper.cjs.entry.js +4 -2
- package/dist/cjs/q2-tab-container.cjs.entry.js +4 -2
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/q2-calendar/index.js +21 -2
- package/dist/collection/components/q2-card/index.js +290 -0
- package/dist/collection/components/q2-card/styles.css +161 -0
- package/dist/collection/components/q2-checkbox/index.js +43 -7
- package/dist/collection/components/q2-checkbox/styles.css +6 -2
- package/dist/collection/components/q2-checkbox-group/index.js +21 -0
- package/dist/collection/components/q2-editable-field/index.js +27 -20
- package/dist/collection/components/q2-icon/icons.js +10 -0
- package/dist/collection/components/q2-input/index.js +61 -5
- package/dist/collection/components/q2-input/styles.css +86 -125
- package/dist/collection/components/q2-pagination/index.js +277 -0
- package/dist/collection/components/q2-pagination/styles.css +120 -0
- package/dist/collection/components/q2-radio/index.js +25 -1
- package/dist/collection/components/q2-radio/styles.css +16 -16
- package/dist/collection/components/q2-radio-group/index.js +77 -9
- package/dist/collection/components/q2-radio-group/styles.css +4 -9
- package/dist/collection/components/q2-select/index.js +35 -7
- package/dist/collection/components/q2-stepper/index.js +2 -0
- package/dist/collection/components/q2-stepper/styles.css +4 -4
- package/dist/collection/components/q2-tab-container/index.js +3 -1
- package/dist/collection/components/q2-textarea/styles.css +72 -109
- package/dist/collection/components/tecton-tab-pane/index.js +1 -1
- package/dist/collection/utils/index.js +11 -1
- package/dist/esm/{icons-3ee662ea.js → icons-6a143c2f.js} +10 -0
- package/dist/esm/{index-ec6660af.js → index-0e13a57f.js} +12 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-btn_2.entry.js +1 -1
- package/dist/esm/q2-calendar.entry.js +5 -3
- package/dist/esm/q2-card.entry.js +85 -0
- package/dist/esm/q2-carousel-pane.entry.js +1 -1
- package/dist/esm/q2-carousel.entry.js +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +4 -1
- package/dist/esm/q2-checkbox.entry.js +26 -7
- package/dist/esm/q2-dropdown-item.entry.js +1 -1
- package/dist/esm/q2-dropdown.entry.js +1 -1
- package/dist/esm/q2-editable-field.entry.js +23 -18
- package/dist/esm/q2-icon.entry.js +2 -2
- package/dist/esm/q2-input.entry.js +12 -7
- package/dist/esm/q2-loc.entry.js +1 -1
- package/dist/esm/q2-message.entry.js +1 -1
- package/dist/esm/q2-optgroup.entry.js +1 -1
- package/dist/esm/q2-pagination.entry.js +114 -0
- package/dist/esm/q2-radio-group.entry.js +49 -4
- package/dist/esm/q2-radio.entry.js +8 -3
- package/dist/esm/q2-section.entry.js +1 -1
- package/dist/esm/q2-select.entry.js +18 -8
- package/dist/esm/q2-stepper-pane.entry.js +1 -1
- package/dist/esm/q2-stepper.entry.js +4 -2
- package/dist/esm/q2-tab-container.entry.js +4 -2
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +2 -2
- package/dist/q2-tecton-elements/{p-a6f8d09a.entry.js → p-2372f988.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-27ec0a16.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-fbf7c5e6.entry.js → p-2be33492.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-346b65d5.entry.js +1 -0
- package/dist/q2-tecton-elements/p-3c6f73cb.js +1 -0
- package/dist/q2-tecton-elements/p-3cb34e2e.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-843b1ee9.entry.js → p-492dfb55.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-564154f3.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-7e6fc65d.entry.js → p-6a83a97c.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-9b50c3c3.entry.js → p-701b381a.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-7dec37d6.entry.js +1 -0
- package/dist/q2-tecton-elements/p-841ec108.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-bb2e110a.entry.js → p-88bc2f49.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-9ccbc3d8.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-8509b171.entry.js → p-a72e7a12.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-df182f61.entry.js → p-af202624.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-b5b12e46.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-c5e55b9f.entry.js → p-bfd77f9b.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-c83dba0a.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ca847db7.entry.js +1 -0
- package/dist/q2-tecton-elements/p-d199fca8.entry.js +1 -0
- package/dist/q2-tecton-elements/p-dffbcec3.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-5559f126.entry.js → p-f73df612.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-bbacb804.entry.js → p-f85bf7fb.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-f85da2a8.js +1 -0
- package/dist/q2-tecton-elements/p-fc318ae2.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-07a5d703.entry.js → p-fe61c1aa.entry.js} +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/test/helpers.js +10 -3
- package/dist/types/components/q2-calendar/index.d.ts +1 -0
- package/dist/types/components/q2-card/index.d.ts +31 -0
- package/dist/types/components/q2-checkbox/index.d.ts +4 -0
- package/dist/types/components/q2-checkbox-group/index.d.ts +1 -0
- package/dist/types/components/q2-editable-field/index.d.ts +2 -0
- package/dist/types/components/q2-input/index.d.ts +3 -0
- package/dist/types/components/q2-pagination/index.d.ts +30 -0
- package/dist/types/components/q2-radio/index.d.ts +2 -1
- package/dist/types/components/q2-radio-group/index.d.ts +4 -0
- package/dist/types/components/q2-select/index.d.ts +2 -0
- package/dist/types/components.d.ts +80 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/workspace/workspace/{tecton-production_release_1.10.x → tecton-production_release_1.11.x}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +4 -1
- package/package.json +2 -2
- package/dist/q2-tecton-elements/p-37aba2a4.js +0 -1
- package/dist/q2-tecton-elements/p-4ae9d1f3.entry.js +0 -1
- package/dist/q2-tecton-elements/p-4cd00f1a.js +0 -1
- package/dist/q2-tecton-elements/p-52f53e07.entry.js +0 -1
- package/dist/q2-tecton-elements/p-78642b7b.entry.js +0 -1
- package/dist/q2-tecton-elements/p-7eb39c90.entry.js +0 -1
- package/dist/q2-tecton-elements/p-81df91a1.entry.js +0 -1
- package/dist/q2-tecton-elements/p-95a73559.entry.js +0 -1
- package/dist/q2-tecton-elements/p-96c9eb75.entry.js +0 -1
- package/dist/q2-tecton-elements/p-ab977515.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c555f1de.entry.js +0 -1
- package/dist/q2-tecton-elements/p-fa6eea5c.entry.js +0 -1
- package/dist/q2-tecton-elements/p-fc804ebd.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as o,F as r,g as e}from"./p-080839ed.js";import{s as i,h as s,i as n,o as a,l as d}from"./p-
|
|
1
|
+
import{r as t,h as o,F as r,g as e}from"./p-080839ed.js";import{s as i,h as s,i as n,o as a,l as d}from"./p-f85da2a8.js";const l=class{constructor(o){t(this,o),this.type="icon",this.dropdownOpen=!1,this.scheduledAfterRender=[],this.dropdownItemSelector="q2-dropdown-item:not([disabled]):not([separator])",this.focusToggle=()=>{const t=this.hostElement.shadowRoot.querySelector(".dropdown-button");t&&t.dispatchEvent(new FocusEvent("focus"))},this.openDropdown=()=>{i(this),this.dropdownOpen||(this.dropdownOpen=!0,this.scheduledAfterRender.push(this.resizeIframe))},this.closeDropdown=()=>{this.dropdownOpen&&(this.dropdownOpen=!1,this.scheduledAfterRender.push((()=>{this.resizeIframe()})))},this.onClickElsewhere=t=>{"click-elsewhere"===t.target.localName&&(t.stopPropagation(),this.closeDropdown())},this.onToggleClick=()=>{if(this.dropdownOpen)return this.focusToggle(),void this.closeDropdown();this.focusToggle(),this.openDropdown()},this.onToggleKeydown=t=>["ArrowUp","Up"].includes(t.key)?(t.preventDefault(),this.openDropdown(),void this.focusLastItem()):["ArrowDown","Down"].includes(t.key)?(t.preventDefault(),this.openDropdown(),void this.focusFirstItem()):["Escape","Esc"].includes(t.key)?(t.preventDefault(),this.focusToggle(),void this.closeDropdown()):void 0,this.onDropdownMenuClick=t=>{if("q2-dropdown-item"!==t.target.localName)return;const o=t.target;o.disabled||o.separator||(this.focusToggle(),this.closeDropdown())},this.onDropdownMenuKeydown=t=>{if(["Escape","Esc"].includes(t.key))return this.closeDropdown(),void this.focusToggle();if("q2-dropdown-item"!==t.target.localName)return;const o=t.target;return["ArrowUp","Up"].includes(t.key)?(t.preventDefault(),void this.focusAdjacentItem(o,"prev")):["ArrowDown","Down"].includes(t.key)?(t.preventDefault(),void this.focusAdjacentItem(o,"next")):void 0}}resizeIframe(){return window.TectonElements&&window.TectonElements.resizeIframe&&window.TectonElements.resizeIframe()}resolveMenu(){return this.name&&window.TectonElements&&window.TectonElements.resolveMenu(this.name,this.contextValue,this.resolvedType)}orchestrateResolvedMenuItems(){this.name&&this.context?this.resolveMenuItemElements().then((t=>{this.removeResolvedElements(),t.forEach((t=>{this.hostElement.appendChild(t)}))})).catch((t=>{throw this.removeResolvedElements(),t})):this.removeResolvedElements()}removeResolvedElements(){this.hostElement.querySelectorAll("q2-dropdown-item.resolved-menu-item").forEach((t=>this.hostElement.removeChild(t)))}resolveMenuItemElements(){return this.resolveMenu().then((t=>t.map((t=>{let o,r;switch(t["tct-ctxid"]&&(r={},r[t.contextIdParamName]=t["tct-ctxid"]),t.action){case"navigateTo":o=()=>this.navigateTo(t.featureName,t.moduleName,r);break;case"showOverpanel":o=()=>this.showOverpanel(`${t.featureName}.${t.moduleName}`,r)}const e=document.createElement("q2-dropdown-item");return e.setAttribute("value",t.itemLabel),e.classList.add("resolved-menu-item"),e.innerHTML=t.itemLabel,e.onclick=o,e}))))}navigateTo(t,o,r){return window.TectonElements&&window.TectonElements.navigateTo(t,o,r)}showOverpanel(t,o){return window.TectonElements&&window.TectonElements.showOverpanel(t,o,void 0,!0)}get hasCustomButton(){return!!this.hostElement.querySelector("[slot=custom-dropdown-button]")}get toggleButtonProps(){const t=["primary","secondary","neutral"],o=["icon","fab","custom",...t].includes(this.type)?this.type:"",r="icon"===o,e="fab"===o,i="custom"===o;let s;return t.includes(o)&&(s="neutral"===o?o:`workflow-${o}`),{icon:r,fab:e,intent:s,active:this.dropdownOpen,disabled:!!this.disabled,ariaExpanded:this.dropdownOpen,className:"dropdown-button"+(r||e||s?"":" unstyled"),custom:i}}ariaLabelObserver(){s(this)}nameHandler(){this.orchestrateResolvedMenuItems()}contextHandler(){this.orchestrateResolvedMenuItems()}contextValueHandler(){this.orchestrateResolvedMenuItems()}resolvedTypeHandler(){this.orchestrateResolvedMenuItems()}delegateFocus(t){n(t,this.hostElement)&&this.controlElement.shadowRoot.querySelector("button").focus()}componentWillLoad(){s(this)}componentDidLoad(){this.orchestrateResolvedMenuItems(),a(this.hostElement)}componentDidRender(){setTimeout((()=>{this.scheduledAfterRender.forEach((t=>t())),this.scheduledAfterRender=[]}),25)}focusFirstItem(){const t=this.hostElement.querySelector(`${this.dropdownItemSelector}:first-child`);t&&t.dispatchEvent(new FocusEvent("focus"))}focusLastItem(){const t=this.hostElement.querySelector(`${this.dropdownItemSelector}:last-child`);t&&t.dispatchEvent(new FocusEvent("focus"))}focusAdjacentItem(t,o){const r=Array.from(this.hostElement.querySelectorAll(this.dropdownItemSelector)),e=r.indexOf(t);if(-1===e)return;let i=0;"next"===o?i=e<r.length-1?e+1:0:"prev"===o&&(i=e>0?e-1:r.length-1);const s=r[i];s&&s.dispatchEvent(new Event("focus"))}render(){const t=this.toggleButtonProps;return o("click-elsewhere",{class:"dropdown-container"+(this.dropdownOpen?" dropdown-open":""),onChange:this.onClickElsewhere},o("q2-btn",{ref:t=>this.controlElement=t,class:t.className,onClick:this.onToggleClick,onKeyDown:this.onToggleKeydown,fab:t.fab,intent:t.intent,active:t.active,disabled:t.disabled,ariaExpanded:t.ariaExpanded,label:this.hideLabel&&this.label?d(this.label):void 0,hideLabel:this.hideLabel,ariaHasPopup:"menu","test-id":"dropdownButton"},this.hasCustomButton?o("div",{"test-id":"dropdownCustom",class:t.custom?"":"hidden"},o("slot",{name:"custom-dropdown-button"})):o(r,null,this.icon?o("q2-icon",{type:this.icon}):" ",this.label&&!this.hideLabel&&o("span",{class:"dropdown-button-text"},d(this.label)))),o("div",{ref:t=>this.dropdownContainer=t,class:"q2-element-dropdown "+("up"===this.privatePopDirection?"dropup":""),role:"menu",onClick:this.onDropdownMenuClick,onKeyDown:this.onDropdownMenuKeydown},o("div",null,o("slot",null),this.dropdownOpen&&o("q2-btn",{class:"sr close-dropdown",onFocus:this.closeDropdown}))))}get hostElement(){return e(this)}static get watchers(){return{ariaLabel:["ariaLabelObserver"],name:["nameHandler"],context:["contextHandler"],contextValue:["contextValueHandler"],resolvedType:["resolvedTypeHandler"]}}};l.style="*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.q2-element-dropdown{display:none;position:absolute;background-color:var(--app-white);color:var(--t-font-color);left:0;width:100%;z-index:100;margin-top:1px;box-shadow:var(--app-shadow-1);height:0;overflow:hidden;opacity:0;visibility:hidden;transition:opacity var(--app-tween-1);border-radius:var(--tct-dropdown-border-radius, --t-dropdown-border-radius, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}.q2-element-dropdown::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.q2-element-dropdown::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown.sizable{display:block;height:auto}.dropdown-open .q2-element-dropdown{display:block;height:auto;overflow:auto;opacity:1;visibility:visible}:host([alignment=right]) .q2-element-dropdown{left:auto;right:0}:host{display:inline-flex}.dropdown-container{position:relative;display:block}.dropdown-button-content{display:flex;align-items:center}.dropdown-button.unstyled .dropdown-button-content{padding:var(--tct-scale-2, var(--app-scale-2, 10px)) var(--tct-scale-1, var(--app-scale-1, 5px))}.q2-element-dropdown{width:var(--tct-dropdown-width, var(--t-dropdown-width, 175px))}.q2-element-dropdown.dropup{bottom:var(--tct-btn-icon-height, var(--t-btn-icon-height, 44px))}q2-btn[color=primary]~.q2-element-dropdown.dropup,q2-btn[intent=workflow-primary]~.q2-element-dropdown.dropup{bottom:calc( var-list(var-prefixer(btn-icon-height), 44px) + var-list(var-prefixer(btn-primary-border-width), 0) )}q2-btn[color=secondary]~.q2-element-dropdown.dropup,q2-btn[intent=workflow-secondary]~.q2-element-dropdown.dropup{bottom:calc( var-list(var-prefixer(btn-icon-height), 44px) + var-list(var-prefixer(btn-secondary-border-width), 0) )}q2-btn[intent=neutral]~.q2-element-dropdown.dropup{bottom:calc( var-list(var-prefixer(btn-icon-height), 44px) + var-list(var-prefixer(btn-neutral-border-width), 0) )}";export{l as q2_dropdown}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as o}from"./p-080839ed.js";var n,t=(function(o){o.exports={polyfill:function(){var o=window,n=document;if(!("scrollBehavior"in n.documentElement.style)||!0===o.__forceSmoothScrollPolyfill__){var t,i=o.HTMLElement||o.Element,e={scroll:o.scroll||o.scrollTo,scrollBy:o.scrollBy,elementScroll:i.prototype.scroll||a,scrollIntoView:i.prototype.scrollIntoView},r=o.performance&&o.performance.now?o.performance.now.bind(o.performance):Date.now,s=(t=o.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(t)?1:0);o.scroll=o.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(o,n.body,void 0!==arguments[0].left?~~arguments[0].left:o.scrollX||o.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:o.scrollY||o.pageYOffset):e.scroll.call(o,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:o.scrollX||o.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:o.scrollY||o.pageYOffset))},o.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?e.scrollBy.call(o,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(o,n.body,~~arguments[0].left+(o.scrollX||o.pageXOffset),~~arguments[0].top+(o.scrollY||o.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var o=arguments[0].left,n=arguments[0].top;h.call(this,this,void 0===o?this.scrollLeft:~~o,void 0===n?this.scrollTop:~~n)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");e.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},i.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):e.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},i.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var t=f(this),i=t.getBoundingClientRect(),r=this.getBoundingClientRect();t!==n.body?(h.call(this,t,t.scrollLeft+r.left-i.left,t.scrollTop+r.top-i.top),"fixed"!==o.getComputedStyle(t).position&&o.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):o.scrollBy({left:r.left,top:r.top,behavior:"smooth"})}else e.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function a(o,n){this.scrollLeft=o,this.scrollTop=n}function l(o){if(null===o||"object"!=typeof o||void 0===o.behavior||"auto"===o.behavior||"instant"===o.behavior)return!0;if("object"==typeof o&&"smooth"===o.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+o.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(o,n){return"Y"===n?o.clientHeight+s<o.scrollHeight:"X"===n?o.clientWidth+s<o.scrollWidth:void 0}function c(n,t){var i=o.getComputedStyle(n,null)["overflow"+t];return"auto"===i||"scroll"===i}function d(o){var n=u(o,"Y")&&c(o,"Y"),t=u(o,"X")&&c(o,"X");return n||t}function f(o){for(;o!==n.body&&!1===d(o);)o=o.parentNode||o.host;return o}function v(n){var t,i,e,s=(r()-n.startTime)/468;s=s>1?1:s,t=.5*(1-Math.cos(Math.PI*s)),n.method.call(n.scrollable,i=n.startX+(n.x-n.startX)*t,e=n.startY+(n.y-n.startY)*t),i===n.x&&e===n.y||o.requestAnimationFrame(v.bind(o,n))}function h(t,i,s){var l,u,c,d,f=r();t===n.body?(l=o,u=o.scrollX||o.pageXOffset,c=o.scrollY||o.pageYOffset,d=e.scroll):(l=t,u=t.scrollLeft,c=t.scrollTop,d=a),v({scrollable:l,method:d,startTime:f,startX:u,startY:c,x:i,y:s})}}}}(n={path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),n.exports);function i(o,n){var t;return(null===(t=o.composedPath)||void 0===t?void 0:t.call(o)[0])===n}function e(o){o.focus=()=>null==o?void 0:o.dispatchEvent(new FocusEvent("focus",{bubbles:!1}))}function r(){return!!function(){const o=navigator.userAgent.toLowerCase();return o.includes("safari")&&!o.includes("chrome")}()&&(t.polyfill(),window.__forceSmoothScrollPolyfill__=!0)}function s(){return navigator.userAgent.toLowerCase().includes("firefox")}function a(){return"ontouchstart"in window||navigator.maxTouchPoints>0}let l=1e3;function u(){return l++}function c(o,n){n?o():requestAnimationFrame((()=>c(o,!0)))}function d(o,n){var t,i,e;return o?!0===(null===(t=window.Tecton)||void 0===t?void 0:t.noString)?o:null!==(e=null===(i=null===window||void 0===window?void 0:window.TectonElements)||void 0===i?void 0:i.loc(o,n))&&void 0!==e?e:o:""}function f(n){const{label:t,hideLabel:i}=n;if(!t||i)return;let e="";return n.optional&&(e=o("span",{class:"optional-tag"},d("tecton.element.input.optional"))),n.readonly&&(e=o("span",{class:"optional-tag"},d("tecton.element.input.readonly"))),o("label",{htmlFor:n.inputId,class:n.readonly?"readonly-field":""},d(n.label),e)}function v(o){const{ariaLabel:n}=o;n&&("hideLabel"in o&&(o.hideLabel=!0),o.label=d(n),o.ariaLabel=void 0)}function h(n){return o("div",{class:"messages-container"},o("q2-message",{appearance:"minimal",description:!0,type:n.hasError?"danger":"info"},o("ul",{id:n.inputDescribedBy},n.messages.map((n=>o("li",null,d(n)))))))}function p(o){const n=o.hostElement.shadowRoot.querySelector(".messages-container"),t=n.querySelector("q2-message"),i=o.showMessages&&o.hasFocus?t.getBoundingClientRect().height:0;n.style.getPropertyValue("height")!==`${i}px`&&(0===i?(t.classList.add("invisible"),n.style.removeProperty("height")):(t.classList.remove("invisible"),n.style.setProperty("height",`${i}px`)))}function m(o){const{dropdownContainer:n,popDirection:t}=o;if(n&&(n.style.maxHeight=null),t)return o.privatePopDirection=t;const i=o.inputField||o.controlElement,e=o.minPopHeight||null;n.classList.add("sizable");const r=n.getBoundingClientRect().height;n.classList.remove("sizable");const{top:s,height:a}=i.getBoundingClientRect(),l=window.innerHeight-s-a,u=r<=s;if(l>r)return o.privatePopDirection="down";if(u||!e)return o.privatePopDirection="up";if(l>=e+5){const t=Math.max(l-5,e);return n.style.maxHeight=`${t}px`,o.privatePopDirection="down"}{const t=Math.max(s,e);return n.style.maxHeight=`${t}px`,o.privatePopDirection="up"}}export{a,r as b,u as c,p as d,f as e,s as f,v as h,i,d as l,h as m,c as n,e as o,m as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as a,h as r,g as e}from"./p-080839ed.js";import{c as i,d as s,h as o,o as p,l as n,i as f,m as c,e as d}from"./p-f85da2a8.js";function u(t="",a={prefix:"",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:"",allowDecimal:!1,allowNegative:!0},r=!1){const e="-"===t[0];let i=t;const s=!!a.allowDecimal&&!!a.decimals;if(r){const t=i.replace(/[^\d.]/g,"");i=t&&Number(t).toFixed(s?a.decimals:0)||""}i=i.replace(/[^\d]/g,"");let{integerString:o,decimalString:p}=function(t,a=!1,r){if(!a)return{integerString:t,decimalString:""};const e=t.length-r;let i=t.substring(0,e).padStart(1,"0");i.length>1&&"0"===i[0]&&(i=i.substring(1));return{integerString:i,decimalString:t.substring(e).padStart(r,"0")}}(i,s,a.decimals),n=a.decimalSeparator;s||(n="",p="");const f=a.allowNegative&&e?"-":"";i=`${f}${o}${n}${p}`,o=o.replace(/\B(?=(\d{3})+(?!\d))/g,a.thousandsSeparator);const c=f||o?`${f}${o}${n}${p}`:"";let d=c.length-i.length;return n&&(d+=a.decimalSeparator.length),{value:i,formattedValue:c,fullyFormattedValue:f||o?`${f}${a.prefix}${o}${n}${p}${a.suffix}`:"",prefix:a.prefix||a.suffix,suffix:"",formattingCharacterCount:d,maxlength:Number.MAX_SAFE_INTEGER.toString().length+d+p.length,unformattedValue:`${o.replace(/[^0-9]/g,"")}${p}`.replace(/^0+/,"")}}function l(t="",a="",r){const e=r&&r.prefix||"",i=r&&r.suffix||"";if(!t||!a)return{value:t,formattedValue:t,fullyFormattedValue:`${e}${t}${i}`,prefix:e.trim()||i.trim(),formattingCharacterCount:0,unformattedValue:t};const{unformattedValue:s,formattedValue:o,formattingCharacterCount:p}=function(t,a){const r=a.split("");let e=function(t){let a=h.join("|"),r=t.replace(new RegExp(`[${a}]`,"g"),"").split("");return new Set(r)}(a),i=0,s=0,o="";const p=r.reduce(((a,r)=>{if(i>=t.length)return a;if(function(t){return m.includes(t)}(r)&&x(t[i],e))return a;if(function(t){return h.includes(t)}(r)){if(i=S(t,i,e),i>=t.length)return a;const s=function(t,a){switch(a){case"#":t=t.replace(/[^\d]/g,"");break;case"@":t=t.toUpperCase().replace(/[^A-Z]+/g,"");break;case"*":t=t.toUpperCase().replace(/[^\dA-Z]+/g,"");break;case"?":t=t.replace(/[^\d]/g,"");break;default:return t}return t}(t[i],r);a+=s,o+=s,i++}else a+=r,s++,r===t[i]&&i++;return a}),"");return{unformattedValue:o,formattedValue:p,formattingCharacterCount:s}}(t,a),n=`${e}${o}${i}`,f=a.length,c=function(t,a,r){return t.replace(new RegExp(`[${m.join("|")}]`,"g"),"").length+a.length+r.length}(a,e,i);return{value:s,formattedValue:o,fullyFormattedValue:n,prefix:e.trim()||i.trim(),formattingCharacterCount:p,maxlength:f,minFormattedLength:c,unformattedValue:s}}const m=["?"],h=["#","@","*",...m];function x(t,a){return a.has(t)}function S(t,a,r){return x(t[a],r)?S(t,++a,r):a}const v={AED:{prefix:"",suffix:"د.إ",decimals:2,decimalSeparator:".",thousandsSeparator:","},AFN:{prefix:"¤",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},ALL:{prefix:"L",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},AMD:{prefix:"դր.",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},ANG:{prefix:"ƒ",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},AOA:{prefix:"Kz",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},ARS:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},AUD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},AWG:{prefix:"ƒ",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},AZN:{prefix:"¤",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},BAM:{prefix:"КМ",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},BBD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},BDT:{prefix:"৳",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},BGN:{prefix:"৳",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},BHD:{prefix:"",suffix:"ب.د",decimals:3,decimalSeparator:".",thousandsSeparator:","},BIF:{prefix:"Fr",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},BMD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},BND:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},BOB:{prefix:"Bs.",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},BRL:{prefix:"R$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},BSD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},BTN:{prefix:"¤",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},BWP:{prefix:"P",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},BYN:{prefix:"Br",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},BZD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},CAD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},CDF:{prefix:"Fr",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},CHF:{prefix:"Fr",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},CLF:{prefix:"Fr",suffix:"",decimals:4,decimalSeparator:".",thousandsSeparator:","},CLP:{prefix:"$",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},CNY:{prefix:"¥",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},COP:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},CRC:{prefix:"₡",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},CUC:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},CUP:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},CVE:{prefix:"$",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},CZK:{prefix:"Kč",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},DJF:{prefix:"Fr",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},DKK:{prefix:"kr",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},DOP:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},DZD:{prefix:"",suffix:"د.ج",decimals:2,decimalSeparator:".",thousandsSeparator:","},EEK:{prefix:"KR",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},EGP:{prefix:"£",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},ERN:{prefix:"Nfk",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},ETB:{prefix:"¤",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},EUR:{prefix:"€",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},FJD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},FKP:{prefix:"£",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},GBP:{prefix:"£",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},GEL:{prefix:"ლ",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},GHS:{prefix:"¤",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},GIP:{prefix:"£",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},GMD:{prefix:"D",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},GNF:{prefix:"Fr",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},GTQ:{prefix:"Q",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},GYD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},HKD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},HNL:{prefix:"L",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},HRK:{prefix:"kn",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},HTG:{prefix:"G",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},HUF:{prefix:"Ft",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},IDR:{prefix:"Rs",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},ILS:{prefix:"₪",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},INR:{prefix:"₨",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},IQD:{prefix:"",suffix:"ع.د",decimals:3,decimalSeparator:".",thousandsSeparator:","},IRR:{prefix:"¤",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},ISK:{prefix:"kr",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},JMD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},JOD:{prefix:"",suffix:"د.ا",decimals:3,decimalSeparator:".",thousandsSeparator:","},JPY:{prefix:"¥",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},KES:{prefix:"Sh",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},KGS:{prefix:"¤",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},KHR:{prefix:"¤",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},KMF:{prefix:"Fr",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},KPW:{prefix:"₩",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},KRW:{prefix:"₩",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},KWD:{prefix:"د.ك",suffix:"",decimals:3,decimalSeparator:".",thousandsSeparator:","},KYD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},KZT:{prefix:"〒",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},LAK:{prefix:"₭",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},LBP:{prefix:"",suffix:"ل.ل",decimals:2,decimalSeparator:".",thousandsSeparator:","},LKR:{prefix:"Rs",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},LRD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},LSL:{prefix:"L",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},LTL:{prefix:"Lt",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},LVL:{prefix:"Ls",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},LYD:{prefix:"",suffix:"ل.د",decimals:3,decimalSeparator:".",thousandsSeparator:","},MAD:{prefix:"",suffix:"د.م.",decimals:2,decimalSeparator:".",thousandsSeparator:","},MDL:{prefix:"L",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},MGA:{prefix:"¤",suffix:"",decimals:1,decimalSeparator:".",thousandsSeparator:","},MKD:{prefix:"ден",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},MMK:{prefix:"K",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},MNT:{prefix:"₮",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},MOP:{prefix:"P",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},MRU:{prefix:"UM",suffix:"",decimals:1,decimalSeparator:".",thousandsSeparator:","},MUR:{prefix:"₨",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},MVR:{prefix:"¤",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},MWK:{prefix:"MK",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},MXN:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},MYR:{prefix:"RM",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},MZN:{prefix:"MTn",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},NAD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},NGN:{prefix:"₦",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},NIO:{prefix:"C$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},NOK:{prefix:"kr",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},NPR:{prefix:"₨",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},NZD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},OMR:{prefix:"",suffix:"ر.ع.",decimals:3,decimalSeparator:".",thousandsSeparator:","},PAB:{prefix:"B/.",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},PEN:{prefix:"S/.",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},PGK:{prefix:"K",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},PHP:{prefix:"p",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},PKR:{prefix:"₨",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},PLN:{prefix:"zł",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},PYG:{prefix:"¤",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},QAR:{prefix:"",suffix:"ر.ق",decimals:2,decimalSeparator:".",thousandsSeparator:","},RON:{prefix:"L",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},RSD:{prefix:"дин.",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},RUB:{prefix:"руб.",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},RWF:{prefix:"Fr",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},SAR:{prefix:"",suffix:"ر.س",decimals:2,decimalSeparator:".",thousandsSeparator:","},SBD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},SCR:{prefix:"₨",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},SDG:{prefix:"£",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},SEK:{prefix:"kr",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},SGD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},SHP:{prefix:"£",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},SKK:{prefix:"Sk",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},SLL:{prefix:"Le",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},SOS:{prefix:"Sh",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},SRD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},STN:{prefix:"Db",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},SVC:{prefix:"₡",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},SYP:{prefix:"£",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},SZL:{prefix:"L",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},THB:{prefix:"฿",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},TJS:{prefix:"ЅМ",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},TMM:{prefix:"m",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},TND:{prefix:"",suffix:"د.ت",decimals:3,decimalSeparator:".",thousandsSeparator:","},TOP:{prefix:"T$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},TRY:{prefix:"YTL",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},TTD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},TWD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},TZS:{prefix:"Sh",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},UAH:{prefix:"¤",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},UGX:{prefix:"Sh",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},USD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},UYU:{prefix:"$",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},UZS:{prefix:"¤",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},VEF:{prefix:"Bs F",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},VND:{prefix:"₫",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},VUV:{prefix:"Vt",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},WST:{prefix:"T",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},XAF:{prefix:"Fr",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},XCD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},XOF:{prefix:"Fr",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},XPF:{prefix:"Fr",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:","},YER:{prefix:"¤",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},ZAR:{prefix:"R",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},ZMW:{prefix:"ZK",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","},ZWD:{prefix:"$",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:","}};function b(t,a="USD",r=!1){let e=a||"",i=!0;e.includes("-integer")&&(e=e.split("-integer")[0],i=!1);const s=v[e];return s?u(t,Object.assign(Object.assign({},s),{allowDecimal:i&&s.decimals>0,allowNegative:!1}),r):l(t)}const g={AF:{mask:"(##) #######",prefix:"+93 "},AL:{mask:"#######",prefix:"+355 "},DZ:{mask:"(##) ###-###",prefix:"+213 "},AD:{mask:"(#) #####",prefix:"+376 "},AO:{mask:"#########",prefix:"+244 "},AI:{mask:"(###) ###-####",prefix:"+1 "},AG:{mask:"(###) ###-####",prefix:"+1 "},AR:{mask:"##########",prefix:"+54 "},AM:{mask:"########",prefix:"+375 "},AQ:{mask:"##-####",prefix:"+672 "},AW:{mask:"###-####",prefix:"+297 "},AU:{mask:"(##) ####-####",prefix:"+61 "},AT:{mask:"#############",prefix:"+43 "},AZ:{mask:"#########",prefix:"+994 "},BS:{mask:"(###) ###-####",prefix:"+1 "},BH:{mask:"####-####",prefix:"+973 "},BD:{mask:"#########",prefix:"+880 "},BB:{mask:"(###) ###-####",prefix:"+1 "},BY:{mask:"#########",prefix:"+375 "},BE:{mask:"########??",prefix:"+32 "},BZ:{mask:"#######",prefix:"+501 "},BJ:{mask:"(##) ###-###",prefix:"+229 "},BM:{mask:"(###) ###-####",prefix:"+1 "},BT:{mask:"(#) ###-###",prefix:"+975 "},BO:{mask:"(#) ###-####",prefix:"+591 "},BA:{mask:"(##) ##-##-##",prefix:"+387 "},BW:{mask:"########",prefix:"+267 "},BR:{mask:"(##) ####-####",prefix:"+55 "},BN:{mask:"###-####",prefix:"+673 "},BG:{mask:"#######?",prefix:"+359 "},BF:{mask:"##-##-##-##",prefix:"+226 "},BI:{mask:"####-####",prefix:"+257 "},KH:{mask:"(##) ######",prefix:"+855 "},CM:{mask:"####-####",prefix:"+237 "},CA:{mask:"(###) ###-####",prefix:"+1 "},CV:{mask:"###-####",prefix:"+238 "},KY:{mask:"(###) ###-####",prefix:"+1 "},CF:{mask:"###-###",prefix:"+236 "},TD:{mask:"###-##-##",prefix:"+235 "},CL:{mask:"#########",prefix:"+56 "},CN:{mask:"###########",prefix:"+86 "},CO:{mask:"##########",prefix:"57 "},KM:{mask:"###-####",prefix:"+269 "},CD:{mask:"###-####",prefix:"+243 "},CG:{mask:"###-####",prefix:"+242 "},CR:{mask:"####-####",prefix:"+506 "},CI:{mask:"####-####",prefix:"+225 "},HR:{mask:"########?",prefix:"+385 "},CU:{mask:"###########",prefix:"+53 "},CY:{mask:"####-####",prefix:"+357 "},CZ:{mask:"#########",prefix:"+420 "},DK:{mask:"####-####",prefix:"+45 "},DJ:{mask:"##-##-##-##",prefix:"+253 "},DM:{mask:"(###) ###-####",prefix:"+1 "},DO:{mask:"(###) ###-####",prefix:"+1 "},TL:{mask:"###-####",prefix:"+670 "},EC:{mask:"(##) ###-####",prefix:"+593 "},EG:{mask:"##########",prefix:"+20 "},SV:{mask:"####-####",prefix:"+503 "},GQ:{mask:"##-####",prefix:"+240 "},EE:{mask:"#######?",prefix:"+372 "},ET:{mask:"(##) ###-####",prefix:"+251 "},FK:{mask:"#####",prefix:"+500 "},FO:{mask:"######",prefix:"+298 "},FJ:{mask:"###-####",prefix:"+679 "},FI:{mask:"############",prefix:"+358 "},FR:{mask:"#########",prefix:"+33 "},GF:{mask:"##########",prefix:"+594 "},PF:{mask:"######",prefix:"+689 "},GA:{mask:"######?",prefix:"+241 "},GM:{mask:"###-####",prefix:"+220 "},GE:{mask:"########",prefix:"+995 "},DE:{mask:"###########",prefix:"+49 "},GH:{mask:"#########",prefix:"+233 "},GI:{mask:"####-####",prefix:"+350 "},GR:{mask:"##########",prefix:"+30 "},GL:{mask:"###-###",prefix:"+299 "},GD:{mask:"(###) ###-####",prefix:"+1 "},GP:{mask:"##########",prefix:"+590 "},GU:{mask:"(###) ###-####",prefix:"+1 "},GT:{mask:"####-####",prefix:"+502 "},GN:{mask:"####-####",prefix:"+224 "},GW:{mask:"###-####",prefix:"+245 "},GY:{mask:"(###) ####",prefix:"+592 "},HK:{mask:"####-####",prefix:"+852 "},HN:{mask:"########",prefix:"+504 "},HT:{mask:"####-####",prefix:"+509 "},HU:{mask:"########??",prefix:"+36 "},IS:{mask:"#########",prefix:"+354 "},IN:{mask:"##########",prefix:"+91 "},ID:{mask:"##########",prefix:"+62 "},IR:{mask:"##########",prefix:"+98 "},IQ:{mask:"##########",prefix:"+964 "},IE:{mask:"#########",prefix:"+353 "},IL:{mask:"#########",prefix:"+972 "},IT:{mask:"##########",prefix:"+39 "},JM:{mask:"(###) ###-####",prefix:"+1 "},JP:{mask:"#########",prefix:"+81 "},JO:{mask:"#########",prefix:"+962 "},KZ:{mask:"(###) ####-###",prefix:"+7 "},KE:{mask:"##########",prefix:"+254 "},KI:{mask:"##-###",prefix:"+686 "},KR:{mask:"##########",prefix:"+82 "},KW:{mask:"####-####",prefix:"+965 "},KG:{mask:"#########",prefix:"+996 "},LA:{mask:"########?",prefix:"+856 "},LV:{mask:"####-####",prefix:"+371 "},LB:{mask:"#######?",prefix:"+961 "},LS:{mask:"##-###-###",prefix:"+266 "},LY:{mask:"########?",prefix:"+218 "},LI:{mask:"###-####",prefix:"+423 "},LT:{mask:"########",prefix:"+370 "},LU:{mask:"###########",prefix:"+352 "},MO:{mask:"####-####",prefix:"+853 "},MK:{mask:"########",prefix:"+389 "},MG:{mask:"##-##-###-##",prefix:"+261 "},MW:{mask:"#########",prefix:"+265 "},MY:{mask:"##########",prefix:"+60 "},MV:{mask:"###-####",prefix:"+960 "},ML:{mask:"####-####",prefix:"+223 "},MT:{mask:"##-##-##-##",prefix:"+356 "},MH:{mask:"###-####",prefix:"+692 "},MQ:{mask:"###-######",prefix:"+596 "},MU:{mask:"###-####",prefix:"+230 "},MX:{mask:"(###) ###-####",prefix:"+52 "},MD:{mask:"########",prefix:"+373 "},MC:{mask:"####-####",prefix:"+377 "},MN:{mask:"###########",prefix:"+976 "},MS:{mask:"(###) ###-####",prefix:"+1 "},MA:{mask:"##-###-####",prefix:"+212 "},MZ:{mask:"#########",prefix:"+258 "},MM:{mask:"########",prefix:"+95 "},NA:{mask:"##########",prefix:"+264 "},NP:{mask:"##########",prefix:"+977 "},NL:{mask:"#########",prefix:"+31 "},AN:{mask:"########",prefix:"+599 "},NC:{mask:"###-###",prefix:"+687 "},NZ:{mask:"##########",prefix:"+64 "},NI:{mask:"####-####",prefix:"+505 "},NE:{mask:"##-###-###",prefix:"+227 "},NG:{mask:"##########",prefix:"+234 "},MP:{mask:"(###) ###-####",prefix:"+1 "},NO:{mask:"####-####",prefix:"+47 "},OM:{mask:"####-####",prefix:"+968 "},PK:{mask:"##########",prefix:"+92 "},PW:{mask:"###-####",prefix:"+680 "},PA:{mask:"########",prefix:"+507 "},PG:{mask:"########",prefix:"+675 "},PE:{mask:"###########",prefix:"+51 "},PH:{mask:"##########",prefix:"+63 "},PL:{mask:"#########",prefix:"+48 "},PT:{mask:"#-####-####",prefix:"+351 "},PR:{mask:"(###) ###-####",prefix:"+1 "},QA:{mask:"###-####",prefix:"+974 "},RE:{mask:"###-###-###",prefix:"+262 "},RO:{mask:"#########",prefix:"+40 "},RU:{mask:"##########",prefix:"+7 "},RW:{mask:"###-###-###",prefix:"+250 "},SH:{mask:"#-###",prefix:"+290 "},KN:{mask:"(###) ###-####",prefix:"+1 "},LC:{mask:"(###) ###-####",prefix:"+1 "},VC:{mask:"(###) ###-####",prefix:"+1 "},ST:{mask:"##-####",prefix:"+239 "},SA:{mask:"#########",prefix:"+966 "},SN:{mask:"##-###-####",prefix:"+221 "},SC:{mask:"###-###",prefix:"+248 "},SL:{mask:"(##) ###-###",prefix:"+232 "},SG:{mask:"####-####",prefix:"+65 "},SK:{mask:"#########",prefix:"+421 "},SI:{mask:"########",prefix:"+386 "},SB:{mask:"##-###",prefix:"+677 "},ZA:{mask:"(##) ###-####",prefix:"+27 "},ES:{mask:"###-###-###",prefix:"+34 "},LK:{mask:"(##) ###-####",prefix:"+94 "},SD:{mask:"##-###-####",prefix:"+249 "},SR:{mask:"######?",prefix:"+597 "},SZ:{mask:"###-####",prefix:"+268 "},SE:{mask:"###########",prefix:"+46 "},CH:{mask:"(##) ###-####",prefix:"+41 "},SY:{mask:"#########",prefix:"+963 "},TJ:{mask:"#########",prefix:"+992 "},TZ:{mask:"#########",prefix:"+255 "},TH:{mask:"#########",prefix:"+66 "},TG:{mask:"###-####",prefix:"+228 "},TT:{mask:"(###) ###-####",prefix:"+1 "},TN:{mask:"##-###-###",prefix:"+216 "},TR:{mask:"(###) ###-####",prefix:"+90 "},TM:{mask:"########",prefix:"+993 "},TC:{mask:"(###) ###-####",prefix:"+1 "},UG:{mask:"#########",prefix:"+256 "},UA:{mask:"(##) ###-####",prefix:"+380 "},AE:{mask:"#########",prefix:"+971 "},GB:{mask:"#############",prefix:"+44 "},UY:{mask:"########?",prefix:"+598 "},UZ:{mask:"(##) ###-####",prefix:"+998 "},VE:{mask:"(###) ###-####",prefix:"+58 "},VN:{mask:"#######????",prefix:"+84 "},VG:{mask:"(###) ###-####",prefix:"+1 "},VI:{mask:"(###) ###-####",prefix:"+1 "},YE:{mask:"#########",prefix:"+967 "},ZM:{mask:"#########",prefix:"+260 "},ZW:{mask:"#########",prefix:"+263 "},AC:{mask:"####",prefix:"+247 "},ME:{mask:"(##) ###-####",prefix:"+382 "},PS:{mask:"#########",prefix:"+970 "},RS:{mask:"#########",prefix:"+381 "},TW:{mask:"#########",prefix:"+886 "},CW:{mask:"#-###-####",prefix:"+599 "},US:{mask:"(###) ###-####",prefix:""}};function k(t,a="US"){const{mask:r,prefix:e}=g[a]||g.US;return l(t||"",r,{prefix:e})}function w(t){return l(t,"###-##-####")}function M(t){return l((t||"").replace(/[^\da-zA-Z]/g,""))}function D(t,a){let r=t||"";return r=r.replace("spaced"===a?/[^a-zA-Z ]/g:/[^a-zA-Z]/g,""),l(r)}const y={delimited:{prefix:"",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:",",allowDecimal:!1,allowNegative:!0},integer:{prefix:"",suffix:"",decimals:0,decimalSeparator:".",thousandsSeparator:"",allowDecimal:!0,allowNegative:!0},dec:{prefix:"",suffix:"",decimals:2,decimalSeparator:".",thousandsSeparator:",",allowDecimal:!0,allowNegative:!0}};function C(t){let a;t.includes("dec")&&(a=Number(t.replace("dec","")),t="dec");let r=y[t];if(r)return r=Object.assign({},r),a&&(r.decimals=a),r}function Y(t="",a="",r=!1){const e=C(a);return e?u(t,e,r):l((t||"").replace(/[^\d.,-]/g,""))}function A(t="",a="",r=!1){let e=C(a);return e?(e.suffix="%",u(t,e,r)):l((t||"").replace(/[^\d.,-]/g,""),void 0,{suffix:"%"})}const $={AF:"####",AL:"####",DZ:"#####",AC:"ASCN 1ZZ",AD:"AD###",AR:"####","AR+":"@####@@@",AI:"AI-2640",AM:"####",AS:"#####","AS+4":"#####-####",AU:"####",AT:"####",AZ:"AZ ####",BH:"###?",BD:"####",BB:"BB#####",BY:"######",BE:"####",BM:"@@ **",BT:"#####",BA:"######",BR:"#####","BR+3":"#####-###",VG:"VG####",BN:"@@####",BG:"####",KH:"#####",KY:"KY#-####",CA:"@#@ #@#",CL:"###-####",CN:"######",CX:"####",CC:"####",CO:"######",CR:"#####","CR+4":"#####-####",CV:"####",HR:"#####",CU:"#####",CY:"####",CZ:"### ##",DK:"####",DO:"#####",EC:"######",SV:"####",EG:"#####",EE:"#####",ET:"####",FK:"FIQQ 1ZZ",FO:"###",FI:"#####",FR:"#####",GF:"973##",PF:"987##",GI:"GX11 1AA",GE:"####",DE:"#####",GR:"### ##",GL:"####",GP:"971##",GU:"#####","GU+4":"#####-####",GT:"#####",GG:"GY#? #@@",GN:"###",GS:"SIQQ 1ZZ",GW:"####",HT:"####",HN:"@@####","HN-":"#####",HU:"####",IS:"###",IN:"### ###",ID:"#####",IE:"*** ****",IR:"##########",IQ:"#####",IM:"IM#? #@@",IL:"#######",IT:"#####",JM:"##",JP:"###-####",JE:"JE#? #@@",JO:"#####",KZ:"######",KE:"#####",KR:"#####",KN:"KN####",XK:"#####",KW:"#####",KG:"######",LA:"#####",LV:"LV-####",LB:"####? ????",LS:"###",LR:"####",LI:"####",LT:"#####",LU:"####",MK:"####",MG:"###",MY:"#####",MV:"#####",MT:"@@@ ####",MH:"#####","MH+4":"#####-####",MU:"#####",MQ:"972##",MW:"######",YT:"976##",MX:"#####",FM:"#####","FM+4":"#####-####",MD:"####",MC:"980##",MN:"#####",ME:"#####",MA:"#####",MZ:"####",MM:"#####",NA:"#####",NP:"#####",NC:"988##",NZ:"####",NI:"#####",NE:"####",NG:"######",NF:"####",MP:"#####",NO:"####",OM:"###",PK:"#####",PW:"#####","PW+4":"#####-####",PS:"###",PA:"####",PG:"###",PY:"####",PE:"#####","PE+":"####",PH:"####",PL:"##-###",PT:"####","PT+3":"####-###",PR:"#####","PR+4":"#####-####",RE:"974##",PM:"975##",PN:"PCRN 1ZZ",RO:"######",RU:"######",LC:"LC## ###",VC:"####",WS:"####",SM:"4879#",SA:"#####","SA+4":"#####-####",SN:"#####",RS:"#####",SG:"######",SH:"@@@@ 1ZZ",SK:"### ##",SI:"####",SO:"@@ #####",ZA:"####",ES:"#####",LK:"#####",SD:"#####",SZ:"@###",SE:"### ##",CH:"####",SJ:"####",TW:"###","TW+2":"###-##?",TJ:"######",TZ:"#####",TH:"#####",TT:"######",TN:"####",TR:"#####",TM:"######",UA:"#####",UY:"#####",VI:"#####","VI+4":"#####-####",UZ:"######",VE:"####","VE-":"####-@",VN:"#####?",YU:"#####",WF:"986##",ZM:"#####",US:"#####","US+4":"#####-####"};function L(t,a="US"){const r=$[a];return r?l(t,r):M(t)}const N={"MM/DD/YYYY":"##/##/####","M/D/YYYY":"#?/#?/####","MM/DD/YY":"##/##/##","M/D/YY":"#?/#?/##","MM/YY":"##/##","M/YY":"#?/##","DD/MM/YYYY":"##/##/####","D/M/YYYY":"#?/#?/####","DD/MM/YY":"##/##/##","D/M/YY":"#?/#?/##","MM-DD-YYYY":"##-##-####","M-D-YYYY":"#?-#?-####","MM-DD-YY":"##-##-##","M-D-YY":"#?-#?-##","MM-YY":"##-##","M-YY":"#?-##","DD-MM-YYYY":"##-##-####","D-M-YYYY":"#?-#?-####","DD-MM-YY":"##-##-##","D-M-YY":"#?-#?-##"};function I(t,a="MM/DD/YYYY"){const r=l(t,N[a]||N["MM/DD/YYYY"]);return Object.assign(Object.assign({},r),{value:r.formattedValue})}const R=function(t){const a=l(t,"#### #### #### ####");return Object.assign(Object.assign({},a),{type:"unknown",leftIcon:"card-unknown",leftIconMuted:t.length<16})},G=function(t){const a=l(t,"#### ###### #####");return Object.assign(Object.assign({},a),{type:"amex",leftIcon:"card-amex-color",leftIconMuted:t.length<15})},F=function(t){const a=l(t,"#### #### #### ####");return Object.assign(Object.assign({},a),{type:"discover",leftIcon:"card-discover-color",leftIconMuted:t.length<16})},P=function(t){const a=l(t,"#### #### #### ####");return Object.assign(Object.assign({},a),{type:"masterCard",leftIcon:"card-mastercard-color",leftIconMuted:t.length<16})},T=function(t){const a=l(t,"#### #### #### ####");return Object.assign(Object.assign({},a),{type:"visa",leftIcon:"card-visa-color",leftIconMuted:t.length<16})},B=function(t){const a=l(t,"#### ###### ####");return Object.assign(Object.assign({},a),{type:"dinersClub",leftIcon:"card-dinersclub-color",leftIconMuted:t.length<14})},K={discover:F,amex:G,masterCard:P,visa:T,dinersClub:B,unknown:R},O={detectCreditCardTypeFromValue:function(t){const a=parseInt(t.charAt(0)),r=parseInt(t.charAt(1));switch(a){case 2:if(r>1&&r<8){if(!(t.length>=4))return"masterCard";{const a=parseInt(t.substr(0,4));if(a>=2221&&a<2721)return"masterCard"}}break;case 3:if(4==r||7==r)return"amex";if(0==r){if(!(t.length>2))return"dinersClub";{const a=parseInt(t.charAt(2));if(a<6||9==a)return"dinersClub"}}if(6==r||8==r||9==r)return"dinersClub";break;case 4:return"visa";case 5:if(r>0&&r<6)return"masterCard";break;case 6:if(0==r){if(!(t.length>3))return"discover";if("6011"==t.substr(0,4))return"discover"}if(4==r){if(!(t.length>2))return"discover";if(parseInt(t.substr(0,3))>643)return"discover"}if(5==r)return"discover";if(2==r){if(!(t.length>5))return"discover";{const a=parseInt(t.substr(0,6));if(a>=622126&&a<=622925)return"discover"}}break;default:return"unknown"}return"unknown"},format:function(t){const a=O.detectCreditCardTypeFromValue(t),r=K[a](t);return t.length<2&&"unknown"==a&&(r.leftIcon="card"),r},amexFormatter:G,dinersClubInternationalFormatter:B,discoverFormatter:F,masterCardFormatter:P,visaFormatter:T,unknownFormatter:R},E=class{constructor(r){t(this,r),this.input=a(this,"input",7),this.change=a(this,"change",7),this.type="text",this.disabled=!1,this.showVisibilityToggle=!1,this.scheduledAfterRender=[],this.guid=i(),this.onToggleVisibility=()=>{this.textHidden=!this.textHidden},this.onInputFocus=()=>{this.scheduledAfterRender.push((()=>{this.setCursorPosition(this.calculateCursorPositionOnFocus())})),this.hasFocus=!0,s(this),this.valueOnFocus=this.value},this.onInputBlur=()=>{this.hasFocus=!1,s(this),this.valueOnFocus!==this.formattedValueObject.value&&(this.valueOnFocus=this.formattedValueObject.value,this.change.emit(Object.assign({value:this.formattedValueObject.value,formattedValue:this.formattedValueObject.fullyFormattedValue,minFormattedLength:this.formattedValueObject.minFormattedLength},this.formattedValueObject.type&&{type:this.formattedValueObject.type})))},this.onInputInput=t=>{t.stopPropagation();const a=this.getFormattedValue(t.target.value,!1);this.handleDataInput(a)},this.onInputPaste=t=>{if("currency"===this.type){const a=t.clipboardData.getData("text"),r=this.getFormattedValue(a,!0);t.preventDefault(),this.handleDataInput(r)}},this.onInputKeydown=t=>{"Enter"===t.key&&this.valueOnFocus!==this.formattedValueObject.value&&(this.valueOnFocus=this.formattedValueObject.value,this.change.emit(Object.assign({value:this.formattedValueObject.value,formattedValue:this.formattedValueObject.fullyFormattedValue,minFormattedLength:this.formattedValueObject.minFormattedLength},this.formattedValueObject.type&&{type:this.formattedValueObject.type})))},this.onClearInput=()=>{const t={value:"",formattedValue:"",minFormattedLength:this.formattedValueObject.minFormattedLength};this.input.emit(t),this.change.emit(t),this.inputField.focus()}}componentWillLoad(){isNaN(this.maxlength)&&(this.maxlength=void 0),this.formattedValueObject=this.getFormattedValue(this.stringValue,!0),o(this),void 0===this.textHidden&&(this.textHidden="password"===this.type)}componentDidLoad(){this.pseudo||(this.inputField.value=this.formattedValueObject.formattedValue),p(this.hostElement)}componentDidRender(){this.scheduledAfterRender.forEach((t=>t())),this.scheduledAfterRender=[]}getFormattedValue(t,a){const r={currency:b,phone:k,ssn:w,alphanumeric:M,alpha:D,numeric:Y,percentage:A,postal:L,date:I,"credit-card":O.format};return r[this.type]?r[this.type](t,this.formatModifier,a):{value:t,formattedValue:t,fullyFormattedValue:t,formattingCharacterCount:0,unformattedValue:t}}get canClear(){return this.clearable&&!!this.value}get hasError(){return Array.isArray(this.errors)&&this.errors.length>0}get messages(){return this.errors&&this.errors.length>0&&this.errors||this.hints&&this.hints.length>0&&this.hints||[]}get inputField(){return this.hostElement.shadowRoot.querySelector(".input-field")}get showMessages(){return this.messages.length>0&&!this.hideMessages}get inputId(){return`input-guid-${this.guid}`}get inputDescribedBy(){return this.showMessages?`${this.inputId}-description`:void 0}get isMaskedType(){return["currency","phone","ssn","alphanumeric","alpha","numeric","percentage","postal","date","credit-card"].includes(this.type)}get wrapperClasses(){return`field-container${this.hasError?" has-error":""}${this.value?" has-value":""}${this.clearable&&this.value?" has-clear":""}${this.hasFocus?" has-focus":""}${this.formattedValueObject.prefix?" has-prefix":""}${this.computedIconLeft?" has-icon-left":""}${this.showIconSeperator?" has-icon-separator":""}${this.formattedValueObject.suffix?" has-suffix":""}${!this.formattedValueObject.suffix&&this.iconRight?" has-icon-right":""}${"currency"===this.type?" right-aligned":" left-aligned"}`}get computedType(){return["password","text"].includes(this.type)&&this.textHidden?"password":this.type&&{text:"text",tel:"tel",number:"number",password:"text",search:"search",url:"url",email:"email",currency:"tel",phone:"tel",ssn:"tel",alphanumeric:"text",alpha:"text",numeric:"tel",percentage:"tel",postal:"tel",date:"tel","credit-card":"tel"}[this.type]||"text"}get computedIconLeft(){if(!this.formattedValueObject.prefix)return"search"===this.type?"search":this.formattedValueObject.leftIcon?this.formattedValueObject.leftIcon:this.iconLeft}get showIconSeperator(){return"credit-card"===this.type||!!this.formattedValueObject.prefix}get computedClassForIconLeft(){let t="icon-left";return this.formattedValueObject.leftIconMuted&&(t+=" icon-left-muted"),t}get stringValue(){return this.value&&String(this.value)||""}get canSetSelection(){return!["email","number"].includes(this.computedType)}get visibilityToggleText(){return n("tecton.element.input.toggle."+(this.textHidden?"show":"hide"))}formatAndUpdateValueFromProp(){this.formattedValueObject=this.getFormattedValue(this.stringValue,!0),this.pseudo||(this.inputField.value=this.formattedValueObject.formattedValue)}ariaLabelObserver(){o(this)}valueObserver(){this.formatAndUpdateValueFromProp()}typeObserver(){this.formatAndUpdateValueFromProp()}formatModifierObserver(){this.formatAndUpdateValueFromProp()}hintsObserver(){this.hasFocus&&this.scheduledAfterRender.push((()=>s(this)))}errorsObserver(){this.hasFocus&&this.scheduledAfterRender.push((()=>s(this)))}onHostElementFocus(t){f(t,this.hostElement)&&this.inputField.focus()}onHostElementChange(t){t.target!==this.hostElement||this.hostElement.onchange||(this.value=t.detail.value)}handleDataInput(t){void 0===this.maxlength||t.unformattedValue.length<=this.maxlength||t.unformattedValue.length<=this.formattedValueObject.unformattedValue.length?this.formattedValueObject=t:this.maxlength&&(t=this.getFormattedValue(t.unformattedValue.substring(0,this.maxlength),!1),this.formattedValueObject=t);const a=this.calculateCursorPositionOnInput();this.inputField.value=this.formattedValueObject.formattedValue,this.input.emit(Object.assign({value:this.formattedValueObject.value,formattedValue:this.formattedValueObject.fullyFormattedValue,minFormattedLength:this.formattedValueObject.minFormattedLength},this.formattedValueObject.type&&{type:this.formattedValueObject.type})),this.setCursorPosition(a)}render(){return r("div",{class:this.wrapperClasses},d(this),this.inputDOM(),c(this))}inputDOM(){return r("div",{class:"input-container"},r("div",{class:"input-icons-container-left"},this.formattedValueObject.prefix&&r("span",{class:"input-prefix"},this.formattedValueObject.prefix),this.computedIconLeft&&r("q2-icon",{type:this.computedIconLeft,class:this.computedClassForIconLeft}),this.showIconSeperator&&r("div",{class:"vertical-separator"}),this.hasError&&"currency"===this.type&&r("q2-icon",{type:"error",class:"icon-error"})),this.pseudo?this.pseudoInputDOM():r("input",{class:"input-field",id:this.inputId,type:this.computedType,size:this.formattedValueObject.prefix?10:void 0,max:this.max,min:this.min,"aria-current":this.current||void 0,"aria-describedby":this.inputDescribedBy,"aria-required":`${!this.optional}`,"aria-invalid":`${this.hasError}`,"aria-controls":this.ariaControls&&`${this.ariaControls}`||void 0,"aria-owns":this.ariaOwns&&`${this.ariaOwns}`||void 0,"aria-haspopup":this.ariaHaspopup&&`${this.ariaHaspopup}`||void 0,"aria-expanded":!!this.ariaExpanded&&`${!!this.ariaExpanded}`||void 0,"aria-activedescendant":this.ariaActivedescendant&&`${this.ariaActivedescendant}`,"aria-label":this.hideLabel&&this.label?n(this.label):void 0,autocomplete:this.autocomplete?this.autocomplete:"off",autocapitalize:"on"===this.autocapitalize?"on":"off",autocorrect:"on"===this.autocorrect?"on":"off",placeholder:this.placeholder&&n(this.placeholder)||void 0,role:this.role&&`${this.role}`||void 0,"test-id":"inputField",readonly:!!this.readonly,disabled:!!this.disabled,onFocus:this.onInputFocus,onBlur:this.onInputBlur,onKeyDown:this.onInputKeydown,onInput:this.onInputInput,onPaste:this.onInputPaste}),r("div",{class:"input-icons-container-right"},this.canClear&&r("q2-btn",{class:"btn-clear",ariaLabel:n("tecton.element.input.clear",[this.label]),"test-id":"clearButton",onClick:this.onClearInput},r("q2-icon",{type:"close",class:"icon-clear"})),["password","text"].includes(this.type)&&this.showVisibilityToggle&&r("q2-btn",{class:"btn-visibility-toggle","test-id":"toggleVisibilityButton",onClick:this.onToggleVisibility},this.visibilityToggleText),this.formattedValueObject.suffix&&r("span",{class:"input-suffix"},this.formattedValueObject.suffix),this.iconRight&&!this.formattedValueObject.suffix&&r("q2-icon",{type:this.iconRight,class:"icon-right"}),this.hasError&&"currency"!==this.type&&r("q2-icon",{type:"error",class:"icon-error"})))}pseudoInputDOM(){const t=!this.value&&!!this.placeholder;let a="";return this.optional&&(a=n("tecton.element.input.optional")),this.readonly&&(a=n("tecton.element.input.readonly")),r("button",{class:"pseudo-input input-field",type:"button",id:this.inputId,"aria-describedby":this.inputDescribedBy,"aria-required":`${!this.optional}`,"aria-invalid":`${this.hasError}`,"aria-controls":this.ariaControls&&`${this.ariaControls}`||void 0,"aria-owns":this.ariaOwns&&`${this.ariaOwns}`||void 0,"aria-haspopup":this.ariaHaspopup&&`${this.ariaHaspopup}`||void 0,"aria-expanded":!!this.ariaExpanded&&`${!!this.ariaExpanded}`||void 0,"aria-activedescendant":this.ariaActivedescendant&&`${this.ariaActivedescendant}`,"aria-label":`${this.value}, ${this.label&&n(this.label)||""}${a}`,role:this.role&&`${this.role}`||void 0,disabled:!!this.disabled,"test-id":"q2InputInnerClearButton"},r("span",{class:t?"placeholder-text":""},t?this.placeholder:this.value))}calculateCursorPositionOnInput(){const t=this.inputField,a=this.formattedValueObject.formattedValue.length;return{startingPosition:t&&t.selectionStart||a,valueLength:a,previousValueLength:t&&t.value.length,hasSelection:!1}}calculateCursorPositionOnFocus(){const t=this.inputField,a=t&&t.value?t.value.length:0;return{startingPosition:t&&t.selectionStart||a,valueLength:a,previousValueLength:a,hasSelection:getSelection().toString().length>0}}setCursorPosition(t){if(this.canSetSelection&&!t.hasSelection){const a=this.inputField,{valueLength:r,previousValueLength:e,startingPosition:i}=t;if(i===r&&r>=e&&"currency"===this.type)a.setSelectionRange(r,r);else{const t=r-e,s=i+(t>0?t:0);a.setSelectionRange(s,s)}}}get hostElement(){return e(this)}static get watchers(){return{ariaLabel:["ariaLabelObserver"],value:["valueObserver"],type:["typeObserver"],formatModifier:["formatModifierObserver"],hints:["hintsObserver"],errors:["errorsObserver"]}}};E.style='*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block;margin-top:var(--tct-input-margin-top, var(--t-input-margin-top, var(--app-scale-6x, 30px)));margin-bottom:var(--tct-input-margin-bottom, var(--t-input-margin-bottom, var(--app-scale-6x, 30px)));font-size:var(--tct-input-font-size, var(--t-input-font-size, var(--app-font-size, inherit)))}:host([hidden]){display:none}.field-container,.input-container{position:relative}.field-container{--comp-input-tween:var(--tct-input-tween, var(--t-input-tween, var(--tct-tween-2, var(--app-tween-2, 0.4s ease))))}label{display:block;padding-left:var(--tct-input-label-padding-left, var(--t-input-label-padding-left, 0));padding-right:var(--tct-input-label-padding-right, var(--t-input-label-padding-right, 0));margin-top:var(--tct-input-label-margin-top, var(--t-input-label-margin-top, 0));margin-bottom:var(--tct-input-label-margin-bottom, var(--t-input-label-margin-bottom, var(--tct-scale-1, var(--app-scale-1, 5px))));color:var(--tct-input-label-font-color, var(--t-input-label-font-color, inherit));font-size:var(--tct-input-label-font-size, var(--t-input-label-font-size, inherit));font-weight:var(--tct-input-label-font-weight, var(--t-input-label-font-weight, 600));text-transform:var(--tct-input-label-text-transform, var(--t-input-label-text-transform, none));letter-spacing:var(--tct-input-label-letter-spacing, var(--t-input-label-letter-spacing, normal));transition:color var(--comp-input-tween)}.optional-tag{margin-left:var(--tct-input-label-optional-margin-left, var(--t-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1, 5px))));color:var(--tct-input-label-optional-font-color, var(--t-input-label-optional-font-color, var(--t-textA, var(--t-a11y-gray-color, rgba(77, 77, 77, 0.77)))));font-size:var(--tct-input-label-optional-font-size, var(--t-input-label-optional-font-size, 12px));font-weight:var(--tct-input-label-optional-font-weight, var(--t-input-label-optional-font-weight, 400))}.input-container{background-color:var(--tct-input-bg, var(--t-input-bg, var(--tct-gray-14, var(--t-gray-14, #f2f2f2))));display:flex;align-items:center;--comp-input-horizontal-gap:var(--tct-input-horizontal-gap, var(--t-input-horizontal-gap, 8px));--comp-input-border-top-left-radius:var(--tct-input-border-top-left-radius, var(--t-input-border-top-left-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));--comp-input-border-top-right-radius:var(--tct-input-border-top-right-radius, var(--t-input-border-top-right-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));--comp-input-border-bottom-right-radius:var(--tct-input-border-bottom-right-radius, var(--t-input-border-bottom-right-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));--comp-input-border-bottom-left-radius:var(--tct-input-border-bottom-left-radius, var(--t-input-border-bottom-left-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));--comp-input-border-radius:var(--comp-input-border-top-left-radius)\n var(--comp-input-border-top-right-radius) var(--comp-input-border-bottom-right-radius)\n var(--comp-input-border-bottom-left-radius);--comp-input-border-width:var(--tct-input-border-top-width, 1px)\n var(--tct-input-border-right-width, 1px) var(--tct-input-border-bottom-width, 1px)\n var(--tct-input-border-left-width, 1px);--comp-input-focus-border-width:var(--tct-input-focus-border-top-width, 1px)\n var(--tct-input-focus-border-right-width, 1px)\n var(--tct-input-focus-border-bottom-width, 1px)\n var(--tct-input-focus-border-left-width, 1px);--comp-input-prefix-clearance:calc(\n 3 * var(--tct-input-prefix-font-size, 14px) + var(--tct-scale-1, 5px)\n );--comp-input-icon-clearance:34px;--comp-input-min-height:var(--tct-input-min-height, 44px);border-width:var(--comp-input-border-width);border-style:solid;border-color:var(--tct-input-border-color, var(--t-input-border-color, var(--tct-gray-11, var(--t-gray-11, #cccccc))));border-radius:var(--comp-input-border-radius);box-shadow:var(--tct-input-box-shadow, var(--t-input-box-shadow, none));transition:border-width var(--comp-input-tween), border-color var(--comp-input-tween), box-shadow var(--comp-input-tween)}:host([disabled]) .input-container{cursor:not-allowed;opacity:var(--tct-input-disabled-opacity, var(--t-input-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))))}.input-field{flex:1;border:0;-webkit-appearance:none;appearance:none;box-sizing:border-box;min-height:var(--comp-input-min-height);height:var(--tct-input-height, var(--t-input-height, 44px));width:100%;padding:0 var(--tct-input-horizontal-padding, var(--t-input-horizontal-padding, var(--tct-scale-2, var(--app-scale-2, 10px))));background-color:transparent;color:var(--tct-input-font-color, var(--t-input-font-color, var(--t-text, inherit)));display:inline-block;text-align:var(--tct-input-align, "start");}.input-field:focus{outline:none;box-shadow:none}.input-field::-webkit-outer-spin-button,.input-field::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.input-field[type=number]{-moz-appearance:textfield}.input-field::-ms-clear{display:none}.input-field[type=search]::-webkit-search-decoration,.input-field[type=search]::-webkit-search-cancel-button,.input-field[type=search]::-webkit-search-results-button,.input-field[type=search]::-webkit-search-results-decoration{display:none}.input-field[disabled]{cursor:not-allowed}.right-aligned .input-field{text-align:right}.input-container:focus-within{border-width:var(--comp-input-focus-border-width, 1px);border-color:var(--tct-input-focus-border-color, var(--t-input-focus-border-color, var(--tct-gray-9, var(--t-gray-9, #999999))));box-shadow:var(--tct-global-focus, var(--const-global-focus, 0 0 0 2px #33b4ff)), var(--tct-input-focus-box-shadow, var(--t-input-focus-box-shadow, 0 0 transparent))}.input-field::placeholder,.placeholder-text{color:var(--tct-input-placeholder-font-color, var(--t-input-placeholder-font-color, var(--t-textA, var(--app-gray-d1, rgba(77, 77, 77, 0.77)))))}.pseudo-input{display:inline-flex;align-items:center}.pseudo-input span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.input-icons-container-left,.input-icons-container-right{display:flex;flex-direction:row;align-items:center;gap:var(--comp-input-horizontal-gap)}.input-icons-container-left:empty,.input-icons-container-right:empty{display:none}.input-icons-container-left{padding-left:var(--comp-input-horizontal-gap)}.input-icons-container-right{padding-right:var(--comp-input-horizontal-gap)}.input-icons-container-right .btn-visibility-toggle{color:var(--tct-primary, var(--t-primary, #006eb2));font-size:12px}q2-icon{margin-top:calc(var(--tct-input-border-top-width, var(--t-input-border-top-width, 1px)) / 2);margin-bottom:calc(var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) / 2);pointer-events:none;color:var(--tct-input-icon-stroke-primary, var(--t-input-icon-stroke-primary, var(--t-textA, var(--app-gray, rgba(77, 77, 77, 0.77)))));--tct-icon-stroke-primary:var(--tct-input-icon-stroke-primary, var(--t-input-icon-stroke-primary, var(--t-textA, var(--app-gray, rgba(77, 77, 77, 0.77)))))}.icon-left-muted{opacity:0.5}.input-prefix,.input-suffix{margin-left:calc(var(--comp-input-horizontal-gap) * -1);margin-right:calc(var(--comp-input-horizontal-gap) * -1);width:3em;display:inline-flex;align-items:center;justify-content:center;min-height:calc( var(--comp-input-min-height) - var(--tct-input-focus-border-top-width, var(--t-input-focus-border-top-width, 1px)) - var(--tct-input-focus-border-bottom-width, var(--t-input-focus-border-bottom-width, 1px)) );height:calc( var(--tct-input-height, var(--t-input-height, 44px)) - var(--tct-input-focus-border-top-width, var(--t-input-focus-border-top-width, 1px)) - var(--tct-input-focus-border-bottom-width, var(--t-input-focus-border-bottom-width, 1px)) );font-size:var(--tct-input-prefix-font-size, var(--t-input-prefix-font-size, inherit));color:var(--tct-input-prefix-font-color, var(--t-input-prefix-font-color, inherit));background-color:var(--tct-input-prefix-bg, var(--t-input-prefix-bg, var(--tct-input-bg, var(--t-input-bg, var(--tct-gray-14, var(--t-gray-14, #f2f2f2))))));transition:color var(--comp-input-tween), background-color var(--comp-input-tween)}.input-prefix{border-top-left-radius:calc( var(--comp-input-border-top-left-radius) - var(--tct-input-border-top-width, var(--t-input-border-top-width, 1px)) - var(--tct-input-border-left-width, var(--t-input-border-left-width, 1px)) );border-bottom-left-radius:calc( var(--comp-input-border-bottom-left-radius) - var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) - var(--tct-input-border-left-width, var(--t-input-border-left-width, 1px)) );pointer-events:none;}.input-suffix{border-top-right-radius:calc( var(--comp-input-border-top-right-radius) - var(--tct-input-border-top-width, var(--t-input-border-top-width, 1px)) - var(--tct-input-border-right-width, var(--t-input-border-right-width, 1px)) );border-bottom-right-radius:calc( var(--comp-input-border-bottom-right-radius) - var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) - var(--tct-input-border-right-width, var(--t-input-border-right-width, 1px)) )}.icon-error{color:var(--tct-stoplight-error, var(--const-stoplight-alert, #c30000));--tct-icon-stroke-primary:var(--tct-stoplight-error, var(--const-stoplight-alert, #c30000))}.pw-show{position:absolute;margin-right:var(--tct-scale-2, var(--app-scale-2, 20px))}.btn-clear{margin-top:calc(var(--tct-input-border-top-width, var(--t-input-border-top-width, 1px)) / 2);margin-bottom:calc(var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) / 2);height:22px;--tct-btn-icon-width:17px;--tct-btn-icon-height:22px;--tct-icon-size:17px}.messages-container{height:0px;overflow:hidden;background-color:var(--tct-message-bg, var(--t-message-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, #f2f2f2))))));box-shadow:var(--tct-input-message-box-shadow, var(--t-input-message-box-shadow, var(--tct-box-shadow-1, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3)))));transition:height var(--tct-input-messages-tween, var(--t-input-messages-tween, var(--tct-tween-1, var(--app-tween-1, 0.2s ease))));margin-top:2px;z-index:1;position:absolute;width:100%;color:var(--tct-input-messages-font-color, var(--t-input-messages-font-color, inherit))}.has-error label{color:var(--tct-input-error-label-font-color, var(--t-input-error-label-font-color, var(--tct-input-label-font-color, var(--t-input-label-font-color, inherit))))}.has-error:not(.has-focus) .input-prefix,.has-error:not(.has-focus) .input-suffix{color:var(--tct-input-error-prefix-font-color, var(--t-input-error-prefix-font-color, inherit));background-color:var(--tct-input-error-prefix-bg, var(--t-input-error-prefix-bg, var(--tct-input-bg, var(--t-input-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, #f2f2f2))))))))}.has-error .input-container:not(:focus-within){border-color:var(--tct-input-error-border-color, var(--const-stoplight-alert, #c30000))}.icon-left{width:26px;height:26px}.vertical-separator{height:calc(var(--comp-input-min-height) - 2px);border-right:1px solid var(--tct-input-prefix-border-color, var(--t-input-prefix-border-color, var(--tct-input-border-color, var(--t-input-border-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))))))}';export{E as q2_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,g as o}from"./p-080839ed.js";import{c as r,l as i}from"./p-
|
|
1
|
+
import{r as t,h as e,g as o}from"./p-080839ed.js";import{c as r,l as i}from"./p-f85da2a8.js";const s=class{constructor(e){t(this,e),this.disabled=!1,this.hidden=!1,this.guid=r(),this.setHidden=()=>{this.hidden=this.options.every((t=>t.hidden||t._multiSelectHidden))}}componentWillLoad(){const t=new MutationObserver(this.setHidden);t.observe(this.hostElement,{childList:!0,attributes:!0,subtree:!0}),this.mutationObserver=t,this.setHidden(),this.disabledWatcher(this.disabled)}disconnectedCallback(){this.mutationObserver.disconnect(),this.mutationObserver=null}get headerId(){return`q2-optgroup-header-${this.guid}`}get options(){return Array.from(this.hostElement.querySelectorAll("q2-option"))}disabledWatcher(t){this.options.forEach((e=>{e.disabledGroup=!!t}))}render(){return e("div",{class:"q2-optgroup-container",hidden:this.hidden,"aria-labelledby":this.headerId,role:"group"},e("div",{class:"q2-optgroup-header",id:this.headerId},this.label&&i(this.label)||""),e("div",{class:"q2-optgroup-options"},e("slot",null)))}get hostElement(){return o(this)}static get watchers(){return{disabled:["disabledWatcher"]}}};s.style="*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block}.q2-optgroup-header{background-color:var(--tct-optgroup-header-bg, var(--tct-gray-13, var(--t-gray-13, var(--tct-gray-l2, var(--app-gray-l2, #e6e6e6)))));padding:var(--tct-scale-1, var(--app-scale-1, 5px)) var(--tct-scale-2, var(--app-scale-2, 10px));font-weight:var(--tct-optgroup-header-font-weight, 600);text-transform:var(--tct-optgroup-header-text-transform, uppercase);}";export{s as q2_optgroup}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as a}from"./p-080839ed.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-
|
|
1
|
+
import{p as e,b as a}from"./p-080839ed.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-88bc2f49",[[1,"q2-icon",{type:[513],label:[513]}]]],["p-a72e7a12",[[1,"q2-calendar",{value:[1537],label:[513],hideLabel:[516,"hide-label"],ariaLabel:[513,"aria-label"],optional:[516],disabled:[516],readonly:[516],invalid:[1540],typeable:[516],placeholder:[513],buttonLabel:[513,"button-label"],disabledMsg:[513,"disabled-msg"],calendarLabel:[513,"calendar-label"],disclaimer:[513],displayFormat:[513,"display-format"],startDate:[513,"start-date"],endDate:[513,"end-date"],cutoffTime:[513,"cutoff-time"],daysOfWeekChecksum:[514,"days-of-week-checksum"],popDirection:[513,"pop-direction"],assume:[513],errors:[1040],invalidDates:[16],validDates:[16],onsuccess:[16],dropdownOpen:[32],keyboardSelection:[32],typedValue:[32],dateList:[32],hintMessage:[32],hintMessageType:[32]},[[0,"change","defaultChangeHandler"],[0,"error","defaultErrorHandler"],[0,"success","defaultSuccessHandler"],[0,"focus","delegateFocus"]]]]],["p-f85bf7fb",[[1,"q2-dropdown",{type:[513],icon:[513],label:[513],hideLabel:[516,"hide-label"],ariaLabel:[513,"aria-label"],disabled:[516],popDirection:[513,"pop-direction"],name:[513],context:[513],contextValue:[513,"context-value"],resolvedType:[513,"resolved-type"],dropdownOpen:[32]},[[0,"focus","delegateFocus"]]]]],["p-564154f3",[[1,"q2-select",{label:[513],hideLabel:[516,"hide-label"],value:[1025],ariaLabel:[513,"aria-label"],selectedOptions:[1032,"selected-options"],disabled:[516],readonly:[516],invalid:[516],errors:[16],multiple:[516],minRows:[2,"min-rows"],popDirection:[513,"pop-direction"],searchable:[516],multilineOptions:[516,"multiline-options"],optional:[516],dropdownOpen:[32],onlyShowingSelected:[32],activeOptionId:[32],searchText:[32],hasCustomDisplay:[32],inputFocused:[32],statusMessage:[32]},[[0,"change","onHostElementChange"],[0,"input","onHostElementInput"],[0,"focus","delegateFocus"],[0,"click","clickHandler"],[0,"keydown","keydownHandler"]]]]],["p-c83dba0a",[[1,"q2-editable-field",{value:[1537],editing:[1540],label:[1537],hideLabel:[1540,"hide-label"],ariaLabel:[1537,"aria-label"],type:[513],formatModifier:[513,"format-modifier"],truncated:[513],maxlength:[514],persistentLabel:[516,"persistent-label"],hints:[16],errors:[16]},[[0,"change","onHostElementChange"],[0,"focus","delegateFocus"]]]]],["p-346b65d5",[[1,"q2-pagination",{recordType:[1,"record-type"],perPage:[2,"per-page"],total:[514],page:[1538],pages:[1538],recordsOnly:[1540,"records-only"],pagesOnly:[1540,"pages-only"],isSmall:[32]},[[0,"focus","onHostElementFocus"]]]]],["p-bfd77f9b",[[4,"q2-carousel",{autoPlay:[516,"auto-play"],fullWidthPanes:[516,"full-width-panes"],hidePagination:[516,"hide-pagination"],showNavigationArrows:[516,"show-navigation-arrows"],ariaLabel:[513,"aria-label"],label:[513],index:[1538],universalCarouselOptions:[32],fullWidthDisplayOptions:[32],activePaneIndex:[32],applyFocus:[32],applyPaginationFocus:[32],autoPlayInProgress:[32],compactMode:[32],carouselWrapperWidth:[32]},[[0,"change","onHostElementChange"],[0,"clickCarouselPane","carouselPaneClicked"],[0,"focus","delegateFocus"]]]]],["p-701b381a",[[1,"q2-section",{label:[513],collapsible:[516],noCollapseIcon:[516,"no-collapse-icon"],expanded:[1540],contentHeight:[32],hasYieldedHeader:[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"]]]]],["p-b5b12e46",[[1,"q2-stepper",{currentStep:[1538,"current-step"],stepCount:[1026,"step-count"],lastEnabledStep:[1026,"last-enabled-step"],scrollEnabled:[32],showScrollLeft:[32],showScrollRight:[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"]]]]],["p-dffbcec3",[[1,"q2-tab-container",{value:[1537],type:[513],name:[513],color:[513],noPrint:[516,"no-print"],hasLeft:[32],hasRight:[32],scrollEnabled:[32],showScrollLeft:[32],showScrollRight:[32],tabs:[32]},[[0,"change","defaultChangeHandler"],[9,"resize","onResize"],[0,"focus","onFocus"]]]]],["p-27ec0a16",[[1,"q2-card",{title:[513],description:[513],avatarName:[513,"avatar-name"],avatarInitials:[513,"avatar-initials"],avatarIcon:[513,"avatar-icon"],avatarSrc:[513,"avatar-src"],isSmall:[516,"is-small"],isTouch:[516,"is-touch"],url:[513],target:[513],isAutoTouch:[32],isAutoSmall:[32]},[[0,"focus","onHostElementFocus"]]]]],["p-841ec108",[[1,"q2-checkbox",{checked:[1540],type:[513],label:[513],hideLabel:[516,"hide-label"],ariaLabel:[513,"aria-label"],indeterminate:[516],disabled:[516],readonly:[516],value:[513],name:[513],hasError:[516,"has-error"],groupDisabled:[516,"group-disabled"],alignment:[513]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"]]]]],["p-ca847db7",[[1,"q2-checkbox-group",{label:[513],value:[1040],disabled:[516],readonly:[516],optional:[516],hasError:[516,"has-error"]},[[0,"change","onHostElementChange"]]]]],["p-6702eb4d",[[1,"q2-option",{role:[513],tabindex:[513],display:[513],value:[513],disabled:[516],optionId:[513,"option-id"],disabledGroup:[516,"disabled-group"],selected:[516],hidden:[516],multiline:[516],active:[516],_multiSelectHidden:[516,"_multiselecthidden"]}]]],["p-3cb34e2e",[[1,"q2-radio-group",{label:[513],value:[1025],disabled:[516],name:[513],optional:[516],readonly:[516],tilelayout:[516],tileAlignment:[513,"tile-alignment"],hasError:[516,"has-error"]},[[0,"change","onHostElementChange"],[0,"focus","delegateFocus"],[0,"keydown","keydownHandler"]]]]],["p-9ccbc3d8",[[1,"q2-textarea",{value:[1025],label:[513],hideLabel:[516,"hide-label"],hideMessages:[516,"hide-messages"],optional:[516],placeholder:[513],disabled:[516],readonly:[516],spellcheck:[516],maxlength:[1538],rows:[514],cols:[514],resize:[513],errors:[16],hints:[16],hasFocus:[32],downParams:[32]},[[0,"focus","onHostElementFocus"],[0,"change","onHostElementChange"]]]]],["p-6a83a97c",[[4,"q2-carousel-pane",{index:[2],siblingCount:[2,"sibling-count"],isActivePane:[516,"is-active-pane"],label:[513]}]]],["p-32ad664c",[[0,"q2-loading-element",{shape:[513],width:[513],height:[513],borderRadius:[513,"border-radius"]}]]],["p-2be33492",[[1,"q2-loc",{value:[513],substitutions:[16]}]]],["p-fe61c1aa",[[1,"q2-optgroup",{disabled:[516],label:[513],hidden:[32]}]]],["p-7dec37d6",[[1,"q2-radio",{label:[513],hideLabel:[516,"hide-label"],value:[513],disabled:[516],checked:[516],name:[513],ariaLabel:[513,"aria-label"],groupDisabled:[4,"group-disabled"],groupReadonly:[4,"group-readonly"],groupTileLayout:[4,"group-tile-layout"]},[[0,"click","onHostClick"],[0,"focus","delegateFocus"]]]]],["p-492dfb55",[[1,"q2-stepper-pane",{label:[513],description:[513],isActive:[516,"is-active"]}]]],["p-750bcd33",[[1,"q2-tab-pane",{value:[513],label:[513],name:[513],selected:[516],index:[2],guid:[2]}]]],["p-8ea2c4f7",[[1,"tecton-tab-pane",{value:[513],label:[513],name:[513],selected:[516],index:[2],guid:[2],provided:[516],url:[513],moduleId:[513,"module-id"],minHeight:[513,"min-height"],authPayload:[16],showForm:[4,"show-form"],_showForm:[32]}]]],["p-2372f988",[[1,"q2-dropdown-item",{disabled:[516],removable:[516],separator:[516],label:[513],ariaLabel:[513,"aria-label"],value:[513]},[[0,"focus","onHostElementFocus"]]]]],["p-af202624",[[1,"q2-avatar",{name:[513],initials:[513],src:[513],icon:[1],badSrc:[32]}]]],["p-d199fca8",[[1,"q2-message",{type:[513],appearance:[513],description:[516],presentToggle:[32],present:[64]},[[0,"focus","delegateFocus"]]]]],["p-9024859f",[[0,"click-elsewhere"]]],["p-f73df612",[[1,"q2-btn",{ariaExpanded:[4,"aria-expanded"],ariaHasPopup:[8,"aria-has-popup"],ariaControls:[1,"aria-controls"],ariaSelected:[4,"aria-selected"],label:[513],hideLabel:[516,"hide-label"],ariaLabel:[513,"aria-label"],tabIndex:[2,"tab-index"],intent:[513],disabled:[516],type:[513],loading:[516],badge:[516],active:[516],fab:[516],iconPosition:[32]},[[2,"click","disable"],[0,"focus","delegateFocus"]]],[1,"q2-loading",{type:[513],shape:[513],modifiers:[513],counts:[513],label:[513],ariaLabel:[513,"aria-label"],inline:[516]}]]],["p-fc318ae2",[[1,"q2-input",{value:[1025],label:[513],hideLabel:[516,"hide-label"],type:[513],placeholder:[513],disabled:[516],autocomplete:[513],autocorrect:[513],autocapitalize:[513],hideMessages:[516,"hide-messages"],iconLeft:[513,"icon-left"],iconRight:[513,"icon-right"],readonly:[516],clearable:[516],optional:[516],min:[514],max:[514],formatModifier:[513,"format-modifier"],maxlength:[1538],pseudo:[516],showVisibilityToggle:[516,"show-visibility-toggle"],textHidden:[1540,"text-hidden"],ariaControls:[1,"aria-controls"],role:[1],ariaOwns:[1,"aria-owns"],ariaLabel:[513,"aria-label"],ariaHaspopup:[1,"aria-haspopup"],ariaExpanded:[4,"aria-expanded"],ariaActivedescendant:[8,"aria-activedescendant"],current:[1],errors:[16],hints:[16],formattedValueObject:[32],hasFocus:[32]},[[0,"focus","onHostElementFocus"],[0,"change","onHostElementChange"]]]]]],e)));
|
package/dist/test/helpers.js
CHANGED
|
@@ -69,14 +69,17 @@ export async function setup(pageOptions) {
|
|
|
69
69
|
const page = await newE2EPage(pageOptions);
|
|
70
70
|
await page.evaluate(function () {
|
|
71
71
|
this.TectonElements = this.TectonElements || {};
|
|
72
|
-
this.TectonElements.loc = (key,
|
|
72
|
+
this.TectonElements.loc = (key, subs) => {
|
|
73
73
|
const string = (this.TEST_STRINGS && this.TEST_STRINGS[key]) || key;
|
|
74
|
-
if (Array.isArray(
|
|
74
|
+
if (Array.isArray(subs)) {
|
|
75
75
|
const regex = /({[0-9]})/g;
|
|
76
76
|
return string.replace(regex, match => {
|
|
77
|
-
return
|
|
77
|
+
return subs[parseInt(match[1])];
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
+
else if (typeof subs === 'object') {
|
|
81
|
+
return Object.entries(subs).reduce((accum, [key, value]) => accum.replace(`{${key}}`, value), string);
|
|
82
|
+
}
|
|
80
83
|
return string;
|
|
81
84
|
};
|
|
82
85
|
});
|
|
@@ -105,3 +108,7 @@ export function makeDomRect(customAttributes) {
|
|
|
105
108
|
};
|
|
106
109
|
return Object.assign(Object.assign({}, defaults), customAttributes);
|
|
107
110
|
}
|
|
111
|
+
export const base64Image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=';
|
|
112
|
+
export async function getActiveElementTestId(page) {
|
|
113
|
+
return await page.$eval('body', () => { var _a, _b; return (_b = (_a = document.activeElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement.getAttribute('test-id')) !== null && _b !== void 0 ? _b : null; });
|
|
114
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export declare class Q2Card implements ComponentInterface {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
avatarName: string;
|
|
6
|
+
avatarInitials: string;
|
|
7
|
+
avatarIcon: string;
|
|
8
|
+
avatarSrc: string;
|
|
9
|
+
isSmall: boolean;
|
|
10
|
+
isTouch: boolean;
|
|
11
|
+
url: string;
|
|
12
|
+
target: '_self' | '_blank' | '_parent' | '_top';
|
|
13
|
+
isAutoTouch: boolean;
|
|
14
|
+
isAutoSmall: boolean;
|
|
15
|
+
hostElement: HTMLElement;
|
|
16
|
+
click: EventEmitter;
|
|
17
|
+
clickableElement: HTMLElement;
|
|
18
|
+
containerElement: HTMLElement;
|
|
19
|
+
avatarElement: HTMLElement;
|
|
20
|
+
resizeObserver: ResizeObserver;
|
|
21
|
+
componentDidLoad(): void;
|
|
22
|
+
willDestroyElement(): void;
|
|
23
|
+
handleClick: (event: MouseEvent) => boolean;
|
|
24
|
+
onHostElementFocus(event: any): void;
|
|
25
|
+
determineAutoTouch(): void;
|
|
26
|
+
determineAutoSmall(): void;
|
|
27
|
+
generateAvatar(): any;
|
|
28
|
+
generateContent(): any;
|
|
29
|
+
generateContainerClasses(): string;
|
|
30
|
+
render(): any;
|
|
31
|
+
}
|
|
@@ -7,6 +7,7 @@ export declare class Q2Checkbox implements ComponentInterface {
|
|
|
7
7
|
ariaLabel: string;
|
|
8
8
|
indeterminate: boolean;
|
|
9
9
|
disabled: boolean;
|
|
10
|
+
readonly: boolean;
|
|
10
11
|
value: string;
|
|
11
12
|
name: string;
|
|
12
13
|
hasError: boolean;
|
|
@@ -14,6 +15,7 @@ export declare class Q2Checkbox implements ComponentInterface {
|
|
|
14
15
|
alignment: string;
|
|
15
16
|
hostElement: HTMLElement;
|
|
16
17
|
id: string;
|
|
18
|
+
inputElement: HTMLInputElement;
|
|
17
19
|
componentWillLoad(): void;
|
|
18
20
|
componentDidLoad(): void;
|
|
19
21
|
defaultChangeHandler(event: CustomEvent): void;
|
|
@@ -21,6 +23,8 @@ export declare class Q2Checkbox implements ComponentInterface {
|
|
|
21
23
|
ariaLabelObserver(): void;
|
|
22
24
|
change: EventEmitter;
|
|
23
25
|
onInputChange: (event: Event) => void;
|
|
26
|
+
onControlClick: (event: Event) => void;
|
|
27
|
+
onKeyDown: (event: KeyboardEvent) => void;
|
|
24
28
|
render(): any;
|
|
25
29
|
generateCheckboxSVG(): any;
|
|
26
30
|
generateCheckBoxSVGFill(): any;
|
|
@@ -18,10 +18,12 @@ export declare class Q2EditableField {
|
|
|
18
18
|
q2EditBtnElement: HTMLQ2BtnElement;
|
|
19
19
|
formattedValue: string;
|
|
20
20
|
innerValue: string;
|
|
21
|
+
defaultValue: string;
|
|
21
22
|
get locLabel(): string;
|
|
22
23
|
componentWillLoad(): void;
|
|
23
24
|
componentDidRender(): void;
|
|
24
25
|
componentDidLoad(): void;
|
|
26
|
+
errorsObserver(): void;
|
|
25
27
|
ariaLabelObserver(): void;
|
|
26
28
|
observesEditing(newValue: boolean, oldValue: boolean): void;
|
|
27
29
|
get wrapperClass(): string;
|
|
@@ -16,6 +16,8 @@ export declare class Q2Input {
|
|
|
16
16
|
readonly: boolean;
|
|
17
17
|
clearable: boolean;
|
|
18
18
|
optional: boolean;
|
|
19
|
+
min: number;
|
|
20
|
+
max: number;
|
|
19
21
|
formatModifier: string;
|
|
20
22
|
maxlength: number;
|
|
21
23
|
pseudo: boolean;
|
|
@@ -28,6 +30,7 @@ export declare class Q2Input {
|
|
|
28
30
|
ariaHaspopup: string;
|
|
29
31
|
ariaExpanded: boolean;
|
|
30
32
|
ariaActivedescendant: any;
|
|
33
|
+
current: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';
|
|
31
34
|
errors: string[];
|
|
32
35
|
hints: string[];
|
|
33
36
|
formattedValueObject: IFormatterValueObject;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentInterface } from '../../stencil-public-runtime';
|
|
2
|
+
export declare class Q2Pagination implements ComponentInterface {
|
|
3
|
+
recordType: string;
|
|
4
|
+
perPage: number;
|
|
5
|
+
total: number;
|
|
6
|
+
page: number;
|
|
7
|
+
pages: number;
|
|
8
|
+
recordsOnly: boolean;
|
|
9
|
+
pagesOnly: boolean;
|
|
10
|
+
hostElement: HTMLElement;
|
|
11
|
+
change: any;
|
|
12
|
+
isSmall: boolean;
|
|
13
|
+
inputField: HTMLQ2InputElement;
|
|
14
|
+
containerElement: HTMLElement;
|
|
15
|
+
containerWidth: number;
|
|
16
|
+
resizeObserver: ResizeObserver;
|
|
17
|
+
componentDidLoad(): void;
|
|
18
|
+
disconnectedCallback(): void;
|
|
19
|
+
onHostElementFocus(event: any): void;
|
|
20
|
+
get isFullViewHidden(): boolean;
|
|
21
|
+
get pageWithDefault(): number;
|
|
22
|
+
get perPageWithDefault(): number;
|
|
23
|
+
get totalWithDefault(): number;
|
|
24
|
+
get recordTypeWithDefault(): string;
|
|
25
|
+
get currentRange(): string;
|
|
26
|
+
get totalPages(): number;
|
|
27
|
+
handlePageChange: (page: number) => void;
|
|
28
|
+
checkSize(): void;
|
|
29
|
+
render(): any;
|
|
30
|
+
}
|
|
@@ -8,6 +8,7 @@ export declare class Q2Radio implements ComponentInterface {
|
|
|
8
8
|
name: string;
|
|
9
9
|
ariaLabel: string;
|
|
10
10
|
groupDisabled: boolean;
|
|
11
|
+
groupReadonly: boolean;
|
|
11
12
|
groupTileLayout: boolean;
|
|
12
13
|
hostElement: HTMLElement;
|
|
13
14
|
id: string;
|
|
@@ -18,6 +19,6 @@ export declare class Q2Radio implements ComponentInterface {
|
|
|
18
19
|
ariaLabelObserver(): void;
|
|
19
20
|
onHostClick(event: Event): void;
|
|
20
21
|
delegateFocus(event: FocusEvent): void;
|
|
21
|
-
inputChange: (event: Event) =>
|
|
22
|
+
inputChange: (event: Event) => boolean;
|
|
22
23
|
render(): any;
|
|
23
24
|
}
|
|
@@ -5,6 +5,7 @@ export declare class Q2RadioGroup implements ComponentInterface {
|
|
|
5
5
|
disabled: boolean;
|
|
6
6
|
name: string;
|
|
7
7
|
optional: boolean;
|
|
8
|
+
readonly: boolean;
|
|
8
9
|
tilelayout: boolean;
|
|
9
10
|
tileAlignment: 'left' | 'center' | 'right';
|
|
10
11
|
hasError: boolean;
|
|
@@ -18,10 +19,13 @@ export declare class Q2RadioGroup implements ComponentInterface {
|
|
|
18
19
|
valueUpdated(): void;
|
|
19
20
|
nameUpdated(): void;
|
|
20
21
|
disabledUpdated(): void;
|
|
22
|
+
readonlyUpdated(): void;
|
|
21
23
|
tileLayoutUpdated(): void;
|
|
22
24
|
change: EventEmitter;
|
|
23
25
|
onHostElementChange(event: CustomEvent): void;
|
|
24
26
|
delegateFocus(event: FocusEvent): void;
|
|
27
|
+
keydownHandler(event: KeyboardEvent): void;
|
|
28
|
+
labelDOM(): any;
|
|
25
29
|
render(): any;
|
|
26
30
|
inputDom(): any;
|
|
27
31
|
}
|
|
@@ -7,6 +7,7 @@ export declare class Q2Select implements ComponentInterface {
|
|
|
7
7
|
ariaLabel: string;
|
|
8
8
|
selectedOptions: any;
|
|
9
9
|
disabled: boolean;
|
|
10
|
+
readonly: boolean;
|
|
10
11
|
invalid: boolean;
|
|
11
12
|
errors: string[];
|
|
12
13
|
multiple: boolean;
|
|
@@ -28,6 +29,7 @@ export declare class Q2Select implements ComponentInterface {
|
|
|
28
29
|
multiSelectHeader?: HTMLDivElement;
|
|
29
30
|
privatePopDirection: 'down' | 'up';
|
|
30
31
|
activeIndex: number;
|
|
32
|
+
pivotIndex: number;
|
|
31
33
|
scheduledAfterRender: Array<() => void>;
|
|
32
34
|
keyStore: {
|
|
33
35
|
queue: string[];
|