@pega/custom-dx-components 0.23.22 → 0.23.23

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 (205) hide show
  1. package/package.json +1 -1
  2. package/src/tasks/init/template/.eslintrc.json +1 -1
  3. package/src/tasks/init/template/package.json.mustache +1 -1
  4. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/Boolean.js +0 -38
  5. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/PConnProps.d.ts +0 -46
  6. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/boolean-format.ts +0 -27
  7. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/config.json +0 -145
  8. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/demo.stories.tsx +0 -64
  9. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/event-utils.ts +0 -18
  10. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/index.tsx +0 -196
  11. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/mock.ts +0 -22
  12. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/styles.ts +0 -15
  13. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCaseWidget/OneColumnPage.svg +0 -36
  14. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCaseWidget/PConnProps.d.ts +0 -46
  15. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCaseWidget/config.json +0 -23
  16. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCaseWidget/demo.stories.tsx +0 -81
  17. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCaseWidget/index.tsx +0 -81
  18. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCaseWidget/mock.ts +0 -391
  19. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCaseWidget/styles.ts +0 -15
  20. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCurrency/PConnProps.d.ts +0 -46
  21. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCurrency/config.json +0 -291
  22. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCurrency/demo.stories.tsx +0 -56
  23. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCurrency/event-utils.ts +0 -18
  24. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCurrency/index.tsx +0 -333
  25. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCurrency/mock.ts +0 -25
  26. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCurrency/styles.ts +0 -15
  27. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCurrency/suggestions-handler.ts +0 -9
  28. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/DateFormatter.js +0 -62
  29. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/FormattedText.jsx +0 -42
  30. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/PConnProps.d.ts +0 -46
  31. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/config.json +0 -199
  32. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/date.js +0 -439
  33. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/demo.stories.tsx +0 -79
  34. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/index.tsx +0 -302
  35. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/mock.ts +0 -24
  36. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/styles.ts +0 -15
  37. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/suggestions-handler.ts +0 -9
  38. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/PConnProps.d.ts +0 -46
  39. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/config.json +0 -256
  40. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/date-time.js +0 -93
  41. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/date-utils.js +0 -288
  42. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/date.js +0 -331
  43. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/demo.stories.tsx +0 -79
  44. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/index.tsx +0 -297
  45. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/mock.ts +0 -25
  46. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/styles.ts +0 -15
  47. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/suggestions-handler.ts +0 -10
  48. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDecimal/PConnProps.d.ts +0 -46
  49. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDecimal/config.json +0 -278
  50. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDecimal/demo.stories.tsx +0 -52
  51. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDecimal/event-utils.ts +0 -18
  52. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDecimal/index.tsx +0 -300
  53. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDecimal/mock.ts +0 -23
  54. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDecimal/styles.ts +0 -15
  55. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDecimal/suggestions-handler.ts +0 -9
  56. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/OneColumnDetails.svg +0 -22
  57. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/PConnProps.d.ts +0 -46
  58. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/StatusWork.tsx +0 -26
  59. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/config.json +0 -35
  60. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/demo.stories.tsx +0 -137
  61. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/index.tsx +0 -101
  62. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/mock.ts +0 -192
  63. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/styles.ts +0 -15
  64. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/utils.js +0 -151
  65. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyEmail/PConnProps.d.ts +0 -46
  66. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyEmail/config.json +0 -111
  67. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyEmail/demo.stories.tsx +0 -51
  68. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyEmail/event-utils.ts +0 -18
  69. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyEmail/index.tsx +0 -251
  70. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyEmail/mock.ts +0 -24
  71. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyEmail/styles.ts +0 -15
  72. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyEmail/suggestions-handler.ts +0 -9
  73. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyForm/DefaultForm.svg +0 -29
  74. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyForm/PConnProps.d.ts +0 -46
  75. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyForm/config.json +0 -45
  76. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyForm/demo.stories.tsx +0 -175
  77. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyForm/index.tsx +0 -53
  78. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyForm/mock.ts +0 -139
  79. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyForm/styles.ts +0 -15
  80. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyInteger/PConnProps.d.ts +0 -46
  81. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyInteger/config.json +0 -344
  82. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyInteger/demo.stories.tsx +0 -51
  83. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyInteger/event-utils.ts +0 -18
  84. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyInteger/index.tsx +0 -376
  85. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyInteger/mock.ts +0 -22
  86. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyInteger/styles.ts +0 -15
  87. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyInteger/suggestions-handler.ts +0 -9
  88. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/GetNextWork.tsx +0 -43
  89. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/OneColumnPage.svg +0 -36
  90. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/PConnProps.d.ts +0 -46
  91. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/config.json +0 -32
  92. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/demo.stories.tsx +0 -106
  93. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/index.tsx +0 -83
  94. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/localizations.json +0 -4
  95. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/mock.ts +0 -96
  96. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/styles.ts +0 -15
  97. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/utils.js +0 -227
  98. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +0 -86
  99. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/OneColumnPage.svg +0 -36
  100. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/Operator.tsx +0 -301
  101. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/PConnProps.d.ts +0 -46
  102. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/config.json +0 -55
  103. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +0 -76
  104. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/index.tsx +0 -89
  105. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/mock.ts +0 -52
  106. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/styles.ts +0 -15
  107. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageWidget/OneColumnPage.svg +0 -36
  108. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageWidget/PConnProps.d.ts +0 -46
  109. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageWidget/config.json +0 -59
  110. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageWidget/demo.stories.tsx +0 -33
  111. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageWidget/index.tsx +0 -61
  112. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageWidget/mock.ts +0 -25
  113. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageWidget/styles.ts +0 -15
  114. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyParagraph/PConnProps.d.ts +0 -46
  115. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyParagraph/config.json +0 -111
  116. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyParagraph/demo.stories.tsx +0 -51
  117. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyParagraph/event-utils.ts +0 -18
  118. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyParagraph/index.tsx +0 -248
  119. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyParagraph/mock.ts +0 -22
  120. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyParagraph/styles.ts +0 -15
  121. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyParagraph/suggestions-handler.ts +0 -9
  122. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPercentage/PConnProps.d.ts +0 -46
  123. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPercentage/config.json +0 -93
  124. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPercentage/demo.stories.tsx +0 -52
  125. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPercentage/event-utils.ts +0 -18
  126. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPercentage/index.tsx +0 -306
  127. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPercentage/mock.ts +0 -23
  128. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPercentage/styles.ts +0 -15
  129. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPercentage/suggestions-handler.ts +0 -9
  130. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPhone/PConnProps.d.ts +0 -46
  131. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPhone/config.json +0 -123
  132. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPhone/demo.stories.tsx +0 -49
  133. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPhone/event-utils.ts +0 -18
  134. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPhone/index.tsx +0 -288
  135. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPhone/mock.ts +0 -39
  136. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPhone/styles.ts +0 -15
  137. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPhone/suggestions-handler.ts +0 -9
  138. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPicklist/PConnProps.d.ts +0 -46
  139. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPicklist/config.json +0 -114
  140. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPicklist/demo.stories.tsx +0 -81
  141. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPicklist/event-utils.ts +0 -18
  142. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPicklist/index.tsx +0 -393
  143. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPicklist/styles.ts +0 -15
  144. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPicklist/suggestions-handler.ts +0 -9
  145. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/PConnProps.d.ts +0 -46
  146. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/config.json +0 -113
  147. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/demo.stories.tsx +0 -85
  148. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/event-utils.ts +0 -18
  149. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/index.tsx +0 -243
  150. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/mock.ts +0 -69
  151. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/styles.ts +0 -15
  152. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/suggestions-handler.ts +0 -9
  153. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +0 -161
  154. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyText/PConnProps.d.ts +0 -46
  155. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyText/config.json +0 -55
  156. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyText/demo.stories.tsx +0 -54
  157. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyText/index.tsx +0 -73
  158. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyText/mock.ts +0 -15
  159. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyText/styles.ts +0 -15
  160. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/PConnProps.d.ts +0 -46
  161. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/StatusWork.tsx +0 -30
  162. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/config.json +0 -111
  163. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/demo.stories.tsx +0 -51
  164. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/event-utils.ts +0 -18
  165. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/index.tsx +0 -263
  166. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/mock.ts +0 -23
  167. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/styles.ts +0 -15
  168. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/suggestions-handler.ts +0 -9
  169. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTimeOfDay/PConnProps.d.ts +0 -46
  170. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTimeOfDay/config.json +0 -185
  171. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +0 -60
  172. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTimeOfDay/index.tsx +0 -245
  173. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTimeOfDay/mock.ts +0 -22
  174. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTimeOfDay/styles.ts +0 -15
  175. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTimeOfDay/suggestions-handler.ts +0 -9
  176. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTimeOfDay/time-of-day.js +0 -287
  177. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/PConnProps.d.ts +0 -46
  178. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +0 -26
  179. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/TwoColumnDetails.svg +0 -28
  180. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/config.json +0 -42
  181. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +0 -141
  182. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/index.tsx +0 -100
  183. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/mock.ts +0 -232
  184. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/styles.ts +0 -15
  185. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/utils.js +0 -151
  186. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnForm/PConnProps.d.ts +0 -46
  187. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnForm/TwoColumn.svg +0 -38
  188. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnForm/config.json +0 -27
  189. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +0 -181
  190. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnForm/index.tsx +0 -60
  191. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnForm/mock.ts +0 -145
  192. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnForm/styles.ts +0 -15
  193. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/PConnProps.d.ts +0 -46
  194. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/config.json +0 -237
  195. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/demo.stories.tsx +0 -49
  196. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/event-utils.ts +0 -18
  197. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/index.tsx +0 -261
  198. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/mock.ts +0 -24
  199. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/styles.ts +0 -15
  200. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/suggestions-handler.ts +0 -9
  201. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/text-url.jsx +0 -175
  202. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/mock.js +0 -68
  203. /package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{mock.js.mustache → mock.ts.mustache} +0 -0
  204. /package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPicklist → Constellation/Pega_DXIL_MyAutocomplete}/mock.ts +0 -0
  205. /package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyAutocomplete/mock.js → Launchpad/Pega_DXIL_MyAutocomplete/mock.ts} +0 -0
@@ -1,151 +0,0 @@
1
-
2
- /**
3
- * Given the PConnect object of a Template component, retrieve the children
4
- * metadata of all regions.
5
- * @param {Function} pConnect PConnect of a Template component.
6
- */
7
- export function getAllFields(pConnect) {
8
- const metadata = pConnect().getRawMetadata();
9
- if (!metadata.children) {
10
- return [];
11
- }
12
-
13
- let allFields = [];
14
-
15
- const makeField = (f) => ({
16
- ...pConnect().resolveConfigProps(f.config),
17
- type: f.type
18
- });
19
-
20
- const hasRegions = !!metadata.children[0]?.children;
21
- if (hasRegions) {
22
- allFields = metadata.children.map((region) =>
23
- region.children.map((field) => {
24
- // Do not resolve the config props if is status work, instead create component here as status badge and mark as status display
25
- if (field.config?.value === '@P .pyStatusWork') {
26
- field.type = 'TextInput';
27
- field.config.displayAsStatus = true;
28
- return pConnect().createComponent(field);
29
- }
30
-
31
- return makeField(field);
32
- })
33
- );
34
- } else {
35
- allFields = metadata.children.map(makeField);
36
- }
37
-
38
- return allFields;
39
- }
40
-
41
-
42
-
43
- export function getFilteredFields(getPConnect) {
44
- let primaryFieldsRaw;
45
- let secondaryFieldsRaw;
46
- const metadata = getPConnect().getRawMetadata();
47
- const hasRegions = !!metadata.children[0]?.children;
48
- if (hasRegions) {
49
- primaryFieldsRaw = metadata.children[0].children;
50
- secondaryFieldsRaw = metadata.children[1].children;
51
- } else {
52
- [primaryFieldsRaw, secondaryFieldsRaw] = metadata.children;
53
- }
54
-
55
- // Filter out fields that are not visible and unsupported types for primary fields (for CaseSummary)
56
- primaryFieldsRaw = primaryFieldsRaw.filter((item) => {
57
- const resolvedItem = getPConnect().resolveConfigProps(item.config);
58
- return resolvedItem.visibility !== false && item.type !== 'TextContent';
59
- });
60
-
61
- secondaryFieldsRaw = secondaryFieldsRaw.filter((item) => {
62
- const resolvedItem = getPConnect().resolveConfigProps(item.config);
63
- return resolvedItem.visibility !== false && item.type !== 'TextContent';
64
- });
65
-
66
- return [primaryFieldsRaw, secondaryFieldsRaw];
67
- }
68
-
69
- /**
70
- * Returns ConfigurableLayout mapped content. With pre-populated default layout configs.
71
- * @param {object[]} regionData template children item.
72
- * @returns {object[]} ConfigurableLayout content.
73
- */
74
- export function getLayoutDataFromRegion(regionData) {
75
- const defaultLayoutConfig = {
76
- width: 'full',
77
- fillAvailable: true,
78
- minWidth: [300, 'px']
79
- };
80
-
81
- return regionData.props
82
- ?.getPConnect()
83
- ?.getChildren()
84
- ?.map((item, index) => {
85
- const itemPConnect = item?.getPConnect();
86
-
87
- return {
88
- id: itemPConnect?.getComponentName() ? `${itemPConnect.getComponentName()}--${index}` : `item--${index}`,
89
- content: itemPConnect?.getComponent(),
90
- layoutConfig: {
91
- ...defaultLayoutConfig,
92
- ...itemPConnect?.getConfigProps().layoutConfig
93
- }
94
- };
95
- });
96
- }
97
-
98
- /**
99
- * Determine if the current view is the view of the case step/assignment.
100
- * @param {Function} pConnect PConnect object for the component
101
- */
102
- export function getIsAssignmentView(pConnect) {
103
- // Get caseInfo content from the store which contains the view info about the current assignment/step
104
- // TODO To be replaced with pConnect.getCaseInfo().getCurrentAssignmentView when it's available
105
- const assignmentViewClass = pConnect.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_CLASSID);
106
- const assignmentViewName = pConnect.getValue(PCore.getConstants().CASE_INFO.ASSIGNMENTACTION_ID);
107
-
108
- const assignmentViewId = `${assignmentViewName}!${assignmentViewClass}`;
109
-
110
- // Get the info about the current view from pConnect
111
- const currentViewId = `${pConnect.getCurrentView()}!${pConnect.getCurrentClassID()}`;
112
-
113
- return assignmentViewId === currentViewId;
114
- }
115
-
116
- /**
117
- * A hook that gets the instructions content for a view.
118
- * @param {Function} pConnect PConnect object for the component
119
- * @param {string} [instructions="casestep"] 'casestep', 'none', or the html content of a Rule-UI-Paragraph rule (processed via core's paragraph annotation handler)
120
- */
121
- export function getInstructions(pConnect, instructions = 'casestep') {
122
- const caseStepInstructions = pConnect.getValue(PCore.getConstants().CASE_INFO.INSTRUCTIONS);
123
-
124
- // Determine if this view is the current assignment/step view
125
- const isCurrentAssignmentView = getIsAssignmentView(pConnect);
126
-
127
- // Case step instructions
128
- if (instructions === 'casestep' && isCurrentAssignmentView && caseStepInstructions?.length) {
129
- return caseStepInstructions;
130
- }
131
-
132
- // No instructions
133
- if (instructions === 'none') {
134
- return undefined;
135
- }
136
-
137
- // If the annotation wasn't processed correctly, don't return any instruction text
138
- if (instructions?.startsWith('@PARAGRAPH')) {
139
-
140
- console.error('@PARAGRAPH annotation was not processed. Hiding custom instructions.');
141
- return undefined;
142
- }
143
-
144
- // Custom instructions from the view
145
- // The raw metadata for `instructions` will be something like '@PARAGRAPH .SomeParagraphRule' but
146
- // it is evaluated by core logic to the content
147
- if (instructions !== 'casestep' && instructions !== 'none') {
148
- return instructions;
149
- }
150
- return undefined;
151
- }
@@ -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,111 +0,0 @@
1
- {
2
- "name": "Pega_DXIL_MyEmail",
3
- "label": "My Email",
4
- "description": "My Email",
5
- "organization": "Pega",
6
- "version": "0.0.1",
7
- "library": "DXIL",
8
- "allowedApplications": [],
9
- "componentKey": "Pega_DXIL_MyEmail",
10
- "type": "Field",
11
- "subtype": "Text-Email",
12
- "icon": "images/pz-email-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": "Column settings",
27
- "format": "GROUP",
28
- "visibility": "@VIEWTYPE == 'MultiRecordDisplayAsTable'",
29
- "properties": [
30
- {
31
- "name": "columnWidth",
32
- "label": "Column width",
33
- "format": "SELECT",
34
- "source": [
35
- {
36
- "key": "auto",
37
- "value": "Auto"
38
- },
39
- {
40
- "key": "custom",
41
- "value": "Custom"
42
- }
43
- ]
44
- },
45
- {
46
- "name": "width",
47
- "label": "Width (px)",
48
- "format": "NUMBER",
49
- "visibility": "$this.columnWidth == 'custom'"
50
- }
51
- ]
52
- },
53
- {
54
- "label": "Input settings",
55
- "format": "GROUP",
56
- "visibility": "(!readOnly = true)",
57
- "properties": [
58
- {
59
- "name": "placeholder",
60
- "label": "Placeholder",
61
- "format": "TEXT"
62
- },
63
- {
64
- "name": "helperText",
65
- "label": "Helper text",
66
- "format": "TEXT"
67
- }
68
- ]
69
- },
70
- {
71
- "label": "Conditions",
72
- "format": "GROUP",
73
- "properties": [
74
- {
75
- "name": "required",
76
- "label": "Required",
77
- "format": "REQUIRED",
78
- "visibility": "(!readOnly = true)"
79
- },
80
- {
81
- "name": "disabled",
82
- "label": "Disabled",
83
- "format": "DISABLED",
84
- "visibility": "(!readOnly = true)"
85
- },
86
- {
87
- "name": "visibility",
88
- "label": "Visibility",
89
- "format": "VISIBILITY"
90
- }
91
- ]
92
- },
93
- {
94
- "label": "Advanced",
95
- "format": "GROUP",
96
- "collapsible": true,
97
- "properties": [
98
- {
99
- "name": "testId",
100
- "label": "Test ID",
101
- "format": "TEXT",
102
- "ignorePattern": "[^-_\\p{N}\\p{L}]",
103
- "includeAnnotations": false
104
- }
105
- ]
106
- }
107
- ],
108
- "defaultConfig": {
109
- "label": "@L $this.label"
110
- }
111
- }
@@ -1,51 +0,0 @@
1
-
2
- /* eslint-disable react/jsx-no-useless-fragment */
3
- // @ts-nocheck
4
- import { withKnobs } from '@storybook/addon-knobs';
5
-
6
- import PegaDxilMyEmail from './index';
7
-
8
- import { stateProps, configProps, fieldMetadata } from './mock';
9
-
10
- export default {
11
- title: 'PegaDxilMyEmail',
12
- decorators: [withKnobs],
13
- component: PegaDxilMyEmail
14
- };
15
-
16
- export const BasePegaDxilMyEmail = () => {
17
-
18
- const props = {
19
- value: configProps.value,
20
- label: configProps.label,
21
- placeholder: configProps.placeholder,
22
- helperText: configProps.helperText,
23
- testId: configProps.testId,
24
- hasSuggestions: configProps.hasSuggestions,
25
- fieldMetadata,
26
-
27
- getPConnect: () => {
28
- return {
29
- getStateProps: () => {
30
- return stateProps;
31
- },
32
- getActionsApi: () => {
33
- return {
34
- updateFieldValue: () => {/* nothing */},
35
- triggerFieldChange: () => {/* nothing */}
36
- };
37
- },
38
- ignoreSuggestion: () => {/* nothing */},
39
- acceptSuggestion: () => {/* nothing */},
40
- setInheritedProps: () => {/* nothing */},
41
- resolveConfigProps: () => {/* nothing */}
42
- };
43
- }
44
- };
45
-
46
- return (
47
- <>
48
- <PegaDxilMyEmail {...props} />
49
- </>
50
- );
51
- };
@@ -1,18 +0,0 @@
1
- const handleEvent = (actions: any, eventType: string, propName: string, value: string) => {
2
- switch (eventType) {
3
- case 'change':
4
- actions.updateFieldValue(propName, value);
5
- break;
6
- case 'blur':
7
- actions.triggerFieldChange(propName, value);
8
- break;
9
- case 'changeNblur':
10
- actions.updateFieldValue(propName, value);
11
- actions.triggerFieldChange(propName, value);
12
- break;
13
- default:
14
- break;
15
- }
16
- };
17
-
18
- export default handleEvent;
@@ -1,251 +0,0 @@
1
- import { useState, useEffect, useRef } from 'react';
2
- import { Input, EmailDisplay, FieldValueList, Text, URLDisplay, PhoneDisplay } from '@pega/cosmos-react-core';
3
- import PropTypes from 'prop-types';
4
- import type { PConnFieldProps } from './PConnProps';
5
-
6
- // includes in bundle
7
- import { suggestionsHandler } from './suggestions-handler';
8
- import handleEvent from "./event-utils";
9
-
10
- import StyledPegaDxilMyEmailWrapper from './styles';
11
-
12
- // interface for props
13
- interface PegaDxilMyEmailProps extends PConnFieldProps {
14
- // If any, enter additional props that only exist on TextInput here
15
- helperText: string;
16
- isTableFormatter?: boolean;
17
- hasSuggestions?: boolean;
18
- variant?: any;
19
- formatter: string;
20
- }
21
-
22
- // interface for StateProps object
23
- interface StateProps {
24
- value: string;
25
- hasSuggestions: boolean;
26
- }
27
-
28
- export const formatExists = (formatterVal: string) => {
29
- const formatterValues = [
30
- "TextInput",
31
- "WorkStatus",
32
- "RichText",
33
- "Email",
34
- "Phone",
35
- "URL",
36
- "Operator"
37
- ];
38
- let isformatter = false;
39
- if (formatterValues.includes(formatterVal)) {
40
- isformatter = true;
41
- }
42
- return isformatter;
43
- };
44
-
45
-
46
- export const textFormatter = (formatter: string, value: any) => {
47
- let displayComponent = null;
48
- switch(formatter){
49
- case "TextInput" : {
50
- displayComponent = value;
51
- break;
52
- }
53
- case "Email" : {
54
- displayComponent = (<EmailDisplay value={value} displayText={value} variant="link" />);
55
- break;
56
- }
57
- case "Phone" : {
58
- displayComponent = (<PhoneDisplay value={value} variant="link" />);
59
- break;
60
- }
61
- case "URL" : {
62
- displayComponent = (<URLDisplay target="_blank" value={value} displayText={value} variant="link" />);
63
- break;
64
- }
65
- // no default
66
- }
67
- return displayComponent;
68
- };
69
-
70
-
71
-
72
- // Duplicated runtime code from Constellation Design System Component
73
-
74
- // props passed in combination of props from property panel (config.json) and run time props from Constellation
75
- // any default values in config.pros should be set in defaultProps at bottom of this file
76
- export default function PegaDxilMyEmail(props: PegaDxilMyEmailProps) {
77
- const {
78
- getPConnect,
79
- value,
80
- placeholder,
81
- validatemessage,
82
- label,
83
- hideLabel,
84
- helperText,
85
- testId,
86
- displayMode,
87
- additionalProps,
88
- variant,
89
- isTableFormatter,
90
- hasSuggestions
91
- } = props;
92
- const { formatter } = props;
93
- const pConn = getPConnect();
94
- const actions = pConn.getActionsApi();
95
- const stateProps = pConn.getStateProps() as StateProps;
96
- let propName: string = stateProps.value;
97
-
98
- const hasValueChange = useRef(false);
99
-
100
-
101
- let { readOnly, required, disabled } = props;
102
- [readOnly, required, disabled] = [readOnly, required, disabled].map(
103
- (prop) => prop === true || (typeof prop === 'string' && prop === 'true')
104
- );
105
- const [inputValue, setInputValue] = useState(value);
106
- useEffect(() => setInputValue(value), [value]);
107
-
108
- const [status, setStatus] = useState(hasSuggestions ? 'pending' : undefined);
109
-
110
- useEffect(() => {
111
- if (validatemessage !== '') {
112
- setStatus('error');
113
- }
114
- if (hasSuggestions) {
115
- setStatus('pending');
116
- } else if (!hasSuggestions && status !== 'success') {
117
- setStatus(validatemessage !== '' ? 'error' : undefined);
118
- }
119
- }, [validatemessage, hasSuggestions, status]);
120
-
121
- let displayComp = null;
122
- if (displayMode) {
123
- displayComp = <EmailDisplay value={value} displayText={inputValue} variant='link' />;
124
- }
125
-
126
- if (displayMode === 'LABELS_LEFT' || displayMode === 'DISPLAY_ONLY') {
127
- if (isTableFormatter && formatExists(formatter)) {
128
- displayComp = textFormatter(formatter, value);
129
- }
130
- return displayMode === 'DISPLAY_ONLY' ? (
131
- <StyledPegaDxilMyEmailWrapper>
132
- displayComp
133
- </StyledPegaDxilMyEmailWrapper>
134
- ) : (
135
- <StyledPegaDxilMyEmailWrapper>
136
- <FieldValueList
137
- variant={hideLabel ? 'stacked' : variant}
138
- data-testid={testId}
139
- fields={[{ id: '1', name: hideLabel ? '' : label, value: displayComp }]}
140
- />
141
- </StyledPegaDxilMyEmailWrapper>
142
- );
143
- }
144
-
145
- if (displayMode === 'STACKED_LARGE_VAL') {
146
- return (
147
- <StyledPegaDxilMyEmailWrapper>
148
- <FieldValueList
149
- variant='stacked'
150
- data-testid={testId}
151
- fields={[
152
- {
153
- id: '2',
154
- name: hideLabel ? '' : label,
155
- value: (
156
- <Text variant='h1' as='span'>
157
- {displayComp}
158
- </Text>
159
- )
160
- }
161
- ]}
162
- />
163
- </StyledPegaDxilMyEmailWrapper>
164
- );
165
- }
166
-
167
- const onResolveSuggestionHandler = (accepted: boolean) => {
168
- suggestionsHandler(accepted, pConn, setStatus);
169
- };
170
-
171
- return (
172
- <StyledPegaDxilMyEmailWrapper>
173
- <Input
174
- {...additionalProps}
175
- type='email'
176
- label={label}
177
- labelHidden={hideLabel}
178
- info={validatemessage || helperText}
179
- value={inputValue}
180
- status={status}
181
- placeholder={placeholder}
182
- disabled={disabled}
183
- readOnly={readOnly}
184
- required={required}
185
- data-testid={testId}
186
- onChange={(event: any) => {
187
- if (hasSuggestions) {
188
- setStatus(undefined);
189
- }
190
- setInputValue(event.target.value);
191
- if (value !== event.target.value) {
192
- // @ts-ignore
193
- handleEvent(actions, 'change', propName, event.target.value);
194
- hasValueChange.current = true;
195
- }
196
- }}
197
- onBlur={(event: any) => {
198
- if (!value || hasValueChange.current) {
199
- // @ts-ignore
200
- handleEvent(actions, 'blur', propName, event.target.value);
201
- if (hasSuggestions) {
202
- pConn.ignoreSuggestion('');
203
- }
204
- hasValueChange.current = false;
205
- }
206
- }}
207
- // @ts-ignore
208
- onFocus={actions.onFocus}
209
- onResolveSuggestion={onResolveSuggestionHandler}
210
- />
211
- </StyledPegaDxilMyEmailWrapper>
212
- );
213
- }
214
-
215
- PegaDxilMyEmail.defaultProps = {
216
- value: '',
217
- placeholder: '',
218
- validatemessage: '',
219
- helperText: '',
220
- hideLabel: false,
221
- disabled: false,
222
- readOnly: false,
223
- required: false,
224
- testId: '',
225
- displayMode: null,
226
- additionalProps: {},
227
- variant: 'inline',
228
- formatter: '',
229
- isTableFormatter: false,
230
- hasSuggestions: false
231
- };
232
-
233
- PegaDxilMyEmail.propTypes = {
234
- value: PropTypes.string,
235
- placeholder: PropTypes.string,
236
- label: PropTypes.string.isRequired,
237
- hideLabel: PropTypes.bool,
238
- getPConnect: PropTypes.func.isRequired,
239
- validatemessage: PropTypes.string,
240
- helperText: PropTypes.string,
241
- disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
242
- readOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
243
- required: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
244
- testId: PropTypes.string,
245
- displayMode: PropTypes.string,
246
- additionalProps: PropTypes.objectOf(PropTypes.any),
247
- variant: PropTypes.string,
248
- formatter: PropTypes.string,
249
- isTableFormatter: PropTypes.bool,
250
- hasSuggestions: PropTypes.bool
251
- };
@@ -1,24 +0,0 @@
1
-
2
- // @ts-nocheck
3
- export const configProps = {
4
- value: '',
5
- label: 'Email Sample',
6
- placeholder: 'Email Placeholder',
7
- helperText: 'Email Helper Text',
8
- testId: 'email-12345678',
9
- hasSuggestions: false
10
- };
11
-
12
- export const stateProps = {
13
- value: '.EmailSample',
14
- hasSuggestions: false
15
- };
16
-
17
- export const fieldMetadata = {
18
- classID: 'DIXL-MediaCo-Work-NewService',
19
- type: 'Text',
20
- maxLength: 256,
21
- displayAs: 'pxEmail',
22
- label: 'Email sample',
23
- validateAs: 'ValidEmailAddress'
24
- };
@@ -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,9 +0,0 @@
1
- export const suggestionsHandler = (accepted: boolean, pConn: any, setStatus: any) => {
2
- if (accepted) {
3
- pConn.acceptSuggestion();
4
- setStatus('success');
5
- } else {
6
- pConn.ignoreSuggestion();
7
- setStatus(undefined);
8
- }
9
- };