@newskit-render/standalone-components 0.28.1 → 0.28.3-alpha.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 +192 -25
- package/dist/cjs/help-chat/Help.d.ts +5 -0
- package/dist/cjs/help-chat/Help.js +40 -0
- package/dist/cjs/help-chat/Help.js.map +1 -0
- package/dist/cjs/help-chat/chatHelpDefaultOverrides.d.ts +37 -0
- package/dist/cjs/help-chat/chatHelpDefaultOverrides.js +45 -0
- package/dist/cjs/help-chat/chatHelpDefaultOverrides.js.map +1 -0
- package/dist/cjs/help-chat/index.d.ts +2 -0
- package/dist/{help-hub/components/ContentListView → cjs/help-chat}/index.js +2 -1
- package/dist/cjs/help-chat/index.js.map +1 -0
- package/dist/cjs/help-chat/tests/Chat.stories.d.ts +5 -0
- package/dist/cjs/help-chat/tests/Chat.stories.js +53 -0
- package/dist/cjs/help-chat/tests/Chat.stories.js.map +1 -0
- package/dist/cjs/help-chat/types.d.ts +31 -0
- package/dist/{help-hub/components/SearchBar → cjs/help-chat}/types.js +0 -0
- package/dist/{help-hub/pages → cjs/help-chat}/types.js.map +1 -1
- package/dist/cjs/help-hub/context/index.d.ts +2 -1
- package/dist/cjs/help-hub/context/index.js +1 -1
- package/dist/cjs/help-hub/context/index.js.map +1 -1
- package/dist/cjs/help-hub/index.d.ts +2 -0
- package/dist/cjs/help-hub/index.js +3 -0
- package/dist/cjs/help-hub/index.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/{article-recommendations → esm/article-recommendations}/components/ArticleRecommendation.d.ts +0 -0
- package/dist/esm/article-recommendations/components/ArticleRecommendation.js +14 -0
- package/dist/esm/article-recommendations/components/ArticleRecommendation.js.map +1 -0
- package/dist/{article-recommendations → esm/article-recommendations}/components/ArticleRecommendationLarge.d.ts +0 -0
- package/dist/esm/article-recommendations/components/ArticleRecommendationLarge.js +34 -0
- package/dist/esm/article-recommendations/components/ArticleRecommendationLarge.js.map +1 -0
- package/dist/{article-recommendations → esm/article-recommendations}/components/ArticleRecommendationSmall.d.ts +0 -0
- package/dist/esm/article-recommendations/components/ArticleRecommendationSmall.js +19 -0
- package/dist/esm/article-recommendations/components/ArticleRecommendationSmall.js.map +1 -0
- package/dist/{article-recommendations → esm/article-recommendations}/components/baseProps.d.ts +0 -0
- package/dist/{article-recommendations → esm/article-recommendations}/components/baseProps.js +1 -4
- package/dist/esm/article-recommendations/components/baseProps.js.map +1 -0
- package/dist/{article-recommendations → esm/article-recommendations}/components/index.d.ts +0 -0
- package/dist/esm/article-recommendations/components/index.js +4 -0
- package/dist/esm/article-recommendations/components/index.js.map +1 -0
- package/dist/{article-recommendations → esm/article-recommendations}/index.d.ts +0 -0
- package/dist/esm/article-recommendations/index.js +4 -0
- package/dist/esm/article-recommendations/index.js.map +1 -0
- package/dist/{article-recommendations → esm/article-recommendations}/provider/index.d.ts +0 -0
- package/dist/esm/article-recommendations/provider/index.js +2 -0
- package/dist/esm/article-recommendations/provider/index.js.map +1 -0
- package/dist/{article-recommendations → esm/article-recommendations}/provider/queries/getRecommendationsQuery.d.ts +0 -0
- package/dist/esm/article-recommendations/provider/queries/getRecommendationsQuery.js +8 -0
- package/dist/esm/article-recommendations/provider/queries/getRecommendationsQuery.js.map +1 -0
- package/dist/{article-recommendations → esm/article-recommendations}/provider/queries/index.d.ts +0 -0
- package/dist/esm/article-recommendations/provider/queries/index.js +2 -0
- package/dist/esm/article-recommendations/provider/queries/index.js.map +1 -0
- package/dist/{article-recommendations → esm/article-recommendations}/provider/recommendationsProvider.d.ts +0 -0
- package/dist/{article-recommendations → esm/article-recommendations}/provider/recommendationsProvider.js +5 -9
- package/dist/esm/article-recommendations/provider/recommendationsProvider.js.map +1 -0
- package/dist/{article-recommendations → esm/article-recommendations}/types/index.d.ts +0 -0
- package/dist/esm/article-recommendations/types/index.js +2 -0
- package/dist/esm/article-recommendations/types/index.js.map +1 -0
- package/dist/{config → esm/config}/index.d.ts +0 -0
- package/dist/{config → esm/config}/index.js +2 -5
- package/dist/{config → esm/config}/index.js.map +1 -1
- package/dist/esm/help-chat/Help.d.ts +5 -0
- package/dist/esm/help-chat/Help.js +33 -0
- package/dist/esm/help-chat/Help.js.map +1 -0
- package/dist/esm/help-chat/chatHelpDefaultOverrides.d.ts +37 -0
- package/dist/esm/help-chat/chatHelpDefaultOverrides.js +39 -0
- package/dist/esm/help-chat/chatHelpDefaultOverrides.js.map +1 -0
- package/dist/esm/help-chat/index.d.ts +2 -0
- package/dist/esm/help-chat/index.js +3 -0
- package/dist/esm/help-chat/index.js.map +1 -0
- package/dist/esm/help-chat/tests/Chat.stories.d.ts +5 -0
- package/dist/esm/help-chat/tests/Chat.stories.js +45 -0
- package/dist/esm/help-chat/tests/Chat.stories.js.map +1 -0
- package/dist/esm/help-chat/types.d.ts +31 -0
- package/dist/esm/help-chat/types.js +2 -0
- package/dist/esm/help-chat/types.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/components/ContentListView/ContentListView.d.ts +0 -0
- package/dist/esm/help-hub/components/ContentListView/ContentListView.js +41 -0
- package/dist/esm/help-hub/components/ContentListView/ContentListView.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/components/ContentListView/Introduction.d.ts +0 -0
- package/dist/esm/help-hub/components/ContentListView/Introduction.js +29 -0
- package/dist/esm/help-hub/components/ContentListView/Introduction.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/components/ContentListView/index.d.ts +0 -0
- package/dist/esm/help-hub/components/ContentListView/index.js +2 -0
- package/dist/esm/help-hub/components/ContentListView/index.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/components/SearchBar/SearchBar.d.ts +0 -0
- package/dist/esm/help-hub/components/SearchBar/SearchBar.js +18 -0
- package/dist/esm/help-hub/components/SearchBar/SearchBar.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/components/SearchBar/components/AlgoliaTheme.d.ts +0 -0
- package/dist/esm/help-hub/components/SearchBar/components/AlgoliaTheme.js +8 -0
- package/dist/esm/help-hub/components/SearchBar/components/AlgoliaTheme.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/components/SearchBar/components/Autocomplete.d.ts +0 -0
- package/dist/esm/help-hub/components/SearchBar/components/Autocomplete.js +136 -0
- package/dist/esm/help-hub/components/SearchBar/components/Autocomplete.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/components/SearchBar/components/Highlight.d.ts +0 -0
- package/dist/esm/help-hub/components/SearchBar/components/Highlight.js +14 -0
- package/dist/esm/help-hub/components/SearchBar/components/Highlight.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/components/SearchBar/index.d.ts +0 -0
- package/dist/esm/help-hub/components/SearchBar/index.js +2 -0
- package/dist/esm/help-hub/components/SearchBar/index.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/components/SearchBar/types.d.ts +0 -0
- package/dist/esm/help-hub/components/SearchBar/types.js +2 -0
- package/dist/esm/help-hub/components/SearchBar/types.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/components/Templates/LayoutTemplate.d.ts +0 -0
- package/dist/esm/help-hub/components/Templates/LayoutTemplate.js +66 -0
- package/dist/esm/help-hub/components/Templates/LayoutTemplate.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/components/Templates/index.d.ts +0 -0
- package/dist/esm/help-hub/components/Templates/index.js +4 -0
- package/dist/esm/help-hub/components/Templates/index.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/components/Templates/types.d.ts +0 -0
- package/dist/esm/help-hub/components/Templates/types.js +2 -0
- package/dist/esm/help-hub/components/Templates/types.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/context/baseContext.d.ts +0 -0
- package/dist/{help-hub → esm/help-hub}/context/baseContext.js +1 -4
- package/dist/esm/help-hub/context/baseContext.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/context/index.d.ts +2 -1
- package/dist/esm/help-hub/context/index.js +21 -0
- package/dist/esm/help-hub/context/index.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/context/types.d.ts +0 -0
- package/dist/esm/help-hub/context/types.js +7 -0
- package/dist/esm/help-hub/context/types.js.map +1 -0
- package/dist/esm/help-hub/index.d.ts +7 -0
- package/dist/{help-hub/index.d.ts → esm/help-hub/index.js} +2 -0
- package/dist/esm/help-hub/index.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/pages/ArticlePage.d.ts +0 -0
- package/dist/esm/help-hub/pages/ArticlePage.js +55 -0
- package/dist/esm/help-hub/pages/ArticlePage.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/pages/LandingPage.d.ts +0 -0
- package/dist/esm/help-hub/pages/LandingPage.js +80 -0
- package/dist/esm/help-hub/pages/LandingPage.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/pages/ResultsPage.d.ts +0 -0
- package/dist/esm/help-hub/pages/ResultsPage.js +64 -0
- package/dist/esm/help-hub/pages/ResultsPage.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/pages/types.d.ts +0 -0
- package/dist/esm/help-hub/pages/types.js +2 -0
- package/dist/esm/help-hub/pages/types.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/provider/CredentialsProvider.d.ts +0 -0
- package/dist/esm/help-hub/provider/CredentialsProvider.js +14 -0
- package/dist/esm/help-hub/provider/CredentialsProvider.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/provider/articleProvider.d.ts +0 -0
- package/dist/{help-hub → esm/help-hub}/provider/articleProvider.js +9 -16
- package/dist/esm/help-hub/provider/articleProvider.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/provider/getHelpHubConfig.d.ts +0 -0
- package/dist/esm/help-hub/provider/getHelpHubConfig.js +13 -0
- package/dist/esm/help-hub/provider/getHelpHubConfig.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/provider/index.d.ts +0 -0
- package/dist/esm/help-hub/provider/index.js +5 -0
- package/dist/esm/help-hub/provider/index.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/provider/resultsProvider.d.ts +0 -0
- package/dist/{help-hub → esm/help-hub}/provider/resultsProvider.js +9 -16
- package/dist/esm/help-hub/provider/resultsProvider.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/provider/types.d.ts +0 -0
- package/dist/esm/help-hub/provider/types.js +10 -0
- package/dist/esm/help-hub/provider/types.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/test-helpers/articlePageContextOptionsMock.d.ts +0 -0
- package/dist/esm/help-hub/test-helpers/articlePageContextOptionsMock.js +14 -0
- package/dist/esm/help-hub/test-helpers/articlePageContextOptionsMock.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/test-helpers/index.d.ts +0 -0
- package/dist/esm/help-hub/test-helpers/index.js +3 -0
- package/dist/esm/help-hub/test-helpers/index.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/test-helpers/landingPageContextOptionsMock.d.ts +0 -0
- package/dist/{help-hub → esm/help-hub}/test-helpers/landingPageContextOptionsMock.js +4 -7
- package/dist/esm/help-hub/test-helpers/landingPageContextOptionsMock.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/test-helpers/mocks.d.ts +0 -0
- package/dist/esm/help-hub/test-helpers/mocks.js +12 -0
- package/dist/esm/help-hub/test-helpers/mocks.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/test-helpers/resultsPageContextOptionsMock.d.ts +0 -0
- package/dist/{help-hub → esm/help-hub}/test-helpers/resultsPageContextOptionsMock.js +2 -5
- package/dist/esm/help-hub/test-helpers/resultsPageContextOptionsMock.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/test-helpers/sharedMocks.d.ts +0 -0
- package/dist/{help-hub → esm/help-hub}/test-helpers/sharedMocks.js +1 -4
- package/dist/esm/help-hub/test-helpers/sharedMocks.js.map +1 -0
- package/dist/{help-hub → esm/help-hub}/types/index.d.ts +0 -0
- package/dist/esm/help-hub/types/index.js +2 -0
- package/dist/{help-hub → esm/help-hub}/types/index.js.map +1 -1
- package/dist/{helpers → esm/helpers}/setupTests.d.ts +0 -0
- package/dist/esm/helpers/setupTests.js +2 -0
- package/dist/esm/helpers/setupTests.js.map +1 -0
- package/dist/{helpers → esm/helpers}/testHelpers.d.ts +0 -0
- package/dist/esm/helpers/testHelpers.js +51 -0
- package/dist/esm/helpers/testHelpers.js.map +1 -0
- package/dist/{index.d.ts → esm/index.d.ts} +1 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -0
- package/package.json +2 -2
- package/dist/article-recommendations/components/ArticleRecommendation.js +0 -19
- package/dist/article-recommendations/components/ArticleRecommendation.js.map +0 -1
- package/dist/article-recommendations/components/ArticleRecommendationLarge.js +0 -58
- package/dist/article-recommendations/components/ArticleRecommendationLarge.js.map +0 -1
- package/dist/article-recommendations/components/ArticleRecommendationSmall.js +0 -43
- package/dist/article-recommendations/components/ArticleRecommendationSmall.js.map +0 -1
- package/dist/article-recommendations/components/baseProps.js.map +0 -1
- package/dist/article-recommendations/components/index.js +0 -20
- package/dist/article-recommendations/components/index.js.map +0 -1
- package/dist/article-recommendations/index.js +0 -16
- package/dist/article-recommendations/index.js.map +0 -1
- package/dist/article-recommendations/provider/index.js +0 -14
- package/dist/article-recommendations/provider/index.js.map +0 -1
- package/dist/article-recommendations/provider/queries/getRecommendationsQuery.js +0 -11
- package/dist/article-recommendations/provider/queries/getRecommendationsQuery.js.map +0 -1
- package/dist/article-recommendations/provider/queries/index.js +0 -14
- package/dist/article-recommendations/provider/queries/index.js.map +0 -1
- package/dist/article-recommendations/provider/recommendationsProvider.js.map +0 -1
- package/dist/article-recommendations/types/index.js +0 -3
- package/dist/article-recommendations/types/index.js.map +0 -1
- package/dist/help-hub/components/ContentListView/ContentListView.js +0 -34
- package/dist/help-hub/components/ContentListView/ContentListView.js.map +0 -1
- package/dist/help-hub/components/ContentListView/Introduction.js +0 -33
- package/dist/help-hub/components/ContentListView/Introduction.js.map +0 -1
- package/dist/help-hub/components/ContentListView/index.js.map +0 -1
- package/dist/help-hub/components/SearchBar/SearchBar.js +0 -25
- package/dist/help-hub/components/SearchBar/SearchBar.js.map +0 -1
- package/dist/help-hub/components/SearchBar/components/AlgoliaTheme.js +0 -11
- package/dist/help-hub/components/SearchBar/components/AlgoliaTheme.js.map +0 -1
- package/dist/help-hub/components/SearchBar/components/Autocomplete.js +0 -162
- package/dist/help-hub/components/SearchBar/components/Autocomplete.js.map +0 -1
- package/dist/help-hub/components/SearchBar/components/Highlight.js +0 -18
- package/dist/help-hub/components/SearchBar/components/Highlight.js.map +0 -1
- package/dist/help-hub/components/SearchBar/index.js +0 -14
- package/dist/help-hub/components/SearchBar/index.js.map +0 -1
- package/dist/help-hub/components/SearchBar/types.js.map +0 -1
- package/dist/help-hub/components/Templates/LayoutTemplate.js +0 -74
- package/dist/help-hub/components/Templates/LayoutTemplate.js.map +0 -1
- package/dist/help-hub/components/Templates/index.js +0 -16
- package/dist/help-hub/components/Templates/index.js.map +0 -1
- package/dist/help-hub/components/Templates/types.js +0 -3
- package/dist/help-hub/components/Templates/types.js.map +0 -1
- package/dist/help-hub/context/baseContext.js.map +0 -1
- package/dist/help-hub/context/index.js +0 -49
- package/dist/help-hub/context/index.js.map +0 -1
- package/dist/help-hub/context/types.js +0 -10
- package/dist/help-hub/context/types.js.map +0 -1
- package/dist/help-hub/index.js +0 -18
- package/dist/help-hub/index.js.map +0 -1
- package/dist/help-hub/pages/ArticlePage.js +0 -63
- package/dist/help-hub/pages/ArticlePage.js.map +0 -1
- package/dist/help-hub/pages/LandingPage.js +0 -87
- package/dist/help-hub/pages/LandingPage.js.map +0 -1
- package/dist/help-hub/pages/ResultsPage.js +0 -71
- package/dist/help-hub/pages/ResultsPage.js.map +0 -1
- package/dist/help-hub/pages/types.js +0 -3
- package/dist/help-hub/provider/CredentialsProvider.js +0 -38
- package/dist/help-hub/provider/CredentialsProvider.js.map +0 -1
- package/dist/help-hub/provider/articleProvider.js.map +0 -1
- package/dist/help-hub/provider/getHelpHubConfig.js +0 -17
- package/dist/help-hub/provider/getHelpHubConfig.js.map +0 -1
- package/dist/help-hub/provider/index.js +0 -17
- package/dist/help-hub/provider/index.js.map +0 -1
- package/dist/help-hub/provider/resultsProvider.js.map +0 -1
- package/dist/help-hub/provider/types.js +0 -13
- package/dist/help-hub/provider/types.js.map +0 -1
- package/dist/help-hub/test-helpers/articlePageContextOptionsMock.js +0 -17
- package/dist/help-hub/test-helpers/articlePageContextOptionsMock.js.map +0 -1
- package/dist/help-hub/test-helpers/index.js +0 -9
- package/dist/help-hub/test-helpers/index.js.map +0 -1
- package/dist/help-hub/test-helpers/landingPageContextOptionsMock.js.map +0 -1
- package/dist/help-hub/test-helpers/mocks.js +0 -14
- package/dist/help-hub/test-helpers/mocks.js.map +0 -1
- package/dist/help-hub/test-helpers/resultsPageContextOptionsMock.js.map +0 -1
- package/dist/help-hub/test-helpers/sharedMocks.js.map +0 -1
- package/dist/help-hub/types/index.js +0 -3
- package/dist/helpers/setupTests.js +0 -4
- package/dist/helpers/setupTests.js.map +0 -1
- package/dist/helpers/testHelpers.js +0 -59
- package/dist/helpers/testHelpers.js.map +0 -1
- package/dist/index.js +0 -15
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import assign from 'lodash.assign';
|
|
18
|
+
import xss from 'xss';
|
|
19
|
+
import { Block, styled, getFontsFromTheme } from 'newskit';
|
|
20
|
+
import { Introduction } from '@newskit-render/shared-components';
|
|
21
|
+
import Layout from '../components/Templates';
|
|
22
|
+
import { SearchBar } from '../components/SearchBar';
|
|
23
|
+
import { ContextName } from '../context/types';
|
|
24
|
+
import { useHelpHubContext } from '../context';
|
|
25
|
+
import { CredentialsContextProvider } from '../provider/CredentialsProvider';
|
|
26
|
+
var ContentBlock = styled(Block)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: block;\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n letter-spacing: 0;\n padding: 1px 0px;\n"], ["\n display: block;\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n letter-spacing: 0;\n padding: 1px 0px;\n"])), getFontsFromTheme('fontFamily010'), getFontsFromTheme('fontSize030'), getFontsFromTheme('fontWeight010'), getFontsFromTheme('fontLineHeight040'));
|
|
27
|
+
export var PageContent = function () {
|
|
28
|
+
var _a = useHelpHubContext(ContextName.articlePage), title = _a.title, content = _a.content, inputPlaceholder = _a.inputPlaceholder;
|
|
29
|
+
var xssOptions = {
|
|
30
|
+
whiteList: { p: [], a: ['href'], br: [], img: [], b: [], strong: [] },
|
|
31
|
+
stripIgnoreTag: true,
|
|
32
|
+
stripIgnoreTagBody: ['script'],
|
|
33
|
+
};
|
|
34
|
+
var sanitizedArticleContent = xss(content, xssOptions);
|
|
35
|
+
return (React.createElement(React.Fragment, null,
|
|
36
|
+
React.createElement(Block, { spaceStack: { xs: 'space070' } }),
|
|
37
|
+
React.createElement(SearchBar, { placeholder: inputPlaceholder }),
|
|
38
|
+
React.createElement(Block, { spaceStack: { xs: 'space070' } }),
|
|
39
|
+
React.createElement(Introduction, { title: title }),
|
|
40
|
+
React.createElement(ContentBlock, { "data-testid": "content-block", spaceStack: {
|
|
41
|
+
xs: 'space040',
|
|
42
|
+
md: 'space050',
|
|
43
|
+
}, as: "span", dangerouslySetInnerHTML: { __html: sanitizedArticleContent } }),
|
|
44
|
+
React.createElement(Block, { spaceStack: { xs: 'space070' } })));
|
|
45
|
+
};
|
|
46
|
+
export var ArticlePage = function (_a) {
|
|
47
|
+
var credentials = _a.credentials, content = _a.content, title = _a.title, context = _a.context, contextName = _a.contextName, customTheme = _a.customTheme, themeDropdownObject = _a.themeDropdownObject;
|
|
48
|
+
var enhancedContext = __assign({}, assign({}, { content: content, title: title }, context));
|
|
49
|
+
return (React.createElement(CredentialsContextProvider, { credentials: credentials },
|
|
50
|
+
React.createElement(Layout, { context: enhancedContext, contextName: contextName, customTheme: customTheme, themeDropdownObject: themeDropdownObject },
|
|
51
|
+
React.createElement(PageContent, null))));
|
|
52
|
+
};
|
|
53
|
+
export default ArticlePage;
|
|
54
|
+
var templateObject_1;
|
|
55
|
+
//# sourceMappingURL=ArticlePage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArticlePage.js","sourceRoot":"","sources":["../../../../src/help-hub/pages/ArticlePage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAM,MAAM,eAAe,CAAA;AAClC,OAAO,GAAG,MAAM,KAAK,CAAA;AACrB,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAChE,OAAO,MAAM,MAAM,yBAAyB,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAEnD,OAAO,EAA6B,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA;AAE5E,IAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,2NAAA,sCAEjB,EAAkC,kBACpC,EAAgC,oBAC9B,EAAkC,oBAClC,EAAsC,gDAGtD,KANgB,iBAAiB,CAAC,eAAe,CAAC,EACpC,iBAAiB,CAAC,aAAa,CAAC,EAC9B,iBAAiB,CAAC,eAAe,CAAC,EAClC,iBAAiB,CAAC,mBAAmB,CAAC,CAGtD,CAAA;AACD,MAAM,CAAC,IAAM,WAAW,GAAG;IACnB,IAAA,KAAuC,iBAAiB,CAC5D,WAAW,CAAC,WAAW,CACK,EAFtB,KAAK,WAAA,EAAE,OAAO,aAAA,EAAE,gBAAgB,sBAEV,CAAA;IAC9B,IAAM,UAAU,GAAG;QACjB,SAAS,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QACrE,cAAc,EAAE,IAAI;QACpB,kBAAkB,EAAE,CAAC,QAAQ,CAAC;KAC/B,CAAA;IACD,IAAM,uBAAuB,GAAG,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAA;IACxD,OAAO,CACL;QACE,oBAAC,KAAK,IAAC,UAAU,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,GAAI;QACzC,oBAAC,SAAS,IAAC,WAAW,EAAE,gBAAgB,GAAI;QAC5C,oBAAC,KAAK,IAAC,UAAU,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,GAAI;QACzC,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,GAAI;QAC9B,oBAAC,YAAY,mBACC,eAAe,EAC3B,UAAU,EAAE;gBACV,EAAE,EAAE,UAAU;gBACd,EAAE,EAAE,UAAU;aACf,EACD,EAAE,EAAC,MAAM,EACT,uBAAuB,EAAE,EAAE,MAAM,EAAE,uBAAuB,EAAE,GAC5D;QACF,oBAAC,KAAK,IAAC,UAAU,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,GAAI,CACxC,CACJ,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,IAAM,WAAW,GAA+B,UAAC,EAQvD;QAPC,WAAW,iBAAA,EACX,OAAO,aAAA,EACP,KAAK,WAAA,EACL,OAAO,aAAA,EACP,WAAW,iBAAA,EACX,WAAW,iBAAA,EACX,mBAAmB,yBAAA;IAEnB,IAAM,eAAe,gBAChB,MAAM,CAAC,EAAE,EAAE,EAAE,OAAO,SAAA,EAAE,KAAK,OAAA,EAAE,EAAE,OAAO,CAAC,CAC3C,CAAA;IACD,OAAO,CACL,oBAAC,0BAA0B,IAAC,WAAW,EAAE,WAAW;QAClD,oBAAC,MAAM,IACL,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,EACxB,mBAAmB,EAAE,mBAAmB;YAExC,oBAAC,WAAW,OAAG,CACR,CACkB,CAC9B,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
File without changes
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import assign from 'lodash.assign';
|
|
14
|
+
import { Block } from 'newskit';
|
|
15
|
+
import { Header, Introduction } from '@newskit-render/shared-components';
|
|
16
|
+
import Layout from '../components/Templates';
|
|
17
|
+
import { ContentListView } from '../components/ContentListView';
|
|
18
|
+
import { SearchBar } from '../components/SearchBar';
|
|
19
|
+
import { ContextName } from '../context/types';
|
|
20
|
+
import { useHelpHubContext } from '../context';
|
|
21
|
+
import { CredentialsContextProvider } from '../provider/CredentialsProvider';
|
|
22
|
+
var replaceDataWithMostReadedArticles = [
|
|
23
|
+
{
|
|
24
|
+
title: 'My voucher booklet has not arrived, what do I do?',
|
|
25
|
+
url: '#',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
title: "Why hasn't my newspaper been delivered?",
|
|
29
|
+
url: '#',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
title: "Why hasn't my newspaper been delivered?",
|
|
33
|
+
url: '#',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: 'How do I login/reset my password?',
|
|
37
|
+
url: '#',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
title: 'How do I book, cancel or amend a holiday stop?',
|
|
41
|
+
url: '#',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
title: 'How do I change my subscription pack?',
|
|
45
|
+
url: '#',
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
export var LandingPageContext = {
|
|
49
|
+
header: {
|
|
50
|
+
title: 'How can we help?',
|
|
51
|
+
},
|
|
52
|
+
contentViewList: {
|
|
53
|
+
introduction: {
|
|
54
|
+
title: 'Our most read articles',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
mostReadArticles: replaceDataWithMostReadedArticles, // Update in context tests as well
|
|
58
|
+
};
|
|
59
|
+
var PageContent = function () {
|
|
60
|
+
var _a = useHelpHubContext(ContextName.landingPage), header = _a.header, inputPlaceholder = _a.inputPlaceholder, contentViewList = _a.contentViewList, mostReadArticles = _a.mostReadArticles, searchBar = _a.searchBar, contentListView = _a.contentListView, contentContainer = _a.contentContainer, spaceStack = _a.spaceStack;
|
|
61
|
+
// NOTE: Add LandingPage custom data logic here
|
|
62
|
+
return (React.createElement(React.Fragment, null,
|
|
63
|
+
React.createElement(Block, { spaceStack: contentContainer.spaceStack }),
|
|
64
|
+
React.createElement(Header, __assign({}, header)),
|
|
65
|
+
React.createElement(SearchBar, { placeholder: inputPlaceholder }),
|
|
66
|
+
React.createElement(Block, { spaceStack: searchBar.spaceStack }),
|
|
67
|
+
React.createElement(Introduction, { title: contentViewList.introduction.title, titleOverrides: contentListView.introduction }),
|
|
68
|
+
React.createElement(ContentListView, { data: mostReadArticles }),
|
|
69
|
+
React.createElement(Block, { spaceStack: spaceStack })));
|
|
70
|
+
};
|
|
71
|
+
// TODO: Create credentials provider
|
|
72
|
+
export var LandingPage = function (_a) {
|
|
73
|
+
var context = _a.context, contextName = _a.contextName, customTheme = _a.customTheme, themeDropdownObject = _a.themeDropdownObject, credentials = _a.credentials;
|
|
74
|
+
var enhancedContext = __assign({}, assign({}, __assign(__assign({}, LandingPageContext), { credentials: credentials }), context));
|
|
75
|
+
return (React.createElement(CredentialsContextProvider, { credentials: credentials },
|
|
76
|
+
React.createElement(Layout, { context: enhancedContext, contextName: contextName, customTheme: customTheme, themeDropdownObject: themeDropdownObject },
|
|
77
|
+
React.createElement(PageContent, null))));
|
|
78
|
+
};
|
|
79
|
+
export default LandingPage;
|
|
80
|
+
//# sourceMappingURL=LandingPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LandingPage.js","sourceRoot":"","sources":["../../../../src/help-hub/pages/LandingPage.tsx"],"names":[],"mappings":"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"}
|
|
File without changes
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import assign from 'lodash.assign';
|
|
14
|
+
import { Block } from 'newskit';
|
|
15
|
+
import { Header } from '@newskit-render/shared-components';
|
|
16
|
+
import Layout from '../components/Templates';
|
|
17
|
+
import { ContentListView } from '../components/ContentListView';
|
|
18
|
+
import { SearchBar } from '../components/SearchBar';
|
|
19
|
+
import { ContextName } from '../context/types';
|
|
20
|
+
import { useHelpHubContext } from '../context';
|
|
21
|
+
import { CredentialsContextProvider } from '../provider/CredentialsProvider';
|
|
22
|
+
import { useRouter } from 'next/router';
|
|
23
|
+
export var ResultsPageContext = {
|
|
24
|
+
header: {
|
|
25
|
+
title: 'Search results',
|
|
26
|
+
description: 'Your search for "##QUERY##" returned ##COUNT## results',
|
|
27
|
+
titleOverrides: {
|
|
28
|
+
spaceStack: 'space050',
|
|
29
|
+
},
|
|
30
|
+
spaceStack: 'space060',
|
|
31
|
+
},
|
|
32
|
+
contentContainer: {
|
|
33
|
+
spaceStack: { xs: 'space045', md: 'space070' },
|
|
34
|
+
},
|
|
35
|
+
searchBar: {
|
|
36
|
+
spaceStack: { xs: 'space060', md: 'space070' },
|
|
37
|
+
},
|
|
38
|
+
spaceStack: { xs: 'space060', sm: 'space070', md: 'space090' },
|
|
39
|
+
};
|
|
40
|
+
var PageContent = function (_a) {
|
|
41
|
+
var hits = _a.hits;
|
|
42
|
+
var _b = useHelpHubContext(ContextName.resultsPage), header = _b.header, inputPlaceholder = _b.inputPlaceholder, contentContainer = _b.contentContainer, searchBar = _b.searchBar;
|
|
43
|
+
var q = useRouter().query.q;
|
|
44
|
+
var description = header.description;
|
|
45
|
+
var newDescription = description
|
|
46
|
+
.replace('##QUERY##', q)
|
|
47
|
+
.replace('##COUNT##', hits.length.toString());
|
|
48
|
+
return (React.createElement(React.Fragment, null,
|
|
49
|
+
React.createElement(Block, { spaceStack: contentContainer.spaceStack }),
|
|
50
|
+
React.createElement(SearchBar, { placeholder: inputPlaceholder }),
|
|
51
|
+
React.createElement(Block, { spaceStack: searchBar.spaceStack }),
|
|
52
|
+
React.createElement(Header, __assign({}, __assign(__assign({}, header), { description: newDescription }))),
|
|
53
|
+
React.createElement(ContentListView, { data: hits }),
|
|
54
|
+
React.createElement(Block, { spaceStack: { xs: 'space070' } })));
|
|
55
|
+
};
|
|
56
|
+
export var ResultsPage = function (_a) {
|
|
57
|
+
var context = _a.context, contextName = _a.contextName, customTheme = _a.customTheme, themeDropdownObject = _a.themeDropdownObject, hits = _a.hits, credentials = _a.credentials;
|
|
58
|
+
var enhancedContext = __assign({}, assign({}, __assign(__assign({}, ResultsPageContext), { credentials: credentials }), context));
|
|
59
|
+
return (React.createElement(CredentialsContextProvider, { credentials: credentials },
|
|
60
|
+
React.createElement(Layout, { context: enhancedContext, contextName: contextName, customTheme: customTheme, themeDropdownObject: themeDropdownObject },
|
|
61
|
+
React.createElement(PageContent, { hits: hits }))));
|
|
62
|
+
};
|
|
63
|
+
export default ResultsPage;
|
|
64
|
+
//# sourceMappingURL=ResultsPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResultsPage.js","sourceRoot":"","sources":["../../../../src/help-hub/pages/ResultsPage.tsx"],"names":[],"mappings":"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"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/help-hub/pages/types.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { createContext, useContext } from 'react';
|
|
2
|
+
var CredentialsContext = createContext({
|
|
3
|
+
apiKey: '',
|
|
4
|
+
appId: '',
|
|
5
|
+
indexName: '',
|
|
6
|
+
});
|
|
7
|
+
export var CredentialsContextProvider = function (_a) {
|
|
8
|
+
var credentials = _a.credentials, children = _a.children;
|
|
9
|
+
return (React.createElement(CredentialsContext.Provider, { value: credentials }, children));
|
|
10
|
+
};
|
|
11
|
+
export var useCredentialsContext = function () {
|
|
12
|
+
return useContext(CredentialsContext);
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=CredentialsProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CredentialsProvider.js","sourceRoot":"","sources":["../../../../src/help-hub/provider/CredentialsProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAa,UAAU,EAAE,MAAM,OAAO,CAAA;AAGnE,IAAM,kBAAkB,GAAG,aAAa,CAAqB;IAC3D,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,EAAE;IACT,SAAS,EAAE,EAAE;CACd,CAAC,CAAA;AAEF,MAAM,CAAC,IAAM,0BAA0B,GAGlC,UAAC,EAAyB;QAAvB,WAAW,iBAAA,EAAE,QAAQ,cAAA;IAC3B,OAAO,CACL,oBAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,WAAW,IAC5C,QAAQ,CACmB,CAC/B,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,IAAM,qBAAqB,GAAG;IACnC,OAAA,UAAU,CAAC,kBAAkB,CAAC;AAA9B,CAA8B,CAAA"}
|
|
File without changes
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __assign = (this && this.__assign) || function () {
|
|
3
2
|
__assign = Object.assign || function(t) {
|
|
4
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -46,27 +45,22 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46
45
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
46
|
}
|
|
48
47
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
var cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
55
|
-
var config_1 = require("../../config");
|
|
56
|
-
var types_1 = require("./types");
|
|
57
|
-
var getHelpHubConfig_1 = require("./getHelpHubConfig");
|
|
58
|
-
var articleProvider = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
48
|
+
import fetch from 'cross-fetch';
|
|
49
|
+
import { algoliaAppId, algoliaApiKey, algoliaIndex, algoliaUrl, } from '../../config';
|
|
50
|
+
import { ReqMethod } from './types';
|
|
51
|
+
import { getHelpHubConfig } from './getHelpHubConfig';
|
|
52
|
+
export var articleProvider = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
59
53
|
var title, credentials, promiseResult, providerProps;
|
|
60
54
|
return __generator(this, function (_a) {
|
|
61
55
|
switch (_a.label) {
|
|
62
56
|
case 0:
|
|
63
57
|
title = context.params.title;
|
|
64
58
|
credentials = {
|
|
65
|
-
appId:
|
|
66
|
-
apiKey:
|
|
67
|
-
indexName:
|
|
59
|
+
appId: algoliaAppId,
|
|
60
|
+
apiKey: algoliaApiKey,
|
|
61
|
+
indexName: algoliaIndex,
|
|
68
62
|
};
|
|
69
|
-
return [4 /*yield*/, (
|
|
63
|
+
return [4 /*yield*/, fetch(algoliaUrl + "/" + title, getHelpHubConfig(ReqMethod.GET))];
|
|
70
64
|
case 1:
|
|
71
65
|
promiseResult = _a.sent();
|
|
72
66
|
if (promiseResult.status >= 400) {
|
|
@@ -86,5 +80,4 @@ var articleProvider = function (context) { return __awaiter(void 0, void 0, void
|
|
|
86
80
|
}
|
|
87
81
|
});
|
|
88
82
|
}); };
|
|
89
|
-
exports.articleProvider = articleProvider;
|
|
90
83
|
//# sourceMappingURL=articleProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"articleProvider.js","sourceRoot":"","sources":["../../../../src/help-hub/provider/articleProvider.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,EAAE,SAAS,EAA8C,MAAM,SAAS,CAAA;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,MAAM,CAAC,IAAM,eAAe,GAAG,UAAO,OAA6B;;;;;gBAErD,KAAK,GACb,OAAO,aADM,CACN;gBACL,WAAW,GAAG;oBAClB,KAAK,EAAE,YAAY;oBACnB,MAAM,EAAE,aAAa;oBACrB,SAAS,EAAE,YAAY;iBACxB,CAAA;gBACqB,qBAAM,KAAK,CAC5B,UAAU,SAAI,KAAO,EACxB,gBAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,CAChC,EAAA;;gBAHK,aAAa,GAAG,SAGrB;gBAED,IAAI,aAAa,CAAC,MAAM,IAAI,GAAG,EAAE;oBAC/B,OAAO,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAA;oBACxD,sBAAO;4BACL,KAAK,EAAE;gCACL,WAAW,EAAE,WAAW;6BACzB;yBACF,EAAA;iBACF;gBACsB,qBAAM,aAAa,CAAC,IAAI,EAAE,EAAA;;gBAA3C,aAAa,GAAG,CAAC,SAA0B,CAAyB;gBAC1E,sBAAO;wBACL,KAAK,wBACA,aAAa,KAChB,WAAW,EAAE,WAAW,GACzB;qBACF,EAAA;;;KACF,CAAA"}
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { algoliaApiKey, algoliaAppId } from '../../config';
|
|
2
|
+
export var getHelpHubConfig = function (reqMethod) {
|
|
3
|
+
var reqParams = {
|
|
4
|
+
method: reqMethod,
|
|
5
|
+
headers: {
|
|
6
|
+
'Content-Type': 'application/json',
|
|
7
|
+
'x-algolia-api-key': algoliaApiKey,
|
|
8
|
+
'x-algolia-application-id': algoliaAppId,
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
return reqParams;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=getHelpHubConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getHelpHubConfig.js","sourceRoot":"","sources":["../../../../src/help-hub/provider/getHelpHubConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE1D,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAC,SAAoB;IACnD,IAAM,SAAS,GAAc;QAC3B,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,mBAAmB,EAAE,aAAa;YAClC,0BAA0B,EAAE,YAAY;SACzC;KACF,CAAA;IACD,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/help-hub/provider/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,SAAS,CAAA"}
|
|
File without changes
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __assign = (this && this.__assign) || function () {
|
|
3
2
|
__assign = Object.assign || function(t) {
|
|
4
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -46,27 +45,22 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46
45
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
46
|
}
|
|
48
47
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
var cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
55
|
-
var config_1 = require("../../config");
|
|
56
|
-
var types_1 = require("./types");
|
|
57
|
-
var getHelpHubConfig_1 = require("./getHelpHubConfig");
|
|
58
|
-
var resultsProvider = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
48
|
+
import fetch from 'cross-fetch';
|
|
49
|
+
import { algoliaAppId, algoliaApiKey, algoliaIndex, algoliaUrl, } from '../../config';
|
|
50
|
+
import { ReqMethod } from './types';
|
|
51
|
+
import { getHelpHubConfig } from './getHelpHubConfig';
|
|
52
|
+
export var resultsProvider = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
59
53
|
var q, credentials, promiseResult, providerProps;
|
|
60
54
|
return __generator(this, function (_a) {
|
|
61
55
|
switch (_a.label) {
|
|
62
56
|
case 0:
|
|
63
57
|
q = context.query.q;
|
|
64
58
|
credentials = {
|
|
65
|
-
appId:
|
|
66
|
-
apiKey:
|
|
67
|
-
indexName:
|
|
59
|
+
appId: algoliaAppId,
|
|
60
|
+
apiKey: algoliaApiKey,
|
|
61
|
+
indexName: algoliaIndex,
|
|
68
62
|
};
|
|
69
|
-
return [4 /*yield*/, (
|
|
63
|
+
return [4 /*yield*/, fetch(algoliaUrl + "/query", __assign(__assign({}, getHelpHubConfig(ReqMethod.POST)), { body: JSON.stringify({ params: "query=" + q }) }))];
|
|
70
64
|
case 1:
|
|
71
65
|
promiseResult = _a.sent();
|
|
72
66
|
if (promiseResult.status >= 400) {
|
|
@@ -86,5 +80,4 @@ var resultsProvider = function (context) { return __awaiter(void 0, void 0, void
|
|
|
86
80
|
}
|
|
87
81
|
});
|
|
88
82
|
}); };
|
|
89
|
-
exports.resultsProvider = resultsProvider;
|
|
90
83
|
//# sourceMappingURL=resultsProvider.js.map
|
|
@@ -0,0 +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,EAAE,SAAS,EAA8C,MAAM,SAAS,CAAA;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,MAAM,CAAC,IAAM,eAAe,GAAG,UAAO,OAA6B;;;;;gBAEtD,CAAC,GACR,OAAO,QADC,CACD;gBAEL,WAAW,GAAG;oBAClB,KAAK,EAAE,YAAY;oBACnB,MAAM,EAAE,aAAa;oBACrB,SAAS,EAAE,YAAY;iBACxB,CAAA;gBAEqB,qBAAM,KAAK,CAAI,UAAU,WAAQ,wBAClD,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,KACnC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,WAAS,CAAG,EAAE,CAAC,IAC9C,EAAA;;gBAHI,aAAa,GAAG,SAGpB;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;6BACZ;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,GACZ;qBACF,EAAA;;;KACF,CAAA"}
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export var ReqMethod;
|
|
2
|
+
(function (ReqMethod) {
|
|
3
|
+
ReqMethod["GET"] = "GET";
|
|
4
|
+
ReqMethod["POST"] = "POST";
|
|
5
|
+
})(ReqMethod || (ReqMethod = {}));
|
|
6
|
+
export var ProviderPropsMapper;
|
|
7
|
+
(function (ProviderPropsMapper) {
|
|
8
|
+
ProviderPropsMapper["ArticlePageProvider"] = "ArticlePageProvider";
|
|
9
|
+
})(ProviderPropsMapper || (ProviderPropsMapper = {}));
|
|
10
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/help-hub/provider/types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAyBD,MAAM,CAAN,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC7B,kEAA2C,CAAA;AAC7C,CAAC,EAFW,mBAAmB,KAAnB,mBAAmB,QAE9B"}
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { baseContext } from '../context';
|
|
13
|
+
export var articlePageContextMock = __assign(__assign({}, baseContext), { title: 'Header title in Help Hub Article page', content: 'Header description in Help Hub Article page', credentials: { appId: '', apiKey: '', indexName: '' } });
|
|
14
|
+
//# sourceMappingURL=articlePageContextOptionsMock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"articlePageContextOptionsMock.js","sourceRoot":"","sources":["../../../../src/help-hub/test-helpers/articlePageContextOptionsMock.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGxC,MAAM,CAAC,IAAM,sBAAsB,yBAC9B,WAAW,KACd,KAAK,EAAE,uCAAuC,EAC9C,OAAO,EAAE,6CAA6C,EACtD,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,GACtD,CAAA"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/help-hub/test-helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAE7B,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
|
File without changes
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __assign = (this && this.__assign) || function () {
|
|
3
2
|
__assign = Object.assign || function(t) {
|
|
4
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -10,16 +9,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
9
|
};
|
|
11
10
|
return __assign.apply(this, arguments);
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
var sharedMocks_1 = require("./sharedMocks");
|
|
17
|
-
exports.landingPageContextMock = __assign(__assign({}, context_1.baseContext), { header: {
|
|
12
|
+
import { baseContext } from '../context';
|
|
13
|
+
import { algoliaDataMock } from './sharedMocks';
|
|
14
|
+
export var landingPageContextMock = __assign(__assign({}, baseContext), { header: {
|
|
18
15
|
title: 'Header title in Help Hub Landing page',
|
|
19
16
|
description: 'Header description in Help Hub Landing page',
|
|
20
17
|
}, contentViewList: {
|
|
21
18
|
introduction: {
|
|
22
19
|
title: 'Content list title in Help Hub Landing page',
|
|
23
20
|
},
|
|
24
|
-
}, mostReadArticles:
|
|
21
|
+
}, mostReadArticles: algoliaDataMock });
|
|
25
22
|
//# sourceMappingURL=landingPageContextOptionsMock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"landingPageContextOptionsMock.js","sourceRoot":"","sources":["../../../../src/help-hub/test-helpers/landingPageContextOptionsMock.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAExC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,MAAM,CAAC,IAAM,sBAAsB,yBAC9B,WAAW,KACd,MAAM,EAAE;QACN,KAAK,EAAE,uCAAuC;QAC9C,WAAW,EAAE,6CAA6C;KAC3D,EACD,eAAe,EAAE;QACf,YAAY,EAAE;YACZ,KAAK,EAAE,6CAA6C;SACrD;KACF,EACD,gBAAgB,EAAE,eAAe,GAClC,CAAA"}
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import { ContextName } from '../context/types';
|
|
3
|
+
import { articlePageContextMock } from './articlePageContextOptionsMock';
|
|
4
|
+
import { landingPageContextMock } from './landingPageContextOptionsMock';
|
|
5
|
+
import { resultsPageContextMock } from './resultsPageContextOptionsMock';
|
|
6
|
+
var mockMap = (_a = {},
|
|
7
|
+
_a[ContextName.landingPage] = landingPageContextMock,
|
|
8
|
+
_a[ContextName.resultsPage] = resultsPageContextMock,
|
|
9
|
+
_a[ContextName.articlePage] = articlePageContextMock,
|
|
10
|
+
_a);
|
|
11
|
+
export default mockMap;
|
|
12
|
+
//# sourceMappingURL=mocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mocks.js","sourceRoot":"","sources":["../../../../src/help-hub/test-helpers/mocks.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAA;AAExE,IAAM,OAAO;IACX,GAAC,WAAW,CAAC,WAAW,IAAG,sBAAsB;IACjD,GAAC,WAAW,CAAC,WAAW,IAAG,sBAAsB;IACjD,GAAC,WAAW,CAAC,WAAW,IAAG,sBAAsB;OAClD,CAAA;AACD,eAAe,OAAO,CAAA"}
|
|
File without changes
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __assign = (this && this.__assign) || function () {
|
|
3
2
|
__assign = Object.assign || function(t) {
|
|
4
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -10,10 +9,8 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
9
|
};
|
|
11
10
|
return __assign.apply(this, arguments);
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var context_1 = require("../context");
|
|
16
|
-
exports.resultsPageContextMock = __assign(__assign({}, context_1.baseContext), { header: {
|
|
12
|
+
import { baseContext } from '../context';
|
|
13
|
+
export var resultsPageContextMock = __assign(__assign({}, baseContext), { header: {
|
|
17
14
|
title: 'Header title in Help Hub Results page',
|
|
18
15
|
description: 'Header description in Help Hub Results page',
|
|
19
16
|
} });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resultsPageContextOptionsMock.js","sourceRoot":"","sources":["../../../../src/help-hub/test-helpers/resultsPageContextOptionsMock.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGxC,MAAM,CAAC,IAAM,sBAAsB,yBAC9B,WAAW,KACd,MAAM,EAAE;QACN,KAAK,EAAE,uCAAuC;QAC9C,WAAW,EAAE,6CAA6C;KAC3D,GACF,CAAA"}
|
|
File without changes
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.algoliaDataMock = void 0;
|
|
4
|
-
exports.algoliaDataMock = [
|
|
1
|
+
export var algoliaDataMock = [
|
|
5
2
|
{
|
|
6
3
|
title: "What's in the smartphone app and how do I access it?",
|
|
7
4
|
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.',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharedMocks.js","sourceRoot":"","sources":["../../../../src/help-hub/test-helpers/sharedMocks.tsx"],"names":[],"mappings":"AAAA,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"}
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/help-hub/types/index.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupTests.js","sourceRoot":"","sources":["../../../src/helpers/setupTests.ts"],"names":[],"mappings":"AAAA,OAAO,yCAAyC,CAAA"}
|
|
File without changes
|