@pega/custom-dx-components 0.23.20 → 0.23.21

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 (554) hide show
  1. package/package.json +35 -35
  2. package/src/constants.js +14 -3
  3. package/src/tasks/authenticate/helper.js +44 -32
  4. package/src/tasks/authenticate/index.js +3 -1
  5. package/src/tasks/build-all/index.js +1 -1
  6. package/src/tasks/{build → build-comp}/index.js +1 -1
  7. package/src/tasks/create/index.js +20 -7
  8. package/src/tasks/create/templates/Constellation/Field/Boolean/PConnProps.d.ts.mustache +46 -0
  9. package/src/tasks/create/templates/Constellation/Field/Boolean/{boolean-format.js.mustache → boolean-format.ts.mustache} +2 -2
  10. package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.jsx.mustache +3 -3
  11. package/src/tasks/create/templates/Constellation/Field/Boolean/event-utils.ts.mustache +18 -0
  12. package/src/tasks/create/templates/Constellation/Field/Boolean/{index.jsx.mustache → index.tsx.mustache} +35 -10
  13. package/src/tasks/create/templates/Constellation/Field/{Date/styles.js.mustache → Boolean/styles.ts.mustache} +1 -1
  14. package/src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache +1 -1
  15. package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +1 -1
  16. package/src/tasks/create/templates/Constellation/Field/Date/PConnProps.d.ts.mustache +46 -0
  17. package/src/tasks/create/templates/Constellation/Field/Date/date.js.mustache +0 -2
  18. package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.jsx.mustache +3 -3
  19. package/src/tasks/create/templates/Constellation/Field/Date/{index.jsx.mustache → index.tsx.mustache} +82 -38
  20. package/src/tasks/create/templates/Constellation/Field/{Boolean/styles.js.mustache → Date/styles.ts.mustache} +1 -1
  21. package/src/tasks/create/templates/Constellation/Field/Date/suggestions-handler.ts +9 -0
  22. package/src/tasks/create/templates/Constellation/Field/DateTime/PConnProps.d.ts.mustache +46 -0
  23. package/src/tasks/create/templates/Constellation/Field/DateTime/date-time.js.mustache +1 -1
  24. package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.js.mustache +1 -2
  25. package/src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache +1 -2
  26. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.jsx.mustache +3 -3
  27. package/src/tasks/create/templates/Constellation/Field/DateTime/{index.jsx.mustache → index.tsx.mustache} +64 -22
  28. package/src/tasks/create/templates/Constellation/Field/{Decimal-Currency/styles.js.mustache → DateTime/styles.ts.mustache} +1 -1
  29. package/src/tasks/create/templates/Constellation/Field/DateTime/suggestions-handler.ts +10 -0
  30. package/src/tasks/create/templates/Constellation/Field/Decimal/PConnProps.d.ts.mustache +46 -0
  31. package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.jsx.mustache +3 -3
  32. package/src/tasks/create/templates/Constellation/Field/Decimal/event-utils.ts.mustache +18 -0
  33. package/src/tasks/create/templates/Constellation/Field/Decimal/{index.jsx.mustache → index.tsx.mustache} +38 -9
  34. package/src/tasks/create/templates/Constellation/Field/Decimal/styles.ts.mustache +15 -0
  35. package/src/tasks/create/templates/Constellation/Field/Decimal/suggestions-handler.ts +9 -0
  36. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/PConnProps.d.ts.mustache +46 -0
  37. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.jsx.mustache +3 -3
  38. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/event-utils.ts.mustache +18 -0
  39. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/{index.jsx.mustache → index.tsx.mustache} +50 -14
  40. package/src/tasks/create/templates/Constellation/Field/{DateTime/styles.js.mustache → Decimal-Currency/styles.ts.mustache} +1 -1
  41. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/suggestions-handler.ts +9 -0
  42. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/PConnProps.d.ts.mustache +46 -0
  43. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.jsx.mustache +3 -3
  44. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/event-utils.ts.mustache +18 -0
  45. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/{index.jsx.mustache → index.tsx.mustache} +37 -8
  46. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.ts.mustache +15 -0
  47. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/suggestions-handler.ts +9 -0
  48. package/src/tasks/create/templates/Constellation/Field/Integer/PConnProps.d.ts.mustache +46 -0
  49. package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.jsx.mustache +3 -3
  50. package/src/tasks/create/templates/Constellation/Field/Integer/event-utils.ts.mustache +18 -0
  51. package/src/tasks/create/templates/Constellation/Field/Integer/{index.jsx.mustache → index.tsx.mustache} +52 -11
  52. package/src/tasks/create/templates/Constellation/Field/Integer/styles.ts.mustache +15 -0
  53. package/src/tasks/create/templates/Constellation/Field/Integer/suggestions-handler.ts +9 -0
  54. package/src/tasks/create/templates/Constellation/Field/Picklist/PConnProps.d.ts.mustache +46 -0
  55. package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.jsx.mustache +3 -3
  56. package/src/tasks/create/templates/Constellation/Field/Picklist/event-utils.ts.mustache +18 -0
  57. package/src/tasks/create/templates/Constellation/Field/Picklist/{index.jsx.mustache → index.tsx.mustache} +54 -15
  58. package/src/tasks/create/templates/Constellation/Field/Picklist/styles.ts.mustache +15 -0
  59. package/src/tasks/create/templates/Constellation/Field/Picklist/suggestions-handler.ts +9 -0
  60. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/PConnProps.d.ts +46 -0
  61. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/component-constants.js +5 -0
  62. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/config.json.mustache +115 -0
  63. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.js.mustache +161 -0
  64. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/demo.stories.jsx.mustache +90 -0
  65. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/embed-utils.js.mustache +310 -0
  66. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/event-utils.ts.mustache +18 -0
  67. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/format-constants.js.mustache +41 -0
  68. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +1238 -0
  69. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/picklist-utils.js.mustache +88 -0
  70. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-constants.js.mustache +20 -0
  71. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-utils.js.mustache +657 -0
  72. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/styles.ts.mustache +15 -0
  73. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/suggestions-handler.ts.mustache +9 -0
  74. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/textformat-utils.jsx.mustache +161 -0
  75. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/utils.ts.mustache +218 -0
  76. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/PConnProps.d.ts +46 -0
  77. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/config.json.mustache +113 -0
  78. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/demo.stories.jsx.mustache +85 -0
  79. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/event-utils.ts.mustache +18 -0
  80. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +243 -0
  81. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/styles.ts.mustache +15 -0
  82. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/suggestions-handler.ts.mustache +9 -0
  83. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/textformat-utils.jsx.mustache +161 -0
  84. package/src/tasks/create/templates/Constellation/Field/Text/PConnProps.d.ts +46 -0
  85. package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.jsx.mustache +3 -3
  86. package/src/tasks/create/templates/Constellation/Field/Text/{index.jsx.mustache → index.tsx.mustache} +17 -6
  87. package/src/tasks/create/templates/Constellation/Field/Text/styles.ts.mustache +15 -0
  88. package/src/tasks/create/templates/Constellation/Field/Text-Email/PConnProps.d.ts +46 -0
  89. package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.jsx.mustache +3 -3
  90. package/src/tasks/create/templates/Constellation/Field/Text-Email/event-utils.ts.mustache +18 -0
  91. package/src/tasks/create/templates/Constellation/Field/Text-Email/{index.jsx.mustache → index.tsx.mustache} +30 -12
  92. package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.ts.mustache +15 -0
  93. package/src/tasks/create/templates/Constellation/Field/Text-Email/suggestions-handler.ts.mustache +9 -0
  94. package/src/tasks/create/templates/Constellation/Field/Text-Input/PConnProps.d.ts.mustache +46 -0
  95. package/src/tasks/create/templates/Constellation/Field/Text-Input/StatusWork.tsx +30 -0
  96. package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.jsx.mustache +3 -3
  97. package/src/tasks/create/templates/Constellation/Field/Text-Input/event-utils.ts.mustache +18 -0
  98. package/src/tasks/create/templates/Constellation/Field/Text-Input/{index.jsx.mustache → index.tsx.mustache} +54 -31
  99. package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.ts.mustache +15 -0
  100. package/src/tasks/create/templates/Constellation/Field/Text-Input/suggestions-handler.ts.mustache +9 -0
  101. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/PConnProps.d.ts.mustache +46 -0
  102. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.jsx.mustache +3 -3
  103. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/event-utils.ts.mustache +18 -0
  104. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/{index.jsx.mustache → index.tsx.mustache} +30 -13
  105. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.ts.mustache +15 -0
  106. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/suggestions-handler.ts.mustache +9 -0
  107. package/src/tasks/create/templates/Constellation/Field/Text-Phone/PConnProps.d.ts.mustache +46 -0
  108. package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.jsx.mustache +3 -3
  109. package/src/tasks/create/templates/Constellation/Field/Text-Phone/event-utils.ts.mustache +18 -0
  110. package/src/tasks/create/templates/Constellation/Field/Text-Phone/{index.jsx.mustache → index.tsx.mustache} +37 -16
  111. package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.ts.mustache +15 -0
  112. package/src/tasks/create/templates/Constellation/Field/Text-Phone/suggestions-handler.ts.mustache +9 -0
  113. package/src/tasks/create/templates/Constellation/Field/Text-URL/PConnProps.d.ts.mustache +46 -0
  114. package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.jsx.mustache +3 -3
  115. package/src/tasks/create/templates/Constellation/Field/Text-URL/event-utils.ts.mustache +18 -0
  116. package/src/tasks/create/templates/Constellation/Field/Text-URL/{index.jsx.mustache → index.tsx.mustache} +39 -11
  117. package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.ts.mustache +15 -0
  118. package/src/tasks/create/templates/Constellation/Field/Text-URL/suggestions-handler.ts.mustache +9 -0
  119. package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.jsx.mustache +2 -1
  120. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/PConnProps.d.ts.mustache +46 -0
  121. package/src/tasks/create/templates/Constellation/Field/{TimeofDay → TimeOfDay}/demo.stories.jsx.mustache +3 -3
  122. package/src/tasks/create/templates/Constellation/Field/{TimeofDay/index.jsx.mustache → TimeOfDay/index.tsx.mustache} +46 -16
  123. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/styles.ts.mustache +15 -0
  124. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/suggestions-handler.ts.mustache +9 -0
  125. package/src/tasks/create/templates/Constellation/Field/{TimeofDay → TimeOfDay}/time-of-day.js.mustache +0 -2
  126. package/src/tasks/create/templates/Constellation/Template/DETAILS/PConnProps.d.ts.mustache +46 -0
  127. package/src/tasks/create/templates/Constellation/Template/{DETAILS-region/StatusWork.jsx.mustache → DETAILS/StatusWork.tsx.mustache} +2 -3
  128. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.jsx.mustache +3 -4
  129. package/src/tasks/create/templates/Constellation/Template/{DETAILS-region/index.jsx.mustache → DETAILS/index.tsx.mustache} +22 -5
  130. package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.ts.mustache +15 -0
  131. package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +2 -3
  132. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/PConnProps.d.ts.mustache +46 -0
  133. package/src/tasks/create/templates/Constellation/{Field/Text-Input/StatusWork.jsx → Template/DETAILS-region/StatusWork.tsx.mustache} +2 -3
  134. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.jsx.mustache +3 -4
  135. package/src/tasks/create/templates/Constellation/Template/{DETAILS/index.jsx.mustache → DETAILS-region/index.tsx.mustache} +21 -5
  136. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.ts.mustache +15 -0
  137. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache +0 -4
  138. package/src/tasks/create/templates/Constellation/Template/FORM/PConnProps.d.ts.mustache +46 -0
  139. package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.jsx.mustache +15 -13
  140. package/src/tasks/create/templates/Constellation/Template/FORM/{index.jsx.mustache → index.tsx.mustache} +11 -7
  141. package/src/tasks/create/templates/Constellation/Template/FORM/styles.ts.mustache +15 -0
  142. package/src/tasks/create/templates/Constellation/Template/FORM-region/PConnProps.d.ts.mustache +46 -0
  143. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.jsx.mustache +7 -8
  144. package/src/tasks/create/templates/Constellation/Template/FORM-region/{index.jsx.mustache → index.tsx.mustache} +14 -3
  145. package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.ts.mustache +15 -0
  146. package/src/tasks/create/templates/Constellation/Template/PAGE/{GetNextWork.jsx.mustache → GetNextWork.tsx.mustache} +13 -6
  147. package/src/tasks/create/templates/Constellation/Template/PAGE/PConnProps.d.ts.mustache +46 -0
  148. package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.jsx.mustache +3 -3
  149. package/src/tasks/create/templates/Constellation/Template/PAGE/{index.jsx.mustache → index.tsx.mustache} +18 -6
  150. package/src/tasks/create/templates/Constellation/Template/PAGE/styles.ts.mustache +15 -0
  151. package/src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache +1 -4
  152. package/src/tasks/create/templates/Constellation/Widget/CASE/PConnProps.d.ts.mustache +46 -0
  153. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.jsx.mustache +3 -3
  154. package/src/tasks/create/templates/Constellation/Widget/CASE/{index.jsx.mustache → index.tsx.mustache} +19 -10
  155. package/src/tasks/create/templates/Constellation/Widget/CASE/styles.ts.mustache +15 -0
  156. package/src/tasks/create/templates/Constellation/Widget/PAGE/PConnProps.d.ts.mustache +46 -0
  157. package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.jsx.mustache +3 -3
  158. package/src/tasks/create/templates/Constellation/Widget/PAGE/{index.jsx.mustache → index.tsx.mustache} +14 -2
  159. package/src/tasks/create/templates/Constellation/Widget/PAGE/styles.ts.mustache +15 -0
  160. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/{Avatar.jsx.mustache → Avatar.tsx.mustache} +21 -10
  161. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/{Operator.jsx.mustache → Operator.tsx.mustache} +30 -9
  162. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/PConnProps.d.ts.mustache +46 -0
  163. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.jsx.mustache +2 -3
  164. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/{index.jsx.mustache → index.tsx.mustache} +25 -4
  165. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/styles.ts.mustache +15 -0
  166. package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.stories.jsx.mustache +3 -3
  167. package/src/tasks/create/templates/Launchpad/Widget/CASE/index.jsx.mustache +0 -2
  168. package/src/tasks/create/templates/Launchpad/Widget/CASE/styles.js.mustache +1 -1
  169. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Avatar.jsx.mustache +2 -4
  170. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Operator.jsx.mustache +1 -2
  171. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.jsx.mustache +2 -3
  172. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.jsx.mustache +1 -2
  173. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/styles.js.mustache +1 -1
  174. package/src/tasks/create-all/index.js +9 -1
  175. package/src/tasks/index.js +1 -1
  176. package/src/tasks/init/helper.js +0 -1
  177. package/src/tasks/init/index.js +31 -16
  178. package/src/tasks/init/template/.eslintrc.json +15 -10
  179. package/src/tasks/init/template/.storybook/main.js +12 -0
  180. package/src/tasks/init/template/.storybook/preview.js +14 -0
  181. package/src/tasks/init/template/package.json.mustache +36 -35
  182. package/src/tasks/publish/helper.js +34 -14
  183. package/src/tasks/publish/index.js +1 -1
  184. package/src/tasks/publish-all/helper.js +42 -16
  185. package/src/tasks/publish-all/index.js +1 -1
  186. package/src/tasks/revert-webpack/index.js +5 -7
  187. package/src/tasks/upgrade/index.js +1 -1
  188. package/src/util.js +68 -44
  189. package/tests/assets/components/create/Pega_DXIL_MyTestText/demo.stories.jsx +17 -11
  190. package/tests/assets/components/create/Pega_DXIL_MyTestText/index.jsx +0 -1
  191. package/tests/assets/components/create/Pega_DXIL_MyTestText/styles.js +1 -1
  192. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/component-constants.js +5 -0
  193. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/config.json +115 -0
  194. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/date.js +161 -0
  195. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/demo.stories.jsx +91 -0
  196. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/embed-utils.js +310 -0
  197. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/format-constants.js +41 -0
  198. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/index.jsx +1042 -0
  199. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/mock.js +69 -0
  200. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/picklist-utils.js +88 -0
  201. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/repeat-constants.js +20 -0
  202. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/repeat-utils.js +657 -0
  203. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/styles.js +15 -0
  204. package/{src/tasks/create/templates/Constellation/Field/Date → tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete}/suggestions-handler.js +0 -1
  205. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/textformat-utils.jsx +161 -0
  206. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/utils.js +182 -0
  207. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/boolean-format.js +1 -1
  208. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.stories.jsx +8 -7
  209. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.jsx +0 -2
  210. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/styles.js +1 -1
  211. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.jsx +22 -12
  212. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/index.jsx +0 -2
  213. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/styles.js +1 -1
  214. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.stories.jsx +23 -12
  215. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.jsx +2 -2
  216. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/styles.js +1 -1
  217. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/suggestions-handler.js +0 -1
  218. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/DateFormatter.js +1 -1
  219. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.jsx +1 -1
  220. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/date.js +0 -2
  221. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.jsx +20 -9
  222. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.jsx +1 -3
  223. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/styles.js +1 -1
  224. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/suggestions-handler.js +0 -1
  225. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-time.js +1 -1
  226. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-utils.js +1 -2
  227. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.js +1 -2
  228. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.jsx +20 -9
  229. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.jsx +1 -3
  230. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/styles.js +1 -1
  231. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/suggestions-handler.js +0 -1
  232. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.stories.jsx +20 -11
  233. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.jsx +1 -2
  234. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/styles.js +1 -1
  235. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/suggestions-handler.js +0 -1
  236. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/StatusWork.jsx +0 -1
  237. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.jsx +2 -4
  238. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/index.jsx +0 -1
  239. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/styles.js +1 -1
  240. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/utils.js +2 -3
  241. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.stories.jsx +20 -12
  242. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.jsx +1 -2
  243. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/styles.js +1 -1
  244. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/suggestions-handler.js +0 -1
  245. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/demo.stories.jsx +15 -21
  246. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.jsx +0 -1
  247. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/styles.js +1 -1
  248. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.stories.jsx +20 -11
  249. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.jsx +2 -3
  250. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/styles.js +1 -1
  251. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/suggestions-handler.js +0 -1
  252. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/GetNextWork.jsx +1 -4
  253. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.jsx +20 -10
  254. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/index.jsx +3 -3
  255. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/styles.js +1 -1
  256. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/utils.js +1 -4
  257. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.jsx +2 -4
  258. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Operator.jsx +2 -3
  259. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.jsx +22 -12
  260. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.jsx +2 -1
  261. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/styles.js +1 -1
  262. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.jsx +4 -7
  263. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.jsx +0 -1
  264. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/styles.js +1 -1
  265. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.stories.jsx +20 -12
  266. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.jsx +1 -2
  267. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/styles.js +1 -1
  268. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/suggestions-handler.js +0 -1
  269. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.stories.jsx +20 -11
  270. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.jsx +1 -2
  271. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/styles.js +1 -1
  272. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/suggestions-handler.js +0 -1
  273. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.stories.jsx +20 -10
  274. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.jsx +1 -2
  275. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/styles.js +1 -1
  276. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/suggestions-handler.js +0 -1
  277. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.stories.jsx +20 -12
  278. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.jsx +3 -3
  279. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/mock.js +69 -0
  280. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/styles.js +1 -1
  281. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/suggestions-handler.js +0 -1
  282. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/config.json +113 -0
  283. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/demo.stories.jsx +91 -0
  284. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/index.jsx +218 -0
  285. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/mock.js +69 -0
  286. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/styles.js +15 -0
  287. package/{src/tasks/create/templates/Constellation/Field/DateTime → tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons}/suggestions-handler.js +0 -1
  288. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +161 -0
  289. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/demo.stories.jsx +17 -11
  290. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.jsx +0 -1
  291. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/styles.js +1 -1
  292. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/StatusWork.jsx +15 -16
  293. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.stories.jsx +20 -10
  294. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.jsx +1 -2
  295. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/styles.js +1 -1
  296. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/suggestions-handler.js +0 -1
  297. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.stories.jsx +18 -8
  298. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.jsx +1 -2
  299. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/styles.js +1 -1
  300. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/suggestions-handler.js +0 -1
  301. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/time-of-day.js +0 -2
  302. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/StatusWork.jsx +0 -1
  303. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +2 -4
  304. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.jsx +0 -1
  305. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/styles.js +1 -1
  306. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/utils.js +0 -4
  307. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +6 -11
  308. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.jsx +0 -1
  309. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/styles.js +1 -1
  310. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/demo.stories.jsx +20 -10
  311. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/index.jsx +1 -2
  312. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/styles.js +1 -1
  313. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/suggestions-handler.js +0 -1
  314. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/text-url.jsx +2 -1
  315. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/component-constants.js +5 -0
  316. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/config.json +115 -0
  317. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/date.js +161 -0
  318. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/demo.stories.jsx +89 -0
  319. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/embed-utils.js +310 -0
  320. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/format-constants.js +41 -0
  321. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/index.jsx +1042 -0
  322. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/mock.js +69 -0
  323. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/picklist-utils.js +88 -0
  324. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/repeat-constants.js +20 -0
  325. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/repeat-utils.js +657 -0
  326. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/styles.js +15 -0
  327. package/{src/tasks/create/templates/Constellation/Field/Decimal-Percentage → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete}/suggestions-handler.js +0 -1
  328. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/textformat-utils.jsx +161 -0
  329. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/utils.js +182 -0
  330. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/boolean-format.js +1 -1
  331. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.stories.jsx +8 -7
  332. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.jsx +0 -2
  333. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/styles.js +1 -1
  334. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.stories.jsx +22 -14
  335. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/index.jsx +0 -2
  336. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/styles.js +1 -1
  337. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.stories.jsx +23 -13
  338. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.jsx +2 -2
  339. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/styles.js +1 -1
  340. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/suggestions-handler.js +0 -1
  341. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/DateFormatter.js +1 -1
  342. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.jsx +1 -1
  343. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/date.js +0 -2
  344. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.jsx +21 -10
  345. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.jsx +1 -3
  346. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/styles.js +1 -1
  347. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/suggestions-handler.js +0 -1
  348. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-time.js +1 -1
  349. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.js +1 -2
  350. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date.js +1 -2
  351. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.jsx +21 -10
  352. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.jsx +1 -3
  353. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/styles.js +1 -1
  354. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/suggestions-handler.js +0 -1
  355. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.stories.jsx +20 -12
  356. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.jsx +1 -2
  357. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/styles.js +1 -1
  358. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/suggestions-handler.js +0 -1
  359. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/StatusWork.jsx +0 -1
  360. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.jsx +5 -6
  361. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.jsx +0 -1
  362. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/styles.js +1 -1
  363. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/utils.js +2 -3
  364. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.stories.jsx +20 -12
  365. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.jsx +1 -2
  366. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/styles.js +1 -1
  367. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/suggestions-handler.js +0 -1
  368. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.stories.jsx +23 -24
  369. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.jsx +0 -1
  370. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/styles.js +1 -1
  371. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.stories.jsx +20 -12
  372. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.jsx +2 -3
  373. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/styles.js +1 -1
  374. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/suggestions-handler.js +0 -1
  375. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/GetNextWork.jsx +1 -4
  376. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.jsx +20 -11
  377. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/index.jsx +3 -3
  378. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/styles.js +1 -1
  379. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.js +1 -4
  380. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Avatar.jsx +2 -4
  381. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Operator.jsx +1 -2
  382. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.jsx +23 -15
  383. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.jsx +1 -2
  384. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/styles.js +1 -1
  385. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.jsx +4 -9
  386. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/index.jsx +0 -1
  387. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/styles.js +1 -1
  388. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.stories.jsx +20 -12
  389. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.jsx +1 -2
  390. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/styles.js +1 -1
  391. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/suggestions-handler.js +0 -1
  392. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.stories.jsx +20 -12
  393. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.jsx +1 -2
  394. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/styles.js +1 -1
  395. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/suggestions-handler.js +0 -1
  396. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.stories.jsx +20 -11
  397. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.jsx +1 -2
  398. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/styles.js +1 -1
  399. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/suggestions-handler.js +0 -1
  400. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.stories.jsx +20 -12
  401. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.jsx +3 -3
  402. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/mock.js +69 -0
  403. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/styles.js +1 -1
  404. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/suggestions-handler.js +0 -1
  405. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/config.json +113 -0
  406. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/demo.stories.jsx +89 -0
  407. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/index.jsx +218 -0
  408. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/mock.js +69 -0
  409. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/styles.js +15 -0
  410. package/{src/tasks/create/templates/Constellation/Field/Decimal-Currency → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons}/suggestions-handler.js +0 -1
  411. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +161 -0
  412. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.jsx +17 -11
  413. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.jsx +0 -1
  414. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/styles.js +1 -1
  415. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/StatusWork.jsx +15 -16
  416. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.stories.jsx +20 -12
  417. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.jsx +1 -2
  418. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/styles.js +1 -1
  419. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/suggestions-handler.js +0 -1
  420. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.stories.jsx +18 -9
  421. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.jsx +1 -2
  422. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/styles.js +1 -1
  423. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/suggestions-handler.js +0 -1
  424. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.js +0 -2
  425. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/StatusWork.jsx +0 -1
  426. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +5 -6
  427. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.jsx +0 -1
  428. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/styles.js +1 -1
  429. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.js +0 -4
  430. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +14 -14
  431. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.jsx +0 -1
  432. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/styles.js +1 -1
  433. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.stories.jsx +20 -11
  434. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/index.jsx +1 -2
  435. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/styles.js +1 -1
  436. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/suggestions-handler.js +0 -1
  437. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/text-url.jsx +2 -1
  438. package/src/tasks/create/templates/Constellation/Field/Decimal/styles.js.mustache +0 -15
  439. package/src/tasks/create/templates/Constellation/Field/Decimal/suggestions-handler.js +0 -10
  440. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.js.mustache +0 -15
  441. package/src/tasks/create/templates/Constellation/Field/Integer/event-utils.js.mustache +0 -18
  442. package/src/tasks/create/templates/Constellation/Field/Integer/styles.js.mustache +0 -15
  443. package/src/tasks/create/templates/Constellation/Field/Integer/suggestions-handler.js +0 -10
  444. package/src/tasks/create/templates/Constellation/Field/Picklist/event-utils.js.mustache +0 -18
  445. package/src/tasks/create/templates/Constellation/Field/Picklist/styles.js.mustache +0 -15
  446. package/src/tasks/create/templates/Constellation/Field/Picklist/suggestions-handler.js +0 -10
  447. package/src/tasks/create/templates/Constellation/Field/Text/styles.js.mustache +0 -15
  448. package/src/tasks/create/templates/Constellation/Field/Text-Email/event-utils.js.mustache +0 -18
  449. package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.js.mustache +0 -15
  450. package/src/tasks/create/templates/Constellation/Field/Text-Email/suggestions-handler.js +0 -10
  451. package/src/tasks/create/templates/Constellation/Field/Text-Input/event-utils.js.mustache +0 -18
  452. package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.js.mustache +0 -15
  453. package/src/tasks/create/templates/Constellation/Field/Text-Input/suggestions-handler.js +0 -10
  454. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/event-utils.js.mustache +0 -18
  455. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.js.mustache +0 -15
  456. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/suggestions-handler.js +0 -10
  457. package/src/tasks/create/templates/Constellation/Field/Text-Phone/event-utils.js.mustache +0 -18
  458. package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.js.mustache +0 -15
  459. package/src/tasks/create/templates/Constellation/Field/Text-Phone/suggestions-handler.js +0 -10
  460. package/src/tasks/create/templates/Constellation/Field/Text-URL/event-utils.js.mustache +0 -18
  461. package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.js.mustache +0 -15
  462. package/src/tasks/create/templates/Constellation/Field/Text-URL/suggestions-handler.js +0 -10
  463. package/src/tasks/create/templates/Constellation/Field/TimeofDay/styles.js.mustache +0 -15
  464. package/src/tasks/create/templates/Constellation/Field/TimeofDay/suggestions-handler.js +0 -10
  465. package/src/tasks/create/templates/Constellation/Template/DETAILS/StatusWork.jsx.mustache +0 -27
  466. package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.js.mustache +0 -15
  467. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.js.mustache +0 -15
  468. package/src/tasks/create/templates/Constellation/Template/FORM/styles.js.mustache +0 -15
  469. package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.js.mustache +0 -15
  470. package/src/tasks/create/templates/Constellation/Template/PAGE/styles.js.mustache +0 -15
  471. package/src/tasks/create/templates/Constellation/Widget/CASE/styles.js.mustache +0 -15
  472. package/src/tasks/create/templates/Constellation/Widget/PAGE/styles.js.mustache +0 -15
  473. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/styles.js.mustache +0 -15
  474. package/src/tasks/init/template/.storybook/main.cjs +0 -6
  475. package/src/tasks/init/template/.storybook/package.json +0 -1
  476. package/src/tasks/init/template/.storybook/preview.tsx +0 -44
  477. /package/src/tasks/{build → build-comp}/helper.js +0 -0
  478. /package/src/tasks/create/templates/Constellation/Field/Boolean/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  479. /package/src/tasks/create/templates/Constellation/Field/Date/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  480. /package/src/tasks/create/templates/Constellation/Field/DateTime/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  481. /package/src/tasks/create/templates/Constellation/Field/Decimal/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  482. /package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  483. /package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  484. /package/src/tasks/create/templates/Constellation/Field/Integer/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  485. /package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/mock.stories.js → src/tasks/create/templates/Constellation/Field/Picklist/mock.js.mustache} +0 -0
  486. /package/src/tasks/create/templates/Constellation/Field/{Picklist/mock.stories.js.mustache → Picklist-Autocomplete/mock.js.mustache} +0 -0
  487. /package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/mock.stories.js → src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/mock.js.mustache} +0 -0
  488. /package/src/tasks/create/templates/Constellation/Field/Text/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  489. /package/src/tasks/create/templates/Constellation/Field/Text-Email/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  490. /package/src/tasks/create/templates/Constellation/Field/Text-Input/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  491. /package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  492. /package/src/tasks/create/templates/Constellation/Field/Text-Phone/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  493. /package/src/tasks/create/templates/Constellation/Field/Text-URL/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  494. /package/src/tasks/create/templates/Constellation/Field/{TimeofDay → TimeOfDay}/config.json.mustache +0 -0
  495. /package/src/tasks/create/templates/Constellation/Field/{TimeofDay/mock.stories.js.mustache → TimeOfDay/mock.js.mustache} +0 -0
  496. /package/src/tasks/create/templates/Constellation/Template/DETAILS/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  497. /package/src/tasks/create/templates/Constellation/Template/DETAILS-region/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  498. /package/src/tasks/create/templates/Constellation/Template/FORM/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  499. /package/src/tasks/create/templates/Constellation/Template/FORM-region/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  500. /package/src/tasks/create/templates/Constellation/Template/PAGE/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  501. /package/src/tasks/create/templates/Constellation/Widget/CASE/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  502. /package/src/tasks/create/templates/Constellation/Widget/PAGE/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  503. /package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  504. /package/src/tasks/create/templates/Launchpad/Widget/CASE/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  505. /package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/{mock.stories.js.mustache → mock.js.mustache} +0 -0
  506. /package/tests/assets/components/create/Pega_DXIL_MyTestText/{mock.stories.js → mock.js} +0 -0
  507. /package/{src/tasks/create/templates/Constellation/Field/Boolean/event-utils.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/event-utils.js} +0 -0
  508. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/{mock.stories.js → mock.js} +0 -0
  509. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/{mock.stories.js → mock.js} +0 -0
  510. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/{mock.stories.js → mock.js} +0 -0
  511. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/{mock.stories.js → mock.js} +0 -0
  512. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/{mock.stories.js → mock.js} +0 -0
  513. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/{mock.stories.js → mock.js} +0 -0
  514. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/{mock.stories.js → mock.js} +0 -0
  515. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/{mock.stories.js → mock.js} +0 -0
  516. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/{mock.stories.js → mock.js} +0 -0
  517. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/{mock.stories.js → mock.js} +0 -0
  518. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/{mock.stories.js → mock.js} +0 -0
  519. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/{mock.stories.js → mock.js} +0 -0
  520. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/{mock.stories.js → mock.js} +0 -0
  521. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/{mock.stories.js → mock.js} +0 -0
  522. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/{mock.stories.js → mock.js} +0 -0
  523. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/{mock.stories.js → mock.js} +0 -0
  524. /package/{src/tasks/create/templates/Constellation/Field/Decimal-Currency/event-utils.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/event-utils.js} +0 -0
  525. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/{mock.stories.js → mock.js} +0 -0
  526. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/{mock.stories.js → mock.js} +0 -0
  527. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/{mock.stories.js → mock.js} +0 -0
  528. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/{mock.stories.js → mock.js} +0 -0
  529. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/{mock.stories.js → mock.js} +0 -0
  530. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/{mock.stories.js → mock.js} +0 -0
  531. /package/{src/tasks/create/templates/Constellation/Field/Decimal-Percentage/event-utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/event-utils.js} +0 -0
  532. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/{mock.stories.js → mock.js} +0 -0
  533. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/{mock.stories.js → mock.js} +0 -0
  534. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/{mock.stories.js → mock.js} +0 -0
  535. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/{mock.stories.js → mock.js} +0 -0
  536. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/{mock.stories.js → mock.js} +0 -0
  537. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/{mock.stories.js → mock.js} +0 -0
  538. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/{mock.stories.js → mock.js} +0 -0
  539. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/{mock.stories.js → mock.js} +0 -0
  540. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/{mock.stories.js → mock.js} +0 -0
  541. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/{mock.stories.js → mock.js} +0 -0
  542. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/{mock.stories.js → mock.js} +0 -0
  543. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/{mock.stories.js → mock.js} +0 -0
  544. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/{mock.stories.js → mock.js} +0 -0
  545. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/{mock.stories.js → mock.js} +0 -0
  546. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/{mock.stories.js → mock.js} +0 -0
  547. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/{mock.stories.js → mock.js} +0 -0
  548. /package/{src/tasks/create/templates/Constellation/Field/Decimal/event-utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/event-utils.js} +0 -0
  549. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/{mock.stories.js → mock.js} +0 -0
  550. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/{mock.stories.js → mock.js} +0 -0
  551. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/{mock.stories.js → mock.js} +0 -0
  552. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/{mock.stories.js → mock.js} +0 -0
  553. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/{mock.stories.js → mock.js} +0 -0
  554. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/{mock.stories.js → mock.js} +0 -0
@@ -0,0 +1,161 @@
1
+ /* eslint-disable @typescript-eslint/no-shadow */
2
+ import dayjs from 'dayjs';
3
+ import relativeTime from 'dayjs/plugin/relativeTime.js';
4
+ import localizedFormat from 'dayjs/plugin/localizedFormat.js';
5
+ import utc from 'dayjs/plugin/utc.js';
6
+ import tzone from 'dayjs/plugin/timezone.js';
7
+ import { formatDateTime, parseToDate } from '@pega/cosmos-react-core';
8
+
9
+ import formatConstants from './format-constants.js';
10
+
11
+ dayjs.extend(relativeTime);
12
+ dayjs.extend(localizedFormat);
13
+ dayjs.extend(utc);
14
+ dayjs.extend(tzone);
15
+
16
+ export const COSMOS_FORMAT_CONSTANTS = {
17
+ SHORT: 'short',
18
+ LONG: 'long'
19
+ };
20
+
21
+ export const COSMOS_VARIANT_CONSTANTS = {
22
+ DATE_TIME: 'datetime',
23
+ DATE: 'date',
24
+ RELATIVE: 'relative',
25
+ TIME: 'time'
26
+ };
27
+
28
+ export const DATE_TYPES = {
29
+ DATE: 'date',
30
+ DATE_TIME: 'datetime',
31
+ TIME: 'time'
32
+ };
33
+
34
+ const constellationToCosmosFormatterMap = new Map([
35
+ [
36
+ DATE_TYPES.DATE,
37
+ new Map([
38
+ [
39
+ formatConstants.DateTimeLong,
40
+ { format: COSMOS_FORMAT_CONSTANTS.LONG, variant: COSMOS_VARIANT_CONSTANTS.DATE_TIME }
41
+ ],
42
+ [
43
+ formatConstants.DateTimeShort,
44
+ { format: COSMOS_FORMAT_CONSTANTS.SHORT, variant: COSMOS_VARIANT_CONSTANTS.DATE }
45
+ ],
46
+ [
47
+ formatConstants.DateTimeSince,
48
+ { format: COSMOS_FORMAT_CONSTANTS.SHORT, variant: COSMOS_VARIANT_CONSTANTS.RELATIVE }
49
+ ],
50
+ [formatConstants.DateDefault, { format: COSMOS_FORMAT_CONSTANTS.LONG, variant: COSMOS_VARIANT_CONSTANTS.DATE }]
51
+ ])
52
+ ],
53
+ [
54
+ DATE_TYPES.TIME,
55
+ new Map([
56
+ [formatConstants.TimeDefault, { format: COSMOS_FORMAT_CONSTANTS.SHORT, variant: COSMOS_VARIANT_CONSTANTS.TIME }],
57
+ [formatConstants.TimeOnly, { format: COSMOS_FORMAT_CONSTANTS.LONG, variant: COSMOS_VARIANT_CONSTANTS.TIME }]
58
+ ])
59
+ ],
60
+ [
61
+ DATE_TYPES.DATE_TIME,
62
+ new Map([
63
+ [
64
+ formatConstants.DateTimeDefault,
65
+ { format: COSMOS_FORMAT_CONSTANTS.SHORT, variant: COSMOS_VARIANT_CONSTANTS.DATE_TIME }
66
+ ],
67
+ [
68
+ formatConstants.DateTimeShort,
69
+ { format: COSMOS_FORMAT_CONSTANTS.SHORT, variant: COSMOS_VARIANT_CONSTANTS.DATE }
70
+ ],
71
+ [
72
+ formatConstants.DateTimeSince,
73
+ { format: COSMOS_FORMAT_CONSTANTS.SHORT, variant: COSMOS_VARIANT_CONSTANTS.RELATIVE }
74
+ ],
75
+ [
76
+ formatConstants.DateTimeLong,
77
+ { format: COSMOS_FORMAT_CONSTANTS.LONG, variant: COSMOS_VARIANT_CONSTANTS.DATE_TIME }
78
+ ],
79
+ [formatConstants.TimeOnly, { format: COSMOS_FORMAT_CONSTANTS.SHORT, variant: COSMOS_VARIANT_CONSTANTS.TIME }]
80
+ ])
81
+ ]
82
+ ]);
83
+ const types = ['fromNow', 'customFormat'];
84
+
85
+ // value should be in ISO 8601 format.
86
+ // eslint-disable-next-line no-shadow
87
+ function DateFormatter(value, { type = types[1], format = 'DD/MM/YYYY', timezone, fieldType } = {}) {
88
+ if (!value) return value;
89
+ switch (type) {
90
+ case types[1]:
91
+ if (timezone && !(fieldType === 'Date' || fieldType === 'Date only'))
92
+ return dayjs(value).tz(timezone).format(format); // Date only value should be formatted without timezone
93
+ return dayjs(value).format(format);
94
+ case types[0]:
95
+ return dayjs(value).from(dayjs());
96
+ default:
97
+ return value;
98
+ }
99
+ }
100
+ // value should be in hh:mm:ss format (00:00:00 - 23:59:59).
101
+ // function TimeFormatter(value, options) {
102
+ // if (!value) return value;
103
+ // const { locale = 'en-US' } = options;
104
+ // const timeOnlyRegex = /^(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)$/;
105
+ // if (value.length === 8 && timeOnlyRegex.test(value)) {
106
+ // const { timeOptions = {} } = options;
107
+ // const tempDate = new Date();
108
+ // const hours = parseInt(value.substr(0, 2), 10);
109
+ // const minutes = parseInt(value.substr(3, 2), 10);
110
+ // const seconds = parseInt(value.substr(6, 2), 10);
111
+ // tempDate.setHours(hours);
112
+ // tempDate.setMinutes(minutes);
113
+ // tempDate.setSeconds(seconds);
114
+ // return tempDate.toLocaleTimeString(locale, timeOptions);
115
+ // }
116
+ // return DateFormatter(value, options);
117
+ // }
118
+
119
+ // function DateTimeShortFormatter(value, options) {
120
+ // return DateFormatter(value, {
121
+ // ...options,
122
+ // type: 'customFormat',
123
+ // format: 'MMM DD, YYYY'
124
+ // });
125
+ // }
126
+
127
+ export function format(value, options) {
128
+ if (!value) return null;
129
+ const { type, locale, timezone, formatter, translate } = options;
130
+ // eslint-disable-next-line no-shadow
131
+ const { format, variant } = constellationToCosmosFormatterMap.get(type).get(formatter);
132
+ return formatDateTime(parseToDate(value), {
133
+ t: translate,
134
+ locale,
135
+ format,
136
+ variant,
137
+ timeZone: type === DATE_TYPES.DATE_TIME ? timezone : 'UTC'
138
+ });
139
+ }
140
+
141
+ export default {
142
+ 'DateTime-Long': (value, options) => format(value, { ...options, formatter: 'DateTime-Long' }),
143
+ 'DateTime-Short': (value, options) => format(value, { ...options, formatter: 'DateTime-Short' }),
144
+ 'DateTime-Since': (value, options) => format(value, { ...options, formatter: 'DateTime-Since' }),
145
+ 'Time-Only': (value, options) => format(value, { ...options, formatter: 'Time-Only' }),
146
+ convertToTimezone: (value, options) => {
147
+ return value && options && options.timezone
148
+ ? DateFormatter(value, {
149
+ ...options,
150
+ type: 'customFormat',
151
+ format: 'YYYY-MM-DDTHH:mm:ss'
152
+ })
153
+ : value;
154
+ },
155
+ convertFromTimezone: (value, timezone) =>
156
+ value && timezone ? dayjs.tz(value, timezone).utc().format('YYYY-MM-DDTHH:mm:ss[Z]') : value,
157
+ Date: (value, options) => DateFormatter(value, { type: 'customFormat', ...options }),
158
+ 'Date-Default': (value, options) => format(value, { ...options, formatter: 'Date-Default' }),
159
+ 'Date-Time-Default': (value, options) => format(value, { ...options, formatter: 'Date-Time-Default' }),
160
+ 'Time-Default': (value, options) => format(value, { ...options, formatter: 'Time-Default' })
161
+ };
@@ -0,0 +1,90 @@
1
+
2
+ /* eslint-disable storybook/prefer-pascal-case */
3
+ /* eslint-disable react/jsx-no-useless-fragment */
4
+ import { useState } from 'react';
5
+ import { withKnobs } from '@storybook/addon-knobs';
6
+
7
+ import { configProps, rawMetadata, fieldMetadata, stateProps } from './mock.js';
8
+
9
+ import {{COMPONENT_CLASS_NAME}} from './index.jsx';
10
+
11
+ export default {
12
+ title: '{{COMPONENT_CLASS_NAME}}',
13
+ decorators: [withKnobs],
14
+ component: {{COMPONENT_CLASS_NAME}}
15
+ };
16
+
17
+ export const Base{{COMPONENT_CLASS_NAME}} = () => {
18
+ // eslint-disable-next-line react-hooks/rules-of-hooks
19
+ const [value, setValue] = useState(configProps.value);
20
+ const datasourceMetadata = fieldMetadata;
21
+
22
+ const props = {
23
+ value,
24
+ placeholder: configProps.placeholder,
25
+ label: configProps.label,
26
+ helperText: configProps.helperText,
27
+ datasource: configProps.datasource,
28
+ testId: configProps.testId,
29
+ hasSuggestions: configProps.hasSuggestions,
30
+ columns: [],
31
+ isTableFormatter: false,
32
+ listType: 'associated',
33
+ parameters: {},
34
+ datasourceMetadata,
35
+ fieldMetadata,
36
+
37
+ getPConnect: () => {
38
+ return {
39
+ getConfigProps: () => {
40
+ return configProps;
41
+ },
42
+ getStateProps: () => {
43
+ return stateProps;
44
+ },
45
+ getContextName: () => {
46
+ return 'app/primary_1';
47
+ },
48
+ getLocalizedValue: val => {
49
+ return val;
50
+ },
51
+ getLocaleRuleNameFromKeys: (localeClass, localeContext, localeName) => {
52
+ return `${localeClass}!${localeContext}!${localeName}`;
53
+ },
54
+ getCaseInfo: () => {
55
+ return {
56
+ getClassName: () => {
57
+ return 'DIXL-MediaCo-Work-NewService';
58
+ }
59
+ };
60
+ },
61
+ getRawMetadata: () => {
62
+ return rawMetadata;
63
+ },
64
+ getActionsApi: () => {
65
+ return {
66
+ updateFieldValue: (propName, theValue) => {
67
+ setValue(theValue);
68
+ },
69
+ triggerFieldChange: () => {/* nothing */}
70
+ };
71
+ },
72
+ getValidationApi: () => {
73
+ return {
74
+ validate: () => {/* nothing */}
75
+ };
76
+ },
77
+ ignoreSuggestion: () => {/* nothing */},
78
+ acceptSuggestion: () => {/* nothing */},
79
+ setInheritedProps: () => {/* nothing */},
80
+ resolveConfigProps: () => {/* nothing */}
81
+ };
82
+ }
83
+ };
84
+
85
+ return (
86
+ <>
87
+ <{{COMPONENT_CLASS_NAME}} {...props} />
88
+ </>
89
+ );
90
+ };
@@ -0,0 +1,310 @@
1
+ import { isEmbeddedField, isPageListInPath, PAGE, PAGELIST, buildAggOrCalcId } from './repeat-utils.js';
2
+
3
+ export const AT_FILTEREDLIST = '@FILTERED_LIST';
4
+ export const AT_PROPERTY = '@P';
5
+
6
+ /**
7
+ * [getFieldNameFromEmbeddedFieldName]
8
+ * Description - converting embeddedField name starting with !P! or !PL! to normal field
9
+ * @ignore
10
+ * @param {string} propertyName EmbeddedField name starting with !P! or !PL!
11
+ * @returns {string} returns converted string without !P! or !PL! and :
12
+ *
13
+ * @example <caption>Example for getFieldNameFromEmbeddedFieldName </caption>
14
+ * getFieldNameFromEmbeddedFieldName('!P!Organisation:Name') return 'Organisation.Name'
15
+ * getFieldNameFromEmbeddedFieldName('!PL!Employees:Name') return 'Employees.Name'
16
+ */
17
+ export function getFieldNameFromEmbeddedFieldName(propertyName) {
18
+ let value = propertyName;
19
+ if (value.startsWith(PAGE) || value.startsWith(PAGELIST)) {
20
+ value = value.substring(value.lastIndexOf('!') + 1);
21
+ value = value.replace(/:/g, '.');
22
+ }
23
+ return value;
24
+ }
25
+ /**
26
+ * [getEmbeddedFieldName]
27
+ * Description - converting normal field name to embedded field starting with !P! or !PL!
28
+ * @ignore
29
+ * @param {string} propertyName Field name
30
+ * @param {string} classID classID of datapage
31
+ * @returns {string} returns converted string with !P! or !PL! and :
32
+ *
33
+ * @example <caption>Example for getEmbeddedFieldName </caption>
34
+ * For page property, getEmbeddedFieldName('Organisation.Name') return '!P!Organisation:Name'
35
+ * For pageList property, getEmbeddedFieldName('Employees.Name') return '!PL!Employees:Name'
36
+ */
37
+
38
+ export function getEmbeddedFieldName(propertyName, classID) {
39
+ let value = propertyName;
40
+ if (isPageListInPath(value, classID)) {
41
+ value = `!PL!${value.replace(/\./g, ':')}`;
42
+ } else {
43
+ value = `!P!${value.replace(/\./g, ':')}`;
44
+ }
45
+ return value;
46
+ }
47
+
48
+ /**
49
+ * [updateMetaEmbeddedFieldID]
50
+ * Description - If the fieldID in meta starts with '!P!' or '!PL!' and contains ':' then replace them with .(dot)
51
+ * @ignore
52
+ * @param {Array} metaFields Fields metadata Array. Contains metadata of all the fields.
53
+ */
54
+ export function updateMetaEmbeddedFieldID(metaFields) {
55
+ return metaFields.forEach((metaField) => {
56
+ if (metaField.fieldID?.startsWith(PAGE) || metaField.fieldID?.startsWith(PAGELIST)) {
57
+ metaField.fieldID = getFieldNameFromEmbeddedFieldName(metaField.fieldID);
58
+ }
59
+ });
60
+ }
61
+
62
+ /**
63
+ * [getConfigEmbeddedFieldsMeta]
64
+ * Description - Get the metadata for configured embedded fields
65
+ * @ignore
66
+ * @param {Set} configFields Set of config fields
67
+ * @param {string} classID clasID of datapage
68
+ * @returns {Array} Metadata of configured embedded fields
69
+ */
70
+ export function getConfigEmbeddedFieldsMeta(configFields, classID) {
71
+ const configEmbeddedFieldsMeta = [];
72
+ configFields.forEach((field) => {
73
+ let value = field;
74
+ if (isEmbeddedField(value)) {
75
+ // conversion Page.PageList[].property => Page.PageList.property
76
+ if (value.includes('[')) {
77
+ value = value.substring(0, value.indexOf('[')) + value.substring(value.indexOf(']') + 1);
78
+ }
79
+ const meta = PCore.getMetadataUtils().getEmbeddedPropertyMetadata(value, classID);
80
+ meta.fieldID = field;
81
+ configEmbeddedFieldsMeta.push(meta);
82
+ }
83
+ });
84
+ return configEmbeddedFieldsMeta;
85
+ }
86
+
87
+ /**
88
+ * [mergeConfigEmbeddedFieldsMeta]
89
+ * Description - Get the metadata for configured embedded fields
90
+ * @ignore
91
+ * @param {Array} configEmbeddedFieldsMeta config fields metadata.
92
+ * @param {Array} metaFields Fields metadata Array. Contains metadata of all the fields
93
+ */
94
+ export function mergeConfigEmbeddedFieldsMeta(configEmbeddedFieldsMeta, metaFields) {
95
+ const mergedMetaFields = [...metaFields];
96
+ configEmbeddedFieldsMeta.forEach((configFieldMeta) => {
97
+ const fieldMeta = metaFields.find((metaField) => metaField.fieldID === configFieldMeta.fieldID);
98
+ if (!fieldMeta) mergedMetaFields.push(configFieldMeta);
99
+ });
100
+ return mergedMetaFields;
101
+ }
102
+
103
+ /**
104
+ * [preparePropertyValue]
105
+ * Description - Preparing pageList value from FILTERED_LIST annotation to Property annotation
106
+ * @ignore
107
+ * @param {string} value Pagelist value starts with FILTERED_LIST annotation
108
+ * @returns {string} returns converted string starting with Property annotation
109
+ *
110
+ * @example <caption>Example for preparePropertyValue </caption>
111
+ * preparePropertyValue('@FILTERED_LIST .Employees[].Name') return '@P .Employees.Name'
112
+ */
113
+ // FIXME #EmbeddedPropertyPatch
114
+ // TODO: Remove this utility when we have nested response for queryable pageList and supports @FILTERED_LIST annotation
115
+ export function preparePropertyValue(value) {
116
+ if (value.startsWith(AT_FILTEREDLIST)) {
117
+ value = value.substring(value.indexOf(' ') + 1);
118
+ value = value.substring(0, value.indexOf('[')) + value.substring(value.indexOf(']') + 1);
119
+ value = `${AT_PROPERTY} ${value}`;
120
+ }
121
+ return value;
122
+ }
123
+
124
+ /**
125
+ * [updatePageListFieldsConfig]
126
+ * Description - updating configured pageList property's type and value
127
+ * @ignore
128
+ * @param {Array} configFields configured fields
129
+ *
130
+ * @example <caption>Modified config pageListField </caption>
131
+ *
132
+ {
133
+ "type": "ScalarList",
134
+ "config": {
135
+ "value": "@FILTERED_LIST .Employees[].Name",
136
+ "label": "@L Emp_Name",
137
+ "componentType": "TextInput",
138
+ "readOnly": true
139
+ }
140
+ }
141
+ modified to
142
+ {
143
+ "type": "TextInput",
144
+ "config": {
145
+ "value": "@P .Employees.Name",
146
+ "label": "@L Emp_Name",
147
+ "componentType": "TextInput",
148
+ "readOnly": true
149
+ }
150
+ }
151
+ */
152
+ // FIXME #EmbeddedPropertyPatch
153
+ // TODO: Remove this utility when we have nested response for queryable pageList and supports scalarList component
154
+ export function updatePageListFieldsConfig(configFields) {
155
+ return configFields.forEach((item) => {
156
+ if (item.type === 'ScalarList') {
157
+ if (!item.config.originalValue) {
158
+ item.config.originalValue = item.config.value;
159
+ }
160
+ item.config.value = preparePropertyValue(item.config.value);
161
+ }
162
+ });
163
+ }
164
+
165
+ /**
166
+ * Update the renderer type for the properties of type Page.
167
+ */
168
+ export function updatePageFieldsConfig(configFields, parentClassID) {
169
+ return configFields.forEach((item) => {
170
+ const {
171
+ type,
172
+ config: { value }
173
+ } = item;
174
+ const propertyName = PCore.getAnnotationUtils().getPropertyName(value);
175
+ if (isEmbeddedField(value) && !isPageListInPath(propertyName, parentClassID)) {
176
+ item.config.componentType = type;
177
+ item.type = 'PagePropertyRenderer';
178
+ }
179
+ });
180
+ }
181
+
182
+ export function updateChangeSetValueKeys(changeSetObj, getOriginalProperty) {
183
+ const newChangeSetObject = {};
184
+ for (const [key, value] of Object.entries(changeSetObj)) {
185
+ let newKey = key;
186
+ if (newKey.startsWith(PAGE)) {
187
+ newKey = `.${getOriginalProperty(newKey)}`;
188
+ }
189
+ newChangeSetObject[newKey] = value;
190
+ }
191
+ return newChangeSetObject;
192
+ }
193
+
194
+ /**
195
+ * [isPageListProperty]
196
+ * Description - checking if propertyName is pageList or not
197
+ * @ignore
198
+ * @param {string} propertyName PropertyName
199
+ * @returns {boolean} true if property is pageList else false
200
+ *
201
+ * @example <caption>Example for isPageListProperty </caption>
202
+ * isPageListProperty('!PL!Employees.Name') return true
203
+ * isPageListProperty('!P!Employees.Name') return false
204
+ * isPageListProperty('Name') return false
205
+ */
206
+ export function isPageListProperty(propertyName) {
207
+ return propertyName.startsWith(PAGELIST);
208
+ }
209
+
210
+ /**
211
+ * [preparePropertyMaps]
212
+ * Description - preparing maps for property names and set it in dataApi context
213
+ * @ignore
214
+ * @param {Array} fields fields array
215
+ * @param {string} classID classID of datapage
216
+ * @param {string} context dataApi context
217
+ * @returns {boolean} true if pageListProperty is present
218
+ */
219
+ export function preparePropertyMaps(fields, classID, context) {
220
+ const { setPropertyMaps } = context;
221
+ const maps = fields.reduce(
222
+ (acc, field) => {
223
+ let { value } = field.config;
224
+ if (value.startsWith('@')) {
225
+ value = value.substring(value.indexOf(' ') + 1);
226
+ if (value[0] === '.') value = value.substring(1);
227
+ }
228
+ let name = value;
229
+ // Preparing name for embedded property
230
+ if (isEmbeddedField(name)) {
231
+ name = getEmbeddedFieldName(name, classID);
232
+ }
233
+ if (isPageListProperty(name) && !acc[2]) {
234
+ acc[2] = true;
235
+ }
236
+ acc[0][value] = name;
237
+ acc[1][name] = value;
238
+
239
+ return acc;
240
+ },
241
+ [{}, {}, false]
242
+ );
243
+ setPropertyMaps(maps[0], maps[1]);
244
+ return maps[2];
245
+ }
246
+
247
+ /**
248
+ * [getPageListFields]
249
+ * Description - getting pageListFields names from the fields
250
+ * @ignore
251
+ * @param {Array} fields fields array
252
+ * @returns {Array} array of pageListFields name
253
+ */
254
+ // FIXME #EmbeddedPropertyPatch
255
+ // TODO: Remove this utility when we have nested response for queryable pageList property
256
+ export function getPageListFields(fields) {
257
+ const parentPaths = new Set();
258
+ const pageListFields = [];
259
+ fields.forEach((field) => {
260
+ const { name } = field;
261
+ if (isPageListProperty(name)) {
262
+ const parentPath = name.substring(0, name.lastIndexOf(':'));
263
+ if (!parentPaths.has(parentPath)) {
264
+ parentPaths.add(parentPath);
265
+ pageListFields.push(name);
266
+ }
267
+ }
268
+ });
269
+ return pageListFields;
270
+ }
271
+
272
+ export function mergePageListFieldAggregation(pageListName, select, existingAggregations, existingAggregationsName) {
273
+ // Build a dummy genericAggregationId to check if any type of aggregation for that pagelist is included in existing aggregations.
274
+ const genericAggregationId = buildAggOrCalcId(pageListName, '');
275
+ if (existingAggregationsName.includes(genericAggregationId)) {
276
+ return;
277
+ }
278
+ const countAggregationId = buildAggOrCalcId(pageListName, 'COUNT');
279
+ select.push({ aggregation: countAggregationId });
280
+ existingAggregations[countAggregationId] = { field: pageListName, summaryFunction: 'COUNT' };
281
+ }
282
+
283
+ export function mergePageListFieldsAggregation(fields, select, existingAggregations) {
284
+ const parentPaths = new Set();
285
+ const existingAggregationsName = Object.keys(existingAggregations).toString();
286
+ const pageListFields = [];
287
+ fields.forEach((field) => {
288
+ const { name } = field;
289
+ if (isPageListProperty(name)) {
290
+ const parentPath = name.substring(0, name.lastIndexOf(':'));
291
+ if (!parentPaths.has(parentPath)) {
292
+ parentPaths.add(parentPath);
293
+ pageListFields.push(name);
294
+ mergePageListFieldAggregation(name, select, existingAggregations, existingAggregationsName);
295
+ }
296
+ }
297
+ });
298
+ return pageListFields;
299
+ }
300
+
301
+ /**
302
+ * [hasPageListProperty]
303
+ * Description - getting pageListFields names from the fields
304
+ * @ignore
305
+ * @param {Array} fieldDefs fields array
306
+ * @returns {object | undefined} value of first pageListProperty found
307
+ */
308
+ export function hasPageListProperty(fieldDefs) {
309
+ return fieldDefs?.find((field) => isPageListProperty(field.name));
310
+ }
@@ -0,0 +1,18 @@
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;
@@ -0,0 +1,41 @@
1
+ // Constellation standard formatters name to format a value of a given type(Eg. Date, Time, Email, Boolean etc.)
2
+ export default {
3
+ DateTimeLong: 'DateTime-Long',
4
+ DateTimeShort: 'DateTime-Short',
5
+ DateTimeSince: 'DateTime-Since',
6
+ TimeOnly: 'Time-Only',
7
+ DateDefault: 'Date-Default',
8
+ DateTimeDefault: 'Date-Time-Default',
9
+ TimeDefault: 'Time-Default',
10
+ CheckCross: 'CheckCross',
11
+ YesNo: 'Yes/No',
12
+ TrueFalse: 'True/False',
13
+ TextInput: 'TextInput',
14
+ WorkStatus: 'WorkStatus',
15
+ Email: 'Email',
16
+ Phone: 'Phone',
17
+ URL: 'URL',
18
+ Integer: 'Integer',
19
+ Decimal: 'Decimal',
20
+ DecimalAuto: 'Decimal-Auto',
21
+ Currency: 'Currency',
22
+ CurrencyCode: 'Currency-Code',
23
+ CurrencyCompact: 'Currency-Compact',
24
+ Percentage: 'Percentage',
25
+ RichText: 'RichText',
26
+ Operator: 'Operator',
27
+ WorkLink: 'WorkLink',
28
+ UserReference: 'UserReference',
29
+ AssignmentLink: 'AssignmentLink',
30
+ RowActionMenu: 'RowActionMenu',
31
+ CellAction: 'CellAction',
32
+ RowSelectHandle: 'RowSelectHandle',
33
+ SelectAllCheckbox: 'selectAllCheckboxRenderer',
34
+ RowDragDropHandle: 'RowDragDropHandle',
35
+ NumberDefault: 'Number-Default',
36
+ TextDefault: 'Text-Default',
37
+ BooleanDefault: 'Boolean-Default',
38
+ OpenInModal: 'OpenInModal',
39
+ Address: 'Address',
40
+ ObjectReference: 'ObjectReference'
41
+ };