@epcare/esm-report-builder 0.1.1-pre.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +5 -0
- package/.eslintrc.js +19 -0
- package/.github/workflows/main.yml +162 -0
- package/.prettierrc +8 -0
- package/LICENSE +401 -0
- package/README.md +317 -0
- package/dist/0081d5d3d536cb23.js +1 -0
- package/dist/02acc4469a2fe2e4.woff2 +0 -0
- package/dist/081587ca0db8e63f.woff2 +0 -0
- package/dist/08cf53c4e5e71cf1.woff2 +0 -0
- package/dist/090b2bc014d24ea4.woff2 +0 -0
- package/dist/09de5db63ef7b579.js +1 -0
- package/dist/0ae92bcea615e948.woff2 +0 -0
- package/dist/0be8520d8945b3b7.woff2 +0 -0
- package/dist/0e7dd073cd8bb0ad.woff2 +0 -0
- package/dist/0edb77cd19e43550.js +1 -0
- package/dist/14869ac5d1830304.woff2 +0 -0
- package/dist/14aaceff85fc8b28.woff2 +0 -0
- package/dist/14c3abea79fc1389.js +1 -0
- package/dist/155a4ac079785bfd.js +1 -0
- package/dist/155a4ac079785bfd.js.map +1 -0
- package/dist/16f443eed01776ca.woff2 +0 -0
- package/dist/183bae0e53a22182.woff2 +0 -0
- package/dist/19c8f94ccd6289f5.woff2 +0 -0
- package/dist/1ae86565eab7451c.woff2 +0 -0
- package/dist/1c7bf8797e0a9be6.woff2 +0 -0
- package/dist/1f266d3619b30f16.woff2 +0 -0
- package/dist/1f8c5a4087a524fd.woff2 +0 -0
- package/dist/20ba2b23c5c0cd0b.woff2 +0 -0
- package/dist/22a32bd51591301b.js +1 -0
- package/dist/273c72d90e432a3d.js +1 -0
- package/dist/295dd01a1fbfee6d.woff2 +0 -0
- package/dist/29cbe6827c3f03ef.js +1 -0
- package/dist/2f686985e26e7107.woff2 +0 -0
- package/dist/315eff729e4ccbd9.woff2 +0 -0
- package/dist/368d16e3259bf207.woff2 +0 -0
- package/dist/36c49aa341a7079a.woff2 +0 -0
- package/dist/36e1e0430475edee.woff2 +0 -0
- package/dist/374c3ee36d9e040a.js +1 -0
- package/dist/377971e519bf3f4a.js +2 -0
- package/dist/377971e519bf3f4a.js.LICENSE.txt +39 -0
- package/dist/377971e519bf3f4a.js.map +1 -0
- package/dist/3b0ea8395009dcf3.js +2 -0
- package/dist/3b0ea8395009dcf3.js.LICENSE.txt +9 -0
- package/dist/3b0ea8395009dcf3.js.map +1 -0
- package/dist/3bc19662b8630ee9.woff2 +0 -0
- package/dist/3f645f473b3f8fba.woff2 +0 -0
- package/dist/41320d8930d23b36.js +1 -0
- package/dist/4218ac9901b9d36d.woff2 +0 -0
- package/dist/4659f3ca46d928b5.js +1 -0
- package/dist/4659f3ca46d928b5.js.map +1 -0
- package/dist/4680ba68412e4da9.woff2 +0 -0
- package/dist/48e37bd7ebf85a1f.woff2 +0 -0
- package/dist/4aabceefe5a2494a.js +1 -0
- package/dist/4c188cbaefba58cd.js +1 -0
- package/dist/4e11b8a7c445255f.woff2 +0 -0
- package/dist/537ddd61c5c1fce2.woff2 +0 -0
- package/dist/54f5eee3a7989556.js +1 -0
- package/dist/55c9107b50dd747c.js +1 -0
- package/dist/56c4118c0907f151.woff2 +0 -0
- package/dist/5938bc2ae7ec60c0.woff2 +0 -0
- package/dist/5c6586155f0d278a.woff2 +0 -0
- package/dist/5e50c92017029ca3.js +1 -0
- package/dist/5e50c92017029ca3.js.map +1 -0
- package/dist/600aca7295d8bcb7.js +2 -0
- package/dist/600aca7295d8bcb7.js.LICENSE.txt +9 -0
- package/dist/600aca7295d8bcb7.js.map +1 -0
- package/dist/60ec587649ba812a.woff2 +0 -0
- package/dist/64cf08a5ac3266d8.js +1 -0
- package/dist/652f476a8a1603d3.js +2 -0
- package/dist/652f476a8a1603d3.js.LICENSE.txt +9 -0
- package/dist/652f476a8a1603d3.js.map +1 -0
- package/dist/65e6511e035870e1.woff2 +0 -0
- package/dist/661425f6798cd16a.woff2 +0 -0
- package/dist/66b864fe213caf46.woff2 +0 -0
- package/dist/680eb791e6266590.js +2 -0
- package/dist/680eb791e6266590.js.LICENSE.txt +19 -0
- package/dist/680eb791e6266590.js.map +1 -0
- package/dist/69d087d970ee9455.woff2 +0 -0
- package/dist/69e3aa4276b4cb4b.js +1 -0
- package/dist/6a88f03fc4e7c3da.js +1 -0
- package/dist/6c6c45e66ff54281.woff2 +0 -0
- package/dist/6d9009857c6df878.js +1 -0
- package/dist/6ebe7cea59ed2853.js +1 -0
- package/dist/6f3181849e740935.js +1 -0
- package/dist/6f3181849e740935.js.map +1 -0
- package/dist/7073a7323e92bd11.woff2 +0 -0
- package/dist/70ac433ae2a89a89.js +1 -0
- package/dist/70ee4ee625ac0ec1.js +1 -0
- package/dist/718c6cc31274ab1a.woff2 +0 -0
- package/dist/727696c3934d0966.js +1 -0
- package/dist/727763c0f0df59dc.js +1 -0
- package/dist/727763c0f0df59dc.js.map +1 -0
- package/dist/72cdbedfe04be9f9.woff2 +0 -0
- package/dist/7509c9f56fe9e532.woff2 +0 -0
- package/dist/75dc5c5b04adc8bf.woff2 +0 -0
- package/dist/77b48bc05299ecca.woff2 +0 -0
- package/dist/7a0a0215c248c73d.woff2 +0 -0
- package/dist/7c0d0c5180de8729.js +1 -0
- package/dist/7f00bebb24e40167.woff2 +0 -0
- package/dist/802c6176541eeed7.woff2 +0 -0
- package/dist/8080081b3379c637.woff2 +0 -0
- package/dist/81cfdaeaa0bbca1f.js +1 -0
- package/dist/8605507b7a8487c4.woff2 +0 -0
- package/dist/893a160d06428365.js +1 -0
- package/dist/893a160d06428365.js.map +1 -0
- package/dist/8a83d654702f6534.woff2 +0 -0
- package/dist/8fe71173a13fe571.woff2 +0 -0
- package/dist/94aa912dcac90114.js +1 -0
- package/dist/9624cec0f9bdd81e.woff2 +0 -0
- package/dist/98a3af55a1698171.woff2 +0 -0
- package/dist/99823aaebba56f46.js +1 -0
- package/dist/9ba85996af74c5ce.woff2 +0 -0
- package/dist/9ddb22faa35006e7.woff2 +0 -0
- package/dist/a167fb2799dd741b.woff2 +0 -0
- package/dist/a2045a5cc4fdf94f.woff2 +0 -0
- package/dist/a246c73905a31c93.woff2 +0 -0
- package/dist/a325099b0a580ce2.js +2 -0
- package/dist/a325099b0a580ce2.js.LICENSE.txt +14 -0
- package/dist/a325099b0a580ce2.js.map +1 -0
- package/dist/a401aa7939cb6e6f.woff2 +0 -0
- package/dist/a40fef67997d3b2c.js +1 -0
- package/dist/a62897b000a24b86.js +1 -0
- package/dist/a6ed036f17a1ea29.woff2 +0 -0
- package/dist/a77bac4877483a0a.js +1 -0
- package/dist/a9f25ca430709a1a.woff2 +0 -0
- package/dist/aa0dfbdd569b1c24.js +2 -0
- package/dist/aa0dfbdd569b1c24.js.LICENSE.txt +5 -0
- package/dist/aa0dfbdd569b1c24.js.map +1 -0
- package/dist/ab0f637d6cff12e4.js +1 -0
- package/dist/afa9121a49e95351.woff2 +0 -0
- package/dist/afcda12d9f805543.woff2 +0 -0
- package/dist/b09ded85a7da77f1.woff2 +0 -0
- package/dist/b10dbe5318a91a12.js +1 -0
- package/dist/b2f4e9d1e821b71c.woff2 +0 -0
- package/dist/b4a074bf828bb757.woff2 +0 -0
- package/dist/b7f447da43f6e596.woff2 +0 -0
- package/dist/bcca84a524572d10.woff2 +0 -0
- package/dist/be093e052a6d50eb.js +1 -0
- package/dist/be4d1f97b11d087c.woff2 +0 -0
- package/dist/bec14780d81164de.woff2 +0 -0
- package/dist/c31657fe213c1b5e.js +1 -0
- package/dist/c49ef726d3f0420b.js +1 -0
- package/dist/c553f7e0199c5084.woff2 +0 -0
- package/dist/c94ac2fdc1ff1418.js +1 -0
- package/dist/c9d9ce9f465df4fe.woff2 +0 -0
- package/dist/cbbb57b397433964.js +2 -0
- package/dist/cbbb57b397433964.js.LICENSE.txt +14 -0
- package/dist/cbbb57b397433964.js.map +1 -0
- package/dist/d188f7f036ac5779.woff2 +0 -0
- package/dist/d1aa59bd9c702dc4.js +2 -0
- package/dist/d1aa59bd9c702dc4.js.LICENSE.txt +32 -0
- package/dist/d1aa59bd9c702dc4.js.map +1 -0
- package/dist/d265d81c58525ae4.woff2 +0 -0
- package/dist/d5942cd81663e136.woff2 +0 -0
- package/dist/d66b8ff73d95cabb.woff2 +0 -0
- package/dist/d84bac6d07672dd2.js +1 -0
- package/dist/d84bac6d07672dd2.js.map +1 -0
- package/dist/d88899ef0fd16719.woff2 +0 -0
- package/dist/d92b5ecf31fc187b.js +1 -0
- package/dist/d9a5d958e69e058d.woff2 +0 -0
- package/dist/dac90d495be353a0.woff2 +0 -0
- package/dist/db0550511978dc47.js +1 -0
- package/dist/dd8ce598529c3fab.woff2 +0 -0
- package/dist/de013f1be25103fa.woff2 +0 -0
- package/dist/df222fceeffca849.woff2 +0 -0
- package/dist/df22bda08ec7964c.js +1 -0
- package/dist/e05b7f902b02a251.js +1 -0
- package/dist/e05b7f902b02a251.js.map +1 -0
- package/dist/e465f1481f0d2e1c.js +1 -0
- package/dist/e62b00b9199c1ac9.woff2 +0 -0
- package/dist/e696cef1407b2610.woff2 +0 -0
- package/dist/eb42de5422d9af00.js +1 -0
- package/dist/eed48feba743e21c.woff2 +0 -0
- package/dist/f135ef54213f8975.js +1 -0
- package/dist/f260e50923d4283b.js +1 -0
- package/dist/f543c88feb236d11.woff2 +0 -0
- package/dist/f591b0079faa93fe.woff2 +0 -0
- package/dist/f6ed27923769ad1d.woff2 +0 -0
- package/dist/f8d066e92ea157c6.js +1 -0
- package/dist/fae042506530c1e6.js +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/fbebeb4336e67012.woff2 +0 -0
- package/dist/fd574df77d31a5eb.js +1 -0
- package/dist/icon_128x128.3dde25c6e69b1c010a6a5d6b27b3f436.png +0 -0
- package/dist/icon_144x144.e263e02b838d229b02ff9133e6e0f2ba.png +0 -0
- package/dist/icon_192x192.d3d318638bbe8a10a3c687d3d302d01a.png +0 -0
- package/dist/icon_256x256.c729f6e7e914b58fcea5ce91d7aa9bad.png +0 -0
- package/dist/icon_384x384.c8923df6b6bd08eba5c79b78d7fcecc0.png +0 -0
- package/dist/icon_512x512.7163efb26df832de513bc58d925ea22e.png +0 -0
- package/dist/icon_96x96.682ee334ae19d49894217370b8596f61.png +0 -0
- package/dist/index.html +9 -0
- package/dist/logo-512.png +0 -0
- package/dist/logo.svg +30 -0
- package/dist/manifest.266df36f2271d27ae9bcaa196a2976ae.json +47 -0
- package/dist/openmrs.39723c21cec4b1fc.css +1 -0
- package/dist/openmrs.39723c21cec4b1fc.css.map +1 -0
- package/dist/openmrs.44bac4c8520ee42f.css +2 -0
- package/dist/openmrs.44bac4c8520ee42f.css.map +1 -0
- package/dist/openmrs.936e8cf6a4b1599d.css +2 -0
- package/dist/openmrs.936e8cf6a4b1599d.css.map +1 -0
- package/dist/openmrs.c3adea28ef850516.js +1 -0
- package/dist/openmrs.c3adea28ef850516.js.map +1 -0
- package/dist/openmrs.e4daba1e3b840e70.css +25 -0
- package/dist/openmrs.e4daba1e3b840e70.css.map +1 -0
- package/dist/service-worker.js +1 -0
- package/dist/service-worker.js.map +1 -0
- package/dist-build-23687264126/0081d5d3d536cb23.js +1 -0
- package/dist-build-23687264126/02acc4469a2fe2e4.woff2 +0 -0
- package/dist-build-23687264126/081587ca0db8e63f.woff2 +0 -0
- package/dist-build-23687264126/08cf53c4e5e71cf1.woff2 +0 -0
- package/dist-build-23687264126/090b2bc014d24ea4.woff2 +0 -0
- package/dist-build-23687264126/09de5db63ef7b579.js +1 -0
- package/dist-build-23687264126/0ae92bcea615e948.woff2 +0 -0
- package/dist-build-23687264126/0be8520d8945b3b7.woff2 +0 -0
- package/dist-build-23687264126/0e7dd073cd8bb0ad.woff2 +0 -0
- package/dist-build-23687264126/0edb77cd19e43550.js +1 -0
- package/dist-build-23687264126/14869ac5d1830304.woff2 +0 -0
- package/dist-build-23687264126/14aaceff85fc8b28.woff2 +0 -0
- package/dist-build-23687264126/14c3abea79fc1389.js +1 -0
- package/dist-build-23687264126/155a4ac079785bfd.js +1 -0
- package/dist-build-23687264126/155a4ac079785bfd.js.map +1 -0
- package/dist-build-23687264126/16f443eed01776ca.woff2 +0 -0
- package/dist-build-23687264126/183bae0e53a22182.woff2 +0 -0
- package/dist-build-23687264126/19c8f94ccd6289f5.woff2 +0 -0
- package/dist-build-23687264126/1ae86565eab7451c.woff2 +0 -0
- package/dist-build-23687264126/1c7bf8797e0a9be6.woff2 +0 -0
- package/dist-build-23687264126/1f266d3619b30f16.woff2 +0 -0
- package/dist-build-23687264126/1f8c5a4087a524fd.woff2 +0 -0
- package/dist-build-23687264126/20ba2b23c5c0cd0b.woff2 +0 -0
- package/dist-build-23687264126/22a32bd51591301b.js +1 -0
- package/dist-build-23687264126/273c72d90e432a3d.js +1 -0
- package/dist-build-23687264126/295dd01a1fbfee6d.woff2 +0 -0
- package/dist-build-23687264126/29cbe6827c3f03ef.js +1 -0
- package/dist-build-23687264126/2f686985e26e7107.woff2 +0 -0
- package/dist-build-23687264126/315eff729e4ccbd9.woff2 +0 -0
- package/dist-build-23687264126/368d16e3259bf207.woff2 +0 -0
- package/dist-build-23687264126/36c49aa341a7079a.woff2 +0 -0
- package/dist-build-23687264126/36e1e0430475edee.woff2 +0 -0
- package/dist-build-23687264126/374c3ee36d9e040a.js +1 -0
- package/dist-build-23687264126/377971e519bf3f4a.js +2 -0
- package/dist-build-23687264126/377971e519bf3f4a.js.LICENSE.txt +39 -0
- package/dist-build-23687264126/377971e519bf3f4a.js.map +1 -0
- package/dist-build-23687264126/3b0ea8395009dcf3.js +2 -0
- package/dist-build-23687264126/3b0ea8395009dcf3.js.LICENSE.txt +9 -0
- package/dist-build-23687264126/3b0ea8395009dcf3.js.map +1 -0
- package/dist-build-23687264126/3bc19662b8630ee9.woff2 +0 -0
- package/dist-build-23687264126/3f645f473b3f8fba.woff2 +0 -0
- package/dist-build-23687264126/41320d8930d23b36.js +1 -0
- package/dist-build-23687264126/4218ac9901b9d36d.woff2 +0 -0
- package/dist-build-23687264126/4659f3ca46d928b5.js +1 -0
- package/dist-build-23687264126/4659f3ca46d928b5.js.map +1 -0
- package/dist-build-23687264126/4680ba68412e4da9.woff2 +0 -0
- package/dist-build-23687264126/48e37bd7ebf85a1f.woff2 +0 -0
- package/dist-build-23687264126/4aabceefe5a2494a.js +1 -0
- package/dist-build-23687264126/4c188cbaefba58cd.js +1 -0
- package/dist-build-23687264126/4e11b8a7c445255f.woff2 +0 -0
- package/dist-build-23687264126/537ddd61c5c1fce2.woff2 +0 -0
- package/dist-build-23687264126/54f5eee3a7989556.js +1 -0
- package/dist-build-23687264126/55c9107b50dd747c.js +1 -0
- package/dist-build-23687264126/56c4118c0907f151.woff2 +0 -0
- package/dist-build-23687264126/5938bc2ae7ec60c0.woff2 +0 -0
- package/dist-build-23687264126/5c6586155f0d278a.woff2 +0 -0
- package/dist-build-23687264126/5e50c92017029ca3.js +1 -0
- package/dist-build-23687264126/5e50c92017029ca3.js.map +1 -0
- package/dist-build-23687264126/600aca7295d8bcb7.js +2 -0
- package/dist-build-23687264126/600aca7295d8bcb7.js.LICENSE.txt +9 -0
- package/dist-build-23687264126/600aca7295d8bcb7.js.map +1 -0
- package/dist-build-23687264126/60ec587649ba812a.woff2 +0 -0
- package/dist-build-23687264126/64cf08a5ac3266d8.js +1 -0
- package/dist-build-23687264126/652f476a8a1603d3.js +2 -0
- package/dist-build-23687264126/652f476a8a1603d3.js.LICENSE.txt +9 -0
- package/dist-build-23687264126/652f476a8a1603d3.js.map +1 -0
- package/dist-build-23687264126/65e6511e035870e1.woff2 +0 -0
- package/dist-build-23687264126/661425f6798cd16a.woff2 +0 -0
- package/dist-build-23687264126/66b864fe213caf46.woff2 +0 -0
- package/dist-build-23687264126/680eb791e6266590.js +2 -0
- package/dist-build-23687264126/680eb791e6266590.js.LICENSE.txt +19 -0
- package/dist-build-23687264126/680eb791e6266590.js.map +1 -0
- package/dist-build-23687264126/69d087d970ee9455.woff2 +0 -0
- package/dist-build-23687264126/69e3aa4276b4cb4b.js +1 -0
- package/dist-build-23687264126/6a88f03fc4e7c3da.js +1 -0
- package/dist-build-23687264126/6c6c45e66ff54281.woff2 +0 -0
- package/dist-build-23687264126/6d9009857c6df878.js +1 -0
- package/dist-build-23687264126/6ebe7cea59ed2853.js +1 -0
- package/dist-build-23687264126/6f3181849e740935.js +1 -0
- package/dist-build-23687264126/6f3181849e740935.js.map +1 -0
- package/dist-build-23687264126/7073a7323e92bd11.woff2 +0 -0
- package/dist-build-23687264126/70ac433ae2a89a89.js +1 -0
- package/dist-build-23687264126/70ee4ee625ac0ec1.js +1 -0
- package/dist-build-23687264126/718c6cc31274ab1a.woff2 +0 -0
- package/dist-build-23687264126/727696c3934d0966.js +1 -0
- package/dist-build-23687264126/727763c0f0df59dc.js +1 -0
- package/dist-build-23687264126/727763c0f0df59dc.js.map +1 -0
- package/dist-build-23687264126/72cdbedfe04be9f9.woff2 +0 -0
- package/dist-build-23687264126/7509c9f56fe9e532.woff2 +0 -0
- package/dist-build-23687264126/75dc5c5b04adc8bf.woff2 +0 -0
- package/dist-build-23687264126/77b48bc05299ecca.woff2 +0 -0
- package/dist-build-23687264126/7a0a0215c248c73d.woff2 +0 -0
- package/dist-build-23687264126/7c0d0c5180de8729.js +1 -0
- package/dist-build-23687264126/7f00bebb24e40167.woff2 +0 -0
- package/dist-build-23687264126/802c6176541eeed7.woff2 +0 -0
- package/dist-build-23687264126/8080081b3379c637.woff2 +0 -0
- package/dist-build-23687264126/81cfdaeaa0bbca1f.js +1 -0
- package/dist-build-23687264126/8605507b7a8487c4.woff2 +0 -0
- package/dist-build-23687264126/893a160d06428365.js +1 -0
- package/dist-build-23687264126/893a160d06428365.js.map +1 -0
- package/dist-build-23687264126/8a83d654702f6534.woff2 +0 -0
- package/dist-build-23687264126/8fe71173a13fe571.woff2 +0 -0
- package/dist-build-23687264126/94aa912dcac90114.js +1 -0
- package/dist-build-23687264126/9624cec0f9bdd81e.woff2 +0 -0
- package/dist-build-23687264126/98a3af55a1698171.woff2 +0 -0
- package/dist-build-23687264126/99823aaebba56f46.js +1 -0
- package/dist-build-23687264126/9ba85996af74c5ce.woff2 +0 -0
- package/dist-build-23687264126/9ddb22faa35006e7.woff2 +0 -0
- package/dist-build-23687264126/a167fb2799dd741b.woff2 +0 -0
- package/dist-build-23687264126/a2045a5cc4fdf94f.woff2 +0 -0
- package/dist-build-23687264126/a246c73905a31c93.woff2 +0 -0
- package/dist-build-23687264126/a325099b0a580ce2.js +2 -0
- package/dist-build-23687264126/a325099b0a580ce2.js.LICENSE.txt +14 -0
- package/dist-build-23687264126/a325099b0a580ce2.js.map +1 -0
- package/dist-build-23687264126/a401aa7939cb6e6f.woff2 +0 -0
- package/dist-build-23687264126/a40fef67997d3b2c.js +1 -0
- package/dist-build-23687264126/a62897b000a24b86.js +1 -0
- package/dist-build-23687264126/a6ed036f17a1ea29.woff2 +0 -0
- package/dist-build-23687264126/a77bac4877483a0a.js +1 -0
- package/dist-build-23687264126/a9f25ca430709a1a.woff2 +0 -0
- package/dist-build-23687264126/aa0dfbdd569b1c24.js +2 -0
- package/dist-build-23687264126/aa0dfbdd569b1c24.js.LICENSE.txt +5 -0
- package/dist-build-23687264126/aa0dfbdd569b1c24.js.map +1 -0
- package/dist-build-23687264126/ab0f637d6cff12e4.js +1 -0
- package/dist-build-23687264126/afa9121a49e95351.woff2 +0 -0
- package/dist-build-23687264126/afcda12d9f805543.woff2 +0 -0
- package/dist-build-23687264126/b09ded85a7da77f1.woff2 +0 -0
- package/dist-build-23687264126/b10dbe5318a91a12.js +1 -0
- package/dist-build-23687264126/b2f4e9d1e821b71c.woff2 +0 -0
- package/dist-build-23687264126/b4a074bf828bb757.woff2 +0 -0
- package/dist-build-23687264126/b7f447da43f6e596.woff2 +0 -0
- package/dist-build-23687264126/bcca84a524572d10.woff2 +0 -0
- package/dist-build-23687264126/be093e052a6d50eb.js +1 -0
- package/dist-build-23687264126/be4d1f97b11d087c.woff2 +0 -0
- package/dist-build-23687264126/bec14780d81164de.woff2 +0 -0
- package/dist-build-23687264126/c31657fe213c1b5e.js +1 -0
- package/dist-build-23687264126/c49ef726d3f0420b.js +1 -0
- package/dist-build-23687264126/c553f7e0199c5084.woff2 +0 -0
- package/dist-build-23687264126/c94ac2fdc1ff1418.js +1 -0
- package/dist-build-23687264126/c9d9ce9f465df4fe.woff2 +0 -0
- package/dist-build-23687264126/cbbb57b397433964.js +2 -0
- package/dist-build-23687264126/cbbb57b397433964.js.LICENSE.txt +14 -0
- package/dist-build-23687264126/cbbb57b397433964.js.map +1 -0
- package/dist-build-23687264126/d188f7f036ac5779.woff2 +0 -0
- package/dist-build-23687264126/d1aa59bd9c702dc4.js +2 -0
- package/dist-build-23687264126/d1aa59bd9c702dc4.js.LICENSE.txt +32 -0
- package/dist-build-23687264126/d1aa59bd9c702dc4.js.map +1 -0
- package/dist-build-23687264126/d265d81c58525ae4.woff2 +0 -0
- package/dist-build-23687264126/d5942cd81663e136.woff2 +0 -0
- package/dist-build-23687264126/d66b8ff73d95cabb.woff2 +0 -0
- package/dist-build-23687264126/d84bac6d07672dd2.js +1 -0
- package/dist-build-23687264126/d84bac6d07672dd2.js.map +1 -0
- package/dist-build-23687264126/d88899ef0fd16719.woff2 +0 -0
- package/dist-build-23687264126/d92b5ecf31fc187b.js +1 -0
- package/dist-build-23687264126/d9a5d958e69e058d.woff2 +0 -0
- package/dist-build-23687264126/dac90d495be353a0.woff2 +0 -0
- package/dist-build-23687264126/db0550511978dc47.js +1 -0
- package/dist-build-23687264126/dd8ce598529c3fab.woff2 +0 -0
- package/dist-build-23687264126/de013f1be25103fa.woff2 +0 -0
- package/dist-build-23687264126/df222fceeffca849.woff2 +0 -0
- package/dist-build-23687264126/df22bda08ec7964c.js +1 -0
- package/dist-build-23687264126/e05b7f902b02a251.js +1 -0
- package/dist-build-23687264126/e05b7f902b02a251.js.map +1 -0
- package/dist-build-23687264126/e465f1481f0d2e1c.js +1 -0
- package/dist-build-23687264126/e62b00b9199c1ac9.woff2 +0 -0
- package/dist-build-23687264126/e696cef1407b2610.woff2 +0 -0
- package/dist-build-23687264126/eb42de5422d9af00.js +1 -0
- package/dist-build-23687264126/eed48feba743e21c.woff2 +0 -0
- package/dist-build-23687264126/f135ef54213f8975.js +1 -0
- package/dist-build-23687264126/f260e50923d4283b.js +1 -0
- package/dist-build-23687264126/f543c88feb236d11.woff2 +0 -0
- package/dist-build-23687264126/f591b0079faa93fe.woff2 +0 -0
- package/dist-build-23687264126/f6ed27923769ad1d.woff2 +0 -0
- package/dist-build-23687264126/f8d066e92ea157c6.js +1 -0
- package/dist-build-23687264126/fae042506530c1e6.js +1 -0
- package/dist-build-23687264126/favicon.ico +0 -0
- package/dist-build-23687264126/fbebeb4336e67012.woff2 +0 -0
- package/dist-build-23687264126/fd574df77d31a5eb.js +1 -0
- package/dist-build-23687264126/icon_128x128.3dde25c6e69b1c010a6a5d6b27b3f436.png +0 -0
- package/dist-build-23687264126/icon_144x144.e263e02b838d229b02ff9133e6e0f2ba.png +0 -0
- package/dist-build-23687264126/icon_192x192.d3d318638bbe8a10a3c687d3d302d01a.png +0 -0
- package/dist-build-23687264126/icon_256x256.c729f6e7e914b58fcea5ce91d7aa9bad.png +0 -0
- package/dist-build-23687264126/icon_384x384.c8923df6b6bd08eba5c79b78d7fcecc0.png +0 -0
- package/dist-build-23687264126/icon_512x512.7163efb26df832de513bc58d925ea22e.png +0 -0
- package/dist-build-23687264126/icon_96x96.682ee334ae19d49894217370b8596f61.png +0 -0
- package/dist-build-23687264126/index.html +9 -0
- package/dist-build-23687264126/logo-512.png +0 -0
- package/dist-build-23687264126/logo.svg +30 -0
- package/dist-build-23687264126/manifest.266df36f2271d27ae9bcaa196a2976ae.json +47 -0
- package/dist-build-23687264126/openmrs.39723c21cec4b1fc.css +1 -0
- package/dist-build-23687264126/openmrs.39723c21cec4b1fc.css.map +1 -0
- package/dist-build-23687264126/openmrs.44bac4c8520ee42f.css +2 -0
- package/dist-build-23687264126/openmrs.44bac4c8520ee42f.css.map +1 -0
- package/dist-build-23687264126/openmrs.936e8cf6a4b1599d.css +2 -0
- package/dist-build-23687264126/openmrs.936e8cf6a4b1599d.css.map +1 -0
- package/dist-build-23687264126/openmrs.c3adea28ef850516.js +1 -0
- package/dist-build-23687264126/openmrs.c3adea28ef850516.js.map +1 -0
- package/dist-build-23687264126/openmrs.e4daba1e3b840e70.css +25 -0
- package/dist-build-23687264126/openmrs.e4daba1e3b840e70.css.map +1 -0
- package/dist-build-23687264126/service-worker.js +1 -0
- package/dist-build-23687264126/service-worker.js.map +1 -0
- package/e2e/core/env.ts +5 -0
- package/e2e/core/global-setup.ts +34 -0
- package/e2e/core/test.ts +21 -0
- package/e2e/pages/app-shell.page.ts +34 -0
- package/e2e/pages/etl-sources.page.ts +35 -0
- package/e2e/pages/report-sections.page.ts +20 -0
- package/e2e/pages/section-preview.modal.ts +29 -0
- package/e2e/specs/etl-sources.spec.ts +51 -0
- package/e2e/specs/navigation.spec.ts +13 -0
- package/e2e/specs/section-preview-validation.spec.ts +38 -0
- package/e2e/specs/section-preview.spec.ts +94 -0
- package/e2e/tsconfig.json +11 -0
- package/example.env +5 -0
- package/jest.config.js +28 -0
- package/package.json +82 -0
- package/playwright.config.ts +28 -0
- package/src/admin-card-link.extension.module.scss +55 -0
- package/src/admin-card-link.extension.tsx +24 -0
- package/src/components/admin/admin-page.component.tsx +31 -0
- package/src/components/admin/age-categories-page.component.tsx +109 -0
- package/src/components/admin/age-groups-page.component.tsx +146 -0
- package/src/components/admin/etl-sources-page.component.tsx +344 -0
- package/src/components/admin/report-categories-page.component.tsx +256 -0
- package/src/components/admin/report-library-page.component.tsx +540 -0
- package/src/components/ai-support/ai-assist-button.component.tsx +30 -0
- package/src/components/ai-support/ai-assist-modal.component.tsx +81 -0
- package/src/components/ai-support/ai.service.ts +21 -0
- package/src/components/ai-support/ai.types.ts +12 -0
- package/src/components/app-shell/report-builder-shell.component.tsx +120 -0
- package/src/components/app-shell/report-builder-shell.scss +15 -0
- package/src/components/data-themes/data-theme-form.component.tsx +59 -0
- package/src/components/data-themes/data-theme-modal.component.tsx +349 -0
- package/src/components/data-themes/data-themes-page.component.tsx +132 -0
- package/src/components/data-themes/data-themes-table.component.tsx +91 -0
- package/src/components/data-themes/icon-registry.ts +35 -0
- package/src/components/data-themes/sections/data-theme-basics.section.tsx +63 -0
- package/src/components/data-themes/sections/data-theme-condition-columns.section.tsx +397 -0
- package/src/components/data-themes/sections/data-theme-fields-editor.section.tsx +125 -0
- package/src/components/data-themes/sections/data-theme-metadata.section.tsx +245 -0
- package/src/components/data-themes/sections/data-theme-preview.section.tsx +115 -0
- package/src/components/data-themes/sections/data-theme-source.section.tsx +184 -0
- package/src/components/indicators/README.md +24 -0
- package/src/components/indicators/base-indicator-basic-fields.component.tsx +18 -0
- package/src/components/indicators/base-indicator-basics.section.tsx +54 -0
- package/src/components/indicators/base-indicator-countby.section.tsx +25 -0
- package/src/components/indicators/base-indicator-criteria.section.tsx +83 -0
- package/src/components/indicators/base-indicator-details-form.component.tsx +80 -0
- package/src/components/indicators/base-indicator-theme-unit-fields.component.tsx +39 -0
- package/src/components/indicators/create-base-indicator-modal.component.tsx +501 -0
- package/src/components/indicators/create-composite-base-indicator-modal.component.tsx +297 -0
- package/src/components/indicators/create-final-indicator-modal.component.tsx +260 -0
- package/src/components/indicators/diagnosis-filters-form.component.tsx +101 -0
- package/src/components/indicators/disaggregation-panel.component.tsx +93 -0
- package/src/components/indicators/handler/concept-search-multiselect.component.tsx +153 -0
- package/src/components/indicators/handler/question-answer-concept-search.component.tsx +336 -0
- package/src/components/indicators/indicator-status-tag.component.tsx +9 -0
- package/src/components/indicators/indicators-page.component.tsx +481 -0
- package/src/components/indicators/indicators-page.scss +121 -0
- package/src/components/indicators/indicators-table.component.tsx +166 -0
- package/src/components/indicators/preview-table.component.tsx +31 -0
- package/src/components/indicators/sections/composite-indicator-basics.section.tsx +36 -0
- package/src/components/indicators/sections/composite-indicator-picker.section.tsx +161 -0
- package/src/components/indicators/sections/composite-indicator-sql-preview.section.tsx +31 -0
- package/src/components/indicators/sections/final-indicator-basics.section.tsx +46 -0
- package/src/components/indicators/sections/final-indicator-disaggregation.section.tsx +47 -0
- package/src/components/indicators/sections/final-indicator-picker.section.tsx +92 -0
- package/src/components/indicators/sections/final-indicator-preview.section.tsx +20 -0
- package/src/components/indicators/sections/final-indicator-results-preview.section.tsx +65 -0
- package/src/components/indicators/sections/indicator-basics.section.tsx +40 -0
- package/src/components/indicators/sections/indicator-conditions.section.tsx +194 -0
- package/src/components/indicators/sections/indicator-sql-preview.section.tsx +26 -0
- package/src/components/indicators/sections/indicator-theme.section.tsx +48 -0
- package/src/components/indicators/sql-preview.component.tsx +19 -0
- package/src/components/indicators/types/base-indicator-form.types.ts +17 -0
- package/src/components/indicators/types/base-indicator-theme.constants.ts +8 -0
- package/src/components/indicators/types/composite-indicator.types.ts +21 -0
- package/src/components/indicators/types/condition-ui.types.ts +11 -0
- package/src/components/indicators/types/data-theme-config.types.ts +88 -0
- package/src/components/indicators/types/indicator-types.ts +56 -0
- package/src/components/indicators/types/sql-builders.ts +43 -0
- package/src/components/indicators/utils/composite-indicator-sql.utils.ts +206 -0
- package/src/components/indicators/utils/concept-preload.utils.ts +21 -0
- package/src/components/indicators/utils/final-indicator-sql.utils.ts +124 -0
- package/src/components/indicators/utils/indicator-conditions-hydration.utils.ts +254 -0
- package/src/components/indicators/utils/indicator-sql.utils.ts +185 -0
- package/src/components/landing/landing-action-item.component.tsx +50 -0
- package/src/components/landing/landing-action-list.component.tsx +12 -0
- package/src/components/landing/landing-activity-list.component.tsx +47 -0
- package/src/components/landing/landing-footer-grid.component.tsx +45 -0
- package/src/components/landing/landing-hero.component.tsx +18 -0
- package/src/components/landing/landing-section-card.component.tsx +33 -0
- package/src/components/landing/report-builder-landing-page.component.tsx +103 -0
- package/src/components/landing/report-builder-landing-page.scss +131 -0
- package/src/components/report/dashboard/reports-table.component.tsx +145 -0
- package/src/components/report/definition/panels/properties-panel.component.tsx +38 -0
- package/src/components/report/definition/panels/report-structure-panel.component.tsx +61 -0
- package/src/components/report/definition/panels/selection-panel.component.tsx +58 -0
- package/src/components/report/definition/report-definition-editor.component.tsx +99 -0
- package/src/components/report/definition/report-definition.types.ts +66 -0
- package/src/components/report/design/panels/IndicatorPropertiesPanel.scss +33 -0
- package/src/components/report/design/panels/IndicatorPropertiesPanel.tsx +389 -0
- package/src/components/report/design/panels/JsonPreviewPanel.scss +32 -0
- package/src/components/report/design/panels/JsonPreviewPanel.tsx +104 -0
- package/src/components/report/design/panels/mapping-preview-panel.component.tsx +82 -0
- package/src/components/report/design/panels/mapping-preview-panel.scss +55 -0
- package/src/components/report/design/panels/template-structure-panel.component.tsx +296 -0
- package/src/components/report/design/panels/template-structure-panel.scss +81 -0
- package/src/components/report/design/report-design-editor.component.tsx +894 -0
- package/src/components/report/design/report-design.types.ts +43 -0
- package/src/components/report/design/report-design.utils.ts +86 -0
- package/src/components/report/panels/report-detail.component.tsx +71 -0
- package/src/components/report/panels/report-panel-shell.component.tsx +60 -0
- package/src/components/report/report-dashboard.page.component.tsx +75 -0
- package/src/components/report/report-editor.page.component.tsx +466 -0
- package/src/components/report/report.routes.tsx +30 -0
- package/src/components/report-sections/create-report-section-modal.component.tsx +278 -0
- package/src/components/report-sections/hooks/useAgeCategories.ts +25 -0
- package/src/components/report-sections/hooks/useSectionEditorState.ts +306 -0
- package/src/components/report-sections/panels/Dhis2MappingPanel.tsx +157 -0
- package/src/components/report-sections/panels/DisaggregationPanel.tsx +97 -0
- package/src/components/report-sections/panels/IndicatorPickerPanel.tsx +143 -0
- package/src/components/report-sections/panels/SectionBasicsPanel.tsx +27 -0
- package/src/components/report-sections/report-section-preview-modal.component.tsx +418 -0
- package/src/components/report-sections/report-sections-page.component.tsx +313 -0
- package/src/components/report-sections/section-types.ts +55 -0
- package/src/components/report-sections/section-utils.ts +46 -0
- package/src/components/report-sections/sections-page.scss +79 -0
- package/src/components/run-reports/run-reports-page.component.tsx +23 -0
- package/src/components/shared/header/builder-header-actions.component.tsx +38 -0
- package/src/components/shared/header/header.component.tsx +85 -0
- package/src/components/shared/header/header.scss +150 -0
- package/src/components/shared/header/illustration.component.tsx +34 -0
- package/src/components/shared/indicator-properties-panel/IndicatorPropertiesPanel.scss +33 -0
- package/src/components/shared/indicator-properties-panel/IndicatorPropertiesPanel.tsx +389 -0
- package/src/components/shared/json-preview-panel/JsonPreviewPanel.scss +32 -0
- package/src/components/shared/json-preview-panel/JsonPreviewPanel.tsx +104 -0
- package/src/components/shared/mapping-preview-panel/mapping-preview-panel.component.tsx +82 -0
- package/src/components/shared/mapping-preview-panel/mapping-preview-panel.scss +55 -0
- package/src/components/shared/preview/query-results-preview.component.tsx +204 -0
- package/src/components/shared/template-structure-panel/template-structure-panel.component.tsx +296 -0
- package/src/components/shared/template-structure-panel/template-structure-panel.scss +81 -0
- package/src/config-schema.ts +23 -0
- package/src/globals.d.ts +14 -0
- package/src/hooks/theme/useDataThemes.ts +28 -0
- package/src/hooks/theme/useMambaTableMeta.ts +34 -0
- package/src/hooks/theme/useMambaTables.ts +63 -0
- package/src/index.ts +23 -0
- package/src/resources/agegroup/agegroups.api.ts +58 -0
- package/src/resources/concepts/concept-mapper.ts +21 -0
- package/src/resources/concepts/concept-types.ts +31 -0
- package/src/resources/concepts/concepts.resource.ts +44 -0
- package/src/resources/concepts/useConceptSearch.ts +41 -0
- package/src/resources/etl-source/etl-source.api.ts +65 -0
- package/src/resources/indicator/indicators.api.ts +125 -0
- package/src/resources/openmrs-api.ts +24 -0
- package/src/resources/preview/sql-preview.api.ts +54 -0
- package/src/resources/report/reports.api.ts +117 -0
- package/src/resources/report-category/report-category.api.ts +41 -0
- package/src/resources/report-library/report-library.api.ts +63 -0
- package/src/resources/report-section/report-sections.api.ts +73 -0
- package/src/resources/report-section/section-preview.api.ts +21 -0
- package/src/resources/theme/data-theme.api.ts +88 -0
- package/src/resources/theme/mamba-schema.api.ts +31 -0
- package/src/resources/theme/mamba-table-meta.api.ts +45 -0
- package/src/root.component.tsx +20 -0
- package/src/routes/report-builder.routes.tsx +66 -0
- package/src/routes/report-builder.scss +56 -0
- package/src/routes.json +21 -0
- package/src/sample-template.ts +121 -0
- package/src/template-utils.ts +110 -0
- package/src/types/carbon-react-inert.d.ts +13 -0
- package/src/types/condition-operators.ts +49 -0
- package/src/types/theme/data-theme.types.ts +88 -0
- package/src/utils/html-entities.utils.ts +23 -0
- package/tools/setup-tests.ts +1 -0
- package/translations/en.json +4 -0
- package/tsconfig.json +43 -0
- package/webpack.config.js +14 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
DataTable,
|
|
5
|
+
Table,
|
|
6
|
+
TableBody,
|
|
7
|
+
TableCell,
|
|
8
|
+
TableContainer,
|
|
9
|
+
TableHead,
|
|
10
|
+
TableHeader,
|
|
11
|
+
TableRow,
|
|
12
|
+
TableToolbar,
|
|
13
|
+
TableToolbarContent,
|
|
14
|
+
TableToolbarSearch,
|
|
15
|
+
} from '@carbon/react';
|
|
16
|
+
import { Add } from '@carbon/icons-react';
|
|
17
|
+
import { useTranslation } from 'react-i18next';
|
|
18
|
+
|
|
19
|
+
export type ReportSummary = {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
status: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
type HeaderDef = {
|
|
27
|
+
key: string;
|
|
28
|
+
header: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
type Props = {
|
|
32
|
+
reports: ReportSummary[];
|
|
33
|
+
headers: HeaderDef[];
|
|
34
|
+
onRowClick: (reportId: string) => void;
|
|
35
|
+
searchValue: string;
|
|
36
|
+
onSearchChange: (value: string) => void;
|
|
37
|
+
onCreateReport: () => void;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const ReportsTable: React.FC<Props> = ({
|
|
41
|
+
reports,
|
|
42
|
+
headers,
|
|
43
|
+
onRowClick,
|
|
44
|
+
searchValue,
|
|
45
|
+
onSearchChange,
|
|
46
|
+
onCreateReport,
|
|
47
|
+
}) => {
|
|
48
|
+
const { t } = useTranslation();
|
|
49
|
+
|
|
50
|
+
const rows = React.useMemo(
|
|
51
|
+
() =>
|
|
52
|
+
reports.map((r) => ({
|
|
53
|
+
id: r.id,
|
|
54
|
+
name: r.name,
|
|
55
|
+
status: r.status,
|
|
56
|
+
updatedAt: r.updatedAt,
|
|
57
|
+
})),
|
|
58
|
+
[reports],
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<DataTable rows={rows} headers={headers} useZebraStyles>
|
|
63
|
+
{({ rows, headers, getHeaderProps, getRowProps, getTableProps }) => (
|
|
64
|
+
<TableContainer
|
|
65
|
+
data-testid="reports-table"
|
|
66
|
+
style={{
|
|
67
|
+
background: 'var(--cds-layer, #ffffff)',
|
|
68
|
+
borderTop: '1px solid var(--cds-border-subtle, #e0e0e0)',
|
|
69
|
+
}}
|
|
70
|
+
>
|
|
71
|
+
<TableToolbar>
|
|
72
|
+
<TableToolbarContent
|
|
73
|
+
style={{
|
|
74
|
+
display: 'flex',
|
|
75
|
+
justifyContent: 'space-between',
|
|
76
|
+
gap: '0.75rem',
|
|
77
|
+
}}
|
|
78
|
+
>
|
|
79
|
+
<TableToolbarSearch
|
|
80
|
+
expanded
|
|
81
|
+
value={searchValue}
|
|
82
|
+
onChange={(e: React.ChangeEvent<HTMLInputElement>) => onSearchChange(e.target.value)}
|
|
83
|
+
placeholder={t('searchThisList', 'Search this list')}
|
|
84
|
+
/>
|
|
85
|
+
|
|
86
|
+
<Button
|
|
87
|
+
kind="primary"
|
|
88
|
+
renderIcon={() => <Add size={16} />}
|
|
89
|
+
size="sm"
|
|
90
|
+
onClick={onCreateReport}
|
|
91
|
+
>
|
|
92
|
+
{t('createReport', 'Create report')}
|
|
93
|
+
</Button>
|
|
94
|
+
</TableToolbarContent>
|
|
95
|
+
</TableToolbar>
|
|
96
|
+
|
|
97
|
+
<Table {...getTableProps()}>
|
|
98
|
+
<TableHead
|
|
99
|
+
style={{
|
|
100
|
+
display: 'table-header-group',
|
|
101
|
+
visibility: 'visible',
|
|
102
|
+
}}
|
|
103
|
+
>
|
|
104
|
+
<TableRow>
|
|
105
|
+
{headers.map((header) => (
|
|
106
|
+
<TableHeader
|
|
107
|
+
{...getHeaderProps({ header })}
|
|
108
|
+
key={header.key}
|
|
109
|
+
style={{
|
|
110
|
+
fontWeight: 600,
|
|
111
|
+
backgroundColor: 'var(--cds-layer-accent, #f4f4f4)',
|
|
112
|
+
color: 'var(--cds-text-primary, #161616)',
|
|
113
|
+
borderBottom: '1px solid var(--cds-border-subtle, #e0e0e0)',
|
|
114
|
+
display: 'table-cell',
|
|
115
|
+
visibility: 'visible',
|
|
116
|
+
}}
|
|
117
|
+
>
|
|
118
|
+
{header.header}
|
|
119
|
+
</TableHeader>
|
|
120
|
+
))}
|
|
121
|
+
</TableRow>
|
|
122
|
+
</TableHead>
|
|
123
|
+
|
|
124
|
+
<TableBody>
|
|
125
|
+
{rows.map((row) => (
|
|
126
|
+
<TableRow
|
|
127
|
+
{...getRowProps({ row })}
|
|
128
|
+
key={row.id}
|
|
129
|
+
onClick={() => onRowClick(row.id)}
|
|
130
|
+
style={{ cursor: 'pointer' }}
|
|
131
|
+
>
|
|
132
|
+
{row.cells.map((cell) => (
|
|
133
|
+
<TableCell key={cell.id}>{cell.value}</TableCell>
|
|
134
|
+
))}
|
|
135
|
+
</TableRow>
|
|
136
|
+
))}
|
|
137
|
+
</TableBody>
|
|
138
|
+
</Table>
|
|
139
|
+
</TableContainer>
|
|
140
|
+
)}
|
|
141
|
+
</DataTable>
|
|
142
|
+
);
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export default ReportsTable;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Button, TextArea, TextInput, Toggle, Tag } from '@carbon/react';
|
|
4
|
+
import { Close } from '@carbon/icons-react';
|
|
5
|
+
|
|
6
|
+
import ReportPanelShell from '../../panels/report-panel-shell.component';
|
|
7
|
+
import type { ReportDefinitionDraft, ReportSectionRef, SectionLibraryItem } from '../report-definition.types';
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
draft: ReportDefinitionDraft;
|
|
11
|
+
onDraftChange: (patch: Partial<ReportDefinitionDraft>) => void;
|
|
12
|
+
selectedSectionRef: ReportSectionRef | null;
|
|
13
|
+
selectedSection: SectionLibraryItem | null;
|
|
14
|
+
onUpdateSelectedSection: (patch: Partial<ReportSectionRef>) => void;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const PropertiesPanel: React.FC<Props> = ({ draft, onDraftChange, selectedSectionRef, selectedSection, onUpdateSelectedSection }) => {
|
|
18
|
+
return (
|
|
19
|
+
<ReportPanelShell title="Properties" right={<button type="button" aria-label="close properties" style={{ border: 0, background: 'transparent', cursor: 'pointer' }} onClick={() => undefined}><Close size={18} /></button>} bottom={<><Button size="sm" kind="secondary">Cancel</Button><Button size="sm" kind="primary">Save Draft</Button></>}>
|
|
20
|
+
<div style={{ fontSize: '1rem', fontWeight: 600 }}>Report Details</div>
|
|
21
|
+
<TextInput id="report-definition-name" labelText="Report Name" value={draft.name} onChange={(e) => onDraftChange({ name: (e.target as HTMLInputElement).value })} />
|
|
22
|
+
<TextInput id="report-definition-code" labelText="Report Code" value={draft.code} onChange={(e) => onDraftChange({ code: (e.target as HTMLInputElement).value })} />
|
|
23
|
+
<TextArea id="report-definition-description" labelText="Description" value={draft.description} onChange={(e) => onDraftChange({ description: (e.target as HTMLTextAreaElement).value })} />
|
|
24
|
+
<div style={{ borderTop: '1px solid var(--cds-border-subtle, #e0e0e0)', marginTop: '0.5rem', paddingTop: '1rem' }}>
|
|
25
|
+
<div style={{ fontSize: '1rem', fontWeight: 600, marginBottom: '0.75rem' }}>Selected Section</div>
|
|
26
|
+
{!selectedSectionRef || !selectedSection ? <div style={{ opacity: 0.75 }}>Select a section from the report structure to edit section-level properties.</div> : <>
|
|
27
|
+
<div style={{ fontWeight: 600 }}>{selectedSection.name}</div>
|
|
28
|
+
<div style={{ display: 'flex', gap: '0.4rem', flexWrap: 'wrap', marginTop: '0.5rem', marginBottom: '0.75rem' }}><Tag size="sm" type="gray">{selectedSection.indicatorCount} indicators</Tag>{selectedSection.disaggregationEnabled ? <Tag size="sm" type="blue">{selectedSection.ageCategoryCode ?? 'Disaggregated'}</Tag> : <Tag size="sm" type="warm-gray">No disaggregation</Tag>}</div>
|
|
29
|
+
<TextInput id="selected-section-title-override" labelText="Title Override (optional)" value={selectedSectionRef.titleOverride ?? ''} onChange={(e) => onUpdateSelectedSection({ titleOverride: (e.target as HTMLInputElement).value })} />
|
|
30
|
+
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '0.75rem', marginTop: '0.5rem' }}><div style={{ fontWeight: 600 }}>Enabled in this report</div><Toggle id="selected-section-enabled" labelText="" toggled={selectedSectionRef.enabled} onToggle={(enabled) => onUpdateSelectedSection({ enabled })} /></div>
|
|
31
|
+
{selectedSection.description ? <div style={{ marginTop: '0.75rem', opacity: 0.8 }}>{selectedSection.description}</div> : null}
|
|
32
|
+
</>}
|
|
33
|
+
</div>
|
|
34
|
+
</ReportPanelShell>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default PropertiesPanel;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Button, Search, Tag, OverflowMenu, OverflowMenuItem } from '@carbon/react';
|
|
4
|
+
import { Add, Folder, ArrowUp, ArrowDown, TrashCan } from '@carbon/icons-react';
|
|
5
|
+
|
|
6
|
+
import ReportPanelShell from '../../panels/report-panel-shell.component';
|
|
7
|
+
import type { ReportSectionRef, SectionLibraryItem } from '../report-definition.types';
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
reportSections: ReportSectionRef[];
|
|
11
|
+
sectionLibrary: SectionLibraryItem[];
|
|
12
|
+
selectedSectionUuid: string | null;
|
|
13
|
+
search: string;
|
|
14
|
+
onSearchChange: (v: string) => void;
|
|
15
|
+
onSelectSection: (sectionUuid: string) => void;
|
|
16
|
+
onMoveSection: (sectionUuid: string, dir: -1 | 1) => void;
|
|
17
|
+
onRemoveSection: (sectionUuid: string) => void;
|
|
18
|
+
onFocusAvailableSections: () => void;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const ReportStructurePanel: React.FC<Props> = ({ reportSections, sectionLibrary, selectedSectionUuid, search, onSearchChange, onSelectSection, onMoveSection, onRemoveSection, onFocusAvailableSections }) => {
|
|
22
|
+
const filtered = React.useMemo(() => {
|
|
23
|
+
const q = search.trim().toLowerCase();
|
|
24
|
+
const sorted = [...reportSections].sort((a, b) => a.sortOrder - b.sortOrder);
|
|
25
|
+
if (!q) return sorted;
|
|
26
|
+
return sorted.filter((ref) => {
|
|
27
|
+
const section = sectionLibrary.find((s) => s.uuid === ref.sectionUuid);
|
|
28
|
+
return section && (section.name.toLowerCase().includes(q) || (section.description ?? '').toLowerCase().includes(q) || (section.code ?? '').toLowerCase().includes(q));
|
|
29
|
+
});
|
|
30
|
+
}, [reportSections, sectionLibrary, search]);
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<ReportPanelShell title="Report Structure" right={<OverflowMenu size="sm" aria-label="report structure actions"><OverflowMenuItem itemText="Browse sections" onClick={onFocusAvailableSections} /></OverflowMenu>} bottom={<><span /><Button size="sm" kind="primary" renderIcon={Add} onClick={onFocusAvailableSections}>Add Section</Button></>}>
|
|
34
|
+
<Search size="lg" labelText="Search selected sections" placeholder="Search selected sections" value={search} onChange={(e) => onSearchChange((e.target as HTMLInputElement).value)} />
|
|
35
|
+
<div style={{ border: '1px solid var(--cds-border-subtle, #e0e0e0)', borderRadius: 10, overflow: 'hidden' }}>
|
|
36
|
+
{filtered.length === 0 ? <div style={{ padding: '0.9rem', opacity: 0.75 }}>No sections selected yet.</div> : filtered.map((ref, idx) => {
|
|
37
|
+
const section = sectionLibrary.find((s) => s.uuid === ref.sectionUuid);
|
|
38
|
+
if (!section) return null;
|
|
39
|
+
return (
|
|
40
|
+
<div key={ref.sectionUuid} role="button" tabIndex={0} onClick={() => onSelectSection(ref.sectionUuid)} onKeyDown={(e) => e.key === 'Enter' && onSelectSection(ref.sectionUuid)} style={{ padding: '0.85rem 0.9rem', borderBottom: '1px solid var(--cds-border-subtle, #e0e0e0)', background: selectedSectionUuid === ref.sectionUuid ? 'rgba(0,0,0,0.03)' : '#fff', cursor: 'pointer' }}>
|
|
41
|
+
<div style={{ display: 'flex', justifyContent: 'space-between', gap: '0.75rem', alignItems: 'flex-start' }}>
|
|
42
|
+
<div style={{ minWidth: 0 }}>
|
|
43
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '0.6rem', minWidth: 0 }}><Folder size={16} /><div style={{ fontWeight: 600, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{ref.titleOverride?.trim() ? ref.titleOverride : section.name}</div>{!ref.enabled ? <Tag size="sm" type="red">Disabled</Tag> : null}</div>
|
|
44
|
+
<div style={{ display: 'flex', gap: '0.4rem', marginTop: 6, flexWrap: 'wrap' }}><Tag size="sm" type="gray">{section.indicatorCount} indicators</Tag>{section.disaggregationEnabled ? <Tag size="sm" type="blue">{section.ageCategoryCode ?? 'Disaggregated'}</Tag> : <Tag size="sm" type="warm-gray">No disaggregation</Tag>}</div>
|
|
45
|
+
{section.description ? <div style={{ marginTop: 6, opacity: 0.8 }}>{section.description}</div> : null}
|
|
46
|
+
</div>
|
|
47
|
+
<div style={{ display: 'flex', gap: '0.25rem' }}>
|
|
48
|
+
<Button kind="ghost" size="sm" hasIconOnly iconDescription="Move up" renderIcon={ArrowUp} disabled={idx === 0} onClick={(e) => { e.stopPropagation(); onMoveSection(ref.sectionUuid, -1); }} />
|
|
49
|
+
<Button kind="ghost" size="sm" hasIconOnly iconDescription="Move down" renderIcon={ArrowDown} disabled={idx === filtered.length - 1} onClick={(e) => { e.stopPropagation(); onMoveSection(ref.sectionUuid, 1); }} />
|
|
50
|
+
<Button kind="ghost" size="sm" hasIconOnly iconDescription="Remove" renderIcon={TrashCan} onClick={(e) => { e.stopPropagation(); onRemoveSection(ref.sectionUuid); }} />
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
55
|
+
})}
|
|
56
|
+
</div>
|
|
57
|
+
</ReportPanelShell>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export default ReportStructurePanel;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Button, Search, Tag, Checkbox } from '@carbon/react';
|
|
4
|
+
import { Add, Folder } from '@carbon/icons-react';
|
|
5
|
+
|
|
6
|
+
import ReportPanelShell from '../../panels/report-panel-shell.component';
|
|
7
|
+
import type { ReportSectionRef, SectionLibraryItem } from '../report-definition.types';
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
availableSections: SectionLibraryItem[];
|
|
11
|
+
reportSections: ReportSectionRef[];
|
|
12
|
+
selectedAvailableSectionUuid: string | null;
|
|
13
|
+
search: string;
|
|
14
|
+
onSearchChange: (v: string) => void;
|
|
15
|
+
onSelectAvailableSection: (sectionUuid: string) => void;
|
|
16
|
+
onToggleSection: (sectionUuid: string, checked: boolean) => void;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const SelectionPanel: React.FC<Props> = ({ availableSections, reportSections, selectedAvailableSectionUuid, search, onSearchChange, onSelectAvailableSection, onToggleSection }) => {
|
|
20
|
+
const filtered = React.useMemo(() => {
|
|
21
|
+
const q = search.trim().toLowerCase();
|
|
22
|
+
if (!q) return availableSections;
|
|
23
|
+
return availableSections.filter((s) => s.name.toLowerCase().includes(q) || (s.description ?? '').toLowerCase().includes(q) || (s.code ?? '').toLowerCase().includes(q));
|
|
24
|
+
}, [availableSections, search]);
|
|
25
|
+
|
|
26
|
+
const isIncluded = (sectionUuid: string) => reportSections.some((x) => x.sectionUuid === sectionUuid);
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<ReportPanelShell title="Available Sections" bottom={<><span style={{ opacity: 0.75 }}>Select sections to include in this report.</span><Button size="sm" kind="secondary" renderIcon={Add} disabled>Sections are added directly</Button></>}>
|
|
30
|
+
<Search size="lg" labelText="Search sections" placeholder="Search sections" value={search} onChange={(e) => onSearchChange((e.target as HTMLInputElement).value)} />
|
|
31
|
+
<div style={{ border: '1px solid var(--cds-border-subtle, #e0e0e0)', borderRadius: 10, overflow: 'hidden' }}>
|
|
32
|
+
{filtered.length === 0 ? <div style={{ padding: '0.9rem', opacity: 0.75 }}>No sections found.</div> : filtered.map((section) => {
|
|
33
|
+
const checked = isIncluded(section.uuid);
|
|
34
|
+
return (
|
|
35
|
+
<div key={section.uuid} role="button" tabIndex={0} onClick={() => onSelectAvailableSection(section.uuid)} onKeyDown={(e) => e.key === 'Enter' && onSelectAvailableSection(section.uuid)} style={{ padding: '0.85rem 0.9rem', borderBottom: '1px solid var(--cds-border-subtle, #e0e0e0)', background: selectedAvailableSectionUuid === section.uuid ? 'rgba(0,0,0,0.03)' : '#fff', cursor: 'pointer' }}>
|
|
36
|
+
<div style={{ display: 'flex', justifyContent: 'space-between', gap: '0.75rem', alignItems: 'flex-start' }}>
|
|
37
|
+
<div style={{ display: 'flex', alignItems: 'flex-start', gap: '0.65rem', minWidth: 0 }}>
|
|
38
|
+
<Checkbox id={`available-section-${section.uuid}`} checked={checked} labelText="" onChange={(arg1: any, arg2: any) => {
|
|
39
|
+
const nextChecked = typeof arg1 === 'boolean' ? arg1 : typeof arg2?.checked === 'boolean' ? arg2.checked : Boolean(arg1?.target?.checked);
|
|
40
|
+
onToggleSection(section.uuid, nextChecked);
|
|
41
|
+
}} />
|
|
42
|
+
<div style={{ minWidth: 0 }}>
|
|
43
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem', minWidth: 0 }}><Folder size={16} /><div style={{ fontWeight: 600, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{section.name}</div></div>
|
|
44
|
+
{section.description ? <div style={{ marginTop: 6, opacity: 0.8 }}>{section.description}</div> : null}
|
|
45
|
+
<div style={{ display: 'flex', gap: '0.4rem', marginTop: 6, flexWrap: 'wrap' }}><Tag size="sm" type="gray">{section.indicatorCount} indicators</Tag>{section.disaggregationEnabled ? <Tag size="sm" type="blue">{section.ageCategoryCode ?? 'Disaggregated'}</Tag> : <Tag size="sm" type="warm-gray">No disaggregation</Tag>}</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
{section.code ? <Tag size="sm" type="cool-gray">{section.code}</Tag> : null}
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
})}
|
|
53
|
+
</div>
|
|
54
|
+
</ReportPanelShell>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export default SelectionPanel;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { InlineLoading, InlineNotification } from '@carbon/react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
|
|
6
|
+
import styles from '../../../routes/report-builder.scss';
|
|
7
|
+
|
|
8
|
+
import ReportStructurePanel from './panels/report-structure-panel.component';
|
|
9
|
+
import SelectionPanel from './panels/selection-panel.component';
|
|
10
|
+
import PropertiesPanel from './panels/properties-panel.component';
|
|
11
|
+
|
|
12
|
+
import { parseSectionLibraryItem, sortReportSections, type ReportDefinitionDraft, type ReportSectionRef, type SectionLibraryItem } from './report-definition.types';
|
|
13
|
+
import { listSections } from '../../../resources/report-section/report-sections.api';
|
|
14
|
+
|
|
15
|
+
type Props = {
|
|
16
|
+
value: ReportDefinitionDraft;
|
|
17
|
+
onChange: (next: ReportDefinitionDraft) => void;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const ReportDefinitionEditor: React.FC<Props> = ({ value, onChange }) => {
|
|
21
|
+
const { t } = useTranslation();
|
|
22
|
+
const [sectionLibrary, setSectionLibrary] = React.useState<SectionLibraryItem[]>([]);
|
|
23
|
+
const [sectionsLoading, setSectionsLoading] = React.useState(false);
|
|
24
|
+
const [sectionsError, setSectionsError] = React.useState<string | null>(null);
|
|
25
|
+
const [structureSearch, setStructureSearch] = React.useState('');
|
|
26
|
+
const [selectionSearch, setSelectionSearch] = React.useState('');
|
|
27
|
+
const [selectedReportSectionUuid, setSelectedReportSectionUuid] = React.useState<string | null>(null);
|
|
28
|
+
const [selectedAvailableSectionUuid, setSelectedAvailableSectionUuid] = React.useState<string | null>(null);
|
|
29
|
+
|
|
30
|
+
React.useEffect(() => {
|
|
31
|
+
const ac = new AbortController();
|
|
32
|
+
setSectionsLoading(true);
|
|
33
|
+
setSectionsError(null);
|
|
34
|
+
listSections({ v: 'full', includeRetired: false }, ac.signal)
|
|
35
|
+
.then((rows) => setSectionLibrary(rows.filter((x) => !x.retired).map(parseSectionLibraryItem)))
|
|
36
|
+
.catch((e: any) => setSectionsError(e?.message ?? 'Failed to load sections'))
|
|
37
|
+
.finally(() => setSectionsLoading(false));
|
|
38
|
+
return () => ac.abort();
|
|
39
|
+
}, []);
|
|
40
|
+
|
|
41
|
+
const draft = value;
|
|
42
|
+
const updateDraft = React.useCallback((patch: Partial<ReportDefinitionDraft>) => onChange({ ...draft, ...patch }), [draft, onChange]);
|
|
43
|
+
const selectedSectionRef = React.useMemo(() => draft.sections.find((s) => s.sectionUuid === selectedReportSectionUuid) ?? null, [draft.sections, selectedReportSectionUuid]);
|
|
44
|
+
const selectedSection = React.useMemo(() => sectionLibrary.find((s) => s.uuid === selectedReportSectionUuid) ?? null, [sectionLibrary, selectedReportSectionUuid]);
|
|
45
|
+
|
|
46
|
+
const addSectionToDraft = React.useCallback((sectionUuid: string) => {
|
|
47
|
+
if (draft.sections.some((s) => s.sectionUuid === sectionUuid)) { setSelectedReportSectionUuid(sectionUuid); return; }
|
|
48
|
+
const nextRef: ReportSectionRef = { sectionUuid, sortOrder: draft.sections.length + 1, enabled: true, titleOverride: '' };
|
|
49
|
+
onChange({ ...draft, sections: [...draft.sections, nextRef] });
|
|
50
|
+
setSelectedReportSectionUuid(sectionUuid);
|
|
51
|
+
}, [draft, onChange]);
|
|
52
|
+
|
|
53
|
+
const removeSectionFromDraft = React.useCallback((sectionUuid: string) => {
|
|
54
|
+
const kept = draft.sections.filter((s) => s.sectionUuid !== sectionUuid);
|
|
55
|
+
onChange({ ...draft, sections: kept.map((s, idx) => ({ ...s, sortOrder: idx + 1 })) });
|
|
56
|
+
if (selectedReportSectionUuid === sectionUuid) setSelectedReportSectionUuid(null);
|
|
57
|
+
if (selectedAvailableSectionUuid === sectionUuid) setSelectedAvailableSectionUuid(null);
|
|
58
|
+
}, [draft, onChange, selectedReportSectionUuid, selectedAvailableSectionUuid]);
|
|
59
|
+
|
|
60
|
+
const toggleSectionInDraft = React.useCallback((sectionUuid: string, checked: boolean) => checked ? addSectionToDraft(sectionUuid) : removeSectionFromDraft(sectionUuid), [addSectionToDraft, removeSectionFromDraft]);
|
|
61
|
+
const moveSection = React.useCallback((sectionUuid: string, dir: -1 | 1) => {
|
|
62
|
+
const list = sortReportSections(draft.sections);
|
|
63
|
+
const idx = list.findIndex((x) => x.sectionUuid === sectionUuid);
|
|
64
|
+
if (idx < 0) return;
|
|
65
|
+
const j = idx + dir;
|
|
66
|
+
if (j < 0 || j >= list.length) return;
|
|
67
|
+
const tmp = list[idx]; list[idx] = list[j]; list[j] = tmp;
|
|
68
|
+
onChange({ ...draft, sections: list.map((x, k) => ({ ...x, sortOrder: k + 1 })) });
|
|
69
|
+
}, [draft, onChange]);
|
|
70
|
+
|
|
71
|
+
const updateSelectedSectionRef = React.useCallback((patch: Partial<ReportSectionRef>) => {
|
|
72
|
+
if (!selectedReportSectionUuid) return;
|
|
73
|
+
onChange({ ...draft, sections: draft.sections.map((s) => s.sectionUuid === selectedReportSectionUuid ? { ...s, ...patch } : s) });
|
|
74
|
+
}, [draft, onChange, selectedReportSectionUuid]);
|
|
75
|
+
|
|
76
|
+
const chosenSections = React.useMemo(() => sortReportSections(draft.sections), [draft.sections]);
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<div className={styles.designWorkspace}>
|
|
80
|
+
<div style={{ marginBottom: '1rem' }}>
|
|
81
|
+
<h3 className={styles.workspaceTitle}>{t('buildReport', 'Build Report')}: {draft.name || 'Untitled report'}</h3>
|
|
82
|
+
<p className={styles.workspaceHint}>{t('draftHint', 'Draft • Define reports as collections of reusable sections')}</p>
|
|
83
|
+
</div>
|
|
84
|
+
{sectionsLoading ? <InlineLoading description="Loading sections…" /> : null}
|
|
85
|
+
{sectionsError ? <div style={{ marginBottom: '1rem' }}><InlineNotification kind="error" lowContrast title="Sections" subtitle={sectionsError} /></div> : null}
|
|
86
|
+
<div style={{ display: 'grid', gridTemplateColumns: '1.1fr 1.1fr 0.9fr', gap: '1rem' }}>
|
|
87
|
+
<ReportStructurePanel reportSections={chosenSections} sectionLibrary={sectionLibrary} selectedSectionUuid={selectedReportSectionUuid} search={structureSearch} onSearchChange={setStructureSearch} onSelectSection={setSelectedReportSectionUuid} onMoveSection={moveSection} onRemoveSection={removeSectionFromDraft} onFocusAvailableSections={() => { if (sectionLibrary.length > 0) setSelectedAvailableSectionUuid((prev) => prev ?? sectionLibrary[0].uuid); }} />
|
|
88
|
+
<SelectionPanel availableSections={sectionLibrary} reportSections={chosenSections} selectedAvailableSectionUuid={selectedAvailableSectionUuid} search={selectionSearch} onSearchChange={setSelectionSearch} onSelectAvailableSection={setSelectedAvailableSectionUuid} onToggleSection={toggleSectionInDraft} />
|
|
89
|
+
<PropertiesPanel draft={draft} onDraftChange={updateDraft} selectedSectionRef={selectedSectionRef} selectedSection={selectedSection} onUpdateSelectedSection={updateSelectedSectionRef} />
|
|
90
|
+
</div>
|
|
91
|
+
<div style={{ marginTop: '1rem', padding: '0.9rem 1rem', background: '#fff', border: '1px solid var(--cds-border-subtle, #e0e0e0)', borderRadius: 12 }}>
|
|
92
|
+
<div style={{ fontWeight: 600, marginBottom: '0.5rem' }}>Current Authoring Draft</div>
|
|
93
|
+
<pre style={{ margin: 0, whiteSpace: 'pre-wrap', wordBreak: 'break-word', fontSize: '0.85rem' }}>{JSON.stringify(draft, null, 2)}</pre>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export default ReportDefinitionEditor;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
|
|
2
|
+
export type ReportSectionRef = {
|
|
3
|
+
sectionUuid: string;
|
|
4
|
+
sortOrder: number;
|
|
5
|
+
titleOverride?: string;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export type ReportDefinitionDraft = {
|
|
10
|
+
name: string;
|
|
11
|
+
code: string;
|
|
12
|
+
description: string;
|
|
13
|
+
sections: ReportSectionRef[];
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type SectionLibraryItem = {
|
|
17
|
+
uuid: string;
|
|
18
|
+
name: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
code?: string;
|
|
21
|
+
indicatorCount: number;
|
|
22
|
+
disaggregationEnabled: boolean;
|
|
23
|
+
ageCategoryCode?: string | null;
|
|
24
|
+
raw: any;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export function createEmptyReportDefinitionDraft(): ReportDefinitionDraft {
|
|
28
|
+
return {
|
|
29
|
+
name: '',
|
|
30
|
+
code: '',
|
|
31
|
+
description: '',
|
|
32
|
+
sections: [],
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function parseSectionLibraryItem(section: any): SectionLibraryItem {
|
|
37
|
+
let indicatorCount = 0;
|
|
38
|
+
let disaggregationEnabled = false;
|
|
39
|
+
let ageCategoryCode: string | null | undefined = null;
|
|
40
|
+
|
|
41
|
+
try {
|
|
42
|
+
const cfg = section.configJson ? JSON.parse(section.configJson) : null;
|
|
43
|
+
indicatorCount = Array.isArray(cfg?.indicators) ? cfg.indicators.length : 0;
|
|
44
|
+
disaggregationEnabled = Boolean(cfg?.disaggregation && cfg?.disaggregation?.none !== true);
|
|
45
|
+
ageCategoryCode = cfg?.disaggregation?.ageCategoryCode ?? null;
|
|
46
|
+
} catch {
|
|
47
|
+
indicatorCount = 0;
|
|
48
|
+
disaggregationEnabled = false;
|
|
49
|
+
ageCategoryCode = null;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return {
|
|
53
|
+
uuid: section.uuid,
|
|
54
|
+
name: section.name,
|
|
55
|
+
description: section.description,
|
|
56
|
+
code: section.code,
|
|
57
|
+
indicatorCount,
|
|
58
|
+
disaggregationEnabled,
|
|
59
|
+
ageCategoryCode,
|
|
60
|
+
raw: section,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function sortReportSections<T extends { sortOrder: number }>(items: T[]): T[] {
|
|
65
|
+
return [...items].sort((a, b) => a.sortOrder - b.sortOrder);
|
|
66
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.tileHeader {
|
|
2
|
+
margin-bottom: 0.75rem;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.tileTitle {
|
|
6
|
+
margin: 0;
|
|
7
|
+
font-weight: 600;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.formGrid {
|
|
11
|
+
display: grid;
|
|
12
|
+
grid-template-columns: 1fr;
|
|
13
|
+
gap: 0.75rem;
|
|
14
|
+
margin-top: 0.75rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.note {
|
|
18
|
+
margin-top: 0.75rem;
|
|
19
|
+
padding: 0.75rem;
|
|
20
|
+
border-left: 4px solid var(--cds-support-info, #0f62fe);
|
|
21
|
+
background: var(--cds-layer-accent-01, #edf5ff);
|
|
22
|
+
border-radius: 0.25rem;
|
|
23
|
+
font-size: 0.875rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.mappingActions {
|
|
27
|
+
margin-top: 0.75rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.placeholder {
|
|
31
|
+
padding: 1rem 0;
|
|
32
|
+
opacity: 0.8;
|
|
33
|
+
}
|