@fluid-topics/ft-reader-feedback 1.1.43 → 1.1.44
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/build/ft-reader-feedback.light.js +126 -132
- package/build/ft-reader-feedback.min.js +5 -11
- package/package.json +6 -6
|
@@ -1605,8 +1605,6 @@ function Ie(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1605
1605
|
display: none;
|
|
1606
1606
|
flex-direction: column;
|
|
1607
1607
|
position: absolute;
|
|
1608
|
-
left: 0;
|
|
1609
|
-
right: 0;
|
|
1610
1608
|
z-index: ${pd.floatingZIndex};
|
|
1611
1609
|
background: ${pd.colorSurface};
|
|
1612
1610
|
border: 1px solid ${pd.colorOutline};
|
|
@@ -1617,12 +1615,8 @@ function Ie(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1617
1615
|
overflow-y: auto;
|
|
1618
1616
|
}
|
|
1619
1617
|
|
|
1620
|
-
.ft-text-field--
|
|
1621
|
-
|
|
1622
|
-
}
|
|
1623
|
-
|
|
1624
|
-
.ft-text-field--suggestions.ft-text-field--suggestions-on-top {
|
|
1625
|
-
bottom: 100%;
|
|
1618
|
+
.ft-text-field--fixed .ft-text-field--suggestions {
|
|
1619
|
+
position: fixed;
|
|
1626
1620
|
}
|
|
1627
1621
|
|
|
1628
1622
|
.ft-text-field:not(.ft-text-field--hide-suggestions):focus-within .ft-text-field--suggestions {
|
|
@@ -1636,7 +1630,7 @@ function Ie(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1636
1630
|
.ft-text-field--with-password ft-icon:hover {
|
|
1637
1631
|
cursor: pointer;
|
|
1638
1632
|
}
|
|
1639
|
-
`;var yd=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class bd extends(rs(Fr,"textbox")){constructor(){super(...arguments),this._value="",this.dispatchedValue="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.passwordHiddenIcon=ec.EYE_SLASH,this.passwordRevealedIcon=ec.EYE,this.filterSuggestions=!1,this.password=!1,this.focused=!1,this.hidePassword=!0,this.
|
|
1633
|
+
`;var yd=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class bd extends(rs(Fr,"textbox")){constructor(){super(...arguments),this._value="",this.dispatchedValue="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.prefix=null,this.passwordHiddenIcon=ec.EYE_SLASH,this.passwordRevealedIcon=ec.EYE,this.filterSuggestions=!1,this.password=!1,this.focused=!1,this.hidePassword=!0,this.hideSuggestions=!1,this.visibleSuggestions=[]}get value(){return this._value||""}set value(t){this.setInternalValue(t||""),this.dispatchedValue=t||""}setInternalValue(t){const e=this._value;this._value=t||"",this.setFormValue(this._value),this.requestUpdate("value",e)}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":this.error,"ft-text-field--fixed":this.fixedMenuPosition,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":0===this.visibleSuggestions.length||this.hideSuggestions,"ft-text-field--raised-label":this.focused||""!=this.value,"ft-text-field--with-icon":!!this.icon,"ft-text-field--with-password":this.password};return Jt`
|
|
1640
1634
|
<div class="${Ze(t)}">
|
|
1641
1635
|
<div class="ft-text-field--main-panel"
|
|
1642
1636
|
@keydown=${this.handleKeyboardNavigation}
|
|
@@ -1667,7 +1661,7 @@ function Ie(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1667
1661
|
@focus=${this.onFocus}/>
|
|
1668
1662
|
${this.renderIcon()}
|
|
1669
1663
|
</div>
|
|
1670
|
-
<div class="ft-text-field--suggestions
|
|
1664
|
+
<div class="ft-text-field--suggestions"
|
|
1671
1665
|
@suggestion-selected=${this.onSuggestionSelected}>
|
|
1672
1666
|
<slot @slotchange=${()=>this.filterSuggestionsIfNeeded()}></slot>
|
|
1673
1667
|
</div>
|
|
@@ -1688,7 +1682,7 @@ function Ie(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1688
1682
|
.variant=${this.iconVariant}
|
|
1689
1683
|
.value=${this.icon}
|
|
1690
1684
|
@click=${()=>{var t;return null===(t=this.input)||void 0===t?void 0:t.focus()}}></ft-icon>
|
|
1691
|
-
`:te}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){
|
|
1685
|
+
`:te}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0&&(this.suggestionsContainer.style.width=this.mainPanel.getBoundingClientRect().width+"px",Ir(this.mainPanel,this.suggestionsContainer,"bottom").then((({x:t,y:e})=>{this.suggestionsContainer.style.left=`${t}px`,this.suggestionsContainer.style.top=`${e}px`})))}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const o=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(o,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const o=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let i;i="ArrowDown"===t.key?o<this.visibleSuggestions.length-1?o+1:0:o>0?o-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[i])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}}bd.elementDefinitions={"ft-input-label":$c,"ft-ripple":Gl,"ft-typography":Kl,"ft-icon":sc},bd.styles=[pl,gd],yd([Oe()],bd.prototype,"label",void 0),yd([Oe({noAccessor:!0})],bd.prototype,"value",null),yd([Se()],bd.prototype,"dispatchedValue",void 0),yd([Oe()],bd.prototype,"helper",void 0),yd([Oe({type:Boolean})],bd.prototype,"outlined",void 0),yd([Oe({type:Boolean})],bd.prototype,"disabled",void 0),yd([Oe({type:Boolean})],bd.prototype,"error",void 0),yd([Oe({type:Boolean})],bd.prototype,"fixedMenuPosition",void 0),yd([Oe()],bd.prototype,"prefix",void 0),yd([Oe()],bd.prototype,"icon",void 0),yd([Oe()],bd.prototype,"passwordHiddenIcon",void 0),yd([Oe()],bd.prototype,"passwordRevealedIcon",void 0),yd([Oe()],bd.prototype,"iconVariant",void 0),yd([Oe({type:Boolean})],bd.prototype,"filterSuggestions",void 0),yd([Oe({type:Number})],bd.prototype,"maxLength",void 0),yd([Oe({type:Boolean})],bd.prototype,"password",void 0),yd([Se()],bd.prototype,"focused",void 0),yd([Se()],bd.prototype,"hidePassword",void 0),yd([Se()],bd.prototype,"hideSuggestions",void 0),yd([Se()],bd.prototype,"visibleSuggestions",void 0),yd([$e(".ft-text-field--main-panel")],bd.prototype,"mainPanel",void 0),yd([$e(".ft-text-field--input")],bd.prototype,"input",void 0),yd([$e(".ft-text-field--suggestions")],bd.prototype,"suggestionsContainer",void 0),yd([Ie({selector:"ft-text-field-suggestion"})],bd.prototype,"suggestions",void 0);const md=ft`
|
|
1692
1686
|
.ft-text-field-suggestion {
|
|
1693
1687
|
position: relative;
|
|
1694
1688
|
padding: 8px 16px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-feedback",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.44",
|
|
4
4
|
"description": "Feedback forms for a map and its topics in an integrated reader",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-app-context": "1.1.
|
|
23
|
-
"@fluid-topics/ft-reader-context": "1.1.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-app-context": "1.1.44",
|
|
23
|
+
"@fluid-topics/ft-reader-context": "1.1.44",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "1.1.44",
|
|
25
25
|
"lit": "3.1.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@fluid-topics/public-api": "1.0.
|
|
28
|
+
"@fluid-topics/public-api": "1.0.61"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "338d6b90cd29912af999509fb4d399e13a93e54d"
|
|
31
31
|
}
|