@pega/dx-component-builder-sdk 23.1.13 → 23.1.15

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 (342) hide show
  1. package/README.md +4 -4
  2. package/package.json +1 -1
  3. package/src/cli.js +6 -0
  4. package/src/constants.js +10 -0
  5. package/src/tasks/build-jest-assets/index.js +153 -0
  6. package/src/tasks/create/templates/Constellation/field/Boolean/Boolean.ts.mustache +35 -0
  7. package/src/tasks/create/templates/Constellation/field/Boolean/demo.stories.tsx.mustache +71 -0
  8. package/src/tasks/create/templates/Constellation/field/Boolean/index.tsx.mustache +11 -48
  9. package/src/tasks/create/templates/Constellation/field/Boolean/mock.ts.mustache +2 -1
  10. package/src/tasks/create/templates/Constellation/field/Boolean/styles.ts.mustache +7 -14
  11. package/{tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/DateFormatter.js → src/tasks/create/templates/Constellation/field/Date/DateFormatter.ts.mustache} +6 -6
  12. package/src/tasks/create/templates/Constellation/field/Date/FormattedText.tsx.mustache +20 -0
  13. package/src/tasks/create/templates/Constellation/field/Date/{date.js.mustache → date.ts.mustache} +3 -2
  14. package/src/tasks/create/templates/Constellation/field/Date/demo.stories.tsx.mustache +31 -24
  15. package/src/tasks/create/templates/Constellation/field/Date/index.tsx.mustache +19 -60
  16. package/src/tasks/create/templates/Constellation/field/Date/mock.ts.mustache +2 -1
  17. package/src/tasks/create/templates/Constellation/field/Date/styles.ts.mustache +7 -14
  18. package/src/tasks/create/templates/Constellation/field/DateTime/{date-time.js.mustache → date-time.ts.mustache} +12 -12
  19. package/{tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/time-of-day.js → src/tasks/create/templates/Constellation/field/DateTime/date-utils.ts.mustache} +27 -26
  20. package/{tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/date.js → src/tasks/create/templates/Constellation/field/DateTime/date.ts.mustache} +1 -0
  21. package/src/tasks/create/templates/Constellation/field/DateTime/demo.stories.tsx.mustache +32 -25
  22. package/src/tasks/create/templates/Constellation/field/DateTime/index.tsx.mustache +13 -60
  23. package/src/tasks/create/templates/Constellation/field/DateTime/mock.ts.mustache +3 -1
  24. package/src/tasks/create/templates/Constellation/field/DateTime/styles.ts.mustache +7 -14
  25. package/src/tasks/create/templates/Constellation/field/Decimal/demo.stories.tsx.mustache +25 -13
  26. package/src/tasks/create/templates/Constellation/field/Decimal/index.tsx.mustache +15 -68
  27. package/src/tasks/create/templates/Constellation/field/Decimal/mock.ts.mustache +9 -1
  28. package/src/tasks/create/templates/Constellation/field/Decimal/styles.ts.mustache +7 -14
  29. package/src/tasks/create/templates/Constellation/field/Decimal-Currency/demo.stories.tsx.mustache +28 -15
  30. package/src/tasks/create/templates/Constellation/field/Decimal-Currency/index.tsx.mustache +24 -76
  31. package/src/tasks/create/templates/Constellation/field/Decimal-Currency/mock.ts.mustache +11 -1
  32. package/src/tasks/create/templates/Constellation/field/Decimal-Currency/styles.ts.mustache +7 -14
  33. package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/demo.stories.tsx.mustache +25 -12
  34. package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/index.tsx.mustache +14 -55
  35. package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/mock.ts.mustache +9 -2
  36. package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/styles.ts.mustache +7 -14
  37. package/src/tasks/create/templates/Constellation/field/Integer/demo.stories.tsx.mustache +25 -12
  38. package/src/tasks/create/templates/Constellation/field/Integer/index.tsx.mustache +24 -88
  39. package/src/tasks/create/templates/Constellation/field/Integer/mock.ts.mustache +8 -2
  40. package/src/tasks/create/templates/Constellation/field/Integer/styles.ts.mustache +7 -14
  41. package/src/tasks/create/templates/Constellation/field/Picklist/demo.stories.tsx.mustache +25 -12
  42. package/src/tasks/create/templates/Constellation/field/Picklist/index.tsx.mustache +13 -61
  43. package/src/tasks/create/templates/Constellation/field/Picklist/mock.ts.mustache +9 -1
  44. package/src/tasks/create/templates/Constellation/field/Picklist/styles.ts.mustache +7 -14
  45. package/{tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/date.js → src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/date.ts.mustache} +2 -1
  46. package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/demo.stories.tsx.mustache +26 -14
  47. package/{tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/embed-utils.js → src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/embed-utils.ts.mustache} +2 -1
  48. package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/index.tsx.mustache +15 -76
  49. package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/mock.ts.mustache +8 -1
  50. package/{tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/picklist-utils.js → src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/picklist-utils.ts.mustache} +1 -0
  51. package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/{repeat-constants.js.mustache → repeat-constants.ts.mustache} +1 -1
  52. package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/{repeat-utils.js.mustache → repeat-utils.ts.mustache} +6 -12
  53. package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/styles.ts.mustache +7 -14
  54. package/src/tasks/create/templates/Constellation/field/{Picklist-RadioButtons/textformat-utils.jsx.mustache → Picklist-Autocomplete/textformat-utils.tsx.mustache} +30 -10
  55. package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/utils.ts.mustache +1 -1
  56. package/src/tasks/create/templates/Constellation/field/Picklist-RadioButtons/demo.stories.tsx.mustache +25 -13
  57. package/src/tasks/create/templates/Constellation/field/Picklist-RadioButtons/index.tsx.mustache +11 -58
  58. package/src/tasks/create/templates/Constellation/field/Picklist-RadioButtons/mock.ts.mustache +9 -1
  59. package/src/tasks/create/templates/Constellation/field/Picklist-RadioButtons/styles.ts.mustache +7 -14
  60. package/src/tasks/create/templates/Constellation/field/{Picklist-Autocomplete/textformat-utils.jsx.mustache → Picklist-RadioButtons/textformat-utils.tsx.mustache} +1 -0
  61. package/src/tasks/create/templates/Constellation/field/Text/demo.stories.tsx.mustache +23 -9
  62. package/src/tasks/create/templates/Constellation/field/Text/index.tsx.mustache +4 -22
  63. package/src/tasks/create/templates/Constellation/field/Text/mock.ts.mustache +8 -1
  64. package/src/tasks/create/templates/Constellation/field/Text/styles.ts.mustache +7 -14
  65. package/src/tasks/create/templates/Constellation/field/Text-Email/demo.stories.tsx.mustache +24 -11
  66. package/src/tasks/create/templates/Constellation/field/Text-Email/index.tsx.mustache +10 -47
  67. package/src/tasks/create/templates/Constellation/field/Text-Email/mock.ts.mustache +8 -1
  68. package/src/tasks/create/templates/Constellation/field/Text-Email/styles.ts.mustache +7 -14
  69. package/src/tasks/create/templates/Constellation/field/Text-Input/StatusWork.tsx +3 -9
  70. package/src/tasks/create/templates/Constellation/field/Text-Input/demo.stories.tsx.mustache +24 -11
  71. package/src/tasks/create/templates/Constellation/field/Text-Input/index.tsx.mustache +11 -51
  72. package/src/tasks/create/templates/Constellation/field/Text-Input/mock.ts.mustache +9 -1
  73. package/src/tasks/create/templates/Constellation/field/Text-Input/styles.ts.mustache +7 -14
  74. package/src/tasks/create/templates/Constellation/field/Text-Paragraph/demo.stories.tsx.mustache +24 -11
  75. package/src/tasks/create/templates/Constellation/field/Text-Paragraph/index.tsx.mustache +13 -49
  76. package/src/tasks/create/templates/Constellation/field/Text-Paragraph/mock.ts.mustache +9 -1
  77. package/src/tasks/create/templates/Constellation/field/Text-Paragraph/styles.ts.mustache +7 -14
  78. package/src/tasks/create/templates/Constellation/field/Text-Phone/demo.stories.tsx.mustache +25 -11
  79. package/src/tasks/create/templates/Constellation/field/Text-Phone/index.tsx.mustache +14 -53
  80. package/src/tasks/create/templates/Constellation/field/Text-Phone/mock.ts.mustache +9 -1
  81. package/src/tasks/create/templates/Constellation/field/Text-Phone/styles.ts.mustache +7 -14
  82. package/src/tasks/create/templates/Constellation/field/Text-URL/demo.stories.tsx.mustache +24 -11
  83. package/src/tasks/create/templates/Constellation/field/Text-URL/index.tsx.mustache +15 -71
  84. package/src/tasks/create/templates/Constellation/field/Text-URL/mock.ts.mustache +9 -1
  85. package/src/tasks/create/templates/Constellation/field/Text-URL/styles.ts.mustache +7 -14
  86. package/src/tasks/create/templates/Constellation/field/Text-URL/{text-url.jsx.mustache → text-url.tsx.mustache} +4 -3
  87. package/src/tasks/create/templates/Constellation/field/TimeOfDay/demo.stories.tsx.mustache +28 -22
  88. package/src/tasks/create/templates/Constellation/field/TimeOfDay/index.tsx.mustache +17 -53
  89. package/src/tasks/create/templates/Constellation/field/TimeOfDay/mock.ts.mustache +2 -1
  90. package/src/tasks/create/templates/Constellation/field/TimeOfDay/styles.ts.mustache +7 -14
  91. package/{tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/date-utils.js → src/tasks/create/templates/Constellation/field/TimeOfDay/time-of-day.ts.mustache} +24 -23
  92. package/src/tasks/create/templates/Constellation/template/DETAILS/StatusWork.tsx.mustache +17 -19
  93. package/src/tasks/create/templates/Constellation/template/DETAILS/demo.stories.tsx.mustache +19 -8
  94. package/src/tasks/create/templates/Constellation/template/DETAILS/index.tsx.mustache +4 -17
  95. package/src/tasks/create/templates/Constellation/template/DETAILS/styles.ts.mustache +7 -14
  96. package/src/tasks/create/templates/Constellation/template/DETAILS-region/StatusWork.tsx.mustache +17 -19
  97. package/src/tasks/create/templates/Constellation/template/DETAILS-region/demo.stories.tsx.mustache +17 -8
  98. package/src/tasks/create/templates/Constellation/template/DETAILS-region/index.tsx.mustache +5 -19
  99. package/src/tasks/create/templates/Constellation/template/DETAILS-region/styles.ts.mustache +7 -14
  100. package/src/tasks/create/templates/Constellation/template/DETAILS-region/{utils.js.mustache → utils.ts.mustache} +15 -13
  101. package/src/tasks/create/templates/Constellation/template/FORM/demo.stories.tsx.mustache +18 -8
  102. package/src/tasks/create/templates/Constellation/template/FORM/index.tsx.mustache +5 -13
  103. package/src/tasks/create/templates/Constellation/template/FORM/styles.ts.mustache +7 -14
  104. package/src/tasks/create/templates/Constellation/template/FORM-region/demo.stories.tsx.mustache +17 -7
  105. package/src/tasks/create/templates/Constellation/template/FORM-region/index.tsx.mustache +4 -10
  106. package/src/tasks/create/templates/Constellation/template/FORM-region/styles.ts.mustache +7 -14
  107. package/src/tasks/create/templates/Constellation/template/PAGE/demo.stories.tsx.mustache +14 -8
  108. package/src/tasks/create/templates/Constellation/template/PAGE/index.tsx.mustache +5 -16
  109. package/src/tasks/create/templates/Constellation/template/PAGE/styles.ts.mustache +7 -14
  110. package/{tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/utils.js → src/tasks/create/templates/Constellation/template/PAGE/utils.ts.mustache} +28 -14
  111. package/src/tasks/create/templates/Constellation/widget/CASE/demo.stories.tsx.mustache +13 -7
  112. package/src/tasks/create/templates/Constellation/widget/CASE/index.tsx.mustache +3 -10
  113. package/src/tasks/create/templates/Constellation/widget/CASE/styles.ts.mustache +7 -14
  114. package/src/tasks/create/templates/Constellation/widget/PAGE/demo.stories.tsx.mustache +18 -13
  115. package/src/tasks/create/templates/Constellation/widget/PAGE/index.tsx.mustache +4 -18
  116. package/src/tasks/create/templates/Constellation/widget/PAGE/styles.ts.mustache +7 -14
  117. package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/Avatar.tsx.mustache +3 -13
  118. package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/Operator.tsx.mustache +5 -20
  119. package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/demo.stories.tsx.mustache +15 -9
  120. package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/index.tsx.mustache +24 -39
  121. package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/styles.ts.mustache +7 -14
  122. package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/page-case.component.ts.mustache +7 -5
  123. package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +104 -25
  124. package/src/tasks/create/templates/SDK-React/field/DateTime/demo.stories.tsx.mustache +8 -1
  125. package/src/tasks/create/templates/SDK-React/field/Decimal/config.json.mustache +155 -0
  126. package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +15 -12
  127. package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +10 -16
  128. package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/demo.stories.tsx.mustache +20 -0
  129. package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +41 -36
  130. package/src/tasks/create/templates/SDK-React/template/DETAILS/demo.stories.tsx.mustache +10 -0
  131. package/src/tasks/create/templates/SDK-React/template/DETAILS-region/demo.stories.tsx.mustache +17 -3
  132. package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +3 -3
  133. package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/demo.stories.tsx.mustache +7 -0
  134. package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/index.tsx.mustache +5 -3
  135. package/src/tasks/index.js +1 -0
  136. package/src/tasks/map/map.js +29 -8
  137. package/src/tasks/publish/index.js +3 -1
  138. package/src/tasks/publish-all/index.js +7 -5
  139. package/src/util.js +7 -0
  140. package/tests/assets/sdk-r/components/create/_components.md +6 -0
  141. package/tests/assets/sdk-r/components/create/custom-constellation/field/Pega_DXIL_MyTestText/demo.stories.tsx +23 -9
  142. package/tests/assets/sdk-r/components/create/custom-constellation/field/Pega_DXIL_MyTestText/index.tsx +4 -22
  143. package/tests/assets/sdk-r/components/create/custom-constellation/field/Pega_DXIL_MyTestText/mock.ts +8 -1
  144. package/tests/assets/sdk-r/components/create/custom-constellation/field/Pega_DXIL_MyTestText/styles.ts +7 -14
  145. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +2 -2
  146. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +10 -4
  147. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/Operator/Operator.tsx +5 -3
  148. package/tests/assets/sdk-r/components/create/override-sdk/field/CancelAlert/CancelAlert.tsx +95 -78
  149. package/tests/assets/sdk-r/components/create/override-sdk/field/Checkbox/Checkbox.tsx +104 -24
  150. package/tests/assets/sdk-r/components/create/override-sdk/field/Currency/Currency.tsx +10 -16
  151. package/tests/assets/sdk-r/components/create/override-sdk/field/Decimal/Decimal.tsx +18 -13
  152. package/tests/assets/sdk-r/components/create/override-sdk/field/Group/Group.tsx +2 -0
  153. package/tests/assets/sdk-r/components/create/override-sdk/field/Multiselect/Multiselect.tsx +244 -0
  154. package/tests/assets/sdk-r/components/create/override-sdk/field/Multiselect/index.tsx +1 -0
  155. package/tests/assets/sdk-r/components/create/override-sdk/field/Multiselect/utils.ts +230 -0
  156. package/tests/assets/sdk-r/components/create/override-sdk/field/Percentage/Percentage.tsx +41 -36
  157. package/tests/assets/sdk-r/components/create/override-sdk/field/RichText/RichText.tsx +2 -2
  158. package/tests/assets/sdk-r/components/create/override-sdk/infra/Assignment/Assignment.tsx +21 -7
  159. package/tests/assets/sdk-r/components/create/override-sdk/infra/NavBar/NavBar.tsx +6 -4
  160. package/tests/assets/sdk-r/components/create/override-sdk/template/CaseSummary/CaseSummary.tsx +43 -1
  161. package/tests/assets/sdk-r/components/create/override-sdk/template/CaseView/CaseView.tsx +1 -1
  162. package/tests/assets/sdk-r/components/create/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +34 -1
  163. package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/ListView.tsx +8 -7
  164. package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/utils.ts +3 -1
  165. package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +32 -16
  166. package/tests/assets/sdk-r/components/create/override-sdk/template/WideNarrow/WideNarrow.tsx +1 -1
  167. package/tests/assets/sdk-r/components/create/override-sdk/template/WssNavBar/WssNavBar.tsx +4 -1
  168. package/tests/assets/sdk-r/components/create/override-sdk/widget/Attachment/Attachment.tsx +12 -2
  169. package/tests/assets/sdk-r/components/create/override-sdk/widget/QuickCreate/QuickCreate.tsx +52 -25
  170. package/tests/assets/sdk-r/components/createAll/_components.md +6 -0
  171. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/Boolean.ts +35 -0
  172. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/{demo.stories.jsx → demo.stories.tsx} +28 -20
  173. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/index.tsx +11 -48
  174. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/mock.ts +2 -1
  175. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/styles.ts +7 -14
  176. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/demo.stories.tsx +28 -15
  177. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/index.tsx +24 -76
  178. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/mock.ts +11 -1
  179. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/styles.ts +7 -14
  180. package/{src/tasks/create/templates/Constellation/field/Date/DateFormatter.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/DateFormatter.ts} +6 -6
  181. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/FormattedText.tsx +20 -0
  182. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/{date.js → date.ts} +3 -2
  183. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/demo.stories.tsx +31 -24
  184. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/index.tsx +19 -60
  185. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/mock.ts +2 -1
  186. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/styles.ts +7 -14
  187. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/{date-time.js → date-time.ts} +12 -12
  188. package/{src/tasks/create/templates/Constellation/field/TimeOfDay/time-of-day.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/date-utils.ts} +27 -26
  189. package/{src/tasks/create/templates/Constellation/field/DateTime/date.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/date.ts} +1 -0
  190. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/demo.stories.tsx +32 -25
  191. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/index.tsx +13 -60
  192. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/mock.ts +3 -1
  193. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/styles.ts +7 -14
  194. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/demo.stories.tsx +25 -13
  195. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/index.tsx +15 -68
  196. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/mock.ts +9 -1
  197. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/styles.ts +7 -14
  198. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/demo.stories.tsx +24 -11
  199. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/index.tsx +10 -47
  200. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/mock.ts +8 -1
  201. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/styles.ts +7 -14
  202. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/demo.stories.tsx +25 -12
  203. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/index.tsx +24 -88
  204. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/mock.ts +8 -2
  205. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/styles.ts +7 -14
  206. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/demo.stories.tsx +24 -11
  207. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/index.tsx +13 -49
  208. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/mock.ts +9 -1
  209. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/styles.ts +7 -14
  210. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/demo.stories.tsx +25 -12
  211. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/index.tsx +14 -55
  212. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/mock.ts +9 -2
  213. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/styles.ts +7 -14
  214. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPhone/demo.stories.tsx +25 -11
  215. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPhone/index.tsx +14 -53
  216. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPhone/mock.ts +9 -1
  217. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPhone/styles.ts +7 -14
  218. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/demo.stories.tsx +25 -12
  219. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/index.tsx +13 -61
  220. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/mock.ts +9 -1
  221. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/styles.ts +7 -14
  222. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/demo.stories.tsx +25 -13
  223. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/index.tsx +11 -58
  224. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/mock.ts +9 -1
  225. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/styles.ts +7 -14
  226. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/{Pega_DXIL_MySearchbox/textformat-utils.jsx → Pega_DXIL_MyRadiobuttons/textformat-utils.tsx} +1 -0
  227. package/{src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/date.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/date.ts} +2 -1
  228. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/demo.stories.tsx +26 -14
  229. package/{src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/embed-utils.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/embed-utils.ts} +2 -1
  230. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/index.tsx +15 -76
  231. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/mock.ts +8 -1
  232. package/{src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/picklist-utils.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/picklist-utils.ts} +1 -0
  233. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/{repeat-constants.js → repeat-constants.ts} +1 -1
  234. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/{repeat-utils.js → repeat-utils.ts} +6 -12
  235. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/styles.ts +7 -14
  236. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/{Pega_DXIL_MyRadiobuttons/textformat-utils.jsx → Pega_DXIL_MySearchbox/textformat-utils.tsx} +30 -10
  237. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/utils.ts +1 -1
  238. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyText/demo.stories.tsx +23 -9
  239. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyText/index.tsx +4 -22
  240. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyText/mock.ts +8 -1
  241. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyText/styles.ts +7 -14
  242. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/StatusWork.tsx +3 -9
  243. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/demo.stories.tsx +24 -11
  244. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/index.tsx +11 -51
  245. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/mock.ts +9 -1
  246. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/styles.ts +7 -14
  247. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +28 -22
  248. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/index.tsx +17 -53
  249. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/mock.ts +2 -1
  250. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/styles.ts +7 -14
  251. package/{src/tasks/create/templates/Constellation/field/DateTime/date-utils.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/time-of-day.ts} +24 -23
  252. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyURL/demo.stories.tsx +24 -11
  253. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyURL/index.tsx +15 -71
  254. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyURL/mock.ts +9 -1
  255. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyURL/styles.ts +7 -14
  256. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyURL/{text-url.jsx → text-url.tsx} +4 -3
  257. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/StatusWork.tsx +17 -19
  258. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/demo.stories.tsx +19 -8
  259. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/index.tsx +4 -17
  260. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/styles.ts +7 -14
  261. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyForm/demo.stories.tsx +18 -8
  262. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyForm/index.tsx +5 -13
  263. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyForm/styles.ts +7 -14
  264. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/demo.stories.tsx +14 -8
  265. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/index.tsx +5 -16
  266. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/styles.ts +7 -14
  267. package/{src/tasks/create/templates/Constellation/template/PAGE/utils.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/utils.ts} +28 -14
  268. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +17 -19
  269. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +17 -8
  270. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +5 -19
  271. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/styles.ts +7 -14
  272. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/{utils.js → utils.ts} +15 -13
  273. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +17 -7
  274. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnForm/index.tsx +4 -10
  275. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnForm/styles.ts +7 -14
  276. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/demo.stories.tsx +13 -7
  277. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/index.tsx +3 -10
  278. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/styles.ts +7 -14
  279. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +3 -13
  280. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/Operator.tsx +5 -20
  281. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +15 -9
  282. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/index.tsx +24 -39
  283. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/styles.ts +7 -14
  284. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/demo.stories.tsx +18 -13
  285. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/index.tsx +4 -18
  286. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/styles.ts +7 -14
  287. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +104 -25
  288. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +10 -16
  289. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/demo.stories.tsx +8 -1
  290. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/config.json +155 -0
  291. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +15 -12
  292. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/demo.stories.tsx +20 -0
  293. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +41 -36
  294. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/demo.stories.tsx +10 -0
  295. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +17 -3
  296. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/index.tsx +3 -3
  297. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +7 -0
  298. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/index.tsx +5 -3
  299. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +2 -2
  300. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +10 -4
  301. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/Operator/Operator.tsx +5 -3
  302. package/tests/assets/sdk-r/components/createAll/override-sdk/field/CancelAlert/CancelAlert.tsx +95 -78
  303. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Checkbox/Checkbox.tsx +104 -24
  304. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Currency/Currency.tsx +10 -16
  305. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Decimal/Decimal.tsx +18 -13
  306. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Group/Group.tsx +2 -0
  307. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Multiselect/Multiselect.tsx +244 -0
  308. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Multiselect/index.tsx +1 -0
  309. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Multiselect/utils.ts +230 -0
  310. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Percentage/Percentage.tsx +41 -36
  311. package/tests/assets/sdk-r/components/createAll/override-sdk/field/RichText/RichText.tsx +2 -2
  312. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Assignment/Assignment.tsx +21 -7
  313. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/NavBar/NavBar.tsx +6 -4
  314. package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseSummary/CaseSummary.tsx +43 -1
  315. package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseView/CaseView.tsx +1 -1
  316. package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +34 -1
  317. package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/ListView.tsx +8 -7
  318. package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/utils.ts +3 -1
  319. package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +32 -16
  320. package/tests/assets/sdk-r/components/createAll/override-sdk/template/WideNarrow/WideNarrow.tsx +1 -1
  321. package/tests/assets/sdk-r/components/createAll/override-sdk/template/WssNavBar/WssNavBar.tsx +4 -1
  322. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Attachment/Attachment.tsx +12 -2
  323. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/QuickCreate/QuickCreate.tsx +52 -25
  324. package/src/tasks/create/templates/Constellation/field/Boolean/Boolean.js.mustache +0 -38
  325. package/src/tasks/create/templates/Constellation/field/Boolean/demo.stories.jsx.mustache +0 -63
  326. package/src/tasks/create/templates/Constellation/field/Date/FormattedText.jsx.mustache +0 -41
  327. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/Boolean.js +0 -38
  328. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/FormattedText.jsx +0 -41
  329. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/PConnProps.d.ts +0 -46
  330. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/demo.stories.tsx +0 -54
  331. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/index.tsx +0 -73
  332. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/mock.ts +0 -15
  333. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/styles.ts +0 -15
  334. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/config.json +0 -83
  335. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/demo.stories.tsx +0 -59
  336. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +0 -101
  337. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/mock.ts +0 -16
  338. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/styles.js +0 -7
  339. /package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/{component-constants.js → component-constants.ts} +0 -0
  340. /package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/{format-constants.js.mustache → format-constants.ts.mustache} +0 -0
  341. /package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/{component-constants.js → component-constants.ts} +0 -0
  342. /package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/{format-constants.js → format-constants.ts} +0 -0
@@ -1,63 +0,0 @@
1
- /* eslint-disable react/jsx-no-useless-fragment */
2
- // @ts-nocheck
3
- import { useState } from 'react';
4
- import { withKnobs } from '@storybook/addon-knobs';
5
-
6
- import { configProps, stateProps } from './mock';
7
-
8
- import {{COMPONENT_CLASS_NAME}} from './index';
9
-
10
- export default {
11
- title: '{{COMPONENT_CLASS_NAME}}',
12
- decorators: [withKnobs],
13
- component: {{COMPONENT_CLASS_NAME}}
14
- };
15
-
16
- export const Base{{COMPONENT_CLASS_NAME}} = () => {
17
-
18
- const [value, setValue] = useState(configProps.value);
19
-
20
- const props = {
21
- value,
22
- label: configProps.label,
23
- helperText: configProps.helperText,
24
- caption: configProps.caption,
25
- validatemessage: configProps.validatemessage,
26
- hideLabel: configProps.hideLabel,
27
- testId: configProps.testId,
28
- additionalProps: configProps.additionalProps,
29
- displayMode: configProps.displayMode,
30
- variant: configProps.variant,
31
- trueLabel: configProps.trueLabel,
32
- falseLabel: configProps.falseLabel,
33
- disabled: configProps.disabled,
34
- readOnly: configProps.readOnly,
35
- required: configProps.required,
36
- getPConnect: () => {
37
- return {
38
- getStateProps: () => {
39
- return stateProps;
40
- },
41
- getActionsApi: () => {
42
- return {
43
- updateFieldValue: (propName, theValue) => {
44
- setValue(theValue);
45
- },
46
- triggerFieldChange: () => { /* nothing */}
47
- };
48
- },
49
- getValidationApi: () => {
50
- return {
51
- validate: () => { /* nothing */}
52
- };
53
- }
54
- };
55
- }
56
- };
57
-
58
- return (
59
- <>
60
- <{{COMPONENT_CLASS_NAME}} {...props} />
61
- </>
62
- );
63
- };
@@ -1,41 +0,0 @@
1
- import { FieldValueList } from '@pega/cosmos-react-core';
2
- import PropTypes from 'prop-types';
3
-
4
- import { format } from './date.js';
5
-
6
- export default function FormattedText(props) {
7
- const { formatType, label, value, testId, hideLabel, variant, additionalProps } = props;
8
-
9
- let text = value;
10
-
11
- text = format(text, formatType, additionalProps);
12
-
13
- const fields = [
14
- {
15
- id: label.toLowerCase(),
16
- name: hideLabel ? '' : label,
17
- value: text
18
- }
19
- ];
20
- return <FieldValueList variant={variant} fields={fields} data-testid={testId} />;
21
- }
22
-
23
- FormattedText.defaultProps = {
24
- formatType: 'none',
25
- variant: 'stacked',
26
- value: undefined,
27
- label: '',
28
- testId: null,
29
- hideLabel: false,
30
- additionalProps: {}
31
- };
32
-
33
- FormattedText.propTypes = {
34
- formatType: PropTypes.string,
35
- variant: PropTypes.oneOf(['inline', 'stacked']),
36
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),
37
- label: PropTypes.string,
38
- testId: PropTypes.string,
39
- additionalProps: PropTypes.objectOf(PropTypes.any),
40
- hideLabel: PropTypes.bool
41
- };
@@ -1,38 +0,0 @@
1
- function Boolean(value, { allowEmpty = true, tick = "", cross = "" } = {}) {
2
- if (
3
- (!allowEmpty && !value) ||
4
- value === false ||
5
- value?.toString()?.toLowerCase() === "false" ||
6
- value === 0 ||
7
- value === "0"
8
- ) {
9
- return cross || "";
10
- }
11
- if (
12
- value === true ||
13
- value?.toString()?.toLowerCase() === "true" ||
14
- value === 1 ||
15
- value === "1"
16
- ) {
17
- return tick || "";
18
- }
19
- if (
20
- allowEmpty &&
21
- (value === "null" ||
22
- value === "" ||
23
- value === null ||
24
- typeof value === "undefined")
25
- ) {
26
- return "––";
27
- }
28
- return value;
29
- }
30
-
31
- export default {
32
- TrueFalse: (value, options) =>
33
- Boolean(value, {
34
- ...options,
35
- tick: "True",
36
- cross: "False"
37
- })
38
- };
@@ -1,41 +0,0 @@
1
- import { FieldValueList } from '@pega/cosmos-react-core';
2
- import PropTypes from 'prop-types';
3
-
4
- import { format } from './date.js';
5
-
6
- export default function FormattedText(props) {
7
- const { formatType, label, value, testId, hideLabel, variant, additionalProps } = props;
8
-
9
- let text = value;
10
-
11
- text = format(text, formatType, additionalProps);
12
-
13
- const fields = [
14
- {
15
- id: label.toLowerCase(),
16
- name: hideLabel ? '' : label,
17
- value: text
18
- }
19
- ];
20
- return <FieldValueList variant={variant} fields={fields} data-testid={testId} />;
21
- }
22
-
23
- FormattedText.defaultProps = {
24
- formatType: 'none',
25
- variant: 'stacked',
26
- value: undefined,
27
- label: '',
28
- testId: null,
29
- hideLabel: false,
30
- additionalProps: {}
31
- };
32
-
33
- FormattedText.propTypes = {
34
- formatType: PropTypes.string,
35
- variant: PropTypes.oneOf(['inline', 'stacked']),
36
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),
37
- label: PropTypes.string,
38
- testId: PropTypes.string,
39
- additionalProps: PropTypes.objectOf(PropTypes.any),
40
- hideLabel: PropTypes.bool
41
- };
@@ -1,46 +0,0 @@
1
- import {PConnect } from '@pega/pcore-pconnect-typedefs';
2
-
3
- // PConnProps.d.ts
4
- // This gives us a place to have each component (which is most DX Components) that is
5
- // expected to have a getPConnect extend its props (from BaseProps)
6
- // such that every component will be expected to have a getPConnect() function
7
- // that returns a PConnect object. (new/better way of doing .propTypes).
8
- // This PConnProps can be extended to include other props that we know are in every component
9
- export interface PConnProps {
10
- // getPConnect should exist for every C11n component. (add @ts-ignore in special cases where it isn't)
11
- getPConnect: () => typeof PConnect;
12
-
13
- // Allow any/all other key/value pairs in the BaseProps for now
14
- // TODO: refine which other props are always expected for various component
15
- // types and consider further interface "subclassing". For example, we may
16
- // want to create a "BasePropsForm" that gives guidance on required, readonly, etc.
17
- // and any other props that every Form component expects.
18
- // For example, see the PConnFieldProps below.
19
- // NOTE: if you uncomment the line below, the PConnProps type will allow
20
- // otherwise undefined types to appear. This can be helpful for debugging
21
- // or when adding new components whose types aren't yet known.
22
- // [key: string]: any;
23
- }
24
-
25
-
26
- // PConnFieldProps extends PConnProps to bring in the common properties that are
27
- // associated with most field components (ex: Dropdown, TextInput, etc.) in the
28
- // components/field directory
29
- export interface PConnFieldProps extends PConnProps {
30
- label: string,
31
- required: boolean,
32
- disabled: boolean,
33
- value: any,
34
- validatemessage: string,
35
- status?: string,
36
- onChange?: any,
37
- onBlur?: any,
38
- readOnly: boolean,
39
- testId: string,
40
- helperText: string,
41
- displayMode?: string,
42
- hideLabel: boolean,
43
- placeholder?: string,
44
- fieldMetadata?: any,
45
- additionalProps?: any
46
- }
@@ -1,54 +0,0 @@
1
-
2
- /* eslint-disable react/jsx-no-useless-fragment */
3
- // @ts-nocheck
4
- import { useState } from 'react';
5
- import { withKnobs } from '@storybook/addon-knobs';
6
-
7
- import { stateProps, configProps } from './mock';
8
-
9
- import PegaDxilMyTestText from './index';
10
-
11
- export default {
12
- title: 'PegaDxilMyTestText',
13
- decorators: [withKnobs],
14
- component: PegaDxilMyTestText
15
- };
16
-
17
- export const BasePegaDxilMyTestText = () => {
18
-
19
- const [value, setValue] = useState(configProps.value);
20
-
21
- const props = {
22
- value,
23
- placeholder: configProps.placeholder,
24
- label: configProps.label,
25
- testId: configProps.testId,
26
- hasSuggestions: configProps.hasSuggestions,
27
-
28
- getPConnect: () => {
29
- return {
30
- getStateProps: () => {
31
- return stateProps;
32
- },
33
- getActionsApi: () => {
34
- return {
35
- updateFieldValue: (propName, theValue) => {
36
- setValue(theValue);
37
- },
38
- triggerFieldChange: () => {/* nothing */}
39
- };
40
- },
41
- ignoreSuggestion: () => {/* nothing */},
42
- acceptSuggestion: () => {/* nothing */},
43
- setInheritedProps: () => {/* nothing */},
44
- resolveConfigProps: () => {/* nothing */}
45
- };
46
- }
47
- };
48
-
49
- return (
50
- <>
51
- <PegaDxilMyTestText {...props} />
52
- </>
53
- );
54
- };
@@ -1,73 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- import { Input } from '@pega/cosmos-react-core';
3
-
4
- import type { PConnFieldProps } from './PConnProps';
5
-
6
- import StyledPegaDxilMyTestTextWrapper from './styles';
7
-
8
- // interface for props
9
- interface PegaDxilMyTestTextProps extends PConnFieldProps {
10
- // If any, enter additional props that only exist on TextInput here
11
-
12
- }
13
-
14
- // interface for StateProps object
15
- interface StateProps {
16
- value: string;
17
- hasSuggestions: boolean;
18
- }
19
-
20
- // Duplicated runtime code from Constellation Design System Component
21
-
22
- // props passed in combination of props from property panel (config.json) and run time props from Constellation
23
- // any default values in config.pros should be set in defaultProps at bottom of this file
24
- export default function PegaDxilMyTestText(props: PegaDxilMyTestTextProps) {
25
- const { getPConnect, value, placeholder, disabled, readOnly, required, label, hideLabel, testId } = props;
26
-
27
- const pConn = getPConnect();
28
- const actions = pConn.getActionsApi();
29
- const stateProps = pConn.getStateProps() as StateProps;
30
- const propName: string = stateProps.value;
31
-
32
- const handleOnChange = (event: any) => {
33
- const { value: updatedValue } = event.target;
34
- actions.updateFieldValue(propName, updatedValue);
35
- };
36
-
37
- return (
38
- <StyledPegaDxilMyTestTextWrapper>
39
- <Input
40
- type='text'
41
- value={value}
42
- label={label}
43
- labelHidden={hideLabel}
44
- placeholder={placeholder}
45
- disabled={disabled}
46
- readOnly={readOnly}
47
- required={required}
48
- onChange={handleOnChange}
49
- testId={testId}
50
- />
51
- </StyledPegaDxilMyTestTextWrapper>
52
- );
53
- };
54
-
55
- PegaDxilMyTestText.defaultProps = {
56
- value: '',
57
- placeholder: '',
58
- disabled: false,
59
- readOnly: false,
60
- required: false,
61
- testId: ''
62
- };
63
-
64
- PegaDxilMyTestText.propTypes = {
65
- label: PropTypes.string,
66
- value: PropTypes.string,
67
- placeholder: PropTypes.string,
68
- getPConnect: PropTypes.func.isRequired,
69
- disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
70
- readOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
71
- required: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
72
- testId: PropTypes.string
73
- };
@@ -1,15 +0,0 @@
1
-
2
- // @ts-nocheck
3
- export const configProps = {
4
- value: '',
5
- label: 'Text Sample',
6
- placeholder: 'Text Placeholder',
7
- helperText: 'Text Helper Text',
8
- testId: 'Text-12345678',
9
- hasSuggestions: false
10
- };
11
-
12
- export const stateProps = {
13
- value: '.TextSample',
14
- hasSuggestions: false
15
- };
@@ -1,15 +0,0 @@
1
-
2
- // utilizing theming, comment out, if want individual style
3
- import styled from 'styled-components';
4
- import { Configuration } from '@pega/cosmos-react-core';
5
-
6
- export default styled(Configuration)``;
7
-
8
- // individual style, comment out above, and uncomment here and add styles
9
- // import styled, { css } from 'styled-components';
10
- //
11
- // export default styled.div(() => {
12
- // return css`
13
- // margin: 0px 0;
14
- // `;
15
- // });
@@ -1,83 +0,0 @@
1
- {
2
- "name": "Pega_DXIL_MyTestText",
3
- "label": "My Test Text",
4
- "description": "My Test Text Description",
5
- "organization": "Pega",
6
- "version": "0.0.1",
7
- "library": "DXIL",
8
- "allowedApplications": [],
9
- "componentKey": "Pega_DXIL_MyTestText",
10
- "type": "Field",
11
- "subtype": "Text",
12
- "icon": "images/pz-url-active.svg",
13
- "properties": [
14
- {
15
- "name": "label",
16
- "label": "Field label",
17
- "format": "TEXT",
18
- "required": true
19
- },
20
- {
21
- "name": "readOnly",
22
- "label": "Edit mode",
23
- "format": "READONLY"
24
- },
25
- {
26
- "label": "Input settings",
27
- "format": "GROUP",
28
- "visibility": "(!readOnly = true)",
29
- "properties": [
30
- {
31
- "name": "placeholder",
32
- "label": "Placeholder",
33
- "format": "TEXT"
34
- },
35
- {
36
- "name": "helperText",
37
- "label": "Helper text",
38
- "format": "TEXT"
39
- }
40
- ]
41
- },
42
- {
43
- "label": "Conditions",
44
- "format": "GROUP",
45
- "properties": [
46
- {
47
- "name": "required",
48
- "label": "Required",
49
- "format": "REQUIRED",
50
- "visibility": "(!readOnly = true)"
51
- },
52
- {
53
- "name": "disabled",
54
- "label": "Disabled",
55
- "format": "DISABLED",
56
- "visibility": "(!readOnly = true)"
57
- },
58
- {
59
- "name": "visibility",
60
- "label": "Visibility",
61
- "format": "VISIBILITY"
62
- }
63
- ]
64
- },
65
- {
66
- "label": "Advanced",
67
- "format": "GROUP",
68
- "collapsible": true,
69
- "properties": [
70
- {
71
- "name": "testId",
72
- "label": "Test ID",
73
- "format": "TEXT",
74
- "ignorePattern": "[^-_\\p{N}\\p{L}]",
75
- "includeAnnotations": false
76
- }
77
- ]
78
- }
79
- ],
80
- "defaultConfig": {
81
- "label": "@L $this.label"
82
- }
83
- }
@@ -1,59 +0,0 @@
1
- import { useState } from 'react';
2
-
3
- import type { Meta, StoryObj } from '@storybook/react';
4
-
5
- import PegaDxilMyTestText from './index';
6
- import { configProps } from './mock';
7
-
8
- const meta: Meta<typeof PegaDxilMyTestText> = {
9
- title: 'PegaDxilMyTestText',
10
- component: PegaDxilMyTestText,
11
- excludeStories: /.*Data$/
12
- };
13
-
14
- export default meta;
15
- type Story = StoryObj<typeof PegaDxilMyTestText>;
16
-
17
- export const BasePegaDxilMyTestText: Story = args => {
18
- const [value, setValue] = useState(configProps.value);
19
-
20
- const props = {
21
- value,
22
- placeholder: configProps.placeholder,
23
- getPConnect: () => {
24
- return {
25
- getActionsApi: () => {
26
- return {
27
- updateFieldValue: (propName, theValue) => {
28
- setValue(theValue);
29
- }
30
- };
31
- },
32
- getStateProps: () => {
33
- return { value: '.name' };
34
- }
35
- };
36
- },
37
- onChange: event => {
38
- setValue(event.target.value);
39
- },
40
- onBlur: () => {
41
- return configProps.value;
42
- }
43
- };
44
-
45
- return <PegaDxilMyTestText {...props} {...args} />;
46
- };
47
-
48
- BasePegaDxilMyTestText.args = {
49
- label: configProps.label,
50
- helperText: configProps.helperText,
51
- testId: configProps.testId,
52
- readOnly: configProps.readOnly,
53
- disabled: configProps.disabled,
54
- required: configProps.required,
55
- status: configProps.status,
56
- hideLabel: configProps.hideLabel,
57
- displayMode: configProps.displayMode,
58
- validatemessage: configProps.validatemessage
59
- };
@@ -1,101 +0,0 @@
1
- import { useState, useEffect } from 'react';
2
- import { TextField } from '@material-ui/core';
3
-
4
- import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
5
- import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
6
- import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
7
- import StyledPegaDxilMyTestTextWrapper from './styles';
8
-
9
- interface PegaDxilMyTestTextProps extends PConnFieldProps {
10
- // If any, enter additional props that only exist on this componentName
11
- fieldMetadata?: any;
12
- }
13
-
14
- // Duplicated runtime code from React SDK
15
-
16
- // props passed in combination of props from property panel (config.json) and run time props from Constellation
17
- export default function PegaDxilMyTestText(props: PegaDxilMyTestTextProps) {
18
- // Get emitted components from map (so we can get any override that may exist)
19
- const FieldValueList = getComponentFromMap('FieldValueList');
20
-
21
- const {
22
- getPConnect,
23
- label,
24
- required,
25
- disabled,
26
- value = '',
27
- validatemessage,
28
- status,
29
- /* onChange, onBlur */
30
- readOnly,
31
- testId,
32
- fieldMetadata,
33
- helperText,
34
- displayMode,
35
- hideLabel,
36
- placeholder
37
- } = props;
38
-
39
- const pConn = getPConnect();
40
- const actions = pConn.getActionsApi();
41
- const propName = (pConn.getStateProps() as any).value;
42
-
43
- const helperTextToDisplay = validatemessage || helperText;
44
-
45
- const [inputValue, setInputValue] = useState('');
46
- const maxLength = fieldMetadata?.maxLength;
47
-
48
- let readOnlyProp = {}; // Note: empty if NOT ReadOnly
49
-
50
- useEffect(() => {
51
- setInputValue(value);
52
- }, [value]);
53
-
54
- if (displayMode === 'LABELS_LEFT') {
55
- return <FieldValueList name={hideLabel ? '' : label} value={value} />;
56
- }
57
-
58
- if (displayMode === 'STACKED_LARGE_VAL') {
59
- return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;
60
- }
61
-
62
- if (readOnly) {
63
- readOnlyProp = { readOnly: true };
64
- }
65
-
66
- let testProp = {};
67
-
68
- testProp = {
69
- 'data-test-id': testId
70
- };
71
-
72
- function handleChange(event) {
73
- // update internal value
74
- setInputValue(event?.target?.value);
75
- }
76
-
77
- function handleBlur() {
78
- handleEvent(actions, 'changeNblur', propName, inputValue);
79
- }
80
-
81
- return (
82
- <StyledPegaDxilMyTestTextWrapper>
83
- <TextField
84
- fullWidth
85
- variant={readOnly ? 'standard' : 'outlined'}
86
- helperText={helperTextToDisplay}
87
- placeholder={placeholder ?? ''}
88
- size='small'
89
- required={required}
90
- disabled={disabled}
91
- onChange={handleChange}
92
- onBlur={!readOnly ? handleBlur : undefined}
93
- error={status === 'error'}
94
- label={label}
95
- value={inputValue}
96
- InputProps={{ ...readOnlyProp, inputProps: { maxLength, ...testProp } }}
97
- />
98
- </StyledPegaDxilMyTestTextWrapper>
99
- );
100
- }
101
-
@@ -1,16 +0,0 @@
1
- // eslint-disable-next-line import/prefer-default-export
2
- export const configProps = {
3
- value: '',
4
- label: 'Text Sample',
5
- placeholder: 'Text Placeholder',
6
- helperText: 'Text Helper Text',
7
- testId: 'Text-12345678',
8
- hasSuggestions: false,
9
- disabled: false,
10
- readOnly: false,
11
- required: false,
12
- displayMode: '',
13
- status: '',
14
- hideLabel: false,
15
- validatemessage: ''
16
- };
@@ -1,7 +0,0 @@
1
- import styled, { css } from 'styled-components';
2
-
3
- export default styled.div(() => {
4
- return css`
5
- margin: 0px 0;
6
- `;
7
- });