@fluid-topics/ft-reader-internal-link 0.3.22 → 0.3.23
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t,r,o,s){var
|
|
1
|
+
!function(e,t,r,o,s){var n=function(e,t,r,o){for(var s,n=arguments.length,i=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o,l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i};class i extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class l extends(function(e){class t extends e{setReaderStateManager(e){this.stateManager=e,this.store=e.store}get service(){var e;return null===(e=this.stateManager)||void 0===e?void 0:e.service}connectedCallback(){super.connectedCallback(),setTimeout((()=>this.dispatchEvent(new i)),10)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}return n([o.state()],t.prototype,"stateManager",void 0),t}(t.FtLitElementRedux)){}const a={outlineColor:t.FtCssVariableFactory.extend("--ft-reader-internal-link-outline-color",t.designSystemVariables.colorPrimary)},c=r.css`
|
|
2
2
|
a:focus {
|
|
3
3
|
outline-color: ${a.outlineColor};
|
|
4
4
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
text-decoration: none;
|
|
8
8
|
color: inherit;
|
|
9
9
|
}
|
|
10
|
-
`;var d=function(e,t,r,o){for(var s,
|
|
10
|
+
`;var d=function(e,t,r,o){for(var s,n=arguments.length,i=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o,l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i};class u extends l{constructor(){super(...arguments),this.removeStyle=!1}render(){var e;let t=s.classMap({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return r.html`
|
|
11
11
|
<a class=${t}
|
|
12
12
|
href="${null===(e=this.service)||void 0===e?void 0:e.getLink(this.tocId,this.pageNumber,this.section)}"
|
|
13
13
|
@click=${e=>this.onClick(e)}>
|
|
@@ -83,30 +83,30 @@ var rt,nt;class at extends S{constructor(){super(...arguments),this.renderOption
|
|
|
83
83
|
-webkit-hyphens: auto;
|
|
84
84
|
hyphens: auto
|
|
85
85
|
}
|
|
86
|
-
`;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(dt=null===(ut=window.safari)||void 0===ut?void 0:ut.pushNotification)||void 0===dt||dt.toString());
|
|
86
|
+
`;class vt extends ft{get store(){return this.internalStore}set store(t){this.internalStore=t,this.store&&this.setupStore()}updateFromStore(){const t=this.store.getState();this.reduxProperties&&this.reduxProperties.forEach(((e,i)=>{this[i]=e(t,this)}))}setupStore(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.updateFromStore(),this.unsubscribeFromStore=this.store.subscribe((()=>{this.updateFromStore()})),this.onStoreAvailable(),this.requestUpdate()}onStoreAvailable(){}connectedCallback(){super.connectedCallback(),this.store&&this.setupStore()}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),super.disconnectedCallback()}}navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(dt=null===(ut=window.safari)||void 0===ut?void 0:ut.pushNotification)||void 0===dt||dt.toString());
|
|
87
87
|
/**
|
|
88
88
|
* @license
|
|
89
89
|
* Copyright 2017 Google LLC
|
|
90
90
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
91
91
|
*/
|
|
92
|
-
const
|
|
92
|
+
const bt=1;class yt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
93
93
|
/**
|
|
94
94
|
* @license
|
|
95
95
|
* Copyright 2018 Google LLC
|
|
96
96
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
97
|
-
*/const
|
|
97
|
+
*/const mt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends yt{constructor(t){var e;if(super(t),t.type!==bt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,s;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const o=t.element.classList;this.nt.forEach((t=>{t in e||(o.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(s=this.st)||void 0===s?void 0:s.has(t))||(i?(o.add(t),this.nt.add(t)):(o.remove(t),this.nt.delete(t)))}return K}});var xt=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class wt extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class gt extends(function(t){class e extends t{setReaderStateManager(t){this.stateManager=t,this.store=t.store}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),setTimeout((()=>this.dispatchEvent(new wt)),10)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}return xt([o()],e.prototype,"stateManager",void 0),e}(vt)){}const Ot={outlineColor:ct.extend("--ft-reader-internal-link-outline-color",ht.colorPrimary)},St=d`
|
|
98
98
|
a:focus {
|
|
99
|
-
outline-color: ${
|
|
99
|
+
outline-color: ${Ot.outlineColor};
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
.ft-reader-link--remove-style {
|
|
103
103
|
text-decoration: none;
|
|
104
104
|
color: inherit;
|
|
105
105
|
}
|
|
106
|
-
`;var
|
|
106
|
+
`;var Ct,Nt=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Et extends gt{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let e=mt({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return H`
|
|
107
107
|
<a class=${e}
|
|
108
108
|
href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
|
|
109
109
|
@click=${t=>this.onClick(t)}>
|
|
110
110
|
<slot></slot>
|
|
111
111
|
</a>
|
|
112
|
-
`}onClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)))}}
|
|
112
|
+
`}onClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)))}}Et.styles=St,Nt([s()],Et.prototype,"tocId",void 0),Nt([s()],Et.prototype,"section",void 0),Nt([s({type:Number})],Et.prototype,"pageNumber",void 0),Nt([s({type:Boolean})],Et.prototype,"removeStyle",void 0),(Ct="ft-reader-internal-link",t=>{window.customElements.get(Ct)||window.customElements.define(Ct,t)})(Et),t.FtReaderInternalLink=Et,t.FtReaderInternalLinkCssVariables=Ot,t.styles=St,Object.defineProperty(t,"i",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-internal-link",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.23",
|
|
4
4
|
"description": "Reader internal link for integrated reader",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "0.3.23",
|
|
23
23
|
"lit": "2.2.8"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "7fb0bb52d064423f63bfd9c36c5454d65aa890d6"
|
|
26
26
|
}
|