vc-create-dashboard 2.9.6 → 2.9.7
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/karma.conf.js +44 -0
- package/ng-package.json +7 -0
- package/package.json +11 -25
- package/src/lib/categoryList.ts +23 -0
- package/src/lib/configurations.ts +8 -0
- package/src/lib/create-dashboard-container/categories/categories-config.ts +18 -0
- package/src/lib/create-dashboard-container/categories/categories.component.html +84 -0
- package/src/lib/create-dashboard-container/categories/categories.component.less +252 -0
- package/src/lib/create-dashboard-container/categories/categories.component.spec.ts +43 -0
- package/src/lib/create-dashboard-container/categories/categories.component.ts +205 -0
- package/src/lib/create-dashboard-container/configure-widgets/configure-widgets/configure-widgets.component.html +70 -0
- package/src/lib/create-dashboard-container/configure-widgets/configure-widgets/configure-widgets.component.less +381 -0
- package/src/lib/create-dashboard-container/configure-widgets/configure-widgets/configure-widgets.component.spec.ts +48 -0
- package/src/lib/create-dashboard-container/configure-widgets/configure-widgets/configure-widgets.component.ts +545 -0
- package/src/lib/create-dashboard-container/configure-widgets/configure-widgets/widget.interface.ts +9 -0
- package/src/lib/create-dashboard-container/configure-widgets/configure-widgets.module.ts +29 -0
- package/src/lib/create-dashboard-container/create-dashboard-config.ts +24 -0
- package/src/lib/create-dashboard-container/create-dashboard-mockData.ts +341 -0
- package/src/lib/create-dashboard-container/create-dashboard.component.html +1258 -0
- package/src/lib/create-dashboard-container/create-dashboard.component.less +1277 -0
- package/src/lib/create-dashboard-container/create-dashboard.component.spec.ts +755 -0
- package/src/lib/create-dashboard-container/create-dashboard.component.ts +1281 -0
- package/src/lib/create-dashboard-container/create-dashboard.module.ts +76 -0
- package/src/lib/create-dashboard-container/directives/directives.module.ts +18 -0
- package/src/lib/create-dashboard-container/directives/scroll-in-view.directive.ts +28 -0
- package/src/lib/create-dashboard-container/form-group/form-group.component.html +287 -0
- package/src/lib/create-dashboard-container/form-group/form-group.component.less +450 -0
- package/src/lib/create-dashboard-container/form-group/form-group.component.spec.ts +90 -0
- package/src/lib/create-dashboard-container/form-group/form-group.component.ts +162 -0
- package/src/lib/create-dashboard-container/frequency/frequency.component.html +61 -0
- package/src/lib/create-dashboard-container/frequency/frequency.component.less +183 -0
- package/src/lib/create-dashboard-container/frequency/frequency.component.spec.ts +120 -0
- package/src/lib/create-dashboard-container/frequency/frequency.component.ts +303 -0
- package/{lib/create-dashboard-container/interfaces/widget-data-model.d.ts → src/lib/create-dashboard-container/interfaces/widget-data-model.ts} +1 -1
- package/src/lib/create-dashboard-container/pipes/filter.pipe.ts +25 -0
- package/src/lib/create-dashboard-container/pipes/search.pipe.ts +23 -0
- package/src/lib/create-dashboard-container/pipes/text-count.pipe.spec.ts +8 -0
- package/src/lib/create-dashboard-container/pipes/text-count.pipe.ts +15 -0
- package/src/lib/create-dashboard-container/responsibility-center/responsibility-center.component.html +44 -0
- package/src/lib/create-dashboard-container/responsibility-center/responsibility-center.component.less +181 -0
- package/src/lib/create-dashboard-container/responsibility-center/responsibility-center.component.spec.ts +41 -0
- package/src/lib/create-dashboard-container/responsibility-center/responsibility-center.component.ts +136 -0
- package/src/lib/create-dashboard-container/risk-categories/risk-categories-config.ts +18 -0
- package/src/lib/create-dashboard-container/risk-categories/risk-categories.component.html +83 -0
- package/src/lib/create-dashboard-container/risk-categories/risk-categories.component.less +230 -0
- package/src/lib/create-dashboard-container/risk-categories/risk-categories.component.spec.ts +39 -0
- package/src/lib/create-dashboard-container/risk-categories/risk-categories.component.ts +191 -0
- package/src/lib/create-dashboard-container/services/auth.service.ts +27 -0
- package/src/lib/create-dashboard-container/services/configure-widgets.service.spec.ts +19 -0
- package/src/lib/create-dashboard-container/services/configure-widgets.service.ts +228 -0
- package/src/lib/create-dashboard-container/services/create-dashboard.service.spec.ts +19 -0
- package/src/lib/create-dashboard-container/services/create-dashboard.service.ts +139 -0
- package/src/lib/create-dashboard-container/services/pagination.service.spec.ts +16 -0
- package/src/lib/create-dashboard-container/services/pagination.service.ts +25 -0
- package/src/lib/create-dashboard-container/user-list/user-list.component.html +146 -0
- package/src/lib/create-dashboard-container/user-list/user-list.component.less +451 -0
- package/src/lib/create-dashboard-container/user-list/user-list.component.spec.ts +153 -0
- package/src/lib/create-dashboard-container/user-list/user-list.component.ts +433 -0
- package/{lib/create-dashboard-container/user-list/user-list.config.d.ts → src/lib/create-dashboard-container/user-list/user-list.config.ts} +6 -6
- package/src/lib/create-dashboard.service.ts +8 -0
- package/src/lib/ui-kit/action-dialog/access-capability/access-capability.component.html +22 -0
- package/src/lib/ui-kit/action-dialog/access-capability/access-capability.component.less +218 -0
- package/src/lib/ui-kit/action-dialog/access-capability/access-capability.component.ts +30 -0
- package/src/lib/ui-kit/action-dialog/action-dialog.module.ts +53 -0
- package/src/lib/ui-kit/action-dialog/active/active.component.html +1 -0
- package/src/lib/ui-kit/action-dialog/active/active.component.less +0 -0
- package/src/lib/ui-kit/action-dialog/active/active.component.ts +12 -0
- package/src/lib/ui-kit/action-dialog/assesment-confirmation/assesment-confirmation.component.html +18 -0
- package/src/lib/ui-kit/action-dialog/assesment-confirmation/assesment-confirmation.component.less +98 -0
- package/src/lib/ui-kit/action-dialog/assesment-confirmation/assesment-confirmation.component.ts +18 -0
- package/src/lib/ui-kit/action-dialog/confirmation/confirmation.component.html +20 -0
- package/src/lib/ui-kit/action-dialog/confirmation/confirmation.component.less +325 -0
- package/src/lib/ui-kit/action-dialog/confirmation/confirmation.component.ts +26 -0
- package/src/lib/ui-kit/action-dialog/delete/delete.component.html +24 -0
- package/src/lib/ui-kit/action-dialog/delete/delete.component.less +240 -0
- package/src/lib/ui-kit/action-dialog/delete/delete.component.ts +22 -0
- package/src/lib/ui-kit/action-dialog/error/error.component.html +20 -0
- package/src/lib/ui-kit/action-dialog/error/error.component.less +103 -0
- package/src/lib/ui-kit/action-dialog/error/error.component.ts +18 -0
- package/src/lib/ui-kit/action-dialog/inactive/inactive.component.html +23 -0
- package/src/lib/ui-kit/action-dialog/inactive/inactive.component.less +167 -0
- package/src/lib/ui-kit/action-dialog/inactive/inactive.component.ts +12 -0
- package/src/lib/ui-kit/action-dialog/link/link.component.html +57 -0
- package/src/lib/ui-kit/action-dialog/link/link.component.less +222 -0
- package/src/lib/ui-kit/action-dialog/link/link.component.ts +18 -0
- package/src/lib/ui-kit/action-dialog/move/move.component.html +43 -0
- package/src/lib/ui-kit/action-dialog/move/move.component.less +157 -0
- package/src/lib/ui-kit/action-dialog/move/move.component.ts +25 -0
- package/src/lib/ui-kit/action-dialog/my-rating/my-rating.component.html +19 -0
- package/src/lib/ui-kit/action-dialog/my-rating/my-rating.component.less +97 -0
- package/src/lib/ui-kit/action-dialog/my-rating/my-rating.component.ts +18 -0
- package/src/lib/ui-kit/action-dialog/upload/upload.component.html +19 -0
- package/src/lib/ui-kit/action-dialog/upload/upload.component.less +97 -0
- package/src/lib/ui-kit/action-dialog/upload/upload.component.ts +12 -0
- package/src/lib/ui-kit/chart/bar/bar.component.html +28 -0
- package/src/lib/ui-kit/chart/bar/bar.component.less +13 -0
- package/src/lib/ui-kit/chart/bar/bar.component.ts +44 -0
- package/src/lib/ui-kit/chart/chart.module.ts +12 -0
- package/src/lib/ui-kit/chart/pipes/segmenter.pipe.ts +28 -0
- package/src/lib/ui-kit/chart/pipes/x-calculator.pipe.ts +22 -0
- package/src/lib/ui-kit/circle-progresss/circle/circle.component.html +37 -0
- package/src/lib/ui-kit/circle-progresss/circle/circle.component.less +1448 -0
- package/src/lib/ui-kit/circle-progresss/circle/circle.component.ts +19 -0
- package/src/lib/ui-kit/circle-progresss/circle-progresss.module.ts +10 -0
- package/src/lib/ui-kit/click-outside/click-outside.directive.ts +16 -0
- package/src/lib/ui-kit/click-outside/click-outside.module.ts +16 -0
- package/src/lib/ui-kit/color-palette/color-palette.component.html +110 -0
- package/src/lib/ui-kit/color-palette/color-palette.component.less +54 -0
- package/src/lib/ui-kit/color-palette/color-palette.component.ts +28 -0
- package/src/lib/ui-kit/color-palette/color-palette.module.ts +10 -0
- package/src/lib/ui-kit/dashboard-footer/dashboard-footer/dashboard-footer.component.html +37 -0
- package/src/lib/ui-kit/dashboard-footer/dashboard-footer/dashboard-footer.component.less +335 -0
- package/src/lib/ui-kit/dashboard-footer/dashboard-footer/dashboard-footer.component.spec.ts +25 -0
- package/src/lib/ui-kit/dashboard-footer/dashboard-footer/dashboard-footer.component.ts +44 -0
- package/src/lib/ui-kit/dashboard-footer/dashboard-footer-config.ts +11 -0
- package/src/lib/ui-kit/dashboard-footer/dashboard-footer.module.ts +22 -0
- package/src/lib/ui-kit/dialog/dialog-config.ts +6 -0
- package/src/lib/ui-kit/dialog/dialog-injector.ts +18 -0
- package/src/lib/ui-kit/dialog/dialog-ref.ts +12 -0
- package/src/lib/ui-kit/dialog/dialog.component.css +89 -0
- package/src/lib/ui-kit/dialog/dialog.component.html +27 -0
- package/src/lib/ui-kit/dialog/dialog.component.ts +96 -0
- package/src/lib/ui-kit/dialog/dialog.module.ts +11 -0
- package/src/lib/ui-kit/dialog/dialog.service.ts +57 -0
- package/src/lib/ui-kit/dialog/insertion.directive.ts +8 -0
- package/src/lib/ui-kit/floating-bar/floating-bar.component.html +42 -0
- package/src/lib/ui-kit/floating-bar/floating-bar.component.less +355 -0
- package/src/lib/ui-kit/floating-bar/floating-bar.component.spec.ts +25 -0
- package/src/lib/ui-kit/floating-bar/floating-bar.component.ts +40 -0
- package/src/lib/ui-kit/floating-bar/floating-bar.module.ts +22 -0
- package/src/lib/ui-kit/formgroup/click-outside.directive.ts +16 -0
- package/src/lib/ui-kit/formgroup/cs-checkbox/cs-checkbox.component.html +11 -0
- package/src/lib/ui-kit/formgroup/cs-checkbox/cs-checkbox.component.less +102 -0
- package/src/lib/ui-kit/formgroup/cs-checkbox/cs-checkbox.component.ts +19 -0
- package/src/lib/ui-kit/formgroup/cs-radio/cs-radio.component.html +11 -0
- package/src/lib/ui-kit/formgroup/cs-radio/cs-radio.component.less +125 -0
- package/src/lib/ui-kit/formgroup/cs-radio/cs-radio.component.ts +21 -0
- package/src/lib/ui-kit/formgroup/cs-radio-group/cs-radio-group.component.html +4 -0
- package/src/lib/ui-kit/formgroup/cs-radio-group/cs-radio-group.component.less +0 -0
- package/src/lib/ui-kit/formgroup/cs-radio-group/cs-radio-group.component.ts +12 -0
- package/src/lib/ui-kit/formgroup/cs-select/cs-select.component.html +78 -0
- package/src/lib/ui-kit/formgroup/cs-select/cs-select.component.less +259 -0
- package/src/lib/ui-kit/formgroup/cs-select/cs-select.component.ts +92 -0
- package/src/lib/ui-kit/formgroup/cs-switch/cs-switch.component.html +30 -0
- package/src/lib/ui-kit/formgroup/cs-switch/cs-switch.component.less +103 -0
- package/src/lib/ui-kit/formgroup/cs-switch/cs-switch.component.ts +23 -0
- package/src/lib/ui-kit/formgroup/formgroup.module.ts +35 -0
- package/src/lib/ui-kit/formgroup/pipes/pascal.pipe.ts +13 -0
- package/src/lib/ui-kit/formgroup/pipes/searchMultiSelect.pipe.ts +18 -0
- package/src/lib/ui-kit/line-loader/line-loader.component.html +3 -0
- package/src/lib/ui-kit/line-loader/line-loader.component.less +34 -0
- package/src/lib/ui-kit/line-loader/line-loader.component.ts +14 -0
- package/src/lib/ui-kit/line-loader/line-loader.module.ts +10 -0
- package/src/lib/ui-kit/longpress/longpress.directive.ts +28 -0
- package/src/lib/ui-kit/longpress/longpress.module.ts +10 -0
- package/src/lib/ui-kit/multi-select/cs-multiselect/cs-multiselect.component.html +51 -0
- package/src/lib/ui-kit/multi-select/cs-multiselect/cs-multiselect.component.less +365 -0
- package/src/lib/ui-kit/multi-select/cs-multiselect/cs-multiselect.component.spec.ts +24 -0
- package/src/lib/ui-kit/multi-select/cs-multiselect/cs-multiselect.component.ts +139 -0
- package/src/lib/ui-kit/multi-select/cs-multiselect-option/cs-multiselect-option.component.html +9 -0
- package/src/lib/ui-kit/multi-select/cs-multiselect-option/cs-multiselect-option.component.less +105 -0
- package/src/lib/ui-kit/multi-select/cs-multiselect-option/cs-multiselect-option.component.spec.ts +27 -0
- package/src/lib/ui-kit/multi-select/cs-multiselect-option/cs-multiselect-option.component.ts +24 -0
- package/src/lib/ui-kit/multi-select/multi-select.module.ts +24 -0
- package/src/lib/ui-kit/multi-select/multi-select.service.ts +10 -0
- package/src/lib/ui-kit/no-data/no-data.component.html +14 -0
- package/src/lib/ui-kit/no-data/no-data.component.less +87 -0
- package/src/lib/ui-kit/no-data/no-data.component.ts +26 -0
- package/src/lib/ui-kit/no-data/no-data.module.ts +10 -0
- package/src/lib/ui-kit/pagination/pagination.component.html +11 -0
- package/src/lib/ui-kit/pagination/pagination.component.less +72 -0
- package/src/lib/ui-kit/pagination/pagination.component.spec.ts +25 -0
- package/src/lib/ui-kit/pagination/pagination.component.ts +138 -0
- package/src/lib/ui-kit/pagination/pagination.module.ts +10 -0
- package/src/lib/ui-kit/pipes/pipes.module.ts +10 -0
- package/src/lib/ui-kit/pipes/safeHTML.pipe.ts +12 -0
- package/src/lib/ui-kit/pipes/trim.pipe.ts +10 -0
- package/src/lib/ui-kit/popover/popover.component.html +6 -0
- package/src/lib/ui-kit/popover/popover.component.less +20 -0
- package/src/lib/ui-kit/popover/popover.component.ts +124 -0
- package/src/lib/ui-kit/popover/popover.directive.ts +72 -0
- package/src/lib/ui-kit/popover/popover.module.ts +13 -0
- package/src/lib/ui-kit/popover/popover.service.ts +17 -0
- package/src/lib/ui-kit/ripple/ripple.directive.ts +33 -0
- package/src/lib/ui-kit/ripple/ripple.module.ts +10 -0
- package/src/lib/ui-kit/select/cs-option/cs-option.component.html +8 -0
- package/src/lib/ui-kit/select/cs-option/cs-option.component.less +49 -0
- package/src/lib/ui-kit/select/cs-option/cs-option.component.ts +31 -0
- package/src/lib/ui-kit/select/cs-select/cs-select.component.html +16 -0
- package/src/lib/ui-kit/select/cs-select/cs-select.component.less +142 -0
- package/src/lib/ui-kit/select/cs-select/cs-select.component.ts +96 -0
- package/src/lib/ui-kit/select/safe-html.pipe.ts +13 -0
- package/src/lib/ui-kit/select/select.module.ts +13 -0
- package/src/lib/ui-kit/services/cs-select.service.ts +10 -0
- package/src/lib/ui-kit/smiley-dialog/smiley-dialog.component.html +30 -0
- package/src/lib/ui-kit/smiley-dialog/smiley-dialog.component.less +442 -0
- package/src/lib/ui-kit/smiley-dialog/smiley-dialog.component.ts +40 -0
- package/src/lib/ui-kit/smiley-dialog/smiley-dialog.module.ts +11 -0
- package/src/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.html +10 -0
- package/src/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.less +110 -0
- package/src/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.ts +42 -0
- package/src/lib/ui-kit/snack-bar/snack-bar.module.ts +10 -0
- package/src/lib/ui-kit/snack-bar/snack-bar.service.ts +18 -0
- package/src/lib/ui-kit/time-filter/time-filter.component.html +84 -0
- package/src/lib/ui-kit/time-filter/time-filter.component.less +481 -0
- package/src/lib/ui-kit/time-filter/time-filter.component.ts +284 -0
- package/src/lib/ui-kit/time-filter/time-filter.module.ts +10 -0
- package/src/lib/ui-kit/tooltip/tooltip.directive.ts +127 -0
- package/src/lib/ui-kit/tooltip/tooltip.module.ts +10 -0
- package/src/lib/ui-kit/v-loader/loader/loader.component.html +6 -0
- package/src/lib/ui-kit/v-loader/loader/loader.component.less +52 -0
- package/src/lib/ui-kit/v-loader/loader/loader.component.ts +22 -0
- package/src/lib/ui-kit/v-loader/loader-inline/loader-inline.component.html +6 -0
- package/src/lib/ui-kit/v-loader/loader-inline/loader-inline.component.less +52 -0
- package/src/lib/ui-kit/v-loader/loader-inline/loader-inline.component.ts +22 -0
- package/src/lib/ui-kit/v-loader/v-loader.module.ts +11 -0
- package/src/public-api.ts +11 -0
- package/src/test.ts +28 -0
- package/tsconfig.lib.json +20 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/esm2022/lib/configurations.mjs +0 -7
- package/esm2022/lib/create-dashboard-container/categories/categories-config.mjs +0 -2
- package/esm2022/lib/create-dashboard-container/categories/categories.component.mjs +0 -210
- package/esm2022/lib/create-dashboard-container/configure-widgets/configure-widgets/configure-widgets.component.mjs +0 -549
- package/esm2022/lib/create-dashboard-container/configure-widgets/configure-widgets/widget.interface.mjs +0 -2
- package/esm2022/lib/create-dashboard-container/configure-widgets/configure-widgets.module.mjs +0 -45
- package/esm2022/lib/create-dashboard-container/create-dashboard-config.mjs +0 -2
- package/esm2022/lib/create-dashboard-container/create-dashboard.component.mjs +0 -1080
- package/esm2022/lib/create-dashboard-container/create-dashboard.module.mjs +0 -125
- package/esm2022/lib/create-dashboard-container/directives/directives.module.mjs +0 -24
- package/esm2022/lib/create-dashboard-container/directives/scroll-in-view.directive.mjs +0 -36
- package/esm2022/lib/create-dashboard-container/form-group/form-group.component.mjs +0 -152
- package/esm2022/lib/create-dashboard-container/frequency/frequency.component.mjs +0 -309
- package/esm2022/lib/create-dashboard-container/interfaces/widget-data-model.mjs +0 -2
- package/esm2022/lib/create-dashboard-container/pipes/filter.pipe.mjs +0 -30
- package/esm2022/lib/create-dashboard-container/pipes/search.pipe.mjs +0 -25
- package/esm2022/lib/create-dashboard-container/pipes/text-count.pipe.mjs +0 -19
- package/esm2022/lib/create-dashboard-container/responsibility-center/responsibility-center.component.mjs +0 -145
- package/esm2022/lib/create-dashboard-container/risk-categories/risk-categories-config.mjs +0 -2
- package/esm2022/lib/create-dashboard-container/risk-categories/risk-categories.component.mjs +0 -195
- package/esm2022/lib/create-dashboard-container/services/auth.service.mjs +0 -31
- package/esm2022/lib/create-dashboard-container/services/configure-widgets.service.mjs +0 -227
- package/esm2022/lib/create-dashboard-container/services/create-dashboard.service.mjs +0 -126
- package/esm2022/lib/create-dashboard-container/services/pagination.service.mjs +0 -28
- package/esm2022/lib/create-dashboard-container/user-list/user-list.component.mjs +0 -421
- package/esm2022/lib/create-dashboard-container/user-list/user-list.config.mjs +0 -2
- package/esm2022/lib/create-dashboard.service.mjs +0 -14
- package/esm2022/lib/ui-kit/dashboard-footer/dashboard-footer/dashboard-footer.component.mjs +0 -52
- package/esm2022/lib/ui-kit/dashboard-footer/dashboard-footer-config.mjs +0 -2
- package/esm2022/lib/ui-kit/dashboard-footer/dashboard-footer.module.mjs +0 -32
- package/esm2022/lib/ui-kit/dialog/dialog-config.mjs +0 -7
- package/esm2022/lib/ui-kit/dialog/dialog-injector.mjs +0 -17
- package/esm2022/lib/ui-kit/dialog/dialog-ref.mjs +0 -11
- package/esm2022/lib/ui-kit/dialog/dialog.component.mjs +0 -96
- package/esm2022/lib/ui-kit/dialog/dialog.module.mjs +0 -20
- package/esm2022/lib/ui-kit/dialog/dialog.service.mjs +0 -56
- package/esm2022/lib/ui-kit/dialog/insertion.directive.mjs +0 -17
- package/esm2022/lib/ui-kit/floating-bar/floating-bar.component.mjs +0 -57
- package/esm2022/lib/ui-kit/floating-bar/floating-bar.module.mjs +0 -32
- package/esm2022/lib/ui-kit/formgroup/click-outside.directive.mjs +0 -30
- package/esm2022/lib/ui-kit/formgroup/cs-checkbox/cs-checkbox.component.mjs +0 -29
- package/esm2022/lib/ui-kit/formgroup/cs-radio/cs-radio.component.mjs +0 -34
- package/esm2022/lib/ui-kit/formgroup/cs-radio-group/cs-radio-group.component.mjs +0 -14
- package/esm2022/lib/ui-kit/formgroup/cs-select/cs-select.component.mjs +0 -119
- package/esm2022/lib/ui-kit/formgroup/cs-switch/cs-switch.component.mjs +0 -39
- package/esm2022/lib/ui-kit/formgroup/formgroup.module.mjs +0 -55
- package/esm2022/lib/ui-kit/formgroup/pipes/pascal.pipe.mjs +0 -19
- package/esm2022/lib/ui-kit/formgroup/pipes/searchMultiSelect.pipe.mjs +0 -24
- package/esm2022/lib/ui-kit/no-data/no-data.component.mjs +0 -47
- package/esm2022/lib/ui-kit/no-data/no-data.module.mjs +0 -18
- package/esm2022/lib/ui-kit/pagination/pagination.component.mjs +0 -130
- package/esm2022/lib/ui-kit/pagination/pagination.module.mjs +0 -18
- package/esm2022/lib/ui-kit/popover/popover.component.mjs +0 -142
- package/esm2022/lib/ui-kit/popover/popover.directive.mjs +0 -93
- package/esm2022/lib/ui-kit/popover/popover.module.mjs +0 -21
- package/esm2022/lib/ui-kit/popover/popover.service.mjs +0 -23
- package/esm2022/lib/ui-kit/select/cs-option/cs-option.component.mjs +0 -41
- package/esm2022/lib/ui-kit/select/cs-select/cs-select.component.mjs +0 -105
- package/esm2022/lib/ui-kit/select/safe-html.pipe.mjs +0 -21
- package/esm2022/lib/ui-kit/select/select.module.mjs +0 -21
- package/esm2022/lib/ui-kit/services/cs-select.service.mjs +0 -16
- package/esm2022/lib/ui-kit/smiley-dialog/smiley-dialog.component.mjs +0 -52
- package/esm2022/lib/ui-kit/smiley-dialog/smiley-dialog.module.mjs +0 -18
- package/esm2022/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.mjs +0 -46
- package/esm2022/lib/ui-kit/snack-bar/snack-bar.module.mjs +0 -18
- package/esm2022/lib/ui-kit/snack-bar/snack-bar.service.mjs +0 -23
- package/esm2022/lib/ui-kit/tooltip/tooltip.directive.mjs +0 -161
- package/esm2022/lib/ui-kit/tooltip/tooltip.module.mjs +0 -18
- package/esm2022/lib/ui-kit/v-loader/loader/loader.component.mjs +0 -23
- package/esm2022/lib/ui-kit/v-loader/loader-inline/loader-inline.component.mjs +0 -23
- package/esm2022/lib/ui-kit/v-loader/v-loader.module.mjs +0 -19
- package/esm2022/public-api.mjs +0 -10
- package/esm2022/vc-create-dashboard.mjs +0 -5
- package/fesm2022/vc-create-dashboard.mjs +0 -5338
- package/fesm2022/vc-create-dashboard.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/configurations.d.ts +0 -4
- package/lib/create-dashboard-container/categories/categories-config.d.ts +0 -18
- package/lib/create-dashboard-container/categories/categories.component.d.ts +0 -31
- package/lib/create-dashboard-container/configure-widgets/configure-widgets/configure-widgets.component.d.ts +0 -88
- package/lib/create-dashboard-container/configure-widgets/configure-widgets/widget.interface.d.ts +0 -9
- package/lib/create-dashboard-container/configure-widgets/configure-widgets.module.d.ts +0 -14
- package/lib/create-dashboard-container/create-dashboard-config.d.ts +0 -18
- package/lib/create-dashboard-container/create-dashboard.component.d.ts +0 -173
- package/lib/create-dashboard-container/create-dashboard.module.d.ts +0 -36
- package/lib/create-dashboard-container/directives/directives.module.d.ts +0 -8
- package/lib/create-dashboard-container/directives/scroll-in-view.directive.d.ts +0 -12
- package/lib/create-dashboard-container/form-group/form-group.component.d.ts +0 -47
- package/lib/create-dashboard-container/frequency/frequency.component.d.ts +0 -39
- package/lib/create-dashboard-container/pipes/filter.pipe.d.ts +0 -7
- package/lib/create-dashboard-container/pipes/search.pipe.d.ts +0 -7
- package/lib/create-dashboard-container/pipes/text-count.pipe.d.ts +0 -7
- package/lib/create-dashboard-container/responsibility-center/responsibility-center.component.d.ts +0 -27
- package/lib/create-dashboard-container/risk-categories/risk-categories-config.d.ts +0 -18
- package/lib/create-dashboard-container/risk-categories/risk-categories.component.d.ts +0 -31
- package/lib/create-dashboard-container/services/auth.service.d.ts +0 -11
- package/lib/create-dashboard-container/services/configure-widgets.service.d.ts +0 -38
- package/lib/create-dashboard-container/services/create-dashboard.service.d.ts +0 -47
- package/lib/create-dashboard-container/services/pagination.service.d.ts +0 -12
- package/lib/create-dashboard-container/user-list/user-list.component.d.ts +0 -88
- package/lib/create-dashboard.service.d.ts +0 -6
- package/lib/ui-kit/dashboard-footer/dashboard-footer/dashboard-footer.component.d.ts +0 -17
- package/lib/ui-kit/dashboard-footer/dashboard-footer-config.d.ts +0 -11
- package/lib/ui-kit/dashboard-footer/dashboard-footer.module.d.ts +0 -10
- package/lib/ui-kit/dialog/dialog-config.d.ts +0 -6
- package/lib/ui-kit/dialog/dialog-injector.d.ts +0 -7
- package/lib/ui-kit/dialog/dialog-ref.d.ts +0 -7
- package/lib/ui-kit/dialog/dialog.component.d.ts +0 -33
- package/lib/ui-kit/dialog/dialog.module.d.ts +0 -9
- package/lib/ui-kit/dialog/dialog.service.d.ts +0 -17
- package/lib/ui-kit/dialog/insertion.directive.d.ts +0 -8
- package/lib/ui-kit/floating-bar/floating-bar.component.d.ts +0 -20
- package/lib/ui-kit/floating-bar/floating-bar.module.d.ts +0 -10
- package/lib/ui-kit/formgroup/click-outside.directive.d.ts +0 -10
- package/lib/ui-kit/formgroup/cs-checkbox/cs-checkbox.component.d.ts +0 -13
- package/lib/ui-kit/formgroup/cs-radio/cs-radio.component.d.ts +0 -15
- package/lib/ui-kit/formgroup/cs-radio-group/cs-radio-group.component.d.ts +0 -8
- package/lib/ui-kit/formgroup/cs-select/cs-select.component.d.ts +0 -36
- package/lib/ui-kit/formgroup/cs-switch/cs-switch.component.d.ts +0 -15
- package/lib/ui-kit/formgroup/formgroup.module.d.ts +0 -17
- package/lib/ui-kit/formgroup/pipes/pascal.pipe.d.ts +0 -7
- package/lib/ui-kit/formgroup/pipes/searchMultiSelect.pipe.d.ts +0 -7
- package/lib/ui-kit/no-data/no-data.component.d.ts +0 -19
- package/lib/ui-kit/no-data/no-data.module.d.ts +0 -8
- package/lib/ui-kit/pagination/pagination.component.d.ts +0 -21
- package/lib/ui-kit/pagination/pagination.module.d.ts +0 -8
- package/lib/ui-kit/popover/popover.component.d.ts +0 -28
- package/lib/ui-kit/popover/popover.directive.d.ts +0 -17
- package/lib/ui-kit/popover/popover.module.d.ts +0 -9
- package/lib/ui-kit/popover/popover.service.d.ts +0 -13
- package/lib/ui-kit/select/cs-option/cs-option.component.d.ts +0 -16
- package/lib/ui-kit/select/cs-select/cs-select.component.d.ts +0 -32
- package/lib/ui-kit/select/safe-html.pipe.d.ts +0 -10
- package/lib/ui-kit/select/select.module.d.ts +0 -11
- package/lib/ui-kit/services/cs-select.service.d.ts +0 -7
- package/lib/ui-kit/smiley-dialog/smiley-dialog.component.d.ts +0 -17
- package/lib/ui-kit/smiley-dialog/smiley-dialog.module.d.ts +0 -8
- package/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.d.ts +0 -17
- package/lib/ui-kit/snack-bar/snack-bar.module.d.ts +0 -8
- package/lib/ui-kit/snack-bar/snack-bar.service.d.ts +0 -9
- package/lib/ui-kit/tooltip/tooltip.directive.d.ts +0 -27
- package/lib/ui-kit/tooltip/tooltip.module.d.ts +0 -8
- package/lib/ui-kit/v-loader/loader/loader.component.d.ts +0 -11
- package/lib/ui-kit/v-loader/loader-inline/loader-inline.component.d.ts +0 -11
- package/lib/ui-kit/v-loader/v-loader.module.d.ts +0 -9
- package/public-api.d.ts +0 -3
|
@@ -0,0 +1,755 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { HttpClientModule } from '@angular/common/http';
|
|
3
|
+
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
|
4
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
5
|
+
import { FormsModule } from '@angular/forms';
|
|
6
|
+
import { DpDatePickerModule } from 'ng2-date-picker';
|
|
7
|
+
import { MarxEditorModule } from 'vcomply-editor';
|
|
8
|
+
import { CreateDashboardService } from './services/create-dashboard.service';
|
|
9
|
+
import { DialogRef } from '../ui-kit/dialog/dialog-ref';
|
|
10
|
+
import { CategoriesComponent } from './categories/categories.component';
|
|
11
|
+
import { CreateDashboardComponent } from './create-dashboard.component';
|
|
12
|
+
import { FormGroupComponent } from './form-group/form-group.component';
|
|
13
|
+
import { FrequencyComponent } from './frequency/frequency.component';
|
|
14
|
+
import { ResponsibilityCenterComponent } from './responsibility-center/responsibility-center.component';
|
|
15
|
+
import { RiskCategoriesComponent } from './risk-categories/risk-categories.component';
|
|
16
|
+
import { PaginationService } from './services/pagination.service';
|
|
17
|
+
import { UserListComponent } from './user-list/user-list.component';
|
|
18
|
+
import { DialogModule } from '../ui-kit/dialog/dialog.module';
|
|
19
|
+
import { FilterPipe } from './pipes/filter.pipe';
|
|
20
|
+
import { FormgroupModule } from '../ui-kit/formgroup/formgroup.module';
|
|
21
|
+
import { TooltipModule } from '../ui-kit/tooltip/tooltip.module';
|
|
22
|
+
import { SelectModule } from '../ui-kit/select/select.module';
|
|
23
|
+
import { DashboardFooterModule } from '../ui-kit/dashboard-footer/dashboard-footer.module';
|
|
24
|
+
import { PaginationModule } from '../ui-kit/pagination/pagination.module';
|
|
25
|
+
import { FloatingBarModule } from '../ui-kit/floating-bar/floating-bar.module';
|
|
26
|
+
import { ConfigureWidgetsModule } from './configure-widgets/configure-widgets.module';
|
|
27
|
+
import { of } from 'rxjs';
|
|
28
|
+
import { By } from '@angular/platform-browser';
|
|
29
|
+
// import {editform } from '../create-dashboard-container/create-dashboard-mockData'
|
|
30
|
+
import * as dayjs from 'dayjs';
|
|
31
|
+
import * as customParseFormat from 'dayjs/plugin/customParseFormat';
|
|
32
|
+
import { TextCountPipe } from './pipes/text-count.pipe';
|
|
33
|
+
import { FeatureFlagService } from 'src/app/layout/featureFlag/feature-flag.service';
|
|
34
|
+
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
|
35
|
+
import { compileComponentFromMetadata } from '@angular/compiler';
|
|
36
|
+
import { Configurations } from '../configurations';
|
|
37
|
+
import { editdata } from './create-dashboard-mockData';
|
|
38
|
+
dayjs.extend(customParseFormat);
|
|
39
|
+
/**
|
|
40
|
+
* If unit test is failing then please try to update token as token may get expired
|
|
41
|
+
*/
|
|
42
|
+
const localStorageMock = (() => {
|
|
43
|
+
let store: any = {
|
|
44
|
+
currentUser: {
|
|
45
|
+
token:
|
|
46
|
+
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZTgyMWQzOGY4YmM2MDAwMDdkZjFjYTQiLCJ1c2VyIjp7ImlkIjo5OTY3LCJuYW1lIjoiQWJ1IFRlc3QgQWNjb3VudCAyIiwiZW1haWwiOiJyYWloYW5hYnUwM3pAZ21haWwuY29tIiwib3JnYW5pc2F0aW9uX2lkIjoxLCJzaG9ydF9uYW1lIjoiQTIiLCJrZXlBZG1pbklkIjoxNSwia2V5QWRtaW4iOmZhbHNlLCJhZG1pbiI6ZmFsc2UsIm1hbmFnZXIiOnRydWUsInVzZXIiOnRydWUsImJyb3dzZXJfZmluZ2VycHJpbnQiOjI4MzQ1MjQ4MTcsInRpbWV6b25lIjoiRXVyb3BlL0xvbmRvbiIsImNyZWF0ZWRfdXRjIjoxNjY1NDcwNjAwLCJhY2Nlc3NfdHlwZSI6Mn0sImV4cCI6MTY2NjM0OTAwMCwiaWF0IjoxNjY2MzQ5MDAwfQ.mz5kFamlFeQv6cT9oCsAvBgfiDaXE-wRJzbqCee76LQ',
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
getItem(key: any) {
|
|
51
|
+
return JSON.stringify(store[key]);
|
|
52
|
+
},
|
|
53
|
+
setItem(key: any, value: any) {
|
|
54
|
+
store[key] = value.toString();
|
|
55
|
+
},
|
|
56
|
+
clear() {
|
|
57
|
+
store = { currentUser: '' };
|
|
58
|
+
},
|
|
59
|
+
removeItem(key: any) {
|
|
60
|
+
delete store[key];
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
})();
|
|
64
|
+
Object.defineProperty(window, 'localStorage', {
|
|
65
|
+
value: localStorageMock,
|
|
66
|
+
});
|
|
67
|
+
fdescribe('CreateDashboardComponent', () => {
|
|
68
|
+
let component: CreateDashboardComponent;
|
|
69
|
+
let fixture: ComponentFixture<CreateDashboardComponent>;
|
|
70
|
+
let service: FeatureFlagService;
|
|
71
|
+
let frequency = [
|
|
72
|
+
{
|
|
73
|
+
frequencyString: 'Every October',
|
|
74
|
+
frequencyType: 'monthly',
|
|
75
|
+
frequencies: [9],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
frequencyString: 'Every Thursday',
|
|
79
|
+
frequencyType: 'weekly',
|
|
80
|
+
frequencies: [3],
|
|
81
|
+
},
|
|
82
|
+
];
|
|
83
|
+
|
|
84
|
+
let widgetsData = [
|
|
85
|
+
{
|
|
86
|
+
title: 'Overview',
|
|
87
|
+
id: 'overview_flag',
|
|
88
|
+
description:
|
|
89
|
+
'Displays all responsibilities that have been assigned to you.',
|
|
90
|
+
widgetImage:
|
|
91
|
+
'https://cdn.v-comply.com/libraries/configure-widget/assets/images/overview.png',
|
|
92
|
+
value: 1,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
title: 'Responsibility Calendar',
|
|
96
|
+
id: 'compliance_calendar_flag',
|
|
97
|
+
description:
|
|
98
|
+
'Displays all responsibilities that are due on a particular day.',
|
|
99
|
+
widgetImage:
|
|
100
|
+
'https://cdn.v-comply.com/libraries/configure-widget/assets/images/responsibility-calender.png',
|
|
101
|
+
value: 1,
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
title: 'Responsibility Center Overview',
|
|
105
|
+
id: 'responsibility_center_overview_flag',
|
|
106
|
+
description:
|
|
107
|
+
'Displays all responsibilities that have been assigned to you.',
|
|
108
|
+
widgetImage:
|
|
109
|
+
'https://cdn.v-comply.com/libraries/configure-widget/assets/images/overview.png',
|
|
110
|
+
value: 1,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
title: 'My Responsibilities',
|
|
114
|
+
id: 'my_responsibilities',
|
|
115
|
+
description:
|
|
116
|
+
'Displays all responsibilities that have been assigned to you.',
|
|
117
|
+
widgetImage:
|
|
118
|
+
'https://cdn.v-comply.com/libraries/configure-widget/assets/images/my-responsibilities.png',
|
|
119
|
+
tabOption: true,
|
|
120
|
+
value: 0,
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
title: 'Key Responsibilities',
|
|
124
|
+
id: 'key_responsibilities',
|
|
125
|
+
description:
|
|
126
|
+
'Displays all responsibilities that are due on a particular day.',
|
|
127
|
+
widgetImage:
|
|
128
|
+
'https://cdn.v-comply.com/libraries/configure-widget/assets/images/key-responsibilities.png',
|
|
129
|
+
tabOption: true,
|
|
130
|
+
value: 0,
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
title: 'Trend Analysis',
|
|
134
|
+
id: 'trend_analysis_flag',
|
|
135
|
+
description:
|
|
136
|
+
'Displays all responsibilities that have been assigned to you.',
|
|
137
|
+
widgetImage:
|
|
138
|
+
'https://cdn.v-comply.com/libraries/configure-widget/assets/images/trend-analysis.png',
|
|
139
|
+
value: 0,
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
title: 'Workroom Updates',
|
|
143
|
+
id: 'workroom_alert_flag',
|
|
144
|
+
description:
|
|
145
|
+
'Displays all responsibilities that have been assigned to you.',
|
|
146
|
+
widgetImage:
|
|
147
|
+
'https://cdn.v-comply.com/libraries/configure-widget/assets/images/workroom-updates.png',
|
|
148
|
+
value: 0,
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
title: 'Recent Activities',
|
|
152
|
+
id: 'recent_activity_flag',
|
|
153
|
+
description:
|
|
154
|
+
'Displays all responsibilities that have been assigned to you.',
|
|
155
|
+
widgetImage:
|
|
156
|
+
'https://cdn.v-comply.com/libraries/configure-widget/assets/images/recent-activities.png',
|
|
157
|
+
value: 0,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
title: 'Exception Summary',
|
|
161
|
+
id: 'exception_summary_flag',
|
|
162
|
+
description:
|
|
163
|
+
'Displays all responsibilities that have been assigned to you.',
|
|
164
|
+
widgetImage:
|
|
165
|
+
'https://cdn.v-comply.com/libraries/configure-widget/assets/images/exception-summary.png',
|
|
166
|
+
value: 0,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
title: 'My Responsibilities',
|
|
170
|
+
id: 'my_responsibility_flag',
|
|
171
|
+
value: 0,
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
title: 'I’m Reviewing',
|
|
175
|
+
id: 'reviewer_responsibility_flag',
|
|
176
|
+
value: 0,
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
title: 'I’m Overseeing',
|
|
180
|
+
id: 'cc_responsibility_flag',
|
|
181
|
+
value: 0,
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
title: 'Overview',
|
|
185
|
+
id: 'key_responsibilities_overview_flag',
|
|
186
|
+
value: 0,
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
title: 'My Responsibilities',
|
|
190
|
+
id: 'key_my_responsibilities_flag',
|
|
191
|
+
value: 0,
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
title: 'I’m Reviewing',
|
|
195
|
+
id: 'key_i_am_reviewing_flag',
|
|
196
|
+
value: 0,
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
title: 'I’m Overseeing',
|
|
200
|
+
id: 'key_i_am_overseeing_flag',
|
|
201
|
+
value: 0,
|
|
202
|
+
},
|
|
203
|
+
];
|
|
204
|
+
let groupsdata = [860, 857];
|
|
205
|
+
let groupslist = [
|
|
206
|
+
{
|
|
207
|
+
old_group_id: 0,
|
|
208
|
+
member_ids: [18282, 18262, 18503, 18521, 17924],
|
|
209
|
+
removed_member_ids: [],
|
|
210
|
+
group_type: 'vcomply',
|
|
211
|
+
state: 1,
|
|
212
|
+
_id: '63807db50067e1000852d62b',
|
|
213
|
+
group_name: 'abc',
|
|
214
|
+
group_description: '',
|
|
215
|
+
roles: [
|
|
216
|
+
{
|
|
217
|
+
_id: '638d923ebb03890008a2c7b9',
|
|
218
|
+
roleId: {
|
|
219
|
+
_id: '6387478a721ddf000839fcda',
|
|
220
|
+
roleName: 'Manage Program Permission Group',
|
|
221
|
+
licenseType: 'power users',
|
|
222
|
+
id: '6387478a721ddf000839fcda',
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
],
|
|
226
|
+
associatedUsers: [
|
|
227
|
+
{
|
|
228
|
+
_id: '638d923ebb03890008a2c7b4',
|
|
229
|
+
userId: {
|
|
230
|
+
profile_pic: '',
|
|
231
|
+
license_type: 'power users',
|
|
232
|
+
_id: '6361fbe19f6cda0008120e49',
|
|
233
|
+
member_name: 'A3',
|
|
234
|
+
member_email: 'a3@fdfd.com',
|
|
235
|
+
member_id: 18282,
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
_id: '638d923ebb03890008a2c7b5',
|
|
240
|
+
userId: {
|
|
241
|
+
profile_pic: '',
|
|
242
|
+
license_type: 'power users',
|
|
243
|
+
_id: '63523a540aa9a200094da903',
|
|
244
|
+
member_name: 'A2',
|
|
245
|
+
member_email: 'a2@fdfd.com',
|
|
246
|
+
member_id: 18262,
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
_id: '638d923ebb03890008a2c7b6',
|
|
251
|
+
userId: {
|
|
252
|
+
profile_pic: '',
|
|
253
|
+
license_type: 'power users',
|
|
254
|
+
_id: '637f59bd9b20b00008e763a3',
|
|
255
|
+
member_name: 'LightUser1',
|
|
256
|
+
member_email: 'light@fdfd.com',
|
|
257
|
+
member_id: 18503,
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
_id: '638d923ebb03890008a2c7b7',
|
|
262
|
+
userId: {
|
|
263
|
+
profile_pic: '',
|
|
264
|
+
license_type: 'power users',
|
|
265
|
+
_id: '6388501a057eaf000886b647',
|
|
266
|
+
member_name: 'A4',
|
|
267
|
+
member_email: 'a4@fdfd.com',
|
|
268
|
+
member_id: 18521,
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
_id: '638d923ebb03890008a2c7b8',
|
|
273
|
+
userId: {
|
|
274
|
+
profile_pic: '',
|
|
275
|
+
license_type: 'power users',
|
|
276
|
+
_id: '623ac9fa46968d0009c8f0ed',
|
|
277
|
+
member_name: 'A1',
|
|
278
|
+
member_email: 'a1@fdfd.com',
|
|
279
|
+
member_id: 17924,
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
],
|
|
283
|
+
organisation_id: 3452,
|
|
284
|
+
created_by: {
|
|
285
|
+
profile_pic: '',
|
|
286
|
+
_id: '623ac7c92498330009104f71',
|
|
287
|
+
member_name: 'D1',
|
|
288
|
+
member_email: 'test@fdfd.com',
|
|
289
|
+
member_id: 17923,
|
|
290
|
+
},
|
|
291
|
+
modified_by: {
|
|
292
|
+
profile_pic: '',
|
|
293
|
+
_id: '623ac7c92498330009104f71',
|
|
294
|
+
member_name: 'D1',
|
|
295
|
+
member_email: 'test@fdfd.com',
|
|
296
|
+
member_id: 17923,
|
|
297
|
+
},
|
|
298
|
+
created_at: 1669365173,
|
|
299
|
+
updated_at: 1670222398,
|
|
300
|
+
member_count: 5,
|
|
301
|
+
group_id: 853,
|
|
302
|
+
__v: 0,
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
old_group_id: 0,
|
|
306
|
+
member_ids: [17924, 18262],
|
|
307
|
+
removed_member_ids: [],
|
|
308
|
+
group_type: 'vcomply',
|
|
309
|
+
state: 1,
|
|
310
|
+
_id: '638b19553d93f900082d5f51',
|
|
311
|
+
group_name: 'check group with reviewer',
|
|
312
|
+
group_description: '',
|
|
313
|
+
roles: [
|
|
314
|
+
{
|
|
315
|
+
_id: '638b19553d93f900082d5f52',
|
|
316
|
+
roleId: {
|
|
317
|
+
_id: '6387478a721ddf000839fcda',
|
|
318
|
+
roleName: 'Manage Program Permission Group',
|
|
319
|
+
licenseType: 'power users',
|
|
320
|
+
id: '6387478a721ddf000839fcda',
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
_id: '638b19553d93f900082d5f53',
|
|
325
|
+
roleId: {
|
|
326
|
+
_id: '623ac7cb249833000910502c',
|
|
327
|
+
roleName: 'Manager',
|
|
328
|
+
licenseType: 'power users',
|
|
329
|
+
id: '623ac7cb249833000910502c',
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
_id: '638b19553d93f900082d5f54',
|
|
334
|
+
roleId: {
|
|
335
|
+
_id: '623ac7cb249833000910506c',
|
|
336
|
+
roleName: 'Admin',
|
|
337
|
+
licenseType: 'power users',
|
|
338
|
+
id: '623ac7cb249833000910506c',
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
],
|
|
342
|
+
associatedUsers: [
|
|
343
|
+
{
|
|
344
|
+
_id: '638b19553d93f900082d5f55',
|
|
345
|
+
userId: {
|
|
346
|
+
profile_pic: '',
|
|
347
|
+
license_type: 'power users',
|
|
348
|
+
_id: '623ac9fa46968d0009c8f0ed',
|
|
349
|
+
member_name: 'A1',
|
|
350
|
+
member_email: 'a1@fdfd.com',
|
|
351
|
+
member_id: 17924,
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
_id: '638b19553d93f900082d5f56',
|
|
356
|
+
userId: {
|
|
357
|
+
profile_pic: '',
|
|
358
|
+
license_type: 'power users',
|
|
359
|
+
_id: '63523a540aa9a200094da903',
|
|
360
|
+
member_name: 'A2',
|
|
361
|
+
member_email: 'a2@fdfd.com',
|
|
362
|
+
member_id: 18262,
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
],
|
|
366
|
+
organisation_id: 3452,
|
|
367
|
+
created_by: {
|
|
368
|
+
profile_pic: '',
|
|
369
|
+
_id: '623ac7c92498330009104f71',
|
|
370
|
+
member_name: 'D1',
|
|
371
|
+
member_email: 'test@fdfd.com',
|
|
372
|
+
member_id: 17923,
|
|
373
|
+
},
|
|
374
|
+
modified_by: {
|
|
375
|
+
profile_pic: '',
|
|
376
|
+
_id: '623ac7c92498330009104f71',
|
|
377
|
+
member_name: 'D1',
|
|
378
|
+
member_email: 'test@fdfd.com',
|
|
379
|
+
member_id: 17923,
|
|
380
|
+
},
|
|
381
|
+
created_at: 1670060373,
|
|
382
|
+
updated_at: 1670060373,
|
|
383
|
+
member_count: 2,
|
|
384
|
+
group_id: 860,
|
|
385
|
+
__v: 0,
|
|
386
|
+
},
|
|
387
|
+
];
|
|
388
|
+
let userlist = [
|
|
389
|
+
{
|
|
390
|
+
_id: '623ac7c92498330009104f71',
|
|
391
|
+
member_id: 17923,
|
|
392
|
+
member_name: 'D1',
|
|
393
|
+
member_email: 'test@fdfd.com',
|
|
394
|
+
member_role: 'Keyadmin',
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
_id: '623ac9fa46968d0009c8f0ed',
|
|
398
|
+
member_id: 17924,
|
|
399
|
+
member_name: 'A1',
|
|
400
|
+
member_email: 'a1@fdfd.com',
|
|
401
|
+
user_id: '623ac9fa46968d0009c8f0ed',
|
|
402
|
+
user_name: 'A1',
|
|
403
|
+
user_email: 'a1@fdfd.com',
|
|
404
|
+
delete_flag: 1,
|
|
405
|
+
status: 'Active',
|
|
406
|
+
organisation_id: 3452,
|
|
407
|
+
permission:
|
|
408
|
+
'{"MEN":1,"MDV":1,"MDP":1,"MCG":1,"MPL":1,"MCC":0,"MCA":1,"MLD":1,"MAP":0,"MST":1,"MSV":1,"MAD":1,"MCO":0,"MLI":1,"MAC":1,"MPO":0,"MLC":1,"MACC":1,"MSC":0,"MQC":1,"MFC":0,"MPC":0,"MSRV":0,"MQZ":1,"MFRM":0,"MPOL":1,"MRISK":0,"MRISKC":0,"MKC":1,"MK":1,"MTC":1,"MTP":1,"ETP":1,"MPOC":1}',
|
|
409
|
+
last_password_updated_utc: '14 Nov 2022',
|
|
410
|
+
read_only_flag: 0,
|
|
411
|
+
profile_pic: '',
|
|
412
|
+
short_name: 'A1',
|
|
413
|
+
employee_id: 2189509,
|
|
414
|
+
employee_group_name: '',
|
|
415
|
+
employee_group_name_arr: [],
|
|
416
|
+
entity_details: '',
|
|
417
|
+
isMember: true,
|
|
418
|
+
compliance_score: '',
|
|
419
|
+
reports: [],
|
|
420
|
+
report_count: 0,
|
|
421
|
+
employee_performance: '0,0,0',
|
|
422
|
+
selected: false,
|
|
423
|
+
member_role: 'Admin',
|
|
424
|
+
is_login: 'ALLOW',
|
|
425
|
+
multiple_oncompletion_enable: 0,
|
|
426
|
+
exceed_user: 0,
|
|
427
|
+
loginEnable: false,
|
|
428
|
+
RTLEnable: false,
|
|
429
|
+
DEnable: false,
|
|
430
|
+
ActivateEnable: false,
|
|
431
|
+
DeleteEnable: false,
|
|
432
|
+
CTMEnable: false,
|
|
433
|
+
CTAEnable: false,
|
|
434
|
+
CTKAEnable: false,
|
|
435
|
+
AddToGroup: false,
|
|
436
|
+
SALEnable: false,
|
|
437
|
+
ATMEnable: false,
|
|
438
|
+
totalReportCount: 27,
|
|
439
|
+
view_details_enable: 1,
|
|
440
|
+
member_role_no: 2,
|
|
441
|
+
MFAEnabled: 0,
|
|
442
|
+
RoleCount: 1,
|
|
443
|
+
GroupCount: 2,
|
|
444
|
+
license_type: 'power users',
|
|
445
|
+
GroupDetails: ['abc', 'check group with reviewer'],
|
|
446
|
+
RolesDetails: ['Admin', 'Manage Program Permission Group', 'Manager'],
|
|
447
|
+
isFaceIdEnabled: false,
|
|
448
|
+
inProgress: '',
|
|
449
|
+
},
|
|
450
|
+
];
|
|
451
|
+
let mockCreateDashboardService: CreateDashboardService;
|
|
452
|
+
let mockPaginationService: any;
|
|
453
|
+
let mockDialogRef: any;
|
|
454
|
+
|
|
455
|
+
beforeEach(async () => {
|
|
456
|
+
mockCreateDashboardService = jasmine.createSpyObj([
|
|
457
|
+
'getOrganizationUsersCount',
|
|
458
|
+
'getOrganizationUsers',
|
|
459
|
+
'getCategoryList',
|
|
460
|
+
'getResponsibilityCenterList',
|
|
461
|
+
'getAllGroups',
|
|
462
|
+
'organizationGet',
|
|
463
|
+
]);
|
|
464
|
+
|
|
465
|
+
mockPaginationService = jasmine.createSpyObj([
|
|
466
|
+
'currentPage',
|
|
467
|
+
'searchValue',
|
|
468
|
+
]);
|
|
469
|
+
// mockDialogRef = jasmine.createSpyObj([]);
|
|
470
|
+
|
|
471
|
+
await TestBed.configureTestingModule({
|
|
472
|
+
declarations: [
|
|
473
|
+
CreateDashboardComponent,
|
|
474
|
+
UserListComponent,
|
|
475
|
+
FormGroupComponent,
|
|
476
|
+
ResponsibilityCenterComponent,
|
|
477
|
+
CategoriesComponent,
|
|
478
|
+
RiskCategoriesComponent,
|
|
479
|
+
FrequencyComponent,
|
|
480
|
+
FilterPipe,
|
|
481
|
+
TextCountPipe,
|
|
482
|
+
],
|
|
483
|
+
imports: [
|
|
484
|
+
HttpClientModule,
|
|
485
|
+
CommonModule,
|
|
486
|
+
MarxEditorModule,
|
|
487
|
+
FormgroupModule,
|
|
488
|
+
DpDatePickerModule,
|
|
489
|
+
FormsModule,
|
|
490
|
+
TooltipModule,
|
|
491
|
+
SelectModule,
|
|
492
|
+
DashboardFooterModule,
|
|
493
|
+
PaginationModule,
|
|
494
|
+
FloatingBarModule,
|
|
495
|
+
DialogModule,
|
|
496
|
+
ConfigureWidgetsModule,
|
|
497
|
+
HttpClientTestingModule,
|
|
498
|
+
],
|
|
499
|
+
providers: [
|
|
500
|
+
CreateDashboardService,
|
|
501
|
+
{ provide: PaginationService, useValue: mockPaginationService },
|
|
502
|
+
{ provide: DialogRef, useValue: mockDialogRef },
|
|
503
|
+
{
|
|
504
|
+
provide: FeatureFlagService,
|
|
505
|
+
useValue: {
|
|
506
|
+
isFeatureEnabled: () =>
|
|
507
|
+
of({
|
|
508
|
+
ff_groups_improvements: {
|
|
509
|
+
enabled: true,
|
|
510
|
+
},
|
|
511
|
+
}),
|
|
512
|
+
},
|
|
513
|
+
},
|
|
514
|
+
{ provide: Configurations, useValue: { envConfig: { dashboard: '' } } },
|
|
515
|
+
// CreateDashboardService,
|
|
516
|
+
// PaginationService
|
|
517
|
+
],
|
|
518
|
+
schemas: [NO_ERRORS_SCHEMA],
|
|
519
|
+
}).compileComponents();
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
beforeEach(() => {
|
|
523
|
+
fixture = TestBed.createComponent(CreateDashboardComponent);
|
|
524
|
+
component = fixture.componentInstance;
|
|
525
|
+
component.groupList = [];
|
|
526
|
+
fixture.detectChanges();
|
|
527
|
+
});
|
|
528
|
+
|
|
529
|
+
it('should create', () => {
|
|
530
|
+
expect(component).toBeTruthy();
|
|
531
|
+
});
|
|
532
|
+
|
|
533
|
+
it('activate Selector function for true', () => {
|
|
534
|
+
component.activateSelector('rcList', true);
|
|
535
|
+
expect(component.activeSelector).toBe('rcList');
|
|
536
|
+
});
|
|
537
|
+
|
|
538
|
+
it('activate Selector function for false', () => {
|
|
539
|
+
component.activateSelector('rcList', false);
|
|
540
|
+
expect(component.activeSelector).toBe('');
|
|
541
|
+
});
|
|
542
|
+
|
|
543
|
+
it('open From Date Picker function', () => {
|
|
544
|
+
component.openFromDatePicker();
|
|
545
|
+
expect(component.datePickerOverlay).toBeTruthy();
|
|
546
|
+
});
|
|
547
|
+
|
|
548
|
+
it('open To Date Picker function', () => {
|
|
549
|
+
component.openToDatePicker();
|
|
550
|
+
expect(component.datePickerOverlay).toBeTruthy();
|
|
551
|
+
});
|
|
552
|
+
|
|
553
|
+
// it('close From Date Picker function', () => {
|
|
554
|
+
// component.closeFromDatePicker();
|
|
555
|
+
// expect(component.datePickerOverlay).toBeFalsy();
|
|
556
|
+
// });
|
|
557
|
+
|
|
558
|
+
it('close To Date Picker function', () => {
|
|
559
|
+
component.closeToDatePicker();
|
|
560
|
+
expect(component.datePickerOverlay).toBeFalsy();
|
|
561
|
+
});
|
|
562
|
+
|
|
563
|
+
it('save Frequency function', () => {
|
|
564
|
+
component.saveFrequency(frequency[0]);
|
|
565
|
+
expect(component.dashboardForm.selectedFrequencyType).toBe(
|
|
566
|
+
frequency[0].frequencyType
|
|
567
|
+
);
|
|
568
|
+
expect(component.dashboardForm.selectedFrequencies).toBe(
|
|
569
|
+
frequency[0].frequencies
|
|
570
|
+
);
|
|
571
|
+
expect(component.dashboardForm.frequencyMessage).toBe(
|
|
572
|
+
frequency[0].frequencyString
|
|
573
|
+
);
|
|
574
|
+
});
|
|
575
|
+
|
|
576
|
+
// it('Check configure Dashboard open', () => {
|
|
577
|
+
// component.dashboardForm.dashboardName = 'test';
|
|
578
|
+
// component.configureDashboard();
|
|
579
|
+
// expect(component.openConfigureWidgets).toBeTruthy();
|
|
580
|
+
// });
|
|
581
|
+
|
|
582
|
+
// it('widgets Data Modified', () => {
|
|
583
|
+
// component.widgetsDataModified(widgetsData);
|
|
584
|
+
// expect(widgetsData).toBe(component.dashboardForm.configureWidget);
|
|
585
|
+
// expect(component.openConfigureWidgets).toBeFalsy();
|
|
586
|
+
// });
|
|
587
|
+
|
|
588
|
+
it('close Configure Widgets', () => {
|
|
589
|
+
component.closeConfigureWidgets(false);
|
|
590
|
+
expect(component.openConfigureWidgets).toBeFalsy();
|
|
591
|
+
});
|
|
592
|
+
|
|
593
|
+
it('verify fields should return false if dashboard description is more than 250 char', () => {
|
|
594
|
+
component.dashboardForm.dashboardName = 'test';
|
|
595
|
+
component.dashboardForm.dashboardDescriptionText = new Array(252).join('x');
|
|
596
|
+
let status = component.validateDashboard();
|
|
597
|
+
expect(status).toBeFalse();
|
|
598
|
+
// expect(component.dashboardDescriptionError).toEqual(component.fieldLimitExceededErrorMessage.replace('XYZ', '250'));
|
|
599
|
+
});
|
|
600
|
+
|
|
601
|
+
it('should clear To Date if a later From Date is chosen', () => {
|
|
602
|
+
component.dashboardForm.selectedFromDate = dayjs(
|
|
603
|
+
'12-26-2021',
|
|
604
|
+
'MM-DD-YYYY'
|
|
605
|
+
);
|
|
606
|
+
component.dashboardForm.selectedToDate = dayjs('12-25-2021', 'MM-DD-YYYY');
|
|
607
|
+
component.closeFromDatePicker();
|
|
608
|
+
expect(component.dashboardForm.selectedToDate).toBeUndefined();
|
|
609
|
+
});
|
|
610
|
+
|
|
611
|
+
it('should set Frequency value', () => {
|
|
612
|
+
component.setFrequency('3~1~1,2~0', 'import');
|
|
613
|
+
fixture.detectChanges();
|
|
614
|
+
expect(component.dashboardForm.frequencyMessage).toEqual(
|
|
615
|
+
'1st of every January, February'
|
|
616
|
+
);
|
|
617
|
+
});
|
|
618
|
+
it('should save the group values to dashboard form', () => {
|
|
619
|
+
component.uniqueByProp(groupslist, 'group_id');
|
|
620
|
+
component.saveSelectedList('whoCanView', {
|
|
621
|
+
users: userlist,
|
|
622
|
+
groups: groupslist,
|
|
623
|
+
});
|
|
624
|
+
fixture.detectChanges();
|
|
625
|
+
expect(groupslist).toEqual(component.dashboardForm.selectedGroup);
|
|
626
|
+
});
|
|
627
|
+
it('should remove the group values from dashboard form', () => {
|
|
628
|
+
let removegroup = {
|
|
629
|
+
old_group_id: 0,
|
|
630
|
+
member_ids: [18282, 18262, 18503, 18521, 17924],
|
|
631
|
+
removed_member_ids: [],
|
|
632
|
+
group_type: 'vcomply',
|
|
633
|
+
state: 1,
|
|
634
|
+
_id: '63807db50067e1000852d62b',
|
|
635
|
+
group_name: 'abc',
|
|
636
|
+
group_description: '',
|
|
637
|
+
roles: [
|
|
638
|
+
{
|
|
639
|
+
_id: '638d923ebb03890008a2c7b9',
|
|
640
|
+
roleId: {
|
|
641
|
+
_id: '6387478a721ddf000839fcda',
|
|
642
|
+
roleName: 'Manage Program Permission Group',
|
|
643
|
+
licenseType: 'power users',
|
|
644
|
+
id: '6387478a721ddf000839fcda',
|
|
645
|
+
},
|
|
646
|
+
},
|
|
647
|
+
],
|
|
648
|
+
associatedUsers: [
|
|
649
|
+
{
|
|
650
|
+
_id: '638d923ebb03890008a2c7b4',
|
|
651
|
+
userId: {
|
|
652
|
+
profile_pic: '',
|
|
653
|
+
license_type: 'power users',
|
|
654
|
+
_id: '6361fbe19f6cda0008120e49',
|
|
655
|
+
member_name: 'A3',
|
|
656
|
+
member_email: 'a3@fdfd.com',
|
|
657
|
+
member_id: 18282,
|
|
658
|
+
},
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
_id: '638d923ebb03890008a2c7b5',
|
|
662
|
+
userId: {
|
|
663
|
+
profile_pic: '',
|
|
664
|
+
license_type: 'power users',
|
|
665
|
+
_id: '63523a540aa9a200094da903',
|
|
666
|
+
member_name: 'A2',
|
|
667
|
+
member_email: 'a2@fdfd.com',
|
|
668
|
+
member_id: 18262,
|
|
669
|
+
},
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
_id: '638d923ebb03890008a2c7b6',
|
|
673
|
+
userId: {
|
|
674
|
+
profile_pic: '',
|
|
675
|
+
license_type: 'power users',
|
|
676
|
+
_id: '637f59bd9b20b00008e763a3',
|
|
677
|
+
member_name: 'LightUser1',
|
|
678
|
+
member_email: 'light@fdfd.com',
|
|
679
|
+
member_id: 18503,
|
|
680
|
+
},
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
_id: '638d923ebb03890008a2c7b7',
|
|
684
|
+
userId: {
|
|
685
|
+
profile_pic: '',
|
|
686
|
+
license_type: 'power users',
|
|
687
|
+
_id: '6388501a057eaf000886b647',
|
|
688
|
+
member_name: 'A4',
|
|
689
|
+
member_email: 'a4@fdfd.com',
|
|
690
|
+
member_id: 18521,
|
|
691
|
+
},
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
_id: '638d923ebb03890008a2c7b8',
|
|
695
|
+
userId: {
|
|
696
|
+
profile_pic: '',
|
|
697
|
+
license_type: 'power users',
|
|
698
|
+
_id: '623ac9fa46968d0009c8f0ed',
|
|
699
|
+
member_name: 'A1',
|
|
700
|
+
member_email: 'a1@fdfd.com',
|
|
701
|
+
member_id: 17924,
|
|
702
|
+
},
|
|
703
|
+
},
|
|
704
|
+
],
|
|
705
|
+
organisation_id: 3452,
|
|
706
|
+
created_by: {
|
|
707
|
+
profile_pic: '',
|
|
708
|
+
_id: '623ac7c92498330009104f71',
|
|
709
|
+
member_name: 'D1',
|
|
710
|
+
member_email: 'test@fdfd.com',
|
|
711
|
+
member_id: 17923,
|
|
712
|
+
},
|
|
713
|
+
modified_by: {
|
|
714
|
+
profile_pic: '',
|
|
715
|
+
_id: '623ac7c92498330009104f71',
|
|
716
|
+
member_name: 'D1',
|
|
717
|
+
member_email: 'test@fdfd.com',
|
|
718
|
+
member_id: 17923,
|
|
719
|
+
},
|
|
720
|
+
created_at: 1669365173,
|
|
721
|
+
updated_at: 1670222398,
|
|
722
|
+
member_count: 5,
|
|
723
|
+
group_id: 853,
|
|
724
|
+
__v: 0,
|
|
725
|
+
};
|
|
726
|
+
component.remove('whoCanView', removegroup);
|
|
727
|
+
fixture.detectChanges();
|
|
728
|
+
expect(component.dashboardForm.selectedGroup).toEqual([]);
|
|
729
|
+
});
|
|
730
|
+
it('only the user list in who can view this dashboard with feature flag as false', () => {
|
|
731
|
+
component.groupsEnabled = false;
|
|
732
|
+
component.dashboardForm.selectedViewers = userlist;
|
|
733
|
+
const user = component.dashboardForm.selectedViewers;
|
|
734
|
+
fixture.detectChanges();
|
|
735
|
+
const value = fixture.debugElement.query(By.css('#onlyuserslist'));
|
|
736
|
+
expect(user[0].member_name).toEqual('D1');
|
|
737
|
+
});
|
|
738
|
+
it(' the groups in who can view this dashboard with feature flag as true', () => {
|
|
739
|
+
component.groupsEnabled = true;
|
|
740
|
+
component.dashboardForm.selectedGroup = groupslist;
|
|
741
|
+
const groups = component.dashboardForm.selectedGroup;
|
|
742
|
+
fixture.detectChanges();
|
|
743
|
+
const value = fixture.debugElement.query(By.css('#usersandgroups'));
|
|
744
|
+
expect(groups.length).toEqual(2);
|
|
745
|
+
});
|
|
746
|
+
fit('edit form for populate dashboaard', () => {
|
|
747
|
+
component.dashboardId = '637c89bd84fe1a0008aad043';
|
|
748
|
+
component.mode = 'EDIT';
|
|
749
|
+
component.usersList = userlist;
|
|
750
|
+
component.groupList = [];
|
|
751
|
+
fixture.detectChanges();
|
|
752
|
+
const data = editdata;
|
|
753
|
+
expect(component.populateDashboardForm(data)).toBeTruthy();
|
|
754
|
+
});
|
|
755
|
+
});
|