@pega/cosmos-react-demos 5.0.0-dev.1.0 → 5.0.0-dev.10.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 (1008) hide show
  1. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts +1 -1
  2. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts.map +1 -1
  3. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js.map +1 -1
  4. package/jsx/condition-builder/ConditionBuilder/props.mock.d.ts +1 -1
  5. package/jsx/condition-builder/ConditionBuilder/props.mock.d.ts.map +1 -1
  6. package/jsx/condition-builder/ConditionBuilder/props.mock.js.map +1 -1
  7. package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts +1 -1
  8. package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts.map +1 -1
  9. package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.js.map +1 -1
  10. package/jsx/core/AIButton/AIButton.mocks.d.ts +1 -1
  11. package/jsx/core/AIButton/AIButton.mocks.d.ts.map +1 -1
  12. package/jsx/core/AIButton/AIButton.mocks.js.map +1 -1
  13. package/jsx/core/AdditionalInfo/AdditionalInfo.stories.d.ts +2 -2
  14. package/jsx/core/AdditionalInfo/AdditionalInfo.stories.d.ts.map +1 -1
  15. package/jsx/core/AdditionalInfo/AdditionalInfo.stories.jsx +1 -1
  16. package/jsx/core/AdditionalInfo/AdditionalInfo.stories.jsx.map +1 -1
  17. package/jsx/core/AppShell/AppShell.mocks.d.ts +3 -3
  18. package/jsx/core/AppShell/AppShell.mocks.d.ts.map +1 -1
  19. package/jsx/core/AppShell/AppShell.mocks.jsx.map +1 -1
  20. package/jsx/core/Avatar/Avatar.stories.d.ts.map +1 -1
  21. package/jsx/core/Avatar/Avatar.stories.jsx +1 -2
  22. package/jsx/core/Avatar/Avatar.stories.jsx.map +1 -1
  23. package/jsx/core/Badges/Status.stories.jsx +2 -2
  24. package/jsx/core/Badges/Status.stories.jsx.map +1 -1
  25. package/jsx/core/Banner/Banner.mocks.d.ts +1 -1
  26. package/jsx/core/Banner/Banner.mocks.d.ts.map +1 -1
  27. package/jsx/core/Breadcrumbs/Breadcrumbs.mocks.d.ts +2 -0
  28. package/jsx/core/Breadcrumbs/Breadcrumbs.mocks.d.ts.map +1 -0
  29. package/jsx/core/Breadcrumbs/Breadcrumbs.mocks.js +8 -0
  30. package/jsx/core/Breadcrumbs/Breadcrumbs.mocks.js.map +1 -0
  31. package/jsx/core/Breadcrumbs/Breadcrumbs.stories.d.ts +2 -1
  32. package/jsx/core/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -1
  33. package/jsx/core/Breadcrumbs/Breadcrumbs.stories.jsx +39 -11
  34. package/jsx/core/Breadcrumbs/Breadcrumbs.stories.jsx.map +1 -1
  35. package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
  36. package/jsx/core/Checkbox/Checkbox.stories.jsx +0 -3
  37. package/jsx/core/Checkbox/Checkbox.stories.jsx.map +1 -1
  38. package/jsx/core/CheckboxGroup/CheckboxGroup.stories.d.ts.map +1 -1
  39. package/jsx/core/CheckboxGroup/CheckboxGroup.stories.jsx +4 -10
  40. package/jsx/core/CheckboxGroup/CheckboxGroup.stories.jsx.map +1 -1
  41. package/jsx/core/ColorPicker/ColorPicker.stories.jsx +1 -2
  42. package/jsx/core/ColorPicker/ColorPicker.stories.jsx.map +1 -1
  43. package/jsx/core/ComboBox/ComboBox.mocks.d.ts +3 -1
  44. package/jsx/core/ComboBox/ComboBox.mocks.d.ts.map +1 -1
  45. package/jsx/core/ComboBox/{ComboBox.mocks.js → ComboBox.mocks.jsx} +5 -1
  46. package/jsx/core/ComboBox/ComboBox.mocks.jsx.map +1 -0
  47. package/jsx/core/ComboBox/ComboBox.stories.d.ts +1 -0
  48. package/jsx/core/ComboBox/ComboBox.stories.d.ts.map +1 -1
  49. package/jsx/core/ComboBox/ComboBox.stories.jsx +15 -13
  50. package/jsx/core/ComboBox/ComboBox.stories.jsx.map +1 -1
  51. package/jsx/core/CompositeInput/CompositeInput.mocks.d.ts +2 -2
  52. package/jsx/core/CompositeInput/CompositeInput.mocks.d.ts.map +1 -1
  53. package/jsx/core/CompositeInput/CompositeInput.mocks.jsx.map +1 -1
  54. package/jsx/core/CompositeInput/CompositeInput.stories.d.ts.map +1 -1
  55. package/jsx/core/CompositeInput/CompositeInput.stories.jsx +1 -3
  56. package/jsx/core/CompositeInput/CompositeInput.stories.jsx.map +1 -1
  57. package/jsx/core/Configuration/Configuration.mocks.d.ts +1 -1
  58. package/jsx/core/Configuration/Configuration.mocks.d.ts.map +1 -1
  59. package/jsx/core/CreditCard/CreditCard.stories.d.ts.map +1 -1
  60. package/jsx/core/CreditCard/CreditCard.stories.jsx +0 -1
  61. package/jsx/core/CreditCard/CreditCard.stories.jsx.map +1 -1
  62. package/jsx/core/Currency/Currency.stories.d.ts.map +1 -1
  63. package/jsx/core/Currency/Currency.stories.jsx +0 -1
  64. package/jsx/core/Currency/Currency.stories.jsx.map +1 -1
  65. package/jsx/core/DateTime/DateTime.stories.d.ts.map +1 -1
  66. package/jsx/core/DateTime/DateTime.stories.jsx +0 -10
  67. package/jsx/core/DateTime/DateTime.stories.jsx.map +1 -1
  68. package/jsx/core/DateTime/DateTimeDisplay.stories.d.ts.map +1 -1
  69. package/jsx/core/DateTime/DateTimeDisplay.stories.jsx +10 -5
  70. package/jsx/core/DateTime/DateTimeDisplay.stories.jsx.map +1 -1
  71. package/jsx/core/Dialog/FormDialog.mocks.d.ts +3 -3
  72. package/jsx/core/Dialog/FormDialog.mocks.d.ts.map +1 -1
  73. package/jsx/core/Dialog/FormDialog.mocks.jsx.map +1 -1
  74. package/jsx/core/Dialog/InfoDialog.mocks.d.ts +2 -2
  75. package/jsx/core/Dialog/InfoDialog.mocks.d.ts.map +1 -1
  76. package/jsx/core/Dialog/InfoDialog.mocks.jsx.map +1 -1
  77. package/jsx/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -1
  78. package/jsx/core/FieldGroup/FieldGroup.stories.jsx +6 -2
  79. package/jsx/core/FieldGroup/FieldGroup.stories.jsx.map +1 -1
  80. package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts +4 -4
  81. package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -1
  82. package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +1 -1
  83. package/jsx/core/FieldValueList/FieldValueList.mocks.d.ts +1 -1
  84. package/jsx/core/File/FileDisplay.stories.d.ts.map +1 -1
  85. package/jsx/core/File/FileDisplay.stories.jsx +3 -1
  86. package/jsx/core/File/FileDisplay.stories.jsx.map +1 -1
  87. package/jsx/core/File/FileInput.stories.d.ts +1 -0
  88. package/jsx/core/File/FileInput.stories.d.ts.map +1 -1
  89. package/jsx/core/File/FileInput.stories.jsx +33 -6
  90. package/jsx/core/File/FileInput.stories.jsx.map +1 -1
  91. package/jsx/{work/CaseView → core/File}/FileService.mock.d.ts +2 -2
  92. package/jsx/core/File/FileService.mock.d.ts.map +1 -0
  93. package/jsx/core/File/FileService.mock.jsx.map +1 -0
  94. package/jsx/core/File/MockFileInput.d.ts +6 -0
  95. package/jsx/core/File/MockFileInput.d.ts.map +1 -0
  96. package/jsx/core/File/MockFileInput.jsx +24 -0
  97. package/jsx/core/File/MockFileInput.jsx.map +1 -0
  98. package/jsx/core/Form/Form.mocks.d.ts +2 -2
  99. package/jsx/core/Form/Form.mocks.d.ts.map +1 -1
  100. package/jsx/core/Form/Form.mocks.jsx +64 -14
  101. package/jsx/core/Form/Form.mocks.jsx.map +1 -1
  102. package/jsx/core/Icon/Icon.mocks.d.ts +24 -1
  103. package/jsx/core/Icon/Icon.mocks.d.ts.map +1 -1
  104. package/jsx/core/Icon/Icon.mocks.jsx +23 -0
  105. package/jsx/core/Icon/Icon.mocks.jsx.map +1 -1
  106. package/jsx/core/Icon/Icon.stories.d.ts +11 -1
  107. package/jsx/core/Icon/Icon.stories.d.ts.map +1 -1
  108. package/jsx/core/Icon/Icon.stories.jsx +41 -7
  109. package/jsx/core/Icon/Icon.stories.jsx.map +1 -1
  110. package/jsx/core/Input/Input.stories.d.ts.map +1 -1
  111. package/jsx/core/Input/Input.stories.jsx +0 -1
  112. package/jsx/core/Input/Input.stories.jsx.map +1 -1
  113. package/jsx/core/Lightbox/Lightbox.stories.jsx.map +1 -1
  114. package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts +5 -5
  115. package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts.map +1 -1
  116. package/jsx/core/ListToolbar/ListToolbar.mocks.jsx.map +1 -1
  117. package/jsx/core/ListToolbar/ListToolbar.stories.d.ts +5 -2
  118. package/jsx/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -1
  119. package/jsx/core/ListToolbar/ListToolbar.stories.jsx +45 -7
  120. package/jsx/core/ListToolbar/ListToolbar.stories.jsx.map +1 -1
  121. package/jsx/core/LiveLog/LiveLog.mocks.d.ts +1 -1
  122. package/jsx/core/LiveLog/LiveLog.mocks.d.ts.map +1 -1
  123. package/jsx/core/LiveLog/LiveLog.mocks.jsx.map +1 -1
  124. package/jsx/core/Location/Location.stories.d.ts.map +1 -1
  125. package/jsx/core/Location/Location.stories.jsx +0 -1
  126. package/jsx/core/Location/Location.stories.jsx.map +1 -1
  127. package/jsx/core/Menu/Menu.mocks.d.ts +1 -1
  128. package/jsx/core/Menu/Menu.mocks.d.ts.map +1 -1
  129. package/jsx/core/Menu/Menu.mocks.js.map +1 -1
  130. package/jsx/core/Modal/Modal.mocks.d.ts +1 -1
  131. package/jsx/core/Modal/Modal.mocks.d.ts.map +1 -1
  132. package/jsx/core/Modal/Modal.stories.d.ts +1 -0
  133. package/jsx/core/Modal/Modal.stories.d.ts.map +1 -1
  134. package/jsx/core/Modal/Modal.stories.jsx +20 -3
  135. package/jsx/core/Modal/Modal.stories.jsx.map +1 -1
  136. package/jsx/core/MultiStepForm/MultiStepForm.mocks.d.ts +7 -7
  137. package/jsx/core/MultiStepForm/MultiStepForm.mocks.d.ts.map +1 -1
  138. package/jsx/core/MultiStepForm/MultiStepForm.mocks.jsx.map +1 -1
  139. package/jsx/core/MultiStepForm/MultiStepForm.stories.d.ts +1 -1
  140. package/jsx/core/MultiStepForm/MultiStepForm.stories.d.ts.map +1 -1
  141. package/jsx/core/MultiStepForm/MultiStepForm.stories.jsx.map +1 -1
  142. package/jsx/core/Number/Number.stories.d.ts.map +1 -1
  143. package/jsx/core/Number/Number.stories.jsx +6 -2
  144. package/jsx/core/Number/Number.stories.jsx.map +1 -1
  145. package/jsx/core/PageTemplates/PageTemplates.mocks.d.ts +1 -1
  146. package/jsx/core/PageTemplates/PageTemplates.mocks.d.ts.map +1 -1
  147. package/jsx/core/PageTemplates/PageTemplates.mocks.js.map +1 -1
  148. package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  149. package/jsx/core/PageTemplates/PageTemplates.stories.jsx +1 -1
  150. package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
  151. package/jsx/core/Phone/Phone.stories.d.ts.map +1 -1
  152. package/jsx/core/Phone/Phone.stories.jsx +0 -1
  153. package/jsx/core/Phone/Phone.stories.jsx.map +1 -1
  154. package/jsx/core/Popover/Popover.mocks.d.ts +2 -2
  155. package/jsx/core/Popover/Popover.mocks.d.ts.map +1 -1
  156. package/jsx/core/Popover/Popover.mocks.jsx.map +1 -1
  157. package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
  158. package/jsx/core/RadioButton/RadioButton.stories.jsx +0 -3
  159. package/jsx/core/RadioButton/RadioButton.stories.jsx.map +1 -1
  160. package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +1 -1
  161. package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.jsx +4 -10
  162. package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.jsx.map +1 -1
  163. package/jsx/core/Select/Select.stories.d.ts.map +1 -1
  164. package/jsx/core/Select/Select.stories.jsx +0 -1
  165. package/jsx/core/Select/Select.stories.jsx.map +1 -1
  166. package/jsx/core/Slider/Slider.stories.d.ts +1 -0
  167. package/jsx/core/Slider/Slider.stories.d.ts.map +1 -1
  168. package/jsx/core/Slider/Slider.stories.jsx +24 -4
  169. package/jsx/core/Slider/Slider.stories.jsx.map +1 -1
  170. package/jsx/core/SummaryList/SummaryList.mocks.d.ts +2 -2
  171. package/jsx/core/SummaryList/SummaryList.mocks.d.ts.map +1 -1
  172. package/jsx/core/SummaryList/SummaryList.mocks.jsx.map +1 -1
  173. package/jsx/core/Table/Table.mocks.d.ts +1 -1
  174. package/jsx/core/TextArea/TextArea.stories.d.ts.map +1 -1
  175. package/jsx/core/TextArea/TextArea.stories.jsx +0 -1
  176. package/jsx/core/TextArea/TextArea.stories.jsx.map +1 -1
  177. package/jsx/core/Tree/Tree.mocks.js.map +1 -1
  178. package/jsx/dnd/DragDropList/DragDropList.mocks.d.ts +3 -3
  179. package/jsx/dnd/DragDropList/DragDropList.mocks.d.ts.map +1 -1
  180. package/jsx/dnd/DragDropList/DragDropList.mocks.jsx.map +1 -1
  181. package/jsx/dnd/StandardDragDropList/Demo.d.ts +1 -1
  182. package/jsx/dnd/StandardDragDropList/Demo.d.ts.map +1 -1
  183. package/jsx/dnd/StandardDragDropList/Demo.jsx.map +1 -1
  184. package/jsx/dnd/StandardDragDropList/GroupConfig.d.ts +2 -2
  185. package/jsx/dnd/StandardDragDropList/GroupConfig.d.ts.map +1 -1
  186. package/jsx/dnd/StandardDragDropList/GroupConfig.jsx.map +1 -1
  187. package/jsx/dnd/StandardDragDropList/ItemConfig.d.ts +3 -3
  188. package/jsx/dnd/StandardDragDropList/ItemConfig.d.ts.map +1 -1
  189. package/jsx/dnd/StandardDragDropList/ItemConfig.jsx.map +1 -1
  190. package/jsx/dnd/StandardDragDropList/Popover.d.ts +3 -3
  191. package/jsx/dnd/StandardDragDropList/Popover.d.ts.map +1 -1
  192. package/jsx/dnd/StandardDragDropList/Popover.jsx.map +1 -1
  193. package/jsx/dnd/StandardDragDropList/SelectionMenu.d.ts +4 -4
  194. package/jsx/dnd/StandardDragDropList/SelectionMenu.d.ts.map +1 -1
  195. package/jsx/dnd/StandardDragDropList/SelectionMenu.jsx.map +1 -1
  196. package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.d.ts +2 -2
  197. package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -1
  198. package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.jsx.map +1 -1
  199. package/jsx/rte/DynamicContentEditor/FieldSelector.d.ts +3 -3
  200. package/jsx/rte/DynamicContentEditor/FieldSelector.d.ts.map +1 -1
  201. package/jsx/rte/DynamicContentEditor/FieldSelector.jsx.map +1 -1
  202. package/jsx/rte/Editor/Editor.mocks.d.ts +7 -1
  203. package/jsx/rte/Editor/Editor.mocks.d.ts.map +1 -1
  204. package/jsx/rte/Editor/Editor.mocks.jsx +0 -1
  205. package/jsx/rte/Editor/Editor.mocks.jsx.map +1 -1
  206. package/jsx/rte/Editor/Editor.stories.d.ts +5 -1
  207. package/jsx/rte/Editor/Editor.stories.d.ts.map +1 -1
  208. package/jsx/rte/Editor/Editor.stories.jsx +54 -9
  209. package/jsx/rte/Editor/Editor.stories.jsx.map +1 -1
  210. package/jsx/rte/RichTextEditor/RichTextEditor.mocks.d.ts +1 -1
  211. package/jsx/rte/RichTextEditor/RichTextEditor.mocks.d.ts.map +1 -1
  212. package/jsx/rte/RichTextEditor/RichTextEditor.mocks.jsx.map +1 -1
  213. package/jsx/social/Chat/Chat.mocks.d.ts +5 -17
  214. package/jsx/social/Chat/Chat.mocks.d.ts.map +1 -1
  215. package/jsx/social/Chat/Chat.mocks.js +1 -21
  216. package/jsx/social/Chat/Chat.mocks.js.map +1 -1
  217. package/jsx/social/Chat/Chat.stories.d.ts +4 -0
  218. package/jsx/social/Chat/Chat.stories.d.ts.map +1 -1
  219. package/jsx/social/Chat/Chat.stories.jsx +100 -42
  220. package/jsx/social/Chat/Chat.stories.jsx.map +1 -1
  221. package/jsx/social/Email/Email.mocks.d.ts +6 -6
  222. package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
  223. package/jsx/social/Email/Email.mocks.jsx.map +1 -1
  224. package/jsx/social/Email/Email.stories.d.ts +4 -0
  225. package/jsx/social/Email/Email.stories.d.ts.map +1 -1
  226. package/jsx/social/Email/Email.stories.jsx +48 -21
  227. package/jsx/social/Email/Email.stories.jsx.map +1 -1
  228. package/jsx/social/Feed/Feed.mocks.d.ts +6 -6
  229. package/jsx/social/Feed/Feed.mocks.d.ts.map +1 -1
  230. package/jsx/social/Feed/Feed.mocks.jsx +24 -0
  231. package/jsx/social/Feed/Feed.mocks.jsx.map +1 -1
  232. package/jsx/social/Feed/Feed.stories.d.ts.map +1 -1
  233. package/jsx/social/Feed/Feed.stories.jsx +70 -16
  234. package/jsx/social/Feed/Feed.stories.jsx.map +1 -1
  235. package/jsx/social/Feed/FeedNewPost.mocks.d.ts +2 -2
  236. package/jsx/social/Feed/FeedNewPost.mocks.d.ts.map +1 -1
  237. package/jsx/social/Feed/FeedNewPost.mocks.jsx.map +1 -1
  238. package/jsx/social/Feed/FeedPost.mocks.d.ts +1 -1
  239. package/jsx/social/Feed/FeedPost.mocks.d.ts.map +1 -1
  240. package/jsx/social/Feed/FeedPost.mocks.jsx +32 -17
  241. package/jsx/social/Feed/FeedPost.mocks.jsx.map +1 -1
  242. package/jsx/social/Feed/FeedReply.mocks.d.ts +1 -1
  243. package/jsx/social/Feed/FeedReply.mocks.d.ts.map +1 -1
  244. package/jsx/social/Feed/FeedReply.mocks.jsx +24 -17
  245. package/jsx/social/Feed/FeedReply.mocks.jsx.map +1 -1
  246. package/jsx/work/Article/Article.mocks.d.ts +4 -0
  247. package/jsx/work/Article/Article.mocks.d.ts.map +1 -1
  248. package/jsx/work/Article/Article.mocks.js +7 -3
  249. package/jsx/work/Article/Article.mocks.js.map +1 -1
  250. package/jsx/work/Article/Article.stories.d.ts +1 -0
  251. package/jsx/work/Article/Article.stories.d.ts.map +1 -1
  252. package/jsx/work/Article/Article.stories.jsx +77 -34
  253. package/jsx/work/Article/Article.stories.jsx.map +1 -1
  254. package/jsx/work/ArticleList/ArticleBuddy.stories.d.ts +11 -0
  255. package/jsx/work/ArticleList/ArticleBuddy.stories.d.ts.map +1 -0
  256. package/jsx/work/ArticleList/ArticleBuddy.stories.jsx +62 -0
  257. package/jsx/work/ArticleList/ArticleBuddy.stories.jsx.map +1 -0
  258. package/jsx/work/ArticleList/ArticleList.mocks.d.ts +39 -20
  259. package/jsx/work/ArticleList/ArticleList.mocks.d.ts.map +1 -1
  260. package/jsx/work/ArticleList/ArticleList.mocks.js +164 -78
  261. package/jsx/work/ArticleList/ArticleList.mocks.js.map +1 -1
  262. package/jsx/work/ArticleList/ArticleList.stories.d.ts +1 -0
  263. package/jsx/work/ArticleList/ArticleList.stories.d.ts.map +1 -1
  264. package/jsx/work/ArticleList/ArticleList.stories.jsx +219 -32
  265. package/jsx/work/ArticleList/ArticleList.stories.jsx.map +1 -1
  266. package/jsx/work/CaseView/Attachments.mocks.d.ts +1 -1
  267. package/jsx/work/CaseView/Attachments.mocks.d.ts.map +1 -1
  268. package/jsx/work/CaseView/Attachments.mocks.jsx +1 -1
  269. package/jsx/work/CaseView/Attachments.mocks.jsx.map +1 -1
  270. package/jsx/work/CaseView/CaseView.mocks.d.ts +25 -15
  271. package/jsx/work/CaseView/CaseView.mocks.d.ts.map +1 -1
  272. package/jsx/work/CaseView/CaseView.mocks.jsx +69 -14
  273. package/jsx/work/CaseView/CaseView.mocks.jsx.map +1 -1
  274. package/jsx/work/CaseView/CaseView.stories.d.ts +1 -1
  275. package/jsx/work/CaseView/CaseView.stories.d.ts.map +1 -1
  276. package/jsx/work/CaseView/CaseView.stories.jsx +0 -9
  277. package/jsx/work/CaseView/CaseView.stories.jsx.map +1 -1
  278. package/jsx/work/CaseView/Details.mocks.d.ts +1 -1
  279. package/jsx/work/CaseView/Details.mocks.d.ts.map +1 -1
  280. package/jsx/work/CaseView/Pulse.mocks.d.ts +2 -2
  281. package/jsx/work/CaseView/Pulse.mocks.d.ts.map +1 -1
  282. package/jsx/work/CaseView/Pulse.mocks.jsx.map +1 -1
  283. package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts +6 -6
  284. package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts.map +1 -1
  285. package/jsx/work/Details/Details.stories.d.ts +2 -0
  286. package/jsx/work/Details/Details.stories.d.ts.map +1 -1
  287. package/jsx/work/Details/Details.stories.jsx +29 -5
  288. package/jsx/work/Details/Details.stories.jsx.map +1 -1
  289. package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.d.ts +0 -1
  290. package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
  291. package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.jsx +2 -252
  292. package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -1
  293. package/jsx/{cs → work}/InteractionNotification/InteractionNotification.stories.d.ts +1 -0
  294. package/jsx/work/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -0
  295. package/jsx/{cs → work}/InteractionNotification/InteractionNotification.stories.jsx +6 -4
  296. package/jsx/work/InteractionNotification/InteractionNotification.stories.jsx.map +1 -0
  297. package/jsx/work/Predictions/Predictions.mocks.d.ts +1 -1
  298. package/jsx/work/Predictions/Predictions.mocks.d.ts.map +1 -1
  299. package/jsx/work/SearchResults/SearchResults.mocks.d.ts +3 -3
  300. package/jsx/work/SearchResults/SearchResults.mocks.d.ts.map +1 -1
  301. package/jsx/work/SearchResults/SearchResults.mocks.jsx.map +1 -1
  302. package/jsx/work/Stages/Stages.mocks.d.ts +1 -1
  303. package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts +3 -3
  304. package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -1
  305. package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +1 -1
  306. package/jsx/work/Timeline/Timeline.mocks.d.ts +1 -1
  307. package/jsx/work/Timeline/Timeline.mocks.d.ts.map +1 -1
  308. package/jsx/work/Timeline/Timeline.mocks.jsx.map +1 -1
  309. package/jsx/wss/AppShell/AppShell.mocks.d.ts +3 -3
  310. package/jsx/wss/AppShell/AppShell.mocks.d.ts.map +1 -1
  311. package/jsx/wss/CaseView/CaseView.mocks.d.ts +1 -1
  312. package/jsx/wss/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  313. package/jsx/wss/PageTemplates/PageTemplates.stories.jsx +4 -11
  314. package/jsx/wss/PageTemplates/PageTemplates.stories.jsx.map +1 -1
  315. package/jsx/wss/QuickCreate/QuickCreate.stories.d.ts +4 -3
  316. package/jsx/wss/QuickCreate/QuickCreate.stories.d.ts.map +1 -1
  317. package/jsx/wss/QuickCreate/QuickCreate.stories.jsx +11 -20
  318. package/jsx/wss/QuickCreate/QuickCreate.stories.jsx.map +1 -1
  319. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts +1 -1
  320. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts.map +1 -1
  321. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js.map +1 -1
  322. package/lib/condition-builder/ConditionBuilder/props.mock.d.ts +1 -1
  323. package/lib/condition-builder/ConditionBuilder/props.mock.d.ts.map +1 -1
  324. package/lib/condition-builder/ConditionBuilder/props.mock.js.map +1 -1
  325. package/lib/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts +1 -1
  326. package/lib/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts.map +1 -1
  327. package/lib/condition-builder/PromotedFilters/PromotedFilters.mocks.js.map +1 -1
  328. package/lib/core/AIButton/AIButton.mocks.d.ts +1 -1
  329. package/lib/core/AIButton/AIButton.mocks.d.ts.map +1 -1
  330. package/lib/core/AIButton/AIButton.mocks.js.map +1 -1
  331. package/lib/core/AdditionalInfo/AdditionalInfo.stories.d.ts +2 -2
  332. package/lib/core/AdditionalInfo/AdditionalInfo.stories.d.ts.map +1 -1
  333. package/lib/core/AdditionalInfo/AdditionalInfo.stories.js +1 -1
  334. package/lib/core/AdditionalInfo/AdditionalInfo.stories.js.map +1 -1
  335. package/lib/core/AppShell/AppShell.mocks.d.ts +1 -1
  336. package/lib/core/AppShell/AppShell.mocks.d.ts.map +1 -1
  337. package/lib/core/AppShell/AppShell.mocks.js.map +1 -1
  338. package/lib/core/Avatar/Avatar.stories.d.ts.map +1 -1
  339. package/lib/core/Avatar/Avatar.stories.js +1 -2
  340. package/lib/core/Avatar/Avatar.stories.js.map +1 -1
  341. package/lib/core/Badges/Status.stories.js +2 -2
  342. package/lib/core/Badges/Status.stories.js.map +1 -1
  343. package/lib/core/Breadcrumbs/Breadcrumbs.mocks.d.ts +2 -0
  344. package/lib/core/Breadcrumbs/Breadcrumbs.mocks.d.ts.map +1 -0
  345. package/lib/core/Breadcrumbs/Breadcrumbs.mocks.js +8 -0
  346. package/lib/core/Breadcrumbs/Breadcrumbs.mocks.js.map +1 -0
  347. package/lib/core/Breadcrumbs/Breadcrumbs.stories.d.ts +2 -1
  348. package/lib/core/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -1
  349. package/lib/core/Breadcrumbs/Breadcrumbs.stories.js +39 -11
  350. package/lib/core/Breadcrumbs/Breadcrumbs.stories.js.map +1 -1
  351. package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
  352. package/lib/core/Checkbox/Checkbox.stories.js +0 -3
  353. package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
  354. package/lib/core/CheckboxGroup/CheckboxGroup.stories.d.ts.map +1 -1
  355. package/lib/core/CheckboxGroup/CheckboxGroup.stories.js +4 -10
  356. package/lib/core/CheckboxGroup/CheckboxGroup.stories.js.map +1 -1
  357. package/lib/core/ColorPicker/ColorPicker.stories.js +1 -2
  358. package/lib/core/ColorPicker/ColorPicker.stories.js.map +1 -1
  359. package/lib/core/ComboBox/ComboBox.mocks.d.ts +3 -1
  360. package/lib/core/ComboBox/ComboBox.mocks.d.ts.map +1 -1
  361. package/lib/core/ComboBox/ComboBox.mocks.js +3 -0
  362. package/lib/core/ComboBox/ComboBox.mocks.js.map +1 -1
  363. package/lib/core/ComboBox/ComboBox.stories.d.ts +1 -0
  364. package/lib/core/ComboBox/ComboBox.stories.d.ts.map +1 -1
  365. package/lib/core/ComboBox/ComboBox.stories.js +15 -13
  366. package/lib/core/ComboBox/ComboBox.stories.js.map +1 -1
  367. package/lib/core/CompositeInput/CompositeInput.mocks.d.ts +1 -1
  368. package/lib/core/CompositeInput/CompositeInput.mocks.d.ts.map +1 -1
  369. package/lib/core/CompositeInput/CompositeInput.mocks.js.map +1 -1
  370. package/lib/core/CompositeInput/CompositeInput.stories.d.ts.map +1 -1
  371. package/lib/core/CompositeInput/CompositeInput.stories.js +1 -3
  372. package/lib/core/CompositeInput/CompositeInput.stories.js.map +1 -1
  373. package/lib/core/CreditCard/CreditCard.stories.d.ts.map +1 -1
  374. package/lib/core/CreditCard/CreditCard.stories.js +0 -1
  375. package/lib/core/CreditCard/CreditCard.stories.js.map +1 -1
  376. package/lib/core/Currency/Currency.stories.d.ts.map +1 -1
  377. package/lib/core/Currency/Currency.stories.js +0 -1
  378. package/lib/core/Currency/Currency.stories.js.map +1 -1
  379. package/lib/core/DateTime/DateTime.stories.d.ts.map +1 -1
  380. package/lib/core/DateTime/DateTime.stories.js +0 -10
  381. package/lib/core/DateTime/DateTime.stories.js.map +1 -1
  382. package/lib/core/DateTime/DateTimeDisplay.stories.d.ts.map +1 -1
  383. package/lib/core/DateTime/DateTimeDisplay.stories.js +10 -5
  384. package/lib/core/DateTime/DateTimeDisplay.stories.js.map +1 -1
  385. package/lib/core/Dialog/FormDialog.mocks.d.ts +1 -1
  386. package/lib/core/Dialog/FormDialog.mocks.d.ts.map +1 -1
  387. package/lib/core/Dialog/FormDialog.mocks.js.map +1 -1
  388. package/lib/core/Dialog/InfoDialog.mocks.d.ts.map +1 -1
  389. package/lib/core/Dialog/InfoDialog.mocks.js.map +1 -1
  390. package/lib/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -1
  391. package/lib/core/FieldGroup/FieldGroup.stories.js +6 -2
  392. package/lib/core/FieldGroup/FieldGroup.stories.js.map +1 -1
  393. package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts +1 -1
  394. package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -1
  395. package/lib/core/FieldGroup/FieldGroupList.mocks.js.map +1 -1
  396. package/lib/core/File/FileDisplay.stories.d.ts.map +1 -1
  397. package/lib/core/File/FileDisplay.stories.js +3 -1
  398. package/lib/core/File/FileDisplay.stories.js.map +1 -1
  399. package/lib/core/File/FileInput.stories.d.ts +1 -0
  400. package/lib/core/File/FileInput.stories.d.ts.map +1 -1
  401. package/lib/core/File/FileInput.stories.js +20 -7
  402. package/lib/core/File/FileInput.stories.js.map +1 -1
  403. package/lib/{work/CaseView → core/File}/FileService.mock.d.ts +2 -2
  404. package/lib/core/File/FileService.mock.d.ts.map +1 -0
  405. package/lib/core/File/FileService.mock.js.map +1 -0
  406. package/lib/core/File/MockFileInput.d.ts +6 -0
  407. package/lib/core/File/MockFileInput.d.ts.map +1 -0
  408. package/lib/core/File/MockFileInput.js +25 -0
  409. package/lib/core/File/MockFileInput.js.map +1 -0
  410. package/lib/core/Form/Form.mocks.d.ts.map +1 -1
  411. package/lib/core/Form/Form.mocks.js +48 -3
  412. package/lib/core/Form/Form.mocks.js.map +1 -1
  413. package/lib/core/Icon/Icon.mocks.d.ts +24 -1
  414. package/lib/core/Icon/Icon.mocks.d.ts.map +1 -1
  415. package/lib/core/Icon/Icon.mocks.js +23 -0
  416. package/lib/core/Icon/Icon.mocks.js.map +1 -1
  417. package/lib/core/Icon/Icon.stories.d.ts +11 -1
  418. package/lib/core/Icon/Icon.stories.d.ts.map +1 -1
  419. package/lib/core/Icon/Icon.stories.js +41 -7
  420. package/lib/core/Icon/Icon.stories.js.map +1 -1
  421. package/lib/core/Input/Input.stories.d.ts.map +1 -1
  422. package/lib/core/Input/Input.stories.js +0 -1
  423. package/lib/core/Input/Input.stories.js.map +1 -1
  424. package/lib/core/Lightbox/Lightbox.stories.js.map +1 -1
  425. package/lib/core/ListToolbar/ListToolbar.mocks.d.ts +3 -3
  426. package/lib/core/ListToolbar/ListToolbar.mocks.d.ts.map +1 -1
  427. package/lib/core/ListToolbar/ListToolbar.mocks.js.map +1 -1
  428. package/lib/core/ListToolbar/ListToolbar.stories.d.ts +5 -2
  429. package/lib/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -1
  430. package/lib/core/ListToolbar/ListToolbar.stories.js +32 -8
  431. package/lib/core/ListToolbar/ListToolbar.stories.js.map +1 -1
  432. package/lib/core/LiveLog/LiveLog.mocks.d.ts.map +1 -1
  433. package/lib/core/LiveLog/LiveLog.mocks.js.map +1 -1
  434. package/lib/core/Location/Location.stories.d.ts.map +1 -1
  435. package/lib/core/Location/Location.stories.js +0 -1
  436. package/lib/core/Location/Location.stories.js.map +1 -1
  437. package/lib/core/Menu/Menu.mocks.d.ts +1 -1
  438. package/lib/core/Menu/Menu.mocks.d.ts.map +1 -1
  439. package/lib/core/Menu/Menu.mocks.js.map +1 -1
  440. package/lib/core/Modal/Modal.stories.d.ts +1 -0
  441. package/lib/core/Modal/Modal.stories.d.ts.map +1 -1
  442. package/lib/core/Modal/Modal.stories.js +14 -3
  443. package/lib/core/Modal/Modal.stories.js.map +1 -1
  444. package/lib/core/MultiStepForm/MultiStepForm.mocks.d.ts +2 -2
  445. package/lib/core/MultiStepForm/MultiStepForm.mocks.d.ts.map +1 -1
  446. package/lib/core/MultiStepForm/MultiStepForm.mocks.js.map +1 -1
  447. package/lib/core/MultiStepForm/MultiStepForm.stories.d.ts +1 -1
  448. package/lib/core/MultiStepForm/MultiStepForm.stories.d.ts.map +1 -1
  449. package/lib/core/MultiStepForm/MultiStepForm.stories.js.map +1 -1
  450. package/lib/core/Number/Number.stories.d.ts.map +1 -1
  451. package/lib/core/Number/Number.stories.js +6 -2
  452. package/lib/core/Number/Number.stories.js.map +1 -1
  453. package/lib/core/PageTemplates/PageTemplates.mocks.d.ts +1 -1
  454. package/lib/core/PageTemplates/PageTemplates.mocks.d.ts.map +1 -1
  455. package/lib/core/PageTemplates/PageTemplates.mocks.js.map +1 -1
  456. package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  457. package/lib/core/PageTemplates/PageTemplates.stories.js +1 -1
  458. package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
  459. package/lib/core/Phone/Phone.stories.d.ts.map +1 -1
  460. package/lib/core/Phone/Phone.stories.js +0 -1
  461. package/lib/core/Phone/Phone.stories.js.map +1 -1
  462. package/lib/core/Popover/Popover.mocks.d.ts +1 -1
  463. package/lib/core/Popover/Popover.mocks.d.ts.map +1 -1
  464. package/lib/core/Popover/Popover.mocks.js.map +1 -1
  465. package/lib/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
  466. package/lib/core/RadioButton/RadioButton.stories.js +0 -3
  467. package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
  468. package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +1 -1
  469. package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js +4 -10
  470. package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js.map +1 -1
  471. package/lib/core/Select/Select.stories.d.ts.map +1 -1
  472. package/lib/core/Select/Select.stories.js +0 -1
  473. package/lib/core/Select/Select.stories.js.map +1 -1
  474. package/lib/core/Slider/Slider.stories.d.ts +1 -0
  475. package/lib/core/Slider/Slider.stories.d.ts.map +1 -1
  476. package/lib/core/Slider/Slider.stories.js +11 -5
  477. package/lib/core/Slider/Slider.stories.js.map +1 -1
  478. package/lib/core/SummaryList/SummaryList.mocks.d.ts +2 -2
  479. package/lib/core/SummaryList/SummaryList.mocks.d.ts.map +1 -1
  480. package/lib/core/SummaryList/SummaryList.mocks.js.map +1 -1
  481. package/lib/core/TextArea/TextArea.stories.d.ts.map +1 -1
  482. package/lib/core/TextArea/TextArea.stories.js +0 -1
  483. package/lib/core/TextArea/TextArea.stories.js.map +1 -1
  484. package/lib/core/Tree/Tree.mocks.js.map +1 -1
  485. package/lib/dnd/DragDropList/DragDropList.mocks.d.ts +1 -1
  486. package/lib/dnd/DragDropList/DragDropList.mocks.d.ts.map +1 -1
  487. package/lib/dnd/DragDropList/DragDropList.mocks.js.map +1 -1
  488. package/lib/dnd/StandardDragDropList/Demo.d.ts +1 -1
  489. package/lib/dnd/StandardDragDropList/Demo.d.ts.map +1 -1
  490. package/lib/dnd/StandardDragDropList/Demo.js.map +1 -1
  491. package/lib/dnd/StandardDragDropList/GroupConfig.d.ts +1 -1
  492. package/lib/dnd/StandardDragDropList/GroupConfig.d.ts.map +1 -1
  493. package/lib/dnd/StandardDragDropList/GroupConfig.js.map +1 -1
  494. package/lib/dnd/StandardDragDropList/ItemConfig.d.ts +2 -2
  495. package/lib/dnd/StandardDragDropList/ItemConfig.d.ts.map +1 -1
  496. package/lib/dnd/StandardDragDropList/ItemConfig.js.map +1 -1
  497. package/lib/dnd/StandardDragDropList/Popover.d.ts +2 -2
  498. package/lib/dnd/StandardDragDropList/Popover.d.ts.map +1 -1
  499. package/lib/dnd/StandardDragDropList/Popover.js.map +1 -1
  500. package/lib/dnd/StandardDragDropList/SelectionMenu.d.ts +3 -3
  501. package/lib/dnd/StandardDragDropList/SelectionMenu.d.ts.map +1 -1
  502. package/lib/dnd/StandardDragDropList/SelectionMenu.js.map +1 -1
  503. package/lib/rte/DynamicContentEditor/DynamicContentEditor.stories.d.ts +2 -2
  504. package/lib/rte/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -1
  505. package/lib/rte/DynamicContentEditor/DynamicContentEditor.stories.js.map +1 -1
  506. package/lib/rte/DynamicContentEditor/FieldSelector.d.ts +3 -3
  507. package/lib/rte/DynamicContentEditor/FieldSelector.d.ts.map +1 -1
  508. package/lib/rte/DynamicContentEditor/FieldSelector.js.map +1 -1
  509. package/lib/rte/Editor/Editor.mocks.d.ts +7 -1
  510. package/lib/rte/Editor/Editor.mocks.d.ts.map +1 -1
  511. package/lib/rte/Editor/Editor.mocks.js +0 -1
  512. package/lib/rte/Editor/Editor.mocks.js.map +1 -1
  513. package/lib/rte/Editor/Editor.stories.d.ts +5 -1
  514. package/lib/rte/Editor/Editor.stories.d.ts.map +1 -1
  515. package/lib/rte/Editor/Editor.stories.js +40 -9
  516. package/lib/rte/Editor/Editor.stories.js.map +1 -1
  517. package/lib/rte/RichTextEditor/RichTextEditor.mocks.d.ts +1 -1
  518. package/lib/rte/RichTextEditor/RichTextEditor.mocks.d.ts.map +1 -1
  519. package/lib/rte/RichTextEditor/RichTextEditor.mocks.js.map +1 -1
  520. package/lib/social/Chat/Chat.mocks.d.ts +5 -17
  521. package/lib/social/Chat/Chat.mocks.d.ts.map +1 -1
  522. package/lib/social/Chat/Chat.mocks.js +1 -21
  523. package/lib/social/Chat/Chat.mocks.js.map +1 -1
  524. package/lib/social/Chat/Chat.stories.d.ts +4 -0
  525. package/lib/social/Chat/Chat.stories.d.ts.map +1 -1
  526. package/lib/social/Chat/Chat.stories.js +101 -38
  527. package/lib/social/Chat/Chat.stories.js.map +1 -1
  528. package/lib/social/Email/Email.mocks.d.ts +5 -5
  529. package/lib/social/Email/Email.mocks.d.ts.map +1 -1
  530. package/lib/social/Email/Email.mocks.js.map +1 -1
  531. package/lib/social/Email/Email.stories.d.ts +4 -0
  532. package/lib/social/Email/Email.stories.d.ts.map +1 -1
  533. package/lib/social/Email/Email.stories.js +48 -26
  534. package/lib/social/Email/Email.stories.js.map +1 -1
  535. package/lib/social/Feed/Feed.mocks.d.ts +4 -4
  536. package/lib/social/Feed/Feed.mocks.d.ts.map +1 -1
  537. package/lib/social/Feed/Feed.mocks.js +24 -0
  538. package/lib/social/Feed/Feed.mocks.js.map +1 -1
  539. package/lib/social/Feed/Feed.stories.d.ts.map +1 -1
  540. package/lib/social/Feed/Feed.stories.js +70 -16
  541. package/lib/social/Feed/Feed.stories.js.map +1 -1
  542. package/lib/social/Feed/FeedNewPost.mocks.d.ts +1 -1
  543. package/lib/social/Feed/FeedNewPost.mocks.d.ts.map +1 -1
  544. package/lib/social/Feed/FeedNewPost.mocks.js.map +1 -1
  545. package/lib/social/Feed/FeedPost.mocks.d.ts.map +1 -1
  546. package/lib/social/Feed/FeedPost.mocks.js +32 -17
  547. package/lib/social/Feed/FeedPost.mocks.js.map +1 -1
  548. package/lib/social/Feed/FeedReply.mocks.d.ts.map +1 -1
  549. package/lib/social/Feed/FeedReply.mocks.js +23 -16
  550. package/lib/social/Feed/FeedReply.mocks.js.map +1 -1
  551. package/lib/work/Article/Article.mocks.d.ts +4 -0
  552. package/lib/work/Article/Article.mocks.d.ts.map +1 -1
  553. package/lib/work/Article/Article.mocks.js +7 -3
  554. package/lib/work/Article/Article.mocks.js.map +1 -1
  555. package/lib/work/Article/Article.stories.d.ts +1 -0
  556. package/lib/work/Article/Article.stories.d.ts.map +1 -1
  557. package/lib/work/Article/Article.stories.js +78 -34
  558. package/lib/work/Article/Article.stories.js.map +1 -1
  559. package/lib/work/ArticleList/ArticleBuddy.stories.d.ts +11 -0
  560. package/lib/work/ArticleList/ArticleBuddy.stories.d.ts.map +1 -0
  561. package/lib/work/ArticleList/ArticleBuddy.stories.js +63 -0
  562. package/lib/work/ArticleList/ArticleBuddy.stories.js.map +1 -0
  563. package/lib/work/ArticleList/ArticleList.mocks.d.ts +39 -20
  564. package/lib/work/ArticleList/ArticleList.mocks.d.ts.map +1 -1
  565. package/lib/work/ArticleList/ArticleList.mocks.js +164 -78
  566. package/lib/work/ArticleList/ArticleList.mocks.js.map +1 -1
  567. package/lib/work/ArticleList/ArticleList.stories.d.ts +1 -0
  568. package/lib/work/ArticleList/ArticleList.stories.d.ts.map +1 -1
  569. package/lib/work/ArticleList/ArticleList.stories.js +219 -32
  570. package/lib/work/ArticleList/ArticleList.stories.js.map +1 -1
  571. package/lib/work/CaseView/Attachments.mocks.d.ts.map +1 -1
  572. package/lib/work/CaseView/Attachments.mocks.js +1 -1
  573. package/lib/work/CaseView/Attachments.mocks.js.map +1 -1
  574. package/lib/work/CaseView/CaseView.mocks.d.ts +16 -6
  575. package/lib/work/CaseView/CaseView.mocks.d.ts.map +1 -1
  576. package/lib/work/CaseView/CaseView.mocks.js +67 -14
  577. package/lib/work/CaseView/CaseView.mocks.js.map +1 -1
  578. package/lib/work/CaseView/CaseView.stories.d.ts +1 -1
  579. package/lib/work/CaseView/CaseView.stories.d.ts.map +1 -1
  580. package/lib/work/CaseView/CaseView.stories.js +0 -11
  581. package/lib/work/CaseView/CaseView.stories.js.map +1 -1
  582. package/lib/work/CaseView/Pulse.mocks.d.ts +1 -1
  583. package/lib/work/CaseView/Pulse.mocks.d.ts.map +1 -1
  584. package/lib/work/CaseView/Pulse.mocks.js.map +1 -1
  585. package/lib/work/Details/Details.stories.d.ts +2 -0
  586. package/lib/work/Details/Details.stories.d.ts.map +1 -1
  587. package/lib/work/Details/Details.stories.js +13 -5
  588. package/lib/work/Details/Details.stories.js.map +1 -1
  589. package/lib/work/IntelligentGuidance/IntelligentGuidance.stories.d.ts +0 -1
  590. package/lib/work/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
  591. package/lib/work/IntelligentGuidance/IntelligentGuidance.stories.js +3 -235
  592. package/lib/work/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -1
  593. package/lib/{cs → work}/InteractionNotification/InteractionNotification.stories.d.ts +1 -0
  594. package/lib/work/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -0
  595. package/lib/{cs → work}/InteractionNotification/InteractionNotification.stories.js +6 -4
  596. package/lib/work/InteractionNotification/InteractionNotification.stories.js.map +1 -0
  597. package/lib/work/SearchResults/SearchResults.mocks.d.ts +3 -3
  598. package/lib/work/SearchResults/SearchResults.mocks.d.ts.map +1 -1
  599. package/lib/work/SearchResults/SearchResults.mocks.js.map +1 -1
  600. package/lib/work/Stakeholders/Stakeholders.mocks.d.ts +2 -2
  601. package/lib/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -1
  602. package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -1
  603. package/lib/work/Timeline/Timeline.mocks.d.ts +1 -1
  604. package/lib/work/Timeline/Timeline.mocks.d.ts.map +1 -1
  605. package/lib/work/Timeline/Timeline.mocks.js.map +1 -1
  606. package/lib/wss/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  607. package/lib/wss/PageTemplates/PageTemplates.stories.js +4 -3
  608. package/lib/wss/PageTemplates/PageTemplates.stories.js.map +1 -1
  609. package/lib/wss/QuickCreate/QuickCreate.stories.d.ts +4 -3
  610. package/lib/wss/QuickCreate/QuickCreate.stories.d.ts.map +1 -1
  611. package/lib/wss/QuickCreate/QuickCreate.stories.js +11 -18
  612. package/lib/wss/QuickCreate/QuickCreate.stories.js.map +1 -1
  613. package/package.json +16 -25
  614. package/jsx/build/AppShell/AppShell.mocks.d.ts +0 -44
  615. package/jsx/build/AppShell/AppShell.mocks.d.ts.map +0 -1
  616. package/jsx/build/AppShell/AppShell.mocks.jsx +0 -419
  617. package/jsx/build/AppShell/AppShell.mocks.jsx.map +0 -1
  618. package/jsx/build/AppShell/AppShell.stories.d.ts +0 -20
  619. package/jsx/build/AppShell/AppShell.stories.d.ts.map +0 -1
  620. package/jsx/build/AppShell/AppShell.stories.jsx +0 -201
  621. package/jsx/build/AppShell/AppShell.stories.jsx.map +0 -1
  622. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts +0 -8
  623. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +0 -1
  624. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.jsx +0 -101
  625. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.jsx.map +0 -1
  626. package/jsx/build/DynamicContentEditor/FieldSelector.d.ts +0 -11
  627. package/jsx/build/DynamicContentEditor/FieldSelector.d.ts.map +0 -1
  628. package/jsx/build/DynamicContentEditor/FieldSelector.jsx +0 -80
  629. package/jsx/build/DynamicContentEditor/FieldSelector.jsx.map +0 -1
  630. package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts +0 -64
  631. package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts.map +0 -1
  632. package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.js +0 -599
  633. package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.js.map +0 -1
  634. package/jsx/build/ExpressionBuilder/ExpressionBuilder.stories.d.ts +0 -29
  635. package/jsx/build/ExpressionBuilder/ExpressionBuilder.stories.d.ts.map +0 -1
  636. package/jsx/build/ExpressionBuilder/ExpressionBuilder.stories.jsx +0 -344
  637. package/jsx/build/ExpressionBuilder/ExpressionBuilder.stories.jsx.map +0 -1
  638. package/jsx/build/FlowModeller/AddNodeUtils.mocks.d.ts +0 -45
  639. package/jsx/build/FlowModeller/AddNodeUtils.mocks.d.ts.map +0 -1
  640. package/jsx/build/FlowModeller/AddNodeUtils.mocks.js +0 -291
  641. package/jsx/build/FlowModeller/AddNodeUtils.mocks.js.map +0 -1
  642. package/jsx/build/FlowModeller/FlowModeller.mocks.d.ts +0 -28
  643. package/jsx/build/FlowModeller/FlowModeller.mocks.d.ts.map +0 -1
  644. package/jsx/build/FlowModeller/FlowModeller.mocks.jsx +0 -559
  645. package/jsx/build/FlowModeller/FlowModeller.mocks.jsx.map +0 -1
  646. package/jsx/build/FlowModeller/FlowModeller.stories.d.ts +0 -11
  647. package/jsx/build/FlowModeller/FlowModeller.stories.d.ts.map +0 -1
  648. package/jsx/build/FlowModeller/FlowModeller.stories.jsx +0 -501
  649. package/jsx/build/FlowModeller/FlowModeller.stories.jsx.map +0 -1
  650. package/jsx/build/FlowModeller/FlowModeller.styles.d.ts +0 -2
  651. package/jsx/build/FlowModeller/FlowModeller.styles.d.ts.map +0 -1
  652. package/jsx/build/FlowModeller/FlowModeller.styles.js +0 -8
  653. package/jsx/build/FlowModeller/FlowModeller.styles.js.map +0 -1
  654. package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts +0 -3
  655. package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +0 -1
  656. package/jsx/build/ItemLibrary/LibraryPicker.mocks.js +0 -45
  657. package/jsx/build/ItemLibrary/LibraryPicker.mocks.js.map +0 -1
  658. package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts +0 -5
  659. package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts.map +0 -1
  660. package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx +0 -44
  661. package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx.map +0 -1
  662. package/jsx/build/LifeCycle/LifeCycle.mocks.d.ts +0 -204
  663. package/jsx/build/LifeCycle/LifeCycle.mocks.d.ts.map +0 -1
  664. package/jsx/build/LifeCycle/LifeCycle.mocks.js +0 -1256
  665. package/jsx/build/LifeCycle/LifeCycle.mocks.js.map +0 -1
  666. package/jsx/build/LifeCycle/LifeCycle.stories.d.ts +0 -11
  667. package/jsx/build/LifeCycle/LifeCycle.stories.d.ts.map +0 -1
  668. package/jsx/build/LifeCycle/LifeCycle.stories.jsx +0 -873
  669. package/jsx/build/LifeCycle/LifeCycle.stories.jsx.map +0 -1
  670. package/jsx/build/LifeCycle/utils.d.ts +0 -123
  671. package/jsx/build/LifeCycle/utils.d.ts.map +0 -1
  672. package/jsx/build/LifeCycle/utils.js +0 -302
  673. package/jsx/build/LifeCycle/utils.js.map +0 -1
  674. package/jsx/build/MobileBuildSummary/MobileBuildSummary.mocks.d.ts +0 -10
  675. package/jsx/build/MobileBuildSummary/MobileBuildSummary.mocks.d.ts.map +0 -1
  676. package/jsx/build/MobileBuildSummary/MobileBuildSummary.mocks.js +0 -20
  677. package/jsx/build/MobileBuildSummary/MobileBuildSummary.mocks.js.map +0 -1
  678. package/jsx/build/MobileBuildSummary/MobileBuildSummary.stories.d.ts +0 -8
  679. package/jsx/build/MobileBuildSummary/MobileBuildSummary.stories.d.ts.map +0 -1
  680. package/jsx/build/MobileBuildSummary/MobileBuildSummary.stories.jsx +0 -38
  681. package/jsx/build/MobileBuildSummary/MobileBuildSummary.stories.jsx.map +0 -1
  682. package/jsx/build/ObjectPreview/ObjectPreview.mocks.d.ts +0 -7
  683. package/jsx/build/ObjectPreview/ObjectPreview.mocks.d.ts.map +0 -1
  684. package/jsx/build/ObjectPreview/ObjectPreview.mocks.jsx +0 -78
  685. package/jsx/build/ObjectPreview/ObjectPreview.mocks.jsx.map +0 -1
  686. package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts +0 -64
  687. package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +0 -1
  688. package/jsx/build/ObjectSelect/ObjectSelect.mocks.jsx +0 -397
  689. package/jsx/build/ObjectSelect/ObjectSelect.mocks.jsx.map +0 -1
  690. package/jsx/build/ObjectSelect/ObjectSelect.stories.d.ts +0 -8
  691. package/jsx/build/ObjectSelect/ObjectSelect.stories.d.ts.map +0 -1
  692. package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx +0 -258
  693. package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx.map +0 -1
  694. package/jsx/build/ObjectSelect/ObjectSelect.styles.d.ts +0 -4
  695. package/jsx/build/ObjectSelect/ObjectSelect.styles.d.ts.map +0 -1
  696. package/jsx/build/ObjectSelect/ObjectSelect.styles.js +0 -27
  697. package/jsx/build/ObjectSelect/ObjectSelect.styles.js.map +0 -1
  698. package/jsx/build/PageBanner/PageBanner.stories.d.ts +0 -15
  699. package/jsx/build/PageBanner/PageBanner.stories.d.ts.map +0 -1
  700. package/jsx/build/PageBanner/PageBanner.stories.jsx +0 -41
  701. package/jsx/build/PageBanner/PageBanner.stories.jsx.map +0 -1
  702. package/jsx/build/PageTemplates/GalleryPage.mocks.d.ts +0 -21
  703. package/jsx/build/PageTemplates/GalleryPage.mocks.d.ts.map +0 -1
  704. package/jsx/build/PageTemplates/GalleryPage.mocks.jsx +0 -24
  705. package/jsx/build/PageTemplates/GalleryPage.mocks.jsx.map +0 -1
  706. package/jsx/build/PageTemplates/GalleryPage.stories.d.ts +0 -16
  707. package/jsx/build/PageTemplates/GalleryPage.stories.d.ts.map +0 -1
  708. package/jsx/build/PageTemplates/GalleryPage.stories.jsx +0 -49
  709. package/jsx/build/PageTemplates/GalleryPage.stories.jsx.map +0 -1
  710. package/jsx/build/PageTemplates/PageTemplates.mocks.d.ts +0 -17
  711. package/jsx/build/PageTemplates/PageTemplates.mocks.d.ts.map +0 -1
  712. package/jsx/build/PageTemplates/PageTemplates.mocks.jsx +0 -144
  713. package/jsx/build/PageTemplates/PageTemplates.mocks.jsx.map +0 -1
  714. package/jsx/build/PageTemplates/PageTemplates.stories.d.ts +0 -21
  715. package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +0 -1
  716. package/jsx/build/PageTemplates/PageTemplates.stories.jsx +0 -255
  717. package/jsx/build/PageTemplates/PageTemplates.stories.jsx.map +0 -1
  718. package/jsx/build/PageTemplates/ShowcasePage.stories.d.ts +0 -17
  719. package/jsx/build/PageTemplates/ShowcasePage.stories.d.ts.map +0 -1
  720. package/jsx/build/PageTemplates/ShowcasePage.stories.jsx +0 -42
  721. package/jsx/build/PageTemplates/ShowcasePage.stories.jsx.map +0 -1
  722. package/jsx/build/Workbench/Workbench.mocks.d.ts +0 -9
  723. package/jsx/build/Workbench/Workbench.mocks.d.ts.map +0 -1
  724. package/jsx/build/Workbench/Workbench.mocks.js +0 -67
  725. package/jsx/build/Workbench/Workbench.mocks.js.map +0 -1
  726. package/jsx/build/Workbench/Workbench.stories.d.ts +0 -11
  727. package/jsx/build/Workbench/Workbench.stories.d.ts.map +0 -1
  728. package/jsx/build/Workbench/Workbench.stories.jsx +0 -288
  729. package/jsx/build/Workbench/Workbench.stories.jsx.map +0 -1
  730. package/jsx/core/ComboBox/ComboBox.mocks.js.map +0 -1
  731. package/jsx/cs/CSAppShell/CSAppShell.mocks.d.ts +0 -90
  732. package/jsx/cs/CSAppShell/CSAppShell.mocks.d.ts.map +0 -1
  733. package/jsx/cs/CSAppShell/CSAppShell.mocks.jsx +0 -432
  734. package/jsx/cs/CSAppShell/CSAppShell.mocks.jsx.map +0 -1
  735. package/jsx/cs/CSAppShell/CSAppShell.stories.d.ts +0 -13
  736. package/jsx/cs/CSAppShell/CSAppShell.stories.d.ts.map +0 -1
  737. package/jsx/cs/CSAppShell/CSAppShell.stories.jsx +0 -173
  738. package/jsx/cs/CSAppShell/CSAppShell.stories.jsx.map +0 -1
  739. package/jsx/cs/CallControlPanel/CallControlPanel.mocks.d.ts +0 -21
  740. package/jsx/cs/CallControlPanel/CallControlPanel.mocks.d.ts.map +0 -1
  741. package/jsx/cs/CallControlPanel/CallControlPanel.mocks.js +0 -252
  742. package/jsx/cs/CallControlPanel/CallControlPanel.mocks.js.map +0 -1
  743. package/jsx/cs/CallControlPanel/CallControlPanel.stories.d.ts +0 -17
  744. package/jsx/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +0 -1
  745. package/jsx/cs/CallControlPanel/CallControlPanel.stories.jsx +0 -330
  746. package/jsx/cs/CallControlPanel/CallControlPanel.stories.jsx.map +0 -1
  747. package/jsx/cs/DialPad/DialPad.stories.d.ts +0 -9
  748. package/jsx/cs/DialPad/DialPad.stories.d.ts.map +0 -1
  749. package/jsx/cs/DialPad/DialPad.stories.jsx +0 -20
  750. package/jsx/cs/DialPad/DialPad.stories.jsx.map +0 -1
  751. package/jsx/cs/DialPad/DialPadKeyboardData.mock.d.ts +0 -11
  752. package/jsx/cs/DialPad/DialPadKeyboardData.mock.d.ts.map +0 -1
  753. package/jsx/cs/DialPad/DialPadKeyboardData.mock.js +0 -20
  754. package/jsx/cs/DialPad/DialPadKeyboardData.mock.js.map +0 -1
  755. package/jsx/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +0 -1
  756. package/jsx/cs/InteractionNotification/InteractionNotification.stories.jsx.map +0 -1
  757. package/jsx/cs/InteractionTimer/InteractionTimer.mocks.d.ts +0 -11
  758. package/jsx/cs/InteractionTimer/InteractionTimer.mocks.d.ts.map +0 -1
  759. package/jsx/cs/InteractionTimer/InteractionTimer.mocks.js +0 -29
  760. package/jsx/cs/InteractionTimer/InteractionTimer.mocks.js.map +0 -1
  761. package/jsx/cs/InteractionTimer/InteractionTimer.stories.d.ts +0 -11
  762. package/jsx/cs/InteractionTimer/InteractionTimer.stories.d.ts.map +0 -1
  763. package/jsx/cs/InteractionTimer/InteractionTimer.stories.jsx +0 -87
  764. package/jsx/cs/InteractionTimer/InteractionTimer.stories.jsx.map +0 -1
  765. package/jsx/cs/Picker/Picker.stories.d.ts +0 -11
  766. package/jsx/cs/Picker/Picker.stories.d.ts.map +0 -1
  767. package/jsx/cs/Picker/Picker.stories.jsx +0 -64
  768. package/jsx/cs/Picker/Picker.stories.jsx.map +0 -1
  769. package/jsx/cs/TaskManager/TaskManager.mocks.d.ts +0 -30
  770. package/jsx/cs/TaskManager/TaskManager.mocks.d.ts.map +0 -1
  771. package/jsx/cs/TaskManager/TaskManager.mocks.js +0 -228
  772. package/jsx/cs/TaskManager/TaskManager.mocks.js.map +0 -1
  773. package/jsx/cs/TaskManager/TaskManager.stories.d.ts +0 -15
  774. package/jsx/cs/TaskManager/TaskManager.stories.d.ts.map +0 -1
  775. package/jsx/cs/TaskManager/TaskManager.stories.jsx +0 -420
  776. package/jsx/cs/TaskManager/TaskManager.stories.jsx.map +0 -1
  777. package/jsx/cs/TaskManager/TaskManager.styles.d.ts +0 -3
  778. package/jsx/cs/TaskManager/TaskManager.styles.d.ts.map +0 -1
  779. package/jsx/cs/TaskManager/TaskManager.styles.js +0 -9
  780. package/jsx/cs/TaskManager/TaskManager.styles.js.map +0 -1
  781. package/jsx/tools/Clipboard/Clipboard.mocks.d.ts +0 -6
  782. package/jsx/tools/Clipboard/Clipboard.mocks.d.ts.map +0 -1
  783. package/jsx/tools/Clipboard/Clipboard.mocks.jsx +0 -81
  784. package/jsx/tools/Clipboard/Clipboard.mocks.jsx.map +0 -1
  785. package/jsx/tools/Clipboard/Clipboard.stories.d.ts +0 -6
  786. package/jsx/tools/Clipboard/Clipboard.stories.d.ts.map +0 -1
  787. package/jsx/tools/Clipboard/Clipboard.stories.jsx +0 -67
  788. package/jsx/tools/Clipboard/Clipboard.stories.jsx.map +0 -1
  789. package/jsx/tools/DevTools/DevTools.mocks.d.ts +0 -3
  790. package/jsx/tools/DevTools/DevTools.mocks.d.ts.map +0 -1
  791. package/jsx/tools/DevTools/DevTools.mocks.js +0 -3
  792. package/jsx/tools/DevTools/DevTools.mocks.js.map +0 -1
  793. package/jsx/tools/DevTools/DevTools.stories.d.ts +0 -10
  794. package/jsx/tools/DevTools/DevTools.stories.d.ts.map +0 -1
  795. package/jsx/tools/DevTools/DevTools.stories.jsx +0 -33
  796. package/jsx/tools/DevTools/DevTools.stories.jsx.map +0 -1
  797. package/jsx/tools/PreviewShell/PreviewShell.mocks.d.ts +0 -20
  798. package/jsx/tools/PreviewShell/PreviewShell.mocks.d.ts.map +0 -1
  799. package/jsx/tools/PreviewShell/PreviewShell.mocks.jsx +0 -80
  800. package/jsx/tools/PreviewShell/PreviewShell.mocks.jsx.map +0 -1
  801. package/jsx/tools/PreviewShell/PreviewShell.stories.d.ts +0 -20
  802. package/jsx/tools/PreviewShell/PreviewShell.stories.d.ts.map +0 -1
  803. package/jsx/tools/PreviewShell/PreviewShell.stories.jsx +0 -184
  804. package/jsx/tools/PreviewShell/PreviewShell.stories.jsx.map +0 -1
  805. package/jsx/tools/PreviewShell/PreviewShell.styles.d.ts +0 -2
  806. package/jsx/tools/PreviewShell/PreviewShell.styles.d.ts.map +0 -1
  807. package/jsx/tools/PreviewShell/PreviewShell.styles.js +0 -6
  808. package/jsx/tools/PreviewShell/PreviewShell.styles.js.map +0 -1
  809. package/jsx/work/CaseView/FileService.mock.d.ts.map +0 -1
  810. package/jsx/work/CaseView/FileService.mock.jsx.map +0 -1
  811. package/lib/build/AppShell/AppShell.mocks.d.ts +0 -44
  812. package/lib/build/AppShell/AppShell.mocks.d.ts.map +0 -1
  813. package/lib/build/AppShell/AppShell.mocks.js +0 -419
  814. package/lib/build/AppShell/AppShell.mocks.js.map +0 -1
  815. package/lib/build/AppShell/AppShell.stories.d.ts +0 -20
  816. package/lib/build/AppShell/AppShell.stories.d.ts.map +0 -1
  817. package/lib/build/AppShell/AppShell.stories.js +0 -200
  818. package/lib/build/AppShell/AppShell.stories.js.map +0 -1
  819. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts +0 -8
  820. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +0 -1
  821. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js +0 -85
  822. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js.map +0 -1
  823. package/lib/build/DynamicContentEditor/FieldSelector.d.ts +0 -14
  824. package/lib/build/DynamicContentEditor/FieldSelector.d.ts.map +0 -1
  825. package/lib/build/DynamicContentEditor/FieldSelector.js +0 -81
  826. package/lib/build/DynamicContentEditor/FieldSelector.js.map +0 -1
  827. package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts +0 -64
  828. package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts.map +0 -1
  829. package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.js +0 -599
  830. package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.js.map +0 -1
  831. package/lib/build/ExpressionBuilder/ExpressionBuilder.stories.d.ts +0 -29
  832. package/lib/build/ExpressionBuilder/ExpressionBuilder.stories.d.ts.map +0 -1
  833. package/lib/build/ExpressionBuilder/ExpressionBuilder.stories.js +0 -339
  834. package/lib/build/ExpressionBuilder/ExpressionBuilder.stories.js.map +0 -1
  835. package/lib/build/FlowModeller/AddNodeUtils.mocks.d.ts +0 -45
  836. package/lib/build/FlowModeller/AddNodeUtils.mocks.d.ts.map +0 -1
  837. package/lib/build/FlowModeller/AddNodeUtils.mocks.js +0 -291
  838. package/lib/build/FlowModeller/AddNodeUtils.mocks.js.map +0 -1
  839. package/lib/build/FlowModeller/FlowModeller.mocks.d.ts +0 -28
  840. package/lib/build/FlowModeller/FlowModeller.mocks.d.ts.map +0 -1
  841. package/lib/build/FlowModeller/FlowModeller.mocks.js +0 -536
  842. package/lib/build/FlowModeller/FlowModeller.mocks.js.map +0 -1
  843. package/lib/build/FlowModeller/FlowModeller.stories.d.ts +0 -11
  844. package/lib/build/FlowModeller/FlowModeller.stories.d.ts.map +0 -1
  845. package/lib/build/FlowModeller/FlowModeller.stories.js +0 -481
  846. package/lib/build/FlowModeller/FlowModeller.stories.js.map +0 -1
  847. package/lib/build/FlowModeller/FlowModeller.styles.d.ts +0 -2
  848. package/lib/build/FlowModeller/FlowModeller.styles.d.ts.map +0 -1
  849. package/lib/build/FlowModeller/FlowModeller.styles.js +0 -8
  850. package/lib/build/FlowModeller/FlowModeller.styles.js.map +0 -1
  851. package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts +0 -3
  852. package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +0 -1
  853. package/lib/build/ItemLibrary/LibraryPicker.mocks.js +0 -45
  854. package/lib/build/ItemLibrary/LibraryPicker.mocks.js.map +0 -1
  855. package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts +0 -5
  856. package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts.map +0 -1
  857. package/lib/build/ItemLibrary/LibraryPicker.stories.js +0 -39
  858. package/lib/build/ItemLibrary/LibraryPicker.stories.js.map +0 -1
  859. package/lib/build/LifeCycle/LifeCycle.mocks.d.ts +0 -204
  860. package/lib/build/LifeCycle/LifeCycle.mocks.d.ts.map +0 -1
  861. package/lib/build/LifeCycle/LifeCycle.mocks.js +0 -1256
  862. package/lib/build/LifeCycle/LifeCycle.mocks.js.map +0 -1
  863. package/lib/build/LifeCycle/LifeCycle.stories.d.ts +0 -11
  864. package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +0 -1
  865. package/lib/build/LifeCycle/LifeCycle.stories.js +0 -870
  866. package/lib/build/LifeCycle/LifeCycle.stories.js.map +0 -1
  867. package/lib/build/LifeCycle/utils.d.ts +0 -123
  868. package/lib/build/LifeCycle/utils.d.ts.map +0 -1
  869. package/lib/build/LifeCycle/utils.js +0 -302
  870. package/lib/build/LifeCycle/utils.js.map +0 -1
  871. package/lib/build/MobileBuildSummary/MobileBuildSummary.mocks.d.ts +0 -10
  872. package/lib/build/MobileBuildSummary/MobileBuildSummary.mocks.d.ts.map +0 -1
  873. package/lib/build/MobileBuildSummary/MobileBuildSummary.mocks.js +0 -20
  874. package/lib/build/MobileBuildSummary/MobileBuildSummary.mocks.js.map +0 -1
  875. package/lib/build/MobileBuildSummary/MobileBuildSummary.stories.d.ts +0 -8
  876. package/lib/build/MobileBuildSummary/MobileBuildSummary.stories.d.ts.map +0 -1
  877. package/lib/build/MobileBuildSummary/MobileBuildSummary.stories.js +0 -39
  878. package/lib/build/MobileBuildSummary/MobileBuildSummary.stories.js.map +0 -1
  879. package/lib/build/ObjectPreview/ObjectPreview.mocks.d.ts +0 -7
  880. package/lib/build/ObjectPreview/ObjectPreview.mocks.d.ts.map +0 -1
  881. package/lib/build/ObjectPreview/ObjectPreview.mocks.js +0 -74
  882. package/lib/build/ObjectPreview/ObjectPreview.mocks.js.map +0 -1
  883. package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts +0 -64
  884. package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +0 -1
  885. package/lib/build/ObjectSelect/ObjectSelect.mocks.js +0 -370
  886. package/lib/build/ObjectSelect/ObjectSelect.mocks.js.map +0 -1
  887. package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts +0 -8
  888. package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts.map +0 -1
  889. package/lib/build/ObjectSelect/ObjectSelect.stories.js +0 -240
  890. package/lib/build/ObjectSelect/ObjectSelect.stories.js.map +0 -1
  891. package/lib/build/ObjectSelect/ObjectSelect.styles.d.ts +0 -4
  892. package/lib/build/ObjectSelect/ObjectSelect.styles.d.ts.map +0 -1
  893. package/lib/build/ObjectSelect/ObjectSelect.styles.js +0 -27
  894. package/lib/build/ObjectSelect/ObjectSelect.styles.js.map +0 -1
  895. package/lib/build/PageBanner/PageBanner.stories.d.ts +0 -15
  896. package/lib/build/PageBanner/PageBanner.stories.d.ts.map +0 -1
  897. package/lib/build/PageBanner/PageBanner.stories.js +0 -42
  898. package/lib/build/PageBanner/PageBanner.stories.js.map +0 -1
  899. package/lib/build/PageTemplates/GalleryPage.mocks.d.ts +0 -21
  900. package/lib/build/PageTemplates/GalleryPage.mocks.d.ts.map +0 -1
  901. package/lib/build/PageTemplates/GalleryPage.mocks.js +0 -25
  902. package/lib/build/PageTemplates/GalleryPage.mocks.js.map +0 -1
  903. package/lib/build/PageTemplates/GalleryPage.stories.d.ts +0 -16
  904. package/lib/build/PageTemplates/GalleryPage.stories.d.ts.map +0 -1
  905. package/lib/build/PageTemplates/GalleryPage.stories.js +0 -50
  906. package/lib/build/PageTemplates/GalleryPage.stories.js.map +0 -1
  907. package/lib/build/PageTemplates/PageTemplates.mocks.d.ts +0 -17
  908. package/lib/build/PageTemplates/PageTemplates.mocks.d.ts.map +0 -1
  909. package/lib/build/PageTemplates/PageTemplates.mocks.js +0 -107
  910. package/lib/build/PageTemplates/PageTemplates.mocks.js.map +0 -1
  911. package/lib/build/PageTemplates/PageTemplates.stories.d.ts +0 -21
  912. package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +0 -1
  913. package/lib/build/PageTemplates/PageTemplates.stories.js +0 -246
  914. package/lib/build/PageTemplates/PageTemplates.stories.js.map +0 -1
  915. package/lib/build/PageTemplates/ShowcasePage.stories.d.ts +0 -17
  916. package/lib/build/PageTemplates/ShowcasePage.stories.d.ts.map +0 -1
  917. package/lib/build/PageTemplates/ShowcasePage.stories.js +0 -43
  918. package/lib/build/PageTemplates/ShowcasePage.stories.js.map +0 -1
  919. package/lib/build/Workbench/Workbench.mocks.d.ts +0 -9
  920. package/lib/build/Workbench/Workbench.mocks.d.ts.map +0 -1
  921. package/lib/build/Workbench/Workbench.mocks.js +0 -67
  922. package/lib/build/Workbench/Workbench.mocks.js.map +0 -1
  923. package/lib/build/Workbench/Workbench.stories.d.ts +0 -11
  924. package/lib/build/Workbench/Workbench.stories.d.ts.map +0 -1
  925. package/lib/build/Workbench/Workbench.stories.js +0 -273
  926. package/lib/build/Workbench/Workbench.stories.js.map +0 -1
  927. package/lib/cs/CSAppShell/CSAppShell.mocks.d.ts +0 -90
  928. package/lib/cs/CSAppShell/CSAppShell.mocks.d.ts.map +0 -1
  929. package/lib/cs/CSAppShell/CSAppShell.mocks.js +0 -385
  930. package/lib/cs/CSAppShell/CSAppShell.mocks.js.map +0 -1
  931. package/lib/cs/CSAppShell/CSAppShell.stories.d.ts +0 -13
  932. package/lib/cs/CSAppShell/CSAppShell.stories.d.ts.map +0 -1
  933. package/lib/cs/CSAppShell/CSAppShell.stories.js +0 -172
  934. package/lib/cs/CSAppShell/CSAppShell.stories.js.map +0 -1
  935. package/lib/cs/CallControlPanel/CallControlPanel.mocks.d.ts +0 -21
  936. package/lib/cs/CallControlPanel/CallControlPanel.mocks.d.ts.map +0 -1
  937. package/lib/cs/CallControlPanel/CallControlPanel.mocks.js +0 -252
  938. package/lib/cs/CallControlPanel/CallControlPanel.mocks.js.map +0 -1
  939. package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts +0 -17
  940. package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +0 -1
  941. package/lib/cs/CallControlPanel/CallControlPanel.stories.js +0 -331
  942. package/lib/cs/CallControlPanel/CallControlPanel.stories.js.map +0 -1
  943. package/lib/cs/DialPad/DialPad.stories.d.ts +0 -9
  944. package/lib/cs/DialPad/DialPad.stories.d.ts.map +0 -1
  945. package/lib/cs/DialPad/DialPad.stories.js +0 -19
  946. package/lib/cs/DialPad/DialPad.stories.js.map +0 -1
  947. package/lib/cs/DialPad/DialPadKeyboardData.mock.d.ts +0 -11
  948. package/lib/cs/DialPad/DialPadKeyboardData.mock.d.ts.map +0 -1
  949. package/lib/cs/DialPad/DialPadKeyboardData.mock.js +0 -20
  950. package/lib/cs/DialPad/DialPadKeyboardData.mock.js.map +0 -1
  951. package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +0 -1
  952. package/lib/cs/InteractionNotification/InteractionNotification.stories.js.map +0 -1
  953. package/lib/cs/InteractionTimer/InteractionTimer.mocks.d.ts +0 -11
  954. package/lib/cs/InteractionTimer/InteractionTimer.mocks.d.ts.map +0 -1
  955. package/lib/cs/InteractionTimer/InteractionTimer.mocks.js +0 -29
  956. package/lib/cs/InteractionTimer/InteractionTimer.mocks.js.map +0 -1
  957. package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts +0 -11
  958. package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts.map +0 -1
  959. package/lib/cs/InteractionTimer/InteractionTimer.stories.js +0 -88
  960. package/lib/cs/InteractionTimer/InteractionTimer.stories.js.map +0 -1
  961. package/lib/cs/Picker/Picker.stories.d.ts +0 -11
  962. package/lib/cs/Picker/Picker.stories.d.ts.map +0 -1
  963. package/lib/cs/Picker/Picker.stories.js +0 -56
  964. package/lib/cs/Picker/Picker.stories.js.map +0 -1
  965. package/lib/cs/TaskManager/TaskManager.mocks.d.ts +0 -30
  966. package/lib/cs/TaskManager/TaskManager.mocks.d.ts.map +0 -1
  967. package/lib/cs/TaskManager/TaskManager.mocks.js +0 -228
  968. package/lib/cs/TaskManager/TaskManager.mocks.js.map +0 -1
  969. package/lib/cs/TaskManager/TaskManager.stories.d.ts +0 -15
  970. package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +0 -1
  971. package/lib/cs/TaskManager/TaskManager.stories.js +0 -396
  972. package/lib/cs/TaskManager/TaskManager.stories.js.map +0 -1
  973. package/lib/cs/TaskManager/TaskManager.styles.d.ts +0 -3
  974. package/lib/cs/TaskManager/TaskManager.styles.d.ts.map +0 -1
  975. package/lib/cs/TaskManager/TaskManager.styles.js +0 -9
  976. package/lib/cs/TaskManager/TaskManager.styles.js.map +0 -1
  977. package/lib/tools/Clipboard/Clipboard.mocks.d.ts +0 -6
  978. package/lib/tools/Clipboard/Clipboard.mocks.d.ts.map +0 -1
  979. package/lib/tools/Clipboard/Clipboard.mocks.js +0 -74
  980. package/lib/tools/Clipboard/Clipboard.mocks.js.map +0 -1
  981. package/lib/tools/Clipboard/Clipboard.stories.d.ts +0 -6
  982. package/lib/tools/Clipboard/Clipboard.stories.d.ts.map +0 -1
  983. package/lib/tools/Clipboard/Clipboard.stories.js +0 -74
  984. package/lib/tools/Clipboard/Clipboard.stories.js.map +0 -1
  985. package/lib/tools/DevTools/DevTools.mocks.d.ts +0 -3
  986. package/lib/tools/DevTools/DevTools.mocks.d.ts.map +0 -1
  987. package/lib/tools/DevTools/DevTools.mocks.js +0 -3
  988. package/lib/tools/DevTools/DevTools.mocks.js.map +0 -1
  989. package/lib/tools/DevTools/DevTools.stories.d.ts +0 -10
  990. package/lib/tools/DevTools/DevTools.stories.d.ts.map +0 -1
  991. package/lib/tools/DevTools/DevTools.stories.js +0 -29
  992. package/lib/tools/DevTools/DevTools.stories.js.map +0 -1
  993. package/lib/tools/PreviewShell/PreviewShell.mocks.d.ts +0 -20
  994. package/lib/tools/PreviewShell/PreviewShell.mocks.d.ts.map +0 -1
  995. package/lib/tools/PreviewShell/PreviewShell.mocks.js +0 -77
  996. package/lib/tools/PreviewShell/PreviewShell.mocks.js.map +0 -1
  997. package/lib/tools/PreviewShell/PreviewShell.stories.d.ts +0 -20
  998. package/lib/tools/PreviewShell/PreviewShell.stories.d.ts.map +0 -1
  999. package/lib/tools/PreviewShell/PreviewShell.stories.js +0 -181
  1000. package/lib/tools/PreviewShell/PreviewShell.stories.js.map +0 -1
  1001. package/lib/tools/PreviewShell/PreviewShell.styles.d.ts +0 -2
  1002. package/lib/tools/PreviewShell/PreviewShell.styles.d.ts.map +0 -1
  1003. package/lib/tools/PreviewShell/PreviewShell.styles.js +0 -6
  1004. package/lib/tools/PreviewShell/PreviewShell.styles.js.map +0 -1
  1005. package/lib/work/CaseView/FileService.mock.d.ts.map +0 -1
  1006. package/lib/work/CaseView/FileService.mock.js.map +0 -1
  1007. /package/jsx/{work/CaseView → core/File}/FileService.mock.jsx +0 -0
  1008. /package/lib/{work/CaseView → core/File}/FileService.mock.js +0 -0
@@ -1,6 +1,6 @@
1
1
  import { useState, useCallback } from 'react';
2
- import { Avatar, useUID } from '@pega/cosmos-react-core';
3
- import { FeedReply } from '@pega/cosmos-react-social';
2
+ import { Avatar, useElement, useUID } from '@pega/cosmos-react-core';
3
+ import { AutopilotGlimpse, FeedReply } from '@pega/cosmos-react-social';
4
4
  import { Glimpse } from '@pega/cosmos-react-work';
5
5
  import { feedUserGlimpseDetails } from './Feed.mocks';
6
6
  export const FeedReplyDemo = ({ fullname, username, content, attachments, postTimestamp = new Date(2022, 0, 1), userStatus }) => {
@@ -11,8 +11,8 @@ export const FeedReplyDemo = ({ fullname, username, content, attachments, postTi
11
11
  const [replyContent, setReplyContent] = useState(content);
12
12
  const [edited, setEdited] = useState(false);
13
13
  const [editTimestamp, setEditTimestamp] = useState(new Date());
14
- const [glimpseData, setGlimpseData] = useState();
15
- const [glimpseTarget, setGlimpseTarget] = useState();
14
+ const [glimpseContent, setGlimpseContent] = useState();
15
+ const [glimpseTarget, setGlimpseTarget] = useElement(null);
16
16
  const [additionalLikeAdded, setAdditionalLikeAdded] = useState(false);
17
17
  const getInitialLikes = () => {
18
18
  if (likes.length)
@@ -38,6 +38,24 @@ export const FeedReplyDemo = ({ fullname, username, content, attachments, postTi
38
38
  }, 1000);
39
39
  }
40
40
  }, [likesLoading]);
41
+ const onUserClick = ({ username: glimpseUsername }, clickEvent) => {
42
+ if (clickEvent) {
43
+ setGlimpseTarget(clickEvent.target);
44
+ if (glimpseUsername === 'autopilot') {
45
+ setGlimpseContent(<AutopilotGlimpse target={clickEvent.target} onDismiss={() => {
46
+ setGlimpseTarget(null);
47
+ }} placement='right'/>);
48
+ }
49
+ else {
50
+ const userDetails = feedUserGlimpseDetails.find(x => x.username === glimpseUsername);
51
+ if (userDetails) {
52
+ setGlimpseContent(<Glimpse {...userDetails} target={clickEvent.target} onDismiss={() => {
53
+ setGlimpseTarget(null);
54
+ }} placement='right'/>);
55
+ }
56
+ }
57
+ }
58
+ };
41
59
  return (<>
42
60
  <FeedReply id={key} key={key} postTimestamp={postTimestamp} content={replyContent} attachments={attachments} username={username} fullname={fullname} liked={liked} userStatus={userStatus} likes={likes} likeCount={likeCount >= 10 ? likeCount + 1 : likeCount} maxContentHeight={40} menuItems={[{ primary: 'Custom action', id: 'custom', onClick: () => { } }]} onEditSubmit={({ value }) => {
43
61
  setReplyContent(value);
@@ -58,19 +76,8 @@ export const FeedReplyDemo = ({ fullname, username, content, attachments, postTi
58
76
  setLikeCount(curr => curr + 1);
59
77
  }
60
78
  setLiked(curr => !curr);
61
- }} onLikeCountInteraction={getInitialLikes} onLoadMoreLikes={!additionalLikeAdded ? generateNewLike : undefined} likesLoading={likesLoading} onUserClick={({ username: glimpseUsername }, clickEvent) => {
62
- if (clickEvent) {
63
- setGlimpseTarget(clickEvent.target);
64
- setGlimpseData(curr => {
65
- if (curr)
66
- return undefined;
67
- return feedUserGlimpseDetails.find(x => x.username === glimpseUsername);
68
- });
69
- }
70
- }}/>
71
- {glimpseTarget && glimpseData && (<Glimpse {...glimpseData} target={glimpseTarget} onDismiss={() => {
72
- setGlimpseData(undefined);
73
- }} placement='right'/>)}
79
+ }} onLikeCountInteraction={getInitialLikes} onLoadMoreLikes={!additionalLikeAdded ? generateNewLike : undefined} likesLoading={likesLoading} onUserClick={onUserClick}/>
80
+ {glimpseTarget && glimpseContent}
74
81
  </>);
75
82
  };
76
83
  //# sourceMappingURL=FeedReply.mocks.jsx.map
@@ -1 +1 @@
1
- {"version":3,"file":"FeedReply.mocks.jsx","sourceRoot":"","sources":["../../../src/social/Feed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AC,CAAC;gBAC1C,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;aAChC;YACD,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC,CAAC,CACF,sBAAsB,CAAC,CAAC,eAAe,CAAC,CACxC,eAAe,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,CACpE,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,WAAW,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,EAAE;YACzD,IAAI,UAAU,EAAE;gBACd,gBAAgB,CAAC,UAAU,CAAC,MAAqB,CAAC,CAAC;gBACnD,cAAc,CAAC,IAAI,CAAC,EAAE;oBACpB,IAAI,IAAI;wBAAE,OAAO,SAAS,CAAC;oBAC3B,OAAO,sBAAsB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,eAAe,CAAC,CAAC;gBAC1E,CAAC,CAAC,CAAC;aACJ;QACH,CAAC,CAAC,EAEJ;MAAA,CAAC,aAAa,IAAI,WAAW,IAAI,CAC/B,CAAC,OAAO,CACN,IAAI,WAAW,CAAC,CAChB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,SAAS,CAAC,CAAC,GAAG,EAAE;gBACd,cAAc,CAAC,SAAS,CAAC,CAAC;YAC5B,CAAC,CAAC,CACF,SAAS,CAAC,OAAO,EACjB,CACH,CACH;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useState, useCallback } from 'react';\n\nimport { Avatar, useUID } from '@pega/cosmos-react-core';\nimport type { MenuItemProps } from '@pega/cosmos-react-core';\nimport { FeedReply } from '@pega/cosmos-react-social';\nimport type { FeedReplyProps } from '@pega/cosmos-react-social';\nimport { Glimpse } from '@pega/cosmos-react-work';\n\nimport { feedUserGlimpseDetails } from './Feed.mocks';\nimport type { FeedUserGlimpse } from './Feed.mocks';\n\ninterface FeedReplyDemoProps {\n fullname: FeedReplyProps['fullname'];\n username: FeedReplyProps['username'];\n content: FeedReplyProps['content'];\n attachments?: FeedReplyProps['attachments'];\n postTimestamp?: FeedReplyProps['postTimestamp'];\n userStatus?: FeedReplyProps['userStatus'];\n}\n\nexport const FeedReplyDemo = ({\n fullname,\n username,\n content,\n attachments,\n postTimestamp = new Date(2022, 0, 1),\n userStatus\n}: FeedReplyDemoProps) => {\n const key = useUID();\n const [likes, setLikes] = useState<MenuItemProps[]>([]);\n const [liked, setLiked] = useState(false);\n const [likeCount, setLikeCount] = useState(0);\n const [replyContent, setReplyContent] = useState(content);\n const [edited, setEdited] = useState(false);\n const [editTimestamp, setEditTimestamp] = useState(new Date());\n const [glimpseData, setGlimpseData] = useState<FeedUserGlimpse | undefined>();\n const [glimpseTarget, setGlimpseTarget] = useState<HTMLElement>();\n const [additionalLikeAdded, setAdditionalLikeAdded] = useState(false);\n\n const getInitialLikes = () => {\n if (likes.length) return;\n\n setLikes([]);\n };\n\n const [likesLoading, setLikesLoading] = useState(false);\n\n const generateNewLike = useCallback(() => {\n if (!likesLoading) {\n setLikesLoading(true);\n setTimeout(() => {\n setLikesLoading(false);\n setLikes(oldLikes => [\n ...oldLikes,\n {\n primary: 'Generated Like',\n secondary: ['This like was added after the onLoadMore callback triggered'],\n visual: <Avatar size='l' name='Generated Like' />,\n id: 'generatedLike'\n }\n ]);\n setAdditionalLikeAdded(true);\n }, 1000);\n }\n }, [likesLoading]);\n\n return (\n <>\n <FeedReply\n id={key}\n key={key}\n postTimestamp={postTimestamp}\n content={replyContent}\n attachments={attachments}\n username={username}\n fullname={fullname}\n liked={liked}\n userStatus={userStatus}\n likes={likes}\n likeCount={likeCount >= 10 ? likeCount + 1 : likeCount}\n maxContentHeight={40}\n menuItems={[{ primary: 'Custom action', id: 'custom', onClick: () => {} }]}\n onEditSubmit={({ value }) => {\n setReplyContent(value);\n setEdited(true);\n setEditTimestamp(new Date());\n }}\n edited={edited}\n editTimestamp={editTimestamp}\n onCommentClick={() => {}}\n onLikeClick={({ user }) => {\n const userLikedIndex = likes.findIndex(x => x.id === user.id);\n if (userLikedIndex !== -1) {\n setLikes(oldLikes => {\n const oldLikesArr = [...oldLikes];\n oldLikesArr.splice(userLikedIndex, 1);\n return oldLikesArr;\n });\n setLikeCount(curr => curr - 1);\n } else {\n setLikes(oldLikes => [user, ...oldLikes]);\n setLikeCount(curr => curr + 1);\n }\n setLiked(curr => !curr);\n }}\n onLikeCountInteraction={getInitialLikes}\n onLoadMoreLikes={!additionalLikeAdded ? generateNewLike : undefined}\n likesLoading={likesLoading}\n onUserClick={({ username: glimpseUsername }, clickEvent) => {\n if (clickEvent) {\n setGlimpseTarget(clickEvent.target as HTMLElement);\n setGlimpseData(curr => {\n if (curr) return undefined;\n return feedUserGlimpseDetails.find(x => x.username === glimpseUsername);\n });\n }\n }}\n />\n {glimpseTarget && glimpseData && (\n <Glimpse\n {...glimpseData}\n target={glimpseTarget}\n onDismiss={() => {\n setGlimpseData(undefined);\n }}\n placement='right'\n />\n )}\n </>\n );\n};\n"]}
1
+ {"version":3,"file":"FeedReply.mocks.jsx","sourceRoot":"","sources":["../../../src/social/Feed/FeedReply.mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAG9C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAWtD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,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K,IAAI,CAAC,EAAE,CAAC,CAAC;YAC9D,IAAI,cAAc,KAAK,CAAC,CAAC,EAAE;gBACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE;oBAClB,MAAM,WAAW,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC;oBAClC,WAAW,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;oBACtC,OAAO,WAAW,CAAC;gBACrB,CAAC,CAAC,CAAC;gBACH,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;aAChC;iBAAM;gBACL,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC;gBAC1C,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;aAChC;YACD,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC,CAAC,CACF,sBAAsB,CAAC,CAAC,eAAe,CAAC,CACxC,eAAe,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,CACpE,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,WAAW,CAAC,CAAC,WAAW,CAAC,EAE3B;MAAA,CAAC,aAAa,IAAI,cAAc,CAClC;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useState, useCallback } from 'react';\nimport type { ReactNode } from 'react';\n\nimport { Avatar, useElement, useUID } from '@pega/cosmos-react-core';\nimport type { MenuItemProps } from '@pega/cosmos-react-core';\nimport { AutopilotGlimpse, FeedReply } from '@pega/cosmos-react-social';\nimport type { FeedReplyProps } from '@pega/cosmos-react-social';\nimport { Glimpse } from '@pega/cosmos-react-work';\n\nimport { feedUserGlimpseDetails } from './Feed.mocks';\n\ninterface FeedReplyDemoProps {\n fullname: FeedReplyProps['fullname'];\n username: FeedReplyProps['username'];\n content: FeedReplyProps['content'];\n attachments?: FeedReplyProps['attachments'];\n postTimestamp?: FeedReplyProps['postTimestamp'];\n userStatus?: FeedReplyProps['userStatus'];\n}\n\nexport const FeedReplyDemo = ({\n fullname,\n username,\n content,\n attachments,\n postTimestamp = new Date(2022, 0, 1),\n userStatus\n}: FeedReplyDemoProps) => {\n const key = useUID();\n const [likes, setLikes] = useState<MenuItemProps[]>([]);\n const [liked, setLiked] = useState(false);\n const [likeCount, setLikeCount] = useState(0);\n const [replyContent, setReplyContent] = useState(content);\n const [edited, setEdited] = useState(false);\n const [editTimestamp, setEditTimestamp] = useState(new Date());\n const [glimpseContent, setGlimpseContent] = useState<ReactNode | undefined>();\n const [glimpseTarget, setGlimpseTarget] = useElement<HTMLElement>(null);\n const [additionalLikeAdded, setAdditionalLikeAdded] = useState(false);\n\n const getInitialLikes = () => {\n if (likes.length) return;\n\n setLikes([]);\n };\n\n const [likesLoading, setLikesLoading] = useState(false);\n\n const generateNewLike = useCallback(() => {\n if (!likesLoading) {\n setLikesLoading(true);\n setTimeout(() => {\n setLikesLoading(false);\n setLikes(oldLikes => [\n ...oldLikes,\n {\n primary: 'Generated Like',\n secondary: ['This like was added after the onLoadMore callback triggered'],\n visual: <Avatar size='l' name='Generated Like' />,\n id: 'generatedLike'\n }\n ]);\n setAdditionalLikeAdded(true);\n }, 1000);\n }\n }, [likesLoading]);\n\n const onUserClick: FeedReplyProps['onUserClick'] = (\n { username: glimpseUsername },\n clickEvent\n ) => {\n if (clickEvent) {\n setGlimpseTarget(clickEvent.target as HTMLElement);\n if (glimpseUsername === 'autopilot') {\n setGlimpseContent(\n <AutopilotGlimpse\n target={clickEvent.target as HTMLElement}\n onDismiss={() => {\n setGlimpseTarget(null);\n }}\n placement='right'\n />\n );\n } else {\n const userDetails = feedUserGlimpseDetails.find(x => x.username === glimpseUsername);\n if (userDetails) {\n setGlimpseContent(\n <Glimpse\n {...userDetails}\n target={clickEvent.target as HTMLElement}\n onDismiss={() => {\n setGlimpseTarget(null);\n }}\n placement='right'\n />\n );\n }\n }\n }\n };\n\n return (\n <>\n <FeedReply\n id={key}\n key={key}\n postTimestamp={postTimestamp}\n content={replyContent}\n attachments={attachments}\n username={username}\n fullname={fullname}\n liked={liked}\n userStatus={userStatus}\n likes={likes}\n likeCount={likeCount >= 10 ? likeCount + 1 : likeCount}\n maxContentHeight={40}\n menuItems={[{ primary: 'Custom action', id: 'custom', onClick: () => {} }]}\n onEditSubmit={({ value }) => {\n setReplyContent(value);\n setEdited(true);\n setEditTimestamp(new Date());\n }}\n edited={edited}\n editTimestamp={editTimestamp}\n onCommentClick={() => {}}\n onLikeClick={({ user }) => {\n const userLikedIndex = likes.findIndex(x => x.id === user.id);\n if (userLikedIndex !== -1) {\n setLikes(oldLikes => {\n const oldLikesArr = [...oldLikes];\n oldLikesArr.splice(userLikedIndex, 1);\n return oldLikesArr;\n });\n setLikeCount(curr => curr - 1);\n } else {\n setLikes(oldLikes => [user, ...oldLikes]);\n setLikeCount(curr => curr + 1);\n }\n setLiked(curr => !curr);\n }}\n onLikeCountInteraction={getInitialLikes}\n onLoadMoreLikes={!additionalLikeAdded ? generateNewLike : undefined}\n likesLoading={likesLoading}\n onUserClick={onUserClick}\n />\n {glimpseTarget && glimpseContent}\n </>\n );\n};\n"]}
@@ -1,13 +1,17 @@
1
1
  export declare const ArticleMockData: {
2
2
  fullArticleContent: {
3
+ articleId: string;
3
4
  header: string;
4
5
  abstract: string;
5
6
  content: string;
6
7
  meta: {
7
8
  category: string;
8
9
  publishedDate: string;
10
+ };
11
+ feedback: {
9
12
  likes: number;
10
13
  disLikes: number;
14
+ reaction: undefined;
11
15
  };
12
16
  };
13
17
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Article.mocks.d.ts","sourceRoot":"","sources":["../../../src/work/Article/Article.mocks.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;CAc3B,CAAC"}
1
+ {"version":3,"file":"Article.mocks.d.ts","sourceRoot":"","sources":["../../../src/work/Article/Article.mocks.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;CAkB3B,CAAC"}
@@ -1,13 +1,17 @@
1
1
  export const ArticleMockData = {
2
2
  fullArticleContent: {
3
+ articleId: '1',
3
4
  header: 'How to change monthly billing cycle',
4
5
  abstract: 'How to change monthly billing cycle. This will give you clear guidelines to change billing cycle',
5
6
  content: "<p>Changing your monthly billing cycle can help you better manage your monthly bills and when you pay them. U+Comm offers 3 main billing cycles with due dates falling on the 1st, 15th, or the 28th of each month. This provides our customers with flexibility when choosing a billing cycle and corresponding due date that matches your personal finance planning.If you change an existing bill cycle, there will generally be a number of days prorated to compensate from the gap from the end of the previous bill cycle to when the new bill cycle is started. This proration will be included in your next (new) billing cycle statement, and will cause an increase in that month’s payment due. But rest assured, you’re not being charged ‘extra’, but paying for the days that were between the old and new billing cycle dates.</p><div>Find more details from this article <a data-article-id='5' href='#'>How to sell a product</a></div><div>Find some suggestions from this article <a data-article-id='8' href='#'>How to convince a customer</a></div><div><b>Before you change your billing cycle, be aware that:</b> </div><ul><li>Your billing cycle can't be changed if your account is in a delinquent status, or if the account will fall delinquent before the requested change date.</li><li>If you have a payment arrangement set up, the payment arrangement must be made before the billing cycle is changed.</li><li>If you have AutoPay, you may see two AutoPay drafts in one month due to the billing cycle change.</li><li>When a billing cycle change is made, prorated charges will occur.</li><li>Your billing cycle can't be changed if your account is in a delinquent status, or if the account will fall delinquent before the requested change date.</li><li>If you have a payment arrangement set up, the payment arrangement must be made before the billing cycle is changed.</li><li>If you have AutoPay, you may see two AutoPay drafts in one month due to the billing cycle change.</li><li>When a billing cycle change is made, prorated charges will occur.</li></ul><p>If you change an existing bill cycle, there will generally be a number of days prorated to compensate from the gap from the end of the previous bill cycle to when the new bill cycle is started. This proration will be included in your next (new) billing cycle statement, and will cause an increase in that month’s payment due. But rest assured, you’re not being charged ‘extra’, but paying for the days that were between the old and new billing cycle dates.</p>",
6
7
  meta: {
7
8
  category: 'Banking and Retail',
8
- publishedDate: '2023-04-06',
9
- likes: 124,
10
- disLikes: 47
9
+ publishedDate: '2023-04-06'
10
+ },
11
+ feedback: {
12
+ likes: 312,
13
+ disLikes: 42,
14
+ reaction: undefined
11
15
  }
12
16
  }
13
17
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Article.mocks.js","sourceRoot":"","sources":["../../../src/work/Article/Article.mocks.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,kBAAkB,EAAE;QAClB,MAAM,EAAE,qCAAqC;QAC7C,QAAQ,EACN,kGAAkG;QACpG,OAAO,EACL,k9EAAk9E;QACp9E,IAAI,EAAE;YACJ,QAAQ,EAAE,oBAAoB;YAC9B,aAAa,EAAE,YAAY;YAC3B,KAAK,EAAE,GAAG;YACV,QAAQ,EAAE,EAAE;SACb;KACF;CACF,CAAC","sourcesContent":["export const ArticleMockData = {\n fullArticleContent: {\n header: 'How to change monthly billing cycle',\n abstract:\n 'How to change monthly billing cycle. This will give you clear guidelines to change billing cycle',\n content:\n \"<p>Changing your monthly billing cycle can help you better manage your monthly bills and when you pay them. U+Comm offers 3 main billing cycles with due dates falling on the 1st, 15th, or the 28th of each month. This provides our customers with flexibility when choosing a billing cycle and corresponding due date that matches your personal finance planning.If you change an existing bill cycle, there will generally be a number of days prorated to compensate from the gap from the end of the previous bill cycle to when the new bill cycle is started. This proration will be included in your next (new) billing cycle statement, and will cause an increase in that month’s payment due. But rest assured, you’re not being charged ‘extra’, but paying for the days that were between the old and new billing cycle dates.</p><div>Find more details from this article <a data-article-id='5' href='#'>How to sell a product</a></div><div>Find some suggestions from this article <a data-article-id='8' href='#'>How to convince a customer</a></div><div><b>Before you change your billing cycle, be aware that:</b> </div><ul><li>Your billing cycle can't be changed if your account is in a delinquent status, or if the account will fall delinquent before the requested change date.</li><li>If you have a payment arrangement set up, the payment arrangement must be made before the billing cycle is changed.</li><li>If you have AutoPay, you may see two AutoPay drafts in one month due to the billing cycle change.</li><li>When a billing cycle change is made, prorated charges will occur.</li><li>Your billing cycle can't be changed if your account is in a delinquent status, or if the account will fall delinquent before the requested change date.</li><li>If you have a payment arrangement set up, the payment arrangement must be made before the billing cycle is changed.</li><li>If you have AutoPay, you may see two AutoPay drafts in one month due to the billing cycle change.</li><li>When a billing cycle change is made, prorated charges will occur.</li></ul><p>If you change an existing bill cycle, there will generally be a number of days prorated to compensate from the gap from the end of the previous bill cycle to when the new bill cycle is started. This proration will be included in your next (new) billing cycle statement, and will cause an increase in that month’s payment due. But rest assured, you’re not being charged ‘extra’, but paying for the days that were between the old and new billing cycle dates.</p>\",\n meta: {\n category: 'Banking and Retail',\n publishedDate: '2023-04-06',\n likes: 124,\n disLikes: 47\n }\n }\n};\n"]}
1
+ {"version":3,"file":"Article.mocks.js","sourceRoot":"","sources":["../../../src/work/Article/Article.mocks.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,kBAAkB,EAAE;QAClB,SAAS,EAAE,GAAG;QACd,MAAM,EAAE,qCAAqC;QAC7C,QAAQ,EACN,kGAAkG;QACpG,OAAO,EACL,k9EAAk9E;QACp9E,IAAI,EAAE;YACJ,QAAQ,EAAE,oBAAoB;YAC9B,aAAa,EAAE,YAAY;SAC5B;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,GAAG;YACV,QAAQ,EAAE,EAAE;YACZ,QAAQ,EAAE,SAAS;SACpB;KACF;CACF,CAAC","sourcesContent":["export const ArticleMockData = {\n fullArticleContent: {\n articleId: '1',\n header: 'How to change monthly billing cycle',\n abstract:\n 'How to change monthly billing cycle. This will give you clear guidelines to change billing cycle',\n content:\n \"<p>Changing your monthly billing cycle can help you better manage your monthly bills and when you pay them. U+Comm offers 3 main billing cycles with due dates falling on the 1st, 15th, or the 28th of each month. This provides our customers with flexibility when choosing a billing cycle and corresponding due date that matches your personal finance planning.If you change an existing bill cycle, there will generally be a number of days prorated to compensate from the gap from the end of the previous bill cycle to when the new bill cycle is started. This proration will be included in your next (new) billing cycle statement, and will cause an increase in that month’s payment due. But rest assured, you’re not being charged ‘extra’, but paying for the days that were between the old and new billing cycle dates.</p><div>Find more details from this article <a data-article-id='5' href='#'>How to sell a product</a></div><div>Find some suggestions from this article <a data-article-id='8' href='#'>How to convince a customer</a></div><div><b>Before you change your billing cycle, be aware that:</b> </div><ul><li>Your billing cycle can't be changed if your account is in a delinquent status, or if the account will fall delinquent before the requested change date.</li><li>If you have a payment arrangement set up, the payment arrangement must be made before the billing cycle is changed.</li><li>If you have AutoPay, you may see two AutoPay drafts in one month due to the billing cycle change.</li><li>When a billing cycle change is made, prorated charges will occur.</li><li>Your billing cycle can't be changed if your account is in a delinquent status, or if the account will fall delinquent before the requested change date.</li><li>If you have a payment arrangement set up, the payment arrangement must be made before the billing cycle is changed.</li><li>If you have AutoPay, you may see two AutoPay drafts in one month due to the billing cycle change.</li><li>When a billing cycle change is made, prorated charges will occur.</li></ul><p>If you change an existing bill cycle, there will generally be a number of days prorated to compensate from the gap from the end of the previous bill cycle to when the new bill cycle is started. This proration will be included in your next (new) billing cycle statement, and will cause an increase in that month’s payment due. But rest assured, you’re not being charged ‘extra’, but paying for the days that were between the old and new billing cycle dates.</p>\",\n meta: {\n category: 'Banking and Retail',\n publishedDate: '2023-04-06'\n },\n feedback: {\n likes: 312,\n disLikes: 42,\n reaction: undefined\n }\n }\n};\n"]}
@@ -14,4 +14,5 @@ export interface ArticleDemoProps {
14
14
  showAttachments: boolean;
15
15
  }
16
16
  export declare const ArticleStory: StoryFn<ArticleDemoProps>;
17
+ export declare const ArticleRatingDemo: StoryFn;
17
18
  //# sourceMappingURL=Article.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Article.stories.d.ts","sourceRoot":"","sources":["../../../src/work/Article/Article.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,kBAAkB,CAAC;;AActD,wBAOU;AAEV,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC,gBAAgB,CAgMlD,CAAC"}
1
+ {"version":3,"file":"Article.stories.d.ts","sourceRoot":"","sources":["../../../src/work/Article/Article.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,kBAAkB,CAAC;;AAatD,wBAOU;AAEV,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC,gBAAgB,CAsNlD,CAAC;AA4BF,eAAO,MAAM,iBAAiB,EAAE,OA8C/B,CAAC"}
@@ -1,14 +1,12 @@
1
1
  import { useEffect, useState } from 'react';
2
2
  import { action } from '@storybook/addon-actions';
3
- import { registerIcon, createUID, HTML } from '@pega/cosmos-react-core';
3
+ import { registerIcon, createUID, HTML, Flex } from '@pega/cosmos-react-core';
4
4
  import * as openIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/open.icon';
5
5
  import * as starIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/star.icon';
6
6
  import * as caretLeftIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-left.icon';
7
- import * as thumbsUpSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/thumbs-up-solid.icon';
8
- import * as thumbsDownSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/thumbs-down-solid.icon';
9
- import { Article, ArticleFooter } from '@pega/cosmos-react-work';
7
+ import { Article, ArticleFooter, ArticleRating } from '@pega/cosmos-react-work';
10
8
  import { ArticleMockData } from './Article.mocks';
11
- registerIcon(openIcon, starIcon, caretLeftIcon, thumbsUpSolidIcon, thumbsDownSolidIcon);
9
+ registerIcon(openIcon, starIcon, caretLeftIcon);
12
10
  export default {
13
11
  title: 'Work/Article',
14
12
  component: Article,
@@ -18,40 +16,50 @@ export default {
18
16
  }
19
17
  };
20
18
  export const ArticleStory = (args) => {
21
- const [feedbackStatus, setFeedbackStatus] = useState();
22
- const [showFeedbackThanks, setShowFeedbackThanks] = useState(false);
23
19
  const [loading, setLoading] = useState(true);
20
+ const [likeCount, setLikeCount] = useState(ArticleMockData.fullArticleContent.feedback.likes);
21
+ const [dislikeCount, setDislikeCount] = useState(ArticleMockData.fullArticleContent.feedback.disLikes);
22
+ const [reaction, setReaction] = useState(ArticleMockData.fullArticleContent.feedback.reaction);
24
23
  const { showHeader, backButtonText, showPrimaryActions, showSecondaryActions, showFooter, enableFeedback, showTags, showRelatedLinks, showMoreLikeThis, showAttachments } = args;
25
24
  const onBackToArticlesClick = (event) => {
26
25
  event.preventDefault();
27
26
  };
28
- const onFeedbackClick = button => {
29
- if (button === 'like') {
30
- if (feedbackStatus === 'liked') {
31
- setFeedbackStatus(undefined);
32
- }
33
- else {
34
- setFeedbackStatus('liked');
35
- setShowFeedbackThanks(true);
36
- }
37
- }
38
- else if (feedbackStatus === 'disliked') {
39
- setFeedbackStatus(undefined);
40
- }
41
- else {
42
- setFeedbackStatus('disliked');
43
- setShowFeedbackThanks(true);
44
- }
45
- };
46
27
  useEffect(() => {
47
28
  setTimeout(() => {
48
29
  setLoading(false);
49
30
  }, 2000);
50
31
  }, []);
32
+ const onReaction = (id, reactionParam) => {
33
+ action('onReaction')(id);
34
+ if (reactionParam === 'liked') {
35
+ setReaction('liked');
36
+ setLikeCount(prev => prev + 1);
37
+ if (reaction === 'disliked') {
38
+ setDislikeCount(prev => prev - 1);
39
+ }
40
+ return;
41
+ }
42
+ if (reactionParam === 'disliked') {
43
+ setReaction('disliked');
44
+ setDislikeCount(prev => prev + 1);
45
+ if (reaction === 'liked') {
46
+ setLikeCount(prev => prev - 1);
47
+ }
48
+ }
49
+ if (reactionParam === undefined) {
50
+ if (reaction === 'liked') {
51
+ setLikeCount(prev => prev - 1);
52
+ }
53
+ else {
54
+ setDislikeCount(prev => prev - 1);
55
+ }
56
+ setReaction(undefined);
57
+ }
58
+ };
51
59
  return (<div style={{
52
60
  maxWidth: '25rem'
53
61
  }}>
54
- <Article header={showHeader
62
+ <Article articleId={ArticleMockData.fullArticleContent.articleId} header={showHeader
55
63
  ? {
56
64
  title: 'Knowledge articles',
57
65
  icon: 'book-open'
@@ -93,18 +101,19 @@ export const ArticleStory = (args) => {
93
101
  ]
94
102
  : undefined} content={<HTML content={ArticleMockData.fullArticleContent.content}/>} title={ArticleMockData.fullArticleContent.header} meta={{
95
103
  category: ArticleMockData.fullArticleContent.meta.category,
96
- publishedDate: ArticleMockData.fullArticleContent.meta.publishedDate,
97
- feedback: {
98
- likes: ArticleMockData.fullArticleContent.meta.likes,
99
- dislikes: ArticleMockData.fullArticleContent.meta.disLikes
100
- }
104
+ publishedDate: ArticleMockData.fullArticleContent.meta.publishedDate
105
+ }} feedback={{
106
+ likes: (likeCount * 100) / (likeCount + dislikeCount),
107
+ dislikes: (dislikeCount * 100) / (likeCount + dislikeCount),
108
+ reaction,
109
+ onReaction
101
110
  }} footer={showFooter
102
111
  ? {
103
112
  feedback: enableFeedback
104
113
  ? {
105
- showThanksMessage: showFeedbackThanks,
106
- status: feedbackStatus,
107
- onFeedbackClick
114
+ onReaction,
115
+ showThanksMessage: !!reaction,
116
+ reaction
108
117
  }
109
118
  : undefined,
110
119
  tags: showTags
@@ -198,4 +207,38 @@ ArticleStory.argTypes = {
198
207
  showMoreLikeThis: { control: { type: 'boolean' } },
199
208
  showAttachments: { control: { type: 'boolean' } }
200
209
  };
210
+ export const ArticleRatingDemo = () => {
211
+ const [likeCount, setLikeCount] = useState(5);
212
+ const [dislikeCount, setDislikeCount] = useState(2);
213
+ const [reaction, setReaction] = useState();
214
+ const onReaction = reactionParam => {
215
+ if (reactionParam === 'liked') {
216
+ setReaction('liked');
217
+ setLikeCount(prev => prev + 1);
218
+ if (reaction === 'disliked') {
219
+ setDislikeCount(prev => prev - 1);
220
+ }
221
+ return;
222
+ }
223
+ if (reactionParam === 'disliked') {
224
+ setReaction('disliked');
225
+ setDislikeCount(prev => prev + 1);
226
+ if (reaction === 'liked') {
227
+ setLikeCount(prev => prev - 1);
228
+ }
229
+ }
230
+ if (reactionParam === undefined) {
231
+ if (reaction === 'liked') {
232
+ setLikeCount(prev => prev - 1);
233
+ }
234
+ else {
235
+ setDislikeCount(prev => prev - 1);
236
+ }
237
+ setReaction(undefined);
238
+ }
239
+ };
240
+ return (<Flex container={{ pad: [1, 1] }}>
241
+ <ArticleRating likes={(likeCount * 100) / (likeCount + dislikeCount)} dislikes={(dislikeCount * 100) / (likeCount + dislikeCount)} onReaction={onReaction} reaction={reaction}/>
242
+ </Flex>);
243
+ };
201
244
  //# sourceMappingURL=Article.stories.jsx.map
@@ -1 +1 @@
1
- {"version":3,"file":"Article.stories.jsx","sourceRoot":"","sources":["../../../src/work/Article/Article.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,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AAS,EAAE,EAAE;IAClD,gBAAgB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAClD,eAAe,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAClD,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport type { MouseEvent } from 'react';\nimport { action } from '@storybook/addon-actions';\nimport type { Meta, StoryFn } from '@storybook/react';\n\nimport { registerIcon, createUID, HTML } from '@pega/cosmos-react-core';\nimport * as openIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/open.icon';\nimport * as starIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/star.icon';\nimport * as caretLeftIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-left.icon';\nimport * as thumbsUpSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/thumbs-up-solid.icon';\nimport * as thumbsDownSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/thumbs-down-solid.icon';\nimport { Article, ArticleFooter, ArticleFooterProps } from '@pega/cosmos-react-work';\n\nimport { ArticleMockData } from './Article.mocks';\n\nregisterIcon(openIcon, starIcon, caretLeftIcon, thumbsUpSolidIcon, thumbsDownSolidIcon);\n\nexport default {\n title: 'Work/Article',\n component: Article,\n subcomponents: { ArticleFooter },\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\nexport interface ArticleDemoProps {\n showHeader: boolean;\n backButtonText: string;\n showPrimaryActions: boolean;\n showSecondaryActions: boolean;\n showFooter: boolean;\n enableFeedback: boolean;\n showTags: boolean;\n showRelatedLinks: boolean;\n showMoreLikeThis: boolean;\n showAttachments: boolean;\n}\n\nexport const ArticleStory: StoryFn<ArticleDemoProps> = (args: ArticleDemoProps) => {\n const [feedbackStatus, setFeedbackStatus] =\n useState<Required<ArticleFooterProps>['feedback']['status']>();\n const [showFeedbackThanks, setShowFeedbackThanks] = useState<boolean>(false);\n const [loading, setLoading] = useState<boolean>(true);\n\n const {\n showHeader,\n backButtonText,\n showPrimaryActions,\n showSecondaryActions,\n showFooter,\n enableFeedback,\n showTags,\n showRelatedLinks,\n showMoreLikeThis,\n showAttachments\n } = args;\n\n const onBackToArticlesClick = (event: MouseEvent) => {\n event.preventDefault();\n };\n\n const onFeedbackClick: Required<ArticleFooterProps>['feedback']['onFeedbackClick'] = button => {\n if (button === 'like') {\n if (feedbackStatus === 'liked') {\n setFeedbackStatus(undefined);\n } else {\n setFeedbackStatus('liked');\n setShowFeedbackThanks(true);\n }\n } else if (feedbackStatus === 'disliked') {\n setFeedbackStatus(undefined);\n } else {\n setFeedbackStatus('disliked');\n setShowFeedbackThanks(true);\n }\n };\n\n useEffect(() => {\n setTimeout(() => {\n setLoading(false);\n }, 2000);\n }, []);\n\n return (\n <div\n style={{\n maxWidth: '25rem'\n }}\n >\n <Article\n header={\n showHeader\n ? {\n title: 'Knowledge articles',\n icon: 'book-open'\n }\n : undefined\n }\n backNavigation={{\n title: backButtonText,\n onClick: onBackToArticlesClick\n }}\n primaryActions={\n showPrimaryActions\n ? [\n {\n icon: 'star',\n label: 'Follow',\n id: createUID(),\n onClick: id => {\n action('Follow')(id);\n }\n },\n {\n icon: 'open',\n label: 'Open',\n id: createUID(),\n onClick: id => {\n action('Open')(id);\n }\n }\n ]\n : undefined\n }\n secondaryActions={\n showSecondaryActions\n ? [\n {\n text: 'Send in email',\n id: 'action1',\n onClick: action('Action')\n },\n {\n text: 'Send in chat',\n id: 'action2',\n onClick: action('Action')\n }\n ]\n : undefined\n }\n content={<HTML content={ArticleMockData.fullArticleContent.content} />}\n title={ArticleMockData.fullArticleContent.header}\n meta={{\n category: ArticleMockData.fullArticleContent.meta.category,\n publishedDate: ArticleMockData.fullArticleContent.meta.publishedDate,\n feedback: {\n likes: ArticleMockData.fullArticleContent.meta.likes,\n dislikes: ArticleMockData.fullArticleContent.meta.disLikes\n }\n }}\n footer={\n showFooter\n ? {\n feedback: enableFeedback\n ? {\n showThanksMessage: showFeedbackThanks,\n status: feedbackStatus,\n onFeedbackClick\n }\n : undefined,\n tags: showTags\n ? {\n list: [\n {\n id: 'Retail banking',\n tagName: '#Retail_banking'\n },\n {\n id: 'Billing',\n tagName: '#Billing'\n },\n {\n id: '223444',\n tagName: '#CSR_Skills'\n },\n {\n id: '223446',\n tagName: '#Premium_Customers'\n },\n {\n id: '223447',\n tagName: '#Rare_Customers'\n },\n {\n id: '223448',\n tagName: '#Finance_Customers'\n }\n ],\n onTagClick: action('Tag clicked')\n }\n : undefined,\n relatedLinks: showRelatedLinks\n ? [\n { title: 'Retail banking for beginners', href: 'https://pega.com' },\n { title: 'How to handle premium customers', href: 'https://pega.com' }\n ]\n : undefined,\n relatedArticles: showMoreLikeThis\n ? [\n {\n title: 'What are the implications of change in billing cycle',\n onClick: action('Related article'),\n id: createUID()\n },\n {\n title: 'What is the best billing cycle for premium customers',\n onClick: action('Related article'),\n id: createUID()\n },\n {\n title: 'How to enable automatic bill payment',\n onClick: action('Related article'),\n id: createUID()\n }\n ]\n : undefined,\n attachments: showAttachments\n ? [\n { name: 'Billing cycle FAQ.doc', onDownload: action('On Download') },\n { name: 'Training video.mp4', onDownload: action('On Download') },\n { name: 'Terms and conditions.pdf', onDownload: action('On Download') }\n ]\n : undefined\n }\n : undefined\n }\n loading={loading}\n />\n </div>\n );\n};\n\nArticleStory.args = {\n showHeader: true,\n backButtonText: 'Back to all articles',\n showPrimaryActions: true,\n showSecondaryActions: true,\n showFooter: true,\n enableFeedback: true,\n showTags: true,\n showRelatedLinks: true,\n showMoreLikeThis: true,\n showAttachments: true\n};\n\nArticleStory.argTypes = {\n showHeader: { control: { type: 'boolean' } },\n backButtonText: { control: { type: 'text' } },\n showPrimaryActions: { control: { type: 'boolean' } },\n showSecondaryActions: { control: { type: 'boolean' } },\n showFooter: { control: { type: 'boolean' } },\n enableFeedback: { control: { type: 'boolean' } },\n showTags: { control: { type: 'boolean' } },\n showRelatedLinks: { control: { type: 'boolean' } },\n showMoreLikeThis: { control: { type: 'boolean' } },\n showAttachments: { control: { type: 'boolean' } }\n};\n"]}
1
+ {"version":3,"file":"Article.stories.jsx","sourceRoot":"","sources":["../../../src/work/Article/Article.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,QAAQ,MAAM,6DAA6D,CAAC;AACxF,OAAO,KAAK,QAAQ,MAAM,6DAA6D,CAAC;AACxF,OAAO,KAAK,aAAa,MAAM,mEAAmE,CAAC;AACnG,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGhF,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;AAEhD,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,OAAO;IAClB,aAAa,EAAE,EAAE,aAAa,EAAE;IAChC,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACM,CAAC;AAeV,MAAM,CAAC,MAAM,YAAY,GAA8B,CAAC,IAAsB,EAAE,EAAE;IAChF,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAU,IAAI,CAAC,CAAC;IAEtD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,eAAe,CAAC,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9F,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAC9C,eAAe,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CACrD,CAAC;IACF,MAAM,CAAC,QAAQ,EAAE,WAAW,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Aa,CACZ,KAAK,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG,CAAC,GAAG,CAAC,SAAS,GAAG,YAAY,CAAC,CAAC,CACtD,QAAQ,CAAC,CAAC,CAAC,YAAY,GAAG,GAAG,CAAC,GAAG,CAAC,SAAS,GAAG,YAAY,CAAC,CAAC,CAC5D,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAEvB;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport type { MouseEvent } from 'react';\nimport { action } from '@storybook/addon-actions';\nimport type { Meta, StoryFn } from '@storybook/react';\n\nimport { registerIcon, createUID, HTML, Flex } from '@pega/cosmos-react-core';\nimport * as openIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/open.icon';\nimport * as starIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/star.icon';\nimport * as caretLeftIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-left.icon';\nimport { Article, ArticleFooter, ArticleRating } from '@pega/cosmos-react-work';\nimport type { ArticleProps, ArticleRatingProps } from '@pega/cosmos-react-work';\n\nimport { ArticleMockData } from './Article.mocks';\n\nregisterIcon(openIcon, starIcon, caretLeftIcon);\n\nexport default {\n title: 'Work/Article',\n component: Article,\n subcomponents: { ArticleFooter },\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\nexport interface ArticleDemoProps {\n showHeader: boolean;\n backButtonText: string;\n showPrimaryActions: boolean;\n showSecondaryActions: boolean;\n showFooter: boolean;\n enableFeedback: boolean;\n showTags: boolean;\n showRelatedLinks: boolean;\n showMoreLikeThis: boolean;\n showAttachments: boolean;\n}\n\nexport const ArticleStory: StoryFn<ArticleDemoProps> = (args: ArticleDemoProps) => {\n const [loading, setLoading] = useState<boolean>(true);\n\n const [likeCount, setLikeCount] = useState(ArticleMockData.fullArticleContent.feedback.likes);\n const [dislikeCount, setDislikeCount] = useState(\n ArticleMockData.fullArticleContent.feedback.disLikes\n );\n const [reaction, setReaction] = useState<ArticleRatingProps['reaction']>(\n ArticleMockData.fullArticleContent.feedback.reaction\n );\n\n const {\n showHeader,\n backButtonText,\n showPrimaryActions,\n showSecondaryActions,\n showFooter,\n enableFeedback,\n showTags,\n showRelatedLinks,\n showMoreLikeThis,\n showAttachments\n } = args;\n\n const onBackToArticlesClick = (event: MouseEvent) => {\n event.preventDefault();\n };\n\n useEffect(() => {\n setTimeout(() => {\n setLoading(false);\n }, 2000);\n }, []);\n\n const onReaction: Required<ArticleProps>['feedback']['onReaction'] = (id, reactionParam) => {\n action('onReaction')(id);\n if (reactionParam === 'liked') {\n setReaction('liked');\n setLikeCount(prev => prev + 1);\n\n if (reaction === 'disliked') {\n setDislikeCount(prev => prev - 1);\n }\n return;\n }\n\n if (reactionParam === 'disliked') {\n setReaction('disliked');\n setDislikeCount(prev => prev + 1);\n if (reaction === 'liked') {\n setLikeCount(prev => prev - 1);\n }\n }\n\n if (reactionParam === undefined) {\n if (reaction === 'liked') {\n setLikeCount(prev => prev - 1);\n } else {\n setDislikeCount(prev => prev - 1);\n }\n setReaction(undefined);\n }\n };\n\n return (\n <div\n style={{\n maxWidth: '25rem'\n }}\n >\n <Article\n articleId={ArticleMockData.fullArticleContent.articleId}\n header={\n showHeader\n ? {\n title: 'Knowledge articles',\n icon: 'book-open'\n }\n : undefined\n }\n backNavigation={{\n title: backButtonText,\n onClick: onBackToArticlesClick\n }}\n primaryActions={\n showPrimaryActions\n ? [\n {\n icon: 'star',\n label: 'Follow',\n id: createUID(),\n onClick: id => {\n action('Follow')(id);\n }\n },\n {\n icon: 'open',\n label: 'Open',\n id: createUID(),\n onClick: id => {\n action('Open')(id);\n }\n }\n ]\n : undefined\n }\n secondaryActions={\n showSecondaryActions\n ? [\n {\n text: 'Send in email',\n id: 'action1',\n onClick: action('Action')\n },\n {\n text: 'Send in chat',\n id: 'action2',\n onClick: action('Action')\n }\n ]\n : undefined\n }\n content={<HTML content={ArticleMockData.fullArticleContent.content} />}\n title={ArticleMockData.fullArticleContent.header}\n meta={{\n category: ArticleMockData.fullArticleContent.meta.category,\n publishedDate: ArticleMockData.fullArticleContent.meta.publishedDate\n }}\n feedback={{\n likes: (likeCount * 100) / (likeCount + dislikeCount),\n dislikes: (dislikeCount * 100) / (likeCount + dislikeCount),\n reaction,\n onReaction\n }}\n footer={\n showFooter\n ? {\n feedback: enableFeedback\n ? {\n onReaction,\n showThanksMessage: !!reaction,\n reaction\n }\n : undefined,\n tags: showTags\n ? {\n list: [\n {\n id: 'Retail banking',\n tagName: '#Retail_banking'\n },\n {\n id: 'Billing',\n tagName: '#Billing'\n },\n {\n id: '223444',\n tagName: '#CSR_Skills'\n },\n {\n id: '223446',\n tagName: '#Premium_Customers'\n },\n {\n id: '223447',\n tagName: '#Rare_Customers'\n },\n {\n id: '223448',\n tagName: '#Finance_Customers'\n }\n ],\n onTagClick: action('Tag clicked')\n }\n : undefined,\n relatedLinks: showRelatedLinks\n ? [\n { title: 'Retail banking for beginners', href: 'https://pega.com' },\n { title: 'How to handle premium customers', href: 'https://pega.com' }\n ]\n : undefined,\n relatedArticles: showMoreLikeThis\n ? [\n {\n title: 'What are the implications of change in billing cycle',\n onClick: action('Related article'),\n id: createUID()\n },\n {\n title: 'What is the best billing cycle for premium customers',\n onClick: action('Related article'),\n id: createUID()\n },\n {\n title: 'How to enable automatic bill payment',\n onClick: action('Related article'),\n id: createUID()\n }\n ]\n : undefined,\n attachments: showAttachments\n ? [\n { name: 'Billing cycle FAQ.doc', onDownload: action('On Download') },\n { name: 'Training video.mp4', onDownload: action('On Download') },\n { name: 'Terms and conditions.pdf', onDownload: action('On Download') }\n ]\n : undefined\n }\n : undefined\n }\n loading={loading}\n />\n </div>\n );\n};\n\nArticleStory.args = {\n showHeader: true,\n backButtonText: 'Back to all articles',\n showPrimaryActions: true,\n showSecondaryActions: true,\n showFooter: true,\n enableFeedback: true,\n showTags: true,\n showRelatedLinks: true,\n showMoreLikeThis: true,\n showAttachments: true\n};\n\nArticleStory.argTypes = {\n showHeader: { control: { type: 'boolean' } },\n backButtonText: { control: { type: 'text' } },\n showPrimaryActions: { control: { type: 'boolean' } },\n showSecondaryActions: { control: { type: 'boolean' } },\n showFooter: { control: { type: 'boolean' } },\n enableFeedback: { control: { type: 'boolean' } },\n showTags: { control: { type: 'boolean' } },\n showRelatedLinks: { control: { type: 'boolean' } },\n showMoreLikeThis: { control: { type: 'boolean' } },\n showAttachments: { control: { type: 'boolean' } }\n};\n\nexport const ArticleRatingDemo: StoryFn = () => {\n const [likeCount, setLikeCount] = useState(5);\n const [dislikeCount, setDislikeCount] = useState(2);\n const [reaction, setReaction] = useState<ArticleRatingProps['reaction']>();\n\n const onReaction: ArticleRatingProps['onReaction'] = reactionParam => {\n if (reactionParam === 'liked') {\n // no reaction\n // already disliked and liking now\n setReaction('liked');\n setLikeCount(prev => prev + 1);\n if (reaction === 'disliked') {\n setDislikeCount(prev => prev - 1);\n }\n return;\n }\n\n if (reactionParam === 'disliked') {\n // Dislike clicked\n setReaction('disliked');\n setDislikeCount(prev => prev + 1);\n if (reaction === 'liked') {\n setLikeCount(prev => prev - 1);\n }\n }\n\n if (reactionParam === undefined) {\n if (reaction === 'liked') {\n setLikeCount(prev => prev - 1);\n } else {\n setDislikeCount(prev => prev - 1);\n }\n setReaction(undefined);\n }\n };\n\n return (\n <Flex container={{ pad: [1, 1] }}>\n <ArticleRating\n likes={(likeCount * 100) / (likeCount + dislikeCount)}\n dislikes={(dislikeCount * 100) / (likeCount + dislikeCount)}\n onReaction={onReaction}\n reaction={reaction}\n />\n </Flex>\n );\n};\n"]}
@@ -0,0 +1,11 @@
1
+ import type { StoryFn } from '@storybook/react';
2
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
3
+ export default _default;
4
+ interface ArticleBuddyDemoProps {
5
+ showDisclaimer: boolean;
6
+ showReferences: boolean;
7
+ showActions: boolean;
8
+ showError: boolean;
9
+ }
10
+ export declare const ArticleBuddyDemo: StoryFn<ArticleBuddyDemoProps>;
11
+ //# sourceMappingURL=ArticleBuddy.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArticleBuddy.stories.d.ts","sourceRoot":"","sources":["../../../src/work/ArticleList/ArticleBuddy.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,kBAAkB,CAAC;;AAWtD,wBAGU;AAEV,UAAU,qBAAqB;IAC7B,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;CACpB;AAOD,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAC,qBAAqB,CAgE3D,CAAC"}
@@ -0,0 +1,62 @@
1
+ import { useState } from 'react';
2
+ import { HTML } from '@pega/cosmos-react-core';
3
+ import { ArticleBuddy } from '@pega/cosmos-react-work';
4
+ import { ArticleBuddyMockData } from './ArticleList.mocks';
5
+ export default {
6
+ title: 'Work/ArticleList',
7
+ component: ArticleBuddy
8
+ };
9
+ export const ArticleBuddyDemo = (args) => {
10
+ const [searchVal, setSearchVal] = useState('');
11
+ const [loading, setLoading] = useState(false);
12
+ const [searchResult, setSearchResult] = useState();
13
+ const updateBuddyArticles = (mockBuddyArticle) => {
14
+ const actionItems = [
15
+ { id: '1', text: 'Share' },
16
+ { id: '2', text: 'Copy' }
17
+ ];
18
+ return {
19
+ title: mockBuddyArticle.title,
20
+ content: mockBuddyArticle.content,
21
+ references: mockBuddyArticle.references,
22
+ disclaimer: mockBuddyArticle.disclaimer,
23
+ actions: actionItems
24
+ };
25
+ };
26
+ const fetchSearchResult = () => {
27
+ return new Promise(resolve => {
28
+ setTimeout(() => {
29
+ resolve({
30
+ data: updateBuddyArticles(ArticleBuddyMockData)
31
+ });
32
+ }, 1000);
33
+ });
34
+ };
35
+ const getResults = async () => {
36
+ setLoading(true);
37
+ const res = await fetchSearchResult();
38
+ setSearchResult(res.data);
39
+ setLoading(false);
40
+ };
41
+ const queryParams = {
42
+ placeholder: 'Ask your question here...',
43
+ value: searchVal,
44
+ onChange: (e) => setSearchVal(e.target.value)
45
+ };
46
+ return (<ArticleBuddy query={queryParams} onSubmit={getResults} onClear={() => {
47
+ setSearchVal('');
48
+ }} title={searchResult?.title} actions={args.showActions ? searchResult?.actions : []} content={!args.showError && searchResult?.content ? (<HTML content={ArticleBuddyMockData.content}/>) : undefined} disclaimer={args.showDisclaimer ? ArticleBuddyMockData.disclaimer : undefined} references={args.showReferences ? searchResult?.references : undefined} loading={loading} error={args.showError}/>);
49
+ };
50
+ ArticleBuddyDemo.args = {
51
+ showDisclaimer: true,
52
+ showActions: true,
53
+ showReferences: true,
54
+ showError: false
55
+ };
56
+ ArticleBuddyDemo.argTypes = {
57
+ showDisclaimer: { control: { type: 'boolean' } },
58
+ showActions: { control: { type: 'boolean' } },
59
+ showReferences: { control: { type: 'boolean' } },
60
+ showError: { control: { type: 'boolean' } }
61
+ };
62
+ //# sourceMappingURL=ArticleBuddy.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArticleBuddy.stories.jsx","sourceRoot":"","sources":["../../../src/work/ArticleList/ArticleBuddy.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjC,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,YAAY;CAChB,CAAC;AAcV,MAAM,CAAC,MAAM,gBAAgB,GAAmC,CAAC,IAA2B,EAAE,EAAE;IAC9F,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAA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AE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAChD,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC5C,CAAC","sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport { useState } from 'react';\nimport type { ChangeEvent } from 'react';\n\nimport { HTML } from '@pega/cosmos-react-core';\nimport type { OmitStrict, TextAreaProps } from '@pega/cosmos-react-core';\nimport { ArticleBuddy } from '@pega/cosmos-react-work';\nimport type { ArticleBuddyProps } from '@pega/cosmos-react-work';\n\nimport { ArticleBuddyMockData } from './ArticleList.mocks';\n\nexport default {\n title: 'Work/ArticleList',\n component: ArticleBuddy\n} as Meta;\n\ninterface ArticleBuddyDemoProps {\n showDisclaimer: boolean;\n showReferences: boolean;\n showActions: boolean;\n showError: boolean;\n}\n\ntype MockBuddyArticles = OmitStrict<\n ArticleBuddyProps,\n 'query' | 'loading' | 'onSubmit' | 'onClear'\n>;\n\nexport const ArticleBuddyDemo: StoryFn<ArticleBuddyDemoProps> = (args: ArticleBuddyDemoProps) => {\n const [searchVal, setSearchVal] = useState('');\n const [loading, setLoading] = useState(false);\n const [searchResult, setSearchResult] = useState<MockBuddyArticles>();\n\n const updateBuddyArticles = (mockBuddyArticle: MockBuddyArticles) => {\n const actionItems = [\n { id: '1', text: 'Share' },\n { id: '2', text: 'Copy' }\n ];\n return {\n title: mockBuddyArticle.title,\n content: mockBuddyArticle.content,\n references: mockBuddyArticle.references,\n disclaimer: mockBuddyArticle.disclaimer,\n actions: actionItems\n };\n };\n\n const fetchSearchResult: () => Promise<{\n data: MockBuddyArticles;\n }> = () => {\n return new Promise(resolve => {\n setTimeout(() => {\n resolve({\n data: updateBuddyArticles(ArticleBuddyMockData)\n });\n }, 1000);\n });\n };\n\n const getResults = async () => {\n setLoading(true);\n const res = await fetchSearchResult();\n setSearchResult(res.data);\n setLoading(false);\n };\n\n const queryParams: TextAreaProps = {\n placeholder: 'Ask your question here...',\n value: searchVal,\n onChange: (e: ChangeEvent<HTMLTextAreaElement>) => setSearchVal(e.target.value)\n };\n\n return (\n <ArticleBuddy\n query={queryParams}\n onSubmit={getResults}\n onClear={() => {\n setSearchVal('');\n }}\n title={searchResult?.title}\n actions={args.showActions ? searchResult?.actions : []}\n content={\n !args.showError && searchResult?.content ? (\n <HTML content={ArticleBuddyMockData.content} />\n ) : undefined\n }\n disclaimer={args.showDisclaimer ? ArticleBuddyMockData.disclaimer : undefined}\n references={args.showReferences ? searchResult?.references : undefined}\n loading={loading}\n error={args.showError}\n />\n );\n};\n\nArticleBuddyDemo.args = {\n showDisclaimer: true,\n showActions: true,\n showReferences: true,\n showError: false\n};\n\nArticleBuddyDemo.argTypes = {\n showDisclaimer: { control: { type: 'boolean' } },\n showActions: { control: { type: 'boolean' } },\n showReferences: { control: { type: 'boolean' } },\n showError: { control: { type: 'boolean' } }\n};\n"]}
@@ -1,3 +1,4 @@
1
+ import type { ArticleBuddyProps } from '@pega/cosmos-react-work';
1
2
  export declare const suggestedMock: {
2
3
  count: number;
3
4
  articles: ({
@@ -8,10 +9,12 @@ export declare const suggestedMock: {
8
9
  meta: {
9
10
  category: string;
10
11
  publishedDate: string;
11
- feedback: {
12
- likes: number;
13
- dislikes: number;
14
- };
12
+ };
13
+ feedback: {
14
+ likes: number;
15
+ dislikes: number;
16
+ liked: boolean;
17
+ disliked: boolean;
15
18
  };
16
19
  isFollowed: boolean;
17
20
  isLiked: boolean;
@@ -24,10 +27,12 @@ export declare const suggestedMock: {
24
27
  meta: {
25
28
  category: string;
26
29
  publishedDate: string;
27
- feedback: {
28
- likes: number;
29
- dislikes: number;
30
- };
30
+ };
31
+ feedback: {
32
+ likes: number;
33
+ dislikes: number;
34
+ liked: boolean;
35
+ disliked: boolean;
31
36
  };
32
37
  isFollowed: boolean;
33
38
  isLiked: boolean;
@@ -47,10 +52,12 @@ export declare const followedMock: {
47
52
  meta: {
48
53
  category: string;
49
54
  publishedDate: string;
50
- feedback: {
51
- likes: number;
52
- dislikes: number;
53
- };
55
+ };
56
+ feedback: {
57
+ likes: number;
58
+ dislikes: number;
59
+ liked: boolean;
60
+ disliked: boolean;
54
61
  };
55
62
  isFollowed: boolean;
56
63
  isLiked: boolean;
@@ -66,10 +73,12 @@ export declare const followedMock: {
66
73
  meta: {
67
74
  category: string;
68
75
  publishedDate: string;
69
- feedback: {
70
- likes: number;
71
- dislikes: number;
72
- };
76
+ };
77
+ feedback: {
78
+ likes: number;
79
+ dislikes: number;
80
+ liked: boolean;
81
+ disliked: boolean;
73
82
  };
74
83
  isFollowed: boolean;
75
84
  isLiked: boolean;
@@ -105,10 +114,12 @@ export declare const searchMock: {
105
114
  meta: {
106
115
  category: string;
107
116
  publishedDate: string;
108
- feedback: {
109
- likes: number;
110
- dislikes: number;
111
- };
117
+ };
118
+ feedback: {
119
+ likes: number;
120
+ dislikes: number;
121
+ liked: boolean;
122
+ disliked: boolean;
112
123
  };
113
124
  isFollowed: boolean;
114
125
  isLiked: boolean;
@@ -137,4 +148,12 @@ export declare const searchMock: {
137
148
  primary: string;
138
149
  }[];
139
150
  };
151
+ export declare const ArticleBuddyMockData: Pick<ArticleBuddyProps, 'title' | 'references' | 'disclaimer'> & {
152
+ content: string;
153
+ };
154
+ export declare const ArticleBuddyActions: {
155
+ id: string;
156
+ text: string;
157
+ onClick: () => void;
158
+ }[];
140
159
  //# sourceMappingURL=ArticleList.mocks.d.ts.map