@pega/custom-dx-components 0.0.1 → 0.23.2

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 (234) hide show
  1. package/.vscode/extensions.json +1 -1
  2. package/README.md +6 -189
  3. package/package.json +34 -32
  4. package/src/auth.js +608 -0
  5. package/src/cli.js +42 -0
  6. package/src/constants.js +125 -8
  7. package/src/tasks/authenticate/helper.js +91 -8
  8. package/src/tasks/authenticate/index.js +169 -49
  9. package/src/tasks/build/helper.js +122 -0
  10. package/src/tasks/build/index.js +54 -0
  11. package/src/tasks/build-all/helper.js +70 -0
  12. package/src/tasks/build-all/index.js +79 -0
  13. package/src/tasks/{publish/bundle → bundle}/builder/index.js +49 -5
  14. package/src/tasks/{publish/bundle → bundle}/builder/webpack.config.js +5 -3
  15. package/src/tasks/{publish/bundle → bundle}/index.js +2 -2
  16. package/src/tasks/create/index.js +87 -64
  17. package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.js.mustache +38 -0
  18. package/src/tasks/create/templates/Constellation/Field/Boolean/boolean-format.js.mustache +26 -0
  19. package/src/tasks/create/templates/Constellation/Field/Boolean/config.json.mustache +146 -0
  20. package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.jsx.mustache +61 -0
  21. package/src/tasks/create/templates/Constellation/Field/Boolean/event-utils.js.mustache +18 -0
  22. package/src/tasks/create/templates/Constellation/Field/Boolean/index.jsx.mustache +170 -0
  23. package/src/tasks/create/templates/Constellation/Field/Boolean/mock.stories.js.mustache +21 -0
  24. package/src/tasks/create/templates/Constellation/Field/Boolean/styles.js.mustache +7 -0
  25. package/src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache +61 -0
  26. package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +41 -0
  27. package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +196 -0
  28. package/src/tasks/create/templates/Constellation/Field/Date/date.js.mustache +439 -0
  29. package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.jsx.mustache +73 -0
  30. package/src/tasks/create/templates/Constellation/Field/Date/index.jsx.mustache +256 -0
  31. package/src/tasks/create/templates/Constellation/Field/Date/mock.stories.js.mustache +23 -0
  32. package/src/tasks/create/templates/Constellation/Field/Date/styles.js.mustache +7 -0
  33. package/src/tasks/create/templates/Constellation/Field/Date/suggestions-handler.js +10 -0
  34. package/src/tasks/create/templates/Constellation/Field/DateTime/config.json.mustache +257 -0
  35. package/src/tasks/create/templates/Constellation/Field/DateTime/date-time.js.mustache +92 -0
  36. package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.js.mustache +287 -0
  37. package/src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache +328 -0
  38. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.jsx.mustache +73 -0
  39. package/src/tasks/create/templates/Constellation/Field/DateTime/index.jsx.mustache +254 -0
  40. package/src/tasks/create/templates/Constellation/Field/DateTime/mock.stories.js.mustache +23 -0
  41. package/src/tasks/create/templates/Constellation/Field/DateTime/styles.js.mustache +7 -0
  42. package/src/tasks/create/templates/Constellation/Field/DateTime/suggestions-handler.js +10 -0
  43. package/src/tasks/create/templates/Constellation/Field/Decimal/config.json.mustache +279 -0
  44. package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.jsx.mustache +49 -0
  45. package/src/tasks/create/templates/Constellation/Field/Decimal/event-utils.js.mustache +18 -0
  46. package/src/tasks/create/templates/Constellation/Field/Decimal/index.jsx.mustache +273 -0
  47. package/src/tasks/create/templates/Constellation/Field/Decimal/mock.stories.js.mustache +21 -0
  48. package/src/tasks/create/templates/Constellation/Field/Decimal/styles.js.mustache +7 -0
  49. package/src/tasks/create/templates/Constellation/Field/Decimal/suggestions-handler.js +10 -0
  50. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/config.json.mustache +292 -0
  51. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.jsx.mustache +53 -0
  52. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/event-utils.js.mustache +18 -0
  53. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.jsx.mustache +299 -0
  54. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.stories.js.mustache +23 -0
  55. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/styles.js.mustache +7 -0
  56. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/suggestions-handler.js +10 -0
  57. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/config.json.mustache +94 -0
  58. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.jsx.mustache +49 -0
  59. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/event-utils.js.mustache +18 -0
  60. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.jsx.mustache +281 -0
  61. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/mock.stories.js.mustache +21 -0
  62. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.js.mustache +7 -0
  63. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/suggestions-handler.js +10 -0
  64. package/src/tasks/create/templates/Constellation/Field/Integer/config.json.mustache +348 -0
  65. package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.jsx.mustache +49 -0
  66. package/src/tasks/create/templates/Constellation/Field/Integer/event-utils.js.mustache +18 -0
  67. package/src/tasks/create/templates/Constellation/Field/Integer/index.jsx.mustache +336 -0
  68. package/src/tasks/create/templates/Constellation/Field/Integer/mock.stories.js.mustache +21 -0
  69. package/src/tasks/create/templates/Constellation/Field/Integer/styles.js.mustache +7 -0
  70. package/src/tasks/create/templates/Constellation/Field/Integer/suggestions-handler.js +10 -0
  71. package/src/tasks/create/templates/Constellation/Field/Picklist/config.json.mustache +115 -0
  72. package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.jsx.mustache +78 -0
  73. package/src/tasks/create/templates/Constellation/Field/Picklist/event-utils.js.mustache +18 -0
  74. package/src/tasks/create/templates/Constellation/Field/Picklist/index.jsx.mustache +351 -0
  75. package/src/tasks/create/templates/Constellation/Field/Picklist/mock.stories.js.mustache +67 -0
  76. package/src/tasks/create/templates/Constellation/Field/Picklist/styles.js.mustache +7 -0
  77. package/src/tasks/create/templates/Constellation/Field/Picklist/suggestions-handler.js +10 -0
  78. package/src/tasks/create/{template → templates/Constellation/Field/Text}/config.json.mustache +15 -5
  79. package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.jsx.mustache +51 -0
  80. package/src/tasks/create/{template → templates/Constellation/Field/Text}/index.jsx.mustache +5 -0
  81. package/src/tasks/create/templates/Constellation/Field/Text/mock.stories.js.mustache +13 -0
  82. package/src/tasks/create/templates/Constellation/Field/Text/styles.js.mustache +7 -0
  83. package/src/tasks/create/templates/Constellation/Field/Text-Email/config.json.mustache +112 -0
  84. package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.jsx.mustache +48 -0
  85. package/src/tasks/create/templates/Constellation/Field/Text-Email/event-utils.js.mustache +18 -0
  86. package/src/tasks/create/templates/Constellation/Field/Text-Email/index.jsx.mustache +231 -0
  87. package/src/tasks/create/templates/Constellation/Field/Text-Email/mock.stories.js.mustache +22 -0
  88. package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.js.mustache +7 -0
  89. package/src/tasks/create/templates/Constellation/Field/Text-Email/suggestions-handler.js +10 -0
  90. package/src/tasks/create/templates/Constellation/Field/Text-Input/StatusWork.jsx +26 -0
  91. package/src/tasks/create/templates/Constellation/Field/Text-Input/config.json.mustache +112 -0
  92. package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.jsx.mustache +48 -0
  93. package/src/tasks/create/templates/Constellation/Field/Text-Input/event-utils.js.mustache +18 -0
  94. package/src/tasks/create/templates/Constellation/Field/Text-Input/index.jsx.mustache +239 -0
  95. package/src/tasks/create/templates/Constellation/Field/Text-Input/mock.stories.js.mustache +21 -0
  96. package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.js.mustache +7 -0
  97. package/src/tasks/create/templates/Constellation/Field/Text-Input/suggestions-handler.js +10 -0
  98. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/config.json.mustache +112 -0
  99. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.jsx.mustache +48 -0
  100. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/event-utils.js.mustache +18 -0
  101. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.jsx.mustache +231 -0
  102. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/mock.stories.js.mustache +20 -0
  103. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.js.mustache +7 -0
  104. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/suggestions-handler.js +10 -0
  105. package/src/tasks/create/templates/Constellation/Field/Text-Phone/config.json.mustache +124 -0
  106. package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.jsx.mustache +46 -0
  107. package/src/tasks/create/templates/Constellation/Field/Text-Phone/event-utils.js.mustache +18 -0
  108. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.jsx.mustache +267 -0
  109. package/src/tasks/create/templates/Constellation/Field/Text-Phone/mock.stories.js.mustache +37 -0
  110. package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.js.mustache +7 -0
  111. package/src/tasks/create/templates/Constellation/Field/Text-Phone/suggestions-handler.js +10 -0
  112. package/src/tasks/create/templates/Constellation/Field/Text-URL/config.json.mustache +238 -0
  113. package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.jsx.mustache +46 -0
  114. package/src/tasks/create/templates/Constellation/Field/Text-URL/event-utils.js.mustache +18 -0
  115. package/src/tasks/create/templates/Constellation/Field/Text-URL/index.jsx.mustache +232 -0
  116. package/src/tasks/create/templates/Constellation/Field/Text-URL/mock.stories.js.mustache +22 -0
  117. package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.js.mustache +7 -0
  118. package/src/tasks/create/templates/Constellation/Field/Text-URL/suggestions-handler.js +10 -0
  119. package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.jsx.mustache +173 -0
  120. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/config.json.mustache +186 -0
  121. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/demo.stories.jsx.mustache +57 -0
  122. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/index.jsx.mustache +213 -0
  123. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/mock.stories.js.mustache +20 -0
  124. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/styles.js.mustache +7 -0
  125. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/suggestions-handler.js +10 -0
  126. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/time-of-day.js.mustache +287 -0
  127. package/src/tasks/create/templates/Constellation/Template/DETAILS/OneColumnDetails.svg +22 -0
  128. package/src/tasks/create/templates/Constellation/Template/DETAILS/StatusWork.jsx.mustache +26 -0
  129. package/src/tasks/create/templates/Constellation/Template/DETAILS/config.json.mustache +36 -0
  130. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.jsx.mustache +132 -0
  131. package/src/tasks/create/templates/Constellation/Template/DETAILS/index.jsx.mustache +86 -0
  132. package/src/tasks/create/templates/Constellation/Template/DETAILS/mock.stories.js.mustache +189 -0
  133. package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.js.mustache +7 -0
  134. package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +152 -0
  135. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/StatusWork.jsx.mustache +26 -0
  136. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/TwoColumnDetails.svg +28 -0
  137. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/config.json.mustache +43 -0
  138. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.jsx.mustache +136 -0
  139. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.jsx.mustache +86 -0
  140. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/mock.stories.js.mustache +230 -0
  141. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.js.mustache +7 -0
  142. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache +155 -0
  143. package/src/tasks/create/templates/Constellation/Template/FORM/DefaultForm.svg +29 -0
  144. package/src/tasks/create/templates/Constellation/Template/FORM/config.json.mustache +46 -0
  145. package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.jsx.mustache +169 -0
  146. package/src/tasks/create/templates/Constellation/Template/FORM/index.jsx.mustache +45 -0
  147. package/src/tasks/create/templates/Constellation/Template/FORM/mock.stories.js.mustache +137 -0
  148. package/src/tasks/create/templates/Constellation/Template/FORM/styles.js.mustache +7 -0
  149. package/src/tasks/create/templates/Constellation/Template/FORM-region/TwoColumn.svg +38 -0
  150. package/src/tasks/create/templates/Constellation/Template/FORM-region/config.json.mustache +28 -0
  151. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.jsx.mustache +178 -0
  152. package/src/tasks/create/templates/Constellation/Template/FORM-region/index.jsx.mustache +48 -0
  153. package/src/tasks/create/templates/Constellation/Template/FORM-region/mock.stories.js.mustache +143 -0
  154. package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.js.mustache +7 -0
  155. package/src/tasks/create/templates/Constellation/Template/PAGE/GetNextWork.jsx.mustache +35 -0
  156. package/src/tasks/create/templates/Constellation/Template/PAGE/OneColumnPage.svg +36 -0
  157. package/src/tasks/create/templates/Constellation/Template/PAGE/config.json.mustache +33 -0
  158. package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.jsx.mustache +102 -0
  159. package/src/tasks/create/templates/Constellation/Template/PAGE/index.jsx.mustache +70 -0
  160. package/src/tasks/create/templates/Constellation/Template/PAGE/localizations.json.mustache +4 -0
  161. package/src/tasks/create/templates/Constellation/Template/PAGE/mock.stories.js.mustache +94 -0
  162. package/src/tasks/create/templates/Constellation/Template/PAGE/styles.js.mustache +7 -0
  163. package/src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache +229 -0
  164. package/src/tasks/create/templates/Constellation/Widget/CASE/OneColumnPage.svg +36 -0
  165. package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +24 -0
  166. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.jsx.mustache +78 -0
  167. package/src/tasks/create/templates/Constellation/Widget/CASE/index.jsx.mustache +76 -0
  168. package/src/tasks/create/templates/Constellation/Widget/CASE/mock.stories.js.mustache +390 -0
  169. package/src/tasks/create/{template → templates/Constellation/Widget/CASE}/styles.js.mustache +1 -1
  170. package/src/tasks/create/templates/Constellation/Widget/PAGE/OneColumnPage.svg +36 -0
  171. package/src/tasks/create/templates/Constellation/Widget/PAGE/config.json.mustache +60 -0
  172. package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.jsx.mustache +30 -0
  173. package/src/tasks/create/templates/Constellation/Widget/PAGE/index.jsx.mustache +48 -0
  174. package/src/tasks/create/templates/Constellation/Widget/PAGE/mock.stories.js.mustache +23 -0
  175. package/src/tasks/{init/template/src/components/Organization_Library_VideoPlayer/styles.js → create/templates/Constellation/Widget/PAGE/styles.js.mustache} +3 -1
  176. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.jsx.mustache +75 -0
  177. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/OneColumnPage.svg +36 -0
  178. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.jsx.mustache +240 -0
  179. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/config.json.mustache +67 -0
  180. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.jsx.mustache +68 -0
  181. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.jsx.mustache +110 -0
  182. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/mock.stories.js.mustache +51 -0
  183. package/src/tasks/{init/template/src/components/Organization_Library_MediaURL/MediaURL.styles.ts → create/templates/Constellation/Widget/PAGE-CASE/styles.js.mustache} +3 -1
  184. package/src/tasks/create-all/index.js +398 -0
  185. package/src/tasks/delete/helper.js +6 -4
  186. package/src/tasks/delete/index.js +4 -0
  187. package/src/tasks/delete-all/helper.js +153 -0
  188. package/src/tasks/delete-all/index.js +49 -0
  189. package/src/tasks/generate-ai/aiPrompt.txt.mustache +23 -0
  190. package/src/tasks/generate-ai/aiPromptDavinci.txt.mustache +14 -0
  191. package/src/tasks/generate-ai/helper.js +357 -0
  192. package/src/tasks/generate-ai/index.js +34 -0
  193. package/src/tasks/index.js +7 -0
  194. package/src/tasks/init/index.js +9 -3
  195. package/src/tasks/init/template/.eslintignore +8 -0
  196. package/src/tasks/init/template/.eslintrc.json +186 -5
  197. package/src/tasks/init/template/.vscode/extensions.json +1 -1
  198. package/src/tasks/init/template/README.md +80 -61
  199. package/src/tasks/init/template/keys/DX-ComponentDev.zip +0 -0
  200. package/src/tasks/init/template/keys/dxcb.crt +32 -0
  201. package/src/tasks/init/template/keys/dxcb.key +51 -0
  202. package/src/tasks/init/template/package.json.mustache +44 -21
  203. package/src/tasks/init/template/src/components/_components.md +1 -0
  204. package/src/tasks/init/template/tasks.config.json +19 -5
  205. package/src/tasks/init/template/templateNPMRC.txt +8 -0
  206. package/src/tasks/linter/index.js +46 -0
  207. package/src/tasks/list/helper.js +19 -6
  208. package/src/tasks/list/index.js +4 -0
  209. package/src/tasks/publish/helper.js +13 -4
  210. package/src/tasks/publish/index.js +14 -1
  211. package/src/tasks/publish-all/helper.js +154 -0
  212. package/src/tasks/publish-all/index.js +95 -0
  213. package/src/tasks/rename/index.js +314 -0
  214. package/src/tasks/validator/index.js +291 -18
  215. package/src/util.js +372 -6
  216. package/src/tasks/create/template/demo.stories.jsx.mustache +0 -44
  217. package/src/tasks/init/template/src/components/MBTAList/MBTAList.stories.tsx +0 -10
  218. package/src/tasks/init/template/src/components/MBTAList/MBTAList.tsx +0 -122
  219. package/src/tasks/init/template/src/components/MBTAList/icons/accessible.icon.tsx +0 -14
  220. package/src/tasks/init/template/src/components/MBTAList/icons/bus.icon.tsx +0 -13
  221. package/src/tasks/init/template/src/components/MBTAList/icons/mbta.icon.tsx +0 -10
  222. package/src/tasks/init/template/src/components/MBTAList/icons/subway.icon.tsx +0 -14
  223. package/src/tasks/init/template/src/components/MBTAList/index.ts +0 -2
  224. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURL.stories.tsx +0 -19
  225. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURL.types.ts +0 -10
  226. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURLDisplay.tsx +0 -25
  227. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURLInput.tsx +0 -24
  228. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/config.json +0 -13
  229. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/index.ts +0 -2
  230. package/src/tasks/init/template/src/components/Organization_Library_VideoPlayer/config.json +0 -44
  231. package/src/tasks/init/template/src/components/Organization_Library_VideoPlayer/demo.stories.jsx +0 -40
  232. package/src/tasks/init/template/src/components/Organization_Library_VideoPlayer/index.jsx +0 -42
  233. /package/src/tasks/{publish/bundle → bundle}/builder/modules.js +0 -0
  234. /package/src/tasks/{publish/bundle → bundle}/builder/paths.js +0 -0
@@ -0,0 +1,76 @@
1
+ /* eslint-disable no-undef */
2
+ import { useState, useEffect } from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import { Table, Text } from '@pega/cosmos-react-core';
5
+
6
+ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
7
+
8
+
9
+ // Duplicated runtime code from Constellation Design System Component
10
+
11
+ // props passed in combination of props from property panel (config.json) and run time props from Constellation
12
+ // any default values in config.pros should be set in defaultProps at bottom of this file
13
+ export default function {{COMPONENT_CLASS_NAME}}(props) {
14
+ const { getPConnect, label } = props;
15
+ const pConn = getPConnect();
16
+ const [history, setHistory] = useState([]);
17
+ const [isLoading, setIsLoading] = useState(true);
18
+ const caseID = pConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);
19
+ const context = pConn.getContextName();
20
+
21
+ const columns = [
22
+ { renderer: 'date', label: pConn.getLocalizedValue('Date') },
23
+ { renderer: 'description', label: pConn.getLocalizedValue('Description') },
24
+ { renderer: 'user', label: pConn.getLocalizedValue('Performed by') }
25
+ ];
26
+
27
+ useEffect(() => {
28
+ const payload = { dataViewParameters: [{ CaseInstanceKey: caseID }] };
29
+ PCore.getDataApiUtils()
30
+ .getData('D_pyWorkHistory', payload, context)
31
+ .then((response) => {
32
+ setIsLoading(false);
33
+ if (response.data.data !== null) {
34
+ setHistory(
35
+ response.data.data.map((entry, index) => {
36
+ {{! pick new delimiteres for mustache }}
37
+ {{=<% %>=}}
38
+ return {
39
+ date: new Date(entry.pxTimeCreated).toLocaleString(),
40
+ description: <Text style={{ wordBreak: 'break-word' }}>{entry.pyMessageKey}</Text>,
41
+ user: entry.pyPerformer,
42
+ id: index
43
+ };
44
+ <%={{ }}=%> {{! revert delimiteres for mustache }}
45
+ })
46
+ );
47
+ } else {
48
+ setHistory([]);
49
+ }
50
+ })
51
+ .catch(() => {
52
+ setHistory([]);
53
+ setIsLoading(false);
54
+ });
55
+ }, [caseID, context]);
56
+ return (
57
+ <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
58
+ <Table
59
+ title={pConn.getLocalizedValue(label)}
60
+ columns={columns}
61
+ data={history}
62
+ loading={isLoading}
63
+ loadingMessage={pConn.getLocalizedValue('Loading case history')}
64
+ />
65
+ </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
66
+ );
67
+
68
+ }
69
+
70
+ {{COMPONENT_CLASS_NAME}}.defaultProps = {
71
+
72
+ };
73
+
74
+ {{COMPONENT_CLASS_NAME}}.propTypes = {
75
+ getPConnect: PropTypes.func.isRequired
76
+ };
@@ -0,0 +1,390 @@
1
+ const historyData = {
2
+ data: {
3
+ fetchDateTime: '2023-01-18T12:04:56.517Z',
4
+ pxObjClass: 'Pega-API-DataExploration-Data',
5
+ resultCount: 31,
6
+ data: [
7
+ {
8
+ pxTimeCreated: '2023-01-13T21:46:33.339Z',
9
+ pxObjClass: 'History-DXIL-DigV2-Work',
10
+ pyPerformer: 'User DigV2',
11
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214633.339 GMT',
12
+ pxLongitude: null,
13
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214633.339 GMT',
14
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
15
+ pyMessageKey: "Assigned to User DigV2 to 'complete task' ",
16
+ pyMemo: null,
17
+ pxLatitude: null
18
+ },
19
+ {
20
+ pxTimeCreated: '2023-01-13T21:46:33.332Z',
21
+ pxObjClass: 'History-DXIL-DigV2-Work',
22
+ pyPerformer: 'User DigV2',
23
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214633.332 GMT',
24
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214633.332 GMT',
25
+ pxLongitude: null,
26
+ pyMessageKey: "Assignment to 'complete task' completed by performing a 'EmbeddedData'.",
27
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
28
+ pyMemo: null,
29
+ pxLatitude: null
30
+ },
31
+ {
32
+ pxTimeCreated: '2023-01-13T21:46:32.005Z',
33
+ pxObjClass: 'History-DXIL-DigV2-Work',
34
+ pyPerformer: 'User DigV2',
35
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214632.005 GMT',
36
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214632.005 GMT',
37
+ pxLongitude: null,
38
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
39
+ pyMessageKey: "Assigned to User DigV2 to 'complete task' ",
40
+ pyMemo: null,
41
+ pxLatitude: null
42
+ },
43
+ {
44
+ pxTimeCreated: '2023-01-13T21:46:31.998Z',
45
+ pxObjClass: 'History-DXIL-DigV2-Work',
46
+ pyPerformer: 'User DigV2',
47
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214631.998 GMT',
48
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214631.998 GMT',
49
+ pxLongitude: null,
50
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
51
+ pyMessageKey: "Assignment to 'complete task' removed via ticket.",
52
+ pxLatitude: null,
53
+ pyMemo: null
54
+ },
55
+ {
56
+ pxTimeCreated: '2023-01-13T21:46:31.175Z',
57
+ pxObjClass: 'History-DXIL-DigV2-Work',
58
+ pyPerformer: 'User DigV2',
59
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214631.175 GMT',
60
+ pxLongitude: null,
61
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214631.175 GMT',
62
+ pyMessageKey: "Assigned to User DigV2 to 'complete task' ",
63
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
64
+ pxLatitude: null,
65
+ pyMemo: null
66
+ },
67
+ {
68
+ pxTimeCreated: '2023-01-13T21:46:31.168Z',
69
+ pxObjClass: 'History-DXIL-DigV2-Work',
70
+ pyPerformer: 'User DigV2',
71
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214631.168 GMT',
72
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214631.168 GMT',
73
+ pxLongitude: null,
74
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
75
+ pyMessageKey: "Assignment to 'complete task' completed by performing a 'EmbeddedData'.",
76
+ pyMemo: null,
77
+ pxLatitude: null
78
+ },
79
+ {
80
+ pxObjClass: 'History-DXIL-DigV2-Work',
81
+ pxTimeCreated: '2023-01-13T21:46:29.893Z',
82
+ pyPerformer: 'User DigV2',
83
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214629.893 GMT',
84
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214629.893 GMT',
85
+ pxLongitude: null,
86
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
87
+ pyMessageKey: "Assigned to User DigV2 to 'complete task' ",
88
+ pyMemo: null,
89
+ pxLatitude: null
90
+ },
91
+ {
92
+ pxObjClass: 'History-DXIL-DigV2-Work',
93
+ pxTimeCreated: '2023-01-13T21:46:29.887Z',
94
+ pyPerformer: 'User DigV2',
95
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214629.887 GMT',
96
+ pxLongitude: null,
97
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214629.887 GMT',
98
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
99
+ pyMessageKey: "Assignment to 'complete task' removed via ticket.",
100
+ pxLatitude: null,
101
+ pyMemo: null
102
+ },
103
+ {
104
+ pxTimeCreated: '2023-01-13T21:46:28.248Z',
105
+ pxObjClass: 'History-DXIL-DigV2-Work',
106
+ pyPerformer: 'User DigV2',
107
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214628.248 GMT',
108
+ pxLongitude: null,
109
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214628.248 GMT',
110
+ pyMessageKey: "Assigned to User DigV2 to 'complete task' ",
111
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
112
+ pxLatitude: null,
113
+ pyMemo: null
114
+ },
115
+ {
116
+ pxObjClass: 'History-DXIL-DigV2-Work',
117
+ pxTimeCreated: '2023-01-13T21:46:28.242Z',
118
+ pyPerformer: 'User DigV2',
119
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214628.242 GMT',
120
+ pxLongitude: null,
121
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214628.242 GMT',
122
+ pyMessageKey: "Assignment to 'complete task' completed by performing a 'EmbeddedData'.",
123
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
124
+ pyMemo: null,
125
+ pxLatitude: null
126
+ },
127
+ {
128
+ pxObjClass: 'History-DXIL-DigV2-Work',
129
+ pxTimeCreated: '2023-01-13T21:46:08.399Z',
130
+ pyPerformer: 'User DigV2',
131
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214608.399 GMT',
132
+ pxLongitude: null,
133
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214608.399 GMT',
134
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
135
+ pyMessageKey: "Assigned to User DigV2 to 'complete task' ",
136
+ pxLatitude: null,
137
+ pyMemo: null
138
+ },
139
+ {
140
+ pxTimeCreated: '2023-01-13T21:46:08.393Z',
141
+ pxObjClass: 'History-DXIL-DigV2-Work',
142
+ pyPerformer: 'User DigV2',
143
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214608.393 GMT',
144
+ pxLongitude: null,
145
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214608.393 GMT',
146
+ pyMessageKey: "Assignment to 'complete task' removed via ticket.",
147
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
148
+ pxLatitude: null,
149
+ pyMemo: null
150
+ },
151
+ {
152
+ pxObjClass: 'History-DXIL-DigV2-Work',
153
+ pxTimeCreated: '2023-01-13T21:46:07.584Z',
154
+ pyPerformer: 'User DigV2',
155
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214607.584 GMT',
156
+ pxLongitude: null,
157
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214607.584 GMT',
158
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
159
+ pyMessageKey: "Assigned to User DigV2 to 'complete task' ",
160
+ pyMemo: null,
161
+ pxLatitude: null
162
+ },
163
+ {
164
+ pxObjClass: 'History-DXIL-DigV2-Work',
165
+ pxTimeCreated: '2023-01-13T21:46:07.579Z',
166
+ pyPerformer: 'User DigV2',
167
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214607.579 GMT',
168
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214607.579 GMT',
169
+ pxLongitude: null,
170
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
171
+ pyMessageKey: "Assignment to 'complete task' completed by performing a 'EmbeddedData'.",
172
+ pxLatitude: null,
173
+ pyMemo: null
174
+ },
175
+ {
176
+ pxObjClass: 'History-DXIL-DigV2-Work',
177
+ pxTimeCreated: '2023-01-13T21:46:06.262Z',
178
+ pyPerformer: 'User DigV2',
179
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214606.262 GMT',
180
+ pxLongitude: null,
181
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214606.262 GMT',
182
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
183
+ pyMessageKey: "Assigned to User DigV2 to 'complete task' ",
184
+ pyMemo: null,
185
+ pxLatitude: null
186
+ },
187
+ {
188
+ pxObjClass: 'History-DXIL-DigV2-Work',
189
+ pxTimeCreated: '2023-01-13T21:46:06.256Z',
190
+ pyPerformer: 'User DigV2',
191
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214606.256 GMT',
192
+ pxLongitude: null,
193
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214606.256 GMT',
194
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
195
+ pyMessageKey: "Assignment to 'complete task' removed via ticket.",
196
+ pxLatitude: null,
197
+ pyMemo: null
198
+ },
199
+ {
200
+ pxObjClass: 'History-DXIL-DigV2-Work',
201
+ pxTimeCreated: '2023-01-13T21:45:57.503Z',
202
+ pyPerformer: 'User DigV2',
203
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214557.503 GMT',
204
+ pxLongitude: null,
205
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214557.503 GMT',
206
+ pyMessageKey: "Assigned to User DigV2 to 'complete task' ",
207
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
208
+ pxLatitude: null,
209
+ pyMemo: null
210
+ },
211
+ {
212
+ pxObjClass: 'History-DXIL-DigV2-Work',
213
+ pxTimeCreated: '2023-01-13T21:45:57.496Z',
214
+ pyPerformer: 'User DigV2',
215
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214557.496 GMT',
216
+ pxLongitude: null,
217
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214557.496 GMT',
218
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
219
+ pyMessageKey: "Assignment to 'complete task' completed by performing a 'EmbeddedData'.",
220
+ pyMemo: null,
221
+ pxLatitude: null
222
+ },
223
+ {
224
+ pxObjClass: 'History-DXIL-DigV2-Work',
225
+ pxTimeCreated: '2023-01-13T21:45:36.250Z',
226
+ pyPerformer: 'User DigV2',
227
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214536.250 GMT',
228
+ pxLongitude: null,
229
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214536.250 GMT',
230
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
231
+ pyMessageKey: "Assigned to User DigV2 to 'complete task' ",
232
+ pxLatitude: null,
233
+ pyMemo: null
234
+ },
235
+ {
236
+ pxObjClass: 'History-DXIL-DigV2-Work',
237
+ pxTimeCreated: '2023-01-13T21:45:36.244Z',
238
+ pyPerformer: 'User DigV2',
239
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214536.244 GMT',
240
+ pxLongitude: null,
241
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214536.244 GMT',
242
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
243
+ pyMessageKey: "Assignment to 'complete task' removed via ticket.",
244
+ pxLatitude: null,
245
+ pyMemo: null
246
+ },
247
+ {
248
+ pxTimeCreated: '2023-01-13T21:45:35.364Z',
249
+ pxObjClass: 'History-DXIL-DigV2-Work',
250
+ pyPerformer: 'User DigV2',
251
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214535.364 GMT',
252
+ pxLongitude: null,
253
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214535.364 GMT',
254
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
255
+ pyMessageKey: "Assigned to User DigV2 to 'complete task' ",
256
+ pxLatitude: null,
257
+ pyMemo: null
258
+ },
259
+ {
260
+ pxTimeCreated: '2023-01-13T21:45:35.356Z',
261
+ pxObjClass: 'History-DXIL-DigV2-Work',
262
+ pyPerformer: 'User DigV2',
263
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214535.356 GMT',
264
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214535.356 GMT',
265
+ pxLongitude: null,
266
+ pyMessageKey: "Assignment to 'complete task' completed by performing a 'EmbeddedData'.",
267
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
268
+ pyMemo: null,
269
+ pxLatitude: null
270
+ },
271
+ {
272
+ pxObjClass: 'History-DXIL-DigV2-Work',
273
+ pxTimeCreated: '2023-01-13T21:45:33.224Z',
274
+ pyPerformer: 'User DigV2',
275
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214533.224 GMT',
276
+ pxLongitude: null,
277
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214533.224 GMT',
278
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
279
+ pyMessageKey: "Assigned to User DigV2 to 'complete task' ",
280
+ pxLatitude: null,
281
+ pyMemo: null
282
+ },
283
+ {
284
+ pxTimeCreated: '2023-01-13T21:45:33.218Z',
285
+ pxObjClass: 'History-DXIL-DigV2-Work',
286
+ pyPerformer: 'User DigV2',
287
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214533.218 GMT',
288
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214533.218 GMT',
289
+ pxLongitude: null,
290
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
291
+ pyMessageKey: "Assignment to 'complete task' removed via ticket.",
292
+ pxLatitude: null,
293
+ pyMemo: null
294
+ },
295
+ {
296
+ pxTimeCreated: '2023-01-13T21:45:32.436Z',
297
+ pxObjClass: 'History-DXIL-DigV2-Work',
298
+ pyPerformer: 'User DigV2',
299
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214532.436 GMT',
300
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214532.436 GMT',
301
+ pxLongitude: null,
302
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
303
+ pyMessageKey: "Assigned to User DigV2 to 'complete task' ",
304
+ pxLatitude: null,
305
+ pyMemo: null
306
+ },
307
+ {
308
+ pxTimeCreated: '2023-01-13T21:45:32.430Z',
309
+ pxObjClass: 'History-DXIL-DigV2-Work',
310
+ pyPerformer: 'User DigV2',
311
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214532.430 GMT',
312
+ pxLongitude: null,
313
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214532.430 GMT',
314
+ pyMessageKey: "Assignment to 'complete task' completed by performing a 'EmbeddedData'.",
315
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
316
+ pxLatitude: null,
317
+ pyMemo: null
318
+ },
319
+ {
320
+ pxTimeCreated: '2023-01-13T21:45:25.003Z',
321
+ pxObjClass: 'History-DXIL-DigV2-Work',
322
+ pyPerformer: 'User DigV2',
323
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214525.003 GMT',
324
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214525.003 GMT',
325
+ pxLongitude: null,
326
+ pyMessageKey: "Assigned to User DigV2 to 'complete task' ",
327
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
328
+ pxLatitude: null,
329
+ pyMemo: null
330
+ },
331
+ {
332
+ pxObjClass: 'History-DXIL-DigV2-Work',
333
+ pxTimeCreated: '2023-01-13T21:45:24.994Z',
334
+ pyPerformer: 'User DigV2',
335
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214524.994 GMT',
336
+ pxLongitude: null,
337
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214524.994 GMT',
338
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
339
+ pyMessageKey: "Assignment to 'complete task' completed by performing a 'Select Test'.",
340
+ pyMemo: null,
341
+ pxLatitude: null
342
+ },
343
+ {
344
+ pxObjClass: 'History-DXIL-DigV2-Work',
345
+ pxTimeCreated: '2023-01-13T21:45:23.570Z',
346
+ pyPerformer: 'User DigV2',
347
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214523.570 GMT',
348
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214523.570 GMT',
349
+ pxLongitude: null,
350
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
351
+ pyMessageKey: "Assigned to User DigV2 to 'complete task' ",
352
+ pyMemo: null,
353
+ pxLatitude: null
354
+ },
355
+ {
356
+ pxObjClass: 'History-DXIL-DigV2-Work',
357
+ pxTimeCreated: '2023-01-13T21:45:23.563Z',
358
+ pyPerformer: 'User DigV2',
359
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214523.563 GMT',
360
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214523.563 GMT',
361
+ pxLongitude: null,
362
+ pyMessageKey: 'ChangeStageAutomatic\tCreate\tPick Test',
363
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
364
+ pxLatitude: null,
365
+ pyMemo: 'ChangeStageAutomatic\tCreate\tPick Test'
366
+ },
367
+ {
368
+ pxObjClass: 'History-DXIL-DigV2-Work',
369
+ pxTimeCreated: '2023-01-13T21:45:23.550Z',
370
+ pyPerformer: 'User DigV2',
371
+ pxInsName: 'DXIL-DIGV2-WORK C-7430!20230113T214523.550 GMT',
372
+ pzInsKey: 'HISTORY-DXIL-DIGV2-WORK DXIL-DIGV2-WORK C-7430!20230113T214523.550 GMT',
373
+ pxLongitude: null,
374
+ pyMessageKey: 'Item created.',
375
+ pxHistoryForReference: 'DXIL-DIGV2-WORK C-7430',
376
+ pyMemo: null,
377
+ pxLatitude: null
378
+ }
379
+ ],
380
+ hasMoreResults: false
381
+ },
382
+ status: 200,
383
+ statusText: '',
384
+ headers: {
385
+ 'content-length': '1328',
386
+ 'content-type': 'application/json;charset=UTF-8'
387
+ },
388
+ request: {}
389
+ };
390
+ export default historyData;
@@ -2,6 +2,6 @@ import styled, { css } from 'styled-components';
2
2
 
3
3
  export default styled.div(() => {
4
4
  return css`
5
- margin: 8px 0;
5
+ margin: 0px 0;
6
6
  `;
7
7
  });
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="100px" height="70px" viewBox="0 0 100 70" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>1 col </title>
4
+ <defs>
5
+ <rect id="path-1" x="0" y="0" width="100" height="70"></rect>
6
+ </defs>
7
+ <g id="Concepts" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
8
+ <g id="Templates" transform="translate(-98.000000, -108.000000)">
9
+ <g id="Change-template" transform="translate(42.000000, 36.000000)">
10
+ <g id="1-col-" transform="translate(56.000000, 72.000000)">
11
+ <mask id="mask-2" fill="white">
12
+ <use xlink:href="#path-1"></use>
13
+ </mask>
14
+ <rect stroke="#A5A8BC" stroke-width="0.5" x="0.25" y="0.25" width="99.5" height="69.5"></rect>
15
+ <g id="white" mask="url(#mask-2)" fill="#FFFFFF">
16
+ <g transform="translate(3.000000, 3.000000)" id="Rectangle">
17
+ <rect x="0" y="0" width="94" height="66.5"></rect>
18
+ </g>
19
+ </g>
20
+ <g id="gray" mask="url(#mask-2)" fill="#8084A7">
21
+ <g transform="translate(6.000000, 6.000000)" id="Rectangle">
22
+ <rect x="0" y="-2.84217094e-14" width="88" height="77.8"></rect>
23
+ </g>
24
+ </g>
25
+ <g id="labels" mask="url(#mask-2)" font-family="OpenSans-Semibold, Open Sans" font-size="11" font-weight="500">
26
+ <g transform="translate(44.000000, 17.000000)" id="A">
27
+ <text>
28
+ <tspan x="0.75" y="12" fill="#FFFFFF">A</tspan>
29
+ </text>
30
+ </g>
31
+ </g>
32
+ </g>
33
+ </g>
34
+ </g>
35
+ </g>
36
+ </svg>
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "{{COMPONENT_KEY}}",
3
+ "label": "{{COMPONENT_LABEL}}",
4
+ "description": "{{DESCRIPTION}}",
5
+ "organization": "{{ORGANIZATION}}",
6
+ "version": "{{VERSION}}",
7
+ "library": "{{LIBRARY}}",
8
+ "allowedApplications": {{{ALLOWEDAPPS}}},
9
+ "componentKey": "{{COMPONENT_KEY}}",
10
+ "compName" : "{{COMPONENT_CLASS_NAME}}",
11
+ "type": "{{TYPE}}",
12
+ "subtype": {{{SUB_TYPE}}},
13
+ "icon": "OneColumnPage.svg",
14
+ "properties": [
15
+ {
16
+ "name": "description",
17
+ "label": "Description",
18
+ "format": "TEXT",
19
+ "defaultValue": "We've launched a brand new experience to accelerate your workflow. Check out the guides to help you get the most of Cosmos."
20
+ },
21
+ {
22
+ "name": "whatsnewlink",
23
+ "label": "What's new link",
24
+ "format": "TEXT",
25
+ "defaultValue": "https://design.pega.com"
26
+ },
27
+ {
28
+ "name": "image",
29
+ "label": "Image link",
30
+ "format": "TEXT",
31
+ "defaultValue": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzOSAxMSI+PHRpdGxlPlBlZ2EgdGV4dC1vbmx5IGxvZ288L3RpdGxlPjxwYXRoIHN0eWxlPSJmaWxsLW9wYWNpdHk6IC4yNTsiIGZpbGw9IiNmZmYiIGQ9Ik03LjcyIDMuODJjMCAyLjI1LTEuNzggMy40MS00IDMuNDFoLTEuNnYzSDBWLjQyaDMuOTRjMi4zNiAwIDMuNzggMS4zOSAzLjc4IDMuNHptLTQtMS40N2gtMS42djNoMS43QTEuNDcgMS40NyAwIDAgMCA1LjUgMy44MmMwLS45MS0uNjUtMS40Ny0xLjc1LTEuNDd6bTcuNjggNS45MWg1LjN2Mkg5LjI5Vi40Mmg3LjM4djEuOTNoLTUuMjR2Mmg0LjI0djEuOWgtNC4yNHpNMjMuMTggMGE1IDUgMCAwIDEgMy41NyAxLjI4TDI1LjYzIDIuOGEzLjc4IDMuNzggMCAwIDAtMS4wNS0uNjNBNC4zMiA0LjMyIDAgMCAwIDIzLjMxIDIgMy4xNyAzLjE3IDAgMCAwIDIwIDUuMjdhMy4xNiAzLjE2IDAgMCAwIDEgMi4zOSAzLjA3IDMuMDcgMCAwIDAgMi4xNy44NCA0LjYgNC42IDAgMCAwIDIuMDktLjVWNi4xOWgtMi4yVjQuMzhoNC4yNXY0LjU2YTUuNDEgNS40MSAwIDAgMS00LjA4IDEuNTdBNS4zNSA1LjM1IDAgMCAxIDE5LjQzIDlhNS4wNSA1LjA1IDAgMCAxLTEuNTYtMy43NCA1LjIxIDUuMjEgMCAwIDEgMS41Ni0zLjc2QTUuMzEgNS4zMSAwIDAgMSAyMy4xOCAwem0xMS4yOS40Mmw0LjEzIDkuNzloLTIuMjVMMzUuNDggOGgtNC4wNmwtLjkgMi4xOGgtMi4yTDMyLjUxLjQyem0uMjUgNS43MkwzMy40NCAzbC0xLjI5IDMuMTR6bTMtNWEuNzEuNzEgMCAwIDEtLjc0Ljc1LjcxLjcxIDAgMCAxLS43My0uNzUuNzMuNzMgMCAwIDEgLjc1LS43Mi43Mi43MiAwIDAgMSAuNzUuNzF6TTM3IC41M2EuNTkuNTkgMCAwIDAtLjYuNi42MS42MSAwIDEgMCAxLjIxIDAgLjYuNiAwIDAgMC0uNjEtLjZ6bS0uMjQgMVYuNzFIMzdjLjEyIDAgLjE4LjA2LjI1LjA2YS4yMS4yMSAwIDAgMSAuMDcuMTguMTkuMTkgMCAwIDEtLjA3LjE4cy0uMDcuMDgtLjEzLjA4bC4yNi4zNmgtLjJMMzcgMS4yOGgtLjF2LjI5em0uMTMtLjQ0aC4yM2EuMjYuMjYgMCAwIDAgLjA3LS4wOWgtLjA2Yy0uMDUtLjE3LS4wNS0uMTctLjEzLS4xN2gtLjF6Ii8+PC9zdmc+"
32
+ },
33
+ {
34
+ "name": "datasource",
35
+ "label": "Data source for details",
36
+ "defaultValue": "@DATASOURCE D_pyAnnouncements.pxResults",
37
+ "format": "DATASOURCE",
38
+ "required": true,
39
+ "properties": [
40
+ {
41
+ "name": "name",
42
+ "label": "Label",
43
+ "defaultValue": "@P .pyLabel"
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "label": "Conditions",
49
+ "format": "GROUP",
50
+ "properties": [
51
+ {
52
+ "name": "visibility",
53
+ "label": "Visibility",
54
+ "format": "VISIBILITY"
55
+ }
56
+ ]
57
+ }
58
+ ],
59
+ "defaultConfig": {}
60
+ }
@@ -0,0 +1,30 @@
1
+ import { withKnobs } from '@storybook/addon-knobs';
2
+
3
+ import {{COMPONENT_CLASS_NAME}} from './index.jsx';
4
+
5
+
6
+ import configProps from './mock.stories';
7
+
8
+ export default {
9
+ title: '{{COMPONENT_CLASS_NAME}}',
10
+ decorators: [withKnobs],
11
+ component: {{COMPONENT_CLASS_NAME}}
12
+ };
13
+
14
+ export const base{{COMPONENT_CLASS_NAME}} = () => {
15
+
16
+ const props = {
17
+ label: configProps.label,
18
+ header: configProps.header,
19
+ description: configProps.description,
20
+ image: configProps.image,
21
+ datasource: configProps.datasource,
22
+ whatsnewlink: configProps.whatsnewlink
23
+ };
24
+
25
+ return (
26
+ <>
27
+ <{{COMPONENT_CLASS_NAME}} {...props} />
28
+ </>
29
+ );
30
+ };
@@ -0,0 +1,48 @@
1
+ import PropTypes from 'prop-types';
2
+ import { AppAnnouncement as PegaAppAnnouncement } from '@pega/cosmos-react-work';
3
+
4
+ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
5
+
6
+
7
+ // Duplicated runtime code from Constellation Design System Component
8
+
9
+ // props passed in combination of props from property panel (config.json) and run time props from Constellation
10
+ // any default values in config.pros should be set in defaultProps at bottom of this file
11
+ export default function {{COMPONENT_CLASS_NAME}}(props) {
12
+
13
+ const { header, description, datasource, whatsnewlink, image } = props;
14
+ let details = [];
15
+ if (datasource && datasource.source) {
16
+ details = datasource.source.map((item) => {
17
+ return item.name;
18
+ });
19
+ }
20
+ return (
21
+ <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
22
+ <PegaAppAnnouncement
23
+ heading={header}
24
+ description={description}
25
+ details={details}
26
+ whatsNewLink={whatsnewlink}
27
+ image={image.replace(/ /g, '+')}
28
+ />
29
+ </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
30
+ );
31
+
32
+ }
33
+
34
+ {{COMPONENT_CLASS_NAME}}.defaultProps = {
35
+ header: '',
36
+ description: '',
37
+ image: '',
38
+ datasource: [],
39
+ whatsnewlink: ''
40
+ };
41
+
42
+ {{COMPONENT_CLASS_NAME}}.propTypes = {
43
+ header: PropTypes.string,
44
+ description: PropTypes.string,
45
+ datasource: PropTypes.instanceOf(Object),
46
+ whatsnewlink: PropTypes.string,
47
+ image: PropTypes.string
48
+ };
@@ -0,0 +1,23 @@
1
+ const configProps = {
2
+ label: 'App announcement',
3
+ header: 'Announcements',
4
+ description: 'Welcome to MediaCo Application for testing SDK frameworks.',
5
+ whatsnewlink: 'https://design.pega.com',
6
+ image:
7
+ 'data:image/svg xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzOSAxMSI PHRpdGxlPlBlZ2EgdGV4dC1vbmx5IGxvZ288L3RpdGxlPjxwYXRoIHN0eWxlPSJmaWxsLW9wYWNpdHk6IC4yNTsiIGZpbGw9IiNmZmYiIGQ9Ik03LjcyIDMuODJjMCAyLjI1LTEuNzggMy40MS00IDMuNDFoLTEuNnYzSDBWLjQyaDMuOTRjMi4zNiAwIDMuNzggMS4zOSAzLjc4IDMuNHptLTQtMS40N2gtMS42djNoMS43QTEuNDcgMS40NyAwIDAgMCA1LjUgMy44MmMwLS45MS0uNjUtMS40Ny0xLjc1LTEuNDd6bTcuNjggNS45MWg1LjN2Mkg5LjI5Vi40Mmg3LjM4djEuOTNoLTUuMjR2Mmg0LjI0djEuOWgtNC4yNHpNMjMuMTggMGE1IDUgMCAwIDEgMy41NyAxLjI4TDI1LjYzIDIuOGEzLjc4IDMuNzggMCAwIDAtMS4wNS0uNjNBNC4zMiA0LjMyIDAgMCAwIDIzLjMxIDIgMy4xNyAzLjE3IDAgMCAwIDIwIDUuMjdhMy4xNiAzLjE2IDAgMCAwIDEgMi4zOSAzLjA3IDMuMDcgMCAwIDAgMi4xNy44NCA0LjYgNC42IDAgMCAwIDIuMDktLjVWNi4xOWgtMi4yVjQuMzhoNC4yNXY0LjU2YTUuNDEgNS40MSAwIDAgMS00LjA4IDEuNTdBNS4zNSA1LjM1IDAgMCAxIDE5LjQzIDlhNS4wNSA1LjA1IDAgMCAxLTEuNTYtMy43NCA1LjIxIDUuMjEgMCAwIDEgMS41Ni0zLjc2QTUuMzEgNS4zMSAwIDAgMSAyMy4xOCAwem0xMS4yOS40Mmw0LjEzIDkuNzloLTIuMjVMMzUuNDggOGgtNC4wNmwtLjkgMi4xOGgtMi4yTDMyLjUxLjQyem0uMjUgNS43MkwzMy40NCAzbC0xLjI5IDMuMTR6bTMtNWEuNzEuNzEgMCAwIDEtLjc0Ljc1LjcxLjcxIDAgMCAxLS43My0uNzUuNzMuNzMgMCAwIDEgLjc1LS43Mi43Mi43MiAwIDAgMSAuNzUuNzF6TTM3IC41M2EuNTkuNTkgMCAwIDAtLjYuNi42MS42MSAwIDEgMCAxLjIxIDAgLjYuNiAwIDAgMC0uNjEtLjZ6bS0uMjQgMVYuNzFIMzdjLjEyIDAgLjE4LjA2LjI1LjA2YS4yMS4yMSAwIDAgMSAuMDcuMTguMTkuMTkgMCAwIDEtLjA3LjE4cy0uMDcuMDgtLjEzLjA4bC4yNi4zNmgtLjJMMzcgMS4yOGgtLjF2LjI5em0uMTMtLjQ0aC4yM2EuMjYuMjYgMCAwIDAgLjA3LS4wOWgtLjA2Yy0uMDUtLjE3LS4wNS0uMTctLjEzLS4xN2gtLjF6Ii8 PC9zdmc ',
8
+ datasource: {
9
+ source: [
10
+ {
11
+ name: 'New React based UI rendering'
12
+ },
13
+ {
14
+ name: 'Support for followers and recents'
15
+ },
16
+ {
17
+ name: 'New authoring experience'
18
+ }
19
+ ],
20
+ fields: {}
21
+ }
22
+ };
23
+ export default configProps;