@pega/cosmos-react-build 5.0.0-dev.4.7 → 5.0.0-dev.4.9

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 (337) hide show
  1. package/package.json +4 -4
  2. package/lib/components/AppShell/AppShell.d.ts +0 -6
  3. package/lib/components/AppShell/AppShell.d.ts.map +0 -1
  4. package/lib/components/AppShell/AppShell.js +0 -58
  5. package/lib/components/AppShell/AppShell.js.map +0 -1
  6. package/lib/components/AppShell/AppShell.styles.d.ts +0 -17
  7. package/lib/components/AppShell/AppShell.styles.d.ts.map +0 -1
  8. package/lib/components/AppShell/AppShell.styles.js +0 -269
  9. package/lib/components/AppShell/AppShell.styles.js.map +0 -1
  10. package/lib/components/AppShell/AppShell.types.d.ts +0 -72
  11. package/lib/components/AppShell/AppShell.types.d.ts.map +0 -1
  12. package/lib/components/AppShell/AppShell.types.js +0 -2
  13. package/lib/components/AppShell/AppShell.types.js.map +0 -1
  14. package/lib/components/AppShell/AppShellContext.d.ts +0 -5
  15. package/lib/components/AppShell/AppShellContext.d.ts.map +0 -1
  16. package/lib/components/AppShell/AppShellContext.js +0 -8
  17. package/lib/components/AppShell/AppShellContext.js.map +0 -1
  18. package/lib/components/AppShell/Header/AppHeader.d.ts +0 -6
  19. package/lib/components/AppShell/Header/AppHeader.d.ts.map +0 -1
  20. package/lib/components/AppShell/Header/AppHeader.js +0 -73
  21. package/lib/components/AppShell/Header/AppHeader.js.map +0 -1
  22. package/lib/components/AppShell/Header/AppHeader.styles.d.ts +0 -13
  23. package/lib/components/AppShell/Header/AppHeader.styles.d.ts.map +0 -1
  24. package/lib/components/AppShell/Header/AppHeader.styles.js +0 -158
  25. package/lib/components/AppShell/Header/AppHeader.styles.js.map +0 -1
  26. package/lib/components/AppShell/Header/AppHeader.types.d.ts +0 -33
  27. package/lib/components/AppShell/Header/AppHeader.types.d.ts.map +0 -1
  28. package/lib/components/AppShell/Header/AppHeader.types.js +0 -2
  29. package/lib/components/AppShell/Header/AppHeader.types.js.map +0 -1
  30. package/lib/components/AppShell/Header/BranchButton.d.ts +0 -20
  31. package/lib/components/AppShell/Header/BranchButton.d.ts.map +0 -1
  32. package/lib/components/AppShell/Header/BranchButton.js +0 -91
  33. package/lib/components/AppShell/Header/BranchButton.js.map +0 -1
  34. package/lib/components/AppShell/NavigationList.d.ts +0 -6
  35. package/lib/components/AppShell/NavigationList.d.ts.map +0 -1
  36. package/lib/components/AppShell/NavigationList.js +0 -97
  37. package/lib/components/AppShell/NavigationList.js.map +0 -1
  38. package/lib/components/AppShell/index.d.ts +0 -5
  39. package/lib/components/AppShell/index.d.ts.map +0 -1
  40. package/lib/components/AppShell/index.js +0 -2
  41. package/lib/components/AppShell/index.js.map +0 -1
  42. package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts +0 -10
  43. package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts.map +0 -1
  44. package/lib/components/DynamicContentEditor/DynamicContentEditor.js +0 -239
  45. package/lib/components/DynamicContentEditor/DynamicContentEditor.js.map +0 -1
  46. package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts +0 -23
  47. package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts.map +0 -1
  48. package/lib/components/DynamicContentEditor/DynamicContentEditor.types.js +0 -2
  49. package/lib/components/DynamicContentEditor/DynamicContentEditor.types.js.map +0 -1
  50. package/lib/components/DynamicContentEditor/PegaCustomElement.d.ts +0 -329
  51. package/lib/components/DynamicContentEditor/PegaCustomElement.d.ts.map +0 -1
  52. package/lib/components/DynamicContentEditor/PegaCustomElement.js +0 -23
  53. package/lib/components/DynamicContentEditor/PegaCustomElement.js.map +0 -1
  54. package/lib/components/DynamicContentEditor/index.d.ts +0 -3
  55. package/lib/components/DynamicContentEditor/index.d.ts.map +0 -1
  56. package/lib/components/DynamicContentEditor/index.js +0 -2
  57. package/lib/components/DynamicContentEditor/index.js.map +0 -1
  58. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts +0 -8
  59. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts.map +0 -1
  60. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js +0 -176
  61. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js.map +0 -1
  62. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts +0 -10
  63. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts.map +0 -1
  64. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js +0 -530
  65. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js.map +0 -1
  66. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.d.ts +0 -36
  67. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.d.ts.map +0 -1
  68. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.js +0 -2
  69. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.js.map +0 -1
  70. package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.d.ts +0 -13
  71. package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.d.ts.map +0 -1
  72. package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.js +0 -51
  73. package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.js.map +0 -1
  74. package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts +0 -6
  75. package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts.map +0 -1
  76. package/lib/components/ExpressionBuilder/ExpressionBuilder.js +0 -51
  77. package/lib/components/ExpressionBuilder/ExpressionBuilder.js.map +0 -1
  78. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts +0 -14
  79. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts.map +0 -1
  80. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js +0 -81
  81. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js.map +0 -1
  82. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts +0 -74
  83. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts.map +0 -1
  84. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.js +0 -2
  85. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.js.map +0 -1
  86. package/lib/components/ExpressionBuilder/ExpressionBuilderContext.d.ts +0 -7
  87. package/lib/components/ExpressionBuilder/ExpressionBuilderContext.d.ts.map +0 -1
  88. package/lib/components/ExpressionBuilder/ExpressionBuilderContext.js +0 -6
  89. package/lib/components/ExpressionBuilder/ExpressionBuilderContext.js.map +0 -1
  90. package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts +0 -6
  91. package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts.map +0 -1
  92. package/lib/components/ExpressionBuilder/ExpressionDetails.js +0 -12
  93. package/lib/components/ExpressionBuilder/ExpressionDetails.js.map +0 -1
  94. package/lib/components/ExpressionBuilder/ExpressionItem.d.ts +0 -6
  95. package/lib/components/ExpressionBuilder/ExpressionItem.d.ts.map +0 -1
  96. package/lib/components/ExpressionBuilder/ExpressionItem.js +0 -39
  97. package/lib/components/ExpressionBuilder/ExpressionItem.js.map +0 -1
  98. package/lib/components/ExpressionBuilder/ExpressionList.d.ts +0 -6
  99. package/lib/components/ExpressionBuilder/ExpressionList.d.ts.map +0 -1
  100. package/lib/components/ExpressionBuilder/ExpressionList.js +0 -32
  101. package/lib/components/ExpressionBuilder/ExpressionList.js.map +0 -1
  102. package/lib/components/ExpressionBuilder/index.d.ts +0 -8
  103. package/lib/components/ExpressionBuilder/index.d.ts.map +0 -1
  104. package/lib/components/ExpressionBuilder/index.js +0 -6
  105. package/lib/components/ExpressionBuilder/index.js.map +0 -1
  106. package/lib/components/FlowModeller/AddNode.d.ts +0 -18
  107. package/lib/components/FlowModeller/AddNode.d.ts.map +0 -1
  108. package/lib/components/FlowModeller/AddNode.js +0 -86
  109. package/lib/components/FlowModeller/AddNode.js.map +0 -1
  110. package/lib/components/FlowModeller/Connector.d.ts +0 -7
  111. package/lib/components/FlowModeller/Connector.d.ts.map +0 -1
  112. package/lib/components/FlowModeller/Connector.js +0 -69
  113. package/lib/components/FlowModeller/Connector.js.map +0 -1
  114. package/lib/components/FlowModeller/DeletePopover.d.ts +0 -19
  115. package/lib/components/FlowModeller/DeletePopover.d.ts.map +0 -1
  116. package/lib/components/FlowModeller/DeletePopover.js +0 -136
  117. package/lib/components/FlowModeller/DeletePopover.js.map +0 -1
  118. package/lib/components/FlowModeller/FlowModeller.d.ts +0 -5
  119. package/lib/components/FlowModeller/FlowModeller.d.ts.map +0 -1
  120. package/lib/components/FlowModeller/FlowModeller.js +0 -317
  121. package/lib/components/FlowModeller/FlowModeller.js.map +0 -1
  122. package/lib/components/FlowModeller/FlowModeller.types.d.ts +0 -27
  123. package/lib/components/FlowModeller/FlowModeller.types.d.ts.map +0 -1
  124. package/lib/components/FlowModeller/FlowModeller.types.js +0 -2
  125. package/lib/components/FlowModeller/FlowModeller.types.js.map +0 -1
  126. package/lib/components/FlowModeller/FlowModellerContext.d.ts +0 -11
  127. package/lib/components/FlowModeller/FlowModellerContext.d.ts.map +0 -1
  128. package/lib/components/FlowModeller/FlowModellerContext.js +0 -8
  129. package/lib/components/FlowModeller/FlowModellerContext.js.map +0 -1
  130. package/lib/components/FlowModeller/Node/Node.types.d.ts +0 -75
  131. package/lib/components/FlowModeller/Node/Node.types.d.ts.map +0 -1
  132. package/lib/components/FlowModeller/Node/Node.types.js +0 -27
  133. package/lib/components/FlowModeller/Node/Node.types.js.map +0 -1
  134. package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts +0 -21
  135. package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts.map +0 -1
  136. package/lib/components/FlowModeller/Node/NodeTemplate.styles.js +0 -151
  137. package/lib/components/FlowModeller/Node/NodeTemplate.styles.js.map +0 -1
  138. package/lib/components/FlowModeller/Node/NodeTemplates.d.ts +0 -6
  139. package/lib/components/FlowModeller/Node/NodeTemplates.d.ts.map +0 -1
  140. package/lib/components/FlowModeller/Node/NodeTemplates.js +0 -70
  141. package/lib/components/FlowModeller/Node/NodeTemplates.js.map +0 -1
  142. package/lib/components/FlowModeller/Node.d.ts +0 -5
  143. package/lib/components/FlowModeller/Node.d.ts.map +0 -1
  144. package/lib/components/FlowModeller/Node.js +0 -22
  145. package/lib/components/FlowModeller/Node.js.map +0 -1
  146. package/lib/components/FlowModeller/Renderer/Renderer.d.ts +0 -5
  147. package/lib/components/FlowModeller/Renderer/Renderer.d.ts.map +0 -1
  148. package/lib/components/FlowModeller/Renderer/Renderer.js +0 -48
  149. package/lib/components/FlowModeller/Renderer/Renderer.js.map +0 -1
  150. package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts +0 -18
  151. package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts.map +0 -1
  152. package/lib/components/FlowModeller/Renderer/Renderer.types.js +0 -2
  153. package/lib/components/FlowModeller/Renderer/Renderer.types.js.map +0 -1
  154. package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts +0 -59
  155. package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts.map +0 -1
  156. package/lib/components/FlowModeller/Renderer/Utils/Graph.js +0 -258
  157. package/lib/components/FlowModeller/Renderer/Utils/Graph.js.map +0 -1
  158. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts +0 -36
  159. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts.map +0 -1
  160. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js +0 -120
  161. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js.map +0 -1
  162. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts +0 -27
  163. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts.map +0 -1
  164. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js +0 -172
  165. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js.map +0 -1
  166. package/lib/components/FlowModeller/Utils/addNodeUtils.d.ts +0 -17
  167. package/lib/components/FlowModeller/Utils/addNodeUtils.d.ts.map +0 -1
  168. package/lib/components/FlowModeller/Utils/addNodeUtils.js +0 -141
  169. package/lib/components/FlowModeller/Utils/addNodeUtils.js.map +0 -1
  170. package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts +0 -30
  171. package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts.map +0 -1
  172. package/lib/components/FlowModeller/Utils/deleteNodeUtils.js +0 -81
  173. package/lib/components/FlowModeller/Utils/deleteNodeUtils.js.map +0 -1
  174. package/lib/components/FlowModeller/helper.d.ts +0 -39
  175. package/lib/components/FlowModeller/helper.d.ts.map +0 -1
  176. package/lib/components/FlowModeller/helper.js +0 -198
  177. package/lib/components/FlowModeller/helper.js.map +0 -1
  178. package/lib/components/FlowModeller/index.d.ts +0 -20
  179. package/lib/components/FlowModeller/index.d.ts.map +0 -1
  180. package/lib/components/FlowModeller/index.js +0 -12
  181. package/lib/components/FlowModeller/index.js.map +0 -1
  182. package/lib/components/ItemLibrary/ItemLibrary.d.ts +0 -25
  183. package/lib/components/ItemLibrary/ItemLibrary.d.ts.map +0 -1
  184. package/lib/components/ItemLibrary/ItemLibrary.js +0 -62
  185. package/lib/components/ItemLibrary/ItemLibrary.js.map +0 -1
  186. package/lib/components/ItemLibrary/index.d.ts +0 -3
  187. package/lib/components/ItemLibrary/index.d.ts.map +0 -1
  188. package/lib/components/ItemLibrary/index.js +0 -3
  189. package/lib/components/ItemLibrary/index.js.map +0 -1
  190. package/lib/components/LifeCycle/Category.d.ts +0 -15
  191. package/lib/components/LifeCycle/Category.d.ts.map +0 -1
  192. package/lib/components/LifeCycle/Category.js +0 -104
  193. package/lib/components/LifeCycle/Category.js.map +0 -1
  194. package/lib/components/LifeCycle/LifeCycle.d.ts +0 -6
  195. package/lib/components/LifeCycle/LifeCycle.d.ts.map +0 -1
  196. package/lib/components/LifeCycle/LifeCycle.js +0 -77
  197. package/lib/components/LifeCycle/LifeCycle.js.map +0 -1
  198. package/lib/components/LifeCycle/LifeCycle.types.d.ts +0 -154
  199. package/lib/components/LifeCycle/LifeCycle.types.d.ts.map +0 -1
  200. package/lib/components/LifeCycle/LifeCycle.types.js +0 -79
  201. package/lib/components/LifeCycle/LifeCycle.types.js.map +0 -1
  202. package/lib/components/LifeCycle/LifeCycleContext.d.ts +0 -9
  203. package/lib/components/LifeCycle/LifeCycleContext.d.ts.map +0 -1
  204. package/lib/components/LifeCycle/LifeCycleContext.js +0 -7
  205. package/lib/components/LifeCycle/LifeCycleContext.js.map +0 -1
  206. package/lib/components/LifeCycle/LifeCycleList.d.ts +0 -30
  207. package/lib/components/LifeCycle/LifeCycleList.d.ts.map +0 -1
  208. package/lib/components/LifeCycle/LifeCycleList.js +0 -68
  209. package/lib/components/LifeCycle/LifeCycleList.js.map +0 -1
  210. package/lib/components/LifeCycle/Stage.d.ts +0 -29
  211. package/lib/components/LifeCycle/Stage.d.ts.map +0 -1
  212. package/lib/components/LifeCycle/Stage.js +0 -232
  213. package/lib/components/LifeCycle/Stage.js.map +0 -1
  214. package/lib/components/LifeCycle/Step.d.ts +0 -40
  215. package/lib/components/LifeCycle/Step.d.ts.map +0 -1
  216. package/lib/components/LifeCycle/Step.js +0 -170
  217. package/lib/components/LifeCycle/Step.js.map +0 -1
  218. package/lib/components/LifeCycle/Task.d.ts +0 -34
  219. package/lib/components/LifeCycle/Task.d.ts.map +0 -1
  220. package/lib/components/LifeCycle/Task.js +0 -158
  221. package/lib/components/LifeCycle/Task.js.map +0 -1
  222. package/lib/components/LifeCycle/index.d.ts +0 -3
  223. package/lib/components/LifeCycle/index.d.ts.map +0 -1
  224. package/lib/components/LifeCycle/index.js +0 -2
  225. package/lib/components/LifeCycle/index.js.map +0 -1
  226. package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts +0 -8
  227. package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts.map +0 -1
  228. package/lib/components/MobileBuildSummary/MobileBuildSummary.js +0 -33
  229. package/lib/components/MobileBuildSummary/MobileBuildSummary.js.map +0 -1
  230. package/lib/components/MobileBuildSummary/MobileBuildSummary.types.d.ts +0 -31
  231. package/lib/components/MobileBuildSummary/MobileBuildSummary.types.d.ts.map +0 -1
  232. package/lib/components/MobileBuildSummary/MobileBuildSummary.types.js +0 -2
  233. package/lib/components/MobileBuildSummary/MobileBuildSummary.types.js.map +0 -1
  234. package/lib/components/MobileBuildSummary/index.d.ts +0 -3
  235. package/lib/components/MobileBuildSummary/index.d.ts.map +0 -1
  236. package/lib/components/MobileBuildSummary/index.js +0 -2
  237. package/lib/components/MobileBuildSummary/index.js.map +0 -1
  238. package/lib/components/ObjectPreview/ObjectPreview.d.ts +0 -16
  239. package/lib/components/ObjectPreview/ObjectPreview.d.ts.map +0 -1
  240. package/lib/components/ObjectPreview/ObjectPreview.js +0 -25
  241. package/lib/components/ObjectPreview/ObjectPreview.js.map +0 -1
  242. package/lib/components/ObjectPreview/index.d.ts +0 -3
  243. package/lib/components/ObjectPreview/index.d.ts.map +0 -1
  244. package/lib/components/ObjectPreview/index.js +0 -3
  245. package/lib/components/ObjectPreview/index.js.map +0 -1
  246. package/lib/components/ObjectSelect/ObjectPicker.d.ts +0 -15
  247. package/lib/components/ObjectSelect/ObjectPicker.d.ts.map +0 -1
  248. package/lib/components/ObjectSelect/ObjectPicker.js +0 -40
  249. package/lib/components/ObjectSelect/ObjectPicker.js.map +0 -1
  250. package/lib/components/ObjectSelect/ObjectSelect.d.ts +0 -32
  251. package/lib/components/ObjectSelect/ObjectSelect.d.ts.map +0 -1
  252. package/lib/components/ObjectSelect/ObjectSelect.js +0 -41
  253. package/lib/components/ObjectSelect/ObjectSelect.js.map +0 -1
  254. package/lib/components/ObjectSelect/ObjectSummary.d.ts +0 -32
  255. package/lib/components/ObjectSelect/ObjectSummary.d.ts.map +0 -1
  256. package/lib/components/ObjectSelect/ObjectSummary.js +0 -81
  257. package/lib/components/ObjectSelect/ObjectSummary.js.map +0 -1
  258. package/lib/components/ObjectSelect/index.d.ts +0 -3
  259. package/lib/components/ObjectSelect/index.d.ts.map +0 -1
  260. package/lib/components/ObjectSelect/index.js +0 -2
  261. package/lib/components/ObjectSelect/index.js.map +0 -1
  262. package/lib/components/ObjectSelect/useCreateModal.d.ts +0 -32
  263. package/lib/components/ObjectSelect/useCreateModal.d.ts.map +0 -1
  264. package/lib/components/ObjectSelect/useCreateModal.js +0 -60
  265. package/lib/components/ObjectSelect/useCreateModal.js.map +0 -1
  266. package/lib/components/PageBanner/PageBanner.d.ts +0 -22
  267. package/lib/components/PageBanner/PageBanner.d.ts.map +0 -1
  268. package/lib/components/PageBanner/PageBanner.js +0 -59
  269. package/lib/components/PageBanner/PageBanner.js.map +0 -1
  270. package/lib/components/PageBanner/index.d.ts +0 -3
  271. package/lib/components/PageBanner/index.d.ts.map +0 -1
  272. package/lib/components/PageBanner/index.js +0 -2
  273. package/lib/components/PageBanner/index.js.map +0 -1
  274. package/lib/components/PageTemplates/GalleryPage.d.ts +0 -23
  275. package/lib/components/PageTemplates/GalleryPage.d.ts.map +0 -1
  276. package/lib/components/PageTemplates/GalleryPage.js +0 -47
  277. package/lib/components/PageTemplates/GalleryPage.js.map +0 -1
  278. package/lib/components/PageTemplates/PageTemplates.d.ts +0 -27
  279. package/lib/components/PageTemplates/PageTemplates.d.ts.map +0 -1
  280. package/lib/components/PageTemplates/PageTemplates.js +0 -72
  281. package/lib/components/PageTemplates/PageTemplates.js.map +0 -1
  282. package/lib/components/PageTemplates/ShowcasePage.d.ts +0 -16
  283. package/lib/components/PageTemplates/ShowcasePage.d.ts.map +0 -1
  284. package/lib/components/PageTemplates/ShowcasePage.js +0 -29
  285. package/lib/components/PageTemplates/ShowcasePage.js.map +0 -1
  286. package/lib/components/PageTemplates/index.d.ts +0 -6
  287. package/lib/components/PageTemplates/index.d.ts.map +0 -1
  288. package/lib/components/PageTemplates/index.js +0 -4
  289. package/lib/components/PageTemplates/index.js.map +0 -1
  290. package/lib/components/SummaryCard/SummaryCard.d.ts +0 -15
  291. package/lib/components/SummaryCard/SummaryCard.d.ts.map +0 -1
  292. package/lib/components/SummaryCard/SummaryCard.js +0 -27
  293. package/lib/components/SummaryCard/SummaryCard.js.map +0 -1
  294. package/lib/components/SummaryCard/index.d.ts +0 -3
  295. package/lib/components/SummaryCard/index.d.ts.map +0 -1
  296. package/lib/components/SummaryCard/index.js +0 -3
  297. package/lib/components/SummaryCard/index.js.map +0 -1
  298. package/lib/components/Workbench/ConfigurationPanel.d.ts +0 -5
  299. package/lib/components/Workbench/ConfigurationPanel.d.ts.map +0 -1
  300. package/lib/components/Workbench/ConfigurationPanel.js +0 -10
  301. package/lib/components/Workbench/ConfigurationPanel.js.map +0 -1
  302. package/lib/components/Workbench/Toolbar.d.ts +0 -10
  303. package/lib/components/Workbench/Toolbar.d.ts.map +0 -1
  304. package/lib/components/Workbench/Toolbar.js +0 -14
  305. package/lib/components/Workbench/Toolbar.js.map +0 -1
  306. package/lib/components/Workbench/UtilityPanel.d.ts +0 -7
  307. package/lib/components/Workbench/UtilityPanel.d.ts.map +0 -1
  308. package/lib/components/Workbench/UtilityPanel.js +0 -12
  309. package/lib/components/Workbench/UtilityPanel.js.map +0 -1
  310. package/lib/components/Workbench/Workbench.d.ts +0 -6
  311. package/lib/components/Workbench/Workbench.d.ts.map +0 -1
  312. package/lib/components/Workbench/Workbench.js +0 -23
  313. package/lib/components/Workbench/Workbench.js.map +0 -1
  314. package/lib/components/Workbench/Workbench.styles.d.ts +0 -10
  315. package/lib/components/Workbench/Workbench.styles.d.ts.map +0 -1
  316. package/lib/components/Workbench/Workbench.styles.js +0 -75
  317. package/lib/components/Workbench/Workbench.styles.js.map +0 -1
  318. package/lib/components/Workbench/Workbench.types.d.ts +0 -47
  319. package/lib/components/Workbench/Workbench.types.d.ts.map +0 -1
  320. package/lib/components/Workbench/Workbench.types.js +0 -2
  321. package/lib/components/Workbench/Workbench.types.js.map +0 -1
  322. package/lib/components/Workbench/index.d.ts +0 -2
  323. package/lib/components/Workbench/index.d.ts.map +0 -1
  324. package/lib/components/Workbench/index.js +0 -2
  325. package/lib/components/Workbench/index.js.map +0 -1
  326. package/lib/index.d.ts +0 -23
  327. package/lib/index.d.ts.map +0 -1
  328. package/lib/index.js +0 -24
  329. package/lib/index.js.map +0 -1
  330. package/lib/utils/index.d.ts +0 -2
  331. package/lib/utils/index.d.ts.map +0 -1
  332. package/lib/utils/index.js +0 -2
  333. package/lib/utils/index.js.map +0 -1
  334. package/lib/utils/utils.d.ts +0 -14
  335. package/lib/utils/utils.d.ts.map +0 -1
  336. package/lib/utils/utils.js +0 -13
  337. package/lib/utils/utils.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"getCodeSuggestions.js","sourceRoot":"","sources":["../../../../src/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.tsx"],"names":[],"mappings":";;AAAA,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,EAAU,GAAG,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,QAAQ,MAAM,sDAAsD,CAAC;AAG5E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,kBAAkB,GAAG,CACzB,UAAkB,EAClB,EACE,WAAW,GAAG,EAAE,EAChB,OAAO,GAAG,KAAK,EACf,yBAAyB,GAAG;IAC1B,EAAE,EAAE,CAAC;IACL,IAAI,EAAE,CAAC;CACR,EACiB,EACpB,EAAE;IACF,MAAM,eAAe,GAAG,UAAU,CAAC,SAAS,EAAE,CAAC;IAC/C,MAAM,WAAW,GAAG,UAAU;SAC3B,QAAQ,EAAE;SACV,KAAK,CAAC,IAAI,CAAC,CACX,yBAAyB,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,yBAAyB,CAAC,EAAE,EAAE,eAAe,CA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B,CAAC,EAAE,GAAG,CAAC,CAAC;QACjE,EAAE,EAAE,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,eAAe,CAAC,EAAE,CAAC;KAClD,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import ReactDOM from 'react-dom';\nimport { Editor, Pos } from 'codemirror';\n\nimport { Progress, Flex, EmptyState } from '@pega/cosmos-react-core';\nimport MenuItem from '@pega/cosmos-react-core/lib/components/Menu/MenuItem';\n\nimport { EditorHintOptions } from './CodeEditor.types';\nimport { StyledLoading } from './CodeEditor.styles';\n\nconst getCodeSuggestions = (\n codeMirror: Editor,\n {\n suggestions = [],\n loading = false,\n triggerCharacterCursorPos = {\n ch: 0,\n line: 0\n }\n }: EditorHintOptions\n) => {\n const currentPosition = codeMirror.getCursor();\n const filterQuery = codeMirror\n .getValue()\n .split('\\n')\n [triggerCharacterCursorPos.line]?.substring(triggerCharacterCursorPos.ch, currentPosition.ch);\n\n let filteredList: {\n text: string;\n displayText: string;\n render: (element: HTMLLIElement) => void;\n }[] = [];\n\n if (loading || suggestions.length === 0) {\n filteredList = [\n {\n text: '',\n displayText: '',\n render: (element: HTMLLIElement) => {\n ReactDOM.render(\n <Flex\n container={{\n justify: 'center',\n pad: 1\n }}\n >\n {loading ? (\n <Progress variant='ring' placement='inline' visible={loading} as={StyledLoading} />\n ) : (\n <EmptyState />\n )}\n </Flex>,\n element\n );\n }\n }\n ];\n } else {\n filteredList = suggestions\n .map(hint => {\n return {\n text: hint.id,\n displayText: hint.primary,\n render: (element: HTMLLIElement) => {\n ReactDOM.render(<MenuItem {...hint} key={hint.id} role='menuitem' />, element);\n }\n };\n })\n .filter(item => item.displayText.toLowerCase().startsWith(filterQuery.toLowerCase()));\n }\n\n return {\n list: filteredList,\n from: Pos(currentPosition.line, triggerCharacterCursorPos.ch - 1),\n to: Pos(currentPosition.line, currentPosition.ch)\n };\n};\n\nexport default getCodeSuggestions;\n"]}
@@ -1,6 +0,0 @@
1
- import { FunctionComponent } from 'react';
2
- import { ForwardProps } from '@pega/cosmos-react-core';
3
- import { ExpressionBuilderProps } from './ExpressionBuilder.types';
4
- declare const ExpressionBuilder: FunctionComponent<ExpressionBuilderProps & ForwardProps>;
5
- export default ExpressionBuilder;
6
- //# sourceMappingURL=ExpressionBuilder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpressionBuilder.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAKlB,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,YAAY,EAIb,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAuB,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAOxF,QAAA,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,sBAAsB,GAAG,YAAY,CAiH/E,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1,51 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useImperativeHandle, useMemo, useRef } from 'react';
3
- import { Flex, SearchInput, useI18n, VisuallyHiddenText } from '@pega/cosmos-react-core';
4
- import ExpressionList from './ExpressionList';
5
- import { StyledExpressionBuilder } from './ExpressionBuilder.styles';
6
- import CodeEditor from './CodeEditor/CodeEditor';
7
- import ExpressionBuilderContext from './ExpressionBuilderContext';
8
- const ExpressionBuilder = forwardRef(function ExpressionBuilder({ list, search, errors, defaultValue, handle, fetchSuggestions, loading, readOnly, onChange, ...restProps }, ref) {
9
- const t = useI18n();
10
- const codeEditorHandle = useRef(null);
11
- const getExpression = () => {
12
- return codeEditorHandle.current?.getValue() || '';
13
- };
14
- useImperativeHandle(handle, () => ({
15
- getExpression
16
- }), [getExpression]);
17
- const addExpression = (expression) => {
18
- codeEditorHandle.current?.insertText(expression);
19
- };
20
- const onItemAdd = (id) => {
21
- list.onItemAdd(id, addExpression);
22
- };
23
- const ctxValue = useMemo(() => ({
24
- accent: search.accent
25
- }), [search.accent]);
26
- return (_jsxs(Flex, { ...restProps, as: StyledExpressionBuilder, ref: ref, container: {
27
- justify: 'between',
28
- colGap: 2,
29
- pad: 1
30
- }, item: {
31
- grow: 1
32
- }, children: [!readOnly && (_jsx(VisuallyHiddenText, { "aria-live": 'polite', role: 'status', children: t('results_count', [list.items?.length || 0], { count: list.items?.length || 0 }) })), !readOnly && (_jsxs(Flex, { container: {
33
- direction: 'column',
34
- justify: 'between',
35
- gap: 1
36
- }, item: {
37
- grow: 1,
38
- basis: '50%'
39
- }, children: [_jsx(SearchInput, { ...search }), _jsx(ExpressionBuilderContext.Provider, { value: ctxValue, children: _jsx(ExpressionList, { ...list, onItemAdd: onItemAdd }) })] })), _jsx(Flex, { container: {
40
- direction: 'column',
41
- justify: 'between'
42
- }, item: {
43
- grow: 1,
44
- basis: '50%'
45
- }, children: _jsx(CodeEditor, { fetchSuggestions: fetchSuggestions, codeEditorHandle: codeEditorHandle, autoCompleteTriggers: ['.', '@', ':'], editorConfigProps: {
46
- mode: 'expression',
47
- readOnly
48
- }, defaultValue: defaultValue, loading: loading, errors: errors, readOnly: readOnly, onChange: onChange, "aria-label": t('expression_editor') }) })] }));
49
- });
50
- export default ExpressionBuilder;
51
- //# sourceMappingURL=ExpressionBuilder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpressionBuilder.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionBuilder.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAGV,mBAAmB,EACnB,OAAO,EACP,MAAM,EACP,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,IAAI,EAEJ,WAAW,EACX,OAAO,EACP,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,UAAU,M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EF,eAAe,iBAAiB,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n PropsWithoutRef,\n useImperativeHandle,\n useMemo,\n useRef\n} from 'react';\n\nimport {\n Flex,\n ForwardProps,\n SearchInput,\n useI18n,\n VisuallyHiddenText\n} from '@pega/cosmos-react-core';\n\nimport { ExpressionItemProps, ExpressionBuilderProps } from './ExpressionBuilder.types';\nimport { EditorState } from './CodeEditor/CodeEditor.types';\nimport ExpressionList from './ExpressionList';\nimport { StyledExpressionBuilder } from './ExpressionBuilder.styles';\nimport CodeEditor from './CodeEditor/CodeEditor';\nimport ExpressionBuilderContext from './ExpressionBuilderContext';\n\nconst ExpressionBuilder: FunctionComponent<ExpressionBuilderProps & ForwardProps> = forwardRef(\n function ExpressionBuilder(\n {\n list,\n search,\n errors,\n defaultValue,\n handle,\n fetchSuggestions,\n loading,\n readOnly,\n onChange,\n ...restProps\n }: PropsWithoutRef<ExpressionBuilderProps>,\n ref: ExpressionBuilderProps['ref']\n ) {\n const t = useI18n();\n const codeEditorHandle = useRef<EditorState>(null);\n\n const getExpression = () => {\n return codeEditorHandle.current?.getValue() || '';\n };\n\n useImperativeHandle(\n handle,\n () => ({\n getExpression\n }),\n [getExpression]\n );\n\n const addExpression = (expression: string) => {\n codeEditorHandle.current?.insertText(expression);\n };\n const onItemAdd = (id: ExpressionItemProps['id']) => {\n list.onItemAdd(id, addExpression);\n };\n\n const ctxValue = useMemo(\n () => ({\n accent: search.accent\n }),\n [search.accent]\n );\n\n return (\n <Flex\n {...restProps}\n as={StyledExpressionBuilder}\n ref={ref}\n container={{\n justify: 'between',\n colGap: 2,\n pad: 1\n }}\n item={{\n grow: 1\n }}\n >\n {!readOnly && (\n <VisuallyHiddenText aria-live='polite' role='status'>\n {t('results_count', [list.items?.length || 0], { count: list.items?.length || 0 })}\n </VisuallyHiddenText>\n )}\n {/* Column 1 */}\n {!readOnly && (\n <Flex\n container={{\n direction: 'column',\n justify: 'between',\n gap: 1\n }}\n item={{\n grow: 1,\n basis: '50%'\n }}\n >\n <SearchInput {...search} />\n <ExpressionBuilderContext.Provider value={ctxValue}>\n <ExpressionList {...list} onItemAdd={onItemAdd} />\n </ExpressionBuilderContext.Provider>\n </Flex>\n )}\n {/* Column 2 */}\n <Flex\n container={{\n direction: 'column',\n justify: 'between'\n }}\n item={{\n grow: 1,\n basis: '50%'\n }}\n >\n <CodeEditor\n fetchSuggestions={fetchSuggestions}\n codeEditorHandle={codeEditorHandle}\n autoCompleteTriggers={['.', '@', ':']}\n editorConfigProps={{\n mode: 'expression',\n readOnly\n }}\n defaultValue={defaultValue}\n loading={loading}\n errors={errors}\n readOnly={readOnly}\n onChange={onChange}\n aria-label={t('expression_editor')}\n />\n </Flex>\n </Flex>\n );\n }\n);\n\nexport default ExpressionBuilder;\n"]}
@@ -1,14 +0,0 @@
1
- /// <reference types="react" />
2
- import { ExpressionItemProps } from './ExpressionBuilder.types';
3
- export declare const StyledPrimaryText: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").TextProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
4
- export declare const StyledExpressionSummary: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
5
- export declare const StyledExpressionList: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
6
- export declare const StyledExpressionBuilder: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
7
- export declare const StyledParamsGroup: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
8
- export declare const StyledInputParamsGroup: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
9
- export declare const StyledExpressionDetails: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
10
- export declare const StyledExpandCollapseContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
11
- export declare const StyledExpressionItem: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {
12
- expanded: ExpressionItemProps['expanded'];
13
- }, never>;
14
- //# sourceMappingURL=ExpressionBuilder.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpressionBuilder.styles.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionBuilder.styles.ts"],"names":[],"mappings":";AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,eAAO,MAAM,iBAAiB,mOAE7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,yGAKlC,CAAC;AAIH,eAAO,MAAM,oBAAoB,wGAIhC,CAAC;AAEF,eAAO,MAAM,uBAAuB,yGASlC,CAAC;AAIH,eAAO,MAAM,iBAAiB,yGAQ5B,CAAC;AAIH,eAAO,MAAM,sBAAsB,yGAIjC,CAAC;AAIH,eAAO,MAAM,uBAAuB,yGAAe,CAAC;AAIpD,eAAO,MAAM,2BAA2B,yGAQtC,CAAC;AAIH,eAAO,MAAM,oBAAoB;cACrB,mBAAmB,CAAC,UAAU,CAAC;SAuBzC,CAAC"}
@@ -1,81 +0,0 @@
1
- import styled, { css } from 'styled-components';
2
- import { defaultThemeProp, StyledButton, StyledLabel, StyledText, Text } from '@pega/cosmos-react-core';
3
- export const StyledPrimaryText = styled(Text) `
4
- word-break: break-word;
5
- `;
6
- export const StyledExpressionSummary = styled.div(({ theme }) => {
7
- return css `
8
- padding-block: ${theme.base.spacing};
9
- padding-inline: calc(0.5 * ${theme.base.spacing});
10
- `;
11
- });
12
- StyledExpressionSummary.defaultProps = defaultThemeProp;
13
- export const StyledExpressionList = styled.ul `
14
- overflow-y: auto;
15
- flex-grow: 1;
16
- list-style: none;
17
- `;
18
- export const StyledExpressionBuilder = styled.div(({ theme }) => {
19
- return css `
20
- position: relative;
21
- background-color: ${theme.base.palette['primary-background']};
22
- min-height: calc(30 * ${theme.base.spacing});
23
- max-height: 100%;
24
- max-width: calc(2 * ${theme.base['content-width'].lg} + 4 * ${theme.base.spacing});
25
- min-width: calc(${theme.base['content-width'].lg} + 4 * ${theme.base.spacing});
26
- `;
27
- });
28
- StyledExpressionBuilder.defaultProps = defaultThemeProp;
29
- export const StyledParamsGroup = styled.div(({ theme }) => {
30
- return css `
31
- margin-block-start: calc(2 * ${theme.base.spacing});
32
-
33
- ${StyledText} {
34
- margin-block-end: ${theme.base.spacing};
35
- }
36
- `;
37
- });
38
- StyledParamsGroup.defaultProps = defaultThemeProp;
39
- export const StyledInputParamsGroup = styled(StyledParamsGroup)(({ theme }) => {
40
- return css `
41
- max-width: ${theme.base['content-width'].lg};
42
- `;
43
- });
44
- StyledInputParamsGroup.defaultProps = defaultThemeProp;
45
- export const StyledExpressionDetails = styled.div ``;
46
- StyledExpressionDetails.defaultProps = defaultThemeProp;
47
- export const StyledExpandCollapseContent = styled.div(({ theme }) => {
48
- return css `
49
- padding-inline: calc(2 * ${theme.base.spacing});
50
- padding-block-end: calc(2 * ${theme.base.spacing});
51
- ${StyledButton} {
52
- align-self: flex-end;
53
- }
54
- `;
55
- });
56
- StyledExpandCollapseContent.defaultProps = defaultThemeProp;
57
- export const StyledExpressionItem = styled.li(({ theme, expanded }) => {
58
- return css `
59
- list-style: none;
60
- background-color: ${theme.base.palette['primary-background']};
61
- ${expanded &&
62
- css `
63
- background-color: ${theme.base.palette['secondary-background']};
64
- `}
65
-
66
- :not(:last-child) {
67
- border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};
68
- }
69
-
70
- ${StyledExpressionDetails} {
71
- padding-block-end: calc(2 * ${theme.base.spacing});
72
- }
73
-
74
- ${StyledLabel} {
75
- margin-inline-end: calc(0.5 * ${theme.base.spacing});
76
- color: ${theme.base.palette['foreground-color']};
77
- }
78
- `;
79
- });
80
- StyledExpressionItem.defaultProps = defaultThemeProp;
81
- //# sourceMappingURL=ExpressionBuilder.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpressionBuilder.styles.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/Ex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;MAGlE,uBAAuB;oCACO,KAAK,CAAC,IAAI,CAAC,OAAO;;;MAGhD,WAAW;sCACqB,KAAK,CAAC,IAAI,CAAC,OAAO;eACzC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC;;GAElD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,oBAAoB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport {\n defaultThemeProp,\n StyledButton,\n StyledLabel,\n StyledText,\n Text\n} from '@pega/cosmos-react-core';\n\nimport { ExpressionItemProps } from './ExpressionBuilder.types';\n\nexport const StyledPrimaryText = styled(Text)`\n word-break: break-word;\n`;\n\nexport const StyledExpressionSummary = styled.div(({ theme }) => {\n return css`\n padding-block: ${theme.base.spacing};\n padding-inline: calc(0.5 * ${theme.base.spacing});\n `;\n});\n\nStyledExpressionSummary.defaultProps = defaultThemeProp;\n\nexport const StyledExpressionList = styled.ul`\n overflow-y: auto;\n flex-grow: 1;\n list-style: none;\n`;\n\nexport const StyledExpressionBuilder = styled.div(({ theme }) => {\n return css`\n position: relative;\n background-color: ${theme.base.palette['primary-background']};\n min-height: calc(30 * ${theme.base.spacing});\n max-height: 100%;\n max-width: calc(2 * ${theme.base['content-width'].lg} + 4 * ${theme.base.spacing});\n min-width: calc(${theme.base['content-width'].lg} + 4 * ${theme.base.spacing});\n `;\n});\n\nStyledExpressionBuilder.defaultProps = defaultThemeProp;\n\nexport const StyledParamsGroup = styled.div(({ theme }) => {\n return css`\n margin-block-start: calc(2 * ${theme.base.spacing});\n\n ${StyledText} {\n margin-block-end: ${theme.base.spacing};\n }\n `;\n});\n\nStyledParamsGroup.defaultProps = defaultThemeProp;\n\nexport const StyledInputParamsGroup = styled(StyledParamsGroup)(({ theme }) => {\n return css`\n max-width: ${theme.base['content-width'].lg};\n `;\n});\n\nStyledInputParamsGroup.defaultProps = defaultThemeProp;\n\nexport const StyledExpressionDetails = styled.div``;\n\nStyledExpressionDetails.defaultProps = defaultThemeProp;\n\nexport const StyledExpandCollapseContent = styled.div(({ theme }) => {\n return css`\n padding-inline: calc(2 * ${theme.base.spacing});\n padding-block-end: calc(2 * ${theme.base.spacing});\n ${StyledButton} {\n align-self: flex-end;\n }\n `;\n});\n\nStyledExpandCollapseContent.defaultProps = defaultThemeProp;\n\nexport const StyledExpressionItem = styled.li<{\n expanded: ExpressionItemProps['expanded'];\n}>(({ theme, expanded }) => {\n return css`\n list-style: none;\n background-color: ${theme.base.palette['primary-background']};\n ${expanded &&\n css`\n background-color: ${theme.base.palette['secondary-background']};\n `}\n\n :not(:last-child) {\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n }\n\n ${StyledExpressionDetails} {\n padding-block-end: calc(2 * ${theme.base.spacing});\n }\n\n ${StyledLabel} {\n margin-inline-end: calc(0.5 * ${theme.base.spacing});\n color: ${theme.base.palette['foreground-color']};\n }\n `;\n});\n\nStyledExpressionItem.defaultProps = defaultThemeProp;\n"]}
@@ -1,74 +0,0 @@
1
- import { ComponentType, Ref } from 'react';
2
- import { BaseProps, EmptyStateProps, OmitStrict, SearchInputProps, FieldValueListProps, MenuProps } from '@pega/cosmos-react-core';
3
- import { CodeEditorProps } from './CodeEditor/CodeEditor.types';
4
- export interface ExpressionItemProps {
5
- /** Id of the item */
6
- id: string;
7
- /** Item name to be displayed as rule name */
8
- primary: string;
9
- /** Type of expression item. Eg: Decision, When, Automation etc. */
10
- type: string;
11
- /** Callback for add event */
12
- onAdd: (id: ExpressionItemProps['id']) => void;
13
- /** Callback for expand event */
14
- onExpand?: (id: ExpressionItemProps['id']) => void;
15
- /** Callback for collapse event */
16
- onCollapse?: (id: ExpressionItemProps['id']) => void;
17
- /** Show the expanded details */
18
- expanded?: boolean;
19
- /** Expression details to show in expanded view */
20
- details?: ExpressionDetailsProps;
21
- /** Matched field to be shown in expression item collapsed mode during search */
22
- matchedField?: {
23
- name: string;
24
- value: string;
25
- };
26
- }
27
- export interface ExpressionListProps extends BaseProps {
28
- ref?: Ref<HTMLUListElement>;
29
- /** Expression builder items */
30
- items?: OmitStrict<ExpressionItemProps, 'onAdd' | 'onExpand' | 'onCollapse' | 'details'>[];
31
- /** Callback for item add */
32
- onItemAdd: ExpressionItemProps['onAdd'];
33
- /** Callback for item expand */
34
- onItemExpand?: ExpressionItemProps['onExpand'];
35
- /** Callback for item collapse */
36
- onItemCollapse?: ExpressionItemProps['onCollapse'];
37
- /** No items */
38
- emptyText?: EmptyStateProps['message'];
39
- /** Expanded items data */
40
- details: {
41
- [id: string]: ExpressionDetailsProps;
42
- };
43
- }
44
- export interface HandleValue {
45
- /** Returns the expression value */
46
- getExpression: () => string;
47
- }
48
- export interface ExpressionBuilderProps extends BaseProps, OmitStrict<CodeEditorProps, 'ref' | 'codeEditorHandle'> {
49
- ref?: Ref<HTMLDivElement>;
50
- /** Expression items list */
51
- list: OmitStrict<ExpressionListProps, 'ref' | 'onItemAdd'> & {
52
- onItemAdd: (id: ExpressionItemProps['id'], addExpression: (expression: string) => void) => void;
53
- };
54
- /** Search input props */
55
- search: Pick<Required<SearchInputProps>, 'filters' | 'onFilterChange' | 'onSearchChange' | 'value'> & Pick<SearchInputProps, 'defaultFilter'> & Pick<MenuProps, 'accent'>;
56
- /** Imperative handle */
57
- handle?: Ref<HandleValue>;
58
- }
59
- export interface InputParams<P> {
60
- id: string;
61
- renderer: ComponentType<P>;
62
- rendererProps: P;
63
- }
64
- export interface ExpressionDetailsProps extends BaseProps {
65
- /** Primary details of the expression */
66
- primary: Required<FieldValueListProps['fields']>;
67
- /** Output params of the expression */
68
- outputParams?: Required<FieldValueListProps['fields']>;
69
- /** Input params of the expression */
70
- inputParams?: InputParams<any>[];
71
- /** Ref to the component */
72
- ref?: Ref<HTMLElement>;
73
- }
74
- //# sourceMappingURL=ExpressionBuilder.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpressionBuilder.types.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/Ex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WAAW,sBAAuB,SAAQ,SAAS;IACvD,wCAAwC;IACxC,OAAO,EAAE,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjD,sCAAsC;IACtC,YAAY,CAAC,EAAE,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACvD,qCAAqC;IACrC,WAAW,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;IACjC,2BAA2B;IAC3B,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;CACxB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ExpressionBuilder.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpressionBuilder.types.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionBuilder.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ComponentType, Ref } from 'react';\n\nimport {\n BaseProps,\n EmptyStateProps,\n OmitStrict,\n SearchInputProps,\n FieldValueListProps,\n MenuProps\n} from '@pega/cosmos-react-core';\n\nimport { CodeEditorProps } from './CodeEditor/CodeEditor.types';\n\nexport interface ExpressionItemProps {\n /** Id of the item */\n id: string;\n /** Item name to be displayed as rule name */\n primary: string;\n /** Type of expression item. Eg: Decision, When, Automation etc. */\n type: string;\n /** Callback for add event */\n onAdd: (id: ExpressionItemProps['id']) => void;\n /** Callback for expand event */\n onExpand?: (id: ExpressionItemProps['id']) => void;\n /** Callback for collapse event */\n onCollapse?: (id: ExpressionItemProps['id']) => void;\n /** Show the expanded details */\n expanded?: boolean;\n /** Expression details to show in expanded view */\n details?: ExpressionDetailsProps;\n /** Matched field to be shown in expression item collapsed mode during search */\n matchedField?: { name: string; value: string };\n}\n\nexport interface ExpressionListProps extends BaseProps {\n ref?: Ref<HTMLUListElement>;\n /** Expression builder items */\n items?: OmitStrict<ExpressionItemProps, 'onAdd' | 'onExpand' | 'onCollapse' | 'details'>[];\n /** Callback for item add */\n onItemAdd: ExpressionItemProps['onAdd'];\n /** Callback for item expand */\n onItemExpand?: ExpressionItemProps['onExpand'];\n /** Callback for item collapse */\n onItemCollapse?: ExpressionItemProps['onCollapse'];\n /** No items */\n emptyText?: EmptyStateProps['message'];\n /** Expanded items data */\n details: {\n [id: string]: ExpressionDetailsProps;\n };\n}\n\nexport interface HandleValue {\n /** Returns the expression value */\n getExpression: () => string;\n}\n\nexport interface ExpressionBuilderProps\n extends BaseProps,\n OmitStrict<CodeEditorProps, 'ref' | 'codeEditorHandle'> {\n ref?: Ref<HTMLDivElement>;\n /** Expression items list */\n list: OmitStrict<ExpressionListProps, 'ref' | 'onItemAdd'> & {\n onItemAdd: (id: ExpressionItemProps['id'], addExpression: (expression: string) => void) => void;\n };\n /** Search input props */\n search: Pick<\n Required<SearchInputProps>,\n 'filters' | 'onFilterChange' | 'onSearchChange' | 'value'\n > &\n Pick<SearchInputProps, 'defaultFilter'> &\n Pick<MenuProps, 'accent'>;\n\n /** Imperative handle */\n handle?: Ref<HandleValue>;\n}\n\nexport interface InputParams<P> {\n id: string;\n renderer: ComponentType<P>;\n rendererProps: P;\n}\n\nexport interface ExpressionDetailsProps extends BaseProps {\n /** Primary details of the expression */\n primary: Required<FieldValueListProps['fields']>;\n /** Output params of the expression */\n outputParams?: Required<FieldValueListProps['fields']>;\n /** Input params of the expression */\n inputParams?: InputParams<any>[];\n /** Ref to the component */\n ref?: Ref<HTMLElement>;\n}\n"]}
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import { MenuProps } from '@pega/cosmos-react-core';
3
- declare const ExpressionBuilderContext: import("react").Context<{
4
- accent: MenuProps['accent'];
5
- }>;
6
- export default ExpressionBuilderContext;
7
- //# sourceMappingURL=ExpressionBuilderContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpressionBuilderContext.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionBuilderContext.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,QAAA,MAAM,wBAAwB;YAA2B,SAAS,CAAC,QAAQ,CAAC;EAE1E,CAAC;AAEH,eAAe,wBAAwB,CAAC"}
@@ -1,6 +0,0 @@
1
- import { createContext } from 'react';
2
- const ExpressionBuilderContext = createContext({
3
- accent: undefined
4
- });
5
- export default ExpressionBuilderContext;
6
- //# sourceMappingURL=ExpressionBuilderContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpressionBuilderContext.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionBuilderContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC,MAAM,wBAAwB,GAAG,aAAa,CAAkC;IAC9E,MAAM,EAAE,SAAS;CAClB,CAAC,CAAC;AAEH,eAAe,wBAAwB,CAAC","sourcesContent":["import { createContext } from 'react';\n\nimport { MenuProps } from '@pega/cosmos-react-core';\n\nconst ExpressionBuilderContext = createContext<{ accent: MenuProps['accent'] }>({\n accent: undefined\n});\n\nexport default ExpressionBuilderContext;\n"]}
@@ -1,6 +0,0 @@
1
- import { FunctionComponent } from 'react';
2
- import { ForwardProps } from '@pega/cosmos-react-core';
3
- import { ExpressionDetailsProps } from './ExpressionBuilder.types';
4
- declare const ExpressionDetails: FunctionComponent<ExpressionDetailsProps & ForwardProps>;
5
- export default ExpressionDetails;
6
- //# sourceMappingURL=ExpressionDetails.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpressionDetails.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAwB,YAAY,EAAiB,MAAM,yBAAyB,CAAC;AAE5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAOnE,QAAA,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,sBAAsB,GAAG,YAAY,CAiC/E,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1,12 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from 'react';
3
- import { FieldValueList, Flex, Text, useI18n } from '@pega/cosmos-react-core';
4
- import { StyledExpressionDetails, StyledInputParamsGroup, StyledParamsGroup } from './ExpressionBuilder.styles';
5
- const ExpressionDetails = forwardRef(function ExpressionDetails({ primary, inputParams, outputParams, ...restProps }, ref) {
6
- const t = useI18n();
7
- return (_jsxs(Flex, { ...restProps, ref: ref, container: { direction: 'column' }, as: StyledExpressionDetails, children: [_jsx(FieldValueList, { fields: primary }), outputParams && (_jsxs(StyledParamsGroup, { children: [_jsx(Text, { variant: 'h4', children: t('output_parameters') }), _jsx(FieldValueList, { fields: outputParams })] })), inputParams && (_jsxs(StyledInputParamsGroup, { children: [_jsx(Text, { variant: 'h4', children: t('input_parameters') }), _jsx(Flex, { container: { direction: 'column', gap: 1 }, children: inputParams.map(({ id, renderer: Renderer, rendererProps }) => {
8
- return _jsx(Renderer, { ...rendererProps }, id);
9
- }) })] }))] }));
10
- });
11
- export default ExpressionDetails;
12
- //# sourceMappingURL=ExpressionDetails.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpressionDetails.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionDetails.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,IAAI,EAAgB,IAAI,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAG5F,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,iBAAiB,GAA6D,UAAU,CAC5F,SAAS,iBAAiB,CACxB,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,SAAS,EAAE,EACpD,GAAkC;IAElC,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,OAAO,CACL,MAAC,IAAI,OACC,SAAS,EACb,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAClC,EAAE,EAAE,uBAAuB,aAE3B,KAAC,cAAc,IAAC,MAAM,EAAE,OAAO,GAAI,EAClC,YAAY,IAAI,CACf,MAAC,iBAAiB,eAChB,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,YAAE,CAAC,CAAC,mBAAmB,CAAC,GAAQ,EAClD,KAAC,cAAc,IAAC,MAAM,EAAE,YAAY,GAAI,IACtB,CACrB,EACA,WAAW,IAAI,CACd,MAAC,sBAAsB,eACrB,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,YAAE,CAAC,CAAC,kBAAkB,CAAC,GAAQ,EACjD,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,YAC7C,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,EAAE;4BAC7D,OAAO,KAAC,QAAQ,OAAc,aAAa,IAArB,EAAE,CAAuB,CAAC;wBAClD,CAAC,CAAC,GACG,IACgB,CAC1B,IACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import { forwardRef, FunctionComponent } from 'react';\n\nimport { FieldValueList, Flex, ForwardProps, Text, useI18n } from '@pega/cosmos-react-core';\n\nimport { ExpressionDetailsProps } from './ExpressionBuilder.types';\nimport {\n StyledExpressionDetails,\n StyledInputParamsGroup,\n StyledParamsGroup\n} from './ExpressionBuilder.styles';\n\nconst ExpressionDetails: FunctionComponent<ExpressionDetailsProps & ForwardProps> = forwardRef(\n function ExpressionDetails(\n { primary, inputParams, outputParams, ...restProps },\n ref: ExpressionDetailsProps['ref']\n ) {\n const t = useI18n();\n return (\n <Flex\n {...restProps}\n ref={ref}\n container={{ direction: 'column' }}\n as={StyledExpressionDetails}\n >\n <FieldValueList fields={primary} />\n {outputParams && (\n <StyledParamsGroup>\n <Text variant='h4'>{t('output_parameters')}</Text>\n <FieldValueList fields={outputParams} />\n </StyledParamsGroup>\n )}\n {inputParams && (\n <StyledInputParamsGroup>\n <Text variant='h4'>{t('input_parameters')}</Text>\n <Flex container={{ direction: 'column', gap: 1 }}>\n {inputParams.map(({ id, renderer: Renderer, rendererProps }) => {\n return <Renderer key={id} {...rendererProps} />;\n })}\n </Flex>\n </StyledInputParamsGroup>\n )}\n </Flex>\n );\n }\n);\n\nexport default ExpressionDetails;\n"]}
@@ -1,6 +0,0 @@
1
- import { FunctionComponent } from 'react';
2
- import { ForwardProps } from '@pega/cosmos-react-core';
3
- import { ExpressionItemProps } from './ExpressionBuilder.types';
4
- declare const ExpressionItem: FunctionComponent<ExpressionItemProps & ForwardProps>;
5
- export default ExpressionItem;
6
- //# sourceMappingURL=ExpressionItem.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpressionItem.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAE/D,OAAO,EAIL,YAAY,EASb,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAYhE,QAAA,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,GAAG,YAAY,CAsGzE,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,39 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useContext, useMemo } from 'react';
3
- import { Button, ExpandCollapse, Flex, Icon, Mark, registerIcon, replaceMatchWithElement, StyledLabel, Text, useDirection, useI18n } from '@pega/cosmos-react-core';
4
- import * as caretRightIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-right.icon';
5
- import * as caretLeftIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-left.icon';
6
- import { StyledPrimaryText, StyledExpandCollapseContent, StyledExpressionSummary, StyledExpressionItem } from './ExpressionBuilder.styles';
7
- import ExpressionDetails from './ExpressionDetails';
8
- import ExpressionBuilderContext from './ExpressionBuilderContext';
9
- registerIcon(caretLeftIcon, caretRightIcon);
10
- const ExpressionItem = ({ id, primary, type, onAdd, onExpand, onCollapse, details, matchedField, expanded = false, ...restProps }) => {
11
- const { end: caretDirection } = useDirection();
12
- const t = useI18n();
13
- const { accent } = useContext(ExpressionBuilderContext);
14
- const accentedText = (text) => {
15
- if (accent) {
16
- const accentRegex = typeof accent === 'function' ? accent(text) : accent;
17
- return replaceMatchWithElement(text, accentRegex, str => {
18
- return _jsx(Mark, { children: str });
19
- });
20
- }
21
- return text;
22
- };
23
- const caretIcon = useMemo(() => {
24
- return expanded ? 'caret-down' : `caret-${caretDirection}`;
25
- }, [expanded, caretDirection]);
26
- const accentedMeta = matchedField && !expanded ? accentedText(matchedField.value) : undefined;
27
- return (_jsxs(StyledExpressionItem, { expanded: expanded, children: [_jsxs(Flex, { ...restProps, as: StyledExpressionSummary, id: id, container: { gap: 1, alignItems: 'start' }, children: [_jsx(Button, { icon: true, variant: 'simple', onClick: onCollapse || onExpand
28
- ? () => {
29
- if (expanded) {
30
- onCollapse?.(id);
31
- }
32
- else {
33
- onExpand?.(id);
34
- }
35
- }
36
- : undefined, "aria-label": `${type}: ${primary}`, "aria-expanded": expanded, label: expanded ? t('collapse') : t('expand'), children: _jsx(Icon, { name: caretIcon }) }), _jsxs(Flex, { container: { alignItems: 'start', direction: 'column' }, item: { grow: 1 }, children: [_jsx(StyledPrimaryText, { variant: 'primary', children: !matchedField ? accentedText(primary) : primary }), accentedMeta ? (_jsxs("div", { children: [_jsxs(StyledLabel, { as: 'span', children: [matchedField?.name, ":"] }), accentedMeta] })) : (_jsx(Text, { variant: 'secondary', children: type }))] }), !expanded && (_jsx(Button, { icon: true, variant: 'simple', onClick: () => onAdd(id), "aria-label": t('add_noun', [`${type}: ${primary}`]), label: t('add'), children: _jsx(Icon, { name: 'plus' }) }))] }), _jsx(ExpandCollapse, { collapsed: !expanded, children: _jsxs(Flex, { as: StyledExpandCollapseContent, container: { direction: 'column' }, children: [details && _jsx(ExpressionDetails, { ...details }), _jsx(Button, { variant: 'primary', onClick: () => onAdd(id), "aria-label": t('add_noun', [`${type}: ${primary}`]), children: t('add') })] }) })] }));
37
- };
38
- export default ExpressionItem;
39
- //# sourceMappingURL=ExpressionItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpressionItem.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,EACL,MAAM,EACN,cAAc,EACd,IAAI,EAEJ,IAAI,EACJ,IAAI,EACJ,YAAY,EACZ,uBAAuB,EACvB,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,OAAO,EACR,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,cAAc,MAAM,oEAAoE,CAAC;AACrG,OAAO,KAAK,aAAa,MAAM,mEAAmE,CAAC;AAGnG,OAAO,EACL,iBAAiB,EACjB,2BAA2B,EAC3B,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAElE,YAAY,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;AAE5C,MAAM,cAAc,GAA0D,CAAC,EAC7E,EAAE,EACF,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,UAAU,EACV,OAAO,EACP,YAAY,EACZ,QAAQ,GAAG,KAAK,EAChB,GAAG,SAA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,IAAC,SAAS,EAAE,CAAC,QAAQ,YAClC,MAAC,IAAI,IAAC,EAAE,EAAE,2BAA2B,EAAE,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,aACtE,OAAO,IAAI,KAAC,iBAAiB,OAAK,OAAO,GAAI,EAC9C,KAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,gBACZ,CAAC,CAAC,UAAU,EAAE,CAAC,GAAG,IAAI,KAAK,OAAO,EAAE,CAAC,CAAC,YAEjD,CAAC,CAAC,KAAK,CAAC,GACF,IACJ,GACQ,IACI,CACxB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { FunctionComponent, useContext, useMemo } from 'react';\n\nimport {\n Button,\n ExpandCollapse,\n Flex,\n ForwardProps,\n Icon,\n Mark,\n registerIcon,\n replaceMatchWithElement,\n StyledLabel,\n Text,\n useDirection,\n useI18n\n} from '@pega/cosmos-react-core';\nimport * as caretRightIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-right.icon';\nimport * as caretLeftIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-left.icon';\n\nimport { ExpressionItemProps } from './ExpressionBuilder.types';\nimport {\n StyledPrimaryText,\n StyledExpandCollapseContent,\n StyledExpressionSummary,\n StyledExpressionItem\n} from './ExpressionBuilder.styles';\nimport ExpressionDetails from './ExpressionDetails';\nimport ExpressionBuilderContext from './ExpressionBuilderContext';\n\nregisterIcon(caretLeftIcon, caretRightIcon);\n\nconst ExpressionItem: FunctionComponent<ExpressionItemProps & ForwardProps> = ({\n id,\n primary,\n type,\n onAdd,\n onExpand,\n onCollapse,\n details,\n matchedField,\n expanded = false,\n ...restProps\n}) => {\n const { end: caretDirection } = useDirection();\n const t = useI18n();\n\n const { accent } = useContext(ExpressionBuilderContext);\n\n const accentedText = (text: string) => {\n if (accent) {\n const accentRegex = typeof accent === 'function' ? accent(text) : accent;\n return replaceMatchWithElement(text, accentRegex, str => {\n return <Mark>{str}</Mark>;\n });\n }\n return text;\n };\n\n const caretIcon = useMemo(() => {\n return expanded ? 'caret-down' : `caret-${caretDirection}`;\n }, [expanded, caretDirection]);\n\n const accentedMeta = matchedField && !expanded ? accentedText(matchedField.value) : undefined;\n\n return (\n <StyledExpressionItem expanded={expanded}>\n <Flex\n {...restProps}\n as={StyledExpressionSummary}\n id={id}\n container={{ gap: 1, alignItems: 'start' }}\n >\n <Button\n icon\n variant='simple'\n onClick={\n onCollapse || onExpand\n ? () => {\n if (expanded) {\n onCollapse?.(id);\n } else {\n onExpand?.(id);\n }\n }\n : undefined\n }\n aria-label={`${type}: ${primary}`}\n aria-expanded={expanded}\n label={expanded ? t('collapse') : t('expand')}\n >\n <Icon name={caretIcon} />\n </Button>\n\n <Flex container={{ alignItems: 'start', direction: 'column' }} item={{ grow: 1 }}>\n <StyledPrimaryText variant='primary'>\n {!matchedField ? accentedText(primary) : primary}\n </StyledPrimaryText>\n {accentedMeta ? (\n <div>\n <StyledLabel as='span'>{matchedField?.name}:</StyledLabel>\n {accentedMeta}\n </div>\n ) : (\n <Text variant='secondary'>{type}</Text>\n )}\n </Flex>\n\n {!expanded && (\n <Button\n icon\n variant='simple'\n onClick={() => onAdd(id)}\n aria-label={t('add_noun', [`${type}: ${primary}`])}\n label={t('add')}\n >\n <Icon name='plus' />\n </Button>\n )}\n </Flex>\n <ExpandCollapse collapsed={!expanded}>\n <Flex as={StyledExpandCollapseContent} container={{ direction: 'column' }}>\n {details && <ExpressionDetails {...details} />}\n <Button\n variant='primary'\n onClick={() => onAdd(id)}\n aria-label={t('add_noun', [`${type}: ${primary}`])}\n >\n {t('add')}\n </Button>\n </Flex>\n </ExpandCollapse>\n </StyledExpressionItem>\n );\n};\n\nexport default ExpressionItem;\n"]}
@@ -1,6 +0,0 @@
1
- import { FunctionComponent } from 'react';
2
- import { ForwardProps } from '@pega/cosmos-react-core';
3
- import { ExpressionListProps } from './ExpressionBuilder.types';
4
- declare const ExpressionList: FunctionComponent<ExpressionListProps & ForwardProps>;
5
- export default ExpressionList;
6
- //# sourceMappingURL=ExpressionList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpressionList.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAc,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAuB,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAIrF,QAAA,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,GAAG,YAAY,CA+CzE,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,32 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { createElement as _createElement } from "react";
3
- import { forwardRef, useState } from 'react';
4
- import { EmptyState } from '@pega/cosmos-react-core';
5
- import ExpressionItem from './ExpressionItem';
6
- import { StyledExpressionList } from './ExpressionBuilder.styles';
7
- const ExpressionList = forwardRef(function ExpressionList({ items, emptyText, onItemAdd, onItemExpand, onItemCollapse, details, ...restProps }, ref) {
8
- const [expandedItems, setExpandedItems] = useState([]);
9
- const handleItemExpand = (id) => {
10
- setExpandedItems(prev => {
11
- const itemIndex = prev.indexOf(id);
12
- if (itemIndex !== -1)
13
- return prev;
14
- onItemExpand?.(id);
15
- return [...prev, id];
16
- });
17
- };
18
- const handleItemCollapse = (id) => {
19
- setExpandedItems(prev => {
20
- const itemIndex = prev.indexOf(id);
21
- if (itemIndex === -1)
22
- return prev;
23
- onItemCollapse?.(id);
24
- return prev.filter(itemId => itemId !== id);
25
- });
26
- };
27
- return (_jsx(StyledExpressionList, { ...restProps, ref: ref, children: items && items.length > 0 ? (items.map(item => {
28
- return (_createElement(ExpressionItem, { ...item, onAdd: onItemAdd, onExpand: handleItemExpand, onCollapse: handleItemCollapse, expanded: expandedItems.includes(item.id), key: item.id, details: details?.[item.id] }));
29
- })) : (_jsx(EmptyState, { message: emptyText })) }));
30
- });
31
- export default ExpressionList;
32
- //# sourceMappingURL=ExpressionList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpressionList.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionList.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAqB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,UAAU,EAAgB,MAAM,yBAAyB,CAAC;AAGnE,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,cAAc,GAA0D,UAAU,CACtF,SAAS,cAAc,CACrB,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,EACpF,GAA+B;IAE/B,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAA8B,EAAE,CAAC,CAAC;IAEpF,MAAM,gBAAgB,GAAG,CAAC,EAA6B,EAAE,EAAE;QACzD,gBAAgB,CAAC,IAAI,CAAC,EAAE;YACtB,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACnC,IAAI,SAAS,KAAK,CAAC,CAAC;gBAAE,OAAO,IAAI,CAAC;YAClC,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC;YACnB,OAAO,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,kBAAkB,GAAG,CAAC,EAA6B,EAAE,EAAE;QAC3D,gBAAgB,CAAC,IAAI,CAAC,EAAE;YACtB,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACnC,IAAI,SAAS,KAAK,CAAC,CAAC;gBAAE,OAAO,IAAI,CAAC;YAClC,cAAc,EAAE,CAAC,EAAE,CAAC,CAAC;YACrB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,oBAAoB,OAAK,SAAS,EAAE,GAAG,EAAE,GAAG,YAC1C,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAC3B,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACf,OAAO,CACL,eAAC,cAAc,OACT,IAAI,EACR,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,EAC9B,QAAQ,EAAE,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,EACzC,GAAG,EAAE,IAAI,CAAC,EAAE,EACZ,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,GAC3B,CACH,CAAC;QACJ,CAAC,CAAC,CACH,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IAAC,OAAO,EAAE,SAAS,GAAI,CACnC,GACoB,CACxB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, useState } from 'react';\n\nimport { EmptyState, ForwardProps } from '@pega/cosmos-react-core';\n\nimport { ExpressionItemProps, ExpressionListProps } from './ExpressionBuilder.types';\nimport ExpressionItem from './ExpressionItem';\nimport { StyledExpressionList } from './ExpressionBuilder.styles';\n\nconst ExpressionList: FunctionComponent<ExpressionListProps & ForwardProps> = forwardRef(\n function ExpressionList(\n { items, emptyText, onItemAdd, onItemExpand, onItemCollapse, details, ...restProps },\n ref: ExpressionListProps['ref']\n ) {\n const [expandedItems, setExpandedItems] = useState<ExpressionItemProps['id'][]>([]);\n\n const handleItemExpand = (id: ExpressionItemProps['id']) => {\n setExpandedItems(prev => {\n const itemIndex = prev.indexOf(id);\n if (itemIndex !== -1) return prev;\n onItemExpand?.(id);\n return [...prev, id];\n });\n };\n\n const handleItemCollapse = (id: ExpressionItemProps['id']) => {\n setExpandedItems(prev => {\n const itemIndex = prev.indexOf(id);\n if (itemIndex === -1) return prev;\n onItemCollapse?.(id);\n return prev.filter(itemId => itemId !== id);\n });\n };\n\n return (\n <StyledExpressionList {...restProps} ref={ref}>\n {items && items.length > 0 ? (\n items.map(item => {\n return (\n <ExpressionItem\n {...item}\n onAdd={onItemAdd}\n onExpand={handleItemExpand}\n onCollapse={handleItemCollapse}\n expanded={expandedItems.includes(item.id)}\n key={item.id}\n details={details?.[item.id]}\n />\n );\n })\n ) : (\n <EmptyState message={emptyText} />\n )}\n </StyledExpressionList>\n );\n }\n);\n\nexport default ExpressionList;\n"]}
@@ -1,8 +0,0 @@
1
- export { default } from './ExpressionBuilder';
2
- export type { ExpressionListProps, ExpressionItemProps, ExpressionBuilderProps, HandleValue, InputParams } from './ExpressionBuilder.types';
3
- export type { EditorState, CodeEditorProps, AutoCompleteTriggerChar, SuggestionType, CursorPosition } from './CodeEditor/CodeEditor.types';
4
- export { default as ExpressionItem } from './ExpressionItem';
5
- export { default as ExpressionList } from './ExpressionList';
6
- export { default as ExpressionDetails } from './ExpressionDetails';
7
- export { default as CodeEditor } from './CodeEditor/CodeEditor';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,WAAW,EACX,WAAW,EACZ,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,cAAc,EACd,cAAc,EACf,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1,6 +0,0 @@
1
- export { default } from './ExpressionBuilder';
2
- export { default as ExpressionItem } from './ExpressionItem';
3
- export { default as ExpressionList } from './ExpressionList';
4
- export { default as ExpressionDetails } from './ExpressionDetails';
5
- export { default as CodeEditor } from './CodeEditor/CodeEditor';
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAe9C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["export { default } from './ExpressionBuilder';\nexport type {\n ExpressionListProps,\n ExpressionItemProps,\n ExpressionBuilderProps,\n HandleValue,\n InputParams\n} from './ExpressionBuilder.types';\nexport type {\n EditorState,\n CodeEditorProps,\n AutoCompleteTriggerChar,\n SuggestionType,\n CursorPosition\n} from './CodeEditor/CodeEditor.types';\nexport { default as ExpressionItem } from './ExpressionItem';\nexport { default as ExpressionList } from './ExpressionList';\nexport { default as ExpressionDetails } from './ExpressionDetails';\nexport { default as CodeEditor } from './CodeEditor/CodeEditor';\n"]}
@@ -1,18 +0,0 @@
1
- import { FC, MouseEvent } from 'react';
2
- import { PlottedGraphNode } from './Renderer/Utils/GraphLayout';
3
- export declare const StyledDot: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@pega/cosmos-react-core").IconProps>, import("styled-components").DefaultTheme, {
4
- highlight?: boolean | undefined;
5
- }, never>;
6
- export declare const StyledPlus: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@pega/cosmos-react-core").IconProps>, import("styled-components").DefaultTheme, {}, never>;
7
- export declare const StyledWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
8
- export declare const StyledButton: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").ButtonProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
9
- export interface AddNodeProps extends PlottedGraphNode {
10
- onClick?: (ev: Event) => void;
11
- addNodeHandler: (e: MouseEvent<HTMLButtonElement>) => void;
12
- highlight?: boolean;
13
- }
14
- export declare const StyledConnectorLabel: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").TextProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {
15
- highlight: boolean;
16
- }, never>;
17
- export declare const AddButton: FC<Pick<AddNodeProps, 'addNodeHandler' | 'highlight'>>;
18
- //# sourceMappingURL=AddNode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AddNode.d.ts","sourceRoot":"","sources":["../../../src/components/FlowModeller/AddNode.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,UAAU,EAAmC,MAAM,OAAO,CAAC;AAYxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,eAAO,MAAM,SAAS;;SAWpB,CAAC;AAIH,eAAO,MAAM,UAAU,0LAEtB,CAAC;AAEF,eAAO,MAAM,aAAa,yGASxB,CAAC;AAIH,eAAO,MAAM,YAAY,qOA0BvB,CAAC;AAIH,MAAM,WAAW,YAAa,SAAQ,gBAAgB;IACpD,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,KAAK,IAAI,CAAC;IAC9B,cAAc,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,oBAAoB;eAA6B,OAAO;SAQnE,CAAC;AAIH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,GAAG,WAAW,CAAC,CAgC5E,CAAC"}