@searchstax-inc/searchstudio-ux-vue 2.0.0 → 4.1.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,31 @@
1
+ # Change Log
2
+
3
+ All notable changes to the "searchstudio-ux-vue" project will be documented in this file.
4
+
5
+ ## [1.0.1] - 2024-10-08
6
+ ### ⚠️ BREAKING CHANGES
7
+ - Result template needs to be updated to print variables as HTML because they now will contain html <em> tags if highlighting is enabled
8
+ ### Features
9
+ - Added support for highlighting controlled via studio UI
10
+ - Results per page are now configured through studio UI
11
+ ### Bug Fixes
12
+ - Tracking calls now use unmodified title of the result
13
+
14
+ ## [1.0.2] - 2024-11-05
15
+ ### Bug Fixes
16
+ - fix & and + symbols causing issues in facet values
17
+
18
+ ## [2.0.0]
19
+ ### Features
20
+ - Readme updated to give more information on how widgets work
21
+ ### Bug Fixes
22
+ - NVDA facet groups now announce state
23
+ - NVDA added ability to jump from facets to results section
24
+
25
+ ## [4.1.0]
26
+ ### Bug Fixes
27
+ - stopped making unnecessary calls on blank search page load
28
+ - accessibility: template modified to only read result title for accessibility
29
+ - accessibility: leave feedback button state change is now announced
30
+ - accessibility: focus persistance added for feedback rating
31
+ - added support for react 19
package/README.md CHANGED
@@ -163,12 +163,12 @@ The SearchstaxAnswerWidget component for Vue provides an AI answer widget for yo
163
163
  **Usage**
164
164
 
165
165
  ```
166
- <SearchstaxAnswerWidget :showShowMoreAfterWordCount="10"></SearchstaxAnswerWidget>
166
+ <SearchstaxAnswerWidget :showMoreAfterWordCount="10"></SearchstaxAnswerWidget>
167
167
  ```
168
168
 
169
169
  **Props**
170
170
 
171
- - showShowMoreAfterWordCount - number(default 100) determining after how many symbols UI will show “Read More” view.
171
+ - showMoreAfterWordCount - number(default 100) determining after how many symbols UI will show “Read More” view.
172
172
  - feedbackWidget – an optional object that configures thumbs-up and thumbs-down feedback functionality.
173
173
 
174
174
  Example of feedbackWidget config:
@@ -194,7 +194,7 @@ It receives the following props:
194
194
  **Example**
195
195
 
196
196
  ```
197
- <SearchstaxAnswerWidget :showShowMoreAfterWordCount="100" :feedbackwidget="feedbackConfig">
197
+ <SearchstaxAnswerWidget :showMoreAfterWordCount="100" :feedbackwidget="feedbackConfig">
198
198
  <template #answer="{ answerData, showMore }">
199
199
  <div v-if="answerData && answerData?.searchExecuted && answerData.shouldShowAnswer">
200
200
  <div class="searchstax-answer-wrap">
@@ -253,7 +253,6 @@ The SearchstaxInputWidget provides a search input box with autosuggest/autocompl
253
253
  - suggestAfterMinChars - default 3. Number of characters needed for autosuggest to start triggering
254
254
  - beforeAutosuggest - callback function that gets called before firing autosuggest. autosuggestProps are being passed as a property and can be modified, if passed along further search will execute with modified properties, if null is returned then event gets canceled and search never fires.
255
255
  - afterAutosuggest - callback function that gets called after autosuggest has values but before rendering. It needs to return same type of data but it can be modified.
256
- - inputTemplate - template override. look at examples below
257
256
 
258
257
 
259
258
  **inputWidgetTemplate**
@@ -654,9 +653,15 @@ The SearchstaxResultsWidget component displays the search results.
654
653
  **Usage**
655
654
 
656
655
  ```
657
- <SearchstaxResultWidget :afterLinkClick="afterLinkClick"></SearchstaxResultWidget>
656
+ <SearchstaxResultWidget :afterLinkClick="afterLinkClick" :renderMethod="'“pagination”'" :resultsPerPage="10"></SearchstaxResultWidget>
658
657
  ```
659
658
 
659
+ **Props**
660
+
661
+ - renderMethod – either “pagination” or “infiniteScroll”.
662
+ - resultsPerPage – number of results on a page.
663
+ - afterLinkClick – Callback function invoked when a result link is clicked. Allows modifying the result object.
664
+
660
665
  **Result Template Override**
661
666
 
662
667
  The resultsTemplate prop allows customizing the result UI.
@@ -692,6 +697,7 @@ It receives following props:
692
697
  @click="resultClicked(searchResult, $event)"
693
698
  @keyup.enter="resultClicked(searchResult, $event)"
694
699
  @keyup.space="resultClicked(searchResult, $event)"
700
+ aria-labelledby="title-{{searchResult.uniqueId}}"
695
701
  class="searchstax-result-item-link searchstax-result-item-link-wrapping"
696
702
  tabindex="0"
697
703
  >
@@ -715,7 +721,7 @@ It receives following props:
715
721
  class="searchstax-thumbnail"
716
722
  />
717
723
  <div class="searchstax-search-result-title-container">
718
- <span class="searchstax-search-result-title" v-html="searchResult.title"></span>
724
+ <span class="searchstax-search-result-title" :id="'title-' + searchResult.uniqueId" v-html="searchResult.title"></span>
719
725
  </div>
720
726
  <p
721
727
  v-if="searchResult.paths"
@@ -782,7 +788,7 @@ It receives following props:
782
788
  ```
783
789
 
784
790
 
785
- <SearchstaxResultWidget :afterLinkClick="afterLinkClick" :renderMethod="'infiniteScroll'">
791
+ <SearchstaxResultWidget :afterLinkClick="afterLinkClick" :renderMethod="'infiniteScroll'" :resultsPerPage="10">
786
792
  <template #results="{ searchResults, resultClicked }">
787
793
  <div class="searchstax-search-results" v-if="searchResults && searchResults.length">
788
794
  <a
@@ -793,6 +799,7 @@ It receives following props:
793
799
  @click="resultClicked(searchResult, $event)"
794
800
  @keyup.enter="resultClicked(searchResult, $event)"
795
801
  @keyup.space="resultClicked(searchResult, $event)"
802
+ aria-labelledby="title-{{searchResult.uniqueId}}"
796
803
  class="searchstax-result-item-link searchstax-result-item-link-wrapping"
797
804
  tabindex="0"
798
805
  >
@@ -816,7 +823,7 @@ It receives following props:
816
823
  class="searchstax-thumbnail"
817
824
  />
818
825
  <div class="searchstax-search-result-title-container">
819
- <span class="searchstax-search-result-title" v-html="searchResult.title"></span>
826
+ <span class="searchstax-search-result-title" :id="'title-' + searchResult.uniqueId" v-html="searchResult.title"></span>
820
827
  </div>
821
828
  <p
822
829
  v-if="searchResult.paths"
@@ -880,6 +887,8 @@ It receives following props:
880
887
 
881
888
  ```
882
889
 
890
+
891
+
883
892
  ### Pagination Widget ###
884
893
 
885
894
  The SearchStax Site Search solution offers a Vue pagination widget to assist with you custom search page.
package/README.mustache CHANGED
@@ -163,12 +163,12 @@ The SearchstaxAnswerWidget component for Vue provides an AI answer widget for yo
163
163
  **Usage**
164
164
 
165
165
  ```
166
- <SearchstaxAnswerWidget :showShowMoreAfterWordCount="10"></SearchstaxAnswerWidget>
166
+ <SearchstaxAnswerWidget :showMoreAfterWordCount="10"></SearchstaxAnswerWidget>
167
167
  ```
168
168
 
169
169
  **Props**
170
170
 
171
- - showShowMoreAfterWordCount - number(default 100) determining after how many symbols UI will show “Read More” view.
171
+ - showMoreAfterWordCount - number(default 100) determining after how many symbols UI will show “Read More” view.
172
172
  - feedbackWidget – an optional object that configures thumbs-up and thumbs-down feedback functionality.
173
173
 
174
174
  Example of feedbackWidget config:
@@ -194,7 +194,7 @@ It receives the following props:
194
194
  **Example**
195
195
 
196
196
  ```
197
- <SearchstaxAnswerWidget :showShowMoreAfterWordCount="100" :feedbackwidget="feedbackConfig">
197
+ <SearchstaxAnswerWidget :showMoreAfterWordCount="100" :feedbackwidget="feedbackConfig">
198
198
  <template #answer="{ answerData, showMore }">
199
199
  {{&SearchstaxAnswerWidget}}
200
200
  </template>
@@ -221,7 +221,6 @@ The SearchstaxInputWidget provides a search input box with autosuggest/autocompl
221
221
  - suggestAfterMinChars - default 3. Number of characters needed for autosuggest to start triggering
222
222
  - beforeAutosuggest - callback function that gets called before firing autosuggest. autosuggestProps are being passed as a property and can be modified, if passed along further search will execute with modified properties, if null is returned then event gets canceled and search never fires.
223
223
  - afterAutosuggest - callback function that gets called after autosuggest has values but before rendering. It needs to return same type of data but it can be modified.
224
- - inputTemplate - template override. look at examples below
225
224
 
226
225
 
227
226
  **inputWidgetTemplate**
@@ -314,9 +313,15 @@ The SearchstaxResultsWidget component displays the search results.
314
313
  **Usage**
315
314
 
316
315
  ```
317
- <SearchstaxResultWidget :afterLinkClick="afterLinkClick"></SearchstaxResultWidget>
316
+ <SearchstaxResultWidget :afterLinkClick="afterLinkClick" :renderMethod="'“pagination”'" :resultsPerPage="10"></SearchstaxResultWidget>
318
317
  ```
319
318
 
319
+ **Props**
320
+
321
+ - renderMethod – either “pagination” or “infiniteScroll”.
322
+ - resultsPerPage – number of results on a page.
323
+ - afterLinkClick – Callback function invoked when a result link is clicked. Allows modifying the result object.
324
+
320
325
  **Result Template Override**
321
326
 
322
327
  The resultsTemplate prop allows customizing the result UI.
@@ -355,7 +360,7 @@ It receives following props:
355
360
  ```
356
361
 
357
362
 
358
- <SearchstaxResultWidget :afterLinkClick="afterLinkClick" :renderMethod="'infiniteScroll'">
363
+ <SearchstaxResultWidget :afterLinkClick="afterLinkClick" :renderMethod="'infiniteScroll'" :resultsPerPage="10">
359
364
  <template #results="{ searchResults, resultClicked }">
360
365
  {{&SearchstaxResultWidgetDefault}}
361
366
  </template>
@@ -366,6 +371,8 @@ It receives following props:
366
371
 
367
372
  ```
368
373
 
374
+
375
+
369
376
  ### Pagination Widget ###
370
377
 
371
378
  The SearchStax Site Search solution offers a Vue pagination widget to assist with you custom search page.
@@ -1,7 +1,7 @@
1
1
  import type { PropType } from 'vue';
2
2
  import type { ISearchstaxAnswerData, IFeedbackWidgetProperties } from '@searchstax-inc/searchstudio-ux-js';
3
3
  declare const _sfc_main: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
- showShowMoreAfterWordCount: {
4
+ showMoreAfterWordCount: {
5
5
  type: PropType<number>;
6
6
  required: false;
7
7
  };
@@ -18,7 +18,7 @@ declare const _sfc_main: import("vue").DefineComponent<import("vue").ExtractProp
18
18
  attachObservables(): void;
19
19
  showMore(event: Event): void;
20
20
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
- showShowMoreAfterWordCount: {
21
+ showMoreAfterWordCount: {
22
22
  type: PropType<number>;
23
23
  required: false;
24
24
  };
@@ -4444,6 +4444,7 @@ declare const _sfc_main: import("vue").DefineComponent<import("vue").ExtractProp
4444
4444
  deactivatedFacets: {
4445
4445
  [key: string]: boolean;
4446
4446
  };
4447
+ focusedElement: HTMLInputElement;
4447
4448
  cachedData: {
4448
4449
  facets: {
4449
4450
  values: ({
@@ -17491,7 +17492,7 @@ declare const _sfc_main: import("vue").DefineComponent<import("vue").ExtractProp
17491
17492
  template: string;
17492
17493
  };
17493
17494
  };
17494
- showShowMoreAfterWordCount?: number;
17495
+ showMoreAfterWordCount?: number;
17495
17496
  feedbackwidget?: {
17496
17497
  renderFeedbackWidget?: boolean;
17497
17498
  emailOverride?: () => string;
@@ -1 +1 @@
1
- {"version":3,"file":"SearchstaxFacetsWidget.vue.d.ts","sourceRoot":"","sources":["../../src/components/SearchstaxFacetsWidget.vue"],"names":[],"mappings":"AACA,cAAc,6HAA6H,CAAC;;AAwE5I,wBAAiF"}
1
+ {"version":3,"file":"SearchstaxFacetsWidget.vue.d.ts","sourceRoot":"","sources":["../../src/components/SearchstaxFacetsWidget.vue"],"names":[],"mappings":"AACA,cAAc,6HAA6H,CAAC;;AA2E5I,wBAAiF"}
@@ -9,6 +9,10 @@ declare const _sfc_main: import("vue").DefineComponent<import("vue").ExtractProp
9
9
  type: PropType<"infiniteScroll" | "pagination">;
10
10
  required: false;
11
11
  };
12
+ resultsPerPage: {
13
+ type: NumberConstructor;
14
+ required: false;
15
+ };
12
16
  }>, {}, {
13
17
  searchResults: ISearchstaxParsedResult[];
14
18
  metadata: ISearchstaxSearchMetadata;
@@ -4437,6 +4441,7 @@ declare const _sfc_main: import("vue").DefineComponent<import("vue").ExtractProp
4437
4441
  deactivatedFacets: {
4438
4442
  [key: string]: boolean;
4439
4443
  };
4444
+ focusedElement: HTMLInputElement;
4440
4445
  cachedData: {
4441
4446
  facets: {
4442
4447
  values: ({
@@ -17484,7 +17489,7 @@ declare const _sfc_main: import("vue").DefineComponent<import("vue").ExtractProp
17484
17489
  template: string;
17485
17490
  };
17486
17491
  };
17487
- showShowMoreAfterWordCount?: number;
17492
+ showMoreAfterWordCount?: number;
17488
17493
  feedbackwidget?: {
17489
17494
  renderFeedbackWidget?: boolean;
17490
17495
  emailOverride?: () => string;
@@ -19684,5 +19689,9 @@ declare const _sfc_main: import("vue").DefineComponent<import("vue").ExtractProp
19684
19689
  type: PropType<"infiniteScroll" | "pagination">;
19685
19690
  required: false;
19686
19691
  };
19692
+ resultsPerPage: {
19693
+ type: NumberConstructor;
19694
+ required: false;
19695
+ };
19687
19696
  }>> & Readonly<{}>, {}, {}, undefined, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
19688
19697
  export default _sfc_main;
@@ -7,5 +7,5 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {}, {
7
7
  }, {
8
8
  onOriginalQueryClick(e: Event): void;
9
9
  attachObservables(): void;
10
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
10
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, undefined, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
11
11
  export default _sfc_main;
@@ -8,5 +8,5 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {}, {
8
8
  }, {
9
9
  orderChange(event: Event): void;
10
10
  attachObservables(): void;
11
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
11
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, undefined, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
12
12
  export default _sfc_main;
@@ -1 +1 @@
1
- {"version":3,"file":"SearchstaxResultWidgetDefaultTemplate.vue.d.ts","sourceRoot":"","sources":["../../../src/components/templates/SearchstaxResultWidgetDefaultTemplate.vue"],"names":[],"mappings":"AACA,cAAc,sJAAsJ,CAAC;;AAiGrK,wBAAiF"}
1
+ {"version":3,"file":"SearchstaxResultWidgetDefaultTemplate.vue.d.ts","sourceRoot":"","sources":["../../../src/components/templates/SearchstaxResultWidgetDefaultTemplate.vue"],"names":[],"mappings":"AACA,cAAc,sJAAsJ,CAAC;;AAmGrK,wBAAiF"}