@mjhls/mjh-framework 1.0.971 → 1.0.972-reference-serializer-v1

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.
Files changed (88) hide show
  1. package/README.md +168 -168
  2. package/dist/cjs/AlgoliaSearch.js +131 -15
  3. package/dist/cjs/ArticleProgramLandingPage.js +1 -1
  4. package/dist/cjs/AuthWrapper.js +1 -1
  5. package/dist/cjs/ConferenceArticleCard.js +15 -15
  6. package/dist/cjs/ContentCardPaginated.js +1 -2
  7. package/dist/cjs/DeckContent.js +8 -8
  8. package/dist/cjs/DeckQueuePaginated.js +1 -2
  9. package/dist/cjs/EventsDeck.js +17 -17
  10. package/dist/cjs/ExternalResources.js +1 -1
  11. package/dist/cjs/GridContentPaginated.js +1 -2
  12. package/dist/cjs/HamMagazine.js +9 -9
  13. package/dist/cjs/HealthCareProfessionalModal.js +1 -1
  14. package/dist/cjs/HorizontalArticleListing.js +1 -1
  15. package/dist/cjs/IssueLanding.js +30 -30
  16. package/dist/cjs/KMTracker.js +15 -15
  17. package/dist/cjs/MasterDeck.js +8 -8
  18. package/dist/cjs/MasterDeckPaginated.js +9 -10
  19. package/dist/cjs/{MediaSeriesCard-5bf9813e.js → MediaSeriesCard-478ba4e4.js} +2 -2
  20. package/dist/cjs/MediaSeriesLanding.js +7 -7
  21. package/dist/cjs/MediaSeriesLandingPaginated.js +8 -9
  22. package/dist/cjs/NavMagazine.js +10 -10
  23. package/dist/cjs/NavNative.js +9 -9
  24. package/dist/cjs/Pagination-30bb1ca1.js +97 -0
  25. package/dist/cjs/PartnerDetailListing.js +1 -1
  26. package/dist/cjs/PartnerDetailListingPaginated.js +2 -3
  27. package/dist/cjs/PublicationLanding.js +26 -26
  28. package/dist/cjs/QueueDeckExpandedPaginated.js +1 -2
  29. package/dist/cjs/RelatedContent.js +28 -28
  30. package/dist/cjs/RelatedTopicsDropdown.js +10 -10
  31. package/dist/cjs/SeriesListingDeck.js +1 -1
  32. package/dist/cjs/{SeriesSlider-594b19eb.js → SeriesSlider-74546d19.js} +4 -4
  33. package/dist/cjs/SideFooter.js +2 -2
  34. package/dist/cjs/TaxonomyDescription.js +13 -9
  35. package/dist/cjs/VideoProgramLandingPage.js +1 -1
  36. package/dist/cjs/VideoSeriesCard.js +1 -1
  37. package/dist/cjs/View.js +13 -9
  38. package/dist/cjs/YoutubeGroup.js +4 -4
  39. package/dist/cjs/getSerializers.js +1 -1
  40. package/dist/cjs/{getTargeting-3c5754ac.js → getTargeting-dab97fe1.js} +9 -9
  41. package/dist/cjs/getTargeting.js +1 -1
  42. package/dist/cjs/{index-eb1c583d.js → index-ec29c3b7.js} +551 -42
  43. package/dist/cjs/index.js +3 -4
  44. package/dist/esm/AlgoliaSearch.js +132 -16
  45. package/dist/esm/ArticleProgramLandingPage.js +1 -1
  46. package/dist/esm/AuthWrapper.js +1 -1
  47. package/dist/esm/ConferenceArticleCard.js +15 -15
  48. package/dist/esm/ContentCardPaginated.js +1 -2
  49. package/dist/esm/DeckContent.js +8 -8
  50. package/dist/esm/DeckQueuePaginated.js +1 -2
  51. package/dist/esm/EventsDeck.js +17 -17
  52. package/dist/esm/ExternalResources.js +1 -1
  53. package/dist/esm/GridContentPaginated.js +1 -2
  54. package/dist/esm/HamMagazine.js +9 -9
  55. package/dist/esm/HealthCareProfessionalModal.js +1 -1
  56. package/dist/esm/HorizontalArticleListing.js +1 -1
  57. package/dist/esm/IssueLanding.js +30 -30
  58. package/dist/esm/KMTracker.js +15 -15
  59. package/dist/esm/MasterDeck.js +8 -8
  60. package/dist/esm/MasterDeckPaginated.js +9 -10
  61. package/dist/esm/{MediaSeriesCard-305a9cb3.js → MediaSeriesCard-6aab33f7.js} +2 -2
  62. package/dist/esm/MediaSeriesLanding.js +7 -7
  63. package/dist/esm/MediaSeriesLandingPaginated.js +8 -9
  64. package/dist/esm/NavMagazine.js +10 -10
  65. package/dist/esm/NavNative.js +9 -9
  66. package/dist/esm/Pagination-194dd03f.js +90 -0
  67. package/dist/esm/PartnerDetailListing.js +1 -1
  68. package/dist/esm/PartnerDetailListingPaginated.js +2 -3
  69. package/dist/esm/PublicationLanding.js +26 -26
  70. package/dist/esm/QueueDeckExpandedPaginated.js +1 -2
  71. package/dist/esm/RelatedContent.js +28 -28
  72. package/dist/esm/RelatedTopicsDropdown.js +10 -10
  73. package/dist/esm/SeriesListingDeck.js +1 -1
  74. package/dist/esm/{SeriesSlider-f771e20d.js → SeriesSlider-e495571f.js} +4 -4
  75. package/dist/esm/SideFooter.js +2 -2
  76. package/dist/esm/TaxonomyDescription.js +13 -9
  77. package/dist/esm/VideoProgramLandingPage.js +1 -1
  78. package/dist/esm/VideoSeriesCard.js +1 -1
  79. package/dist/esm/View.js +13 -8
  80. package/dist/esm/YoutubeGroup.js +4 -4
  81. package/dist/esm/getSerializers.js +1 -1
  82. package/dist/esm/{getTargeting-42f9b439.js → getTargeting-04d979c9.js} +9 -9
  83. package/dist/esm/getTargeting.js +1 -1
  84. package/dist/esm/{index-264bbd3c.js → index-e3e16b8b.js} +551 -42
  85. package/dist/esm/index.js +3 -4
  86. package/package.json +116 -115
  87. package/dist/cjs/Pagination-c63770a3.js +0 -90
  88. package/dist/esm/Pagination-6f8d5327.js +0 -82
package/README.md CHANGED
@@ -1,168 +1,168 @@
1
- # mjh-framework v. 1.0.971
2
-
3
- [![NPM](https://img.shields.io/npm/v/mjh-framework.svg)](https://www.npmjs.com/package/mjh-framework) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
4
-
5
- ## Install
6
-
7
- ```bash
8
- npm install --save @mjhls/mjh-framework
9
- ```
10
-
11
- ## Usage
12
-
13
- ```jsx
14
- import React, { Component } from 'react'
15
-
16
- import { NavMagazine, DeckQueue } from 'mjh-framework'
17
-
18
- export default class App extends Component {
19
- render() {
20
- return (
21
- <div>
22
- <NavMagazine />
23
- <DeckQueue />
24
- </div>
25
- )
26
- }
27
- }
28
- ```
29
-
30
- ## Publish new updates to the npm registry
31
-
32
- ```bash
33
- npm publish
34
- ```
35
-
36
- ## For getting updates in the template without publishing each time a change is made in the framework
37
-
38
- Link react and react-dom of the template repo, so that it can be used by the framework.
39
- This is to avoid the error arising due to multiple instances of React.
40
-
41
- ```bash
42
- cd ../mjh-template/node_modules/react
43
-
44
- yarn link
45
-
46
- cd ../react-dom
47
-
48
- yarn link
49
-
50
- cd ../../../mjh-framework
51
-
52
- yarn link react && yarn link react-dom
53
- ```
54
-
55
- Link the framework repo so that it can be used in the template
56
-
57
- ```bash
58
- npm link
59
-
60
- cd ../mjh-template
61
-
62
- npm link @mjhls/mjh-framework
63
- ```
64
-
65
- ## Components and "props"
66
-
67
- ### Deck Components
68
-
69
- - #### DeckContent
70
-
71
- ##### Props
72
-
73
- - mapping
74
- - dataRecord
75
- - query
76
- - params
77
- - pointer
78
- - pointerArray
79
- - defaultImage
80
-
81
- - #### DeckQueue
82
- ##### Props
83
- - page
84
- - dataRecord
85
- - query
86
- - params
87
- - pointer
88
- - pointerArray
89
-
90
- ### Layout Components
91
-
92
- - #### Column1
93
- - #### Column2
94
- ##### Props
95
- - rightItems
96
- - #### Column3
97
- ##### Props
98
- - leftItems
99
- - rightItems
100
- ##### Common Props (Column1, Column2, Column3)
101
- - title
102
- - children
103
- - #### Header
104
- ##### Props
105
- - title
106
- - keyword
107
- - description
108
- - #### LeftNav
109
- ##### Props
110
- - leftItems
111
- - #### AccordionPanel
112
- ##### Props
113
- - accordionClassName
114
- - data
115
-
116
- ### Navigation Components
117
-
118
- - #### NavMagazine
119
- ##### Props
120
- - logo
121
- - dataObject
122
- - #### NavNative
123
- ##### Props
124
- - logo
125
- - dataObject
126
- - #### NavNormal
127
- ##### Props
128
- - logo
129
- - dataObject
130
- - variant
131
- - #### NavDvm
132
- ##### Props
133
- - logo
134
- - dataObject
135
- - subNavHeads
136
-
137
- ### Template Components
138
-
139
- - #### TemplateNormal
140
- ##### Props
141
- - config
142
- - title
143
- - keywords
144
- - description
145
- - website
146
-
147
- ### Ad Components
148
-
149
- - #### AD300x250
150
- - #### AD300x250x600
151
- - #### AD728x90
152
- ##### Common Props
153
- - networkID
154
- - adUnit
155
-
156
- ### Serializers
157
-
158
- - #### getSerializers (function)
159
- ##### arguments
160
- - client
161
- ##### types
162
- - youtube
163
- - figure
164
- - slideshow
165
-
166
- ## License
167
-
168
- MIT © [mjh-framework](https://github.com/mjh-framework)
1
+ # mjh-framework v. 1.0.972
2
+
3
+ [![NPM](https://img.shields.io/npm/v/mjh-framework.svg)](https://www.npmjs.com/package/mjh-framework) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install --save @mjhls/mjh-framework
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```jsx
14
+ import React, { Component } from 'react'
15
+
16
+ import { NavMagazine, DeckQueue } from 'mjh-framework'
17
+
18
+ export default class App extends Component {
19
+ render() {
20
+ return (
21
+ <div>
22
+ <NavMagazine />
23
+ <DeckQueue />
24
+ </div>
25
+ )
26
+ }
27
+ }
28
+ ```
29
+
30
+ ## Publish new updates to the npm registry
31
+
32
+ ```bash
33
+ npm publish
34
+ ```
35
+
36
+ ## For getting updates in the template without publishing each time a change is made in the framework
37
+
38
+ Link react and react-dom of the template repo, so that it can be used by the framework.
39
+ This is to avoid the error arising due to multiple instances of React.
40
+
41
+ ```bash
42
+ cd ../mjh-template/node_modules/react
43
+
44
+ yarn link
45
+
46
+ cd ../react-dom
47
+
48
+ yarn link
49
+
50
+ cd ../../../mjh-framework
51
+
52
+ yarn link react && yarn link react-dom
53
+ ```
54
+
55
+ Link the framework repo so that it can be used in the template
56
+
57
+ ```bash
58
+ npm link
59
+
60
+ cd ../mjh-template
61
+
62
+ npm link @mjhls/mjh-framework
63
+ ```
64
+
65
+ ## Components and "props"
66
+
67
+ ### Deck Components
68
+
69
+ - #### DeckContent
70
+
71
+ ##### Props
72
+
73
+ - mapping
74
+ - dataRecord
75
+ - query
76
+ - params
77
+ - pointer
78
+ - pointerArray
79
+ - defaultImage
80
+
81
+ - #### DeckQueue
82
+ ##### Props
83
+ - page
84
+ - dataRecord
85
+ - query
86
+ - params
87
+ - pointer
88
+ - pointerArray
89
+
90
+ ### Layout Components
91
+
92
+ - #### Column1
93
+ - #### Column2
94
+ ##### Props
95
+ - rightItems
96
+ - #### Column3
97
+ ##### Props
98
+ - leftItems
99
+ - rightItems
100
+ ##### Common Props (Column1, Column2, Column3)
101
+ - title
102
+ - children
103
+ - #### Header
104
+ ##### Props
105
+ - title
106
+ - keyword
107
+ - description
108
+ - #### LeftNav
109
+ ##### Props
110
+ - leftItems
111
+ - #### AccordionPanel
112
+ ##### Props
113
+ - accordionClassName
114
+ - data
115
+
116
+ ### Navigation Components
117
+
118
+ - #### NavMagazine
119
+ ##### Props
120
+ - logo
121
+ - dataObject
122
+ - #### NavNative
123
+ ##### Props
124
+ - logo
125
+ - dataObject
126
+ - #### NavNormal
127
+ ##### Props
128
+ - logo
129
+ - dataObject
130
+ - variant
131
+ - #### NavDvm
132
+ ##### Props
133
+ - logo
134
+ - dataObject
135
+ - subNavHeads
136
+
137
+ ### Template Components
138
+
139
+ - #### TemplateNormal
140
+ ##### Props
141
+ - config
142
+ - title
143
+ - keywords
144
+ - description
145
+ - website
146
+
147
+ ### Ad Components
148
+
149
+ - #### AD300x250
150
+ - #### AD300x250x600
151
+ - #### AD728x90
152
+ ##### Common Props
153
+ - networkID
154
+ - adUnit
155
+
156
+ ### Serializers
157
+
158
+ - #### getSerializers (function)
159
+ ##### arguments
160
+ - client
161
+ ##### types
162
+ - youtube
163
+ - figure
164
+ - slideshow
165
+
166
+ ## License
167
+
168
+ MIT © [mjh-framework](https://github.com/mjh-framework)
@@ -829,7 +829,7 @@ function parseAlgoliaHit(_ref2) {
829
829
  });
830
830
  }
831
831
 
832
- var version$1 = '6.11.2';
832
+ var version$1 = '6.12.0';
833
833
 
834
834
  var withKeysPropType = function withKeysPropType(keys) {
835
835
  return function (props, propName, componentName) {
@@ -911,6 +911,10 @@ function translatable(defaultTranslations) {
911
911
  function getIndexId(context) {
912
912
  return hasMultipleIndices(context) ? context.multiIndexContext.targetedIndex : context.ais.mainTargetedIndex;
913
913
  }
914
+ /**
915
+ * @returns {import('algoliasearch-helper').SearchResults} results
916
+ */
917
+
914
918
  function getResults(searchResults, context) {
915
919
  if (searchResults.results) {
916
920
  if (searchResults.results.hits) {
@@ -4775,7 +4779,7 @@ var requestBuilder = {
4775
4779
 
4776
4780
  var requestBuilder_1 = requestBuilder;
4777
4781
 
4778
- var version = '3.5.3';
4782
+ var version = '3.5.4';
4779
4783
 
4780
4784
  /**
4781
4785
  * Event triggered when a parameter is set or updated
@@ -6423,6 +6427,87 @@ ConfigureRelatedItems.propTypes = {
6423
6427
  };
6424
6428
  connectConfigureRelatedItems(ConfigureRelatedItems);
6425
6429
 
6430
+ var connectDynamicWidgets = createConnectorWithContext({
6431
+ displayName: 'AlgoliaDynamicWidgets',
6432
+ defaultProps: {
6433
+ transformItems: function transformItems(items) {
6434
+ return items;
6435
+ }
6436
+ },
6437
+ propTypes: {
6438
+ transformItems: PropTypes__default['default'].func
6439
+ },
6440
+ getProvidedProps: function getProvidedProps(props, _searchState, searchResults) {
6441
+ var results = getResults(searchResults, {
6442
+ ais: props.contextValue,
6443
+ multiIndexContext: props.indexContextValue
6444
+ });
6445
+
6446
+ if (!results) {
6447
+ return {
6448
+ attributesToRender: []
6449
+ };
6450
+ }
6451
+
6452
+ var facetOrder = results.renderingContent && results.renderingContent.facetOrdering && results.renderingContent.facetOrdering.facets && results.renderingContent.facetOrdering.facets.order || [];
6453
+ return {
6454
+ attributesToRender: props.transformItems(facetOrder, {
6455
+ results: results
6456
+ })
6457
+ };
6458
+ }
6459
+ });
6460
+
6461
+ function getAttribute(component) {
6462
+ if (_typeof(component) !== 'object') {
6463
+ return undefined;
6464
+ }
6465
+
6466
+ if (component.props.attribute) {
6467
+ return component.props.attribute;
6468
+ }
6469
+
6470
+ if (Array.isArray(component.props.attributes)) {
6471
+ return component.props.attributes[0];
6472
+ }
6473
+
6474
+ if (component.props.children) {
6475
+ return getAttribute(React__default['default'].Children.only(component.props.children));
6476
+ }
6477
+
6478
+ return undefined;
6479
+ }
6480
+
6481
+ function DynamicWidgets(_ref) {
6482
+ var children = _ref.children,
6483
+ attributesToRender = _ref.attributesToRender,
6484
+ _ref$fallbackComponen = _ref.fallbackComponent,
6485
+ Fallback = _ref$fallbackComponen === void 0 ? function () {
6486
+ return null;
6487
+ } : _ref$fallbackComponen;
6488
+ var widgets = new Map();
6489
+ React__default['default'].Children.forEach(children, function (child) {
6490
+ var attribute = getAttribute(child);
6491
+
6492
+ if (!attribute) {
6493
+ throw new Error("Could not find \"attribute\" prop for ".concat(getDisplayName(child), "."));
6494
+ }
6495
+
6496
+ widgets.set(attribute, child);
6497
+ }); // on initial render this will be empty, but React InstantSearch keeps
6498
+ // search state for unmounted components in place, so routing works.
6499
+
6500
+ return React__default['default'].createElement(React__default['default'].Fragment, null, attributesToRender.map(function (attribute) {
6501
+ return React__default['default'].createElement(React.Fragment, {
6502
+ key: attribute
6503
+ }, widgets.get(attribute) || React__default['default'].createElement(Fallback, {
6504
+ attribute: attribute
6505
+ }));
6506
+ }));
6507
+ }
6508
+
6509
+ connectDynamicWidgets(DynamicWidgets);
6510
+
6426
6511
  // A context rule must consist only of alphanumeric characters, hyphens, and underscores.
6427
6512
  // See https://www.algolia.com/doc/guides/managing-results/refine-results/merchandising-and-promoting/in-depth/implementing-query-rules/#context
6428
6513
  function escapeRuleContext(ruleName) {
@@ -7832,7 +7917,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
7832
7917
  showMore: PropTypes__default['default'].bool,
7833
7918
  limit: PropTypes__default['default'].number,
7834
7919
  showMoreLimit: PropTypes__default['default'].number,
7835
- transformItems: PropTypes__default['default'].func
7920
+ transformItems: PropTypes__default['default'].func,
7921
+ facetOrdering: PropTypes__default['default'].bool
7836
7922
  },
7837
7923
  defaultProps: {
7838
7924
  showMore: false,
@@ -7840,12 +7926,14 @@ var connectHierarchicalMenu = createConnectorWithContext({
7840
7926
  showMoreLimit: 20,
7841
7927
  separator: ' > ',
7842
7928
  rootPath: null,
7843
- showParentLevel: true
7929
+ showParentLevel: true,
7930
+ facetOrdering: true
7844
7931
  },
7845
7932
  getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
7846
7933
  var showMore = props.showMore,
7847
7934
  limit = props.limit,
7848
- showMoreLimit = props.showMoreLimit;
7935
+ showMoreLimit = props.showMoreLimit,
7936
+ facetOrdering = props.facetOrdering;
7849
7937
  var id = getId$c(props);
7850
7938
  var results = getResults(searchResults, {
7851
7939
  ais: props.contextValue,
@@ -7866,7 +7954,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
7866
7954
 
7867
7955
  var itemsLimit = showMore ? showMoreLimit : limit;
7868
7956
  var value = results.getFacetValues(id, {
7869
- sortBy: sortBy$1
7957
+ sortBy: sortBy$1,
7958
+ facetOrdering: facetOrdering
7870
7959
  });
7871
7960
  var items = value.data ? transformValue(value.data, props, searchState, {
7872
7961
  ais: props.contextValue,
@@ -8418,17 +8507,20 @@ var connectMenu = createConnectorWithContext({
8418
8507
  showMoreLimit: PropTypes__default['default'].number,
8419
8508
  defaultRefinement: PropTypes__default['default'].string,
8420
8509
  transformItems: PropTypes__default['default'].func,
8421
- searchable: PropTypes__default['default'].bool
8510
+ searchable: PropTypes__default['default'].bool,
8511
+ facetOrdering: PropTypes__default['default'].bool
8422
8512
  },
8423
8513
  defaultProps: {
8424
8514
  showMore: false,
8425
8515
  limit: 10,
8426
- showMoreLimit: 20
8516
+ showMoreLimit: 20,
8517
+ facetOrdering: true
8427
8518
  },
8428
8519
  getProvidedProps: function getProvidedProps(props, searchState, searchResults, meta, searchForFacetValuesResults) {
8429
8520
  var attribute = props.attribute,
8430
8521
  searchable = props.searchable,
8431
- indexContextValue = props.indexContextValue;
8522
+ indexContextValue = props.indexContextValue,
8523
+ facetOrdering = props.facetOrdering;
8432
8524
  var results = getResults(searchResults, {
8433
8525
  ais: props.contextValue,
8434
8526
  multiIndexContext: props.indexContextValue
@@ -8474,7 +8566,8 @@ var connectMenu = createConnectorWithContext({
8474
8566
  });
8475
8567
  } else {
8476
8568
  items = results.getFacetValues(attribute, {
8477
- sortBy: searchable ? undefined : defaultSortBy
8569
+ sortBy: searchable ? undefined : defaultSortBy,
8570
+ facetOrdering: facetOrdering
8478
8571
  }).map(function (v) {
8479
8572
  return {
8480
8573
  label: v.name,
@@ -9331,18 +9424,21 @@ var connectRefinementList = createConnectorWithContext({
9331
9424
  showMoreLimit: PropTypes__default['default'].number,
9332
9425
  defaultRefinement: PropTypes__default['default'].arrayOf(PropTypes__default['default'].oneOfType([PropTypes__default['default'].string, PropTypes__default['default'].number])),
9333
9426
  searchable: PropTypes__default['default'].bool,
9334
- transformItems: PropTypes__default['default'].func
9427
+ transformItems: PropTypes__default['default'].func,
9428
+ facetOrdering: PropTypes__default['default'].bool
9335
9429
  },
9336
9430
  defaultProps: {
9337
9431
  operator: 'or',
9338
9432
  showMore: false,
9339
9433
  limit: 10,
9340
- showMoreLimit: 20
9434
+ showMoreLimit: 20,
9435
+ facetOrdering: true
9341
9436
  },
9342
9437
  getProvidedProps: function getProvidedProps(props, searchState, searchResults, metadata, searchForFacetValuesResults) {
9343
9438
  var attribute = props.attribute,
9344
9439
  searchable = props.searchable,
9345
- indexContextValue = props.indexContextValue;
9440
+ indexContextValue = props.indexContextValue,
9441
+ facetOrdering = props.facetOrdering;
9346
9442
  var results = getResults(searchResults, {
9347
9443
  ais: props.contextValue,
9348
9444
  multiIndexContext: props.indexContextValue
@@ -9383,7 +9479,8 @@ var connectRefinementList = createConnectorWithContext({
9383
9479
  isRefined: v.isRefined
9384
9480
  };
9385
9481
  }) : results.getFacetValues(attribute, {
9386
- sortBy: sortBy
9482
+ sortBy: sortBy,
9483
+ facetOrdering: facetOrdering
9387
9484
  }).map(function (v) {
9388
9485
  return {
9389
9486
  label: v.name,
@@ -10883,6 +10980,7 @@ function (_Component) {
10883
10980
 
10884
10981
  var _this$props4 = this.props,
10885
10982
  className = _this$props4.className,
10983
+ inputId = _this$props4.inputId,
10886
10984
  translate = _this$props4.translate,
10887
10985
  autoFocus = _this$props4.autoFocus,
10888
10986
  loadingIndicator = _this$props4.loadingIndicator,
@@ -10910,6 +11008,7 @@ function (_Component) {
10910
11008
  role: "search"
10911
11009
  }, React__default['default'].createElement("input", index._extends({
10912
11010
  ref: this.onInputMount,
11011
+ id: inputId,
10913
11012
  type: "search",
10914
11013
  placeholder: translate('placeholder'),
10915
11014
  autoFocus: autoFocus,
@@ -10961,7 +11060,8 @@ _defineProperty(SearchBox$1, "propTypes", {
10961
11060
  showLoadingIndicator: PropTypes__default['default'].bool,
10962
11061
  inputRef: PropTypes__default['default'].oneOfType([PropTypes__default['default'].func, PropTypes__default['default'].exact({
10963
11062
  current: PropTypes__default['default'].object
10964
- })])
11063
+ })]),
11064
+ inputId: PropTypes__default['default'].string
10965
11065
  });
10966
11066
 
10967
11067
  _defineProperty(SearchBox$1, "defaultProps", {
@@ -11600,9 +11700,11 @@ function (_Component) {
11600
11700
  value: function render() {
11601
11701
  var _this$props = this.props,
11602
11702
  cx = _this$props.cx,
11703
+ id = _this$props.id,
11603
11704
  items = _this$props.items,
11604
11705
  selectedItem = _this$props.selectedItem;
11605
11706
  return React__default['default'].createElement("select", {
11707
+ id: id,
11606
11708
  className: cx('select'),
11607
11709
  value: selectedItem,
11608
11710
  onChange: this.onChange
@@ -11622,6 +11724,7 @@ function (_Component) {
11622
11724
 
11623
11725
  _defineProperty(Select, "propTypes", {
11624
11726
  cx: PropTypes__default['default'].func.isRequired,
11727
+ id: PropTypes__default['default'].string,
11625
11728
  onSelect: PropTypes__default['default'].func.isRequired,
11626
11729
  items: PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
11627
11730
  value: PropTypes__default['default'].oneOfType([PropTypes__default['default'].string, PropTypes__default['default'].number]).isRequired,
@@ -11649,6 +11752,7 @@ function (_Component) {
11649
11752
  key: "render",
11650
11753
  value: function render() {
11651
11754
  var _this$props = this.props,
11755
+ id = _this$props.id,
11652
11756
  items = _this$props.items,
11653
11757
  currentRefinement = _this$props.currentRefinement,
11654
11758
  refine = _this$props.refine,
@@ -11656,6 +11760,7 @@ function (_Component) {
11656
11760
  return React__default['default'].createElement("div", {
11657
11761
  className: index.classnames(cx$h(''), className)
11658
11762
  }, React__default['default'].createElement(Select, {
11763
+ id: id,
11659
11764
  onSelect: refine,
11660
11765
  selectedItem: currentRefinement,
11661
11766
  items: items,
@@ -11668,6 +11773,7 @@ function (_Component) {
11668
11773
  }(React.Component);
11669
11774
 
11670
11775
  _defineProperty(HitsPerPage, "propTypes", {
11776
+ id: PropTypes__default['default'].string,
11671
11777
  items: PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
11672
11778
  value: PropTypes__default['default'].number.isRequired,
11673
11779
  label: PropTypes__default['default'].string
@@ -11690,6 +11796,7 @@ _defineProperty(HitsPerPage, "defaultProps", {
11690
11796
  *
11691
11797
  * @name HitsPerPage
11692
11798
  * @kind widget
11799
+ * @propType {string} id - The id of the select input
11693
11800
  * @propType {{value: number, label: string}[]} items - List of available options.
11694
11801
  * @propType {number} defaultRefinement - The number of items selected by default
11695
11802
  * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return.
@@ -12058,6 +12165,7 @@ function (_Component) {
12058
12165
  key: "render",
12059
12166
  value: function render() {
12060
12167
  var _this$props = this.props,
12168
+ id = _this$props.id,
12061
12169
  items = _this$props.items,
12062
12170
  canRefine = _this$props.canRefine,
12063
12171
  translate = _this$props.translate,
@@ -12065,6 +12173,7 @@ function (_Component) {
12065
12173
  return React__default['default'].createElement("div", {
12066
12174
  className: index.classnames(cx$e('', !canRefine && '-noRefinement'), className)
12067
12175
  }, React__default['default'].createElement("select", {
12176
+ id: id,
12068
12177
  value: this.selectedValue,
12069
12178
  onChange: this.handleSelectChange,
12070
12179
  className: cx$e('select')
@@ -12097,6 +12206,7 @@ function (_Component) {
12097
12206
  }(React.Component);
12098
12207
 
12099
12208
  _defineProperty(MenuSelect, "propTypes", {
12209
+ id: PropTypes__default['default'].string,
12100
12210
  items: PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
12101
12211
  label: PropTypes__default['default'].string.isRequired,
12102
12212
  value: PropTypes__default['default'].string.isRequired,
@@ -12123,6 +12233,7 @@ var MenuSelect$1 = translatable({
12123
12233
  * @kind widget
12124
12234
  * @requirements The attribute passed to the `attribute` prop must be present in "attributes for faceting"
12125
12235
  * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API.
12236
+ * @propType {string} id - the id of the select input
12126
12237
  * @propType {string} attribute - the name of the attribute in the record
12127
12238
  * @propType {string} [defaultRefinement] - the value of the item selected by default
12128
12239
  * @propType {number} [limit=10] - the minimum number of diplayed items
@@ -13454,6 +13565,7 @@ connectScrollTo(ScrollTo);
13454
13565
  * @propType {node} [reset] - Change the apparence of the default reset button (cross).
13455
13566
  * @propType {node} [loadingIndicator] - Change the apparence of the default loading indicator (spinning circle).
13456
13567
  * @propType {string} [defaultRefinement] - Provide default refinement value when component is mounted.
13568
+ * @propType {string} [inputId] - The id of the search input
13457
13569
  * @propType {boolean} [showLoadingIndicator=false] - Display that the search is loading. This only happens after a certain amount of time to avoid a blinking effect. This timer can be configured with `stalledSearchDelay` props on <InstantSearch>. By default, the value is 200ms.
13458
13570
  * @themeKey ais-SearchBox - the root div of the widget
13459
13571
  * @themeKey ais-SearchBox-form - the wrapping form
@@ -13604,6 +13716,7 @@ function (_Component) {
13604
13716
  key: "render",
13605
13717
  value: function render() {
13606
13718
  var _this$props = this.props,
13719
+ id = _this$props.id,
13607
13720
  items = _this$props.items,
13608
13721
  currentRefinement = _this$props.currentRefinement,
13609
13722
  refine = _this$props.refine,
@@ -13611,6 +13724,7 @@ function (_Component) {
13611
13724
  return React__default['default'].createElement("div", {
13612
13725
  className: index.classnames(cx$4(''), className)
13613
13726
  }, React__default['default'].createElement(Select, {
13727
+ id: id,
13614
13728
  cx: cx$4,
13615
13729
  items: items,
13616
13730
  selectedItem: currentRefinement,
@@ -13623,6 +13737,7 @@ function (_Component) {
13623
13737
  }(React.Component);
13624
13738
 
13625
13739
  _defineProperty(SortBy, "propTypes", {
13740
+ id: PropTypes__default['default'].string,
13626
13741
  items: PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
13627
13742
  label: PropTypes__default['default'].string,
13628
13743
  value: PropTypes__default['default'].string.isRequired
@@ -13642,6 +13757,7 @@ _defineProperty(SortBy, "defaultProps", {
13642
13757
  * @requirements Algolia handles sorting by creating replica indices. [Read more about sorting](https://www.algolia.com/doc/guides/relevance/sorting/) on
13643
13758
  * the Algolia website.
13644
13759
  * @kind widget
13760
+ * @propType {string} id - The id of the select input
13645
13761
  * @propType {{value: string, label: string}[]} items - The list of indexes to search in.
13646
13762
  * @propType {string} defaultRefinement - The default selected index.
13647
13763
  * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return.