@mjhls/mjh-framework 1.0.958 → 1.0.959-gridcontent-nojs-fix-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.
- package/README.md +168 -168
- package/dist/cjs/AlgoliaSearch.js +131 -15
- package/dist/cjs/AuthWrapper.js +1 -1
- package/dist/cjs/ConferenceArticleCard.js +15 -15
- package/dist/cjs/ContentCardPaginated.js +1 -2
- package/dist/cjs/DeckContent.js +8 -8
- package/dist/cjs/DeckQueuePaginated.js +1 -2
- package/dist/cjs/EventsDeck.js +17 -17
- package/dist/cjs/GridContent.js +1 -0
- package/dist/cjs/GridContentPaginated.js +1 -2
- package/dist/cjs/HamMagazine.js +9 -9
- package/dist/cjs/HealthCareProfessionalModal.js +1 -1
- package/dist/cjs/IssueLanding.js +29 -29
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/MasterDeck.js +8 -8
- package/dist/cjs/MasterDeckPaginated.js +9 -10
- package/dist/cjs/{MediaSeriesCard-3e0f0601.js → MediaSeriesCard-dffbfadb.js} +1 -1
- package/dist/cjs/MediaSeriesLanding.js +6 -6
- package/dist/cjs/MediaSeriesLandingPaginated.js +7 -8
- package/dist/cjs/NavMagazine.js +10 -10
- package/dist/cjs/NavNative.js +9 -9
- package/dist/cjs/Pagination-30bb1ca1.js +97 -0
- package/dist/cjs/PartnerDetailListingPaginated.js +1 -2
- package/dist/cjs/PublicationLanding.js +26 -26
- package/dist/cjs/QueueDeckExpandedPaginated.js +1 -2
- package/dist/cjs/RelatedContent.js +28 -28
- package/dist/cjs/RelatedTopicsDropdown.js +10 -10
- package/dist/cjs/SeriesListingDeck.js +1 -1
- package/dist/cjs/{SeriesSlider-594b19eb.js → SeriesSlider-74546d19.js} +4 -4
- package/dist/cjs/SideFooter.js +2 -2
- package/dist/cjs/VideoSeriesCard.js +1 -1
- package/dist/cjs/View.js +37 -17
- package/dist/cjs/YoutubeGroup.js +4 -4
- package/dist/cjs/{getTargeting-232688b0.js → getTargeting-77bb50ae.js} +9 -9
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/index.js +2 -3
- package/dist/esm/AlgoliaSearch.js +132 -16
- package/dist/esm/AuthWrapper.js +1 -1
- package/dist/esm/ConferenceArticleCard.js +15 -15
- package/dist/esm/ContentCardPaginated.js +1 -2
- package/dist/esm/DeckContent.js +8 -8
- package/dist/esm/DeckQueuePaginated.js +1 -2
- package/dist/esm/EventsDeck.js +17 -17
- package/dist/esm/GridContent.js +1 -0
- package/dist/esm/GridContentPaginated.js +1 -2
- package/dist/esm/HamMagazine.js +9 -9
- package/dist/esm/HealthCareProfessionalModal.js +1 -1
- package/dist/esm/IssueLanding.js +29 -29
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/MasterDeck.js +8 -8
- package/dist/esm/MasterDeckPaginated.js +9 -10
- package/dist/esm/{MediaSeriesCard-462aa764.js → MediaSeriesCard-7003e532.js} +1 -1
- package/dist/esm/MediaSeriesLanding.js +6 -6
- package/dist/esm/MediaSeriesLandingPaginated.js +7 -8
- package/dist/esm/NavMagazine.js +10 -10
- package/dist/esm/NavNative.js +9 -9
- package/dist/esm/Pagination-194dd03f.js +90 -0
- package/dist/esm/PartnerDetailListingPaginated.js +1 -2
- package/dist/esm/PublicationLanding.js +26 -26
- package/dist/esm/QueueDeckExpandedPaginated.js +1 -2
- package/dist/esm/RelatedContent.js +28 -28
- package/dist/esm/RelatedTopicsDropdown.js +10 -10
- package/dist/esm/SeriesListingDeck.js +1 -1
- package/dist/esm/{SeriesSlider-19bf6ce4.js → SeriesSlider-b853a8cf.js} +4 -4
- package/dist/esm/SideFooter.js +2 -2
- package/dist/esm/VideoSeriesCard.js +1 -1
- package/dist/esm/View.js +37 -16
- package/dist/esm/YoutubeGroup.js +4 -4
- package/dist/esm/{getTargeting-d519d2b6.js → getTargeting-f8f94212.js} +9 -9
- package/dist/esm/getTargeting.js +1 -1
- package/dist/esm/index.js +2 -3
- package/package.json +115 -115
- package/dist/cjs/Pagination-c63770a3.js +0 -90
- package/dist/esm/Pagination-6f8d5327.js +0 -82
package/README.md
CHANGED
|
@@ -1,168 +1,168 @@
|
|
|
1
|
-
# mjh-framework v. 1.0.958
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/mjh-framework) [](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.958
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/mjh-framework) [](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)
|
|
@@ -830,7 +830,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
830
830
|
});
|
|
831
831
|
}
|
|
832
832
|
|
|
833
|
-
var version$1 = '6.
|
|
833
|
+
var version$1 = '6.12.0';
|
|
834
834
|
|
|
835
835
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
836
836
|
return function (props, propName, componentName) {
|
|
@@ -912,6 +912,10 @@ function translatable(defaultTranslations) {
|
|
|
912
912
|
function getIndexId(context) {
|
|
913
913
|
return hasMultipleIndices(context) ? context.multiIndexContext.targetedIndex : context.ais.mainTargetedIndex;
|
|
914
914
|
}
|
|
915
|
+
/**
|
|
916
|
+
* @returns {import('algoliasearch-helper').SearchResults} results
|
|
917
|
+
*/
|
|
918
|
+
|
|
915
919
|
function getResults(searchResults, context) {
|
|
916
920
|
if (searchResults.results) {
|
|
917
921
|
if (searchResults.results.hits) {
|
|
@@ -4776,7 +4780,7 @@ var requestBuilder = {
|
|
|
4776
4780
|
|
|
4777
4781
|
var requestBuilder_1 = requestBuilder;
|
|
4778
4782
|
|
|
4779
|
-
var version = '3.5.
|
|
4783
|
+
var version = '3.5.4';
|
|
4780
4784
|
|
|
4781
4785
|
/**
|
|
4782
4786
|
* Event triggered when a parameter is set or updated
|
|
@@ -6424,6 +6428,87 @@ ConfigureRelatedItems.propTypes = {
|
|
|
6424
6428
|
};
|
|
6425
6429
|
connectConfigureRelatedItems(ConfigureRelatedItems);
|
|
6426
6430
|
|
|
6431
|
+
var connectDynamicWidgets = createConnectorWithContext({
|
|
6432
|
+
displayName: 'AlgoliaDynamicWidgets',
|
|
6433
|
+
defaultProps: {
|
|
6434
|
+
transformItems: function transformItems(items) {
|
|
6435
|
+
return items;
|
|
6436
|
+
}
|
|
6437
|
+
},
|
|
6438
|
+
propTypes: {
|
|
6439
|
+
transformItems: PropTypes__default['default'].func
|
|
6440
|
+
},
|
|
6441
|
+
getProvidedProps: function getProvidedProps(props, _searchState, searchResults) {
|
|
6442
|
+
var results = getResults(searchResults, {
|
|
6443
|
+
ais: props.contextValue,
|
|
6444
|
+
multiIndexContext: props.indexContextValue
|
|
6445
|
+
});
|
|
6446
|
+
|
|
6447
|
+
if (!results) {
|
|
6448
|
+
return {
|
|
6449
|
+
attributesToRender: []
|
|
6450
|
+
};
|
|
6451
|
+
}
|
|
6452
|
+
|
|
6453
|
+
var facetOrder = results.renderingContent && results.renderingContent.facetOrdering && results.renderingContent.facetOrdering.facets && results.renderingContent.facetOrdering.facets.order || [];
|
|
6454
|
+
return {
|
|
6455
|
+
attributesToRender: props.transformItems(facetOrder, {
|
|
6456
|
+
results: results
|
|
6457
|
+
})
|
|
6458
|
+
};
|
|
6459
|
+
}
|
|
6460
|
+
});
|
|
6461
|
+
|
|
6462
|
+
function getAttribute(component) {
|
|
6463
|
+
if (_typeof(component) !== 'object') {
|
|
6464
|
+
return undefined;
|
|
6465
|
+
}
|
|
6466
|
+
|
|
6467
|
+
if (component.props.attribute) {
|
|
6468
|
+
return component.props.attribute;
|
|
6469
|
+
}
|
|
6470
|
+
|
|
6471
|
+
if (Array.isArray(component.props.attributes)) {
|
|
6472
|
+
return component.props.attributes[0];
|
|
6473
|
+
}
|
|
6474
|
+
|
|
6475
|
+
if (component.props.children) {
|
|
6476
|
+
return getAttribute(React__default['default'].Children.only(component.props.children));
|
|
6477
|
+
}
|
|
6478
|
+
|
|
6479
|
+
return undefined;
|
|
6480
|
+
}
|
|
6481
|
+
|
|
6482
|
+
function DynamicWidgets(_ref) {
|
|
6483
|
+
var children = _ref.children,
|
|
6484
|
+
attributesToRender = _ref.attributesToRender,
|
|
6485
|
+
_ref$fallbackComponen = _ref.fallbackComponent,
|
|
6486
|
+
Fallback = _ref$fallbackComponen === void 0 ? function () {
|
|
6487
|
+
return null;
|
|
6488
|
+
} : _ref$fallbackComponen;
|
|
6489
|
+
var widgets = new Map();
|
|
6490
|
+
React__default['default'].Children.forEach(children, function (child) {
|
|
6491
|
+
var attribute = getAttribute(child);
|
|
6492
|
+
|
|
6493
|
+
if (!attribute) {
|
|
6494
|
+
throw new Error("Could not find \"attribute\" prop for ".concat(getDisplayName(child), "."));
|
|
6495
|
+
}
|
|
6496
|
+
|
|
6497
|
+
widgets.set(attribute, child);
|
|
6498
|
+
}); // on initial render this will be empty, but React InstantSearch keeps
|
|
6499
|
+
// search state for unmounted components in place, so routing works.
|
|
6500
|
+
|
|
6501
|
+
return React__default['default'].createElement(React__default['default'].Fragment, null, attributesToRender.map(function (attribute) {
|
|
6502
|
+
return React__default['default'].createElement(React.Fragment, {
|
|
6503
|
+
key: attribute
|
|
6504
|
+
}, widgets.get(attribute) || React__default['default'].createElement(Fallback, {
|
|
6505
|
+
attribute: attribute
|
|
6506
|
+
}));
|
|
6507
|
+
}));
|
|
6508
|
+
}
|
|
6509
|
+
|
|
6510
|
+
connectDynamicWidgets(DynamicWidgets);
|
|
6511
|
+
|
|
6427
6512
|
// A context rule must consist only of alphanumeric characters, hyphens, and underscores.
|
|
6428
6513
|
// See https://www.algolia.com/doc/guides/managing-results/refine-results/merchandising-and-promoting/in-depth/implementing-query-rules/#context
|
|
6429
6514
|
function escapeRuleContext(ruleName) {
|
|
@@ -7833,7 +7918,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7833
7918
|
showMore: PropTypes__default['default'].bool,
|
|
7834
7919
|
limit: PropTypes__default['default'].number,
|
|
7835
7920
|
showMoreLimit: PropTypes__default['default'].number,
|
|
7836
|
-
transformItems: PropTypes__default['default'].func
|
|
7921
|
+
transformItems: PropTypes__default['default'].func,
|
|
7922
|
+
facetOrdering: PropTypes__default['default'].bool
|
|
7837
7923
|
},
|
|
7838
7924
|
defaultProps: {
|
|
7839
7925
|
showMore: false,
|
|
@@ -7841,12 +7927,14 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7841
7927
|
showMoreLimit: 20,
|
|
7842
7928
|
separator: ' > ',
|
|
7843
7929
|
rootPath: null,
|
|
7844
|
-
showParentLevel: true
|
|
7930
|
+
showParentLevel: true,
|
|
7931
|
+
facetOrdering: true
|
|
7845
7932
|
},
|
|
7846
7933
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
7847
7934
|
var showMore = props.showMore,
|
|
7848
7935
|
limit = props.limit,
|
|
7849
|
-
showMoreLimit = props.showMoreLimit
|
|
7936
|
+
showMoreLimit = props.showMoreLimit,
|
|
7937
|
+
facetOrdering = props.facetOrdering;
|
|
7850
7938
|
var id = getId$c(props);
|
|
7851
7939
|
var results = getResults(searchResults, {
|
|
7852
7940
|
ais: props.contextValue,
|
|
@@ -7867,7 +7955,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7867
7955
|
|
|
7868
7956
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7869
7957
|
var value = results.getFacetValues(id, {
|
|
7870
|
-
sortBy: sortBy$1
|
|
7958
|
+
sortBy: sortBy$1,
|
|
7959
|
+
facetOrdering: facetOrdering
|
|
7871
7960
|
});
|
|
7872
7961
|
var items = value.data ? transformValue(value.data, props, searchState, {
|
|
7873
7962
|
ais: props.contextValue,
|
|
@@ -8419,17 +8508,20 @@ var connectMenu = createConnectorWithContext({
|
|
|
8419
8508
|
showMoreLimit: PropTypes__default['default'].number,
|
|
8420
8509
|
defaultRefinement: PropTypes__default['default'].string,
|
|
8421
8510
|
transformItems: PropTypes__default['default'].func,
|
|
8422
|
-
searchable: PropTypes__default['default'].bool
|
|
8511
|
+
searchable: PropTypes__default['default'].bool,
|
|
8512
|
+
facetOrdering: PropTypes__default['default'].bool
|
|
8423
8513
|
},
|
|
8424
8514
|
defaultProps: {
|
|
8425
8515
|
showMore: false,
|
|
8426
8516
|
limit: 10,
|
|
8427
|
-
showMoreLimit: 20
|
|
8517
|
+
showMoreLimit: 20,
|
|
8518
|
+
facetOrdering: true
|
|
8428
8519
|
},
|
|
8429
8520
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults, meta, searchForFacetValuesResults) {
|
|
8430
8521
|
var attribute = props.attribute,
|
|
8431
8522
|
searchable = props.searchable,
|
|
8432
|
-
indexContextValue = props.indexContextValue
|
|
8523
|
+
indexContextValue = props.indexContextValue,
|
|
8524
|
+
facetOrdering = props.facetOrdering;
|
|
8433
8525
|
var results = getResults(searchResults, {
|
|
8434
8526
|
ais: props.contextValue,
|
|
8435
8527
|
multiIndexContext: props.indexContextValue
|
|
@@ -8475,7 +8567,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8475
8567
|
});
|
|
8476
8568
|
} else {
|
|
8477
8569
|
items = results.getFacetValues(attribute, {
|
|
8478
|
-
sortBy: searchable ? undefined : defaultSortBy
|
|
8570
|
+
sortBy: searchable ? undefined : defaultSortBy,
|
|
8571
|
+
facetOrdering: facetOrdering
|
|
8479
8572
|
}).map(function (v) {
|
|
8480
8573
|
return {
|
|
8481
8574
|
label: v.name,
|
|
@@ -9332,18 +9425,21 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9332
9425
|
showMoreLimit: PropTypes__default['default'].number,
|
|
9333
9426
|
defaultRefinement: PropTypes__default['default'].arrayOf(PropTypes__default['default'].oneOfType([PropTypes__default['default'].string, PropTypes__default['default'].number])),
|
|
9334
9427
|
searchable: PropTypes__default['default'].bool,
|
|
9335
|
-
transformItems: PropTypes__default['default'].func
|
|
9428
|
+
transformItems: PropTypes__default['default'].func,
|
|
9429
|
+
facetOrdering: PropTypes__default['default'].bool
|
|
9336
9430
|
},
|
|
9337
9431
|
defaultProps: {
|
|
9338
9432
|
operator: 'or',
|
|
9339
9433
|
showMore: false,
|
|
9340
9434
|
limit: 10,
|
|
9341
|
-
showMoreLimit: 20
|
|
9435
|
+
showMoreLimit: 20,
|
|
9436
|
+
facetOrdering: true
|
|
9342
9437
|
},
|
|
9343
9438
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults, metadata, searchForFacetValuesResults) {
|
|
9344
9439
|
var attribute = props.attribute,
|
|
9345
9440
|
searchable = props.searchable,
|
|
9346
|
-
indexContextValue = props.indexContextValue
|
|
9441
|
+
indexContextValue = props.indexContextValue,
|
|
9442
|
+
facetOrdering = props.facetOrdering;
|
|
9347
9443
|
var results = getResults(searchResults, {
|
|
9348
9444
|
ais: props.contextValue,
|
|
9349
9445
|
multiIndexContext: props.indexContextValue
|
|
@@ -9384,7 +9480,8 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9384
9480
|
isRefined: v.isRefined
|
|
9385
9481
|
};
|
|
9386
9482
|
}) : results.getFacetValues(attribute, {
|
|
9387
|
-
sortBy: sortBy
|
|
9483
|
+
sortBy: sortBy,
|
|
9484
|
+
facetOrdering: facetOrdering
|
|
9388
9485
|
}).map(function (v) {
|
|
9389
9486
|
return {
|
|
9390
9487
|
label: v.name,
|
|
@@ -10884,6 +10981,7 @@ function (_Component) {
|
|
|
10884
10981
|
|
|
10885
10982
|
var _this$props4 = this.props,
|
|
10886
10983
|
className = _this$props4.className,
|
|
10984
|
+
inputId = _this$props4.inputId,
|
|
10887
10985
|
translate = _this$props4.translate,
|
|
10888
10986
|
autoFocus = _this$props4.autoFocus,
|
|
10889
10987
|
loadingIndicator = _this$props4.loadingIndicator,
|
|
@@ -10911,6 +11009,7 @@ function (_Component) {
|
|
|
10911
11009
|
role: "search"
|
|
10912
11010
|
}, React__default['default'].createElement("input", index._extends({
|
|
10913
11011
|
ref: this.onInputMount,
|
|
11012
|
+
id: inputId,
|
|
10914
11013
|
type: "search",
|
|
10915
11014
|
placeholder: translate('placeholder'),
|
|
10916
11015
|
autoFocus: autoFocus,
|
|
@@ -10962,7 +11061,8 @@ _defineProperty(SearchBox$1, "propTypes", {
|
|
|
10962
11061
|
showLoadingIndicator: PropTypes__default['default'].bool,
|
|
10963
11062
|
inputRef: PropTypes__default['default'].oneOfType([PropTypes__default['default'].func, PropTypes__default['default'].exact({
|
|
10964
11063
|
current: PropTypes__default['default'].object
|
|
10965
|
-
})])
|
|
11064
|
+
})]),
|
|
11065
|
+
inputId: PropTypes__default['default'].string
|
|
10966
11066
|
});
|
|
10967
11067
|
|
|
10968
11068
|
_defineProperty(SearchBox$1, "defaultProps", {
|
|
@@ -11601,9 +11701,11 @@ function (_Component) {
|
|
|
11601
11701
|
value: function render() {
|
|
11602
11702
|
var _this$props = this.props,
|
|
11603
11703
|
cx = _this$props.cx,
|
|
11704
|
+
id = _this$props.id,
|
|
11604
11705
|
items = _this$props.items,
|
|
11605
11706
|
selectedItem = _this$props.selectedItem;
|
|
11606
11707
|
return React__default['default'].createElement("select", {
|
|
11708
|
+
id: id,
|
|
11607
11709
|
className: cx('select'),
|
|
11608
11710
|
value: selectedItem,
|
|
11609
11711
|
onChange: this.onChange
|
|
@@ -11623,6 +11725,7 @@ function (_Component) {
|
|
|
11623
11725
|
|
|
11624
11726
|
_defineProperty(Select, "propTypes", {
|
|
11625
11727
|
cx: PropTypes__default['default'].func.isRequired,
|
|
11728
|
+
id: PropTypes__default['default'].string,
|
|
11626
11729
|
onSelect: PropTypes__default['default'].func.isRequired,
|
|
11627
11730
|
items: PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
|
|
11628
11731
|
value: PropTypes__default['default'].oneOfType([PropTypes__default['default'].string, PropTypes__default['default'].number]).isRequired,
|
|
@@ -11650,6 +11753,7 @@ function (_Component) {
|
|
|
11650
11753
|
key: "render",
|
|
11651
11754
|
value: function render() {
|
|
11652
11755
|
var _this$props = this.props,
|
|
11756
|
+
id = _this$props.id,
|
|
11653
11757
|
items = _this$props.items,
|
|
11654
11758
|
currentRefinement = _this$props.currentRefinement,
|
|
11655
11759
|
refine = _this$props.refine,
|
|
@@ -11657,6 +11761,7 @@ function (_Component) {
|
|
|
11657
11761
|
return React__default['default'].createElement("div", {
|
|
11658
11762
|
className: index.classnames(cx$h(''), className)
|
|
11659
11763
|
}, React__default['default'].createElement(Select, {
|
|
11764
|
+
id: id,
|
|
11660
11765
|
onSelect: refine,
|
|
11661
11766
|
selectedItem: currentRefinement,
|
|
11662
11767
|
items: items,
|
|
@@ -11669,6 +11774,7 @@ function (_Component) {
|
|
|
11669
11774
|
}(React.Component);
|
|
11670
11775
|
|
|
11671
11776
|
_defineProperty(HitsPerPage, "propTypes", {
|
|
11777
|
+
id: PropTypes__default['default'].string,
|
|
11672
11778
|
items: PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
|
|
11673
11779
|
value: PropTypes__default['default'].number.isRequired,
|
|
11674
11780
|
label: PropTypes__default['default'].string
|
|
@@ -11691,6 +11797,7 @@ _defineProperty(HitsPerPage, "defaultProps", {
|
|
|
11691
11797
|
*
|
|
11692
11798
|
* @name HitsPerPage
|
|
11693
11799
|
* @kind widget
|
|
11800
|
+
* @propType {string} id - The id of the select input
|
|
11694
11801
|
* @propType {{value: number, label: string}[]} items - List of available options.
|
|
11695
11802
|
* @propType {number} defaultRefinement - The number of items selected by default
|
|
11696
11803
|
* @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.
|
|
@@ -12059,6 +12166,7 @@ function (_Component) {
|
|
|
12059
12166
|
key: "render",
|
|
12060
12167
|
value: function render() {
|
|
12061
12168
|
var _this$props = this.props,
|
|
12169
|
+
id = _this$props.id,
|
|
12062
12170
|
items = _this$props.items,
|
|
12063
12171
|
canRefine = _this$props.canRefine,
|
|
12064
12172
|
translate = _this$props.translate,
|
|
@@ -12066,6 +12174,7 @@ function (_Component) {
|
|
|
12066
12174
|
return React__default['default'].createElement("div", {
|
|
12067
12175
|
className: index.classnames(cx$e('', !canRefine && '-noRefinement'), className)
|
|
12068
12176
|
}, React__default['default'].createElement("select", {
|
|
12177
|
+
id: id,
|
|
12069
12178
|
value: this.selectedValue,
|
|
12070
12179
|
onChange: this.handleSelectChange,
|
|
12071
12180
|
className: cx$e('select')
|
|
@@ -12098,6 +12207,7 @@ function (_Component) {
|
|
|
12098
12207
|
}(React.Component);
|
|
12099
12208
|
|
|
12100
12209
|
_defineProperty(MenuSelect, "propTypes", {
|
|
12210
|
+
id: PropTypes__default['default'].string,
|
|
12101
12211
|
items: PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
|
|
12102
12212
|
label: PropTypes__default['default'].string.isRequired,
|
|
12103
12213
|
value: PropTypes__default['default'].string.isRequired,
|
|
@@ -12124,6 +12234,7 @@ var MenuSelect$1 = translatable({
|
|
|
12124
12234
|
* @kind widget
|
|
12125
12235
|
* @requirements The attribute passed to the `attribute` prop must be present in "attributes for faceting"
|
|
12126
12236
|
* on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API.
|
|
12237
|
+
* @propType {string} id - the id of the select input
|
|
12127
12238
|
* @propType {string} attribute - the name of the attribute in the record
|
|
12128
12239
|
* @propType {string} [defaultRefinement] - the value of the item selected by default
|
|
12129
12240
|
* @propType {number} [limit=10] - the minimum number of diplayed items
|
|
@@ -13455,6 +13566,7 @@ connectScrollTo(ScrollTo);
|
|
|
13455
13566
|
* @propType {node} [reset] - Change the apparence of the default reset button (cross).
|
|
13456
13567
|
* @propType {node} [loadingIndicator] - Change the apparence of the default loading indicator (spinning circle).
|
|
13457
13568
|
* @propType {string} [defaultRefinement] - Provide default refinement value when component is mounted.
|
|
13569
|
+
* @propType {string} [inputId] - The id of the search input
|
|
13458
13570
|
* @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.
|
|
13459
13571
|
* @themeKey ais-SearchBox - the root div of the widget
|
|
13460
13572
|
* @themeKey ais-SearchBox-form - the wrapping form
|
|
@@ -13605,6 +13717,7 @@ function (_Component) {
|
|
|
13605
13717
|
key: "render",
|
|
13606
13718
|
value: function render() {
|
|
13607
13719
|
var _this$props = this.props,
|
|
13720
|
+
id = _this$props.id,
|
|
13608
13721
|
items = _this$props.items,
|
|
13609
13722
|
currentRefinement = _this$props.currentRefinement,
|
|
13610
13723
|
refine = _this$props.refine,
|
|
@@ -13612,6 +13725,7 @@ function (_Component) {
|
|
|
13612
13725
|
return React__default['default'].createElement("div", {
|
|
13613
13726
|
className: index.classnames(cx$4(''), className)
|
|
13614
13727
|
}, React__default['default'].createElement(Select, {
|
|
13728
|
+
id: id,
|
|
13615
13729
|
cx: cx$4,
|
|
13616
13730
|
items: items,
|
|
13617
13731
|
selectedItem: currentRefinement,
|
|
@@ -13624,6 +13738,7 @@ function (_Component) {
|
|
|
13624
13738
|
}(React.Component);
|
|
13625
13739
|
|
|
13626
13740
|
_defineProperty(SortBy, "propTypes", {
|
|
13741
|
+
id: PropTypes__default['default'].string,
|
|
13627
13742
|
items: PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
|
|
13628
13743
|
label: PropTypes__default['default'].string,
|
|
13629
13744
|
value: PropTypes__default['default'].string.isRequired
|
|
@@ -13643,6 +13758,7 @@ _defineProperty(SortBy, "defaultProps", {
|
|
|
13643
13758
|
* @requirements Algolia handles sorting by creating replica indices. [Read more about sorting](https://www.algolia.com/doc/guides/relevance/sorting/) on
|
|
13644
13759
|
* the Algolia website.
|
|
13645
13760
|
* @kind widget
|
|
13761
|
+
* @propType {string} id - The id of the select input
|
|
13646
13762
|
* @propType {{value: string, label: string}[]} items - The list of indexes to search in.
|
|
13647
13763
|
* @propType {string} defaultRefinement - The default selected index.
|
|
13648
13764
|
* @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.
|