@fluid-topics/ft-reader-feedback 0.3.56 → 0.3.58
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.
|
@@ -87,7 +87,7 @@ export class FtReaderFeedback extends FtLitElement {
|
|
|
87
87
|
</div>
|
|
88
88
|
`;
|
|
89
89
|
}
|
|
90
|
-
return this.placeholderInEditor("Rating unavailable: " + (this.userHasRatingRole ? "no rating configured for this content" : "missing role RATING_USER"));
|
|
90
|
+
return this.placeholderInEditor("Rating unavailable: " + (this.userHasRatingRole ? "no rating configured for this content." : "missing role RATING_USER."));
|
|
91
91
|
}
|
|
92
92
|
renderRatingDate() {
|
|
93
93
|
const ratingDate = this.ratingDate;
|
|
@@ -199,7 +199,7 @@ export class FtReaderFeedback extends FtLitElement {
|
|
|
199
199
|
</div>
|
|
200
200
|
`;
|
|
201
201
|
}
|
|
202
|
-
return this.placeholderInEditor("Feedback unavailable: missing role FEEDBACK_USER");
|
|
202
|
+
return this.placeholderInEditor("Feedback unavailable: missing role FEEDBACK_USER.");
|
|
203
203
|
}
|
|
204
204
|
sendFeedback() {
|
|
205
205
|
this.dispatchEvent(new CustomEvent("send-feedback", { detail: this.feedbackInput.value }));
|
|
@@ -209,7 +209,7 @@ export class FtReaderFeedback extends FtLitElement {
|
|
|
209
209
|
<div class="ft-reader-feedback--placeholder">
|
|
210
210
|
<ft-typography variant="caption">${message}</ft-typography>
|
|
211
211
|
<ft-tooltip position="left"
|
|
212
|
-
text="This
|
|
212
|
+
text="This notice will not appear outside this designer.">
|
|
213
213
|
<ft-icon>INFO</ft-icon>
|
|
214
214
|
</ft-tooltip>
|
|
215
215
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e,i,o,s,n,r){var a=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class l extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class h extends(function(t){class e extends t{constructor(){super(...arguments),this.registerIntervalReader=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store)}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new l)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return a([o.state()],e.prototype,"stateManager",void 0),e}(e.FtLitElementRedux)){}const d=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),p={color:d,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",d),opacityContentOnSurfacePressed:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},f=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),c=f,u=e.FtCssVariableFactory.extend("--ft-ripple-background-color",f),b=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),
|
|
1
|
+
!function(t,e,i,o,s,n,r){var a=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class l extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class h extends(function(t){class e extends t{constructor(){super(...arguments),this.registerIntervalReader=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store)}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new l)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return a([o.state()],e.prototype,"stateManager",void 0),e}(e.FtLitElementRedux)){}const d=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),p={color:d,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",d),opacityContentOnSurfacePressed:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},f=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),c=f,u=e.FtCssVariableFactory.extend("--ft-ripple-background-color",f),b=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),v=b,g=e.FtCssVariableFactory.extend("--ft-ripple-background-color",b),x=i.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
}
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
31
|
-
background-color: ${
|
|
31
|
+
background-color: ${g};
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
35
|
-
background-color: ${
|
|
35
|
+
background-color: ${v};
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
opacity: ${p.opacityContentOnSurfacePressed};
|
|
88
88
|
transform: translate(-50%, -50%) scale(1);
|
|
89
89
|
}
|
|
90
|
-
`,y=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),m=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),$={fontFamily:m,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},w={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-title-font-family",y),fontSize:e.FtCssVariableFactory.extend("--ft-typography-title-font-size",$.fontSize,"20px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",$.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",$.letterSpacing,"0.15px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-title-line-height",$.lineHeight,"1.2"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",$.textTransform,"inherit")},k={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",y),fontSize:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",$.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",$.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",$.letterSpacing,"0.105px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",$.lineHeight,"1.7"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",$.textTransform,"inherit")},_=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",m),S=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",$.fontSize,"16px"),
|
|
90
|
+
`,y=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),m=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),$={fontFamily:m,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},w={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-title-font-family",y),fontSize:e.FtCssVariableFactory.extend("--ft-typography-title-font-size",$.fontSize,"20px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",$.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",$.letterSpacing,"0.15px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-title-line-height",$.lineHeight,"1.2"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",$.textTransform,"inherit")},k={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",y),fontSize:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",$.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",$.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",$.letterSpacing,"0.105px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",$.lineHeight,"1.7"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",$.textTransform,"inherit")},_=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",m),S=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",$.fontSize,"16px"),z=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",$.fontWeight,"600"),I=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",$.letterSpacing,"0.144px"),T=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",$.lineHeight,"1.5"),O=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",$.textTransform,"inherit"),R=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",m),C=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",$.fontSize,"14px"),D=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",$.fontWeight,"normal"),N=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",$.letterSpacing,"0.098px"),E=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",$.lineHeight,"1.7"),A=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",$.textTransform,"inherit"),B={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",m),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",$.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",$.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",$.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",$.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",$.textTransform,"inherit")},F=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",m),j=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",$.fontSize,"14px"),M=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",$.fontWeight,"normal"),U=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",$.letterSpacing,"0.252px"),L=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",$.lineHeight,"1.4"),H=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",$.textTransform,"inherit"),W={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",m),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",$.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",$.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",$.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",$.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",$.textTransform,"inherit")},Z=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",m),P=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",$.fontSize,"10px"),V=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",$.fontWeight,"normal"),K=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",$.letterSpacing,"0.33px"),G=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",$.lineHeight,"1.6"),Y=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",$.textTransform,"inherit"),q=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",m),X=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",$.fontSize,"10px"),J=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",$.fontWeight,"normal"),Q=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",$.letterSpacing,"1.5px"),tt=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",$.lineHeight,"1.6"),et=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",$.textTransform,"uppercase"),it={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-button-font-family",m),fontSize:e.FtCssVariableFactory.extend("--ft-typography-button-font-size",$.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",$.fontWeight,"600"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",$.letterSpacing,"1.246px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-button-line-height",$.lineHeight,"1.15"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",$.textTransform,"uppercase")},ot=i.css`
|
|
91
91
|
.ft-typography--title {
|
|
92
92
|
font-family: ${w.fontFamily};
|
|
93
93
|
font-size: ${w.fontSize};
|
|
@@ -109,8 +109,8 @@
|
|
|
109
109
|
.ft-typography--subtitle1 {
|
|
110
110
|
font-family: ${_};
|
|
111
111
|
font-size: ${S};
|
|
112
|
-
font-weight: ${
|
|
113
|
-
letter-spacing: ${
|
|
112
|
+
font-weight: ${z};
|
|
113
|
+
letter-spacing: ${I};
|
|
114
114
|
line-height: ${T};
|
|
115
115
|
text-transform: ${O};
|
|
116
116
|
}
|
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
transform: translate(calc(0.35 * ${ut.size}), 0);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
`,
|
|
254
|
+
`,vt={size:e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},gt=i.css`
|
|
255
255
|
:host, i.ft-icon {
|
|
256
256
|
display: inline-flex;
|
|
257
257
|
align-items: center;
|
|
@@ -260,14 +260,14 @@
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
:host {
|
|
263
|
-
width: ${
|
|
264
|
-
height: ${
|
|
263
|
+
width: ${vt.size};
|
|
264
|
+
height: ${vt.size};
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
i.ft-icon {
|
|
268
268
|
width: 100%;
|
|
269
269
|
height: 100%;
|
|
270
|
-
font-size: ${
|
|
270
|
+
font-size: ${vt.size};
|
|
271
271
|
line-height: 1;
|
|
272
272
|
font-weight: normal;
|
|
273
273
|
text-transform: none;
|
|
@@ -278,25 +278,25 @@
|
|
|
278
278
|
text-rendering: auto;
|
|
279
279
|
-webkit-font-smoothing: antialiased;
|
|
280
280
|
-moz-osx-font-smoothing: grayscale;
|
|
281
|
-
vertical-align: ${
|
|
281
|
+
vertical-align: ${vt.verticalAlign};
|
|
282
282
|
}
|
|
283
283
|
|
|
284
284
|
i.ft-icon.ft-icon--fluid-topics {
|
|
285
|
-
font-family: ${
|
|
285
|
+
font-family: ${vt.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
286
286
|
|
|
287
287
|
/* Ugly fix because font is broken */
|
|
288
|
-
font-size: calc(0.9 * ${
|
|
288
|
+
font-size: calc(0.9 * ${vt.size});
|
|
289
289
|
position: relative;
|
|
290
290
|
top: -5%;
|
|
291
291
|
justify-content: center;
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
.ft-icon--file-format {
|
|
295
|
-
font-family: ${
|
|
295
|
+
font-family: ${vt.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
.ft-icon--material {
|
|
299
|
-
font-family: ${
|
|
299
|
+
font-family: ${vt.materialFontFamily}, "Material Icons", sans-serif;
|
|
300
300
|
}
|
|
301
301
|
`,xt=e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorPrimary),yt={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:xt,fontSize:e.FtCssVariableFactory.extend("--ft-button-font-size",it.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:e.FtCssVariableFactory.extend("--ft-button-ripple-color",xt),opacityDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},mt=e.FtCssVariableFactory.extend("--ft-button-primary-color",e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),$t={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-primary-background-color",e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:mt,rippleColor:e.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",mt)},wt=e.FtCssVariableFactory.extend("--ft-button-dense-border-radius",e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusM)),kt=[e.noTextSelect,i.css`
|
|
302
302
|
:host {
|
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
|
|
341
341
|
--ft-button-internal-line-height: calc(${yt.fontSize} + 2px);
|
|
342
342
|
--ft-button-internal-color: ${yt.color};
|
|
343
|
-
${e.setVariable(
|
|
343
|
+
${e.setVariable(vt.size,yt.iconSize)};
|
|
344
344
|
--ft-button-internal-vertical-padding: 6px;
|
|
345
345
|
--ft-button-internal-horizontal-padding: 8px;
|
|
346
346
|
${e.setVariable(p.color,yt.rippleColor)};
|
|
@@ -421,7 +421,7 @@
|
|
|
421
421
|
${e.setVariable(ut.size,yt.iconSize)};
|
|
422
422
|
${e.setVariable(ut.color,"var(--ft-button-internal-color)")};
|
|
423
423
|
}
|
|
424
|
-
`],_t={textColor:e.FtCssVariableFactory.extend("--ft-switch-text-color",e.designSystemVariables.colorOnSurfaceHigh),backgroundColor:e.FtCssVariableFactory.extend("--ft-switch-background-color",e.designSystemVariables.colorSurface),selectedTextColor:e.FtCssVariableFactory.extend("--ft-switch-selected-text-color",e.designSystemVariables.colorPrimary),selectedBackgroundColor:e.FtCssVariableFactory.extend("--ft-switch-selected-background-color",e.designSystemVariables.colorPrimary),borderColor:e.FtCssVariableFactory.extend("--ft-switch-border-color",e.designSystemVariables.colorOutline),borderRadius:e.FtCssVariableFactory.extend("--ft-switch-border-radius",e.designSystemVariables.borderRadiusL),fontSize:e.FtCssVariableFactory.extend("--ft-switch-font-size",it.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-switch-icon-size","SIZE","24px"),iconColor:e.FtCssVariableFactory.extend("--ft-switch-text-color",e.designSystemVariables.colorOnSurfaceMedium),rippleColor:e.FtCssVariableFactory.extend("--ft-switch-ripple-color",e.designSystemVariables.colorPrimary),outlineColor:e.FtCssVariableFactory.extend("--ft-switch-outline-color",e.designSystemVariables.colorPrimary)},St={feedbackInputMinWidth:e.FtCssVariableFactory.create("--ft-reader-feedback-input-min-width","SIZE","300px"),ratedDateColor:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),sendFeedbackColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-send-feedback-color",e.designSystemVariables.colorOnPrimary),sendFeedbackBackgroundColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-send-feedback-background-color",e.designSystemVariables.colorPrimary),filledRatingColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-filled-rating-color",e.designSystemVariables.colorPrimary),emptyRatingColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-empty-rating-color",e.designSystemVariables.colorOnSurfaceMedium),mainTitleFontSize:e.FtCssVariableFactory.external(w.fontSize,"Typography"),sectionTitleFontSize:e.FtCssVariableFactory.external(k.fontSize,"Typography")},
|
|
424
|
+
`],_t={textColor:e.FtCssVariableFactory.extend("--ft-switch-text-color",e.designSystemVariables.colorOnSurfaceHigh),backgroundColor:e.FtCssVariableFactory.extend("--ft-switch-background-color",e.designSystemVariables.colorSurface),selectedTextColor:e.FtCssVariableFactory.extend("--ft-switch-selected-text-color",e.designSystemVariables.colorPrimary),selectedBackgroundColor:e.FtCssVariableFactory.extend("--ft-switch-selected-background-color",e.designSystemVariables.colorPrimary),borderColor:e.FtCssVariableFactory.extend("--ft-switch-border-color",e.designSystemVariables.colorOutline),borderRadius:e.FtCssVariableFactory.extend("--ft-switch-border-radius",e.designSystemVariables.borderRadiusL),fontSize:e.FtCssVariableFactory.extend("--ft-switch-font-size",it.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-switch-icon-size","SIZE","24px"),iconColor:e.FtCssVariableFactory.extend("--ft-switch-text-color",e.designSystemVariables.colorOnSurfaceMedium),rippleColor:e.FtCssVariableFactory.extend("--ft-switch-ripple-color",e.designSystemVariables.colorPrimary),outlineColor:e.FtCssVariableFactory.extend("--ft-switch-outline-color",e.designSystemVariables.colorPrimary)},St={feedbackInputMinWidth:e.FtCssVariableFactory.create("--ft-reader-feedback-input-min-width","SIZE","300px"),ratedDateColor:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),sendFeedbackColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-send-feedback-color",e.designSystemVariables.colorOnPrimary),sendFeedbackBackgroundColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-send-feedback-background-color",e.designSystemVariables.colorPrimary),filledRatingColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-filled-rating-color",e.designSystemVariables.colorPrimary),emptyRatingColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-empty-rating-color",e.designSystemVariables.colorOnSurfaceMedium),mainTitleFontSize:e.FtCssVariableFactory.external(w.fontSize,"Typography"),sectionTitleFontSize:e.FtCssVariableFactory.external(k.fontSize,"Typography")},zt=i.css`
|
|
425
425
|
.ft-reader-feedback {
|
|
426
426
|
box-sizing: border-box;
|
|
427
427
|
display: flex;
|
|
@@ -499,25 +499,25 @@
|
|
|
499
499
|
* @license
|
|
500
500
|
* Copyright 2017 Google LLC
|
|
501
501
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
502
|
-
*/;var
|
|
502
|
+
*/;var It;const Tt=window,Ot=Tt.trustedTypes,Rt=Ot?Ot.createPolicy("lit-html",{createHTML:t=>t}):void 0,Ct=`lit$${(Math.random()+"").slice(9)}$`,Dt="?"+Ct,Nt=`<${Dt}>`,Et=document,At=(t="")=>Et.createComment(t),Bt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Ft=Array.isArray,jt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Mt=/-->/g,Ut=/>/g,Lt=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),Ht=/'/g,Wt=/"/g,Zt=/^(?:script|style|textarea|title)$/i,Pt=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),Vt=Symbol.for("lit-noChange"),Kt=Symbol.for("lit-nothing"),Gt=new WeakMap,Yt=Et.createTreeWalker(Et,129,null,!1),qt=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=jt;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,d=0;for(;d<i.length&&(r.lastIndex=d,l=r.exec(i),null!==l);)d=r.lastIndex,r===jt?"!--"===l[1]?r=Mt:void 0!==l[1]?r=Ut:void 0!==l[2]?(Zt.test(l[2])&&(s=RegExp("</"+l[2],"g")),r=Lt):void 0!==l[3]&&(r=Lt):r===Lt?">"===l[0]?(r=null!=s?s:jt,h=-1):void 0===l[1]?h=-2:(h=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?Lt:'"'===l[3]?Wt:Ht):r===Wt||r===Ht?r=Lt:r===Mt||r===Ut?r=jt:(r=Lt,s=void 0);const p=r===Lt&&t[e+1].startsWith("/>")?" ":"";n+=r===jt?i+Nt:h>=0?(o.push(a),i.slice(0,h)+"$lit$"+i.slice(h)+Ct+p):i+Ct+(-2===h?(o.push(void 0),e):p)}const a=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==Rt?Rt.createHTML(a):a,o]};class Xt{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const r=t.length-1,a=this.parts,[l,h]=qt(t,e);if(this.el=Xt.createElement(l,i),Yt.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=Yt.nextNode())&&a.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(Ct)){const i=h[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(Ct),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?ie:"?"===e[1]?se:"@"===e[1]?ne:ee})}else a.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(Zt.test(o.tagName)){const t=o.textContent.split(Ct),e=t.length-1;if(e>0){o.textContent=Ot?Ot.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],At()),Yt.nextNode(),a.push({type:2,index:++s});o.append(t[e],At())}}}else if(8===o.nodeType)if(o.data===Dt)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(Ct,t+1));)a.push({type:7,index:s}),t+=Ct.length-1}s++}}static createElement(t,e){const i=Et.createElement("template");return i.innerHTML=t,i}}function Jt(t,e,i=t,o){var s,n,r,a;if(e===Vt)return e;let l=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const h=Bt(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,o)),void 0!==o?(null!==(r=(a=i)._$Co)&&void 0!==r?r:a._$Co=[])[o]=l:i._$Cl=l),void 0!==l&&(e=Jt(t,l._$AS(t,e.values),l,o)),e}class Qt{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:Et).importNode(i,!0);Yt.currentNode=s;let n=Yt.nextNode(),r=0,a=0,l=o[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new te(n,n.nextSibling,this,t):1===l.type?e=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(e=new re(n,this,t)),this.u.push(e),l=o[++a]}r!==(null==l?void 0:l.index)&&(n=Yt.nextNode(),r++)}return s}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class te{constructor(t,e,i,o){var s;this.type=2,this._$AH=Kt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Jt(this,t,e),Bt(t)?t===Kt||null==t||""===t?(this._$AH!==Kt&&this._$AR(),this._$AH=Kt):t!==this._$AH&&t!==Vt&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>Ft(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==Kt&&Bt(this._$AH)?this._$AA.nextSibling.data=t:this.T(Et.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Xt.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.p(i);else{const t=new Qt(s,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=Gt.get(t.strings);return void 0===e&&Gt.set(t.strings,e=new Xt(t)),e}k(t){Ft(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new te(this.O(At()),this.O(At()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class ee{constructor(t,e,i,o,s){this.type=1,this._$AH=Kt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Kt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=Jt(this,t,e,0),n=!Bt(t)||t!==this._$AH&&t!==Vt,n&&(this._$AH=t);else{const o=t;let r,a;for(t=s[0],r=0;r<s.length-1;r++)a=Jt(this,o[i+r],e,r),a===Vt&&(a=this._$AH[r]),n||(n=!Bt(a)||a!==this._$AH[r]),a===Kt?t=Kt:t!==Kt&&(t+=(null!=a?a:"")+s[r+1]),this._$AH[r]=a}n&&!o&&this.j(t)}j(t){t===Kt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class ie extends ee{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Kt?void 0:t}}const oe=Ot?Ot.emptyScript:"";class se extends ee{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Kt?this.element.setAttribute(this.name,oe):this.element.removeAttribute(this.name)}}class ne extends ee{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Jt(this,t,e,0))&&void 0!==i?i:Kt)===Vt)return;const o=this._$AH,s=t===Kt&&o!==Kt||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==Kt&&(o===Kt||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class re{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Jt(this,t)}}const ae=Tt.litHtmlPolyfillSupport;null==ae||ae(Xt,te),(null!==(It=Tt.litHtmlVersions)&&void 0!==It?It:Tt.litHtmlVersions=[]).push("2.4.0");
|
|
503
503
|
/**
|
|
504
504
|
* @license
|
|
505
505
|
* Copyright 2020 Google LLC
|
|
506
506
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
507
507
|
*/
|
|
508
|
-
const le=Symbol.for(""),he=t=>{if((null==t?void 0:t.r)===le)return null==t?void 0:t._$litStatic$},de=t=>({_$litStatic$:t,r:le}),pe=new Map,fe=(t=>(e,...i)=>{const o=i.length;let s,n;const r=[],a=[];let l,h=0,d=!1;for(;h<o;){for(l=e[h];h<o&&void 0!==(n=i[h],s=he(n));)l+=s+e[++h],d=!0;a.push(n),r.push(l),h++}if(h===o&&r.push(e[o]),d){const t=r.join("$$lit$$");void 0===(e=pe.get(t))&&(r.raw=r,pe.set(t,e=r)),i=a}return t(e,...i)})(Pt);var ce;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(ce||(ce={}));var ue,be,ge
|
|
508
|
+
const le=Symbol.for(""),he=t=>{if((null==t?void 0:t.r)===le)return null==t?void 0:t._$litStatic$},de=t=>({_$litStatic$:t,r:le}),pe=new Map,fe=(t=>(e,...i)=>{const o=i.length;let s,n;const r=[],a=[];let l,h=0,d=!1;for(;h<o;){for(l=e[h];h<o&&void 0!==(n=i[h],s=he(n));)l+=s+e[++h],d=!0;a.push(n),r.push(l),h++}if(h===o&&r.push(e[o]),d){const t=r.join("$$lit$$");void 0===(e=pe.get(t))&&(r.raw=r,pe.set(t,e=r)),i=a}return t(e,...i)})(Pt);var ce;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(ce||(ce={}));var ue,be,ve,ge=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class xe extends e.FtLitElement{constructor(){super(...arguments),this.variant=ce.body1}render(){return this.element?fe`
|
|
509
509
|
<${de(this.element)}
|
|
510
510
|
class="ft-typography ft-typography--${this.variant}">
|
|
511
511
|
<slot></slot>
|
|
512
512
|
</${de(this.element)}>
|
|
513
513
|
`:fe`
|
|
514
514
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
515
|
-
`}}xe.styles=[ot,st,nt,rt,at,lt,ht,dt,pt,ft,ct],
|
|
516
|
-
<i class="ft-icon ${"ft-icon--"+
|
|
515
|
+
`}}xe.styles=[ot,st,nt,rt,at,lt,ht,dt,pt,ft,ct],ge([o.property()],xe.prototype,"element",void 0),ge([o.property()],xe.prototype,"variant",void 0),e.customElement("ft-typography")(xe),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(ue||(ue={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(be||(be={})),new Map([...["abw"].map((t=>[t,be.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,be.AUDIO])),...["avi"].map((t=>[t,be.AVI])),...["chm","xhs"].map((t=>[t,be.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,be.CODE])),...["csv"].map((t=>[t,be.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,be.DITA])),...["epub"].map((t=>[t,be.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,be.EXCEL])),...["flac"].map((t=>[t,be.FLAC])),...["gif"].map((t=>[t,be.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,be.GZIP])),...["html","htm","xhtml"].map((t=>[t,be.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,be.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,be.JPEG])),...["json"].map((t=>[t,be.JSON])),...["m4a","m4p"].map((t=>[t,be.M4A])),...["mov","qt"].map((t=>[t,be.MOV])),...["mp3"].map((t=>[t,be.MP3])),...["mp4","m4v"].map((t=>[t,be.MP4])),...["ogg","oga"].map((t=>[t,be.OGG])),...["pdf","ps"].map((t=>[t,be.PDF])),...["png"].map((t=>[t,be.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,be.POWERPOINT])),...["rar"].map((t=>[t,be.RAR])),...["stp"].map((t=>[t,be.STP])),...["txt","rtf","md","mdown"].map((t=>[t,be.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,be.VIDEO])),...["wav"].map((t=>[t,be.WAV])),...["wma"].map((t=>[t,be.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,be.WORD])),...["xml","xsl","rdf"].map((t=>[t,be.XML])),...["yaml","yml","x-yaml"].map((t=>[t,be.YAML])),...["zip"].map((t=>[t,be.ZIP]))]),function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(ve||(ve={}));var ye=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class me extends e.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=i.nothing}render(){var t;const e=null!==(t=this.variant)&&void 0!==t?t:ve.fluid_topics,o="material"!==e||this.value;return i.html`
|
|
516
|
+
<i class="ft-icon ${"ft-icon--"+e}">
|
|
517
517
|
${s.unsafeHTML(this.resolvedIcon)}
|
|
518
|
-
<slot ?hidden=${
|
|
518
|
+
<slot ?hidden=${o}></slot>
|
|
519
519
|
</i>
|
|
520
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case
|
|
520
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case ve.file_format:this.resolvedIcon=null!==(t=be[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case ve.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=ue[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}me.elementDefinitions={},me.styles=gt,ye([o.property()],me.prototype,"variant",void 0),ye([o.property()],me.prototype,"value",void 0),ye([o.state()],me.prototype,"resolvedIcon",void 0),ye([o.query("slot")],me.prototype,"slottedContent",void 0),e.customElement("ft-icon")(me);const $e=e.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),we=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),ke=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),_e=e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),Se=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),ze=e.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),Ie=i.css`
|
|
521
521
|
.ft-tooltip--container {
|
|
522
522
|
display: block;
|
|
523
523
|
position: relative;
|
|
@@ -533,7 +533,7 @@ const le=Symbol.for(""),he=t=>{if((null==t?void 0:t.r)===le)return null==t?void
|
|
|
533
533
|
box-sizing: border-box;
|
|
534
534
|
overflow: hidden;
|
|
535
535
|
width: max-content;
|
|
536
|
-
max-width: ${
|
|
536
|
+
max-width: ${ze};
|
|
537
537
|
text-align: center;
|
|
538
538
|
padding: ${$e};
|
|
539
539
|
z-index: ${_e};
|
|
@@ -567,7 +567,7 @@ const le=Symbol.for(""),he=t=>{if((null==t?void 0:t.r)===le)return null==t?void
|
|
|
567
567
|
</div>
|
|
568
568
|
</div>
|
|
569
569
|
</div>
|
|
570
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=e.height,s=o;break;case"left":n=i,s=-this.tooltip.clientWidth;break;case"right":n=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${e.width}px, ${
|
|
570
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=e.height,s=o;break;case"left":n=i,s=-this.tooltip.clientWidth;break;case"right":n=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${e.width}px, ${ze})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}Oe.elementDefinitions={"ft-typography":xe},Oe.styles=Ie,Te([o.property()],Oe.prototype,"text",void 0),Te([o.property({type:Boolean})],Oe.prototype,"manual",void 0),Te([o.property({type:Boolean})],Oe.prototype,"inline",void 0),Te([o.property({type:Number})],Oe.prototype,"delay",void 0),Te([o.property()],Oe.prototype,"position",void 0),Te([o.queryAssignedNodes("",!0)],Oe.prototype,"slotNodes",void 0),Te([o.query(".ft-tooltip--container")],Oe.prototype,"container",void 0),Te([o.query("slot")],Oe.prototype,"target",void 0),Te([o.query(".ft-tooltip")],Oe.prototype,"tooltip",void 0),Te([o.query(".ft-tooltip--content")],Oe.prototype,"tooltipContent",void 0),Te([o.state()],Oe.prototype,"visible",void 0),e.customElement("ft-tooltip")(Oe);var Re=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ce extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new e.Debouncer(10),this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),n=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return i.html`
|
|
571
571
|
<style>
|
|
572
572
|
.ft-ripple .ft-ripple--effect,
|
|
573
573
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -609,7 +609,7 @@ const le=Symbol.for(""),he=t=>{if((null==t?void 0:t.r)===le)return null==t?void
|
|
|
609
609
|
align-items: center;
|
|
610
610
|
justify-content: center;
|
|
611
611
|
overflow: hidden;
|
|
612
|
-
${e.setVariable(
|
|
612
|
+
${e.setVariable(vt.size,_t.iconSize)};
|
|
613
613
|
padding: var(--ft-switch-internal-vertical-padding, 6px) var(--ft-switch-internal-horizontal-padding, 8px);
|
|
614
614
|
background-color: ${_t.backgroundColor};
|
|
615
615
|
-webkit-mask-image: radial-gradient(white, black);
|
|
@@ -668,7 +668,7 @@ const le=Symbol.for(""),he=t=>{if((null==t?void 0:t.r)===le)return null==t?void
|
|
|
668
668
|
.ft-switch-option--input:checked + .ft-switch-option--content ft-icon {
|
|
669
669
|
color: ${_t.selectedTextColor};
|
|
670
670
|
}
|
|
671
|
-
`;var Ee=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ae extends CustomEvent{constructor(){super("option-change",{bubbles:!0,composed:!0})}}class Be extends e.FtLitElement{constructor(){super(...arguments),this.value="",this.iconVariant=
|
|
671
|
+
`;var Ee=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ae extends CustomEvent{constructor(){super("option-change",{bubbles:!0,composed:!0})}}class Be extends e.FtLitElement{constructor(){super(...arguments),this.value="",this.iconVariant=ve.material,this.label="",this.tooltipPosition="bottom",this.selected=!1,this.trailingIcon=!1,this.unselectable=!1}focus(){this.input.focus()}updated(t){super.updated(t),t.has("selected")&&this.dispatchEvent(new Ae)}render(){const t={"ft-switch-option":!0,"ft-switch-option--trailing-icon":this.trailingIcon};return this.addTooltip(i.html`
|
|
672
672
|
<label part="label" for="input" class=${n.classMap(t)}
|
|
673
673
|
@click=${this.onChange}>
|
|
674
674
|
<input id="input" type="radio" class="ft-switch-option--input"
|
|
@@ -1037,7 +1037,7 @@ const le=Symbol.for(""),he=t=>{if((null==t?void 0:t.r)===le)return null==t?void
|
|
|
1037
1037
|
<div></div>
|
|
1038
1038
|
<div></div>
|
|
1039
1039
|
</div>
|
|
1040
|
-
`}}ti.styles=bt,e.customElement("ft-loader")(ti);var ei=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ii extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=
|
|
1040
|
+
`}}ti.styles=bt,e.customElement("ft-loader")(ti);var ei=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ii extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=ve.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(i.html`
|
|
1041
1041
|
<button part="button"
|
|
1042
1042
|
class="${n.classMap(t)}"
|
|
1043
1043
|
aria-label="${this.getLabel()}"
|
|
@@ -1060,7 +1060,7 @@ const le=Symbol.for(""),he=t=>{if((null==t?void 0:t.r)===le)return null==t?void
|
|
|
1060
1060
|
</ft-tooltip>
|
|
1061
1061
|
`:t}resolveIcon(){return this.loading?i.html`
|
|
1062
1062
|
<ft-loader></ft-loader> `:this.icon?i.html`
|
|
1063
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:i.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}ii.elementDefinitions={"ft-ripple":Ce,"ft-tooltip":Oe,"ft-typography":xe,"ft-icon":me,"ft-loader":ti},ii.styles=[e.safariEllipsisFix,kt],ei([o.property({type:Boolean})],ii.prototype,"primary",void 0),ei([o.property({type:Boolean})],ii.prototype,"outlined",void 0),ei([o.property({type:Boolean})],ii.prototype,"disabled",void 0),ei([o.property({type:Boolean})],ii.prototype,"dense",void 0),ei([o.property({type:Boolean})],ii.prototype,"round",void 0),ei([o.property({type:String})],ii.prototype,"label",void 0),ei([o.property({type:String})],ii.prototype,"icon",void 0),ei([o.property({type:String})],ii.prototype,"iconVariant",void 0),ei([o.property({type:Boolean})],ii.prototype,"trailingIcon",void 0),ei([o.property({type:Boolean})],ii.prototype,"loading",void 0),ei([o.property({type:String})],ii.prototype,"tooltipPosition",void 0),ei([o.property({type:Boolean})],ii.prototype,"hideTooltip",void 0),ei([o.property({type:Boolean})],ii.prototype,"forceTooltip",void 0),ei([o.query(".ft-button")],ii.prototype,"button",void 0),ei([o.query(".ft-button--label slot")],ii.prototype,"slottedContent",void 0),e.customElement("ft-button")(ii);var oi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class si extends e.FtLitElement{constructor(){super(...arguments),this.editorMode=!1,this.hideTitle=!1,this.ratingAllowed=!1,this.feedbackMessage="",this.iconVariant=
|
|
1063
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:i.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}ii.elementDefinitions={"ft-ripple":Ce,"ft-tooltip":Oe,"ft-typography":xe,"ft-icon":me,"ft-loader":ti},ii.styles=[e.safariEllipsisFix,kt],ei([o.property({type:Boolean})],ii.prototype,"primary",void 0),ei([o.property({type:Boolean})],ii.prototype,"outlined",void 0),ei([o.property({type:Boolean})],ii.prototype,"disabled",void 0),ei([o.property({type:Boolean})],ii.prototype,"dense",void 0),ei([o.property({type:Boolean})],ii.prototype,"round",void 0),ei([o.property({type:String})],ii.prototype,"label",void 0),ei([o.property({type:String})],ii.prototype,"icon",void 0),ei([o.property({type:String})],ii.prototype,"iconVariant",void 0),ei([o.property({type:Boolean})],ii.prototype,"trailingIcon",void 0),ei([o.property({type:Boolean})],ii.prototype,"loading",void 0),ei([o.property({type:String})],ii.prototype,"tooltipPosition",void 0),ei([o.property({type:Boolean})],ii.prototype,"hideTooltip",void 0),ei([o.property({type:Boolean})],ii.prototype,"forceTooltip",void 0),ei([o.query(".ft-button")],ii.prototype,"button",void 0),ei([o.query(".ft-button--label slot")],ii.prototype,"slottedContent",void 0),e.customElement("ft-button")(ii);var oi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class si extends e.FtLitElement{constructor(){super(...arguments),this.editorMode=!1,this.hideTitle=!1,this.ratingAllowed=!1,this.feedbackMessage="",this.iconVariant=ve.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN"}get canAccessFeedback(){return this.user&&this.user.roles.includes("FEEDBACK_USER")}get canAccessRating(){return this.userHasRatingRole&&"NO_RATING"!==this.configuredRatingType}get userHasRatingRole(){return this.user&&this.user.roles.includes("RATING_USER")}get configuredRatingType(){var t,e;return null!==(e=this.ratingAllowed?null===(t=this.ratingSummary)||void 0===t?void 0:t.type:"NO_RATING")&&void 0!==e?e:"NO_RATING"}get ratingType(){var t,e,i;return null!==(i=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.type)&&void 0!==i?i:"NO_RATING"}get ratingValue(){var t,e,i;return null!==(i=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.value)&&void 0!==i?i:-1}get ratingDate(){var t,i;const o=null===(i=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===i?void 0:i.date;return"string"==typeof o?e.parseDate(o):o}render(){return this.editorMode||this.canAccessFeedback||this.canAccessRating?i.html`
|
|
1064
1064
|
<div class="ft-reader-feedback">
|
|
1065
1065
|
${this.hideTitle?i.nothing:i.html`
|
|
1066
1066
|
<ft-typography variant="title" part="main-title">
|
|
@@ -1080,7 +1080,7 @@ const le=Symbol.for(""),he=t=>{if((null==t?void 0:t.r)===le)return null==t?void
|
|
|
1080
1080
|
${this.renderRatingDate()}
|
|
1081
1081
|
</ft-typography>
|
|
1082
1082
|
</div>
|
|
1083
|
-
`:this.placeholderInEditor("Rating unavailable: "+(this.userHasRatingRole?"no rating configured for this content":"missing role RATING_USER"))}renderRatingDate(){const t=this.ratingDate;if(null==t)return this.labelResolver.resolve("notRated");if(t.getTime()>(new Date).getTime()-6e4)return this.labelResolver.resolve("ratedNow");return(new Date).toLocaleDateString()===t.toLocaleDateString()?this.labelResolver.resolve("ratedToday"):this.labelResolver.resolve("ratedOn",t)}renderRating(){switch(this.configuredRatingType){case"STARS":return i.html`
|
|
1083
|
+
`:this.placeholderInEditor("Rating unavailable: "+(this.userHasRatingRole?"no rating configured for this content.":"missing role RATING_USER."))}renderRatingDate(){const t=this.ratingDate;if(null==t)return this.labelResolver.resolve("notRated");if(t.getTime()>(new Date).getTime()-6e4)return this.labelResolver.resolve("ratedNow");return(new Date).toLocaleDateString()===t.toLocaleDateString()?this.labelResolver.resolve("ratedToday"):this.labelResolver.resolve("ratedOn",t)}renderRating(){switch(this.configuredRatingType){case"STARS":return i.html`
|
|
1084
1084
|
<div class="ft-reader-feedback--stars" part="rating rating-stars">
|
|
1085
1085
|
${r.repeat(new Array(5),((t,e)=>e),((t,e)=>{let o="STARS"===this.ratingType&&this.ratingValue>e;const s=e+1;return i.html`
|
|
1086
1086
|
<ft-button round part="rating-stars-${s}"
|
|
@@ -1144,15 +1144,15 @@ const le=Symbol.for(""),he=t=>{if((null==t?void 0:t.r)===le)return null==t?void
|
|
|
1144
1144
|
></ft-text-area>
|
|
1145
1145
|
${e}
|
|
1146
1146
|
</div>
|
|
1147
|
-
`}return this.placeholderInEditor("Feedback unavailable: missing role FEEDBACK_USER")}sendFeedback(){this.dispatchEvent(new CustomEvent("send-feedback",{detail:this.feedbackInput.value}))}placeholderInEditor(t){return this.editorMode?i.html`
|
|
1147
|
+
`}return this.placeholderInEditor("Feedback unavailable: missing role FEEDBACK_USER.")}sendFeedback(){this.dispatchEvent(new CustomEvent("send-feedback",{detail:this.feedbackInput.value}))}placeholderInEditor(t){return this.editorMode?i.html`
|
|
1148
1148
|
<div class="ft-reader-feedback--placeholder">
|
|
1149
1149
|
<ft-typography variant="caption">${t}</ft-typography>
|
|
1150
1150
|
<ft-tooltip position="left"
|
|
1151
|
-
text="This
|
|
1151
|
+
text="This notice will not appear outside this designer.">
|
|
1152
1152
|
<ft-icon>INFO</ft-icon>
|
|
1153
1153
|
</ft-tooltip>
|
|
1154
1154
|
</div>
|
|
1155
|
-
`:i.nothing}clearFeedbackInput(){setTimeout((()=>this.feedbackInput.value=""),0)}}si.elementDefinitions={"ft-button":ii,"ft-typography":xe,"ft-icon":me,"ft-tooltip":Oe,"ft-switch":Me,"ft-switch-option":Be,"ft-text-area":Qe},si.styles=
|
|
1155
|
+
`:i.nothing}clearFeedbackInput(){setTimeout((()=>this.feedbackInput.value=""),0)}}si.elementDefinitions={"ft-button":ii,"ft-typography":xe,"ft-icon":me,"ft-tooltip":Oe,"ft-switch":Me,"ft-switch-option":Be,"ft-text-area":Qe},si.styles=zt,oi([o.property({attribute:!0})],si.prototype,"editorMode",void 0),oi([o.property({type:Boolean})],si.prototype,"hideTitle",void 0),oi([o.property({type:Boolean})],si.prototype,"ratingAllowed",void 0),oi([o.property({attribute:!1})],si.prototype,"labelResolver",void 0),oi([o.property({attribute:!1})],si.prototype,"ratingSummary",void 0),oi([o.property({attribute:!1})],si.prototype,"user",void 0),oi([o.query(".ft-reader-feedback--feedback-input")],si.prototype,"feedbackInput",void 0),oi([o.state()],si.prototype,"feedbackMessage",void 0),oi([o.property()],si.prototype,"iconVariant",void 0),oi([o.property()],si.prototype,"emptyStarIcon",void 0),oi([o.property()],si.prototype,"filledStarIcon",void 0),oi([o.property()],si.prototype,"emptyLikeIcon",void 0),oi([o.property()],si.prototype,"filledLikeIcon",void 0),oi([o.property()],si.prototype,"emptyDislikeIcon",void 0),oi([o.property()],si.prototype,"filledDislikeIcon",void 0),oi([o.property()],si.prototype,"feedbackMailLinkBuilder",void 0);const ni={starsRating:"{0} stars","starsRating[\\=1]":"1 star",like:"Like",dislike:"Dislike",dichotomousYes:"Yes",dichotomousNo:"No",notRated:"Not rated",ratedNow:"Rated now",ratedToday:"Rated today",ratedOn:"Rated on {0, date}",feedbackInputLabel:"How can we improve it?",okButton:"Send feedback",cancelButton:"Cancel",feedbackSuccess:"Feedback successfully sent. Thank you!",feedbackFailure:"Failed to send feedback. Please try again later.",ratingSuccess:"Rating successfully sent. Thank you!",ratingFailure:"Failed to send rating. Please try again later.",feedbackAndRatingDisabledInEditor:"Feedback and ratings performed here are not taken into account."},ri={...ni,feedbackMainTitle:"Send feedback",ratingSectionTitle:"Rate this document",dichotomousRatingSectionTitle:"Did it solve your problem?",feedbackSectionTitle:"Write your review",mailSubject:"Feedback about “{0}”"},ai={...ni,feedbackMainTitle:"Send feedback",ratingSectionTitle:"Rate this content",dichotomousRatingSectionTitle:"Did this content solve your problem?",feedbackSectionTitle:"Write your review",mailSubject:"Feedback about “{0}” in “{1}”"},li=new e.ParametrizedLabelResolver(ai,{}),hi=new e.ParametrizedLabelResolver(ri,{});class di{constructor(t){this.disclaimer=t,this.subject="",this.url="",this.allMetadata="",this.subjectMetadata="",this.isAuthenticated=!1}update(t,e,i,o,s){this.subject=t,this.url=e,this.configuration=o,this.isAuthenticated=s,this.subjectMetadata=o.subjectMetadataIds.map((t=>i.find((e=>e.key===t)))).filter((t=>null!=t)).map((t=>"["+t.values.join(", ")+"]")).join(""),this.allMetadata=i.filter((t=>!t.key.startsWith("ft:"))).map((t=>"["+t.values.join(", ")+"]")).join(" ")}build(t){var e,i;if(0===t.length||this.isAuthenticated&&(null==this.configuration||(null===(e=this.configuration)||void 0===e?void 0:e.mailsSentByFluidTopics)))return;const o=encodeURIComponent(this.subject+" "+this.subjectMetadata),s=encodeURIComponent(`\n${this.allMetadata}\n${this.url}\n_________________________________________________________________\n\n${t}\n\n_________________________________________________________________\n${this.disclaimer}`);return`mailto:${null===(i=this.configuration)||void 0===i?void 0:i.recipients.join(",")}?subject=${o}&body=${s}`}}var pi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class fi extends h{constructor(){super(...arguments),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=ve.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new di(hi.resolve("mailDisclaimer")),this.updateDebouncer=new e.Debouncer(100),this.sendRatingDebouncer=new e.Debouncer(500)}render(){return null==this.map?i.nothing:i.html`
|
|
1156
1156
|
<ft-reader-feedback
|
|
1157
1157
|
ratingAllowed
|
|
1158
1158
|
.editorMode=${this.editorMode}
|
|
@@ -1171,7 +1171,7 @@ const le=Symbol.for(""),he=t=>{if((null==t?void 0:t.r)===le)return null==t?void
|
|
|
1171
1171
|
@rate=${this.rate}
|
|
1172
1172
|
@send-feedback=${this.sendFeedback}
|
|
1173
1173
|
></ft-reader-feedback>
|
|
1174
|
-
`}updated(t){var e,i,o;super.updated(t),t.has("map")&&this.map&&this.updateData(),["map","configuration","user"].some((e=>t.has(e)))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(hi.resolve("mailSubject",this.map.title),null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink())&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(o=this.user)||void 0===o?void 0:o.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}onStoreAvailable(t){super.onStoreAvailable(t),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e;this.user=await(null===(t=this.service)||void 0===t?void 0:t.getSession().then((t=>t.profile))),this.map&&(this.ratingSummary=await(null===(
|
|
1174
|
+
`}updated(t){var e,i,o;super.updated(t),t.has("map")&&this.map&&this.updateData(),["map","configuration","user"].some((e=>t.has(e)))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(hi.resolve("mailSubject",this.map.title),null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink())&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(o=this.user)||void 0===o?void 0:o.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}onStoreAvailable(t){super.onStoreAvailable(t),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e,i;this.user=await(null===(t=this.service)||void 0===t?void 0:t.getSession().then((t=>t.profile))),this.map&&((null===(e=this.user)||void 0===e?void 0:e.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(i=this.service)||void 0===i?void 0:i.getMapRating()))}))}rate(t){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var i,o,s;if(!this.editorMode&&this.ratingSummary){try{null==t?await(null===(i=this.service)||void 0===i?void 0:i.unrateMap()):await(null===(o=this.service)||void 0===o?void 0:o.rateMap(null===(s=this.ratingSummary)||void 0===s?void 0:s.type,t))}catch{this.dispatchEvent(new e.FtNotificationEvent({type:"error",message:hi.resolve("ratingFailure")}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:hi.resolve("feedbackAndRatingDisabledInEditor")}))}async sendFeedback(t){var i;try{this.editorMode?this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:hi.resolve("feedbackAndRatingDisabledInEditor")})):(await(null===(i=this.service)||void 0===i?void 0:i.sendMapFeedback(t.detail)),this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:hi.resolve("feedbackSuccess")}))),this.readerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new e.FtNotificationEvent({type:"error",message:hi.resolve("feedbackFailure")}))}}}fi.elementDefinitions={"ft-reader-feedback":si},pi([e.redux()],fi.prototype,"map",void 0),pi([o.property({attribute:!1})],fi.prototype,"editorMode",void 0),pi([e.redux((t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}))],fi.prototype,"configuration",void 0),pi([o.state()],fi.prototype,"ratingSummary",void 0),pi([o.state()],fi.prototype,"user",void 0),pi([o.property({type:Boolean})],fi.prototype,"hideTitle",void 0),pi([o.property()],fi.prototype,"iconVariant",void 0),pi([o.property()],fi.prototype,"emptyStarIcon",void 0),pi([o.property()],fi.prototype,"filledStarIcon",void 0),pi([o.property()],fi.prototype,"emptyLikeIcon",void 0),pi([o.property()],fi.prototype,"filledLikeIcon",void 0),pi([o.property()],fi.prototype,"emptyDislikeIcon",void 0),pi([o.property()],fi.prototype,"filledDislikeIcon",void 0),pi([o.query("ft-reader-feedback")],fi.prototype,"readerFeedback",void 0);var ci=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ui extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}class bi extends(function(t){class e extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this.registerIntervalTopic=0}connectedCallback(){super.connectedCallback(),this.registerIntervalTopic=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this.registerIntervalTopic):this.dispatchEvent(new ui)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return ci([o.state()],e.prototype,"tocNode",void 0),ci([o.state()],e.prototype,"disableContextInteractions",void 0),e}(h)){}var vi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class gi extends bi{constructor(){super(...arguments),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=ve.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new di(li.resolve("mailDisclaimer")),this.sendRatingDebouncer=new e.Debouncer(500)}render(){return null==this.map||null==this.tocNode?i.nothing:i.html`
|
|
1175
1175
|
<ft-reader-feedback
|
|
1176
1176
|
?ratingAllowed=${this.tocNode.hasRating}
|
|
1177
1177
|
.editorMode=${this.editorMode}
|
|
@@ -1190,4 +1190,4 @@ const le=Symbol.for(""),he=t=>{if((null==t?void 0:t.r)===le)return null==t?void
|
|
|
1190
1190
|
@rate=${this.rate}
|
|
1191
1191
|
@send-feedback=${this.sendFeedback}
|
|
1192
1192
|
></ft-reader-feedback>
|
|
1193
|
-
`}updated(t){var e,i,o;super.updated(t),t.has("tocNode")&&this.tocNode&&this.updateData(),["map","tocNode","configuration","user"].some((e=>t.has(e)))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(li.resolve("mailSubject",this.tocNode.title,this.map.title),null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink(this.tocNode.tocId))&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(o=this.user)||void 0===o?void 0:o.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}async updateData(){var t,e;this.user=await(null===(t=this.service)||void 0===t?void 0:t.getSession().then((t=>t.profile))),this.tocNode&&(this.ratingSummary=await(null===(
|
|
1193
|
+
`}updated(t){var e,i,o;super.updated(t),t.has("tocNode")&&this.tocNode&&this.updateData(),["map","tocNode","configuration","user"].some((e=>t.has(e)))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(li.resolve("mailSubject",this.tocNode.title,this.map.title),null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink(this.tocNode.tocId))&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(o=this.user)||void 0===o?void 0:o.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}async updateData(){var t,e,i;this.user=await(null===(t=this.service)||void 0===t?void 0:t.getSession().then((t=>t.profile))),this.tocNode&&((null===(e=this.user)||void 0===e?void 0:e.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(i=this.service)||void 0===i?void 0:i.getTopicRating(this.tocNode.tocId)))}rate(t){this.ratingSummary&&this.tocNode&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{tocId:this.tocNode.tocId,type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var i,o,s;if(!this.editorMode&&this.ratingSummary&&this.tocNode){try{null==t?await(null===(i=this.service)||void 0===i?void 0:i.unrateTopic(this.tocNode.tocId)):await(null===(o=this.service)||void 0===o?void 0:o.rateTopic(this.tocNode.tocId,null===(s=this.ratingSummary)||void 0===s?void 0:s.type,t))}catch{this.dispatchEvent(new e.FtNotificationEvent({type:"error",message:li.resolve("ratingFailure")}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:li.resolve("feedbackAndRatingDisabledInEditor")}))}async sendFeedback(t){var i;try{!this.editorMode&&this.tocNode?(await(null===(i=this.service)||void 0===i?void 0:i.sendTopicFeedback(this.tocNode.tocId,t.detail)),this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:li.resolve("feedbackSuccess")})),this.readerFeedback.clearFeedbackInput()):this.editorMode&&this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:li.resolve("feedbackAndRatingDisabledInEditor")}))}catch{this.dispatchEvent(new e.FtNotificationEvent({type:"error",message:li.resolve("feedbackFailure")}))}}}gi.elementDefinitions={"ft-reader-feedback":si},vi([e.redux()],gi.prototype,"map",void 0),vi([o.property({attribute:!1})],gi.prototype,"editorMode",void 0),vi([e.redux((t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}))],gi.prototype,"configuration",void 0),vi([o.state()],gi.prototype,"ratingSummary",void 0),vi([o.state()],gi.prototype,"user",void 0),vi([o.property({type:Boolean})],gi.prototype,"hideTitle",void 0),vi([o.property()],gi.prototype,"iconVariant",void 0),vi([o.property()],gi.prototype,"emptyStarIcon",void 0),vi([o.property()],gi.prototype,"filledStarIcon",void 0),vi([o.property()],gi.prototype,"emptyLikeIcon",void 0),vi([o.property()],gi.prototype,"filledLikeIcon",void 0),vi([o.property()],gi.prototype,"emptyDislikeIcon",void 0),vi([o.property()],gi.prototype,"filledDislikeIcon",void 0),vi([o.query("ft-reader-feedback")],gi.prototype,"readerFeedback",void 0),e.customElement("ft-reader-map-feedback")(fi),e.customElement("ft-reader-topic-feedback")(gi),t.FtReaderFeedbackCssVariables=St,t.FtReaderMapFeedback=fi,t.FtReaderTopicFeedback=gi,t.styles=zt,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML,ftGlobals.litClassMap,ftGlobals.litRepeat);
|