@newskit-render/standalone-components 1.12.3 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/dist/cjs/help-hub/context/baseContext.d.ts +1 -0
- package/dist/cjs/help-hub/context/baseContext.js +2 -1
- package/dist/cjs/help-hub/context/baseContext.js.map +1 -1
- package/dist/cjs/help-hub/mocks/sharedMocks.d.ts +5 -0
- package/dist/cjs/help-hub/mocks/sharedMocks.js +108 -1
- package/dist/cjs/help-hub/mocks/sharedMocks.js.map +1 -1
- package/dist/cjs/help-hub/pages/ResultsPage.js +13 -9
- package/dist/cjs/help-hub/pages/ResultsPage.js.map +1 -1
- package/dist/cjs/help-hub/pages/types.d.ts +1 -0
- package/dist/cjs/help-hub/provider/resultsProvider.d.ts +4 -3
- package/dist/cjs/help-hub/provider/resultsProvider.js +12 -8
- package/dist/cjs/help-hub/provider/resultsProvider.js.map +1 -1
- package/dist/esm/help-hub/context/baseContext.d.ts +1 -0
- package/dist/esm/help-hub/context/baseContext.js +1 -0
- package/dist/esm/help-hub/context/baseContext.js.map +1 -1
- package/dist/esm/help-hub/mocks/sharedMocks.d.ts +5 -0
- package/dist/esm/help-hub/mocks/sharedMocks.js +107 -0
- package/dist/esm/help-hub/mocks/sharedMocks.js.map +1 -1
- package/dist/esm/help-hub/pages/ResultsPage.js +14 -10
- package/dist/esm/help-hub/pages/ResultsPage.js.map +1 -1
- package/dist/esm/help-hub/pages/types.d.ts +1 -0
- package/dist/esm/help-hub/provider/resultsProvider.d.ts +4 -3
- package/dist/esm/help-hub/provider/resultsProvider.js +11 -7
- package/dist/esm/help-hub/provider/resultsProvider.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -764,6 +764,19 @@ export const getServerSideProps = async (context) => {
|
|
|
764
764
|
}
|
|
765
765
|
```
|
|
766
766
|
|
|
767
|
+
By default ResultsPage will return up to 20 results. This can be changed by adding a second parameter to `helpHubResultsProvider`
|
|
768
|
+
|
|
769
|
+
```typescript
|
|
770
|
+
export const getServerSideProps = async (context) => {
|
|
771
|
+
newrelic.setTransactionName('HelpHubResultsPage')
|
|
772
|
+
console.warn('context:')
|
|
773
|
+
console.warn(context.req && context.req.headers)
|
|
774
|
+
addCacheHeaders(context.res)
|
|
775
|
+
|
|
776
|
+
return helpHubResultsProvider(context, 10)
|
|
777
|
+
}
|
|
778
|
+
```
|
|
779
|
+
|
|
767
780
|
2.8 Help-hub Help Article page. Article page uses Next.js router to get the article parameter in order to fetch the article. The parameter is called title. That means that your path in Next routing system should look like this:
|
|
768
781
|
|
|
769
782
|
`help-hub/article/[title]/index.tsx`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.baseContext = void 0;
|
|
3
|
+
exports.HITS_PER_PAGE = exports.baseContext = void 0;
|
|
4
4
|
/* istanbul ignore next */
|
|
5
5
|
exports.baseContext = {
|
|
6
6
|
baseUrl: '/help-hub',
|
|
@@ -115,4 +115,5 @@ exports.baseContext = {
|
|
|
115
115
|
},
|
|
116
116
|
},
|
|
117
117
|
};
|
|
118
|
+
exports.HITS_PER_PAGE = 20;
|
|
118
119
|
//# sourceMappingURL=baseContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseContext.js","sourceRoot":"","sources":["../../../../src/help-hub/context/baseContext.tsx"],"names":[],"mappings":";;;AAEA,0BAA0B;AACb,QAAA,WAAW,GAAuB;IAC7C,OAAO,EAAE,WAAW;IACpB,GAAG,EAAE;QACH,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,EAAE;QACf,GAAG,EAAE,EAAE;QACP,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE,EAAE;KACb;IACD,iBAAiB,EAAE;QACjB,GAAG,EAAE;YACH;gBACE,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,cAAc;gBACpB,I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AAE,UAAU,EAAE;KAC/C;IACD,eAAe,EAAE;QACf,YAAY,EAAE;YACZ,UAAU,EAAE,UAAU;SACvB;KACF;IACD,eAAe,EAAE,sDAAsD;IACvE,iBAAiB,EAAE,qDAAqD;IACxE,UAAU,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE;IAC9C,gBAAgB,EAAE,qBAAqB;IACvC,MAAM,EAAE;QACN,aAAa,EAAE;YACb,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,EAAE;YAC9C;gBACE,IAAI,EAAE,yBAAyB;gBAC/B,IAAI,EAAE,+BAA+B;gBACrC,EAAE,EAAE,CAAC;aACN;YACD,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,EAAE,CAAC,EAAE;SACrE;QACD,SAAS,EAAE,iCAAqB,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,mGACgC;KACzF;IACD,eAAe,EAAE;QACf,SAAS,EAAE,aAAa;QACxB,iBAAiB,EAAE;YACjB,WAAW,EAAE,kBAAkB;YAC/B,gBAAgB,EAAE,kBAAkB;SACrC;QACD,aAAa,EAAE;YACb,UAAU,EAAE,UAAU;YACtB,eAAe,EAAE,cAAc;YAC/B,cAAc,EAAE,cAAc;YAC9B,iBAAiB,EAAE,cAAc;YACjC,OAAO,EAAE;gBACP,EAAE,EAAE,WAAW;gBACf,EAAE,EAAE,WAAW;aAChB;SACF;QACD,kBAAkB,EAAE;YAClB,UAAU,EAAE,UAAU;YACtB,WAAW,EAAE,WAAW;YACxB,gBAAgB,EAAE,gBAAgB;YAClC,OAAO,EAAE;gBACP,EAAE,EAAE,WAAW;gBACf,EAAE,EAAE,WAAW;aAChB;SACF;KACF;CACF,CAAA"}
|
|
1
|
+
{"version":3,"file":"baseContext.js","sourceRoot":"","sources":["../../../../src/help-hub/context/baseContext.tsx"],"names":[],"mappings":";;;AAEA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W;aAChB;SACF;QACD,kBAAkB,EAAE;YAClB,UAAU,EAAE,UAAU;YACtB,WAAW,EAAE,WAAW;YACxB,gBAAgB,EAAE,gBAAgB;YAClC,OAAO,EAAE;gBACP,EAAE,EAAE,WAAW;gBACf,EAAE,EAAE,WAAW;aAChB;SACF;KACF;CACF,CAAA;AAEY,QAAA,aAAa,GAAG,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.algoliaDataMock = exports.mostReadArticlesMock = void 0;
|
|
3
|
+
exports.algoliaDataLargeMock = exports.algoliaDataMock = exports.mostReadArticlesMock = void 0;
|
|
4
4
|
exports.mostReadArticlesMock = [
|
|
5
5
|
{
|
|
6
6
|
id: 'ka06M00000090SNQAY',
|
|
@@ -44,4 +44,111 @@ exports.algoliaDataMock = [
|
|
|
44
44
|
objectID: 'how-many-articles-can-i-read-with-my-registered-access',
|
|
45
45
|
},
|
|
46
46
|
];
|
|
47
|
+
exports.algoliaDataLargeMock = [
|
|
48
|
+
{
|
|
49
|
+
title: "What's in the smartphone app and how do I access it?",
|
|
50
|
+
content: '<ul><li>Enjoy The Times and The Sunday Times journalism wherever you are with one app, 7 days a week.</li><li>Get the latest global, business, politics, sport and finance headline news articles on the go as well as trusted analysis and opinion from our award-winning columnists and global correspondents.</li><li>On top of that, enjoy stunning picture galleries, interactive crossword puzzles and exclusive video dispatches from Great Britain and across the world. Now with a seamless link to The Times and Sunday Times Sport app.</li><li>Keep updated on all your Times+ membership offers and experience a selection of the best Times+ Talks right from within the app. </li><li>You can save your favourite articles for reading later and share your favourite stories from our Times & Sunday Times columnists from across all sections including headline news reports, UK and global business, finance, world, sport reports, politics and opinion.</li></ul>\n<br>The app is available from the <a href="https://play.google.com/store/apps/details?id=uk.co.thetimes" target="_blank">Google Play Store</a> and <a href="https://itunes.apple.com/gb/app/the-times-the-sunday-times/id436792321?mt=8" target="_blank">iTunes</a><br>Please ensure that you are using the latest Android or IOS software when downloading the app.',
|
|
51
|
+
objectID: 'what-s-in-the-smartphone-app-and-how-do-i-access-it',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
title: 'Sign-in with Google',
|
|
55
|
+
content: '<p>To use Google Sign In with The Times and Sunday Times, you must have a Google account. If you don’t have a Google account but would like to use this feature, you can easily create one at google.com<br><br><b>I see an error telling me I don’t have an account with The Times when login in to My Times account with Google Sign in?</b></p>\n\n<ul><li>\n\t<p>On first use of Google Sign In, your Times username must match the email address on your Google account, otherwise we cannot match them. If you would like to use Google Sign In but your email address does not match, you can log in using your Times email address and password and update your email address in My Account.</p>\n\t</li></ul>\n\n<p><b>Can I change my Times email address after I use Google Sign In?</b></p>\n\n<ul><li>\n\t<p>First time you sign into your Times account your login email address needs to be the same as your Google account email address. Once logged in you can update this via My Account.</p>\n\t</li></ul>\n\n<p><b>Can I still login with my own Times username and password after I use Google Sign In?</b></p>\n\n<ul><li>\n\t<p>As an existing Times user, you continue to have the ability to login using your Times username and password. You will as such retain the ability to change your password at any time.</p>\n\t</li></ul>',
|
|
56
|
+
objectID: 'sign-with-google',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
title: 'I am trying to share an article via Google+ but an error message keeps appearing',
|
|
60
|
+
content: 'This may be happening because there's an authentication issue with your Google+ account. To fix this, delete The Times and The Sunday Times app and then reinstall it. ',
|
|
61
|
+
objectID: 'i-am-trying-to-share-an-article-via-google-but-an-error-message-keeps-appearing',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
title: 'How will I find out if I have won a competition?',
|
|
65
|
+
content: 'Our competitions team contact the winners of our competitions via the phone number on your Times account.<br><br>If you don’t answer they will endeavor to contact you via email, giving you plenty of time to respond before finding a new winner.',
|
|
66
|
+
objectID: 'how-will-i-find-out-if-i-have-won-a-competition',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
title: 'How many articles can I read with my registered access?',
|
|
70
|
+
content: 'You can read up to two articles a week, Monday to Sunday. Every Monday your allocation will be reset to two articles. An article is a whole photo gallery, story or a piece of video content.',
|
|
71
|
+
objectID: 'how-many-articles-can-i-read-with-my-registered-access',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
title: "What's in the smartphone app and how do I access it?",
|
|
75
|
+
content: '<ul><li>Enjoy The Times and The Sunday Times journalism wherever you are with one app, 7 days a week.</li><li>Get the latest global, business, politics, sport and finance headline news articles on the go as well as trusted analysis and opinion from our award-winning columnists and global correspondents.</li><li>On top of that, enjoy stunning picture galleries, interactive crossword puzzles and exclusive video dispatches from Great Britain and across the world. Now with a seamless link to The Times and Sunday Times Sport app.</li><li>Keep updated on all your Times+ membership offers and experience a selection of the best Times+ Talks right from within the app. </li><li>You can save your favourite articles for reading later and share your favourite stories from our Times & Sunday Times columnists from across all sections including headline news reports, UK and global business, finance, world, sport reports, politics and opinion.</li></ul>\n<br>The app is available from the <a href="https://play.google.com/store/apps/details?id=uk.co.thetimes" target="_blank">Google Play Store</a> and <a href="https://itunes.apple.com/gb/app/the-times-the-sunday-times/id436792321?mt=8" target="_blank">iTunes</a><br>Please ensure that you are using the latest Android or IOS software when downloading the app.',
|
|
76
|
+
objectID: 'what-s-in-the-smartphone-app-and-how-do-i-access-it-2',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
title: 'Sign-in with Google',
|
|
80
|
+
content: '<p>To use Google Sign In with The Times and Sunday Times, you must have a Google account. If you don’t have a Google account but would like to use this feature, you can easily create one at google.com<br><br><b>I see an error telling me I don’t have an account with The Times when login in to My Times account with Google Sign in?</b></p>\n\n<ul><li>\n\t<p>On first use of Google Sign In, your Times username must match the email address on your Google account, otherwise we cannot match them. If you would like to use Google Sign In but your email address does not match, you can log in using your Times email address and password and update your email address in My Account.</p>\n\t</li></ul>\n\n<p><b>Can I change my Times email address after I use Google Sign In?</b></p>\n\n<ul><li>\n\t<p>First time you sign into your Times account your login email address needs to be the same as your Google account email address. Once logged in you can update this via My Account.</p>\n\t</li></ul>\n\n<p><b>Can I still login with my own Times username and password after I use Google Sign In?</b></p>\n\n<ul><li>\n\t<p>As an existing Times user, you continue to have the ability to login using your Times username and password. You will as such retain the ability to change your password at any time.</p>\n\t</li></ul>',
|
|
81
|
+
objectID: 'sign-with-google-2',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
title: 'I am trying to share an article via Google+ but an error message keeps appearing',
|
|
85
|
+
content: 'This may be happening because there's an authentication issue with your Google+ account. To fix this, delete The Times and The Sunday Times app and then reinstall it. ',
|
|
86
|
+
objectID: 'i-am-trying-to-share-an-article-via-google-but-an-error-message-keeps-appearing-2',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
title: 'How will I find out if I have won a competition?',
|
|
90
|
+
content: 'Our competitions team contact the winners of our competitions via the phone number on your Times account.<br><br>If you don’t answer they will endeavor to contact you via email, giving you plenty of time to respond before finding a new winner.',
|
|
91
|
+
objectID: 'how-will-i-find-out-if-i-have-won-a-competition-2',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
title: 'How many articles can I read with my registered access?',
|
|
95
|
+
content: 'You can read up to two articles a week, Monday to Sunday. Every Monday your allocation will be reset to two articles. An article is a whole photo gallery, story or a piece of video content.',
|
|
96
|
+
objectID: 'how-many-articles-can-i-read-with-my-registered-access-2',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
title: "What's in the smartphone app and how do I access it?",
|
|
100
|
+
content: '<ul><li>Enjoy The Times and The Sunday Times journalism wherever you are with one app, 7 days a week.</li><li>Get the latest global, business, politics, sport and finance headline news articles on the go as well as trusted analysis and opinion from our award-winning columnists and global correspondents.</li><li>On top of that, enjoy stunning picture galleries, interactive crossword puzzles and exclusive video dispatches from Great Britain and across the world. Now with a seamless link to The Times and Sunday Times Sport app.</li><li>Keep updated on all your Times+ membership offers and experience a selection of the best Times+ Talks right from within the app. </li><li>You can save your favourite articles for reading later and share your favourite stories from our Times & Sunday Times columnists from across all sections including headline news reports, UK and global business, finance, world, sport reports, politics and opinion.</li></ul>\n<br>The app is available from the <a href="https://play.google.com/store/apps/details?id=uk.co.thetimes" target="_blank">Google Play Store</a> and <a href="https://itunes.apple.com/gb/app/the-times-the-sunday-times/id436792321?mt=8" target="_blank">iTunes</a><br>Please ensure that you are using the latest Android or IOS software when downloading the app.',
|
|
101
|
+
objectID: 'what-s-in-the-smartphone-app-and-how-do-i-access-it-3',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
title: 'Sign-in with Google',
|
|
105
|
+
content: '<p>To use Google Sign In with The Times and Sunday Times, you must have a Google account. If you don’t have a Google account but would like to use this feature, you can easily create one at google.com<br><br><b>I see an error telling me I don’t have an account with The Times when login in to My Times account with Google Sign in?</b></p>\n\n<ul><li>\n\t<p>On first use of Google Sign In, your Times username must match the email address on your Google account, otherwise we cannot match them. If you would like to use Google Sign In but your email address does not match, you can log in using your Times email address and password and update your email address in My Account.</p>\n\t</li></ul>\n\n<p><b>Can I change my Times email address after I use Google Sign In?</b></p>\n\n<ul><li>\n\t<p>First time you sign into your Times account your login email address needs to be the same as your Google account email address. Once logged in you can update this via My Account.</p>\n\t</li></ul>\n\n<p><b>Can I still login with my own Times username and password after I use Google Sign In?</b></p>\n\n<ul><li>\n\t<p>As an existing Times user, you continue to have the ability to login using your Times username and password. You will as such retain the ability to change your password at any time.</p>\n\t</li></ul>',
|
|
106
|
+
objectID: 'sign-with-google-3',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
title: 'I am trying to share an article via Google+ but an error message keeps appearing',
|
|
110
|
+
content: 'This may be happening because there's an authentication issue with your Google+ account. To fix this, delete The Times and The Sunday Times app and then reinstall it. ',
|
|
111
|
+
objectID: 'i-am-trying-to-share-an-article-via-google-but-an-error-message-keeps-appearing-3',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
title: 'How will I find out if I have won a competition?',
|
|
115
|
+
content: 'Our competitions team contact the winners of our competitions via the phone number on your Times account.<br><br>If you don’t answer they will endeavor to contact you via email, giving you plenty of time to respond before finding a new winner.',
|
|
116
|
+
objectID: 'how-will-i-find-out-if-i-have-won-a-competition-3',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
title: 'How many articles can I read with my registered access?',
|
|
120
|
+
content: 'You can read up to two articles a week, Monday to Sunday. Every Monday your allocation will be reset to two articles. An article is a whole photo gallery, story or a piece of video content.',
|
|
121
|
+
objectID: 'how-many-articles-can-i-read-with-my-registered-access-3',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
title: "What's in the smartphone app and how do I access it?",
|
|
125
|
+
content: '<ul><li>Enjoy The Times and The Sunday Times journalism wherever you are with one app, 7 days a week.</li><li>Get the latest global, business, politics, sport and finance headline news articles on the go as well as trusted analysis and opinion from our award-winning columnists and global correspondents.</li><li>On top of that, enjoy stunning picture galleries, interactive crossword puzzles and exclusive video dispatches from Great Britain and across the world. Now with a seamless link to The Times and Sunday Times Sport app.</li><li>Keep updated on all your Times+ membership offers and experience a selection of the best Times+ Talks right from within the app. </li><li>You can save your favourite articles for reading later and share your favourite stories from our Times & Sunday Times columnists from across all sections including headline news reports, UK and global business, finance, world, sport reports, politics and opinion.</li></ul>\n<br>The app is available from the <a href="https://play.google.com/store/apps/details?id=uk.co.thetimes" target="_blank">Google Play Store</a> and <a href="https://itunes.apple.com/gb/app/the-times-the-sunday-times/id436792321?mt=8" target="_blank">iTunes</a><br>Please ensure that you are using the latest Android or IOS software when downloading the app.',
|
|
126
|
+
objectID: 'what-s-in-the-smartphone-app-and-how-do-i-access-it-4',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
title: 'Sign-in with Google',
|
|
130
|
+
content: '<p>To use Google Sign In with The Times and Sunday Times, you must have a Google account. If you don’t have a Google account but would like to use this feature, you can easily create one at google.com<br><br><b>I see an error telling me I don’t have an account with The Times when login in to My Times account with Google Sign in?</b></p>\n\n<ul><li>\n\t<p>On first use of Google Sign In, your Times username must match the email address on your Google account, otherwise we cannot match them. If you would like to use Google Sign In but your email address does not match, you can log in using your Times email address and password and update your email address in My Account.</p>\n\t</li></ul>\n\n<p><b>Can I change my Times email address after I use Google Sign In?</b></p>\n\n<ul><li>\n\t<p>First time you sign into your Times account your login email address needs to be the same as your Google account email address. Once logged in you can update this via My Account.</p>\n\t</li></ul>\n\n<p><b>Can I still login with my own Times username and password after I use Google Sign In?</b></p>\n\n<ul><li>\n\t<p>As an existing Times user, you continue to have the ability to login using your Times username and password. You will as such retain the ability to change your password at any time.</p>\n\t</li></ul>',
|
|
131
|
+
objectID: 'sign-with-google-4',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
title: 'I am trying to share an article via Google+ but an error message keeps appearing',
|
|
135
|
+
content: 'This may be happening because there's an authentication issue with your Google+ account. To fix this, delete The Times and The Sunday Times app and then reinstall it. ',
|
|
136
|
+
objectID: 'i-am-trying-to-share-an-article-via-google-but-an-error-message-keeps-appearing-4',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
title: 'How will I find out if I have won a competition?',
|
|
140
|
+
content: 'Our competitions team contact the winners of our competitions via the phone number on your Times account.<br><br>If you don’t answer they will endeavor to contact you via email, giving you plenty of time to respond before finding a new winner.',
|
|
141
|
+
objectID: 'how-will-i-find-out-if-i-have-won-a-competition-4',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
title: 'How many articles can I read with my registered access?',
|
|
145
|
+
content: 'You can read up to two articles a week, Monday to Sunday. Every Monday your allocation will be reset to two articles. An article is a whole photo gallery, story or a piece of video content.',
|
|
146
|
+
objectID: 'how-many-articles-can-i-read-with-my-registered-access-4',
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
title: 'How many articles can I read with my registered access?',
|
|
150
|
+
content: 'You can read up to two articles a week, Monday to Sunday. Every Monday your allocation will be reset to two articles. An article is a whole photo gallery, story or a piece of video content.',
|
|
151
|
+
objectID: 'how-many-articles-can-i-read-with-my-registered-access-5',
|
|
152
|
+
},
|
|
153
|
+
];
|
|
47
154
|
//# sourceMappingURL=sharedMocks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedMocks.js","sourceRoot":"","sources":["../../../../src/help-hub/mocks/sharedMocks.tsx"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG;IAClC;QACE,EAAE,EAAE,oBAAoB;QACxB,KAAK,EAAE,mDAAmD;QAC1D,OAAO,EACL,6PAA6P;QAC/P,kBAAkB,EAAE,8BAA8B;QAClD,QAAQ,EAAE,+CAA+C;KAC1D;IACD;QACE,EAAE,EAAE,oBAAoB;QACxB,KAAK,EAAE,yCAAyC;QAChD,OAAO,EACL,6PAA6P;QAC/P,kBAAkB,EAAE,8BAA8B;QAClD,QAAQ,EAAE,+CAA+C;KAC1D;CACF,CAAA;AAEY,QAAA,eAAe,GAAG;IAC7B;QACE,KAAK,EAAE,sDAAsD;QAC7D,OAAO,EACL,kyCAAkyC;QACpyC,QAAQ,EAAE,qDAAqD;KAChE;IACD;QACE,KAAK,EAAE,qBAAqB;QAC5B,OAAO,EACL,kyCAAkyC;QACpyC,QAAQ,EAAE,kBAAkB;KAC7B;IACD;QACE,KAAK,EACH,kFAAkF;QACpF,OAAO,EACL,6KAA6K;QAC/K,QAAQ,EACN,iFAAiF;KACpF;IACD;QACE,KAAK,EAAE,kDAAkD;QACzD,OAAO,EACL,qPAAqP;QACvP,QAAQ,EAAE,iDAAiD;KAC5D;IACD;QACE,KAAK,EAAE,yDAAyD;QAChE,OAAO,EACL,+LAA+L;QACjM,QAAQ,EAAE,wDAAwD;KACnE;CACF,CAAA"}
|
|
1
|
+
{"version":3,"file":"sharedMocks.js","sourceRoot":"","sources":["../../../../src/help-hub/mocks/sharedMocks.tsx"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG;IAClC;QACE,EAAE,EAAE,oBAAoB;QACxB,KAAK,EAAE,mDAAmD;QAC1D,OAAO,EACL,6PAA6P;QAC/P,kBAAkB,EAAE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ACE,KAAK,EAAE,yDAAyD;QAChE,OAAO,EACL,+LAA+L;QACjM,QAAQ,EAAE,0DAA0D;KACrE;IACD;QACE,KAAK,EAAE,yDAAyD;QAChE,OAAO,EACL,+LAA+L;QACjM,QAAQ,EAAE,0DAA0D;KACrE;CACF,CAAA"}
|
|
@@ -60,6 +60,7 @@ var resultsProvider_1 = require("../provider/resultsProvider");
|
|
|
60
60
|
var context_2 = require("../context");
|
|
61
61
|
var router_1 = require("next/router");
|
|
62
62
|
var helpers_1 = require("../helpers");
|
|
63
|
+
var baseContext_1 = require("../context/baseContext");
|
|
63
64
|
exports.resultsPageContext = {
|
|
64
65
|
introductionProps: {
|
|
65
66
|
title: 'Search results',
|
|
@@ -79,19 +80,22 @@ exports.resultsPageContext = {
|
|
|
79
80
|
stylePreset: '',
|
|
80
81
|
showDividerByBreakpoint: true,
|
|
81
82
|
};
|
|
82
|
-
var PageContent = function () {
|
|
83
|
-
var
|
|
84
|
-
var _b = (0,
|
|
85
|
-
var _c = (0, react_1.useState)(
|
|
86
|
-
var _d = (0, react_1.useState)(
|
|
87
|
-
var _e = (0,
|
|
83
|
+
var PageContent = function (_a) {
|
|
84
|
+
var hitsPerPage = _a.hitsPerPage;
|
|
85
|
+
var _b = (0, context_1.useHelpHubContext)(types_1.PagesNameMap.resultsPage), introductionProps = _b.introductionProps, inputPlaceholder = _b.inputPlaceholder, searchBar = _b.searchBar, baseUrl = _b.baseUrl, searchResultEmpty = _b.searchResultEmpty, hits = _b.hits, showDividerByBreakpoint = _b.showDividerByBreakpoint, stylePreset = _b.stylePreset;
|
|
86
|
+
var _c = (0, react_1.useState)(0), page = _c[0], setPage = _c[1];
|
|
87
|
+
var _d = (0, react_1.useState)(2), nbPages = _d[0], setNbPages = _d[1];
|
|
88
|
+
var _e = (0, react_1.useState)(hits), allHits = _e[0], setAllHits = _e[1];
|
|
89
|
+
var _f = (0, context_2.useCredentialsContext)(), appId = _f.appId, apiKey = _f.apiKey, indexName = _f.indexName;
|
|
88
90
|
var router = (0, router_1.useRouter)();
|
|
89
91
|
var q = router.query.q;
|
|
90
92
|
var hasQueryParam = q && q.length !== 0;
|
|
93
|
+
var resultsPerPage = hitsPerPage || baseContext_1.HITS_PER_PAGE;
|
|
91
94
|
(0, swr_1.default)(page > 0
|
|
92
95
|
? [
|
|
93
96
|
"https://".concat(appId, ".algolia.net/1/indexes/").concat(indexName, "/query"),
|
|
94
97
|
{ q: q, page: page, apiKey: apiKey, appId: appId },
|
|
98
|
+
resultsPerPage,
|
|
95
99
|
]
|
|
96
100
|
: null, resultsProvider_1.resultsFetcher, {
|
|
97
101
|
onSuccess: function (data) {
|
|
@@ -107,7 +111,7 @@ var PageContent = function () {
|
|
|
107
111
|
var newDescription = description
|
|
108
112
|
.replace('##QUERY##', "".concat(q))
|
|
109
113
|
.replace('##COUNT##', "".concat(allHits.length.toString()));
|
|
110
|
-
var isLoadMoreVisible = page < nbPages - 1 && allHits.length >=
|
|
114
|
+
var isLoadMoreVisible = page < nbPages - 1 && allHits.length >= resultsPerPage;
|
|
111
115
|
var regex = "".concat(q, "|").concat(allHits.length.toString());
|
|
112
116
|
return hasQueryParam ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
113
117
|
react_1.default.createElement(SearchBar_1.SearchBar, { placeholder: inputPlaceholder, baseUrl: baseUrl }),
|
|
@@ -141,11 +145,11 @@ var PageContent = function () {
|
|
|
141
145
|
react_1.default.createElement(shared_components_1.Introduction, { title: searchResultEmpty })));
|
|
142
146
|
};
|
|
143
147
|
var ResultsPage = function (_a) {
|
|
144
|
-
var context = _a.context, customTheme = _a.customTheme, themeDropdownObject = _a.themeDropdownObject, credentials = _a.credentials, hits = _a.hits;
|
|
148
|
+
var context = _a.context, customTheme = _a.customTheme, themeDropdownObject = _a.themeDropdownObject, credentials = _a.credentials, hits = _a.hits, hitsPerPage = _a.hitsPerPage;
|
|
145
149
|
var enhancedContext = __assign({}, (0, lodash_assign_1.default)({}, exports.resultsPageContext, { hits: hits }, context));
|
|
146
150
|
return (react_1.default.createElement(context_2.CredentialsContextProvider, { credentials: credentials },
|
|
147
151
|
react_1.default.createElement(Templates_1.default, { context: enhancedContext, contextName: types_1.PagesNameMap.resultsPage, customTheme: customTheme, themeDropdownObject: themeDropdownObject, topSpaceStack: { xs: 'space045', md: 'space070' } },
|
|
148
|
-
react_1.default.createElement(PageContent,
|
|
152
|
+
react_1.default.createElement(PageContent, { hitsPerPage: hitsPerPage }))));
|
|
149
153
|
};
|
|
150
154
|
exports.ResultsPage = ResultsPage;
|
|
151
155
|
exports.default = exports.ResultsPage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultsPage.js","sourceRoot":"","sources":["../../../../src/help-hub/pages/ResultsPage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAuC;AACvC,gEAAkC;AAClC,mCAAmD;AACnD,uEAI0C;AAC1C,sEAA4C;AAC5C,qDAAmD;AAEnD,0CAA0E;AAC1E,sCAA8C;AAC9C,4CAAwB;AACxB,+
|
|
1
|
+
{"version":3,"file":"ResultsPage.js","sourceRoot":"","sources":["../../../../src/help-hub/pages/ResultsPage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAuC;AACvC,gEAAkC;AAClC,mCAAmD;AACnD,uEAI0C;AAC1C,sEAA4C;AAC5C,qDAAmD;AAEnD,0CAA0E;AAC1E,sCAA8C;AAC9C,4CAAwB;AACxB,+DAA4D;AAC5D,sCAA8E;AAC9E,sCAAuC;AAEvC,sCAA0C;AAC1C,sDAAsD;AAEzC,QAAA,kBAAkB,GAAuC;IACpE,iBAAiB,EAAE;QACjB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,wDAAwD;QACrE,cAAc,EAAE;YACd,gBAAgB,EAAE,EAAE,EAAE,EAAE,mBAAmB,EAAE,EAAE,EAAE,mBA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C,gCAAY,IAAC,KAAK,EAAE,iBAAiB,GAAI,CAC/B,CACd,CAAA;AACH,CAAC,CAAA;AAEM,IAAM,WAAW,GAA+B,UAAC,EAOvD;QANC,OAAO,aAAA,EACP,WAAW,iBAAA,EACX,mBAAmB,yBAAA,EACnB,WAAW,iBAAA,EACX,IAAI,UAAA,EACJ,WAAW,iBAAA;IAEX,IAAM,eAAe,gBAChB,IAAA,uBAAM,EAAC,EAAE,EAAE,0BAAkB,EAAE,EAAE,IAAI,MAAA,EAAE,EAAE,OAAO,CAAC,CACrD,CAAA;IAED,OAAO,CACL,8BAAC,oCAA0B,IAAC,WAAW,EAAE,WAAW;QAClD,8BAAC,mBAAM,IACL,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,oBAAY,CAAC,WAAW,EACrC,WAAW,EAAE,WAAW,EACxB,mBAAmB,EAAE,mBAAmB,EACxC,aAAa,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE;YAEjD,8BAAC,WAAW,IAAC,WAAW,EAAE,WAAW,GAAI,CAClC,CACkB,CAC9B,CAAA;AACH,CAAC,CAAA;AAzBY,QAAA,WAAW,eAyBvB;AAED,kBAAe,mBAAW,CAAA"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { ResultsServerContext, FetcherParams } from './types';
|
|
2
2
|
import { Hit } from '../types';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const resultsFetcher: (url: string, { q, page, apiKey, appId }: FetcherParams) => Promise<{
|
|
3
|
+
export declare const resultsFetcher: (url: string, { q, page, apiKey, appId }: FetcherParams, hitsPerPage: number) => Promise<{
|
|
5
4
|
hits: Hit[];
|
|
6
5
|
nbPages: number;
|
|
7
6
|
}>;
|
|
8
|
-
declare const resultsProvider: (context: ResultsServerContext) => Promise<{
|
|
7
|
+
declare const resultsProvider: (context: ResultsServerContext, hitsPerPage?: number) => Promise<{
|
|
9
8
|
props: {
|
|
10
9
|
credentials: {
|
|
11
10
|
appId: string;
|
|
12
11
|
apiKey: string;
|
|
13
12
|
indexName: string;
|
|
14
13
|
};
|
|
14
|
+
hitsPerPage: number;
|
|
15
15
|
};
|
|
16
16
|
} | {
|
|
17
17
|
props: {
|
|
@@ -20,6 +20,7 @@ declare const resultsProvider: (context: ResultsServerContext) => Promise<{
|
|
|
20
20
|
apiKey: string;
|
|
21
21
|
indexName: string;
|
|
22
22
|
};
|
|
23
|
+
hitsPerPage: number;
|
|
23
24
|
hits: Hit[];
|
|
24
25
|
};
|
|
25
26
|
}>;
|
|
@@ -50,13 +50,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
50
50
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
51
|
};
|
|
52
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
-
exports.resultsFetcher =
|
|
53
|
+
exports.resultsFetcher = void 0;
|
|
54
54
|
var cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
55
55
|
var config_1 = require("../../config");
|
|
56
56
|
var types_1 = require("./types");
|
|
57
57
|
var getHelpHubConfig_1 = require("./getHelpHubConfig");
|
|
58
|
-
|
|
59
|
-
var resultsFetcher = function (url, _a) {
|
|
58
|
+
var baseContext_1 = require("../context/baseContext");
|
|
59
|
+
var resultsFetcher = function (url, _a, hitsPerPage) {
|
|
60
60
|
var q = _a.q, page = _a.page, apiKey = _a.apiKey, appId = _a.appId;
|
|
61
61
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
62
62
|
var res;
|
|
@@ -70,7 +70,7 @@ var resultsFetcher = function (url, _a) {
|
|
|
70
70
|
'x-algolia-application-id': appId,
|
|
71
71
|
},
|
|
72
72
|
body: JSON.stringify({
|
|
73
|
-
params: "query=".concat(q, "&hitsPerPage=").concat(
|
|
73
|
+
params: "query=".concat(q, "&hitsPerPage=").concat(hitsPerPage, "&page=").concat(page),
|
|
74
74
|
}),
|
|
75
75
|
})];
|
|
76
76
|
case 1:
|
|
@@ -81,18 +81,21 @@ var resultsFetcher = function (url, _a) {
|
|
|
81
81
|
});
|
|
82
82
|
};
|
|
83
83
|
exports.resultsFetcher = resultsFetcher;
|
|
84
|
-
var resultsProvider = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
85
|
-
var q, credentials, promiseResult, providerProps;
|
|
84
|
+
var resultsProvider = function (context, hitsPerPage) { return __awaiter(void 0, void 0, void 0, function () {
|
|
85
|
+
var q, resultsPerPage, credentials, promiseResult, providerProps;
|
|
86
86
|
return __generator(this, function (_a) {
|
|
87
87
|
switch (_a.label) {
|
|
88
88
|
case 0:
|
|
89
89
|
q = context.query.q;
|
|
90
|
+
resultsPerPage = hitsPerPage || baseContext_1.HITS_PER_PAGE;
|
|
90
91
|
credentials = {
|
|
91
92
|
appId: config_1.algoliaAppId,
|
|
92
93
|
apiKey: config_1.algoliaApiKey,
|
|
93
94
|
indexName: config_1.algoliaIndex,
|
|
94
95
|
};
|
|
95
|
-
return [4 /*yield*/, (0, cross_fetch_1.default)("".concat(config_1.algoliaUrl, "/query"), __assign(__assign({}, (0, getHelpHubConfig_1.getHelpHubConfig)(types_1.ReqMethod.POST)), { body: JSON.stringify({
|
|
96
|
+
return [4 /*yield*/, (0, cross_fetch_1.default)("".concat(config_1.algoliaUrl, "/query"), __assign(__assign({}, (0, getHelpHubConfig_1.getHelpHubConfig)(types_1.ReqMethod.POST)), { body: JSON.stringify({
|
|
97
|
+
params: "query=".concat(q, "&hitsPerPage=").concat(resultsPerPage),
|
|
98
|
+
}) }))];
|
|
96
99
|
case 1:
|
|
97
100
|
promiseResult = _a.sent();
|
|
98
101
|
if (promiseResult.status >= 400) {
|
|
@@ -100,6 +103,7 @@ var resultsProvider = function (context) { return __awaiter(void 0, void 0, void
|
|
|
100
103
|
return [2 /*return*/, {
|
|
101
104
|
props: {
|
|
102
105
|
credentials: credentials,
|
|
106
|
+
hitsPerPage: resultsPerPage,
|
|
103
107
|
},
|
|
104
108
|
}];
|
|
105
109
|
}
|
|
@@ -107,7 +111,7 @@ var resultsProvider = function (context) { return __awaiter(void 0, void 0, void
|
|
|
107
111
|
case 2:
|
|
108
112
|
providerProps = (_a.sent());
|
|
109
113
|
return [2 /*return*/, {
|
|
110
|
-
props: __assign(__assign({}, providerProps), { credentials: credentials }),
|
|
114
|
+
props: __assign(__assign({}, providerProps), { credentials: credentials, hitsPerPage: resultsPerPage }),
|
|
111
115
|
}];
|
|
112
116
|
}
|
|
113
117
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resultsProvider.js","sourceRoot":"","sources":["../../../../src/help-hub/provider/resultsProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAA+B;AAC/B,uCAKqB;AAErB,iCAKgB;AAChB,uDAAqD;
|
|
1
|
+
{"version":3,"file":"resultsProvider.js","sourceRoot":"","sources":["../../../../src/help-hub/provider/resultsProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAA+B;AAC/B,uCAKqB;AAErB,iCAKgB;AAChB,uDAAqD;AAErD,sDAAsD;AAE/C,IAAM,cAAc,GAAG,UAC5B,GAAW,EACX,EAAyC,EACzC,WAAmB;QADjB,CAAC,OAAA,EAAE,IAAI,UAAA,EAAE,MAAM,YAAA,EAAE,KAAK,WAAA;;;;;wBAGZ,qBAAM,IAAA,qBAAK,EAAC,GAAG,EAAE;wBAC3B,MAAM,EAAE,MAAM;wBACd,OAAO,EAAE;4BACP,cAAc,EAAE,kBAAkB;4BAClC,mBAAmB,EAAE,MAAM;4BAC3B,0BAA0B,EAAE,KAAK;yBAClC;wBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;4BACnB,MAAM,EAAE,gBAAS,CAAC,0BAAgB,WAAW,mBAAS,IAAI,CAAE;yBAC7D,CAAC;qBACH,CAAC,EAAA;;oBAVI,GAAG,GAAG,SAUV;oBACF,sBAAO,GAAG,CAAC,IAAI,EAAE,EAAA;;;;CAClB,CAAA;AAjBY,QAAA,cAAc,kBAiB1B;AAED,IAAM,eAAe,GAAG,UACtB,OAA6B,EAC7B,WAAoB;;;;;gBAGT,CAAC,GACR,OAAO,QADC,CACD;gBAEL,cAAc,GAAG,WAAW,IAAI,2BAAa,CAAA;gBAE7C,WAAW,GAAG;oBAClB,KAAK,EAAE,qBAAY;oBACnB,MAAM,EAAE,sBAAa;oBACrB,SAAS,EAAE,qBAAY;iBACxB,CAAA;gBAEqB,qBAAM,IAAA,qBAAK,EAAC,UAAG,mBAAU,WAAQ,wBAClD,IAAA,mCAAgB,EAAC,iBAAS,CAAC,IAAI,CAAC,KACnC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;4BACnB,MAAM,EAAE,gBAAS,CAAC,0BAAgB,cAAc,CAAE;yBACnD,CAAC,IACF,EAAA;;gBALI,aAAa,GAAG,SAKpB;gBAEF,IAAI,aAAa,CAAC,MAAM,IAAI,GAAG,EAAE;oBAC/B,OAAO,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAA;oBACxD,sBAAO;4BACL,KAAK,EAAE;gCACL,WAAW,aAAA;gCACX,WAAW,EAAE,cAAc;6BAC5B;yBACF,EAAA;iBACF;gBACsB,qBAAM,aAAa,CAAC,IAAI,EAAE,EAAA;;gBAA3C,aAAa,GAAG,CAAC,SAA0B,CAAyB;gBAE1E,sBAAO;wBACL,KAAK,wBACA,aAAa,KAChB,WAAW,aAAA,EACX,WAAW,EAAE,cAAc,GAC5B;qBACF,EAAA;;;KACF,CAAA;AAED,kBAAe,eAAe,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseContext.js","sourceRoot":"","sources":["../../../../src/help-hub/context/baseContext.tsx"],"names":[],"mappings":"AAEA,0BAA0B;AAC1B,MAAM,CAAC,IAAM,WAAW,GAAuB;IAC7C,OAAO,EAAE,WAAW;IACpB,GAAG,EAAE;QACH,KAA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,gBAAgB,EAAE,gBAAgB;YAClC,OAAO,EAAE;gBACP,EAAE,EAAE,WAAW;gBACf,EAAE,EAAE,WAAW;aAChB;SACF;KACF;CACF,CAAA"}
|
|
1
|
+
{"version":3,"file":"baseContext.js","sourceRoot":"","sources":["../../../../src/help-hub/context/baseContext.tsx"],"names":[],"mappings":"AAEA,0BAA0B;AAC1B,MAAM,CAAC,IAAM,WAAW,GAAuB;IAC7C,OAAO,EAAE,WAAW;IACpB,GAAG,EAAE;QACH,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,EAAE;QACf,GAAG,EAAE,EAAE;QACP,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE,EAAE;KACb;IACD,iBAAiB,EAAE;QACjB,GAAG,EAAE;YACH;gBACE,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,IAAI;gBACV,SAAS,EAAE,kBAAkB;aAC9B;YACD;gBACE,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,IAAI;gBACV,SAAS,EAAE,kBAAkB;aAC9B;YACD;gBACE,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,IAAI;gBACV,SAAS,EAAE,oBAAoB;aAChC;SACF;KACF;IACD,MAAM,EAAE;QACN,iBAAiB,EAAE;YACjB,gBAAgB,EAAE;gBAChB,EAAE,EAAE,iBAAiB;gBACrB,EAAE,EAAE,iBAAiB;aACtB;YACD,WAAW,EAAE,aAAa;YAC1B,UAAU,EAAE,UAAU;SACvB;QACD,KAAK,EAAE,EAAE;QACT,cAAc,EAAE;YACd,gBAAgB,EAAE,EAAE,EAAE,EAAE,mBAAmB,EAAE,EAAE,EAAE,mBAAmB,EAAE;YACtE,WAAW,EAAE,aAAa;YAC1B,UAAU,EAAE,UAAU;YACtB,EAAE,EAAE,IAAI;SACT;QACD,WAAW,EAAE,EAAE;QACf,oBAAoB,EAAE;YACpB,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E,kBAAkB;YAC/B,gBAAgB,EAAE,kBAAkB;SACrC;QACD,aAAa,EAAE;YACb,UAAU,EAAE,UAAU;YACtB,eAAe,EAAE,cAAc;YAC/B,cAAc,EAAE,cAAc;YAC9B,iBAAiB,EAAE,cAAc;YACjC,OAAO,EAAE;gBACP,EAAE,EAAE,WAAW;gBACf,EAAE,EAAE,WAAW;aAChB;SACF;QACD,kBAAkB,EAAE;YAClB,UAAU,EAAE,UAAU;YACtB,WAAW,EAAE,WAAW;YACxB,gBAAgB,EAAE,gBAAgB;YAClC,OAAO,EAAE;gBACP,EAAE,EAAE,WAAW;gBACf,EAAE,EAAE,WAAW;aAChB;SACF;KACF;CACF,CAAA;AAED,MAAM,CAAC,IAAM,aAAa,GAAG,EAAE,CAAA"}
|
|
@@ -41,4 +41,111 @@ export var algoliaDataMock = [
|
|
|
41
41
|
objectID: 'how-many-articles-can-i-read-with-my-registered-access',
|
|
42
42
|
},
|
|
43
43
|
];
|
|
44
|
+
export var algoliaDataLargeMock = [
|
|
45
|
+
{
|
|
46
|
+
title: "What's in the smartphone app and how do I access it?",
|
|
47
|
+
content: '<ul><li>Enjoy The Times and The Sunday Times journalism wherever you are with one app, 7 days a week.</li><li>Get the latest global, business, politics, sport and finance headline news articles on the go as well as trusted analysis and opinion from our award-winning columnists and global correspondents.</li><li>On top of that, enjoy stunning picture galleries, interactive crossword puzzles and exclusive video dispatches from Great Britain and across the world. Now with a seamless link to The Times and Sunday Times Sport app.</li><li>Keep updated on all your Times+ membership offers and experience a selection of the best Times+ Talks right from within the app. </li><li>You can save your favourite articles for reading later and share your favourite stories from our Times & Sunday Times columnists from across all sections including headline news reports, UK and global business, finance, world, sport reports, politics and opinion.</li></ul>\n<br>The app is available from the <a href="https://play.google.com/store/apps/details?id=uk.co.thetimes" target="_blank">Google Play Store</a> and <a href="https://itunes.apple.com/gb/app/the-times-the-sunday-times/id436792321?mt=8" target="_blank">iTunes</a><br>Please ensure that you are using the latest Android or IOS software when downloading the app.',
|
|
48
|
+
objectID: 'what-s-in-the-smartphone-app-and-how-do-i-access-it',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
title: 'Sign-in with Google',
|
|
52
|
+
content: '<p>To use Google Sign In with The Times and Sunday Times, you must have a Google account. If you don’t have a Google account but would like to use this feature, you can easily create one at google.com<br><br><b>I see an error telling me I don’t have an account with The Times when login in to My Times account with Google Sign in?</b></p>\n\n<ul><li>\n\t<p>On first use of Google Sign In, your Times username must match the email address on your Google account, otherwise we cannot match them. If you would like to use Google Sign In but your email address does not match, you can log in using your Times email address and password and update your email address in My Account.</p>\n\t</li></ul>\n\n<p><b>Can I change my Times email address after I use Google Sign In?</b></p>\n\n<ul><li>\n\t<p>First time you sign into your Times account your login email address needs to be the same as your Google account email address. Once logged in you can update this via My Account.</p>\n\t</li></ul>\n\n<p><b>Can I still login with my own Times username and password after I use Google Sign In?</b></p>\n\n<ul><li>\n\t<p>As an existing Times user, you continue to have the ability to login using your Times username and password. You will as such retain the ability to change your password at any time.</p>\n\t</li></ul>',
|
|
53
|
+
objectID: 'sign-with-google',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
title: 'I am trying to share an article via Google+ but an error message keeps appearing',
|
|
57
|
+
content: 'This may be happening because there's an authentication issue with your Google+ account. To fix this, delete The Times and The Sunday Times app and then reinstall it. ',
|
|
58
|
+
objectID: 'i-am-trying-to-share-an-article-via-google-but-an-error-message-keeps-appearing',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
title: 'How will I find out if I have won a competition?',
|
|
62
|
+
content: 'Our competitions team contact the winners of our competitions via the phone number on your Times account.<br><br>If you don’t answer they will endeavor to contact you via email, giving you plenty of time to respond before finding a new winner.',
|
|
63
|
+
objectID: 'how-will-i-find-out-if-i-have-won-a-competition',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
title: 'How many articles can I read with my registered access?',
|
|
67
|
+
content: 'You can read up to two articles a week, Monday to Sunday. Every Monday your allocation will be reset to two articles. An article is a whole photo gallery, story or a piece of video content.',
|
|
68
|
+
objectID: 'how-many-articles-can-i-read-with-my-registered-access',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
title: "What's in the smartphone app and how do I access it?",
|
|
72
|
+
content: '<ul><li>Enjoy The Times and The Sunday Times journalism wherever you are with one app, 7 days a week.</li><li>Get the latest global, business, politics, sport and finance headline news articles on the go as well as trusted analysis and opinion from our award-winning columnists and global correspondents.</li><li>On top of that, enjoy stunning picture galleries, interactive crossword puzzles and exclusive video dispatches from Great Britain and across the world. Now with a seamless link to The Times and Sunday Times Sport app.</li><li>Keep updated on all your Times+ membership offers and experience a selection of the best Times+ Talks right from within the app. </li><li>You can save your favourite articles for reading later and share your favourite stories from our Times & Sunday Times columnists from across all sections including headline news reports, UK and global business, finance, world, sport reports, politics and opinion.</li></ul>\n<br>The app is available from the <a href="https://play.google.com/store/apps/details?id=uk.co.thetimes" target="_blank">Google Play Store</a> and <a href="https://itunes.apple.com/gb/app/the-times-the-sunday-times/id436792321?mt=8" target="_blank">iTunes</a><br>Please ensure that you are using the latest Android or IOS software when downloading the app.',
|
|
73
|
+
objectID: 'what-s-in-the-smartphone-app-and-how-do-i-access-it-2',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: 'Sign-in with Google',
|
|
77
|
+
content: '<p>To use Google Sign In with The Times and Sunday Times, you must have a Google account. If you don’t have a Google account but would like to use this feature, you can easily create one at google.com<br><br><b>I see an error telling me I don’t have an account with The Times when login in to My Times account with Google Sign in?</b></p>\n\n<ul><li>\n\t<p>On first use of Google Sign In, your Times username must match the email address on your Google account, otherwise we cannot match them. If you would like to use Google Sign In but your email address does not match, you can log in using your Times email address and password and update your email address in My Account.</p>\n\t</li></ul>\n\n<p><b>Can I change my Times email address after I use Google Sign In?</b></p>\n\n<ul><li>\n\t<p>First time you sign into your Times account your login email address needs to be the same as your Google account email address. Once logged in you can update this via My Account.</p>\n\t</li></ul>\n\n<p><b>Can I still login with my own Times username and password after I use Google Sign In?</b></p>\n\n<ul><li>\n\t<p>As an existing Times user, you continue to have the ability to login using your Times username and password. You will as such retain the ability to change your password at any time.</p>\n\t</li></ul>',
|
|
78
|
+
objectID: 'sign-with-google-2',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
title: 'I am trying to share an article via Google+ but an error message keeps appearing',
|
|
82
|
+
content: 'This may be happening because there's an authentication issue with your Google+ account. To fix this, delete The Times and The Sunday Times app and then reinstall it. ',
|
|
83
|
+
objectID: 'i-am-trying-to-share-an-article-via-google-but-an-error-message-keeps-appearing-2',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
title: 'How will I find out if I have won a competition?',
|
|
87
|
+
content: 'Our competitions team contact the winners of our competitions via the phone number on your Times account.<br><br>If you don’t answer they will endeavor to contact you via email, giving you plenty of time to respond before finding a new winner.',
|
|
88
|
+
objectID: 'how-will-i-find-out-if-i-have-won-a-competition-2',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: 'How many articles can I read with my registered access?',
|
|
92
|
+
content: 'You can read up to two articles a week, Monday to Sunday. Every Monday your allocation will be reset to two articles. An article is a whole photo gallery, story or a piece of video content.',
|
|
93
|
+
objectID: 'how-many-articles-can-i-read-with-my-registered-access-2',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
title: "What's in the smartphone app and how do I access it?",
|
|
97
|
+
content: '<ul><li>Enjoy The Times and The Sunday Times journalism wherever you are with one app, 7 days a week.</li><li>Get the latest global, business, politics, sport and finance headline news articles on the go as well as trusted analysis and opinion from our award-winning columnists and global correspondents.</li><li>On top of that, enjoy stunning picture galleries, interactive crossword puzzles and exclusive video dispatches from Great Britain and across the world. Now with a seamless link to The Times and Sunday Times Sport app.</li><li>Keep updated on all your Times+ membership offers and experience a selection of the best Times+ Talks right from within the app. </li><li>You can save your favourite articles for reading later and share your favourite stories from our Times & Sunday Times columnists from across all sections including headline news reports, UK and global business, finance, world, sport reports, politics and opinion.</li></ul>\n<br>The app is available from the <a href="https://play.google.com/store/apps/details?id=uk.co.thetimes" target="_blank">Google Play Store</a> and <a href="https://itunes.apple.com/gb/app/the-times-the-sunday-times/id436792321?mt=8" target="_blank">iTunes</a><br>Please ensure that you are using the latest Android or IOS software when downloading the app.',
|
|
98
|
+
objectID: 'what-s-in-the-smartphone-app-and-how-do-i-access-it-3',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
title: 'Sign-in with Google',
|
|
102
|
+
content: '<p>To use Google Sign In with The Times and Sunday Times, you must have a Google account. If you don’t have a Google account but would like to use this feature, you can easily create one at google.com<br><br><b>I see an error telling me I don’t have an account with The Times when login in to My Times account with Google Sign in?</b></p>\n\n<ul><li>\n\t<p>On first use of Google Sign In, your Times username must match the email address on your Google account, otherwise we cannot match them. If you would like to use Google Sign In but your email address does not match, you can log in using your Times email address and password and update your email address in My Account.</p>\n\t</li></ul>\n\n<p><b>Can I change my Times email address after I use Google Sign In?</b></p>\n\n<ul><li>\n\t<p>First time you sign into your Times account your login email address needs to be the same as your Google account email address. Once logged in you can update this via My Account.</p>\n\t</li></ul>\n\n<p><b>Can I still login with my own Times username and password after I use Google Sign In?</b></p>\n\n<ul><li>\n\t<p>As an existing Times user, you continue to have the ability to login using your Times username and password. You will as such retain the ability to change your password at any time.</p>\n\t</li></ul>',
|
|
103
|
+
objectID: 'sign-with-google-3',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
title: 'I am trying to share an article via Google+ but an error message keeps appearing',
|
|
107
|
+
content: 'This may be happening because there's an authentication issue with your Google+ account. To fix this, delete The Times and The Sunday Times app and then reinstall it. ',
|
|
108
|
+
objectID: 'i-am-trying-to-share-an-article-via-google-but-an-error-message-keeps-appearing-3',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
title: 'How will I find out if I have won a competition?',
|
|
112
|
+
content: 'Our competitions team contact the winners of our competitions via the phone number on your Times account.<br><br>If you don’t answer they will endeavor to contact you via email, giving you plenty of time to respond before finding a new winner.',
|
|
113
|
+
objectID: 'how-will-i-find-out-if-i-have-won-a-competition-3',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
title: 'How many articles can I read with my registered access?',
|
|
117
|
+
content: 'You can read up to two articles a week, Monday to Sunday. Every Monday your allocation will be reset to two articles. An article is a whole photo gallery, story or a piece of video content.',
|
|
118
|
+
objectID: 'how-many-articles-can-i-read-with-my-registered-access-3',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
title: "What's in the smartphone app and how do I access it?",
|
|
122
|
+
content: '<ul><li>Enjoy The Times and The Sunday Times journalism wherever you are with one app, 7 days a week.</li><li>Get the latest global, business, politics, sport and finance headline news articles on the go as well as trusted analysis and opinion from our award-winning columnists and global correspondents.</li><li>On top of that, enjoy stunning picture galleries, interactive crossword puzzles and exclusive video dispatches from Great Britain and across the world. Now with a seamless link to The Times and Sunday Times Sport app.</li><li>Keep updated on all your Times+ membership offers and experience a selection of the best Times+ Talks right from within the app. </li><li>You can save your favourite articles for reading later and share your favourite stories from our Times & Sunday Times columnists from across all sections including headline news reports, UK and global business, finance, world, sport reports, politics and opinion.</li></ul>\n<br>The app is available from the <a href="https://play.google.com/store/apps/details?id=uk.co.thetimes" target="_blank">Google Play Store</a> and <a href="https://itunes.apple.com/gb/app/the-times-the-sunday-times/id436792321?mt=8" target="_blank">iTunes</a><br>Please ensure that you are using the latest Android or IOS software when downloading the app.',
|
|
123
|
+
objectID: 'what-s-in-the-smartphone-app-and-how-do-i-access-it-4',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
title: 'Sign-in with Google',
|
|
127
|
+
content: '<p>To use Google Sign In with The Times and Sunday Times, you must have a Google account. If you don’t have a Google account but would like to use this feature, you can easily create one at google.com<br><br><b>I see an error telling me I don’t have an account with The Times when login in to My Times account with Google Sign in?</b></p>\n\n<ul><li>\n\t<p>On first use of Google Sign In, your Times username must match the email address on your Google account, otherwise we cannot match them. If you would like to use Google Sign In but your email address does not match, you can log in using your Times email address and password and update your email address in My Account.</p>\n\t</li></ul>\n\n<p><b>Can I change my Times email address after I use Google Sign In?</b></p>\n\n<ul><li>\n\t<p>First time you sign into your Times account your login email address needs to be the same as your Google account email address. Once logged in you can update this via My Account.</p>\n\t</li></ul>\n\n<p><b>Can I still login with my own Times username and password after I use Google Sign In?</b></p>\n\n<ul><li>\n\t<p>As an existing Times user, you continue to have the ability to login using your Times username and password. You will as such retain the ability to change your password at any time.</p>\n\t</li></ul>',
|
|
128
|
+
objectID: 'sign-with-google-4',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
title: 'I am trying to share an article via Google+ but an error message keeps appearing',
|
|
132
|
+
content: 'This may be happening because there's an authentication issue with your Google+ account. To fix this, delete The Times and The Sunday Times app and then reinstall it. ',
|
|
133
|
+
objectID: 'i-am-trying-to-share-an-article-via-google-but-an-error-message-keeps-appearing-4',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
title: 'How will I find out if I have won a competition?',
|
|
137
|
+
content: 'Our competitions team contact the winners of our competitions via the phone number on your Times account.<br><br>If you don’t answer they will endeavor to contact you via email, giving you plenty of time to respond before finding a new winner.',
|
|
138
|
+
objectID: 'how-will-i-find-out-if-i-have-won-a-competition-4',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
title: 'How many articles can I read with my registered access?',
|
|
142
|
+
content: 'You can read up to two articles a week, Monday to Sunday. Every Monday your allocation will be reset to two articles. An article is a whole photo gallery, story or a piece of video content.',
|
|
143
|
+
objectID: 'how-many-articles-can-i-read-with-my-registered-access-4',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
title: 'How many articles can I read with my registered access?',
|
|
147
|
+
content: 'You can read up to two articles a week, Monday to Sunday. Every Monday your allocation will be reset to two articles. An article is a whole photo gallery, story or a piece of video content.',
|
|
148
|
+
objectID: 'how-many-articles-can-i-read-with-my-registered-access-5',
|
|
149
|
+
},
|
|
150
|
+
];
|
|
44
151
|
//# sourceMappingURL=sharedMocks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedMocks.js","sourceRoot":"","sources":["../../../../src/help-hub/mocks/sharedMocks.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,oBAAoB,GAAG;IAClC;QACE,EAAE,EAAE,oBAAoB;QACxB,KAAK,EAAE,mDAAmD;QAC1D,OAAO,EACL,6PAA6P;QAC/P,kBAAkB,EAAE,8BAA8B;QAClD,QAAQ,EAAE,+CAA+C;KAC1D;IACD;QACE,EAAE,EAAE,oBAAoB;QACxB,KAAK,EAAE,yCAAyC;QAChD,OAAO,EACL,6PAA6P;QAC/P,kBAAkB,EAAE,8BAA8B;QAClD,QAAQ,EAAE,+CAA+C;KAC1D;CACF,CAAA;AAED,MAAM,CAAC,IAAM,eAAe,GAAG;IAC7B;QACE,KAAK,EAAE,sDAAsD;QAC7D,OAAO,EACL,kyCAAkyC;QACpyC,QAAQ,EAAE,qDAAqD;KAChE;IACD;QACE,KAAK,EAAE,qBAAqB;QAC5B,OAAO,EACL,kyCAAkyC;QACpyC,QAAQ,EAAE,kBAAkB;KAC7B;IACD;QACE,KAAK,EACH,kFAAkF;QACpF,OAAO,EACL,6KAA6K;QAC/K,QAAQ,EACN,iFAAiF;KACpF;IACD;QACE,KAAK,EAAE,kDAAkD;QACzD,OAAO,EACL,qPAAqP;QACvP,QAAQ,EAAE,iDAAiD;KAC5D;IACD;QACE,KAAK,EAAE,yDAAyD;QAChE,OAAO,EACL,+LAA+L;QACjM,QAAQ,EAAE,wDAAwD;KACnE;CACF,CAAA"}
|
|
1
|
+
{"version":3,"file":"sharedMocks.js","sourceRoot":"","sources":["../../../../src/help-hub/mocks/sharedMocks.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,oBAAoB,GAAG;IAClC;QACE,EAAE,EAAE,oBAAoB;QACxB,KAAK,EAAE,mDAAmD;QAC1D,OAAO,EACL,6PAA6P;QAC/P,kBAAkB,EAAE,8BAA8B;QAClD,Q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ACD;QACE,KAAK,EAAE,yDAAyD;QAChE,OAAO,EACL,+LAA+L;QACjM,QAAQ,EAAE,0DAA0D;KACrE;IACD;QACE,KAAK,EAAE,yDAAyD;QAChE,OAAO,EACL,+LAA+L;QACjM,QAAQ,EAAE,0DAA0D;KACrE;CACF,CAAA"}
|
|
@@ -27,10 +27,11 @@ import { SearchBar } from '../components/SearchBar';
|
|
|
27
27
|
import { PagesNameMap } from '../context/types';
|
|
28
28
|
import { useHelpHubContext } from '../context';
|
|
29
29
|
import useSWR from 'swr';
|
|
30
|
-
import {
|
|
30
|
+
import { resultsFetcher } from '../provider/resultsProvider';
|
|
31
31
|
import { CredentialsContextProvider, useCredentialsContext } from '../context';
|
|
32
32
|
import { useRouter } from 'next/router';
|
|
33
33
|
import { transformHits } from '../helpers';
|
|
34
|
+
import { HITS_PER_PAGE } from '../context/baseContext';
|
|
34
35
|
export var resultsPageContext = {
|
|
35
36
|
introductionProps: {
|
|
36
37
|
title: 'Search results',
|
|
@@ -50,19 +51,22 @@ export var resultsPageContext = {
|
|
|
50
51
|
stylePreset: '',
|
|
51
52
|
showDividerByBreakpoint: true,
|
|
52
53
|
};
|
|
53
|
-
var PageContent = function () {
|
|
54
|
-
var
|
|
55
|
-
var _b =
|
|
56
|
-
var _c = useState(
|
|
57
|
-
var _d = useState(
|
|
58
|
-
var _e =
|
|
54
|
+
var PageContent = function (_a) {
|
|
55
|
+
var hitsPerPage = _a.hitsPerPage;
|
|
56
|
+
var _b = useHelpHubContext(PagesNameMap.resultsPage), introductionProps = _b.introductionProps, inputPlaceholder = _b.inputPlaceholder, searchBar = _b.searchBar, baseUrl = _b.baseUrl, searchResultEmpty = _b.searchResultEmpty, hits = _b.hits, showDividerByBreakpoint = _b.showDividerByBreakpoint, stylePreset = _b.stylePreset;
|
|
57
|
+
var _c = useState(0), page = _c[0], setPage = _c[1];
|
|
58
|
+
var _d = useState(2), nbPages = _d[0], setNbPages = _d[1];
|
|
59
|
+
var _e = useState(hits), allHits = _e[0], setAllHits = _e[1];
|
|
60
|
+
var _f = useCredentialsContext(), appId = _f.appId, apiKey = _f.apiKey, indexName = _f.indexName;
|
|
59
61
|
var router = useRouter();
|
|
60
62
|
var q = router.query.q;
|
|
61
63
|
var hasQueryParam = q && q.length !== 0;
|
|
64
|
+
var resultsPerPage = hitsPerPage || HITS_PER_PAGE;
|
|
62
65
|
useSWR(page > 0
|
|
63
66
|
? [
|
|
64
67
|
"https://".concat(appId, ".algolia.net/1/indexes/").concat(indexName, "/query"),
|
|
65
68
|
{ q: q, page: page, apiKey: apiKey, appId: appId },
|
|
69
|
+
resultsPerPage,
|
|
66
70
|
]
|
|
67
71
|
: null, resultsFetcher, {
|
|
68
72
|
onSuccess: function (data) {
|
|
@@ -78,7 +82,7 @@ var PageContent = function () {
|
|
|
78
82
|
var newDescription = description
|
|
79
83
|
.replace('##QUERY##', "".concat(q))
|
|
80
84
|
.replace('##COUNT##', "".concat(allHits.length.toString()));
|
|
81
|
-
var isLoadMoreVisible = page < nbPages - 1 && allHits.length >=
|
|
85
|
+
var isLoadMoreVisible = page < nbPages - 1 && allHits.length >= resultsPerPage;
|
|
82
86
|
var regex = "".concat(q, "|").concat(allHits.length.toString());
|
|
83
87
|
return hasQueryParam ? (React.createElement(React.Fragment, null,
|
|
84
88
|
React.createElement(SearchBar, { placeholder: inputPlaceholder, baseUrl: baseUrl }),
|
|
@@ -112,11 +116,11 @@ var PageContent = function () {
|
|
|
112
116
|
React.createElement(Introduction, { title: searchResultEmpty })));
|
|
113
117
|
};
|
|
114
118
|
export var ResultsPage = function (_a) {
|
|
115
|
-
var context = _a.context, customTheme = _a.customTheme, themeDropdownObject = _a.themeDropdownObject, credentials = _a.credentials, hits = _a.hits;
|
|
119
|
+
var context = _a.context, customTheme = _a.customTheme, themeDropdownObject = _a.themeDropdownObject, credentials = _a.credentials, hits = _a.hits, hitsPerPage = _a.hitsPerPage;
|
|
116
120
|
var enhancedContext = __assign({}, assign({}, resultsPageContext, { hits: hits }, context));
|
|
117
121
|
return (React.createElement(CredentialsContextProvider, { credentials: credentials },
|
|
118
122
|
React.createElement(Layout, { context: enhancedContext, contextName: PagesNameMap.resultsPage, customTheme: customTheme, themeDropdownObject: themeDropdownObject, topSpaceStack: { xs: 'space045', md: 'space070' } },
|
|
119
|
-
React.createElement(PageContent,
|
|
123
|
+
React.createElement(PageContent, { hitsPerPage: hitsPerPage }))));
|
|
120
124
|
};
|
|
121
125
|
export default ResultsPage;
|
|
122
126
|
//# sourceMappingURL=ResultsPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultsPage.js","sourceRoot":"","sources":["../../../../src/help-hub/pages/ResultsPage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,MAAM,MAAM,eAAe,CAAA;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACnD,OAAO,EACL,YAAY,EACZ,eAAe,EACf,QAAQ,GACT,MAAM,mCAAmC,CAAA;AAC1C,OAAO,MAAM,MAAM,yBAAyB,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAEnD,OAAO,EAAE,YAAY,EAA6B,MAAM,kBAAkB,CAAA;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,MAAM,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ResultsPage.js","sourceRoot":"","sources":["../../../../src/help-hub/pages/ResultsPage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,MAAM,MAAM,eAAe,CAAA;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MA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EACxB,mBAAmB,EAAE,mBAAmB,EACxC,aAAa,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE;YAEjD,oBAAC,WAAW,IAAC,WAAW,EAAE,WAAW,GAAI,CAClC,CACkB,CAC9B,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { ResultsServerContext, FetcherParams } from './types';
|
|
2
2
|
import { Hit } from '../types';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const resultsFetcher: (url: string, { q, page, apiKey, appId }: FetcherParams) => Promise<{
|
|
3
|
+
export declare const resultsFetcher: (url: string, { q, page, apiKey, appId }: FetcherParams, hitsPerPage: number) => Promise<{
|
|
5
4
|
hits: Hit[];
|
|
6
5
|
nbPages: number;
|
|
7
6
|
}>;
|
|
8
|
-
declare const resultsProvider: (context: ResultsServerContext) => Promise<{
|
|
7
|
+
declare const resultsProvider: (context: ResultsServerContext, hitsPerPage?: number) => Promise<{
|
|
9
8
|
props: {
|
|
10
9
|
credentials: {
|
|
11
10
|
appId: string;
|
|
12
11
|
apiKey: string;
|
|
13
12
|
indexName: string;
|
|
14
13
|
};
|
|
14
|
+
hitsPerPage: number;
|
|
15
15
|
};
|
|
16
16
|
} | {
|
|
17
17
|
props: {
|
|
@@ -20,6 +20,7 @@ declare const resultsProvider: (context: ResultsServerContext) => Promise<{
|
|
|
20
20
|
apiKey: string;
|
|
21
21
|
indexName: string;
|
|
22
22
|
};
|
|
23
|
+
hitsPerPage: number;
|
|
23
24
|
hits: Hit[];
|
|
24
25
|
};
|
|
25
26
|
}>;
|
|
@@ -49,8 +49,8 @@ import fetch from 'cross-fetch';
|
|
|
49
49
|
import { algoliaAppId, algoliaApiKey, algoliaIndex, algoliaUrl, } from '../../config';
|
|
50
50
|
import { ReqMethod, } from './types';
|
|
51
51
|
import { getHelpHubConfig } from './getHelpHubConfig';
|
|
52
|
-
|
|
53
|
-
export var resultsFetcher = function (url, _a) {
|
|
52
|
+
import { HITS_PER_PAGE } from '../context/baseContext';
|
|
53
|
+
export var resultsFetcher = function (url, _a, hitsPerPage) {
|
|
54
54
|
var q = _a.q, page = _a.page, apiKey = _a.apiKey, appId = _a.appId;
|
|
55
55
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
56
56
|
var res;
|
|
@@ -64,7 +64,7 @@ export var resultsFetcher = function (url, _a) {
|
|
|
64
64
|
'x-algolia-application-id': appId,
|
|
65
65
|
},
|
|
66
66
|
body: JSON.stringify({
|
|
67
|
-
params: "query=".concat(q, "&hitsPerPage=").concat(
|
|
67
|
+
params: "query=".concat(q, "&hitsPerPage=").concat(hitsPerPage, "&page=").concat(page),
|
|
68
68
|
}),
|
|
69
69
|
})];
|
|
70
70
|
case 1:
|
|
@@ -74,18 +74,21 @@ export var resultsFetcher = function (url, _a) {
|
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
76
|
};
|
|
77
|
-
var resultsProvider = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
78
|
-
var q, credentials, promiseResult, providerProps;
|
|
77
|
+
var resultsProvider = function (context, hitsPerPage) { return __awaiter(void 0, void 0, void 0, function () {
|
|
78
|
+
var q, resultsPerPage, credentials, promiseResult, providerProps;
|
|
79
79
|
return __generator(this, function (_a) {
|
|
80
80
|
switch (_a.label) {
|
|
81
81
|
case 0:
|
|
82
82
|
q = context.query.q;
|
|
83
|
+
resultsPerPage = hitsPerPage || HITS_PER_PAGE;
|
|
83
84
|
credentials = {
|
|
84
85
|
appId: algoliaAppId,
|
|
85
86
|
apiKey: algoliaApiKey,
|
|
86
87
|
indexName: algoliaIndex,
|
|
87
88
|
};
|
|
88
|
-
return [4 /*yield*/, fetch("".concat(algoliaUrl, "/query"), __assign(__assign({}, getHelpHubConfig(ReqMethod.POST)), { body: JSON.stringify({
|
|
89
|
+
return [4 /*yield*/, fetch("".concat(algoliaUrl, "/query"), __assign(__assign({}, getHelpHubConfig(ReqMethod.POST)), { body: JSON.stringify({
|
|
90
|
+
params: "query=".concat(q, "&hitsPerPage=").concat(resultsPerPage),
|
|
91
|
+
}) }))];
|
|
89
92
|
case 1:
|
|
90
93
|
promiseResult = _a.sent();
|
|
91
94
|
if (promiseResult.status >= 400) {
|
|
@@ -93,6 +96,7 @@ var resultsProvider = function (context) { return __awaiter(void 0, void 0, void
|
|
|
93
96
|
return [2 /*return*/, {
|
|
94
97
|
props: {
|
|
95
98
|
credentials: credentials,
|
|
99
|
+
hitsPerPage: resultsPerPage,
|
|
96
100
|
},
|
|
97
101
|
}];
|
|
98
102
|
}
|
|
@@ -100,7 +104,7 @@ var resultsProvider = function (context) { return __awaiter(void 0, void 0, void
|
|
|
100
104
|
case 2:
|
|
101
105
|
providerProps = (_a.sent());
|
|
102
106
|
return [2 /*return*/, {
|
|
103
|
-
props: __assign(__assign({}, providerProps), { credentials: credentials }),
|
|
107
|
+
props: __assign(__assign({}, providerProps), { credentials: credentials, hitsPerPage: resultsPerPage }),
|
|
104
108
|
}];
|
|
105
109
|
}
|
|
106
110
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resultsProvider.js","sourceRoot":"","sources":["../../../../src/help-hub/provider/resultsProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,aAAa,CAAA;AAC/B,OAAO,EACL,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,UAAU,GACX,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,SAAS,GAIV,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"resultsProvider.js","sourceRoot":"","sources":["../../../../src/help-hub/provider/resultsProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,aA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