@fluid-topics/ft-reader-page-title 1.3.19 → 1.3.20

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.
@@ -123,7 +123,7 @@ Also for action icons.`,a.colorGray200),contentGlobalSubtle:e.extend("--ft-conte
123
123
  <span class="ft-i18n">
124
124
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
125
125
  </span>
126
- `}update(t){var o;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(o=this.defaultMessage)!==null&&o!==void 0?o:""})}};re.elementDefinitions={};re.styles=Za;pt([(0,Xt.redux)()],re.prototype,"editorMode",void 0);pt([(0,Yt.property)()],re.prototype,"context",void 0);pt([(0,Yt.property)()],re.prototype,"key",void 0);pt([(0,Xt.jsonProperty)([])],re.prototype,"args",void 0);pt([(0,Yt.property)()],re.prototype,"defaultMessage",void 0);var Qt=class r{static build(t){return new r(t)}static buildCustom(t){return new r(t,!0)}static fromGwt(t){return new r(t)}get service(){return this.custom?At:Ve}constructor(t,o=!1){this.name=t,this.custom=o,this.properties=new Proxy({},{get:(n,i)=>{let c=i;return l=>({context:this.name,key:c,custom:this.custom,args:typeof l=="function"?void 0:l,argsProvider:typeof l=="function"?l:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...c)=>this.service.resolveMessage(this.name,i,...c)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)})}};(0,ti.customElement)("ft-i18n")(re);var Zr=Qt.build("readerPageTitle"),ri={pageTitle:"Page title"};var Jt=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},ne=class extends Zt(yt){constructor(){super(),this.target="current",this.editorMode=!1,this.addStore(O),this.addI18nContext(Zr,ri)}render(){var t,o;let n=(o=(t=this.targetPage)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:this.editorMode?Zr.messages.pageTitle():void 0;return n?er.html`<ft-typography variant="title" part="text">${n}</ft-typography>`:er.nothing}update(t){var o;if(super.update(t),t.has("currentPage")||t.has("target")){let n=this.computeOffset(this.target);if(this.currentPage&&n!=0){let i=this.currentPage.number+n;(o=this.stateManager)===null||o===void 0||o.getPage(i).then(c=>{c.number==i?this.targetPage=c:this.targetPage=void 0})}else this.targetPage=this.currentPage}}computeOffset(t){switch(t){case"next":return 1;case"previous":return-1;default:return 0}}};ne.styles=ro;ne.elementDefinitions={"ft-typography":ce};Jt([(0,tr.property)()],ne.prototype,"target",void 0);Jt([(0,qr.redux)({store:"reader"})],ne.prototype,"currentPage",void 0);Jt([(0,tr.state)()],ne.prototype,"targetPage",void 0);Jt([(0,qr.redux)({store:O.name})],ne.prototype,"editorMode",void 0);(0,oi.customElement)("ft-reader-page-title")(ne);})();
126
+ `}update(t){var o;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(o=this.defaultMessage)!==null&&o!==void 0?o:""})}};re.elementDefinitions={};re.styles=Za;pt([(0,Xt.redux)()],re.prototype,"editorMode",void 0);pt([(0,Yt.property)()],re.prototype,"context",void 0);pt([(0,Yt.property)()],re.prototype,"key",void 0);pt([(0,Xt.jsonProperty)([])],re.prototype,"args",void 0);pt([(0,Yt.property)()],re.prototype,"defaultMessage",void 0);var Qt=class r{static build(t){return new r(t)}static buildCustom(t){return new r(t,!0)}static fromGwt(t){return new r(t)}get service(){return this.custom?At:Ve}constructor(t,o=!1){this.name=t,this.custom=o,this.properties=new Proxy({},{get:(n,i)=>{let c=i;return l=>({context:this.name,key:c,custom:this.custom,args:typeof l=="function"?void 0:l,argsProvider:typeof l=="function"?l:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...c)=>this.service.resolveMessage(this.name,i,...c)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)}),this.keys=new Proxy({},{get:(n,i)=>()=>i})}};(0,ti.customElement)("ft-i18n")(re);var Zr=Qt.build("readerPageTitle"),ri={pageTitle:"Page title"};var Jt=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},ne=class extends Zt(yt){constructor(){super(),this.target="current",this.editorMode=!1,this.addStore(O),this.addI18nContext(Zr,ri)}render(){var t,o;let n=(o=(t=this.targetPage)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:this.editorMode?Zr.messages.pageTitle():void 0;return n?er.html`<ft-typography variant="title" part="text">${n}</ft-typography>`:er.nothing}update(t){var o;if(super.update(t),t.has("currentPage")||t.has("target")){let n=this.computeOffset(this.target);if(this.currentPage&&n!=0){let i=this.currentPage.number+n;(o=this.stateManager)===null||o===void 0||o.getPage(i).then(c=>{c.number==i?this.targetPage=c:this.targetPage=void 0})}else this.targetPage=this.currentPage}}computeOffset(t){switch(t){case"next":return 1;case"previous":return-1;default:return 0}}};ne.styles=ro;ne.elementDefinitions={"ft-typography":ce};Jt([(0,tr.property)()],ne.prototype,"target",void 0);Jt([(0,qr.redux)({store:"reader"})],ne.prototype,"currentPage",void 0);Jt([(0,tr.state)()],ne.prototype,"targetPage",void 0);Jt([(0,qr.redux)({store:O.name})],ne.prototype,"editorMode",void 0);(0,oi.customElement)("ft-reader-page-title")(ne);})();
127
127
  /*! Bundled license information:
128
128
 
129
129
  lit-html/lit-html.js:
@@ -190,7 +190,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:t.extend("--ft-conte
190
190
  <span class="ft-i18n">
191
191
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
192
192
  </span>
193
- `}update(e){var o;super.update(e),["context","key","defaultMessage"].some(n=>e.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(o=this.defaultMessage)!==null&&o!==void 0?o:""})}};de.elementDefinitions={};de.styles=jc;vr([Qe()],de.prototype,"editorMode",void 0);vr([P()],de.prototype,"context",void 0);vr([P()],de.prototype,"key",void 0);vr([ye([])],de.prototype,"args",void 0);vr([P()],de.prototype,"defaultMessage",void 0);var fo=class r{static build(e){return new r(e)}static buildCustom(e){return new r(e,!0)}static fromGwt(e){return new r(e)}get service(){return this.custom?ao:Ht}constructor(e,o=!1){this.name=e,this.custom=o,this.properties=new Proxy({},{get:(n,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(n,a)=>this.service.resolveRawMessage(this.name,a)})}};Ee("ft-i18n")(de);var qa=fo.build("readerPageTitle"),Yc={pageTitle:"Page title"};var ho=function(r,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,o,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},xe=class extends po(eo){constructor(){super(),this.target="current",this.editorMode=!1,this.addStore(T),this.addI18nContext(qa,Yc)}render(){var e,o;let n=(o=(e=this.targetPage)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:this.editorMode?qa.messages.pageTitle():void 0;return n?pe`<ft-typography variant="title" part="text">${n}</ft-typography>`:$}update(e){var o;if(super.update(e),e.has("currentPage")||e.has("target")){let n=this.computeOffset(this.target);if(this.currentPage&&n!=0){let a=this.currentPage.number+n;(o=this.stateManager)===null||o===void 0||o.getPage(a).then(i=>{i.number==a?this.targetPage=i:this.targetPage=void 0})}else this.targetPage=this.currentPage}}computeOffset(e){switch(e){case"next":return 1;case"previous":return-1;default:return 0}}};xe.styles=xc;xe.elementDefinitions={"ft-typography":Ne};ho([P()],xe.prototype,"target",void 0);ho([Qe({store:"reader"})],xe.prototype,"currentPage",void 0);ho([ne()],xe.prototype,"targetPage",void 0);ho([Qe({store:T.name})],xe.prototype,"editorMode",void 0);Ee("ft-reader-page-title")(xe);})();
193
+ `}update(e){var o;super.update(e),["context","key","defaultMessage"].some(n=>e.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(o=this.defaultMessage)!==null&&o!==void 0?o:""})}};de.elementDefinitions={};de.styles=jc;vr([Qe()],de.prototype,"editorMode",void 0);vr([P()],de.prototype,"context",void 0);vr([P()],de.prototype,"key",void 0);vr([ye([])],de.prototype,"args",void 0);vr([P()],de.prototype,"defaultMessage",void 0);var fo=class r{static build(e){return new r(e)}static buildCustom(e){return new r(e,!0)}static fromGwt(e){return new r(e)}get service(){return this.custom?ao:Ht}constructor(e,o=!1){this.name=e,this.custom=o,this.properties=new Proxy({},{get:(n,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(n,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(n,a)=>()=>a})}};Ee("ft-i18n")(de);var qa=fo.build("readerPageTitle"),Yc={pageTitle:"Page title"};var ho=function(r,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,o,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},xe=class extends po(eo){constructor(){super(),this.target="current",this.editorMode=!1,this.addStore(T),this.addI18nContext(qa,Yc)}render(){var e,o;let n=(o=(e=this.targetPage)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:this.editorMode?qa.messages.pageTitle():void 0;return n?pe`<ft-typography variant="title" part="text">${n}</ft-typography>`:$}update(e){var o;if(super.update(e),e.has("currentPage")||e.has("target")){let n=this.computeOffset(this.target);if(this.currentPage&&n!=0){let a=this.currentPage.number+n;(o=this.stateManager)===null||o===void 0||o.getPage(a).then(i=>{i.number==a?this.targetPage=i:this.targetPage=void 0})}else this.targetPage=this.currentPage}}computeOffset(e){switch(e){case"next":return 1;case"previous":return-1;default:return 0}}};xe.styles=xc;xe.elementDefinitions={"ft-typography":Ne};ho([P()],xe.prototype,"target",void 0);ho([Qe({store:"reader"})],xe.prototype,"currentPage",void 0);ho([ne()],xe.prototype,"targetPage",void 0);ho([Qe({store:T.name})],xe.prototype,"editorMode",void 0);Ee("ft-reader-page-title")(xe);})();
194
194
  /*! Bundled license information:
195
195
 
196
196
  @webcomponents/scoped-custom-element-registry/src/scoped-custom-element-registry.js:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-page-title",
3
- "version": "1.3.19",
3
+ "version": "1.3.20",
4
4
  "description": "Displays the previous/current/next page title",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,10 +19,10 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-reader-context": "1.3.19",
23
- "@fluid-topics/ft-typography": "1.3.19",
24
- "@fluid-topics/ft-wc-utils": "1.3.19",
22
+ "@fluid-topics/ft-reader-context": "1.3.20",
23
+ "@fluid-topics/ft-typography": "1.3.20",
24
+ "@fluid-topics/ft-wc-utils": "1.3.20",
25
25
  "lit": "3.1.0"
26
26
  },
27
- "gitHead": "d3142bbeffbc47e550279b0d5d4e23ce72aaf514"
27
+ "gitHead": "1bb0c50fc5a4fdb4f14d22b728ab719faddfc15e"
28
28
  }