@fluid-topics/ft-reader-content 2.0.23 → 2.0.24
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.
|
@@ -82,7 +82,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
|
|
|
82
82
|
<li>${this.helperText}</li>
|
|
83
83
|
`)}
|
|
84
84
|
</ul>
|
|
85
|
-
`}resolveStatus(){return this.forceStatus?this.forceStatus:this.errorMessages.length?Tt.error:this.warningMessages.length?Tt.warning:Tt.default}processRules(n){return n.map(a=>a(this.value)).filter(a=>a!==!0).map(a=>a)}}return re([A()],e.prototype,"warningRules",void 0),re([A()],e.prototype,"errorRules",void 0),re([A()],e.prototype,"validateOn",void 0),re([A({type:Boolean})],e.prototype,"validateAtRender",void 0),re([A()],e.prototype,"label",void 0),re([A({type:Boolean})],e.prototype,"hideLabel",void 0),re([A()],e.prototype,"name",void 0),re([A({type:Boolean})],e.prototype,"disabled",void 0),re([A()],e.prototype,"helperText",void 0),re([A()],e.prototype,"forceStatus",void 0),re([A({reflect:!0})],e.prototype,"value",void 0),re([J()],e.prototype,"errorMessages",void 0),re([J()],e.prototype,"warningMessages",void 0),re([J()],e.prototype,"status",void 0),re([J()],e.prototype,"focused",void 0),re([J()],e.prototype,"additionalWarningRules",void 0),re([J()],e.prototype,"additionalErrorRules",void 0),e});var Jr=(r,e)=>{let t=r._$AN;if(t===void 0)return!1;for(let n of t)n._$AO?.(e,!1),Jr(n,e);return!0},ko=r=>{let e,t;do{if((e=r._$AM)===void 0)break;t=e._$AN,t.delete(r),r=e}while(t?.size===0)},El=r=>{for(let e;e=r._$AM;r=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(r))break;t.add(r),op(e)}};function tp(r){this._$AN!==void 0?(ko(this),this._$AM=r,El(this)):this._$AM=r}function rp(r,e=!1,t=0){let n=this._$AH,a=this._$AN;if(a!==void 0&&a.size!==0)if(e)if(Array.isArray(n))for(let i=t;i<n.length;i++)Jr(n[i],!1),ko(n[i]);else n!=null&&(Jr(n,!1),ko(n));else Jr(this,r)}var op=r=>{r.type==Ie.CHILD&&(r._$AP??=rp,r._$AQ??=tp)},sr=class extends ye{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),El(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(Jr(this,e),ko(this))}setValue(e){if(ns(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var gi=class extends sr{get element(){var e;return(e=this.part)===null||e===void 0?void 0:e.element}constructor(e){super(e),this.onFirstTrapFocus=async t=>{if(!this.element||!t.relatedTarget)return;let n=t.relatedTarget;this.isInsideElement(n,this.element)?await this.focusLastDescendant(this.element):await this.focusFirstDescendant(this.element)},this.onLastTrapFocus=async t=>{if(!this.element||!t.relatedTarget)return;let n=t.relatedTarget;this.isInsideElement(n,this.element)?await this.focusFirstDescendant(this.element):await this.focusLastDescendant(this.element)}}render(){return X}update(e){return this.part=e,this.
|
|
85
|
+
`}resolveStatus(){return this.forceStatus?this.forceStatus:this.errorMessages.length?Tt.error:this.warningMessages.length?Tt.warning:Tt.default}processRules(n){return n.map(a=>a(this.value)).filter(a=>a!==!0).map(a=>a)}}return re([A()],e.prototype,"warningRules",void 0),re([A()],e.prototype,"errorRules",void 0),re([A()],e.prototype,"validateOn",void 0),re([A({type:Boolean})],e.prototype,"validateAtRender",void 0),re([A()],e.prototype,"label",void 0),re([A({type:Boolean})],e.prototype,"hideLabel",void 0),re([A()],e.prototype,"name",void 0),re([A({type:Boolean})],e.prototype,"disabled",void 0),re([A()],e.prototype,"helperText",void 0),re([A()],e.prototype,"forceStatus",void 0),re([A({reflect:!0})],e.prototype,"value",void 0),re([J()],e.prototype,"errorMessages",void 0),re([J()],e.prototype,"warningMessages",void 0),re([J()],e.prototype,"status",void 0),re([J()],e.prototype,"focused",void 0),re([J()],e.prototype,"additionalWarningRules",void 0),re([J()],e.prototype,"additionalErrorRules",void 0),e});var Jr=(r,e)=>{let t=r._$AN;if(t===void 0)return!1;for(let n of t)n._$AO?.(e,!1),Jr(n,e);return!0},ko=r=>{let e,t;do{if((e=r._$AM)===void 0)break;t=e._$AN,t.delete(r),r=e}while(t?.size===0)},El=r=>{for(let e;e=r._$AM;r=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(r))break;t.add(r),op(e)}};function tp(r){this._$AN!==void 0?(ko(this),this._$AM=r,El(this)):this._$AM=r}function rp(r,e=!1,t=0){let n=this._$AH,a=this._$AN;if(a!==void 0&&a.size!==0)if(e)if(Array.isArray(n))for(let i=t;i<n.length;i++)Jr(n[i],!1),ko(n[i]);else n!=null&&(Jr(n,!1),ko(n));else Jr(this,r)}var op=r=>{r.type==Ie.CHILD&&(r._$AP??=rp,r._$AQ??=tp)},sr=class extends ye{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),El(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(Jr(this,e),ko(this))}setValue(e){if(ns(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var gi=class extends sr{get element(){var e;return(e=this.part)===null||e===void 0?void 0:e.element}constructor(e){super(e),this.onFirstTrapFocus=async t=>{if(!this.element||!t.relatedTarget)return;let n=t.relatedTarget;this.isInsideElement(n,this.element)?await this.focusLastDescendant(this.element):await this.focusFirstDescendant(this.element)},this.onLastTrapFocus=async t=>{if(!this.element||!t.relatedTarget)return;let n=t.relatedTarget;this.isInsideElement(n,this.element)?await this.focusFirstDescendant(this.element):await this.focusLastDescendant(this.element)}}render(){return X}update(e){return this.part=e,this.ensureFocusTrap(e.element),X}reconnected(){var e;this.ensureFocusTrap((e=this.part)===null||e===void 0?void 0:e.element)}disconnected(){this.removeFocusTrap()}ensureFocusTrap(e){var t,n;this.isElementTrappable(e)&&(((t=this.firstTrap)===null||t===void 0?void 0:t.parentElement)===e&&((n=this.lastTrap)===null||n===void 0?void 0:n.parentElement)===e||(this.removeFocusTrap(),this.createFocusTrap(e)))}removeFocusTrap(){var e,t,n,a;(e=this.firstTrap)===null||e===void 0||e.removeEventListener("focus",this.onFirstTrapFocus),(t=this.lastTrap)===null||t===void 0||t.removeEventListener("focus",this.onLastTrapFocus),(n=this.firstTrap)===null||n===void 0||n.remove(),(a=this.lastTrap)===null||a===void 0||a.remove(),this.firstTrap=void 0,this.lastTrap=void 0}isElementTrappable(e){return!!e&&e instanceof HTMLElement&&e.childElementCount>0}createFocusTrap(e){this.firstTrap=this.createTrap(),this.lastTrap=this.createTrap(),e.insertBefore(this.firstTrap,e.firstChild),e.appendChild(this.lastTrap),this.lastTrap.addEventListener("focus",this.onLastTrapFocus),this.firstTrap.addEventListener("focus",this.onFirstTrapFocus)}createTrap(){let e=document.createElement("div");return e.tabIndex=0,e}getChildren(e){return e instanceof HTMLSlotElement?e.assignedElements():e.shadowRoot?e.shadowRoot.children:e.children}async focusFirstDescendant(e){await this.updateCompleteIfNecessary(e);let t=this.getChildren(e);for(let n=0;n<t.length;n++){let a=t[n];if(a instanceof HTMLElement&&(this.attemptFocus(a)||await this.focusFirstDescendant(a)))return!0}return!1}async focusLastDescendant(e){await this.updateCompleteIfNecessary(e);let t=this.getChildren(e);for(let n=t.length-1;n>=0;n--){let a=t[n];if(a instanceof HTMLElement&&(this.attemptFocus(a)||await this.focusLastDescendant(a)))return!0}return!1}async updateCompleteIfNecessary(e){e instanceof ge&&await e.updateComplete}isInsideElement(e,t){for(let n=e;n;n=n.parentNode){if(n===t)return!0;n instanceof ShadowRoot?n=n.host:n.assignedSlot&&(n=n.assignedSlot)}return!1}attemptFocus(e){return e===this.firstTrap||e===this.lastTrap||!this.isFocusable(e)?!1:(e.focus(),!0)}isFocusable(e){return!e.checkVisibility()||this.isElementDisabled(e)?!1:e instanceof HTMLAnchorElement?!!e.href&&e.rel!=="ignore":e instanceof HTMLInputElement?e.type!=="hidden":e.tabIndex>=0}isElementDisabled(e){return"disabled"in e&&!!e.disabled}},Xx=fe(gi);var Ol;(function(r){r.sm="sm",r.md="md",r.lg="lg",r.xl="xl"})(Ol||(Ol={}));var np={sm:640,md:768,lg:1024,xl:1280},yi=class extends sr{constructor(e){super(e),this.size=0,this.onResize=()=>{let t=window.innerWidth;this.size!==t&&(this.size=t,this.lastArgs&&this.setValue(this.render(...this.lastArgs)))},this.size=window.innerWidth,window.addEventListener("resize",this.onResize)}disconnected(){window.removeEventListener("resize",this.onResize)}reconnected(){window.addEventListener("resize",this.onResize)}update(e,[t,n,a]){return this.lastArgs=[t,n,a],this.render(t,n,a)}render(e,t,n){let a=this.resolveThreshold(e),i=n??(()=>H);return this.size>a?t():i()}resolveThreshold(e){return typeof e=="number"?e:np[e]}},r0=fe(yi);var bi,vi,xi,Si,ap=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((xi=(vi=(bi=window.safari)===null||bi===void 0?void 0:bi.pushNotification)===null||vi===void 0?void 0:vi.toString())!==null&&xi!==void 0?xi:"")==="[object SafariRemoteNotification]",ip="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(Si=window.ftGlobals)!==null&&Si!==void 0?Si:{lit:vn,litDecorators:xn,litRepeat:Sn,litClassMap:Cn,litStyleMap:En,litUnsafeHTML:wn,wcUtils:{...kn,...An,...Un,...li,...Bn,...$n,...aa,...Pn,...va,...pi,...xl,...ni,...xa,...na,...Aa,...ci,...Oa,...hi,...Xs,...In,...Ia,...ia,..._a,...Sl,...ec,...La,...ti,...ui,...Sa,...Ea,...ii,...Fn,isSafari:ap,isTouchScreen:ip,setVariable:Ht}};var It;(function(r){r.clusteringHelperCreated="clustering-helper-created",r.mapAttachmentsUpdate="map-attachments-update",r.visibleTopicChange="visible-topic-change"})(It||(It={}));var Ve;(function(r){r.FEEDBACK="FEEDBACK",r.RATING="RATING",r.PRINT="PRINT",r.BOOKMARK="BOOKMARK",r.COLLECTIONS="COLLECTIONS",r.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Ve||(Ve={}));var sp=function(r,e,t,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,t,i):s(e,t))||i);return a>3&&i&&Object.defineProperty(e,t,i),i},Ei=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},Ci=Symbol("registerInterval"),cp=te(Symbol("toFtReaderComponent"),function(r){var e;class t extends r{constructor(){super(...arguments),this[e]=0}setReaderStateManager(a){this.clearStateManager(),this.stateManager=a,this.addStore(a.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var a;return(a=this.stateManager)===null||a===void 0?void 0:a.service}connectedCallback(){super.connectedCallback(),this[Ci]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Ci]):this.dispatchEvent(new Ei)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Ci,sp([J()],t.prototype,"stateManager",void 0),t}),cr=class extends cp(ze){};var Oi={padding:o.create("--ft-infinite-scroll-padding","","SIZE","0"),itemsGap:o.create("--ft-infinite-scroll-items-gap","","SIZE","4px"),itemContainerMinHeight:o.create("--ft-infinite-scroll-item-container-min-height","","SIZE",".1px")},wl=k`
|
|
86
86
|
.items-container {
|
|
87
87
|
padding: ${Oi.padding};
|
|
88
88
|
outline: none;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-content",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.24",
|
|
4
4
|
"description": "Main content for 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-content-watermark": "2.0.
|
|
23
|
-
"@fluid-topics/ft-infinite-scroll": "2.0.
|
|
24
|
-
"@fluid-topics/ft-reader-topic-content": "2.0.
|
|
25
|
-
"@fluid-topics/ft-reader-topic-context": "2.0.
|
|
26
|
-
"@fluid-topics/ft-reader-topic-title": "2.0.
|
|
27
|
-
"@fluid-topics/ft-wc-utils": "2.0.
|
|
22
|
+
"@fluid-topics/ft-content-watermark": "2.0.24",
|
|
23
|
+
"@fluid-topics/ft-infinite-scroll": "2.0.24",
|
|
24
|
+
"@fluid-topics/ft-reader-topic-content": "2.0.24",
|
|
25
|
+
"@fluid-topics/ft-reader-topic-context": "2.0.24",
|
|
26
|
+
"@fluid-topics/ft-reader-topic-title": "2.0.24",
|
|
27
|
+
"@fluid-topics/ft-wc-utils": "2.0.24",
|
|
28
28
|
"lit": "3.1.0"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "5407e83b63be10ccc5bdeb3551c9f798b9559ae0"
|
|
31
31
|
}
|