@genesislcap/pbc-reporting-ui 1.0.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.
- package/README.md +47 -0
- package/dist/dts/assets/images/index.d.ts +11 -0
- package/dist/dts/assets/images/index.d.ts.map +1 -0
- package/dist/dts/components/components.d.ts +5 -0
- package/dist/dts/components/components.d.ts.map +1 -0
- package/dist/dts/components/create-edit/create-edit.d.ts +17 -0
- package/dist/dts/components/create-edit/create-edit.d.ts.map +1 -0
- package/dist/dts/components/create-edit/create-edit.styles.d.ts +2 -0
- package/dist/dts/components/create-edit/create-edit.styles.d.ts.map +1 -0
- package/dist/dts/components/create-edit/create-edit.template.d.ts +3 -0
- package/dist/dts/components/create-edit/create-edit.template.d.ts.map +1 -0
- package/dist/dts/components/create-edit/index.d.ts +4 -0
- package/dist/dts/components/create-edit/index.d.ts.map +1 -0
- package/dist/dts/components/index.d.ts +2 -0
- package/dist/dts/components/index.d.ts.map +1 -0
- package/dist/dts/components/list/columns.d.ts +14 -0
- package/dist/dts/components/list/columns.d.ts.map +1 -0
- package/dist/dts/components/list/index.d.ts +4 -0
- package/dist/dts/components/list/index.d.ts.map +1 -0
- package/dist/dts/components/list/list.d.ts +19 -0
- package/dist/dts/components/list/list.d.ts.map +1 -0
- package/dist/dts/components/list/list.styles.d.ts +2 -0
- package/dist/dts/components/list/list.styles.d.ts.map +1 -0
- package/dist/dts/components/list/list.template.d.ts +3 -0
- package/dist/dts/components/list/list.template.d.ts.map +1 -0
- package/dist/dts/components/preview/columns.d.ts +15 -0
- package/dist/dts/components/preview/columns.d.ts.map +1 -0
- package/dist/dts/components/preview/index.d.ts +4 -0
- package/dist/dts/components/preview/index.d.ts.map +1 -0
- package/dist/dts/components/preview/preview.d.ts +28 -0
- package/dist/dts/components/preview/preview.d.ts.map +1 -0
- package/dist/dts/components/preview/preview.styles.d.ts +2 -0
- package/dist/dts/components/preview/preview.styles.d.ts.map +1 -0
- package/dist/dts/components/preview/preview.template.d.ts +3 -0
- package/dist/dts/components/preview/preview.template.d.ts.map +1 -0
- package/dist/dts/components/select-fields/columns.d.ts +65 -0
- package/dist/dts/components/select-fields/columns.d.ts.map +1 -0
- package/dist/dts/components/select-fields/data.d.ts +49 -0
- package/dist/dts/components/select-fields/data.d.ts.map +1 -0
- package/dist/dts/components/select-fields/index.d.ts +3 -0
- package/dist/dts/components/select-fields/index.d.ts.map +1 -0
- package/dist/dts/components/select-fields/select-fields.d.ts +57 -0
- package/dist/dts/components/select-fields/select-fields.d.ts.map +1 -0
- package/dist/dts/components/select-fields/select-fields.styles.d.ts +2 -0
- package/dist/dts/components/select-fields/select-fields.styles.d.ts.map +1 -0
- package/dist/dts/components/select-fields/select-fields.template.d.ts +4 -0
- package/dist/dts/components/select-fields/select-fields.template.d.ts.map +1 -0
- package/dist/dts/components/select-filters/columns.d.ts +88 -0
- package/dist/dts/components/select-filters/columns.d.ts.map +1 -0
- package/dist/dts/components/select-filters/index.d.ts +4 -0
- package/dist/dts/components/select-filters/index.d.ts.map +1 -0
- package/dist/dts/components/select-filters/select-filters.d.ts +46 -0
- package/dist/dts/components/select-filters/select-filters.d.ts.map +1 -0
- package/dist/dts/components/select-filters/select-filters.styles.d.ts +2 -0
- package/dist/dts/components/select-filters/select-filters.styles.d.ts.map +1 -0
- package/dist/dts/components/select-filters/select-filters.template.d.ts +4 -0
- package/dist/dts/components/select-filters/select-filters.template.d.ts.map +1 -0
- package/dist/dts/components/wizard/debug.d.ts +3 -0
- package/dist/dts/components/wizard/debug.d.ts.map +1 -0
- package/dist/dts/components/wizard/index.d.ts +3 -0
- package/dist/dts/components/wizard/index.d.ts.map +1 -0
- package/dist/dts/components/wizard/steps/filters.d.ts +3 -0
- package/dist/dts/components/wizard/steps/filters.d.ts.map +1 -0
- package/dist/dts/components/wizard/steps/index.d.ts +5 -0
- package/dist/dts/components/wizard/steps/index.d.ts.map +1 -0
- package/dist/dts/components/wizard/steps/name.d.ts +4 -0
- package/dist/dts/components/wizard/steps/name.d.ts.map +1 -0
- package/dist/dts/components/wizard/steps/run.d.ts +3 -0
- package/dist/dts/components/wizard/steps/run.d.ts.map +1 -0
- package/dist/dts/components/wizard/steps/select.d.ts +3 -0
- package/dist/dts/components/wizard/steps/select.d.ts.map +1 -0
- package/dist/dts/components/wizard/wizard.d.ts +83 -0
- package/dist/dts/components/wizard/wizard.d.ts.map +1 -0
- package/dist/dts/components/wizard/wizard.styles.d.ts +2 -0
- package/dist/dts/components/wizard/wizard.styles.d.ts.map +1 -0
- package/dist/dts/components/wizard/wizard.template.d.ts +4 -0
- package/dist/dts/components/wizard/wizard.template.d.ts.map +1 -0
- package/dist/dts/components/wizard/wizard.types.d.ts +41 -0
- package/dist/dts/components/wizard/wizard.types.d.ts.map +1 -0
- package/dist/dts/constants/grid-config.d.ts +17 -0
- package/dist/dts/constants/grid-config.d.ts.map +1 -0
- package/dist/dts/index.d.ts +3 -0
- package/dist/dts/index.d.ts.map +1 -0
- package/dist/dts/index.federated.d.ts +1 -0
- package/dist/dts/index.federated.d.ts.map +1 -0
- package/dist/dts/layouts/default.d.ts +3 -0
- package/dist/dts/layouts/default.d.ts.map +1 -0
- package/dist/dts/layouts/index.d.ts +3 -0
- package/dist/dts/layouts/index.d.ts.map +1 -0
- package/dist/dts/layouts/two-pane-horizontal.d.ts +6 -0
- package/dist/dts/layouts/two-pane-horizontal.d.ts.map +1 -0
- package/dist/dts/main/index.d.ts +3 -0
- package/dist/dts/main/index.d.ts.map +1 -0
- package/dist/dts/main/main.d.ts +18 -0
- package/dist/dts/main/main.d.ts.map +1 -0
- package/dist/dts/main/main.styles.d.ts +2 -0
- package/dist/dts/main/main.styles.d.ts.map +1 -0
- package/dist/dts/main/main.template.d.ts +6 -0
- package/dist/dts/main/main.template.d.ts.map +1 -0
- package/dist/dts/routes/config.d.ts +25 -0
- package/dist/dts/routes/config.d.ts.map +1 -0
- package/dist/dts/routes/index.d.ts +2 -0
- package/dist/dts/routes/index.d.ts.map +1 -0
- package/dist/dts/routes/not-found/not-found.d.ts +4 -0
- package/dist/dts/routes/not-found/not-found.d.ts.map +1 -0
- package/dist/dts/routes/protected/protected.d.ts +8 -0
- package/dist/dts/routes/protected/protected.d.ts.map +1 -0
- package/dist/dts/routes/protected/protected.styles.d.ts +2 -0
- package/dist/dts/routes/protected/protected.styles.d.ts.map +1 -0
- package/dist/dts/routes/protected/protected.template.d.ts +3 -0
- package/dist/dts/routes/protected/protected.template.d.ts.map +1 -0
- package/dist/dts/routes/reporting-home/reporting-home-styles.d.ts +2 -0
- package/dist/dts/routes/reporting-home/reporting-home-styles.d.ts.map +1 -0
- package/dist/dts/routes/reporting-home/reporting-home-template.d.ts +4 -0
- package/dist/dts/routes/reporting-home/reporting-home-template.d.ts.map +1 -0
- package/dist/dts/routes/reporting-home/reporting-home.d.ts +26 -0
- package/dist/dts/routes/reporting-home/reporting-home.d.ts.map +1 -0
- package/dist/dts/routes/reporting-home/types.d.ts +13 -0
- package/dist/dts/routes/reporting-home/types.d.ts.map +1 -0
- package/dist/dts/styles/colors.d.ts +17 -0
- package/dist/dts/styles/colors.d.ts.map +1 -0
- package/dist/dts/styles/helpers.d.ts +5 -0
- package/dist/dts/styles/helpers.d.ts.map +1 -0
- package/dist/dts/styles/index.d.ts +5 -0
- package/dist/dts/styles/index.d.ts.map +1 -0
- package/dist/dts/styles/normalize.d.ts +5 -0
- package/dist/dts/styles/normalize.d.ts.map +1 -0
- package/dist/dts/styles/styles.d.ts +4 -0
- package/dist/dts/styles/styles.d.ts.map +1 -0
- package/dist/dts/utils/filterObjectArray.d.ts +12 -0
- package/dist/dts/utils/filterObjectArray.d.ts.map +1 -0
- package/dist/dts/utils/getFiltersByType.d.ts +12 -0
- package/dist/dts/utils/getFiltersByType.d.ts.map +1 -0
- package/dist/dts/utils/getSelectedFields.d.ts +5 -0
- package/dist/dts/utils/getSelectedFields.d.ts.map +1 -0
- package/dist/dts/utils/index.d.ts +5 -0
- package/dist/dts/utils/index.d.ts.map +1 -0
- package/dist/dts/utils/logger.d.ts +2 -0
- package/dist/dts/utils/logger.d.ts.map +1 -0
- package/dist/esm/assets/images/index.js +60 -0
- package/dist/esm/components/components.js +51 -0
- package/dist/esm/components/create-edit/create-edit.js +70 -0
- package/dist/esm/components/create-edit/create-edit.styles.js +18 -0
- package/dist/esm/components/create-edit/create-edit.template.js +13 -0
- package/dist/esm/components/create-edit/index.js +3 -0
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/list/columns.js +105 -0
- package/dist/esm/components/list/index.js +3 -0
- package/dist/esm/components/list/list.js +127 -0
- package/dist/esm/components/list/list.styles.js +28 -0
- package/dist/esm/components/list/list.template.js +25 -0
- package/dist/esm/components/preview/columns.js +21 -0
- package/dist/esm/components/preview/index.js +3 -0
- package/dist/esm/components/preview/preview.js +111 -0
- package/dist/esm/components/preview/preview.styles.js +21 -0
- package/dist/esm/components/preview/preview.template.js +30 -0
- package/dist/esm/components/select-fields/columns.js +51 -0
- package/dist/esm/components/select-fields/data.js +218 -0
- package/dist/esm/components/select-fields/index.js +3 -0
- package/dist/esm/components/select-fields/select-fields.js +197 -0
- package/dist/esm/components/select-fields/select-fields.styles.js +21 -0
- package/dist/esm/components/select-fields/select-fields.template.js +49 -0
- package/dist/esm/components/select-filters/columns.js +43 -0
- package/dist/esm/components/select-filters/index.js +3 -0
- package/dist/esm/components/select-filters/select-filters.js +192 -0
- package/dist/esm/components/select-filters/select-filters.styles.js +20 -0
- package/dist/esm/components/select-filters/select-filters.template.js +51 -0
- package/dist/esm/components/wizard/debug.js +34 -0
- package/dist/esm/components/wizard/index.js +2 -0
- package/dist/esm/components/wizard/steps/filters.js +9 -0
- package/dist/esm/components/wizard/steps/index.js +4 -0
- package/dist/esm/components/wizard/steps/name.js +58 -0
- package/dist/esm/components/wizard/steps/run.js +11 -0
- package/dist/esm/components/wizard/steps/select.js +11 -0
- package/dist/esm/components/wizard/wizard.js +363 -0
- package/dist/esm/components/wizard/wizard.styles.js +193 -0
- package/dist/esm/components/wizard/wizard.template.js +113 -0
- package/dist/esm/components/wizard/wizard.types.js +7 -0
- package/dist/esm/constants/grid-config.js +19 -0
- package/dist/esm/index.federated.js +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/layouts/default.js +27 -0
- package/dist/esm/layouts/index.js +2 -0
- package/dist/esm/layouts/two-pane-horizontal.js +86 -0
- package/dist/esm/main/index.js +2 -0
- package/dist/esm/main/main.js +80 -0
- package/dist/esm/main/main.styles.js +15 -0
- package/dist/esm/main/main.template.js +12 -0
- package/dist/esm/routes/config.js +84 -0
- package/dist/esm/routes/index.js +1 -0
- package/dist/esm/routes/not-found/not-found.js +29 -0
- package/dist/esm/routes/protected/protected.js +32 -0
- package/dist/esm/routes/protected/protected.styles.js +18 -0
- package/dist/esm/routes/protected/protected.template.js +7 -0
- package/dist/esm/routes/reporting-home/reporting-home-styles.js +74 -0
- package/dist/esm/routes/reporting-home/reporting-home-template.js +85 -0
- package/dist/esm/routes/reporting-home/reporting-home.js +103 -0
- package/dist/esm/routes/reporting-home/types.js +7 -0
- package/dist/esm/styles/colors.js +17 -0
- package/dist/esm/styles/helpers.js +179 -0
- package/dist/esm/styles/index.js +4 -0
- package/dist/esm/styles/normalize.js +13 -0
- package/dist/esm/styles/styles.js +22 -0
- package/dist/esm/utils/filterObjectArray.js +13 -0
- package/dist/esm/utils/getFiltersByType.js +62 -0
- package/dist/esm/utils/getSelectedFields.js +13 -0
- package/dist/esm/utils/index.js +4 -0
- package/dist/esm/utils/logger.js +2 -0
- package/index.html +26 -0
- package/package.json +79 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFiltersByType.d.ts","sourceRoot":"","sources":["../../../src/utils/getFiltersByType.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,iBAAiB,EAO5C,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,iBAAiB,EAG7C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,iBAAiB,EAQ5C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,iBAAiB,EAM1C,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAmB5E;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAmBlE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSelectedFields.d.ts","sourceRoot":"","sources":["../../../src/utils/getSelectedFields.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,iBAAiB,gDAY7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/utils/logger.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,iDAAuC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export const tickIcon = (slot = 'start') => `
|
|
2
|
+
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="8px" height="8px" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<defs>
|
|
4
|
+
<mask fill="white" id="clip71">
|
|
5
|
+
<path d="M 7.902293826332949 0.88531102710076 C 8.029418727016619 0.7318189595164379 8.032943724262715 0.4786004073434318 7.910168820180608 0.3196942814888426 C 7.7873939160985035 0.16078815563425342 7.584819074360098 0.15638190907663363 7.457694173676427 0.3098505391792663 C 7.455031675756503 0.3130614741707234 7.452406677807284 0.31634272160724874 7.449819179828765 0.3196942814888426 L 2.236067003072654 6.8369079399156725 L 0.5423058263235732 4.719706468979322 C 0.41518092563990183 4.566237838876688 0.212606083901497 4.570644085434308 0.08983117981939077 4.729550211288897 C -0.029943726606463585 4.884565715183035 -0.029943726606463585 5.130307710697101 0.08983117981939077 5.285323214591238 L 2.009829679820563 7.6853213395927025 C 2.134798332188803 7.841485280089625 2.337354423941856 7.841485280089625 2.4623043263247455 7.6853213395927025 L 7.902293826332949 0.88531102710076 Z " fill-rule="evenodd" />
|
|
6
|
+
</mask>
|
|
7
|
+
</defs>
|
|
8
|
+
<g transform="matrix(1 0 0 1 -23 -68 )">
|
|
9
|
+
<path d="M 7.902293826332949 0.88531102710076 C 8.029418727016619 0.7318189595164379 8.032943724262715 0.4786004073434318 7.910168820180608 0.3196942814888426 C 7.7873939160985035 0.16078815563425342 7.584819074360098 0.15638190907663363 7.457694173676427 0.3098505391792663 C 7.455031675756503 0.3130614741707234 7.452406677807284 0.31634272160724874 7.449819179828765 0.3196942814888426 L 2.236067003072654 6.8369079399156725 L 0.5423058263235732 4.719706468979322 C 0.41518092563990183 4.566237838876688 0.212606083901497 4.570644085434308 0.08983117981939077 4.729550211288897 C -0.029943726606463585 4.884565715183035 -0.029943726606463585 5.130307710697101 0.08983117981939077 5.285323214591238 L 2.009829679820563 7.6853213395927025 C 2.134798332188803 7.841485280089625 2.337354423941856 7.841485280089625 2.4623043263247455 7.6853213395927025 L 7.902293826332949 0.88531102710076 Z " fill-rule="nonzero" fill="#141414" stroke="none" transform="matrix(1 0 0 1 23 68 )" />
|
|
10
|
+
<path d="M 7.902293826332949 0.88531102710076 C 8.029418727016619 0.7318189595164379 8.032943724262715 0.4786004073434318 7.910168820180608 0.3196942814888426 C 7.7873939160985035 0.16078815563425342 7.584819074360098 0.15638190907663363 7.457694173676427 0.3098505391792663 C 7.455031675756503 0.3130614741707234 7.452406677807284 0.31634272160724874 7.449819179828765 0.3196942814888426 L 2.236067003072654 6.8369079399156725 L 0.5423058263235732 4.719706468979322 C 0.41518092563990183 4.566237838876688 0.212606083901497 4.570644085434308 0.08983117981939077 4.729550211288897 C -0.029943726606463585 4.884565715183035 -0.029943726606463585 5.130307710697101 0.08983117981939077 5.285323214591238 L 2.009829679820563 7.6853213395927025 C 2.134798332188803 7.841485280089625 2.337354423941856 7.841485280089625 2.4623043263247455 7.6853213395927025 L 7.902293826332949 0.88531102710076 Z " stroke-width="6" stroke="#141414" fill="none" transform="matrix(1 0 0 1 23 68 )" mask="url(#clip71)" />
|
|
11
|
+
</g>
|
|
12
|
+
</svg>
|
|
13
|
+
`;
|
|
14
|
+
export const downloadIcon = (slot = 'start') => `
|
|
15
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. -->
|
|
16
|
+
<path d="M480 352h-133.5l-45.25 45.25C289.2 409.3 273.1 416 256 416s-33.16-6.656-45.25-18.75L165.5 352H32c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h448c17.67 0 32-14.33 32-32v-96C512 366.3 497.7 352 480 352zM432 456c-13.2 0-24-10.8-24-24c0-13.2 10.8-24 24-24s24 10.8 24 24C456 445.2 445.2 456 432 456zM233.4 374.6C239.6 380.9 247.8 384 256 384s16.38-3.125 22.62-9.375l128-128c12.49-12.5 12.49-32.75 0-45.25c-12.5-12.5-32.76-12.5-45.25 0L288 274.8V32c0-17.67-14.33-32-32-32C238.3 0 224 14.33 224 32v242.8L150.6 201.4c-12.49-12.5-32.75-12.5-45.25 0c-12.49 12.5-12.49 32.75 0 45.25L233.4 374.6z"/>
|
|
17
|
+
</svg>
|
|
18
|
+
`;
|
|
19
|
+
export const savedReportsIcon = (slot = 'start') => `
|
|
20
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">
|
|
21
|
+
<path d="M256 0v128h128L256 0zM224 128L224 0H48C21.49 0 0 21.49 0 48v416C0 490.5 21.49 512 48 512h288c26.51 0 48-21.49 48-48V160h-127.1C238.3 160 224 145.7 224 128z"/>
|
|
22
|
+
</svg>
|
|
23
|
+
`;
|
|
24
|
+
export const deleteIcon = (slot = 'start') => `
|
|
25
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
|
|
26
|
+
<path d="M135.2 17.69C140.6 6.848 151.7 0 163.8 0H284.2C296.3 0 307.4 6.848 312.8 17.69L320 32H416C433.7 32 448 46.33 448 64C448 81.67 433.7 96 416 96H32C14.33 96 0 81.67 0 64C0 46.33 14.33 32 32 32H128L135.2 17.69zM31.1 128H416V448C416 483.3 387.3 512 352 512H95.1C60.65 512 31.1 483.3 31.1 448V128zM111.1 208V432C111.1 440.8 119.2 448 127.1 448C136.8 448 143.1 440.8 143.1 432V208C143.1 199.2 136.8 192 127.1 192C119.2 192 111.1 199.2 111.1 208zM207.1 208V432C207.1 440.8 215.2 448 223.1 448C232.8 448 240 440.8 240 432V208C240 199.2 232.8 192 223.1 192C215.2 192 207.1 199.2 207.1 208zM304 208V432C304 440.8 311.2 448 320 448C328.8 448 336 440.8 336 432V208C336 199.2 328.8 192 320 192C311.2 192 304 199.2 304 208z"/>
|
|
27
|
+
</svg>
|
|
28
|
+
`;
|
|
29
|
+
export const chevronRightIcon = (slot = 'start') => `
|
|
30
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
|
|
31
|
+
<path d="M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z"/>
|
|
32
|
+
</svg>
|
|
33
|
+
`;
|
|
34
|
+
export const chevronLeftIcon = (slot = 'start') => `
|
|
35
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
|
|
36
|
+
<path d="M224 480c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25l192-192c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l169.4 169.4c12.5 12.5 12.5 32.75 0 45.25C240.4 476.9 232.2 480 224 480z"/>
|
|
37
|
+
</svg>
|
|
38
|
+
`;
|
|
39
|
+
export const runIcon = (slot = 'start') => `
|
|
40
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">
|
|
41
|
+
<path d="M361 215C375.3 223.8 384 239.3 384 256C384 272.7 375.3 288.2 361 296.1L73.03 472.1C58.21 482 39.66 482.4 24.52 473.9C9.377 465.4 0 449.4 0 432V80C0 62.64 9.377 46.63 24.52 38.13C39.66 29.64 58.21 29.99 73.03 39.04L361 215z"/>
|
|
42
|
+
</svg>
|
|
43
|
+
`;
|
|
44
|
+
export const addIcon = (slot = 'start') => `
|
|
45
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
|
|
46
|
+
<path d="M432 256c0 17.69-14.33 32.01-32 32.01H256v144c0 17.69-14.33 31.99-32 31.99s-32-14.3-32-31.99v-144H48c-17.67 0-32-14.32-32-32.01s14.33-31.99 32-31.99H192v-144c0-17.69 14.33-32.01 32-32.01s32 14.32 32 32.01v144h144C417.7 224 432 238.3 432 256z"/>
|
|
47
|
+
</svg>
|
|
48
|
+
`;
|
|
49
|
+
export const editIcon = (slot = 'start') => `
|
|
50
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
51
|
+
<path d="M490.3 40.4C512.2 62.27 512.2 97.73 490.3 119.6L460.3 149.7L362.3 51.72L392.4 21.66C414.3-.2135 449.7-.2135 471.6 21.66L490.3 40.4zM172.4 241.7L339.7 74.34L437.7 172.3L270.3 339.6C264.2 345.8 256.7 350.4 248.4 353.2L159.6 382.8C150.1 385.6 141.5 383.4 135 376.1C128.6 370.5 126.4 361 129.2 352.4L158.8 263.6C161.6 255.3 166.2 247.8 172.4 241.7V241.7zM192 63.1C209.7 63.1 224 78.33 224 95.1C224 113.7 209.7 127.1 192 127.1H96C78.33 127.1 64 142.3 64 159.1V416C64 433.7 78.33 448 96 448H352C369.7 448 384 433.7 384 416V319.1C384 302.3 398.3 287.1 416 287.1C433.7 287.1 448 302.3 448 319.1V416C448 469 405 512 352 512H96C42.98 512 0 469 0 416V159.1C0 106.1 42.98 63.1 96 63.1H192z"/>
|
|
52
|
+
</svg>
|
|
53
|
+
`;
|
|
54
|
+
export const actionsOpenIcon = (slot = 'start') => `
|
|
55
|
+
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="5px" height="16px" xmlns="http://www.w3.org/2000/svg">
|
|
56
|
+
<g transform="matrix(1 0 0 1 -10 -5 )">
|
|
57
|
+
<path d="M 0 2.3225806451612905 C 0 3.606451612903226 1.1180555555555556 4.645161290322581 2.5 4.645161290322581 C 3.881944444444445 4.645161290322581 5 3.606451612903226 5 2.3225806451612905 C 5 1.038709677419355 3.881944444444445 0 2.5 0 C 1.1180555555555551 0 0 1.038709677419355 0 2.3225806451612905 Z M 1.1111111111111112 2.3225806451612905 C 1.1111111111111112 1.6096774193548389 1.732638888888889 1.032258064516129 2.5 1.032258064516129 C 3.267361111111111 1.032258064516129 3.888888888888889 1.6096774193548387 3.888888888888889 2.3225806451612905 C 3.888888888888889 3.0354838709677416 3.267361111111111 3.6129032258064515 2.5 3.6129032258064515 C 1.732638888888889 3.6129032258064515 1.1111111111111112 3.0354838709677416 1.1111111111111112 2.3225806451612905 Z M 5 8 C 5 6.716129032258064 3.881944444444445 5.67741935483871 2.5 5.67741935483871 C 1.1180555555555556 5.67741935483871 0 6.716129032258064 0 8 C 0 9.283870967741937 1.1180555555555556 10.32258064516129 2.5 10.32258064516129 C 3.881944444444445 10.32258064516129 5 9.283870967741937 5 8 Z M 3.888888888888889 8 C 3.888888888888889 8.712903225806452 3.267361111111111 9.290322580645162 2.5 9.290322580645162 C 1.732638888888889 9.290322580645162 1.1111111111111112 8.712903225806452 1.1111111111111112 8 C 1.1111111111111112 7.2870967741935475 1.732638888888889 6.709677419354839 2.5 6.709677419354839 C 3.267361111111111 6.709677419354839 3.888888888888889 7.287096774193548 3.888888888888889 8 Z M 5 13.67741935483871 C 5 12.393548387096773 3.881944444444445 11.35483870967742 2.5 11.35483870967742 C 1.1180555555555556 11.35483870967742 0 12.393548387096773 0 13.67741935483871 C 0 14.961290322580645 1.1180555555555556 16 2.5 16 C 3.881944444444445 16 5 14.961290322580645 5 13.67741935483871 Z M 3.888888888888889 13.67741935483871 C 3.888888888888889 14.390322580645162 3.267361111111111 14.96774193548387 2.5 14.96774193548387 C 1.732638888888889 14.96774193548387 1.1111111111111112 14.390322580645162 1.1111111111111112 13.67741935483871 C 1.1111111111111112 12.964516129032257 1.732638888888889 12.387096774193548 2.5 12.387096774193548 C 3.267361111111111 12.387096774193548 3.888888888888889 12.964516129032257 3.888888888888889 13.67741935483871 Z " fill-rule="nonzero" fill="inherit" stroke="none" transform="matrix(1 0 0 1 10 5 )" />
|
|
58
|
+
</g>
|
|
59
|
+
</svg>
|
|
60
|
+
`;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { FASTRouter } from '@microsoft/fast-router';
|
|
3
|
+
import { CreateEdit } from './create-edit';
|
|
4
|
+
import { List } from './list';
|
|
5
|
+
import { Preview } from './preview';
|
|
6
|
+
import { SelectFields } from './select-fields';
|
|
7
|
+
import { SelectFilters } from './select-filters';
|
|
8
|
+
import { Wizard } from './wizard';
|
|
9
|
+
var ResourceType;
|
|
10
|
+
(function (ResourceType) {
|
|
11
|
+
ResourceType["LOCAL"] = "LOCAL";
|
|
12
|
+
ResourceType["REMOTE"] = "REMOTE";
|
|
13
|
+
})(ResourceType || (ResourceType = {}));
|
|
14
|
+
/**
|
|
15
|
+
* TODO: Think about sharing import functions across micro frontends.
|
|
16
|
+
*/
|
|
17
|
+
function loadZeroFallback() {
|
|
18
|
+
return import(
|
|
19
|
+
/* webpackMode: "lazy" */
|
|
20
|
+
'@genesislcap/foundation-zero');
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Granular
|
|
24
|
+
*/
|
|
25
|
+
function loadZeroDesignSystem() {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
return yield loadZeroFallback();
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export function loadRemotes(options) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const { registerZeroDesignSystem } = yield loadZeroDesignSystem();
|
|
33
|
+
return {
|
|
34
|
+
ZeroDesignSystem: registerZeroDesignSystem(),
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Ensure tree shaking doesn't remove these
|
|
40
|
+
* Perhaps we keep these MFs style free, ie. they need to get wrapped to have style applied. Keeping it simple for now.
|
|
41
|
+
*/
|
|
42
|
+
FASTRouter;
|
|
43
|
+
/**
|
|
44
|
+
* Load custom components for reporting
|
|
45
|
+
*/
|
|
46
|
+
CreateEdit;
|
|
47
|
+
List;
|
|
48
|
+
Preview;
|
|
49
|
+
SelectFields;
|
|
50
|
+
SelectFilters;
|
|
51
|
+
Wizard;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { __awaiter, __decorate } from "tslib";
|
|
2
|
+
import { Connect } from '@genesislcap/foundation-comms';
|
|
3
|
+
import { customElement, FASTElement, observable } from '@microsoft/fast-element';
|
|
4
|
+
import { ReportingEventListeners } from '../../routes/reporting-home/types';
|
|
5
|
+
import { CreateEditStyles as styles } from './create-edit.styles';
|
|
6
|
+
import { CreateEditTemplate as template } from './create-edit.template';
|
|
7
|
+
const name = 'reporting-create-edit';
|
|
8
|
+
let CreateEdit = class CreateEdit extends FASTElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.report = {};
|
|
12
|
+
/**
|
|
13
|
+
* Create report save handle
|
|
14
|
+
*/
|
|
15
|
+
this.saveReport = (isEdit, body) => __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
let notification = null;
|
|
17
|
+
const payload = Object.assign(Object.assign({}, body), { REPORT_COLUMNS: JSON.stringify(body['REPORT_COLUMNS']) });
|
|
18
|
+
const event = isEdit ? 'EVENT_SAVED_REPORTS_UPDATE' : 'EVENT_SAVED_REPORTS_INSERT';
|
|
19
|
+
const result = yield this.connect.commitEvent(event, {
|
|
20
|
+
DETAILS: Object.assign(Object.assign({}, payload), (isEdit ? { REPORT_ID: this.report.REPORT_ID } : {})),
|
|
21
|
+
IGNORE_WARNINGS: true,
|
|
22
|
+
VALIDATE: false,
|
|
23
|
+
});
|
|
24
|
+
if (result.MESSAGE_TYPE === 'EVENT_ACK') {
|
|
25
|
+
notification = {
|
|
26
|
+
message: `'${body.REPORT_NAME}' was added`,
|
|
27
|
+
title: 'Success:',
|
|
28
|
+
type: 'success',
|
|
29
|
+
autoClose: true,
|
|
30
|
+
};
|
|
31
|
+
this.navigateToListReports();
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
notification = {
|
|
35
|
+
message: `'${body.REPORT_NAME}' was not added due to the following error "${result.ERROR[0].TEXT}"`,
|
|
36
|
+
title: 'Error:',
|
|
37
|
+
type: 'warning',
|
|
38
|
+
autoClose: true,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
this.$emit(ReportingEventListeners.notify, notification);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Trigger parent event listReports that navigates to list reports tab
|
|
46
|
+
*/
|
|
47
|
+
navigateToListReports() {
|
|
48
|
+
this.$emit(ReportingEventListeners.listReports, {});
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
__decorate([
|
|
52
|
+
Connect
|
|
53
|
+
], CreateEdit.prototype, "connect", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
observable
|
|
56
|
+
], CreateEdit.prototype, "id", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
observable
|
|
59
|
+
], CreateEdit.prototype, "report", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
observable
|
|
62
|
+
], CreateEdit.prototype, "datasourceSettings", void 0);
|
|
63
|
+
CreateEdit = __decorate([
|
|
64
|
+
customElement({
|
|
65
|
+
name,
|
|
66
|
+
template,
|
|
67
|
+
styles,
|
|
68
|
+
})
|
|
69
|
+
], CreateEdit);
|
|
70
|
+
export { CreateEdit };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { neutralForegroundRest } from '@microsoft/fast-components';
|
|
2
|
+
import { css } from '@microsoft/fast-element';
|
|
3
|
+
import { ColorHEX } from '../../styles';
|
|
4
|
+
const { blackPearl } = ColorHEX;
|
|
5
|
+
export const CreateEditStyles = css `
|
|
6
|
+
.create-edit {
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 98%;
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
color: ${neutralForegroundRest};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.container {
|
|
15
|
+
max-width: 1737px;
|
|
16
|
+
margin: 0 auto;
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { html } from '@microsoft/fast-element';
|
|
2
|
+
export const CreateEditTemplate = html `
|
|
3
|
+
<div class="create-edit page" data-test-id="create-edit-page">
|
|
4
|
+
<div class="container create-edit page">
|
|
5
|
+
<reporting-wizard
|
|
6
|
+
:report=${(x) => x.report}
|
|
7
|
+
:saveReport=${(x) => x.saveReport}
|
|
8
|
+
:datasourceSettings=${(x) => x.datasourceSettings}
|
|
9
|
+
data-test-id="reporting-wizard"
|
|
10
|
+
/>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { formatDateTimestamp } from '@genesislcap/foundation-utils';
|
|
2
|
+
import { ColorHEX } from '../../styles';
|
|
3
|
+
export var REPORT_FIELDS;
|
|
4
|
+
(function (REPORT_FIELDS) {
|
|
5
|
+
REPORT_FIELDS["REPORT_ID"] = "REPORT_ID";
|
|
6
|
+
REPORT_FIELDS["REPORT_NAME"] = "REPORT_NAME";
|
|
7
|
+
REPORT_FIELDS["REPORT_DESCRIPTION"] = "REPORT_DESCRIPTION";
|
|
8
|
+
REPORT_FIELDS["REPORT_DATASOURCE"] = "REPORT_DATASOURCE";
|
|
9
|
+
REPORT_FIELDS["REPORT_COLUMNS"] = "REPORT_COLUMNS";
|
|
10
|
+
REPORT_FIELDS["CREATED_BY"] = "CREATED_BY";
|
|
11
|
+
REPORT_FIELDS["REPORT_CREATED_ON"] = "REPORT_CREATED_ON";
|
|
12
|
+
REPORT_FIELDS["OPTIONS"] = "OPTIONS";
|
|
13
|
+
})(REPORT_FIELDS || (REPORT_FIELDS = {}));
|
|
14
|
+
export function REPORT_COLUMN_DEFS(context) {
|
|
15
|
+
let retval = [];
|
|
16
|
+
retval = [
|
|
17
|
+
{
|
|
18
|
+
checkboxSelection: true,
|
|
19
|
+
filter: false,
|
|
20
|
+
headerCheckboxSelection: true,
|
|
21
|
+
sortable: false,
|
|
22
|
+
width: 60,
|
|
23
|
+
cellStyle: { display: 'flex' },
|
|
24
|
+
},
|
|
25
|
+
{ field: REPORT_FIELDS.REPORT_ID, hide: true },
|
|
26
|
+
{ field: REPORT_FIELDS.REPORT_COLUMNS, hide: true },
|
|
27
|
+
{
|
|
28
|
+
field: REPORT_FIELDS.REPORT_NAME,
|
|
29
|
+
headerName: 'Report Name',
|
|
30
|
+
cellStyle: {
|
|
31
|
+
display: 'flex',
|
|
32
|
+
justifyContent: 'flex-start',
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
textAlign: 'left',
|
|
35
|
+
color: ColorHEX.lightBlue,
|
|
36
|
+
},
|
|
37
|
+
cellRendererSelector: (params) => {
|
|
38
|
+
return {
|
|
39
|
+
component: 'action',
|
|
40
|
+
params: {
|
|
41
|
+
actionClick: () => { var _a; return context.runReport((_a = params === null || params === void 0 ? void 0 : params.node) === null || _a === void 0 ? void 0 : _a.data); },
|
|
42
|
+
actionName: params === null || params === void 0 ? void 0 : params.value,
|
|
43
|
+
appearance: 'lightweight',
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{ field: REPORT_FIELDS.REPORT_DESCRIPTION, headerName: 'Description', width: 400 },
|
|
49
|
+
{ field: REPORT_FIELDS.REPORT_DATASOURCE, headerName: 'Datasource' },
|
|
50
|
+
{ field: REPORT_FIELDS.CREATED_BY, headerName: 'Author' },
|
|
51
|
+
{
|
|
52
|
+
field: REPORT_FIELDS.REPORT_CREATED_ON,
|
|
53
|
+
headerName: 'Created date',
|
|
54
|
+
filter: 'agDateColumnFilter',
|
|
55
|
+
filterParams: {
|
|
56
|
+
comparator: (filterLocalDateAtMidnight, cellValue) => {
|
|
57
|
+
if (!cellValue)
|
|
58
|
+
return -1;
|
|
59
|
+
const cellValueTime = new Date(cellValue).setHours(0, 0, 0, 0);
|
|
60
|
+
const filterValueTime = filterLocalDateAtMidnight.getTime();
|
|
61
|
+
if (cellValueTime === filterValueTime) {
|
|
62
|
+
return 0;
|
|
63
|
+
}
|
|
64
|
+
if (cellValueTime < filterValueTime) {
|
|
65
|
+
return -1;
|
|
66
|
+
}
|
|
67
|
+
if (cellValueTime > filterValueTime) {
|
|
68
|
+
return 1;
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
buttons: ['reset', 'apply'],
|
|
72
|
+
closeOnApply: true,
|
|
73
|
+
closeOnClear: true,
|
|
74
|
+
suppressAndOrCondition: true,
|
|
75
|
+
browserDatePicker: true,
|
|
76
|
+
filterOptions: ['equals', 'lessThan', 'greaterThan'],
|
|
77
|
+
},
|
|
78
|
+
valueFormatter: (rowData) => formatDateTimestamp(rowData.data.REPORT_CREATED_ON),
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
width: 100,
|
|
82
|
+
headerName: 'Actions',
|
|
83
|
+
filter: false,
|
|
84
|
+
resizable: false,
|
|
85
|
+
sortable: false,
|
|
86
|
+
cellStyle: {
|
|
87
|
+
display: 'flex',
|
|
88
|
+
justifyContent: 'flex-end',
|
|
89
|
+
alignItems: 'center',
|
|
90
|
+
},
|
|
91
|
+
cellRendererSelector: (params) => {
|
|
92
|
+
return {
|
|
93
|
+
component: 'action',
|
|
94
|
+
params: {
|
|
95
|
+
actionClick: () => { var _a; return context.runReport((_a = params === null || params === void 0 ? void 0 : params.node) === null || _a === void 0 ? void 0 : _a.data); },
|
|
96
|
+
actionName: 'Run',
|
|
97
|
+
appearance: 'primary-gradient',
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
];
|
|
103
|
+
return retval;
|
|
104
|
+
}
|
|
105
|
+
export function SELECTED_COLUMN_DEFS(context) { }
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { __awaiter, __decorate } from "tslib";
|
|
2
|
+
import { Connect } from '@genesislcap/foundation-comms';
|
|
3
|
+
import { getActionsMenuDef } from '@genesislcap/foundation-zero-grid-pro';
|
|
4
|
+
import { customElement, FASTElement, observable } from '@microsoft/fast-element';
|
|
5
|
+
import { actionsOpenIcon } from '../../assets/images';
|
|
6
|
+
import { ReportingEventListeners } from '../../routes/reporting-home/types';
|
|
7
|
+
import { ColorHEX } from '../../styles';
|
|
8
|
+
import { ListStyles as styles } from './list.styles';
|
|
9
|
+
import { ListTemplate as template } from './list.template';
|
|
10
|
+
const name = 'reporting-list';
|
|
11
|
+
let List = class List extends FASTElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.userInteractedRow = {};
|
|
15
|
+
this.selectedRows = [];
|
|
16
|
+
this.slectionEvent = new CustomEvent('rowSelectionEvent', {
|
|
17
|
+
detail: { selectedRows: () => this.selectedRows },
|
|
18
|
+
});
|
|
19
|
+
this.runReport = (data) => {
|
|
20
|
+
this.$emit(ReportingEventListeners.runReport, data);
|
|
21
|
+
};
|
|
22
|
+
this.actionsMenuSlottedConfig = getActionsMenuDef([
|
|
23
|
+
{
|
|
24
|
+
name: 'Edit',
|
|
25
|
+
callback: (rowData) => {
|
|
26
|
+
this.$emit(ReportingEventListeners.editReport, rowData);
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'Run',
|
|
31
|
+
callback: (rowData) => {
|
|
32
|
+
this.runReport(rowData);
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'Delete',
|
|
37
|
+
callback: (rowData) => {
|
|
38
|
+
this.delete(rowData);
|
|
39
|
+
},
|
|
40
|
+
color: ColorHEX.orange,
|
|
41
|
+
},
|
|
42
|
+
], {
|
|
43
|
+
width: 60,
|
|
44
|
+
headerName: '',
|
|
45
|
+
filter: false,
|
|
46
|
+
sortable: false,
|
|
47
|
+
resizable: false,
|
|
48
|
+
suppressMenu: true,
|
|
49
|
+
cellStyle: {
|
|
50
|
+
display: 'flex',
|
|
51
|
+
justifyContent: 'center',
|
|
52
|
+
alignItems: 'center',
|
|
53
|
+
overflow: 'visible',
|
|
54
|
+
},
|
|
55
|
+
}, actionsOpenIcon());
|
|
56
|
+
}
|
|
57
|
+
connectedCallback() {
|
|
58
|
+
const _super = Object.create(null, {
|
|
59
|
+
connectedCallback: { get: () => super.connectedCallback }
|
|
60
|
+
});
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
_super.connectedCallback.call(this);
|
|
63
|
+
this.grid.addEventListener('onGridReady', () => {
|
|
64
|
+
window.addEventListener('resize', () => {
|
|
65
|
+
setTimeout(() => {
|
|
66
|
+
var _a, _b;
|
|
67
|
+
(_b = (_a = this.grid) === null || _a === void 0 ? void 0 : _a.gridApi) === null || _b === void 0 ? void 0 : _b.sizeColumnsToFit();
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
this.grid.gridApi.addEventListener('firstDataRendered', () => {
|
|
71
|
+
var _a, _b;
|
|
72
|
+
(_b = (_a = this.grid) === null || _a === void 0 ? void 0 : _a.gridApi) === null || _b === void 0 ? void 0 : _b.sizeColumnsToFit();
|
|
73
|
+
});
|
|
74
|
+
this.grid.gridApi.addEventListener('selectionChanged', () => {
|
|
75
|
+
this.selectedRows = this.grid.gridApi.getSelectedRows();
|
|
76
|
+
this.dispatchEvent(this.slectionEvent);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
delete(rowData) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
let notification = null;
|
|
84
|
+
const { REPORT_ID } = rowData;
|
|
85
|
+
const result = yield this.connect.commitEvent('EVENT_SAVED_REPORTS_DELETE', {
|
|
86
|
+
DETAILS: { REPORT_ID },
|
|
87
|
+
IGNORE_WARNINGS: true,
|
|
88
|
+
VALIDATE: false,
|
|
89
|
+
});
|
|
90
|
+
result.MESSAGE_TYPE === 'EVENT_ACK'
|
|
91
|
+
? (notification = {
|
|
92
|
+
message: `'${rowData.REPORT_NAME}' was deleted`,
|
|
93
|
+
title: 'Success:',
|
|
94
|
+
type: 'success',
|
|
95
|
+
autoClose: true,
|
|
96
|
+
})
|
|
97
|
+
: (notification = {
|
|
98
|
+
message: `'${rowData.REPORT_NAME}' was not deleted due to the following error "${result.ERROR[0].TEXT}"`,
|
|
99
|
+
title: 'Error:',
|
|
100
|
+
type: 'warning',
|
|
101
|
+
autoClose: true,
|
|
102
|
+
});
|
|
103
|
+
this.$emit(ReportingEventListeners.notify, notification);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
batchDelete() {
|
|
107
|
+
// service does not accept arrays so have to loop
|
|
108
|
+
this.selectedRows.forEach((rowData) => this.delete(rowData));
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
__decorate([
|
|
112
|
+
Connect
|
|
113
|
+
], List.prototype, "connect", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
observable
|
|
116
|
+
], List.prototype, "userInteractedRow", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
observable
|
|
119
|
+
], List.prototype, "selectedRows", void 0);
|
|
120
|
+
List = __decorate([
|
|
121
|
+
customElement({
|
|
122
|
+
name,
|
|
123
|
+
template,
|
|
124
|
+
styles,
|
|
125
|
+
})
|
|
126
|
+
], List);
|
|
127
|
+
export { List };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { neutralForegroundRest } from '@microsoft/fast-components';
|
|
2
|
+
import { css } from '@microsoft/fast-element';
|
|
3
|
+
import { ColorHEX } from '../../styles';
|
|
4
|
+
const { dark } = ColorHEX;
|
|
5
|
+
export const ListStyles = css `
|
|
6
|
+
:host {
|
|
7
|
+
display: block;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
|
|
11
|
+
--design-unit: 3.5;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.container {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
height: 100%;
|
|
18
|
+
width: 100%;
|
|
19
|
+
color: ${neutralForegroundRest};
|
|
20
|
+
background-color: ${dark};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.saved-reports-grid {
|
|
24
|
+
padding: 10px;
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: 80%;
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { html, repeat, ref } from '@microsoft/fast-element';
|
|
2
|
+
import { REPORT_COLUMN_DEFS } from './columns';
|
|
3
|
+
// TODO: provide gridoptions in class
|
|
4
|
+
export const ListTemplate = html `
|
|
5
|
+
<zero-grid-pro
|
|
6
|
+
${ref('grid')}
|
|
7
|
+
data-test-id="report-grid"
|
|
8
|
+
only-template-col-defs
|
|
9
|
+
rowSelection="multiple"
|
|
10
|
+
suppressRowClickSelection
|
|
11
|
+
suppressRowTransform
|
|
12
|
+
>
|
|
13
|
+
<grid-pro-genesis-datasource resource-name="ALL_SAVED_REPORTS"></grid-pro-genesis-datasource>
|
|
14
|
+
${repeat((x) => REPORT_COLUMN_DEFS(x), html `
|
|
15
|
+
<grid-pro-column
|
|
16
|
+
data-test-id="report-grid-column"
|
|
17
|
+
:definition="${(x) => x}"
|
|
18
|
+
></grid-pro-column>
|
|
19
|
+
`)}
|
|
20
|
+
<grid-pro-column
|
|
21
|
+
data-test-id="report-grid-actions-column"
|
|
22
|
+
:definition=${(x) => x.actionsMenuSlottedConfig}
|
|
23
|
+
></grid-pro-column>
|
|
24
|
+
</zero-grid-pro>
|
|
25
|
+
`;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { formatDateTimestamp, formatDateTimeTimestamp } from '@genesislcap/foundation-utils';
|
|
2
|
+
import { defaultCellConfig } from '../../constants/grid-config';
|
|
3
|
+
export const getColumns = (columns) => [
|
|
4
|
+
...columns.map(({ name, displayName, type }) => {
|
|
5
|
+
return {
|
|
6
|
+
field: name,
|
|
7
|
+
headerName: displayName,
|
|
8
|
+
filter: 'agTextColumnFilter',
|
|
9
|
+
valueFormatter: type === 'DATE'
|
|
10
|
+
? (rowData) => formatDateTimestamp(rowData.data[name])
|
|
11
|
+
: type === 'DATETIME'
|
|
12
|
+
? (rowData) => formatDateTimeTimestamp(rowData.data[name])
|
|
13
|
+
: '',
|
|
14
|
+
};
|
|
15
|
+
}),
|
|
16
|
+
];
|
|
17
|
+
export const getGridOptions = () => {
|
|
18
|
+
return {
|
|
19
|
+
defaultColDef: Object.assign(Object.assign({}, defaultCellConfig), { filter: true, floatingFilter: false, sortable: false, suppressMenu: false, resizable: false }),
|
|
20
|
+
};
|
|
21
|
+
};
|