@fluid-topics/ft-reader-feedback 1.0.52 → 1.0.54
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(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})}}const d=Symbol("registerInterval");class h extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[d]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[d]):this.dispatchEvent(new l)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=d,a([o.state()],i.prototype,"stateManager",void 0),i}(e.FtLitElementRedux)){}const f=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),
|
|
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})}}const d=Symbol("registerInterval");class h extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[d]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[d]):this.dispatchEvent(new l)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=d,a([o.state()],i.prototype,"stateManager",void 0),i}(e.FtLitElementRedux)){}const f=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),c={color:f,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",f),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"),borderRadius:e.FtCssVariableFactory.create("--ft-ripple-border-radius","SIZE","0px")},p=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),u=p,v=e.FtCssVariableFactory.extend("--ft-ripple-background-color",p),b=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),g=b,x=e.FtCssVariableFactory.extend("--ft-ripple-background-color",b),y=i.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
13
13
|
overflow: hidden;
|
|
14
|
-
border-radius: ${
|
|
14
|
+
border-radius: ${c.borderRadius};
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.ft-ripple .ft-ripple--background,
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.ft-ripple .ft-ripple--background {
|
|
24
|
-
background-color: ${
|
|
24
|
+
background-color: ${c.backgroundColor};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.ft-ripple .ft-ripple--effect {
|
|
28
|
-
background-color: ${
|
|
28
|
+
background-color: ${c.color};
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
@@ -73,22 +73,22 @@
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
76
|
-
opacity: ${
|
|
76
|
+
opacity: ${c.opacityContentOnSurfaceHover};
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
80
|
-
opacity: ${
|
|
80
|
+
opacity: ${c.opacityContentOnSurfaceSelected};
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
84
|
-
opacity: ${
|
|
84
|
+
opacity: ${c.opacityContentOnSurfaceFocused};
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
88
|
-
opacity: ${
|
|
88
|
+
opacity: ${c.opacityContentOnSurfacePressed};
|
|
89
89
|
transform: translate(-50%, -50%) scale(1);
|
|
90
90
|
}
|
|
91
|
-
`,m=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),$=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),w={fontFamily:$,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")},k={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-title-font-family",m),fontSize:e.FtCssVariableFactory.extend("--ft-typography-title-font-size",w.fontSize,"20px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",w.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",w.letterSpacing,"0.15px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-title-line-height",w.lineHeight,"1.2"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",w.textTransform,"inherit")},S={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",m),fontSize:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",w.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",w.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",w.letterSpacing,"0.105px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",w.lineHeight,"1.7"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",w.textTransform,"inherit")},_=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",$),I=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",w.fontSize,"16px"),C=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",w.fontWeight,"600"),z=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",w.letterSpacing,"0.144px"),T=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",w.lineHeight,"1.5"),
|
|
91
|
+
`,m=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),$=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),w={fontFamily:$,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")},k={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-title-font-family",m),fontSize:e.FtCssVariableFactory.extend("--ft-typography-title-font-size",w.fontSize,"20px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",w.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",w.letterSpacing,"0.15px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-title-line-height",w.lineHeight,"1.2"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",w.textTransform,"inherit")},S={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",m),fontSize:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",w.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",w.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",w.letterSpacing,"0.105px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",w.lineHeight,"1.7"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",w.textTransform,"inherit")},_=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",$),I=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",w.fontSize,"16px"),C=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",w.fontWeight,"600"),z=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",w.letterSpacing,"0.144px"),T=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",w.lineHeight,"1.5"),O=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",w.textTransform,"inherit"),E=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",$),R=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",w.fontSize,"14px"),D=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",w.fontWeight,"normal"),N=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",w.letterSpacing,"0.098px"),A=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",w.lineHeight,"1.7"),B=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",w.textTransform,"inherit"),M={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",$),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",w.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",w.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",w.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",w.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",w.textTransform,"inherit")},U=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",$),j=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",w.fontSize,"14px"),F=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",w.fontWeight,"normal"),L=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",w.letterSpacing,"0.252px"),P=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",w.lineHeight,"1.4"),Z=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",w.textTransform,"inherit"),H={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",$),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",w.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",w.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",w.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",w.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",w.textTransform,"inherit")},W=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",$),V=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",w.fontSize,"10px"),G=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",w.fontWeight,"normal"),K=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",w.letterSpacing,"0.33px"),Y=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",w.lineHeight,"1.6"),q=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",w.textTransform,"inherit"),X=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",$),J=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",w.fontSize,"10px"),Q=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",w.fontWeight,"normal"),tt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",w.letterSpacing,"1.5px"),et=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",w.lineHeight,"1.6"),it=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",w.textTransform,"uppercase"),ot={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-button-font-family",$),fontSize:e.FtCssVariableFactory.extend("--ft-typography-button-font-size",w.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",w.fontWeight,"600"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",w.letterSpacing,"1.246px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-button-line-height",w.lineHeight,"1.15"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",w.textTransform,"uppercase")},st=i.css`
|
|
92
92
|
.ft-typography--title {
|
|
93
93
|
font-family: ${k.fontFamily};
|
|
94
94
|
font-size: ${k.fontSize};
|
|
@@ -113,11 +113,11 @@
|
|
|
113
113
|
font-weight: ${C};
|
|
114
114
|
letter-spacing: ${z};
|
|
115
115
|
line-height: ${T};
|
|
116
|
-
text-transform: ${
|
|
116
|
+
text-transform: ${O};
|
|
117
117
|
}
|
|
118
118
|
`,at=i.css`
|
|
119
119
|
.ft-typography--subtitle2 {
|
|
120
|
-
font-family: ${
|
|
120
|
+
font-family: ${E};
|
|
121
121
|
font-size: ${R};
|
|
122
122
|
font-weight: ${D};
|
|
123
123
|
letter-spacing: ${N};
|
|
@@ -154,14 +154,14 @@
|
|
|
154
154
|
}
|
|
155
155
|
`,ft=i.css`
|
|
156
156
|
.ft-typography--breadcrumb {
|
|
157
|
-
font-family: ${
|
|
158
|
-
font-size: ${
|
|
157
|
+
font-family: ${W};
|
|
158
|
+
font-size: ${V};
|
|
159
159
|
font-weight: ${G};
|
|
160
160
|
letter-spacing: ${K};
|
|
161
161
|
line-height: ${Y};
|
|
162
162
|
text-transform: ${q};
|
|
163
163
|
}
|
|
164
|
-
`,
|
|
164
|
+
`,ct=i.css`
|
|
165
165
|
.ft-typography--overline {
|
|
166
166
|
font-family: ${X};
|
|
167
167
|
font-size: ${J};
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
line-height: ${et};
|
|
171
171
|
text-transform: ${it};
|
|
172
172
|
}
|
|
173
|
-
`,
|
|
173
|
+
`,pt=i.css`
|
|
174
174
|
.ft-typography--button {
|
|
175
175
|
font-family: ${ot.fontFamily};
|
|
176
176
|
font-size: ${ot.fontSize};
|
|
@@ -343,7 +343,7 @@
|
|
|
343
343
|
--ft-button-internal-line-height: max(calc(${mt.fontSize} + 2px), ${mt.iconSize});
|
|
344
344
|
--ft-button-internal-color: ${mt.color};
|
|
345
345
|
${e.setVariable(gt.size,mt.iconSize)};
|
|
346
|
-
${e.setVariable(
|
|
346
|
+
${e.setVariable(c.color,mt.rippleColor)};
|
|
347
347
|
|
|
348
348
|
border-radius: ${mt.borderRadius};
|
|
349
349
|
padding: ${mt.verticalPadding} ${mt.horizontalPadding};
|
|
@@ -387,7 +387,7 @@
|
|
|
387
387
|
.ft-button.ft-button--primary {
|
|
388
388
|
background-color: ${wt.backgroundColor};
|
|
389
389
|
--ft-button-internal-color: ${wt.color};
|
|
390
|
-
${e.setVariable(
|
|
390
|
+
${e.setVariable(c.color,wt.rippleColor)};
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
.ft-button:focus {
|
|
@@ -437,7 +437,7 @@
|
|
|
437
437
|
${e.setVariable(vt.size,mt.iconSize)};
|
|
438
438
|
${e.setVariable(vt.color,"var(--ft-button-internal-color)")};
|
|
439
439
|
}
|
|
440
|
-
`,e.noTextSelect],zt={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",ot.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)},Tt={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(k.fontSize,"Typography"),sectionTitleFontSize:e.FtCssVariableFactory.external(S.fontSize,"Typography")},
|
|
440
|
+
`,e.noTextSelect],zt={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",ot.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)},Tt={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(k.fontSize,"Typography"),sectionTitleFontSize:e.FtCssVariableFactory.external(S.fontSize,"Typography")},Ot=i.css`
|
|
441
441
|
.ft-reader-feedback {
|
|
442
442
|
box-sizing: border-box;
|
|
443
443
|
display: flex;
|
|
@@ -515,7 +515,7 @@
|
|
|
515
515
|
* @license
|
|
516
516
|
* Copyright 2017 Google LLC
|
|
517
517
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
518
|
-
*/;var
|
|
518
|
+
*/;var Et;const Rt=window,Dt=Rt.trustedTypes,Nt=Dt?Dt.createPolicy("lit-html",{createHTML:t=>t}):void 0,At="$lit$",Bt=`lit$${(Math.random()+"").slice(9)}$`,Mt="?"+Bt,Ut=`<${Mt}>`,jt=document,Ft=()=>jt.createComment(""),Lt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Pt=Array.isArray,Zt="[ \t\n\f\r]",Ht=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Wt=/-->/g,Vt=/>/g,Gt=RegExp(`>|${Zt}(?:([^\\s"'>=/]+)(${Zt}*=${Zt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Kt=/'/g,Yt=/"/g,qt=/^(?:script|style|textarea|title)$/i,Xt=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),Jt=Symbol.for("lit-noChange"),Qt=Symbol.for("lit-nothing"),te=new WeakMap,ee=jt.createTreeWalker(jt,129,null,!1),ie=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=Ht;for(let e=0;e<i;e++){const i=t[e];let a,l,d=-1,h=0;for(;h<i.length&&(r.lastIndex=h,l=r.exec(i),null!==l);)h=r.lastIndex,r===Ht?"!--"===l[1]?r=Wt:void 0!==l[1]?r=Vt:void 0!==l[2]?(qt.test(l[2])&&(s=RegExp("</"+l[2],"g")),r=Gt):void 0!==l[3]&&(r=Gt):r===Gt?">"===l[0]?(r=null!=s?s:Ht,d=-1):void 0===l[1]?d=-2:(d=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?Gt:'"'===l[3]?Yt:Kt):r===Yt||r===Kt?r=Gt:r===Wt||r===Vt?r=Ht:(r=Gt,s=void 0);const f=r===Gt&&t[e+1].startsWith("/>")?" ":"";n+=r===Ht?i+Ut:d>=0?(o.push(a),i.slice(0,d)+At+i.slice(d)+Bt+f):i+Bt+(-2===d?(o.push(void 0),e):f)}const a=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==Nt?Nt.createHTML(a):a,o]};class oe{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const r=t.length-1,a=this.parts,[l,d]=ie(t,e);if(this.el=oe.createElement(l,i),ee.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=ee.nextNode())&&a.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(At)||e.startsWith(Bt)){const i=d[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+At).split(Bt),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?le:"?"===e[1]?he:"@"===e[1]?fe:ae})}else a.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(qt.test(o.tagName)){const t=o.textContent.split(Bt),e=t.length-1;if(e>0){o.textContent=Dt?Dt.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],Ft()),ee.nextNode(),a.push({type:2,index:++s});o.append(t[e],Ft())}}}else if(8===o.nodeType)if(o.data===Mt)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(Bt,t+1));)a.push({type:7,index:s}),t+=Bt.length-1}s++}}static createElement(t,e){const i=jt.createElement("template");return i.innerHTML=t,i}}function se(t,e,i=t,o){var s,n,r,a;if(e===Jt)return e;let l=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const d=Lt(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==d&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===d?l=void 0:(l=new d(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=se(t,l._$AS(t,e.values),l,o)),e}class ne{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:jt).importNode(i,!0);ee.currentNode=s;let n=ee.nextNode(),r=0,a=0,l=o[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new re(n,n.nextSibling,this,t):1===l.type?e=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(e=new ce(n,this,t)),this._$AV.push(e),l=o[++a]}r!==(null==l?void 0:l.index)&&(n=ee.nextNode(),r++)}return s}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class re{constructor(t,e,i,o){var s;this.type=2,this._$AH=Qt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=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._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=se(this,t,e),Lt(t)?t===Qt||null==t||""===t?(this._$AH!==Qt&&this._$AR(),this._$AH=Qt):t!==this._$AH&&t!==Jt&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>Pt(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Qt&&Lt(this._$AH)?this._$AA.nextSibling.data=t:this.$(jt.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=oe.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(i);else{const t=new ne(s,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=te.get(t.strings);return void 0===e&&te.set(t.strings,e=new oe(t)),e}T(t){Pt(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 re(this.k(Ft()),this.k(Ft()),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._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class ae{constructor(t,e,i,o,s){this.type=1,this._$AH=Qt,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=Qt}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=se(this,t,e,0),n=!Lt(t)||t!==this._$AH&&t!==Jt,n&&(this._$AH=t);else{const o=t;let r,a;for(t=s[0],r=0;r<s.length-1;r++)a=se(this,o[i+r],e,r),a===Jt&&(a=this._$AH[r]),n||(n=!Lt(a)||a!==this._$AH[r]),a===Qt?t=Qt:t!==Qt&&(t+=(null!=a?a:"")+s[r+1]),this._$AH[r]=a}n&&!o&&this.j(t)}j(t){t===Qt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class le extends ae{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Qt?void 0:t}}const de=Dt?Dt.emptyScript:"";class he extends ae{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Qt?this.element.setAttribute(this.name,de):this.element.removeAttribute(this.name)}}class fe extends ae{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=se(this,t,e,0))&&void 0!==i?i:Qt)===Jt)return;const o=this._$AH,s=t===Qt&&o!==Qt||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==Qt&&(o===Qt||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 ce{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){se(this,t)}}const pe=Rt.litHtmlPolyfillSupport;null==pe||pe(oe,re),(null!==(Et=Rt.litHtmlVersions)&&void 0!==Et?Et:Rt.litHtmlVersions=[]).push("2.7.3");
|
|
519
519
|
/**
|
|
520
520
|
* @license
|
|
521
521
|
* Copyright 2020 Google LLC
|
|
@@ -528,12 +528,12 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
528
528
|
</${be(this.element)}>
|
|
529
529
|
`:xe`
|
|
530
530
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
531
|
-
`}}Se.styles=[st,nt,rt,at,lt,dt,ht,ft,pt,
|
|
531
|
+
`}}Se.styles=[st,nt,rt,at,lt,dt,ht,ft,ct,pt,ut],ke([o.property()],Se.prototype,"element",void 0),ke([o.property()],Se.prototype,"variant",void 0),e.customElement("ft-typography")(Se),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",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.EYE_SLASH="",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="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(me||(me={})),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=""}($e||($e={})),new Map([...["abw"].map((t=>[t,$e.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,$e.AUDIO])),...["avi"].map((t=>[t,$e.AVI])),...["chm","xhs"].map((t=>[t,$e.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,$e.CODE])),...["csv"].map((t=>[t,$e.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,$e.DITA])),...["epub"].map((t=>[t,$e.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,$e.EXCEL])),...["flac"].map((t=>[t,$e.FLAC])),...["gif"].map((t=>[t,$e.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,$e.GZIP])),...["html","htm","xhtml"].map((t=>[t,$e.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,$e.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,$e.JPEG])),...["json"].map((t=>[t,$e.JSON])),...["m4a","m4p"].map((t=>[t,$e.M4A])),...["mov","qt"].map((t=>[t,$e.MOV])),...["mp3"].map((t=>[t,$e.MP3])),...["mp4","m4v"].map((t=>[t,$e.MP4])),...["ogg","oga"].map((t=>[t,$e.OGG])),...["pdf","ps"].map((t=>[t,$e.PDF])),...["png"].map((t=>[t,$e.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,$e.POWERPOINT])),...["rar"].map((t=>[t,$e.RAR])),...["stp"].map((t=>[t,$e.STP])),...["txt","rtf","md","mdown"].map((t=>[t,$e.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,$e.VIDEO])),...["wav"].map((t=>[t,$e.WAV])),...["wma"].map((t=>[t,$e.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,$e.WORD])),...["xml","xsl","rdf"].map((t=>[t,$e.XML])),...["yaml","yml","x-yaml"].map((t=>[t,$e.YAML])),...["zip"].map((t=>[t,$e.ZIP]))]),function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(we||(we={}));var _e=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 Ie extends e.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=i.nothing}render(){const t=this.variant&&Object.values(we).includes(this.variant)?this.variant:we.fluid_topics,e=t!==we.material||!!this.value;return i.html`
|
|
532
532
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
533
533
|
${s.unsafeHTML(this.resolvedIcon)}
|
|
534
534
|
<slot ?hidden=${e}></slot>
|
|
535
535
|
</i>
|
|
536
|
-
`}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 we.file_format:this.resolvedIcon=null!==(t=$e[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case we.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=me[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ie.elementDefinitions={},Ie.styles=xt,_e([o.property()],Ie.prototype,"variant",void 0),_e([o.property()],Ie.prototype,"value",void 0),_e([o.state()],Ie.prototype,"resolvedIcon",void 0),_e([o.query("slot")],Ie.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Ie);const Ce=e.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),ze=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),Te=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),
|
|
536
|
+
`}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 we.file_format:this.resolvedIcon=null!==(t=$e[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case we.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=me[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ie.elementDefinitions={},Ie.styles=xt,_e([o.property()],Ie.prototype,"variant",void 0),_e([o.property()],Ie.prototype,"value",void 0),_e([o.state()],Ie.prototype,"resolvedIcon",void 0),_e([o.query("slot")],Ie.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Ie);const Ce=e.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),ze=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),Te=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),Oe=e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","100"),Ee=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),Re=e.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),De=i.css`
|
|
537
537
|
.ft-tooltip--container {
|
|
538
538
|
display: block;
|
|
539
539
|
}
|
|
@@ -551,12 +551,12 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
551
551
|
max-width: ${Re};
|
|
552
552
|
text-align: center;
|
|
553
553
|
padding: ${Ce};
|
|
554
|
-
z-index: ${
|
|
554
|
+
z-index: ${Oe};
|
|
555
555
|
}
|
|
556
556
|
|
|
557
557
|
.ft-tooltip--content {
|
|
558
558
|
padding: 4px 8px;
|
|
559
|
-
border-radius: ${
|
|
559
|
+
border-radius: ${Ee};
|
|
560
560
|
background-color: ${Te};
|
|
561
561
|
color: ${ze};
|
|
562
562
|
position: relative;
|
|
@@ -580,7 +580,7 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
580
580
|
</div>
|
|
581
581
|
</div>
|
|
582
582
|
</div>
|
|
583
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.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=this.tooltip.offsetWidth,i=this.tooltip.offsetHeight,o=(t.offsetHeight-i)/2,s=(t.offsetWidth-e)/2;let n=0,r=0;switch(this.validPosition){case"top":r=t.offsetTop-i,n=t.offsetLeft+s;break;case"bottom":r=t.offsetTop+t.offsetHeight,n=t.offsetLeft+s;break;case"left":r=t.offsetTop+o,n=t.offsetLeft-e;break;case"right":r=t.offsetTop+o,n=t.offsetLeft+t.offsetWidth}const a=this.tooltip.style;a.left=this.
|
|
583
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.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=this.tooltip.offsetWidth,i=this.tooltip.offsetHeight,o=(t.offsetHeight-i)/2,s=(t.offsetWidth-e)/2;let n=0,r=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":r=t.offsetTop-i-this.tooltip.offsetTop,n=t.offsetLeft+s-this.tooltip.offsetLeft;break;case"bottom":r=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,n=t.offsetLeft+s-this.tooltip.offsetLeft;break;case"left":r=t.offsetTop+o-this.tooltip.offsetTop,n=t.offsetLeft-e-this.tooltip.offsetLeft;break;case"right":r=t.offsetTop+o-this.tooltip.offsetTop,n=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const a=this.tooltip.style;a.left=n+"px",a.top=r+"px";const l=this.tooltip.getBoundingClientRect();let d=-l.x,h=l.x+l.width-window.innerWidth;a.left=n+Math.round(this.correctOutOfWindowPixels(d,h))+"px";let f=-l.y,c=l.y+l.height-window.innerHeight;a.top=r+Math.round(this.correctOutOfWindowPixels(f,c))+"px",a.maxWidth=`max(${t.offsetWidth}px, ${Re})`}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())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}Ae.elementDefinitions={"ft-typography":Se},Ae.styles=De,Ne([o.property()],Ae.prototype,"text",void 0),Ne([o.property({type:Boolean})],Ae.prototype,"manual",void 0),Ne([o.property({type:Boolean})],Ae.prototype,"inline",void 0),Ne([o.property({type:Number})],Ae.prototype,"delay",void 0),Ne([o.property()],Ae.prototype,"position",void 0),Ne([o.queryAssignedNodes("",!0)],Ae.prototype,"slotNodes",void 0),Ne([o.query(".ft-tooltip--container")],Ae.prototype,"container",void 0),Ne([o.query(".ft-tooltip")],Ae.prototype,"tooltip",void 0),Ne([o.query(".ft-tooltip--content")],Ae.prototype,"tooltipContent",void 0),Ne([o.state()],Ae.prototype,"visible",void 0),e.customElement("ft-tooltip")(Ae);var Be=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.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.isFocusVisible(null==t?void 0:t.target)&&!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`
|
|
584
584
|
<style>
|
|
585
585
|
.ft-ripple .ft-ripple--effect,
|
|
586
586
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -662,7 +662,7 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
662
662
|
}
|
|
663
663
|
|
|
664
664
|
.ft-switch-option--ripple {
|
|
665
|
-
${e.setVariable(
|
|
665
|
+
${e.setVariable(c.color,zt.rippleColor)};
|
|
666
666
|
}
|
|
667
667
|
|
|
668
668
|
ft-icon, ft-ripple, ft-typography {
|
|
@@ -705,14 +705,14 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
705
705
|
</ft-tooltip>
|
|
706
706
|
`}onChange(){this.selected=!this.unselectable||!this.selected,this.dispatchEvent(new Le(this.selected))}getLabel(){return this.label||this.textContent}resolveIcon(){return this.icon?i.html`
|
|
707
707
|
<ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
|
|
708
|
-
`:i.nothing}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:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}Ze.elementDefinitions={"ft-ripple":Me,"ft-typography":Se,"ft-tooltip":Ae,"ft-icon":Ie},Ze.styles=[e.safariEllipsisFix,je],Fe([o.property()],Ze.prototype,"value",void 0),Fe([o.property()],Ze.prototype,"icon",void 0),Fe([o.property()],Ze.prototype,"iconVariant",void 0),Fe([o.property()],Ze.prototype,"label",void 0),Fe([o.property()],Ze.prototype,"tooltipPosition",void 0),Fe([o.property({type:Boolean,reflect:!0})],Ze.prototype,"selected",void 0),Fe([o.property({type:Boolean})],Ze.prototype,"trailingIcon",void 0),Fe([o.property({type:Boolean})],Ze.prototype,"unselectable",void 0),Fe([o.query(".ft-switch-option--content slot")],Ze.prototype,"slottedContent",void 0),Fe([o.query(".ft-switch-option--input")],Ze.prototype,"input",void 0);var He=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
|
|
708
|
+
`:i.nothing}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:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}Ze.elementDefinitions={"ft-ripple":Me,"ft-typography":Se,"ft-tooltip":Ae,"ft-icon":Ie},Ze.styles=[e.safariEllipsisFix,je],Fe([o.property()],Ze.prototype,"value",void 0),Fe([o.property()],Ze.prototype,"icon",void 0),Fe([o.property()],Ze.prototype,"iconVariant",void 0),Fe([o.property()],Ze.prototype,"label",void 0),Fe([o.property()],Ze.prototype,"tooltipPosition",void 0),Fe([o.property({type:Boolean,reflect:!0})],Ze.prototype,"selected",void 0),Fe([o.property({type:Boolean})],Ze.prototype,"trailingIcon",void 0),Fe([o.property({type:Boolean})],Ze.prototype,"unselectable",void 0),Fe([o.query(".ft-switch-option--content slot")],Ze.prototype,"slottedContent",void 0),Fe([o.query(".ft-switch-option--input")],Ze.prototype,"input",void 0);var He=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 We extends CustomEvent{constructor(t){super("change",{detail:t})}}class Ve extends e.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.unselectable=!1,this.options=[]}get value(){var t;return null===(t=this.selectedOption)||void 0===t?void 0:t.value}updated(t){super.updated(t),t.has("selectedOption")&&this.updateOptions(),t.has("unselectable")&&this.options.forEach((t=>t.unselectable=this.unselectable))}render(){const t={"ft-switch":!0,"ft-switch--dense":this.dense};return i.html`
|
|
709
709
|
<div @keydown=${this.onKeyDown} tabindex="0" class="${n.classMap(t)}">
|
|
710
710
|
<slot @slotchange=${this.onSlotchange}
|
|
711
711
|
@option-change=${this.onOptionChangeByScript}
|
|
712
712
|
@option-change-by-user=${this.onOptionChangeByUser}
|
|
713
713
|
></slot>
|
|
714
714
|
</div>
|
|
715
|
-
`}onKeyDown(t){let e;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=e&&(t.preventDefault(),this.options[this.fixIndex(e)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof Ze&&this.registerOption(t)})),this.selectedOption=this.options.find((t=>t.selected))}registerOption(t){t.setAttribute("tabindex","-1"),t.unselectable=this.unselectable,this.options.push(t)}onOptionChangeByScript(t){t.stopPropagation();let e=t.target;this.onOptionChange(e)}onOptionChangeByUser(t){var e;t.stopPropagation(),this.onOptionChange(t.target),this.dispatchEvent(new
|
|
715
|
+
`}onKeyDown(t){let e;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=e&&(t.preventDefault(),this.options[this.fixIndex(e)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof Ze&&this.registerOption(t)})),this.selectedOption=this.options.find((t=>t.selected))}registerOption(t){t.setAttribute("tabindex","-1"),t.unselectable=this.unselectable,this.options.push(t)}onOptionChangeByScript(t){t.stopPropagation();let e=t.target;this.onOptionChange(e)}onOptionChangeByUser(t){var e;t.stopPropagation(),this.onOptionChange(t.target),this.dispatchEvent(new We(null===(e=this.selectedOption)||void 0===e?void 0:e.value))}onOptionChange(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find((t=>t.selected))}private(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find((t=>t.selected))}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach((t=>{t.selected=t===this.selectedOption}))}}Ve.elementDefinitions={},Ve.styles=i.css`
|
|
716
716
|
:host {
|
|
717
717
|
display: inline-block;
|
|
718
718
|
}
|
|
@@ -746,7 +746,7 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
746
746
|
--ft-switch-internal-vertical-padding: 2px;
|
|
747
747
|
--ft-switch-internal-horizontal-padding: 4px;
|
|
748
748
|
}
|
|
749
|
-
`,He([o.property({type:Boolean})],
|
|
749
|
+
`,He([o.property({type:Boolean})],Ve.prototype,"dense",void 0),He([o.property({type:Boolean})],Ve.prototype,"unselectable",void 0),He([o.query(".ft-switch slot")],Ve.prototype,"slottedContent",void 0),He([o.state()],Ve.prototype,"selectedOption",void 0),He([o.query(".ft-switch")],Ve.prototype,"ftSwitchDiv",void 0),e.customElement("ft-switch")(Ve),e.customElement("ft-switch-option")(Ze);const Ge=e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),Ke=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),Ye=i.css`
|
|
750
750
|
:host {
|
|
751
751
|
display: block;
|
|
752
752
|
}
|
|
@@ -939,8 +939,8 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
939
939
|
}
|
|
940
940
|
|
|
941
941
|
.ft-text-area--input-panel ft-ripple {
|
|
942
|
-
${e.setVariable(
|
|
943
|
-
${e.setVariable(
|
|
942
|
+
${e.setVariable(c.opacityContentOnSurfaceHover,"0.08")};
|
|
943
|
+
${e.setVariable(c.opacityContentOnSurfacePressed,"0.04")};
|
|
944
944
|
}
|
|
945
945
|
|
|
946
946
|
.ft-text-area--input {
|
|
@@ -1080,13 +1080,13 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
1080
1080
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?i.html`
|
|
1081
1081
|
<ft-icon part="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}}di.elementDefinitions={"ft-ripple":Me,"ft-tooltip":Ae,"ft-typography":Se,"ft-icon":Ie,"ft-loader":ai},di.styles=[e.safariEllipsisFix,Ct],li([o.property({type:String,reflect:!0})],di.prototype,"role",void 0),li([o.property({type:Boolean})],di.prototype,"primary",void 0),li([o.property({type:Boolean})],di.prototype,"outlined",void 0),li([o.property({type:Boolean})],di.prototype,"disabled",void 0),li([o.property({type:Boolean})],di.prototype,"dense",void 0),li([o.property({type:Boolean})],di.prototype,"round",void 0),li([o.property()],di.prototype,"label",void 0),li([o.property()],di.prototype,"icon",void 0),li([o.property()],di.prototype,"iconVariant",void 0),li([o.property({type:Boolean})],di.prototype,"trailingIcon",void 0),li([o.property({type:Boolean})],di.prototype,"loading",void 0),li([o.property()],di.prototype,"tooltipPosition",void 0),li([o.property({type:Boolean})],di.prototype,"hideTooltip",void 0),li([o.property({type:Boolean})],di.prototype,"forceTooltip",void 0),li([o.query(".ft-button")],di.prototype,"button",void 0),li([o.query(".ft-button--label slot")],di.prototype,"slottedContent",void 0),e.customElement("ft-button")(di);const hi=i.css`
|
|
1082
1082
|
`,fi=i.css`
|
|
1083
|
-
`,
|
|
1083
|
+
`,ci=e.FtReduxStore.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class pi{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=ci.getState(),o=null!=t?t:i;if(e&&o&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,o,!0)}static get(t){var e;return null!=t?pi.build(t):null!==(e=pi.API)&&void 0!==e?e:pi.API=pi.build()}static await(t){return new Promise((e=>{let i=pi.get(t);if(i)e(i);else{const o=ci.subscribe((()=>{i=pi.get(t),i&&(o(),e(i))}))}}))}}var ui;const vi=Symbol("clearAfterUnitTest");class bi{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new e.CacheRegistry,this.listeners={},this.currentUiLocale="",this[ui]=()=>{this.defaultMessages={},this.cache=new e.CacheRegistry,this.listeners={}},this.currentUiLocale=ci.getState().uiLocale,ci.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=ci.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,i){var o;if(t=t.toLowerCase(),Object.keys(i).length>0){const s={...null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},...i};e.deepEqual(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,i,...o){var s,n,r;t=t.toLowerCase(),this.fetchContext(t);const a=null!==(n=null===(s=this.cache.getNow(t))||void 0===s?void 0:s.messages)&&void 0!==n?n:{};return new e.ParametrizedLabelResolver(null!==(r=this.defaultMessages[t])&&void 0!==r?r:{},a).resolve(i,...o)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>e.delay(0).then((()=>t())).catch((()=>null)))))}}ui=vi,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new bi((async(t,e)=>(await pi.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new bi((async(t,e)=>(await pi.await()).getCustomMessageContext(t,e))));const gi=window.FluidTopicsI18nService,xi=window.FluidTopicsCustomI18nService;var yi=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 mi extends e.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>pi.get(),this.cache=new e.CacheRegistry,this.cleanSessionDebouncer=new e.Debouncer}render(){return i.html`
|
|
1084
1084
|
<slot></slot>
|
|
1085
|
-
`}updated(t){super.updated(t),t.has("baseUrl")&&
|
|
1085
|
+
`}updated(t){super.updated(t),t.has("baseUrl")&&ci.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&ci.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&ci.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&ci.actions.setNoCustom(this.noCustom),t.has("editorMode")&&ci.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&ci.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&ci.actions.setSession(this.session),t.has("availableUiLocales")&&ci.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>gi.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}mi.elementDefinitions={},mi.styles=fi,yi([o.property()],mi.prototype,"baseUrl",void 0),yi([o.property()],mi.prototype,"apiIntegrationIdentifier",void 0),yi([o.property()],mi.prototype,"uiLocale",void 0),yi([e.jsonProperty([])],mi.prototype,"availableUiLocales",void 0),yi([o.property({type:Boolean})],mi.prototype,"editorMode",void 0),yi([o.property({type:Boolean})],mi.prototype,"noCustom",void 0),yi([o.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],mi.prototype,"noCustomComponent",void 0),yi([o.property({type:Boolean})],mi.prototype,"withManualResources",void 0),yi([e.jsonProperty([])],mi.prototype,"messageContexts",void 0),yi([e.jsonProperty(void 0)],mi.prototype,"session",void 0),yi([o.property({type:Object})],mi.prototype,"apiProvider",void 0);class $i{async listMySearches(){var t;return(null===(t=ci.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await pi.await()).listMySearches(ci.getState().session.profile.userId):[]}}const wi=new e.CacheRegistry;class ki{async listMyBookmarks(){return wi.get("bookmarks",(async()=>(await pi.await()).listMyBookmarks(ci.getState().session.profile.userId)))}clearCache(){wi.clear("bookmarks")}}const Si=e.FtReduxStore.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=ci.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ki,ci.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:i}=ci.getState();e.deepEqual(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==i?void 0:i.profile)||(this.currentSession=i,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){Si.actions.savedSearches(void 0)}clearMyBookmarks(){Si.actions.bookmarks(void 0)}async reloadMySearches(){const t=new $i,e=await t.listMySearches();Si.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;Si.actions.bookmarks(e)}}},e.customElement("ft-app-context")(mi);var _i=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};const Ii=Symbol("i18nProperties"),Ci=Symbol("i18nUnsubs");function zi(t){var e;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?xi:gi}i18n(t,e,...i){var o;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...i);const s=null!==(o=t.args)&&void 0!==o?o:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...s)}onI18nUpdate(t){var e;null===(e=this[Ii])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var e;super.updated(t),null===(e=this[Ii])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[Ii]&&new Set([...this[Ii].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[Ci].has(t)||this[Ci].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[Ci].forEach((t=>t())),this[Ci].clear()}}return e=Ci,_i([o.property({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}class Ti extends(zi(e.FtLitElement)){}class Oi extends(zi(e.FtLitElementRedux)){}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 Ri extends Oi{constructor(){super(),this.editorMode=!1,this.addStore(ci)}render(){return this.key&&this.context?i.html`
|
|
1086
1086
|
<span class="ft-i18n">
|
|
1087
1087
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
1088
1088
|
</span>
|
|
1089
|
-
`:this.editorMode?"Select a context and a label key.":i.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}
|
|
1089
|
+
`:this.editorMode?"Select a context and a label key.":i.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}Ri.elementDefinitions={},Ri.styles=hi,Ei([e.redux()],Ri.prototype,"editorMode",void 0),Ei([o.property()],Ri.prototype,"context",void 0),Ei([o.property()],Ri.prototype,"key",void 0),Ei([e.jsonProperty([])],Ri.prototype,"args",void 0),Ei([o.property()],Ri.prototype,"defaultMessage",void 0);class Di{static build(t){return new Di(t)}static fromGwt(t){return new Di(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>gi.resolveMessage(this.name,e,...t)})}}const Ni=(t,e)=>(i,o)=>{var s,n;i.constructor.createProperty(o,null!=e?e:{attribute:!1,type:String});const r={...t,key:null!==(s=t.key)&&void 0!==s?s:o};i[Ii]=null!==(n=i[Ii])&&void 0!==n?n:new Map,i[Ii].set(o,r)};e.customElement("ft-i18n")(Ri);const Ai=Di.build("integratedFeedbackComponent"),Bi={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?",feedbackfromEmail:"Your email",feedbackfromEmailInvalid:"Please enter a valid email address",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.",mapFeedbackMainTitle:"Send feedback",mapRatingSectionTitle:"Rate this document",mapDichotomousRatingSectionTitle:"Did it solve your problem?",mapFeedbackSectionTitle:"Write your review",topicFeedbackMainTitle:"Send feedback",topicRatingSectionTitle:"Rate this content",topicDichotomousRatingSectionTitle:"Did this content solve your problem?",topicFeedbackSectionTitle:"Write your review"},Mi=Di.build("inDesignerFeedbackComponent"),Ui={ratingNotConfigured:"Rating unavailable: no rating configured for this content.",missingRatingRole:"Rating unavailable: missing role RATING_USER.",missingFeedbackRole:"Feedback unavailable: missing role FEEDBACK_USER.",inDesignerOnlyNotice:"This notice will not appear outside this designer.",feedbackAndRatingDisabledInEditor:"Feedback and ratings performed here are not taken into account."},ji={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SIZE","14px"),labelSize:e.FtCssVariableFactory.create("--ft-text-field-label-size","SIZE","11px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-text-field-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-text-field-horizontal-spacing","SIZE","16px"),helperColor:e.FtCssVariableFactory.extend("--ft-text-field-helper-color",e.designSystemVariables.colorOnSurfaceMedium),colorPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system"),prefixColor:e.FtCssVariableFactory.extend("--ft-text-field-prefix-color",e.designSystemVariables.colorOnSurfaceMedium),iconColor:e.FtCssVariableFactory.extend("--ft-text-field-icon-color",e.designSystemVariables.colorOnSurfaceMedium),floatingZIndex:e.FtCssVariableFactory.create("--ft-text-field-floating-components-z-index","NUMBER","3"),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),colorOutline:e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),elevation02:e.FtCssVariableFactory.external(e.designSystemVariables.elevation02,"Design system"),suggestSize:e.FtCssVariableFactory.create("--ft-text-field-suggest-size","SIZE","300px")},Fi=i.css`
|
|
1090
1090
|
*:focus {
|
|
1091
1091
|
outline: none;
|
|
1092
1092
|
}
|
|
@@ -1099,16 +1099,16 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
1099
1099
|
}
|
|
1100
1100
|
|
|
1101
1101
|
ft-input-label {
|
|
1102
|
-
${e.setVariable(Qe.fontSize,
|
|
1103
|
-
${e.setVariable(Qe.raisedFontSize,
|
|
1104
|
-
${e.setVariable(Qe.verticalSpacing,
|
|
1105
|
-
${e.setVariable(Qe.horizontalSpacing,
|
|
1102
|
+
${e.setVariable(Qe.fontSize,ji.fontSize)};
|
|
1103
|
+
${e.setVariable(Qe.raisedFontSize,ji.labelSize)};
|
|
1104
|
+
${e.setVariable(Qe.verticalSpacing,ji.verticalSpacing)};
|
|
1105
|
+
${e.setVariable(Qe.horizontalSpacing,ji.horizontalSpacing)};
|
|
1106
1106
|
}
|
|
1107
1107
|
|
|
1108
1108
|
.ft-text-field--main-panel {
|
|
1109
1109
|
position: relative;
|
|
1110
1110
|
display: flex;
|
|
1111
|
-
height: calc(4 * ${
|
|
1111
|
+
height: calc(4 * ${ji.verticalSpacing} + ${ji.labelSize} + ${ji.fontSize});
|
|
1112
1112
|
}
|
|
1113
1113
|
|
|
1114
1114
|
.ft-text-field--input-panel {
|
|
@@ -1117,24 +1117,24 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
1117
1117
|
display: flex;
|
|
1118
1118
|
align-items: center;
|
|
1119
1119
|
overflow: hidden;
|
|
1120
|
-
padding: 0 ${
|
|
1120
|
+
padding: 0 ${ji.horizontalSpacing};
|
|
1121
1121
|
|
|
1122
|
-
${e.setVariable(M.fontSize,
|
|
1123
|
-
${e.setVariable(M.lineHeight,
|
|
1122
|
+
${e.setVariable(M.fontSize,ji.fontSize)};
|
|
1123
|
+
${e.setVariable(M.lineHeight,ji.fontSize)};
|
|
1124
1124
|
}
|
|
1125
1125
|
|
|
1126
1126
|
.ft-text-field--input-panel ft-ripple {
|
|
1127
|
-
${e.setVariable(
|
|
1128
|
-
${e.setVariable(
|
|
1127
|
+
${e.setVariable(c.opacityContentOnSurfaceHover,"0.08")};
|
|
1128
|
+
${e.setVariable(c.opacityContentOnSurfacePressed,"0.04")};
|
|
1129
1129
|
}
|
|
1130
1130
|
|
|
1131
1131
|
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input-panel {
|
|
1132
1132
|
align-items: flex-end;
|
|
1133
|
-
padding: 0 ${
|
|
1133
|
+
padding: 0 ${ji.horizontalSpacing} ${ji.verticalSpacing} ${ji.horizontalSpacing};
|
|
1134
1134
|
}
|
|
1135
1135
|
|
|
1136
1136
|
.ft-text-field--prefix {
|
|
1137
|
-
color: ${
|
|
1137
|
+
color: ${ji.prefixColor};
|
|
1138
1138
|
margin-right: 2px;
|
|
1139
1139
|
flex-shrink: 1;
|
|
1140
1140
|
overflow: hidden;
|
|
@@ -1153,15 +1153,15 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
1153
1153
|
flex-shrink: 1;
|
|
1154
1154
|
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
1155
1155
|
|
|
1156
|
-
color: ${
|
|
1157
|
-
padding: calc(2 * ${
|
|
1156
|
+
color: ${ji.colorOnSurface};
|
|
1157
|
+
padding: calc(2 * ${ji.verticalSpacing}) 0;
|
|
1158
1158
|
border: none;
|
|
1159
1159
|
background: none;
|
|
1160
1160
|
}
|
|
1161
1161
|
|
|
1162
1162
|
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input {
|
|
1163
1163
|
padding-bottom: 0;
|
|
1164
|
-
padding-top: calc(${
|
|
1164
|
+
padding-top: calc(${ji.labelSize} + 2 * ${ji.verticalSpacing});
|
|
1165
1165
|
}
|
|
1166
1166
|
|
|
1167
1167
|
.ft-text-field--input::-webkit-calendar-picker-indicator,
|
|
@@ -1170,37 +1170,37 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
1170
1170
|
}
|
|
1171
1171
|
|
|
1172
1172
|
.ft-text-field--disabled .ft-text-field--input {
|
|
1173
|
-
color: ${
|
|
1173
|
+
color: ${ji.colorOnSurfaceDisabled};
|
|
1174
1174
|
}
|
|
1175
1175
|
|
|
1176
1176
|
.ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label {
|
|
1177
|
-
${e.setVariable(Qe.borderColor,
|
|
1178
|
-
${e.setVariable(Qe.textColor,
|
|
1177
|
+
${e.setVariable(Qe.borderColor,ji.colorPrimary)};
|
|
1178
|
+
${e.setVariable(Qe.textColor,ji.colorPrimary)};
|
|
1179
1179
|
}
|
|
1180
1180
|
|
|
1181
1181
|
.ft-text-field--filled .ft-text-field--input-panel {
|
|
1182
|
-
border-radius: ${
|
|
1182
|
+
border-radius: ${ji.borderRadiusS} ${ji.borderRadiusS} 0 0;
|
|
1183
1183
|
}
|
|
1184
1184
|
|
|
1185
1185
|
.ft-text-field--outlined .ft-text-field--input-panel {
|
|
1186
|
-
border-radius: ${
|
|
1186
|
+
border-radius: ${ji.borderRadiusS};
|
|
1187
1187
|
}
|
|
1188
1188
|
|
|
1189
1189
|
.ft-text-field--helper-text {
|
|
1190
|
-
padding: 0 12px 0 ${
|
|
1191
|
-
color: ${
|
|
1190
|
+
padding: 0 12px 0 ${ji.horizontalSpacing};
|
|
1191
|
+
color: ${ji.helperColor};
|
|
1192
1192
|
}
|
|
1193
1193
|
|
|
1194
1194
|
.ft-text-field--in-error .ft-text-field--input,
|
|
1195
1195
|
.ft-text-field--in-error .ft-text-field--helper-text,
|
|
1196
1196
|
.ft-text-field--in-error .ft-text-field--prefix {
|
|
1197
|
-
color: ${
|
|
1197
|
+
color: ${ji.colorError};
|
|
1198
1198
|
}
|
|
1199
1199
|
|
|
1200
1200
|
.ft-text-field--icon {
|
|
1201
1201
|
align-self: center;
|
|
1202
1202
|
margin-left: 8px;
|
|
1203
|
-
color: ${
|
|
1203
|
+
color: ${ji.iconColor};
|
|
1204
1204
|
}
|
|
1205
1205
|
|
|
1206
1206
|
.ft-text-field--container {
|
|
@@ -1213,13 +1213,13 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
1213
1213
|
position: absolute;
|
|
1214
1214
|
left: 0;
|
|
1215
1215
|
right: 0;
|
|
1216
|
-
z-index: ${
|
|
1217
|
-
background: ${
|
|
1218
|
-
border: 1px solid ${
|
|
1219
|
-
border-radius: 0 0 ${
|
|
1220
|
-
box-shadow: ${
|
|
1216
|
+
z-index: ${ji.floatingZIndex};
|
|
1217
|
+
background: ${ji.colorSurface};
|
|
1218
|
+
border: 1px solid ${ji.colorOutline};
|
|
1219
|
+
border-radius: 0 0 ${ji.borderRadiusS} ${ji.borderRadiusS};
|
|
1220
|
+
box-shadow: ${ji.elevation02};
|
|
1221
1221
|
outline: none;
|
|
1222
|
-
max-height: ${
|
|
1222
|
+
max-height: ${ji.suggestSize};
|
|
1223
1223
|
overflow-y: auto;
|
|
1224
1224
|
}
|
|
1225
1225
|
|
|
@@ -1242,7 +1242,7 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
1242
1242
|
.ft-text-field--with-password ft-icon:hover {
|
|
1243
1243
|
cursor: pointer;
|
|
1244
1244
|
}
|
|
1245
|
-
`;var
|
|
1245
|
+
`;var Li=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 Pi extends e.FtLitElement{constructor(){super(...arguments),this._value="",this.dispatchedValue="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.passwordHiddenIcon=me.EYE_SLASH,this.passwordRevealedIcon=me.EYE,this.filterSuggestions=!1,this.password=!1,this.focused=!1,this.hidePassword=!0,this.suggestionsOnTop=!1,this.hideSuggestions=!1,this.visibleSuggestions=[]}get value(){return this._value||""}set value(t){this.setInternalValue(t||""),this.dispatchedValue=t||""}setInternalValue(t){const e=this._value;this._value=t||"",this.requestUpdate("value",e)}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":this.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":0===this.visibleSuggestions.length||this.hideSuggestions,"ft-text-field--raised-label":this.focused||""!=this.value,"ft-text-field--with-icon":!!this.icon,"ft-text-field--with-password":this.password};return i.html`
|
|
1246
1246
|
<div class="${n.classMap(t)}">
|
|
1247
1247
|
<div class="ft-text-field--main-panel"
|
|
1248
1248
|
@keydown=${this.handleKeyboardNavigation}
|
|
@@ -1293,7 +1293,7 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
1293
1293
|
.variant=${this.iconVariant}
|
|
1294
1294
|
.value=${this.icon}
|
|
1295
1295
|
@click=${()=>{var t;return null===(t=this.input)||void 0===t?void 0:t.focus()}}></ft-icon>
|
|
1296
|
-
`:i.nothing}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(i,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}}
|
|
1296
|
+
`:i.nothing}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(i,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}}Pi.elementDefinitions={"ft-input-label":ii,"ft-ripple":Me,"ft-typography":Se,"ft-icon":Ie},Pi.styles=[lt,Fi],Li([o.property()],Pi.prototype,"label",void 0),Li([o.property({noAccessor:!0})],Pi.prototype,"value",null),Li([o.state()],Pi.prototype,"dispatchedValue",void 0),Li([o.property()],Pi.prototype,"helper",void 0),Li([o.property({type:Boolean})],Pi.prototype,"outlined",void 0),Li([o.property({type:Boolean})],Pi.prototype,"disabled",void 0),Li([o.property({type:Boolean})],Pi.prototype,"error",void 0),Li([o.property()],Pi.prototype,"prefix",void 0),Li([o.property()],Pi.prototype,"icon",void 0),Li([o.property()],Pi.prototype,"passwordHiddenIcon",void 0),Li([o.property()],Pi.prototype,"passwordRevealedIcon",void 0),Li([o.property()],Pi.prototype,"iconVariant",void 0),Li([o.property({type:Boolean})],Pi.prototype,"filterSuggestions",void 0),Li([o.property({type:Number})],Pi.prototype,"maxLength",void 0),Li([o.property({type:Boolean})],Pi.prototype,"password",void 0),Li([o.state()],Pi.prototype,"focused",void 0),Li([o.state()],Pi.prototype,"hidePassword",void 0),Li([o.state()],Pi.prototype,"suggestionsOnTop",void 0),Li([o.state()],Pi.prototype,"hideSuggestions",void 0),Li([o.state()],Pi.prototype,"visibleSuggestions",void 0),Li([o.query(".ft-text-field--main-panel")],Pi.prototype,"mainPanel",void 0),Li([o.query(".ft-text-field--input")],Pi.prototype,"input",void 0),Li([o.query(".ft-text-field--suggestions")],Pi.prototype,"suggestionsContainer",void 0),Li([o.queryAssignedElements({selector:"ft-text-field-suggestion"})],Pi.prototype,"suggestions",void 0);const Zi=i.css`
|
|
1297
1297
|
.ft-text-field-suggestion {
|
|
1298
1298
|
position: relative;
|
|
1299
1299
|
padding: 8px 16px;
|
|
@@ -1318,7 +1318,7 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
1318
1318
|
slot {
|
|
1319
1319
|
pointer-events: none;
|
|
1320
1320
|
}
|
|
1321
|
-
`;var
|
|
1321
|
+
`;var Hi=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 Wi extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t,bubbles:!0,composed:!0})}}class Vi extends e.FtLitElement{render(){return i.html`
|
|
1322
1322
|
<div class="ft-text-field-suggestion"
|
|
1323
1323
|
tabindex="-1"
|
|
1324
1324
|
@keydown=${this.onKeyDown}
|
|
@@ -1330,7 +1330,7 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
1330
1330
|
<slot></slot>
|
|
1331
1331
|
</ft-typography>
|
|
1332
1332
|
</div>
|
|
1333
|
-
`}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new
|
|
1333
|
+
`}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new Wi(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}Vi.elementDefinitions={"ft-ripple":Me,"ft-typography":Se,"ft-icon":Ie},Vi.styles=Zi,Hi([o.property()],Vi.prototype,"value",void 0),Hi([o.query(".ft-text-field-suggestion")],Vi.prototype,"container",void 0),Hi([o.queryAssignedNodes()],Vi.prototype,"assignedNodes",void 0),e.customElement("ft-text-field")(Pi),e.customElement("ft-text-field-suggestion")(Vi);var Gi=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 Ki extends(zi(h)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.ratingAllowed=!1,this.from="",this.feedbackMessage="",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.addI18nContext(Ai,Bi),this.addI18nContext(Mi,Ui)}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`
|
|
1334
1334
|
<div class="ft-reader-feedback">
|
|
1335
1335
|
${this.hideTitle?i.nothing:i.html`
|
|
1336
1336
|
<ft-typography variant="title" part="main-title">
|
|
@@ -1350,11 +1350,11 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
1350
1350
|
${this.renderRatingDate()}
|
|
1351
1351
|
</ft-typography>
|
|
1352
1352
|
</div>
|
|
1353
|
-
`:this.placeholderInEditor(this.userHasRatingRole?
|
|
1353
|
+
`:this.placeholderInEditor(this.userHasRatingRole?Mi.messages.ratingNotConfigured():Mi.messages.missingRatingRole())}renderRatingDate(){const t=this.ratingDate;if(null==t)return Ai.messages.notRated();if(t.getTime()>(new Date).getTime()-6e4)return Ai.messages.ratedNow();return(new Date).toLocaleDateString()===t.toLocaleDateString()?Ai.messages.ratedToday():Ai.messages.ratedOn(t)}renderRating(){switch(this.configuredRatingType){case"STARS":return i.html`
|
|
1354
1354
|
<div class="ft-reader-feedback--stars" part="rating rating-stars">
|
|
1355
1355
|
${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`
|
|
1356
1356
|
<ft-button round part="rating-stars-${s}"
|
|
1357
|
-
label="${
|
|
1357
|
+
label="${Ai.messages.starsRating(s)}"
|
|
1358
1358
|
tooltipPosition="top"
|
|
1359
1359
|
.iconVariant=${this.iconVariant}
|
|
1360
1360
|
icon="${o?this.filledStarIcon:this.emptyStarIcon}"
|
|
@@ -1371,13 +1371,13 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
1371
1371
|
?selected=${e}
|
|
1372
1372
|
.iconVariant=${this.iconVariant}
|
|
1373
1373
|
icon="${e?this.filledLikeIcon:this.emptyLikeIcon}">
|
|
1374
|
-
${
|
|
1374
|
+
${Ai.messages.like()}
|
|
1375
1375
|
</ft-switch-option>
|
|
1376
1376
|
<ft-switch-option .value=${0}
|
|
1377
1377
|
?selected=${t}
|
|
1378
1378
|
.iconVariant=${this.iconVariant}
|
|
1379
1379
|
icon="${t?this.filledDislikeIcon:this.emptyDislikeIcon}">
|
|
1380
|
-
${
|
|
1380
|
+
${Ai.messages.dislike()}
|
|
1381
1381
|
</ft-switch-option>
|
|
1382
1382
|
</ft-switch>
|
|
1383
1383
|
`;case"DICHOTOMOUS":const o="DICHOTOMOUS"===this.ratingType&&0===this.ratingValue,s="DICHOTOMOUS"===this.ratingType&&1===this.ratingValue;return i.html`
|
|
@@ -1386,11 +1386,11 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
1386
1386
|
part="rating rating-dichotomous">
|
|
1387
1387
|
<ft-switch-option .value=${1}
|
|
1388
1388
|
?selected=${s}>
|
|
1389
|
-
${
|
|
1389
|
+
${Ai.messages.dichotomousYes()}
|
|
1390
1390
|
</ft-switch-option>
|
|
1391
1391
|
<ft-switch-option .value=${0}
|
|
1392
1392
|
?selected=${o}>
|
|
1393
|
-
${
|
|
1393
|
+
${Ai.messages.dichotomousNo()}
|
|
1394
1394
|
</ft-switch-option>
|
|
1395
1395
|
</ft-switch>
|
|
1396
1396
|
`}return i.nothing}rate(t){(null!=t?t:-1)!==this.ratingValue&&this.dispatchEvent(new CustomEvent("rate",{detail:t}))}renderFeedbackSection(){var t,e;if(this.canAccessFeedback){const o=this.feedbackMailLinkBuilder(this.feedbackMessage);let s=i.html`
|
|
@@ -1399,7 +1399,7 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
1399
1399
|
?disabled=${!this.feedbackMessage||!this.validFromEmail()}
|
|
1400
1400
|
@click=${()=>o?this.onMailerFeedbackSent():this.sendFeedback()}
|
|
1401
1401
|
part="send-feedback">
|
|
1402
|
-
${
|
|
1402
|
+
${Ai.messages.okButton()}
|
|
1403
1403
|
</ft-button>
|
|
1404
1404
|
`;return o&&(s=i.html`
|
|
1405
1405
|
<a class="ft-reader-feedback--feedback-link" href="${o}">
|
|
@@ -1413,28 +1413,28 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
1413
1413
|
${null==(null===(t=this.user)||void 0===t?void 0:t.userId)&&(null===(e=this.configuration)||void 0===e?void 0:e.mailsSentByFluidTopicsForUnauthenticatedUsers)?i.html`
|
|
1414
1414
|
<ft-text-field
|
|
1415
1415
|
class="ft-reader-feedback--from-input"
|
|
1416
|
-
label=${
|
|
1416
|
+
label=${Ai.messages.feedbackfromEmail()}
|
|
1417
1417
|
@live-change=${t=>this.from=t.detail.trim()}
|
|
1418
1418
|
?error=${this.from&&!this.validFromEmail()}
|
|
1419
|
-
helper=${this.from&&!this.validFromEmail()?
|
|
1419
|
+
helper=${this.from&&!this.validFromEmail()?Ai.messages.feedbackfromEmailInvalid():""}
|
|
1420
1420
|
/>
|
|
1421
1421
|
`:i.nothing}
|
|
1422
1422
|
<ft-text-area outlined
|
|
1423
1423
|
class="ft-reader-feedback--feedback-input" part="feedback-input"
|
|
1424
|
-
label="${
|
|
1424
|
+
label="${Ai.messages.feedbackInputLabel()}"
|
|
1425
1425
|
@live-change=${t=>this.feedbackMessage=t.detail.trim()}
|
|
1426
1426
|
></ft-text-area>
|
|
1427
1427
|
${s}
|
|
1428
1428
|
</div>
|
|
1429
|
-
`}return this.placeholderInEditor(
|
|
1429
|
+
`}return this.placeholderInEditor(Mi.messages.missingFeedbackRole())}validFromEmail(){var t,e;return!(null==(null===(t=this.user)||void 0===t?void 0:t.userId)&&(null===(e=this.configuration)||void 0===e?void 0:e.mailsSentByFluidTopicsForUnauthenticatedUsers))||/^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/.test(this.from)}sendFeedback(){var t;this.dispatchEvent(new CustomEvent("send-feedback",{detail:{message:this.feedbackInput.value,...(null===(t=this.configuration)||void 0===t?void 0:t.mailsSentByFluidTopicsForUnauthenticatedUsers)&&{from:this.from}}}))}placeholderInEditor(t){return this.editorMode?i.html`
|
|
1430
1430
|
<div class="ft-reader-feedback--placeholder">
|
|
1431
1431
|
<ft-typography variant="caption">${t}</ft-typography>
|
|
1432
1432
|
<ft-tooltip position="left"
|
|
1433
|
-
text="${
|
|
1433
|
+
text="${Mi.messages.inDesignerOnlyNotice()}">
|
|
1434
1434
|
<ft-icon>INFO</ft-icon>
|
|
1435
1435
|
</ft-tooltip>
|
|
1436
1436
|
</div>
|
|
1437
|
-
`:i.nothing}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}clearFeedbackInput(){setTimeout((()=>this.feedbackInput.value=""),0)}}
|
|
1437
|
+
`:i.nothing}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}clearFeedbackInput(){setTimeout((()=>this.feedbackInput.value=""),0)}}Ki.elementDefinitions={"ft-button":di,"ft-typography":Se,"ft-icon":Ie,"ft-tooltip":Ae,"ft-switch":Ve,"ft-switch-option":Ze,"ft-text-area":ri,"ft-text-field":Pi},Ki.styles=Ot,Gi([o.property({type:Boolean})],Ki.prototype,"editorMode",void 0),Gi([o.property({type:Boolean})],Ki.prototype,"hideTitle",void 0),Gi([o.property({type:Boolean})],Ki.prototype,"ratingAllowed",void 0),Gi([o.property({attribute:!1})],Ki.prototype,"i18nProperties",void 0),Gi([o.property({attribute:!1})],Ki.prototype,"ratingSummary",void 0),Gi([o.property({attribute:!1})],Ki.prototype,"user",void 0),Gi([o.query(".ft-reader-feedback--feedback-input")],Ki.prototype,"feedbackInput",void 0),Gi([o.state()],Ki.prototype,"from",void 0),Gi([o.state()],Ki.prototype,"feedbackMessage",void 0),Gi([o.property()],Ki.prototype,"iconVariant",void 0),Gi([o.property()],Ki.prototype,"emptyStarIcon",void 0),Gi([o.property()],Ki.prototype,"filledStarIcon",void 0),Gi([o.property()],Ki.prototype,"emptyLikeIcon",void 0),Gi([o.property()],Ki.prototype,"filledLikeIcon",void 0),Gi([o.property()],Ki.prototype,"emptyDislikeIcon",void 0),Gi([o.property()],Ki.prototype,"filledDislikeIcon",void 0),Gi([e.redux({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],Ki.prototype,"configuration",void 0),Gi([o.property()],Ki.prototype,"feedbackMailLinkBuilder",void 0);const Yi=Di.fromGwt("server");class qi{constructor(){this.subject="",this.url="",this.subjectMetadata="",this.bodyMetadata="",this.isAuthenticated=!1}update(t,e,i,o,s){var n;this.subject=t,this.url=e,this.configuration=o,this.isAuthenticated=s,this.subjectMetadata=this.filterMetadata(i,o.subjectMetadataIds).map((t=>"["+t.values[t.values.length-1]+"]")).join(""),this.bodyMetadata=this.filterMetadata(i,null!==(n=o.bodyMetadataIds)&&void 0!==n?n:[]).map((t=>"["+t.values.join(", ")+"]")).join(" ")}filterMetadata(t,e){return e.map((e=>t.find((t=>t.key===e)))).filter((t=>null!=t&&t.values.length>0))}build(t){var e,i,o;if(0===t.length||this.isAuthenticated&&(null==this.configuration||(null===(e=this.configuration)||void 0===e?void 0:e.mailsSentByFluidTopics))||(null===(i=this.configuration)||void 0===i?void 0:i.mailsSentByFluidTopicsForUnauthenticatedUsers))return;const s=encodeURIComponent(this.subject+" "+this.subjectMetadata),n=encodeURIComponent(`\n${this.bodyMetadata}\n${this.url}\n_________________________________________________________________\n\n${t}\n\n_________________________________________________________________\n${Yi.messages["mail.feedback.disclaimer"]()}`);return`mailto:${null===(o=this.configuration)||void 0===o?void 0:o.recipients.join(",")}?subject=${s}&body=${n}`}}var Xi=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 Ji extends(zi(h)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=we.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 qi,this.i18nProperties={feedbackMainTitle:Ai.properties.mapFeedbackMainTitle(),ratingSectionTitle:Ai.properties.mapRatingSectionTitle(),dichotomousRatingSectionTitle:Ai.properties.mapDichotomousRatingSectionTitle(),feedbackSectionTitle:Ai.properties.mapFeedbackSectionTitle()},this.updateDebouncer=new e.Debouncer(100),this.sendRatingDebouncer=new e.Debouncer(500),this.addStore(ci)}render(){return this.map&&(this.editorMode||this.componentVisible)?i.html`
|
|
1438
1438
|
<ft-reader-feedback
|
|
1439
1439
|
ratingAllowed
|
|
1440
1440
|
.i18nProperties=${this.i18nProperties}
|
|
@@ -1460,7 +1460,7 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
1460
1460
|
display: none !important;
|
|
1461
1461
|
}
|
|
1462
1462
|
</style>
|
|
1463
|
-
`}get componentVisible(){var t;return!!this.user&&this.user.roles.includes("FEEDBACK_USER")||!!this.user&&this.user.roles.includes("RATING_USER")&&"NO_RATING"!==(null===(t=this.ratingSummary)||void 0===t?void 0:t.type)}updated(t){var e,i,o;super.updated(t),t.has("map")&&this.map&&this.updateData(),["map","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,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.map&&((null===(t=this.user)||void 0===t?void 0:t.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(e=this.service)||void 0===e?void 0:e.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:
|
|
1463
|
+
`}get componentVisible(){var t;return!!this.user&&this.user.roles.includes("FEEDBACK_USER")||!!this.user&&this.user.roles.includes("RATING_USER")&&"NO_RATING"!==(null===(t=this.ratingSummary)||void 0===t?void 0:t.type)}updated(t){var e,i,o;super.updated(t),t.has("map")&&this.map&&this.updateData(),["map","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,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.map&&((null===(t=this.user)||void 0===t?void 0:t.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(e=this.service)||void 0===e?void 0:e.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:Ai.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Mi.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var i;try{this.editorMode?this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Mi.messages.feedbackAndRatingDisabledInEditor()})):(await(null===(i=this.service)||void 0===i?void 0:i.sendMapFeedback(t.detail.message,t.detail.from)),this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Ai.messages.feedbackSuccess()}))),this.readerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new e.FtNotificationEvent({type:"error",message:Ai.messages.feedbackFailure()}))}}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("ft-reader-mailer-map-feedback",{composed:!0,bubbles:!0}))}}Ji.elementDefinitions={"ft-reader-feedback":Ki},Xi([e.redux({store:ci.name,selector:t=>{var e;return null===(e=t.session)||void 0===e?void 0:e.profile}})],Ji.prototype,"user",void 0),Xi([e.redux({store:"reader"})],Ji.prototype,"map",void 0),Xi([e.redux({store:ci.name})],Ji.prototype,"editorMode",void 0),Xi([e.redux({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],Ji.prototype,"configuration",void 0),Xi([o.state()],Ji.prototype,"ratingSummary",void 0),Xi([o.property({type:Boolean})],Ji.prototype,"hideTitle",void 0),Xi([o.property()],Ji.prototype,"iconVariant",void 0),Xi([o.property()],Ji.prototype,"emptyStarIcon",void 0),Xi([o.property()],Ji.prototype,"filledStarIcon",void 0),Xi([o.property()],Ji.prototype,"emptyLikeIcon",void 0),Xi([o.property()],Ji.prototype,"filledLikeIcon",void 0),Xi([o.property()],Ji.prototype,"emptyDislikeIcon",void 0),Xi([o.property()],Ji.prototype,"filledDislikeIcon",void 0),Xi([o.query("ft-reader-feedback")],Ji.prototype,"readerFeedback",void 0),Xi([Ni(Yi.properties["mail.map_feedback.subject"]((t=>{var e;return[null===(e=t.map)||void 0===e?void 0:e.title]})))],Ji.prototype,"mailSubject",void 0);var Qi=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 to extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}const eo=Symbol("registerInterval");class io extends(function(t){var e;class i extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this[e]=0}connectedCallback(){super.connectedCallback(),this[eo]=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this[eo]):this.dispatchEvent(new to)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return e=eo,Qi([o.state()],i.prototype,"tocNode",void 0),Qi([o.state()],i.prototype,"disableContextInteractions",void 0),i}(h)){}var oo=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 so extends(zi(io)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=we.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 qi,this.i18nProperties={feedbackMainTitle:Ai.properties.topicFeedbackMainTitle(),ratingSectionTitle:Ai.properties.topicRatingSectionTitle(),dichotomousRatingSectionTitle:Ai.properties.topicDichotomousRatingSectionTitle(),feedbackSectionTitle:Ai.properties.topicFeedbackSectionTitle()},this.updateDebouncer=new e.Debouncer(100),this.sendRatingDebouncer=new e.Debouncer(500),this.addStore(ci)}render(){return this.map&&this.tocNode&&(this.editorMode||this.componentVisible)?i.html`
|
|
1464
1464
|
<ft-reader-feedback
|
|
1465
1465
|
.i18nProperties=${this.i18nProperties}
|
|
1466
1466
|
?ratingAllowed=${this.tocNode.hasRating}
|
|
@@ -1486,4 +1486,4 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
|
|
|
1486
1486
|
display: none !important;
|
|
1487
1487
|
}
|
|
1488
1488
|
</style>
|
|
1489
|
-
`}get componentVisible(){var t;return!!this.user&&this.user.roles.includes("FEEDBACK_USER")||!!this.user&&this.user.roles.includes("RATING_USER")&&"NO_RATING"!==(null===(t=this.ratingSummary)||void 0===t?void 0:t.type)}updated(t){var e,i,o;super.updated(t),["tocNode","user"].some((e=>t.has(e)))&&this.tocNode&&this.updateData(),["map","tocNode","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,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()}updateData(){this.updateDebouncer.run((async()=>{var t,e;this.tocNode&&((null===(t=this.user)||void 0===t?void 0:t.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(e=this.service)||void 0===e?void 0:e.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:
|
|
1489
|
+
`}get componentVisible(){var t;return!!this.user&&this.user.roles.includes("FEEDBACK_USER")||!!this.user&&this.user.roles.includes("RATING_USER")&&"NO_RATING"!==(null===(t=this.ratingSummary)||void 0===t?void 0:t.type)}updated(t){var e,i,o;super.updated(t),["tocNode","user"].some((e=>t.has(e)))&&this.tocNode&&this.updateData(),["map","tocNode","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,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()}updateData(){this.updateDebouncer.run((async()=>{var t,e;this.tocNode&&((null===(t=this.user)||void 0===t?void 0:t.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(e=this.service)||void 0===e?void 0:e.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:Ai.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Mi.messages.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.message,t.detail.from)),this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Ai.messages.feedbackSuccess()})),this.readerFeedback.clearFeedbackInput()):this.editorMode&&this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Mi.messages.feedbackAndRatingDisabledInEditor()}))}catch{this.dispatchEvent(new e.FtNotificationEvent({type:"error",message:Ai.messages.feedbackFailure()}))}}onMailerFeedbackSent(){const t=this.tocNode;this.dispatchEvent(new CustomEvent("ft-reader-mailer-topic-feedback",{detail:{topic:t},composed:!0,bubbles:!0}))}}so.elementDefinitions={"ft-reader-feedback":Ki},oo([e.redux({store:ci.name,selector:t=>{var e;return null===(e=t.session)||void 0===e?void 0:e.profile}})],so.prototype,"user",void 0),oo([e.redux({store:"reader"})],so.prototype,"map",void 0),oo([e.redux({store:ci.name})],so.prototype,"editorMode",void 0),oo([e.redux({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],so.prototype,"configuration",void 0),oo([o.state()],so.prototype,"ratingSummary",void 0),oo([o.property({type:Boolean})],so.prototype,"hideTitle",void 0),oo([o.property()],so.prototype,"iconVariant",void 0),oo([o.property()],so.prototype,"emptyStarIcon",void 0),oo([o.property()],so.prototype,"filledStarIcon",void 0),oo([o.property()],so.prototype,"emptyLikeIcon",void 0),oo([o.property()],so.prototype,"filledLikeIcon",void 0),oo([o.property()],so.prototype,"emptyDislikeIcon",void 0),oo([o.property()],so.prototype,"filledDislikeIcon",void 0),oo([o.query("ft-reader-feedback")],so.prototype,"readerFeedback",void 0),oo([Ni(Yi.properties["mail.feedback.subject"]((t=>{var e,i;return[null===(e=t.tocNode)||void 0===e?void 0:e.title,null===(i=t.map)||void 0===i?void 0:i.title]})))],so.prototype,"mailSubject",void 0),e.customElement("ft-reader-map-feedback")(Ji),e.customElement("ft-reader-topic-feedback")(so),t.FtReaderFeedbackCssVariables=Tt,t.FtReaderMapFeedback=Ji,t.FtReaderTopicFeedback=so,t.styles=Ot}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML,ftGlobals.litClassMap,ftGlobals.litRepeat);
|