/
components.d.ts
4450 lines (4450 loc) · 222 KB
/
components.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* eslint-disable */
/* tslint:disable */
/**
* This is an autogenerated file created by the Stencil compiler.
* It contains typing information for all components that exist in this project.
*/
import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
import { CategoryFacetSortCriterion, FacetSortCriterion, FoldedResult, InlineLink, InteractiveResult, LogLevel, RangeFacetRangeAlgorithm, RangeFacetSortCriterion, Result, ResultTemplate, ResultTemplateCondition, SearchEngine } from "@coveo/headless";
import { AnyBindings } from "./components/common/interface/bindings";
import { DateFilter, DateFilterState, NumericFilter, NumericFilterState, RelativeDateUnit } from "./components/common/types";
import { NumberInputType } from "./components/common/facets/facet-number-input/number-input-type";
import { ResultDisplayBasicLayout, ResultDisplayDensity, ResultDisplayImageSize, ResultDisplayLayout } from "./components/common/layout/display-options";
import { ResultRenderingFunction } from "./components/common/result-list/result-list-common-interface";
import { VNode } from "@stencil/core";
import { InsightEngine, InsightFacetSortCriterion, InsightInteractiveResult, InsightLogLevel, InsightRangeFacetRangeAlgorithm, InsightRangeFacetSortCriterion, InsightResult, InsightResultTemplate, InsightResultTemplateCondition } from "./components/insight";
import { FacetDisplayValues } from "./components/common/facets/facet-common";
import { i18n } from "i18next";
import { InsightInitializationOptions } from "./components/insight/atomic-insight-interface/atomic-insight-interface";
import { NumericFacetDisplayValues } from "./components/common/facets/numeric-facet-common";
import { AtomicInsightStore } from "./components/insight/atomic-insight-interface/store";
import { Section } from "./components/common/atomic-layout-section/sections";
import { RecommendationEngine } from "@coveo/headless/recommendation";
import { RecsInteractiveResult, RecsLogLevel, RecsResult, RecsResultTemplate, RecsResultTemplateCondition } from "./components/recommendations";
import { RecsInitializationOptions } from "./components/recommendations/atomic-recs-interface/atomic-recs-interface";
import { AtomicRecsStore } from "./components/recommendations/atomic-recs-interface/store";
import { Bindings } from "./components/search/atomic-search-interface/atomic-search-interface";
import { AtomicCommonStore, AtomicCommonStoreData } from "./components/common/interface/store";
import { RedirectionPayload } from "./components/search/atomic-search-box/redirection-payload";
import { AriaLabelGenerator } from "./components/search/search-box-suggestions/atomic-search-box-instant-results/atomic-search-box-instant-results";
import { InitializationOptions } from "./components/search/atomic-search-interface/atomic-search-interface";
import { StandaloneSearchBoxData } from "./utils/local-storage-utils";
export namespace Components {
interface AtomicAriaLive {
"registerRegion": (region: string, assertive: boolean) => Promise<void>;
"updateMessage": (region: string, message: string, assertive: boolean) => Promise<void>;
}
interface AtomicBreadbox {
}
interface AtomicCategoryFacet {
/**
* The base path shared by all values for the facet. Specify the property as an array using a JSON string representation: ```html <atomic-category-facet base-path='["first value", "second value"]' ></atomic-category-facet> ``` Specifying the property as a comma separated string is deprecated.
*/
"basePath"?: string | string[];
/**
* The character that separates values of a multi-value field.
*/
"delimitingCharacter": string;
/**
* The required facets and values for this facet to be displayed. Examples: ```html <atomic-facet facet-id="abc" field="objecttype" ...></atomic-facet> <!-- To show the facet when any value is selected in the facet with id "abc": --> <atomic-category-facet depends-on-abc ... ></atomic-category-facet> <!-- To show the facet when value "doc" is selected in the facet with id "abc": --> <atomic-category-facet depends-on-abc="doc" ... ></atomic-category-facet> ```
*/
"dependsOn": Record<string, string>;
/**
* Specifies a unique identifier for the facet.
*/
"facetId"?: string;
/**
* The field whose values you want to display in the facet.
*/
"field": string;
/**
* Whether to use basePath as a filter for the results.
*/
"filterByBasePath": boolean;
/**
* Whether to exclude the parents of folded results when estimating the result count for each facet value.
*/
"filterFacetCount": boolean;
/**
* The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading over the facet, from 1 to 6.
*/
"headingLevel": number;
/**
* The maximum number of results to scan in the index to ensure that the facet lists all potential facet values. Note: A high injectionDepth may negatively impact the facet request performance. Minimum: `0` Default: `1000`
*/
"injectionDepth": number;
/**
* Specifies whether the facet is collapsed. When the facet is the child of an `atomic-facet-manager` component, the facet manager controls this property.
*/
"isCollapsed": boolean;
/**
* The non-localized label for the facet. Used in the `atomic-breadbox` component through the bindings store.
*/
"label": string;
/**
* The number of values to request for this facet. Also determines the number of additional values to request each time more values are shown.
*/
"numberOfValues": number;
/**
* The sort criterion to apply to the returned facet values. Possible values are 'alphanumeric' and 'occurrences'.
*/
"sortCriteria": CategoryFacetSortCriterion;
/**
* Whether this facet should contain a search box. When "true", the search is only enabled when more facet values are available.
*/
"withSearch": boolean;
}
interface AtomicColorFacet {
/**
* The required facets and values for this facet to be displayed. Examples: ```html <atomic-facet facet-id="abc" field="objecttype" ...></atomic-facet> <!-- To show the facet when any value is selected in the facet with id "abc": --> <atomic-color-facet depends-on-abc ... ></atomic-color-facet> <!-- To show the facet when value "doc" is selected in the facet with id "abc": --> <atomic-color-facet depends-on-abc="doc" ... ></atomic-color-facet> ```
*/
"dependsOn": Record<string, string>;
/**
* Whether to display the facet values as checkboxes (multiple selection) or boxes (multiple selection). Possible values are 'checkbox', and 'box'.
*/
"displayValuesAs": 'checkbox' | 'box';
/**
* Specifies a unique identifier for the facet.
*/
"facetId"?: string;
/**
* The field whose values you want to display in the facet.
*/
"field": string;
/**
* Whether to exclude the parents of folded results when estimating the result count for each facet value.
*/
"filterFacetCount": boolean;
/**
* The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading over the facet, from 1 to 6.
*/
"headingLevel": number;
/**
* The maximum number of results to scan in the index to ensure that the facet lists all potential facet values. Note: A high injectionDepth may negatively impact the facet request performance. Minimum: `0` Default: `1000`
*/
"injectionDepth": number;
/**
* Specifies whether the facet is collapsed. When the facet is the child of an `atomic-facet-manager` component, the facet manager controls this property.
*/
"isCollapsed": boolean;
/**
* The non-localized label for the facet. Used in the `atomic-breadbox` component through the bindings store.
*/
"label": string;
/**
* The number of values to request for this facet. Also determines the number of additional values to request each time more values are shown.
*/
"numberOfValues": number;
/**
* The sort criterion to apply to the returned facet values. Possible values are 'score', 'alphanumeric', 'occurrences', and 'automatic'.
*/
"sortCriteria": FacetSortCriterion;
/**
* Whether this facet should contain a search box. When "true", the search is only enabled when more facet values are available.
*/
"withSearch": boolean;
}
interface AtomicComponentError {
"element": HTMLElement;
"error": Error;
}
interface AtomicDidYouMean {
}
interface AtomicExternal {
/**
* The CSS selector that identifies the `atomic-search-interface` component with which to initialize the external components.
*/
"selector": string;
}
interface AtomicFacet {
/**
* Specifies an explicit list of `allowedValues` in the Search API request, as a JSON string representation. Specifying the property as a comma separated string is deprecated. If you specify a list of values for this option, the facet uses only these values (if they are available in the current result set). Example: The following facet only uses the `Contact`, `Account`, and `File` values of the `objecttype` field. Even if the current result set contains other `objecttype` values, such as `Message`, or `Product`, the facet does not use those other values. ```html <atomic-facet field="objecttype" allowed-values='["Contact","Account","File"]'></div> ``` The maximum amount of allowed values is 25. Default value is `undefined`, and the facet uses all available values for its `field` in the current result set.
*/
"allowedValues"?: string | string[];
/**
* The required facets and values for this facet to be displayed. Examples: ```html <atomic-facet facet-id="abc" field="objecttype" ...></atomic-facet> <!-- To show the facet when any value is selected in the facet with id "abc": --> <atomic-facet depends-on-abc ... ></atomic-facet> <!-- To show the facet when value "doc" is selected in the facet with id "abc": --> <atomic-facet depends-on-abc="doc" ... ></atomic-facet> ```
*/
"dependsOn": Record<string, string>;
/**
* Whether to display the facet values as checkboxes (multiple selection), links (single selection) or boxes (multiple selection). Possible values are 'checkbox', 'link', and 'box'.
*/
"displayValuesAs": 'checkbox' | 'link' | 'box';
/**
* Specifies a unique identifier for the facet.
*/
"facetId"?: string;
/**
* The field whose values you want to display in the facet.
*/
"field": string;
/**
* Whether to exclude the parents of folded results when estimating the result count for each facet value.
*/
"filterFacetCount": boolean;
/**
* The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading over the facet, from 1 to 6.
*/
"headingLevel": number;
/**
* The maximum number of results to scan in the index to ensure that the facet lists all potential facet values. Note: A high injectionDepth may negatively impact the facet request performance. Minimum: `0` Default: `1000`
*/
"injectionDepth": number;
/**
* Specifies whether the facet is collapsed. When the facet is the child of an `atomic-facet-manager` component, the facet manager controls this property.
*/
"isCollapsed": boolean;
/**
* The non-localized label for the facet. Used in the `atomic-breadbox` component through the bindings store.
*/
"label": string;
/**
* The number of values to request for this facet. Also determines the number of additional values to request each time more values are shown.
*/
"numberOfValues": number;
/**
* The sort criterion to apply to the returned facet values. Possible values are 'score', 'alphanumeric', 'occurrences', and 'automatic'.
*/
"sortCriteria": FacetSortCriterion;
/**
* Whether this facet should contain a search box. When "true", the search is only enabled when more facet values are available.
*/
"withSearch": boolean;
}
interface AtomicFacetDateInput {
"bindings": AnyBindings;
"filter": DateFilter;
"filterState": DateFilterState;
"label": string;
}
interface AtomicFacetManager {
/**
* The number of expanded facets inside the manager. Remaining facets are automatically collapsed. Using the value `0` collapses all facets. Using the value `-1` disables the feature and keeps all facets expanded. Useful when you want to set the collapse state for each facet individually.
*/
"collapseFacetsAfter": number;
}
interface AtomicFacetNumberInput {
"bindings": AnyBindings;
"filter": NumericFilter;
"filterState": NumericFilterState;
"label": string;
"type": NumberInputType;
}
interface AtomicFieldCondition {
/**
* A function that must return true on results for the result template to apply. For example, a template with the following condition only applies to results whose `title` contains `singapore`: `[(result) => /singapore/i.test(result.title)]`
*/
"conditions": ResultTemplateCondition[];
/**
* Verifies whether the specified fields are defined.
*/
"ifDefined"?: string;
/**
* Verifies whether the specified fields are not defined.
*/
"ifNotDefined"?: string;
}
interface AtomicFocusDetector {
}
interface AtomicFocusTrap {
"active": boolean;
/**
* The container to hide from the tabindex and accessibility DOM when the focus trap is inactive.
*/
"container"?: HTMLElement;
/**
* Whether the element should be hidden from screen readers & not interactive with the tab, when not active.
*/
"shouldHideSelf": boolean;
/**
* The source to focus when the focus trap becomes inactive.
*/
"source"?: HTMLElement;
}
interface AtomicFoldedResultList {
/**
* The name of the field that uniquely identifies a result within a collection.
* @defaultValue `foldingchild`
*/
"childField"?: string;
/**
* The name of the field on which to do the folding. The folded result list component will use the values of this field to resolve the collections of result items.
* @defaultValue `foldingcollection`
*/
"collectionField"?: string;
/**
* The spacing of various elements in the result list, including the gap between results, the gap between parts of a result, and the font sizes of different parts in a result.
*/
"density": ResultDisplayDensity;
/**
* A list of non-default fields to include in the query results, separated by commas.
* @deprecated add it to atomic-search-interface instead
*/
"fieldsToInclude": string;
/**
* The expected size of the image displayed in the results.
*/
"imageSize": ResultDisplayImageSize;
/**
* The name of the field that determines whether a certain result is a top result containing other child results within a collection.
* @defaultValue `foldingparent`
*/
"parentField"?: string;
/**
* Sets a rendering function to bypass the standard HTML template mechanism for rendering results. You can use this function while working with web frameworks that don't use plain HTML syntax, e.g., React, Angular or Vue. Do not use this method if you integrate Atomic in a plain HTML deployment.
*/
"setRenderFunction": (resultRenderingFunction: ResultRenderingFunction) => Promise<void>;
}
interface AtomicFormatCurrency {
/**
* The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB. See the current [currency & funds code list](https://www.six-group.com/en/products-services/financial-information/data-standards.html#scrollTo=maintenance-agency).
*/
"currency": string;
}
interface AtomicFormatNumber {
/**
* The maximum number of fraction digits to use.
*/
"maximumFractionDigits"?: number;
/**
* The maximum number of significant digits to use.
*/
"maximumSignificantDigits"?: number;
/**
* The minimum number of fraction digits to use.
*/
"minimumFractionDigits"?: number;
/**
* The minimum number of integer digits to use.
*/
"minimumIntegerDigits"?: number;
/**
* The minimum number of significant digits to use.
*/
"minimumSignificantDigits"?: number;
}
interface AtomicFormatUnit {
/**
* The unit to use in unit formatting. Leverages the [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor. The unit must be [sanctioned unit identifier](https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier)
*/
"unit": string;
/**
* The unit formatting style to use in unit formatting. * "long" (e.g., 16 litres) * "short" (e.g., 16 l) * "narrow" (e.g., 16l)
*/
"unitDisplay"?: 'long' | 'short' | 'narrow';
}
interface AtomicFrequentlyBoughtTogether {
}
interface AtomicHtml {
/**
* Specify if the content should be sanitized, using [`DOMPurify`](https://www.npmjs.com/package/dompurify).
*/
"sanitize": boolean;
/**
* The string value containing HTML to display;
*/
"value": string;
}
interface AtomicIcon {
/**
* The SVG icon to display. - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location. - Use a value that starts with `assets://`, to display an icon from the Atomic package. - Use a stringified SVG to display it directly.
*/
"icon": string;
}
interface AtomicIconButton {
"badge"?: VNode;
"buttonRef"?: (el?: HTMLButtonElement) => void;
"clickCallback": () => void;
"disabled": boolean;
"icon": string;
"labelI18nKey": string;
"tooltip": string;
}
interface AtomicInsightEditToggle {
"clickCallback": () => void;
"tooltip": string;
}
interface AtomicInsightFacet {
/**
* Whether to display the facet values as checkboxes (multiple selection), links (single selection) or boxes (multiple selection). Possible values are 'checkbox', 'link', and 'box'.
*/
"displayValuesAs": FacetDisplayValues;
/**
* Specifies a unique identifier for the facet.
*/
"facetId"?: string;
/**
* The field whose values you want to display in the facet.
*/
"field": string;
/**
* Whether to exclude the parents of folded results when estimating the result count for each facet value.
*/
"filterFacetCount": boolean;
/**
* The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading over the facet, from 1 to 6.
*/
"headingLevel": number;
/**
* The maximum number of results to scan in the index to ensure that the facet lists all potential facet values. Note: A high injectionDepth may negatively impact the facet request performance. Minimum: `0` Default: `1000`
*/
"injectionDepth": number;
/**
* Specifies if the facet is collapsed.
*/
"isCollapsed": boolean;
/**
* The non-localized label for the facet.
*/
"label": string;
/**
* The number of values to request for this facet. Also determines the number of additional values to request each time more values are shown.
*/
"numberOfValues": number;
/**
* The sort criterion to apply to the returned facet values. Possible values are 'score', 'alphanumeric', 'occurrences', and 'automatic'.
*/
"sortCriteria": InsightFacetSortCriterion;
}
interface AtomicInsightHistoryToggle {
"clickCallback": () => void;
"tooltip": string;
}
interface AtomicInsightInterface {
/**
* Whether analytics should be enabled.
*/
"analytics": boolean;
/**
* The service insight interface headless engine.
*/
"engine"?: InsightEngine;
/**
* Executes the first search and logs the interface load event to analytics, after initializing connection to the headless search engine.
*/
"executeFirstSearch": () => Promise<void>;
/**
* A list of non-default fields to include in the query results, separated by commas.
*/
"fieldsToInclude": string;
/**
* The service insight interface i18next instance.
*/
"i18n": i18n;
/**
* The icon assets path. By default, this will be a relative URL pointing to `./assets`. Example: "/mypublicpath/icons"
*/
"iconAssetsPath": string;
/**
* Initializes the connection with the headless insight engine using options for `accessToken` (required), `organizationId` (required), `renewAccessToken`, and `platformUrl`.
*/
"initialize": (options: InsightInitializationOptions) => Promise<void>;
/**
* Initializes the connection with an already preconfigured headless insight engine.
*/
"initializeWithInsightEngine": (engine: InsightEngine) => Promise<void>;
/**
* The service insight interface language.
*/
"language": string;
/**
* The language assets path. By default, this will be a relative URL pointing to `./lang`. Example: "/mypublicpath/languages"
*/
"languageAssetsPath": string;
/**
* The severity level of the messages to log in the console.
*/
"logLevel"?: InsightLogLevel;
/**
* The number of results per page. By default, this is set to `5`.
*/
"resultsPerPage": number;
}
interface AtomicInsightLayout {
/**
* Whether the interface should be shown in widget format.
*/
"widget": boolean;
}
interface AtomicInsightNoResults {
}
interface AtomicInsightNumericFacet {
/**
* The required facets and values for this facet to be displayed. Examples: ```html <atomic-insight-facet facet-id="abc" field="objecttype" ...></atomic-insight-facet> <!-- To show the facet when any value is selected in the facet with id "abc": --> <atomic-insight-numeric-facet depends-on-abc ... ></atomic-insight-numeric-facet> <!-- To show the facet when value "doc" is selected in the facet with id "abc": --> <atomic-insight-numeric-facet depends-on-abc="doc" ... ></atomic-insight-numeric-facet> ```
*/
"dependsOn": Record<string, string>;
/**
* Whether to display the facet values as checkboxes (multiple selection) or links (single selection). Possible values are 'checkbox' and 'link'.
*/
"displayValuesAs": NumericFacetDisplayValues;
/**
* Specifies a unique identifier for the facet.
*/
"facetId"?: string;
/**
* The field whose values you want to display in the facet.
*/
"field": string;
/**
* Whether to exclude the parents of folded results when estimating the result count for each facet value.
*/
"filterFacetCount": boolean;
/**
* The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading over the facet, from 1 to 6.
*/
"headingLevel": number;
/**
* The maximum number of results to scan in the index to ensure that the facet lists all potential facet values. Note: A high injectionDepth may negatively impact the facet request performance. Minimum: `0` Default: `1000`
*/
"injectionDepth": number;
/**
* Specifies if the facet is collapsed.
*/
"isCollapsed": boolean;
/**
* The non-localized label for the facet. Used in the `atomic-breadbox` component through the bindings store.
*/
"label": string;
/**
* The number of values to request for this facet, when there are no manual ranges. If the number of values is 0, no ranges will be displayed.
*/
"numberOfValues": number;
/**
* The algorithm that's used for generating the ranges of this facet when they aren't manually defined. The default value of `"equiprobable"` generates facet ranges which vary in size but have a more balanced number of results within each range. The value of `"even"` generates equally sized facet ranges across all of the results.
*/
"rangeAlgorithm": InsightRangeFacetRangeAlgorithm;
/**
* The sort criterion to apply to the returned facet values. Possible values are 'ascending' and 'descending'.
*/
"sortCriteria": InsightRangeFacetSortCriterion;
/**
* Whether this facet should contain an input allowing users to set custom ranges. Depending on the field, the input can allow either decimal or integer values.
*/
"withInput"?: NumberInputType;
}
interface AtomicInsightPager {
/**
* Specifies how many page buttons to display in the pager.
*/
"numberOfPages": number;
}
interface AtomicInsightQueryError {
}
interface AtomicInsightQuerySummary {
}
interface AtomicInsightRefineModal {
"isOpen": boolean;
"openButton"?: HTMLElement;
}
interface AtomicInsightRefineToggle {
}
interface AtomicInsightResult {
/**
* The classes to add to the result element.
*/
"classes": string;
/**
* The result content to display.
*/
"content"?: ParentNode;
/**
* How large or small results should be.
*/
"density": ResultDisplayDensity;
/**
* The headless search engine.
* @deprecated This property is currently un-used
*/
"engine"?: InsightEngine;
/**
* The size of the visual section in result list items. This is overwritten by the image size defined in the result content, if it exists.
*/
"imageSize": ResultDisplayImageSize;
/**
* The InteractiveResult item. TODO: v2 make required
*/
"interactiveResult"?: InsightInteractiveResult;
"loadingFlag"?: string;
/**
* The result item.
*/
"result": InsightResult;
/**
* Whether an atomic-result-link inside atomic-insight-result should stop click event propagation.
*/
"stopPropagation"?: boolean;
/**
* Global Atomic state.
*/
"store"?: AtomicInsightStore;
}
interface AtomicInsightResultList {
/**
* The spacing of various elements in the result list, including the gap between results, the gap between parts of a result, and the font sizes of different parts in a result.
*/
"density": ResultDisplayDensity;
/**
* The expected size of the image displayed in the results.
*/
"imageSize": ResultDisplayImageSize;
/**
* Sets a rendering function to bypass the standard HTML template mechanism for rendering results. You can use this function while working with web frameworks that don't use plain HTML syntax, e.g., React, Angular or Vue. Do not use this method if you integrate Atomic in a plain HTML deployment.
* @param resultRenderingFunction
*/
"setRenderFunction": (resultRenderingFunction: ResultRenderingFunction) => Promise<void>;
}
interface AtomicInsightResultTemplate {
/**
* A function that must return true on results for the result template to apply. For example, a template with the following condition only applies to results whose `title` contains `singapore`: `[(result) => /singapore/i.test(result.title)]`
*/
"conditions": InsightResultTemplateCondition[];
/**
* Gets the appropriate result template based on conditions applied.
*/
"getTemplate": () => Promise<InsightResultTemplate<DocumentFragment> | null>;
/**
* The field that, when defined on a result item, would allow the template to be applied. For example, a template with the following attribute only applies to result items whose `filetype` and `sourcetype` fields are defined: `if-defined="filetype,sourcetype"`
*/
"ifDefined"?: string;
/**
* The field that, when defined on a result item, would prevent the template from being applied. For example, a template with the following attribute only applies to result items whose `filetype` and `sourcetype` fields are NOT defined: `if-not-defined="filetype,sourcetype"`
*/
"ifNotDefined"?: string;
}
interface AtomicInsightSearchBox {
/**
* Whether to prevent the user from triggering a search from the component. Perfect for use cases where you need to disable the search conditionally, like when the input is empty.
*/
"disableSearch": boolean;
/**
* The number of query suggestions to display when interacting with the search box.
*/
"numberOfSuggestions": number;
}
interface AtomicInsightTab {
/**
* Whether this tab is active upon rendering. If multiple tabs are set to active on render, the last one to be rendered will override the others.
*/
"active": boolean;
/**
* The expression that will be passed to the search as a `cq` paramenter upon being selected.
*/
"expression": string;
/**
* The label that will be shown to the user.
*/
"label": string;
}
interface AtomicInsightTabs {
}
interface AtomicInsightTimeframeFacet {
/**
* The required facets and values for this facet to be displayed. Examples: ```html <atomic-insight-facet facet-id="abc" field="objecttype" ...></atomic-insight-facet> <!-- To show the facet when any value is selected in the facet with id "abc": --> <atomic-insight-timeframe-facet depends-on-abc ... ></atomic-insight-timeframe-facet> <!-- To show the facet when value "doc" is selected in the facet with id "abc": --> <atomic-insight-timeframe-facet depends-on-abc="doc" ... ></atomic-insight-timeframe-facet> ```
*/
"dependsOn": Record<string, string>;
/**
* Specifies a unique identifier for the facet.
*/
"facetId"?: string;
/**
* The field whose values you want to display in the facet.
*/
"field": string;
/**
* Whether to exclude the parents of folded results when estimating the result count for each facet value.
*/
"filterFacetCount": boolean;
/**
* The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading over the facet, from 1 to 6.
*/
"headingLevel": number;
/**
* The maximum number of results to scan in the index to ensure that the facet lists all potential facet values. Note: A high injectionDepth may negatively impact the facet request performance. Minimum: `0` Default: `1000`
*/
"injectionDepth": number;
/**
* Specifies if the facet is collapsed.
*/
"isCollapsed": boolean;
/**
* The non-localized label for the facet. Used in the atomic-breadbox component through the bindings store.
*/
"label": string;
/**
* Whether this facet should contain an datepicker allowing users to set custom ranges.
*/
"withDatePicker": boolean;
}
interface AtomicIpxLayout {
}
interface AtomicIpxRefineModal {
"isOpen": boolean;
"openButton"?: HTMLElement;
}
interface AtomicIpxRefineToggle {
}
interface AtomicLayoutSection {
/**
* For column sections, the maximum horizontal space it should take. E.g. '300px'
*/
"maxWidth"?: string;
/**
* For column sections, the minimum horizontal space it should take. E.g. '300px'
*/
"minWidth"?: string;
/**
* The name of the layout section.
*/
"section": Section;
}
interface AtomicLoadMoreChildrenResults {
/**
* The non-localized label for the button used to load more results.
*/
"label": string;
}
interface AtomicLoadMoreResults {
}
interface AtomicModal {
"close": () => void;
/**
* The container to hide from the tabindex and accessibility DOM when the modal is closed.
*/
"container"?: HTMLElement;
"fullscreen": boolean;
"isOpen": boolean;
"source"?: HTMLElement;
}
interface AtomicNoResults {
/**
* Whether to display a button which cancels the last available action.
*/
"enableCancelLastAction": boolean;
}
interface AtomicNotifications {
/**
* The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use above the notifications, from 1 to 6.
*/
"headingLevel": number;
/**
* Specifies an icon to display at the left-end of a notification. - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location. - Use a value that starts with `assets://`, to display an icon from the Atomic package. - Use a stringified SVG to display it directly
*/
"icon"?: string;
}
interface AtomicNumericFacet {
/**
* The required facets and values for this facet to be displayed. Examples: ```html <atomic-facet facet-id="abc" field="objecttype" ...></atomic-facet> <!-- To show the facet when any value is selected in the facet with id "abc": --> <atomic-numeric-facet depends-on-abc ... ></atomic-numeric-facet> <!-- To show the facet when value "doc" is selected in the facet with id "abc": --> <atomic-numeric-facet depends-on-abc="doc" ... ></atomic-numeric-facet> ```
*/
"dependsOn": Record<string, string>;
/**
* Whether to display the facet values as checkboxes (multiple selection) or links (single selection). Possible values are 'checkbox' and 'link'.
*/
"displayValuesAs": 'checkbox' | 'link';
/**
* Specifies a unique identifier for the facet.
*/
"facetId"?: string;
/**
* The field whose values you want to display in the facet.
*/
"field": string;
/**
* Whether to exclude the parents of folded results when estimating the result count for each facet value.
*/
"filterFacetCount": boolean;
/**
* The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading over the facet, from 1 to 6.
*/
"headingLevel": number;
/**
* The maximum number of results to scan in the index to ensure that the facet lists all potential facet values. Note: A high injectionDepth may negatively impact the facet request performance. Minimum: `0` Default: `1000`
*/
"injectionDepth": number;
/**
* Specifies whether the facet is collapsed. When the facet is the child of an `atomic-facet-manager` component, the facet manager controls this property.
*/
"isCollapsed": boolean;
/**
* The non-localized label for the facet. Used in the `atomic-breadbox` component through the bindings store.
*/
"label": string;
/**
* The number of values to request for this facet, when there are no manual ranges. If the number of values is 0, no ranges will be displayed.
*/
"numberOfValues": number;
/**
* The algorithm that's used for generating the ranges of this facet when they aren't manually defined. The default value of `"equiprobable"` generates facet ranges which vary in size but have a more balanced number of results within each range. The value of `"even"` generates equally sized facet ranges across all of the results.
*/
"rangeAlgorithm": RangeFacetRangeAlgorithm;
/**
* The sort criterion to apply to the returned facet values. Possible values are 'ascending' and 'descending'.
*/
"sortCriteria": RangeFacetSortCriterion;
/**
* Whether this facet should contain an input allowing users to set custom ranges. Depending on the field, the input can allow either decimal or integer values.
*/
"withInput"?: NumberInputType;
}
interface AtomicNumericRange {
/**
* The ending value for the numeric range.
*/
"end": number;
/**
* Specifies whether the end value should be included in the range.
*/
"endInclusive": boolean;
/**
* The non-localized label for the facet. When defined, it will appear instead of the formatted value. Used in the `atomic-breadbox` component through the bindings store.
*/
"label"?: string;
/**
* The starting value for the numeric range.
*/
"start": number;
}
interface AtomicPager {
/**
* Specifies how many page buttons to display in the pager.
*/
"numberOfPages": number;
}
interface AtomicPopover {
}
interface AtomicQueryError {
}
interface AtomicQuerySummary {
/**
* Whether to display the duration of the last query execution.
* @deprecated Use the `duration` part.
*/
"enableDuration": boolean;
}
interface AtomicRatingFacet {
/**
* The required facets and values for this facet to be displayed. Examples: ```html <atomic-facet facet-id="abc" field="objecttype" ...></atomic-facet> <!-- To show the facet when any value is selected in the facet with id "abc": --> <atomic-rating-facet depends-on-abc ... ></atomic-rating-facet> <!-- To show the facet when value "doc" is selected in the facet with id "abc": --> <atomic-rating-facet depends-on-abc="doc" ... ></atomic-rating-facet> ```
*/
"dependsOn": Record<string, string>;
/**
* Whether to display the facet values as checkboxes (multiple selection) or links (single selection). Possible values are 'checkbox' and 'link'.
*/
"displayValuesAs": 'checkbox' | 'link';
/**
* Specifies a unique identifier for the facet.
*/
"facetId"?: string;
/**
* The field whose values you want to display in the facet.
*/
"field": string;
/**
* Whether to exclude the parents of folded results when estimating the result count for each facet value.
*/
"filterFacetCount": boolean;
/**
* The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading over the facet, from 1 to 6.
*/
"headingLevel": number;
/**
* The SVG icon to use to display the rating. - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location. - Use a value that starts with `assets://`, to display an icon from the Atomic package. - Use a stringified SVG to display it directly. When using a custom icon, at least part of your icon should have the color set to `fill="currentColor"`. This part of the SVG will take on the colors set in the following [variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties): - `--atomic-rating-facet-icon-active-color` - `--atomic-rating-facet-icon-inactive-color`
*/
"icon": string;
/**
* The maximum number of results to scan in the index to ensure that the facet lists all potential facet values. Note: A high injectionDepth may negatively impact the facet request performance. Minimum: `0`
*/
"injectionDepth": number;
/**
* Specifies whether the facet is collapsed. When the facet is the child of an `atomic-facet-manager` component, the facet manager controls this property.
*/
"isCollapsed": boolean;
/**
* The non-localized label for the facet. Used in the `atomic-breadbox` component through the bindings store.
*/
"label": string;
/**
* The maximum value in the field's index and the number of rating icons to display in the facet. If not assigned a value, this property will default to the same value as `numberOfIntervals`.
*/
"maxValueInIndex": number;
/**
* The minimum value of the field.
*/
"minValueInIndex": number;
/**
* The number of options to display in the facet. If `maxValueInIndex` isn't specified, it will be assumed that this is also the maximum number of rating icons.
*/
"numberOfIntervals": number;
}
interface AtomicRatingRangeFacet {
/**
* The required facets and values for this facet to be displayed. Examples: ```html <atomic-facet facet-id="abc" field="objecttype" ...></atomic-facet> <!-- To show the facet when any value is selected in the facet with id "abc": --> <atomic-rating-range-facet depends-on-abc ... ></atomic-rating-range-facet> <!-- To show the facet when value "doc" is selected in the facet with id "abc": --> <atomic-rating-range-facet depends-on-abc="doc" ... ></atomic-rating-range-facet> ```
*/
"dependsOn": Record<string, string>;
/**
* Specifies a unique identifier for the facet.
*/
"facetId"?: string;
/**
* The field whose values you want to display in the facet.
*/
"field": string;
/**
* Whether to exclude the parents of folded results when estimating the result count for each facet value.
*/
"filterFacetCount": boolean;
/**
* The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading over the facet, from 1 to 6.
*/
"headingLevel": number;
/**
* The SVG icon to use to display the rating. - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location. - Use a value that starts with `assets://`, to display an icon from the Atomic package. - Use a stringified SVG to display it directly. When using a custom icon, at least part of your icon should have the color set to `fill="currentColor"`. This part of the SVG will take on the colors set in the following [variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties): - `--atomic-rating-facet-icon-active-color` - `--atomic-rating-facet-icon-inactive-color`
*/
"icon": string;
/**
* The maximum number of results to scan in the index to ensure that the facet lists all potential facet values. Note: A high injectionDepth may negatively impact the facet request performance. Minimum: `0` Default: `1000`
*/
"injectionDepth": number;
/**
* Specifies whether the facet is collapsed. When the facet is the child of an `atomic-facet-manager` component, the facet manager controls this property.
*/
"isCollapsed": boolean;
/**
* The non-localized label for the facet. Used in the `atomic-breadbox` component through the bindings store.
*/
"label": string;
/**
* The maximum value in the field's index and the number of rating icons to display in the facet. This property will default to the same value as `numberOfIntervals`, if not assigned a value.
*/
"maxValueInIndex": number;
/**
* The minimum value of the field.
*/
"minValueInIndex": number;
/**
* The number of options to display in the facet. If `maxValueInIndex` isn't specified, it will be assumed that this is also the maximum number of rating icons.
*/
"numberOfIntervals": number;
}
interface AtomicRecsInterface {
/**
* Whether analytics should be enabled.
*/
"analytics": boolean;
/**
* The recommendation interface headless engine.
*/
"engine"?: RecommendationEngine;
/**
* A list of non-default fields to include in the query results, separated by commas.
*/
"fieldsToInclude": string;
/**
* Fetches new recommendations.
*/
"getRecommendations": () => Promise<void>;
/**
* The recommendation interface i18next instance.
*/
"i18n": i18n;
/**
* The icon assets path. By default, this will be a relative URL pointing to `./assets`. Example: "/mypublicpath/icons"
*/
"iconAssetsPath": string;
/**
* Initializes the connection with the headless recommendation engine using options for `accessToken` (required), `organizationId` (required), `renewAccessToken`, and `platformUrl`.
*/
"initialize": (options: RecsInitializationOptions) => Promise<void>;
/**
* Initializes the connection with an already preconfigured headless recommendation engine. This bypasses the properties set on the component, such as analytics, recommendation, searchHub, language, timezone & logLevel.
*/
"initializeWithRecommendationEngine": (engine: RecommendationEngine) => Promise<void>;
/**
* The recommendation interface language.
*/
"language": string;
/**
* The language assets path. By default, this will be a relative URL pointing to `./lang`. Example: "/mypublicpath/languages"
*/
"languageAssetsPath": string;
/**
* The severity level of the messages to log in the console.
*/
"logLevel"?: RecsLogLevel;
/**
* The recommendation interface [query pipeline](https://docs.coveo.com/en/180/).
*/
"pipeline"?: string;
/**
* The recommendation interface [search hub](https://docs.coveo.com/en/1342/).
*/
"searchHub": string;
/**
* The [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) identifier of the time zone to use to correctly interpret dates in the query expression, facets, and result items. By default, the timezone will be [guessed](https://day.js.org/docs/en/timezone/guessing-user-timezone). Example: "America/Montreal"
*/
"timezone"?: string;
}
interface AtomicRecsList {
/**
* The spacing of various elements in the result list, including the gap between results, the gap between parts of a result, and the font sizes of different parts in a result.
*/
"density": ResultDisplayDensity;
/**
* The layout to apply when displaying results themselves. This does not affect the display of the surrounding list itself. To modify the number of recommendations per column, modify the --atomic-recs-number-of-columns CSS variable.
*/
"display": ResultDisplayBasicLayout;
/**
* The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading label, from 1 to 6.
*/
"headingLevel": number;
/**
* The expected size of the image displayed in the results.
*/
"imageSize": ResultDisplayImageSize;