@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.
Files changed (267) hide show
  1. package/README.md +192 -25
  2. package/dist/cjs/help-chat/Help.d.ts +5 -0
  3. package/dist/cjs/help-chat/Help.js +40 -0
  4. package/dist/cjs/help-chat/Help.js.map +1 -0
  5. package/dist/cjs/help-chat/chatHelpDefaultOverrides.d.ts +37 -0
  6. package/dist/cjs/help-chat/chatHelpDefaultOverrides.js +45 -0
  7. package/dist/cjs/help-chat/chatHelpDefaultOverrides.js.map +1 -0
  8. package/dist/cjs/help-chat/index.d.ts +2 -0
  9. package/dist/{help-hub/components/ContentListView → cjs/help-chat}/index.js +2 -1
  10. package/dist/cjs/help-chat/index.js.map +1 -0
  11. package/dist/cjs/help-chat/tests/Chat.stories.d.ts +5 -0
  12. package/dist/cjs/help-chat/tests/Chat.stories.js +53 -0
  13. package/dist/cjs/help-chat/tests/Chat.stories.js.map +1 -0
  14. package/dist/cjs/help-chat/types.d.ts +31 -0
  15. package/dist/{help-hub/components/SearchBar → cjs/help-chat}/types.js +0 -0
  16. package/dist/{help-hub/pages → cjs/help-chat}/types.js.map +1 -1
  17. package/dist/cjs/help-hub/context/index.d.ts +2 -1
  18. package/dist/cjs/help-hub/context/index.js +1 -1
  19. package/dist/cjs/help-hub/context/index.js.map +1 -1
  20. package/dist/cjs/help-hub/index.d.ts +2 -0
  21. package/dist/cjs/help-hub/index.js +3 -0
  22. package/dist/cjs/help-hub/index.js.map +1 -1
  23. package/dist/cjs/index.d.ts +1 -0
  24. package/dist/cjs/index.js +1 -0
  25. package/dist/cjs/index.js.map +1 -1
  26. package/dist/{article-recommendations → esm/article-recommendations}/components/ArticleRecommendation.d.ts +0 -0
  27. package/dist/esm/article-recommendations/components/ArticleRecommendation.js +14 -0
  28. package/dist/esm/article-recommendations/components/ArticleRecommendation.js.map +1 -0
  29. package/dist/{article-recommendations → esm/article-recommendations}/components/ArticleRecommendationLarge.d.ts +0 -0
  30. package/dist/esm/article-recommendations/components/ArticleRecommendationLarge.js +34 -0
  31. package/dist/esm/article-recommendations/components/ArticleRecommendationLarge.js.map +1 -0
  32. package/dist/{article-recommendations → esm/article-recommendations}/components/ArticleRecommendationSmall.d.ts +0 -0
  33. package/dist/esm/article-recommendations/components/ArticleRecommendationSmall.js +19 -0
  34. package/dist/esm/article-recommendations/components/ArticleRecommendationSmall.js.map +1 -0
  35. package/dist/{article-recommendations → esm/article-recommendations}/components/baseProps.d.ts +0 -0
  36. package/dist/{article-recommendations → esm/article-recommendations}/components/baseProps.js +1 -4
  37. package/dist/esm/article-recommendations/components/baseProps.js.map +1 -0
  38. package/dist/{article-recommendations → esm/article-recommendations}/components/index.d.ts +0 -0
  39. package/dist/esm/article-recommendations/components/index.js +4 -0
  40. package/dist/esm/article-recommendations/components/index.js.map +1 -0
  41. package/dist/{article-recommendations → esm/article-recommendations}/index.d.ts +0 -0
  42. package/dist/esm/article-recommendations/index.js +4 -0
  43. package/dist/esm/article-recommendations/index.js.map +1 -0
  44. package/dist/{article-recommendations → esm/article-recommendations}/provider/index.d.ts +0 -0
  45. package/dist/esm/article-recommendations/provider/index.js +2 -0
  46. package/dist/esm/article-recommendations/provider/index.js.map +1 -0
  47. package/dist/{article-recommendations → esm/article-recommendations}/provider/queries/getRecommendationsQuery.d.ts +0 -0
  48. package/dist/esm/article-recommendations/provider/queries/getRecommendationsQuery.js +8 -0
  49. package/dist/esm/article-recommendations/provider/queries/getRecommendationsQuery.js.map +1 -0
  50. package/dist/{article-recommendations → esm/article-recommendations}/provider/queries/index.d.ts +0 -0
  51. package/dist/esm/article-recommendations/provider/queries/index.js +2 -0
  52. package/dist/esm/article-recommendations/provider/queries/index.js.map +1 -0
  53. package/dist/{article-recommendations → esm/article-recommendations}/provider/recommendationsProvider.d.ts +0 -0
  54. package/dist/{article-recommendations → esm/article-recommendations}/provider/recommendationsProvider.js +5 -9
  55. package/dist/esm/article-recommendations/provider/recommendationsProvider.js.map +1 -0
  56. package/dist/{article-recommendations → esm/article-recommendations}/types/index.d.ts +0 -0
  57. package/dist/esm/article-recommendations/types/index.js +2 -0
  58. package/dist/esm/article-recommendations/types/index.js.map +1 -0
  59. package/dist/{config → esm/config}/index.d.ts +0 -0
  60. package/dist/{config → esm/config}/index.js +2 -5
  61. package/dist/{config → esm/config}/index.js.map +1 -1
  62. package/dist/esm/help-chat/Help.d.ts +5 -0
  63. package/dist/esm/help-chat/Help.js +33 -0
  64. package/dist/esm/help-chat/Help.js.map +1 -0
  65. package/dist/esm/help-chat/chatHelpDefaultOverrides.d.ts +37 -0
  66. package/dist/esm/help-chat/chatHelpDefaultOverrides.js +39 -0
  67. package/dist/esm/help-chat/chatHelpDefaultOverrides.js.map +1 -0
  68. package/dist/esm/help-chat/index.d.ts +2 -0
  69. package/dist/esm/help-chat/index.js +3 -0
  70. package/dist/esm/help-chat/index.js.map +1 -0
  71. package/dist/esm/help-chat/tests/Chat.stories.d.ts +5 -0
  72. package/dist/esm/help-chat/tests/Chat.stories.js +45 -0
  73. package/dist/esm/help-chat/tests/Chat.stories.js.map +1 -0
  74. package/dist/esm/help-chat/types.d.ts +31 -0
  75. package/dist/esm/help-chat/types.js +2 -0
  76. package/dist/esm/help-chat/types.js.map +1 -0
  77. package/dist/{help-hub → esm/help-hub}/components/ContentListView/ContentListView.d.ts +0 -0
  78. package/dist/esm/help-hub/components/ContentListView/ContentListView.js +41 -0
  79. package/dist/esm/help-hub/components/ContentListView/ContentListView.js.map +1 -0
  80. package/dist/{help-hub → esm/help-hub}/components/ContentListView/Introduction.d.ts +0 -0
  81. package/dist/esm/help-hub/components/ContentListView/Introduction.js +29 -0
  82. package/dist/esm/help-hub/components/ContentListView/Introduction.js.map +1 -0
  83. package/dist/{help-hub → esm/help-hub}/components/ContentListView/index.d.ts +0 -0
  84. package/dist/esm/help-hub/components/ContentListView/index.js +2 -0
  85. package/dist/esm/help-hub/components/ContentListView/index.js.map +1 -0
  86. package/dist/{help-hub → esm/help-hub}/components/SearchBar/SearchBar.d.ts +0 -0
  87. package/dist/esm/help-hub/components/SearchBar/SearchBar.js +18 -0
  88. package/dist/esm/help-hub/components/SearchBar/SearchBar.js.map +1 -0
  89. package/dist/{help-hub → esm/help-hub}/components/SearchBar/components/AlgoliaTheme.d.ts +0 -0
  90. package/dist/esm/help-hub/components/SearchBar/components/AlgoliaTheme.js +8 -0
  91. package/dist/esm/help-hub/components/SearchBar/components/AlgoliaTheme.js.map +1 -0
  92. package/dist/{help-hub → esm/help-hub}/components/SearchBar/components/Autocomplete.d.ts +0 -0
  93. package/dist/esm/help-hub/components/SearchBar/components/Autocomplete.js +136 -0
  94. package/dist/esm/help-hub/components/SearchBar/components/Autocomplete.js.map +1 -0
  95. package/dist/{help-hub → esm/help-hub}/components/SearchBar/components/Highlight.d.ts +0 -0
  96. package/dist/esm/help-hub/components/SearchBar/components/Highlight.js +14 -0
  97. package/dist/esm/help-hub/components/SearchBar/components/Highlight.js.map +1 -0
  98. package/dist/{help-hub → esm/help-hub}/components/SearchBar/index.d.ts +0 -0
  99. package/dist/esm/help-hub/components/SearchBar/index.js +2 -0
  100. package/dist/esm/help-hub/components/SearchBar/index.js.map +1 -0
  101. package/dist/{help-hub → esm/help-hub}/components/SearchBar/types.d.ts +0 -0
  102. package/dist/esm/help-hub/components/SearchBar/types.js +2 -0
  103. package/dist/esm/help-hub/components/SearchBar/types.js.map +1 -0
  104. package/dist/{help-hub → esm/help-hub}/components/Templates/LayoutTemplate.d.ts +0 -0
  105. package/dist/esm/help-hub/components/Templates/LayoutTemplate.js +66 -0
  106. package/dist/esm/help-hub/components/Templates/LayoutTemplate.js.map +1 -0
  107. package/dist/{help-hub → esm/help-hub}/components/Templates/index.d.ts +0 -0
  108. package/dist/esm/help-hub/components/Templates/index.js +4 -0
  109. package/dist/esm/help-hub/components/Templates/index.js.map +1 -0
  110. package/dist/{help-hub → esm/help-hub}/components/Templates/types.d.ts +0 -0
  111. package/dist/esm/help-hub/components/Templates/types.js +2 -0
  112. package/dist/esm/help-hub/components/Templates/types.js.map +1 -0
  113. package/dist/{help-hub → esm/help-hub}/context/baseContext.d.ts +0 -0
  114. package/dist/{help-hub → esm/help-hub}/context/baseContext.js +1 -4
  115. package/dist/esm/help-hub/context/baseContext.js.map +1 -0
  116. package/dist/{help-hub → esm/help-hub}/context/index.d.ts +2 -1
  117. package/dist/esm/help-hub/context/index.js +21 -0
  118. package/dist/esm/help-hub/context/index.js.map +1 -0
  119. package/dist/{help-hub → esm/help-hub}/context/types.d.ts +0 -0
  120. package/dist/esm/help-hub/context/types.js +7 -0
  121. package/dist/esm/help-hub/context/types.js.map +1 -0
  122. package/dist/esm/help-hub/index.d.ts +7 -0
  123. package/dist/{help-hub/index.d.ts → esm/help-hub/index.js} +2 -0
  124. package/dist/esm/help-hub/index.js.map +1 -0
  125. package/dist/{help-hub → esm/help-hub}/pages/ArticlePage.d.ts +0 -0
  126. package/dist/esm/help-hub/pages/ArticlePage.js +55 -0
  127. package/dist/esm/help-hub/pages/ArticlePage.js.map +1 -0
  128. package/dist/{help-hub → esm/help-hub}/pages/LandingPage.d.ts +0 -0
  129. package/dist/esm/help-hub/pages/LandingPage.js +80 -0
  130. package/dist/esm/help-hub/pages/LandingPage.js.map +1 -0
  131. package/dist/{help-hub → esm/help-hub}/pages/ResultsPage.d.ts +0 -0
  132. package/dist/esm/help-hub/pages/ResultsPage.js +64 -0
  133. package/dist/esm/help-hub/pages/ResultsPage.js.map +1 -0
  134. package/dist/{help-hub → esm/help-hub}/pages/types.d.ts +0 -0
  135. package/dist/esm/help-hub/pages/types.js +2 -0
  136. package/dist/esm/help-hub/pages/types.js.map +1 -0
  137. package/dist/{help-hub → esm/help-hub}/provider/CredentialsProvider.d.ts +0 -0
  138. package/dist/esm/help-hub/provider/CredentialsProvider.js +14 -0
  139. package/dist/esm/help-hub/provider/CredentialsProvider.js.map +1 -0
  140. package/dist/{help-hub → esm/help-hub}/provider/articleProvider.d.ts +0 -0
  141. package/dist/{help-hub → esm/help-hub}/provider/articleProvider.js +9 -16
  142. package/dist/esm/help-hub/provider/articleProvider.js.map +1 -0
  143. package/dist/{help-hub → esm/help-hub}/provider/getHelpHubConfig.d.ts +0 -0
  144. package/dist/esm/help-hub/provider/getHelpHubConfig.js +13 -0
  145. package/dist/esm/help-hub/provider/getHelpHubConfig.js.map +1 -0
  146. package/dist/{help-hub → esm/help-hub}/provider/index.d.ts +0 -0
  147. package/dist/esm/help-hub/provider/index.js +5 -0
  148. package/dist/esm/help-hub/provider/index.js.map +1 -0
  149. package/dist/{help-hub → esm/help-hub}/provider/resultsProvider.d.ts +0 -0
  150. package/dist/{help-hub → esm/help-hub}/provider/resultsProvider.js +9 -16
  151. package/dist/esm/help-hub/provider/resultsProvider.js.map +1 -0
  152. package/dist/{help-hub → esm/help-hub}/provider/types.d.ts +0 -0
  153. package/dist/esm/help-hub/provider/types.js +10 -0
  154. package/dist/esm/help-hub/provider/types.js.map +1 -0
  155. package/dist/{help-hub → esm/help-hub}/test-helpers/articlePageContextOptionsMock.d.ts +0 -0
  156. package/dist/esm/help-hub/test-helpers/articlePageContextOptionsMock.js +14 -0
  157. package/dist/esm/help-hub/test-helpers/articlePageContextOptionsMock.js.map +1 -0
  158. package/dist/{help-hub → esm/help-hub}/test-helpers/index.d.ts +0 -0
  159. package/dist/esm/help-hub/test-helpers/index.js +3 -0
  160. package/dist/esm/help-hub/test-helpers/index.js.map +1 -0
  161. package/dist/{help-hub → esm/help-hub}/test-helpers/landingPageContextOptionsMock.d.ts +0 -0
  162. package/dist/{help-hub → esm/help-hub}/test-helpers/landingPageContextOptionsMock.js +4 -7
  163. package/dist/esm/help-hub/test-helpers/landingPageContextOptionsMock.js.map +1 -0
  164. package/dist/{help-hub → esm/help-hub}/test-helpers/mocks.d.ts +0 -0
  165. package/dist/esm/help-hub/test-helpers/mocks.js +12 -0
  166. package/dist/esm/help-hub/test-helpers/mocks.js.map +1 -0
  167. package/dist/{help-hub → esm/help-hub}/test-helpers/resultsPageContextOptionsMock.d.ts +0 -0
  168. package/dist/{help-hub → esm/help-hub}/test-helpers/resultsPageContextOptionsMock.js +2 -5
  169. package/dist/esm/help-hub/test-helpers/resultsPageContextOptionsMock.js.map +1 -0
  170. package/dist/{help-hub → esm/help-hub}/test-helpers/sharedMocks.d.ts +0 -0
  171. package/dist/{help-hub → esm/help-hub}/test-helpers/sharedMocks.js +1 -4
  172. package/dist/esm/help-hub/test-helpers/sharedMocks.js.map +1 -0
  173. package/dist/{help-hub → esm/help-hub}/types/index.d.ts +0 -0
  174. package/dist/esm/help-hub/types/index.js +2 -0
  175. package/dist/{help-hub → esm/help-hub}/types/index.js.map +1 -1
  176. package/dist/{helpers → esm/helpers}/setupTests.d.ts +0 -0
  177. package/dist/esm/helpers/setupTests.js +2 -0
  178. package/dist/esm/helpers/setupTests.js.map +1 -0
  179. package/dist/{helpers → esm/helpers}/testHelpers.d.ts +0 -0
  180. package/dist/esm/helpers/testHelpers.js +51 -0
  181. package/dist/esm/helpers/testHelpers.js.map +1 -0
  182. package/dist/{index.d.ts → esm/index.d.ts} +1 -0
  183. package/dist/esm/index.js +4 -0
  184. package/dist/esm/index.js.map +1 -0
  185. package/package.json +2 -2
  186. package/dist/article-recommendations/components/ArticleRecommendation.js +0 -19
  187. package/dist/article-recommendations/components/ArticleRecommendation.js.map +0 -1
  188. package/dist/article-recommendations/components/ArticleRecommendationLarge.js +0 -58
  189. package/dist/article-recommendations/components/ArticleRecommendationLarge.js.map +0 -1
  190. package/dist/article-recommendations/components/ArticleRecommendationSmall.js +0 -43
  191. package/dist/article-recommendations/components/ArticleRecommendationSmall.js.map +0 -1
  192. package/dist/article-recommendations/components/baseProps.js.map +0 -1
  193. package/dist/article-recommendations/components/index.js +0 -20
  194. package/dist/article-recommendations/components/index.js.map +0 -1
  195. package/dist/article-recommendations/index.js +0 -16
  196. package/dist/article-recommendations/index.js.map +0 -1
  197. package/dist/article-recommendations/provider/index.js +0 -14
  198. package/dist/article-recommendations/provider/index.js.map +0 -1
  199. package/dist/article-recommendations/provider/queries/getRecommendationsQuery.js +0 -11
  200. package/dist/article-recommendations/provider/queries/getRecommendationsQuery.js.map +0 -1
  201. package/dist/article-recommendations/provider/queries/index.js +0 -14
  202. package/dist/article-recommendations/provider/queries/index.js.map +0 -1
  203. package/dist/article-recommendations/provider/recommendationsProvider.js.map +0 -1
  204. package/dist/article-recommendations/types/index.js +0 -3
  205. package/dist/article-recommendations/types/index.js.map +0 -1
  206. package/dist/help-hub/components/ContentListView/ContentListView.js +0 -34
  207. package/dist/help-hub/components/ContentListView/ContentListView.js.map +0 -1
  208. package/dist/help-hub/components/ContentListView/Introduction.js +0 -33
  209. package/dist/help-hub/components/ContentListView/Introduction.js.map +0 -1
  210. package/dist/help-hub/components/ContentListView/index.js.map +0 -1
  211. package/dist/help-hub/components/SearchBar/SearchBar.js +0 -25
  212. package/dist/help-hub/components/SearchBar/SearchBar.js.map +0 -1
  213. package/dist/help-hub/components/SearchBar/components/AlgoliaTheme.js +0 -11
  214. package/dist/help-hub/components/SearchBar/components/AlgoliaTheme.js.map +0 -1
  215. package/dist/help-hub/components/SearchBar/components/Autocomplete.js +0 -162
  216. package/dist/help-hub/components/SearchBar/components/Autocomplete.js.map +0 -1
  217. package/dist/help-hub/components/SearchBar/components/Highlight.js +0 -18
  218. package/dist/help-hub/components/SearchBar/components/Highlight.js.map +0 -1
  219. package/dist/help-hub/components/SearchBar/index.js +0 -14
  220. package/dist/help-hub/components/SearchBar/index.js.map +0 -1
  221. package/dist/help-hub/components/SearchBar/types.js.map +0 -1
  222. package/dist/help-hub/components/Templates/LayoutTemplate.js +0 -74
  223. package/dist/help-hub/components/Templates/LayoutTemplate.js.map +0 -1
  224. package/dist/help-hub/components/Templates/index.js +0 -16
  225. package/dist/help-hub/components/Templates/index.js.map +0 -1
  226. package/dist/help-hub/components/Templates/types.js +0 -3
  227. package/dist/help-hub/components/Templates/types.js.map +0 -1
  228. package/dist/help-hub/context/baseContext.js.map +0 -1
  229. package/dist/help-hub/context/index.js +0 -49
  230. package/dist/help-hub/context/index.js.map +0 -1
  231. package/dist/help-hub/context/types.js +0 -10
  232. package/dist/help-hub/context/types.js.map +0 -1
  233. package/dist/help-hub/index.js +0 -18
  234. package/dist/help-hub/index.js.map +0 -1
  235. package/dist/help-hub/pages/ArticlePage.js +0 -63
  236. package/dist/help-hub/pages/ArticlePage.js.map +0 -1
  237. package/dist/help-hub/pages/LandingPage.js +0 -87
  238. package/dist/help-hub/pages/LandingPage.js.map +0 -1
  239. package/dist/help-hub/pages/ResultsPage.js +0 -71
  240. package/dist/help-hub/pages/ResultsPage.js.map +0 -1
  241. package/dist/help-hub/pages/types.js +0 -3
  242. package/dist/help-hub/provider/CredentialsProvider.js +0 -38
  243. package/dist/help-hub/provider/CredentialsProvider.js.map +0 -1
  244. package/dist/help-hub/provider/articleProvider.js.map +0 -1
  245. package/dist/help-hub/provider/getHelpHubConfig.js +0 -17
  246. package/dist/help-hub/provider/getHelpHubConfig.js.map +0 -1
  247. package/dist/help-hub/provider/index.js +0 -17
  248. package/dist/help-hub/provider/index.js.map +0 -1
  249. package/dist/help-hub/provider/resultsProvider.js.map +0 -1
  250. package/dist/help-hub/provider/types.js +0 -13
  251. package/dist/help-hub/provider/types.js.map +0 -1
  252. package/dist/help-hub/test-helpers/articlePageContextOptionsMock.js +0 -17
  253. package/dist/help-hub/test-helpers/articlePageContextOptionsMock.js.map +0 -1
  254. package/dist/help-hub/test-helpers/index.js +0 -9
  255. package/dist/help-hub/test-helpers/index.js.map +0 -1
  256. package/dist/help-hub/test-helpers/landingPageContextOptionsMock.js.map +0 -1
  257. package/dist/help-hub/test-helpers/mocks.js +0 -14
  258. package/dist/help-hub/test-helpers/mocks.js.map +0 -1
  259. package/dist/help-hub/test-helpers/resultsPageContextOptionsMock.js.map +0 -1
  260. package/dist/help-hub/test-helpers/sharedMocks.js.map +0 -1
  261. package/dist/help-hub/types/index.js +0 -3
  262. package/dist/helpers/setupTests.js +0 -4
  263. package/dist/helpers/setupTests.js.map +0 -1
  264. package/dist/helpers/testHelpers.js +0 -59
  265. package/dist/helpers/testHelpers.js.map +0 -1
  266. package/dist/index.js +0 -15
  267. package/dist/index.js.map +0 -1
@@ -0,0 +1,19 @@
1
+ import React, { useMemo } from 'react';
2
+ import { Card, Headline } from 'newskit';
3
+ import merge from 'lodash.merge';
4
+ import { siteHost } from '../../config';
5
+ import { baseProps } from './baseProps';
6
+ var ArticleRecommendationSmall = function (_a) {
7
+ var article = _a.article, overrides = _a.overrides;
8
+ var href = article.href, title = article.title;
9
+ var finalProps = useMemo(function () { return merge({}, baseProps.articleRecommendationSmall, overrides); }, [overrides]);
10
+ return (React.createElement(Card, { href: "" + siteHost, layout: "horizontal", media: {
11
+ src: href,
12
+ alt: 'Card Media',
13
+ loadingAspectRatio: '3:2',
14
+ overrides: finalProps.card.media.overrides,
15
+ }, overrides: finalProps.card.overrides },
16
+ React.createElement(Headline, { headingAs: "h4", overrides: finalProps.headline.overrides }, title)));
17
+ };
18
+ export default ArticleRecommendationSmall;
19
+ //# sourceMappingURL=ArticleRecommendationSmall.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArticleRecommendationSmall.js","sourceRoot":"","sources":["../../../../src/article-recommendations/components/ArticleRecommendationSmall.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,KAAK,MAAM,cAAc,CAAA;AAEhC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,IAAM,0BAA0B,GAG3B,UAAC,EAAsB;QAApB,OAAO,aAAA,EAAE,SAAS,eAAA;IAChB,IAAA,IAAI,GAAY,OAAO,KAAnB,EAAE,KAAK,GAAK,OAAO,MAAZ,CAAY;IAC/B,IAAM,UAAU,GAAG,OAAO,CACxB,cAAM,OAAA,KAAK,CAAC,EAAE,EAAE,SAAS,CAAC,0BAA0B,EAAE,SAAS,CAAC,EAA1D,CAA0D,EAChE,CAAC,SAAS,CAAC,CACZ,CAAA;IAED,OAAO,CACL,oBAAC,IAAI,IACH,IAAI,EAAE,KAAG,QAAU,EACnB,MAAM,EAAC,YAAY,EACnB,KAAK,EAAE;YACL,GAAG,EAAE,IAAI;YACT,GAAG,EAAE,YAAY;YACjB,kBAAkB,EAAE,KAAK;YACzB,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS;SAC3C,EACD,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS;QAEpC,oBAAC,QAAQ,IAAC,SAAS,EAAC,IAAI,EAAC,SAAS,EAAE,UAAU,CAAC,QAAQ,CAAC,SAAS,IAC9D,KAAK,CACG,CACN,CACR,CAAA;AACH,CAAC,CAAA;AAED,eAAe,0BAA0B,CAAA"}
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.baseProps = void 0;
4
- exports.baseProps = {
1
+ export var baseProps = {
5
2
  articleRecommendationLarge: {
6
3
  card: {
7
4
  overrides: {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseProps.js","sourceRoot":"","sources":["../../../../src/article-recommendations/components/baseProps.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,SAAS,GAAG;IACvB,0BAA0B,EAAE;QAC1B,IAAI,EAAE;YACJ,SAAS,EAAE;gBACT,WAAW,EAAE,eAAe;gBAC5B,cAAc,EAAE;oBACd,WAAW,EAAE,UAAU;iBACxB;aACF;SACF;QACD,UAAU,EAAE,UAAU;QACtB,QAAQ,EAAE;YACR,UAAU,EAAE;gBACV,EAAE,EAAE,UAAU;gBACd,EAAE,EAAE,UAAU;aACf;YACD,SAAS,EAAE;gBACT,gBAAgB,EAAE;oBAChB,EAAE,EAAE,sBAAsB;oBAC1B,EAAE,EAAE,sBAAsB;oBAC1B,EAAE,EAAE,sBAAsB;iBAC3B;aACF;SACF;QACD,IAAI,EAAE;YACJ,UAAU,EAAE;gBACV,EAAE,EAAE,UAAU;gBACd,EAAE,EAAE,UAAU;aACf;YACD,SAAS,EAAE;gBACT,WAAW,EAAE,aAAa;gBAC1B,gBAAgB,EAAE;oBAChB,EAAE,EAAE,uBAAuB;oBAC3B,EAAE,EAAE,uBAAuB;iBAC5B;aACF;SACF;KACF;IACD,0BAA0B,EAAE;QAC1B,IAAI,EAAE;YACJ,SAAS,EAAE;gBACT,WAAW,EAAE,eAAe;gBAC5B,cAAc,EAAE;oBACd,WAAW,EAAE,UAAU;iBACxB;aACF;YACD,KAAK,EAAE;gBACL,SAAS,EAAE;oBACT,KAAK,EAAE,OAAO;oBACd,MAAM,EAAE,OAAO;iBAChB;aACF;SACF;QACD,QAAQ,EAAE;YACR,SAAS,EAAE;gBACT,gBAAgB,EAAE;oBAChB,EAAE,EAAE,sBAAsB;oBAC1B,EAAE,EAAE,sBAAsB;iBAC3B;aACF;SACF;KACF;CACF,CAAA"}
@@ -0,0 +1,4 @@
1
+ import ArticleRecommendation from './ArticleRecommendation';
2
+ export * from './baseProps';
3
+ export { ArticleRecommendation };
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/article-recommendations/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,yBAAyB,CAAA;AAE3D,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './components';
2
+ export * from './provider';
3
+ export * from './types';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/article-recommendations/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './recommendationsProvider';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/article-recommendations/provider/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA"}
@@ -0,0 +1,8 @@
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
+ import { gql } from '@apollo/client';
6
+ export var GET_RECOMMENDATIONS = gql(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query getRecommendedArticles(\n $recomArgs: RecommendationsParameters!\n $publisher: Publisher!\n ) {\n recommendations(publisher: $publisher, recomArgs: $recomArgs) {\n feedbackId\n articles {\n headline\n kicker\n url\n media {\n ... on Image {\n crops(\n cropsArguments: [\n { ratio: THREE_BY_TWO, maxPhysicalWidth: 150 }\n { ratio: THREE_BY_TWO, maxPhysicalWidth: 620 }\n ]\n ) {\n url\n alt\n width\n height\n }\n }\n ... on Video {\n posterImage {\n crops {\n url\n }\n }\n }\n }\n }\n }\n }\n"], ["\n query getRecommendedArticles(\n $recomArgs: RecommendationsParameters!\n $publisher: Publisher!\n ) {\n recommendations(publisher: $publisher, recomArgs: $recomArgs) {\n feedbackId\n articles {\n headline\n kicker\n url\n media {\n ... on Image {\n crops(\n cropsArguments: [\n { ratio: THREE_BY_TWO, maxPhysicalWidth: 150 }\n { ratio: THREE_BY_TWO, maxPhysicalWidth: 620 }\n ]\n ) {\n url\n alt\n width\n height\n }\n }\n ... on Video {\n posterImage {\n crops {\n url\n }\n }\n }\n }\n }\n }\n }\n"])));
7
+ var templateObject_1;
8
+ //# sourceMappingURL=getRecommendationsQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getRecommendationsQuery.js","sourceRoot":"","sources":["../../../../../src/article-recommendations/provider/queries/getRecommendationsQuery.ts"],"names":[],"mappings":";;;;AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAEpC,MAAM,CAAC,IAAM,mBAAmB,GAAG,GAAG,42BAAA,yyBAoCrC,IAAA,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './getRecommendationsQuery';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/article-recommendations/provider/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA"}
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
2
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
3
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -35,21 +34,19 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
35
34
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
35
  }
37
36
  };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.recommendationsProvider = void 0;
40
- var api_1 = require("@newskit-render/api");
41
- var queries_1 = require("./queries");
42
- var recommendationsProvider = function (_a) {
37
+ import { createApolloClient, ClientTypes } from '@newskit-render/api';
38
+ import { GET_RECOMMENDATIONS } from './queries';
39
+ export var recommendationsProvider = function (_a) {
43
40
  var articleId = _a.articleId, publisher = _a.publisher, userId = _a.userId;
44
41
  return __awaiter(void 0, void 0, void 0, function () {
45
42
  var apolloClient, response, recommendedArticles;
46
43
  return __generator(this, function (_b) {
47
44
  switch (_b.label) {
48
- case 0: return [4 /*yield*/, (0, api_1.createApolloClient)(api_1.ClientTypes.nkapi)];
45
+ case 0: return [4 /*yield*/, createApolloClient(ClientTypes.nkapi)];
49
46
  case 1:
50
47
  apolloClient = _b.sent();
51
48
  return [4 /*yield*/, apolloClient.query({
52
- query: queries_1.GET_RECOMMENDATIONS,
49
+ query: GET_RECOMMENDATIONS,
53
50
  variables: { publisher: publisher, recomArgs: { articleId: articleId, userId: userId } },
54
51
  })];
55
52
  case 2:
@@ -70,5 +67,4 @@ var recommendationsProvider = function (_a) {
70
67
  });
71
68
  });
72
69
  };
73
- exports.recommendationsProvider = recommendationsProvider;
74
70
  //# sourceMappingURL=recommendationsProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recommendationsProvider.js","sourceRoot":"","sources":["../../../../src/article-recommendations/provider/recommendationsProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAG/C,MAAM,CAAC,IAAM,uBAAuB,GAAG,UAAO,EAI/B;QAHb,SAAS,eAAA,EACT,SAAS,eAAA,EACT,MAAM,YAAA;;;;;wBAEe,qBAAM,kBAAkB,CAAC,WAAW,CAAC,KAAK,CAAC,EAAA;;oBAA1D,YAAY,GAAG,SAA2C;oBAC/C,qBAAM,YAAY,CAAC,KAAK,CAAC;4BACxC,KAAK,EAAE,mBAAmB;4BAC1B,SAAS,EAAE,EAAE,SAAS,WAAA,EAAE,SAAS,EAAE,EAAE,SAAS,WAAA,EAAE,MAAM,QAAA,EAAE,EAAE;yBAC3D,CAAC,EAAA;;oBAHI,QAAQ,GAAG,SAGf;oBAEI,mBAAmB,GAAG,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,GAAG,CACpE,UAAC,OAAO;;wBAAK,OAAA,CAAC;4BACZ,KAAK,EAAE,OAAO,CAAC,MAAM;4BACrB,GAAG,EAAE,OAAO,CAAC,MAAM;4BACnB,IAAI,EAAE,OAAO,CAAC,QAAQ;4BACtB,IAAI,EACF,CAAA,MAAA,MAAA,MAAA,MAAA,OAAO,CAAC,KAAK,0CAAE,WAAW,0CAAE,KAAK,0CAAG,CAAC,CAAC,0CAAE,GAAG;iCAC3C,MAAA,MAAA,MAAA,OAAO,CAAC,KAAK,0CAAE,KAAK,0CAAG,CAAC,CAAC,0CAAE,GAAG,CAAA;gCAC9B,IAAI;yBACP,CAAC,CAAA;qBAAA,CACH,CAAA;oBAED,sBAAO,mBAAmB,EAAA;;;;CAC3B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/article-recommendations/types/index.ts"],"names":[],"mappings":""}
File without changes
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.algoliaUrl = exports.algoliaIndex = exports.algoliaAppId = exports.algoliaApiKey = exports.siteHost = void 0;
4
1
  var requiredConfigFields = ['SITE_HOST'];
5
2
  var getSanitizedConfig = function () {
6
3
  for (var _i = 0, requiredConfigFields_1 = requiredConfigFields; _i < requiredConfigFields_1.length; _i++) {
@@ -19,6 +16,6 @@ var getSanitizedConfig = function () {
19
16
  };
20
17
  };
21
18
  var sanitizedConfig = getSanitizedConfig();
22
- exports.siteHost = sanitizedConfig.siteHost, exports.algoliaApiKey = sanitizedConfig.algoliaApiKey, exports.algoliaAppId = sanitizedConfig.algoliaAppId, exports.algoliaIndex = sanitizedConfig.algoliaIndex;
23
- exports.algoliaUrl = "https://" + exports.algoliaAppId + ".algolia.net/1/indexes/" + exports.algoliaIndex;
19
+ export var siteHost = sanitizedConfig.siteHost, algoliaApiKey = sanitizedConfig.algoliaApiKey, algoliaAppId = sanitizedConfig.algoliaAppId, algoliaIndex = sanitizedConfig.algoliaIndex;
20
+ export var algoliaUrl = "https://" + algoliaAppId + ".algolia.net/1/indexes/" + algoliaIndex;
24
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";;;AAAA,IAAM,oBAAoB,GAAa,CAAC,WAAW,CAAC,CAAA;AAEpD,IAAM,kBAAkB,GAAG;IACzB,KAAkB,UAAoB,EAApB,6CAAoB,EAApB,kCAAoB,EAApB,IAAoB,EAAE;QAAnC,IAAM,GAAG,6BAAA;QACZ,IAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAC9B,IACE,OAAO,MAAM,IAAI,WAAW;YAC5B,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC,EAC1C;YACA,MAAM,IAAI,KAAK,CAAC,iBAAe,GAAG,YAAS,CAAC,CAAA;SAC7C;KACF;IACD,OAAO;QACL,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,SAAmB;QACzC,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,eAAyB;QACpD,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,cAAwB;QAClD,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,aAAuB;KAClD,CAAA;AACH,CAAC,CAAA;AAED,IAAM,eAAe,GAAG,kBAAkB,EAAE,CAAA;AAE1C,QAAA,QAAQ,GAIN,eAAe,WAHjB,QAAA,aAAa,GAGX,eAAe,gBAFjB,QAAA,YAAY,GAEV,eAAe,eADjB,QAAA,YAAY,GACV,eAAe,cAAA;AAEN,QAAA,UAAU,GAAG,aAAW,oBAAY,+BAA0B,oBAAc,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,IAAM,oBAAoB,GAAa,CAAC,WAAW,CAAC,CAAA;AAEpD,IAAM,kBAAkB,GAAG;IACzB,KAAkB,UAAoB,EAApB,6CAAoB,EAApB,kCAAoB,EAApB,IAAoB,EAAE;QAAnC,IAAM,GAAG,6BAAA;QACZ,IAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAC9B,IACE,OAAO,MAAM,IAAI,WAAW;YAC5B,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC,EAC1C;YACA,MAAM,IAAI,KAAK,CAAC,iBAAe,GAAG,YAAS,CAAC,CAAA;SAC7C;KACF;IACD,OAAO;QACL,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,SAAmB;QACzC,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,eAAyB;QACpD,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,cAAwB;QAClD,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,aAAuB;KAClD,CAAA;AACH,CAAC,CAAA;AAED,IAAM,eAAe,GAAG,kBAAkB,EAAE,CAAA;AAC5C,MAAM,CACJ,IAAA,QAAQ,GAIN,eAAe,SAJT,EACR,aAAa,GAGX,eAAe,cAHJ,EACb,YAAY,GAEV,eAAe,aAFL,EACZ,YAAY,GACV,eAAe,aADL,CACK;AAEnB,MAAM,CAAC,IAAM,UAAU,GAAG,aAAW,YAAY,+BAA0B,YAAc,CAAA"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ChatHelpOverrides } from './types';
3
+ export declare const Help: React.FC<{
4
+ chatHelpOverrides?: ChatHelpOverrides;
5
+ }>;
@@ -0,0 +1,33 @@
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 { TextBlock, styled, getColorCssFromTheme, Headline, GridLayout, Button, } from 'newskit';
18
+ import { chatHelpOverridesDefault } from './chatHelpDefaultOverrides';
19
+ var StyledGridLayout = styled(GridLayout)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n text-align: center;\n"], ["\n ", "\n text-align: center;\n"])), getColorCssFromTheme('background', 'interface030'));
20
+ export var Help = function (_a) {
21
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
22
+ var _l = _a.chatHelpOverrides, chatHelpOverrides = _l === void 0 ? chatHelpOverridesDefault : _l;
23
+ return (React.createElement(StyledGridLayout, __assign({}, chatHelpOverrides.gridLayoutOverrides),
24
+ chatHelpOverrides.icon,
25
+ React.createElement(Headline, { overrides: (_b = chatHelpOverrides.helpHeadline) === null || _b === void 0 ? void 0 : _b.overrides }, (_c = chatHelpOverrides.helpHeadline) === null || _c === void 0 ? void 0 : _c.text),
26
+ React.createElement(TextBlock, __assign({}, (_d = chatHelpOverrides.helpHeadline) === null || _d === void 0 ? void 0 : _d.overrides), (_e = chatHelpOverrides.helpSubheadline) === null || _e === void 0 ? void 0 : _e.text),
27
+ React.createElement(Button, { onClick: (_f = chatHelpOverrides.buttonOverrides) === null || _f === void 0 ? void 0 : _f.onClick, size: (_g = chatHelpOverrides.buttonOverrides) === null || _g === void 0 ? void 0 : _g.size, overrides: {
28
+ minWidth: (_h = chatHelpOverrides.buttonOverrides) === null || _h === void 0 ? void 0 : _h.minWidth,
29
+ stylePreset: (_j = chatHelpOverrides.buttonOverrides) === null || _j === void 0 ? void 0 : _j.stylePreset,
30
+ } }, (_k = chatHelpOverrides.buttonOverrides) === null || _k === void 0 ? void 0 : _k.text)));
31
+ };
32
+ var templateObject_1;
33
+ //# sourceMappingURL=Help.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Help.js","sourceRoot":"","sources":["../../../src/help-chat/Help.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EACL,SAAS,EACT,MAAM,EACN,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,MAAM,GACP,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,IAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,sGAAA,MACvC,EAAkD,2BAErD,KAFG,oBAAoB,CAAC,YAAY,EAAE,cAAc,CAAC,CAErD,CAAA;AAED,MAAM,CAAC,IAAM,IAAI,GAEZ,UAAC,EAAgD;;QAA9C,yBAA4C,EAA5C,iBAAiB,mBAAG,wBAAwB,KAAA;IAClD,OAAO,CACL,oBAAC,gBAAgB,eAAK,iBAAiB,CAAC,mBAAmB;QACxD,iBAAiB,CAAC,IAAI;QACvB,oBAAC,QAAQ,IAAC,SAAS,EAAE,MAAA,iBAAiB,CAAC,YAAY,0CAAE,SAAS,IAC3D,MAAA,iBAAiB,CAAC,YAAY,0CAAE,IAAI,CAC5B;QAEX,oBAAC,SAAS,eAAK,MAAA,iBAAiB,CAAC,YAAY,0CAAE,SAAS,GACrD,MAAA,iBAAiB,CAAC,eAAe,0CAAE,IAAI,CAC9B;QACZ,oBAAC,MAAM,IACL,OAAO,EAAE,MAAA,iBAAiB,CAAC,eAAe,0CAAE,OAAO,EACnD,IAAI,EAAE,MAAA,iBAAiB,CAAC,eAAe,0CAAE,IAAI,EAC7C,SAAS,EAAE;gBACT,QAAQ,EAAE,MAAA,iBAAiB,CAAC,eAAe,0CAAE,QAAQ;gBACrD,WAAW,EAAE,MAAA,iBAAiB,CAAC,eAAe,0CAAE,WAAW;aAC5D,IAEA,MAAA,iBAAiB,CAAC,eAAe,0CAAE,IAAI,CACjC,CACQ,CACpB,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,37 @@
1
+ import { ButtonSize } from 'newskit';
2
+ export declare const chatHelpOverridesDefault: {
3
+ icon: JSX.Element;
4
+ buttonOverrides: {
5
+ text: string;
6
+ size: ButtonSize;
7
+ stylePreset: string;
8
+ minWidth: {
9
+ xs: string;
10
+ sm: string;
11
+ };
12
+ onClick: undefined;
13
+ };
14
+ helpHeadline: {
15
+ text: string;
16
+ overrides: {
17
+ typographyPreset: string;
18
+ };
19
+ };
20
+ helpSubheadline: {
21
+ text: string;
22
+ overrides: {
23
+ typographyPreset: string;
24
+ stylePreset: string;
25
+ paddingInline: string;
26
+ };
27
+ };
28
+ gridLayoutOverrides: {
29
+ rowGap: string;
30
+ justifyItems: string;
31
+ alignContent: string;
32
+ overrides: {
33
+ paddingBlock: string;
34
+ paddingInline: string;
35
+ };
36
+ };
37
+ };
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import { ButtonSize, IconFilledChat } from 'newskit';
3
+ export var chatHelpOverridesDefault = {
4
+ icon: (React.createElement(IconFilledChat, { overrides: {
5
+ size: 'iconSize030',
6
+ stylePreset: 'inkContrast',
7
+ } })),
8
+ buttonOverrides: {
9
+ text: 'Chat now',
10
+ size: ButtonSize.Small,
11
+ stylePreset: 'buttonOutlinedSecondary',
12
+ minWidth: { xs: '100%', sm: 'sizing100' },
13
+ onClick: undefined,
14
+ },
15
+ helpHeadline: {
16
+ text: 'Need help?',
17
+ overrides: {
18
+ typographyPreset: 'utilityHeading030',
19
+ },
20
+ },
21
+ helpSubheadline: {
22
+ text: 'Get a quick response from our team members',
23
+ overrides: {
24
+ typographyPreset: 'utilitySubheading020',
25
+ stylePreset: 'inkBase',
26
+ paddingInline: 'space050',
27
+ },
28
+ },
29
+ gridLayoutOverrides: {
30
+ rowGap: 'space050',
31
+ justifyItems: 'center',
32
+ alignContent: 'start',
33
+ overrides: {
34
+ paddingBlock: 'space050',
35
+ paddingInline: 'space050',
36
+ },
37
+ },
38
+ };
39
+ //# sourceMappingURL=chatHelpDefaultOverrides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatHelpDefaultOverrides.js","sourceRoot":"","sources":["../../../src/help-chat/chatHelpDefaultOverrides.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAEpD,MAAM,CAAC,IAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,CACJ,oBAAC,cAAc,IACb,SAAS,EAAE;YACT,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,aAAa;SAC3B,GACD,CACH;IACD,eAAe,EAAE;QACf,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,UAAU,CAAC,KAAK;QACtB,WAAW,EAAE,yBAAyB;QACtC,QAAQ,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE;QACzC,OAAO,EAAE,SAAS;KACnB;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACT,gBAAgB,EAAE,mBAAmB;SACtC;KACF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,4CAA4C;QAClD,SAAS,EAAE;YACT,gBAAgB,EAAE,sBAAsB;YACxC,WAAW,EAAE,SAAS;YACtB,aAAa,EAAE,UAAU;SAC1B;KACF;IACD,mBAAmB,EAAE;QACnB,MAAM,EAAE,UAAU;QAClB,YAAY,EAAE,QAAQ;QACtB,YAAY,EAAE,OAAO;QACrB,SAAS,EAAE;YACT,YAAY,EAAE,UAAU;YACxB,aAAa,EAAE,UAAU;SAC1B;KACF;CACF,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './Help';
2
+ export * from './types';
@@ -0,0 +1,3 @@
1
+ export * from './Help';
2
+ export * from './types';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/help-chat/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ declare const _default: Meta<import("@storybook/react").Args>;
3
+ export default _default;
4
+ export declare const Primary: Story;
5
+ export declare const WithoutOverrides: Story;
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import { Help } from '../Help';
3
+ import { ButtonSize, IconFilledChat } from 'newskit';
4
+ export default {
5
+ title: 'Components/ChatHelp',
6
+ component: Help,
7
+ };
8
+ export var Primary = function (args) { return (React.createElement(Help, { chatHelpOverrides: args })); };
9
+ Primary.args = {
10
+ icon: (React.createElement(IconFilledChat, { overrides: {
11
+ size: 'iconSize030',
12
+ stylePreset: 'inkContrast',
13
+ } })),
14
+ buttonOverrides: {
15
+ text: 'Chat now',
16
+ size: ButtonSize.Small,
17
+ stylePreset: 'buttonOutlinedSecondary',
18
+ minWidth: { xs: '100%', sm: 'sizing100' },
19
+ },
20
+ helpHeadline: {
21
+ text: 'Need help?',
22
+ overrides: {
23
+ typographyPreset: 'utilityHeading030',
24
+ },
25
+ },
26
+ helpSubheadline: {
27
+ text: 'Get a quick response from our team members',
28
+ overrides: {
29
+ typographyPreset: 'utilitySubheading020',
30
+ stylePreset: 'inkBase',
31
+ paddingInline: 'space050',
32
+ },
33
+ },
34
+ gridLayoutOverrides: {
35
+ rowGap: 'space050',
36
+ justifyItems: 'center',
37
+ alignContent: 'start',
38
+ overrides: {
39
+ paddingBlock: 'space050',
40
+ paddingInline: 'space050',
41
+ },
42
+ },
43
+ };
44
+ export var WithoutOverrides = function () { return React.createElement(Help, null); };
45
+ //# sourceMappingURL=Chat.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chat.stories.js","sourceRoot":"","sources":["../../../../src/help-chat/tests/Chat.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAEpD,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,IAAI;CACR,CAAA;AAET,MAAM,CAAC,IAAM,OAAO,GAAU,UAAC,IAAuB,IAAK,OAAA,CACzD,oBAAC,IAAI,IAAC,iBAAiB,EAAE,IAAI,GAAI,CAClC,EAF0D,CAE1D,CAAA;AAED,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,CACJ,oBAAC,cAAc,IACb,SAAS,EAAE;YACT,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,aAAa;SAC3B,GACD,CACH;IACD,eAAe,EAAE;QACf,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,UAAU,CAAC,KAAK;QACtB,WAAW,EAAE,yBAAyB;QACtC,QAAQ,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE;KAC1C;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACT,gBAAgB,EAAE,mBAAmB;SACtC;KACF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,4CAA4C;QAClD,SAAS,EAAE;YACT,gBAAgB,EAAE,sBAAsB;YACxC,WAAW,EAAE,SAAS;YACtB,aAAa,EAAE,UAAU;SAC1B;KACF;IACD,mBAAmB,EAAE;QACnB,MAAM,EAAE,UAAU;QAClB,YAAY,EAAE,QAAQ;QACtB,YAAY,EAAE,OAAO;QACrB,SAAS,EAAE;YACT,YAAY,EAAE,UAAU;YACxB,aAAa,EAAE,UAAU;SAC1B;KACF;CACF,CAAA;AAED,MAAM,CAAC,IAAM,gBAAgB,GAAU,cAAM,OAAA,oBAAC,IAAI,OAAG,EAAR,CAAQ,CAAA"}
@@ -0,0 +1,31 @@
1
+ import { MQ, ButtonSize, TextBlockProps } from 'newskit';
2
+ import { ReactNode } from 'react';
3
+ export declare type ChatHelpOverrides = {
4
+ icon?: ReactNode;
5
+ buttonOverrides?: {
6
+ size?: ButtonSize;
7
+ minWidth?: MQ<string>;
8
+ stylePreset?: MQ<string>;
9
+ text: string;
10
+ onClick?: () => void;
11
+ };
12
+ helpHeadline?: {
13
+ text: string;
14
+ overrides?: {
15
+ typographyPreset?: MQ<string>;
16
+ };
17
+ };
18
+ helpSubheadline?: {
19
+ text: string;
20
+ overrides?: TextBlockProps;
21
+ };
22
+ gridLayoutOverrides?: {
23
+ rowGap?: MQ<string>;
24
+ justifyItems?: MQ<string>;
25
+ alignContent?: MQ<string>;
26
+ overrides?: {
27
+ paddingBlock?: MQ<string>;
28
+ paddingInline?: MQ<string>;
29
+ };
30
+ };
31
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/help-chat/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,41 @@
1
+ //TODO: Move ContentViewList to shared-components
2
+ /* istanbul ignore file */
3
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
4
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
5
+ return cooked;
6
+ };
7
+ import React from 'react';
8
+ import {
9
+ // GridLayout,
10
+ // GridLayoutItem,
11
+ // Button,
12
+ // styled,
13
+ // Stack,
14
+ // StackChild,
15
+ // Block,
16
+ // TextBlock,
17
+ // useBreakpointKey,
18
+ // BreakpointKeys,
19
+ // MQ,
20
+ MediaQueryProvider, StructuredList, StructuredListItem, StructuredListCell, styled,
21
+ // IconOutlinedArrowForwardIos,
22
+ } from 'newskit';
23
+ // import { Introduction } from './Introduction'
24
+ var StyledStructuredList = styled(StructuredList)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: 1px solid #dedede;\n border-radius: 8px;\n"], ["\n border: 1px solid #dedede;\n border-radius: 8px;\n"
25
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
+ ])));
27
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
+ export var ContentListView = function (_a) {
29
+ var
30
+ // children,
31
+ _b = _a.data,
32
+ // children,
33
+ data = _b === void 0 ? [] : _b;
34
+ return (React.createElement(MediaQueryProvider, null,
35
+ React.createElement(StyledStructuredList, { ariaLabel: "list" }, data.map(function (element, i) {
36
+ var title = element.title;
37
+ return (React.createElement(StructuredListItem, { key: i }, title && React.createElement(StructuredListCell, null, title)));
38
+ }))));
39
+ };
40
+ var templateObject_1;
41
+ //# sourceMappingURL=ContentListView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentListView.js","sourceRoot":"","sources":["../../../../../src/help-hub/components/ContentListView/ContentListView.tsx"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,0BAA0B;;;;;AAE1B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO;AACL,cAAc;AACd,kBAAkB;AAClB,UAAU;AACV,UAAU;AACV,SAAS;AACT,cAAc;AACd,SAAS;AACT,aAAa;AACb,oBAAoB;AACpB,kBAAkB;AAClB,MAAM;AACN,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,MAAM;AACN,+BAA+B;EAChC,MAAM,SAAS,CAAA;AAGhB,gDAAgD;AAEhD,IAAM,oBAAoB,GAAG,MAAM,CAAC,cAAc,CAAC,4HAAA,yDAGlD;IAED,8DAA8D;IAF7D,CAAA;AAED,8DAA8D;AAC9D,MAAM,CAAC,IAAM,eAAe,GAA+B,UAAC,EAG3D;;IAFC,YAAY;IACZ,YAAS;IADT,YAAY;IACZ,IAAI,mBAAG,EAAE,KAAA;IAET,OAAO,CACL,oBAAC,kBAAkB;QAMjB,oBAAC,oBAAoB,IAAC,SAAS,EAAC,MAAM,IACnC,IAAI,CAAC,GAAG,CAAC,UAAC,OAAO,EAAE,CAAC;YAEjB,IAAA,KAAK,GAEH,OAAO,MAFJ,CAEI;YAEX,OAAO,CACL,oBAAC,kBAAkB,IACjB,GAAG,EAAE,CAAC,IASL,KAAK,IAAI,oBAAC,kBAAkB,QAAE,KAAK,CAAsB,CAYvC,CACtB,CAAA;QACH,CAAC,CAAC,CACmB,CACJ,CACtB,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,29 @@
1
+ //TODO: Move Introduction to shared-components
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ import React from 'react';
7
+ import {
8
+ // GridLayout,
9
+ // GridLayoutItem,
10
+ styled, Block, TextBlock, } from 'newskit';
11
+ var IntroductionWrapper = styled(Block)(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
12
+ var Title = function (_a) {
13
+ var title = _a.title;
14
+ return (React.createElement(TextBlock, { typographyPreset: "utilityHeading030" }, title));
15
+ };
16
+ var Description = function (_a) {
17
+ var description = _a.description;
18
+ return (React.createElement(TextBlock, { marginBlockStart: "space040", typographyPreset: "utilitySubheading010" }, description));
19
+ };
20
+ export var Introduction = function (_a) {
21
+ var title = _a.title, description = _a.description;
22
+ return (
23
+ // 12 cells in the Grid
24
+ React.createElement(IntroductionWrapper, { marginBlockEnd: "space050", stylePreset: "IntroductionXS" },
25
+ React.createElement(Title, { title: title }),
26
+ React.createElement(Description, { description: description })));
27
+ };
28
+ var templateObject_1;
29
+ //# sourceMappingURL=Introduction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Introduction.js","sourceRoot":"","sources":["../../../../../src/help-hub/components/ContentListView/Introduction.tsx"],"names":[],"mappings":"AAAA,8CAA8C;;;;;AAE9C,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO;AACL,cAAc;AACd,kBAAkB;AAClB,MAAM,EACN,KAAK,EACL,SAAS,GACV,MAAM,SAAS,CAAA;AAOhB,IAAM,mBAAmB,GAAG,MAAM,CAAC,KAAK,CAAC,qEAAA,EAAE,IAAA,CAAA;AAE3C,IAAM,KAAK,GAAG,UAAC,EAAS;QAAP,KAAK,WAAA;IAAO,OAAA,CAC3B,oBAAC,SAAS,IAAC,gBAAgB,EAAC,mBAAmB,IAAE,KAAK,CAAa,CACpE;AAF4B,CAE5B,CAAA;AAED,IAAM,WAAW,GAAG,UAAC,EAAe;QAAb,WAAW,iBAAA;IAAO,OAAA,CACvC,oBAAC,SAAS,IACR,gBAAgB,EAAC,UAAU,EAC3B,gBAAgB,EAAC,sBAAsB,IAEtC,WAAW,CACF,CACb;AAPwC,CAOxC,CAAA;AAED,MAAM,CAAC,IAAM,YAAY,GAAgC,UAAC,EAGzD;QAFC,KAAK,WAAA,EACL,WAAW,iBAAA;IAEX,OAAO;IACL,uBAAuB;IACvB,oBAAC,mBAAmB,IAAC,cAAc,EAAC,UAAU,EAAC,WAAW,EAAC,gBAAgB;QACzE,oBAAC,KAAK,IAAC,KAAK,EAAE,KAAK,GAAI;QACvB,oBAAC,WAAW,IAAC,WAAW,EAAE,WAAW,GAAI,CAGrB,CACvB,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './ContentListView';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/help-hub/components/ContentListView/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1,18 @@
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
+ import React from 'react';
6
+ import { Block, Global, styled } from 'newskit';
7
+ import { Autocomplete } from './components/Autocomplete';
8
+ import { AlgoliaStyling } from './components/AlgoliaTheme';
9
+ var StyledBlock = styled(Block)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin: 0 auto;\n max-width: 440px;\n width: 100%;\n & .aa-Panel {\n z-index: 2;\n width: 100%;\n max-width: 440px;\n }\n & .aa-Form {\n z-index: 2;\n }\n"], ["\n margin: 0 auto;\n max-width: 440px;\n width: 100%;\n & .aa-Panel {\n z-index: 2;\n width: 100%;\n max-width: 440px;\n }\n & .aa-Form {\n z-index: 2;\n }\n"])));
10
+ export var SearchBar = function (_a) {
11
+ var _b = _a.placeholder, placeholder = _b === void 0 ? 'Search' : _b;
12
+ return (React.createElement(StyledBlock, null,
13
+ React.createElement(Global, { styles: AlgoliaStyling }),
14
+ React.createElement(Autocomplete, { placeholder: placeholder, openOnFocus: true, debug: false })));
15
+ };
16
+ export default SearchBar;
17
+ var templateObject_1;
18
+ //# sourceMappingURL=SearchBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchBar.js","sourceRoot":"","sources":["../../../../../src/help-hub/components/SearchBar/SearchBar.tsx"],"names":[],"mappings":";;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAG1D,IAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,qPAAA,kLAYhC,IAAA,CAAA;AAED,MAAM,CAAC,IAAM,SAAS,GAA6B,UAAC,EAEnD;QADC,mBAAsB,EAAtB,WAAW,mBAAG,QAAQ,KAAA;IAEtB,OAAO,CACL,oBAAC,WAAW;QACV,oBAAC,MAAM,IAAC,MAAM,EAAE,cAAc,GAAI;QAClC,oBAAC,YAAY,IACX,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,IAAI,EACjB,KAAK,EAAE,KAAK,GACZ,CACU,CACf,CAAA;AACH,CAAC,CAAA;AAED,eAAe,SAAS,CAAA"}