@searchstax-inc/searchstudio-ux-js 1.0.29 → 1.0.52
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/README.md +91 -9
- package/README.mustache +22 -1
- package/dist/@searchstax-inc/searchstudio-ux-js.cjs +96 -31
- package/dist/@searchstax-inc/searchstudio-ux-js.d.mts +30 -2
- package/dist/@searchstax-inc/searchstudio-ux-js.d.ts +30 -2
- package/dist/@searchstax-inc/searchstudio-ux-js.iife.js +96 -31
- package/dist/@searchstax-inc/searchstudio-ux-js.mjs +3292 -875
- package/dist/feedbackWidget.css +315 -259
- package/dist/feedbackWidget.mjs +158 -134
- package/dist/styles/mainTheme.css +705 -484
- package/dist/styles/mainTheme.css.map +1 -0
- package/dist/styles/scss/colors.scss +0 -1
- package/dist/styles/scss/widgets/answer/style.scss +108 -5
- package/dist/templates.js +26 -17
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -136,7 +136,7 @@ searchstax.addAnswerWidget("searchstax-answer-container", {
|
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
|
|
139
|
-
example of answer widget initialization with
|
|
139
|
+
example of answer widget initialization with lightweight feedback widget
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
searchstax.addAnswerWidget("searchstax-answer-container", {
|
|
@@ -145,31 +145,113 @@ searchstax.addAnswerWidget("searchstax-answer-container", {
|
|
|
145
145
|
main: {
|
|
146
146
|
template: `
|
|
147
147
|
{{#shouldShowAnswer}}
|
|
148
|
+
<div class="searchstax-answer-wrap">
|
|
149
|
+
<div class="searchstax-answer-icon"></div>
|
|
148
150
|
<div>
|
|
149
151
|
<div class="searchstax-answer-container {{#showMoreButtonVisible}}searchstax-answer-show-more{{/showMoreButtonVisible}}">
|
|
150
|
-
<div class="searchstax-answer-title">
|
|
152
|
+
<div class="searchstax-answer-title">Smart Answers</div>
|
|
153
|
+
{{#shouldShowAnswerError}}
|
|
154
|
+
<div class="searchstax-answer-error">{{{answerErrorMessage}}}</div>
|
|
155
|
+
{{/shouldShowAnswerError}}
|
|
151
156
|
<div class="searchstax-answer-description">
|
|
152
|
-
{{
|
|
153
|
-
{{answerTruncated}}
|
|
154
|
-
{{/showMoreButtonVisible}}
|
|
157
|
+
{{{fullAnswerFormatted}}}
|
|
155
158
|
{{^showMoreButtonVisible}}
|
|
156
|
-
{{
|
|
159
|
+
{{#answerLoading}}
|
|
160
|
+
<div class="searchstax-answer-loading"></div>
|
|
161
|
+
{{/answerLoading}}
|
|
157
162
|
{{/showMoreButtonVisible}}
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
</div>
|
|
158
166
|
|
|
167
|
+
{{#showMoreButtonVisible}}
|
|
168
|
+
<div class="searchstax-answer-load-more-button-container">
|
|
159
169
|
{{#answerLoading}}
|
|
160
170
|
<div class="searchstax-answer-loading"></div>
|
|
161
171
|
{{/answerLoading}}
|
|
172
|
+
<button class="searchstax-answer-load-more-button">Read More</button>
|
|
162
173
|
</div>
|
|
163
|
-
|
|
164
|
-
|
|
174
|
+
{{/showMoreButtonVisible}}
|
|
175
|
+
</div>
|
|
176
|
+
<div class="searchstax-answer-footer">
|
|
177
|
+
<div id="feedbackWidgetContainer"></div>
|
|
178
|
+
<div class="searchstax-lightweight-widget-separator-inline"></div>
|
|
179
|
+
<p class="searchstax-disclaimer">Generative AI is Experimental</p>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
{{/shouldShowAnswer}}
|
|
183
|
+
`,
|
|
184
|
+
answerContainerId: ``,
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
feedbackwidget: {
|
|
188
|
+
renderFeedbackWidget: true,
|
|
189
|
+
emailOverride: () => '',
|
|
190
|
+
thumbsUpValue: 10,
|
|
191
|
+
thumbsDownValue: 0,
|
|
192
|
+
lightweightTemplateOverride: `
|
|
193
|
+
<div class="searchstax-lightweight-widget-container">
|
|
194
|
+
<div class="searchstax-lightweight-widget-thumbs-up {{#thumbsUpActive}}active{{/thumbsUpActive}}">
|
|
195
|
+
<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
196
|
+
<path d="M4.85079 7.59996L7.83141 1C8.4243 1 8.9929 1.23178 9.41213 1.64436C9.83136 2.05694 10.0669 2.61651 10.0669 3.19999V6.1333H14.2845C14.5005 6.13089 14.7145 6.17474 14.9116 6.26179C15.1087 6.34885 15.2842 6.47704 15.426 6.63747C15.5677 6.79791 15.6723 6.98676 15.7326 7.19094C15.7928 7.39513 15.8072 7.60975 15.7748 7.81996L14.7465 14.4199C14.6926 14.7696 14.5121 15.0884 14.2382 15.3175C13.9643 15.5466 13.6156 15.6706 13.2562 15.6666H4.85079M4.85079 7.59996V15.6666M4.85079 7.59996H2.61531C2.22006 7.59996 1.84099 7.75448 1.5615 8.02953C1.28201 8.30458 1.125 8.67763 1.125 9.06661V14.1999C1.125 14.5889 1.28201 14.9619 1.5615 15.237C1.84099 15.512 2.22006 15.6666 2.61531 15.6666H4.85079" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
197
|
+
</svg>
|
|
198
|
+
</div>
|
|
199
|
+
<div class="searchstax-lightweight-widget-separator"></div>
|
|
200
|
+
<div class="searchstax-lightweight-widget-thumbs-down {{#thumbsDownActive}}active{{/thumbsDownActive}}">
|
|
201
|
+
<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
202
|
+
<path d="M12.1492 9.06801L9.16859 15.668C8.5757 15.668 8.0071 15.4362 7.58787 15.0236C7.16864 14.611 6.93311 14.0515 6.93311 13.468V10.5347H2.71552C2.4995 10.5371 2.28552 10.4932 2.08842 10.4062C1.89132 10.3191 1.71581 10.1909 1.57405 10.0305C1.43229 9.87006 1.32766 9.6812 1.26743 9.47702C1.2072 9.27284 1.19279 9.05822 1.22521 8.84801L2.25353 2.24806C2.30742 1.89833 2.48793 1.57955 2.76179 1.35046C3.03566 1.12136 3.38443 0.997398 3.74384 1.0014H12.1492M12.1492 9.06801V1.0014M12.1492 9.06801H14.3847C14.7799 9.06801 15.159 8.91349 15.4385 8.63844C15.718 8.36339 15.875 7.99034 15.875 7.60135V2.46805C15.875 2.07907 15.718 1.70602 15.4385 1.43097C15.159 1.15592 14.7799 1.0014 14.3847 1.0014H12.1492" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
203
|
+
</svg>
|
|
204
|
+
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
`,
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
```
|
|
165
211
|
|
|
212
|
+
example of answer widget initialization without feedback widget
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
searchstax.addAnswerWidget("searchstax-answer-container", {
|
|
216
|
+
showShowMoreAfterWordCount: 100,
|
|
217
|
+
templates: {
|
|
218
|
+
main: {
|
|
219
|
+
template: `
|
|
220
|
+
{{#shouldShowAnswer}}
|
|
221
|
+
<div class="searchstax-answer-wrap">
|
|
222
|
+
<div class="searchstax-answer-icon"></div>
|
|
223
|
+
<div>
|
|
224
|
+
<div class="searchstax-answer-container {{#showMoreButtonVisible}}searchstax-answer-show-more{{/showMoreButtonVisible}}">
|
|
225
|
+
<div class="searchstax-answer-title">Smart Answers</div>
|
|
226
|
+
{{#shouldShowAnswerError}}
|
|
227
|
+
<div class="searchstax-answer-error">{{{answerErrorMessage}}}</div>
|
|
228
|
+
{{/shouldShowAnswerError}}
|
|
229
|
+
<div class="searchstax-answer-description">
|
|
230
|
+
{{{fullAnswerFormatted}}}
|
|
231
|
+
{{^showMoreButtonVisible}}
|
|
232
|
+
{{#answerLoading}}
|
|
233
|
+
<div class="searchstax-answer-loading"></div>
|
|
234
|
+
{{/answerLoading}}
|
|
235
|
+
{{/showMoreButtonVisible}}
|
|
236
|
+
</div>
|
|
237
|
+
|
|
238
|
+
</div>
|
|
166
239
|
|
|
167
240
|
{{#showMoreButtonVisible}}
|
|
168
241
|
<div class="searchstax-answer-load-more-button-container">
|
|
169
|
-
|
|
242
|
+
{{#answerLoading}}
|
|
243
|
+
<div class="searchstax-answer-loading"></div>
|
|
244
|
+
{{/answerLoading}}
|
|
245
|
+
<button class="searchstax-answer-load-more-button">Read More</button>
|
|
170
246
|
</div>
|
|
171
247
|
{{/showMoreButtonVisible}}
|
|
172
248
|
</div>
|
|
249
|
+
<div class="searchstax-answer-footer">
|
|
250
|
+
<div id="feedbackWidgetContainer"></div>
|
|
251
|
+
<div class="searchstax-lightweight-widget-separator-inline"></div>
|
|
252
|
+
<p class="searchstax-disclaimer">Generative AI is Experimental</p>
|
|
253
|
+
</div>
|
|
254
|
+
</div>
|
|
173
255
|
{{/shouldShowAnswer}}
|
|
174
256
|
`,
|
|
175
257
|
answerContainerId: ``,
|
package/README.mustache
CHANGED
|
@@ -136,7 +136,28 @@ searchstax.addAnswerWidget("searchstax-answer-container", {
|
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
|
|
139
|
-
example of answer widget initialization with
|
|
139
|
+
example of answer widget initialization with lightweight feedback widget
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
searchstax.addAnswerWidget("searchstax-answer-container", {
|
|
143
|
+
showShowMoreAfterWordCount: 100,
|
|
144
|
+
templates: {
|
|
145
|
+
main: {
|
|
146
|
+
template: `{{&answer.main.template}}`,
|
|
147
|
+
answerContainerId: `{{&answer.main.answerContainerId}}`,
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
feedbackwidget: {
|
|
151
|
+
renderFeedbackWidget: true,
|
|
152
|
+
emailOverride: () => '',
|
|
153
|
+
thumbsUpValue: 10,
|
|
154
|
+
thumbsDownValue: 0,
|
|
155
|
+
lightweightTemplateOverride: `{{&feedback.lightweightTemplate.template}}`,
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
example of answer widget initialization without feedback widget
|
|
140
161
|
```
|
|
141
162
|
|
|
142
163
|
searchstax.addAnswerWidget("searchstax-answer-container", {
|