@coveo/quantic 3.45.3 → 3.45.4

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.
@@ -1995,9 +1995,9 @@
1995
1995
  "name": "placeholder",
1996
1996
  "attribute": "placeholder",
1997
1997
  "access": "@api",
1998
- "description": "<p>The placeholder text to display in the search box input area.</p>",
1999
- "required": true,
2000
- "defaultValue": "",
1998
+ "description": "<p>The placeholder text to display in the search box input area.\nDefaults to the <code>quantic_SearchBoxPlaceholder</code> custom label.</p>",
1999
+ "required": false,
2000
+ "defaultValue": "'Search...'",
2001
2001
  "type": "string"
2002
2002
  },
2003
2003
  {
@@ -2427,9 +2427,9 @@
2427
2427
  "name": "placeholder",
2428
2428
  "attribute": "placeholder",
2429
2429
  "access": "@api",
2430
- "description": "<p>The placeholder text to display in the search box input area.</p>",
2431
- "required": true,
2432
- "defaultValue": "",
2430
+ "description": "<p>The placeholder text to display in the search box input area.\nDefaults to the <code>quantic_SearchBoxPlaceholder</code> custom label.</p>",
2431
+ "required": false,
2432
+ "defaultValue": "'Search...'",
2433
2433
  "type": "string"
2434
2434
  },
2435
2435
  {
@@ -5829,9 +5829,9 @@
5829
5829
  "name": "placeholder",
5830
5830
  "attribute": "placeholder",
5831
5831
  "access": "@api",
5832
- "description": "<p>The placeholder text to display in the search box input area.</p>",
5833
- "required": true,
5834
- "defaultValue": "",
5832
+ "description": "<p>The placeholder text to display in the search box input area.\nDefaults to the <code>quantic_SearchBoxPlaceholder</code> custom label.</p>",
5833
+ "required": false,
5834
+ "defaultValue": "'Search...'",
5835
5835
  "type": "string"
5836
5836
  },
5837
5837
  {
@@ -1435,6 +1435,13 @@
1435
1435
  <protected>false</protected>
1436
1436
  <shortDescription>Search field with suggestions.</shortDescription>
1437
1437
  </labels>
1438
+ <labels>
1439
+ <fullName>quantic_SearchBoxPlaceholder</fullName>
1440
+ <value>Search...</value>
1441
+ <language>en_US</language>
1442
+ <protected>false</protected>
1443
+ <shortDescription>Search box placeholder</shortDescription>
1444
+ </labels>
1438
1445
  <labels>
1439
1446
  <fullName>quantic_SuggestionFound</fullName>
1440
1447
  <value>{{0}} search suggestion found, to navigate use up and down arrows.</value>
@@ -1,3 +1,4 @@
1
+ import searchBoxPlaceholder from '@salesforce/label/c.quantic_SearchBoxPlaceholder';
1
2
  import {
2
3
  registerComponentForInit,
3
4
  initializeWithHeadless,
@@ -29,10 +30,18 @@ export default class QuanticSearchBox extends LightningElement {
29
30
  @api engineId;
30
31
  /**
31
32
  * The placeholder text to display in the search box input area.
33
+ * Defaults to the `quantic_SearchBoxPlaceholder` custom label.
32
34
  * @api
33
35
  * @type {string}
36
+ * @defaultValue 'Search...'
34
37
  */
35
- @api placeholder = null;
38
+ @api
39
+ get placeholder() {
40
+ return this._placeholder ?? this.labels.searchBoxPlaceholder;
41
+ }
42
+ set placeholder(value) {
43
+ this._placeholder = value;
44
+ }
36
45
  /**
37
46
  * Whether not to render a submit button.
38
47
  * @api
@@ -73,6 +82,10 @@ export default class QuanticSearchBox extends LightningElement {
73
82
  /** @type {SearchBoxState} */
74
83
  @track state;
75
84
 
85
+ labels = {
86
+ searchBoxPlaceholder,
87
+ };
88
+
76
89
  /** @type {SearchBox} */
77
90
  searchBox;
78
91
  /** @type {Function} */
@@ -87,6 +100,8 @@ export default class QuanticSearchBox extends LightningElement {
87
100
  recentQueriesList;
88
101
  /** @type {String[]} */
89
102
  recentQueries;
103
+ /** @type {string} */
104
+ _placeholder;
90
105
 
91
106
  /**
92
107
  * @param {SearchEngine} engine
@@ -1,3 +1,4 @@
1
+ import searchBoxPlaceholder from '@salesforce/label/c.quantic_SearchBoxPlaceholder';
1
2
  import {
2
3
  registerComponentForInit,
3
4
  initializeWithHeadless,
@@ -37,10 +38,18 @@ export default class QuanticStandaloneSearchBox extends NavigationMixin(
37
38
  @api engineId;
38
39
  /**
39
40
  * The placeholder text to display in the search box input area.
41
+ * Defaults to the `quantic_SearchBoxPlaceholder` custom label.
40
42
  * @api
41
43
  * @type {string}
44
+ * @defaultValue 'Search...'
42
45
  */
43
- @api placeholder = null;
46
+ @api
47
+ get placeholder() {
48
+ return this._placeholder ?? this.labels.searchBoxPlaceholder;
49
+ }
50
+ set placeholder(value) {
51
+ this._placeholder = value;
52
+ }
44
53
  /**
45
54
  * Whether not to render a submit button.
46
55
  * @api
@@ -113,6 +122,10 @@ export default class QuanticStandaloneSearchBox extends NavigationMixin(
113
122
  isLoadingSuggestions: false,
114
123
  };
115
124
 
125
+ labels = {
126
+ searchBoxPlaceholder,
127
+ };
128
+
116
129
  /** @type {StandaloneSearchBox} */
117
130
  standaloneSearchBox;
118
131
  /** @type {Function} */
@@ -123,6 +136,8 @@ export default class QuanticStandaloneSearchBox extends NavigationMixin(
123
136
  suggestions = [];
124
137
  /** @type {boolean} */
125
138
  hasInitializationError = false;
139
+ /** @type {string} */
140
+ _placeholder;
126
141
 
127
142
  /** @type {string} */
128
143
  get standaloneEngineId() {