@fluid-topics/ft-reader-feedback 0.3.55 → 0.3.56
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.
- package/build/ft-reader-feedback.css.d.ts +6 -0
- package/build/ft-reader-feedback.css.js +25 -3
- package/build/ft-reader-feedback.light.js +569 -554
- package/build/ft-reader-feedback.min.js +596 -581
- package/build/ft-reader-map-feedback.d.ts +5 -0
- package/build/ft-reader-map-feedback.js +66 -36
- package/build/ft-reader-topic-feedback.d.ts +3 -0
- package/build/ft-reader-topic-feedback.js +39 -17
- package/build/utils/labels.d.ts +1 -0
- package/build/utils/labels.js +2 -0
- package/package.json +3 -3
|
@@ -1,177 +1,257 @@
|
|
|
1
|
-
!function(t,i,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
gap: 16px;
|
|
1
|
+
!function(t,e,i,o,s,n,r){var a=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class l extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class h extends(function(t){class e extends t{constructor(){super(...arguments),this.registerIntervalReader=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store)}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new l)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return a([o.state()],e.prototype,"stateManager",void 0),e}(e.FtLitElementRedux)){}const d=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),p={color:d,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",d),opacityContentOnSurfacePressed:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},f=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),c=f,u=e.FtCssVariableFactory.extend("--ft-ripple-background-color",f),b=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),g=b,v=e.FtCssVariableFactory.extend("--ft-ripple-background-color",b),x=i.css`
|
|
2
|
+
:host {
|
|
3
|
+
display: contents;
|
|
7
4
|
}
|
|
8
5
|
|
|
9
|
-
.ft-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
padding: 8px;
|
|
14
|
-
border: 1px dashed #e1e1e1;
|
|
15
|
-
color: #444444;
|
|
16
|
-
background: #f1f1f1;
|
|
17
|
-
border-radius: 4px;
|
|
18
|
-
align-items: center;
|
|
6
|
+
.ft-ripple {
|
|
7
|
+
position: absolute;
|
|
8
|
+
inset: 0;
|
|
9
|
+
pointer-events: none;
|
|
19
10
|
}
|
|
20
11
|
|
|
21
|
-
.ft-
|
|
22
|
-
|
|
12
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
13
|
+
overflow: hidden;
|
|
23
14
|
}
|
|
24
15
|
|
|
25
|
-
.ft-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
.ft-ripple .ft-ripple--background,
|
|
17
|
+
.ft-ripple .ft-ripple--effect {
|
|
18
|
+
position: absolute;
|
|
19
|
+
opacity: 0;
|
|
28
20
|
}
|
|
29
21
|
|
|
30
|
-
.ft-
|
|
31
|
-
|
|
32
|
-
flex-direction: row;
|
|
33
|
-
align-items: center;
|
|
22
|
+
.ft-ripple .ft-ripple--background {
|
|
23
|
+
background-color: ${p.backgroundColor};
|
|
34
24
|
}
|
|
35
25
|
|
|
26
|
+
.ft-ripple .ft-ripple--effect {
|
|
27
|
+
background-color: ${p.color};
|
|
28
|
+
}
|
|
36
29
|
|
|
37
|
-
.ft-
|
|
38
|
-
|
|
39
|
-
flex-direction: column;
|
|
30
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
31
|
+
background-color: ${v};
|
|
40
32
|
}
|
|
41
33
|
|
|
42
|
-
.ft-
|
|
43
|
-
|
|
34
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
35
|
+
background-color: ${g};
|
|
44
36
|
}
|
|
45
37
|
|
|
46
|
-
.ft-
|
|
47
|
-
|
|
38
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
39
|
+
background-color: ${u};
|
|
48
40
|
}
|
|
49
41
|
|
|
50
|
-
.ft-
|
|
51
|
-
color: ${
|
|
42
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
43
|
+
background-color: ${c};
|
|
52
44
|
}
|
|
53
45
|
|
|
54
|
-
.ft-
|
|
55
|
-
|
|
46
|
+
.ft-ripple .ft-ripple--background {
|
|
47
|
+
top: 0;
|
|
48
|
+
left: 0;
|
|
49
|
+
height: 100%;
|
|
50
|
+
width: 100%;
|
|
51
|
+
transition: opacity 75ms linear;
|
|
56
52
|
}
|
|
57
53
|
|
|
58
|
-
.ft-
|
|
59
|
-
|
|
54
|
+
.ft-ripple .ft-ripple--effect,
|
|
55
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
56
|
+
border-radius: 50%;
|
|
60
57
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
58
|
+
|
|
59
|
+
.ft-ripple .ft-ripple--effect {
|
|
60
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
61
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
65
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
66
|
+
left: 50%;
|
|
67
|
+
top: 50%;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
71
|
+
transform: translate(-50%, -50%);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
75
|
+
opacity: ${p.opacityContentOnSurfaceHover};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
79
|
+
opacity: ${p.opacityContentOnSurfaceSelected};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
83
|
+
opacity: ${p.opacityContentOnSurfaceFocused};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
87
|
+
opacity: ${p.opacityContentOnSurfacePressed};
|
|
88
|
+
transform: translate(-50%, -50%) scale(1);
|
|
89
|
+
}
|
|
90
|
+
`,y=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),m=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),$={fontFamily:m,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},w={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-title-font-family",y),fontSize:e.FtCssVariableFactory.extend("--ft-typography-title-font-size",$.fontSize,"20px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",$.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",$.letterSpacing,"0.15px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-title-line-height",$.lineHeight,"1.2"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",$.textTransform,"inherit")},k={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",y),fontSize:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",$.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",$.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",$.letterSpacing,"0.105px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",$.lineHeight,"1.7"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",$.textTransform,"inherit")},_=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",m),S=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",$.fontSize,"16px"),I=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",$.fontWeight,"600"),z=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",$.letterSpacing,"0.144px"),T=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",$.lineHeight,"1.5"),O=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",$.textTransform,"inherit"),R=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",m),C=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",$.fontSize,"14px"),D=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",$.fontWeight,"normal"),N=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",$.letterSpacing,"0.098px"),E=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",$.lineHeight,"1.7"),A=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",$.textTransform,"inherit"),B={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",m),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",$.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",$.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",$.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",$.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",$.textTransform,"inherit")},F=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",m),j=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",$.fontSize,"14px"),M=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",$.fontWeight,"normal"),U=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",$.letterSpacing,"0.252px"),L=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",$.lineHeight,"1.4"),H=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",$.textTransform,"inherit"),W={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",m),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",$.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",$.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",$.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",$.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",$.textTransform,"inherit")},Z=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",m),P=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",$.fontSize,"10px"),V=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",$.fontWeight,"normal"),K=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",$.letterSpacing,"0.33px"),G=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",$.lineHeight,"1.6"),Y=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",$.textTransform,"inherit"),q=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",m),X=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",$.fontSize,"10px"),J=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",$.fontWeight,"normal"),Q=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",$.letterSpacing,"1.5px"),tt=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",$.lineHeight,"1.6"),et=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",$.textTransform,"uppercase"),it={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-button-font-family",m),fontSize:e.FtCssVariableFactory.extend("--ft-typography-button-font-size",$.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",$.fontWeight,"600"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",$.letterSpacing,"1.246px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-button-line-height",$.lineHeight,"1.15"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",$.textTransform,"uppercase")},ot=i.css`
|
|
73
91
|
.ft-typography--title {
|
|
74
|
-
font-family: ${
|
|
75
|
-
font-size: ${
|
|
76
|
-
font-weight: ${
|
|
77
|
-
letter-spacing: ${
|
|
78
|
-
line-height: ${
|
|
79
|
-
text-transform: ${
|
|
80
|
-
}
|
|
81
|
-
`,
|
|
92
|
+
font-family: ${w.fontFamily};
|
|
93
|
+
font-size: ${w.fontSize};
|
|
94
|
+
font-weight: ${w.fontWeight};
|
|
95
|
+
letter-spacing: ${w.letterSpacing};
|
|
96
|
+
line-height: ${w.lineHeight};
|
|
97
|
+
text-transform: ${w.textTransform};
|
|
98
|
+
}
|
|
99
|
+
`,st=i.css`
|
|
82
100
|
.ft-typography--title-dense {
|
|
83
|
-
font-family: ${
|
|
84
|
-
font-size: ${
|
|
85
|
-
font-weight: ${
|
|
86
|
-
letter-spacing: ${
|
|
87
|
-
line-height: ${
|
|
88
|
-
text-transform: ${
|
|
89
|
-
}
|
|
90
|
-
`,
|
|
101
|
+
font-family: ${k.fontFamily};
|
|
102
|
+
font-size: ${k.fontSize};
|
|
103
|
+
font-weight: ${k.fontWeight};
|
|
104
|
+
letter-spacing: ${k.letterSpacing};
|
|
105
|
+
line-height: ${k.lineHeight};
|
|
106
|
+
text-transform: ${k.textTransform};
|
|
107
|
+
}
|
|
108
|
+
`,nt=i.css`
|
|
91
109
|
.ft-typography--subtitle1 {
|
|
92
|
-
font-family: ${
|
|
93
|
-
font-size: ${
|
|
94
|
-
font-weight: ${
|
|
95
|
-
letter-spacing: ${
|
|
96
|
-
line-height: ${
|
|
97
|
-
text-transform: ${
|
|
98
|
-
}
|
|
99
|
-
`,
|
|
110
|
+
font-family: ${_};
|
|
111
|
+
font-size: ${S};
|
|
112
|
+
font-weight: ${I};
|
|
113
|
+
letter-spacing: ${z};
|
|
114
|
+
line-height: ${T};
|
|
115
|
+
text-transform: ${O};
|
|
116
|
+
}
|
|
117
|
+
`,rt=i.css`
|
|
100
118
|
.ft-typography--subtitle2 {
|
|
101
|
-
font-family: ${
|
|
102
|
-
font-size: ${
|
|
103
|
-
font-weight: ${
|
|
104
|
-
letter-spacing: ${
|
|
105
|
-
line-height: ${
|
|
106
|
-
text-transform: ${
|
|
119
|
+
font-family: ${R};
|
|
120
|
+
font-size: ${C};
|
|
121
|
+
font-weight: ${D};
|
|
122
|
+
letter-spacing: ${N};
|
|
123
|
+
line-height: ${E};
|
|
124
|
+
text-transform: ${A};
|
|
107
125
|
}
|
|
108
126
|
|
|
109
|
-
`,
|
|
127
|
+
`,at=i.css`
|
|
110
128
|
.ft-typography--body1 {
|
|
111
|
-
font-family: ${
|
|
112
|
-
font-size: ${
|
|
113
|
-
font-weight: ${
|
|
114
|
-
letter-spacing: ${
|
|
115
|
-
line-height: ${
|
|
116
|
-
text-transform: ${
|
|
117
|
-
}
|
|
118
|
-
`,
|
|
129
|
+
font-family: ${B.fontFamily};
|
|
130
|
+
font-size: ${B.fontSize};
|
|
131
|
+
font-weight: ${B.fontWeight};
|
|
132
|
+
letter-spacing: ${B.letterSpacing};
|
|
133
|
+
line-height: ${B.lineHeight};
|
|
134
|
+
text-transform: ${B.textTransform};
|
|
135
|
+
}
|
|
136
|
+
`,lt=i.css`
|
|
119
137
|
.ft-typography--body2 {
|
|
120
|
-
font-family: ${
|
|
121
|
-
font-size: ${
|
|
122
|
-
font-weight: ${
|
|
123
|
-
letter-spacing: ${
|
|
124
|
-
line-height: ${
|
|
125
|
-
text-transform: ${
|
|
126
|
-
}
|
|
127
|
-
`,
|
|
138
|
+
font-family: ${F};
|
|
139
|
+
font-size: ${j};
|
|
140
|
+
font-weight: ${M};
|
|
141
|
+
letter-spacing: ${U};
|
|
142
|
+
line-height: ${L};
|
|
143
|
+
text-transform: ${H};
|
|
144
|
+
}
|
|
145
|
+
`,ht=i.css`
|
|
128
146
|
.ft-typography--caption {
|
|
129
|
-
font-family: ${
|
|
130
|
-
font-size: ${
|
|
131
|
-
font-weight: ${
|
|
132
|
-
letter-spacing: ${
|
|
133
|
-
line-height: ${
|
|
134
|
-
text-transform: ${
|
|
135
|
-
}
|
|
136
|
-
`,
|
|
147
|
+
font-family: ${W.fontFamily};
|
|
148
|
+
font-size: ${W.fontSize};
|
|
149
|
+
font-weight: ${W.fontWeight};
|
|
150
|
+
letter-spacing: ${W.letterSpacing};
|
|
151
|
+
line-height: ${W.lineHeight};
|
|
152
|
+
text-transform: ${W.textTransform};
|
|
153
|
+
}
|
|
154
|
+
`,dt=i.css`
|
|
137
155
|
.ft-typography--breadcrumb {
|
|
138
|
-
font-family: ${
|
|
139
|
-
font-size: ${
|
|
140
|
-
font-weight: ${
|
|
141
|
-
letter-spacing: ${
|
|
142
|
-
line-height: ${
|
|
143
|
-
text-transform: ${
|
|
144
|
-
}
|
|
145
|
-
`,
|
|
156
|
+
font-family: ${Z};
|
|
157
|
+
font-size: ${P};
|
|
158
|
+
font-weight: ${V};
|
|
159
|
+
letter-spacing: ${K};
|
|
160
|
+
line-height: ${G};
|
|
161
|
+
text-transform: ${Y};
|
|
162
|
+
}
|
|
163
|
+
`,pt=i.css`
|
|
146
164
|
.ft-typography--overline {
|
|
147
|
-
font-family: ${
|
|
148
|
-
font-size: ${
|
|
149
|
-
font-weight: ${
|
|
150
|
-
letter-spacing: ${
|
|
151
|
-
line-height: ${
|
|
152
|
-
text-transform: ${
|
|
153
|
-
}
|
|
154
|
-
`,
|
|
165
|
+
font-family: ${q};
|
|
166
|
+
font-size: ${X};
|
|
167
|
+
font-weight: ${J};
|
|
168
|
+
letter-spacing: ${Q};
|
|
169
|
+
line-height: ${tt};
|
|
170
|
+
text-transform: ${et};
|
|
171
|
+
}
|
|
172
|
+
`,ft=i.css`
|
|
155
173
|
.ft-typography--button {
|
|
156
|
-
font-family: ${
|
|
157
|
-
font-size: ${
|
|
158
|
-
font-weight: ${
|
|
159
|
-
letter-spacing: ${
|
|
160
|
-
line-height: ${
|
|
161
|
-
text-transform: ${
|
|
162
|
-
}
|
|
163
|
-
`,
|
|
174
|
+
font-family: ${it.fontFamily};
|
|
175
|
+
font-size: ${it.fontSize};
|
|
176
|
+
font-weight: ${it.fontWeight};
|
|
177
|
+
letter-spacing: ${it.letterSpacing};
|
|
178
|
+
line-height: ${it.lineHeight};
|
|
179
|
+
text-transform: ${it.textTransform};
|
|
180
|
+
}
|
|
181
|
+
`,ct=i.css`
|
|
164
182
|
.ft-typography {
|
|
165
183
|
vertical-align: inherit;
|
|
166
184
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
185
|
+
`,ut={color:e.FtCssVariableFactory.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},bt=i.css`
|
|
186
|
+
:host {
|
|
187
|
+
line-height: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.ft-loader {
|
|
191
|
+
display: inline-block;
|
|
192
|
+
position: relative;
|
|
193
|
+
|
|
194
|
+
width: ${ut.size};
|
|
195
|
+
height: ${ut.size};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.ft-loader div {
|
|
199
|
+
position: absolute;
|
|
200
|
+
top: 37.5%;
|
|
201
|
+
width: 25%;
|
|
202
|
+
height: 25%;
|
|
203
|
+
border-radius: 50%;
|
|
204
|
+
background: ${ut.color};
|
|
205
|
+
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.ft-loader div:nth-child(1) {
|
|
209
|
+
left: 2.5%;
|
|
210
|
+
animation: appear 0.6s infinite;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.ft-loader div:nth-child(2) {
|
|
214
|
+
left: 2.5%;
|
|
215
|
+
animation: move 0.6s infinite;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.ft-loader div:nth-child(3) {
|
|
219
|
+
left: 37.5%;
|
|
220
|
+
animation: move 0.6s infinite;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.ft-loader div:nth-child(4) {
|
|
224
|
+
left: 72.5%;
|
|
225
|
+
animation: disappear 0.6s infinite;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
@keyframes appear {
|
|
229
|
+
0% {
|
|
230
|
+
transform: scale(0);
|
|
231
|
+
}
|
|
232
|
+
100% {
|
|
233
|
+
transform: scale(1);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@keyframes disappear {
|
|
238
|
+
0% {
|
|
239
|
+
transform: scale(1);
|
|
240
|
+
}
|
|
241
|
+
100% {
|
|
242
|
+
transform: scale(0);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
@keyframes move {
|
|
247
|
+
0% {
|
|
248
|
+
transform: translate(0, 0);
|
|
249
|
+
}
|
|
250
|
+
100% {
|
|
251
|
+
transform: translate(calc(0.35 * ${ut.size}), 0);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
`,gt={size:e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},vt=i.css`
|
|
175
255
|
:host, i.ft-icon {
|
|
176
256
|
display: inline-flex;
|
|
177
257
|
align-items: center;
|
|
@@ -180,14 +260,14 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
180
260
|
}
|
|
181
261
|
|
|
182
262
|
:host {
|
|
183
|
-
width: ${
|
|
184
|
-
height: ${
|
|
263
|
+
width: ${gt.size};
|
|
264
|
+
height: ${gt.size};
|
|
185
265
|
}
|
|
186
266
|
|
|
187
267
|
i.ft-icon {
|
|
188
268
|
width: 100%;
|
|
189
269
|
height: 100%;
|
|
190
|
-
font-size: ${
|
|
270
|
+
font-size: ${gt.size};
|
|
191
271
|
line-height: 1;
|
|
192
272
|
font-weight: normal;
|
|
193
273
|
text-transform: none;
|
|
@@ -198,32 +278,246 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
198
278
|
text-rendering: auto;
|
|
199
279
|
-webkit-font-smoothing: antialiased;
|
|
200
280
|
-moz-osx-font-smoothing: grayscale;
|
|
201
|
-
vertical-align: ${
|
|
281
|
+
vertical-align: ${gt.verticalAlign};
|
|
202
282
|
}
|
|
203
283
|
|
|
204
284
|
i.ft-icon.ft-icon--fluid-topics {
|
|
205
|
-
font-family: ${
|
|
285
|
+
font-family: ${gt.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
206
286
|
|
|
207
287
|
/* Ugly fix because font is broken */
|
|
208
|
-
font-size: calc(0.9 * ${
|
|
288
|
+
font-size: calc(0.9 * ${gt.size});
|
|
209
289
|
position: relative;
|
|
210
290
|
top: -5%;
|
|
211
291
|
justify-content: center;
|
|
212
292
|
}
|
|
213
293
|
|
|
214
294
|
.ft-icon--file-format {
|
|
215
|
-
font-family: ${
|
|
295
|
+
font-family: ${gt.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
216
296
|
}
|
|
217
297
|
|
|
218
298
|
.ft-icon--material {
|
|
219
|
-
font-family: ${
|
|
299
|
+
font-family: ${gt.materialFontFamily}, "Material Icons", sans-serif;
|
|
300
|
+
}
|
|
301
|
+
`,xt=e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorPrimary),yt={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:xt,fontSize:e.FtCssVariableFactory.extend("--ft-button-font-size",it.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:e.FtCssVariableFactory.extend("--ft-button-ripple-color",xt),opacityDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},mt=e.FtCssVariableFactory.extend("--ft-button-primary-color",e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),$t={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-primary-background-color",e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:mt,rippleColor:e.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",mt)},wt=e.FtCssVariableFactory.extend("--ft-button-dense-border-radius",e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusM)),kt=[e.noTextSelect,i.css`
|
|
302
|
+
:host {
|
|
303
|
+
display: inline-block;
|
|
304
|
+
max-width: 100%;
|
|
305
|
+
pointer-events: none;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
button {
|
|
309
|
+
box-shadow: 0px 0px 0px transparent;
|
|
310
|
+
border: 0px solid transparent;
|
|
311
|
+
text-shadow: 0px 0px 0px transparent;
|
|
312
|
+
font-size: ${yt.fontSize};
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
button:hover {
|
|
316
|
+
box-shadow: 0px 0px 0px transparent;
|
|
317
|
+
border: 0px solid transparent;
|
|
318
|
+
text-shadow: 0px 0px 0px transparent;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
button:active {
|
|
322
|
+
outline: none;
|
|
323
|
+
border: none;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
button:focus {
|
|
327
|
+
outline: 0;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.ft-button {
|
|
331
|
+
position: relative;
|
|
332
|
+
display: flex;
|
|
333
|
+
justify-content: center;
|
|
334
|
+
align-items: center;
|
|
335
|
+
width: 100%;
|
|
336
|
+
overflow: hidden;
|
|
337
|
+
box-sizing: border-box;
|
|
338
|
+
border: none;
|
|
339
|
+
pointer-events: auto;
|
|
340
|
+
|
|
341
|
+
--ft-button-internal-line-height: calc(${yt.fontSize} + 2px);
|
|
342
|
+
--ft-button-internal-color: ${yt.color};
|
|
343
|
+
${e.setVariable(gt.size,yt.iconSize)};
|
|
344
|
+
--ft-button-internal-vertical-padding: 6px;
|
|
345
|
+
--ft-button-internal-horizontal-padding: 8px;
|
|
346
|
+
${e.setVariable(p.color,yt.rippleColor)};
|
|
347
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${yt.iconSize});
|
|
348
|
+
|
|
349
|
+
border-radius: ${yt.borderRadius};
|
|
350
|
+
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
351
|
+
background-color: ${yt.backgroundColor};
|
|
352
|
+
color: var(--ft-button-internal-color);
|
|
353
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.ft-button:not([disabled]):hover {
|
|
357
|
+
cursor: pointer;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.ft-button--dense {
|
|
361
|
+
--ft-button-internal-vertical-padding: 2px;
|
|
362
|
+
--ft-button-internal-horizontal-padding: 4px;
|
|
363
|
+
border-radius: ${wt};
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.ft-button--round {
|
|
367
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.ft-button[disabled] {
|
|
371
|
+
filter: grayscale(1);
|
|
372
|
+
opacity: ${yt.opacityDisabled};
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.ft-button.ft-button--primary {
|
|
376
|
+
background-color: ${$t.backgroundColor};
|
|
377
|
+
--ft-button-internal-color: ${$t.color};
|
|
378
|
+
${e.setVariable(p.color,$t.rippleColor)};
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.ft-button.ft-button--outlined {
|
|
382
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
383
|
+
padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.ft-button:focus {
|
|
387
|
+
outline: none;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.ft-button--label {
|
|
391
|
+
position: relative;
|
|
392
|
+
overflow: hidden;
|
|
393
|
+
white-space: nowrap;
|
|
394
|
+
text-overflow: ellipsis;
|
|
395
|
+
display: block;
|
|
396
|
+
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
397
|
+
${e.setVariable(it.fontSize,"1em")};
|
|
398
|
+
${e.setVariable(it.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.ft-button--label[hidden] {
|
|
402
|
+
display: none;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
ft-icon {
|
|
406
|
+
flex-shrink: 0;
|
|
407
|
+
position: relative;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.ft-button--label[hidden] + ft-icon {
|
|
411
|
+
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
412
|
+
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
416
|
+
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
417
|
+
order: -1;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
ft-loader {
|
|
421
|
+
${e.setVariable(ut.size,yt.iconSize)};
|
|
422
|
+
${e.setVariable(ut.color,"var(--ft-button-internal-color)")};
|
|
423
|
+
}
|
|
424
|
+
`],_t={textColor:e.FtCssVariableFactory.extend("--ft-switch-text-color",e.designSystemVariables.colorOnSurfaceHigh),backgroundColor:e.FtCssVariableFactory.extend("--ft-switch-background-color",e.designSystemVariables.colorSurface),selectedTextColor:e.FtCssVariableFactory.extend("--ft-switch-selected-text-color",e.designSystemVariables.colorPrimary),selectedBackgroundColor:e.FtCssVariableFactory.extend("--ft-switch-selected-background-color",e.designSystemVariables.colorPrimary),borderColor:e.FtCssVariableFactory.extend("--ft-switch-border-color",e.designSystemVariables.colorOutline),borderRadius:e.FtCssVariableFactory.extend("--ft-switch-border-radius",e.designSystemVariables.borderRadiusL),fontSize:e.FtCssVariableFactory.extend("--ft-switch-font-size",it.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-switch-icon-size","SIZE","24px"),iconColor:e.FtCssVariableFactory.extend("--ft-switch-text-color",e.designSystemVariables.colorOnSurfaceMedium),rippleColor:e.FtCssVariableFactory.extend("--ft-switch-ripple-color",e.designSystemVariables.colorPrimary),outlineColor:e.FtCssVariableFactory.extend("--ft-switch-outline-color",e.designSystemVariables.colorPrimary)},St={feedbackInputMinWidth:e.FtCssVariableFactory.create("--ft-reader-feedback-input-min-width","SIZE","300px"),ratedDateColor:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),sendFeedbackColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-send-feedback-color",e.designSystemVariables.colorOnPrimary),sendFeedbackBackgroundColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-send-feedback-background-color",e.designSystemVariables.colorPrimary),filledRatingColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-filled-rating-color",e.designSystemVariables.colorPrimary),emptyRatingColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-empty-rating-color",e.designSystemVariables.colorOnSurfaceMedium),mainTitleFontSize:e.FtCssVariableFactory.external(w.fontSize,"Typography"),sectionTitleFontSize:e.FtCssVariableFactory.external(k.fontSize,"Typography")},It=i.css`
|
|
425
|
+
.ft-reader-feedback {
|
|
426
|
+
box-sizing: border-box;
|
|
427
|
+
display: flex;
|
|
428
|
+
flex-direction: column;
|
|
429
|
+
gap: 16px;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.ft-reader-feedback--placeholder {
|
|
433
|
+
display: flex;
|
|
434
|
+
flex-direction: row;
|
|
435
|
+
gap: 8px;
|
|
436
|
+
padding: 8px;
|
|
437
|
+
border: 1px dashed #e1e1e1;
|
|
438
|
+
color: #444444;
|
|
439
|
+
background: #f1f1f1;
|
|
440
|
+
border-radius: 4px;
|
|
441
|
+
align-items: center;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.ft-reader-feedback--placeholder ft-typography {
|
|
445
|
+
flex-grow: 1;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.ft-reader-feedback--placeholder ft-tooltip {
|
|
449
|
+
flex-grow: 0;
|
|
450
|
+
flex-shrink: 0;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.ft-reader-feedback--stars {
|
|
454
|
+
display: flex;
|
|
455
|
+
flex-direction: row;
|
|
456
|
+
align-items: center;
|
|
457
|
+
margin-left: -6px;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.ft-reader-feedback--rating, .ft-reader-feedback--feedback {
|
|
461
|
+
display: flex;
|
|
462
|
+
flex-direction: column;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.ft-reader-feedback--rating .ft-reader-feedback--section-title {
|
|
466
|
+
margin-bottom: 8px;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.ft-reader-feedback--rating {
|
|
470
|
+
${e.setVariable(yt.color,St.emptyRatingColor)};
|
|
471
|
+
${e.setVariable(yt.rippleColor,St.filledRatingColor)};
|
|
472
|
+
${e.setVariable(_t.textColor,St.emptyRatingColor)};
|
|
473
|
+
${e.setVariable(_t.selectedTextColor,St.filledRatingColor)};
|
|
220
474
|
}
|
|
221
|
-
|
|
475
|
+
|
|
476
|
+
.ft-reader-feedback--rating .ft-reader-feedback--active {
|
|
477
|
+
${e.setVariable(yt.color,St.filledRatingColor)};
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.ft-reader-feedback--feedback {
|
|
481
|
+
gap: 8px;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.ft-reader-feedback--rating-date {
|
|
485
|
+
color: ${St.ratedDateColor};
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.ft-reader-feedback--feedback ft-text-area {
|
|
489
|
+
min-width: ${St.feedbackInputMinWidth};
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.ft-reader-feedback--send-feedback, .ft-reader-feedback--feedback-link {
|
|
493
|
+
align-self: flex-end;
|
|
494
|
+
${e.setVariable(yt.color,St.sendFeedbackColor)};
|
|
495
|
+
${e.setVariable(yt.backgroundColor,St.sendFeedbackBackgroundColor)};
|
|
496
|
+
}
|
|
497
|
+
`
|
|
498
|
+
/**
|
|
499
|
+
* @license
|
|
500
|
+
* Copyright 2017 Google LLC
|
|
501
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
502
|
+
*/;var zt;const Tt=window,Ot=Tt.trustedTypes,Rt=Ot?Ot.createPolicy("lit-html",{createHTML:t=>t}):void 0,Ct=`lit$${(Math.random()+"").slice(9)}$`,Dt="?"+Ct,Nt=`<${Dt}>`,Et=document,At=(t="")=>Et.createComment(t),Bt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Ft=Array.isArray,jt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Mt=/-->/g,Ut=/>/g,Lt=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),Ht=/'/g,Wt=/"/g,Zt=/^(?:script|style|textarea|title)$/i,Pt=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),Vt=Symbol.for("lit-noChange"),Kt=Symbol.for("lit-nothing"),Gt=new WeakMap,Yt=Et.createTreeWalker(Et,129,null,!1),qt=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=jt;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,d=0;for(;d<i.length&&(r.lastIndex=d,l=r.exec(i),null!==l);)d=r.lastIndex,r===jt?"!--"===l[1]?r=Mt:void 0!==l[1]?r=Ut:void 0!==l[2]?(Zt.test(l[2])&&(s=RegExp("</"+l[2],"g")),r=Lt):void 0!==l[3]&&(r=Lt):r===Lt?">"===l[0]?(r=null!=s?s:jt,h=-1):void 0===l[1]?h=-2:(h=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?Lt:'"'===l[3]?Wt:Ht):r===Wt||r===Ht?r=Lt:r===Mt||r===Ut?r=jt:(r=Lt,s=void 0);const p=r===Lt&&t[e+1].startsWith("/>")?" ":"";n+=r===jt?i+Nt:h>=0?(o.push(a),i.slice(0,h)+"$lit$"+i.slice(h)+Ct+p):i+Ct+(-2===h?(o.push(void 0),e):p)}const a=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==Rt?Rt.createHTML(a):a,o]};class Xt{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const r=t.length-1,a=this.parts,[l,h]=qt(t,e);if(this.el=Xt.createElement(l,i),Yt.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=Yt.nextNode())&&a.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(Ct)){const i=h[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(Ct),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?ie:"?"===e[1]?se:"@"===e[1]?ne:ee})}else a.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(Zt.test(o.tagName)){const t=o.textContent.split(Ct),e=t.length-1;if(e>0){o.textContent=Ot?Ot.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],At()),Yt.nextNode(),a.push({type:2,index:++s});o.append(t[e],At())}}}else if(8===o.nodeType)if(o.data===Dt)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(Ct,t+1));)a.push({type:7,index:s}),t+=Ct.length-1}s++}}static createElement(t,e){const i=Et.createElement("template");return i.innerHTML=t,i}}function Jt(t,e,i=t,o){var s,n,r,a;if(e===Vt)return e;let l=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const h=Bt(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,o)),void 0!==o?(null!==(r=(a=i)._$Co)&&void 0!==r?r:a._$Co=[])[o]=l:i._$Cl=l),void 0!==l&&(e=Jt(t,l._$AS(t,e.values),l,o)),e}class Qt{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:Et).importNode(i,!0);Yt.currentNode=s;let n=Yt.nextNode(),r=0,a=0,l=o[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new te(n,n.nextSibling,this,t):1===l.type?e=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(e=new re(n,this,t)),this.u.push(e),l=o[++a]}r!==(null==l?void 0:l.index)&&(n=Yt.nextNode(),r++)}return s}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class te{constructor(t,e,i,o){var s;this.type=2,this._$AH=Kt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Jt(this,t,e),Bt(t)?t===Kt||null==t||""===t?(this._$AH!==Kt&&this._$AR(),this._$AH=Kt):t!==this._$AH&&t!==Vt&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>Ft(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==Kt&&Bt(this._$AH)?this._$AA.nextSibling.data=t:this.T(Et.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Xt.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.p(i);else{const t=new Qt(s,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=Gt.get(t.strings);return void 0===e&&Gt.set(t.strings,e=new Xt(t)),e}k(t){Ft(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new te(this.O(At()),this.O(At()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class ee{constructor(t,e,i,o,s){this.type=1,this._$AH=Kt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Kt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=Jt(this,t,e,0),n=!Bt(t)||t!==this._$AH&&t!==Vt,n&&(this._$AH=t);else{const o=t;let r,a;for(t=s[0],r=0;r<s.length-1;r++)a=Jt(this,o[i+r],e,r),a===Vt&&(a=this._$AH[r]),n||(n=!Bt(a)||a!==this._$AH[r]),a===Kt?t=Kt:t!==Kt&&(t+=(null!=a?a:"")+s[r+1]),this._$AH[r]=a}n&&!o&&this.j(t)}j(t){t===Kt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class ie extends ee{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Kt?void 0:t}}const oe=Ot?Ot.emptyScript:"";class se extends ee{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Kt?this.element.setAttribute(this.name,oe):this.element.removeAttribute(this.name)}}class ne extends ee{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Jt(this,t,e,0))&&void 0!==i?i:Kt)===Vt)return;const o=this._$AH,s=t===Kt&&o!==Kt||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==Kt&&(o===Kt||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class re{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Jt(this,t)}}const ae=Tt.litHtmlPolyfillSupport;null==ae||ae(Xt,te),(null!==(zt=Tt.litHtmlVersions)&&void 0!==zt?zt:Tt.litHtmlVersions=[]).push("2.4.0");
|
|
503
|
+
/**
|
|
504
|
+
* @license
|
|
505
|
+
* Copyright 2020 Google LLC
|
|
506
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
507
|
+
*/
|
|
508
|
+
const le=Symbol.for(""),he=t=>{if((null==t?void 0:t.r)===le)return null==t?void 0:t._$litStatic$},de=t=>({_$litStatic$:t,r:le}),pe=new Map,fe=(t=>(e,...i)=>{const o=i.length;let s,n;const r=[],a=[];let l,h=0,d=!1;for(;h<o;){for(l=e[h];h<o&&void 0!==(n=i[h],s=he(n));)l+=s+e[++h],d=!0;a.push(n),r.push(l),h++}if(h===o&&r.push(e[o]),d){const t=r.join("$$lit$$");void 0===(e=pe.get(t))&&(r.raw=r,pe.set(t,e=r)),i=a}return t(e,...i)})(Pt);var ce;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(ce||(ce={}));var ue,be,ge,ve=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class xe extends e.FtLitElement{constructor(){super(...arguments),this.variant=ce.body1}render(){return this.element?fe`
|
|
509
|
+
<${de(this.element)}
|
|
510
|
+
class="ft-typography ft-typography--${this.variant}">
|
|
511
|
+
<slot></slot>
|
|
512
|
+
</${de(this.element)}>
|
|
513
|
+
`:fe`
|
|
514
|
+
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
515
|
+
`}}xe.styles=[ot,st,nt,rt,at,lt,ht,dt,pt,ft,ct],ve([o.property()],xe.prototype,"element",void 0),ve([o.property()],xe.prototype,"variant",void 0),e.customElement("ft-typography")(xe),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(ue||(ue={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(be||(be={})),new Map([...["abw"].map((t=>[t,be.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,be.AUDIO])),...["avi"].map((t=>[t,be.AVI])),...["chm","xhs"].map((t=>[t,be.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,be.CODE])),...["csv"].map((t=>[t,be.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,be.DITA])),...["epub"].map((t=>[t,be.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,be.EXCEL])),...["flac"].map((t=>[t,be.FLAC])),...["gif"].map((t=>[t,be.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,be.GZIP])),...["html","htm","xhtml"].map((t=>[t,be.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,be.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,be.JPEG])),...["json"].map((t=>[t,be.JSON])),...["m4a","m4p"].map((t=>[t,be.M4A])),...["mov","qt"].map((t=>[t,be.MOV])),...["mp3"].map((t=>[t,be.MP3])),...["mp4","m4v"].map((t=>[t,be.MP4])),...["ogg","oga"].map((t=>[t,be.OGG])),...["pdf","ps"].map((t=>[t,be.PDF])),...["png"].map((t=>[t,be.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,be.POWERPOINT])),...["rar"].map((t=>[t,be.RAR])),...["stp"].map((t=>[t,be.STP])),...["txt","rtf","md","mdown"].map((t=>[t,be.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,be.VIDEO])),...["wav"].map((t=>[t,be.WAV])),...["wma"].map((t=>[t,be.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,be.WORD])),...["xml","xsl","rdf"].map((t=>[t,be.XML])),...["yaml","yml","x-yaml"].map((t=>[t,be.YAML])),...["zip"].map((t=>[t,be.ZIP]))]),function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(ge||(ge={}));var ye=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class me extends e.FtLitElement{constructor(){super(...arguments),this.variant=ge.fluid_topics,this.resolvedIcon=i.nothing}render(){const t="material"!==this.variant||this.value;return i.html`
|
|
222
516
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
223
517
|
${s.unsafeHTML(this.resolvedIcon)}
|
|
224
518
|
<slot ?hidden=${t}></slot>
|
|
225
519
|
</i>
|
|
226
|
-
`}get textContent(){var t,
|
|
520
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case ge.file_format:this.resolvedIcon=null!==(t=be[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case ge.fluid_topics:this.resolvedIcon=null!==(e=ue[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o;break;default:this.resolvedIcon=this.value||i.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}me.elementDefinitions={},me.styles=vt,ye([o.property()],me.prototype,"variant",void 0),ye([o.property()],me.prototype,"value",void 0),ye([o.state()],me.prototype,"resolvedIcon",void 0),ye([o.query("slot")],me.prototype,"slottedContent",void 0),e.customElement("ft-icon")(me);const $e=e.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),we=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),ke=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),_e=e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),Se=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),Ie=e.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),ze=i.css`
|
|
227
521
|
.ft-tooltip--container {
|
|
228
522
|
display: block;
|
|
229
523
|
position: relative;
|
|
@@ -239,23 +533,23 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
239
533
|
box-sizing: border-box;
|
|
240
534
|
overflow: hidden;
|
|
241
535
|
width: max-content;
|
|
242
|
-
max-width: ${
|
|
536
|
+
max-width: ${Ie};
|
|
243
537
|
text-align: center;
|
|
244
|
-
padding: ${
|
|
245
|
-
z-index: ${
|
|
538
|
+
padding: ${$e};
|
|
539
|
+
z-index: ${_e};
|
|
246
540
|
}
|
|
247
541
|
|
|
248
542
|
.ft-tooltip--content {
|
|
249
543
|
padding: 4px 8px;
|
|
250
|
-
border-radius: ${
|
|
251
|
-
background-color: ${
|
|
252
|
-
color: ${
|
|
544
|
+
border-radius: ${Se};
|
|
545
|
+
background-color: ${ke};
|
|
546
|
+
color: ${we};
|
|
253
547
|
top: -500px;
|
|
254
548
|
left: -500px;
|
|
255
549
|
position: relative;
|
|
256
550
|
word-break: break-word;
|
|
257
551
|
}
|
|
258
|
-
`;var
|
|
552
|
+
`;var Te=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 Oe extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new e.Debouncer,this.revealDebouncer=new e.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return i.html`
|
|
259
553
|
<div part="container"
|
|
260
554
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
261
555
|
@mouseenter=${this.onHover}
|
|
@@ -273,96 +567,7 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
273
567
|
</div>
|
|
274
568
|
</div>
|
|
275
569
|
</div>
|
|
276
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((
|
|
277
|
-
:host {
|
|
278
|
-
display: contents;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.ft-ripple {
|
|
282
|
-
position: absolute;
|
|
283
|
-
inset: 0;
|
|
284
|
-
pointer-events: none;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
288
|
-
overflow: hidden;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.ft-ripple .ft-ripple--background,
|
|
292
|
-
.ft-ripple .ft-ripple--effect {
|
|
293
|
-
position: absolute;
|
|
294
|
-
opacity: 0;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.ft-ripple .ft-ripple--background {
|
|
298
|
-
background-color: ${_i.backgroundColor};
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.ft-ripple .ft-ripple--effect {
|
|
302
|
-
background-color: ${_i.color};
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
306
|
-
background-color: ${Ci};
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
310
|
-
background-color: ${Oi};
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
314
|
-
background-color: ${Ii};
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
318
|
-
background-color: ${zi};
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.ft-ripple .ft-ripple--background {
|
|
322
|
-
top: 0;
|
|
323
|
-
left: 0;
|
|
324
|
-
height: 100%;
|
|
325
|
-
width: 100%;
|
|
326
|
-
transition: opacity 75ms linear;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
.ft-ripple .ft-ripple--effect,
|
|
330
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
331
|
-
border-radius: 50%;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.ft-ripple .ft-ripple--effect {
|
|
335
|
-
transform: translate(-50%, -50%) scale(0.15);
|
|
336
|
-
transition: transform 300ms ease, opacity 75ms linear;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
340
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
341
|
-
left: 50%;
|
|
342
|
-
top: 50%;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
346
|
-
transform: translate(-50%, -50%);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
350
|
-
opacity: ${_i.opacityContentOnSurfaceHover};
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
354
|
-
opacity: ${_i.opacityContentOnSurfaceSelected};
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
358
|
-
opacity: ${_i.opacityContentOnSurfaceFocused};
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
362
|
-
opacity: ${_i.opacityContentOnSurfacePressed};
|
|
363
|
-
transform: translate(-50%, -50%) scale(1);
|
|
364
|
-
}
|
|
365
|
-
`;var Ni=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Di extends i.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 i.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.moveRipple=t=>{var i,e;let{x:o,y:s}=this.getCoordinates(t),n=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return e.html`
|
|
570
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=e.height,s=o;break;case"left":n=i,s=-this.tooltip.clientWidth;break;case"right":n=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${e.width}px, ${Ie})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}Oe.elementDefinitions={"ft-typography":xe},Oe.styles=ze,Te([o.property()],Oe.prototype,"text",void 0),Te([o.property({type:Boolean})],Oe.prototype,"manual",void 0),Te([o.property({type:Boolean})],Oe.prototype,"inline",void 0),Te([o.property({type:Number})],Oe.prototype,"delay",void 0),Te([o.property()],Oe.prototype,"position",void 0),Te([o.queryAssignedNodes("",!0)],Oe.prototype,"slotNodes",void 0),Te([o.query(".ft-tooltip--container")],Oe.prototype,"container",void 0),Te([o.query("slot")],Oe.prototype,"target",void 0),Te([o.query(".ft-tooltip")],Oe.prototype,"tooltip",void 0),Te([o.query(".ft-tooltip--content")],Oe.prototype,"tooltipContent",void 0),Te([o.state()],Oe.prototype,"visible",void 0),e.customElement("ft-tooltip")(Oe);var Re=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ce extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new e.Debouncer(10),this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),n=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return i.html`
|
|
366
571
|
<style>
|
|
367
572
|
.ft-ripple .ft-ripple--effect,
|
|
368
573
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -379,7 +584,7 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
379
584
|
<div class="ft-ripple--background"></div>
|
|
380
585
|
<div class="ft-ripple--effect"></div>
|
|
381
586
|
</div>
|
|
382
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i
|
|
587
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}))}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}Ce.elementDefinitions={},Ce.styles=x,Re([o.property({type:Boolean})],Ce.prototype,"primary",void 0),Re([o.property({type:Boolean})],Ce.prototype,"secondary",void 0),Re([o.property({type:Boolean})],Ce.prototype,"unbounded",void 0),Re([o.property({type:Boolean})],Ce.prototype,"activated",void 0),Re([o.property({type:Boolean})],Ce.prototype,"selected",void 0),Re([o.property({type:Boolean})],Ce.prototype,"disabled",void 0),Re([o.state()],Ce.prototype,"hovered",void 0),Re([o.state()],Ce.prototype,"focused",void 0),Re([o.state()],Ce.prototype,"pressed",void 0),Re([o.state()],Ce.prototype,"rippling",void 0),Re([o.state()],Ce.prototype,"rippleSize",void 0),Re([o.state()],Ce.prototype,"originX",void 0),Re([o.state()],Ce.prototype,"originY",void 0),Re([o.query(".ft-ripple")],Ce.prototype,"ripple",void 0),Re([o.query(".ft-ripple--effect")],Ce.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(Ce);const De={borderRadiusLeft:e.FtCssVariableFactory.extend("--ft-switch-option-border-radius-left",e.designSystemVariables.borderRadiusL),borderRadiusRight:e.FtCssVariableFactory.extend("--ft-switch-option-border-radius-right",e.designSystemVariables.borderRadiusL),borderWidthLeft:e.FtCssVariableFactory.create("--ft-switch-option-border-width-left","SIZE","1px"),borderWidthRight:e.FtCssVariableFactory.create("--ft-switch-option-border-width-right","SIZE","1px"),borderWidthVertical:e.FtCssVariableFactory.create("--ft-switch-option-border-width-vertical","SIZE","1px")},Ne=i.css`
|
|
383
588
|
.ft-switch-option {
|
|
384
589
|
position: relative;
|
|
385
590
|
display: inline-block;
|
|
@@ -393,20 +598,20 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
393
598
|
}
|
|
394
599
|
|
|
395
600
|
.ft-switch-option--content {
|
|
396
|
-
--ft-switch-option-internal-line-height: calc(${
|
|
397
|
-
--ft-switch-option-internal-content-height: max(var(--ft-switch-option-internal-line-height), ${
|
|
601
|
+
--ft-switch-option-internal-line-height: calc(${_t.fontSize} + 2px);
|
|
602
|
+
--ft-switch-option-internal-content-height: max(var(--ft-switch-option-internal-line-height), ${_t.iconSize});
|
|
398
603
|
|
|
399
604
|
border-style: solid;
|
|
400
|
-
border-color: ${
|
|
401
|
-
border-width: ${
|
|
402
|
-
border-radius: ${
|
|
605
|
+
border-color: ${_t.borderColor};
|
|
606
|
+
border-width: ${De.borderWidthVertical} ${De.borderWidthRight} ${De.borderWidthVertical} ${De.borderWidthLeft};
|
|
607
|
+
border-radius: ${De.borderRadiusLeft} ${De.borderRadiusRight} ${De.borderRadiusRight} ${De.borderRadiusLeft};
|
|
403
608
|
display: flex;
|
|
404
609
|
align-items: center;
|
|
405
610
|
justify-content: center;
|
|
406
611
|
overflow: hidden;
|
|
407
|
-
${
|
|
612
|
+
${e.setVariable(gt.size,_t.iconSize)};
|
|
408
613
|
padding: var(--ft-switch-internal-vertical-padding, 6px) var(--ft-switch-internal-horizontal-padding, 8px);
|
|
409
|
-
background-color: ${
|
|
614
|
+
background-color: ${_t.backgroundColor};
|
|
410
615
|
-webkit-mask-image: radial-gradient(white, black);
|
|
411
616
|
}
|
|
412
617
|
|
|
@@ -415,28 +620,28 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
415
620
|
}
|
|
416
621
|
|
|
417
622
|
.ft-switch-option--input:checked + .ft-switch-option--content:before {
|
|
418
|
-
background-color: ${
|
|
419
|
-
border-radius: ${
|
|
623
|
+
background-color: ${_t.selectedBackgroundColor};
|
|
624
|
+
border-radius: ${De.borderRadiusLeft} ${De.borderRadiusRight} ${De.borderRadiusRight} ${De.borderRadiusLeft};
|
|
420
625
|
position: absolute;
|
|
421
626
|
inset: 0;
|
|
422
627
|
content: "";
|
|
423
628
|
z-index: 1;
|
|
424
|
-
opacity: ${
|
|
629
|
+
opacity: ${e.designSystemVariables.opacityPrimaryOnSurfaceSelected};
|
|
425
630
|
}
|
|
426
631
|
|
|
427
632
|
.ft-switch-option--label {
|
|
428
|
-
color: ${
|
|
633
|
+
color: ${_t.textColor};
|
|
429
634
|
overflow: hidden;
|
|
430
635
|
white-space: nowrap;
|
|
431
636
|
text-overflow: ellipsis;
|
|
432
637
|
display: block;
|
|
433
638
|
margin: 0 8px;
|
|
434
|
-
${
|
|
435
|
-
${
|
|
639
|
+
${e.setVariable(it.fontSize,_t.fontSize)};
|
|
640
|
+
${e.setVariable(it.lineHeight,"var(--ft-switch-option-internal-content-height)")}
|
|
436
641
|
}
|
|
437
642
|
|
|
438
643
|
.ft-switch-option--input:checked + .ft-switch-option--content .ft-switch-option--label {
|
|
439
|
-
color: ${
|
|
644
|
+
color: ${_t.selectedTextColor};
|
|
440
645
|
}
|
|
441
646
|
|
|
442
647
|
.ft-switch-option--label[hidden] {
|
|
@@ -444,7 +649,7 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
444
649
|
}
|
|
445
650
|
|
|
446
651
|
.ft-switch-option--ripple {
|
|
447
|
-
${
|
|
652
|
+
${e.setVariable(p.color,_t.rippleColor)};
|
|
448
653
|
}
|
|
449
654
|
|
|
450
655
|
ft-icon, ft-ripple, ft-typography {
|
|
@@ -457,49 +662,49 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
457
662
|
|
|
458
663
|
ft-icon {
|
|
459
664
|
flex-shrink: 0;
|
|
460
|
-
color: ${
|
|
665
|
+
color: ${_t.iconColor};
|
|
461
666
|
}
|
|
462
667
|
|
|
463
668
|
.ft-switch-option--input:checked + .ft-switch-option--content ft-icon {
|
|
464
|
-
color: ${
|
|
669
|
+
color: ${_t.selectedTextColor};
|
|
465
670
|
}
|
|
466
|
-
`;var
|
|
467
|
-
<label part="label" for="input" class=${n.classMap(t)}
|
|
671
|
+
`;var Ee=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ae extends CustomEvent{constructor(){super("option-change",{bubbles:!0,composed:!0})}}class Be extends e.FtLitElement{constructor(){super(...arguments),this.value="",this.iconVariant=ge.material,this.label="",this.tooltipPosition="bottom",this.selected=!1,this.trailingIcon=!1,this.unselectable=!1}focus(){this.input.focus()}updated(t){super.updated(t),t.has("selected")&&this.dispatchEvent(new Ae)}render(){const t={"ft-switch-option":!0,"ft-switch-option--trailing-icon":this.trailingIcon};return this.addTooltip(i.html`
|
|
672
|
+
<label part="label" for="input" class=${n.classMap(t)}
|
|
673
|
+
@click=${this.onChange}>
|
|
468
674
|
<input id="input" type="radio" class="ft-switch-option--input"
|
|
469
|
-
.checked=${this.selected}
|
|
470
|
-
@click=${this.onChange}>
|
|
675
|
+
.checked=${this.selected}>
|
|
471
676
|
<div class="ft-switch-option--content">
|
|
472
677
|
<ft-ripple part="ripple" class="ft-switch-option--ripple"></ft-ripple>
|
|
473
678
|
<ft-typography part="text"
|
|
474
679
|
variant="button"
|
|
475
|
-
class="ft-switch-option--label ${
|
|
680
|
+
class="ft-switch-option--label ${e.isSafari?"ft-safari-ellipsis-fix":""}"
|
|
476
681
|
?hidden=${!this.hasTextContent()}>
|
|
477
682
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
478
683
|
</ft-typography>
|
|
479
684
|
${this.resolveIcon()}
|
|
480
685
|
</div>
|
|
481
686
|
</label>
|
|
482
|
-
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:
|
|
687
|
+
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:i.html`
|
|
483
688
|
<ft-tooltip part="tooltip"
|
|
484
689
|
text="${this.getLabel()}"
|
|
485
690
|
position="${this.tooltipPosition}">
|
|
486
691
|
${t}
|
|
487
692
|
</ft-tooltip>
|
|
488
|
-
`}onChange(){this.selected=!this.unselectable||!this.selected}getLabel(){return this.label||this.textContent}resolveIcon(){return this.icon?
|
|
693
|
+
`}onChange(){this.selected=!this.unselectable||!this.selected}getLabel(){return this.label||this.textContent}resolveIcon(){return this.icon?i.html`
|
|
489
694
|
<ft-icon part="icon" .variant=${this.iconVariant} value=${this.icon}></ft-icon>
|
|
490
|
-
`:
|
|
695
|
+
`: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()}}Be.elementDefinitions={"ft-ripple":Ce,"ft-typography":xe,"ft-tooltip":Oe,"ft-icon":me},Be.styles=[e.safariEllipsisFix,Ne],Ee([o.property()],Be.prototype,"value",void 0),Ee([o.property()],Be.prototype,"icon",void 0),Ee([o.property()],Be.prototype,"iconVariant",void 0),Ee([o.property()],Be.prototype,"label",void 0),Ee([o.property()],Be.prototype,"tooltipPosition",void 0),Ee([o.property({type:Boolean,reflect:!0})],Be.prototype,"selected",void 0),Ee([o.property({type:Boolean})],Be.prototype,"trailingIcon",void 0),Ee([o.property({type:Boolean})],Be.prototype,"unselectable",void 0),Ee([o.query(".ft-switch-option--content slot")],Be.prototype,"slottedContent",void 0),Ee([o.query(".ft-switch-option--input")],Be.prototype,"input",void 0);var Fe=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 je extends CustomEvent{constructor(t){super("change",{detail:t})}}class Me 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){var e;super.updated(t),t.has("selectedOption")&&(this.updateOptions(),this.dispatchEvent(new je(null===(e=this.selectedOption)||void 0===e?void 0:e.value))),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`
|
|
491
696
|
<div @keydown=${this.onKeyDown} tabindex="0" class="${n.classMap(t)}">
|
|
492
697
|
<slot @slotchange=${this.onSlotchange}
|
|
493
698
|
@option-change=${this.onOptionChange}></slot>
|
|
494
699
|
</div>
|
|
495
|
-
`}onKeyDown(t){let
|
|
700
|
+
`}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 Be&&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)}onOptionChange(t){t.stopPropagation();let e=t.target;e.selected?this.selectedOption=e:this.selectedOption=this.options.find((t=>t.selected))}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach((t=>{t.selected=t==this.selectedOption}))}}Me.elementDefinitions={},Me.styles=i.css`
|
|
496
701
|
:host {
|
|
497
702
|
display: inline-block;
|
|
498
703
|
}
|
|
499
704
|
|
|
500
705
|
.ft-switch {
|
|
501
|
-
border-radius: ${
|
|
502
|
-
outline-color: ${
|
|
706
|
+
border-radius: ${_t.borderRadius};
|
|
707
|
+
outline-color: ${_t.outlineColor};
|
|
503
708
|
}
|
|
504
709
|
|
|
505
710
|
.ft-switch slot {
|
|
@@ -508,25 +713,25 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
508
713
|
}
|
|
509
714
|
|
|
510
715
|
.ft-switch slot::slotted(ft-switch-option) {
|
|
511
|
-
${
|
|
512
|
-
${
|
|
513
|
-
${
|
|
716
|
+
${e.setVariable(De.borderRadiusLeft,"0")};
|
|
717
|
+
${e.setVariable(De.borderRadiusRight,"0")};
|
|
718
|
+
${e.setVariable(De.borderWidthLeft,"0")};
|
|
514
719
|
}
|
|
515
720
|
|
|
516
721
|
.ft-switch slot::slotted(ft-switch-option:first-child) {
|
|
517
|
-
${
|
|
518
|
-
${
|
|
722
|
+
${e.setVariable(De.borderRadiusLeft,_t.borderRadius)};
|
|
723
|
+
${e.setVariable(De.borderWidthLeft,"1px")};
|
|
519
724
|
}
|
|
520
725
|
|
|
521
726
|
.ft-switch slot::slotted(ft-switch-option:last-child) {
|
|
522
|
-
${
|
|
727
|
+
${e.setVariable(De.borderRadiusRight,_t.borderRadius)};
|
|
523
728
|
}
|
|
524
729
|
|
|
525
730
|
.ft-switch--dense slot::slotted(ft-switch-option) {
|
|
526
731
|
--ft-switch-internal-vertical-padding: 2px;
|
|
527
732
|
--ft-switch-internal-horizontal-padding: 4px;
|
|
528
733
|
}
|
|
529
|
-
`,
|
|
734
|
+
`,Fe([o.property({type:Boolean})],Me.prototype,"dense",void 0),Fe([o.property({type:Boolean})],Me.prototype,"unselectable",void 0),Fe([o.query(".ft-switch slot")],Me.prototype,"slottedContent",void 0),Fe([o.state()],Me.prototype,"selectedOption",void 0),Fe([o.query(".ft-switch")],Me.prototype,"ftSwitchDiv",void 0),e.customElement("ft-switch")(Me),e.customElement("ft-switch-option")(Be);const Ue=e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),Le=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),He=i.css`
|
|
530
735
|
:host {
|
|
531
736
|
display: block;
|
|
532
737
|
}
|
|
@@ -537,17 +742,17 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
537
742
|
|
|
538
743
|
ft-icon {
|
|
539
744
|
transform: rotate(-45deg);
|
|
540
|
-
color: ${
|
|
745
|
+
color: ${Ue};
|
|
541
746
|
}
|
|
542
747
|
|
|
543
748
|
.ft-resizer--dragging ft-icon,
|
|
544
749
|
.ft-resizer:hover ft-icon {
|
|
545
|
-
color: ${
|
|
750
|
+
color: ${Le};
|
|
546
751
|
}
|
|
547
|
-
`;var
|
|
752
|
+
`;var We=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 Ze extends CustomEvent{constructor(t,e){super("resize",{detail:{width:t,height:e}})}}class Pe extends e.FtLitElement{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.cursor="nwse-resize",this.dragging=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=t=>this.doDrag(t.clientX,t.clientY),this.doDragFromTouch=t=>this.doDrag(t.touches[0].clientX,t.touches[0].clientY),this.stopDrag=()=>{this.dragging=!1,document.removeEventListener("mousemove",this.doDragFromMouse,!1),document.removeEventListener("mouseup",this.stopDrag,!1),document.removeEventListener("touchmove",this.doDragFromTouch,!1),document.removeEventListener("touchend",this.stopDrag,!1),document.removeEventListener("touchcancel",this.stopDrag,!1)}}render(){return i.html`
|
|
548
753
|
<style>
|
|
549
754
|
.ft-resizer {
|
|
550
|
-
cursor: ${
|
|
755
|
+
cursor: ${i.unsafeCSS(this.cursor)}
|
|
551
756
|
}
|
|
552
757
|
</style>
|
|
553
758
|
<div class="ft-resizer ft-no-text-select ${this.dragging?"ft-resizer--dragging":""}"
|
|
@@ -555,25 +760,25 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
555
760
|
@touchstart=${this.initDragFromTouch}>
|
|
556
761
|
<ft-icon variant="material">${this.icon}</ft-icon>
|
|
557
762
|
</div>
|
|
558
|
-
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,
|
|
763
|
+
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,e){this.dragging=!0,this.startX=t,this.startY=e,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,e){let i=this.fixedWidth+t-this.startX,o=this.fixedHeight+e-this.startY;this.dispatchEvent(new Ze(i,o))}}Pe.elementDefinitions={"ft-icon":me},Pe.styles=[e.noTextSelect,He],We([o.property({type:Number})],Pe.prototype,"initialWidth",void 0),We([o.property({type:Number})],Pe.prototype,"initialHeight",void 0),We([o.property()],Pe.prototype,"icon",void 0),We([o.property()],Pe.prototype,"cursor",void 0),We([o.state()],Pe.prototype,"dragging",void 0),e.customElement("ft-resizer")(Pe);const Ve={fontSize:e.FtCssVariableFactory.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:e.FtCssVariableFactory.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:e.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:e.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","SIZE","12px"),labelMaxWidth:e.FtCssVariableFactory.create("--ft-input-label-max-width","SIZE","100%"),borderColor:e.FtCssVariableFactory.extend("--ft-input-label-border-color",e.designSystemVariables.colorOutline),textColor:e.FtCssVariableFactory.extend("--ft-input-label-text-color",e.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:e.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color",e.designSystemVariables.colorOnSurfaceDisabled),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},Ke=i.css`
|
|
559
764
|
.ft-input-label {
|
|
560
765
|
position: absolute;
|
|
561
766
|
inset: 0;
|
|
562
767
|
display: flex;
|
|
563
|
-
background-color: ${
|
|
564
|
-
border-radius: ${
|
|
768
|
+
background-color: ${Ve.colorSurface};
|
|
769
|
+
border-radius: ${Ve.borderRadiusS} ${Ve.borderRadiusS} 0 0;
|
|
565
770
|
}
|
|
566
771
|
|
|
567
772
|
.ft-input-label--outlined {
|
|
568
|
-
border-radius: ${
|
|
773
|
+
border-radius: ${Ve.borderRadiusS};
|
|
569
774
|
}
|
|
570
775
|
|
|
571
776
|
.ft-input-label {
|
|
572
|
-
border-color: ${
|
|
777
|
+
border-color: ${Ve.borderColor};
|
|
573
778
|
}
|
|
574
779
|
|
|
575
780
|
.ft-input-label.ft-input-label--in-error {
|
|
576
|
-
border-color: ${
|
|
781
|
+
border-color: ${Ve.colorError}
|
|
577
782
|
}
|
|
578
783
|
|
|
579
784
|
.ft-input-label:before,
|
|
@@ -586,7 +791,7 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
586
791
|
}
|
|
587
792
|
|
|
588
793
|
.ft-input-label:before {
|
|
589
|
-
width: calc(${
|
|
794
|
+
width: calc(${Ve.horizontalSpacing} - 4px);
|
|
590
795
|
flex-shrink: 0;
|
|
591
796
|
}
|
|
592
797
|
|
|
@@ -602,20 +807,20 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
602
807
|
border-bottom-width: 1px;
|
|
603
808
|
border-bottom-style: solid;
|
|
604
809
|
border-color: inherit;
|
|
605
|
-
color: ${
|
|
810
|
+
color: ${Ve.textColor};
|
|
606
811
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
607
|
-
max-width: calc(${
|
|
812
|
+
max-width: calc(${Ve.labelMaxWidth} - 2 * (${Ve.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
|
|
608
813
|
text-overflow: ellipsis;
|
|
609
|
-
${
|
|
610
|
-
${
|
|
814
|
+
${e.setVariable(W.fontSize,Ve.fontSize)};
|
|
815
|
+
${e.setVariable(W.lineHeight,Ve.fontSize)};
|
|
611
816
|
}
|
|
612
817
|
|
|
613
818
|
.ft-input-label--in-error .ft-input-label--text {
|
|
614
|
-
color: ${
|
|
819
|
+
color: ${Ve.colorError}
|
|
615
820
|
}
|
|
616
821
|
|
|
617
822
|
.ft-input-label--disabled .ft-input-label--text {
|
|
618
|
-
color: ${
|
|
823
|
+
color: ${Ve.disabledTextColor};
|
|
619
824
|
}
|
|
620
825
|
|
|
621
826
|
.ft-input-label--hidden-text {
|
|
@@ -632,19 +837,19 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
632
837
|
overflow: hidden;
|
|
633
838
|
white-space: nowrap;
|
|
634
839
|
text-overflow: ellipsis;
|
|
635
|
-
padding: ${
|
|
636
|
-
margin: calc(${
|
|
840
|
+
padding: ${Ve.verticalSpacing} 4px;
|
|
841
|
+
margin: calc(${Ve.verticalSpacing} * -1) 0;
|
|
637
842
|
max-width: 100%;
|
|
638
843
|
box-sizing: border-box;
|
|
639
844
|
}
|
|
640
845
|
|
|
641
846
|
.ft-input-label--raised .ft-input-label--text {
|
|
642
|
-
${
|
|
643
|
-
${
|
|
847
|
+
${e.setVariable(W.fontSize,Ve.raisedFontSize)};
|
|
848
|
+
${e.setVariable(W.lineHeight,Ve.raisedFontSize)};
|
|
644
849
|
}
|
|
645
850
|
|
|
646
851
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
647
|
-
top: ${
|
|
852
|
+
top: ${Ve.verticalSpacing};
|
|
648
853
|
}
|
|
649
854
|
|
|
650
855
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -657,36 +862,36 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
657
862
|
.ft-input-label--outlined:before {
|
|
658
863
|
border-left-width: 1px;
|
|
659
864
|
border-left-style: solid;
|
|
660
|
-
border-radius: ${
|
|
865
|
+
border-radius: ${Ve.borderRadiusS} 0 0 ${Ve.borderRadiusS};
|
|
661
866
|
}
|
|
662
867
|
|
|
663
868
|
.ft-input-label--outlined:after {
|
|
664
869
|
border-right-width: 1px;
|
|
665
870
|
border-right-style: solid;
|
|
666
|
-
border-radius: 0 ${
|
|
871
|
+
border-radius: 0 ${Ve.borderRadiusS} ${Ve.borderRadiusS} 0;
|
|
667
872
|
}
|
|
668
873
|
|
|
669
874
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
670
875
|
padding: 2px 4px;
|
|
671
|
-
z-index: ${
|
|
672
|
-
background-color: ${
|
|
673
|
-
border-radius: ${
|
|
876
|
+
z-index: ${Ve.raisedZIndex};
|
|
877
|
+
background-color: ${Ve.colorSurface};
|
|
878
|
+
border-radius: ${Ve.borderRadiusS};
|
|
674
879
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
675
880
|
}
|
|
676
881
|
|
|
677
882
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
678
883
|
border-top: none;
|
|
679
884
|
}
|
|
680
|
-
`;var
|
|
885
|
+
`;var Ge=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ye extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return i.html`
|
|
681
886
|
<div class="${n.classMap(t)}">
|
|
682
|
-
${this.text?
|
|
887
|
+
${this.text?i.html`
|
|
683
888
|
<div class="ft-input-label--text ft-typography--caption">
|
|
684
889
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
685
890
|
<span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span>
|
|
686
891
|
</div>
|
|
687
892
|
`:null}
|
|
688
893
|
</div>
|
|
689
|
-
`}}
|
|
894
|
+
`}}Ye.elementDefinitions={},Ye.styles=[ht,Ke],Ge([o.property({type:String})],Ye.prototype,"text",void 0),Ge([o.property({type:Boolean})],Ye.prototype,"raised",void 0),Ge([o.property({type:Boolean})],Ye.prototype,"outlined",void 0),Ge([o.property({type:Boolean})],Ye.prototype,"disabled",void 0),Ge([o.property({type:Boolean})],Ye.prototype,"error",void 0),e.customElement("ft-input-label")(Ye);const qe={fontSize:e.FtCssVariableFactory.create("--ft-text-area-font-size","SIZE","14px"),labelSize:e.FtCssVariableFactory.create("--ft-text-area-label-size","SIZE","11px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-text-area-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-text-area-horizontal-spacing","SIZE","16px"),helperColor:e.FtCssVariableFactory.extend("--ft-text-area-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")},Xe=i.css`
|
|
690
895
|
*:focus {
|
|
691
896
|
outline: none;
|
|
692
897
|
}
|
|
@@ -698,10 +903,10 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
698
903
|
}
|
|
699
904
|
|
|
700
905
|
ft-input-label {
|
|
701
|
-
${
|
|
702
|
-
${
|
|
703
|
-
${
|
|
704
|
-
${
|
|
906
|
+
${e.setVariable(Ve.fontSize,qe.fontSize)};
|
|
907
|
+
${e.setVariable(Ve.raisedFontSize,qe.labelSize)};
|
|
908
|
+
${e.setVariable(Ve.verticalSpacing,qe.verticalSpacing)};
|
|
909
|
+
${e.setVariable(Ve.horizontalSpacing,qe.horizontalSpacing)};
|
|
705
910
|
}
|
|
706
911
|
|
|
707
912
|
.ft-text-area--main-panel {
|
|
@@ -719,8 +924,8 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
719
924
|
}
|
|
720
925
|
|
|
721
926
|
.ft-text-area--input-panel ft-ripple {
|
|
722
|
-
${
|
|
723
|
-
${
|
|
927
|
+
${e.setVariable(p.opacityContentOnSurfaceHover,"0.08")};
|
|
928
|
+
${e.setVariable(p.opacityContentOnSurfacePressed,"0.04")};
|
|
724
929
|
}
|
|
725
930
|
|
|
726
931
|
.ft-text-area--input {
|
|
@@ -732,12 +937,12 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
732
937
|
align-self: stretch;
|
|
733
938
|
resize: none;
|
|
734
939
|
|
|
735
|
-
${
|
|
736
|
-
${
|
|
737
|
-
color: ${
|
|
940
|
+
${e.setVariable(B.fontSize,qe.fontSize)};
|
|
941
|
+
${e.setVariable(B.lineHeight,qe.fontSize)};
|
|
942
|
+
color: ${qe.colorOnSurface};
|
|
738
943
|
|
|
739
|
-
padding: 0 ${
|
|
740
|
-
margin: calc(${
|
|
944
|
+
padding: 0 ${qe.horizontalSpacing};
|
|
945
|
+
margin: calc(${qe.verticalSpacing} + ${qe.labelSize} / 2) 0 ${qe.verticalSpacing} 0;
|
|
741
946
|
|
|
742
947
|
border: none;
|
|
743
948
|
background: none;
|
|
@@ -746,7 +951,7 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
746
951
|
}
|
|
747
952
|
|
|
748
953
|
.ft-text-area--disabled .ft-text-area--input {
|
|
749
|
-
color: ${
|
|
954
|
+
color: ${qe.colorOnSurfaceDisabled};
|
|
750
955
|
}
|
|
751
956
|
|
|
752
957
|
.ft-text-area:not(.ft-text-area--disabled) .ft-text-area--input-panel {
|
|
@@ -754,32 +959,32 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
754
959
|
}
|
|
755
960
|
|
|
756
961
|
.ft-text-area:not(.ft-text-area--disabled):focus-within ft-input-label {
|
|
757
|
-
${
|
|
758
|
-
${
|
|
962
|
+
${e.setVariable(Ve.borderColor,qe.colorPrimary)};
|
|
963
|
+
${e.setVariable(Ve.textColor,qe.colorPrimary)};
|
|
759
964
|
}
|
|
760
965
|
|
|
761
966
|
.ft-text-area--filled .ft-text-area--input-panel {
|
|
762
|
-
border-radius: ${
|
|
967
|
+
border-radius: ${qe.borderRadiusS} ${qe.borderRadiusS} 0 0;
|
|
763
968
|
}
|
|
764
969
|
|
|
765
970
|
.ft-text-area--filled:not(.ft-text-area--no-label) .ft-text-area--input {
|
|
766
971
|
align-self: stretch;
|
|
767
|
-
margin-bottom: ${
|
|
768
|
-
margin-top: calc(${
|
|
972
|
+
margin-bottom: ${qe.verticalSpacing};
|
|
973
|
+
margin-top: calc(${qe.labelSize} + 2 * ${qe.verticalSpacing});
|
|
769
974
|
}
|
|
770
975
|
|
|
771
976
|
.ft-text-area--outlined .ft-text-area--input-panel {
|
|
772
|
-
border-radius: ${
|
|
977
|
+
border-radius: ${qe.borderRadiusS};
|
|
773
978
|
}
|
|
774
979
|
|
|
775
980
|
.ft-text-area--helper-text {
|
|
776
|
-
padding: 0 12px 0 ${
|
|
777
|
-
color: ${
|
|
981
|
+
padding: 0 12px 0 ${qe.horizontalSpacing};
|
|
982
|
+
color: ${qe.helperColor};
|
|
778
983
|
}
|
|
779
984
|
|
|
780
985
|
.ft-text-area--in-error .ft-text-area--input,
|
|
781
986
|
.ft-text-area--in-error .ft-text-area--helper-text {
|
|
782
|
-
color: ${
|
|
987
|
+
color: ${qe.colorError};
|
|
783
988
|
}
|
|
784
989
|
|
|
785
990
|
ft-resizer {
|
|
@@ -787,10 +992,10 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
787
992
|
right: 0;
|
|
788
993
|
bottom: 0;
|
|
789
994
|
}
|
|
790
|
-
`;var
|
|
995
|
+
`;var Je=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 Qe extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.height=50,this.focused=!1}render(){const t={"ft-text-area":!0,"ft-text-area--filled":!this.outlined,"ft-text-area--outlined":this.outlined,"ft-text-area--disabled":this.disabled,"ft-text-area--has-value":!!this.value,"ft-text-area--no-label":!this.label,"ft-text-area--in-error":this.error};return i.html`
|
|
791
996
|
<style>
|
|
792
997
|
.ft-text-area--main-panel {
|
|
793
|
-
height: calc(4 * ${
|
|
998
|
+
height: calc(4 * ${qe.verticalSpacing} + ${qe.labelSize} + ${qe.fontSize} + ${this.height}px);
|
|
794
999
|
}
|
|
795
1000
|
</style>
|
|
796
1001
|
<div class="${n.classMap(t)}">
|
|
@@ -803,7 +1008,7 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
803
1008
|
></ft-input-label>
|
|
804
1009
|
<div class="ft-text-area--input-panel"
|
|
805
1010
|
aria-label="${this.label}">
|
|
806
|
-
${this.outlined?null:
|
|
1011
|
+
${this.outlined?null:i.html`
|
|
807
1012
|
<ft-ripple ?disabled=${this.disabled} activated></ft-ripple>
|
|
808
1013
|
`}
|
|
809
1014
|
<textarea class="ft-typography--body1 ft-text-area--input"
|
|
@@ -820,211 +1025,19 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
820
1025
|
initialHeight="${this.height}"
|
|
821
1026
|
cursor="ns-resize"></ft-resizer>
|
|
822
1027
|
</div>
|
|
823
|
-
${this.helper?
|
|
1028
|
+
${this.helper?i.html`
|
|
824
1029
|
<ft-typography class="ft-text-area--helper-text" variant="caption">
|
|
825
1030
|
${this.helper}
|
|
826
1031
|
</ft-typography>`:void 0}
|
|
827
1032
|
</div>
|
|
828
|
-
`}updated(t){super.updated(t),t.has("value")&&this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onKeyDown(t){"Enter"!==t.key&&" "!==t.key||t.stopPropagation()}updateValueFromInputField(){this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.textarea)||void 0===t?void 0:t.value)||""}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}}
|
|
829
|
-
:host {
|
|
830
|
-
line-height: 0;
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
.ft-loader {
|
|
834
|
-
display: inline-block;
|
|
835
|
-
position: relative;
|
|
836
|
-
|
|
837
|
-
width: ${oe.size};
|
|
838
|
-
height: ${oe.size};
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
.ft-loader div {
|
|
842
|
-
position: absolute;
|
|
843
|
-
top: 37.5%;
|
|
844
|
-
width: 25%;
|
|
845
|
-
height: 25%;
|
|
846
|
-
border-radius: 50%;
|
|
847
|
-
background: ${oe.color};
|
|
848
|
-
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
.ft-loader div:nth-child(1) {
|
|
852
|
-
left: 2.5%;
|
|
853
|
-
animation: appear 0.6s infinite;
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
.ft-loader div:nth-child(2) {
|
|
857
|
-
left: 2.5%;
|
|
858
|
-
animation: move 0.6s infinite;
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
.ft-loader div:nth-child(3) {
|
|
862
|
-
left: 37.5%;
|
|
863
|
-
animation: move 0.6s infinite;
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
.ft-loader div:nth-child(4) {
|
|
867
|
-
left: 72.5%;
|
|
868
|
-
animation: disappear 0.6s infinite;
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
@keyframes appear {
|
|
872
|
-
0% {
|
|
873
|
-
transform: scale(0);
|
|
874
|
-
}
|
|
875
|
-
100% {
|
|
876
|
-
transform: scale(1);
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
@keyframes disappear {
|
|
881
|
-
0% {
|
|
882
|
-
transform: scale(1);
|
|
883
|
-
}
|
|
884
|
-
100% {
|
|
885
|
-
transform: scale(0);
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
@keyframes move {
|
|
890
|
-
0% {
|
|
891
|
-
transform: translate(0, 0);
|
|
892
|
-
}
|
|
893
|
-
100% {
|
|
894
|
-
transform: translate(calc(0.35 * ${oe.size}), 0);
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
`;class ne extends i.FtLitElement{render(){return e.html`
|
|
1033
|
+
`}updated(t){super.updated(t),t.has("value")&&this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onKeyDown(t){"Enter"!==t.key&&" "!==t.key||t.stopPropagation()}updateValueFromInputField(){this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.textarea)||void 0===t?void 0:t.value)||""}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}}Qe.elementDefinitions={"ft-input-label":Ye,"ft-resizer":Pe,"ft-ripple":Ce,"ft-typography":xe},Qe.styles=[at,Xe],Je([o.property({type:String})],Qe.prototype,"label",void 0),Je([o.property({reflect:!0})],Qe.prototype,"value",void 0),Je([o.property({type:String})],Qe.prototype,"helper",void 0),Je([o.property({type:Boolean})],Qe.prototype,"outlined",void 0),Je([o.property({type:Boolean})],Qe.prototype,"disabled",void 0),Je([o.property({type:Boolean})],Qe.prototype,"error",void 0),Je([o.property({type:Number,reflect:!0})],Qe.prototype,"height",void 0),Je([o.query("textarea")],Qe.prototype,"textarea",void 0),Je([o.state()],Qe.prototype,"focused",void 0),e.customElement("ft-text-area")(Qe);class ti extends e.FtLitElement{render(){return i.html`
|
|
898
1034
|
<div class="ft-loader">
|
|
899
1035
|
<div></div>
|
|
900
1036
|
<div></div>
|
|
901
1037
|
<div></div>
|
|
902
1038
|
<div></div>
|
|
903
1039
|
</div>
|
|
904
|
-
`}}
|
|
905
|
-
:host {
|
|
906
|
-
display: inline-block;
|
|
907
|
-
max-width: 100%;
|
|
908
|
-
pointer-events: none;
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
button {
|
|
912
|
-
box-shadow: 0px 0px 0px transparent;
|
|
913
|
-
border: 0px solid transparent;
|
|
914
|
-
text-shadow: 0px 0px 0px transparent;
|
|
915
|
-
font-size: ${ae.fontSize};
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
button:hover {
|
|
919
|
-
box-shadow: 0px 0px 0px transparent;
|
|
920
|
-
border: 0px solid transparent;
|
|
921
|
-
text-shadow: 0px 0px 0px transparent;
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
button:active {
|
|
925
|
-
outline: none;
|
|
926
|
-
border: none;
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
button:focus {
|
|
930
|
-
outline: 0;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
.ft-button {
|
|
934
|
-
position: relative;
|
|
935
|
-
display: flex;
|
|
936
|
-
justify-content: center;
|
|
937
|
-
align-items: center;
|
|
938
|
-
width: 100%;
|
|
939
|
-
overflow: hidden;
|
|
940
|
-
box-sizing: border-box;
|
|
941
|
-
border: none;
|
|
942
|
-
pointer-events: auto;
|
|
943
|
-
|
|
944
|
-
--ft-button-internal-line-height: calc(${ae.fontSize} + 2px);
|
|
945
|
-
--ft-button-internal-color: ${ae.color};
|
|
946
|
-
${i.setVariable(hi.size,ae.iconSize)};
|
|
947
|
-
--ft-button-internal-vertical-padding: 6px;
|
|
948
|
-
--ft-button-internal-horizontal-padding: 8px;
|
|
949
|
-
${i.setVariable(_i.color,ae.rippleColor)};
|
|
950
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${ae.iconSize});
|
|
951
|
-
|
|
952
|
-
border-radius: ${ae.borderRadius};
|
|
953
|
-
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
954
|
-
background-color: ${ae.backgroundColor};
|
|
955
|
-
color: var(--ft-button-internal-color);
|
|
956
|
-
-webkit-mask-image: radial-gradient(white, black);
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
.ft-button:not([disabled]):hover {
|
|
960
|
-
cursor: pointer;
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
.ft-button--dense {
|
|
964
|
-
--ft-button-internal-vertical-padding: 2px;
|
|
965
|
-
--ft-button-internal-horizontal-padding: 4px;
|
|
966
|
-
border-radius: ${de};
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
.ft-button--round {
|
|
970
|
-
border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
.ft-button[disabled] {
|
|
974
|
-
filter: grayscale(1);
|
|
975
|
-
opacity: ${ae.opacityDisabled};
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
.ft-button.ft-button--primary {
|
|
979
|
-
background-color: ${he.backgroundColor};
|
|
980
|
-
--ft-button-internal-color: ${he.color};
|
|
981
|
-
${i.setVariable(_i.color,he.rippleColor)};
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
.ft-button.ft-button--outlined {
|
|
985
|
-
border: 1px solid var(--ft-button-internal-color);
|
|
986
|
-
padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
.ft-button:focus {
|
|
990
|
-
outline: none;
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
.ft-button--label {
|
|
994
|
-
position: relative;
|
|
995
|
-
overflow: hidden;
|
|
996
|
-
white-space: nowrap;
|
|
997
|
-
text-overflow: ellipsis;
|
|
998
|
-
display: block;
|
|
999
|
-
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
1000
|
-
${i.setVariable(Kt.fontSize,"1em")};
|
|
1001
|
-
${i.setVariable(Kt.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
.ft-button--label[hidden] {
|
|
1005
|
-
display: none;
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
ft-icon {
|
|
1009
|
-
flex-shrink: 0;
|
|
1010
|
-
position: relative;
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
.ft-button--label[hidden] + ft-icon {
|
|
1014
|
-
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
1015
|
-
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
1019
|
-
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
1020
|
-
order: -1;
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
|
-
ft-loader {
|
|
1024
|
-
${i.setVariable(oe.size,ae.iconSize)};
|
|
1025
|
-
${i.setVariable(oe.color,"var(--ft-button-internal-color)")};
|
|
1026
|
-
}
|
|
1027
|
-
`];var ce=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class fe extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=pi.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
1040
|
+
`}}ti.styles=bt,e.customElement("ft-loader")(ti);var ei=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ii extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=ge.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(i.html`
|
|
1028
1041
|
<button part="button"
|
|
1029
1042
|
class="${n.classMap(t)}"
|
|
1030
1043
|
aria-label="${this.getLabel()}"
|
|
@@ -1033,23 +1046,23 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
1033
1046
|
<ft-typography part="label"
|
|
1034
1047
|
variant="button"
|
|
1035
1048
|
element="span"
|
|
1036
|
-
class="ft-button--label ${
|
|
1049
|
+
class="ft-button--label ${e.isSafari?"ft-safari-ellipsis-fix":""}"
|
|
1037
1050
|
?hidden=${!this.hasTextContent()}>
|
|
1038
1051
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
1039
1052
|
</ft-typography>
|
|
1040
1053
|
${this.resolveIcon()}
|
|
1041
1054
|
</button>
|
|
1042
|
-
`)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?
|
|
1055
|
+
`)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?i.html`
|
|
1043
1056
|
<ft-tooltip part="tooltip"
|
|
1044
1057
|
text="${this.getLabel()}"
|
|
1045
1058
|
position="${this.tooltipPosition}">
|
|
1046
1059
|
${t}
|
|
1047
1060
|
</ft-tooltip>
|
|
1048
|
-
`:t}resolveIcon(){return this.loading?
|
|
1049
|
-
<ft-loader></ft-loader> `:this.icon?
|
|
1050
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:
|
|
1061
|
+
`:t}resolveIcon(){return this.loading?i.html`
|
|
1062
|
+
<ft-loader></ft-loader> `:this.icon?i.html`
|
|
1063
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:i.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}ii.elementDefinitions={"ft-ripple":Ce,"ft-tooltip":Oe,"ft-typography":xe,"ft-icon":me,"ft-loader":ti},ii.styles=[e.safariEllipsisFix,kt],ei([o.property({type:Boolean})],ii.prototype,"primary",void 0),ei([o.property({type:Boolean})],ii.prototype,"outlined",void 0),ei([o.property({type:Boolean})],ii.prototype,"disabled",void 0),ei([o.property({type:Boolean})],ii.prototype,"dense",void 0),ei([o.property({type:Boolean})],ii.prototype,"round",void 0),ei([o.property({type:String})],ii.prototype,"label",void 0),ei([o.property({type:String})],ii.prototype,"icon",void 0),ei([o.property({type:String})],ii.prototype,"iconVariant",void 0),ei([o.property({type:Boolean})],ii.prototype,"trailingIcon",void 0),ei([o.property({type:Boolean})],ii.prototype,"loading",void 0),ei([o.property({type:String})],ii.prototype,"tooltipPosition",void 0),ei([o.property({type:Boolean})],ii.prototype,"hideTooltip",void 0),ei([o.property({type:Boolean})],ii.prototype,"forceTooltip",void 0),ei([o.query(".ft-button")],ii.prototype,"button",void 0),ei([o.query(".ft-button--label slot")],ii.prototype,"slottedContent",void 0),e.customElement("ft-button")(ii);var oi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class si extends e.FtLitElement{constructor(){super(...arguments),this.editorMode=!1,this.hideTitle=!1,this.ratingAllowed=!1,this.feedbackMessage="",this.iconVariant=ge.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN"}get canAccessFeedback(){return this.user&&this.user.roles.includes("FEEDBACK_USER")}get canAccessRating(){return this.userHasRatingRole&&"NO_RATING"!==this.configuredRatingType}get userHasRatingRole(){return this.user&&this.user.roles.includes("RATING_USER")}get configuredRatingType(){var t,e;return null!==(e=this.ratingAllowed?null===(t=this.ratingSummary)||void 0===t?void 0:t.type:"NO_RATING")&&void 0!==e?e:"NO_RATING"}get ratingType(){var t,e,i;return null!==(i=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.type)&&void 0!==i?i:"NO_RATING"}get ratingValue(){var t,e,i;return null!==(i=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.value)&&void 0!==i?i:-1}get ratingDate(){var t,i;const o=null===(i=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===i?void 0:i.date;return"string"==typeof o?e.parseDate(o):o}render(){return this.editorMode||this.canAccessFeedback||this.canAccessRating?i.html`
|
|
1051
1064
|
<div class="ft-reader-feedback">
|
|
1052
|
-
${this.hideTitle?
|
|
1065
|
+
${this.hideTitle?i.nothing:i.html`
|
|
1053
1066
|
<ft-typography variant="title" part="main-title">
|
|
1054
1067
|
${this.labelResolver.resolve("feedbackMainTitle")}
|
|
1055
1068
|
</ft-typography>
|
|
@@ -1057,7 +1070,7 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
1057
1070
|
${this.renderRatingSection()}
|
|
1058
1071
|
${this.renderFeedbackSection()}
|
|
1059
1072
|
</div>
|
|
1060
|
-
`:
|
|
1073
|
+
`:i.nothing}renderRatingSection(){return this.canAccessRating?i.html`
|
|
1061
1074
|
<div class="ft-reader-feedback--rating" part="rating-container">
|
|
1062
1075
|
<ft-typography variant="title-dense" part="section-title" class="ft-reader-feedback--section-title">
|
|
1063
1076
|
${"DICHOTOMOUS"===this.ratingSummary.type?this.labelResolver.resolve("dichotomousRatingSectionTitle"):this.labelResolver.resolve("ratingSectionTitle")}
|
|
@@ -1067,9 +1080,9 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
1067
1080
|
${this.renderRatingDate()}
|
|
1068
1081
|
</ft-typography>
|
|
1069
1082
|
</div>
|
|
1070
|
-
`:this.placeholderInEditor("Rating unavailable: "+(this.userHasRatingRole?"no rating configured for this content":"missing role RATING_USER"))}renderRatingDate(){const t=this.ratingDate;if(null==t)return this.labelResolver.resolve("notRated");if(t.getTime()>(new Date).getTime()-6e4)return this.labelResolver.resolve("ratedNow");return(new Date).toLocaleDateString()===t.toLocaleDateString()?this.labelResolver.resolve("ratedToday"):this.labelResolver.resolve("ratedOn",t)}renderRating(){switch(this.configuredRatingType){case"STARS":return
|
|
1083
|
+
`:this.placeholderInEditor("Rating unavailable: "+(this.userHasRatingRole?"no rating configured for this content":"missing role RATING_USER"))}renderRatingDate(){const t=this.ratingDate;if(null==t)return this.labelResolver.resolve("notRated");if(t.getTime()>(new Date).getTime()-6e4)return this.labelResolver.resolve("ratedNow");return(new Date).toLocaleDateString()===t.toLocaleDateString()?this.labelResolver.resolve("ratedToday"):this.labelResolver.resolve("ratedOn",t)}renderRating(){switch(this.configuredRatingType){case"STARS":return i.html`
|
|
1071
1084
|
<div class="ft-reader-feedback--stars" part="rating rating-stars">
|
|
1072
|
-
${r.repeat(new Array(5),((t,
|
|
1085
|
+
${r.repeat(new Array(5),((t,e)=>e),((t,e)=>{let o="STARS"===this.ratingType&&this.ratingValue>e;const s=e+1;return i.html`
|
|
1073
1086
|
<ft-button round part="rating-stars-${s}"
|
|
1074
1087
|
label="${this.labelResolver.resolve("starsRating",s)}"
|
|
1075
1088
|
tooltipPosition="top"
|
|
@@ -1080,7 +1093,7 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
1080
1093
|
></ft-button>
|
|
1081
1094
|
`}))}
|
|
1082
1095
|
</div>
|
|
1083
|
-
`;case"LIKE":const t="LIKE"===this.ratingType&&0===this.ratingValue,
|
|
1096
|
+
`;case"LIKE":const t="LIKE"===this.ratingType&&0===this.ratingValue,e="LIKE"===this.ratingType&&1===this.ratingValue;return i.html`
|
|
1084
1097
|
<ft-switch @change=${t=>this.rate(t.detail)} part="rating rating-like">
|
|
1085
1098
|
<ft-switch-option .value=${0}
|
|
1086
1099
|
?selected=${t}
|
|
@@ -1089,13 +1102,13 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
1089
1102
|
${this.labelResolver.resolve("dislike")}
|
|
1090
1103
|
</ft-switch-option>
|
|
1091
1104
|
<ft-switch-option .value=${1}
|
|
1092
|
-
?selected=${
|
|
1105
|
+
?selected=${e}
|
|
1093
1106
|
.iconVariant=${this.iconVariant}
|
|
1094
|
-
icon="${
|
|
1107
|
+
icon="${e?this.filledLikeIcon:this.emptyLikeIcon}">
|
|
1095
1108
|
${this.labelResolver.resolve("like")}
|
|
1096
1109
|
</ft-switch-option>
|
|
1097
1110
|
</ft-switch>
|
|
1098
|
-
`;case"DICHOTOMOUS":const o="DICHOTOMOUS"===this.ratingType&&0===this.ratingValue,s="DICHOTOMOUS"===this.ratingType&&1===this.ratingValue;return
|
|
1111
|
+
`;case"DICHOTOMOUS":const o="DICHOTOMOUS"===this.ratingType&&0===this.ratingValue,s="DICHOTOMOUS"===this.ratingType&&1===this.ratingValue;return i.html`
|
|
1099
1112
|
<ft-switch @change=${t=>this.rate(t.detail)}
|
|
1100
1113
|
part="rating rating-dichotomous">
|
|
1101
1114
|
<ft-switch-option .value=${0}
|
|
@@ -1107,7 +1120,7 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
1107
1120
|
${this.labelResolver.resolve("dichotomousYes")}
|
|
1108
1121
|
</ft-switch-option>
|
|
1109
1122
|
</ft-switch>
|
|
1110
|
-
`}return
|
|
1123
|
+
`}return i.nothing}rate(t){this.dispatchEvent(new CustomEvent("rate",{detail:t}))}renderFeedbackSection(){if(this.canAccessFeedback){const t=this.feedbackMailLinkBuilder(this.feedbackMessage);let e=i.html`
|
|
1111
1124
|
<ft-button primary
|
|
1112
1125
|
class="ft-reader-feedback--send-feedback"
|
|
1113
1126
|
?disabled=${!this.feedbackMessage}
|
|
@@ -1115,11 +1128,11 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
1115
1128
|
part="send-feedback">
|
|
1116
1129
|
${this.labelResolver.resolve("okButton")}
|
|
1117
1130
|
</ft-button>
|
|
1118
|
-
`;return t&&(i
|
|
1131
|
+
`;return t&&(e=i.html`
|
|
1119
1132
|
<a class="ft-reader-feedback--feedback-link" href="${t}">
|
|
1120
|
-
${
|
|
1133
|
+
${e}
|
|
1121
1134
|
</a>
|
|
1122
|
-
`),
|
|
1135
|
+
`),i.html`
|
|
1123
1136
|
<div class="ft-reader-feedback--feedback" part="feedback-container">
|
|
1124
1137
|
<ft-typography variant="title-dense" part="section-title" class="ft-reader-feedback--section-title">
|
|
1125
1138
|
${this.labelResolver.resolve("feedbackSectionTitle")}
|
|
@@ -1129,9 +1142,9 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
1129
1142
|
label="${this.labelResolver.resolve("feedbackInputLabel")}"
|
|
1130
1143
|
@live-change=${t=>this.feedbackMessage=t.detail.trim()}
|
|
1131
1144
|
></ft-text-area>
|
|
1132
|
-
${
|
|
1145
|
+
${e}
|
|
1133
1146
|
</div>
|
|
1134
|
-
`}return this.placeholderInEditor("Feedback unavailable: missing role FEEDBACK_USER")}sendFeedback(){this.dispatchEvent(new CustomEvent("send-feedback",{detail:this.feedbackInput.value}))}placeholderInEditor(t){return this.editorMode?
|
|
1147
|
+
`}return this.placeholderInEditor("Feedback unavailable: missing role FEEDBACK_USER")}sendFeedback(){this.dispatchEvent(new CustomEvent("send-feedback",{detail:this.feedbackInput.value}))}placeholderInEditor(t){return this.editorMode?i.html`
|
|
1135
1148
|
<div class="ft-reader-feedback--placeholder">
|
|
1136
1149
|
<ft-typography variant="caption">${t}</ft-typography>
|
|
1137
1150
|
<ft-tooltip position="left"
|
|
@@ -1139,11 +1152,12 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
1139
1152
|
<ft-icon>INFO</ft-icon>
|
|
1140
1153
|
</ft-tooltip>
|
|
1141
1154
|
</div>
|
|
1142
|
-
`:
|
|
1155
|
+
`:i.nothing}clearFeedbackInput(){setTimeout((()=>this.feedbackInput.value=""),0)}}si.elementDefinitions={"ft-button":ii,"ft-typography":xe,"ft-icon":me,"ft-tooltip":Oe,"ft-switch":Me,"ft-switch-option":Be,"ft-text-area":Qe},si.styles=It,oi([o.property({attribute:!0})],si.prototype,"editorMode",void 0),oi([o.property({type:Boolean})],si.prototype,"hideTitle",void 0),oi([o.property({type:Boolean})],si.prototype,"ratingAllowed",void 0),oi([o.property({attribute:!1})],si.prototype,"labelResolver",void 0),oi([o.property({attribute:!1})],si.prototype,"ratingSummary",void 0),oi([o.property({attribute:!1})],si.prototype,"user",void 0),oi([o.query(".ft-reader-feedback--feedback-input")],si.prototype,"feedbackInput",void 0),oi([o.state()],si.prototype,"feedbackMessage",void 0),oi([o.property()],si.prototype,"iconVariant",void 0),oi([o.property()],si.prototype,"emptyStarIcon",void 0),oi([o.property()],si.prototype,"filledStarIcon",void 0),oi([o.property()],si.prototype,"emptyLikeIcon",void 0),oi([o.property()],si.prototype,"filledLikeIcon",void 0),oi([o.property()],si.prototype,"emptyDislikeIcon",void 0),oi([o.property()],si.prototype,"filledDislikeIcon",void 0),oi([o.property()],si.prototype,"feedbackMailLinkBuilder",void 0);const ni={starsRating:"{0} stars","starsRating[\\=1]":"1 star",like:"Like",dislike:"Dislike",dichotomousYes:"Yes",dichotomousNo:"No",notRated:"Not rated",ratedNow:"Rated now",ratedToday:"Rated today",ratedOn:"Rated on {0, date}",feedbackInputLabel:"How can we improve it?",okButton:"Send feedback",cancelButton:"Cancel",feedbackSuccess:"Feedback successfully sent. Thank you!",feedbackFailure:"Failed to send feedback. Please try again later.",ratingSuccess:"Rating successfully sent. Thank you!",ratingFailure:"Failed to send rating. Please try again later."},ri={...ni,feedbackMainTitle:"Send feedback",ratingSectionTitle:"Rate this document",dichotomousRatingSectionTitle:"Did it solve your problem?",feedbackSectionTitle:"Write your review",mailSubject:"Feedback about “{0}”",feedbackAndRatingDisabledInEditor:"Feedback & rating disabled in the reader designer"},ai={...ni,feedbackMainTitle:"Send feedback",ratingSectionTitle:"Rate this content",dichotomousRatingSectionTitle:"Did this content solve your problem?",feedbackSectionTitle:"Write your review",mailSubject:"Feedback about “{0}” in “{1}”",feedbackAndRatingDisabledInEditor:"Feedback & rating disabled in the topic template designer"},li=new e.ParametrizedLabelResolver(ai,{}),hi=new e.ParametrizedLabelResolver(ri,{});class di{constructor(t){this.disclaimer=t,this.subject="",this.url="",this.allMetadata="",this.subjectMetadata="",this.isAuthenticated=!1}update(t,e,i,o,s){this.subject=t,this.url=e,this.configuration=o,this.isAuthenticated=s,this.subjectMetadata=o.subjectMetadataIds.map((t=>i.find((e=>e.key===t)))).filter((t=>null!=t)).map((t=>"["+t.values.join(", ")+"]")).join(""),this.allMetadata=i.filter((t=>!t.key.startsWith("ft:"))).map((t=>"["+t.values.join(", ")+"]")).join(" ")}build(t){var e,i;if(0===t.length||this.isAuthenticated&&(null==this.configuration||(null===(e=this.configuration)||void 0===e?void 0:e.mailsSentByFluidTopics)))return;const o=encodeURIComponent(this.subject+" "+this.subjectMetadata),s=encodeURIComponent(`\n${this.allMetadata}\n${this.url}\n_________________________________________________________________\n\n${t}\n\n_________________________________________________________________\n${this.disclaimer}`);return`mailto:${null===(i=this.configuration)||void 0===i?void 0:i.recipients.join(",")}?subject=${o}&body=${s}`}}var pi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class fi extends h{constructor(){super(...arguments),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=ge.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new di(hi.resolve("mailDisclaimer")),this.updateDebouncer=new e.Debouncer(100),this.sendRatingDebouncer=new e.Debouncer(500)}render(){return null==this.map?i.nothing:i.html`
|
|
1143
1156
|
<ft-reader-feedback
|
|
1144
1157
|
ratingAllowed
|
|
1145
|
-
.editorMode=${
|
|
1146
|
-
|
|
1158
|
+
.editorMode=${this.editorMode}
|
|
1159
|
+
?hideTitle=${this.hideTitle}
|
|
1160
|
+
.labelResolver=${hi}
|
|
1147
1161
|
.ratingSummary=${this.ratingSummary}
|
|
1148
1162
|
.user=${this.user}
|
|
1149
1163
|
.iconVariant=${this.iconVariant}
|
|
@@ -1157,11 +1171,12 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
1157
1171
|
@rate=${this.rate}
|
|
1158
1172
|
@send-feedback=${this.sendFeedback}
|
|
1159
1173
|
></ft-reader-feedback>
|
|
1160
|
-
`}updated(t){var i,
|
|
1174
|
+
`}updated(t){var e,i,o;super.updated(t),t.has("map")&&this.map&&this.updateData(),["map","configuration","user"].some((e=>t.has(e)))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(hi.resolve("mailSubject",this.map.title),null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink())&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(o=this.user)||void 0===o?void 0:o.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}onStoreAvailable(t){super.onStoreAvailable(t),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e;this.user=await(null===(t=this.service)||void 0===t?void 0:t.getSession().then((t=>t.profile))),this.map&&(this.ratingSummary=await(null===(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:hi.resolve("ratingFailure")}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:hi.resolve("feedbackAndRatingDisabledInEditor")}))}async sendFeedback(t){var i;try{this.editorMode?this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:hi.resolve("feedbackAndRatingDisabledInEditor")})):(await(null===(i=this.service)||void 0===i?void 0:i.sendMapFeedback(t.detail)),this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:hi.resolve("feedbackSuccess")}))),this.readerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new e.FtNotificationEvent({type:"error",message:hi.resolve("feedbackFailure")}))}}}fi.elementDefinitions={"ft-reader-feedback":si},pi([e.redux()],fi.prototype,"map",void 0),pi([o.property({attribute:!1})],fi.prototype,"editorMode",void 0),pi([e.redux((t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}))],fi.prototype,"configuration",void 0),pi([o.state()],fi.prototype,"ratingSummary",void 0),pi([o.state()],fi.prototype,"user",void 0),pi([o.property({type:Boolean})],fi.prototype,"hideTitle",void 0),pi([o.property()],fi.prototype,"iconVariant",void 0),pi([o.property()],fi.prototype,"emptyStarIcon",void 0),pi([o.property()],fi.prototype,"filledStarIcon",void 0),pi([o.property()],fi.prototype,"emptyLikeIcon",void 0),pi([o.property()],fi.prototype,"filledLikeIcon",void 0),pi([o.property()],fi.prototype,"emptyDislikeIcon",void 0),pi([o.property()],fi.prototype,"filledDislikeIcon",void 0),pi([o.query("ft-reader-feedback")],fi.prototype,"readerFeedback",void 0);var ci=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class ui extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}class bi extends(function(t){class e extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this.registerIntervalTopic=0}connectedCallback(){super.connectedCallback(),this.registerIntervalTopic=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this.registerIntervalTopic):this.dispatchEvent(new ui)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return ci([o.state()],e.prototype,"tocNode",void 0),ci([o.state()],e.prototype,"disableContextInteractions",void 0),e}(h)){}var 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 vi extends bi{constructor(){super(...arguments),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=ge.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new di(li.resolve("mailDisclaimer")),this.sendRatingDebouncer=new e.Debouncer(500)}render(){return null==this.map||null==this.tocNode?i.nothing:i.html`
|
|
1161
1175
|
<ft-reader-feedback
|
|
1162
1176
|
?ratingAllowed=${this.tocNode.hasRating}
|
|
1163
1177
|
.editorMode=${this.editorMode}
|
|
1164
|
-
|
|
1178
|
+
?hideTitle=${this.hideTitle}
|
|
1179
|
+
.labelResolver=${li}
|
|
1165
1180
|
.ratingSummary=${this.ratingSummary}
|
|
1166
1181
|
.user=${this.user}
|
|
1167
1182
|
.iconVariant=${this.iconVariant}
|
|
@@ -1175,4 +1190,4 @@ const G=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
1175
1190
|
@rate=${this.rate}
|
|
1176
1191
|
@send-feedback=${this.sendFeedback}
|
|
1177
1192
|
></ft-reader-feedback>
|
|
1178
|
-
`}updated(t){var i,
|
|
1193
|
+
`}updated(t){var e,i,o;super.updated(t),t.has("tocNode")&&this.tocNode&&this.updateData(),["map","tocNode","configuration","user"].some((e=>t.has(e)))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(li.resolve("mailSubject",this.tocNode.title,this.map.title),null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink(this.tocNode.tocId))&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(o=this.user)||void 0===o?void 0:o.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}async updateData(){var t,e;this.user=await(null===(t=this.service)||void 0===t?void 0:t.getSession().then((t=>t.profile))),this.tocNode&&(this.ratingSummary=await(null===(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:li.resolve("ratingFailure")}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:li.resolve("feedbackAndRatingDisabledInEditor")}))}async sendFeedback(t){var i;try{!this.editorMode&&this.tocNode?(await(null===(i=this.service)||void 0===i?void 0:i.sendTopicFeedback(this.tocNode.tocId,t.detail)),this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:li.resolve("feedbackSuccess")})),this.readerFeedback.clearFeedbackInput()):this.editorMode&&this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:li.resolve("feedbackAndRatingDisabledInEditor")}))}catch{this.dispatchEvent(new e.FtNotificationEvent({type:"error",message:li.resolve("feedbackFailure")}))}}}vi.elementDefinitions={"ft-reader-feedback":si},gi([e.redux()],vi.prototype,"map",void 0),gi([o.property({attribute:!1})],vi.prototype,"editorMode",void 0),gi([e.redux((t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}))],vi.prototype,"configuration",void 0),gi([o.state()],vi.prototype,"ratingSummary",void 0),gi([o.state()],vi.prototype,"user",void 0),gi([o.property({type:Boolean})],vi.prototype,"hideTitle",void 0),gi([o.property()],vi.prototype,"iconVariant",void 0),gi([o.property()],vi.prototype,"emptyStarIcon",void 0),gi([o.property()],vi.prototype,"filledStarIcon",void 0),gi([o.property()],vi.prototype,"emptyLikeIcon",void 0),gi([o.property()],vi.prototype,"filledLikeIcon",void 0),gi([o.property()],vi.prototype,"emptyDislikeIcon",void 0),gi([o.property()],vi.prototype,"filledDislikeIcon",void 0),gi([o.query("ft-reader-feedback")],vi.prototype,"readerFeedback",void 0),e.customElement("ft-reader-map-feedback")(fi),e.customElement("ft-reader-topic-feedback")(vi),t.FtReaderFeedbackCssVariables=St,t.FtReaderMapFeedback=fi,t.FtReaderTopicFeedback=vi,t.styles=It,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML,ftGlobals.litClassMap,ftGlobals.litRepeat);
|