@ministryofjustice/hmpps-digital-prison-reporting-frontend 4.27.0 → 4.28.1

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 (581) hide show
  1. package/dpr/DprClientClass.js +43 -0
  2. package/dpr/DprClientClass.js.map +7 -0
  3. package/dpr/{DprClientClass.mjs → DprClientClass.ts} +1 -0
  4. package/dpr/DprFormValidationClass.js +157 -0
  5. package/dpr/DprFormValidationClass.js.map +7 -0
  6. package/dpr/{DprFormValidationClass.mjs → DprFormValidationClass.ts} +2 -1
  7. package/dpr/DprGenericFormClass.js +66 -0
  8. package/dpr/DprGenericFormClass.js.map +7 -0
  9. package/dpr/{DprGenericFormClass.mjs → DprGenericFormClass.ts} +2 -1
  10. package/dpr/DprLoadingHelper.js +51 -0
  11. package/dpr/DprLoadingHelper.js.map +7 -0
  12. package/dpr/{DprLoadingHelper.mjs → DprLoadingHelper.ts} +1 -0
  13. package/dpr/DprPollingStatusClass.js +79 -0
  14. package/dpr/DprPollingStatusClass.js.map +7 -0
  15. package/dpr/{DprPollingStatusClass.mjs → DprPollingStatusClass.ts} +2 -1
  16. package/dpr/DprQueryParamClass.js +231 -0
  17. package/dpr/DprQueryParamClass.js.map +7 -0
  18. package/dpr/{DprQueryParamClass.mjs → DprQueryParamClass.ts} +2 -1
  19. package/dpr/DprSyncLoading.js +44 -0
  20. package/dpr/DprSyncLoading.js.map +7 -0
  21. package/dpr/{DprSyncLoading.mjs → DprSyncLoading.ts} +2 -1
  22. package/dpr/all.js +111 -0
  23. package/dpr/all.js.map +7 -0
  24. package/dpr/{all.mjs → all.ts} +29 -28
  25. package/dpr/assets/app.js +1 -1
  26. package/dpr/assets/app.js.map +4 -4
  27. package/dpr/components/_async/async-filters-form/clientClass.js +76 -0
  28. package/dpr/components/_async/async-filters-form/clientClass.js.map +7 -0
  29. package/dpr/components/_async/async-filters-form/{clientClass.mjs → clientClass.ts} +3 -2
  30. package/dpr/components/_async/async-filters-form/sortByTemplate.js +60 -1
  31. package/dpr/components/_async/async-filters-form/sortByTemplate.js.map +3 -3
  32. package/dpr/components/_async/async-filters-form/types.d.js +16 -1
  33. package/dpr/components/_async/async-filters-form/types.d.js.map +3 -3
  34. package/dpr/components/_async/async-filters-form/utils.js +180 -1
  35. package/dpr/components/_async/async-filters-form/utils.js.map +3 -3
  36. package/dpr/components/_async/async-polling/clientClass.js +78 -0
  37. package/dpr/components/_async/async-polling/clientClass.js.map +7 -0
  38. package/dpr/components/_async/async-polling/{clientClass.mjs → clientClass.ts} +2 -1
  39. package/dpr/components/_catalogue/catalogue/types.js +16 -1
  40. package/dpr/components/_catalogue/catalogue/types.js.map +3 -3
  41. package/dpr/components/_catalogue/catalogue/utils.js +83 -1
  42. package/dpr/components/_catalogue/catalogue/utils.js.map +3 -3
  43. package/dpr/components/_catalogue/catalogue-filter-by-type/clientClass.js +94 -0
  44. package/dpr/components/_catalogue/catalogue-filter-by-type/clientClass.js.map +7 -0
  45. package/dpr/components/_catalogue/catalogue-filter-by-type/{clientClass.mjs → clientClass.ts} +2 -1
  46. package/dpr/components/_catalogue/catalogue-filters/clientClass.js +70 -0
  47. package/dpr/components/_catalogue/catalogue-filters/clientClass.js.map +7 -0
  48. package/dpr/components/_catalogue/catalogue-filters/{clientClass.mjs → clientClass.ts} +2 -1
  49. package/dpr/components/_catalogue/catalogue-list/utils.js +140 -1
  50. package/dpr/components/_catalogue/catalogue-list/utils.js.map +3 -3
  51. package/dpr/components/_catalogue/catalogue-search/clientClass.js +106 -0
  52. package/dpr/components/_catalogue/catalogue-search/clientClass.js.map +7 -0
  53. package/dpr/components/_catalogue/catalogue-search/{clientClass.mjs → clientClass.ts} +3 -2
  54. package/dpr/components/_catalogue/catalogue-unauthorised-toggle/clientClass.js +135 -0
  55. package/dpr/components/_catalogue/catalogue-unauthorised-toggle/clientClass.js.map +7 -0
  56. package/dpr/components/_catalogue/catalogue-unauthorised-toggle/{clientClass.mjs → clientClass.ts} +2 -1
  57. package/dpr/components/_charts/chart/Chart.js +99 -1
  58. package/dpr/components/_charts/chart/Chart.js.map +3 -3
  59. package/dpr/components/_charts/chart/ChartColours.js +61 -1
  60. package/dpr/components/_charts/chart/ChartColours.js.map +3 -3
  61. package/dpr/components/_charts/chart/ChartTimeseries.js +101 -1
  62. package/dpr/components/_charts/chart/ChartTimeseries.js.map +3 -3
  63. package/dpr/components/_charts/chart/bar/BarChart.js +193 -1
  64. package/dpr/components/_charts/chart/bar/BarChart.js.map +3 -3
  65. package/dpr/components/_charts/chart/bar/clientClass.js +98 -0
  66. package/dpr/components/_charts/chart/bar/clientClass.js.map +7 -0
  67. package/dpr/components/_charts/chart/bar/{clientClass.mjs → clientClass.ts} +2 -1
  68. package/dpr/components/_charts/chart/bar/types.js +16 -1
  69. package/dpr/components/_charts/chart/bar/types.js.map +3 -3
  70. package/dpr/components/_charts/chart/bar/validate.js +73 -1
  71. package/dpr/components/_charts/chart/bar/validate.js.map +3 -3
  72. package/dpr/components/_charts/chart/bar-timeseries/BarTimeseriesChart.js +80 -1
  73. package/dpr/components/_charts/chart/bar-timeseries/BarTimeseriesChart.js.map +3 -3
  74. package/dpr/components/_charts/chart/bar-timeseries/types.js +16 -1
  75. package/dpr/components/_charts/chart/bar-timeseries/types.js.map +3 -3
  76. package/dpr/components/_charts/chart/bar-timeseries/validate.js +48 -1
  77. package/dpr/components/_charts/chart/bar-timeseries/validate.js.map +3 -3
  78. package/dpr/components/_charts/chart/buckets/Buckets.js +194 -1
  79. package/dpr/components/_charts/chart/buckets/Buckets.js.map +3 -3
  80. package/dpr/components/_charts/chart/buckets/types.js +16 -1
  81. package/dpr/components/_charts/chart/buckets/types.js.map +3 -3
  82. package/dpr/components/_charts/chart/buckets/validate.js +40 -1
  83. package/dpr/components/_charts/chart/buckets/validate.js.map +3 -3
  84. package/dpr/components/_charts/chart/chart-config.js +62 -1
  85. package/dpr/components/_charts/chart/chart-config.js.map +3 -3
  86. package/dpr/components/_charts/chart/clientClass.js +136 -0
  87. package/dpr/components/_charts/chart/clientClass.js.map +7 -0
  88. package/dpr/components/_charts/chart/{clientClass.mjs → clientClass.ts} +2 -1
  89. package/dpr/components/_charts/chart/doughnut/DoughnutChart.js +96 -1
  90. package/dpr/components/_charts/chart/doughnut/DoughnutChart.js.map +3 -3
  91. package/dpr/components/_charts/chart/doughnut/clientClass.js +170 -0
  92. package/dpr/components/_charts/chart/doughnut/clientClass.js.map +7 -0
  93. package/dpr/components/_charts/chart/doughnut/{clientClass.mjs → clientClass.ts} +2 -1
  94. package/dpr/components/_charts/chart/doughnut/types.js +16 -1
  95. package/dpr/components/_charts/chart/doughnut/types.js.map +3 -3
  96. package/dpr/components/_charts/chart/doughnut/validate.js +48 -1
  97. package/dpr/components/_charts/chart/doughnut/validate.js.map +3 -3
  98. package/dpr/components/_charts/chart/heatmap/HeatmapChart.js +213 -1
  99. package/dpr/components/_charts/chart/heatmap/HeatmapChart.js.map +3 -3
  100. package/dpr/components/_charts/chart/heatmap/clientClass.js +118 -0
  101. package/dpr/components/_charts/chart/heatmap/clientClass.js.map +7 -0
  102. package/dpr/components/_charts/chart/heatmap/{clientClass.mjs → clientClass.ts} +2 -1
  103. package/dpr/components/_charts/chart/heatmap/types.js +16 -1
  104. package/dpr/components/_charts/chart/heatmap/types.js.map +3 -3
  105. package/dpr/components/_charts/chart/heatmap/validate.js +40 -1
  106. package/dpr/components/_charts/chart/heatmap/validate.js.map +3 -3
  107. package/dpr/components/_charts/chart/line/LineChart.js +107 -1
  108. package/dpr/components/_charts/chart/line/LineChart.js.map +3 -3
  109. package/dpr/components/_charts/chart/line/clientClass.js +93 -0
  110. package/dpr/components/_charts/chart/line/clientClass.js.map +7 -0
  111. package/dpr/components/_charts/chart/line/{clientClass.mjs → clientClass.ts} +2 -1
  112. package/dpr/components/_charts/chart/line/types.js +16 -1
  113. package/dpr/components/_charts/chart/line/types.js.map +3 -3
  114. package/dpr/components/_charts/chart/line/validate.js +48 -1
  115. package/dpr/components/_charts/chart/line/validate.js.map +3 -3
  116. package/dpr/components/_charts/chart/line-timeseries/LineTimeseriesChart.js +81 -1
  117. package/dpr/components/_charts/chart/line-timeseries/LineTimeseriesChart.js.map +3 -3
  118. package/dpr/components/_charts/chart/line-timeseries/types.js +16 -1
  119. package/dpr/components/_charts/chart/line-timeseries/types.js.map +3 -3
  120. package/dpr/components/_charts/chart/line-timeseries/validate.js +48 -1
  121. package/dpr/components/_charts/chart/line-timeseries/validate.js.map +3 -3
  122. package/dpr/components/_charts/utils.js +240 -1
  123. package/dpr/components/_charts/utils.js.map +3 -3
  124. package/dpr/components/_dashboards/dashboard-list/types.js +16 -1
  125. package/dpr/components/_dashboards/dashboard-list/types.js.map +3 -3
  126. package/dpr/components/_dashboards/dashboard-list/utils.js +170 -1
  127. package/dpr/components/_dashboards/dashboard-list/utils.js.map +3 -3
  128. package/dpr/components/_dashboards/dashboard-list/validate.js +43 -1
  129. package/dpr/components/_dashboards/dashboard-list/validate.js.map +3 -3
  130. package/dpr/components/_dashboards/dashboard-visualisation/Validate.js +95 -1
  131. package/dpr/components/_dashboards/dashboard-visualisation/Validate.js.map +3 -3
  132. package/dpr/components/_dashboards/dashboard-visualisation/types.js +40 -1
  133. package/dpr/components/_dashboards/dashboard-visualisation/types.js.map +3 -3
  134. package/dpr/components/_dashboards/scorecard/Scorecard.js +176 -1
  135. package/dpr/components/_dashboards/scorecard/Scorecard.js.map +3 -3
  136. package/dpr/components/_dashboards/scorecard/clientClass.js +50 -0
  137. package/dpr/components/_dashboards/scorecard/clientClass.js.map +7 -0
  138. package/dpr/components/_dashboards/scorecard/{clientClass.mjs → clientClass.ts} +2 -1
  139. package/dpr/components/_dashboards/scorecard/types.js +16 -1
  140. package/dpr/components/_dashboards/scorecard/types.js.map +3 -3
  141. package/dpr/components/_dashboards/scorecard/utils.js +61 -1
  142. package/dpr/components/_dashboards/scorecard/utils.js.map +3 -3
  143. package/dpr/components/_dashboards/scorecard/validate.js +50 -1
  144. package/dpr/components/_dashboards/scorecard/validate.js.map +3 -3
  145. package/dpr/components/_dashboards/scorecard-group/ScorecardGroup.js +212 -1
  146. package/dpr/components/_dashboards/scorecard-group/ScorecardGroup.js.map +3 -3
  147. package/dpr/components/_dashboards/scorecard-group/types.js +16 -1
  148. package/dpr/components/_dashboards/scorecard-group/types.js.map +3 -3
  149. package/dpr/components/_dashboards/scorecard-group/validate.js +50 -1
  150. package/dpr/components/_dashboards/scorecard-group/validate.js.map +3 -3
  151. package/dpr/components/_filters/filter-input/enum.js +38 -1
  152. package/dpr/components/_filters/filter-input/enum.js.map +3 -3
  153. package/dpr/components/_filters/filter-input/filters.js +37 -1
  154. package/dpr/components/_filters/filter-input/filters.js.map +3 -3
  155. package/dpr/components/_filters/filter-input/types.d.js +16 -1
  156. package/dpr/components/_filters/filter-input/types.d.js.map +3 -3
  157. package/dpr/components/_filters/filters-form/clientClass.js +104 -0
  158. package/dpr/components/_filters/filters-form/clientClass.js.map +7 -0
  159. package/dpr/components/_filters/filters-form/{clientClass.mjs → clientClass.ts} +2 -1
  160. package/dpr/components/_filters/filters-interactive/clientClass.js +55 -0
  161. package/dpr/components/_filters/filters-interactive/clientClass.js.map +7 -0
  162. package/dpr/components/_filters/filters-interactive/{clientClass.mjs → clientClass.ts} +2 -1
  163. package/dpr/components/_filters/filters-selected/clientClass.js +396 -0
  164. package/dpr/components/_filters/filters-selected/clientClass.js.map +7 -0
  165. package/dpr/components/_filters/filters-selected/{clientClass.mjs → clientClass.ts} +7 -7
  166. package/dpr/components/_filters/filters-selected/utils.js +314 -1
  167. package/dpr/components/_filters/filters-selected/utils.js.map +3 -3
  168. package/dpr/components/_filters/filtersTypeEnum.js +32 -1
  169. package/dpr/components/_filters/filtersTypeEnum.js.map +3 -3
  170. package/dpr/components/_filters/types.d.js +16 -1
  171. package/dpr/components/_filters/types.d.js.map +3 -3
  172. package/dpr/components/_filters/utils.js +385 -1
  173. package/dpr/components/_filters/utils.js.map +3 -3
  174. package/dpr/components/_inputs/autocomplete-text-input/clientClass.js +153 -0
  175. package/dpr/components/_inputs/autocomplete-text-input/clientClass.js.map +7 -0
  176. package/dpr/components/_inputs/autocomplete-text-input/{clientClass.mjs → clientClass.ts} +2 -1
  177. package/dpr/components/_inputs/autocomplete-text-input/utils.js +45 -1
  178. package/dpr/components/_inputs/autocomplete-text-input/utils.js.map +3 -3
  179. package/dpr/components/_inputs/date-input/clientClass.js +109 -0
  180. package/dpr/components/_inputs/date-input/clientClass.js.map +7 -0
  181. package/dpr/components/_inputs/date-input/{clientClass.mjs → clientClass.ts} +2 -1
  182. package/dpr/components/_inputs/date-input/utils.js +88 -1
  183. package/dpr/components/_inputs/date-input/utils.js.map +3 -3
  184. package/dpr/components/_inputs/date-range/clientClass.js +206 -0
  185. package/dpr/components/_inputs/date-range/clientClass.js.map +7 -0
  186. package/dpr/components/_inputs/date-range/{clientClass.mjs → clientClass.ts} +2 -1
  187. package/dpr/components/_inputs/date-range/types.js +38 -1
  188. package/dpr/components/_inputs/date-range/types.js.map +3 -3
  189. package/dpr/components/_inputs/date-range/utils.js +229 -1
  190. package/dpr/components/_inputs/date-range/utils.js.map +3 -3
  191. package/dpr/components/_inputs/granular-date-range/clientClass.js +245 -0
  192. package/dpr/components/_inputs/granular-date-range/clientClass.js.map +7 -0
  193. package/dpr/components/_inputs/granular-date-range/{clientClass.mjs → clientClass.ts} +2 -1
  194. package/dpr/components/_inputs/granular-date-range/types.js +70 -1
  195. package/dpr/components/_inputs/granular-date-range/types.js.map +3 -3
  196. package/dpr/components/_inputs/granular-date-range/utils.js +445 -1
  197. package/dpr/components/_inputs/granular-date-range/utils.js.map +3 -3
  198. package/dpr/components/_inputs/multi-select/utils.js +88 -1
  199. package/dpr/components/_inputs/multi-select/utils.js.map +3 -3
  200. package/dpr/components/_inputs/start-end-date/utils.js +84 -1
  201. package/dpr/components/_inputs/start-end-date/utils.js.map +3 -3
  202. package/dpr/components/_reports/report-actions/actionsTemplate.js +59 -1
  203. package/dpr/components/_reports/report-actions/actionsTemplate.js.map +3 -3
  204. package/dpr/components/_reports/report-actions/clientClass.js +103 -0
  205. package/dpr/components/_reports/report-actions/clientClass.js.map +7 -0
  206. package/dpr/components/_reports/report-actions/{clientClass.mjs → clientClass.ts} +2 -1
  207. package/dpr/components/_reports/report-actions/types.d.js +16 -1
  208. package/dpr/components/_reports/report-actions/types.d.js.map +3 -3
  209. package/dpr/components/_reports/report-actions/utils.js +97 -1
  210. package/dpr/components/_reports/report-actions/utils.js.map +3 -3
  211. package/dpr/components/_reports/report-columns-form/clientClass.js +76 -0
  212. package/dpr/components/_reports/report-columns-form/clientClass.js.map +7 -0
  213. package/dpr/components/_reports/report-columns-form/{clientClass.mjs → clientClass.ts} +2 -1
  214. package/dpr/components/_reports/report-columns-form/types.d.js +16 -1
  215. package/dpr/components/_reports/report-columns-form/types.d.js.map +3 -3
  216. package/dpr/components/_reports/report-columns-form/utils.js +65 -1
  217. package/dpr/components/_reports/report-columns-form/utils.js.map +3 -3
  218. package/dpr/components/_reports/report-data-table/clientClass.js +80 -0
  219. package/dpr/components/_reports/report-data-table/clientClass.js.map +7 -0
  220. package/dpr/components/_reports/report-data-table/{clientClass.mjs → clientClass.ts} +2 -1
  221. package/dpr/components/_reports/report-data-table/types.d.js +16 -1
  222. package/dpr/components/_reports/report-data-table/types.d.js.map +3 -3
  223. package/dpr/components/_reports/report-data-table/utils.js +122 -1
  224. package/dpr/components/_reports/report-data-table/utils.js.map +3 -3
  225. package/dpr/components/_reports/report-download-message/clientClass.js +42 -0
  226. package/dpr/components/_reports/report-download-message/clientClass.js.map +7 -0
  227. package/dpr/components/_reports/report-download-message/{clientClass.mjs → clientClass.ts} +2 -1
  228. package/dpr/components/_reports/report-pagination/clientClass.js +61 -0
  229. package/dpr/components/_reports/report-pagination/clientClass.js.map +7 -0
  230. package/dpr/components/_reports/report-pagination/{clientClass.mjs → clientClass.ts} +2 -1
  231. package/dpr/components/_reports/report-pagination/types.d.js +16 -1
  232. package/dpr/components/_reports/report-pagination/types.d.js.map +3 -3
  233. package/dpr/components/_reports/report-pagination/utils.js +105 -1
  234. package/dpr/components/_reports/report-pagination/utils.js.map +3 -3
  235. package/dpr/components/_reports/report-totals/utils.js +42 -1
  236. package/dpr/components/_reports/report-totals/utils.js.map +3 -3
  237. package/dpr/components/bookmark-toggle/clientClass.js +111 -0
  238. package/dpr/components/bookmark-toggle/clientClass.js.map +7 -0
  239. package/dpr/components/bookmark-toggle/{clientClass.mjs → clientClass.ts} +2 -1
  240. package/dpr/components/card-group/clientClass.js +53 -0
  241. package/dpr/components/card-group/clientClass.js.map +7 -0
  242. package/dpr/components/card-group/{clientClass.mjs → clientClass.ts} +2 -1
  243. package/dpr/components/card-group/utils.js +57 -1
  244. package/dpr/components/card-group/utils.js.map +3 -3
  245. package/dpr/components/report-list/defaultTokenProvider.js +36 -1
  246. package/dpr/components/report-list/defaultTokenProvider.js.map +3 -3
  247. package/dpr/components/report-list/types.d.js +16 -1
  248. package/dpr/components/report-list/types.d.js.map +3 -3
  249. package/dpr/components/report-list/utils.js +238 -1
  250. package/dpr/components/report-list/utils.js.map +3 -3
  251. package/dpr/components/show-more/clientClass.js +63 -0
  252. package/dpr/components/show-more/clientClass.js.map +7 -0
  253. package/dpr/components/show-more/{clientClass.mjs → clientClass.ts} +2 -1
  254. package/dpr/components/show-more/utils.js +38 -3
  255. package/dpr/components/show-more/utils.js.map +3 -3
  256. package/dpr/components/user-reports/bookmarks/utils.js +198 -1
  257. package/dpr/components/user-reports/bookmarks/utils.js.map +3 -3
  258. package/dpr/components/user-reports/requested/clientClass.js +132 -0
  259. package/dpr/components/user-reports/requested/clientClass.js.map +7 -0
  260. package/dpr/components/user-reports/requested/{clientClass.mjs → clientClass.ts} +2 -1
  261. package/dpr/components/user-reports/requested/utils.js +65 -1
  262. package/dpr/components/user-reports/requested/utils.js.map +3 -3
  263. package/dpr/components/user-reports/types.d.js +16 -1
  264. package/dpr/components/user-reports/types.d.js.map +3 -3
  265. package/dpr/components/user-reports/utils.js +365 -1
  266. package/dpr/components/user-reports/utils.js.map +3 -3
  267. package/dpr/components/user-reports/viewed/clientClass.js +102 -0
  268. package/dpr/components/user-reports/viewed/clientClass.js.map +7 -0
  269. package/dpr/components/user-reports/viewed/{clientClass.mjs → clientClass.ts} +2 -1
  270. package/dpr/components/user-reports/viewed/utils.js +37 -1
  271. package/dpr/components/user-reports/viewed/utils.js.map +3 -3
  272. package/dpr/data/agentConfig.js +35 -1
  273. package/dpr/data/agentConfig.js.map +3 -3
  274. package/dpr/data/dashboardClient.js +108 -1
  275. package/dpr/data/dashboardClient.js.map +3 -3
  276. package/dpr/data/dprReportingClient.js +55 -1
  277. package/dpr/data/dprReportingClient.js.map +3 -3
  278. package/dpr/data/missingReportClient.js +55 -1
  279. package/dpr/data/missingReportClient.js.map +3 -3
  280. package/dpr/data/productCollectionClient.js +58 -1
  281. package/dpr/data/productCollectionClient.js.map +3 -3
  282. package/dpr/data/reportDataStore.js +77 -1
  283. package/dpr/data/reportDataStore.js.map +3 -3
  284. package/dpr/data/reportingClient.js +173 -1
  285. package/dpr/data/reportingClient.js.map +3 -3
  286. package/dpr/data/restClient.js +143 -1
  287. package/dpr/data/restClient.js.map +3 -3
  288. package/dpr/data/types.d.js +16 -1
  289. package/dpr/data/types.d.js.map +3 -3
  290. package/dpr/middleware/reportAuthoriser.js +63 -1
  291. package/dpr/middleware/reportAuthoriser.js.map +3 -3
  292. package/dpr/middleware/setUpDprResources.js +173 -1
  293. package/dpr/middleware/setUpDprResources.js.map +3 -3
  294. package/dpr/middleware/setUpNestedRoute.js +35 -1
  295. package/dpr/middleware/setUpNestedRoute.js.map +3 -3
  296. package/dpr/routes/index.js +50 -1
  297. package/dpr/routes/index.js.map +3 -3
  298. package/dpr/routes/journeys/api-failures.cy.js +295 -1
  299. package/dpr/routes/journeys/api-failures.cy.js.map +3 -3
  300. package/dpr/routes/journeys/download-report/controller.js +65 -1
  301. package/dpr/routes/journeys/download-report/controller.js.map +3 -3
  302. package/dpr/routes/journeys/download-report/request-download/form/controller.js +98 -1
  303. package/dpr/routes/journeys/download-report/request-download/form/controller.js.map +3 -3
  304. package/dpr/routes/journeys/download-report/request-download/form/routes.js +50 -1
  305. package/dpr/routes/journeys/download-report/request-download/form/routes.js.map +3 -3
  306. package/dpr/routes/journeys/download-report/request-download/form/submitted/controller.js +68 -1
  307. package/dpr/routes/journeys/download-report/request-download/form/submitted/controller.js.map +3 -3
  308. package/dpr/routes/journeys/download-report/request-download/form/submitted/routes.js +47 -1
  309. package/dpr/routes/journeys/download-report/request-download/form/submitted/routes.js.map +3 -3
  310. package/dpr/routes/journeys/download-report/request-download/form/submitted/tests.cy.js +17 -1
  311. package/dpr/routes/journeys/download-report/request-download/form/submitted/tests.cy.js.map +2 -2
  312. package/dpr/routes/journeys/download-report/request-download/form/tests.cy.js +24 -1
  313. package/dpr/routes/journeys/download-report/request-download/form/tests.cy.js.map +3 -3
  314. package/dpr/routes/journeys/download-report/request-download/routes.js +46 -1
  315. package/dpr/routes/journeys/download-report/request-download/routes.js.map +3 -3
  316. package/dpr/routes/journeys/download-report/request-download/service.js +90 -1
  317. package/dpr/routes/journeys/download-report/request-download/service.js.map +3 -3
  318. package/dpr/routes/journeys/download-report/routes.js +63 -1
  319. package/dpr/routes/journeys/download-report/routes.js.map +3 -3
  320. package/dpr/routes/journeys/download-report/tests.cy.js +104 -1
  321. package/dpr/routes/journeys/download-report/tests.cy.js.map +3 -3
  322. package/dpr/routes/journeys/download-report/utils.js +196 -1
  323. package/dpr/routes/journeys/download-report/utils.js.map +3 -3
  324. package/dpr/routes/journeys/my-reports/bookmarks/controller.js +58 -1
  325. package/dpr/routes/journeys/my-reports/bookmarks/controller.js.map +3 -3
  326. package/dpr/routes/journeys/my-reports/bookmarks/list/controller.js +56 -1
  327. package/dpr/routes/journeys/my-reports/bookmarks/list/controller.js.map +3 -3
  328. package/dpr/routes/journeys/my-reports/bookmarks/list/routes.js +47 -1
  329. package/dpr/routes/journeys/my-reports/bookmarks/list/routes.js.map +3 -3
  330. package/dpr/routes/journeys/my-reports/bookmarks/list/tests.cy.js +32 -1
  331. package/dpr/routes/journeys/my-reports/bookmarks/list/tests.cy.js.map +3 -3
  332. package/dpr/routes/journeys/my-reports/bookmarks/routes.js +49 -1
  333. package/dpr/routes/journeys/my-reports/bookmarks/routes.js.map +3 -3
  334. package/dpr/routes/journeys/my-reports/bookmarks/service.js +123 -4
  335. package/dpr/routes/journeys/my-reports/bookmarks/service.js.map +3 -3
  336. package/dpr/routes/journeys/my-reports/bookmarks/tests.cy.js +448 -1
  337. package/dpr/routes/journeys/my-reports/bookmarks/tests.cy.js.map +3 -3
  338. package/dpr/routes/journeys/my-reports/bookmarks/utils.js +44 -1
  339. package/dpr/routes/journeys/my-reports/bookmarks/utils.js.map +3 -3
  340. package/dpr/routes/journeys/my-reports/recently-viewed/controller.js +53 -1
  341. package/dpr/routes/journeys/my-reports/recently-viewed/controller.js.map +3 -3
  342. package/dpr/routes/journeys/my-reports/recently-viewed/list/controller.js +65 -1
  343. package/dpr/routes/journeys/my-reports/recently-viewed/list/controller.js.map +3 -3
  344. package/dpr/routes/journeys/my-reports/recently-viewed/list/routes.js +47 -1
  345. package/dpr/routes/journeys/my-reports/recently-viewed/list/routes.js.map +3 -3
  346. package/dpr/routes/journeys/my-reports/recently-viewed/list/tests.cy.js +83 -1
  347. package/dpr/routes/journeys/my-reports/recently-viewed/list/tests.cy.js.map +3 -3
  348. package/dpr/routes/journeys/my-reports/recently-viewed/routes.js +49 -1
  349. package/dpr/routes/journeys/my-reports/recently-viewed/routes.js.map +3 -3
  350. package/dpr/routes/journeys/my-reports/recently-viewed/service.js +118 -1
  351. package/dpr/routes/journeys/my-reports/recently-viewed/service.js.map +3 -3
  352. package/dpr/routes/journeys/my-reports/requested-reports/controller.js +52 -1
  353. package/dpr/routes/journeys/my-reports/requested-reports/controller.js.map +3 -3
  354. package/dpr/routes/journeys/my-reports/requested-reports/list/controller.js +65 -1
  355. package/dpr/routes/journeys/my-reports/requested-reports/list/controller.js.map +3 -3
  356. package/dpr/routes/journeys/my-reports/requested-reports/list/routes.js +47 -1
  357. package/dpr/routes/journeys/my-reports/requested-reports/list/routes.js.map +3 -3
  358. package/dpr/routes/journeys/my-reports/requested-reports/list/tests.cy.js +15 -1
  359. package/dpr/routes/journeys/my-reports/requested-reports/list/tests.cy.js.map +3 -3
  360. package/dpr/routes/journeys/my-reports/requested-reports/routes.js +49 -1
  361. package/dpr/routes/journeys/my-reports/requested-reports/routes.js.map +3 -3
  362. package/dpr/routes/journeys/my-reports/requested-reports/service.js +200 -1
  363. package/dpr/routes/journeys/my-reports/requested-reports/service.js.map +3 -3
  364. package/dpr/routes/journeys/my-reports/routes.js +59 -1
  365. package/dpr/routes/journeys/my-reports/routes.js.map +3 -3
  366. package/dpr/routes/journeys/product-collection/routes.js +45 -1
  367. package/dpr/routes/journeys/product-collection/routes.js.map +3 -3
  368. package/dpr/routes/journeys/product-collection/selected/controller.js +55 -1
  369. package/dpr/routes/journeys/product-collection/selected/controller.js.map +3 -3
  370. package/dpr/routes/journeys/product-collection/selected/routes.js +37 -1
  371. package/dpr/routes/journeys/product-collection/selected/routes.js.map +3 -3
  372. package/dpr/routes/journeys/product-collection/selected/tests.cy.js +47 -1
  373. package/dpr/routes/journeys/product-collection/selected/tests.cy.js.map +3 -3
  374. package/dpr/routes/journeys/product-collection/selected/validation.js +41 -1
  375. package/dpr/routes/journeys/product-collection/selected/validation.js.map +3 -3
  376. package/dpr/routes/journeys/request-missing-report/form/controller.js +104 -1
  377. package/dpr/routes/journeys/request-missing-report/form/controller.js.map +3 -3
  378. package/dpr/routes/journeys/request-missing-report/form/routes.js +50 -1
  379. package/dpr/routes/journeys/request-missing-report/form/routes.js.map +3 -3
  380. package/dpr/routes/journeys/request-missing-report/form/tests.cy.js +22 -1
  381. package/dpr/routes/journeys/request-missing-report/form/tests.cy.js.map +3 -3
  382. package/dpr/routes/journeys/request-missing-report/form/validation.js +43 -1
  383. package/dpr/routes/journeys/request-missing-report/form/validation.js.map +3 -3
  384. package/dpr/routes/journeys/request-missing-report/routes.js +57 -1
  385. package/dpr/routes/journeys/request-missing-report/routes.js.map +3 -3
  386. package/dpr/routes/journeys/request-missing-report/submitted/controller.js +65 -1
  387. package/dpr/routes/journeys/request-missing-report/submitted/controller.js.map +3 -3
  388. package/dpr/routes/journeys/request-missing-report/submitted/routes.js +47 -1
  389. package/dpr/routes/journeys/request-missing-report/submitted/routes.js.map +3 -3
  390. package/dpr/routes/journeys/request-missing-report/submitted/tests.cy.js +14 -1
  391. package/dpr/routes/journeys/request-missing-report/submitted/tests.cy.js.map +3 -3
  392. package/dpr/routes/journeys/request-missing-report/tests.cy.js +37 -1
  393. package/dpr/routes/journeys/request-missing-report/tests.cy.js.map +3 -3
  394. package/dpr/routes/journeys/request-report/controller.js +79 -1
  395. package/dpr/routes/journeys/request-report/controller.js.map +3 -3
  396. package/dpr/routes/journeys/request-report/filters/controller.js +127 -1
  397. package/dpr/routes/journeys/request-report/filters/controller.js.map +3 -3
  398. package/dpr/routes/journeys/request-report/filters/routes.js +50 -1
  399. package/dpr/routes/journeys/request-report/filters/routes.js.map +3 -3
  400. package/dpr/routes/journeys/request-report/filters/tests.cy.js +451 -1
  401. package/dpr/routes/journeys/request-report/filters/tests.cy.js.map +3 -3
  402. package/dpr/routes/journeys/request-report/filters/utils.js +331 -1
  403. package/dpr/routes/journeys/request-report/filters/utils.js.map +3 -3
  404. package/dpr/routes/journeys/request-report/routes.js +100 -1
  405. package/dpr/routes/journeys/request-report/routes.js.map +3 -3
  406. package/dpr/routes/journeys/request-report/status/controller.js +80 -1
  407. package/dpr/routes/journeys/request-report/status/controller.js.map +3 -3
  408. package/dpr/routes/journeys/request-report/status/routes.js +48 -1
  409. package/dpr/routes/journeys/request-report/status/routes.js.map +3 -3
  410. package/dpr/routes/journeys/request-report/status/tests.cy.js +127 -1
  411. package/dpr/routes/journeys/request-report/status/tests.cy.js.map +3 -3
  412. package/dpr/routes/journeys/request-report/status/utils.js +72 -1
  413. package/dpr/routes/journeys/request-report/status/utils.js.map +3 -3
  414. package/dpr/routes/journeys/request-report/tests.cy.js +307 -1
  415. package/dpr/routes/journeys/request-report/tests.cy.js.map +3 -3
  416. package/dpr/routes/journeys/routes.js +46 -1
  417. package/dpr/routes/journeys/routes.js.map +3 -3
  418. package/dpr/routes/journeys/view-report/async/controller.js +89 -1
  419. package/dpr/routes/journeys/view-report/async/controller.js.map +3 -3
  420. package/dpr/routes/journeys/view-report/async/dashboard/controller.js +82 -1
  421. package/dpr/routes/journeys/view-report/async/dashboard/controller.js.map +3 -3
  422. package/dpr/routes/journeys/view-report/async/dashboard/routes.js +48 -1
  423. package/dpr/routes/journeys/view-report/async/dashboard/routes.js.map +3 -3
  424. package/dpr/routes/journeys/view-report/async/dashboard/tests.cy.js +33 -1
  425. package/dpr/routes/journeys/view-report/async/dashboard/tests.cy.js.map +3 -3
  426. package/dpr/routes/journeys/view-report/async/dashboard/utils.js +242 -1
  427. package/dpr/routes/journeys/view-report/async/dashboard/utils.js.map +3 -3
  428. package/dpr/routes/journeys/view-report/async/report/controller.js +83 -1
  429. package/dpr/routes/journeys/view-report/async/report/controller.js.map +3 -3
  430. package/dpr/routes/journeys/view-report/async/report/report-variants.cy.js +76 -1
  431. package/dpr/routes/journeys/view-report/async/report/report-variants.cy.js.map +3 -3
  432. package/dpr/routes/journeys/view-report/async/report/routes.js +53 -1
  433. package/dpr/routes/journeys/view-report/async/report/routes.js.map +3 -3
  434. package/dpr/routes/journeys/view-report/async/report/tests.cy.js +895 -1
  435. package/dpr/routes/journeys/view-report/async/report/tests.cy.js.map +3 -3
  436. package/dpr/routes/journeys/view-report/async/report/types.js +16 -1
  437. package/dpr/routes/journeys/view-report/async/report/types.js.map +3 -3
  438. package/dpr/routes/journeys/view-report/async/report/utils.js +427 -1
  439. package/dpr/routes/journeys/view-report/async/report/utils.js.map +3 -3
  440. package/dpr/routes/journeys/view-report/async/routes.js +52 -1
  441. package/dpr/routes/journeys/view-report/async/routes.js.map +3 -3
  442. package/dpr/routes/journeys/view-report/controller.js +62 -1
  443. package/dpr/routes/journeys/view-report/controller.js.map +4 -4
  444. package/dpr/routes/journeys/view-report/controller.ts +1 -1
  445. package/dpr/routes/journeys/view-report/routes.js +87 -1
  446. package/dpr/routes/journeys/view-report/routes.js.map +3 -3
  447. package/dpr/routes/journeys/view-report/sync/dashboard/controller.js +68 -1
  448. package/dpr/routes/journeys/view-report/sync/dashboard/controller.js.map +3 -3
  449. package/dpr/routes/journeys/view-report/sync/dashboard/routes.js +48 -1
  450. package/dpr/routes/journeys/view-report/sync/dashboard/routes.js.map +3 -3
  451. package/dpr/routes/journeys/view-report/sync/dashboard/utils.js +144 -1
  452. package/dpr/routes/journeys/view-report/sync/dashboard/utils.js.map +3 -3
  453. package/dpr/routes/journeys/view-report/sync/load-report/controller.js +102 -1
  454. package/dpr/routes/journeys/view-report/sync/load-report/controller.js.map +3 -3
  455. package/dpr/routes/journeys/view-report/sync/load-report/routes.js +47 -1
  456. package/dpr/routes/journeys/view-report/sync/load-report/routes.js.map +3 -3
  457. package/dpr/routes/journeys/view-report/sync/report/controller.js +99 -1
  458. package/dpr/routes/journeys/view-report/sync/report/controller.js.map +3 -3
  459. package/dpr/routes/journeys/view-report/sync/report/routes.js +51 -1
  460. package/dpr/routes/journeys/view-report/sync/report/routes.js.map +3 -3
  461. package/dpr/routes/journeys/view-report/sync/report/utils.js +298 -1
  462. package/dpr/routes/journeys/view-report/sync/report/utils.js.map +3 -3
  463. package/dpr/routes/journeys/view-report/sync/routes.js +51 -1
  464. package/dpr/routes/journeys/view-report/sync/routes.js.map +3 -3
  465. package/dpr/routes/journeys/view-report/sync/tests.cy.js +43 -1
  466. package/dpr/routes/journeys/view-report/sync/tests.cy.js.map +3 -3
  467. package/dpr/routes/journeys/view-report/utils.js +173 -1
  468. package/dpr/routes/journeys/view-report/utils.js.map +3 -3
  469. package/dpr/services/dashboardService.js +66 -1
  470. package/dpr/services/dashboardService.js.map +3 -3
  471. package/dpr/services/defaultFilterValuesService.js +114 -1
  472. package/dpr/services/defaultFilterValuesService.js.map +3 -3
  473. package/dpr/services/featureFlagService.js +65 -1
  474. package/dpr/services/featureFlagService.js.map +3 -3
  475. package/dpr/services/featureFlags.cy.js +72 -1
  476. package/dpr/services/featureFlags.cy.js.map +3 -3
  477. package/dpr/services/index.js +59 -1
  478. package/dpr/services/index.js.map +3 -3
  479. package/dpr/services/missingReport/missingReportService.js +52 -1
  480. package/dpr/services/missingReport/missingReportService.js.map +3 -3
  481. package/dpr/services/productCollection/productCollectionService.js +55 -1
  482. package/dpr/services/productCollection/productCollectionService.js.map +3 -3
  483. package/dpr/services/productCollection/productCollectionStoreService.js +61 -1
  484. package/dpr/services/productCollection/productCollectionStoreService.js.map +3 -3
  485. package/dpr/services/reportStoreService.js +51 -1
  486. package/dpr/services/reportStoreService.js.map +3 -3
  487. package/dpr/services/reportingService.js +81 -1
  488. package/dpr/services/reportingService.js.map +3 -3
  489. package/dpr/setUpNunjucksFilters.js +66 -1
  490. package/dpr/setUpNunjucksFilters.js.map +3 -3
  491. package/dpr/types/AsyncReportUtils.js +16 -1
  492. package/dpr/types/AsyncReportUtils.js.map +3 -3
  493. package/dpr/types/Bookmark.js +16 -1
  494. package/dpr/types/Bookmark.js.map +3 -3
  495. package/dpr/types/Charts.js +16 -1
  496. package/dpr/types/Charts.js.map +3 -3
  497. package/dpr/types/Download.js +16 -1
  498. package/dpr/types/Download.js.map +3 -3
  499. package/dpr/types/DprConfig.js +16 -1
  500. package/dpr/types/DprConfig.js.map +3 -3
  501. package/dpr/types/DprUser.js +43 -1
  502. package/dpr/types/DprUser.js.map +3 -3
  503. package/dpr/types/EmbeddedReportUtils.js +33 -1
  504. package/dpr/types/EmbeddedReportUtils.js.map +3 -3
  505. package/dpr/types/ExecutionData.d.js +16 -1
  506. package/dpr/types/ExecutionData.d.js.map +3 -3
  507. package/dpr/types/Metrics.js +16 -1
  508. package/dpr/types/Metrics.js.map +3 -3
  509. package/dpr/types/ReportQuery.js +168 -1
  510. package/dpr/types/ReportQuery.js.map +3 -3
  511. package/dpr/types/ReportStore.js +16 -1
  512. package/dpr/types/ReportStore.js.map +3 -3
  513. package/dpr/types/Services.d.js +16 -1
  514. package/dpr/types/Services.d.js.map +3 -3
  515. package/dpr/types/Templates.d.js +16 -1
  516. package/dpr/types/Templates.d.js.map +3 -3
  517. package/dpr/types/UserReports.js +55 -1
  518. package/dpr/types/UserReports.js.map +3 -3
  519. package/dpr/types/api.d.js +16 -1
  520. package/dpr/types/api.d.js.map +3 -3
  521. package/dpr/types/index.d.js +16 -1
  522. package/dpr/types/index.d.js.map +3 -3
  523. package/dpr/utils/CollatedSummaryBuilder/CollatedSummaryBuilder.js +91 -1
  524. package/dpr/utils/CollatedSummaryBuilder/CollatedSummaryBuilder.js.map +3 -3
  525. package/dpr/utils/CreateDprServices.js +66 -1
  526. package/dpr/utils/CreateDprServices.js.map +3 -3
  527. package/dpr/utils/DataTableBuilder/DataTableBuilder.js +304 -1
  528. package/dpr/utils/DataTableBuilder/DataTableBuilder.js.map +3 -3
  529. package/dpr/utils/DataTableBuilder/types.d.js +16 -1
  530. package/dpr/utils/DataTableBuilder/types.d.js.map +3 -3
  531. package/dpr/utils/DateMapper/DateMapper.js +125 -1
  532. package/dpr/utils/DateMapper/DateMapper.js.map +3 -3
  533. package/dpr/utils/DateMapper/types.d.js +16 -1
  534. package/dpr/utils/DateMapper/types.d.js.map +3 -3
  535. package/dpr/utils/ErrorHandler.js +94 -1
  536. package/dpr/utils/ErrorHandler.js.map +3 -3
  537. package/dpr/utils/ParentChildDataTableBuilder/ParentChildDataTableBuilder.js +201 -1
  538. package/dpr/utils/ParentChildDataTableBuilder/ParentChildDataTableBuilder.js.map +3 -3
  539. package/dpr/utils/ParentChildDataTableBuilder/types.d.js +16 -1
  540. package/dpr/utils/ParentChildDataTableBuilder/types.d.js.map +3 -3
  541. package/dpr/utils/Personalisation/personalisationUtils.js +202 -1
  542. package/dpr/utils/Personalisation/personalisationUtils.js.map +3 -3
  543. package/dpr/utils/Personalisation/types.d.js +16 -1
  544. package/dpr/utils/Personalisation/types.d.js.map +3 -3
  545. package/dpr/utils/SectionedDataTableBuilder/SectionedDataTableBuilder.js +310 -1
  546. package/dpr/utils/SectionedDataTableBuilder/SectionedDataTableBuilder.js.map +3 -3
  547. package/dpr/utils/SectionedDataTableBuilder/types.d.js +16 -1
  548. package/dpr/utils/SectionedDataTableBuilder/types.d.js.map +3 -3
  549. package/dpr/utils/SectionedFieldsTableBuilder/SectionedFieldsTableBuilder.js +145 -1
  550. package/dpr/utils/SectionedFieldsTableBuilder/SectionedFieldsTableBuilder.js.map +3 -3
  551. package/dpr/utils/SummaryDataTableBuilder/SummaryDataTableBuilder.js +60 -1
  552. package/dpr/utils/SummaryDataTableBuilder/SummaryDataTableBuilder.js.map +3 -3
  553. package/dpr/utils/UserStoreItemBuilder.js +247 -1
  554. package/dpr/utils/UserStoreItemBuilder.js.map +3 -3
  555. package/dpr/utils/arrayUtils.js +28 -1
  556. package/dpr/utils/arrayUtils.js.map +3 -3
  557. package/dpr/utils/datasetHelper.js +229 -1
  558. package/dpr/utils/datasetHelper.js.map +3 -3
  559. package/dpr/utils/definitionUtils.js +133 -1
  560. package/dpr/utils/definitionUtils.js.map +3 -3
  561. package/dpr/utils/index.js +44 -1
  562. package/dpr/utils/index.js.map +3 -3
  563. package/dpr/utils/indexedAccesHelper.js +41 -1
  564. package/dpr/utils/indexedAccesHelper.js.map +3 -3
  565. package/dpr/utils/localsHelper.js +105 -1
  566. package/dpr/utils/localsHelper.js.map +3 -3
  567. package/dpr/utils/logger.js +48 -1
  568. package/dpr/utils/logger.js.map +3 -3
  569. package/dpr/utils/reportListsHelper.js +128 -12
  570. package/dpr/utils/reportListsHelper.js.map +3 -3
  571. package/dpr/utils/reportStoreHelper.js +65 -1
  572. package/dpr/utils/reportStoreHelper.js.map +3 -3
  573. package/dpr/utils/requestStatusHelper.js +172 -1
  574. package/dpr/utils/requestStatusHelper.js.map +3 -3
  575. package/dpr/utils/sanitisedError.js +45 -1
  576. package/dpr/utils/sanitisedError.js.map +3 -3
  577. package/dpr/utils/urlHelper.js +103 -1
  578. package/dpr/utils/urlHelper.js.map +3 -3
  579. package/dpr/validation/validate.js +52 -1
  580. package/dpr/validation/validate.js.map +3 -3
  581. package/package.json +11 -6
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var clientClass_exports = {};
30
+ __export(clientClass_exports, {
31
+ ChartVisualisation: () => ChartVisualisation,
32
+ default: () => clientClass_default
33
+ });
34
+ module.exports = __toCommonJS(clientClass_exports);
35
+ var import_auto = __toESM(require("chart.js/auto"));
36
+ var import_chartjs_plugin_datalabels = __toESM(require("chartjs-plugin-datalabels"));
37
+ var import_chartjs_chart_matrix = require("chartjs-chart-matrix");
38
+ var import_DprClientClass = require("../../../DprClientClass");
39
+ class ChartVisualisation extends import_DprClientClass.DprClientClass {
40
+ setupCanvas() {
41
+ this.chartContext = this.getElement().querySelector("canvas");
42
+ this.id = this.chartContext.getAttribute("id");
43
+ this.chartParams = JSON.parse(this.getElement().getAttribute("data-dpr-chart-data"));
44
+ this.type = this.getElement().getAttribute("data-dpr-chart-type");
45
+ this.setValueSuffix();
46
+ this.legend = this.getElement().querySelector(`#js-legend-${this.id}`);
47
+ this.tooltipDetailsEl = document.getElementById(`dpr-${this.id}-tooltip-details`);
48
+ this.headlineValuesEl = document.getElementById(`dpr-${this.id}-headline-values`);
49
+ this.labelElement = document.getElementById(`dpr-${this.id}-label`);
50
+ this.valueElement = document.getElementById(`dpr-${this.id}-value`);
51
+ this.legendElement = document.getElementById(`dpr-${this.id}-legend`);
52
+ this.legendElement = document.getElementById(`dpr-${this.id}-legend`);
53
+ if (this.chartParams.partialDate) {
54
+ this.partialStart = this.chartParams.partialDate.start || false;
55
+ this.partialEnd = this.chartParams.partialDate.end || false;
56
+ }
57
+ this.singleDataset = this.chartParams.datasets.length === 1;
58
+ }
59
+ initChart() {
60
+ window.addEventListener("load", () => {
61
+ import_auto.default.defaults.font.family = "GDS Transport";
62
+ import_auto.default.defaults.font.size = 12;
63
+ import_auto.default.register(import_chartjs_plugin_datalabels.default);
64
+ import_auto.default.register(import_chartjs_chart_matrix.MatrixController, import_chartjs_chart_matrix.MatrixElement);
65
+ this.chart = new import_auto.default(this.chartContext, this.chartData);
66
+ });
67
+ this.initChartEvents();
68
+ }
69
+ generateChartData(settings) {
70
+ const { datasets, labels, config } = this.chartParams;
71
+ const { options, datalabels, plugins, pluginsOptions, toolTipOptions, hoverEvent, styling } = settings;
72
+ const chartData = {
73
+ type: this.type,
74
+ data: {
75
+ labels,
76
+ datasets: this.createDatasets(datasets, styling)
77
+ },
78
+ options: {
79
+ ...config,
80
+ ...options && options,
81
+ ...hoverEvent && hoverEvent,
82
+ plugins: {
83
+ ...config.plugins,
84
+ ...pluginsOptions && pluginsOptions,
85
+ ...datalabels && { datalabels },
86
+ tooltip: {
87
+ ...config.plugins.tooltip,
88
+ ...toolTipOptions && toolTipOptions
89
+ }
90
+ }
91
+ },
92
+ plugins: plugins && plugins.length ? [...plugins] : []
93
+ };
94
+ return chartData;
95
+ }
96
+ createDatasets(datasets, styling) {
97
+ return datasets.map((dataset) => {
98
+ return {
99
+ ...dataset,
100
+ ...styling && styling
101
+ };
102
+ });
103
+ }
104
+ setHoverValue({ label, value, legend, ctx }) {
105
+ if (ctx.tooltipDetailsEl) {
106
+ ctx.tooltipDetailsEl.style.display = "block";
107
+ ctx.labelElement.innerHTML = ctx.singleDataset ? `${label}` : `${legend}: ${label}`;
108
+ ctx.valueElement.innerHTML = `${value}`;
109
+ }
110
+ if (ctx.headlineValuesEl) {
111
+ ctx.headlineValuesEl.style.display = "none";
112
+ }
113
+ if (!legend) {
114
+ ctx.legendElement.style.display = "none";
115
+ }
116
+ }
117
+ setValueSuffix() {
118
+ this.unit = this.getElement().getAttribute("data-dpr-chart-unit");
119
+ this.suffix = this.unit === "percentage" ? "%" : "";
120
+ }
121
+ isPercentage() {
122
+ return this.unit === "percentage";
123
+ }
124
+ initChartEvents() {
125
+ this.chart.canvas.addEventListener("mouseout", (e) => {
126
+ if (this.tooltipDetailsEl) this.tooltipDetailsEl.style.display = "none";
127
+ if (this.headlineValuesEl) this.headlineValuesEl.style.display = "block";
128
+ });
129
+ }
130
+ }
131
+ var clientClass_default = ChartVisualisation;
132
+ // Annotate the CommonJS export names for ESM import in node:
133
+ 0 && (module.exports = {
134
+ ChartVisualisation
135
+ });
136
+ //# sourceMappingURL=clientClass.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../dpr/components/_charts/chart/clientClass.ts"],
4
+ "sourcesContent": ["// @ts-nocheck\n/* eslint-disable class-methods-use-this */\nimport Chart from 'chart.js/auto'\nimport ChartDataLabels from 'chartjs-plugin-datalabels'\nimport { MatrixController, MatrixElement } from 'chartjs-chart-matrix'\n\nimport { DprClientClass } from '../../../DprClientClass'\n\nclass ChartVisualisation extends DprClientClass {\n setupCanvas() {\n this.chartContext = this.getElement().querySelector('canvas')\n\n // data\n this.id = this.chartContext.getAttribute('id')\n this.chartParams = JSON.parse(this.getElement().getAttribute('data-dpr-chart-data'))\n this.type = this.getElement().getAttribute('data-dpr-chart-type')\n this.setValueSuffix()\n\n // elements\n this.legend = this.getElement().querySelector(`#js-legend-${this.id}`)\n\n // ChartCard elements\n this.tooltipDetailsEl = document.getElementById(`dpr-${this.id}-tooltip-details`)\n this.headlineValuesEl = document.getElementById(`dpr-${this.id}-headline-values`)\n this.labelElement = document.getElementById(`dpr-${this.id}-label`)\n this.valueElement = document.getElementById(`dpr-${this.id}-value`)\n this.legendElement = document.getElementById(`dpr-${this.id}-legend`)\n this.legendElement = document.getElementById(`dpr-${this.id}-legend`)\n\n if (this.chartParams.partialDate) {\n this.partialStart = this.chartParams.partialDate.start || false\n this.partialEnd = this.chartParams.partialDate.end || false\n }\n\n // flags\n this.singleDataset = this.chartParams.datasets.length === 1\n }\n\n initChart() {\n // Prevent font loading issue\n window.addEventListener('load', () => {\n // An example of creating a chart, replace with your code:\n Chart.defaults.font.family = 'GDS Transport'\n Chart.defaults.font.size = 12\n Chart.register(ChartDataLabels)\n Chart.register(MatrixController, MatrixElement)\n this.chart = new Chart(this.chartContext, this.chartData)\n })\n\n this.initChartEvents()\n }\n\n generateChartData(settings) {\n const { datasets, labels, config } = this.chartParams\n const { options, datalabels, plugins, pluginsOptions, toolTipOptions, hoverEvent, styling } = settings\n\n const chartData = {\n type: this.type,\n data: {\n labels,\n datasets: this.createDatasets(datasets, styling),\n },\n options: {\n ...config,\n ...(options && options),\n ...(hoverEvent && hoverEvent),\n plugins: {\n ...config.plugins,\n ...(pluginsOptions && pluginsOptions),\n ...(datalabels && { datalabels }),\n tooltip: {\n ...config.plugins.tooltip,\n ...(toolTipOptions && toolTipOptions),\n },\n },\n },\n plugins: plugins && plugins.length ? [...plugins] : [],\n }\n\n return chartData\n }\n\n createDatasets(datasets, styling) {\n return datasets.map((dataset) => {\n return {\n ...dataset,\n ...(styling && styling),\n }\n })\n }\n\n setHoverValue({ label, value, legend, ctx }) {\n if (ctx.tooltipDetailsEl) {\n ctx.tooltipDetailsEl.style.display = 'block'\n ctx.labelElement.innerHTML = ctx.singleDataset ? `${label}` : `${legend}: ${label}`\n ctx.valueElement.innerHTML = `${value}`\n }\n if (ctx.headlineValuesEl) {\n ctx.headlineValuesEl.style.display = 'none'\n }\n if (!legend) {\n ctx.legendElement.style.display = 'none'\n }\n }\n\n setValueSuffix() {\n this.unit = this.getElement().getAttribute('data-dpr-chart-unit')\n this.suffix = this.unit === 'percentage' ? '%' : ''\n }\n\n isPercentage() {\n return this.unit === 'percentage'\n }\n\n initChartEvents() {\n this.chart.canvas.addEventListener('mouseout', (e) => {\n if (this.tooltipDetailsEl) this.tooltipDetailsEl.style.display = 'none'\n if (this.headlineValuesEl) this.headlineValuesEl.style.display = 'block'\n })\n }\n}\n\nexport { ChartVisualisation }\nexport default ChartVisualisation\n"],
5
+ "mappings": "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",
6
+ "names": ["Chart", "ChartDataLabels"]
7
+ }
@@ -1,9 +1,10 @@
1
+ // @ts-nocheck
1
2
  /* eslint-disable class-methods-use-this */
2
3
  import Chart from 'chart.js/auto'
3
4
  import ChartDataLabels from 'chartjs-plugin-datalabels'
4
5
  import { MatrixController, MatrixElement } from 'chartjs-chart-matrix'
5
6
 
6
- import { DprClientClass } from '../../../DprClientClass.mjs'
7
+ import { DprClientClass } from '../../../DprClientClass'
7
8
 
8
9
  class ChartVisualisation extends DprClientClass {
9
10
  setupCanvas() {
@@ -1,2 +1,97 @@
1
- "use strict";var D=Object.create;var a=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty;var g=(i,t)=>{for(var s in t)a(i,s,{get:t[s],enumerable:!0})},r=(i,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of l(t))!c.call(i,e)&&e!==s&&a(i,e,{get:()=>t[e],enumerable:!(n=f(t,e))||n.enumerable});return i};var h=(i,t,s)=>(s=i!=null?D(d(i)):{},r(t||!i||!i.__esModule?a(s,"default",{value:i,enumerable:!0}):s,i)),b=i=>r(a({},"__esModule",{value:!0}),i);var k={};g(k,{DoughnutChart:()=>o,default:()=>y});module.exports=b(k);var u=require("../../../_dashboards/dashboard-visualisation/types"),p=h(require("../Chart")),m=h(require("./validate"));class o extends p.default{definition;measures;keys;init=()=>{this.measures=this.definition.columns.measures,this.keys=this.definition.columns.keys||[],this.initUnit(this.measures),this.getLabelId(this.keys)};withDefinition=t=>(this.definition=m.default.DoughnutSchema.parse(t),this.init(),this);build=()=>(this.createDatasets(this.measures,this.responseData),this.augmentDataset(),this.setBespokeOptions(),this.createLabels(this.measures),{type:u.DashboardVisualisationType.DONUT,options:{unit:this.unit},data:{labels:this.labels,datasets:this.datasets,config:this.config}});augmentDataset=()=>{this.datasets=this.datasets.map(t=>({...t,backgroundColor:[...this.hexColours,...this.hexColours],borderColor:"#FFFFFF",hoverOffset:4,datalabels:{anchor:"center",borderWidth:0}}))};setBespokeOptions=()=>{const t=this.datasets.length===1?"50%":"20%";this.config={...this.config,cutout:t}}}var y=o;0&&(module.exports={DoughnutChart});
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var DoughnutChart_exports = {};
30
+ __export(DoughnutChart_exports, {
31
+ DoughnutChart: () => DoughnutChart,
32
+ default: () => DoughnutChart_default
33
+ });
34
+ module.exports = __toCommonJS(DoughnutChart_exports);
35
+ var import_types = require("../../../_dashboards/dashboard-visualisation/types");
36
+ var import_Chart = __toESM(require("../Chart"));
37
+ var import_validate = __toESM(require("./validate"));
38
+ class DoughnutChart extends import_Chart.default {
39
+ definition;
40
+ measures;
41
+ keys;
42
+ init = () => {
43
+ this.measures = this.definition.columns.measures;
44
+ this.keys = this.definition.columns.keys || [];
45
+ this.initUnit(this.measures);
46
+ this.getLabelId(this.keys);
47
+ };
48
+ withDefinition = (definition) => {
49
+ this.definition = import_validate.default.DoughnutSchema.parse(definition);
50
+ this.init();
51
+ return this;
52
+ };
53
+ build = () => {
54
+ this.createDatasets(this.measures, this.responseData);
55
+ this.augmentDataset();
56
+ this.setBespokeOptions();
57
+ this.createLabels(this.measures);
58
+ return {
59
+ type: import_types.DashboardVisualisationType.DONUT,
60
+ options: {
61
+ unit: this.unit
62
+ },
63
+ data: {
64
+ labels: this.labels,
65
+ datasets: this.datasets,
66
+ config: this.config
67
+ }
68
+ };
69
+ };
70
+ augmentDataset = () => {
71
+ this.datasets = this.datasets.map((set) => {
72
+ return {
73
+ ...set,
74
+ backgroundColor: [...this.hexColours, ...this.hexColours],
75
+ borderColor: "#FFFFFF",
76
+ hoverOffset: 4,
77
+ datalabels: {
78
+ anchor: "center",
79
+ borderWidth: 0
80
+ }
81
+ };
82
+ });
83
+ };
84
+ setBespokeOptions = () => {
85
+ const cutout = this.datasets.length === 1 ? "50%" : "20%";
86
+ this.config = {
87
+ ...this.config,
88
+ cutout
89
+ };
90
+ };
91
+ }
92
+ var DoughnutChart_default = DoughnutChart;
93
+ // Annotate the CommonJS export names for ESM import in node:
94
+ 0 && (module.exports = {
95
+ DoughnutChart
96
+ });
2
97
  //# sourceMappingURL=DoughnutChart.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../../src/dpr/components/_charts/chart/doughnut/DoughnutChart.ts"],
3
+ "sources": ["../../../../../dpr/components/_charts/chart/doughnut/DoughnutChart.ts"],
4
4
  "sourcesContent": ["/* eslint-disable prefer-destructuring */\nimport {\n DashboardVisualisationType,\n DashboardVisualisationData,\n VisualisationDefinitionKey,\n} from '../../../_dashboards/dashboard-visualisation/types'\nimport { components } from '../../../../types/api'\nimport Chart from '../Chart'\nimport { DoughnutDefinitionMeasure, DoughnutDefinitionType } from './types'\nimport DoughnutChartSchemas from './validate'\n\nclass DoughnutChart extends Chart {\n private definition!: DoughnutDefinitionType\n\n private measures!: DoughnutDefinitionMeasure[]\n\n private keys!: VisualisationDefinitionKey[]\n\n private init = () => {\n this.measures = this.definition.columns.measures\n this.keys = this.definition.columns.keys || []\n this.initUnit(this.measures)\n this.getLabelId(this.keys)\n }\n\n withDefinition = (definition: components['schemas']['DashboardVisualisationDefinition']) => {\n this.definition = DoughnutChartSchemas.DoughnutSchema.parse(definition)\n this.init()\n\n return this\n }\n\n build = (): DashboardVisualisationData => {\n this.createDatasets(this.measures, this.responseData)\n this.augmentDataset()\n this.setBespokeOptions()\n this.createLabels(this.measures)\n\n return {\n type: DashboardVisualisationType.DONUT,\n options: {\n unit: this.unit,\n },\n data: {\n labels: this.labels,\n datasets: this.datasets,\n config: this.config,\n },\n }\n }\n\n private augmentDataset = () => {\n this.datasets = this.datasets.map((set) => {\n return {\n ...set,\n backgroundColor: [...this.hexColours, ...this.hexColours],\n borderColor: '#FFFFFF',\n hoverOffset: 4,\n datalabels: {\n anchor: 'center',\n borderWidth: 0,\n },\n }\n })\n }\n\n private setBespokeOptions = () => {\n const cutout = this.datasets.length === 1 ? '50%' : '20%'\n this.config = {\n ...this.config,\n cutout,\n }\n }\n}\n\nexport { DoughnutChart }\nexport default DoughnutChart\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GACA,IAAAK,EAIO,8DAEPC,EAAkB,uBAElBC,EAAiC,yBAEjC,MAAML,UAAsB,EAAAM,OAAM,CACxB,WAEA,SAEA,KAEA,KAAO,IAAM,CACnB,KAAK,SAAW,KAAK,WAAW,QAAQ,SACxC,KAAK,KAAO,KAAK,WAAW,QAAQ,MAAQ,CAAC,EAC7C,KAAK,SAAS,KAAK,QAAQ,EAC3B,KAAK,WAAW,KAAK,IAAI,CAC3B,EAEA,eAAkBC,IAChB,KAAK,WAAa,EAAAC,QAAqB,eAAe,MAAMD,CAAU,EACtE,KAAK,KAAK,EAEH,MAGT,MAAQ,KACN,KAAK,eAAe,KAAK,SAAU,KAAK,YAAY,EACpD,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,aAAa,KAAK,QAAQ,EAExB,CACL,KAAM,6BAA2B,MACjC,QAAS,CACP,KAAM,KAAK,IACb,EACA,KAAM,CACJ,OAAQ,KAAK,OACb,SAAU,KAAK,SACf,OAAQ,KAAK,MACf,CACF,GAGM,eAAiB,IAAM,CAC7B,KAAK,SAAW,KAAK,SAAS,IAAKE,IAC1B,CACL,GAAGA,EACH,gBAAiB,CAAC,GAAG,KAAK,WAAY,GAAG,KAAK,UAAU,EACxD,YAAa,UACb,YAAa,EACb,WAAY,CACV,OAAQ,SACR,YAAa,CACf,CACF,EACD,CACH,EAEQ,kBAAoB,IAAM,CAChC,MAAMC,EAAS,KAAK,SAAS,SAAW,EAAI,MAAQ,MACpD,KAAK,OAAS,CACZ,GAAG,KAAK,OACR,OAAAA,CACF,CACF,CACF,CAGA,IAAOT,EAAQD",
6
- "names": ["DoughnutChart_exports", "__export", "DoughnutChart", "DoughnutChart_default", "__toCommonJS", "import_types", "import_Chart", "import_validate", "Chart", "definition", "DoughnutChartSchemas", "set", "cutout"]
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAIO;AAEP,mBAAkB;AAElB,sBAAiC;AAEjC,MAAM,sBAAsB,aAAAA,QAAM;AAAA,EACxB;AAAA,EAEA;AAAA,EAEA;AAAA,EAEA,OAAO,MAAM;AACnB,SAAK,WAAW,KAAK,WAAW,QAAQ;AACxC,SAAK,OAAO,KAAK,WAAW,QAAQ,QAAQ,CAAC;AAC7C,SAAK,SAAS,KAAK,QAAQ;AAC3B,SAAK,WAAW,KAAK,IAAI;AAAA,EAC3B;AAAA,EAEA,iBAAiB,CAAC,eAA0E;AAC1F,SAAK,aAAa,gBAAAC,QAAqB,eAAe,MAAM,UAAU;AACtE,SAAK,KAAK;AAEV,WAAO;AAAA,EACT;AAAA,EAEA,QAAQ,MAAkC;AACxC,SAAK,eAAe,KAAK,UAAU,KAAK,YAAY;AACpD,SAAK,eAAe;AACpB,SAAK,kBAAkB;AACvB,SAAK,aAAa,KAAK,QAAQ;AAE/B,WAAO;AAAA,MACL,MAAM,wCAA2B;AAAA,MACjC,SAAS;AAAA,QACP,MAAM,KAAK;AAAA,MACb;AAAA,MACA,MAAM;AAAA,QACJ,QAAQ,KAAK;AAAA,QACb,UAAU,KAAK;AAAA,QACf,QAAQ,KAAK;AAAA,MACf;AAAA,IACF;AAAA,EACF;AAAA,EAEQ,iBAAiB,MAAM;AAC7B,SAAK,WAAW,KAAK,SAAS,IAAI,CAAC,QAAQ;AACzC,aAAO;AAAA,QACL,GAAG;AAAA,QACH,iBAAiB,CAAC,GAAG,KAAK,YAAY,GAAG,KAAK,UAAU;AAAA,QACxD,aAAa;AAAA,QACb,aAAa;AAAA,QACb,YAAY;AAAA,UACV,QAAQ;AAAA,UACR,aAAa;AAAA,QACf;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEQ,oBAAoB,MAAM;AAChC,UAAM,SAAS,KAAK,SAAS,WAAW,IAAI,QAAQ;AACpD,SAAK,SAAS;AAAA,MACZ,GAAG,KAAK;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACF;AAGA,IAAO,wBAAQ;",
6
+ "names": ["Chart", "DoughnutChartSchemas"]
7
7
  }
@@ -0,0 +1,170 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var clientClass_exports = {};
30
+ __export(clientClass_exports, {
31
+ DoughnutChartVisualisation: () => DoughnutChartVisualisation,
32
+ default: () => clientClass_default
33
+ });
34
+ module.exports = __toCommonJS(clientClass_exports);
35
+ var import_clientClass = __toESM(require("../clientClass"));
36
+ class DoughnutChartVisualisation extends import_clientClass.default {
37
+ static getModuleName() {
38
+ return "doughnut-chart";
39
+ }
40
+ initialise() {
41
+ this.setupCanvas();
42
+ this.settings = this.initSettings();
43
+ this.chartData = this.generateChartData(this.settings);
44
+ this.initChart(this.chartData);
45
+ }
46
+ initSettings() {
47
+ return {
48
+ options: this.setOptions(),
49
+ datalabels: this.setDataLabels(),
50
+ pluginsOptions: this.setPluginsOptions(),
51
+ toolTipOptions: this.setToolTipOptions(),
52
+ plugins: this.setPlugins()
53
+ };
54
+ }
55
+ setOptions() {
56
+ const cutoutValue = this.chartParams.datasets.length === 1 ? "50%" : "20%";
57
+ return {
58
+ cutout: cutoutValue
59
+ };
60
+ }
61
+ setPluginsOptions() {
62
+ return {
63
+ legend: {
64
+ display: true,
65
+ position: "bottom"
66
+ }
67
+ };
68
+ }
69
+ setPlugins() {
70
+ const plugins = [];
71
+ if (this.chartParams.datasets.length === 1 && !this.isPercentage) {
72
+ plugins.push(this.setCentralText());
73
+ }
74
+ return plugins;
75
+ }
76
+ setCentralText() {
77
+ return {
78
+ // Put the total in the center of the donut
79
+ id: "text",
80
+ beforeDraw(chart) {
81
+ const { width } = chart;
82
+ const { height } = chart;
83
+ const { ctx } = chart;
84
+ ctx.textBaseline = "middle";
85
+ let fontSize = 2.5;
86
+ ctx.font = `100 ${fontSize}em GDS Transport`;
87
+ ctx.fillStyle = " #505a5f";
88
+ const total = chart.data.datasets[0].data.reduce((a, c) => a + c, 0);
89
+ const text = total;
90
+ const textX = Math.round((width - ctx.measureText(text).width) / 2);
91
+ const textY = height / 2;
92
+ ctx.fillText(text, textX, textY);
93
+ ctx.save();
94
+ ctx.textBaseline = "middle";
95
+ fontSize = 1;
96
+ ctx.font = `100 ${fontSize}em GDS Transport`;
97
+ ctx.fillStyle = " #505a5f";
98
+ const title = "Total";
99
+ const titleX = Math.round((width - ctx.measureText(title).width) / 2);
100
+ const titleY = textY + 30;
101
+ ctx.fillText(title, titleX, titleY);
102
+ ctx.save();
103
+ }
104
+ };
105
+ }
106
+ setToolTipOptions() {
107
+ const ctx = this;
108
+ return {
109
+ callbacks: {
110
+ title(context) {
111
+ const { label, dataset } = context[0];
112
+ const { label: establishmentId } = dataset;
113
+ const title = ctx.singleDataset ? `${label}` : `${establishmentId}: ${label}`;
114
+ return title;
115
+ },
116
+ label(context) {
117
+ const { label, parsed: value, dataset } = context;
118
+ const { label: legend } = dataset;
119
+ const dataArr = dataset.data;
120
+ let toolipValue = `${value}${ctx.suffix}`;
121
+ if (!ctx.isPercentage) {
122
+ const val = dataArr.reduce((sum, d) => sum + Number(d), 0);
123
+ const percentage = `${(value * 100 / val).toFixed(2)}%`;
124
+ toolipValue = ctx.singleDataset ? `${toolipValue} (${percentage})` : `${legend}: ${toolipValue} (${percentage})`;
125
+ ctx.setHoverValue({ label, value: toolipValue, legend, ctx });
126
+ } else {
127
+ toolipValue = `${toolipValue}`;
128
+ ctx.setHoverValue({ label, value: toolipValue, legend, ctx });
129
+ }
130
+ return toolipValue;
131
+ }
132
+ }
133
+ };
134
+ }
135
+ setDataLabels() {
136
+ const ctx = this;
137
+ return {
138
+ textAlign: "center",
139
+ color: "#FFF",
140
+ display: (context) => {
141
+ const { dataset, dataIndex } = context;
142
+ const value = dataset.data[dataIndex];
143
+ const total = dataset.data.reduce((a, c) => a + c, 0);
144
+ const percentage = value / total * 100;
145
+ return percentage > 4;
146
+ },
147
+ formatter: (value, context) => {
148
+ const { dataset } = context;
149
+ const label = ctx.singleDataset ? `${value}${this.suffix}` : `${value}${this.suffix}
150
+ ${dataset.label}`;
151
+ return label;
152
+ },
153
+ labels: {
154
+ title: {
155
+ font: {
156
+ weight: "bold",
157
+ size: 16,
158
+ color: "#FFF"
159
+ }
160
+ }
161
+ }
162
+ };
163
+ }
164
+ }
165
+ var clientClass_default = DoughnutChartVisualisation;
166
+ // Annotate the CommonJS export names for ESM import in node:
167
+ 0 && (module.exports = {
168
+ DoughnutChartVisualisation
169
+ });
170
+ //# sourceMappingURL=clientClass.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../dpr/components/_charts/chart/doughnut/clientClass.ts"],
4
+ "sourcesContent": ["// @ts-nocheck\n/* eslint-disable class-methods-use-this */\nimport ChartVisualisation from '../clientClass'\n\nclass DoughnutChartVisualisation extends ChartVisualisation {\n static getModuleName() {\n return 'doughnut-chart'\n }\n\n initialise() {\n this.setupCanvas()\n this.settings = this.initSettings()\n this.chartData = this.generateChartData(this.settings)\n this.initChart(this.chartData)\n }\n\n initSettings() {\n return {\n options: this.setOptions(),\n datalabels: this.setDataLabels(),\n pluginsOptions: this.setPluginsOptions(),\n toolTipOptions: this.setToolTipOptions(),\n plugins: this.setPlugins(),\n }\n }\n\n setOptions() {\n const cutoutValue = this.chartParams.datasets.length === 1 ? '50%' : '20%'\n return {\n cutout: cutoutValue,\n }\n }\n\n setPluginsOptions() {\n return {\n legend: {\n display: true,\n position: 'bottom',\n },\n }\n }\n\n setPlugins() {\n const plugins = []\n if (this.chartParams.datasets.length === 1 && !this.isPercentage) {\n plugins.push(this.setCentralText())\n }\n return plugins\n }\n\n setCentralText() {\n return {\n // Put the total in the center of the donut\n id: 'text',\n beforeDraw(chart) {\n const { width } = chart\n const { height } = chart\n const { ctx } = chart\n\n ctx.textBaseline = 'middle'\n let fontSize = 2.5\n ctx.font = `100 ${fontSize}em GDS Transport`\n ctx.fillStyle = '\t#505a5f'\n\n // Accumulated total\n const total = chart.data.datasets[0].data.reduce((a, c) => a + c, 0)\n const text = total\n const textX = Math.round((width - ctx.measureText(text).width) / 2)\n const textY = height / 2\n\n ctx.fillText(text, textX, textY)\n ctx.save()\n\n ctx.textBaseline = 'middle'\n fontSize = 1\n ctx.font = `100 ${fontSize}em GDS Transport`\n ctx.fillStyle = '\t#505a5f'\n\n // Chart title\n const title = 'Total'\n const titleX = Math.round((width - ctx.measureText(title).width) / 2)\n const titleY = textY + 30\n\n ctx.fillText(title, titleX, titleY)\n ctx.save()\n },\n }\n }\n\n setToolTipOptions() {\n const ctx = this\n return {\n callbacks: {\n title(context) {\n const { label, dataset } = context[0]\n const { label: establishmentId } = dataset\n const title = ctx.singleDataset ? `${label}` : `${establishmentId}: ${label}`\n return title\n },\n label(context) {\n const { label, parsed: value, dataset } = context\n const { label: legend } = dataset\n const dataArr = dataset.data\n\n let toolipValue = `${value}${ctx.suffix}`\n\n if (!ctx.isPercentage) {\n const val = dataArr.reduce((sum, d) => sum + Number(d), 0)\n const percentage = `${((value * 100) / val).toFixed(2)}%`\n toolipValue = ctx.singleDataset\n ? `${toolipValue} (${percentage})`\n : `${legend}: ${toolipValue} (${percentage})`\n ctx.setHoverValue({ label, value: toolipValue, legend, ctx })\n } else {\n toolipValue = `${toolipValue}`\n ctx.setHoverValue({ label, value: toolipValue, legend, ctx })\n }\n\n return toolipValue\n },\n },\n }\n }\n\n setDataLabels() {\n const ctx = this\n return {\n textAlign: 'center',\n color: '#FFF',\n display: (context) => {\n const { dataset, dataIndex } = context\n const value = dataset.data[dataIndex]\n const total = dataset.data.reduce((a, c) => a + c, 0)\n const percentage = (value / total) * 100\n return percentage > 4\n },\n formatter: (value, context) => {\n const { dataset } = context\n const label = ctx.singleDataset\n ? `${value}${this.suffix}`\n : `${value}${this.suffix}\n${dataset.label}`\n\n return label\n },\n labels: {\n title: {\n font: {\n weight: 'bold',\n size: 16,\n color: '#FFF',\n },\n },\n },\n }\n }\n}\n\nexport { DoughnutChartVisualisation }\nexport default DoughnutChartVisualisation\n"],
5
+ "mappings": "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",
6
+ "names": ["ChartVisualisation"]
7
+ }
@@ -1,5 +1,6 @@
1
+ // @ts-nocheck
1
2
  /* eslint-disable class-methods-use-this */
2
- import ChartVisualisation from '../clientClass.mjs'
3
+ import ChartVisualisation from '../clientClass'
3
4
 
4
5
  class DoughnutChartVisualisation extends ChartVisualisation {
5
6
  static getModuleName() {
@@ -1,2 +1,17 @@
1
- "use strict";var h=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var m=(t,e,n,u)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of a(e))!i.call(t,o)&&o!==n&&h(t,o,{get:()=>e[o],enumerable:!(u=r(e,o))||u.enumerable});return t};var p=t=>m(h({},"__esModule",{value:!0}),t);var D={};module.exports=p(D);
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var types_exports = {};
16
+ module.exports = __toCommonJS(types_exports);
2
17
  //# sourceMappingURL=types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../../src/dpr/components/_charts/chart/doughnut/types.ts"],
3
+ "sources": ["../../../../../dpr/components/_charts/chart/doughnut/types.ts"],
4
4
  "sourcesContent": ["import z from 'zod'\nimport DoughnutChartSchemas from './validate'\n\nexport type DoughnutDefinitionType = z.infer<typeof DoughnutChartSchemas.DoughnutSchema>\nexport type DoughnutDefinitionMeasure = z.infer<typeof DoughnutChartSchemas.DounutMeasureSchema>\n"],
5
- "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
- "names": ["types_exports", "__toCommonJS"]
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
7
  }
@@ -1,2 +1,49 @@
1
- "use strict";var i=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var p=(a,o)=>{for(var e in o)i(a,e,{get:o[e],enumerable:!0})},l=(a,o,e,u)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of m(o))!h.call(a,s)&&s!==e&&i(a,s,{get:()=>o[s],enumerable:!(u=c(o,s))||u.enumerable});return a};var b=a=>l(i({},"__esModule",{value:!0}),a);var f={};p(f,{default:()=>j});module.exports=b(f);var t=require("zod"),n=require("../../../_dashboards/dashboard-visualisation/Validate");const r=t.z.object({id:t.z.string(),display:t.z.string().optional(),unit:t.z.enum(["NUMBER","PERCENTAGE"]).optional()}),d=t.z.object({showLatest:t.z.boolean().default(!0)}),g=t.z.object({...n.DashboardVisualisationSchema.shape,type:t.z.literal("doughnut"),display:t.z.string(),options:t.z.object(d.shape).optional(),columns:t.z.object({...n.DashboardColumns.shape,measures:t.z.array(r).min(2,"Measure must contain 2 items")})}),D={DoughnutSchema:g,DounutMeasureSchema:r};var j=D;
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var validate_exports = {};
20
+ __export(validate_exports, {
21
+ default: () => validate_default
22
+ });
23
+ module.exports = __toCommonJS(validate_exports);
24
+ var import_zod = require("zod");
25
+ var import_Validate = require("../../../_dashboards/dashboard-visualisation/Validate");
26
+ const DounutMeasureSchema = import_zod.z.object({
27
+ id: import_zod.z.string(),
28
+ display: import_zod.z.string().optional(),
29
+ unit: import_zod.z.enum(["NUMBER", "PERCENTAGE"]).optional()
30
+ });
31
+ const DonutOptions = import_zod.z.object({
32
+ showLatest: import_zod.z.boolean().default(true)
33
+ });
34
+ const DoughnutSchema = import_zod.z.object({
35
+ ...import_Validate.DashboardVisualisationSchema.shape,
36
+ type: import_zod.z.literal("doughnut"),
37
+ display: import_zod.z.string(),
38
+ options: import_zod.z.object(DonutOptions.shape).optional(),
39
+ columns: import_zod.z.object({
40
+ ...import_Validate.DashboardColumns.shape,
41
+ measures: import_zod.z.array(DounutMeasureSchema).min(2, "Measure must contain 2 items")
42
+ })
43
+ });
44
+ const DoughnutChartSchemas = {
45
+ DoughnutSchema,
46
+ DounutMeasureSchema
47
+ };
48
+ var validate_default = DoughnutChartSchemas;
2
49
  //# sourceMappingURL=validate.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../../src/dpr/components/_charts/chart/doughnut/validate.ts"],
3
+ "sources": ["../../../../../dpr/components/_charts/chart/doughnut/validate.ts"],
4
4
  "sourcesContent": ["import { z } from 'zod'\nimport { DashboardVisualisationSchema, DashboardColumns } from '../../../_dashboards/dashboard-visualisation/Validate'\n\nconst DounutMeasureSchema = z.object({\n id: z.string(),\n display: z.string().optional(),\n unit: z.enum(['NUMBER', 'PERCENTAGE']).optional(),\n})\n\nconst DonutOptions = z.object({\n showLatest: z.boolean().default(true),\n})\n\nconst DoughnutSchema = z.object({\n ...DashboardVisualisationSchema.shape,\n type: z.literal('doughnut'),\n display: z.string(),\n options: z.object(DonutOptions.shape).optional(),\n columns: z.object({\n ...DashboardColumns.shape,\n measures: z.array(DounutMeasureSchema).min(2, 'Measure must contain 2 items'),\n }),\n})\n\nconst DoughnutChartSchemas = {\n DoughnutSchema,\n DounutMeasureSchema,\n}\n\nexport default DoughnutChartSchemas\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAkB,eAClBC,EAA+D,iEAE/D,MAAMC,EAAsB,IAAE,OAAO,CACnC,GAAI,IAAE,OAAO,EACb,QAAS,IAAE,OAAO,EAAE,SAAS,EAC7B,KAAM,IAAE,KAAK,CAAC,SAAU,YAAY,CAAC,EAAE,SAAS,CAClD,CAAC,EAEKC,EAAe,IAAE,OAAO,CAC5B,WAAY,IAAE,QAAQ,EAAE,QAAQ,EAAI,CACtC,CAAC,EAEKC,EAAiB,IAAE,OAAO,CAC9B,GAAG,+BAA6B,MAChC,KAAM,IAAE,QAAQ,UAAU,EAC1B,QAAS,IAAE,OAAO,EAClB,QAAS,IAAE,OAAOD,EAAa,KAAK,EAAE,SAAS,EAC/C,QAAS,IAAE,OAAO,CAChB,GAAG,mBAAiB,MACpB,SAAU,IAAE,MAAMD,CAAmB,EAAE,IAAI,EAAG,8BAA8B,CAC9E,CAAC,CACH,CAAC,EAEKG,EAAuB,CAC3B,eAAAD,EACA,oBAAAF,CACF,EAEA,IAAOJ,EAAQO",
6
- "names": ["validate_exports", "__export", "validate_default", "__toCommonJS", "import_zod", "import_Validate", "DounutMeasureSchema", "DonutOptions", "DoughnutSchema", "DoughnutChartSchemas"]
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAkB;AAClB,sBAA+D;AAE/D,MAAM,sBAAsB,aAAE,OAAO;AAAA,EACnC,IAAI,aAAE,OAAO;AAAA,EACb,SAAS,aAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,MAAM,aAAE,KAAK,CAAC,UAAU,YAAY,CAAC,EAAE,SAAS;AAClD,CAAC;AAED,MAAM,eAAe,aAAE,OAAO;AAAA,EAC5B,YAAY,aAAE,QAAQ,EAAE,QAAQ,IAAI;AACtC,CAAC;AAED,MAAM,iBAAiB,aAAE,OAAO;AAAA,EAC9B,GAAG,6CAA6B;AAAA,EAChC,MAAM,aAAE,QAAQ,UAAU;AAAA,EAC1B,SAAS,aAAE,OAAO;AAAA,EAClB,SAAS,aAAE,OAAO,aAAa,KAAK,EAAE,SAAS;AAAA,EAC/C,SAAS,aAAE,OAAO;AAAA,IAChB,GAAG,iCAAiB;AAAA,IACpB,UAAU,aAAE,MAAM,mBAAmB,EAAE,IAAI,GAAG,8BAA8B;AAAA,EAC9E,CAAC;AACH,CAAC;AAED,MAAM,uBAAuB;AAAA,EAC3B;AAAA,EACA;AACF;AAEA,IAAO,mBAAQ;",
6
+ "names": []
7
7
  }