@pega/cosmos-react-demos 3.0.0-dev.4.0 → 3.0.0-dev.5.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 (788) hide show
  1. package/jsx/build/AppShell/AppShell.mocks.d.ts +17 -0
  2. package/jsx/build/AppShell/AppShell.mocks.d.ts.map +1 -1
  3. package/jsx/build/AppShell/AppShell.mocks.js +15 -0
  4. package/jsx/build/AppShell/AppShell.mocks.js.map +1 -1
  5. package/jsx/build/AppShell/AppShell.stories.d.ts +2 -0
  6. package/jsx/build/AppShell/AppShell.stories.d.ts.map +1 -1
  7. package/jsx/build/AppShell/AppShell.stories.jsx +2 -17
  8. package/jsx/build/AppShell/AppShell.stories.jsx.map +1 -1
  9. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -1
  10. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.jsx +2 -1
  11. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.jsx.map +1 -1
  12. package/jsx/build/FlowModeller/FlowModeller.mocks.d.ts +19 -2
  13. package/jsx/build/FlowModeller/FlowModeller.mocks.d.ts.map +1 -1
  14. package/jsx/build/FlowModeller/{FlowModeller.mocks.js → FlowModeller.mocks.jsx} +77 -13
  15. package/jsx/build/FlowModeller/FlowModeller.mocks.jsx.map +1 -0
  16. package/jsx/build/FlowModeller/FlowModeller.stories.d.ts +2 -7
  17. package/jsx/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -1
  18. package/jsx/build/FlowModeller/FlowModeller.stories.jsx +14 -100
  19. package/jsx/build/FlowModeller/FlowModeller.stories.jsx.map +1 -1
  20. package/jsx/build/FlowModeller/FlowModeller.styles.d.ts +2 -0
  21. package/jsx/build/FlowModeller/FlowModeller.styles.d.ts.map +1 -0
  22. package/jsx/build/FlowModeller/FlowModeller.styles.js +8 -0
  23. package/jsx/build/FlowModeller/FlowModeller.styles.js.map +1 -0
  24. package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts +1 -5
  25. package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -1
  26. package/jsx/build/ItemLibrary/LibraryPicker.mocks.js +5 -10
  27. package/jsx/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -1
  28. package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts +2 -5
  29. package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -1
  30. package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx.map +1 -1
  31. package/jsx/build/LifeCycle/LifeCycle.mocks.d.ts +3 -0
  32. package/jsx/build/LifeCycle/LifeCycle.mocks.d.ts.map +1 -1
  33. package/jsx/build/LifeCycle/LifeCycle.mocks.js +106 -18
  34. package/jsx/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
  35. package/jsx/build/LifeCycle/LifeCycle.stories.d.ts +2 -4
  36. package/jsx/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
  37. package/jsx/build/LifeCycle/LifeCycle.stories.jsx +111 -27
  38. package/jsx/build/LifeCycle/LifeCycle.stories.jsx.map +1 -1
  39. package/jsx/build/LifeCycle/utils.d.ts.map +1 -1
  40. package/jsx/build/LifeCycle/utils.js +5 -4
  41. package/jsx/build/LifeCycle/utils.js.map +1 -1
  42. package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts +24 -0
  43. package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -1
  44. package/jsx/build/ObjectSelect/ObjectSelect.mocks.jsx +315 -0
  45. package/jsx/build/ObjectSelect/ObjectSelect.mocks.jsx.map +1 -0
  46. package/jsx/build/ObjectSelect/ObjectSelect.stories.d.ts +2 -7
  47. package/jsx/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -1
  48. package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx +5 -180
  49. package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx.map +1 -1
  50. package/jsx/build/PageTemplates/GalleryPage.mocks.d.ts +45 -0
  51. package/jsx/build/PageTemplates/GalleryPage.mocks.d.ts.map +1 -0
  52. package/jsx/build/PageTemplates/GalleryPage.mocks.jsx +78 -0
  53. package/jsx/build/PageTemplates/GalleryPage.mocks.jsx.map +1 -0
  54. package/jsx/build/PageTemplates/GalleryPage.stories.d.ts +1 -0
  55. package/jsx/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -1
  56. package/jsx/build/PageTemplates/GalleryPage.stories.jsx +3 -79
  57. package/jsx/build/PageTemplates/GalleryPage.stories.jsx.map +1 -1
  58. package/jsx/build/PageTemplates/PageTemplates.mocks.d.ts +11 -0
  59. package/jsx/build/PageTemplates/PageTemplates.mocks.d.ts.map +1 -0
  60. package/jsx/build/PageTemplates/PageTemplates.mocks.jsx +129 -0
  61. package/jsx/build/PageTemplates/PageTemplates.mocks.jsx.map +1 -0
  62. package/jsx/build/PageTemplates/PageTemplates.stories.d.ts +1 -0
  63. package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  64. package/jsx/build/PageTemplates/PageTemplates.stories.jsx +4 -129
  65. package/jsx/build/PageTemplates/PageTemplates.stories.jsx.map +1 -1
  66. package/jsx/build/Workbench/Workbench.stories.d.ts.map +1 -1
  67. package/jsx/build/Workbench/Workbench.stories.jsx +1 -9
  68. package/jsx/build/Workbench/Workbench.stories.jsx.map +1 -1
  69. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts +3 -0
  70. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts.map +1 -0
  71. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js +13 -0
  72. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js.map +1 -0
  73. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +16 -8
  74. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts.map +1 -1
  75. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx +59 -56
  76. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx.map +1 -1
  77. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts +5 -0
  78. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts.map +1 -0
  79. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.js +15 -0
  80. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.js.map +1 -0
  81. package/jsx/core/Button/Button.stories.jsx +6 -6
  82. package/jsx/core/Button/Button.stories.jsx.map +1 -1
  83. package/jsx/core/ColorPicker/ColorPicker.stories.d.ts.map +1 -1
  84. package/jsx/core/ColorPicker/ColorPicker.stories.jsx +2 -10
  85. package/jsx/core/ColorPicker/ColorPicker.stories.jsx.map +1 -1
  86. package/jsx/core/ColorPicker/ColorPicker.styles.d.ts +4 -0
  87. package/jsx/core/ColorPicker/ColorPicker.styles.d.ts.map +1 -0
  88. package/jsx/core/ColorPicker/ColorPicker.styles.js +11 -0
  89. package/jsx/core/ColorPicker/ColorPicker.styles.js.map +1 -0
  90. package/jsx/core/Configuration/Configuration.mocks.d.ts +7 -0
  91. package/jsx/core/Configuration/Configuration.mocks.d.ts.map +1 -0
  92. package/jsx/core/Configuration/Configuration.mocks.jsx +9 -0
  93. package/jsx/core/Configuration/Configuration.mocks.jsx.map +1 -0
  94. package/jsx/core/Configuration/Configuration.stories.d.ts.map +1 -1
  95. package/jsx/core/Configuration/Configuration.stories.jsx +2 -18
  96. package/jsx/core/Configuration/Configuration.stories.jsx.map +1 -1
  97. package/jsx/core/Configuration/Configuration.styles.d.ts +6 -0
  98. package/jsx/core/Configuration/Configuration.styles.d.ts.map +1 -0
  99. package/jsx/core/Configuration/Configuration.styles.js +12 -0
  100. package/jsx/core/Configuration/Configuration.styles.js.map +1 -0
  101. package/jsx/core/CreditCard/CreditCard.stories.d.ts +10 -0
  102. package/jsx/core/CreditCard/CreditCard.stories.d.ts.map +1 -0
  103. package/jsx/core/CreditCard/CreditCard.stories.jsx +10 -0
  104. package/jsx/core/CreditCard/CreditCard.stories.jsx.map +1 -0
  105. package/jsx/core/DateTime/DateTime.stories.d.ts.map +1 -1
  106. package/jsx/core/DateTime/DateTime.stories.jsx +1 -0
  107. package/jsx/core/DateTime/DateTime.stories.jsx.map +1 -1
  108. package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts +4 -0
  109. package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -1
  110. package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx +70 -2
  111. package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +1 -1
  112. package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts +9 -8
  113. package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
  114. package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +51 -88
  115. package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -1
  116. package/jsx/core/HTML/HTML.stories.d.ts.map +1 -1
  117. package/jsx/core/HTML/HTML.stories.jsx +1 -1
  118. package/jsx/core/HTML/HTML.stories.jsx.map +1 -1
  119. package/jsx/core/Icon/Icon.stories.d.ts.map +1 -1
  120. package/jsx/core/Icon/Icon.stories.jsx +5 -27
  121. package/jsx/core/Icon/Icon.stories.jsx.map +1 -1
  122. package/jsx/core/Icon/Icon.styles.d.ts +4 -0
  123. package/jsx/core/Icon/Icon.styles.d.ts.map +1 -0
  124. package/jsx/core/Icon/Icon.styles.js +25 -0
  125. package/jsx/core/Icon/Icon.styles.js.map +1 -0
  126. package/jsx/core/IconPicker/IconPicker.stories.jsx +1 -1
  127. package/jsx/core/IconPicker/IconPicker.stories.jsx.map +1 -1
  128. package/jsx/core/Link/Link.stories.d.ts +1 -11
  129. package/jsx/core/Link/Link.stories.d.ts.map +1 -1
  130. package/jsx/core/Link/Link.stories.jsx.map +1 -1
  131. package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts +9 -0
  132. package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts.map +1 -0
  133. package/jsx/core/ListToolbar/ListToolbar.mocks.jsx +71 -0
  134. package/jsx/core/ListToolbar/ListToolbar.mocks.jsx.map +1 -0
  135. package/jsx/core/ListToolbar/ListToolbar.stories.d.ts +7 -0
  136. package/jsx/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -0
  137. package/jsx/core/ListToolbar/ListToolbar.stories.jsx +87 -0
  138. package/jsx/core/ListToolbar/ListToolbar.stories.jsx.map +1 -0
  139. package/jsx/core/Number/Number.stories.d.ts.map +1 -1
  140. package/jsx/core/Number/Number.stories.jsx +2 -0
  141. package/jsx/core/Number/Number.stories.jsx.map +1 -1
  142. package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  143. package/jsx/core/PageTemplates/PageTemplates.stories.jsx +1 -11
  144. package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
  145. package/jsx/core/PageTemplates/PageTemplates.styles.d.ts +1 -0
  146. package/jsx/core/PageTemplates/PageTemplates.styles.d.ts.map +1 -1
  147. package/jsx/core/PageTemplates/PageTemplates.styles.js +9 -0
  148. package/jsx/core/PageTemplates/PageTemplates.styles.js.map +1 -1
  149. package/jsx/core/SearchInput/SearchInput.mocks.d.ts +11 -0
  150. package/jsx/core/SearchInput/SearchInput.mocks.d.ts.map +1 -0
  151. package/jsx/core/SearchInput/SearchInput.mocks.js +25 -0
  152. package/jsx/core/SearchInput/SearchInput.mocks.js.map +1 -0
  153. package/jsx/core/SearchInput/SearchInput.stories.d.ts +1 -0
  154. package/jsx/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
  155. package/jsx/core/SearchInput/SearchInput.stories.jsx +28 -0
  156. package/jsx/core/SearchInput/SearchInput.stories.jsx.map +1 -1
  157. package/jsx/core/Tooltip/Tooltip.stories.d.ts +2 -5
  158. package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
  159. package/jsx/core/Tooltip/Tooltip.stories.jsx.map +1 -1
  160. package/jsx/core/Tree/Tree.stories.d.ts.map +1 -1
  161. package/jsx/core/Tree/Tree.stories.jsx +2 -2
  162. package/jsx/core/Tree/Tree.stories.jsx.map +1 -1
  163. package/jsx/cs/Article/Article.stories.d.ts +2 -10
  164. package/jsx/cs/Article/Article.stories.d.ts.map +1 -1
  165. package/jsx/cs/Article/Article.stories.jsx.map +1 -1
  166. package/jsx/cs/ArticleList/ArticleList.stories.d.ts +2 -11
  167. package/jsx/cs/ArticleList/ArticleList.stories.d.ts.map +1 -1
  168. package/jsx/cs/ArticleList/ArticleList.stories.jsx +2 -1
  169. package/jsx/cs/ArticleList/ArticleList.stories.jsx.map +1 -1
  170. package/jsx/cs/CSCaseView/CSAppShell.stories.d.ts +2 -36
  171. package/jsx/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -1
  172. package/jsx/cs/CSCaseView/CSAppShell.stories.jsx +6 -33
  173. package/jsx/cs/CSCaseView/CSAppShell.stories.jsx.map +1 -1
  174. package/jsx/cs/CSCaseView/CSCaseView.mocks.d.ts +9 -0
  175. package/jsx/cs/CSCaseView/CSCaseView.mocks.d.ts.map +1 -1
  176. package/jsx/cs/CSCaseView/{CSCaseView.mocks.js → CSCaseView.mocks.jsx} +30 -1
  177. package/jsx/cs/CSCaseView/CSCaseView.mocks.jsx.map +1 -0
  178. package/jsx/cs/CallControlPanel/CallControlPanel.stories.d.ts +2 -2
  179. package/jsx/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +1 -1
  180. package/jsx/cs/CallControlPanel/CallControlPanel.stories.jsx +4 -4
  181. package/jsx/cs/CallControlPanel/CallControlPanel.stories.jsx.map +1 -1
  182. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts +2 -8
  183. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
  184. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +3 -3
  185. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -1
  186. package/jsx/cs/InteractionNotification/InteractionNotification.stories.d.ts +7 -6
  187. package/jsx/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -1
  188. package/jsx/cs/InteractionNotification/InteractionNotification.stories.jsx +13 -5
  189. package/jsx/cs/InteractionNotification/InteractionNotification.stories.jsx.map +1 -1
  190. package/jsx/cs/InteractionTimer/InteractionTimer.mocks.d.ts +11 -0
  191. package/jsx/cs/InteractionTimer/InteractionTimer.mocks.d.ts.map +1 -0
  192. package/jsx/cs/InteractionTimer/InteractionTimer.mocks.js +29 -0
  193. package/jsx/cs/InteractionTimer/InteractionTimer.mocks.js.map +1 -0
  194. package/jsx/cs/InteractionTimer/InteractionTimer.stories.d.ts +2 -7
  195. package/jsx/cs/InteractionTimer/InteractionTimer.stories.d.ts.map +1 -1
  196. package/jsx/cs/InteractionTimer/InteractionTimer.stories.jsx +6 -30
  197. package/jsx/cs/InteractionTimer/InteractionTimer.stories.jsx.map +1 -1
  198. package/jsx/cs/TaskManager/TaskManager.mocks.d.ts +6 -0
  199. package/jsx/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
  200. package/jsx/cs/TaskManager/TaskManager.mocks.js +7 -0
  201. package/jsx/cs/TaskManager/TaskManager.mocks.js.map +1 -1
  202. package/jsx/cs/TaskManager/TaskManager.stories.d.ts +6 -5
  203. package/jsx/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
  204. package/jsx/cs/TaskManager/TaskManager.stories.jsx +25 -29
  205. package/jsx/cs/TaskManager/TaskManager.stories.jsx.map +1 -1
  206. package/jsx/cs/TaskManager/TaskManager.styles.d.ts +3 -0
  207. package/jsx/cs/TaskManager/TaskManager.styles.d.ts.map +1 -0
  208. package/jsx/cs/TaskManager/TaskManager.styles.js +8 -0
  209. package/jsx/cs/TaskManager/TaskManager.styles.js.map +1 -0
  210. package/jsx/dnd/DragDropList/DragDropList.mocks.d.ts +15 -0
  211. package/jsx/dnd/DragDropList/DragDropList.mocks.d.ts.map +1 -0
  212. package/jsx/dnd/DragDropList/DragDropList.mocks.jsx +33 -0
  213. package/jsx/dnd/DragDropList/DragDropList.mocks.jsx.map +1 -0
  214. package/jsx/dnd/DragDropList/DragDropList.stories.d.ts +8 -9
  215. package/jsx/dnd/DragDropList/DragDropList.stories.d.ts.map +1 -1
  216. package/jsx/dnd/DragDropList/DragDropList.stories.jsx +14 -78
  217. package/jsx/dnd/DragDropList/DragDropList.stories.jsx.map +1 -1
  218. package/jsx/dnd/DragDropList/DragDropList.styles.d.ts +6 -0
  219. package/jsx/dnd/DragDropList/DragDropList.styles.d.ts.map +1 -0
  220. package/jsx/dnd/DragDropList/DragDropList.styles.js +32 -0
  221. package/jsx/dnd/DragDropList/DragDropList.styles.js.map +1 -0
  222. package/jsx/rte/Editor/Editor.mocks.d.ts +6 -0
  223. package/jsx/rte/Editor/Editor.mocks.d.ts.map +1 -0
  224. package/jsx/rte/Editor/Editor.mocks.jsx +20 -0
  225. package/jsx/rte/Editor/Editor.mocks.jsx.map +1 -0
  226. package/jsx/rte/Editor/Editor.stories.d.ts.map +1 -1
  227. package/jsx/rte/Editor/Editor.stories.jsx +1 -19
  228. package/jsx/rte/Editor/Editor.stories.jsx.map +1 -1
  229. package/jsx/rte/RichTextEditor/RichTextEditor.mocks.jsx.map +1 -1
  230. package/jsx/rte/RichTextEditor/RichTextEditor.stories.d.ts +2 -3
  231. package/jsx/rte/RichTextEditor/RichTextEditor.stories.d.ts.map +1 -1
  232. package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx.map +1 -1
  233. package/jsx/social/Chat/RepeatingView.mocks.d.ts +14 -0
  234. package/jsx/social/Chat/RepeatingView.mocks.d.ts.map +1 -0
  235. package/jsx/social/Chat/RepeatingView.mocks.js +11 -0
  236. package/jsx/social/Chat/RepeatingView.mocks.js.map +1 -0
  237. package/jsx/social/Chat/RepeatingView.stories.d.ts +6 -17
  238. package/jsx/social/Chat/RepeatingView.stories.d.ts.map +1 -1
  239. package/jsx/social/Chat/RepeatingView.stories.jsx +16 -46
  240. package/jsx/social/Chat/RepeatingView.stories.jsx.map +1 -1
  241. package/jsx/social/Chat/RepeatingView.styles.d.ts +2 -0
  242. package/jsx/social/Chat/RepeatingView.styles.d.ts.map +1 -0
  243. package/jsx/social/Chat/RepeatingView.styles.js +22 -0
  244. package/jsx/social/Chat/RepeatingView.styles.js.map +1 -0
  245. package/jsx/social/Email/Email.mocks.d.ts +155 -2
  246. package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
  247. package/jsx/social/Email/Email.mocks.jsx +766 -0
  248. package/jsx/social/Email/Email.mocks.jsx.map +1 -0
  249. package/jsx/social/Email/Email.stories.d.ts +14 -14
  250. package/jsx/social/Email/Email.stories.d.ts.map +1 -1
  251. package/jsx/social/Email/Email.stories.jsx +108 -435
  252. package/jsx/social/Email/Email.stories.jsx.map +1 -1
  253. package/jsx/social/Email/Email.styles.d.ts +4 -0
  254. package/jsx/social/Email/Email.styles.d.ts.map +1 -0
  255. package/jsx/social/Email/Email.styles.js +14 -0
  256. package/jsx/social/Email/Email.styles.js.map +1 -0
  257. package/jsx/social/Feed/Feed.mocks.d.ts.map +1 -1
  258. package/jsx/social/Feed/Feed.mocks.jsx.map +1 -1
  259. package/jsx/social/Feed/Feed.stories.d.ts.map +1 -1
  260. package/jsx/social/Feed/Feed.stories.jsx +23 -18
  261. package/jsx/social/Feed/Feed.stories.jsx.map +1 -1
  262. package/jsx/social/Feed/FeedPost.stories.d.ts.map +1 -1
  263. package/jsx/social/Feed/FeedPost.stories.jsx +30 -20
  264. package/jsx/social/Feed/FeedPost.stories.jsx.map +1 -1
  265. package/jsx/social/Feed/FeedReply.stories.d.ts.map +1 -1
  266. package/jsx/social/Feed/FeedReply.stories.jsx +21 -16
  267. package/jsx/social/Feed/FeedReply.stories.jsx.map +1 -1
  268. package/jsx/work/CaseView/MobileCaseView.stories.d.ts +2 -7
  269. package/jsx/work/CaseView/MobileCaseView.stories.d.ts.map +1 -1
  270. package/jsx/work/CaseView/MobileCaseView.stories.jsx.map +1 -1
  271. package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts +45 -0
  272. package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts.map +1 -0
  273. package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.jsx +166 -0
  274. package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.jsx.map +1 -0
  275. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts +2 -6
  276. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -1
  277. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx +2 -174
  278. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx.map +1 -1
  279. package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts +4 -0
  280. package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts.map +1 -0
  281. package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.js +11 -0
  282. package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.js.map +1 -0
  283. package/jsx/work/Glimpse/Glimpse.stories.d.ts.map +1 -1
  284. package/jsx/work/Glimpse/Glimpse.stories.jsx.map +1 -1
  285. package/jsx/work/Timeline/Timeline.stories.d.ts +2 -0
  286. package/jsx/work/Timeline/Timeline.stories.d.ts.map +1 -1
  287. package/jsx/work/Timeline/Timeline.stories.jsx +28 -1
  288. package/jsx/work/Timeline/Timeline.stories.jsx.map +1 -1
  289. package/lib/build/AppHeader/AppHeader.stories.js +1 -1
  290. package/lib/build/AppHeader/AppHeader.stories.js.map +1 -1
  291. package/lib/build/AppShell/AppShell.mocks.d.ts +17 -0
  292. package/lib/build/AppShell/AppShell.mocks.d.ts.map +1 -1
  293. package/lib/build/AppShell/AppShell.mocks.js +16 -0
  294. package/lib/build/AppShell/AppShell.mocks.js.map +1 -1
  295. package/lib/build/AppShell/AppShell.stories.d.ts +2 -0
  296. package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -1
  297. package/lib/build/AppShell/AppShell.stories.js +7 -22
  298. package/lib/build/AppShell/AppShell.stories.js.map +1 -1
  299. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -1
  300. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js +3 -2
  301. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js.map +1 -1
  302. package/lib/build/DynamicContentEditor/FieldSelector.js +1 -1
  303. package/lib/build/DynamicContentEditor/FieldSelector.js.map +1 -1
  304. package/lib/build/FlowModeller/FlowModeller.mocks.d.ts +19 -2
  305. package/lib/build/FlowModeller/FlowModeller.mocks.d.ts.map +1 -1
  306. package/lib/build/FlowModeller/FlowModeller.mocks.js +64 -12
  307. package/lib/build/FlowModeller/FlowModeller.mocks.js.map +1 -1
  308. package/lib/build/FlowModeller/FlowModeller.stories.d.ts +2 -7
  309. package/lib/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -1
  310. package/lib/build/FlowModeller/FlowModeller.stories.js +19 -94
  311. package/lib/build/FlowModeller/FlowModeller.stories.js.map +1 -1
  312. package/lib/build/FlowModeller/FlowModeller.styles.d.ts +2 -0
  313. package/lib/build/FlowModeller/FlowModeller.styles.d.ts.map +1 -0
  314. package/lib/build/FlowModeller/FlowModeller.styles.js +8 -0
  315. package/lib/build/FlowModeller/FlowModeller.styles.js.map +1 -0
  316. package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts +1 -5
  317. package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -1
  318. package/lib/build/ItemLibrary/LibraryPicker.mocks.js +5 -10
  319. package/lib/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -1
  320. package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts +2 -5
  321. package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -1
  322. package/lib/build/ItemLibrary/LibraryPicker.stories.js +1 -1
  323. package/lib/build/ItemLibrary/LibraryPicker.stories.js.map +1 -1
  324. package/lib/build/LifeCycle/LifeCycle.mocks.d.ts +3 -0
  325. package/lib/build/LifeCycle/LifeCycle.mocks.d.ts.map +1 -1
  326. package/lib/build/LifeCycle/LifeCycle.mocks.js +106 -18
  327. package/lib/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
  328. package/lib/build/LifeCycle/LifeCycle.stories.d.ts +2 -4
  329. package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
  330. package/lib/build/LifeCycle/LifeCycle.stories.js +115 -31
  331. package/lib/build/LifeCycle/LifeCycle.stories.js.map +1 -1
  332. package/lib/build/LifeCycle/utils.d.ts.map +1 -1
  333. package/lib/build/LifeCycle/utils.js +5 -4
  334. package/lib/build/LifeCycle/utils.js.map +1 -1
  335. package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts +24 -0
  336. package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -1
  337. package/lib/build/ObjectSelect/ObjectSelect.mocks.js +136 -0
  338. package/lib/build/ObjectSelect/ObjectSelect.mocks.js.map +1 -1
  339. package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts +2 -7
  340. package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -1
  341. package/lib/build/ObjectSelect/ObjectSelect.stories.js +16 -140
  342. package/lib/build/ObjectSelect/ObjectSelect.stories.js.map +1 -1
  343. package/lib/build/PageTemplates/GalleryPage.mocks.d.ts +45 -0
  344. package/lib/build/PageTemplates/GalleryPage.mocks.d.ts.map +1 -0
  345. package/lib/build/PageTemplates/GalleryPage.mocks.js +79 -0
  346. package/lib/build/PageTemplates/GalleryPage.mocks.js.map +1 -0
  347. package/lib/build/PageTemplates/GalleryPage.stories.d.ts +1 -0
  348. package/lib/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -1
  349. package/lib/build/PageTemplates/GalleryPage.stories.js +4 -80
  350. package/lib/build/PageTemplates/GalleryPage.stories.js.map +1 -1
  351. package/lib/build/PageTemplates/PageTemplates.mocks.d.ts +11 -0
  352. package/lib/build/PageTemplates/PageTemplates.mocks.d.ts.map +1 -0
  353. package/lib/build/PageTemplates/PageTemplates.mocks.js +96 -0
  354. package/lib/build/PageTemplates/PageTemplates.mocks.js.map +1 -0
  355. package/lib/build/PageTemplates/PageTemplates.stories.d.ts +1 -0
  356. package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  357. package/lib/build/PageTemplates/PageTemplates.stories.js +19 -109
  358. package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -1
  359. package/lib/build/Workbench/Workbench.stories.d.ts.map +1 -1
  360. package/lib/build/Workbench/Workbench.stories.js +12 -20
  361. package/lib/build/Workbench/Workbench.stories.js.map +1 -1
  362. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts +3 -0
  363. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts.map +1 -0
  364. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js +13 -0
  365. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js.map +1 -0
  366. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +16 -8
  367. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts.map +1 -1
  368. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.js +59 -57
  369. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.js.map +1 -1
  370. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts +5 -0
  371. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts.map +1 -0
  372. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.styles.js +15 -0
  373. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.styles.js.map +1 -0
  374. package/lib/core/AppShell/AppShell.mocks.js +5 -5
  375. package/lib/core/AppShell/AppShell.mocks.js.map +1 -1
  376. package/lib/core/AppShell/AppShell.stories.js +8 -8
  377. package/lib/core/AppShell/AppShell.stories.js.map +1 -1
  378. package/lib/core/Avatar/Avatar.stories.js +6 -6
  379. package/lib/core/Avatar/Avatar.stories.js.map +1 -1
  380. package/lib/core/Backdrop/Backdrop.stories.js +2 -2
  381. package/lib/core/Backdrop/Backdrop.stories.js.map +1 -1
  382. package/lib/core/Badges/Alert.stories.js +1 -1
  383. package/lib/core/Badges/Alert.stories.js.map +1 -1
  384. package/lib/core/Badges/Count.stories.js +1 -1
  385. package/lib/core/Badges/Count.stories.js.map +1 -1
  386. package/lib/core/Badges/Selection.stories.js +1 -1
  387. package/lib/core/Badges/Selection.stories.js.map +1 -1
  388. package/lib/core/Badges/Status.stories.js +2 -2
  389. package/lib/core/Badges/Status.stories.js.map +1 -1
  390. package/lib/core/Badges/Tag.stories.js +1 -1
  391. package/lib/core/Badges/Tag.stories.js.map +1 -1
  392. package/lib/core/Banner/Banner.mocks.js +1 -1
  393. package/lib/core/Banner/Banner.mocks.js.map +1 -1
  394. package/lib/core/Banner/Banner.stories.js +11 -11
  395. package/lib/core/Banner/Banner.stories.js.map +1 -1
  396. package/lib/core/Boolean/BooleanDisplay.stories.js +1 -1
  397. package/lib/core/Boolean/BooleanDisplay.stories.js.map +1 -1
  398. package/lib/core/Breadcrumbs/Breadcrumbs.stories.js +2 -2
  399. package/lib/core/Breadcrumbs/Breadcrumbs.stories.js.map +1 -1
  400. package/lib/core/Button/Button.stories.js +8 -8
  401. package/lib/core/Button/Button.stories.js.map +1 -1
  402. package/lib/core/Card/Card.stories.js +4 -4
  403. package/lib/core/Card/Card.stories.js.map +1 -1
  404. package/lib/core/Checkbox/Checkbox.stories.js +3 -3
  405. package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
  406. package/lib/core/CheckboxGroup/CheckboxGroup.stories.js +3 -3
  407. package/lib/core/CheckboxGroup/CheckboxGroup.stories.js.map +1 -1
  408. package/lib/core/ColorPicker/ColorPicker.stories.d.ts.map +1 -1
  409. package/lib/core/ColorPicker/ColorPicker.stories.js +7 -15
  410. package/lib/core/ColorPicker/ColorPicker.stories.js.map +1 -1
  411. package/lib/core/ColorPicker/ColorPicker.styles.d.ts +4 -0
  412. package/lib/core/ColorPicker/ColorPicker.styles.d.ts.map +1 -0
  413. package/lib/core/ColorPicker/ColorPicker.styles.js +11 -0
  414. package/lib/core/ColorPicker/ColorPicker.styles.js.map +1 -0
  415. package/lib/core/ComboBox/ComboBox.stories.js +6 -6
  416. package/lib/core/ComboBox/ComboBox.stories.js.map +1 -1
  417. package/lib/core/Configuration/Configuration.mocks.d.ts +7 -0
  418. package/lib/core/Configuration/Configuration.mocks.d.ts.map +1 -0
  419. package/lib/core/Configuration/Configuration.mocks.js +6 -0
  420. package/lib/core/Configuration/Configuration.mocks.js.map +1 -0
  421. package/lib/core/Configuration/Configuration.stories.d.ts.map +1 -1
  422. package/lib/core/Configuration/Configuration.stories.js +13 -25
  423. package/lib/core/Configuration/Configuration.stories.js.map +1 -1
  424. package/lib/core/Configuration/Configuration.styles.d.ts +6 -0
  425. package/lib/core/Configuration/Configuration.styles.d.ts.map +1 -0
  426. package/lib/core/Configuration/Configuration.styles.js +12 -0
  427. package/lib/core/Configuration/Configuration.styles.js.map +1 -0
  428. package/lib/core/CreditCard/CreditCard.stories.d.ts +10 -0
  429. package/lib/core/CreditCard/CreditCard.stories.d.ts.map +1 -0
  430. package/lib/core/CreditCard/CreditCard.stories.js +11 -0
  431. package/lib/core/CreditCard/CreditCard.stories.js.map +1 -0
  432. package/lib/core/Currency/Currency.stories.js +2 -2
  433. package/lib/core/Currency/Currency.stories.js.map +1 -1
  434. package/lib/core/DateTime/DateTime.stories.d.ts.map +1 -1
  435. package/lib/core/DateTime/DateTime.stories.js +11 -9
  436. package/lib/core/DateTime/DateTime.stories.js.map +1 -1
  437. package/lib/core/DateTime/DateTimeDisplay.stories.js +2 -2
  438. package/lib/core/DateTime/DateTimeDisplay.stories.js.map +1 -1
  439. package/lib/core/DateTime/DateTimePicker.stories.js +2 -2
  440. package/lib/core/DateTime/DateTimePicker.stories.js.map +1 -1
  441. package/lib/core/Drawer/Drawer.stories.js +4 -4
  442. package/lib/core/Drawer/Drawer.stories.js.map +1 -1
  443. package/lib/core/Email/EmailDisplay.stories.js +1 -1
  444. package/lib/core/Email/EmailDisplay.stories.js.map +1 -1
  445. package/lib/core/EmojiPicker/EmojiPicker.stories.js +3 -3
  446. package/lib/core/EmojiPicker/EmojiPicker.stories.js.map +1 -1
  447. package/lib/core/EmptyState/EmptyState.stories.js +1 -1
  448. package/lib/core/EmptyState/EmptyState.stories.js.map +1 -1
  449. package/lib/core/ErrorState/ErrorState.stories.js +1 -1
  450. package/lib/core/ErrorState/ErrorState.stories.js.map +1 -1
  451. package/lib/core/ExpandCollapse/ExpandCollapse.stories.js +2 -2
  452. package/lib/core/ExpandCollapse/ExpandCollapse.stories.js.map +1 -1
  453. package/lib/core/FieldGroup/FieldGroup.stories.js +1 -1
  454. package/lib/core/FieldGroup/FieldGroup.stories.js.map +1 -1
  455. package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts +4 -0
  456. package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -1
  457. package/lib/core/FieldGroup/FieldGroupList.mocks.js +47 -3
  458. package/lib/core/FieldGroup/FieldGroupList.mocks.js.map +1 -1
  459. package/lib/core/FieldGroup/FieldGroupList.stories.d.ts +9 -8
  460. package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
  461. package/lib/core/FieldGroup/FieldGroupList.stories.js +54 -67
  462. package/lib/core/FieldGroup/FieldGroupList.stories.js.map +1 -1
  463. package/lib/core/FieldValueList/FieldValueList.stories.js +4 -4
  464. package/lib/core/FieldValueList/FieldValueList.stories.js.map +1 -1
  465. package/lib/core/File/FileDisplay.stories.js +10 -10
  466. package/lib/core/File/FileDisplay.stories.js.map +1 -1
  467. package/lib/core/File/FileInput.stories.js +2 -2
  468. package/lib/core/File/FileInput.stories.js.map +1 -1
  469. package/lib/core/Flex/FlexContainer.stories.js +7 -7
  470. package/lib/core/Flex/FlexContainer.stories.js.map +1 -1
  471. package/lib/core/Flex/FlexItem.stories.js +3 -3
  472. package/lib/core/Flex/FlexItem.stories.js.map +1 -1
  473. package/lib/core/Form/Form.mocks.js +3 -3
  474. package/lib/core/Form/Form.mocks.js.map +1 -1
  475. package/lib/core/Form/Form.stories.js +8 -8
  476. package/lib/core/Form/Form.stories.js.map +1 -1
  477. package/lib/core/Grid/GridContainer.stories.js +9 -9
  478. package/lib/core/Grid/GridContainer.stories.js.map +1 -1
  479. package/lib/core/Grid/GridItem.stories.js +3 -3
  480. package/lib/core/Grid/GridItem.stories.js.map +1 -1
  481. package/lib/core/HTML/HTML.stories.d.ts.map +1 -1
  482. package/lib/core/HTML/HTML.stories.js +1 -1
  483. package/lib/core/HTML/HTML.stories.js.map +1 -1
  484. package/lib/core/Icon/Icon.mocks.js +1 -1
  485. package/lib/core/Icon/Icon.mocks.js.map +1 -1
  486. package/lib/core/Icon/Icon.stories.d.ts.map +1 -1
  487. package/lib/core/Icon/Icon.stories.js +12 -35
  488. package/lib/core/Icon/Icon.stories.js.map +1 -1
  489. package/lib/core/Icon/Icon.styles.d.ts +4 -0
  490. package/lib/core/Icon/Icon.styles.d.ts.map +1 -0
  491. package/lib/core/Icon/Icon.styles.js +25 -0
  492. package/lib/core/Icon/Icon.styles.js.map +1 -0
  493. package/lib/core/IconPicker/IconPicker.stories.js +2 -2
  494. package/lib/core/IconPicker/IconPicker.stories.js.map +1 -1
  495. package/lib/core/Image/Image.stories.js +1 -1
  496. package/lib/core/Image/Image.stories.js.map +1 -1
  497. package/lib/core/Input/Input.stories.js +2 -2
  498. package/lib/core/Input/Input.stories.js.map +1 -1
  499. package/lib/core/Label/Label.stories.js +2 -2
  500. package/lib/core/Label/Label.stories.js.map +1 -1
  501. package/lib/core/Lightbox/Lightbox.stories.js +3 -3
  502. package/lib/core/Lightbox/Lightbox.stories.js.map +1 -1
  503. package/lib/core/Link/Link.stories.d.ts +1 -11
  504. package/lib/core/Link/Link.stories.d.ts.map +1 -1
  505. package/lib/core/Link/Link.stories.js +3 -3
  506. package/lib/core/Link/Link.stories.js.map +1 -1
  507. package/lib/core/List/CommaSeparatedList.stories.js +1 -1
  508. package/lib/core/List/CommaSeparatedList.stories.js.map +1 -1
  509. package/lib/core/List/OrderedList.stories.js +1 -1
  510. package/lib/core/List/OrderedList.stories.js.map +1 -1
  511. package/lib/core/List/UnorderedList.stories.js +1 -1
  512. package/lib/core/List/UnorderedList.stories.js.map +1 -1
  513. package/lib/core/ListToolbar/ListToolbar.mocks.d.ts +9 -0
  514. package/lib/core/ListToolbar/ListToolbar.mocks.d.ts.map +1 -0
  515. package/lib/core/ListToolbar/ListToolbar.mocks.js +50 -0
  516. package/lib/core/ListToolbar/ListToolbar.mocks.js.map +1 -0
  517. package/lib/core/ListToolbar/ListToolbar.stories.d.ts +7 -0
  518. package/lib/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -0
  519. package/lib/core/ListToolbar/ListToolbar.stories.js +79 -0
  520. package/lib/core/ListToolbar/ListToolbar.stories.js.map +1 -0
  521. package/lib/core/Location/Location.stories.js +4 -4
  522. package/lib/core/Location/Location.stories.js.map +1 -1
  523. package/lib/core/Menu/Menu.stories.js +5 -5
  524. package/lib/core/Menu/Menu.stories.js.map +1 -1
  525. package/lib/core/MenuButton/MenuButton.stories.js +9 -9
  526. package/lib/core/MenuButton/MenuButton.stories.js.map +1 -1
  527. package/lib/core/MetaList/MetaList.stories.js +3 -3
  528. package/lib/core/MetaList/MetaList.stories.js.map +1 -1
  529. package/lib/core/Modal/Modal.mocks.js +8 -8
  530. package/lib/core/Modal/Modal.mocks.js.map +1 -1
  531. package/lib/core/Modal/Modal.stories.js +29 -29
  532. package/lib/core/Modal/Modal.stories.js.map +1 -1
  533. package/lib/core/MultiStep/MultiStep.stories.js +3 -3
  534. package/lib/core/MultiStep/MultiStep.stories.js.map +1 -1
  535. package/lib/core/Number/Number.stories.d.ts.map +1 -1
  536. package/lib/core/Number/Number.stories.js +5 -3
  537. package/lib/core/Number/Number.stories.js.map +1 -1
  538. package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  539. package/lib/core/PageTemplates/PageTemplates.stories.js +28 -38
  540. package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
  541. package/lib/core/PageTemplates/PageTemplates.styles.d.ts +1 -0
  542. package/lib/core/PageTemplates/PageTemplates.styles.d.ts.map +1 -1
  543. package/lib/core/PageTemplates/PageTemplates.styles.js +9 -0
  544. package/lib/core/PageTemplates/PageTemplates.styles.js.map +1 -1
  545. package/lib/core/Pagination/Pagination.stories.js +1 -1
  546. package/lib/core/Pagination/Pagination.stories.js.map +1 -1
  547. package/lib/core/Paragraph/ParagraphDisplay.stories.js +1 -1
  548. package/lib/core/Paragraph/ParagraphDisplay.stories.js.map +1 -1
  549. package/lib/core/Phone/Phone.stories.js +2 -2
  550. package/lib/core/Phone/Phone.stories.js.map +1 -1
  551. package/lib/core/Popover/Popover.stories.js +2 -2
  552. package/lib/core/Popover/Popover.stories.js.map +1 -1
  553. package/lib/core/Progress/Progress.stories.js +3 -3
  554. package/lib/core/Progress/Progress.stories.js.map +1 -1
  555. package/lib/core/RadioButton/RadioButton.stories.js +3 -3
  556. package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
  557. package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js +3 -3
  558. package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js.map +1 -1
  559. package/lib/core/Rating/Rating.stories.js +2 -2
  560. package/lib/core/Rating/Rating.stories.js.map +1 -1
  561. package/lib/core/SearchInput/SearchInput.mocks.d.ts +11 -0
  562. package/lib/core/SearchInput/SearchInput.mocks.d.ts.map +1 -0
  563. package/lib/core/SearchInput/SearchInput.mocks.js +25 -0
  564. package/lib/core/SearchInput/SearchInput.mocks.js.map +1 -0
  565. package/lib/core/SearchInput/SearchInput.stories.d.ts +1 -0
  566. package/lib/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
  567. package/lib/core/SearchInput/SearchInput.stories.js +30 -2
  568. package/lib/core/SearchInput/SearchInput.stories.js.map +1 -1
  569. package/lib/core/Select/Select.stories.js +2 -2
  570. package/lib/core/Select/Select.stories.js.map +1 -1
  571. package/lib/core/Sentiment/Sentiment.stories.js +2 -2
  572. package/lib/core/Sentiment/Sentiment.stories.js.map +1 -1
  573. package/lib/core/Slider/Slider.stories.js +1 -1
  574. package/lib/core/Slider/Slider.stories.js.map +1 -1
  575. package/lib/core/SummaryItem/SummaryItem.stories.js +4 -4
  576. package/lib/core/SummaryItem/SummaryItem.stories.js.map +1 -1
  577. package/lib/core/SummaryList/SummaryList.mocks.js +2 -2
  578. package/lib/core/SummaryList/SummaryList.mocks.js.map +1 -1
  579. package/lib/core/SummaryList/SummaryList.stories.js +5 -5
  580. package/lib/core/SummaryList/SummaryList.stories.js.map +1 -1
  581. package/lib/core/Switch/Switch.stories.js +3 -3
  582. package/lib/core/Switch/Switch.stories.js.map +1 -1
  583. package/lib/core/Table/Table.mocks.js +1 -1
  584. package/lib/core/Table/Table.mocks.js.map +1 -1
  585. package/lib/core/Table/Table.stories.js +9 -9
  586. package/lib/core/Table/Table.stories.js.map +1 -1
  587. package/lib/core/Tabs/Tabs.stories.js +3 -3
  588. package/lib/core/Tabs/Tabs.stories.js.map +1 -1
  589. package/lib/core/Text/Text.stories.js +2 -2
  590. package/lib/core/Text/Text.stories.js.map +1 -1
  591. package/lib/core/TextArea/TextArea.stories.js +2 -2
  592. package/lib/core/TextArea/TextArea.stories.js.map +1 -1
  593. package/lib/core/Toaster/Toaster.stories.js +2 -2
  594. package/lib/core/Toaster/Toaster.stories.js.map +1 -1
  595. package/lib/core/Tooltip/Tooltip.stories.d.ts +2 -5
  596. package/lib/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
  597. package/lib/core/Tooltip/Tooltip.stories.js +2 -2
  598. package/lib/core/Tooltip/Tooltip.stories.js.map +1 -1
  599. package/lib/core/Tree/Tree.stories.d.ts.map +1 -1
  600. package/lib/core/Tree/Tree.stories.js +5 -5
  601. package/lib/core/Tree/Tree.stories.js.map +1 -1
  602. package/lib/core/URL/URL.stories.js +1 -1
  603. package/lib/core/URL/URL.stories.js.map +1 -1
  604. package/lib/cs/Article/Article.stories.d.ts +2 -10
  605. package/lib/cs/Article/Article.stories.d.ts.map +1 -1
  606. package/lib/cs/Article/Article.stories.js +9 -9
  607. package/lib/cs/Article/Article.stories.js.map +1 -1
  608. package/lib/cs/ArticleList/ArticleList.stories.d.ts +2 -11
  609. package/lib/cs/ArticleList/ArticleList.stories.d.ts.map +1 -1
  610. package/lib/cs/ArticleList/ArticleList.stories.js +12 -11
  611. package/lib/cs/ArticleList/ArticleList.stories.js.map +1 -1
  612. package/lib/cs/CSCaseView/CSAppShell.stories.d.ts +2 -36
  613. package/lib/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -1
  614. package/lib/cs/CSCaseView/CSAppShell.stories.js +15 -28
  615. package/lib/cs/CSCaseView/CSAppShell.stories.js.map +1 -1
  616. package/lib/cs/CSCaseView/CSCaseView.mocks.d.ts +9 -0
  617. package/lib/cs/CSCaseView/CSCaseView.mocks.d.ts.map +1 -1
  618. package/lib/cs/CSCaseView/CSCaseView.mocks.js +16 -0
  619. package/lib/cs/CSCaseView/CSCaseView.mocks.js.map +1 -1
  620. package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts +2 -2
  621. package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +1 -1
  622. package/lib/cs/CallControlPanel/CallControlPanel.stories.js +6 -6
  623. package/lib/cs/CallControlPanel/CallControlPanel.stories.js.map +1 -1
  624. package/lib/cs/DialPad/DialPad.stories.js +1 -1
  625. package/lib/cs/DialPad/DialPad.stories.js.map +1 -1
  626. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts +2 -8
  627. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
  628. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js +18 -18
  629. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -1
  630. package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts +7 -6
  631. package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -1
  632. package/lib/cs/InteractionNotification/InteractionNotification.stories.js +13 -5
  633. package/lib/cs/InteractionNotification/InteractionNotification.stories.js.map +1 -1
  634. package/lib/cs/InteractionTimer/InteractionTimer.mocks.d.ts +11 -0
  635. package/lib/cs/InteractionTimer/InteractionTimer.mocks.d.ts.map +1 -0
  636. package/lib/cs/InteractionTimer/InteractionTimer.mocks.js +29 -0
  637. package/lib/cs/InteractionTimer/InteractionTimer.mocks.js.map +1 -0
  638. package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts +2 -7
  639. package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts.map +1 -1
  640. package/lib/cs/InteractionTimer/InteractionTimer.stories.js +7 -31
  641. package/lib/cs/InteractionTimer/InteractionTimer.stories.js.map +1 -1
  642. package/lib/cs/TaskManager/TaskManager.mocks.d.ts +6 -0
  643. package/lib/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
  644. package/lib/cs/TaskManager/TaskManager.mocks.js +7 -0
  645. package/lib/cs/TaskManager/TaskManager.mocks.js.map +1 -1
  646. package/lib/cs/TaskManager/TaskManager.stories.d.ts +6 -5
  647. package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
  648. package/lib/cs/TaskManager/TaskManager.stories.js +33 -37
  649. package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -1
  650. package/lib/cs/TaskManager/TaskManager.styles.d.ts +3 -0
  651. package/lib/cs/TaskManager/TaskManager.styles.d.ts.map +1 -0
  652. package/lib/cs/TaskManager/TaskManager.styles.js +8 -0
  653. package/lib/cs/TaskManager/TaskManager.styles.js.map +1 -0
  654. package/lib/dnd/DragDropList/DragDropList.mocks.d.ts +15 -0
  655. package/lib/dnd/DragDropList/DragDropList.mocks.d.ts.map +1 -0
  656. package/lib/dnd/DragDropList/DragDropList.mocks.js +32 -0
  657. package/lib/dnd/DragDropList/DragDropList.mocks.js.map +1 -0
  658. package/lib/dnd/DragDropList/DragDropList.stories.d.ts +8 -9
  659. package/lib/dnd/DragDropList/DragDropList.stories.d.ts.map +1 -1
  660. package/lib/dnd/DragDropList/DragDropList.stories.js +16 -87
  661. package/lib/dnd/DragDropList/DragDropList.stories.js.map +1 -1
  662. package/lib/dnd/DragDropList/DragDropList.styles.d.ts +6 -0
  663. package/lib/dnd/DragDropList/DragDropList.styles.d.ts.map +1 -0
  664. package/lib/dnd/DragDropList/DragDropList.styles.js +32 -0
  665. package/lib/dnd/DragDropList/DragDropList.styles.js.map +1 -0
  666. package/lib/rte/Editor/Editor.mocks.d.ts +6 -0
  667. package/lib/rte/Editor/Editor.mocks.d.ts.map +1 -0
  668. package/lib/rte/Editor/Editor.mocks.js +23 -0
  669. package/lib/rte/Editor/Editor.mocks.js.map +1 -0
  670. package/lib/rte/Editor/Editor.stories.d.ts.map +1 -1
  671. package/lib/rte/Editor/Editor.stories.js +7 -27
  672. package/lib/rte/Editor/Editor.stories.js.map +1 -1
  673. package/lib/rte/RichTextEditor/RichTextEditor.mocks.js +5 -5
  674. package/lib/rte/RichTextEditor/RichTextEditor.mocks.js.map +1 -1
  675. package/lib/rte/RichTextEditor/RichTextEditor.stories.d.ts +2 -3
  676. package/lib/rte/RichTextEditor/RichTextEditor.stories.d.ts.map +1 -1
  677. package/lib/rte/RichTextEditor/RichTextEditor.stories.js +5 -5
  678. package/lib/rte/RichTextEditor/RichTextEditor.stories.js.map +1 -1
  679. package/lib/rte/RichTextEditor/RichTextViewer.stories.js +5 -5
  680. package/lib/rte/RichTextEditor/RichTextViewer.stories.js.map +1 -1
  681. package/lib/social/Chat/Chat.stories.js +27 -27
  682. package/lib/social/Chat/Chat.stories.js.map +1 -1
  683. package/lib/social/Chat/RepeatingView.mocks.d.ts +14 -0
  684. package/lib/social/Chat/RepeatingView.mocks.d.ts.map +1 -0
  685. package/lib/social/Chat/RepeatingView.mocks.js +11 -0
  686. package/lib/social/Chat/RepeatingView.mocks.js.map +1 -0
  687. package/lib/social/Chat/RepeatingView.stories.d.ts +6 -17
  688. package/lib/social/Chat/RepeatingView.stories.d.ts.map +1 -1
  689. package/lib/social/Chat/RepeatingView.stories.js +18 -48
  690. package/lib/social/Chat/RepeatingView.stories.js.map +1 -1
  691. package/lib/social/Chat/RepeatingView.styles.d.ts +2 -0
  692. package/lib/social/Chat/RepeatingView.styles.d.ts.map +1 -0
  693. package/lib/social/Chat/RepeatingView.styles.js +22 -0
  694. package/lib/social/Chat/RepeatingView.styles.js.map +1 -0
  695. package/lib/social/Email/Email.mocks.d.ts +155 -2
  696. package/lib/social/Email/Email.mocks.d.ts.map +1 -1
  697. package/lib/social/Email/Email.mocks.js +372 -0
  698. package/lib/social/Email/Email.mocks.js.map +1 -1
  699. package/lib/social/Email/Email.stories.d.ts +14 -14
  700. package/lib/social/Email/Email.stories.d.ts.map +1 -1
  701. package/lib/social/Email/Email.stories.js +120 -460
  702. package/lib/social/Email/Email.stories.js.map +1 -1
  703. package/lib/social/Email/Email.styles.d.ts +4 -0
  704. package/lib/social/Email/Email.styles.d.ts.map +1 -0
  705. package/lib/social/Email/Email.styles.js +14 -0
  706. package/lib/social/Email/Email.styles.js.map +1 -0
  707. package/lib/social/Feed/Feed.mocks.d.ts.map +1 -1
  708. package/lib/social/Feed/Feed.mocks.js +40 -40
  709. package/lib/social/Feed/Feed.mocks.js.map +1 -1
  710. package/lib/social/Feed/Feed.stories.d.ts.map +1 -1
  711. package/lib/social/Feed/Feed.stories.js +29 -24
  712. package/lib/social/Feed/Feed.stories.js.map +1 -1
  713. package/lib/social/Feed/FeedNewPost.stories.js +2 -2
  714. package/lib/social/Feed/FeedNewPost.stories.js.map +1 -1
  715. package/lib/social/Feed/FeedPost.stories.d.ts.map +1 -1
  716. package/lib/social/Feed/FeedPost.stories.js +37 -27
  717. package/lib/social/Feed/FeedPost.stories.js.map +1 -1
  718. package/lib/social/Feed/FeedReply.stories.d.ts.map +1 -1
  719. package/lib/social/Feed/FeedReply.stories.js +25 -20
  720. package/lib/social/Feed/FeedReply.stories.js.map +1 -1
  721. package/lib/social/Feed/FeedReplyInput.stories.js +2 -2
  722. package/lib/social/Feed/FeedReplyInput.stories.js.map +1 -1
  723. package/lib/work/AppAnnouncement/AppAnnouncement.stories.js +1 -1
  724. package/lib/work/AppAnnouncement/AppAnnouncement.stories.js.map +1 -1
  725. package/lib/work/CaseView/Attachments.mocks.js +15 -15
  726. package/lib/work/CaseView/Attachments.mocks.js.map +1 -1
  727. package/lib/work/CaseView/CaseView.mocks.js +7 -7
  728. package/lib/work/CaseView/CaseView.mocks.js.map +1 -1
  729. package/lib/work/CaseView/CaseView.stories.js +21 -21
  730. package/lib/work/CaseView/CaseView.stories.js.map +1 -1
  731. package/lib/work/CaseView/Details.mocks.js +1 -1
  732. package/lib/work/CaseView/Details.mocks.js.map +1 -1
  733. package/lib/work/CaseView/FileService.mock.js +1 -1
  734. package/lib/work/CaseView/FileService.mock.js.map +1 -1
  735. package/lib/work/CaseView/MobileCaseView.stories.d.ts +2 -7
  736. package/lib/work/CaseView/MobileCaseView.stories.d.ts.map +1 -1
  737. package/lib/work/CaseView/MobileCaseView.stories.js +1 -1
  738. package/lib/work/CaseView/MobileCaseView.stories.js.map +1 -1
  739. package/lib/work/CaseView/Pulse.mocks.js +2 -2
  740. package/lib/work/CaseView/Pulse.mocks.js.map +1 -1
  741. package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts +45 -0
  742. package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts.map +1 -0
  743. package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.js +165 -0
  744. package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.js.map +1 -0
  745. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts +2 -6
  746. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -1
  747. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js +4 -174
  748. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js.map +1 -1
  749. package/lib/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts +4 -0
  750. package/lib/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts.map +1 -0
  751. package/lib/work/ConfigurableLayout/ConfigurableLayout.styles.js +11 -0
  752. package/lib/work/ConfigurableLayout/ConfigurableLayout.styles.js.map +1 -0
  753. package/lib/work/Confirmation/Confirmation.stories.js +2 -2
  754. package/lib/work/Confirmation/Confirmation.stories.js.map +1 -1
  755. package/lib/work/Details/Details.stories.js +15 -15
  756. package/lib/work/Details/Details.stories.js.map +1 -1
  757. package/lib/work/Glimpse/Glimpse.stories.d.ts.map +1 -1
  758. package/lib/work/Glimpse/Glimpse.stories.js +3 -3
  759. package/lib/work/Glimpse/Glimpse.stories.js.map +1 -1
  760. package/lib/work/SearchResults/SearchResults.mocks.js +4 -4
  761. package/lib/work/SearchResults/SearchResults.mocks.js.map +1 -1
  762. package/lib/work/SearchResults/SearchResults.stories.js +11 -11
  763. package/lib/work/SearchResults/SearchResults.stories.js.map +1 -1
  764. package/lib/work/Stages/Stages.stories.js +2 -2
  765. package/lib/work/Stages/Stages.stories.js.map +1 -1
  766. package/lib/work/Stakeholders/Stakeholders.mocks.js +2 -2
  767. package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -1
  768. package/lib/work/Stakeholders/Stakeholders.stories.js +1 -1
  769. package/lib/work/Stakeholders/Stakeholders.stories.js.map +1 -1
  770. package/lib/work/Tags/Tags.stories.js +1 -1
  771. package/lib/work/Tags/Tags.stories.js.map +1 -1
  772. package/lib/work/Tasks/TaskList.stories.js +3 -3
  773. package/lib/work/Tasks/TaskList.stories.js.map +1 -1
  774. package/lib/work/Tasks/Tasks.stories.js +11 -11
  775. package/lib/work/Tasks/Tasks.stories.js.map +1 -1
  776. package/lib/work/Timeline/Timeline.mocks.js +8 -8
  777. package/lib/work/Timeline/Timeline.mocks.js.map +1 -1
  778. package/lib/work/Timeline/Timeline.stories.d.ts +2 -0
  779. package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -1
  780. package/lib/work/Timeline/Timeline.stories.js +23 -3
  781. package/lib/work/Timeline/Timeline.stories.js.map +1 -1
  782. package/package.json +10 -11
  783. package/jsx/build/FlowModeller/FlowModeller.mocks.js.map +0 -1
  784. package/jsx/build/ObjectSelect/ObjectSelect.mocks.js +0 -136
  785. package/jsx/build/ObjectSelect/ObjectSelect.mocks.js.map +0 -1
  786. package/jsx/cs/CSCaseView/CSCaseView.mocks.js.map +0 -1
  787. package/jsx/social/Email/Email.mocks.js +0 -395
  788. package/jsx/social/Email/Email.mocks.js.map +0 -1
@@ -1,156 +1,17 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState, useRef, useContext, createRef } from 'react';
2
+ // cSpell:words calibri Trichy Nagercoil
3
+ import { useState, useRef, useContext, useCallback } from 'react';
3
4
  import { action } from '@storybook/addon-actions';
4
- import { array, boolean } from '@storybook/addon-knobs';
5
- import styled, { css } from 'styled-components';
6
- 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';
5
+ import { Card, CardContent, createUID, MenuButton, Icon, registerIcon, Flex, Button, ModalManagerContext, menuHelpers, CardHeader, Text, SummaryList, Grid, FieldValueList, StyledLabel } from '@pega/cosmos-react-core';
7
6
  import * as filterIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/filter.icon';
8
- import { Email, EmailConversation, EmailComposer, EmailShell, EmailSummaryItem, EmailSummaryList, EntityList } from '@pega/cosmos-react-social';
9
- import { bccParticipants, ccParticipants, emailBodyContent, participants, toParticipants, emailAttachments, EntityListMockData, EmailMockData, viewAnalysisEmailHeaderMock, topicListMock } from './Email.mocks';
7
+ import { Email as EmailComponent, EmailConversation, EmailComposer, EmailShell, EmailSummaryItem, EmailSummaryList, EntityList } from '@pega/cosmos-react-social';
8
+ import { bccParticipants, ccParticipants, emailBodyContent, participants, toParticipants, emailAttachments, EntityListMockData, viewAnalysisEmailHeaderMock, topicListMock, emailActions, generateEmailConversationParticipants, templates, handleExternalEntry, emailDemoActions, launchEmailComposer, LaunchAction, baseComposerProps, sentiment, emailSummaryItems, mockEmails, mockSuggestedReplies, mockEmailBodyTemplates } from './Email.mocks';
9
+ import { StyledEmailCardContent, StyledViewAnalysis } from './Email.styles';
10
10
  registerIcon(filterIcon);
11
11
  export default {
12
12
  title: 'Social/Email',
13
- component: Email
13
+ component: EmailComponent
14
14
  };
15
- const { emails: mockEmails, suggestedReplies: mockSuggestedReplies, emailBodyTemplates: mockEmailBodyTemplates } = EmailMockData;
16
- const handleExternalEntry = (filterValue) => {
17
- const pattern = /^[\w.\-_]+@[a-zA-Z]+(\.[a-zA-Z]{2,3}){1,2}$/;
18
- const matched = filterValue.match(pattern);
19
- return !!matched?.input;
20
- };
21
- const templates = mockEmailBodyTemplates.map(({ id, title }) => {
22
- return {
23
- id,
24
- title
25
- };
26
- });
27
- const baseComposerProps = {
28
- participants,
29
- externalValidator: handleExternalEntry,
30
- to: {
31
- reply: toParticipants.slice(0, 1),
32
- replyAll: toParticipants
33
- },
34
- cc: ccParticipants,
35
- subject: '',
36
- bodyContent: '',
37
- onSend: action('On Send'),
38
- onCancel: () => {
39
- action('cancelled email composing');
40
- },
41
- templates
42
- };
43
- var LaunchAction;
44
- (function (LaunchAction) {
45
- LaunchAction[LaunchAction["REPLY"] = 0] = "REPLY";
46
- LaunchAction[LaunchAction["REPLYALL"] = 1] = "REPLYALL";
47
- LaunchAction[LaunchAction["SUGGESTION"] = 2] = "SUGGESTION";
48
- LaunchAction[LaunchAction["FORWARD"] = 3] = "FORWARD";
49
- })(LaunchAction || (LaunchAction = {}));
50
- const composerModals = {};
51
- const getCompositeId = (id, launchAction) => {
52
- return `${id}-${launchAction}`;
53
- };
54
- const handleComposerCancel = (compositeID) => {
55
- composerModals[compositeID]?.dismissModal();
56
- composerModals[compositeID]?.unMountModal();
57
- delete composerModals[compositeID];
58
- };
59
- const launchEmailComposer = (id, launchAction, composerProps, create) => {
60
- const compositeId = getCompositeId(id, launchAction);
61
- const composerRef = createRef();
62
- const modalControls = create(() => {
63
- return (_jsx(Modal, { heading: composerProps.subject, options: { id: { compositeId } }, children: _jsx(EmailComposer, { ...composerProps, ref: composerRef, onCancel: () => handleComposerCancel(compositeId) }, void 0) }, void 0));
64
- }, { center: true }, { minimizable: true, maximizable: true, dockable: true });
65
- composerModals[compositeId] = {
66
- dismissModal: modalControls.dismiss,
67
- unMountModal: modalControls.unmount,
68
- composerRef
69
- };
70
- };
71
- const emailActions = (_jsx(MenuButton, { text: 'Email actions', variant: 'simple', icon: 'more', iconOnly: true, menu: {
72
- items: [
73
- {
74
- id: createUID(),
75
- primary: 'Reply',
76
- onClick: action('On reply')
77
- },
78
- {
79
- id: createUID(),
80
- primary: 'Reply all',
81
- onClick: action('On reply all')
82
- },
83
- {
84
- id: createUID(),
85
- primary: 'Forward',
86
- onClick: action('Forward')
87
- }
88
- ]
89
- } }, void 0));
90
- const emailDemoActions = (create, subject, onTemplateChange) => {
91
- const id = createUID();
92
- return (_jsx(MenuButton, { text: 'Email actions', variant: 'simple', icon: 'more', iconOnly: true, menu: {
93
- items: [
94
- {
95
- id: createUID(),
96
- primary: 'Reply',
97
- onClick: () => launchEmailComposer(id, LaunchAction.REPLY, {
98
- ...baseComposerProps,
99
- onTemplateChange,
100
- responseType: 'reply',
101
- subject: `Re-${subject}` || ''
102
- }, create)
103
- },
104
- {
105
- id: createUID(),
106
- primary: 'Reply all',
107
- onClick: () => launchEmailComposer(id, LaunchAction.REPLYALL, {
108
- ...baseComposerProps,
109
- onTemplateChange,
110
- responseType: 'replyAll',
111
- cc: [],
112
- subject: `Re-${subject}` || ''
113
- }, create)
114
- },
115
- {
116
- id: createUID(),
117
- primary: 'Forward',
118
- onClick: () => launchEmailComposer(id, LaunchAction.FORWARD, {
119
- ...baseComposerProps,
120
- onTemplateChange,
121
- responseType: 'forward',
122
- subject: `Fw-${subject}` || ''
123
- }, create)
124
- }
125
- ]
126
- } }, void 0));
127
- };
128
- const generateEmailConversationParticipants = (emails, fields) => {
129
- let l;
130
- if (fields) {
131
- l = [...fields];
132
- }
133
- else {
134
- l = ['from', 'to', 'cc', 'bcc'];
135
- }
136
- const emailUsers = emails.map(emailItem => {
137
- return l.map(n => {
138
- if (hasProp(emailItem, n)) {
139
- return emailItem[n];
140
- }
141
- return [];
142
- });
143
- });
144
- return [...new Set(Array.from(emailUsers).flat(2))];
145
- };
146
- const StyledEmailCardContent = styled(CardContent)(({ theme }) => {
147
- return css `
148
- &&&& {
149
- padding: calc(2 * ${theme.base.spacing}) 0;
150
- }
151
- `;
152
- });
153
- StyledEmailCardContent.defaultProps = defaultThemeProp;
154
15
  /*
155
16
 
156
17
  _____ _ _
@@ -161,17 +22,17 @@ StyledEmailCardContent.defaultProps = defaultThemeProp;
161
22
 
162
23
 
163
24
  */
164
- export const email = () => {
165
- return (_jsx(Card, { children: _jsx(StyledEmailCardContent, { children: _jsx(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 /> <br /> <div>Sure.. Here is your E-Ticket(H-765437) !! </div> <br /><br /> Regards, <br /> Laura Stevens </div>', subject: 'I have a quick question on travel', onReply: action('On reply'), onReplyAll: action('On reply all'), onForward: action('On forward'), onSuggestionClick: action('On Suggested reply clicked'), sentiment: {
25
+ export const Email = (args) => {
26
+ return (_jsx(Card, { children: _jsx(StyledEmailCardContent, { children: _jsx(EmailComponent, { id: createUID(), timeStamp: '2022-02-24T09: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 Team, <br /> <br /> <div>Please find the below conversation & let us know the best fare (including taxes) per person.</div><br />Regards, <br /> Laura Stevens </div>', forwardedContent: args.forwardedContent, subject: 'Regarding flight booking', onReply: action('On reply'), onReplyAll: action('On reply all'), onForward: action('On forward'), onSuggestionClick: action('On Suggested reply clicked'), sentiment: {
166
27
  variant: 'positive'
167
28
  }, actions: emailActions, suggestions: mockSuggestedReplies, attachments: [
168
29
  {
169
- id: createUID(),
30
+ id: 'attachment_0',
170
31
  value: 'https://pega.com/media/document.doc',
171
32
  displayText: 'Policy document'
172
33
  },
173
34
  {
174
- id: createUID(),
35
+ id: 'attachment_1',
175
36
  value: 'https://pbs.twimg.com/media/ENNN5PAXkAE-hag.jpg',
176
37
  displayText: 'E-Ticket'
177
38
  }
@@ -181,11 +42,32 @@ export const email = () => {
181
42
  onDownload: action('On attachment download'),
182
43
  onPreview: action('On attachment preview')
183
44
  };
184
- }) }, void 0) }, void 0) }, void 0));
45
+ }) }) }) }));
46
+ };
47
+ Email.args = {
48
+ // eslint-disable-next-line demo-patterns/literal-args
49
+ forwardedContent: `
50
+ <div id="pega-email-message-forward" style="font-family:OpenSans,sans-serif; border-left: 1px solid #c4c4c4; padding-left: 8px;">
51
+ <div>
52
+ <p class="pega-email-forward-header" style="font-size:smaller;color:#90909D;">--------------------Forwarded message--------------------<br />From: Person, Example &lt;example.person@pega.com&gt; &nbsp;<br />Date: Feb 23, 2022 9:29:59 PM&nbsp;<br />Subject: Regarding flight booking &nbsp;<br />To: Laura, Stevens &lt;laurastevens@example.com&gt;<br />&nbsp;</p>
53
+ </div>
54
+ <div class="pega-email-forward-content">
55
+ <div class="WordSection1">
56
+ <p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:'calibri' , sans-serif"><span style="color:black">Hi,&nbsp; </span></p>
57
+ <p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:'calibri' , sans-serif"><span style="color:black">&nbsp;&nbsp; </span></p>
58
+ <p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:'calibri' , sans-serif"><span style="color:black">I need to book a flight from Hyderabad to Chennai.&nbsp; </span></p>
59
+ <p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:'calibri' , sans-serif"><span style="color:black">Please let me know the fare including taxes per each person. </span></p>
60
+ <p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:'calibri' , sans-serif"><span style="color:black">&nbsp;&nbsp; </span></p>
61
+ <p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:'calibri' , sans-serif"><span style="color:black">Thanks,&nbsp; </span></p>
62
+ <p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:'calibri' , sans-serif"><span style="color:black">Goutham </span></p>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ `
67
+ };
68
+ Email.argTypes = {
69
+ forwardedContent: { control: { type: 'text' } }
185
70
  };
186
- const StyledViewAnalysis = styled.div `
187
- width: 18rem;
188
- `;
189
71
  export const ViewAnalysis = () => {
190
72
  const headerProps = {
191
73
  icon: 'list-number',
@@ -194,24 +76,15 @@ export const ViewAnalysis = () => {
194
76
  const itemsToRender = topicListMock.map(items => {
195
77
  return {
196
78
  ...items,
197
- primary: _jsx(StyledLabel, { children: items.primary }, void 0),
198
- secondary: (_jsxs(Flex, { container: { direction: 'row', justify: 'between' }, children: [_jsx(Text, { variant: 'primary', children: items.secondary.indicator }, void 0), _jsx(StyledLabel, { children: items.secondary.value }, void 0)] }, void 0))
79
+ primary: _jsx(StyledLabel, { children: items.primary }),
80
+ secondary: (_jsxs(Flex, { container: { direction: 'row', justify: 'between' }, children: [_jsx(Text, { variant: 'primary', children: items.secondary.indicator }), _jsx(StyledLabel, { children: items.secondary.value })] }))
199
81
  };
200
82
  });
201
- return (_jsx(StyledViewAnalysis, { children: _jsxs(Grid, { container: { rowGap: 2 }, children: [_jsx(EntityList, { header: headerProps, content: EntityListMockData }, void 0), _jsxs(Card, { children: [_jsxs(CardHeader, { container: { alignItems: 'center', gap: 1 }, children: [_jsx(Icon, { name: 'document-doc' }, void 0), _jsx(Text, { variant: 'h3', children: "Email header" }, void 0)] }, void 0), _jsx(CardContent, { children: _jsx(FieldValueList, { fields: viewAnalysisEmailHeaderMock, variant: 'stacked' }, void 0) }, void 0)] }, void 0), _jsx(SummaryList, { name: 'Topics', icon: 'headline', items: itemsToRender, noItemsText: 'No items' }, void 0)] }, void 0) }, void 0));
83
+ return (_jsx(StyledViewAnalysis, { children: _jsxs(Grid, { container: { rowGap: 2 }, children: [_jsx(EntityList, { header: headerProps, content: EntityListMockData }), _jsxs(Card, { children: [_jsxs(CardHeader, { container: { alignItems: 'center', gap: 1 }, children: [_jsx(Icon, { name: 'document-doc' }), _jsx(Text, { variant: 'h3', children: "Email header" })] }), _jsx(CardContent, { children: _jsx(FieldValueList, { fields: viewAnalysisEmailHeaderMock, variant: 'stacked' }) })] }), _jsx(SummaryList, { name: 'Topics', icon: 'headline', items: itemsToRender, noItemsText: 'No items' })] }) }));
202
84
  };
203
- /*
204
- ______ _ _ ______ _ _ _ _
205
- | ____| (_) | | ____| | | (_) | (_)
206
- | |__ _ __ ___ __ _ _| | | |__ _ __ | |_ _| |_ _ ___ ___
207
- | __| | '_ ` _ \ / _` | | | | __| | '_ \| __| | __| |/ _ \/ __|
208
- | |____| | | | | | (_| | | | | |____| | | | |_| | |_| | __/\__ \
209
- |______|_| |_| |_|\__,_|_|_| |______|_| |_|\__|_|\__|_|\___||___/
210
-
211
- */
212
- export const emailEntities = () => {
85
+ export const EmailEntities = (args) => {
213
86
  const nestedEntities = ['Place: Nagercoil, Hyderabad', 'Location: Nagercoil'];
214
- return (_jsx(Card, { children: _jsx(StyledEmailCardContent, { children: _jsx(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)
87
+ return (_jsx(Card, { children: _jsx(StyledEmailCardContent, { children: _jsx(EmailComponent, { 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: args.enableEntityHighlighting
215
88
  ? [
216
89
  {
217
90
  value: '3967',
@@ -270,22 +143,22 @@ export const emailEntities = () => {
270
143
  description: 'Date'
271
144
  }
272
145
  ]
273
- : undefined, contextMenu: boolean('Copy to context menu fields', true)
146
+ : undefined, contextMenu: args.enableContextMenu
274
147
  ? {
275
148
  heading: 'Copy to',
276
149
  items: [
277
150
  {
278
- id: createUID(),
151
+ id: 'item_0',
279
152
  primary: 'Field 1',
280
153
  selected: false
281
154
  },
282
155
  {
283
- id: createUID(),
156
+ id: 'item_1',
284
157
  primary: 'Field 2',
285
158
  selected: true
286
159
  },
287
160
  {
288
- id: createUID(),
161
+ id: 'item_2',
289
162
  primary: 'Field 3',
290
163
  selected: true
291
164
  }
@@ -294,7 +167,15 @@ export const emailEntities = () => {
294
167
  }
295
168
  : 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: {
296
169
  variant: 'neutral'
297
- }, actions: emailActions, suggestions: mockSuggestedReplies }, void 0) }, void 0) }, void 0));
170
+ }, actions: emailActions, suggestions: mockSuggestedReplies }) }) }));
171
+ };
172
+ EmailEntities.args = {
173
+ enableEntityHighlighting: true,
174
+ enableContextMenu: true
175
+ };
176
+ EmailEntities.argTypes = {
177
+ enableEntityHighlighting: { control: { type: 'boolean' } },
178
+ enableContextMenu: { control: { type: 'boolean' } }
298
179
  };
299
180
  /*
300
181
 
@@ -309,7 +190,7 @@ export const emailEntities = () => {
309
190
  export const emailConversation = () => {
310
191
  const emailArr = [
311
192
  {
312
- id: createUID(),
193
+ id: 'item_0',
313
194
  timeStamp: '2021-01-05T09:12',
314
195
  from: mockEmails['Laura Stevens'],
315
196
  cc: [mockEmails['Adam Gillchrist'], mockEmails['John Paul']],
@@ -324,7 +205,7 @@ export const emailConversation = () => {
324
205
  suggestions: mockSuggestedReplies
325
206
  },
326
207
  {
327
- id: createUID(),
208
+ id: 'item_1',
328
209
  timeStamp: '2021-01-02T03:12',
329
210
  from: mockEmails['Sara Davis'],
330
211
  cc: [mockEmails['Adam Gillchrist'], mockEmails['John Paul']],
@@ -337,7 +218,7 @@ export const emailConversation = () => {
337
218
  actions: emailActions
338
219
  }
339
220
  ];
340
- return (_jsx(EmailConversation, { participants: generateEmailConversationParticipants(emailArr), from: generateEmailConversationParticipants(emailArr, ['from'])[0], to: generateEmailConversationParticipants(emailArr, ['to']), id: createUID(), timeStamp: emailArr[0].timeStamp, unReadEmailCount: emailArr.filter(item => item.unRead).length, emails: emailArr }, void 0));
221
+ return (_jsx(EmailConversation, { participants: generateEmailConversationParticipants(emailArr), from: generateEmailConversationParticipants(emailArr, ['from'])[0], to: generateEmailConversationParticipants(emailArr, ['to']), id: createUID(), timeStamp: emailArr[0].timeStamp, unReadEmailCount: emailArr.filter(item => item.unRead).length, emails: emailArr }));
341
222
  };
342
223
  /*
343
224
 
@@ -351,12 +232,20 @@ export const emailConversation = () => {
351
232
  */
352
233
  export const EmailComposerDemo = () => {
353
234
  const fileUploadInputRef = useRef(null);
235
+ const [composerProgress, setComposerProgress] = useState(false);
354
236
  const [attachments, setAttachments] = useState(emailAttachments);
355
237
  const onTemplateChange = id => {
356
238
  const selectedTemplate = mockEmailBodyTemplates.find(template => template.id === id);
357
- return selectedTemplate?.content;
239
+ // Simulating api call
240
+ setComposerProgress({ message: 'Loading template...' });
241
+ return new Promise(resolve => {
242
+ setTimeout(() => {
243
+ setComposerProgress(false);
244
+ resolve(selectedTemplate?.content);
245
+ }, 1000);
246
+ });
358
247
  };
359
- return (_jsx(Card, { style: { width: '30rem' }, children: _jsxs(CardContent, { children: [_jsx(EmailComposer, { onSend: action('On Send'), onCancel: action('On cancel'), externalValidator: handleExternalEntry, participants: participants, to: {
248
+ return (_jsx(Card, { style: { width: '30rem' }, children: _jsxs(CardContent, { children: [_jsx(EmailComposer, { progress: composerProgress, onSend: action('On Send'), onCancel: action('On cancel'), externalValidator: handleExternalEntry, participants: participants, to: {
360
249
  reply: [participants[7].emailAddress],
361
250
  replyAll: toParticipants,
362
251
  forward: []
@@ -367,20 +256,7 @@ export const EmailComposerDemo = () => {
367
256
  setAttachments(prevAttachments => prevAttachments.filter(item => item.name !== name));
368
257
  }
369
258
  };
370
- }), footerMoreActions: _jsx(MenuButton, { text: 'Phrases', placement: 'top', menu: {
371
- items: [
372
- {
373
- primary: 'Thanks',
374
- id: 'Thanks',
375
- onClick: action('Thanks!')
376
- },
377
- {
378
- primary: 'Sorry, please give us some time',
379
- id: 'Sorry',
380
- onClick: action('Sorry, please give us some time!')
381
- }
382
- ]
383
- } }, void 0) }, void 0), _jsx("input", { ref: fileUploadInputRef, type: 'file', style: { display: 'none' }, onChange: (e) => {
259
+ }) }), _jsx("input", { ref: fileUploadInputRef, type: 'file', style: { display: 'none' }, onChange: (e) => {
384
260
  if (e.target.files) {
385
261
  setAttachments(prevAttachments => [
386
262
  ...prevAttachments,
@@ -391,23 +267,10 @@ export const EmailComposerDemo = () => {
391
267
  })
392
268
  ]);
393
269
  }
394
- } }, void 0)] }, void 0) }, void 0));
270
+ } })] }) }));
395
271
  };
396
- /*
397
-
398
- _____ _ _ _ _ _
399
- | ____|_ __ ___ __ _(_) | ___| |__ ___| | |
400
- | _| | '_ ` _ \ / _` | | | / __| '_ \ / _ \ | |
401
- | |___| | | | | | (_| | | | \__ \ | | | __/ | |
402
- |_____|_| |_| |_|\__,_|_|_| |___/_| |_|\___|_|_|
403
-
404
- */
405
- export const EmailDemo = ({ hideSuggestions }) => {
406
- const onTemplateChange = id => {
407
- const selectedTemplate = mockEmailBodyTemplates.find(template => template.id === id);
408
- return selectedTemplate?.content;
409
- };
410
- const actions = array('Actions', ['Transfer', 'End conversation']).map(name => ({
272
+ export const EmailDemo = (args) => {
273
+ const actions = ['Transfer', 'End conversation'].map(name => ({
411
274
  primary: name,
412
275
  id: name,
413
276
  onClick: action(`Clicked ${name}`)
@@ -415,22 +278,22 @@ export const EmailDemo = ({ hideSuggestions }) => {
415
278
  const { create } = useContext(ModalManagerContext);
416
279
  const emailsData = [
417
280
  {
418
- id: createUID(),
281
+ id: 'item_0',
419
282
  timeStamp: '2021-01-05T09:12',
420
283
  from: participants[0],
421
284
  to: participants.slice(0, 2),
422
285
  body: '<div>Hi, <br /> <br /><div>Your address change request is approved.</div> <br /> <br />Regards, <br />Laura Stevens </div>',
423
286
  unRead: true,
424
287
  subject: 'Pause service',
425
- suggestions: hideSuggestions ? undefined : mockSuggestedReplies,
288
+ suggestions: args.hideSuggestions ? undefined : mockSuggestedReplies,
426
289
  attachments: [
427
290
  {
428
- id: createUID(),
291
+ id: 'item_1_0',
429
292
  value: 'https://pega.com/media/document.doc',
430
293
  displayText: 'Policy document'
431
294
  },
432
295
  {
433
- id: createUID(),
296
+ id: 'item_1_1',
434
297
  value: 'https://pbs.twimg.com/media/ENNN5PAXkAE-hag.jpg',
435
298
  displayText: 'E-Ticket'
436
299
  }
@@ -443,7 +306,7 @@ export const EmailDemo = ({ hideSuggestions }) => {
443
306
  })
444
307
  },
445
308
  {
446
- id: createUID(),
309
+ id: 'item_1',
447
310
  timeStamp: '2021-01-02T03:12',
448
311
  from: participants[3],
449
312
  to: participants.slice(2, 4),
@@ -452,13 +315,12 @@ export const EmailDemo = ({ hideSuggestions }) => {
452
315
  subject: 'Pause service'
453
316
  }
454
317
  ].map(emailData => {
455
- const emailActionItems = emailDemoActions(create, emailData.subject, onTemplateChange);
318
+ const emailActionItems = emailDemoActions(create, emailData.subject);
456
319
  return {
457
320
  ...emailData,
458
321
  onReply: id => {
459
322
  launchEmailComposer(id, LaunchAction.REPLY, {
460
323
  ...baseComposerProps,
461
- onTemplateChange,
462
324
  externalValidator: handleExternalEntry,
463
325
  responseType: 'reply',
464
326
  subject: `Re-${emailData.subject}` || ''
@@ -467,7 +329,6 @@ export const EmailDemo = ({ hideSuggestions }) => {
467
329
  onForward: id => {
468
330
  launchEmailComposer(id, LaunchAction.FORWARD, {
469
331
  ...baseComposerProps,
470
- onTemplateChange,
471
332
  externalValidator: handleExternalEntry,
472
333
  responseType: 'forward',
473
334
  subject: `Fw-${emailData.subject}` || ''
@@ -479,14 +340,13 @@ export const EmailDemo = ({ hideSuggestions }) => {
479
340
  ...baseComposerProps,
480
341
  externalValidator: handleExternalEntry,
481
342
  responseType: 'reply',
482
- onTemplateChange,
483
343
  subject: suggestion?.title || '',
484
344
  bodyContent: suggestion ? suggestion.content : '',
485
345
  defaultTemplateId: suggestion?.id
486
346
  }, create);
487
347
  },
488
348
  actions: emailActionItems,
489
- tags: hideSuggestions
349
+ tags: args.hideSuggestions
490
350
  ? undefined
491
351
  : {
492
352
  items: ['Pause service', 'Lost or stolen'],
@@ -542,7 +402,7 @@ export const EmailDemo = ({ hideSuggestions }) => {
542
402
  return {
543
403
  from: generateEmailConversationParticipants(emails, ['from'])[0],
544
404
  to: emails[0].to,
545
- id: createUID(),
405
+ id: `item_${i}`,
546
406
  timeStamp: emails[0].timeStamp,
547
407
  unReadEmailCount: emails.filter(item => item.unRead).length,
548
408
  emails,
@@ -555,7 +415,7 @@ export const EmailDemo = ({ hideSuggestions }) => {
555
415
  {
556
416
  from: generateEmailConversationParticipants(emailsData, ['from'])[0],
557
417
  to: generateEmailConversationParticipants(emailsData, ['to']),
558
- id: createUID(),
418
+ id: 'item_0',
559
419
  timeStamp: new Date(emailsData[0].timeStamp),
560
420
  unReadEmailCount: emailsData.filter(item => item.unRead).length,
561
421
  emails: emailsData
@@ -569,17 +429,23 @@ export const EmailDemo = ({ hideSuggestions }) => {
569
429
  actions: (_jsxs(Flex, { container: {
570
430
  alignItems: 'center',
571
431
  gap: 0
572
- }, children: [_jsx(Button, { variant: 'simple', icon: true, children: _jsx(Icon, { name: 'filter' }, void 0) }, void 0), _jsx(MenuButton, { variant: 'simple', text: 'More actions', icon: 'more', iconOnly: true, portal: true, menu: { items: actions } }, void 0)] }, void 0)),
432
+ }, children: [_jsx(Button, { variant: 'simple', icon: true, children: _jsx(Icon, { name: 'filter' }) }), _jsx(MenuButton, { variant: 'simple', text: 'More actions', icon: 'more', iconOnly: true, portal: true, menu: { items: actions } })] })),
573
433
  subject: 'Pause service'
574
- }, autoCollapse: boolean('Auto collapse', true), conversations: boolean('Single conversation', true) ? singleEmailConversation : emailConversations }, void 0));
434
+ }, autoCollapse: args.autoCollapse, conversations: args.singleConversation ? singleEmailConversation : emailConversations }));
435
+ };
436
+ EmailDemo.args = {
437
+ autoCollapse: true,
438
+ hideSuggestions: false,
439
+ singleConversation: true
440
+ };
441
+ EmailDemo.argTypes = {
442
+ autoCollapse: { control: { type: 'boolean' } },
443
+ hideSuggestions: { control: { type: 'boolean' } },
444
+ singleConversation: { control: { type: 'boolean' } }
575
445
  };
576
446
  EmailDemo.parameters = {
577
447
  layout: 'fullscreen'
578
448
  };
579
- const sentiment = {
580
- variant: 'negative',
581
- labelHidden: true
582
- };
583
449
  /*
584
450
  ______ _ _ _____ _____ _
585
451
  | ____| (_) | / ____| |_ _| |
@@ -605,7 +471,7 @@ export const EmailSummaryItemDemo = () => {
605
471
  }
606
472
  ], message: 'I have a quick question on traveling to India. How do I reach Hyderabad?', timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)), topic: 'Missing Luggage', sentiment: sentiment, urgency: 10, unreadEmailCount: active ? 0 : 8, active: active, onClick: () => {
607
473
  setActive(true);
608
- } }, void 0));
474
+ } }));
609
475
  };
610
476
  /*
611
477
  ______ _ _ _____ _ _ _
@@ -617,258 +483,34 @@ export const EmailSummaryItemDemo = () => {
617
483
  __/ |
618
484
  |___/
619
485
  */
620
- const emailSummaryItems = [
621
- {
622
- id: createUID(),
623
- activeParticipants: [
624
- { shortName: 'Robert', fullName: 'Robert Downer', emailAddress: 'robert.downey@example.com' },
625
- { shortName: 'Support', fullName: 'Support', emailAddress: 'support@example.com' }
626
- ],
627
- message: 'I have a quick question on travel',
628
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
629
- topic: 'Travel request',
630
- sentiment,
631
- active: true,
632
- urgency: 85,
633
- unreadEmailCount: 4
634
- },
635
- {
636
- id: createUID(),
637
- activeParticipants: [
638
- {
639
- shortName: 'Nathan',
640
- fullName: 'Nathan Swanson',
641
- emailAddress: 'nathan.swanson@example.com'
642
- }
643
- ],
644
- message: 'My luggage did not drive!',
645
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
646
- topic: 'Missing Luggage',
647
- sentiment,
648
- urgency: 10,
649
- unreadEmailCount: 2
650
- },
651
- {
652
- id: createUID(),
653
- activeParticipants: [
654
- { shortName: 'Simpson', fullName: 'Glenn Simpson', emailAddress: 'glenn.simpson@example.com' }
655
- ],
656
- message: 'Re: How much is a flight to Florida. Is there a discount going on?',
657
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
658
- topic: 'Travel request',
659
- sentiment,
660
- urgency: 65,
661
- unreadEmailCount: 1
662
- },
663
- {
664
- id: createUID(),
665
- activeParticipants: [
666
- { shortName: 'Green', fullName: 'Ralph Green', emailAddress: 'ralph.green@example.com' }
667
- ],
668
- message: 'Re: Should I purchase travel insurance? How often do we need it?',
669
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
670
- topic: 'Travel request',
671
- sentiment,
672
- urgency: 85,
673
- unreadEmailCount: 6
674
- },
675
- {
676
- id: createUID(),
677
- activeParticipants: [
678
- { shortName: 'Greene', fullName: 'Fred Greene', emailAddress: 'Fred.greene@example.com' }
679
- ],
680
- message: 'My next vacation',
681
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
682
- topic: 'Travel request',
683
- sentiment,
684
- urgency: 45
685
- },
686
- {
687
- id: createUID(),
688
- activeParticipants: [
689
- { shortName: 'Smith', fullName: 'Aya Smith', emailAddress: 'aya.smith@example.com' },
690
- { shortName: 'Support', fullName: 'Support', emailAddress: 'support@example.com' },
691
- { shortName: 'Downer', fullName: 'Robert Downer', emailAddress: 'robert.downer@example.com' }
692
- ],
693
- message: 'Airport questions',
694
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
695
- topic: 'Travel request',
696
- sentiment,
697
- urgency: 35
698
- },
699
- {
700
- id: createUID(),
701
- activeParticipants: [
702
- { shortName: 'Robert', fullName: 'Robert Downer', emailAddress: 'robert.downey@example.com' },
703
- { shortName: 'Robert', fullName: 'Robert ', emailAddress: 'robert.downey@example.com' }
704
- ],
705
- message: 'I have a quick question on travel',
706
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
707
- topic: 'Travel request',
708
- sentiment,
709
- urgency: 85
710
- },
711
- {
712
- id: createUID(),
713
- activeParticipants: [
714
- {
715
- shortName: 'Nathan',
716
- fullName: 'Nathan Swanson',
717
- emailAddress: 'nathan.swanson@example.com'
718
- }
719
- ],
720
- message: 'My luggage did not drive!',
721
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
722
- topic: 'Missing Luggage',
723
- sentiment,
724
- urgency: 10
725
- },
726
- {
727
- id: createUID(),
728
- activeParticipants: [
729
- { shortName: 'Simpson', fullName: 'Glenn Simpson', emailAddress: 'glenn.simpson@example.com' }
730
- ],
731
- message: 'Re: How much is a flight to Florida',
732
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
733
- topic: 'Travel request',
734
- sentiment,
735
- urgency: 65
736
- },
737
- {
738
- id: createUID(),
739
- activeParticipants: [
740
- { shortName: 'Green', fullName: 'Ralph Green', emailAddress: 'ralph.green@example.com' }
741
- ],
742
- message: 'Re: Should I purchase travel insurance',
743
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
744
- topic: 'Travel request',
745
- sentiment,
746
- urgency: 85
747
- },
748
- {
749
- id: createUID(),
750
- activeParticipants: [
751
- { shortName: 'Greene', fullName: 'Fred Greene', emailAddress: 'Fred.greene@example.com' }
752
- ],
753
- message: 'My next vacation',
754
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
755
- topic: 'Travel request',
756
- sentiment,
757
- urgency: 45
758
- },
759
- {
760
- id: createUID(),
761
- activeParticipants: [
762
- { shortName: 'Smith', fullName: 'Aya Smith', emailAddress: 'aya.smith@example.com' },
763
- { shortName: 'Support', fullName: 'Support', emailAddress: 'support@example.com' },
764
- { shortName: 'Downer', fullName: 'Robert Downer', emailAddress: 'robert.downer@example.com' }
765
- ],
766
- message: 'Airport questions',
767
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
768
- topic: 'Travel request',
769
- sentiment,
770
- urgency: 35
771
- },
772
- {
773
- id: createUID(),
774
- activeParticipants: [
775
- { shortName: 'Robert', fullName: 'Robert Downer', emailAddress: 'robert.downey@example.com' },
776
- { shortName: 'Robert', fullName: 'Robert ', emailAddress: 'robert.downey@example.com' }
777
- ],
778
- message: 'I have a quick question on travel',
779
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
780
- topic: 'Travel request',
781
- sentiment,
782
- urgency: 85
783
- },
784
- {
785
- id: createUID(),
786
- activeParticipants: [
787
- {
788
- shortName: 'Nathan',
789
- fullName: 'Nathan Swanson',
790
- emailAddress: 'nathan.swanson@example.com'
791
- }
792
- ],
793
- message: 'My luggage did not drive!',
794
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
795
- topic: 'Missing Luggage',
796
- sentiment,
797
- urgency: 10
798
- },
799
- {
800
- id: createUID(),
801
- activeParticipants: [
802
- { shortName: 'Simpson', fullName: 'Glenn Simpson', emailAddress: 'glenn.simpson@example.com' }
803
- ],
804
- message: 'Re: How much is a flight to Florida',
805
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
806
- topic: 'Travel request',
807
- sentiment,
808
- urgency: 65
809
- },
810
- {
811
- id: createUID(),
812
- activeParticipants: [
813
- { shortName: 'Green', fullName: 'Ralph Green', emailAddress: 'ralph.green@example.com' }
814
- ],
815
- message: 'Re: Should I purchase travel insurance',
816
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
817
- topic: 'Travel request',
818
- sentiment,
819
- urgency: 85
820
- },
821
- {
822
- id: createUID(),
823
- activeParticipants: [
824
- { shortName: 'Greene', fullName: 'Fred Greene', emailAddress: 'Fred.greene@example.com' }
825
- ],
826
- message: 'My next vacation',
827
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
828
- topic: 'Travel request',
829
- sentiment,
830
- urgency: 45
831
- },
832
- {
833
- id: createUID(),
834
- activeParticipants: [
835
- { shortName: 'Smith', fullName: 'Aya Smith', emailAddress: 'aya.smith@example.com' },
836
- { shortName: 'Support', fullName: 'Support', emailAddress: 'support@example.com' },
837
- { shortName: 'Downer', fullName: 'Robert Downer', emailAddress: 'robert.downer@example.com' }
838
- ],
839
- message: 'Airport questions',
840
- timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
841
- topic: 'Travel request',
842
- sentiment,
843
- urgency: 35
844
- }
845
- ];
846
486
  export const EmailSummaryListDemo = () => {
487
+ const INITIAL_CHUNK_SIZE = 9;
488
+ const APPEND_CHUNK_SIZE = 1;
847
489
  const emailSummaryListRef = useRef(null);
848
- const [allEmailItems, setAllEmailItems] = useState(emailSummaryItems);
490
+ const [allEmailItems, setAllEmailItems] = useState(emailSummaryItems.slice(0, INITIAL_CHUNK_SIZE));
849
491
  const [categories, setCategories] = useState([
850
492
  {
851
- id: createUID(),
493
+ id: 'item_0',
852
494
  primary: 'Default worklist',
853
495
  selected: false
854
496
  },
855
497
  {
856
- id: createUID(),
498
+ id: 'item_1',
857
499
  primary: 'Authors',
858
500
  selected: false
859
501
  },
860
502
  {
861
- id: createUID(),
503
+ id: 'item_2',
862
504
  primary: 'Administrators',
863
505
  selected: false
864
506
  },
865
507
  {
866
- id: createUID(),
508
+ id: 'item_3',
867
509
  primary: 'Managers',
868
510
  selected: false
869
511
  },
870
512
  {
871
- id: createUID(),
513
+ id: 'item_4',
872
514
  primary: 'Users',
873
515
  selected: false
874
516
  }
@@ -884,7 +526,25 @@ export const EmailSummaryListDemo = () => {
884
526
  const onCategoryClick = (id) => {
885
527
  setCategories(cur => menuHelpers.toggleSelected(cur, id, 'single-select'));
886
528
  };
887
- return (_jsx(EmailSummaryList, { style: { height: 'calc(100vh)', width: '25rem', margin: 'auto' }, ref: emailSummaryListRef, unreadEmailCount: 99, categories: categories, items: allEmailItems, onItemClick: handleItemClick, onCategoryClick: onCategoryClick }, void 0));
529
+ const [loading, setLoading] = useState(false);
530
+ const [hasMore, setHasMore] = useState(true);
531
+ const loadMore = useCallback(() => {
532
+ if (!loading) {
533
+ setLoading(true);
534
+ setTimeout(() => {
535
+ setLoading(false);
536
+ setAllEmailItems(prevItems => {
537
+ const previousItemsLength = prevItems.length;
538
+ const newItems = emailSummaryItems.slice(previousItemsLength, previousItemsLength + APPEND_CHUNK_SIZE);
539
+ if (newItems.length === 0) {
540
+ setHasMore(false);
541
+ }
542
+ return [...prevItems, ...newItems];
543
+ });
544
+ }, 1500);
545
+ }
546
+ }, [loading]);
547
+ return (_jsx(EmailSummaryList, { style: { height: '100vh', width: '25rem', margin: 'auto' }, ref: emailSummaryListRef, unreadEmailCount: 99, categories: categories, items: allEmailItems, onItemClick: handleItemClick, onCategoryClick: onCategoryClick, onLoadMore: hasMore ? loadMore : undefined, loading: loading, emptyMessage: 'No emails.' }));
888
548
  };
889
549
  EmailSummaryListDemo.parameters = {
890
550
  layout: 'fullscreen'