@pega/cosmos-react-demos 3.0.0-dev.2.0 → 3.0.0-dev.4.1

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 (325) hide show
  1. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts +9 -0
  2. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -0
  3. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.jsx +79 -0
  4. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.jsx.map +1 -0
  5. package/jsx/build/DynamicContentEditor/FieldSelector.d.ts +11 -0
  6. package/jsx/build/DynamicContentEditor/FieldSelector.d.ts.map +1 -0
  7. package/jsx/build/DynamicContentEditor/FieldSelector.jsx +80 -0
  8. package/jsx/build/DynamicContentEditor/FieldSelector.jsx.map +1 -0
  9. package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts +16 -0
  10. package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -0
  11. package/jsx/build/ObjectSelect/ObjectSelect.mocks.js +136 -0
  12. package/jsx/build/ObjectSelect/ObjectSelect.mocks.js.map +1 -0
  13. package/jsx/build/ObjectSelect/ObjectSelect.stories.d.ts +14 -0
  14. package/jsx/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -0
  15. package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx +312 -0
  16. package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx.map +1 -0
  17. package/jsx/build/ObjectSelect/ObjectSelect.styles.d.ts +4 -0
  18. package/jsx/build/ObjectSelect/ObjectSelect.styles.d.ts.map +1 -0
  19. package/jsx/build/ObjectSelect/ObjectSelect.styles.js +27 -0
  20. package/jsx/build/ObjectSelect/ObjectSelect.styles.js.map +1 -0
  21. package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  22. package/jsx/build/PageTemplates/PageTemplates.stories.jsx +4 -4
  23. package/jsx/build/PageTemplates/PageTemplates.stories.jsx.map +1 -1
  24. package/jsx/build/Workbench/Workbench.stories.d.ts.map +1 -1
  25. package/jsx/build/Workbench/Workbench.stories.jsx +3 -6
  26. package/jsx/build/Workbench/Workbench.stories.jsx.map +1 -1
  27. package/jsx/core/AppShell/AppShell.stories.d.ts +1 -0
  28. package/jsx/core/AppShell/AppShell.stories.d.ts.map +1 -1
  29. package/jsx/core/AppShell/AppShell.stories.jsx +4 -2
  30. package/jsx/core/AppShell/AppShell.stories.jsx.map +1 -1
  31. package/jsx/core/Banner/Banner.stories.d.ts.map +1 -1
  32. package/jsx/core/Banner/Banner.stories.jsx +2 -2
  33. package/jsx/core/Banner/Banner.stories.jsx.map +1 -1
  34. package/jsx/core/Card/Card.stories.jsx +1 -1
  35. package/jsx/core/Card/Card.stories.jsx.map +1 -1
  36. package/jsx/core/Checkbox/Checkbox.stories.jsx +1 -1
  37. package/jsx/core/Checkbox/Checkbox.stories.jsx.map +1 -1
  38. package/jsx/core/Configuration/Configuration.stories.d.ts.map +1 -1
  39. package/jsx/core/Configuration/Configuration.stories.jsx +1 -1
  40. package/jsx/core/Configuration/Configuration.stories.jsx.map +1 -1
  41. package/jsx/core/Currency/Currency.stories.d.ts +5 -2
  42. package/jsx/core/Currency/Currency.stories.d.ts.map +1 -1
  43. package/jsx/core/Currency/Currency.stories.jsx +30 -12
  44. package/jsx/core/Currency/Currency.stories.jsx.map +1 -1
  45. package/jsx/core/FieldGroup/FieldGroup.stories.d.ts +2 -0
  46. package/jsx/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -1
  47. package/jsx/core/FieldGroup/FieldGroup.stories.jsx +8 -4
  48. package/jsx/core/FieldGroup/FieldGroup.stories.jsx.map +1 -1
  49. package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx +1 -1
  50. package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +1 -1
  51. package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts +9 -8
  52. package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
  53. package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +51 -20
  54. package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -1
  55. package/jsx/core/File/FileDisplay.stories.d.ts.map +1 -1
  56. package/jsx/core/File/FileDisplay.stories.jsx +16 -38
  57. package/jsx/core/File/FileDisplay.stories.jsx.map +1 -1
  58. package/jsx/core/File/FileInput.stories.d.ts.map +1 -1
  59. package/jsx/core/File/FileInput.stories.jsx +1 -1
  60. package/jsx/core/File/FileInput.stories.jsx.map +1 -1
  61. package/jsx/core/Form/Form.mocks.d.ts.map +1 -1
  62. package/jsx/core/Form/Form.mocks.jsx +2 -2
  63. package/jsx/core/Form/Form.mocks.jsx.map +1 -1
  64. package/jsx/core/Form/Form.stories.jsx +2 -2
  65. package/jsx/core/Form/Form.stories.jsx.map +1 -1
  66. package/jsx/core/HTML/HTML.stories.d.ts +6 -0
  67. package/jsx/core/HTML/HTML.stories.d.ts.map +1 -0
  68. package/jsx/core/HTML/HTML.stories.jsx +13 -0
  69. package/jsx/core/HTML/HTML.stories.jsx.map +1 -0
  70. package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts +9 -0
  71. package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts.map +1 -0
  72. package/jsx/core/ListToolbar/ListToolbar.mocks.jsx +71 -0
  73. package/jsx/core/ListToolbar/ListToolbar.mocks.jsx.map +1 -0
  74. package/jsx/core/ListToolbar/ListToolbar.stories.d.ts +7 -0
  75. package/jsx/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -0
  76. package/jsx/core/ListToolbar/ListToolbar.stories.jsx +87 -0
  77. package/jsx/core/ListToolbar/ListToolbar.stories.jsx.map +1 -0
  78. package/jsx/core/Modal/Modal.mocks.d.ts.map +1 -1
  79. package/jsx/core/Modal/Modal.mocks.jsx +3 -3
  80. package/jsx/core/Modal/Modal.mocks.jsx.map +1 -1
  81. package/jsx/core/Modal/Modal.stories.d.ts.map +1 -1
  82. package/jsx/core/Modal/Modal.stories.jsx +29 -43
  83. package/jsx/core/Modal/Modal.stories.jsx.map +1 -1
  84. package/jsx/core/Number/Number.stories.d.ts +3 -3
  85. package/jsx/core/Number/Number.stories.d.ts.map +1 -1
  86. package/jsx/core/Number/Number.stories.jsx +14 -10
  87. package/jsx/core/Number/Number.stories.jsx.map +1 -1
  88. package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +5 -3
  89. package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  90. package/jsx/core/PageTemplates/PageTemplates.stories.jsx +106 -30
  91. package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
  92. package/jsx/core/RadioButton/RadioButton.stories.jsx +1 -1
  93. package/jsx/core/RadioButton/RadioButton.stories.jsx.map +1 -1
  94. package/jsx/core/Rating/Rating.stories.jsx +1 -1
  95. package/jsx/core/Rating/Rating.stories.jsx.map +1 -1
  96. package/jsx/core/Sentiment/Sentiment.stories.jsx +4 -4
  97. package/jsx/core/Sentiment/Sentiment.stories.jsx.map +1 -1
  98. package/jsx/core/Table/Table.mocks.d.ts +6 -0
  99. package/jsx/core/Table/Table.mocks.d.ts.map +1 -1
  100. package/jsx/core/Table/Table.mocks.jsx +134 -0
  101. package/jsx/core/Table/Table.mocks.jsx.map +1 -1
  102. package/jsx/core/Table/Table.stories.jsx +2 -2
  103. package/jsx/core/Table/Table.stories.jsx.map +1 -1
  104. package/jsx/core/Toaster/Toaster.stories.jsx +17 -12
  105. package/jsx/core/Toaster/Toaster.stories.jsx.map +1 -1
  106. package/jsx/cs/ArticleList/ArticleList.stories.d.ts.map +1 -1
  107. package/jsx/cs/ArticleList/ArticleList.stories.jsx +2 -1
  108. package/jsx/cs/ArticleList/ArticleList.stories.jsx.map +1 -1
  109. package/jsx/cs/CSCaseView/CSAppShell.stories.d.ts +1 -1
  110. package/jsx/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -1
  111. package/jsx/cs/CSCaseView/CSAppShell.stories.jsx +10 -10
  112. package/jsx/cs/CSCaseView/CSAppShell.stories.jsx.map +1 -1
  113. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
  114. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +8 -8
  115. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -1
  116. package/jsx/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
  117. package/jsx/cs/TaskManager/TaskManager.stories.jsx +1 -1
  118. package/jsx/cs/TaskManager/TaskManager.stories.jsx.map +1 -1
  119. package/jsx/rte/Editor/Editor.stories.jsx +2 -2
  120. package/jsx/rte/Editor/Editor.stories.jsx.map +1 -1
  121. package/jsx/social/Email/Email.mocks.d.ts +19 -2
  122. package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
  123. package/jsx/social/Email/Email.mocks.js +48 -1
  124. package/jsx/social/Email/Email.mocks.js.map +1 -1
  125. package/jsx/social/Email/Email.stories.d.ts +1 -1
  126. package/jsx/social/Email/Email.stories.d.ts.map +1 -1
  127. package/jsx/social/Email/Email.stories.jsx +80 -15
  128. package/jsx/social/Email/Email.stories.jsx.map +1 -1
  129. package/jsx/social/Feed/Feed.stories.d.ts.map +1 -1
  130. package/jsx/social/Feed/Feed.stories.jsx +1 -1
  131. package/jsx/social/Feed/Feed.stories.jsx.map +1 -1
  132. package/jsx/work/CaseView/CaseView.mocks.d.ts.map +1 -1
  133. package/jsx/work/CaseView/CaseView.mocks.jsx +1 -1
  134. package/jsx/work/CaseView/CaseView.mocks.jsx.map +1 -1
  135. package/jsx/work/CaseView/CaseView.stories.d.ts.map +1 -1
  136. package/jsx/work/CaseView/CaseView.stories.jsx +7 -7
  137. package/jsx/work/CaseView/CaseView.stories.jsx.map +1 -1
  138. package/jsx/work/CaseView/Details.mocks.d.ts.map +1 -1
  139. package/jsx/work/CaseView/Details.mocks.jsx +1 -1
  140. package/jsx/work/CaseView/Details.mocks.jsx.map +1 -1
  141. package/jsx/work/CaseView/Pulse.mocks.d.ts.map +1 -1
  142. package/jsx/work/CaseView/Pulse.mocks.jsx +1 -1
  143. package/jsx/work/CaseView/Pulse.mocks.jsx.map +1 -1
  144. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -1
  145. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx +1 -1
  146. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx.map +1 -1
  147. package/jsx/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
  148. package/jsx/work/Confirmation/Confirmation.stories.jsx +2 -2
  149. package/jsx/work/Confirmation/Confirmation.stories.jsx.map +1 -1
  150. package/jsx/work/Details/Details.stories.d.ts.map +1 -1
  151. package/jsx/work/Details/Details.stories.jsx +21 -16
  152. package/jsx/work/Details/Details.stories.jsx.map +1 -1
  153. package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
  154. package/jsx/work/SearchResults/SearchResults.stories.jsx +1 -1
  155. package/jsx/work/SearchResults/SearchResults.stories.jsx.map +1 -1
  156. package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -1
  157. package/jsx/work/Stakeholders/Stakeholders.mocks.jsx +2 -2
  158. package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +1 -1
  159. package/jsx/work/Timeline/Timeline.stories.d.ts +2 -0
  160. package/jsx/work/Timeline/Timeline.stories.d.ts.map +1 -1
  161. package/jsx/work/Timeline/Timeline.stories.jsx +28 -1
  162. package/jsx/work/Timeline/Timeline.stories.jsx.map +1 -1
  163. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts +9 -0
  164. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -0
  165. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js +63 -0
  166. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js.map +1 -0
  167. package/lib/build/DynamicContentEditor/FieldSelector.d.ts +14 -0
  168. package/lib/build/DynamicContentEditor/FieldSelector.d.ts.map +1 -0
  169. package/lib/build/DynamicContentEditor/FieldSelector.js +81 -0
  170. package/lib/build/DynamicContentEditor/FieldSelector.js.map +1 -0
  171. package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts +16 -0
  172. package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -0
  173. package/lib/build/ObjectSelect/ObjectSelect.mocks.js +136 -0
  174. package/lib/build/ObjectSelect/ObjectSelect.mocks.js.map +1 -0
  175. package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts +14 -0
  176. package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -0
  177. package/lib/build/ObjectSelect/ObjectSelect.stories.js +247 -0
  178. package/lib/build/ObjectSelect/ObjectSelect.stories.js.map +1 -0
  179. package/lib/build/ObjectSelect/ObjectSelect.styles.d.ts +4 -0
  180. package/lib/build/ObjectSelect/ObjectSelect.styles.d.ts.map +1 -0
  181. package/lib/build/ObjectSelect/ObjectSelect.styles.js +27 -0
  182. package/lib/build/ObjectSelect/ObjectSelect.styles.js.map +1 -0
  183. package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  184. package/lib/build/PageTemplates/PageTemplates.stories.js +4 -4
  185. package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -1
  186. package/lib/build/Workbench/Workbench.stories.d.ts.map +1 -1
  187. package/lib/build/Workbench/Workbench.stories.js +3 -6
  188. package/lib/build/Workbench/Workbench.stories.js.map +1 -1
  189. package/lib/core/AppShell/AppShell.stories.d.ts +1 -0
  190. package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -1
  191. package/lib/core/AppShell/AppShell.stories.js +4 -2
  192. package/lib/core/AppShell/AppShell.stories.js.map +1 -1
  193. package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
  194. package/lib/core/Banner/Banner.stories.js +2 -2
  195. package/lib/core/Banner/Banner.stories.js.map +1 -1
  196. package/lib/core/Card/Card.stories.js +1 -1
  197. package/lib/core/Card/Card.stories.js.map +1 -1
  198. package/lib/core/Checkbox/Checkbox.stories.js +1 -1
  199. package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
  200. package/lib/core/Configuration/Configuration.stories.d.ts.map +1 -1
  201. package/lib/core/Configuration/Configuration.stories.js +1 -1
  202. package/lib/core/Configuration/Configuration.stories.js.map +1 -1
  203. package/lib/core/Currency/Currency.stories.d.ts +5 -2
  204. package/lib/core/Currency/Currency.stories.d.ts.map +1 -1
  205. package/lib/core/Currency/Currency.stories.js +30 -12
  206. package/lib/core/Currency/Currency.stories.js.map +1 -1
  207. package/lib/core/FieldGroup/FieldGroup.stories.d.ts +2 -0
  208. package/lib/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -1
  209. package/lib/core/FieldGroup/FieldGroup.stories.js +7 -3
  210. package/lib/core/FieldGroup/FieldGroup.stories.js.map +1 -1
  211. package/lib/core/FieldGroup/FieldGroupList.mocks.js +1 -1
  212. package/lib/core/FieldGroup/FieldGroupList.mocks.js.map +1 -1
  213. package/lib/core/FieldGroup/FieldGroupList.stories.d.ts +9 -8
  214. package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
  215. package/lib/core/FieldGroup/FieldGroupList.stories.js +51 -20
  216. package/lib/core/FieldGroup/FieldGroupList.stories.js.map +1 -1
  217. package/lib/core/File/FileDisplay.stories.d.ts.map +1 -1
  218. package/lib/core/File/FileDisplay.stories.js +17 -29
  219. package/lib/core/File/FileDisplay.stories.js.map +1 -1
  220. package/lib/core/File/FileInput.stories.d.ts.map +1 -1
  221. package/lib/core/File/FileInput.stories.js +1 -1
  222. package/lib/core/File/FileInput.stories.js.map +1 -1
  223. package/lib/core/Form/Form.mocks.d.ts.map +1 -1
  224. package/lib/core/Form/Form.mocks.js +2 -2
  225. package/lib/core/Form/Form.mocks.js.map +1 -1
  226. package/lib/core/Form/Form.stories.js +2 -2
  227. package/lib/core/Form/Form.stories.js.map +1 -1
  228. package/lib/core/HTML/HTML.stories.d.ts +6 -0
  229. package/lib/core/HTML/HTML.stories.d.ts.map +1 -0
  230. package/lib/core/HTML/HTML.stories.js +14 -0
  231. package/lib/core/HTML/HTML.stories.js.map +1 -0
  232. package/lib/core/ListToolbar/ListToolbar.mocks.d.ts +9 -0
  233. package/lib/core/ListToolbar/ListToolbar.mocks.d.ts.map +1 -0
  234. package/lib/core/ListToolbar/ListToolbar.mocks.js +50 -0
  235. package/lib/core/ListToolbar/ListToolbar.mocks.js.map +1 -0
  236. package/lib/core/ListToolbar/ListToolbar.stories.d.ts +7 -0
  237. package/lib/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -0
  238. package/lib/core/ListToolbar/ListToolbar.stories.js +79 -0
  239. package/lib/core/ListToolbar/ListToolbar.stories.js.map +1 -0
  240. package/lib/core/Modal/Modal.mocks.d.ts.map +1 -1
  241. package/lib/core/Modal/Modal.mocks.js +3 -3
  242. package/lib/core/Modal/Modal.mocks.js.map +1 -1
  243. package/lib/core/Modal/Modal.stories.d.ts.map +1 -1
  244. package/lib/core/Modal/Modal.stories.js +14 -14
  245. package/lib/core/Modal/Modal.stories.js.map +1 -1
  246. package/lib/core/Number/Number.stories.d.ts +3 -3
  247. package/lib/core/Number/Number.stories.d.ts.map +1 -1
  248. package/lib/core/Number/Number.stories.js +14 -10
  249. package/lib/core/Number/Number.stories.js.map +1 -1
  250. package/lib/core/PageTemplates/PageTemplates.stories.d.ts +5 -3
  251. package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  252. package/lib/core/PageTemplates/PageTemplates.stories.js +95 -27
  253. package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
  254. package/lib/core/RadioButton/RadioButton.stories.js +1 -1
  255. package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
  256. package/lib/core/Rating/Rating.stories.js +1 -1
  257. package/lib/core/Rating/Rating.stories.js.map +1 -1
  258. package/lib/core/Sentiment/Sentiment.stories.js +2 -2
  259. package/lib/core/Sentiment/Sentiment.stories.js.map +1 -1
  260. package/lib/core/Table/Table.mocks.d.ts +6 -0
  261. package/lib/core/Table/Table.mocks.d.ts.map +1 -1
  262. package/lib/core/Table/Table.mocks.js +134 -0
  263. package/lib/core/Table/Table.mocks.js.map +1 -1
  264. package/lib/core/Table/Table.stories.js +2 -2
  265. package/lib/core/Table/Table.stories.js.map +1 -1
  266. package/lib/core/Toaster/Toaster.stories.js +15 -19
  267. package/lib/core/Toaster/Toaster.stories.js.map +1 -1
  268. package/lib/cs/ArticleList/ArticleList.stories.d.ts.map +1 -1
  269. package/lib/cs/ArticleList/ArticleList.stories.js +2 -1
  270. package/lib/cs/ArticleList/ArticleList.stories.js.map +1 -1
  271. package/lib/cs/CSCaseView/CSAppShell.stories.d.ts +1 -1
  272. package/lib/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -1
  273. package/lib/cs/CSCaseView/CSAppShell.stories.js +10 -10
  274. package/lib/cs/CSCaseView/CSAppShell.stories.js.map +1 -1
  275. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
  276. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js +8 -8
  277. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -1
  278. package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
  279. package/lib/cs/TaskManager/TaskManager.stories.js +1 -1
  280. package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -1
  281. package/lib/rte/Editor/Editor.stories.js +2 -2
  282. package/lib/rte/Editor/Editor.stories.js.map +1 -1
  283. package/lib/social/Email/Email.mocks.d.ts +19 -2
  284. package/lib/social/Email/Email.mocks.d.ts.map +1 -1
  285. package/lib/social/Email/Email.mocks.js +48 -1
  286. package/lib/social/Email/Email.mocks.js.map +1 -1
  287. package/lib/social/Email/Email.stories.d.ts +1 -1
  288. package/lib/social/Email/Email.stories.d.ts.map +1 -1
  289. package/lib/social/Email/Email.stories.js +63 -15
  290. package/lib/social/Email/Email.stories.js.map +1 -1
  291. package/lib/social/Feed/Feed.stories.d.ts.map +1 -1
  292. package/lib/social/Feed/Feed.stories.js +1 -1
  293. package/lib/social/Feed/Feed.stories.js.map +1 -1
  294. package/lib/work/CaseView/CaseView.mocks.d.ts.map +1 -1
  295. package/lib/work/CaseView/CaseView.mocks.js +1 -1
  296. package/lib/work/CaseView/CaseView.mocks.js.map +1 -1
  297. package/lib/work/CaseView/CaseView.stories.d.ts.map +1 -1
  298. package/lib/work/CaseView/CaseView.stories.js +7 -7
  299. package/lib/work/CaseView/CaseView.stories.js.map +1 -1
  300. package/lib/work/CaseView/Details.mocks.d.ts.map +1 -1
  301. package/lib/work/CaseView/Details.mocks.js +1 -1
  302. package/lib/work/CaseView/Details.mocks.js.map +1 -1
  303. package/lib/work/CaseView/Pulse.mocks.d.ts.map +1 -1
  304. package/lib/work/CaseView/Pulse.mocks.js +1 -1
  305. package/lib/work/CaseView/Pulse.mocks.js.map +1 -1
  306. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -1
  307. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js +1 -1
  308. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js.map +1 -1
  309. package/lib/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
  310. package/lib/work/Confirmation/Confirmation.stories.js +2 -2
  311. package/lib/work/Confirmation/Confirmation.stories.js.map +1 -1
  312. package/lib/work/Details/Details.stories.d.ts.map +1 -1
  313. package/lib/work/Details/Details.stories.js +56 -53
  314. package/lib/work/Details/Details.stories.js.map +1 -1
  315. package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
  316. package/lib/work/SearchResults/SearchResults.stories.js +1 -1
  317. package/lib/work/SearchResults/SearchResults.stories.js.map +1 -1
  318. package/lib/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -1
  319. package/lib/work/Stakeholders/Stakeholders.mocks.js +2 -2
  320. package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -1
  321. package/lib/work/Timeline/Timeline.stories.d.ts +2 -0
  322. package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -1
  323. package/lib/work/Timeline/Timeline.stories.js +22 -2
  324. package/lib/work/Timeline/Timeline.stories.js.map +1 -1
  325. package/package.json +16 -16
@@ -1 +1 @@
1
- {"version":3,"file":"Editor.stories.jsx","sourceRoot":"","sources":["../../../src/rte/Editor/Editor.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,QAAQ,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAe,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAE7D,eAAe;IACb,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,MAAM;CACV,CAAC;AAEV,MAAM,KAAK,GAAG,kBAAkB,CAAC;AAEjC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,MAAM,SAAS,GAAG,MAAM,CAAc,IAAI,CAAC,CAAC;IAE5C,MAAM,YAAY,GAAG,CAAC,KAAW,EAAE,EAAU,EAAE,EAAE;QAC/C,MAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QACvC,SAAS,CAAC,OAAO,EAAE,WAAW,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/D,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,MAAM,CACL,GAAG,CAAC,CAAC,SAAS,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,OAAO,CAAC,CAAC,CAAC,gBAAgB,EAAE,OAAO,EAAE,aAAa,EAAE,Q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DOM from 'react-dom';\nimport { action } from '@storybook/addon-actions';\nimport { Editor as TinymceEditor } from 'tinymce';\n\nimport {\n Button,\n Card,\n CardContent,\n CardFooter,\n Flex,\n Text,\n TextArea\n} from '@pega/cosmos-react-core';\nimport { EditorState, Editor } from '@pega/cosmos-react-rte';\n\nexport default {\n title: 'RTE/Editor',\n component: Editor\n} as Meta;\n\nconst label = 'Form field label';\n\nexport const EditorDemo = () => {\n const editorRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Editor\n ref={editorRef}\n label={label}\n toolbar={['inline-styling', 'lists', 'indentation', 'images', 'links']}\n onFocus={action('Editor focused')}\n onBlur={action('Editor blurred')}\n onImageAdded={onImageAdded}\n defaultValue='<body><p>Hi mom <a href=\"https://google.com\">link</a></p></body>'\n />\n );\n};\n\nexport const EmptyEditorDemo = () => {\n const editorRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Editor\n ref={editorRef}\n label={label}\n toolbar={['inline-styling', 'lists', 'indentation', 'images', 'links']}\n onImageAdded={onImageAdded}\n onFocus={action('Editor has focus')}\n onBlur={action('Editor has blurred')}\n placeholder='Type some stuff in here'\n />\n );\n};\n\nexport const ReadonlyFormField = () => {\n return (\n <Editor\n label={label}\n readOnly\n defaultValue={`<article class=\"main-page-content\" lang=\"en-US\"><h1>HTML: HyperText Markup Language</h1><div><p><strong>HTML</strong> (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content. Other technologies besides HTML are generally used to describe a web page's appearance/presentation (<a href=\"/en-US/docs/Web/CSS\">CSS</a>) or functionality/behavior (<a href=\"/en-US/docs/Web/JavaScript\">JavaScript</a>).</p>\n <p>\"Hypertext\" refers to links that connect web pages to one another, either within a single website or between websites. Links are a fundamental aspect of the Web. By uploading content to the Internet and linking it to pages created by other people, you become an active participant in the World Wide Web.</p>\n <p>HTML uses \"markup\" to annotate text, images, and other content for display in a Web browser. HTML markup includes special \"elements\" such as <a href=\"/en-US/docs/Web/HTML/Element/head\"><code>&lt;head&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/title\"><code>&lt;title&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/body\"><code>&lt;body&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/header\"><code>&lt;header&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/footer\"><code>&lt;footer&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/article\"><code>&lt;article&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/section\"><code>&lt;section&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/p\"><code>&lt;p&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/div\"><code>&lt;div&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/span\"><code>&lt;span&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/img\"><code>&lt;img&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/aside\"><code>&lt;aside&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/audio\"><code>&lt;audio&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/canvas\"><code>&lt;canvas&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/datalist\"><code>&lt;datalist&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/details\"><code>&lt;details&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/embed\"><code>&lt;embed&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/nav\"><code>&lt;nav&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/output\"><code>&lt;output&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/progress\"><code>&lt;progress&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/video\"><code>&lt;video&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/ul\"><code>&lt;ul&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/ol\"><code>&lt;ol&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/li\"><code>&lt;li&gt;</code></a> and many others.</p>\n <p>An HTML element is set off from other text in a document by \"tags\", which consist of the element name surrounded by \"<code>&lt;</code>\" and \"<code>&gt;</code>\".&nbsp; The name of an element inside a tag is case insensitive. That is, it can be written in uppercase, lowercase, or a mixture. For example, the <code>&lt;title&gt;</code> tag can be written as <code>&lt;Title&gt;</code>, <code>&lt;TITLE&gt;</code>, or in any other way.</p>\n\n <div id=\"on-github\" class=\"on-github\"><h3>Found a problem with this page?</h3><ul><li><a href=\"https://github.com/mdn/content/edit/main/files/en-us/web/html/index.md\" title=\"You're going to need to sign in to GitHub first (Opens in a new tab)\" target=\"_blank\" rel=\"noopener noreferrer\">Edit on <b>GitHub</b></a></li><li><a href=\"https://github.com/mdn/content/blob/main/files/en-us/web/html/index.md\" title=\"Folder: en-us/web/html (Opens in a new tab)\" target=\"_blank\" rel=\"noopener noreferrer\">Source on <b>GitHub</b></a></li><li><a href=\"https://github.com/mdn/content/issues/new?body=MDN+URL%3A+https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FHTML%0A%0A%23%23%23%23+What+information+was+incorrect%2C+unhelpful%2C+or+incomplete%3F%0A%0A%0A%23%23%23%23+Specific+section+or+headline%3F%0A%0A%0A%23%23%23%23+What+did+you+expect+to+see%3F%0A%0A%0A%23%23%23%23+Did+you+test+this%3F+If+so%2C+how%3F%0A%0A%0A%3C%21--+Do+not+make+changes+below+this+line+--%3E%0A%3Cdetails%3E%0A%3Csummary%3EMDN+Content+page+report+details%3C%2Fsummary%3E%0A%0A*+Folder%3A+%60en-us%2Fweb%2Fhtml%60%0A*+MDN+URL%3A+https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FHTML%0A*+GitHub+URL%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fblob%2Fmain%2Ffiles%2Fen-us%2Fweb%2Fhtml%2Findex.md%0A*+Last+commit%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fcommit%2F775662998e66813a612e3ff27e02f2ada867bc17%0A*+Document+last+modified%3A+2021-10-03T00%3A01%3A51.000Z%0A%0A%3C%2Fdetails%3E&amp;title=Issue+with+%22HTML%3A+HyperText+Markup+Language%22%3A+%28short+summary+here+please%29&amp;labels=needs-triage%2CContent%3AHTML\" title=\"This will take you to https://github.com/mdn/content to file a new issue\" target=\"_blank\" rel=\"noopener noreferrer\">Report a problem with this content on <b>GitHub</b></a></li><li>Want to fix the problem yourself? See <a href=\"https://github.com/mdn/content/blob/main/README.md\" target=\"_blank\" rel=\"noopener noreferrer\">our Contribution guide</a>.</li></ul></div>\n `}\n />\n );\n};\n\nconst PegaCustom = ({ children }: { children: string }) => {\n return (\n <p\n style={{ color: 'blue', textTransform: 'uppercase' }}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: children }}\n />\n );\n};\n\nclass PegaCustomElement extends HTMLElement {\n removeElements() {\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n }\n\n connectedCallback() {\n const inner = this.innerHTML;\n this.removeElements();\n const mountPoint = document.createElement('span');\n this.appendChild(mountPoint);\n ReactDOM.render(<PegaCustom>{inner}</PegaCustom>, mountPoint);\n }\n}\n\nexport const CustomComponentDemo = () => {\n const editorRef = useRef<EditorState>(null);\n const [editor, setEditor] = useState({} as TinymceEditor);\n\n const onCustomAction = () => {\n editor.insertContent('<pega-custom>Inserted from toolbar</pega-custom>');\n };\n\n return (\n <Editor\n ref={editorRef}\n label={label}\n toolbar={['inline-styling', 'lists', 'indentation', 'links', 'images']}\n defaultValue='<body><p>Hi mom <a href=\"https://google.com\">link</a></p><pega-custom>Hello from custom element.</pega-custom><p>hi</p></body>'\n customComponents={[{ customElement: PegaCustomElement, name: 'pega-custom' }]}\n customActions={[\n {\n icon: 'pega',\n text: 'Insert a custom element',\n onMouseDown: () => {\n onCustomAction();\n }\n }\n ]}\n onInit={initializedEditor => {\n setEditor(initializedEditor);\n }}\n />\n );\n};\n\nexport const RichTextEditorWithLogs = () => {\n const editorRef = useRef<EditorState>(null);\n const [content, setContent] = useState<string | undefined>();\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n const showContent = (type: 'html' | 'plain_text' | 'rich_text') => {\n if (type === 'html') setContent(editorRef.current?.getHtml());\n else if (type === 'plain_text') setContent(editorRef.current?.getPlainText());\n else if (type === 'rich_text') setContent(editorRef.current?.getRichText());\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Editor\n ref={editorRef}\n toolbar={['inline-styling', 'headers', 'tables', 'links', 'images', 'lists', 'indentation']}\n onImageAdded={onImageAdded}\n label='Rich text editor with logs'\n info='Click on the buttons below to show the different formatted outputs of the RTE'\n />\n\n <Flex container={{ gap: 1 }}>\n <Button onClick={() => showContent('html')}>Show HTML</Button>\n <Button onClick={() => showContent('plain_text')}>Show plain text</Button>\n <Button onClick={() => showContent('rich_text')}>Show rich text</Button>\n </Flex>\n\n <Text>{content}</Text>\n </Flex>\n );\n};\n\nexport const RichTextEditorHtmlParsingDemo = () => {\n const [html, setHtml] = useState('<p>Hello world!</p>');\n const rteRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n rteRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Card>\n <CardContent>\n <TextArea value={html} onChange={e => setHtml(e.target.value)} />\n </CardContent>\n <CardFooter>\n <Button onClick={() => rteRef.current?.insertHtml(html.trim(), true)}>\n Overwrite RTE with new HTML\n </Button>\n </CardFooter>\n </Card>\n <Editor\n defaultValue={html}\n onImageAdded={onImageAdded}\n ref={rteRef}\n label={label}\n toolbar={['inline-styling', 'headers', 'tables', 'links', 'images', 'lists', 'indentation']}\n />\n </Flex>\n );\n};\n"]}
1
+ {"version":3,"file":"Editor.stories.jsx","sourceRoot":"","sources":["../../../src/rte/Editor/Editor.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,QAAQ,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAe,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAE7D,eAAe;IACb,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,MAAM;CACV,CAAC;AAEV,MAAM,KAAK,GAAG,kBAAkB,CAAC;AAEjC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,MAAM,SAAS,GAAG,MAAM,CAAc,IAAI,CAAC,CAAC;IAE5C,MAAM,YAAY,GAAG,CAAC,KAAW,EAAE,EAAU,EAAE,EAAE;QAC/C,MAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QACvC,SAAS,CAAC,OAAO,EAAE,WAAW,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/D,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,MAAM,CACL,GAAG,CAAC,CAAC,SAAS,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,OAAO,CAAC,CAAC,CAAC,gBAAgB,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CACvE,O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,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QACvC,MAAM,CAAC,OAAO,EAAE,WAAW,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5D,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAC/C;MAAA,CAAC,IAAI,CACH;QAAA,CAAC,WAAW,CACV;UAAA,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAChE;QAAA,EAAE,WAAW,CACb;QAAA,CAAC,UAAU,CACT;UAAA,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,CACnE;;UACF,EAAE,MAAM,CACV;QAAA,EAAE,UAAU,CACd;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,MAAM,CACL,YAAY,CAAC,CAAC,IAAI,CAAC,CACnB,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,GAAG,CAAC,CAAC,MAAM,CAAC,CACZ,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,OAAO,CAAC,CAAC,CAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,EAEhG;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useState, useRef } from 'react';\nimport ReactDOM from 'react-dom';\nimport { action } from '@storybook/addon-actions';\nimport { Editor as TinymceEditor } from 'tinymce';\n\nimport {\n Button,\n Card,\n CardContent,\n CardFooter,\n Flex,\n Text,\n TextArea\n} from '@pega/cosmos-react-core';\nimport { EditorState, Editor } from '@pega/cosmos-react-rte';\n\nexport default {\n title: 'RTE/Editor',\n component: Editor\n} as Meta;\n\nconst label = 'Form field label';\n\nexport const EditorDemo = () => {\n const editorRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Editor\n ref={editorRef}\n label={label}\n toolbar={['inline-styling', 'lists', 'indentation', 'images', 'links']}\n onFocus={action('Editor focused')}\n onBlur={action('Editor blurred')}\n onImageAdded={onImageAdded}\n defaultValue='<body><p>Hi mom <a href=\"https://google.com\">link</a></p><img alt=\"placeholder\" src=\"http://via.placeholder.com/640x360\"/></body>'\n />\n );\n};\n\nexport const EmptyEditorDemo = () => {\n const editorRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Editor\n ref={editorRef}\n label={label}\n toolbar={['inline-styling', 'lists', 'indentation', 'images', 'links']}\n onImageAdded={onImageAdded}\n onFocus={action('Editor has focus')}\n onBlur={action('Editor has blurred')}\n placeholder='Type some stuff in here'\n />\n );\n};\n\nexport const ReadonlyFormField = () => {\n return (\n <Editor\n label={label}\n readOnly\n defaultValue={`<article class=\"main-page-content\" lang=\"en-US\"><h1>HTML: HyperText Markup Language</h1><div><p><strong>HTML</strong> (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content. Other technologies besides HTML are generally used to describe a web page's appearance/presentation (<a href=\"/en-US/docs/Web/CSS\">CSS</a>) or functionality/behavior (<a href=\"/en-US/docs/Web/JavaScript\">JavaScript</a>).</p>\n <p>\"Hypertext\" refers to links that connect web pages to one another, either within a single website or between websites. Links are a fundamental aspect of the Web. By uploading content to the Internet and linking it to pages created by other people, you become an active participant in the World Wide Web.</p>\n <p>HTML uses \"markup\" to annotate text, images, and other content for display in a Web browser. HTML markup includes special \"elements\" such as <a href=\"/en-US/docs/Web/HTML/Element/head\"><code>&lt;head&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/title\"><code>&lt;title&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/body\"><code>&lt;body&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/header\"><code>&lt;header&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/footer\"><code>&lt;footer&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/article\"><code>&lt;article&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/section\"><code>&lt;section&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/p\"><code>&lt;p&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/div\"><code>&lt;div&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/span\"><code>&lt;span&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/img\"><code>&lt;img&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/aside\"><code>&lt;aside&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/audio\"><code>&lt;audio&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/canvas\"><code>&lt;canvas&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/datalist\"><code>&lt;datalist&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/details\"><code>&lt;details&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/embed\"><code>&lt;embed&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/nav\"><code>&lt;nav&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/output\"><code>&lt;output&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/progress\"><code>&lt;progress&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/video\"><code>&lt;video&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/ul\"><code>&lt;ul&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/ol\"><code>&lt;ol&gt;</code></a>, <a href=\"/en-US/docs/Web/HTML/Element/li\"><code>&lt;li&gt;</code></a> and many others.</p>\n <p>An HTML element is set off from other text in a document by \"tags\", which consist of the element name surrounded by \"<code>&lt;</code>\" and \"<code>&gt;</code>\".&nbsp; The name of an element inside a tag is case insensitive. That is, it can be written in uppercase, lowercase, or a mixture. For example, the <code>&lt;title&gt;</code> tag can be written as <code>&lt;Title&gt;</code>, <code>&lt;TITLE&gt;</code>, or in any other way.</p>\n\n <div id=\"on-github\" class=\"on-github\"><h3>Found a problem with this page?</h3><ul><li><a href=\"https://github.com/mdn/content/edit/main/files/en-us/web/html/index.md\" title=\"You're going to need to sign in to GitHub first (Opens in a new tab)\" target=\"_blank\" rel=\"noopener noreferrer\">Edit on <b>GitHub</b></a></li><li><a href=\"https://github.com/mdn/content/blob/main/files/en-us/web/html/index.md\" title=\"Folder: en-us/web/html (Opens in a new tab)\" target=\"_blank\" rel=\"noopener noreferrer\">Source on <b>GitHub</b></a></li><li><a href=\"https://github.com/mdn/content/issues/new?body=MDN+URL%3A+https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FHTML%0A%0A%23%23%23%23+What+information+was+incorrect%2C+unhelpful%2C+or+incomplete%3F%0A%0A%0A%23%23%23%23+Specific+section+or+headline%3F%0A%0A%0A%23%23%23%23+What+did+you+expect+to+see%3F%0A%0A%0A%23%23%23%23+Did+you+test+this%3F+If+so%2C+how%3F%0A%0A%0A%3C%21--+Do+not+make+changes+below+this+line+--%3E%0A%3Cdetails%3E%0A%3Csummary%3EMDN+Content+page+report+details%3C%2Fsummary%3E%0A%0A*+Folder%3A+%60en-us%2Fweb%2Fhtml%60%0A*+MDN+URL%3A+https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FHTML%0A*+GitHub+URL%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fblob%2Fmain%2Ffiles%2Fen-us%2Fweb%2Fhtml%2Findex.md%0A*+Last+commit%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fcommit%2F775662998e66813a612e3ff27e02f2ada867bc17%0A*+Document+last+modified%3A+2021-10-03T00%3A01%3A51.000Z%0A%0A%3C%2Fdetails%3E&amp;title=Issue+with+%22HTML%3A+HyperText+Markup+Language%22%3A+%28short+summary+here+please%29&amp;labels=needs-triage%2CContent%3AHTML\" title=\"This will take you to https://github.com/mdn/content to file a new issue\" target=\"_blank\" rel=\"noopener noreferrer\">Report a problem with this content on <b>GitHub</b></a></li><li>Want to fix the problem yourself? See <a href=\"https://github.com/mdn/content/blob/main/README.md\" target=\"_blank\" rel=\"noopener noreferrer\">our Contribution guide</a>.</li></ul></div>\n `}\n />\n );\n};\n\nconst PegaCustom = ({ children }: { children: string }) => {\n return (\n <p\n style={{ color: 'blue', textTransform: 'uppercase' }}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: children }}\n />\n );\n};\n\nclass PegaCustomElement extends HTMLElement {\n removeElements() {\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n }\n\n connectedCallback() {\n const inner = this.innerHTML;\n this.removeElements();\n const mountPoint = document.createElement('span');\n this.appendChild(mountPoint);\n ReactDOM.render(<PegaCustom>{inner}</PegaCustom>, mountPoint);\n }\n}\n\nexport const CustomComponentDemo = () => {\n const editorRef = useRef<EditorState>(null);\n const [editor, setEditor] = useState({} as TinymceEditor);\n\n const onCustomAction = () => {\n editor.insertContent('<pega-custom>Inserted from toolbar</pega-custom>');\n };\n\n return (\n <Editor\n ref={editorRef}\n label={label}\n toolbar={['inline-styling', 'lists', 'indentation', 'links', 'images']}\n defaultValue='<body><p>Hi mom <a href=\"https://google.com\">link</a></p><p>hi <pega-custom>Hello from custom element.</pega-custom></p></body>'\n customComponents={[{ customElement: PegaCustomElement, name: 'pega-custom' }]}\n customActions={[\n {\n icon: 'pega',\n text: 'Insert a custom element',\n onMouseDown: () => {\n onCustomAction();\n }\n }\n ]}\n onInit={initializedEditor => {\n setEditor(initializedEditor);\n }}\n />\n );\n};\n\nexport const RichTextEditorWithLogs = () => {\n const editorRef = useRef<EditorState>(null);\n const [content, setContent] = useState<string | undefined>();\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n const showContent = (type: 'html' | 'plain_text' | 'rich_text') => {\n if (type === 'html') setContent(editorRef.current?.getHtml());\n else if (type === 'plain_text') setContent(editorRef.current?.getPlainText());\n else if (type === 'rich_text') setContent(editorRef.current?.getRichText());\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Editor\n ref={editorRef}\n toolbar={['inline-styling', 'headers', 'tables', 'links', 'images', 'lists', 'indentation']}\n onImageAdded={onImageAdded}\n label='Rich text editor with logs'\n info='Click on the buttons below to show the different formatted outputs of the RTE'\n />\n\n <Flex container={{ gap: 1 }}>\n <Button onClick={() => showContent('html')}>Show HTML</Button>\n <Button onClick={() => showContent('plain_text')}>Show plain text</Button>\n <Button onClick={() => showContent('rich_text')}>Show rich text</Button>\n </Flex>\n\n <Text>{content}</Text>\n </Flex>\n );\n};\n\nexport const RichTextEditorHtmlParsingDemo = () => {\n const [html, setHtml] = useState('<p>Hello world!</p>');\n const rteRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n rteRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Card>\n <CardContent>\n <TextArea value={html} onChange={e => setHtml(e.target.value)} />\n </CardContent>\n <CardFooter>\n <Button onClick={() => rteRef.current?.insertHtml(html.trim(), true)}>\n Overwrite RTE with new HTML\n </Button>\n </CardFooter>\n </Card>\n <Editor\n defaultValue={html}\n onImageAdded={onImageAdded}\n ref={rteRef}\n label={label}\n toolbar={['inline-styling', 'headers', 'tables', 'links', 'images', 'lists', 'indentation']}\n />\n </Flex>\n );\n};\n"]}
@@ -1,11 +1,12 @@
1
- import { EmailComposerProps, ViewAnalysisProps } from '@pega/cosmos-react-social';
1
+ import { FieldValueListProps } from '@pega/cosmos-react-core';
2
+ import { EmailComposerProps, EntityListProps } from '@pega/cosmos-react-social';
2
3
  export declare const emailBodyContent = "<div>Hi, <br /> <br /><div>Can you please change my address in the SSN.</div> <br /> <br />Regards, <br />Sara Davis </div>";
3
4
  export declare const emailAttachments: EmailComposerProps['attachments'];
4
5
  export declare const participants: EmailComposerProps['participants'];
5
6
  export declare const toParticipants: string[];
6
7
  export declare const ccParticipants: string[];
7
8
  export declare const bccParticipants: string[];
8
- export declare const ViewAnalysisMockData: ViewAnalysisProps['content'];
9
+ export declare const EntityListMockData: EntityListProps['content'];
9
10
  export declare const EmailMockData: {
10
11
  emails: {
11
12
  'Sara Davis': {
@@ -83,4 +84,20 @@ export declare const EmailMockData: {
83
84
  content: string;
84
85
  }[];
85
86
  };
87
+ export declare const viewAnalysisEmailHeaderMock: FieldValueListProps['fields'];
88
+ export declare const topicListMock: ({
89
+ id: string;
90
+ primary: string;
91
+ secondary: {
92
+ indicator: string;
93
+ value: string;
94
+ };
95
+ } | {
96
+ id: string;
97
+ primary: string;
98
+ secondary: {
99
+ indicator: string;
100
+ value?: undefined;
101
+ };
102
+ })[];
86
103
  //# sourceMappingURL=Email.mocks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Email.mocks.d.ts","sourceRoot":"","sources":["../../../src/social/Email/Email.mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAa,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE7F,eAAO,MAAM,gBAAgB,gIACkG,CAAC;AAEhI,eAAO,MAAM,gBAAgB,EAAE,kBAAkB,CAAC,a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ticipants = participants
51
51
  export const bccParticipants = participants
52
52
  .slice(4, 9)
53
53
  .map((participant) => participant.emailAddress);
54
- export const ViewAnalysisMockData = [
54
+ export const EntityListMockData = [
55
55
  {
56
56
  name: 'Ticket number',
57
57
  value: [
@@ -345,4 +345,51 @@ export const EmailMockData = {
345
345
  }
346
346
  ]
347
347
  };
348
+ export const viewAnalysisEmailHeaderMock = [
349
+ {
350
+ name: 'Sender email',
351
+ value: 'robert.stanton@hotmail.com'
352
+ },
353
+ {
354
+ name: 'Sender name',
355
+ value: 'Robert stanton'
356
+ },
357
+ {
358
+ name: 'Subject',
359
+ value: 'I have a quick question on travel'
360
+ }
361
+ ];
362
+ export const topicListMock = [
363
+ {
364
+ id: '1',
365
+ primary: 'Missing ticket',
366
+ secondary: {
367
+ indicator: 'Confidence',
368
+ value: '50%'
369
+ }
370
+ },
371
+ {
372
+ id: '2',
373
+ primary: 'Missing baggage',
374
+ secondary: {
375
+ indicator: 'Confidence',
376
+ value: '80%'
377
+ }
378
+ },
379
+ {
380
+ id: '3',
381
+ primary: 'Ticket booking',
382
+ secondary: {
383
+ indicator: 'Confidence',
384
+ value: '30%'
385
+ }
386
+ },
387
+ {
388
+ id: '4',
389
+ primary: 'Language',
390
+ secondary: {
391
+ indicator: 'Confidence'
392
+ }
393
+ }
394
+ ];
348
395
  //# sourceMappingURL=Email.mocks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Email.mocks.js","sourceRoot":"","sources":["../../../src/social/Email/Email.mocks.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAC3B,6HAA6H,CAAC;AAEhI,MAAM,CAAC,MAAM,gBAAgB,GAAsC;IACjE;QACE,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,GAAG;KACd;IACD;QACE,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE,iDAAiD;KAC7D;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAuC;IAC9D,EAAE,YAAY,EAAE,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D;YACE,EAAE,EAAE,WAAW;YACf,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,iCAAiC;SAC3C;QACD;YACE,EAAE,EAAE,cAAc;YAClB,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,cAAc;SACxB;KACF;CACF,CAAC","sourcesContent":["import { EmailComposerProps, EmailUser, ViewAnalysisProps } from '@pega/cosmos-react-social';\n\nexport const emailBodyContent =\n '<div>Hi, <br /> <br /><div>Can you please change my address in the SSN.</div> <br /> <br />Regards, <br />Sara Davis </div>';\n\nexport const emailAttachments: EmailComposerProps['attachments'] = [\n {\n name: 'Policy.doc',\n progress: 100\n },\n {\n name: 'E-Ticket',\n thumbnail: 'https://pbs.twimg.com/media/ENNN5PAXkAE-hag.jpg'\n }\n];\n\nexport const participants: EmailComposerProps['participants'] = [\n { emailAddress: 'Vernon.Lee@example.com', fullName: 'Vernon Lee', shortName: 'Vernon' },\n { emailAddress: 'Eula.Morales@example.com', fullName: 'Eula Morales', shortName: 'Eula' },\n { emailAddress: 'Paul.Smith@example.com', fullName: 'Paul Smith', shortName: 'Paul' },\n { emailAddress: 'Frank.Walker@example.com', fullName: 'Frank Walker', shortName: 'Frank' },\n { emailAddress: 'Edward.Green@example.com', fullName: 'Edward Green', shortName: 'Edward' },\n { emailAddress: 'John.Smith@example.com', fullName: 'John Smith', shortName: 'John' },\n { emailAddress: 'Olivia.Cockburn@example.com', fullName: 'Olivia Cockburn', shortName: 'Olivia' },\n { emailAddress: 'Peter.Hernandez@example.com', fullName: 'Peter Hernandez', shortName: 'Peter' },\n { emailAddress: 'Helena.Johnson@example.com', fullName: 'Helena Johnson', shortName: 'Helena' },\n {\n emailAddress: 'Katheryn.Hudson@example.com',\n fullName: 'Katheryn Hudson',\n shortName: 'Katheryn'\n },\n { emailAddress: 'Mia.Hershel@example.com', fullName: 'Mia Hershel', shortName: 'Mia' },\n { emailAddress: 'Ann.Mitchell@example.com', fullName: 'Ann Mitchell', shortName: 'Ann' },\n { emailAddress: 'Rafael.Bottom@example.com', fullName: 'Rafael Bottom', shortName: 'Rafael' },\n {\n emailAddress: 'Christopher.Gatsby@example.com',\n fullName: 'Christopher Gatsby',\n shortName: 'Christopher'\n },\n { emailAddress: 'Julianne.Moore@example.com', fullName: 'Julianne Moore', shortName: 'Julianne' },\n { emailAddress: 'Emily.Stone@example.com', fullName: 'Emily Stone', shortName: 'Emily' },\n { emailAddress: 'Richard.Wiles@example.com', fullName: 'Richard Wiles', shortName: 'Richard' },\n { emailAddress: 'Ella.Connor@example.com', fullName: 'Ella Connor', shortName: 'Ella' },\n { emailAddress: 'Robyn.Fenton@example.com', fullName: 'Robyn Fenton', shortName: 'Robyn' },\n { emailAddress: 'Lucille.Hale@example.com', fullName: 'Lucille Hale', shortName: 'Lucille' },\n { emailAddress: 'Angelina.Pitt@example.com', fullName: 'Angelina Pitt', shortName: 'Angelina' },\n { emailAddress: 'Tanya.Robinson@example.com', fullName: 'Tanya Robinson', shortName: 'Tanya' },\n { emailAddress: 'Laura.Horowitz@example.com', fullName: 'Laura Horowitz', shortName: 'Laura' }\n];\n\nexport const toParticipants = participants\n .slice(1, 3)\n .map((participant: EmailUser) => participant.emailAddress);\nexport const ccParticipants = participants\n .slice(9, 11)\n .map((participant: EmailUser) => participant.emailAddress);\nexport const bccParticipants = participants\n .slice(4, 9)\n .map((participant: EmailUser) => participant.emailAddress);\n\nexport const ViewAnalysisMockData: ViewAnalysisProps['content'] = [\n {\n name: 'Ticket number',\n value: [\n {\n id: '1',\n entity: {\n value: '7546383',\n type: 'system',\n name: 'Ticket number',\n variant: 3\n }\n },\n {\n id: '2',\n entity: {\n value: '7546383',\n type: 'system',\n name: 'Ticket number',\n variant: 3,\n icon: 'paper-clip'\n }\n }\n ]\n },\n {\n name: 'Name',\n value: [\n {\n id: '1',\n entity: {\n value: 'Robert stanton',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n },\n {\n id: '2',\n entity: {\n value: 'Sara Davis',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n },\n {\n id: '3',\n entity: {\n value: 'Cindy',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n },\n {\n id: '4',\n entity: {\n value: 'Dean',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n },\n {\n id: '5',\n entity: {\n value: 'Joe Stevens',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n }\n ]\n },\n {\n name: 'Email',\n value: [\n {\n id: '1',\n entity: {\n value: 'robert.stanton@example.com',\n type: 'system',\n name: 'Email',\n variant: 2\n }\n },\n {\n id: '2',\n entity: {\n value: 'robert.stanton@example.com',\n type: 'system',\n name: 'Email',\n variant: 2,\n icon: 'paper-clip'\n }\n },\n {\n id: '3',\n entity: {\n value: 'cindy.turner@example.com',\n type: 'system',\n name: 'Email',\n variant: 2\n }\n },\n {\n id: '4',\n entity: {\n value: 'dean.thomas@example.com',\n type: 'system',\n name: 'Email',\n variant: 2\n }\n },\n {\n id: '5',\n entity: {\n value: 'joe.stevens@example.com',\n type: 'system',\n name: 'Email',\n variant: 2\n }\n }\n ]\n },\n {\n name: 'Date',\n value: [\n {\n id: '1',\n entity: {\n value: 'Dec 5,2021 9.05 AM',\n type: 'system',\n name: 'Date',\n variant: 4\n }\n }\n ]\n },\n {\n name: 'Flight Number',\n value: [\n {\n id: '1',\n entity: {\n value: 'FL-JK-403',\n type: 'system',\n name: 'Flight Number',\n variant: 5\n }\n }\n ]\n },\n {\n name: 'Address',\n value: [\n {\n id: '1',\n entity: {\n value: 'Nagercoil,Hyderabad',\n type: 'system',\n name: 'Address',\n variant: 15\n }\n }\n ]\n },\n {\n name: 'Location',\n value: [\n {\n id: '1',\n entity: {\n value: 'Hyderabad',\n type: 'system',\n name: 'Location',\n variant: 8\n }\n }\n ]\n }\n];\n\nexport const EmailMockData = {\n emails: {\n 'Sara Davis': {\n fullName: 'Sara Davis',\n shortName: 'Sara',\n emailAddress: 'saraConnor@example.com'\n },\n 'John Brown': {\n fullName: 'John Brown',\n shortName: 'John',\n emailAddress: 'john@example.com'\n },\n 'Hugh Phillips': {\n fullName: 'Hugh Phillips',\n shortName: 'Hugh',\n emailAddress: 'Hugh@example.com'\n },\n 'Laura Stevens': {\n fullName: 'Laura Stevens',\n shortName: 'Laura',\n emailAddress: 'laurastevens@example.com',\n avatarProps: {\n icon: 'headset'\n }\n },\n 'Joe Stevens': {\n fullName: 'Joe Stevens',\n shortName: 'Joe',\n emailAddress: 'Joe@example.com'\n },\n 'Adam Gillchrist': {\n fullName: 'Adam Gillchrist',\n shortName: 'Adam',\n emailAddress: 'adam@example.com'\n },\n 'John Paul': {\n fullName: 'John, Paul',\n shortName: 'Paul',\n emailAddress: 'John.Paul@example.com'\n },\n 'Oran Jacob': {\n fullName: 'Oran, Jacob',\n shortName: 'Jacob',\n emailAddress: 'jacob@example.com'\n },\n 'Tyson Mike': {\n fullName: 'Tyson, Mike',\n shortName: 'Mike',\n emailAddress: 'mike@example.com'\n },\n 'John Cent': {\n fullName: 'John, Cent',\n shortName: 'John',\n emailAddress: 'John.cena@example.com'\n },\n 'Mystery Rey': {\n fullName: 'Mystery, Rey',\n shortName: 'Rey',\n emailAddress: 'rey619@example.com'\n },\n 'Anton, Randy': {\n fullName: 'Anton, Randy',\n shortName: 'Randy',\n emailAddress: 'Randy.ortan@example.com'\n }\n },\n suggestedReplies: [\n {\n id: 'thank-you',\n title: 'Thank you',\n content: 'Thank you'\n },\n {\n id: 'clarification',\n title: 'Clarification',\n content: 'Can you please provide more clarification'\n },\n {\n id: 'apologies',\n title: 'Apologies',\n content: 'Apologies for the inconvenience'\n },\n {\n id: 'we_will_help',\n title: 'We will help',\n content: 'We will help'\n }\n ],\n emailBodyTemplates: [\n {\n id: 'thank-you',\n title: 'Thank you',\n content: 'Thank you'\n },\n {\n id: 'clarification',\n title: 'Clarification',\n content: 'Can you please provide more clarification'\n },\n {\n id: 'apologies',\n title: 'Apologies',\n content: 'Apologies for the inconvenience'\n },\n {\n id: 'we_will_help',\n title: 'We will help',\n content: 'We will help'\n }\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AE,EAAE,GAAG;QACP,OAAO,EAAE,UAAU;QACnB,SAAS,EAAE;YACT,SAAS,EAAE,YAAY;SACxB;KACF;CACF,CAAC","sourcesContent":["import { FieldValueListProps } from '@pega/cosmos-react-core';\nimport { EmailComposerProps, EmailUser, EntityListProps } from '@pega/cosmos-react-social';\n\nexport const emailBodyContent =\n '<div>Hi, <br /> <br /><div>Can you please change my address in the SSN.</div> <br /> <br />Regards, <br />Sara Davis </div>';\n\nexport const emailAttachments: EmailComposerProps['attachments'] = [\n {\n name: 'Policy.doc',\n progress: 100\n },\n {\n name: 'E-Ticket',\n thumbnail: 'https://pbs.twimg.com/media/ENNN5PAXkAE-hag.jpg'\n }\n];\n\nexport const participants: EmailComposerProps['participants'] = [\n { emailAddress: 'Vernon.Lee@example.com', fullName: 'Vernon Lee', shortName: 'Vernon' },\n { emailAddress: 'Eula.Morales@example.com', fullName: 'Eula Morales', shortName: 'Eula' },\n { emailAddress: 'Paul.Smith@example.com', fullName: 'Paul Smith', shortName: 'Paul' },\n { emailAddress: 'Frank.Walker@example.com', fullName: 'Frank Walker', shortName: 'Frank' },\n { emailAddress: 'Edward.Green@example.com', fullName: 'Edward Green', shortName: 'Edward' },\n { emailAddress: 'John.Smith@example.com', fullName: 'John Smith', shortName: 'John' },\n { emailAddress: 'Olivia.Cockburn@example.com', fullName: 'Olivia Cockburn', shortName: 'Olivia' },\n { emailAddress: 'Peter.Hernandez@example.com', fullName: 'Peter Hernandez', shortName: 'Peter' },\n { emailAddress: 'Helena.Johnson@example.com', fullName: 'Helena Johnson', shortName: 'Helena' },\n {\n emailAddress: 'Katheryn.Hudson@example.com',\n fullName: 'Katheryn Hudson',\n shortName: 'Katheryn'\n },\n { emailAddress: 'Mia.Hershel@example.com', fullName: 'Mia Hershel', shortName: 'Mia' },\n { emailAddress: 'Ann.Mitchell@example.com', fullName: 'Ann Mitchell', shortName: 'Ann' },\n { emailAddress: 'Rafael.Bottom@example.com', fullName: 'Rafael Bottom', shortName: 'Rafael' },\n {\n emailAddress: 'Christopher.Gatsby@example.com',\n fullName: 'Christopher Gatsby',\n shortName: 'Christopher'\n },\n { emailAddress: 'Julianne.Moore@example.com', fullName: 'Julianne Moore', shortName: 'Julianne' },\n { emailAddress: 'Emily.Stone@example.com', fullName: 'Emily Stone', shortName: 'Emily' },\n { emailAddress: 'Richard.Wiles@example.com', fullName: 'Richard Wiles', shortName: 'Richard' },\n { emailAddress: 'Ella.Connor@example.com', fullName: 'Ella Connor', shortName: 'Ella' },\n { emailAddress: 'Robyn.Fenton@example.com', fullName: 'Robyn Fenton', shortName: 'Robyn' },\n { emailAddress: 'Lucille.Hale@example.com', fullName: 'Lucille Hale', shortName: 'Lucille' },\n { emailAddress: 'Angelina.Pitt@example.com', fullName: 'Angelina Pitt', shortName: 'Angelina' },\n { emailAddress: 'Tanya.Robinson@example.com', fullName: 'Tanya Robinson', shortName: 'Tanya' },\n { emailAddress: 'Laura.Horowitz@example.com', fullName: 'Laura Horowitz', shortName: 'Laura' }\n];\n\nexport const toParticipants = participants\n .slice(1, 3)\n .map((participant: EmailUser) => participant.emailAddress);\nexport const ccParticipants = participants\n .slice(9, 11)\n .map((participant: EmailUser) => participant.emailAddress);\nexport const bccParticipants = participants\n .slice(4, 9)\n .map((participant: EmailUser) => participant.emailAddress);\n\nexport const EntityListMockData: EntityListProps['content'] = [\n {\n name: 'Ticket number',\n value: [\n {\n id: '1',\n entity: {\n value: '7546383',\n type: 'system',\n name: 'Ticket number',\n variant: 3\n }\n },\n {\n id: '2',\n entity: {\n value: '7546383',\n type: 'system',\n name: 'Ticket number',\n variant: 3,\n icon: 'paper-clip'\n }\n }\n ]\n },\n {\n name: 'Name',\n value: [\n {\n id: '1',\n entity: {\n value: 'Robert stanton',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n },\n {\n id: '2',\n entity: {\n value: 'Sara Davis',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n },\n {\n id: '3',\n entity: {\n value: 'Cindy',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n },\n {\n id: '4',\n entity: {\n value: 'Dean',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n },\n {\n id: '5',\n entity: {\n value: 'Joe Stevens',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n }\n ]\n },\n {\n name: 'Email',\n value: [\n {\n id: '1',\n entity: {\n value: 'robert.stanton@example.com',\n type: 'system',\n name: 'Email',\n variant: 2\n }\n },\n {\n id: '2',\n entity: {\n value: 'robert.stanton@example.com',\n type: 'system',\n name: 'Email',\n variant: 2,\n icon: 'paper-clip'\n }\n },\n {\n id: '3',\n entity: {\n value: 'cindy.turner@example.com',\n type: 'system',\n name: 'Email',\n variant: 2\n }\n },\n {\n id: '4',\n entity: {\n value: 'dean.thomas@example.com',\n type: 'system',\n name: 'Email',\n variant: 2\n }\n },\n {\n id: '5',\n entity: {\n value: 'joe.stevens@example.com',\n type: 'system',\n name: 'Email',\n variant: 2\n }\n }\n ]\n },\n {\n name: 'Date',\n value: [\n {\n id: '1',\n entity: {\n value: 'Dec 5,2021 9.05 AM',\n type: 'system',\n name: 'Date',\n variant: 4\n }\n }\n ]\n },\n {\n name: 'Flight Number',\n value: [\n {\n id: '1',\n entity: {\n value: 'FL-JK-403',\n type: 'system',\n name: 'Flight Number',\n variant: 5\n }\n }\n ]\n },\n {\n name: 'Address',\n value: [\n {\n id: '1',\n entity: {\n value: 'Nagercoil,Hyderabad',\n type: 'system',\n name: 'Address',\n variant: 15\n }\n }\n ]\n },\n {\n name: 'Location',\n value: [\n {\n id: '1',\n entity: {\n value: 'Hyderabad',\n type: 'system',\n name: 'Location',\n variant: 8\n }\n }\n ]\n }\n];\n\nexport const EmailMockData = {\n emails: {\n 'Sara Davis': {\n fullName: 'Sara Davis',\n shortName: 'Sara',\n emailAddress: 'saraConnor@example.com'\n },\n 'John Brown': {\n fullName: 'John Brown',\n shortName: 'John',\n emailAddress: 'john@example.com'\n },\n 'Hugh Phillips': {\n fullName: 'Hugh Phillips',\n shortName: 'Hugh',\n emailAddress: 'Hugh@example.com'\n },\n 'Laura Stevens': {\n fullName: 'Laura Stevens',\n shortName: 'Laura',\n emailAddress: 'laurastevens@example.com',\n avatarProps: {\n icon: 'headset'\n }\n },\n 'Joe Stevens': {\n fullName: 'Joe Stevens',\n shortName: 'Joe',\n emailAddress: 'Joe@example.com'\n },\n 'Adam Gillchrist': {\n fullName: 'Adam Gillchrist',\n shortName: 'Adam',\n emailAddress: 'adam@example.com'\n },\n 'John Paul': {\n fullName: 'John, Paul',\n shortName: 'Paul',\n emailAddress: 'John.Paul@example.com'\n },\n 'Oran Jacob': {\n fullName: 'Oran, Jacob',\n shortName: 'Jacob',\n emailAddress: 'jacob@example.com'\n },\n 'Tyson Mike': {\n fullName: 'Tyson, Mike',\n shortName: 'Mike',\n emailAddress: 'mike@example.com'\n },\n 'John Cent': {\n fullName: 'John, Cent',\n shortName: 'John',\n emailAddress: 'John.cena@example.com'\n },\n 'Mystery Rey': {\n fullName: 'Mystery, Rey',\n shortName: 'Rey',\n emailAddress: 'rey619@example.com'\n },\n 'Anton, Randy': {\n fullName: 'Anton, Randy',\n shortName: 'Randy',\n emailAddress: 'Randy.ortan@example.com'\n }\n },\n suggestedReplies: [\n {\n id: 'thank-you',\n title: 'Thank you',\n content: 'Thank you'\n },\n {\n id: 'clarification',\n title: 'Clarification',\n content: 'Can you please provide more clarification'\n },\n {\n id: 'apologies',\n title: 'Apologies',\n content: 'Apologies for the inconvenience'\n },\n {\n id: 'we_will_help',\n title: 'We will help',\n content: 'We will help'\n }\n ],\n emailBodyTemplates: [\n {\n id: 'thank-you',\n title: 'Thank you',\n content: 'Thank you'\n },\n {\n id: 'clarification',\n title: 'Clarification',\n content: 'Can you please provide more clarification'\n },\n {\n id: 'apologies',\n title: 'Apologies',\n content: 'Apologies for the inconvenience'\n },\n {\n id: 'we_will_help',\n title: 'We will help',\n content: 'We will help'\n }\n ]\n};\n\nexport const viewAnalysisEmailHeaderMock: FieldValueListProps['fields'] = [\n {\n name: 'Sender email',\n value: 'robert.stanton@hotmail.com'\n },\n {\n name: 'Sender name',\n value: 'Robert stanton'\n },\n {\n name: 'Subject',\n value: 'I have a quick question on travel'\n }\n];\n\nexport const topicListMock = [\n {\n id: '1',\n primary: 'Missing ticket',\n secondary: {\n indicator: 'Confidence',\n value: '50%'\n }\n },\n {\n id: '2',\n primary: 'Missing baggage',\n secondary: {\n indicator: 'Confidence',\n value: '80%'\n }\n },\n {\n id: '3',\n primary: 'Ticket booking',\n secondary: {\n indicator: 'Confidence',\n value: '30%'\n }\n },\n {\n id: '4',\n primary: 'Language',\n secondary: {\n indicator: 'Confidence'\n }\n }\n];\n"]}
@@ -6,7 +6,7 @@ declare const _default: {
6
6
  };
7
7
  export default _default;
8
8
  export declare const email: () => JSX.Element;
9
- export declare const viewAnalysis: () => JSX.Element;
9
+ export declare const ViewAnalysis: () => JSX.Element;
10
10
  export declare const emailEntities: () => JSX.Element;
11
11
  export declare const emailConversation: () => JSX.Element;
12
12
  export declare const EmailComposerDemo: () => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Email.stories.d.ts","sourceRoot":"","sources":["../../../src/social/Email/Email.stories.tsx"],"names":[],"mappings":";AAyBA,OAAO,EASL,UAAU,EAIX,MAAM,2BAA2B,CAAC;;;;;AAenC,wBAGE;AA6NF,eAAO,MAAM,KAAK,mBA4CjB,CAAC;AAMF,eAAO,MAAM,YAAY,mBAYxB,CAAC;AAYF,eAAO,MAAM,aAAa,mBAyFzB,CAAC;AAaF,eAAO,MAAM,iBAAiB,mBA2C7B,CAAC;AAaF,eAAO,MAAM,iBAAiB,mBA6E7B,CAAC;AAYF,eAAO,MAAM,SAAS;;;;;;;CAkNrB,CAAC;AAqBF,eAAO,MAAM,oBAAoB,mBA8BhC,CAAC;AAgPF,eAAO,MAAM,oBAAoB;;;;;CAyDhC,CAAC"}
1
+ {"version":3,"file":"Email.stories.d.ts","sourceRoot":"","sources":["../../../src/social/Email/Email.stories.tsx"],"names":[],"mappings":";AAgCA,OAAO,EASL,UAAU,EAIX,MAAM,2BAA2B,CAAC;;;;;AAiBnC,wBAGE;AAwOF,eAAO,MAAM,KAAK,mBA4CjB,CAAC;AAMF,eAAO,MAAM,YAAY,mBAqCxB,CAAC;AAYF,eAAO,MAAM,aAAa,mBAkHzB,CAAC;AAaF,eAAO,MAAM,iBAAiB,mBA2C7B,CAAC;AAaF,eAAO,MAAM,iBAAiB,mBAmF7B,CAAC;AAYF,eAAO,MAAM,SAAS;;;;;;;CA0NrB,CAAC;AAqBF,eAAO,MAAM,oBAAoB,mBA8BhC,CAAC;AAgPF,eAAO,MAAM,oBAAoB;;;;;CAyDhC,CAAC"}
@@ -2,10 +2,10 @@ import { useState, useRef, useContext, createRef } from 'react';
2
2
  import { action } from '@storybook/addon-actions';
3
3
  import { array, boolean } from '@storybook/addon-knobs';
4
4
  import styled, { css } from 'styled-components';
5
- import { Card, CardContent, createUID, MenuButton, Icon, registerIcon, hasProp, Flex, Button, ModalManagerContext, Modal, menuHelpers, defaultThemeProp } from '@pega/cosmos-react-core';
5
+ import { Card, CardContent, createUID, MenuButton, Icon, registerIcon, hasProp, Flex, Button, ModalManagerContext, Modal, menuHelpers, defaultThemeProp, CardHeader, Text, SummaryList, Grid, FieldValueList, StyledLabel } from '@pega/cosmos-react-core';
6
6
  import * as filterIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/filter.icon';
7
- import { Email, EmailConversation, EmailComposer, EmailShell, EmailSummaryItem, EmailSummaryList, ViewAnalysis } from '@pega/cosmos-react-social';
8
- import { bccParticipants, ccParticipants, emailBodyContent, participants, toParticipants, emailAttachments, ViewAnalysisMockData, EmailMockData } from './Email.mocks';
7
+ import { Email, EmailConversation, EmailComposer, EmailShell, EmailSummaryItem, EmailSummaryList, EntityList } from '@pega/cosmos-react-social';
8
+ import { bccParticipants, ccParticipants, emailBodyContent, participants, toParticipants, emailAttachments, EntityListMockData, EmailMockData, viewAnalysisEmailHeaderMock, topicListMock } from './Email.mocks';
9
9
  registerIcon(filterIcon);
10
10
  export default {
11
11
  title: 'Social/Email',
@@ -17,6 +17,12 @@ const handleExternalEntry = (filterValue) => {
17
17
  const matched = filterValue.match(pattern);
18
18
  return !!matched?.input;
19
19
  };
20
+ const templates = mockEmailBodyTemplates.map(({ id, title }) => {
21
+ return {
22
+ id,
23
+ title
24
+ };
25
+ });
20
26
  const baseComposerProps = {
21
27
  participants,
22
28
  externalValidator: handleExternalEntry,
@@ -31,7 +37,7 @@ const baseComposerProps = {
31
37
  onCancel: () => {
32
38
  action('cancelled email composing');
33
39
  },
34
- templates: mockEmailBodyTemplates
40
+ templates
35
41
  };
36
42
  var LaunchAction;
37
43
  (function (LaunchAction) {
@@ -82,34 +88,37 @@ const emailActions = (<MenuButton text='Email actions' variant='simple' icon='mo
82
88
  }
83
89
  ]
84
90
  }}/>);
85
- const emailDemoActions = (create, subject) => {
91
+ const emailDemoActions = (create, subject, onTemplateChange) => {
86
92
  const id = createUID();
87
93
  return (<MenuButton text='Email actions' variant='simple' icon='more' iconOnly menu={{
88
94
  items: [
89
95
  {
90
- id,
96
+ id: createUID(),
91
97
  primary: 'Reply',
92
98
  onClick: () => launchEmailComposer(id, LaunchAction.REPLY, {
93
99
  ...baseComposerProps,
100
+ onTemplateChange,
94
101
  responseType: 'reply',
95
102
  subject: `Re-${subject}` || ''
96
103
  }, create)
97
104
  },
98
105
  {
99
- id,
106
+ id: createUID(),
100
107
  primary: 'Reply all',
101
108
  onClick: () => launchEmailComposer(id, LaunchAction.REPLYALL, {
102
109
  ...baseComposerProps,
110
+ onTemplateChange,
103
111
  responseType: 'replyAll',
104
112
  cc: [],
105
113
  subject: `Re-${subject}` || ''
106
114
  }, create)
107
115
  },
108
116
  {
109
- id,
117
+ id: createUID(),
110
118
  primary: 'Forward',
111
119
  onClick: () => launchEmailComposer(id, LaunchAction.FORWARD, {
112
120
  ...baseComposerProps,
121
+ onTemplateChange,
113
122
  responseType: 'forward',
114
123
  subject: `Fw-${subject}` || ''
115
124
  }, create)
@@ -172,21 +181,44 @@ export const email = () => {
172
181
  const StyledViewAnalysis = styled.div `
173
182
  width: 18rem;
174
183
  `;
175
- export const viewAnalysis = () => {
176
- const content = ViewAnalysisMockData;
184
+ export const ViewAnalysis = () => {
177
185
  const headerProps = {
178
186
  icon: 'list-number',
179
187
  text: 'Entities'
180
188
  };
189
+ const itemsToRender = topicListMock.map(items => {
190
+ return {
191
+ ...items,
192
+ primary: <StyledLabel>{items.primary}</StyledLabel>,
193
+ secondary: (<Flex container={{ direction: 'row', justify: 'between' }}>
194
+ <Text variant='primary'>{items.secondary.indicator}</Text>
195
+ <StyledLabel>{items.secondary.value}</StyledLabel>
196
+ </Flex>)
197
+ };
198
+ });
181
199
  return (<StyledViewAnalysis>
182
- <ViewAnalysis header={headerProps} content={content}/>
200
+ <Grid container={{ rowGap: 2 }}>
201
+ <EntityList header={headerProps} content={EntityListMockData}/>
202
+
203
+ <Card>
204
+ <CardHeader container={{ alignItems: 'center', gap: 1 }}>
205
+ <Icon name='document-doc'/>
206
+ <Text variant='h3'>Email header</Text>
207
+ </CardHeader>
208
+ <CardContent>
209
+ <FieldValueList fields={viewAnalysisEmailHeaderMock} variant='stacked'/>
210
+ </CardContent>
211
+ </Card>
212
+
213
+ <SummaryList name='Topics' icon='headline' items={itemsToRender} noItemsText='No items'/>
214
+ </Grid>
183
215
  </StyledViewAnalysis>);
184
216
  };
185
217
  export const emailEntities = () => {
186
218
  const nestedEntities = ['Place: Nagercoil, Hyderabad', 'Location: Nagercoil'];
187
219
  return (<Card>
188
220
  <StyledEmailCardContent>
189
- <Email id={createUID()} timeStamp='2021-01-05T09:12' from={mockEmails['Laura Stevens']} cc={[mockEmails['Adam Gillchrist'], mockEmails['John Paul']]} bcc={[mockEmails['Anton, Randy'], mockEmails['Hugh Phillips']]} to={[mockEmails['Sara Davis'], mockEmails['John Brown'], mockEmails['Joe Stevens']]} body='<div>Hi,<br/><p>I am one of the customer of Indian Overseas Bank, Nagercoil branch, with code 3967. I have a saving bank account here. My account number is 6785420965476.</p><br/><p>I have been given a debit cum ATM card from this bank and the same has been lost when I was traveling from Nagercoil to Trichy by Bus on Jan 04, 2021. I remember that my ATM card number was 1920 6746 8653 1256.</p><br/>I hereby request you to block my debit card immediately to prevent misuse of the same by some others. Also I request you to give me an new debit card as early as possible.<br/><br/>Regards,<br/>Laura Stevens</div>' entityHighlightMapping={boolean('Entity Highlighting', true)
221
+ <Email id={createUID()} timeStamp='2021-01-05T09:12' from={mockEmails['Laura Stevens']} cc={[mockEmails['Adam Gillchrist'], mockEmails['John Paul']]} bcc={[mockEmails['Anton, Randy'], mockEmails['Hugh Phillips']]} to={[mockEmails['Sara Davis'], mockEmails['John Brown'], mockEmails['Joe Stevens']]} body='<div>Hi,<br/><p>I am one of the customer of Indian Overseas Bank, <b><i>Nagercoil</i></b> branch, with code <b><a href="www.google.com"><i>3967</i></a></b>. I have a saving bank account here. My account number is <i>6785420965476</i>.</p><br/><p>I have been given a debit cum ATM card from this bank and the same has been lost when I was traveling from Nagercoil to Trichy by Bus on Jan 04, 2021. I remember that my ATM card number was 1920 6746 8653 1256.</p><br/>I hereby request you to block my debit card immediately to prevent misuse of the same by some others. Also I request you to give me an new debit card as early as possible.<br/><br/>Regards,<br/>Laura Stevens</div>' entityHighlightMapping={boolean('Entity Highlighting', true)
190
222
  ? [
191
223
  {
192
224
  value: '3967',
@@ -245,6 +277,28 @@ export const emailEntities = () => {
245
277
  description: 'Date'
246
278
  }
247
279
  ]
280
+ : undefined} contextMenu={boolean('Copy to context menu fields', true)
281
+ ? {
282
+ heading: 'Copy to',
283
+ items: [
284
+ {
285
+ id: createUID(),
286
+ primary: 'Field 1',
287
+ selected: false
288
+ },
289
+ {
290
+ id: createUID(),
291
+ primary: 'Field 2',
292
+ selected: true
293
+ },
294
+ {
295
+ id: createUID(),
296
+ primary: 'Field 3',
297
+ selected: true
298
+ }
299
+ ],
300
+ onItemClick: action('On Copy')
301
+ }
248
302
  : undefined} subject='I lost my debit card' onReply={action('On reply')} onReplyAll={action('On reply all')} onForward={action('On forward')} onSuggestionClick={action('On Suggested reply clicked')} sentiment={{
249
303
  variant: 'neutral'
250
304
  }} actions={emailActions} suggestions={mockSuggestedReplies}/>
@@ -287,13 +341,17 @@ export const emailConversation = () => {
287
341
  export const EmailComposerDemo = () => {
288
342
  const fileUploadInputRef = useRef(null);
289
343
  const [attachments, setAttachments] = useState(emailAttachments);
344
+ const onTemplateChange = id => {
345
+ const selectedTemplate = mockEmailBodyTemplates.find(template => template.id === id);
346
+ return selectedTemplate?.content;
347
+ };
290
348
  return (<Card style={{ width: '30rem' }}>
291
349
  <CardContent>
292
350
  <EmailComposer onSend={action('On Send')} onCancel={action('On cancel')} externalValidator={handleExternalEntry} participants={participants} to={{
293
351
  reply: [participants[7].emailAddress],
294
352
  replyAll: toParticipants,
295
353
  forward: []
296
- }} cc={ccParticipants} bcc={bccParticipants} responseType='reply' subject='Request: Pause service' templates={mockEmailBodyTemplates} bodyContent='Hi, Hope you are doing well' onImageAdded={action('On Image added')} attachments={attachments.map(attachment => {
354
+ }} cc={ccParticipants} bcc={bccParticipants} responseType='reply' subject='Request: Pause service' templates={templates} onTemplateChange={onTemplateChange} bodyContent='Hi, Hope you are doing well' onImageAdded={action('On Image added')} attachments={attachments.map(attachment => {
297
355
  return {
298
356
  ...attachment,
299
357
  onDelete: name => {
@@ -330,6 +388,10 @@ export const EmailComposerDemo = () => {
330
388
  </Card>);
331
389
  };
332
390
  export const EmailDemo = ({ hideSuggestions }) => {
391
+ const onTemplateChange = id => {
392
+ const selectedTemplate = mockEmailBodyTemplates.find(template => template.id === id);
393
+ return selectedTemplate?.content;
394
+ };
333
395
  const actions = array('Actions', ['Transfer', 'End conversation']).map(name => ({
334
396
  primary: name,
335
397
  id: name,
@@ -375,12 +437,13 @@ export const EmailDemo = ({ hideSuggestions }) => {
375
437
  subject: 'Pause service'
376
438
  }
377
439
  ].map(emailData => {
378
- const emailActionItems = emailDemoActions(create, emailData.subject);
440
+ const emailActionItems = emailDemoActions(create, emailData.subject, onTemplateChange);
379
441
  return {
380
442
  ...emailData,
381
443
  onReply: id => {
382
444
  launchEmailComposer(id, LaunchAction.REPLY, {
383
445
  ...baseComposerProps,
446
+ onTemplateChange,
384
447
  externalValidator: handleExternalEntry,
385
448
  responseType: 'reply',
386
449
  subject: `Re-${emailData.subject}` || ''
@@ -389,6 +452,7 @@ export const EmailDemo = ({ hideSuggestions }) => {
389
452
  onForward: id => {
390
453
  launchEmailComposer(id, LaunchAction.FORWARD, {
391
454
  ...baseComposerProps,
455
+ onTemplateChange,
392
456
  externalValidator: handleExternalEntry,
393
457
  responseType: 'forward',
394
458
  subject: `Fw-${emailData.subject}` || ''
@@ -400,9 +464,10 @@ export const EmailDemo = ({ hideSuggestions }) => {
400
464
  ...baseComposerProps,
401
465
  externalValidator: handleExternalEntry,
402
466
  responseType: 'reply',
467
+ onTemplateChange,
403
468
  subject: suggestion?.title || '',
404
469
  bodyContent: suggestion ? suggestion.content : '',
405
- defaultTemplate: suggestion?.title
470
+ defaultTemplateId: suggestion?.id
406
471
  }, create);
407
472
  },
408
473
  actions: emailActionItems,