@pega/cosmos-react-build 9.0.0-build.1.0 → 9.0.0-build.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/lib/components/AuthoringPanel/AuthoringPanel.d.ts +7 -0
  2. package/lib/components/AuthoringPanel/AuthoringPanel.d.ts.map +1 -0
  3. package/lib/components/AuthoringPanel/AuthoringPanel.js +49 -0
  4. package/lib/components/AuthoringPanel/AuthoringPanel.js.map +1 -0
  5. package/lib/components/AuthoringPanel/AuthoringPanel.styles.d.ts +18 -0
  6. package/lib/components/AuthoringPanel/AuthoringPanel.styles.d.ts.map +1 -0
  7. package/lib/components/AuthoringPanel/AuthoringPanel.styles.js +133 -0
  8. package/lib/components/AuthoringPanel/AuthoringPanel.styles.js.map +1 -0
  9. package/lib/components/AuthoringPanel/AuthoringPanel.test-ids.d.ts +2 -0
  10. package/lib/components/AuthoringPanel/AuthoringPanel.test-ids.d.ts.map +1 -0
  11. package/lib/components/AuthoringPanel/AuthoringPanel.test-ids.js +16 -0
  12. package/lib/components/AuthoringPanel/AuthoringPanel.test-ids.js.map +1 -0
  13. package/lib/components/AuthoringPanel/AuthoringPanel.types.d.ts +81 -0
  14. package/lib/components/AuthoringPanel/AuthoringPanel.types.d.ts.map +1 -0
  15. package/lib/components/AuthoringPanel/AuthoringPanel.types.js +2 -0
  16. package/lib/components/AuthoringPanel/AuthoringPanel.types.js.map +1 -0
  17. package/lib/components/AuthoringPanel/AuthoringPanelHeader.d.ts +6 -0
  18. package/lib/components/AuthoringPanel/AuthoringPanelHeader.d.ts.map +1 -0
  19. package/lib/components/AuthoringPanel/AuthoringPanelHeader.js +41 -0
  20. package/lib/components/AuthoringPanel/AuthoringPanelHeader.js.map +1 -0
  21. package/lib/components/AuthoringPanel/index.d.ts +4 -0
  22. package/lib/components/AuthoringPanel/index.d.ts.map +1 -0
  23. package/lib/components/AuthoringPanel/index.js +3 -0
  24. package/lib/components/AuthoringPanel/index.js.map +1 -0
  25. package/lib/components/Automation/Automation.d.ts +7 -0
  26. package/lib/components/Automation/Automation.d.ts.map +1 -0
  27. package/lib/components/Automation/Automation.js +113 -0
  28. package/lib/components/Automation/Automation.js.map +1 -0
  29. package/lib/components/Automation/Automation.styles.d.ts +12 -0
  30. package/lib/components/Automation/Automation.styles.d.ts.map +1 -0
  31. package/lib/components/Automation/Automation.styles.js +68 -0
  32. package/lib/components/Automation/Automation.styles.js.map +1 -0
  33. package/lib/components/Automation/Automation.test-ids.d.ts +3 -0
  34. package/lib/components/Automation/Automation.test-ids.d.ts.map +1 -0
  35. package/lib/components/Automation/Automation.test-ids.js +21 -0
  36. package/lib/components/Automation/Automation.test-ids.js.map +1 -0
  37. package/lib/components/Automation/Automation.types.d.ts +95 -0
  38. package/lib/components/Automation/Automation.types.d.ts.map +1 -0
  39. package/lib/components/Automation/Automation.types.js +18 -0
  40. package/lib/components/Automation/Automation.types.js.map +1 -0
  41. package/lib/components/Automation/Automation.utils.d.ts +109 -0
  42. package/lib/components/Automation/Automation.utils.d.ts.map +1 -0
  43. package/lib/components/Automation/Automation.utils.js +208 -0
  44. package/lib/components/Automation/Automation.utils.js.map +1 -0
  45. package/lib/components/Automation/AutomationContext.d.ts +4 -0
  46. package/lib/components/Automation/AutomationContext.d.ts.map +1 -0
  47. package/lib/components/Automation/AutomationContext.js +9 -0
  48. package/lib/components/Automation/AutomationContext.js.map +1 -0
  49. package/lib/components/Automation/RuleStep.d.ts +7 -0
  50. package/lib/components/Automation/RuleStep.d.ts.map +1 -0
  51. package/lib/components/Automation/RuleStep.js +151 -0
  52. package/lib/components/Automation/RuleStep.js.map +1 -0
  53. package/lib/components/Automation/index.d.ts +5 -0
  54. package/lib/components/Automation/index.d.ts.map +1 -0
  55. package/lib/components/Automation/index.js +4 -0
  56. package/lib/components/Automation/index.js.map +1 -0
  57. package/lib/components/DynamicInput/BooleanControl.d.ts +1 -1
  58. package/lib/components/DynamicInput/BooleanControl.d.ts.map +1 -1
  59. package/lib/components/DynamicInput/BooleanControl.js.map +1 -1
  60. package/lib/components/DynamicInput/ConstantControl.d.ts +3 -3
  61. package/lib/components/DynamicInput/ConstantControl.d.ts.map +1 -1
  62. package/lib/components/DynamicInput/ConstantControl.js.map +1 -1
  63. package/lib/components/DynamicInput/DynamicInput.styles.d.ts +0 -1
  64. package/lib/components/DynamicInput/DynamicInput.styles.d.ts.map +1 -1
  65. package/lib/components/DynamicInput/DynamicInput.styles.js +48 -41
  66. package/lib/components/DynamicInput/DynamicInput.styles.js.map +1 -1
  67. package/lib/components/DynamicInput/DynamicInput.types.d.ts +11 -6
  68. package/lib/components/DynamicInput/DynamicInput.types.d.ts.map +1 -1
  69. package/lib/components/DynamicInput/DynamicInput.types.js.map +1 -1
  70. package/lib/components/DynamicInput/utils.d.ts.map +1 -1
  71. package/lib/components/DynamicInput/utils.js +3 -2
  72. package/lib/components/DynamicInput/utils.js.map +1 -1
  73. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.d.ts +34 -0
  74. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.d.ts.map +1 -0
  75. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.js +55 -0
  76. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.js.map +1 -0
  77. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.d.ts +2 -0
  78. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.d.ts.map +1 -0
  79. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.js +10 -0
  80. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.js.map +1 -0
  81. package/lib/components/EmptyRuleTemplate/index.d.ts +3 -0
  82. package/lib/components/EmptyRuleTemplate/index.d.ts.map +1 -0
  83. package/lib/components/EmptyRuleTemplate/index.js +2 -0
  84. package/lib/components/EmptyRuleTemplate/index.js.map +1 -0
  85. package/lib/components/Expression/Expression.d.ts.map +1 -1
  86. package/lib/components/Expression/Expression.js +8 -7
  87. package/lib/components/Expression/Expression.js.map +1 -1
  88. package/lib/components/Expression/Expression.styles.d.ts +5 -1
  89. package/lib/components/Expression/Expression.styles.d.ts.map +1 -1
  90. package/lib/components/Expression/Expression.styles.js +15 -3
  91. package/lib/components/Expression/Expression.styles.js.map +1 -1
  92. package/lib/components/Expression/Expression.test-ids.d.ts +1 -0
  93. package/lib/components/Expression/Expression.test-ids.d.ts.map +1 -1
  94. package/lib/components/Expression/Expression.test-ids.js +6 -0
  95. package/lib/components/Expression/Expression.test-ids.js.map +1 -1
  96. package/lib/components/Expression/ExpressionBuilderModal.d.ts +6 -0
  97. package/lib/components/Expression/ExpressionBuilderModal.d.ts.map +1 -0
  98. package/lib/components/Expression/ExpressionBuilderModal.js +53 -0
  99. package/lib/components/Expression/ExpressionBuilderModal.js.map +1 -0
  100. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts.map +1 -1
  101. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js +1 -0
  102. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js.map +1 -1
  103. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts.map +1 -1
  104. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js +3 -2
  105. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js.map +1 -1
  106. package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts +4 -2
  107. package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts.map +1 -1
  108. package/lib/components/ExpressionBuilder/ExpressionBuilder.js +66 -25
  109. package/lib/components/ExpressionBuilder/ExpressionBuilder.js.map +1 -1
  110. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts +18 -2
  111. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts.map +1 -1
  112. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js +80 -13
  113. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js.map +1 -1
  114. package/lib/components/ExpressionBuilder/ExpressionBuilder.test-ids.d.ts +5 -0
  115. package/lib/components/ExpressionBuilder/ExpressionBuilder.test-ids.d.ts.map +1 -0
  116. package/lib/components/ExpressionBuilder/ExpressionBuilder.test-ids.js +22 -0
  117. package/lib/components/ExpressionBuilder/ExpressionBuilder.test-ids.js.map +1 -0
  118. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts +33 -5
  119. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts.map +1 -1
  120. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.js.map +1 -1
  121. package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts +4 -2
  122. package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts.map +1 -1
  123. package/lib/components/ExpressionBuilder/ExpressionDetails.js +6 -4
  124. package/lib/components/ExpressionBuilder/ExpressionDetails.js.map +1 -1
  125. package/lib/components/ExpressionBuilder/ExpressionItem.d.ts +4 -2
  126. package/lib/components/ExpressionBuilder/ExpressionItem.d.ts.map +1 -1
  127. package/lib/components/ExpressionBuilder/ExpressionItem.js +8 -6
  128. package/lib/components/ExpressionBuilder/ExpressionItem.js.map +1 -1
  129. package/lib/components/ExpressionBuilder/ExpressionList.d.ts +4 -2
  130. package/lib/components/ExpressionBuilder/ExpressionList.d.ts.map +1 -1
  131. package/lib/components/ExpressionBuilder/ExpressionList.js +17 -5
  132. package/lib/components/ExpressionBuilder/ExpressionList.js.map +1 -1
  133. package/lib/components/ExpressionBuilder/index.d.ts +1 -0
  134. package/lib/components/ExpressionBuilder/index.d.ts.map +1 -1
  135. package/lib/components/ExpressionBuilder/index.js +1 -0
  136. package/lib/components/ExpressionBuilder/index.js.map +1 -1
  137. package/lib/components/FieldReference/FieldReference.types.d.ts +16 -2
  138. package/lib/components/FieldReference/FieldReference.types.d.ts.map +1 -1
  139. package/lib/components/FieldReference/FieldReference.types.js.map +1 -1
  140. package/lib/components/FieldReference/FieldReferenceInput.d.ts.map +1 -1
  141. package/lib/components/FieldReference/FieldReferenceInput.js +5 -5
  142. package/lib/components/FieldReference/FieldReferenceInput.js.map +1 -1
  143. package/lib/components/FieldReference/helpers.d.ts +7 -1
  144. package/lib/components/FieldReference/helpers.d.ts.map +1 -1
  145. package/lib/components/FieldReference/helpers.js +31 -1
  146. package/lib/components/FieldReference/helpers.js.map +1 -1
  147. package/lib/components/FieldReference/index.d.ts +2 -2
  148. package/lib/components/FieldReference/index.d.ts.map +1 -1
  149. package/lib/components/FieldReference/index.js +1 -1
  150. package/lib/components/FieldReference/index.js.map +1 -1
  151. package/lib/components/IconTile/iconUtils.d.ts +2 -1
  152. package/lib/components/IconTile/iconUtils.d.ts.map +1 -1
  153. package/lib/components/IconTile/iconUtils.js +94 -1
  154. package/lib/components/IconTile/iconUtils.js.map +1 -1
  155. package/lib/components/IconTile/index.d.ts +1 -0
  156. package/lib/components/IconTile/index.d.ts.map +1 -1
  157. package/lib/components/IconTile/index.js +1 -0
  158. package/lib/components/IconTile/index.js.map +1 -1
  159. package/lib/components/LifeCycle/Category.d.ts +0 -1
  160. package/lib/components/LifeCycle/Category.d.ts.map +1 -1
  161. package/lib/components/LifeCycle/Category.js +16 -56
  162. package/lib/components/LifeCycle/Category.js.map +1 -1
  163. package/lib/components/LifeCycle/LifeCycle.js +2 -2
  164. package/lib/components/LifeCycle/LifeCycle.js.map +1 -1
  165. package/lib/components/LifeCycle/LifeCycle.types.d.ts +37 -2
  166. package/lib/components/LifeCycle/LifeCycle.types.d.ts.map +1 -1
  167. package/lib/components/LifeCycle/LifeCycle.types.js +9 -9
  168. package/lib/components/LifeCycle/LifeCycle.types.js.map +1 -1
  169. package/lib/components/LifeCycle/LifeCycleDragDropList.d.ts.map +1 -1
  170. package/lib/components/LifeCycle/LifeCycleDragDropList.js +25 -3
  171. package/lib/components/LifeCycle/LifeCycleDragDropList.js.map +1 -1
  172. package/lib/components/LifeCycle/Stage.d.ts.map +1 -1
  173. package/lib/components/LifeCycle/Stage.js +20 -11
  174. package/lib/components/LifeCycle/Stage.js.map +1 -1
  175. package/lib/components/LifeCycle/Step.d.ts.map +1 -1
  176. package/lib/components/LifeCycle/Step.js +1 -0
  177. package/lib/components/LifeCycle/Step.js.map +1 -1
  178. package/lib/components/LifeCycle/Task.d.ts +7 -1
  179. package/lib/components/LifeCycle/Task.d.ts.map +1 -1
  180. package/lib/components/LifeCycle/Task.js +19 -10
  181. package/lib/components/LifeCycle/Task.js.map +1 -1
  182. package/lib/components/LifeCycle/TaskGroup.d.ts +23 -0
  183. package/lib/components/LifeCycle/TaskGroup.d.ts.map +1 -0
  184. package/lib/components/LifeCycle/TaskGroup.js +92 -0
  185. package/lib/components/LifeCycle/TaskGroup.js.map +1 -0
  186. package/lib/components/LifeCycle/index.d.ts +1 -1
  187. package/lib/components/LifeCycle/index.d.ts.map +1 -1
  188. package/lib/components/LifeCycle/index.js +1 -1
  189. package/lib/components/LifeCycle/index.js.map +1 -1
  190. package/lib/components/LifeCycle/utils.d.ts +6 -1
  191. package/lib/components/LifeCycle/utils.d.ts.map +1 -1
  192. package/lib/components/LifeCycle/utils.js +129 -0
  193. package/lib/components/LifeCycle/utils.js.map +1 -1
  194. package/lib/components/ObjectSelect/InputTree/InputTree.d.ts +21 -0
  195. package/lib/components/ObjectSelect/InputTree/InputTree.d.ts.map +1 -0
  196. package/lib/components/ObjectSelect/InputTree/InputTree.js +20 -0
  197. package/lib/components/ObjectSelect/InputTree/InputTree.js.map +1 -0
  198. package/lib/components/ObjectSelect/InputTree/InputTree.styles.d.ts +10 -0
  199. package/lib/components/ObjectSelect/InputTree/InputTree.styles.d.ts.map +1 -0
  200. package/lib/components/ObjectSelect/InputTree/InputTree.styles.js +82 -0
  201. package/lib/components/ObjectSelect/InputTree/InputTree.styles.js.map +1 -0
  202. package/lib/components/ObjectSelect/InputTree/index.d.ts +3 -0
  203. package/lib/components/ObjectSelect/InputTree/index.d.ts.map +1 -0
  204. package/lib/components/ObjectSelect/InputTree/index.js +2 -0
  205. package/lib/components/ObjectSelect/InputTree/index.js.map +1 -0
  206. package/lib/components/ObjectSelect/ObjectPicker.d.ts +11 -5
  207. package/lib/components/ObjectSelect/ObjectPicker.d.ts.map +1 -1
  208. package/lib/components/ObjectSelect/ObjectPicker.js +24 -15
  209. package/lib/components/ObjectSelect/ObjectPicker.js.map +1 -1
  210. package/lib/components/ObjectSelect/ObjectSelect.d.ts +2 -29
  211. package/lib/components/ObjectSelect/ObjectSelect.d.ts.map +1 -1
  212. package/lib/components/ObjectSelect/ObjectSelect.js +80 -23
  213. package/lib/components/ObjectSelect/ObjectSelect.js.map +1 -1
  214. package/lib/components/ObjectSelect/ObjectSelect.types.d.ts +53 -0
  215. package/lib/components/ObjectSelect/ObjectSelect.types.d.ts.map +1 -0
  216. package/lib/components/ObjectSelect/ObjectSelect.types.js +2 -0
  217. package/lib/components/ObjectSelect/ObjectSelect.types.js.map +1 -0
  218. package/lib/components/ObjectSelect/index.d.ts +1 -1
  219. package/lib/components/ObjectSelect/index.d.ts.map +1 -1
  220. package/lib/components/ObjectSelect/index.js.map +1 -1
  221. package/lib/components/ObjectSelect/useCreateModal.d.ts +6 -2
  222. package/lib/components/ObjectSelect/useCreateModal.d.ts.map +1 -1
  223. package/lib/components/ObjectSelect/useCreateModal.js +7 -4
  224. package/lib/components/ObjectSelect/useCreateModal.js.map +1 -1
  225. package/lib/components/PageBanner/PageBanner.d.ts +6 -4
  226. package/lib/components/PageBanner/PageBanner.d.ts.map +1 -1
  227. package/lib/components/PageBanner/PageBanner.js +10 -9
  228. package/lib/components/PageBanner/PageBanner.js.map +1 -1
  229. package/lib/components/PageBanner/PageBanner.test-ids.d.ts +2 -0
  230. package/lib/components/PageBanner/PageBanner.test-ids.d.ts.map +1 -0
  231. package/lib/components/PageBanner/PageBanner.test-ids.js +9 -0
  232. package/lib/components/PageBanner/PageBanner.test-ids.js.map +1 -0
  233. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.d.ts +12 -0
  234. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.d.ts.map +1 -0
  235. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.js +158 -0
  236. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.js.map +1 -0
  237. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.d.ts +5 -0
  238. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.d.ts.map +1 -0
  239. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.js +17 -0
  240. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.js.map +1 -0
  241. package/lib/components/PageTemplates/GalleryPage.d.ts +14 -4
  242. package/lib/components/PageTemplates/GalleryPage.d.ts.map +1 -1
  243. package/lib/components/PageTemplates/GalleryPage.js +57 -12
  244. package/lib/components/PageTemplates/GalleryPage.js.map +1 -1
  245. package/lib/components/PageTemplates/HeaderActionButtons.d.ts +5 -0
  246. package/lib/components/PageTemplates/HeaderActionButtons.d.ts.map +1 -0
  247. package/lib/components/PageTemplates/HeaderActionButtons.js +14 -0
  248. package/lib/components/PageTemplates/HeaderActionButtons.js.map +1 -0
  249. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageHeader.d.ts +8 -0
  250. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageHeader.d.ts.map +1 -0
  251. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageHeader.js +23 -0
  252. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageHeader.js.map +1 -0
  253. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageTemplate.d.ts +5 -0
  254. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageTemplate.d.ts.map +1 -0
  255. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageTemplate.js +10 -0
  256. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageTemplate.js.map +1 -0
  257. package/lib/components/PageTemplates/OverviewPageTemplate/OverviewPageTemplate.d.ts +5 -0
  258. package/lib/components/PageTemplates/OverviewPageTemplate/OverviewPageTemplate.d.ts.map +1 -0
  259. package/lib/components/PageTemplates/OverviewPageTemplate/OverviewPageTemplate.js +10 -0
  260. package/lib/components/PageTemplates/OverviewPageTemplate/OverviewPageTemplate.js.map +1 -0
  261. package/lib/components/PageTemplates/OverviewPageTemplate/PageBanner.d.ts +21 -0
  262. package/lib/components/PageTemplates/OverviewPageTemplate/PageBanner.d.ts.map +1 -0
  263. package/lib/components/PageTemplates/OverviewPageTemplate/PageBanner.js +22 -0
  264. package/lib/components/PageTemplates/OverviewPageTemplate/PageBanner.js.map +1 -0
  265. package/lib/components/PageTemplates/PageTemplate.styles.d.ts +16 -0
  266. package/lib/components/PageTemplates/PageTemplate.styles.d.ts.map +1 -0
  267. package/lib/components/PageTemplates/PageTemplate.styles.js +167 -0
  268. package/lib/components/PageTemplates/PageTemplate.styles.js.map +1 -0
  269. package/lib/components/PageTemplates/PageTemplate.types.d.ts +114 -0
  270. package/lib/components/PageTemplates/PageTemplate.types.d.ts.map +1 -0
  271. package/lib/components/PageTemplates/PageTemplate.types.js +2 -0
  272. package/lib/components/PageTemplates/PageTemplate.types.js.map +1 -0
  273. package/lib/components/PageTemplates/PageTemplates.d.ts +16 -12
  274. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  275. package/lib/components/PageTemplates/PageTemplates.js +12 -12
  276. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  277. package/lib/components/PageTemplates/PageTemplates.test-ids.d.ts +4 -0
  278. package/lib/components/PageTemplates/PageTemplates.test-ids.d.ts.map +1 -0
  279. package/lib/components/PageTemplates/PageTemplates.test-ids.js +25 -0
  280. package/lib/components/PageTemplates/PageTemplates.test-ids.js.map +1 -0
  281. package/lib/components/PageTemplates/ShowcasePage.d.ts +2 -2
  282. package/lib/components/PageTemplates/ShowcasePage.d.ts.map +1 -1
  283. package/lib/components/PageTemplates/ShowcasePage.js +5 -6
  284. package/lib/components/PageTemplates/ShowcasePage.js.map +1 -1
  285. package/lib/components/PageTemplates/index.d.ts +6 -1
  286. package/lib/components/PageTemplates/index.d.ts.map +1 -1
  287. package/lib/components/PageTemplates/index.js +5 -1
  288. package/lib/components/PageTemplates/index.js.map +1 -1
  289. package/lib/components/RulePicker/RulePicker.d.ts +4 -0
  290. package/lib/components/RulePicker/RulePicker.d.ts.map +1 -0
  291. package/lib/components/RulePicker/RulePicker.js +81 -0
  292. package/lib/components/RulePicker/RulePicker.js.map +1 -0
  293. package/lib/index.d.ts +5 -1
  294. package/lib/index.d.ts.map +1 -1
  295. package/lib/index.js +5 -1
  296. package/lib/index.js.map +1 -1
  297. package/lib/utils/typeIconMapping.js +1 -1
  298. package/lib/utils/typeIconMapping.js.map +1 -1
  299. package/package.json +4 -4
  300. package/lib/utils/index.d.ts +0 -2
  301. package/lib/utils/index.d.ts.map +0 -1
  302. package/lib/utils/index.js +0 -2
  303. package/lib/utils/index.js.map +0 -1
  304. package/lib/utils/utils.d.ts +0 -14
  305. package/lib/utils/utils.d.ts.map +0 -1
  306. package/lib/utils/utils.js +0 -13
  307. package/lib/utils/utils.js.map +0 -1
@@ -1,4 +1,3 @@
1
- export declare const StyledExpressionBuilderButton: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").ButtonProps>, import("styled-components").DefaultTheme, {}, never>;
2
1
  export declare const StyledExpressionControl: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").FlexProps>, import("styled-components").DefaultTheme, {}, never>;
3
2
  export declare const StyledDynamicInput: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
4
3
  //# sourceMappingURL=DynamicInput.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicInput.styles.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicInput/DynamicInput.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,6BAA6B,oNAAmB,CAAC;AAC9D,eAAO,MAAM,uBAAuB,kNAAiB,CAAC;AAEtD,eAAO,MAAM,kBAAkB,yGAoD7B,CAAC"}
1
+ {"version":3,"file":"DynamicInput.styles.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicInput/DynamicInput.styles.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,uBAAuB,kNAAiB,CAAC;AAEtD,eAAO,MAAM,kBAAkB,yGAsE9B,CAAC"}
@@ -1,60 +1,67 @@
1
1
  import styled, { css } from 'styled-components';
2
- import { Button, Flex, StyledFormControl, defaultThemeProp } from '@pega/cosmos-react-core';
2
+ import { Flex, StyledFormControl, StyledGrid, defaultThemeProp } from '@pega/cosmos-react-core';
3
3
  import { StyledMenuButton } from '@pega/cosmos-react-core/lib/components/MenuButton/MenuButton';
4
- export const StyledExpressionBuilderButton = styled(Button) ``;
4
+ import { StyledContentWrapper, StyledInputTree } from '../ObjectSelect/InputTree/InputTree.styles';
5
+ import { StyledFieldReferenceInput, StyledFieldReferencePicker } from '../FieldReference/FieldReference.styles';
5
6
  export const StyledExpressionControl = styled(Flex) ``;
6
- export const StyledDynamicInput = styled.div(({ theme }) => {
7
+ export const StyledDynamicInput = styled.div(({ theme: { base: { palette: { 'foreground-color': foregroundColor }, 'content-width': contentWidth }, components: { 'form-control': { 'border-color': formControlBorderColor } } } }) => {
7
8
  return css `
8
- display: flex;
9
+ display: flex;
9
10
 
10
- ${StyledFormControl} {
11
- border-start-start-radius: 0;
12
- border-end-start-radius: 0;
13
- width: 100%;
14
- }
11
+ ${StyledInputTree} {
12
+ margin-inline-start: -2.5rem;
13
+ }
15
14
 
16
- ${StyledExpressionControl} {
17
- position: relative;
18
- z-index: 1;
15
+ ${StyledFieldReferencePicker} > ${StyledFieldReferenceInput} > ${StyledGrid} {
16
+ padding: 0;
17
+ }
19
18
 
20
- .react-codemirror2 {
21
- min-height: 0;
19
+ ${StyledContentWrapper} {
20
+ padding-block-start: 0;
22
21
  }
23
22
 
24
- .CodeMirror,
25
- .CodeMirror-wrap {
26
- border-color: ${theme.components['form-control']['border-color']};
23
+ ${StyledFormControl} {
27
24
  border-start-start-radius: 0;
28
25
  border-end-start-radius: 0;
26
+ width: 100%;
29
27
  }
30
28
 
31
- ${StyledExpressionBuilderButton} {
32
- position: absolute;
33
- z-index: 2;
34
- inset-block-start: 0.0625rem;
35
- inset-inline-end: 0.0625rem;
36
- border-start-start-radius: 0;
37
- border-end-start-radius: 0;
29
+ ${StyledExpressionControl} {
30
+ position: relative;
31
+ z-index: 1;
32
+
33
+ .react-codemirror2 {
34
+ min-height: 0;
35
+ }
36
+
37
+ .CodeMirror,
38
+ .CodeMirror-wrap {
39
+ border-color: ${formControlBorderColor};
40
+ border-start-start-radius: 0;
41
+ border-end-start-radius: 0;
42
+ }
38
43
  }
39
- }
40
-
41
- ${StyledMenuButton} {
42
- z-index: 0;
43
- border-inline-end: 0;
44
- border-color: ${theme.components['form-control']['border-color']};
45
- border-start-end-radius: 0;
46
- border-end-end-radius: 0;
47
- color: ${theme.base.palette['foreground-color']};
48
- &:focus {
49
- z-index: 2;
44
+
45
+ ${StyledMenuButton} {
46
+ z-index: 0;
47
+ border-inline-end: 0;
48
+ border-color: ${formControlBorderColor};
49
+ border-start-end-radius: 0;
50
+ border-end-end-radius: 0;
51
+ align-self: flex-start;
52
+ color: ${foregroundColor};
53
+ &:focus {
54
+ z-index: 2;
55
+ }
50
56
  }
51
- }
52
57
 
53
- ${StyledMenuButton} + * {
54
- flex-grow: 1;
55
- z-index: 1;
56
- }
57
- `;
58
+ ${StyledMenuButton} + * {
59
+ flex-grow: 1;
60
+ z-index: 1;
61
+ width: 100%;
62
+ min-width: ${contentWidth.xs};
63
+ }
64
+ `;
58
65
  });
59
66
  StyledDynamicInput.defaultProps = defaultThemeProp;
60
67
  //# sourceMappingURL=DynamicInput.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicInput.styles.js","sourceRoot":"","sources":["../../../src/components/DynamicInput/DynamicInput.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AAEhG,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA,EAAE,CAAC;AAC9D,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA,EAAE,CAAC;AAEtD,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACzD,OAAO,GAAG,CAAA;;;MAGN,iBAAiB;;;;;;MAMjB,uBAAuB;;;;;;;;;;wBAUL,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,cAAc,CAAC;;;;;QAKhE,6BAA6B;;;;;;;;;;MAU/B,gBAAgB;;;sBAGA,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,cAAc,CAAC;;;eAGvD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC;;;;;;MAM/C,gBAAgB;;;;GAInB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { Button, Flex, StyledFormControl, defaultThemeProp } from '@pega/cosmos-react-core';\nimport { StyledMenuButton } from '@pega/cosmos-react-core/lib/components/MenuButton/MenuButton';\n\nexport const StyledExpressionBuilderButton = styled(Button)``;\nexport const StyledExpressionControl = styled(Flex)``;\n\nexport const StyledDynamicInput = styled.div(({ theme }) => {\n return css`\n display: flex;\n\n ${StyledFormControl} {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n width: 100%;\n }\n\n ${StyledExpressionControl} {\n position: relative;\n z-index: 1;\n\n .react-codemirror2 {\n min-height: 0;\n }\n\n .CodeMirror,\n .CodeMirror-wrap {\n border-color: ${theme.components['form-control']['border-color']};\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n }\n\n ${StyledExpressionBuilderButton} {\n position: absolute;\n z-index: 2;\n inset-block-start: 0.0625rem;\n inset-inline-end: 0.0625rem;\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n }\n }\n\n ${StyledMenuButton} {\n z-index: 0;\n border-inline-end: 0;\n border-color: ${theme.components['form-control']['border-color']};\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n color: ${theme.base.palette['foreground-color']};\n &:focus {\n z-index: 2;\n }\n }\n\n ${StyledMenuButton} + * {\n flex-grow: 1;\n z-index: 1;\n }\n `;\n});\n\nStyledDynamicInput.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"DynamicInput.styles.js","sourceRoot":"","sources":["../../../src/components/DynamicInput/DynamicInput.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AAEhG,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AACnG,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,yCAAyC,CAAC;AAEjD,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA,EAAE,CAAC;AAEtD,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAC1C,CAAC,EACC,KAAK,EAAE,EACL,IAAI,EAAE,EACJ,OAAO,EAAE,EAAE,kBAAkB,EAAE,eAAe,EAAE,EAChD,eAAe,EAAE,YAAY,EAC9B,EACD,UAAU,EAAE,EACV,cAAc,EAAE,EAAE,cAAc,EAAE,sBAAsB,EAAE,EAC3D,EACF,EACF,EAAE,EAAE;IACH,OAAO,GAAG,CAAA;;;QAGN,eAAe;;;;QAIf,0BAA0B,MAAM,yBAAyB,MAAM,UAAU;;;;QAIzE,oBAAoB;;;;QAIpB,iBAAiB;;;;;;QAMjB,uBAAuB;;;;;;;;;;0BAUL,sBAAsB;;;;;;QAMxC,gBAAgB;;;wBAGA,sBAAsB;;;;iBAI7B,eAAe;;;;;;QAMxB,gBAAgB;;;;qBAIH,YAAY,CAAC,EAAE;;KAE/B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { Flex, StyledFormControl, StyledGrid, defaultThemeProp } from '@pega/cosmos-react-core';\nimport { StyledMenuButton } from '@pega/cosmos-react-core/lib/components/MenuButton/MenuButton';\n\nimport { StyledContentWrapper, StyledInputTree } from '../ObjectSelect/InputTree/InputTree.styles';\nimport {\n StyledFieldReferenceInput,\n StyledFieldReferencePicker\n} from '../FieldReference/FieldReference.styles';\n\nexport const StyledExpressionControl = styled(Flex)``;\n\nexport const StyledDynamicInput = styled.div(\n ({\n theme: {\n base: {\n palette: { 'foreground-color': foregroundColor },\n 'content-width': contentWidth\n },\n components: {\n 'form-control': { 'border-color': formControlBorderColor }\n }\n }\n }) => {\n return css`\n display: flex;\n\n ${StyledInputTree} {\n margin-inline-start: -2.5rem;\n }\n\n ${StyledFieldReferencePicker} > ${StyledFieldReferenceInput} > ${StyledGrid} {\n padding: 0;\n }\n\n ${StyledContentWrapper} {\n padding-block-start: 0;\n }\n\n ${StyledFormControl} {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n width: 100%;\n }\n\n ${StyledExpressionControl} {\n position: relative;\n z-index: 1;\n\n .react-codemirror2 {\n min-height: 0;\n }\n\n .CodeMirror,\n .CodeMirror-wrap {\n border-color: ${formControlBorderColor};\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n }\n }\n\n ${StyledMenuButton} {\n z-index: 0;\n border-inline-end: 0;\n border-color: ${formControlBorderColor};\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n align-self: flex-start;\n color: ${foregroundColor};\n &:focus {\n z-index: 2;\n }\n }\n\n ${StyledMenuButton} + * {\n flex-grow: 1;\n z-index: 1;\n width: 100%;\n min-width: ${contentWidth.xs};\n }\n `;\n }\n);\n\nStyledDynamicInput.defaultProps = defaultThemeProp;\n"]}
@@ -1,6 +1,15 @@
1
1
  import type { ComponentType, Ref } from 'react';
2
2
  import type { FormFieldProps, InputProps, TextAreaProps, CurrencyInputProps, NumberInputProps, PhoneInputProps, DateTimeInputProps, DateInputProps, TimeInputProps, TestIdProp, OmitStrict, FormControlProps, DeferInfer } from '@pega/cosmos-react-core';
3
- export type Source = 'Constant' | 'Rule' | 'FieldReference' | 'Expression';
3
+ export type ConstantSourceType = 'Constant';
4
+ export type RuleSourceType = 'Rule';
5
+ export type FieldReferenceSourceType = 'FieldReference';
6
+ export type ExpressionSourceType = 'Expression';
7
+ export type VariableSourceType = 'Variable';
8
+ export type Source = ConstantSourceType | RuleSourceType | FieldReferenceSourceType | ExpressionSourceType;
9
+ export type SourceConfig = {
10
+ type: Source;
11
+ selected?: boolean;
12
+ }[];
4
13
  export type ConstantValueTypeMap = {
5
14
  Text: InputProps['value'];
6
15
  'Text (paragraph)': TextAreaProps['value'];
@@ -15,10 +24,6 @@ export type ConstantValueTypeMap = {
15
24
  Time: TimeInputProps['value'];
16
25
  };
17
26
  export type ConstantFormat = keyof ConstantValueTypeMap;
18
- export type SourceConfig = {
19
- type: Source;
20
- selected?: boolean;
21
- };
22
27
  export type FormControlPropsToOmit = Pick<FormControlProps, 'label' | 'labelHidden' | 'additionalInfo' | 'info' | 'required' | 'status' | 'readOnly' | 'disabled' | 'value' | 'defaultValue'>;
23
28
  export type ConstantComponentProps<T> = OmitStrict<FormControlProps, keyof FormControlPropsToOmit> & {
24
29
  format?: ConstantFormat;
@@ -47,7 +52,7 @@ export interface DynamicInputProps<T extends object = object, ConstantProps exte
47
52
  /**
48
53
  * Methods to source a value from.
49
54
  */
50
- sources: SourceConfig[];
55
+ sources: SourceConfig;
51
56
  /**
52
57
  * Called when the source method changes.
53
58
  */
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicInput.types.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicInput/DynamicInput.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,UAAU,EACX,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,gBAAgB,GAAG,YAAY,CAAC;AAE3E,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC1B,kBAAkB,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACtC,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACtC,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACnC,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACnC,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAChC,QAAQ,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACtC,IAAI,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IAC9B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CAAC,SAAS,CAAC,CAAC;QAClC,cAAc,CAAC,EAAE,eAAe,CAAC,mBAAmB,CAAC,CAAC;QACtD,UAAU,CAAC,EAAE,eAAe,CAAC,eAAe,CAAC,CAAC;KAC/C,CAAC;IAEF;;OAEG;IACH,OAAO,EAAE,YAAY,EAAE,CAAC;IAExB;;OAEG;IACH,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzC;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAE1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B"}
1
+ {"version":3,"file":"DynamicInput.types.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicInput/DynamicInput.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,UAAU,EACX,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC;AAC5C,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AACpC,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AACxD,MAAM,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAChD,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC;AAG5C,MAAM,MAAM,MAAM,GACd,kBAAkB,GAClB,cAAc,GACd,wBAAwB,GACxB,oBAAoB,CAAC;AAEzB,MAAM,MAAM,YAAY,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,EAAE,CAAC;AAElE,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAA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MAAM,EACjC,mBAAmB,SAAS,MAAM,GAAG,MAAM,EAC3C,eAAe,SAAS,MAAM,GAAG,MAAM,CACvC,SAAQ,UAAU,EAChB,IAAI,CAAC,cAAc,EAAE,aAAa,GAAG,UAAU,GAAG,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC;IAC7E;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,EAAE;QACR,QAAQ,CAAC,EAAE,eAAe,CAAC,aAAa,CAAC,CAAC;QAC1C,IAAI,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;QAClC,cAAc,CAAC,EAAE,eAAe,CAAC,mBAAmB,CAAC,CAAC;QACtD,UAAU,CAAC,EAAE,eAAe,CAAC,eAAe,CAAC,CAAC;KAC/C,CAAC;IAEF;;OAEG;IACH,OAAO,EAAE,YAAY,CAAC;IAEtB;;OAEG;IACH,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzC;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAE1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicInput.types.js","sourceRoot":"","sources":["../../../src/components/DynamicInput/DynamicInput.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentType, Ref } from 'react';\n\nimport type {\n FormFieldProps,\n InputProps,\n TextAreaProps,\n CurrencyInputProps,\n NumberInputProps,\n PhoneInputProps,\n DateTimeInputProps,\n DateInputProps,\n TimeInputProps,\n TestIdProp,\n OmitStrict,\n FormControlProps,\n DeferInfer\n} from '@pega/cosmos-react-core';\n\nexport type Source = 'Constant' | 'Rule' | 'FieldReference' | 'Expression'; // Input type options\n\nexport type ConstantValueTypeMap = {\n Text: InputProps['value'];\n 'Text (paragraph)': TextAreaProps['value'];\n Boolean: boolean;\n Currency: CurrencyInputProps['value'];\n Percentage: NumberInputProps['value'];\n Integer: NumberInputProps['value'];\n Decimal: NumberInputProps['value'];\n Phone: PhoneInputProps['value'];\n DateTime: DateTimeInputProps['value'];\n Date: DateInputProps['value'];\n Time: TimeInputProps['value'];\n};\n\nexport type ConstantFormat = keyof ConstantValueTypeMap;\n\nexport type SourceConfig = { type: Source; selected?: boolean };\n\nexport type FormControlPropsToOmit = Pick<\n FormControlProps,\n | 'label'\n | 'labelHidden'\n | 'additionalInfo'\n | 'info'\n | 'required'\n | 'status'\n | 'readOnly'\n | 'disabled'\n | 'value'\n | 'defaultValue'\n>;\n\nexport type ConstantComponentProps<T> = OmitStrict<\n FormControlProps,\n keyof FormControlPropsToOmit\n> & {\n format?: ConstantFormat;\n} & T;\n\ntype ComponentConfig<P> = {\n component: ComponentType<P>;\n props: DeferInfer<P>;\n};\n\n// ## (DynamicInput) Top level props for the component.\nexport interface DynamicInputProps<\n T extends object = object,\n ConstantProps extends ConstantComponentProps<T> = ConstantComponentProps<T>,\n RuleProps extends object = object,\n FieldReferenceProps extends object = object,\n ExpressionProps extends object = object\n> extends TestIdProp,\n Pick<FormFieldProps, 'labelHidden' | 'required' | 'status' | 'id' | 'info'> {\n /**\n * The accessible and visual field label.\n * When used as an independent control label should represent the data field.\n * When used in combination with another LHS element the default \"Value\" may be sufficient.\n * @default \"Value\"\n */\n label?: string;\n\n /**\n * The form control displayed on the RHS\n */\n controls: {\n constant?: ComponentConfig<ConstantProps>;\n rule?: ComponentConfig<RuleProps>;\n fieldReference?: ComponentConfig<FieldReferenceProps>;\n expression?: ComponentConfig<ExpressionProps>;\n };\n\n /**\n * Methods to source a value from.\n */\n sources: SourceConfig[];\n\n /**\n * Called when the source method changes.\n */\n onSourceChange: (source: Source) => void;\n\n /**\n * Ref to the component's root element.\n */\n ref?: Ref<HTMLDivElement>;\n\n /**\n * Hides source button.\n */\n hideSourceButton?: boolean;\n}\n"]}
1
+ {"version":3,"file":"DynamicInput.types.js","sourceRoot":"","sources":["../../../src/components/DynamicInput/DynamicInput.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentType, Ref } from 'react';\n\nimport type {\n FormFieldProps,\n InputProps,\n TextAreaProps,\n CurrencyInputProps,\n NumberInputProps,\n PhoneInputProps,\n DateTimeInputProps,\n DateInputProps,\n TimeInputProps,\n TestIdProp,\n OmitStrict,\n FormControlProps,\n DeferInfer\n} from '@pega/cosmos-react-core';\n\nexport type ConstantSourceType = 'Constant';\nexport type RuleSourceType = 'Rule';\nexport type FieldReferenceSourceType = 'FieldReference';\nexport type ExpressionSourceType = 'Expression';\nexport type VariableSourceType = 'Variable';\n\n// Input type options\nexport type Source =\n | ConstantSourceType\n | RuleSourceType\n | FieldReferenceSourceType\n | ExpressionSourceType;\n\nexport type SourceConfig = { type: Source; selected?: boolean }[];\n\nexport type ConstantValueTypeMap = {\n Text: InputProps['value'];\n 'Text (paragraph)': TextAreaProps['value'];\n Boolean: boolean;\n Currency: CurrencyInputProps['value'];\n Percentage: NumberInputProps['value'];\n Integer: NumberInputProps['value'];\n Decimal: NumberInputProps['value'];\n Phone: PhoneInputProps['value'];\n DateTime: DateTimeInputProps['value'];\n Date: DateInputProps['value'];\n Time: TimeInputProps['value'];\n};\n\nexport type ConstantFormat = keyof ConstantValueTypeMap;\n\nexport type FormControlPropsToOmit = Pick<\n FormControlProps,\n | 'label'\n | 'labelHidden'\n | 'additionalInfo'\n | 'info'\n | 'required'\n | 'status'\n | 'readOnly'\n | 'disabled'\n | 'value'\n | 'defaultValue'\n>;\n\nexport type ConstantComponentProps<T> = OmitStrict<\n FormControlProps,\n keyof FormControlPropsToOmit\n> & {\n format?: ConstantFormat;\n} & T;\n\ntype ComponentConfig<P> = {\n component: ComponentType<P>;\n props: DeferInfer<P>;\n};\n\n// ## (DynamicInput) Top level props for the component.\nexport interface DynamicInputProps<\n T extends object = object,\n ConstantProps extends ConstantComponentProps<T> = ConstantComponentProps<T>,\n RuleProps extends object = object,\n FieldReferenceProps extends object = object,\n ExpressionProps extends object = object\n> extends TestIdProp,\n Pick<FormFieldProps, 'labelHidden' | 'required' | 'status' | 'id' | 'info'> {\n /**\n * The accessible and visual field label.\n * When used as an independent control label should represent the data field.\n * When used in combination with another LHS element the default \"Value\" may be sufficient.\n * @default \"Value\"\n */\n label?: string;\n\n /**\n * The form control displayed on the RHS\n */\n controls: {\n constant?: ComponentConfig<ConstantProps>;\n rule?: ComponentConfig<RuleProps>;\n fieldReference?: ComponentConfig<FieldReferenceProps>;\n expression?: ComponentConfig<ExpressionProps>;\n };\n\n /**\n * Methods to source a value from.\n */\n sources: SourceConfig;\n\n /**\n * Called when the source method changes.\n */\n onSourceChange: (source: Source) => void;\n\n /**\n * Ref to the component's root element.\n */\n ref?: Ref<HTMLDivElement>;\n\n /**\n * Hides source button.\n */\n hideSourceButton?: boolean;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicInput/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAuBtF,eAAO,MAAM,aAAa,GAAI,oBAG3B;IACD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB,KAAG,MAoBH,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,SAAS,iBAAiB,CAAC,SAAS,CAAC,KAAG,MAAM,GAAG,SAIjF,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicInput/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAyBtF,eAAO,MAAM,aAAa,GAAI,oBAG3B;IACD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB,KAAG,MAoBH,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,SAAS,iBAAiB,CAAC,SAAS,CAAC,KAAG,MAAM,GAAG,SAIjF,CAAC"}
@@ -12,7 +12,8 @@ const iconMap = {
12
12
  Time: 'clock',
13
13
  Rule: 'rule-library',
14
14
  FieldReference: 'field-cursor',
15
- Advanced: 'function'
15
+ Advanced: 'function',
16
+ Expression: 'expression'
16
17
  };
17
18
  export const getSourceIcon = ({ source, format }) => {
18
19
  let iconName;
@@ -26,7 +27,7 @@ export const getSourceIcon = ({ source, format }) => {
26
27
  iconName = iconMap.FieldReference;
27
28
  }
28
29
  if (source === 'Expression') {
29
- iconName = iconMap.Advanced;
30
+ iconName = iconMap.Expression;
30
31
  }
31
32
  return iconName ?? iconMap.Text;
32
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/DynamicInput/utils.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,GAIT;IACF,IAAI,EAAE,sBAAsB;IAC5B,kBAAkB,EAAE,sBAAsB;IAC1C,OAAO,EAAE,mBAAmB;IAC5B,UAAU,EAAE,YAAY;IACxB,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,gBAAgB;IACzB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,YAAY;IACnB,QAAQ,EAAE,wBAAwB;IAClC,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,cAAc;IACpB,cAAc,EAAE,cAAc;IAC9B,QAAQ,EAAE,UAAU;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,MAAM,EACN,MAAM,EAIP,EAAU,EAAE;IACX,IAAI,QAAQ,CAAC;IAEb,IAAI,MAAM,KAAK,UAAU,EAAE,CAAC;QAC1B,QAAQ,GAAG,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC;IACvC,CAAC;IAED,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAC1B,CAAC;IAED,IAAI,MAAM,KAAK,gBAAgB,EAAE,CAAC;QAChC,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC;IACpC,CAAC;IAED,IAAI,MAAM,KAAK,YAAY,EAAE,CAAC;QAC5B,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAC9B,CAAC;IAED,OAAO,QAAQ,IAAK,OAAO,CAAC,IAAe,CAAC;AAC9C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAqC,EAAsB,EAAE;IAC5F,IAAI,CAAC,OAAO,CAAC,MAAM;QAAE,OAAO;IAE5B,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3E,CAAC,CAAC","sourcesContent":["import type { StreamlineIconName } from '@pega/cosmos-react-core';\n\nimport type { ConstantFormat, DynamicInputProps, Source } from './DynamicInput.types';\n\nconst iconMap: Partial<Record<ConstantFormat, StreamlineIconName>> & {\n Rule: 'rule-library';\n FieldReference: 'field-cursor';\n Advanced: 'function';\n} = {\n Text: 'dataviz-string-field',\n 'Text (paragraph)': 'dataviz-string-field',\n Boolean: 'circle-mixed-left',\n Percentage: 'percentage',\n Integer: 'dataviz-numeric-field',\n Decimal: 'number-decimal',\n Currency: 'currency',\n Phone: 'phone-call',\n DateTime: 'dataviz-datetime-field',\n Date: 'calendar-range',\n Time: 'clock',\n Rule: 'rule-library',\n FieldReference: 'field-cursor',\n Advanced: 'function'\n};\n\nexport const getSourceIcon = ({\n source,\n format\n}: {\n source: Source;\n format?: ConstantFormat;\n}): string => {\n let iconName;\n\n if (source === 'Constant') {\n iconName = iconMap[format ?? 'Text'];\n }\n\n if (source === 'Rule') {\n iconName = iconMap.Rule;\n }\n\n if (source === 'FieldReference') {\n iconName = iconMap.FieldReference;\n }\n\n if (source === 'Expression') {\n iconName = iconMap.Advanced;\n }\n\n return iconName ?? (iconMap.Text as string);\n};\n\nexport const getCurrentSource = (sources: DynamicInputProps['sources']): Source | undefined => {\n if (!sources.length) return;\n\n return sources.find(({ selected }) => selected)?.type || sources[0].type;\n};\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/DynamicInput/utils.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,GAKT;IACF,IAAI,EAAE,sBAAsB;IAC5B,kBAAkB,EAAE,sBAAsB;IAC1C,OAAO,EAAE,mBAAmB;IAC5B,UAAU,EAAE,YAAY;IACxB,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,gBAAgB;IACzB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,YAAY;IACnB,QAAQ,EAAE,wBAAwB;IAClC,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,cAAc;IACpB,cAAc,EAAE,cAAc;IAC9B,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,MAAM,EACN,MAAM,EAIP,EAAU,EAAE;IACX,IAAI,QAAQ,CAAC;IAEb,IAAI,MAAM,KAAK,UAAU,EAAE,CAAC;QAC1B,QAAQ,GAAG,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC;IACvC,CAAC;IAED,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAC1B,CAAC;IAED,IAAI,MAAM,KAAK,gBAAgB,EAAE,CAAC;QAChC,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC;IACpC,CAAC;IAED,IAAI,MAAM,KAAK,YAAY,EAAE,CAAC;QAC5B,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAChC,CAAC;IAED,OAAO,QAAQ,IAAK,OAAO,CAAC,IAAe,CAAC;AAC9C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAqC,EAAsB,EAAE;IAC5F,IAAI,CAAC,OAAO,CAAC,MAAM;QAAE,OAAO;IAE5B,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3E,CAAC,CAAC","sourcesContent":["import type { StreamlineIconName } from '@pega/cosmos-react-core';\n\nimport type { ConstantFormat, DynamicInputProps, Source } from './DynamicInput.types';\n\nconst iconMap: Partial<Record<ConstantFormat, StreamlineIconName>> & {\n Rule: 'rule-library';\n FieldReference: 'field-cursor';\n Advanced: 'function';\n Expression: 'expression';\n} = {\n Text: 'dataviz-string-field',\n 'Text (paragraph)': 'dataviz-string-field',\n Boolean: 'circle-mixed-left',\n Percentage: 'percentage',\n Integer: 'dataviz-numeric-field',\n Decimal: 'number-decimal',\n Currency: 'currency',\n Phone: 'phone-call',\n DateTime: 'dataviz-datetime-field',\n Date: 'calendar-range',\n Time: 'clock',\n Rule: 'rule-library',\n FieldReference: 'field-cursor',\n Advanced: 'function',\n Expression: 'expression'\n};\n\nexport const getSourceIcon = ({\n source,\n format\n}: {\n source: Source;\n format?: ConstantFormat;\n}): string => {\n let iconName;\n\n if (source === 'Constant') {\n iconName = iconMap[format ?? 'Text'];\n }\n\n if (source === 'Rule') {\n iconName = iconMap.Rule;\n }\n\n if (source === 'FieldReference') {\n iconName = iconMap.FieldReference;\n }\n\n if (source === 'Expression') {\n iconName = iconMap.Expression;\n }\n\n return iconName ?? (iconMap.Text as string);\n};\n\nexport const getCurrentSource = (sources: DynamicInputProps['sources']): Source | undefined => {\n if (!sources.length) return;\n\n return sources.find(({ selected }) => selected)?.type || sources[0].type;\n};\n"]}
@@ -0,0 +1,34 @@
1
+ import type { Ref } from 'react';
2
+ import type { ImageProps, LinkProps, MenuButtonProps, Action, TestIdProp, BaseProps, NoChildrenProp, ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';
3
+ export interface EmptyRuleTemplateProps extends BaseProps, NoChildrenProp, TestIdProp {
4
+ /** The heading of the template */
5
+ title: string;
6
+ /** description of the template */
7
+ description?: string;
8
+ /** Image of the template */
9
+ image?: ImageProps;
10
+ /** Link pointing to external resource for more information */
11
+ moreInfo?: {
12
+ label: string;
13
+ href: LinkProps['href'];
14
+ };
15
+ /** Call to action in the template */
16
+ primaryAction?: Pick<Action, 'text' | 'onClick' | 'disabled'>;
17
+ /** Select menu to choose the first action to proceed further */
18
+ actionsMenu?: Pick<MenuButtonProps, 'text' | 'onClick' | 'onKeyDown' | 'menu'> & {
19
+ disabled?: boolean;
20
+ };
21
+ /** Ref to the template. */
22
+ ref?: Ref<HTMLDivElement>;
23
+ }
24
+ export declare const StyledEmptyRuleContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
25
+ export declare const StyledEmptyRuleContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
26
+ export declare const StyledImageContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
27
+ export declare const StyledButtonContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
28
+ isStacked: boolean;
29
+ }, never>;
30
+ declare const _default: ForwardRefForwardPropsComponent<EmptyRuleTemplateProps> & {
31
+ getTestIds: (testIdProp?: TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["title", "description", "image", "more-info", "action", "actions-menu"]>;
32
+ };
33
+ export default _default;
34
+ //# sourceMappingURL=EmptyRuleTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyRuleTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyRuleTemplate/EmptyRuleTemplate.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAmB,MAAM,OAAO,CAAC;AAiBlD,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,eAAe,EACf,MAAM,EACN,UAAU,EACV,SAAS,EACT,cAAc,EACd,+BAA+B,EAChC,MAAM,yBAAyB,CAAC;AAKjC,MAAM,WAAW,sBAAuB,SAAQ,SAAS,EAAE,cAAc,EAAE,UAAU;IACnF,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE;QACT,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;KACzB,CAAC;IACF,qCAAqC;IACrC,aAAa,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;IAC9D,gEAAgE;IAChE,WAAW,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC,GAAG;QAC/E,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;IACF,2BAA2B;IAC3B,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,wBAAwB,yGAcpC,CAAC;AAIF,eAAO,MAAM,sBAAsB,yGAYlC,CAAC;AAIF,eAAO,MAAM,oBAAoB,yGAS/B,CAAC;AAIH,eAAO,MAAM,qBAAqB;eAA2C,OAAO;SASlF,CAAC;;;;AA8FH,wBAA2E"}
@@ -0,0 +1,55 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import styled, { css } from 'styled-components';
4
+ import { Flex, Text, Image, Link, Button, MenuButton, ShowMoreLess, useTestIds, useBreakpoint, useConsolidatedRef, withTestIds, defaultThemeProp } from '@pega/cosmos-react-core';
5
+ import { StyledMenuButton } from '@pega/cosmos-react-core/lib/components/MenuButton/MenuButton';
6
+ import { getEmptyRuleTemplateTestIds } from './EmptyRuleTemplate.test-ids';
7
+ export const StyledEmptyRuleContainer = styled.div(({ theme: { base: { 'content-width': { sm } } } }) => {
8
+ return css `
9
+ min-width: ${sm};
10
+ height: 100%;
11
+ text-align: center;
12
+ `;
13
+ });
14
+ StyledEmptyRuleContainer.defaultProps = defaultThemeProp;
15
+ export const StyledEmptyRuleContent = styled.div(({ theme: { base: { 'content-width': { xl } } } }) => {
16
+ return css `
17
+ max-width: ${xl};
18
+ `;
19
+ });
20
+ StyledEmptyRuleContent.defaultProps = defaultThemeProp;
21
+ export const StyledImageContainer = styled.div(({ theme }) => {
22
+ return css `
23
+ width: calc(30 * ${theme.base.spacing});
24
+
25
+ img {
26
+ object-fit: contain;
27
+ min-width: 100%;
28
+ }
29
+ `;
30
+ });
31
+ StyledImageContainer.defaultProps = defaultThemeProp;
32
+ export const StyledButtonContainer = styled.div(({ isStacked }) => {
33
+ return (isStacked &&
34
+ css `
35
+ ${StyledMenuButton} {
36
+ margin-inline-start: 0;
37
+ }
38
+ `);
39
+ });
40
+ const EmptyRuleTemplate = forwardRef(function EmptyRuleTemplate({ testId, title, image, description, moreInfo, primaryAction, actionsMenu }, ref) {
41
+ const testIds = useTestIds(testId, getEmptyRuleTemplateTestIds);
42
+ const templateRef = useConsolidatedRef(ref);
43
+ const isSmallOrAbove = useBreakpoint('sm', { breakpointRef: templateRef });
44
+ return (_jsx(Flex, { as: StyledEmptyRuleContainer, container: { justify: 'center', alignItems: 'center' }, ref: templateRef, children: _jsxs(Flex, { as: StyledEmptyRuleContent, container: {
45
+ direction: 'column',
46
+ alignItems: 'center',
47
+ rowGap: 2,
48
+ pad: [4, 2]
49
+ }, children: [image && (_jsx(StyledImageContainer, { children: _jsx(Image, { ...image, "data-testId": testIds.image }) })), _jsxs(Flex, { container: { direction: 'column', alignItems: 'center', rowGap: 1 }, children: [_jsx(Text, { "data-testId": testIds.title, variant: 'h2', children: title }), description && (_jsx(ShowMoreLess, { lines: 2, children: _jsx(Text, { "data-testId": testIds.description, variant: 'secondary', children: description }) })), moreInfo && (_jsx(Link, { testId: testIds.moreInfo, href: moreInfo.href, children: moreInfo.label })), (primaryAction || actionsMenu) && (_jsxs(Flex, { as: StyledButtonContainer, isStacked: !isSmallOrAbove, container: {
50
+ direction: isSmallOrAbove ? 'row' : 'column',
51
+ gap: isSmallOrAbove ? 0 : 1
52
+ }, children: [primaryAction && (_jsx(Button, { "data-testid": testIds.action, onClick: primaryAction.onClick, disabled: primaryAction.disabled, children: primaryAction.text })), actionsMenu && (_jsx(MenuButton, { testId: testIds.actionsMenu, ...actionsMenu, disabled: actionsMenu.disabled }))] }))] })] }) }));
53
+ });
54
+ export default withTestIds(EmptyRuleTemplate, getEmptyRuleTemplateTestIds);
55
+ //# sourceMappingURL=EmptyRuleTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyRuleTemplate.js","sourceRoot":"","sources":["../../../src/components/EmptyRuleTemplate/EmptyRuleTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,MAAM,EACN,UAAU,EACV,YAAY,EACZ,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAWjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AAEhG,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAwB3E,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,GAAG,CAChD,CAAC,EACC,KAAK,EAAE,EACL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C,CAAC,QAAQ;gCAC5C,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;6BAC5B,aAEA,aAAa,IAAI,CAChB,KAAC,MAAM,mBACQ,OAAO,CAAC,MAAM,EAC3B,OAAO,EAAE,aAAa,CAAC,OAAO,EAC9B,QAAQ,EAAE,aAAa,CAAC,QAAQ,YAE/B,aAAa,CAAC,IAAI,GACZ,CACV,EAEA,WAAW,IAAI,CACd,KAAC,UAAU,IACT,MAAM,EAAE,OAAO,CAAC,WAAW,KACvB,WAAW,EACf,QAAQ,EAAE,WAAW,CAAC,QAAQ,GAC9B,CACH,IACI,CACR,IACI,IACF,GACF,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,iBAAiB,EAAE,2BAA2B,CAAC,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { Ref, PropsWithoutRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Flex,\n Text,\n Image,\n Link,\n Button,\n MenuButton,\n ShowMoreLess,\n useTestIds,\n useBreakpoint,\n useConsolidatedRef,\n withTestIds,\n defaultThemeProp\n} from '@pega/cosmos-react-core';\nimport type {\n ImageProps,\n LinkProps,\n MenuButtonProps,\n Action,\n TestIdProp,\n BaseProps,\n NoChildrenProp,\n ForwardRefForwardPropsComponent\n} from '@pega/cosmos-react-core';\nimport { StyledMenuButton } from '@pega/cosmos-react-core/lib/components/MenuButton/MenuButton';\n\nimport { getEmptyRuleTemplateTestIds } from './EmptyRuleTemplate.test-ids';\n\nexport interface EmptyRuleTemplateProps extends BaseProps, NoChildrenProp, TestIdProp {\n /** The heading of the template */\n title: string;\n /** description of the template */\n description?: string;\n /** Image of the template */\n image?: ImageProps;\n /** Link pointing to external resource for more information */\n moreInfo?: {\n label: string;\n href: LinkProps['href'];\n };\n /** Call to action in the template */\n primaryAction?: Pick<Action, 'text' | 'onClick' | 'disabled'>;\n /** Select menu to choose the first action to proceed further */\n actionsMenu?: Pick<MenuButtonProps, 'text' | 'onClick' | 'onKeyDown' | 'menu'> & {\n disabled?: boolean;\n };\n /** Ref to the template. */\n ref?: Ref<HTMLDivElement>;\n}\n\nexport const StyledEmptyRuleContainer = styled.div(\n ({\n theme: {\n base: {\n 'content-width': { sm }\n }\n }\n }) => {\n return css`\n min-width: ${sm};\n height: 100%;\n text-align: center;\n `;\n }\n);\n\nStyledEmptyRuleContainer.defaultProps = defaultThemeProp;\n\nexport const StyledEmptyRuleContent = styled.div(\n ({\n theme: {\n base: {\n 'content-width': { xl }\n }\n }\n }) => {\n return css`\n max-width: ${xl};\n `;\n }\n);\n\nStyledEmptyRuleContent.defaultProps = defaultThemeProp;\n\nexport const StyledImageContainer = styled.div(({ theme }) => {\n return css`\n width: calc(30 * ${theme.base.spacing});\n\n img {\n object-fit: contain;\n min-width: 100%;\n }\n `;\n});\n\nStyledImageContainer.defaultProps = defaultThemeProp;\n\nexport const StyledButtonContainer = styled.div(({ isStacked }: { isStacked: boolean }) => {\n return (\n isStacked &&\n css`\n ${StyledMenuButton} {\n margin-inline-start: 0;\n }\n `\n );\n});\n\nconst EmptyRuleTemplate: ForwardRefForwardPropsComponent<EmptyRuleTemplateProps> = forwardRef(\n function EmptyRuleTemplate(\n {\n testId,\n title,\n image,\n description,\n moreInfo,\n primaryAction,\n actionsMenu\n }: PropsWithoutRef<EmptyRuleTemplateProps>,\n ref: EmptyRuleTemplateProps['ref']\n ) {\n const testIds = useTestIds(testId, getEmptyRuleTemplateTestIds);\n const templateRef = useConsolidatedRef<HTMLDivElement>(ref);\n const isSmallOrAbove = useBreakpoint('sm', { breakpointRef: templateRef });\n\n return (\n <Flex\n as={StyledEmptyRuleContainer}\n container={{ justify: 'center', alignItems: 'center' }}\n ref={templateRef}\n >\n <Flex\n as={StyledEmptyRuleContent}\n container={{\n direction: 'column',\n alignItems: 'center',\n rowGap: 2,\n pad: [4, 2]\n }}\n >\n {image && (\n <StyledImageContainer>\n <Image {...image} data-testId={testIds.image} />\n </StyledImageContainer>\n )}\n\n <Flex container={{ direction: 'column', alignItems: 'center', rowGap: 1 }}>\n <Text data-testId={testIds.title} variant='h2'>\n {title}\n </Text>\n\n {description && (\n <ShowMoreLess lines={2}>\n <Text data-testId={testIds.description} variant='secondary'>\n {description}\n </Text>\n </ShowMoreLess>\n )}\n\n {moreInfo && (\n <Link testId={testIds.moreInfo} href={moreInfo.href}>\n {moreInfo.label}\n </Link>\n )}\n\n {(primaryAction || actionsMenu) && (\n <Flex\n as={StyledButtonContainer}\n isStacked={!isSmallOrAbove}\n container={{\n direction: isSmallOrAbove ? 'row' : 'column',\n gap: isSmallOrAbove ? 0 : 1\n }}\n >\n {primaryAction && (\n <Button\n data-testid={testIds.action}\n onClick={primaryAction.onClick}\n disabled={primaryAction.disabled}\n >\n {primaryAction.text}\n </Button>\n )}\n\n {actionsMenu && (\n <MenuButton\n testId={testIds.actionsMenu}\n {...actionsMenu}\n disabled={actionsMenu.disabled}\n />\n )}\n </Flex>\n )}\n </Flex>\n </Flex>\n </Flex>\n );\n }\n);\n\nexport default withTestIds(EmptyRuleTemplate, getEmptyRuleTemplateTestIds);\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const getEmptyRuleTemplateTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["title", "description", "image", "more-info", "action", "actions-menu"]>;
2
+ //# sourceMappingURL=EmptyRuleTemplate.test-ids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyRuleTemplate.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,2BAA2B,6MAO7B,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { createTestIds } from '@pega/cosmos-react-core';
2
+ export const getEmptyRuleTemplateTestIds = createTestIds('empty-rule-template', [
3
+ 'title',
4
+ 'description',
5
+ 'image',
6
+ 'more-info',
7
+ 'action',
8
+ 'actions-menu'
9
+ ]);
10
+ //# sourceMappingURL=EmptyRuleTemplate.test-ids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyRuleTemplate.test-ids.js","sourceRoot":"","sources":["../../../src/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,CAAC,MAAM,2BAA2B,GAAG,aAAa,CAAC,qBAAqB,EAAE;IAC9E,OAAO;IACP,aAAa;IACb,OAAO;IACP,WAAW;IACX,QAAQ;IACR,cAAc;CACN,CAAC,CAAC","sourcesContent":["import { createTestIds } from '@pega/cosmos-react-core';\n\nexport const getEmptyRuleTemplateTestIds = createTestIds('empty-rule-template', [\n 'title',\n 'description',\n 'image',\n 'more-info',\n 'action',\n 'actions-menu'\n] as const);\n"]}
@@ -0,0 +1,3 @@
1
+ export { default } from './EmptyRuleTemplate';
2
+ export type { EmptyRuleTemplateProps } from './EmptyRuleTemplate';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyRuleTemplate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default } from './EmptyRuleTemplate';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/EmptyRuleTemplate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["export { default } from './EmptyRuleTemplate';\nexport type { EmptyRuleTemplateProps } from './EmptyRuleTemplate';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Expression.d.ts","sourceRoot":"","sources":["../../../src/components/Expression/Expression.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;;;;AAwH1D,wBAA6D"}
1
+ {"version":3,"file":"Expression.d.ts","sourceRoot":"","sources":["../../../src/components/Expression/Expression.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;;;;AAwI1D,wBAA6D"}
@@ -1,9 +1,10 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useRef, useImperativeHandle, forwardRef } from 'react';
3
3
  import { useTestIds, withTestIds, FormField, StyledFormControl, useI18n } from '@pega/cosmos-react-core';
4
4
  import { getExpressionTestIds } from './Expression.test-ids';
5
5
  import { StyledCodeEditor, StyledFlex } from './Expression.styles';
6
- const Expression = forwardRef(({ testId, label, labelHidden, readOnly, required, value, status, info, placeholder, additionalInfo, disabled, hideFormField = false, editorInput: { fetchSuggestions, handle, loading, onChange, onBlur, inLineErrors }, id, ...restProps }, ref) => {
6
+ import ExpressionBuilderModal from './ExpressionBuilderModal';
7
+ const Expression = forwardRef(({ testId, label, labelHidden, readOnly, required, value, status, info, placeholder, additionalInfo, disabled, showExpBuilderIcon, onExpBuilderShowHandler, showExpressionBuilder, expressionBuilder, hideFormField = false, editorInput: { fetchSuggestions, handle, loading, onChange, onBlur, inLineErrors }, id, ...restProps }, ref) => {
7
8
  const textElRef = useRef(null);
8
9
  const popOverReference = useRef(null);
9
10
  const codeEditorHandle = useRef(null);
@@ -25,11 +26,11 @@ const Expression = forwardRef(({ testId, label, labelHidden, readOnly, required,
25
26
  getPopOverRef: () => popOverReference.current,
26
27
  getExpressionRef: () => expressionRef.current
27
28
  }), []);
28
- const Comp = (_jsx(StyledFormControl, { container: true, as: StyledFlex, status: status, readOnly: readOnly, disabled: disabled, ref: expressionRef, "data-testid": testIds.root, children: _jsx(StyledCodeEditor, { testId: testIds.expressionInput, isSingleLine: true, fetchSuggestions: fetchSuggestions, codeEditorHandle: codeEditorHandle, defaultValue: value, loading: loading, readOnly: readOnly, onChange: onChange, onBlur: onBlur, inLineErrors: inLineErrors, autoCompleteTriggers: ['.', '@', '#', ':', '(', ')'], editorConfigProps: {
29
- mode: 'expression',
30
- readOnly,
31
- placeholder
32
- }, "aria-label": t('expression_input') }) }));
29
+ const Comp = (_jsxs(StyledFormControl, { container: true, inline: true, as: StyledFlex, status: status, readOnly: readOnly, disabled: disabled, ref: expressionRef, "data-testid": testIds.root, children: [_jsx(StyledCodeEditor, { testId: testIds.expressionInput, isSingleLine: true, fetchSuggestions: fetchSuggestions, codeEditorHandle: codeEditorHandle, defaultValue: value, loading: loading, readOnly: readOnly, onChange: onChange, onBlur: onBlur, inLineErrors: inLineErrors, autoCompleteTriggers: ['.', '@', '#', ':', '(', ')'], editorConfigProps: {
30
+ mode: 'expression',
31
+ readOnly,
32
+ placeholder
33
+ }, "aria-label": t('expression_input') }), showExpBuilderIcon && (_jsx(ExpressionBuilderModal, { testId: testId, expressionBuilder: expressionBuilder, showExpressionBuilder: showExpressionBuilder, readOnly: readOnly, disabled: disabled, onExpBuilderShowHandler: onExpBuilderShowHandler }))] }));
33
34
  return !hideFormField ? (_jsx(FormField, { ...restProps, label: label, labelHidden: labelHidden, required: required, readOnly: readOnly, status: status, info: info, disabled: disabled, additionalInfo: additionalInfo, id: id, children: Comp })) : (Comp);
34
35
  });
35
36
  export default withTestIds(Expression, getExpressionTestIds);
@@ -1 +1 @@
1
- {"version":3,"file":"Expression.js","sourceRoot":"","sources":["../../../src/components/Expression/Expression.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,UAAU,EAAwB,MAAM,OAAO,CAAC;AAEtF,OAAO,EACL,UAAU,EACV,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,OAAO,EACR,MAAM,y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EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,EAAE,EAAE,EAAE,YAEL,IAAI,GACK,CACb,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import { useRef, useImperativeHandle, forwardRef, type PropsWithoutRef } from 'react';\n\nimport {\n useTestIds,\n withTestIds,\n FormField,\n StyledFormControl,\n useI18n\n} from '@pega/cosmos-react-core';\n\nimport type { EditorState, CustomPositionProps } from '../ExpressionBuilder';\n\nimport { getExpressionTestIds } from './Expression.test-ids';\nimport type { ExpressionProps } from './Expression.types';\nimport { StyledCodeEditor, StyledFlex } from './Expression.styles';\n\nconst Expression = forwardRef(\n (\n {\n testId,\n label,\n labelHidden,\n readOnly,\n required,\n value,\n status,\n info,\n placeholder,\n additionalInfo,\n disabled,\n hideFormField = false,\n editorInput: { fetchSuggestions, handle, loading, onChange, onBlur, inLineErrors },\n id,\n ...restProps\n }: PropsWithoutRef<ExpressionProps>,\n ref: ExpressionProps['ref']\n ) => {\n const textElRef = useRef<HTMLInputElement>(null);\n const popOverReference = useRef<HTMLDivElement>(null);\n const codeEditorHandle = useRef<EditorState>(null);\n const expressionRef = useRef<HTMLDivElement>(null);\n const t = useI18n();\n\n const testIds = useTestIds(testId, getExpressionTestIds);\n\n const getExpression = () => {\n return codeEditorHandle.current?.getValue() || '';\n };\n\n const insertExpression = (\n expression: string,\n replaceContent?: boolean,\n customCursorPosition?: CustomPositionProps\n ) => {\n return codeEditorHandle.current?.insertText(\n expression ?? '',\n replaceContent ?? true,\n customCursorPosition\n );\n };\n\n useImperativeHandle(\n handle,\n () => ({\n getExpression,\n insertExpression\n }),\n [getExpression]\n );\n\n useImperativeHandle(\n ref,\n () => ({\n getTextElRef: () => textElRef.current,\n getPopOverRef: () => popOverReference.current,\n getExpressionRef: () => expressionRef.current\n }),\n []\n );\n\n const Comp = (\n <StyledFormControl\n container\n as={StyledFlex}\n status={status}\n readOnly={readOnly}\n disabled={disabled}\n ref={expressionRef}\n data-testid={testIds.root}\n >\n <StyledCodeEditor\n testId={testIds.expressionInput}\n isSingleLine\n fetchSuggestions={fetchSuggestions}\n codeEditorHandle={codeEditorHandle}\n defaultValue={value}\n loading={loading}\n readOnly={readOnly}\n onChange={onChange}\n onBlur={onBlur}\n inLineErrors={inLineErrors}\n autoCompleteTriggers={['.', '@', '#', ':', '(', ')']}\n editorConfigProps={{\n mode: 'expression',\n readOnly,\n placeholder\n }}\n aria-label={t('expression_input')}\n />\n </StyledFormControl>\n );\n\n return !hideFormField ? (\n <FormField\n {...restProps}\n label={label}\n labelHidden={labelHidden}\n required={required}\n readOnly={readOnly}\n status={status}\n info={info}\n disabled={disabled}\n additionalInfo={additionalInfo}\n id={id}\n >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n }\n);\n\nexport default withTestIds(Expression, getExpressionTestIds);\n"]}
1
+ {"version":3,"file":"Expression.js","sourceRoot":"","sources":["../../../src/components/Expression/Expression.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,UAAU,EAAwB,MAAM,OAAO,CAAC;AAEtF,OAAO,EACL,UAAU,EACV,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,OAAO,EACR,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAE9D,MAAM,UAAU,GAAG,UAAU,CAC3B,CACE,EACE,MAAM,EACN,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,uBAAuB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cAAc,EAAE,cAAc,EAC9B,EAAE,EAAE,EAAE,YAEL,IAAI,GACK,CACb,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import { useRef, useImperativeHandle, forwardRef, type PropsWithoutRef } from 'react';\n\nimport {\n useTestIds,\n withTestIds,\n FormField,\n StyledFormControl,\n useI18n\n} from '@pega/cosmos-react-core';\n\nimport type { EditorState, CustomPositionProps } from '../ExpressionBuilder';\n\nimport { getExpressionTestIds } from './Expression.test-ids';\nimport type { ExpressionProps } from './Expression.types';\nimport { StyledCodeEditor, StyledFlex } from './Expression.styles';\nimport ExpressionBuilderModal from './ExpressionBuilderModal';\n\nconst Expression = forwardRef(\n (\n {\n testId,\n label,\n labelHidden,\n readOnly,\n required,\n value,\n status,\n info,\n placeholder,\n additionalInfo,\n disabled,\n showExpBuilderIcon,\n onExpBuilderShowHandler,\n showExpressionBuilder,\n expressionBuilder,\n hideFormField = false,\n editorInput: { fetchSuggestions, handle, loading, onChange, onBlur, inLineErrors },\n id,\n ...restProps\n }: PropsWithoutRef<ExpressionProps>,\n ref: ExpressionProps['ref']\n ) => {\n const textElRef = useRef<HTMLInputElement>(null);\n const popOverReference = useRef<HTMLDivElement>(null);\n const codeEditorHandle = useRef<EditorState>(null);\n const expressionRef = useRef<HTMLDivElement>(null);\n const t = useI18n();\n\n const testIds = useTestIds(testId, getExpressionTestIds);\n\n const getExpression = () => {\n return codeEditorHandle.current?.getValue() || '';\n };\n\n const insertExpression = (\n expression: string,\n replaceContent?: boolean,\n customCursorPosition?: CustomPositionProps\n ) => {\n return codeEditorHandle.current?.insertText(\n expression ?? '',\n replaceContent ?? true,\n customCursorPosition\n );\n };\n\n useImperativeHandle(\n handle,\n () => ({\n getExpression,\n insertExpression\n }),\n [getExpression]\n );\n\n useImperativeHandle(\n ref,\n () => ({\n getTextElRef: () => textElRef.current,\n getPopOverRef: () => popOverReference.current,\n getExpressionRef: () => expressionRef.current\n }),\n []\n );\n\n const Comp = (\n <StyledFormControl\n container\n inline\n as={StyledFlex}\n status={status}\n readOnly={readOnly}\n disabled={disabled}\n ref={expressionRef}\n data-testid={testIds.root}\n >\n <StyledCodeEditor\n testId={testIds.expressionInput}\n isSingleLine\n fetchSuggestions={fetchSuggestions}\n codeEditorHandle={codeEditorHandle}\n defaultValue={value}\n loading={loading}\n readOnly={readOnly}\n onChange={onChange}\n onBlur={onBlur}\n inLineErrors={inLineErrors}\n autoCompleteTriggers={['.', '@', '#', ':', '(', ')']}\n editorConfigProps={{\n mode: 'expression',\n readOnly,\n placeholder\n }}\n aria-label={t('expression_input')}\n />\n {showExpBuilderIcon && (\n <ExpressionBuilderModal\n testId={testId}\n expressionBuilder={expressionBuilder}\n showExpressionBuilder={showExpressionBuilder}\n readOnly={readOnly}\n disabled={disabled}\n onExpBuilderShowHandler={onExpBuilderShowHandler}\n />\n )}\n </StyledFormControl>\n );\n\n return !hideFormField ? (\n <FormField\n {...restProps}\n label={label}\n labelHidden={labelHidden}\n required={required}\n readOnly={readOnly}\n status={status}\n info={info}\n disabled={disabled}\n additionalInfo={additionalInfo}\n id={id}\n >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n }\n);\n\nexport default withTestIds(Expression, getExpressionTestIds);\n"]}
@@ -1,4 +1,8 @@
1
- export declare const StyledFlex: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
1
+ export declare const StyledFlex: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").FlexProps>, import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const StyledModalContainer: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").FlexProps>, import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const StyledExpressionBuilder: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("../ExpressionBuilder").ExpressionBuilderProps> & {
4
+ getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["search", "explanation", "explain", "clear", "insert", "generate", "generated-expression", "describe-expression"]>;
5
+ }, import("styled-components").DefaultTheme, {}, never>;
2
6
  export declare const StyledCodeEditor: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("../ExpressionBuilder").CodeEditorProps> & {
3
7
  getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["error-popover", "error-message"]>;
4
8
  }, import("styled-components").DefaultTheme, {
@@ -1 +1 @@
1
- {"version":3,"file":"Expression.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Expression/Expression.styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,UAAU,yGA8BrB,CAAC;AAIH,eAAO,MAAM,gBAAgB;;;mBAAuC,OAAO;SAqBzE,CAAC"}
1
+ {"version":3,"file":"Expression.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Expression/Expression.styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,UAAU,kNA8BrB,CAAC;AAIH,eAAO,MAAM,oBAAoB,kNAQ/B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;uDAEnC,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;mBAAuC,OAAO;SAqBzE,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import styled, { css } from 'styled-components';
2
- import { defaultThemeProp } from '@pega/cosmos-react-core';
3
- import { CodeEditor } from '../ExpressionBuilder';
2
+ import { defaultThemeProp, Flex } from '@pega/cosmos-react-core';
3
+ import ExpressionBuilder, { CodeEditor } from '../ExpressionBuilder';
4
4
  const iconWidth = '3.75';
5
5
  const height = '3.75';
6
- export const StyledFlex = styled('div')(({ theme: { components: { 'form-control': { ':focus': { 'border-color': focusBorderColor, 'box-shadow': shadow } } }, base: { spacing } } }) => {
6
+ export const StyledFlex = styled(Flex)(({ theme: { components: { 'form-control': { ':focus': { 'border-color': focusBorderColor, 'box-shadow': shadow } } }, base: { spacing } } }) => {
7
7
  return css `
8
8
  &:focus-within {
9
9
  border-color: ${focusBorderColor};
@@ -26,6 +26,18 @@ export const StyledFlex = styled('div')(({ theme: { components: { 'form-control'
26
26
  `;
27
27
  });
28
28
  StyledFlex.defaultProps = defaultThemeProp;
29
+ export const StyledModalContainer = styled(Flex)(({ showEditorOnly }) => {
30
+ return css `
31
+ height: 30rem;
32
+ ${!showEditorOnly &&
33
+ css `
34
+ width: 72.5rem;
35
+ `}
36
+ `;
37
+ });
38
+ export const StyledExpressionBuilder = styled(ExpressionBuilder) `
39
+ padding-inline: 0;
40
+ `;
29
41
  export const StyledCodeEditor = styled(CodeEditor)(({ theme: { base: { spacing } }, isSingleLine }) => {
30
42
  return css `
31
43
  ${isSingleLine &&
@@ -1 +1 @@
1
- {"version":3,"file":"Expression.styles.js","sourceRoot":"","sources":["../../../src/components/Expression/Expression.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,SAAS,GAAG,MAAM,CAAC;AACzB,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EACvC,KAAK,EAAE,EACL,UAAU,EAAE,EACV,cAAc,EAAE,EACd,QAAQ,EAAE,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,EAAE,EACrE,EACF,EACD,IAAI,EAAE,EAAE,OAAO,EAAE,EAClB,EACF,EAAE,EAAE;IACH,OAAO,GAAG,CAAA;;sBAEU,gBAAgB;oBAClB,MAAM;;;;qBAIL,OAAO,MAAM,MAAM;yBACf,OAAO,MAAM,MAAM;;;oBAGxB,OAAO,MAAM,SAAS;wBAClB,OAAO,MAAM,SAAS;;;;;;;GAO3C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,CAA6B,CAAC,EAC9E,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,EAClB,EACD,YAAY,EACb,EAAE,EAAE;IACH,OAAO,GAAG,CAAA;MACN,YAAY;QACd,GAAG,CAAA;;;;;;2BAMoB,OAAO,MAAM,MAAM;;;uBAGvB,OAAO,MAAM,MAAM;;KAErC;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '@pega/cosmos-react-core';\n\nimport { CodeEditor } from '../ExpressionBuilder';\n\nconst iconWidth = '3.75';\nconst height = '3.75';\nexport const StyledFlex = styled('div')(({\n theme: {\n components: {\n 'form-control': {\n ':focus': { 'border-color': focusBorderColor, 'box-shadow': shadow }\n }\n },\n base: { spacing }\n }\n}) => {\n return css`\n &:focus-within {\n border-color: ${focusBorderColor};\n box-shadow: ${shadow};\n }\n & > input,\n & > button {\n height: calc(${spacing} * ${height});\n min-height: calc(${spacing} * ${height});\n }\n & > button {\n width: calc(${spacing} * ${iconWidth});\n min-width: calc(${spacing} * ${iconWidth});\n }\n & > input,\n & > input:focus:not([disabled]) {\n border: none;\n box-shadow: none;\n }\n `;\n});\n\nStyledFlex.defaultProps = defaultThemeProp;\n\nexport const StyledCodeEditor = styled(CodeEditor)<{ isSingleLine?: boolean }>(({\n theme: {\n base: { spacing }\n },\n isSingleLine\n}) => {\n return css`\n ${isSingleLine &&\n css`\n .CodeMirror {\n border: none;\n }\n .react-codemirror2,\n .CodeMirror-lines {\n min-height: calc(${spacing} * ${height});\n }\n .CodeMirror-lines {\n height: calc(${spacing} * ${height});\n }\n `}\n `;\n});\n\nStyledCodeEditor.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"Expression.styles.js","sourceRoot":"","sources":["../../../src/components/Expression/Expression.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,iBAAiB,EAAE,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAErE,MAAM,SAAS,GAAG,MAAM,CAAC;AACzB,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EACtC,KAAK,EAAE,EACL,UAAU,EAAE,EACV,cAAc,EAAE,EACd,QAAQ,EAAE,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,EAAE,EACrE,EACF,EACD,IAAI,EAAE,EAAE,OAAO,EAAE,EAClB,EACF,EAAE,EAAE;IACH,OAAO,GAAG,CAAA;;sBAEU,gBAAgB;oBAClB,MAAM;;;;qBAIL,OAAO,MAAM,MAAM;yBACf,OAAO,MAAM,MAAM;;;oBAGxB,OAAO,MAAM,SAAS;wBAClB,OAAO,MAAM,SAAS;;;;;;;GAO3C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE3C,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE;IACtE,OAAO,GAAG,CAAA;;MAEN,CAAC,cAAc;QACjB,GAAG,CAAA;;KAEF;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAA;;CAE/D,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,CAA6B,CAAC,EAC9E,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,EAClB,EACD,YAAY,EACb,EAAE,EAAE;IACH,OAAO,GAAG,CAAA;MACN,YAAY;QACd,GAAG,CAAA;;;;;;2BAMoB,OAAO,MAAM,MAAM;;;uBAGvB,OAAO,MAAM,MAAM;;KAErC;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp, Flex } from '@pega/cosmos-react-core';\n\nimport ExpressionBuilder, { CodeEditor } from '../ExpressionBuilder';\n\nconst iconWidth = '3.75';\nconst height = '3.75';\nexport const StyledFlex = styled(Flex)(({\n theme: {\n components: {\n 'form-control': {\n ':focus': { 'border-color': focusBorderColor, 'box-shadow': shadow }\n }\n },\n base: { spacing }\n }\n}) => {\n return css`\n &:focus-within {\n border-color: ${focusBorderColor};\n box-shadow: ${shadow};\n }\n & > input,\n & > button {\n height: calc(${spacing} * ${height});\n min-height: calc(${spacing} * ${height});\n }\n & > button {\n width: calc(${spacing} * ${iconWidth});\n min-width: calc(${spacing} * ${iconWidth});\n }\n & > input,\n & > input:focus:not([disabled]) {\n border: none;\n box-shadow: none;\n }\n `;\n});\n\nStyledFlex.defaultProps = defaultThemeProp;\n\nexport const StyledModalContainer = styled(Flex)(({ showEditorOnly }) => {\n return css`\n height: 30rem;\n ${!showEditorOnly &&\n css`\n width: 72.5rem;\n `}\n `;\n});\n\nexport const StyledExpressionBuilder = styled(ExpressionBuilder)`\n padding-inline: 0;\n`;\n\nexport const StyledCodeEditor = styled(CodeEditor)<{ isSingleLine?: boolean }>(({\n theme: {\n base: { spacing }\n },\n isSingleLine\n}) => {\n return css`\n ${isSingleLine &&\n css`\n .CodeMirror {\n border: none;\n }\n .react-codemirror2,\n .CodeMirror-lines {\n min-height: calc(${spacing} * ${height});\n }\n .CodeMirror-lines {\n height: calc(${spacing} * ${height});\n }\n `}\n `;\n});\n\nStyledCodeEditor.defaultProps = defaultThemeProp;\n"]}
@@ -1,2 +1,3 @@
1
1
  export declare const getExpressionTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["expression-input", "expression-menu-popover", "expression-builder-error-banner", "progress-builder"]>;
2
+ export declare const getExpressionBuilderGearTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["expression-builder-modal", "open-expression-builder", "expression-modal-cancel", "expression-modal-submit"]>;
2
3
  //# sourceMappingURL=Expression.test-ids.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Expression.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/Expression/Expression.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,2OAKtB,CAAC"}
1
+ {"version":3,"file":"Expression.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/Expression/Expression.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,2OAKtB,CAAC;AAEZ,eAAO,MAAM,+BAA+B,kPAKjC,CAAC"}
@@ -5,4 +5,10 @@ export const getExpressionTestIds = createTestIds('expression', [
5
5
  'expression-builder-error-banner',
6
6
  'progress-builder'
7
7
  ]);
8
+ export const getExpressionBuilderGearTestIds = createTestIds('expression-builder-gear', [
9
+ 'expression-builder-modal',
10
+ 'open-expression-builder',
11
+ 'expression-modal-cancel',
12
+ 'expression-modal-submit'
13
+ ]);
8
14
  //# sourceMappingURL=Expression.test-ids.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Expression.test-ids.js","sourceRoot":"","sources":["../../../src/components/Expression/Expression.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAC,YAAY,EAAE;IAC9D,kBAAkB;IAClB,yBAAyB;IACzB,iCAAiC;IACjC,kBAAkB;CACV,CAAC,CAAC","sourcesContent":["import { createTestIds } from '@pega/cosmos-react-core';\n\nexport const getExpressionTestIds = createTestIds('expression', [\n 'expression-input',\n 'expression-menu-popover',\n 'expression-builder-error-banner',\n 'progress-builder'\n] as const);\n"]}
1
+ {"version":3,"file":"Expression.test-ids.js","sourceRoot":"","sources":["../../../src/components/Expression/Expression.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAC,YAAY,EAAE;IAC9D,kBAAkB;IAClB,yBAAyB;IACzB,iCAAiC;IACjC,kBAAkB;CACV,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,+BAA+B,GAAG,aAAa,CAAC,yBAAyB,EAAE;IACtF,0BAA0B;IAC1B,yBAAyB;IACzB,yBAAyB;IACzB,yBAAyB;CACjB,CAAC,CAAC","sourcesContent":["import { createTestIds } from '@pega/cosmos-react-core';\n\nexport const getExpressionTestIds = createTestIds('expression', [\n 'expression-input',\n 'expression-menu-popover',\n 'expression-builder-error-banner',\n 'progress-builder'\n] as const);\n\nexport const getExpressionBuilderGearTestIds = createTestIds('expression-builder-gear', [\n 'expression-builder-modal',\n 'open-expression-builder',\n 'expression-modal-cancel',\n 'expression-modal-submit'\n] as const);\n"]}