@pega/cosmos-react-demos 3.0.0-dev.3.0 → 3.0.0-dev.4.2

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 (557) hide show
  1. package/jsx/build/AppShell/AppShell.mocks.d.ts +17 -0
  2. package/jsx/build/AppShell/AppShell.mocks.d.ts.map +1 -1
  3. package/jsx/build/AppShell/AppShell.mocks.js +15 -0
  4. package/jsx/build/AppShell/AppShell.mocks.js.map +1 -1
  5. package/jsx/build/AppShell/AppShell.stories.d.ts +2 -0
  6. package/jsx/build/AppShell/AppShell.stories.d.ts.map +1 -1
  7. package/jsx/build/AppShell/AppShell.stories.jsx +2 -17
  8. package/jsx/build/AppShell/AppShell.stories.jsx.map +1 -1
  9. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts +4 -1
  10. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -1
  11. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.jsx +18 -2
  12. package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.jsx.map +1 -1
  13. package/jsx/build/FlowModeller/FlowModeller.mocks.d.ts +19 -2
  14. package/jsx/build/FlowModeller/FlowModeller.mocks.d.ts.map +1 -1
  15. package/jsx/build/FlowModeller/{FlowModeller.mocks.js → FlowModeller.mocks.jsx} +71 -7
  16. package/jsx/build/FlowModeller/FlowModeller.mocks.jsx.map +1 -0
  17. package/jsx/build/FlowModeller/FlowModeller.stories.d.ts +2 -7
  18. package/jsx/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -1
  19. package/jsx/build/FlowModeller/FlowModeller.stories.jsx +14 -100
  20. package/jsx/build/FlowModeller/FlowModeller.stories.jsx.map +1 -1
  21. package/jsx/build/FlowModeller/FlowModeller.styles.d.ts +2 -0
  22. package/jsx/build/FlowModeller/FlowModeller.styles.d.ts.map +1 -0
  23. package/jsx/build/FlowModeller/FlowModeller.styles.js +8 -0
  24. package/jsx/build/FlowModeller/FlowModeller.styles.js.map +1 -0
  25. package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts +2 -5
  26. package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -1
  27. package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx.map +1 -1
  28. package/jsx/build/LifeCycle/LifeCycle.stories.d.ts +2 -4
  29. package/jsx/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
  30. package/jsx/build/LifeCycle/LifeCycle.stories.jsx.map +1 -1
  31. package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts +40 -0
  32. package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -0
  33. package/jsx/build/ObjectSelect/ObjectSelect.mocks.jsx +315 -0
  34. package/jsx/build/ObjectSelect/ObjectSelect.mocks.jsx.map +1 -0
  35. package/jsx/build/ObjectSelect/ObjectSelect.stories.d.ts +9 -0
  36. package/jsx/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -0
  37. package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx +137 -0
  38. package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx.map +1 -0
  39. package/jsx/build/ObjectSelect/ObjectSelect.styles.d.ts +4 -0
  40. package/jsx/build/ObjectSelect/ObjectSelect.styles.d.ts.map +1 -0
  41. package/jsx/build/ObjectSelect/ObjectSelect.styles.js +27 -0
  42. package/jsx/build/ObjectSelect/ObjectSelect.styles.js.map +1 -0
  43. package/jsx/build/PageTemplates/GalleryPage.mocks.d.ts +45 -0
  44. package/jsx/build/PageTemplates/GalleryPage.mocks.d.ts.map +1 -0
  45. package/jsx/build/PageTemplates/GalleryPage.mocks.jsx +78 -0
  46. package/jsx/build/PageTemplates/GalleryPage.mocks.jsx.map +1 -0
  47. package/jsx/build/PageTemplates/GalleryPage.stories.d.ts +1 -0
  48. package/jsx/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -1
  49. package/jsx/build/PageTemplates/GalleryPage.stories.jsx +3 -79
  50. package/jsx/build/PageTemplates/GalleryPage.stories.jsx.map +1 -1
  51. package/jsx/build/PageTemplates/PageTemplates.mocks.d.ts +11 -0
  52. package/jsx/build/PageTemplates/PageTemplates.mocks.d.ts.map +1 -0
  53. package/jsx/build/PageTemplates/PageTemplates.mocks.jsx +129 -0
  54. package/jsx/build/PageTemplates/PageTemplates.mocks.jsx.map +1 -0
  55. package/jsx/build/PageTemplates/PageTemplates.stories.d.ts +1 -0
  56. package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  57. package/jsx/build/PageTemplates/PageTemplates.stories.jsx +4 -129
  58. package/jsx/build/PageTemplates/PageTemplates.stories.jsx.map +1 -1
  59. package/jsx/build/Workbench/Workbench.stories.d.ts.map +1 -1
  60. package/jsx/build/Workbench/Workbench.stories.jsx +3 -14
  61. package/jsx/build/Workbench/Workbench.stories.jsx.map +1 -1
  62. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts +3 -0
  63. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts.map +1 -0
  64. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js +13 -0
  65. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js.map +1 -0
  66. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +16 -8
  67. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts.map +1 -1
  68. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx +59 -56
  69. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx.map +1 -1
  70. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts +5 -0
  71. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts.map +1 -0
  72. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.js +15 -0
  73. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.js.map +1 -0
  74. package/jsx/core/AppShell/AppShell.stories.d.ts +1 -0
  75. package/jsx/core/AppShell/AppShell.stories.d.ts.map +1 -1
  76. package/jsx/core/AppShell/AppShell.stories.jsx +3 -1
  77. package/jsx/core/AppShell/AppShell.stories.jsx.map +1 -1
  78. package/jsx/core/Button/Button.stories.jsx +6 -6
  79. package/jsx/core/Button/Button.stories.jsx.map +1 -1
  80. package/jsx/core/ColorPicker/ColorPicker.stories.d.ts.map +1 -1
  81. package/jsx/core/ColorPicker/ColorPicker.stories.jsx +2 -10
  82. package/jsx/core/ColorPicker/ColorPicker.stories.jsx.map +1 -1
  83. package/jsx/core/ColorPicker/ColorPicker.styles.d.ts +4 -0
  84. package/jsx/core/ColorPicker/ColorPicker.styles.d.ts.map +1 -0
  85. package/jsx/core/ColorPicker/ColorPicker.styles.js +11 -0
  86. package/jsx/core/ColorPicker/ColorPicker.styles.js.map +1 -0
  87. package/jsx/core/Configuration/Configuration.mocks.d.ts +7 -0
  88. package/jsx/core/Configuration/Configuration.mocks.d.ts.map +1 -0
  89. package/jsx/core/Configuration/Configuration.mocks.jsx +9 -0
  90. package/jsx/core/Configuration/Configuration.mocks.jsx.map +1 -0
  91. package/jsx/core/Configuration/Configuration.stories.d.ts.map +1 -1
  92. package/jsx/core/Configuration/Configuration.stories.jsx +2 -18
  93. package/jsx/core/Configuration/Configuration.stories.jsx.map +1 -1
  94. package/jsx/core/Configuration/Configuration.styles.d.ts +6 -0
  95. package/jsx/core/Configuration/Configuration.styles.d.ts.map +1 -0
  96. package/jsx/core/Configuration/Configuration.styles.js +12 -0
  97. package/jsx/core/Configuration/Configuration.styles.js.map +1 -0
  98. package/jsx/core/DateTime/DateTime.stories.d.ts.map +1 -1
  99. package/jsx/core/DateTime/DateTime.stories.jsx +1 -0
  100. package/jsx/core/DateTime/DateTime.stories.jsx.map +1 -1
  101. package/jsx/core/FieldGroup/FieldGroup.stories.d.ts +2 -0
  102. package/jsx/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -1
  103. package/jsx/core/FieldGroup/FieldGroup.stories.jsx +8 -4
  104. package/jsx/core/FieldGroup/FieldGroup.stories.jsx.map +1 -1
  105. package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts +4 -0
  106. package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -1
  107. package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx +70 -2
  108. package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +1 -1
  109. package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts +9 -8
  110. package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
  111. package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +51 -88
  112. package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -1
  113. package/jsx/core/File/FileDisplay.stories.d.ts.map +1 -1
  114. package/jsx/core/File/FileDisplay.stories.jsx +16 -38
  115. package/jsx/core/File/FileDisplay.stories.jsx.map +1 -1
  116. package/jsx/core/HTML/HTML.stories.d.ts +6 -0
  117. package/jsx/core/HTML/HTML.stories.d.ts.map +1 -0
  118. package/jsx/core/HTML/HTML.stories.jsx +13 -0
  119. package/jsx/core/HTML/HTML.stories.jsx.map +1 -0
  120. package/jsx/core/Icon/Icon.stories.d.ts.map +1 -1
  121. package/jsx/core/Icon/Icon.stories.jsx +5 -27
  122. package/jsx/core/Icon/Icon.stories.jsx.map +1 -1
  123. package/jsx/core/Icon/Icon.styles.d.ts +4 -0
  124. package/jsx/core/Icon/Icon.styles.d.ts.map +1 -0
  125. package/jsx/core/Icon/Icon.styles.js +25 -0
  126. package/jsx/core/Icon/Icon.styles.js.map +1 -0
  127. package/jsx/core/IconPicker/IconPicker.stories.jsx +1 -1
  128. package/jsx/core/IconPicker/IconPicker.stories.jsx.map +1 -1
  129. package/jsx/core/Link/Link.stories.d.ts +1 -11
  130. package/jsx/core/Link/Link.stories.d.ts.map +1 -1
  131. package/jsx/core/Link/Link.stories.jsx.map +1 -1
  132. package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts +9 -0
  133. package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts.map +1 -0
  134. package/jsx/core/ListToolbar/ListToolbar.mocks.jsx +71 -0
  135. package/jsx/core/ListToolbar/ListToolbar.mocks.jsx.map +1 -0
  136. package/jsx/core/ListToolbar/ListToolbar.stories.d.ts +7 -0
  137. package/jsx/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -0
  138. package/jsx/core/ListToolbar/ListToolbar.stories.jsx +87 -0
  139. package/jsx/core/ListToolbar/ListToolbar.stories.jsx.map +1 -0
  140. package/jsx/core/Number/Number.stories.d.ts.map +1 -1
  141. package/jsx/core/Number/Number.stories.jsx +2 -0
  142. package/jsx/core/Number/Number.stories.jsx.map +1 -1
  143. package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  144. package/jsx/core/PageTemplates/PageTemplates.stories.jsx +1 -11
  145. package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
  146. package/jsx/core/PageTemplates/PageTemplates.styles.d.ts +1 -0
  147. package/jsx/core/PageTemplates/PageTemplates.styles.d.ts.map +1 -1
  148. package/jsx/core/PageTemplates/PageTemplates.styles.js +9 -0
  149. package/jsx/core/PageTemplates/PageTemplates.styles.js.map +1 -1
  150. package/jsx/core/Tooltip/Tooltip.stories.d.ts +2 -5
  151. package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
  152. package/jsx/core/Tooltip/Tooltip.stories.jsx.map +1 -1
  153. package/jsx/core/Tree/Tree.stories.d.ts.map +1 -1
  154. package/jsx/core/Tree/Tree.stories.jsx +2 -2
  155. package/jsx/core/Tree/Tree.stories.jsx.map +1 -1
  156. package/jsx/cs/Article/Article.stories.d.ts +2 -10
  157. package/jsx/cs/Article/Article.stories.d.ts.map +1 -1
  158. package/jsx/cs/Article/Article.stories.jsx.map +1 -1
  159. package/jsx/cs/ArticleList/ArticleList.stories.d.ts +2 -11
  160. package/jsx/cs/ArticleList/ArticleList.stories.d.ts.map +1 -1
  161. package/jsx/cs/ArticleList/ArticleList.stories.jsx +2 -1
  162. package/jsx/cs/ArticleList/ArticleList.stories.jsx.map +1 -1
  163. package/jsx/cs/CSCaseView/CSAppShell.stories.d.ts +2 -36
  164. package/jsx/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -1
  165. package/jsx/cs/CSCaseView/CSAppShell.stories.jsx +6 -33
  166. package/jsx/cs/CSCaseView/CSAppShell.stories.jsx.map +1 -1
  167. package/jsx/cs/CSCaseView/CSCaseView.mocks.d.ts +9 -0
  168. package/jsx/cs/CSCaseView/CSCaseView.mocks.d.ts.map +1 -1
  169. package/jsx/cs/CSCaseView/{CSCaseView.mocks.js → CSCaseView.mocks.jsx} +30 -1
  170. package/jsx/cs/CSCaseView/CSCaseView.mocks.jsx.map +1 -0
  171. package/jsx/cs/CallControlPanel/CallControlPanel.stories.d.ts +2 -2
  172. package/jsx/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +1 -1
  173. package/jsx/cs/CallControlPanel/CallControlPanel.stories.jsx +4 -4
  174. package/jsx/cs/CallControlPanel/CallControlPanel.stories.jsx.map +1 -1
  175. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts +2 -8
  176. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
  177. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +3 -3
  178. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -1
  179. package/jsx/cs/InteractionNotification/InteractionNotification.stories.d.ts +7 -6
  180. package/jsx/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -1
  181. package/jsx/cs/InteractionNotification/InteractionNotification.stories.jsx +13 -5
  182. package/jsx/cs/InteractionNotification/InteractionNotification.stories.jsx.map +1 -1
  183. package/jsx/cs/InteractionTimer/InteractionTimer.mocks.d.ts +11 -0
  184. package/jsx/cs/InteractionTimer/InteractionTimer.mocks.d.ts.map +1 -0
  185. package/jsx/cs/InteractionTimer/InteractionTimer.mocks.js +29 -0
  186. package/jsx/cs/InteractionTimer/InteractionTimer.mocks.js.map +1 -0
  187. package/jsx/cs/InteractionTimer/InteractionTimer.stories.d.ts +2 -7
  188. package/jsx/cs/InteractionTimer/InteractionTimer.stories.d.ts.map +1 -1
  189. package/jsx/cs/InteractionTimer/InteractionTimer.stories.jsx +6 -30
  190. package/jsx/cs/InteractionTimer/InteractionTimer.stories.jsx.map +1 -1
  191. package/jsx/cs/TaskManager/TaskManager.mocks.d.ts +6 -0
  192. package/jsx/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
  193. package/jsx/cs/TaskManager/TaskManager.mocks.js +7 -0
  194. package/jsx/cs/TaskManager/TaskManager.mocks.js.map +1 -1
  195. package/jsx/cs/TaskManager/TaskManager.stories.d.ts +6 -5
  196. package/jsx/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
  197. package/jsx/cs/TaskManager/TaskManager.stories.jsx +25 -29
  198. package/jsx/cs/TaskManager/TaskManager.stories.jsx.map +1 -1
  199. package/jsx/cs/TaskManager/TaskManager.styles.d.ts +3 -0
  200. package/jsx/cs/TaskManager/TaskManager.styles.d.ts.map +1 -0
  201. package/jsx/cs/TaskManager/TaskManager.styles.js +8 -0
  202. package/jsx/cs/TaskManager/TaskManager.styles.js.map +1 -0
  203. package/jsx/dnd/DragDropList/DragDropList.mocks.d.ts +15 -0
  204. package/jsx/dnd/DragDropList/DragDropList.mocks.d.ts.map +1 -0
  205. package/jsx/dnd/DragDropList/DragDropList.mocks.jsx +33 -0
  206. package/jsx/dnd/DragDropList/DragDropList.mocks.jsx.map +1 -0
  207. package/jsx/dnd/DragDropList/DragDropList.stories.d.ts +8 -9
  208. package/jsx/dnd/DragDropList/DragDropList.stories.d.ts.map +1 -1
  209. package/jsx/dnd/DragDropList/DragDropList.stories.jsx +14 -78
  210. package/jsx/dnd/DragDropList/DragDropList.stories.jsx.map +1 -1
  211. package/jsx/dnd/DragDropList/DragDropList.styles.d.ts +6 -0
  212. package/jsx/dnd/DragDropList/DragDropList.styles.d.ts.map +1 -0
  213. package/jsx/dnd/DragDropList/DragDropList.styles.js +32 -0
  214. package/jsx/dnd/DragDropList/DragDropList.styles.js.map +1 -0
  215. package/jsx/rte/Editor/Editor.mocks.d.ts +6 -0
  216. package/jsx/rte/Editor/Editor.mocks.d.ts.map +1 -0
  217. package/jsx/rte/Editor/Editor.mocks.jsx +20 -0
  218. package/jsx/rte/Editor/Editor.mocks.jsx.map +1 -0
  219. package/jsx/rte/Editor/Editor.stories.d.ts.map +1 -1
  220. package/jsx/rte/Editor/Editor.stories.jsx +2 -20
  221. package/jsx/rte/Editor/Editor.stories.jsx.map +1 -1
  222. package/jsx/rte/RichTextEditor/RichTextEditor.stories.d.ts +2 -3
  223. package/jsx/rte/RichTextEditor/RichTextEditor.stories.d.ts.map +1 -1
  224. package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx.map +1 -1
  225. package/jsx/social/Chat/RepeatingView.mocks.d.ts +14 -0
  226. package/jsx/social/Chat/RepeatingView.mocks.d.ts.map +1 -0
  227. package/jsx/social/Chat/RepeatingView.mocks.js +11 -0
  228. package/jsx/social/Chat/RepeatingView.mocks.js.map +1 -0
  229. package/jsx/social/Chat/RepeatingView.stories.d.ts +6 -17
  230. package/jsx/social/Chat/RepeatingView.stories.d.ts.map +1 -1
  231. package/jsx/social/Chat/RepeatingView.stories.jsx +16 -46
  232. package/jsx/social/Chat/RepeatingView.stories.jsx.map +1 -1
  233. package/jsx/social/Chat/RepeatingView.styles.d.ts +2 -0
  234. package/jsx/social/Chat/RepeatingView.styles.d.ts.map +1 -0
  235. package/jsx/social/Chat/RepeatingView.styles.js +22 -0
  236. package/jsx/social/Chat/RepeatingView.styles.js.map +1 -0
  237. package/jsx/social/Email/Email.mocks.d.ts +155 -2
  238. package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
  239. package/jsx/social/Email/Email.mocks.jsx +756 -0
  240. package/jsx/social/Email/Email.mocks.jsx.map +1 -0
  241. package/jsx/social/Email/Email.stories.d.ts +14 -14
  242. package/jsx/social/Email/Email.stories.d.ts.map +1 -1
  243. package/jsx/social/Email/Email.stories.jsx +115 -407
  244. package/jsx/social/Email/Email.stories.jsx.map +1 -1
  245. package/jsx/social/Email/Email.styles.d.ts +4 -0
  246. package/jsx/social/Email/Email.styles.d.ts.map +1 -0
  247. package/jsx/social/Email/Email.styles.js +14 -0
  248. package/jsx/social/Email/Email.styles.js.map +1 -0
  249. package/jsx/social/Feed/Feed.stories.d.ts.map +1 -1
  250. package/jsx/social/Feed/Feed.stories.jsx +23 -18
  251. package/jsx/social/Feed/Feed.stories.jsx.map +1 -1
  252. package/jsx/social/Feed/FeedPost.stories.d.ts.map +1 -1
  253. package/jsx/social/Feed/FeedPost.stories.jsx +30 -20
  254. package/jsx/social/Feed/FeedPost.stories.jsx.map +1 -1
  255. package/jsx/social/Feed/FeedReply.stories.d.ts.map +1 -1
  256. package/jsx/social/Feed/FeedReply.stories.jsx +21 -16
  257. package/jsx/social/Feed/FeedReply.stories.jsx.map +1 -1
  258. package/jsx/work/CaseView/MobileCaseView.stories.d.ts +2 -7
  259. package/jsx/work/CaseView/MobileCaseView.stories.d.ts.map +1 -1
  260. package/jsx/work/CaseView/MobileCaseView.stories.jsx.map +1 -1
  261. package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts +45 -0
  262. package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts.map +1 -0
  263. package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.jsx +166 -0
  264. package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.jsx.map +1 -0
  265. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts +2 -6
  266. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -1
  267. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx +2 -174
  268. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx.map +1 -1
  269. package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts +4 -0
  270. package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts.map +1 -0
  271. package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.js +11 -0
  272. package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.js.map +1 -0
  273. package/jsx/work/Timeline/Timeline.stories.d.ts +2 -0
  274. package/jsx/work/Timeline/Timeline.stories.d.ts.map +1 -1
  275. package/jsx/work/Timeline/Timeline.stories.jsx +28 -1
  276. package/jsx/work/Timeline/Timeline.stories.jsx.map +1 -1
  277. package/lib/build/AppShell/AppShell.mocks.d.ts +17 -0
  278. package/lib/build/AppShell/AppShell.mocks.d.ts.map +1 -1
  279. package/lib/build/AppShell/AppShell.mocks.js +16 -0
  280. package/lib/build/AppShell/AppShell.mocks.js.map +1 -1
  281. package/lib/build/AppShell/AppShell.stories.d.ts +2 -0
  282. package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -1
  283. package/lib/build/AppShell/AppShell.stories.js +3 -18
  284. package/lib/build/AppShell/AppShell.stories.js.map +1 -1
  285. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts +4 -1
  286. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -1
  287. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js +18 -2
  288. package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js.map +1 -1
  289. package/lib/build/FlowModeller/FlowModeller.mocks.d.ts +19 -2
  290. package/lib/build/FlowModeller/FlowModeller.mocks.d.ts.map +1 -1
  291. package/lib/build/FlowModeller/FlowModeller.mocks.js +58 -6
  292. package/lib/build/FlowModeller/FlowModeller.mocks.js.map +1 -1
  293. package/lib/build/FlowModeller/FlowModeller.stories.d.ts +2 -7
  294. package/lib/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -1
  295. package/lib/build/FlowModeller/FlowModeller.stories.js +15 -90
  296. package/lib/build/FlowModeller/FlowModeller.stories.js.map +1 -1
  297. package/lib/build/FlowModeller/FlowModeller.styles.d.ts +2 -0
  298. package/lib/build/FlowModeller/FlowModeller.styles.d.ts.map +1 -0
  299. package/lib/build/FlowModeller/FlowModeller.styles.js +8 -0
  300. package/lib/build/FlowModeller/FlowModeller.styles.js.map +1 -0
  301. package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts +2 -5
  302. package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -1
  303. package/lib/build/ItemLibrary/LibraryPicker.stories.js.map +1 -1
  304. package/lib/build/LifeCycle/LifeCycle.stories.d.ts +2 -4
  305. package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
  306. package/lib/build/LifeCycle/LifeCycle.stories.js.map +1 -1
  307. package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts +40 -0
  308. package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -0
  309. package/lib/build/ObjectSelect/ObjectSelect.mocks.js +272 -0
  310. package/lib/build/ObjectSelect/ObjectSelect.mocks.js.map +1 -0
  311. package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts +9 -0
  312. package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -0
  313. package/lib/build/ObjectSelect/ObjectSelect.stories.js +123 -0
  314. package/lib/build/ObjectSelect/ObjectSelect.stories.js.map +1 -0
  315. package/lib/build/ObjectSelect/ObjectSelect.styles.d.ts +4 -0
  316. package/lib/build/ObjectSelect/ObjectSelect.styles.d.ts.map +1 -0
  317. package/lib/build/ObjectSelect/ObjectSelect.styles.js +27 -0
  318. package/lib/build/ObjectSelect/ObjectSelect.styles.js.map +1 -0
  319. package/lib/build/PageTemplates/GalleryPage.mocks.d.ts +45 -0
  320. package/lib/build/PageTemplates/GalleryPage.mocks.d.ts.map +1 -0
  321. package/lib/build/PageTemplates/GalleryPage.mocks.js +79 -0
  322. package/lib/build/PageTemplates/GalleryPage.mocks.js.map +1 -0
  323. package/lib/build/PageTemplates/GalleryPage.stories.d.ts +1 -0
  324. package/lib/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -1
  325. package/lib/build/PageTemplates/GalleryPage.stories.js +3 -79
  326. package/lib/build/PageTemplates/GalleryPage.stories.js.map +1 -1
  327. package/lib/build/PageTemplates/PageTemplates.mocks.d.ts +11 -0
  328. package/lib/build/PageTemplates/PageTemplates.mocks.d.ts.map +1 -0
  329. package/lib/build/PageTemplates/PageTemplates.mocks.js +96 -0
  330. package/lib/build/PageTemplates/PageTemplates.mocks.js.map +1 -0
  331. package/lib/build/PageTemplates/PageTemplates.stories.d.ts +1 -0
  332. package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  333. package/lib/build/PageTemplates/PageTemplates.stories.js +5 -95
  334. package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -1
  335. package/lib/build/Workbench/Workbench.stories.d.ts.map +1 -1
  336. package/lib/build/Workbench/Workbench.stories.js +3 -14
  337. package/lib/build/Workbench/Workbench.stories.js.map +1 -1
  338. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts +3 -0
  339. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts.map +1 -0
  340. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js +13 -0
  341. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js.map +1 -0
  342. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +16 -8
  343. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts.map +1 -1
  344. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.js +56 -54
  345. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.js.map +1 -1
  346. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts +5 -0
  347. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts.map +1 -0
  348. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.styles.js +15 -0
  349. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.styles.js.map +1 -0
  350. package/lib/core/AppShell/AppShell.stories.d.ts +1 -0
  351. package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -1
  352. package/lib/core/AppShell/AppShell.stories.js +3 -1
  353. package/lib/core/AppShell/AppShell.stories.js.map +1 -1
  354. package/lib/core/Button/Button.stories.js +2 -2
  355. package/lib/core/Button/Button.stories.js.map +1 -1
  356. package/lib/core/ColorPicker/ColorPicker.stories.d.ts.map +1 -1
  357. package/lib/core/ColorPicker/ColorPicker.stories.js +2 -10
  358. package/lib/core/ColorPicker/ColorPicker.stories.js.map +1 -1
  359. package/lib/core/ColorPicker/ColorPicker.styles.d.ts +4 -0
  360. package/lib/core/ColorPicker/ColorPicker.styles.d.ts.map +1 -0
  361. package/lib/core/ColorPicker/ColorPicker.styles.js +11 -0
  362. package/lib/core/ColorPicker/ColorPicker.styles.js.map +1 -0
  363. package/lib/core/Configuration/Configuration.mocks.d.ts +7 -0
  364. package/lib/core/Configuration/Configuration.mocks.d.ts.map +1 -0
  365. package/lib/core/Configuration/Configuration.mocks.js +6 -0
  366. package/lib/core/Configuration/Configuration.mocks.js.map +1 -0
  367. package/lib/core/Configuration/Configuration.stories.d.ts.map +1 -1
  368. package/lib/core/Configuration/Configuration.stories.js +3 -15
  369. package/lib/core/Configuration/Configuration.stories.js.map +1 -1
  370. package/lib/core/Configuration/Configuration.styles.d.ts +6 -0
  371. package/lib/core/Configuration/Configuration.styles.d.ts.map +1 -0
  372. package/lib/core/Configuration/Configuration.styles.js +12 -0
  373. package/lib/core/Configuration/Configuration.styles.js.map +1 -0
  374. package/lib/core/DateTime/DateTime.stories.d.ts.map +1 -1
  375. package/lib/core/DateTime/DateTime.stories.js +2 -0
  376. package/lib/core/DateTime/DateTime.stories.js.map +1 -1
  377. package/lib/core/FieldGroup/FieldGroup.stories.d.ts +2 -0
  378. package/lib/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -1
  379. package/lib/core/FieldGroup/FieldGroup.stories.js +7 -3
  380. package/lib/core/FieldGroup/FieldGroup.stories.js.map +1 -1
  381. package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts +4 -0
  382. package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -1
  383. package/lib/core/FieldGroup/FieldGroupList.mocks.js +47 -3
  384. package/lib/core/FieldGroup/FieldGroupList.mocks.js.map +1 -1
  385. package/lib/core/FieldGroup/FieldGroupList.stories.d.ts +9 -8
  386. package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
  387. package/lib/core/FieldGroup/FieldGroupList.stories.js +52 -65
  388. package/lib/core/FieldGroup/FieldGroupList.stories.js.map +1 -1
  389. package/lib/core/File/FileDisplay.stories.d.ts.map +1 -1
  390. package/lib/core/File/FileDisplay.stories.js +17 -29
  391. package/lib/core/File/FileDisplay.stories.js.map +1 -1
  392. package/lib/core/HTML/HTML.stories.d.ts +6 -0
  393. package/lib/core/HTML/HTML.stories.d.ts.map +1 -0
  394. package/lib/core/HTML/HTML.stories.js +14 -0
  395. package/lib/core/HTML/HTML.stories.js.map +1 -0
  396. package/lib/core/Icon/Icon.stories.d.ts.map +1 -1
  397. package/lib/core/Icon/Icon.stories.js +6 -29
  398. package/lib/core/Icon/Icon.stories.js.map +1 -1
  399. package/lib/core/Icon/Icon.styles.d.ts +4 -0
  400. package/lib/core/Icon/Icon.styles.d.ts.map +1 -0
  401. package/lib/core/Icon/Icon.styles.js +25 -0
  402. package/lib/core/Icon/Icon.styles.js.map +1 -0
  403. package/lib/core/IconPicker/IconPicker.stories.js +1 -1
  404. package/lib/core/IconPicker/IconPicker.stories.js.map +1 -1
  405. package/lib/core/Link/Link.stories.d.ts +1 -11
  406. package/lib/core/Link/Link.stories.d.ts.map +1 -1
  407. package/lib/core/Link/Link.stories.js.map +1 -1
  408. package/lib/core/ListToolbar/ListToolbar.mocks.d.ts +9 -0
  409. package/lib/core/ListToolbar/ListToolbar.mocks.d.ts.map +1 -0
  410. package/lib/core/ListToolbar/ListToolbar.mocks.js +50 -0
  411. package/lib/core/ListToolbar/ListToolbar.mocks.js.map +1 -0
  412. package/lib/core/ListToolbar/ListToolbar.stories.d.ts +7 -0
  413. package/lib/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -0
  414. package/lib/core/ListToolbar/ListToolbar.stories.js +79 -0
  415. package/lib/core/ListToolbar/ListToolbar.stories.js.map +1 -0
  416. package/lib/core/Number/Number.stories.d.ts.map +1 -1
  417. package/lib/core/Number/Number.stories.js +2 -0
  418. package/lib/core/Number/Number.stories.js.map +1 -1
  419. package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  420. package/lib/core/PageTemplates/PageTemplates.stories.js +1 -11
  421. package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
  422. package/lib/core/PageTemplates/PageTemplates.styles.d.ts +1 -0
  423. package/lib/core/PageTemplates/PageTemplates.styles.d.ts.map +1 -1
  424. package/lib/core/PageTemplates/PageTemplates.styles.js +9 -0
  425. package/lib/core/PageTemplates/PageTemplates.styles.js.map +1 -1
  426. package/lib/core/Tooltip/Tooltip.stories.d.ts +2 -5
  427. package/lib/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
  428. package/lib/core/Tooltip/Tooltip.stories.js.map +1 -1
  429. package/lib/core/Tree/Tree.stories.d.ts.map +1 -1
  430. package/lib/core/Tree/Tree.stories.js +2 -2
  431. package/lib/core/Tree/Tree.stories.js.map +1 -1
  432. package/lib/cs/Article/Article.stories.d.ts +2 -10
  433. package/lib/cs/Article/Article.stories.d.ts.map +1 -1
  434. package/lib/cs/Article/Article.stories.js.map +1 -1
  435. package/lib/cs/ArticleList/ArticleList.stories.d.ts +2 -11
  436. package/lib/cs/ArticleList/ArticleList.stories.d.ts.map +1 -1
  437. package/lib/cs/ArticleList/ArticleList.stories.js +2 -1
  438. package/lib/cs/ArticleList/ArticleList.stories.js.map +1 -1
  439. package/lib/cs/CSCaseView/CSAppShell.stories.d.ts +2 -36
  440. package/lib/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -1
  441. package/lib/cs/CSCaseView/CSAppShell.stories.js +6 -19
  442. package/lib/cs/CSCaseView/CSAppShell.stories.js.map +1 -1
  443. package/lib/cs/CSCaseView/CSCaseView.mocks.d.ts +9 -0
  444. package/lib/cs/CSCaseView/CSCaseView.mocks.d.ts.map +1 -1
  445. package/lib/cs/CSCaseView/CSCaseView.mocks.js +16 -0
  446. package/lib/cs/CSCaseView/CSCaseView.mocks.js.map +1 -1
  447. package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts +2 -2
  448. package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +1 -1
  449. package/lib/cs/CallControlPanel/CallControlPanel.stories.js +4 -4
  450. package/lib/cs/CallControlPanel/CallControlPanel.stories.js.map +1 -1
  451. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts +2 -8
  452. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
  453. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js +3 -3
  454. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -1
  455. package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts +7 -6
  456. package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -1
  457. package/lib/cs/InteractionNotification/InteractionNotification.stories.js +13 -5
  458. package/lib/cs/InteractionNotification/InteractionNotification.stories.js.map +1 -1
  459. package/lib/cs/InteractionTimer/InteractionTimer.mocks.d.ts +11 -0
  460. package/lib/cs/InteractionTimer/InteractionTimer.mocks.d.ts.map +1 -0
  461. package/lib/cs/InteractionTimer/InteractionTimer.mocks.js +29 -0
  462. package/lib/cs/InteractionTimer/InteractionTimer.mocks.js.map +1 -0
  463. package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts +2 -7
  464. package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts.map +1 -1
  465. package/lib/cs/InteractionTimer/InteractionTimer.stories.js +6 -30
  466. package/lib/cs/InteractionTimer/InteractionTimer.stories.js.map +1 -1
  467. package/lib/cs/TaskManager/TaskManager.mocks.d.ts +6 -0
  468. package/lib/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
  469. package/lib/cs/TaskManager/TaskManager.mocks.js +7 -0
  470. package/lib/cs/TaskManager/TaskManager.mocks.js.map +1 -1
  471. package/lib/cs/TaskManager/TaskManager.stories.d.ts +6 -5
  472. package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
  473. package/lib/cs/TaskManager/TaskManager.stories.js +25 -29
  474. package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -1
  475. package/lib/cs/TaskManager/TaskManager.styles.d.ts +3 -0
  476. package/lib/cs/TaskManager/TaskManager.styles.d.ts.map +1 -0
  477. package/lib/cs/TaskManager/TaskManager.styles.js +8 -0
  478. package/lib/cs/TaskManager/TaskManager.styles.js.map +1 -0
  479. package/lib/dnd/DragDropList/DragDropList.mocks.d.ts +15 -0
  480. package/lib/dnd/DragDropList/DragDropList.mocks.d.ts.map +1 -0
  481. package/lib/dnd/DragDropList/DragDropList.mocks.js +32 -0
  482. package/lib/dnd/DragDropList/DragDropList.mocks.js.map +1 -0
  483. package/lib/dnd/DragDropList/DragDropList.stories.d.ts +8 -9
  484. package/lib/dnd/DragDropList/DragDropList.stories.d.ts.map +1 -1
  485. package/lib/dnd/DragDropList/DragDropList.stories.js +14 -85
  486. package/lib/dnd/DragDropList/DragDropList.stories.js.map +1 -1
  487. package/lib/dnd/DragDropList/DragDropList.styles.d.ts +6 -0
  488. package/lib/dnd/DragDropList/DragDropList.styles.d.ts.map +1 -0
  489. package/lib/dnd/DragDropList/DragDropList.styles.js +32 -0
  490. package/lib/dnd/DragDropList/DragDropList.styles.js.map +1 -0
  491. package/lib/rte/Editor/Editor.mocks.d.ts +6 -0
  492. package/lib/rte/Editor/Editor.mocks.d.ts.map +1 -0
  493. package/lib/rte/Editor/Editor.mocks.js +23 -0
  494. package/lib/rte/Editor/Editor.mocks.js.map +1 -0
  495. package/lib/rte/Editor/Editor.stories.d.ts.map +1 -1
  496. package/lib/rte/Editor/Editor.stories.js +2 -22
  497. package/lib/rte/Editor/Editor.stories.js.map +1 -1
  498. package/lib/rte/RichTextEditor/RichTextEditor.stories.d.ts +2 -3
  499. package/lib/rte/RichTextEditor/RichTextEditor.stories.d.ts.map +1 -1
  500. package/lib/rte/RichTextEditor/RichTextEditor.stories.js.map +1 -1
  501. package/lib/social/Chat/RepeatingView.mocks.d.ts +14 -0
  502. package/lib/social/Chat/RepeatingView.mocks.d.ts.map +1 -0
  503. package/lib/social/Chat/RepeatingView.mocks.js +11 -0
  504. package/lib/social/Chat/RepeatingView.mocks.js.map +1 -0
  505. package/lib/social/Chat/RepeatingView.stories.d.ts +6 -17
  506. package/lib/social/Chat/RepeatingView.stories.d.ts.map +1 -1
  507. package/lib/social/Chat/RepeatingView.stories.js +16 -46
  508. package/lib/social/Chat/RepeatingView.stories.js.map +1 -1
  509. package/lib/social/Chat/RepeatingView.styles.d.ts +2 -0
  510. package/lib/social/Chat/RepeatingView.styles.d.ts.map +1 -0
  511. package/lib/social/Chat/RepeatingView.styles.js +22 -0
  512. package/lib/social/Chat/RepeatingView.styles.js.map +1 -0
  513. package/lib/social/Email/Email.mocks.d.ts +155 -2
  514. package/lib/social/Email/Email.mocks.d.ts.map +1 -1
  515. package/lib/social/Email/Email.mocks.js +361 -0
  516. package/lib/social/Email/Email.mocks.js.map +1 -1
  517. package/lib/social/Email/Email.stories.d.ts +14 -14
  518. package/lib/social/Email/Email.stories.d.ts.map +1 -1
  519. package/lib/social/Email/Email.stories.js +117 -423
  520. package/lib/social/Email/Email.stories.js.map +1 -1
  521. package/lib/social/Email/Email.styles.d.ts +4 -0
  522. package/lib/social/Email/Email.styles.d.ts.map +1 -0
  523. package/lib/social/Email/Email.styles.js +14 -0
  524. package/lib/social/Email/Email.styles.js.map +1 -0
  525. package/lib/social/Feed/Feed.stories.d.ts.map +1 -1
  526. package/lib/social/Feed/Feed.stories.js +23 -18
  527. package/lib/social/Feed/Feed.stories.js.map +1 -1
  528. package/lib/social/Feed/FeedPost.stories.d.ts.map +1 -1
  529. package/lib/social/Feed/FeedPost.stories.js +30 -20
  530. package/lib/social/Feed/FeedPost.stories.js.map +1 -1
  531. package/lib/social/Feed/FeedReply.stories.d.ts.map +1 -1
  532. package/lib/social/Feed/FeedReply.stories.js +21 -16
  533. package/lib/social/Feed/FeedReply.stories.js.map +1 -1
  534. package/lib/work/CaseView/MobileCaseView.stories.d.ts +2 -7
  535. package/lib/work/CaseView/MobileCaseView.stories.d.ts.map +1 -1
  536. package/lib/work/CaseView/MobileCaseView.stories.js.map +1 -1
  537. package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts +45 -0
  538. package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts.map +1 -0
  539. package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.js +165 -0
  540. package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.js.map +1 -0
  541. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts +2 -6
  542. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -1
  543. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js +2 -172
  544. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js.map +1 -1
  545. package/lib/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts +4 -0
  546. package/lib/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts.map +1 -0
  547. package/lib/work/ConfigurableLayout/ConfigurableLayout.styles.js +11 -0
  548. package/lib/work/ConfigurableLayout/ConfigurableLayout.styles.js.map +1 -0
  549. package/lib/work/Timeline/Timeline.stories.d.ts +2 -0
  550. package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -1
  551. package/lib/work/Timeline/Timeline.stories.js +22 -2
  552. package/lib/work/Timeline/Timeline.stories.js.map +1 -1
  553. package/package.json +16 -17
  554. package/jsx/build/FlowModeller/FlowModeller.mocks.js.map +0 -1
  555. package/jsx/cs/CSCaseView/CSCaseView.mocks.js.map +0 -1
  556. package/jsx/social/Email/Email.mocks.js +0 -395
  557. package/jsx/social/Email/Email.mocks.js.map +0 -1
@@ -0,0 +1,315 @@
1
+ import { useState } from 'react';
2
+ import { AtomicCondition, getInitConditionForLhs, formatCondition } from '@pega/cosmos-react-condition-builder';
3
+ import { Button, Flex, Input, Card, CardContent, Drawer, Text, FieldValueList, Icon, menuHelpers, useI18n } from '@pega/cosmos-react-core';
4
+ import { ObjectSelect } from '@pega/cosmos-react-build';
5
+ import { StyledDrawerContent, StyledCodeBlock } from './ObjectSelect.styles';
6
+ export const skeletonData = [
7
+ {
8
+ id: '01-1',
9
+ primary: 'primary-link-1',
10
+ secondary: ['secondary-1'],
11
+ href: 'http://www.pega.com'
12
+ },
13
+ {
14
+ id: '01-2',
15
+ primary: 'primary-link-2',
16
+ secondary: [
17
+ 'secondary-1',
18
+ 'secondary-2',
19
+ 'secondary-3',
20
+ 'secondary-4',
21
+ 'secondary-5',
22
+ 'secondary-6',
23
+ 'secondary-7',
24
+ 'secondary-8',
25
+ 'secondary-9'
26
+ ],
27
+ href: 'http://www.pega.com'
28
+ },
29
+ {
30
+ id: '01-3',
31
+ primary: 'primary-link-3',
32
+ secondary: ['secondary-1', 'secondary-2'],
33
+ href: 'http://www.pega.com'
34
+ },
35
+ {
36
+ id: '01-4',
37
+ primary: 'primary-link-4',
38
+ secondary: ['secondary-1', 'secondary-2'],
39
+ href: 'http://www.pega.com'
40
+ }
41
+ ];
42
+ export const dataPages = [
43
+ {
44
+ id: '01-1',
45
+ primary: 'MortgageRequestList-DataSource',
46
+ secondary: ['Scope', 'O1XPTI-CCompass-Work-MortgageRequest'],
47
+ href: 'http://www.pega.com'
48
+ },
49
+ {
50
+ id: '01-2',
51
+ primary: 'Credit Scores List Data Source',
52
+ secondary: ['Scope', 'CreditScore'],
53
+ href: 'http://www.pega.com'
54
+ },
55
+ {
56
+ id: '01-3',
57
+ primary: 'GetAutoLoanByIDDataSource',
58
+ secondary: ['Scope', 'O1XPTI-CCompass-Work-AutoLoan'],
59
+ href: 'http://www.pega.com'
60
+ },
61
+ {
62
+ id: '01-4',
63
+ primary: 'DS_pyMyWorkList',
64
+ secondary: ['Scope', 'Assign-Worklist'],
65
+ href: 'http://www.pega.com'
66
+ }
67
+ ];
68
+ export const demoFields = [
69
+ { name: 'employeeId', label: 'Employee ID', type: 'TEXT' },
70
+ { name: 'firstName', label: 'First Name', type: 'TEXT' },
71
+ { name: 'lastName', label: 'Last Name', type: 'TEXT' },
72
+ { name: 'gender', label: 'Gender', type: 'TEXT' },
73
+ {
74
+ name: 'department',
75
+ label: 'Department',
76
+ type: 'TEXT',
77
+ possibleValues: [
78
+ 'Customer Service',
79
+ 'Engineering',
80
+ 'Facilities',
81
+ 'Finance',
82
+ 'HR',
83
+ 'IT',
84
+ 'Sales'
85
+ ]
86
+ },
87
+ { name: 'age', label: 'Age', type: 'NUMBER' },
88
+ { name: 'experience', label: 'Experience (yrs)', type: 'NUMBER' },
89
+ { name: 'salary', label: 'Salary', type: 'NUMBER' },
90
+ { name: 'hireDate', label: 'Hire Date', type: 'DATE_ONLY' },
91
+ { name: 'dateOfBirth', label: 'Date of Birth', type: 'DATE_ONLY' },
92
+ {
93
+ name: 'shiftStartTime',
94
+ label: 'Shift start time',
95
+ type: 'TIME_ONLY',
96
+ groupLabel: 'Technical details'
97
+ },
98
+ {
99
+ name: 'shiftEndTime',
100
+ label: 'Shift end time',
101
+ type: 'TIME_ONLY',
102
+ groupLabel: 'Technical details'
103
+ },
104
+ {
105
+ name: 'lastActivityAt',
106
+ label: 'Last activity at',
107
+ type: 'DATE_TIME',
108
+ groupLabel: 'Technical details'
109
+ },
110
+ {
111
+ name: 'nextPasswordReset',
112
+ label: 'Next password reset',
113
+ type: 'DATE_TIME',
114
+ groupLabel: 'Technical details'
115
+ },
116
+ { name: 'isSeniorCitizen', label: 'Is Senior Citizen', type: 'BOOLEAN' },
117
+ { name: 'isRemoteEmployee', label: 'Is Remote Employee', type: 'BOOLEAN' }
118
+ ];
119
+ export const demoDateFunctions = {
120
+ DATE_TIME: [
121
+ 'YEARS',
122
+ 'QUARTERS',
123
+ 'MONTHS',
124
+ 'WEEKS',
125
+ 'DAYS',
126
+ 'HOURS',
127
+ 'MONTHS_OF_YEAR',
128
+ 'DAYS_OF_MONTH',
129
+ 'DAYS_OF_WEEK'
130
+ ],
131
+ DATE_ONLY: [
132
+ 'YEARS',
133
+ 'QUARTERS',
134
+ 'MONTHS',
135
+ 'WEEKS',
136
+ 'MONTHS_OF_YEAR',
137
+ 'DAYS_OF_MONTH',
138
+ 'DAYS_OF_WEEK'
139
+ ]
140
+ };
141
+ export const initFields = () => {
142
+ const common = { value: undefined, status: undefined };
143
+ return [
144
+ {
145
+ ...common,
146
+ name: 'name',
147
+ required: true,
148
+ error: 'Please enter a valid name for table',
149
+ validator() {
150
+ if (!this.value)
151
+ return false;
152
+ return /^[a-z]{1}[a-z0-9]+$/i.test(this.value);
153
+ }
154
+ },
155
+ {
156
+ ...common,
157
+ name: 'description',
158
+ required: true,
159
+ help: 'Give an appropriate description for the table',
160
+ error: 'Field cannot be empty',
161
+ validator() {
162
+ if (!this.value)
163
+ return false;
164
+ return true;
165
+ }
166
+ }
167
+ ];
168
+ };
169
+ export const fieldReducer = (fields, { target, type }) => {
170
+ return fields.map(field => {
171
+ if (field.name === target.name) {
172
+ field.value = target.value;
173
+ if (type === 'blur' || field.status === 'error') {
174
+ if ((field.required || field.value) && !field.validator()) {
175
+ field.status = 'error';
176
+ field.info = field.error;
177
+ }
178
+ else {
179
+ field.status = undefined;
180
+ field.info = field.help;
181
+ }
182
+ }
183
+ }
184
+ return field;
185
+ });
186
+ };
187
+ export const ViewportDrawer = ({ drawerData, drawerOpen, setDrawerOpen }) => {
188
+ const fields = drawerData?.secondary?.map((data, index) => {
189
+ return {
190
+ id: (index + 1).toString(),
191
+ name: data?.toString() ?? '',
192
+ value: data
193
+ };
194
+ });
195
+ return (<Drawer open={drawerOpen} onOuterClick={() => {
196
+ setDrawerOpen(false);
197
+ }} position='fixed' size='30rem' nullWhenClosed shadow>
198
+ <Flex as={StyledDrawerContent} container={{
199
+ direction: 'column',
200
+ alignItems: 'start',
201
+ gap: 2,
202
+ pad: 4
203
+ }}>
204
+ <Flex container={{ direction: 'column', gap: 1 }}>
205
+ <Flex container={{ gap: 2, alignItems: 'center' }}>
206
+ <Button variant='simple' label='Close drawer' icon onClick={() => setDrawerOpen(false)}>
207
+ <Icon name='times'/>
208
+ </Button>
209
+ <Text variant='h3'>{drawerData?.primary}</Text>
210
+ </Flex>
211
+ <Flex container={{ direction: 'column', gap: 2, pad: 1 }}>
212
+ <Text as='p'>
213
+ This is a mock representation for the parameters of the {drawerData?.primary} rule
214
+ </Text>
215
+ <FieldValueList variant='inline' fields={fields}/>
216
+ </Flex>
217
+ </Flex>
218
+ </Flex>
219
+ </Drawer>);
220
+ };
221
+ export const ConfigurationContent = (args) => {
222
+ const [showErrorIndicators] = useState(false);
223
+ const ConditionBuilder = (<AtomicCondition condition={args.condition} fields={demoFields} indicateErrors={showErrorIndicators} dateFunctions={demoDateFunctions} onChange={c => args.setCondition(c)} itemDirection='row' showLhsAsLabel={false} validRhsTypes={args.validRHSTypes}/>);
224
+ const Inputs = (<Flex container={{ direction: 'column', gap: 2 }}>
225
+ <Text variant='h4'>Inputs</Text>
226
+ <Flex container={{ direction: 'column', gap: 1 }}>
227
+ <Flex container={{ alignItems: 'end', gap: 1 }}>
228
+ <Input label='Name' type='text' defaultValue='Sample key 1' disabled readOnly={args.readOnly}/>
229
+ <Input label='Value' type='text' defaultValue='Sample value 1' readOnly={args.readOnly} disabled={args.disabled}/>
230
+ </Flex>
231
+ <Flex container={{ alignItems: 'end', gap: 1 }}>
232
+ <Input label='Name 2' labelHidden type='text' defaultValue='Sample key 2' disabled readOnly={args.readOnly}/>
233
+ <Input label='Value 2' labelHidden type='text' defaultValue='Sample value 2' readOnly={args.readOnly} disabled={args.disabled}/>
234
+ </Flex>
235
+ </Flex>
236
+ </Flex>);
237
+ return args.popoverContent === 'advanced' ? ConditionBuilder : Inputs;
238
+ };
239
+ export const ObjectSelectComp = ({ popoverContent, ...args }) => {
240
+ const t = useI18n();
241
+ const [drawerOpen, setDrawerOpen] = useState(false);
242
+ const [drawerData, setDrawerData] = useState(dataPages[0]);
243
+ const [value, setValue] = useState(args.value);
244
+ const convertRhsTypes = (useLiteralRHSType, useFieldRHSType, useRelativeDatesType, dateFunctions) => {
245
+ const setRhsTypes = new Set();
246
+ if (useLiteralRHSType)
247
+ setRhsTypes.add('LITERAL');
248
+ if (useFieldRHSType)
249
+ setRhsTypes.add('FIELD');
250
+ if (dateFunctions)
251
+ setRhsTypes.add('DATE_FUNCTION');
252
+ if (useRelativeDatesType)
253
+ setRhsTypes.add('RELATIVE_DATE');
254
+ return setRhsTypes;
255
+ };
256
+ const validRHSTypes = convertRhsTypes(true, true, true, demoDateFunctions);
257
+ const [submitCondition, setSubmitCondition] = useState(undefined);
258
+ const [condition, setCondition] = useState(() => submitCondition ||
259
+ getInitConditionForLhs({ field: 'age' }, demoFields, validRHSTypes, undefined, demoDateFunctions));
260
+ const handleSubmission = () => {
261
+ setSubmitCondition(condition);
262
+ };
263
+ return (<Flex container={{ direction: 'column', gap: 1 }}>
264
+ <ObjectSelect {...args} onChange={id => {
265
+ const data = menuHelpers.getItem(dataPages, id);
266
+ if (data) {
267
+ setValue({
268
+ id: data.id,
269
+ primary: data.primary,
270
+ href: data.href ?? '#',
271
+ meta: data.id !== '01-4' ? data.secondary?.join(' ') : ''
272
+ });
273
+ }
274
+ else
275
+ setValue(undefined);
276
+ }} items={dataPages} configuration={{
277
+ label: args.disabled || args.readOnly ? 'View Configuration' : 'Edit Configuration',
278
+ heading: 'Map Parameters',
279
+ primaryAction: {
280
+ id: 'submit',
281
+ text: 'Submit',
282
+ onClick: popoverContent === 'advanced' ? handleSubmission : args.onSubmit
283
+ },
284
+ secondaryAction: {
285
+ id: 'cancel',
286
+ text: 'Cancel',
287
+ onClick: args.onCancel
288
+ },
289
+ content: (<ConfigurationContent {...args} popoverContent={popoverContent} condition={condition} setCondition={setCondition} validRHSTypes={validRHSTypes}/>)
290
+ }} value={value} onPreview={(id, e) => {
291
+ const data = menuHelpers.getItem(dataPages, id);
292
+ if (data)
293
+ setDrawerData(data);
294
+ setDrawerOpen(true);
295
+ args.onPreview?.(id, e);
296
+ }}/>
297
+ <ViewportDrawer drawerData={drawerData} drawerOpen={drawerOpen} setDrawerOpen={setDrawerOpen}/>
298
+ {popoverContent === 'advanced' && (<Card>
299
+ <CardContent>
300
+ <Text variant='h4'>Output:</Text>
301
+ <StyledCodeBlock>
302
+ {submitCondition ? JSON.stringify(submitCondition, null, 2) : '(No condition)'}
303
+ </StyledCodeBlock>
304
+
305
+ <Text variant='h4'>Formatted Output:</Text>
306
+ <StyledCodeBlock>
307
+ {submitCondition
308
+ ? formatCondition({ condition: submitCondition }, demoFields, t)
309
+ : '(No condition)'}
310
+ </StyledCodeBlock>
311
+ </CardContent>
312
+ </Card>)}
313
+ </Flex>);
314
+ };
315
+ //# sourceMappingURL=ObjectSelect.mocks.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectSelect.mocks.jsx","sourceRoot":"","sources":["../../../src/build/ObjectSelect/ObjectSelect.mocks.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2C,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,EACL,eAAe,EAEf,sBAAsB,EAEtB,eAAe,EAGhB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,MAAM,EACN,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,WAAW,EACX,MAAM,EACN,IAAI,EACJ,cAAc,EACd,IAAI,EACJ,WAAW,EAEX,OAAO,EAER,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAqB,MAAM,0BA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,CACtB;YAAA,EAAE,eAAe,CACnB;UAAA,EAAE,WAAW,CACf;QAAA,EAAE,IAAI,CAAC,CACR,CACH;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// cSpell:words XPTI\nimport { ChangeEvent, FC, FocusEvent, MouseEvent, useState } from 'react';\n\nimport {\n AtomicCondition,\n LeafCondition,\n getInitConditionForLhs,\n RHSType,\n formatCondition,\n DateFunctionsByType,\n Field\n} from '@pega/cosmos-react-condition-builder';\nimport {\n Button,\n Flex,\n Input,\n Card,\n CardContent,\n Drawer,\n Text,\n FieldValueList,\n Icon,\n menuHelpers,\n MenuItemProps,\n useI18n,\n FormControlProps\n} from '@pega/cosmos-react-core';\nimport { ObjectSelect, ObjectSelectProps } from '@pega/cosmos-react-build';\n\nimport { StyledDrawerContent, StyledCodeBlock } from './ObjectSelect.styles';\n\ninterface FormField extends FormControlProps {\n help?: string;\n error?: string;\n validator: (this: FormField) => boolean;\n}\n\ninterface DrawerProps {\n drawerData?: MenuItemProps;\n drawerOpen: boolean;\n setDrawerOpen: (value: boolean) => void;\n}\n\nexport interface ObjectSelectStoryProps extends ObjectSelectProps {\n onSubmit?: (id: string, e: MouseEvent<HTMLElement>) => void;\n onCancel?: (id: string, e: MouseEvent<HTMLElement>) => void;\n popoverContent?: string;\n}\n\nexport const skeletonData = [\n {\n id: '01-1',\n primary: 'primary-link-1',\n secondary: ['secondary-1'],\n href: 'http://www.pega.com'\n },\n {\n id: '01-2',\n primary: 'primary-link-2',\n secondary: [\n 'secondary-1',\n 'secondary-2',\n 'secondary-3',\n 'secondary-4',\n 'secondary-5',\n 'secondary-6',\n 'secondary-7',\n 'secondary-8',\n 'secondary-9'\n ],\n href: 'http://www.pega.com'\n },\n {\n id: '01-3',\n primary: 'primary-link-3',\n secondary: ['secondary-1', 'secondary-2'],\n href: 'http://www.pega.com'\n },\n {\n id: '01-4',\n primary: 'primary-link-4',\n secondary: ['secondary-1', 'secondary-2'],\n href: 'http://www.pega.com'\n }\n];\n\nexport const dataPages = [\n {\n id: '01-1',\n primary: 'MortgageRequestList-DataSource',\n secondary: ['Scope', 'O1XPTI-CCompass-Work-MortgageRequest'],\n href: 'http://www.pega.com'\n },\n {\n id: '01-2',\n primary: 'Credit Scores List Data Source',\n secondary: ['Scope', 'CreditScore'],\n href: 'http://www.pega.com'\n },\n {\n id: '01-3',\n primary: 'GetAutoLoanByIDDataSource',\n secondary: ['Scope', 'O1XPTI-CCompass-Work-AutoLoan'],\n href: 'http://www.pega.com'\n },\n {\n id: '01-4',\n primary: 'DS_pyMyWorkList',\n secondary: ['Scope', 'Assign-Worklist'],\n href: 'http://www.pega.com'\n }\n];\n\nexport const demoFields: Field[] = [\n { name: 'employeeId', label: 'Employee ID', type: 'TEXT' },\n { name: 'firstName', label: 'First Name', type: 'TEXT' },\n { name: 'lastName', label: 'Last Name', type: 'TEXT' },\n { name: 'gender', label: 'Gender', type: 'TEXT' },\n {\n name: 'department',\n label: 'Department',\n type: 'TEXT',\n possibleValues: [\n 'Customer Service',\n 'Engineering',\n 'Facilities',\n 'Finance',\n 'HR',\n 'IT',\n 'Sales'\n ]\n },\n { name: 'age', label: 'Age', type: 'NUMBER' },\n { name: 'experience', label: 'Experience (yrs)', type: 'NUMBER' },\n { name: 'salary', label: 'Salary', type: 'NUMBER' },\n { name: 'hireDate', label: 'Hire Date', type: 'DATE_ONLY' },\n { name: 'dateOfBirth', label: 'Date of Birth', type: 'DATE_ONLY' },\n {\n name: 'shiftStartTime',\n label: 'Shift start time',\n type: 'TIME_ONLY',\n groupLabel: 'Technical details'\n },\n {\n name: 'shiftEndTime',\n label: 'Shift end time',\n type: 'TIME_ONLY',\n groupLabel: 'Technical details'\n },\n {\n name: 'lastActivityAt',\n label: 'Last activity at',\n type: 'DATE_TIME',\n groupLabel: 'Technical details'\n },\n {\n name: 'nextPasswordReset',\n label: 'Next password reset',\n type: 'DATE_TIME',\n groupLabel: 'Technical details'\n },\n { name: 'isSeniorCitizen', label: 'Is Senior Citizen', type: 'BOOLEAN' },\n { name: 'isRemoteEmployee', label: 'Is Remote Employee', type: 'BOOLEAN' }\n];\n\nexport const demoDateFunctions: DateFunctionsByType = {\n DATE_TIME: [\n 'YEARS',\n 'QUARTERS',\n 'MONTHS',\n 'WEEKS',\n 'DAYS',\n 'HOURS',\n 'MONTHS_OF_YEAR',\n 'DAYS_OF_MONTH',\n 'DAYS_OF_WEEK'\n ],\n DATE_ONLY: [\n 'YEARS',\n 'QUARTERS',\n 'MONTHS',\n 'WEEKS',\n 'MONTHS_OF_YEAR',\n 'DAYS_OF_MONTH',\n 'DAYS_OF_WEEK'\n ]\n};\n\nexport const initFields = (): FormField[] => {\n const common = { value: undefined, status: undefined };\n return [\n {\n ...common,\n name: 'name',\n required: true,\n error: 'Please enter a valid name for table',\n validator() {\n if (!this.value) return false;\n return /^[a-z]{1}[a-z0-9]+$/i.test(this.value);\n }\n },\n {\n ...common,\n name: 'description',\n required: true,\n help: 'Give an appropriate description for the table',\n error: 'Field cannot be empty',\n validator() {\n if (!this.value) return false;\n return true;\n }\n }\n ];\n};\n\nexport const fieldReducer = (\n fields: FormField[],\n {\n target,\n type\n }:\n | ChangeEvent<HTMLInputElement | HTMLTextAreaElement>\n | FocusEvent<HTMLInputElement | HTMLTextAreaElement>\n) => {\n return fields.map(field => {\n if (field.name === target.name) {\n field.value = target.value;\n if (type === 'blur' || field.status === 'error') {\n if ((field.required || field.value) && !field.validator()) {\n field.status = 'error';\n field.info = field.error;\n } else {\n field.status = undefined;\n field.info = field.help;\n }\n }\n }\n return field;\n });\n};\n\nexport const ViewportDrawer = ({ drawerData, drawerOpen, setDrawerOpen }: DrawerProps) => {\n const fields = drawerData?.secondary?.map((data, index) => {\n return {\n id: (index + 1).toString(),\n name: data?.toString() ?? '',\n value: data\n };\n });\n\n return (\n <Drawer\n open={drawerOpen}\n onOuterClick={() => {\n setDrawerOpen(false);\n }}\n position='fixed'\n size='30rem'\n nullWhenClosed\n shadow\n >\n <Flex\n as={StyledDrawerContent}\n container={{\n direction: 'column',\n alignItems: 'start',\n gap: 2,\n pad: 4\n }}\n >\n <Flex container={{ direction: 'column', gap: 1 }}>\n <Flex container={{ gap: 2, alignItems: 'center' }}>\n <Button variant='simple' label='Close drawer' icon onClick={() => setDrawerOpen(false)}>\n <Icon name='times' />\n </Button>\n <Text variant='h3'>{drawerData?.primary}</Text>\n </Flex>\n <Flex container={{ direction: 'column', gap: 2, pad: 1 }}>\n <Text as='p'>\n This is a mock representation for the parameters of the {drawerData?.primary} rule\n </Text>\n <FieldValueList variant='inline' fields={fields!} />\n </Flex>\n </Flex>\n </Flex>\n </Drawer>\n );\n};\n\nexport const ConfigurationContent = (args: any) => {\n const [showErrorIndicators] = useState(false);\n\n const ConditionBuilder = (\n <AtomicCondition\n condition={args.condition}\n fields={demoFields}\n indicateErrors={showErrorIndicators}\n dateFunctions={demoDateFunctions}\n onChange={c => args.setCondition(c)}\n itemDirection='row'\n showLhsAsLabel={false}\n validRhsTypes={args.validRHSTypes}\n />\n );\n\n const Inputs = (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Text variant='h4'>Inputs</Text>\n <Flex container={{ direction: 'column', gap: 1 }}>\n <Flex container={{ alignItems: 'end', gap: 1 }}>\n <Input\n label='Name'\n type='text'\n defaultValue='Sample key 1'\n disabled\n readOnly={args.readOnly}\n />\n <Input\n label='Value'\n type='text'\n defaultValue='Sample value 1'\n readOnly={args.readOnly}\n disabled={args.disabled}\n />\n </Flex>\n <Flex container={{ alignItems: 'end', gap: 1 }}>\n <Input\n label='Name 2'\n labelHidden\n type='text'\n defaultValue='Sample key 2'\n disabled\n readOnly={args.readOnly}\n />\n <Input\n label='Value 2'\n labelHidden\n type='text'\n defaultValue='Sample value 2'\n readOnly={args.readOnly}\n disabled={args.disabled}\n />\n </Flex>\n </Flex>\n </Flex>\n );\n\n return args.popoverContent === 'advanced' ? ConditionBuilder : Inputs;\n};\n\nexport const ObjectSelectComp: FC<ObjectSelectStoryProps> = ({\n popoverContent,\n ...args\n}: ObjectSelectStoryProps) => {\n const t = useI18n();\n const [drawerOpen, setDrawerOpen] = useState(false);\n const [drawerData, setDrawerData] = useState<MenuItemProps>(dataPages[0]);\n const [value, setValue] = useState<ObjectSelectProps['value']>(args.value);\n\n const convertRhsTypes = (\n useLiteralRHSType: boolean,\n useFieldRHSType: boolean,\n useRelativeDatesType: boolean,\n dateFunctions?: DateFunctionsByType\n ) => {\n const setRhsTypes: Set<RHSType> = new Set<RHSType>();\n if (useLiteralRHSType) setRhsTypes.add('LITERAL');\n if (useFieldRHSType) setRhsTypes.add('FIELD');\n if (dateFunctions) setRhsTypes.add('DATE_FUNCTION');\n if (useRelativeDatesType) setRhsTypes.add('RELATIVE_DATE');\n return setRhsTypes;\n };\n\n const validRHSTypes: Set<RHSType> = convertRhsTypes(true, true, true, demoDateFunctions);\n const [submitCondition, setSubmitCondition] = useState<LeafCondition | undefined>(undefined);\n const [condition, setCondition] = useState(\n () =>\n submitCondition ||\n getInitConditionForLhs(\n { field: 'age' },\n demoFields,\n validRHSTypes,\n undefined,\n demoDateFunctions\n )\n );\n\n const handleSubmission = () => {\n setSubmitCondition(condition);\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 1 }}>\n <ObjectSelect\n {...args}\n onChange={id => {\n const data = menuHelpers.getItem(dataPages, id);\n if (data) {\n setValue({\n id: data.id,\n primary: data.primary,\n href: data.href ?? '#',\n meta: data.id !== '01-4' ? data.secondary?.join(' ') : ''\n });\n } else setValue(undefined);\n }}\n items={dataPages}\n configuration={{\n label: args.disabled || args.readOnly ? 'View Configuration' : 'Edit Configuration',\n heading: 'Map Parameters',\n primaryAction: {\n id: 'submit',\n text: 'Submit',\n onClick: popoverContent === 'advanced' ? handleSubmission : args.onSubmit\n },\n secondaryAction: {\n id: 'cancel',\n text: 'Cancel',\n onClick: args.onCancel\n },\n content: (\n <ConfigurationContent\n {...args}\n popoverContent={popoverContent}\n condition={condition}\n setCondition={setCondition}\n validRHSTypes={validRHSTypes}\n />\n )\n }}\n value={value}\n onPreview={(id, e: { href: string }) => {\n const data = menuHelpers.getItem(dataPages, id);\n if (data) setDrawerData(data);\n setDrawerOpen(true);\n args.onPreview?.(id, e);\n }}\n />\n <ViewportDrawer\n drawerData={drawerData}\n drawerOpen={drawerOpen}\n setDrawerOpen={setDrawerOpen}\n />\n {popoverContent === 'advanced' && (\n <Card>\n <CardContent>\n <Text variant='h4'>Output:</Text>\n <StyledCodeBlock>\n {submitCondition ? JSON.stringify(submitCondition, null, 2) : '(No condition)'}\n </StyledCodeBlock>\n\n <Text variant='h4'>Formatted Output:</Text>\n <StyledCodeBlock>\n {submitCondition\n ? formatCondition({ condition: submitCondition }, demoFields, t)\n : '(No condition)'}\n </StyledCodeBlock>\n </CardContent>\n </Card>\n )}\n </Flex>\n );\n};\n"]}
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { Meta, Story } from '@storybook/react';
3
+ import { ObjectSelectStoryProps } from './ObjectSelect.mocks';
4
+ declare const _default: Meta<import("@storybook/react").Args>;
5
+ export default _default;
6
+ export declare const ObjectSelectSkeleton: Story<ObjectSelectStoryProps>;
7
+ export declare const ObjectSelectDemo: Story<ObjectSelectStoryProps>;
8
+ export declare const ObjectSelectDemoInForm: () => JSX.Element | null;
9
+ //# sourceMappingURL=ObjectSelect.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectSelect.stories.d.ts","sourceRoot":"","sources":["../../../src/build/ObjectSelect/ObjectSelect.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAqB/C,OAAO,EAIL,sBAAsB,EAEvB,MAAM,sBAAsB,CAAC;;AAI9B,wBAGU;AAEV,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,sBAAsB,CA2C9D,CAAC;AAiCF,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,sBAAsB,CAE1D,CAAC;AAmCF,eAAO,MAAM,sBAAsB,0BA8ElC,CAAC"}
@@ -0,0 +1,137 @@
1
+ import { useReducer, useContext, useState } from 'react';
2
+ import { action } from '@storybook/addon-actions';
3
+ import { Form, Button, Flex, Input, ToasterContext, TextArea, Card, CardContent, registerIcon, menuHelpers, StyledRegion } from '@pega/cosmos-react-core';
4
+ import { ObjectSelect } from '@pega/cosmos-react-build';
5
+ import * as times from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';
6
+ import { StyledConfigurationContent } from './ObjectSelect.styles';
7
+ import { skeletonData, fieldReducer, initFields, ObjectSelectComp } from './ObjectSelect.mocks';
8
+ registerIcon(times);
9
+ export default {
10
+ title: 'Build/ObjectSelect',
11
+ component: ObjectSelect
12
+ };
13
+ export const ObjectSelectSkeleton = (args) => {
14
+ const [value, setValue] = useState(args.value);
15
+ return (<ObjectSelect {...args} items={skeletonData} value={value} onChange={id => {
16
+ const data = menuHelpers.getItem(skeletonData, id);
17
+ if (data) {
18
+ setValue({
19
+ id: data.id,
20
+ primary: data.primary,
21
+ href: data.href ?? '#',
22
+ meta: data.id !== '01-4' ? data.secondary?.join(' ') : ''
23
+ });
24
+ }
25
+ else
26
+ setValue(undefined);
27
+ }} configuration={{
28
+ label: 'Gear button label',
29
+ heading: 'Popover heading',
30
+ primaryAction: {
31
+ id: 'primaryAction',
32
+ text: 'Primary action text',
33
+ onClick: args.onSubmit
34
+ },
35
+ secondaryAction: {
36
+ id: 'secondaryAction',
37
+ text: 'Secondary action text',
38
+ onClick: args.onCancel
39
+ },
40
+ content: (<StyledConfigurationContent>
41
+ <StyledRegion style={{ minHeight: '20vh' }}/>
42
+ </StyledConfigurationContent>)
43
+ }} onPreview={args.onPreview}/>);
44
+ };
45
+ ObjectSelectSkeleton.args = {
46
+ label: 'Object select label',
47
+ labelHidden: false,
48
+ info: 'Object select info text',
49
+ placeholder: '',
50
+ status: undefined,
51
+ required: false,
52
+ disabled: false,
53
+ readOnly: false,
54
+ onPreview: action('Clicked preview link'),
55
+ onSubmit: action('Clicked submit button'),
56
+ onCancel: action('Clicked cancel button')
57
+ };
58
+ ObjectSelectSkeleton.argTypes = {
59
+ label: { control: { type: 'text' } },
60
+ labelHidden: { control: { type: 'boolean' } },
61
+ info: { control: { type: 'text' } },
62
+ placeholder: { control: { type: 'text' } },
63
+ status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },
64
+ required: { control: { type: 'boolean' } },
65
+ disabled: { control: { type: 'boolean' } },
66
+ readOnly: { control: { type: 'boolean' } },
67
+ onPreview: { table: { disable: true } },
68
+ onSubmit: { table: { disable: true } },
69
+ onCancel: { table: { disable: true } }
70
+ };
71
+ export const ObjectSelectDemo = (args) => {
72
+ return <ObjectSelectComp {...args} popoverContent={args.popoverContent}/>;
73
+ };
74
+ ObjectSelectDemo.args = {
75
+ label: 'Data source',
76
+ labelHidden: false,
77
+ info: 'Select an appropriate data source',
78
+ placeholder: '',
79
+ status: undefined,
80
+ required: false,
81
+ disabled: false,
82
+ readOnly: false,
83
+ popoverContent: 'simple',
84
+ onPreview: () => { },
85
+ onSubmit: action('Clicked submit button'),
86
+ onCancel: action('Clicked cancel button')
87
+ };
88
+ ObjectSelectDemo.argTypes = {
89
+ label: { control: { type: 'text' } },
90
+ labelHidden: { control: { type: 'boolean' } },
91
+ info: { control: { type: 'text' } },
92
+ placeholder: { control: { type: 'text' } },
93
+ status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },
94
+ required: { control: { type: 'boolean' } },
95
+ disabled: { control: { type: 'boolean' } },
96
+ readOnly: { control: { type: 'boolean' } },
97
+ popoverContent: { options: ['simple', 'advanced'], control: { type: 'radio' } },
98
+ onPreview: { table: { disable: true } },
99
+ onSubmit: { table: { disable: true } },
100
+ onCancel: { table: { disable: true } }
101
+ };
102
+ export const ObjectSelectDemoInForm = () => {
103
+ const [fields, setField] = useReducer(fieldReducer, undefined, initFields);
104
+ const { push } = useContext(ToasterContext);
105
+ const name = fields.find(field => field.name === 'name');
106
+ const description = fields.find(field => field.name === 'description');
107
+ if (!name || !description)
108
+ return null;
109
+ const canSubmit = fields.every(field => field.value && field.validator());
110
+ const actions = (<>
111
+ <Button name='Cancel' variant='secondary' onClick={() => {
112
+ push({ content: 'Form cancelled!' });
113
+ }}>
114
+ Cancel
115
+ </Button>
116
+ <Button name='Submit' type='submit' variant='primary' disabled={!canSubmit}>
117
+ Submit
118
+ </Button>
119
+ </>);
120
+ return (<Card style={{ margin: 'auto', maxWidth: '37.5rem' }}>
121
+ <CardContent>
122
+ <Form actions={actions} onSubmit={(e) => {
123
+ e.preventDefault();
124
+ push({ content: 'Form submitted!' });
125
+ }} heading='Configure Table'>
126
+ <Flex container={{ direction: 'column', gap: 2 }} item={{ grow: 1 }}>
127
+ <Input name='name' label='Table name' value={name.value} required={name.required} status={name.status} info='Enter a valid table name' onChange={(e) => setField({ ...e })} onBlur={(e) => setField({ ...e })} autoComplete='off'/>
128
+
129
+ <TextArea name='description' required={description.required} label='Table description' status={description.status} info={description.info || description.help} onChange={(e) => setField({ ...e })} onBlur={(e) => setField({ ...e })}/>
130
+ <ObjectSelectComp label='Data page' info='Select an appropriate data page' items={[]} onChange={() => { }}/>
131
+ <ObjectSelectComp label='Visibility condition' info='Choose a when condition from list' items={[]} onChange={() => { }}/>
132
+ </Flex>
133
+ </Form>
134
+ </CardContent>
135
+ </Card>);
136
+ };
137
+ //# sourceMappingURL=ObjectSelect.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectSelect.stories.jsx","sourceRoot":"","sources":["../../../src/build/ObjectSelect/ObjectSelect.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,UAAU,EAAE,UAAU,EAA2B,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,cAAc,EACd,QAAQ,EACR,IAAI,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,iCAAiC,CACtC,KAAK,CAAC,CAAC,EAAE,CAAC,CACV,QAAQ,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,EAErB;YAAA,CAAC,gBAAgB,CACf,KAAK,CAAC,sBAAsB,CAC5B,IAAI,CAAC,mCAAmC,CACxC,KAAK,CAAC,CAAC,EAAE,CAAC,CACV,QAAQ,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,EAEvB;UAAA,EAAE,IAAI,CACR;QAAA,EAAE,IAAI,CACR;MAAA,EAAE,WAAW,CACf;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { FormEvent, useReducer, useContext, ChangeEvent, FocusEvent, useState } from 'react';\nimport { action } from '@storybook/addon-actions';\n\nimport {\n Form,\n Button,\n Flex,\n Input,\n ToasterContext,\n TextArea,\n Card,\n CardContent,\n registerIcon,\n menuHelpers,\n StyledRegion\n} from '@pega/cosmos-react-core';\nimport { ObjectSelect, ObjectSelectProps } from '@pega/cosmos-react-build';\nimport * as times from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';\n\nimport { StyledConfigurationContent } from './ObjectSelect.styles';\nimport {\n skeletonData,\n fieldReducer,\n initFields,\n ObjectSelectStoryProps,\n ObjectSelectComp\n} from './ObjectSelect.mocks';\n\nregisterIcon(times);\n\nexport default {\n title: 'Build/ObjectSelect',\n component: ObjectSelect\n} as Meta;\n\nexport const ObjectSelectSkeleton: Story<ObjectSelectStoryProps> = (\n args: ObjectSelectStoryProps\n) => {\n const [value, setValue] = useState<ObjectSelectProps['value']>(args.value);\n\n return (\n <ObjectSelect\n {...args}\n items={skeletonData}\n value={value}\n onChange={id => {\n const data = menuHelpers.getItem(skeletonData, id);\n if (data) {\n setValue({\n id: data.id,\n primary: data.primary,\n href: data.href ?? '#',\n meta: data.id !== '01-4' ? data.secondary?.join(' ') : ''\n });\n } else setValue(undefined);\n }}\n configuration={{\n label: 'Gear button label',\n heading: 'Popover heading',\n primaryAction: {\n id: 'primaryAction',\n text: 'Primary action text',\n onClick: args.onSubmit\n },\n secondaryAction: {\n id: 'secondaryAction',\n text: 'Secondary action text',\n onClick: args.onCancel\n },\n content: (\n <StyledConfigurationContent>\n <StyledRegion style={{ minHeight: '20vh' }} />\n </StyledConfigurationContent>\n )\n }}\n onPreview={args.onPreview}\n />\n );\n};\n\nObjectSelectSkeleton.args = {\n label: 'Object select label',\n labelHidden: false,\n info: 'Object select info text',\n placeholder: '',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false,\n // eslint-disable-next-line demo-patterns/literal-args\n onPreview: action('Clicked preview link'),\n // eslint-disable-next-line demo-patterns/literal-args\n onSubmit: action('Clicked submit button'),\n // eslint-disable-next-line demo-patterns/literal-args\n onCancel: action('Clicked cancel button')\n};\n\nObjectSelectSkeleton.argTypes = {\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n placeholder: { control: { type: 'text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } },\n onPreview: { table: { disable: true } },\n onSubmit: { table: { disable: true } },\n onCancel: { table: { disable: true } }\n};\n\nexport const ObjectSelectDemo: Story<ObjectSelectStoryProps> = (args: ObjectSelectStoryProps) => {\n return <ObjectSelectComp {...args} popoverContent={args.popoverContent} />;\n};\n\nObjectSelectDemo.args = {\n label: 'Data source',\n labelHidden: false,\n info: 'Select an appropriate data source',\n placeholder: '',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false,\n popoverContent: 'simple',\n // eslint-disable-next-line demo-patterns/literal-args\n onPreview: () => {},\n // eslint-disable-next-line demo-patterns/literal-args\n onSubmit: action('Clicked submit button'),\n // eslint-disable-next-line demo-patterns/literal-args\n onCancel: action('Clicked cancel button')\n};\n\nObjectSelectDemo.argTypes = {\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n placeholder: { control: { type: 'text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } },\n popoverContent: { options: ['simple', 'advanced'], control: { type: 'radio' } },\n onPreview: { table: { disable: true } },\n onSubmit: { table: { disable: true } },\n onCancel: { table: { disable: true } }\n};\n\nexport const ObjectSelectDemoInForm = () => {\n const [fields, setField] = useReducer(fieldReducer, undefined, initFields);\n const { push } = useContext(ToasterContext);\n\n const name = fields.find(field => field.name === 'name');\n const description = fields.find(field => field.name === 'description');\n\n if (!name || !description) return null;\n\n const canSubmit = fields.every(field => field.value && field.validator());\n\n const actions = (\n <>\n <Button\n name='Cancel'\n variant='secondary'\n onClick={() => {\n push({ content: 'Form cancelled!' });\n }}\n >\n Cancel\n </Button>\n <Button name='Submit' type='submit' variant='primary' disabled={!canSubmit}>\n Submit\n </Button>\n </>\n );\n\n return (\n <Card style={{ margin: 'auto', maxWidth: '37.5rem' }}>\n <CardContent>\n <Form\n actions={actions}\n onSubmit={(e: FormEvent) => {\n e.preventDefault();\n push({ content: 'Form submitted!' });\n }}\n heading='Configure Table'\n >\n <Flex container={{ direction: 'column', gap: 2 }} item={{ grow: 1 }}>\n <Input\n name='name'\n label='Table name'\n value={name.value}\n required={name.required}\n status={name.status}\n info='Enter a valid table name'\n onChange={(e: ChangeEvent<HTMLInputElement>) => setField({ ...e })}\n onBlur={(e: FocusEvent<HTMLInputElement>) => setField({ ...e })}\n autoComplete='off'\n />\n\n <TextArea\n name='description'\n required={description.required}\n label='Table description'\n status={description.status}\n info={description.info || description.help}\n onChange={(e: ChangeEvent<HTMLTextAreaElement>) => setField({ ...e })}\n onBlur={(e: FocusEvent<HTMLInputElement>) => setField({ ...e })}\n />\n <ObjectSelectComp\n label='Data page'\n info='Select an appropriate data page'\n items={[]}\n onChange={() => {}}\n />\n <ObjectSelectComp\n label='Visibility condition'\n info='Choose a when condition from list'\n items={[]}\n onChange={() => {}}\n />\n </Flex>\n </Form>\n </CardContent>\n </Card>\n );\n};\n"]}
@@ -0,0 +1,4 @@
1
+ export declare const StyledDrawerContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const StyledCodeBlock: import("styled-components").StyledComponent<"pre", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const StyledConfigurationContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
4
+ //# sourceMappingURL=ObjectSelect.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectSelect.styles.d.ts","sourceRoot":"","sources":["../../../src/build/ObjectSelect/ObjectSelect.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB,yGAS9B,CAAC;AAIH,eAAO,MAAM,eAAe,yGAK1B,CAAC;AAIH,eAAO,MAAM,0BAA0B,yGAOrC,CAAC"}
@@ -0,0 +1,27 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { defaultThemeProp, StyledRegion } from '@pega/cosmos-react-core';
3
+ export const StyledDrawerContent = styled.div(props => {
4
+ const { theme: { base } } = props;
5
+ return css `
6
+ height: 100%;
7
+ background-color: ${base.palette['primary-background']};
8
+ `;
9
+ });
10
+ StyledDrawerContent.defaultProps = defaultThemeProp;
11
+ export const StyledCodeBlock = styled.pre(({ theme }) => {
12
+ return css `
13
+ padding: ${theme.base.spacing};
14
+ margin-bottom: ${theme.base.spacing};
15
+ `;
16
+ });
17
+ StyledCodeBlock.defaultProps = defaultThemeProp;
18
+ export const StyledConfigurationContent = styled.div(({ theme }) => {
19
+ return css `
20
+ ${StyledRegion} {
21
+ border: 0.0625rem dashed ${theme.base.palette['border-line']};
22
+ background-color: ${theme.base.palette['secondary-background']};
23
+ }
24
+ `;
25
+ });
26
+ StyledConfigurationContent.defaultProps = defaultThemeProp;
27
+ //# sourceMappingURL=ObjectSelect.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectSelect.styles.js","sourceRoot":"","sources":["../../../src/build/ObjectSelect/ObjectSelect.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEzE,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;IACpD,MAAM,EACJ,KAAK,EAAE,EAAE,IAAI,EAAE,EAChB,GAAG,KAAK,CAAC;IAEV,OAAO,GAAG,CAAA;;wBAEY,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;GACvD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,mBAAmB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEpD,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACtD,OAAO,GAAG,CAAA;eACG,KAAK,CAAC,IAAI,CAAC,OAAO;qBACZ,KAAK,CAAC,IAAI,CAAC,OAAO;GACpC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEhD,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACjE,OAAO,GAAG,CAAA;MACN,YAAY;iCACe,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;0BACxC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC;;GAEjE,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,0BAA0B,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp, StyledRegion } from '@pega/cosmos-react-core';\n\nexport const StyledDrawerContent = styled.div(props => {\n const {\n theme: { base }\n } = props;\n\n return css`\n height: 100%;\n background-color: ${base.palette['primary-background']};\n `;\n});\n\nStyledDrawerContent.defaultProps = defaultThemeProp;\n\nexport const StyledCodeBlock = styled.pre(({ theme }) => {\n return css`\n padding: ${theme.base.spacing};\n margin-bottom: ${theme.base.spacing};\n `;\n});\n\nStyledCodeBlock.defaultProps = defaultThemeProp;\n\nexport const StyledConfigurationContent = styled.div(({ theme }) => {\n return css`\n ${StyledRegion} {\n border: 0.0625rem dashed ${theme.base.palette['border-line']};\n background-color: ${theme.base.palette['secondary-background']};\n }\n `;\n});\n\nStyledConfigurationContent.defaultProps = defaultThemeProp;\n"]}
@@ -0,0 +1,45 @@
1
+ /// <reference types="react" />
2
+ export declare const appHeader: {
3
+ brand: {
4
+ name: string;
5
+ };
6
+ utils: {
7
+ avatar: {
8
+ name: string;
9
+ };
10
+ search: {
11
+ placeholder: string;
12
+ };
13
+ branchName: string;
14
+ actions: {
15
+ primary: string;
16
+ id: string;
17
+ onClick: () => void;
18
+ }[];
19
+ };
20
+ links: {
21
+ id: string;
22
+ name: string;
23
+ onClick: () => void;
24
+ }[];
25
+ };
26
+ export declare const getOverviewCardData: () => {
27
+ id: string;
28
+ title: string;
29
+ description: string;
30
+ meta: (string | JSX.Element)[];
31
+ visual: {
32
+ icon: {
33
+ name: string;
34
+ bgColor: string;
35
+ };
36
+ image?: undefined;
37
+ } | {
38
+ image: {
39
+ src: string;
40
+ alt: string;
41
+ };
42
+ icon?: undefined;
43
+ };
44
+ }[];
45
+ //# sourceMappingURL=GalleryPage.mocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GalleryPage.mocks.d.ts","sourceRoot":"","sources":["../../../src/build/PageTemplates/GalleryPage.mocks.tsx"],"names":[],"mappings":";AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;CAkDrB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;GA2B/B,CAAC"}