vc-create-dashboard 3.0.83 → 3.0.84
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 +24 -24
- 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 +150 -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 +220 -0
- package/src/lib/create-dashboard-container/configure-widgets/configure-widgets/configure-widgets.component.html +141 -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 +392 -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 +30 -0
- package/src/lib/create-dashboard-container/constants/assets.constant.ts +37 -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 +660 -0
- package/src/lib/create-dashboard-container/create-dashboard.component.less +1579 -0
- package/src/lib/create-dashboard-container/create-dashboard.component.ts +1886 -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 +288 -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 +163 -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} +8 -8
- package/src/lib/create-dashboard-container/pipes/filter.pipe.ts +25 -0
- package/src/lib/create-dashboard-container/pipes/search-program.pipe.ts +31 -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 +14 -0
- package/src/lib/create-dashboard-container/program-list/constant.ts +36 -0
- package/src/lib/create-dashboard-container/program-list/information-block/information-block.component.html +9 -0
- package/src/lib/create-dashboard-container/program-list/information-block/information-block.component.less +63 -0
- package/src/lib/create-dashboard-container/program-list/information-block/information-block.component.ts +15 -0
- package/src/lib/create-dashboard-container/program-list/interfaces/data-source.interface.ts +6 -0
- package/src/lib/create-dashboard-container/program-list/interfaces/list-item.interface.ts +8 -0
- package/src/lib/create-dashboard-container/program-list/interfaces/selection-predicate.interface.ts +4 -0
- package/src/lib/create-dashboard-container/program-list/list-container/list-container.component.less +57 -0
- package/src/lib/create-dashboard-container/program-list/list-container/list-container.component.ts +30 -0
- package/src/lib/create-dashboard-container/program-list/pipes/check-selected-items.pipes.ts +19 -0
- package/src/lib/create-dashboard-container/program-list/program-list/program-list.component.html +158 -0
- package/src/lib/create-dashboard-container/program-list/program-list/program-list.component.less +679 -0
- package/src/lib/create-dashboard-container/program-list/program-list/program-list.component.ts +342 -0
- package/src/lib/create-dashboard-container/program-list/program-list.module.ts +36 -0
- package/src/lib/create-dashboard-container/program-list/services/list-utils.service.ts +22 -0
- package/src/lib/create-dashboard-container/program-list/services/program-list-api.service.ts +24 -0
- package/src/lib/create-dashboard-container/responsibility-center/responsibility-center.component.html +70 -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 +154 -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 +152 -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 +209 -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 +235 -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 +287 -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/services/urlConfig.service.ts +21 -0
- package/src/lib/create-dashboard-container/user-list/user-list.component.html +358 -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 +472 -0
- package/{lib/create-dashboard-container/user-list/user-list.config.d.ts → src/lib/create-dashboard-container/user-list/user-list.config.ts} +13 -13
- package/src/lib/create-dashboard-container/utils/dashboard-edit.utils.ts +235 -0
- 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 +25 -0
- package/src/lib/ui-kit/action-dialog/active/active.component.less +168 -0
- package/src/lib/ui-kit/action-dialog/active/active.component.ts +31 -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 +25 -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 +29 -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 +112 -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/loaders/loaders.module.ts +18 -0
- package/src/lib/ui-kit/loaders/table-loader/table-loader.component.html +17 -0
- package/src/lib/ui-kit/loaders/table-loader/table-loader.component.less +136 -0
- package/src/lib/ui-kit/loaders/table-loader/table-loader.component.ts +17 -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 +367 -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 +141 -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 +86 -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 +127 -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 +36 -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 +98 -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 +126 -0
- package/src/lib/ui-kit/time-filter/time-filter.component.less +482 -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 +150 -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 -212
- package/esm2022/lib/create-dashboard-container/configure-widgets/configure-widgets/configure-widgets.component.mjs +0 -350
- 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 -47
- package/esm2022/lib/create-dashboard-container/constants/assets.constant.mjs +0 -37
- package/esm2022/lib/create-dashboard-container/create-dashboard-config.mjs +0 -2
- package/esm2022/lib/create-dashboard-container/create-dashboard.component.mjs +0 -1520
- package/esm2022/lib/create-dashboard-container/create-dashboard.module.mjs +0 -127
- 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 -153
- 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-program.pipe.mjs +0 -37
- 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/program-list/constant.mjs +0 -31
- package/esm2022/lib/create-dashboard-container/program-list/information-block/information-block.component.mjs +0 -13
- package/esm2022/lib/create-dashboard-container/program-list/interfaces/list-item.interface.mjs +0 -2
- package/esm2022/lib/create-dashboard-container/program-list/list-container/list-container.component.mjs +0 -50
- package/esm2022/lib/create-dashboard-container/program-list/pipes/check-selected-items.pipes.mjs +0 -23
- package/esm2022/lib/create-dashboard-container/program-list/program-list/program-list.component.mjs +0 -294
- package/esm2022/lib/create-dashboard-container/program-list/program-list.module.mjs +0 -60
- package/esm2022/lib/create-dashboard-container/program-list/services/list-utils.service.mjs +0 -27
- package/esm2022/lib/create-dashboard-container/program-list/services/program-list-api.service.mjs +0 -35
- package/esm2022/lib/create-dashboard-container/responsibility-center/responsibility-center.component.mjs +0 -149
- 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 -206
- package/esm2022/lib/create-dashboard-container/services/auth.service.mjs +0 -31
- package/esm2022/lib/create-dashboard-container/services/configure-widgets.service.mjs +0 -238
- package/esm2022/lib/create-dashboard-container/services/create-dashboard.service.mjs +0 -243
- 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 -440
- package/esm2022/lib/create-dashboard-container/user-list/user-list.config.mjs +0 -2
- package/esm2022/lib/create-dashboard-container/utils/dashboard-edit.utils.mjs +0 -181
- 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/loaders/loaders.module.mjs +0 -24
- package/esm2022/lib/ui-kit/loaders/table-loader/table-loader.component.mjs +0 -18
- 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 -129
- 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 -107
- 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 -168
- package/esm2022/lib/ui-kit/tooltip/tooltip.module.mjs +0 -18
- package/esm2022/lib/ui-kit/v-loader/loader/loader.component.mjs +0 -24
- package/esm2022/lib/ui-kit/v-loader/loader-inline/loader-inline.component.mjs +0 -24
- 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 -6511
- 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 -66
- package/lib/create-dashboard-container/configure-widgets/configure-widgets/configure-widgets.component.d.ts +0 -113
- 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/constants/assets.constant.d.ts +0 -35
- package/lib/create-dashboard-container/create-dashboard-config.d.ts +0 -18
- package/lib/create-dashboard-container/create-dashboard.component.d.ts +0 -216
- package/lib/create-dashboard-container/create-dashboard.module.d.ts +0 -37
- 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 -48
- 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-program.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/program-list/constant.d.ts +0 -24
- package/lib/create-dashboard-container/program-list/information-block/information-block.component.d.ts +0 -6
- package/lib/create-dashboard-container/program-list/interfaces/list-item.interface.d.ts +0 -5
- package/lib/create-dashboard-container/program-list/list-container/list-container.component.d.ts +0 -9
- package/lib/create-dashboard-container/program-list/pipes/check-selected-items.pipes.d.ts +0 -7
- package/lib/create-dashboard-container/program-list/program-list/program-list.component.d.ts +0 -119
- package/lib/create-dashboard-container/program-list/program-list.module.d.ts +0 -17
- package/lib/create-dashboard-container/program-list/services/list-utils.service.d.ts +0 -7
- package/lib/create-dashboard-container/program-list/services/program-list-api.service.d.ts +0 -14
- package/lib/create-dashboard-container/responsibility-center/responsibility-center.component.d.ts +0 -62
- 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 -66
- package/lib/create-dashboard-container/services/auth.service.d.ts +0 -11
- package/lib/create-dashboard-container/services/configure-widgets.service.d.ts +0 -23
- package/lib/create-dashboard-container/services/create-dashboard.service.d.ts +0 -82
- 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 -123
- package/lib/create-dashboard-container/utils/dashboard-edit.utils.d.ts +0 -16
- 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/loaders/loaders.module.d.ts +0 -8
- package/lib/ui-kit/loaders/table-loader/table-loader.component.d.ts +0 -9
- 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 -28
- 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,472 @@
|
|
|
1
|
+
import { HttpParams } from '@angular/common/http';
|
|
2
|
+
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
3
|
+
import { DashboardFooterConfig } from '../../ui-kit/dashboard-footer/dashboard-footer-config';
|
|
4
|
+
import { CreateDashboardService } from '../services/create-dashboard.service';
|
|
5
|
+
import { PaginationService } from '../services/pagination.service';
|
|
6
|
+
import { UserListConfiguration } from './user-list.config';
|
|
7
|
+
import { ASSETS } from '../constants/assets.constant';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'app-user-list',
|
|
11
|
+
templateUrl: './user-list.component.html',
|
|
12
|
+
styleUrls: ['./user-list.component.less'],
|
|
13
|
+
})
|
|
14
|
+
export class UserListComponent implements OnInit {
|
|
15
|
+
@Output() closeUserList = new EventEmitter();
|
|
16
|
+
@Output() saveSelectedUsers = new EventEmitter();
|
|
17
|
+
@Input() selectionType = '';
|
|
18
|
+
@Input() listDetails: UserListConfiguration = {
|
|
19
|
+
displayElementKey: '',
|
|
20
|
+
displayGroupKey: '',
|
|
21
|
+
groupIdkey: '',
|
|
22
|
+
elementIdKey: '',
|
|
23
|
+
tooltipKey: '',
|
|
24
|
+
selectedUsersList: [],
|
|
25
|
+
selectedGroupList: [],
|
|
26
|
+
nonRemovableUsersList: [],
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
footerDetails: DashboardFooterConfig = {
|
|
30
|
+
selectedData: [],
|
|
31
|
+
nonRemovableList: [],
|
|
32
|
+
displayElementKey: '',
|
|
33
|
+
elementId: '',
|
|
34
|
+
singularText: 'User selected',
|
|
35
|
+
pluralText: 'Users selected',
|
|
36
|
+
showFrequency: false,
|
|
37
|
+
frequencyText: '',
|
|
38
|
+
isDisabled: false,
|
|
39
|
+
};
|
|
40
|
+
vLoader = false;
|
|
41
|
+
vLoaderGroups = false;
|
|
42
|
+
ASSETS = ASSETS;
|
|
43
|
+
|
|
44
|
+
@Input() totalPages = 1;
|
|
45
|
+
@Input() limit = 1;
|
|
46
|
+
@Input() totalList = 1;
|
|
47
|
+
@Input() feature: any;
|
|
48
|
+
@Input() totalgroupscount: any;
|
|
49
|
+
searchList = [];
|
|
50
|
+
searchValue = '';
|
|
51
|
+
searchFilter = '';
|
|
52
|
+
selectedIds: any[] = [];
|
|
53
|
+
selectedList: any[] = [];
|
|
54
|
+
groupdata: any[] = [];
|
|
55
|
+
|
|
56
|
+
animation = true;
|
|
57
|
+
totalgroups: any;
|
|
58
|
+
total_group_pages: any;
|
|
59
|
+
selectedGroupIds: any[] = [];
|
|
60
|
+
groupsEnabled: any;
|
|
61
|
+
selectedgroupList: any[] = [];
|
|
62
|
+
currentPage = 1;
|
|
63
|
+
constructor(
|
|
64
|
+
public paginationService: PaginationService,
|
|
65
|
+
private dashboardService: CreateDashboardService
|
|
66
|
+
) {
|
|
67
|
+
this.paginationService.reset();
|
|
68
|
+
this.getOrganizationUsersCount('');
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
ngOnChanges() {}
|
|
72
|
+
|
|
73
|
+
ngOnInit(): void {
|
|
74
|
+
this.groupsEnabled = true;
|
|
75
|
+
this.animation = true;
|
|
76
|
+
setTimeout(() => {
|
|
77
|
+
this.animation = false;
|
|
78
|
+
}, 300);
|
|
79
|
+
if (this.listDetails.selectedUsersList.length > 0) {
|
|
80
|
+
this.selectedList = [...new Set(this.listDetails.selectedUsersList)];
|
|
81
|
+
const selectedData = [...new Set(this.listDetails.selectedUsersList)];
|
|
82
|
+
this.footerDetails.selectedData = selectedData;
|
|
83
|
+
this.footerDetails.nonRemovableList =
|
|
84
|
+
this.listDetails.nonRemovableUsersList;
|
|
85
|
+
this.selectedIds = selectedData.map((ele: any) => {
|
|
86
|
+
if (ele[this.listDetails.elementIdKey]) {
|
|
87
|
+
return ele[this.listDetails.elementIdKey];
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
this.getUsersList({
|
|
92
|
+
// p: this.paginationService.currentPage === 1 ? '' : this.paginationService.currentPage,
|
|
93
|
+
p: this.paginationService.currentPage ?? 1,
|
|
94
|
+
type: '',
|
|
95
|
+
});
|
|
96
|
+
this.footerDetails.displayElementKey = this.listDetails.displayElementKey;
|
|
97
|
+
this.footerDetails.elementId = this.listDetails.elementIdKey;
|
|
98
|
+
if (this.groupsEnabled) {
|
|
99
|
+
this.getGroupsList({});
|
|
100
|
+
}
|
|
101
|
+
if (this.listDetails.selectedGroupList.length > 0) {
|
|
102
|
+
this.selectedgroupList = [...new Set(this.listDetails.selectedGroupList)];
|
|
103
|
+
const selectedData = [...new Set(this.listDetails.selectedGroupList)];
|
|
104
|
+
this.footerDetails.selectedData = selectedData;
|
|
105
|
+
this.footerDetails.nonRemovableList =
|
|
106
|
+
this.listDetails.nonRemovableUsersList;
|
|
107
|
+
this.selectedGroupIds = selectedData.map((ele: any) => {
|
|
108
|
+
if (ele[this.listDetails.groupIdkey]) {
|
|
109
|
+
return ele[this.listDetails.groupIdkey];
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
cancelChanges() {}
|
|
116
|
+
removeElement(event: any) {}
|
|
117
|
+
submitChanges() {}
|
|
118
|
+
selectAll(event: any) {
|
|
119
|
+
if (event) {
|
|
120
|
+
this.searchList.forEach((searchElement) => {
|
|
121
|
+
if (
|
|
122
|
+
!this.selectedIds.includes(
|
|
123
|
+
searchElement[this.listDetails.elementIdKey]
|
|
124
|
+
)
|
|
125
|
+
) {
|
|
126
|
+
this.selectedList.push(searchElement);
|
|
127
|
+
this.selectedIds.push(searchElement[this.listDetails.elementIdKey]);
|
|
128
|
+
this.footerDetails.selectedData = this.selectedList;
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
} else {
|
|
132
|
+
this.searchList.forEach((searchElement) => {
|
|
133
|
+
if (
|
|
134
|
+
!this.listDetails.nonRemovableUsersList.includes(
|
|
135
|
+
searchElement[this.listDetails.elementIdKey]
|
|
136
|
+
)
|
|
137
|
+
) {
|
|
138
|
+
const index = this.selectedList.findIndex(
|
|
139
|
+
(ele) =>
|
|
140
|
+
ele[this.listDetails.elementIdKey] ===
|
|
141
|
+
searchElement[this.listDetails.elementIdKey]
|
|
142
|
+
);
|
|
143
|
+
this.selectedList.splice(index, 1);
|
|
144
|
+
const filteredList = [...this.selectedList];
|
|
145
|
+
this.footerDetails.selectedData = this.selectedList;
|
|
146
|
+
|
|
147
|
+
const idIndex = this.selectedIds.findIndex(
|
|
148
|
+
(ele) => ele === searchElement[this.listDetails.elementIdKey]
|
|
149
|
+
);
|
|
150
|
+
this.selectedIds.splice(idIndex, 1);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Selects all admins and managers at once by making api call.
|
|
158
|
+
* @param event consists boolean value to select of unselect.
|
|
159
|
+
*/
|
|
160
|
+
selectAllUsers(event: any) {
|
|
161
|
+
if (event) {
|
|
162
|
+
this.vLoader = true;
|
|
163
|
+
this.dashboardService.getAllUsers().subscribe((res: any) => {
|
|
164
|
+
if (res.length > 1) {
|
|
165
|
+
res.forEach((searchElement: any) => {
|
|
166
|
+
if (
|
|
167
|
+
!this.selectedIds.includes(
|
|
168
|
+
searchElement[this.listDetails.elementIdKey]
|
|
169
|
+
)
|
|
170
|
+
) {
|
|
171
|
+
this.selectedList.push(searchElement);
|
|
172
|
+
this.selectedIds.push(
|
|
173
|
+
searchElement[this.listDetails.elementIdKey]
|
|
174
|
+
);
|
|
175
|
+
this.footerDetails.selectedData = this.selectedList;
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
this.vLoader = false;
|
|
180
|
+
});
|
|
181
|
+
} else {
|
|
182
|
+
const selectedData = [...new Set(this.selectedList)];
|
|
183
|
+
const index = selectedData.findIndex(
|
|
184
|
+
(ele) =>
|
|
185
|
+
ele[this.listDetails.elementIdKey] ===
|
|
186
|
+
this.listDetails.nonRemovableUsersList[0]
|
|
187
|
+
);
|
|
188
|
+
if (index != -1) {
|
|
189
|
+
const owner = Object.assign(selectedData[index]);
|
|
190
|
+
|
|
191
|
+
this.selectedList = [];
|
|
192
|
+
this.selectedIds = [];
|
|
193
|
+
this.footerDetails.selectedData = [];
|
|
194
|
+
|
|
195
|
+
this.selectedList.push(owner);
|
|
196
|
+
this.selectedIds.push(owner.member_id);
|
|
197
|
+
this.footerDetails.selectedData = this.selectedList;
|
|
198
|
+
} else {
|
|
199
|
+
this.selectedList = [];
|
|
200
|
+
this.selectedIds = [];
|
|
201
|
+
this.footerDetails.selectedData = [];
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
selectAllGroups(event: any) {
|
|
207
|
+
let params = new HttpParams();
|
|
208
|
+
params = params.append('fetch_all', 1);
|
|
209
|
+
if (event) {
|
|
210
|
+
this.vLoaderGroups = true;
|
|
211
|
+
this.dashboardService.getAllGroups(params).subscribe((res: any) => {
|
|
212
|
+
if (res.data.length > 1) {
|
|
213
|
+
res.data.forEach((searchElement: any) => {
|
|
214
|
+
if (
|
|
215
|
+
!this.selectedGroupIds.includes(
|
|
216
|
+
searchElement[this.listDetails.groupIdkey]
|
|
217
|
+
)
|
|
218
|
+
) {
|
|
219
|
+
this.selectedgroupList.push(searchElement);
|
|
220
|
+
this.selectedGroupIds.push(
|
|
221
|
+
searchElement[this.listDetails.groupIdkey]
|
|
222
|
+
);
|
|
223
|
+
this.footerDetails.selectedData = this.selectedgroupList;
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
this.vLoaderGroups = false;
|
|
228
|
+
});
|
|
229
|
+
} else {
|
|
230
|
+
this.selectedgroupList = [];
|
|
231
|
+
this.selectedGroupIds = [];
|
|
232
|
+
this.footerDetails.selectedData = [];
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
selectAllsearchgroups(event: any) {
|
|
237
|
+
if (event) {
|
|
238
|
+
this.groupdata.forEach((searchElement) => {
|
|
239
|
+
if (
|
|
240
|
+
!this.selectedGroupIds.includes(
|
|
241
|
+
searchElement[this.listDetails.groupIdkey]
|
|
242
|
+
)
|
|
243
|
+
) {
|
|
244
|
+
this.selectedgroupList.push(searchElement);
|
|
245
|
+
this.selectedGroupIds.push(
|
|
246
|
+
searchElement[this.listDetails.groupIdkey]
|
|
247
|
+
);
|
|
248
|
+
this.footerDetails.selectedData = this.selectedgroupList;
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
} else {
|
|
252
|
+
this.selectedgroupList = [];
|
|
253
|
+
this.selectedGroupIds = [];
|
|
254
|
+
this.footerDetails.selectedData = [];
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Selects checked item from the list.
|
|
260
|
+
* In case of user's list calculates number of admins/manages to set visibility(either to all admins/ admins and managers)
|
|
261
|
+
* @param data is the selected element
|
|
262
|
+
*/
|
|
263
|
+
selectElement(data: any) {
|
|
264
|
+
if (this.selectedIds.includes(data[this.listDetails.elementIdKey])) {
|
|
265
|
+
if (
|
|
266
|
+
!this.listDetails.nonRemovableUsersList.includes(
|
|
267
|
+
data[this.listDetails.elementIdKey]
|
|
268
|
+
)
|
|
269
|
+
) {
|
|
270
|
+
const index = this.selectedList.findIndex(
|
|
271
|
+
(ele) =>
|
|
272
|
+
ele[this.listDetails.elementIdKey] ===
|
|
273
|
+
data[this.listDetails.elementIdKey]
|
|
274
|
+
);
|
|
275
|
+
this.selectedList.splice(index, 1);
|
|
276
|
+
this.footerDetails.selectedData = this.selectedList;
|
|
277
|
+
|
|
278
|
+
const idIndex = this.selectedIds.findIndex(
|
|
279
|
+
(ele) => ele === data[this.listDetails.elementIdKey]
|
|
280
|
+
);
|
|
281
|
+
|
|
282
|
+
this.selectedIds.splice(idIndex, 1);
|
|
283
|
+
}
|
|
284
|
+
} else {
|
|
285
|
+
this.selectedList.push(data);
|
|
286
|
+
this.selectedIds.push(data[this.listDetails.elementIdKey]);
|
|
287
|
+
this.footerDetails.selectedData = this.selectedList;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
selectGroupElement(data: any) {
|
|
292
|
+
if (this.selectedGroupIds.includes(data[this.listDetails.groupIdkey])) {
|
|
293
|
+
const index = this.selectedgroupList.findIndex(
|
|
294
|
+
(ele: { [x: string]: any }) =>
|
|
295
|
+
ele[this.listDetails.groupIdkey] === data[this.listDetails.groupIdkey]
|
|
296
|
+
);
|
|
297
|
+
this.selectedgroupList.splice(index, 1);
|
|
298
|
+
this.footerDetails.selectedData = this.selectedgroupList;
|
|
299
|
+
const idIndex = this.selectedGroupIds.findIndex(
|
|
300
|
+
(ele) => ele === data[this.listDetails.groupIdkey]
|
|
301
|
+
);
|
|
302
|
+
this.selectedGroupIds.splice(idIndex, 1);
|
|
303
|
+
} else {
|
|
304
|
+
this.selectedgroupList.push(data);
|
|
305
|
+
this.selectedGroupIds.push(data[this.listDetails.groupIdkey]);
|
|
306
|
+
this.footerDetails.selectedData = this.selectedgroupList;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* It is used to set and search value incase of backend driven list to differentiate search list and original list
|
|
311
|
+
*/
|
|
312
|
+
setSearchValue() {
|
|
313
|
+
if (this.paginationService.searchValue !== this.searchValue) {
|
|
314
|
+
this.paginationService.currentPage = 1;
|
|
315
|
+
this.paginationService.searchValue = this.searchValue;
|
|
316
|
+
this.paginationFilter(true);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* it is used check select all condition incase of backend driven search
|
|
322
|
+
*/
|
|
323
|
+
checkSelectAll() {
|
|
324
|
+
if (this.searchList.length > 0) {
|
|
325
|
+
const data: boolean = this.searchList.every((ele) =>
|
|
326
|
+
this.selectedIds.includes(ele[this.listDetails.elementIdKey])
|
|
327
|
+
);
|
|
328
|
+
return data;
|
|
329
|
+
} else {
|
|
330
|
+
return false;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* it is used check select all groups condition incase of backend driven search
|
|
336
|
+
*/
|
|
337
|
+
checkSelectAllGroups() {
|
|
338
|
+
if (this.groupdata.length > 0) {
|
|
339
|
+
const data: boolean = this.groupdata.every((ele) =>
|
|
340
|
+
this.selectedGroupIds.includes(ele[this.listDetails.groupIdkey])
|
|
341
|
+
);
|
|
342
|
+
return data;
|
|
343
|
+
} else {
|
|
344
|
+
return false;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Filter list user's list based on pagination by making api call
|
|
350
|
+
* @param event specifies a boolean value to call api
|
|
351
|
+
*/
|
|
352
|
+
paginationFilter(event: any) {
|
|
353
|
+
if (!event) return;
|
|
354
|
+
if (this.groupsEnabled) {
|
|
355
|
+
this.vLoader = true;
|
|
356
|
+
if (this.currentTab == 'USER') {
|
|
357
|
+
this.getUsersList({
|
|
358
|
+
// p: this.paginationService.currentPage === 1 ? '' : this.paginationService.currentPage,
|
|
359
|
+
p: this.paginationService.currentPage ?? 1,
|
|
360
|
+
type: '',
|
|
361
|
+
q: !this.paginationService.searchValue
|
|
362
|
+
? ''
|
|
363
|
+
: this.paginationService.searchValue,
|
|
364
|
+
});
|
|
365
|
+
this.getOrganizationUsersCount({
|
|
366
|
+
p: this.paginationService.currentPage ?? 1,
|
|
367
|
+
type: '',
|
|
368
|
+
q: !this.paginationService.searchValue
|
|
369
|
+
? ''
|
|
370
|
+
: this.paginationService.searchValue,
|
|
371
|
+
});
|
|
372
|
+
} else {
|
|
373
|
+
this.getGroupsList({
|
|
374
|
+
page:
|
|
375
|
+
this.paginationService.currentPage === 1
|
|
376
|
+
? ''
|
|
377
|
+
: this.paginationService.currentPage,
|
|
378
|
+
groupName: !this.paginationService.searchValue
|
|
379
|
+
? ''
|
|
380
|
+
: this.paginationService.searchValue,
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
} else {
|
|
384
|
+
this.vLoader = true;
|
|
385
|
+
this.getUsersList({
|
|
386
|
+
// p: this.paginationService.currentPage === 1 ? '' : this.paginationService.currentPage,
|
|
387
|
+
p: this.paginationService.currentPage ?? 1,
|
|
388
|
+
type: '',
|
|
389
|
+
q: !this.paginationService.searchValue
|
|
390
|
+
? ''
|
|
391
|
+
: this.paginationService.searchValue,
|
|
392
|
+
});
|
|
393
|
+
this.getOrganizationUsersCount({
|
|
394
|
+
p: this.paginationService.currentPage ?? 1,
|
|
395
|
+
type: '',
|
|
396
|
+
q: !this.paginationService.searchValue
|
|
397
|
+
? ''
|
|
398
|
+
: this.paginationService.searchValue,
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Gets user's list by making api call
|
|
404
|
+
* @param url contains userlist filter details
|
|
405
|
+
*/
|
|
406
|
+
getUsersList(url: any) {
|
|
407
|
+
this.vLoader = true;
|
|
408
|
+
|
|
409
|
+
this.dashboardService
|
|
410
|
+
.getOrganizationUsers(url ? url : '')
|
|
411
|
+
.subscribe((res) => {
|
|
412
|
+
this.searchList = res;
|
|
413
|
+
this.vLoader = false;
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
getGroupsList(event: any) {
|
|
417
|
+
this.vLoaderGroups = true;
|
|
418
|
+
let params = new HttpParams();
|
|
419
|
+
if (event.hasOwnProperty('groupName')) {
|
|
420
|
+
params = params.append('groupName', event['groupName']);
|
|
421
|
+
}
|
|
422
|
+
if (event.hasOwnProperty('page') && !this.searchValue) {
|
|
423
|
+
params = params.append('page', event['page']);
|
|
424
|
+
}
|
|
425
|
+
if (this.totalgroupscount > 30 && !this.searchValue) {
|
|
426
|
+
params = params.append('limit', 30);
|
|
427
|
+
}
|
|
428
|
+
this.dashboardService.getAllGroups(params).subscribe((res: any) => {
|
|
429
|
+
this.groupdata = res?.data;
|
|
430
|
+
this.vLoaderGroups = false;
|
|
431
|
+
this.totalgroups = res.total_items;
|
|
432
|
+
this.total_group_pages = res.total_pages;
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* on click on next button from the list, it emits the selected list of elements to parent component.
|
|
438
|
+
*/
|
|
439
|
+
onSubmit() {
|
|
440
|
+
// const data = [...new Set(this.selectedList)];
|
|
441
|
+
// data.push(this.selectedgroupList)
|
|
442
|
+
this.saveSelectedUsers.emit({
|
|
443
|
+
users: this.selectedList,
|
|
444
|
+
groups: this.selectedgroupList,
|
|
445
|
+
});
|
|
446
|
+
this.paginationService.reset();
|
|
447
|
+
}
|
|
448
|
+
currentTab = 'USER';
|
|
449
|
+
switchTab(tab: string) {
|
|
450
|
+
this.paginationService.reset();
|
|
451
|
+
this.getOrganizationUsersCount('');
|
|
452
|
+
this.currentTab = tab;
|
|
453
|
+
if (this.currentTab == 'USER') {
|
|
454
|
+
this.searchValue = '';
|
|
455
|
+
this.getUsersList({ p: this.paginationService.currentPage });
|
|
456
|
+
} else {
|
|
457
|
+
this.searchValue = '';
|
|
458
|
+
this.getGroupsList({});
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
getOrganizationUsersCount(Url: any) {
|
|
463
|
+
this.dashboardService.getOrganizationUsersCount(Url).subscribe((res) => {
|
|
464
|
+
this.totalList = res.total_members;
|
|
465
|
+
if (res.total_members && res.limit_per_page > 1) {
|
|
466
|
+
this.totalPages = res.create_page;
|
|
467
|
+
} else {
|
|
468
|
+
this.totalPages = 1;
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* defines listing structure for Reusable list components
|
|
3
|
-
*/
|
|
4
|
-
export interface UserListConfiguration {
|
|
5
|
-
selectedUsersList: {}[];
|
|
6
|
-
selectedGroupList:
|
|
7
|
-
nonRemovableUsersList:
|
|
8
|
-
displayElementKey: string;
|
|
9
|
-
displayGroupKey:
|
|
10
|
-
groupIdkey:
|
|
11
|
-
elementIdKey: string;
|
|
12
|
-
tooltipKey: string;
|
|
13
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* defines listing structure for Reusable list components
|
|
3
|
+
*/
|
|
4
|
+
export interface UserListConfiguration {
|
|
5
|
+
selectedUsersList: {}[];
|
|
6
|
+
selectedGroupList:{}[];
|
|
7
|
+
nonRemovableUsersList:any[]
|
|
8
|
+
displayElementKey: string;
|
|
9
|
+
displayGroupKey:string,
|
|
10
|
+
groupIdkey:string,
|
|
11
|
+
elementIdKey: string;
|
|
12
|
+
tooltipKey: string;
|
|
13
|
+
}
|