vc-create-dashboard 3.0.84 → 3.0.85
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/esm2022/lib/configurations.mjs +7 -0
- package/esm2022/lib/create-dashboard-container/categories/categories-config.mjs +2 -0
- package/esm2022/lib/create-dashboard-container/categories/categories.component.mjs +212 -0
- package/esm2022/lib/create-dashboard-container/configure-widgets/configure-widgets/configure-widgets.component.mjs +350 -0
- package/esm2022/lib/create-dashboard-container/configure-widgets/configure-widgets/widget.interface.mjs +2 -0
- package/esm2022/lib/create-dashboard-container/configure-widgets/configure-widgets.module.mjs +47 -0
- package/esm2022/lib/create-dashboard-container/constants/assets.constant.mjs +37 -0
- package/esm2022/lib/create-dashboard-container/create-dashboard-config.mjs +2 -0
- package/esm2022/lib/create-dashboard-container/create-dashboard.component.mjs +1601 -0
- package/esm2022/lib/create-dashboard-container/create-dashboard.module.mjs +127 -0
- package/esm2022/lib/create-dashboard-container/directives/directives.module.mjs +24 -0
- package/esm2022/lib/create-dashboard-container/directives/scroll-in-view.directive.mjs +36 -0
- package/esm2022/lib/create-dashboard-container/form-group/form-group.component.mjs +153 -0
- package/esm2022/lib/create-dashboard-container/frequency/frequency.component.mjs +309 -0
- package/esm2022/lib/create-dashboard-container/interfaces/widget-data-model.mjs +2 -0
- package/esm2022/lib/create-dashboard-container/pipes/filter.pipe.mjs +30 -0
- package/esm2022/lib/create-dashboard-container/pipes/search-program.pipe.mjs +37 -0
- package/esm2022/lib/create-dashboard-container/pipes/search.pipe.mjs +25 -0
- package/esm2022/lib/create-dashboard-container/pipes/text-count.pipe.mjs +18 -0
- package/esm2022/lib/create-dashboard-container/program-list/constant.mjs +31 -0
- package/esm2022/lib/create-dashboard-container/program-list/information-block/information-block.component.mjs +13 -0
- package/esm2022/lib/create-dashboard-container/program-list/interfaces/list-item.interface.mjs +2 -0
- package/esm2022/lib/create-dashboard-container/program-list/list-container/list-container.component.mjs +50 -0
- package/esm2022/lib/create-dashboard-container/program-list/pipes/check-selected-items.pipes.mjs +23 -0
- package/esm2022/lib/create-dashboard-container/program-list/program-list/program-list.component.mjs +294 -0
- package/esm2022/lib/create-dashboard-container/program-list/program-list.module.mjs +60 -0
- package/esm2022/lib/create-dashboard-container/program-list/services/list-utils.service.mjs +27 -0
- package/esm2022/lib/create-dashboard-container/program-list/services/program-list-api.service.mjs +28 -0
- package/esm2022/lib/create-dashboard-container/responsibility-center/responsibility-center.component.mjs +224 -0
- package/esm2022/lib/create-dashboard-container/risk-categories/risk-categories-config.mjs +2 -0
- package/esm2022/lib/create-dashboard-container/risk-categories/risk-categories.component.mjs +206 -0
- package/esm2022/lib/create-dashboard-container/services/configure-widgets.service.mjs +233 -0
- package/esm2022/lib/create-dashboard-container/services/create-dashboard.service.mjs +227 -0
- package/esm2022/lib/create-dashboard-container/services/pagination.service.mjs +28 -0
- package/esm2022/lib/create-dashboard-container/user-list/user-list.component.mjs +440 -0
- package/esm2022/lib/create-dashboard-container/user-list/user-list.config.mjs +2 -0
- package/esm2022/lib/create-dashboard-container/utils/dashboard-edit.utils.mjs +181 -0
- package/esm2022/lib/create-dashboard.service.mjs +14 -0
- package/esm2022/lib/ui-kit/dashboard-footer/dashboard-footer/dashboard-footer.component.mjs +52 -0
- package/esm2022/lib/ui-kit/dashboard-footer/dashboard-footer-config.mjs +2 -0
- package/esm2022/lib/ui-kit/dashboard-footer/dashboard-footer.module.mjs +32 -0
- package/esm2022/lib/ui-kit/dialog/dialog-config.mjs +7 -0
- package/esm2022/lib/ui-kit/dialog/dialog-injector.mjs +17 -0
- package/esm2022/lib/ui-kit/dialog/dialog-ref.mjs +11 -0
- package/esm2022/lib/ui-kit/dialog/dialog.component.mjs +96 -0
- package/esm2022/lib/ui-kit/dialog/dialog.module.mjs +20 -0
- package/esm2022/lib/ui-kit/dialog/dialog.service.mjs +56 -0
- package/esm2022/lib/ui-kit/dialog/insertion.directive.mjs +17 -0
- package/esm2022/lib/ui-kit/floating-bar/floating-bar.component.mjs +57 -0
- package/esm2022/lib/ui-kit/floating-bar/floating-bar.module.mjs +32 -0
- package/esm2022/lib/ui-kit/formgroup/click-outside.directive.mjs +30 -0
- package/esm2022/lib/ui-kit/formgroup/cs-checkbox/cs-checkbox.component.mjs +29 -0
- package/esm2022/lib/ui-kit/formgroup/cs-radio/cs-radio.component.mjs +34 -0
- package/esm2022/lib/ui-kit/formgroup/cs-radio-group/cs-radio-group.component.mjs +14 -0
- package/esm2022/lib/ui-kit/formgroup/cs-select/cs-select.component.mjs +119 -0
- package/esm2022/lib/ui-kit/formgroup/cs-switch/cs-switch.component.mjs +39 -0
- package/esm2022/lib/ui-kit/formgroup/formgroup.module.mjs +55 -0
- package/esm2022/lib/ui-kit/formgroup/pipes/pascal.pipe.mjs +19 -0
- package/esm2022/lib/ui-kit/formgroup/pipes/searchMultiSelect.pipe.mjs +24 -0
- package/esm2022/lib/ui-kit/loaders/loaders.module.mjs +24 -0
- package/esm2022/lib/ui-kit/loaders/table-loader/table-loader.component.mjs +18 -0
- package/esm2022/lib/ui-kit/no-data/no-data.component.mjs +47 -0
- package/esm2022/lib/ui-kit/no-data/no-data.module.mjs +18 -0
- package/esm2022/lib/ui-kit/pagination/pagination.component.mjs +130 -0
- package/esm2022/lib/ui-kit/pagination/pagination.module.mjs +18 -0
- package/esm2022/lib/ui-kit/popover/popover.component.mjs +129 -0
- package/esm2022/lib/ui-kit/popover/popover.directive.mjs +93 -0
- package/esm2022/lib/ui-kit/popover/popover.module.mjs +21 -0
- package/esm2022/lib/ui-kit/popover/popover.service.mjs +23 -0
- package/esm2022/lib/ui-kit/select/cs-option/cs-option.component.mjs +41 -0
- package/esm2022/lib/ui-kit/select/cs-select/cs-select.component.mjs +107 -0
- package/esm2022/lib/ui-kit/select/safe-html.pipe.mjs +21 -0
- package/esm2022/lib/ui-kit/select/select.module.mjs +21 -0
- package/esm2022/lib/ui-kit/services/cs-select.service.mjs +16 -0
- package/esm2022/lib/ui-kit/smiley-dialog/smiley-dialog.component.mjs +52 -0
- package/esm2022/lib/ui-kit/smiley-dialog/smiley-dialog.module.mjs +18 -0
- package/esm2022/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.mjs +46 -0
- package/esm2022/lib/ui-kit/snack-bar/snack-bar.module.mjs +18 -0
- package/esm2022/lib/ui-kit/snack-bar/snack-bar.service.mjs +23 -0
- package/esm2022/lib/ui-kit/tooltip/tooltip.directive.mjs +168 -0
- package/esm2022/lib/ui-kit/tooltip/tooltip.module.mjs +18 -0
- package/esm2022/lib/ui-kit/v-loader/loader/loader.component.mjs +24 -0
- package/esm2022/lib/ui-kit/v-loader/loader-inline/loader-inline.component.mjs +24 -0
- package/esm2022/lib/ui-kit/v-loader/v-loader.module.mjs +19 -0
- package/esm2022/public-api.mjs +10 -0
- package/esm2022/vc-create-dashboard.mjs +5 -0
- package/fesm2022/vc-create-dashboard.mjs +6616 -0
- package/fesm2022/vc-create-dashboard.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/configurations.d.ts +4 -0
- package/lib/create-dashboard-container/categories/categories-config.d.ts +18 -0
- package/lib/create-dashboard-container/categories/categories.component.d.ts +66 -0
- package/lib/create-dashboard-container/configure-widgets/configure-widgets/configure-widgets.component.d.ts +113 -0
- package/lib/create-dashboard-container/configure-widgets/configure-widgets/widget.interface.d.ts +9 -0
- package/lib/create-dashboard-container/configure-widgets/configure-widgets.module.d.ts +14 -0
- package/lib/create-dashboard-container/constants/assets.constant.d.ts +35 -0
- package/lib/create-dashboard-container/create-dashboard-config.d.ts +18 -0
- package/lib/create-dashboard-container/create-dashboard.component.d.ts +219 -0
- package/lib/create-dashboard-container/create-dashboard.module.d.ts +37 -0
- package/lib/create-dashboard-container/directives/directives.module.d.ts +8 -0
- package/lib/create-dashboard-container/directives/scroll-in-view.directive.d.ts +12 -0
- package/lib/create-dashboard-container/form-group/form-group.component.d.ts +48 -0
- package/lib/create-dashboard-container/frequency/frequency.component.d.ts +39 -0
- package/{src/lib/create-dashboard-container/interfaces/widget-data-model.ts → lib/create-dashboard-container/interfaces/widget-data-model.d.ts} +1 -1
- package/lib/create-dashboard-container/pipes/filter.pipe.d.ts +7 -0
- package/lib/create-dashboard-container/pipes/search-program.pipe.d.ts +7 -0
- package/lib/create-dashboard-container/pipes/search.pipe.d.ts +7 -0
- package/lib/create-dashboard-container/pipes/text-count.pipe.d.ts +7 -0
- package/lib/create-dashboard-container/program-list/constant.d.ts +24 -0
- package/lib/create-dashboard-container/program-list/information-block/information-block.component.d.ts +6 -0
- package/lib/create-dashboard-container/program-list/interfaces/list-item.interface.d.ts +5 -0
- package/lib/create-dashboard-container/program-list/list-container/list-container.component.d.ts +9 -0
- package/lib/create-dashboard-container/program-list/pipes/check-selected-items.pipes.d.ts +7 -0
- package/lib/create-dashboard-container/program-list/program-list/program-list.component.d.ts +119 -0
- package/lib/create-dashboard-container/program-list/program-list.module.d.ts +17 -0
- package/lib/create-dashboard-container/program-list/services/list-utils.service.d.ts +7 -0
- package/lib/create-dashboard-container/program-list/services/program-list-api.service.d.ts +12 -0
- package/lib/create-dashboard-container/responsibility-center/responsibility-center.component.d.ts +70 -0
- package/lib/create-dashboard-container/risk-categories/risk-categories-config.d.ts +18 -0
- package/lib/create-dashboard-container/risk-categories/risk-categories.component.d.ts +66 -0
- package/lib/create-dashboard-container/services/configure-widgets.service.d.ts +21 -0
- package/lib/create-dashboard-container/services/create-dashboard.service.d.ts +80 -0
- package/lib/create-dashboard-container/services/pagination.service.d.ts +12 -0
- package/lib/create-dashboard-container/user-list/user-list.component.d.ts +123 -0
- package/{src/lib/create-dashboard-container/user-list/user-list.config.ts → lib/create-dashboard-container/user-list/user-list.config.d.ts} +6 -6
- package/lib/create-dashboard-container/utils/dashboard-edit.utils.d.ts +16 -0
- package/lib/create-dashboard.service.d.ts +6 -0
- package/lib/ui-kit/dashboard-footer/dashboard-footer/dashboard-footer.component.d.ts +17 -0
- package/lib/ui-kit/dashboard-footer/dashboard-footer-config.d.ts +11 -0
- package/lib/ui-kit/dashboard-footer/dashboard-footer.module.d.ts +10 -0
- package/lib/ui-kit/dialog/dialog-config.d.ts +6 -0
- package/lib/ui-kit/dialog/dialog-injector.d.ts +7 -0
- package/lib/ui-kit/dialog/dialog-ref.d.ts +7 -0
- package/lib/ui-kit/dialog/dialog.component.d.ts +33 -0
- package/lib/ui-kit/dialog/dialog.module.d.ts +9 -0
- package/lib/ui-kit/dialog/dialog.service.d.ts +17 -0
- package/lib/ui-kit/dialog/insertion.directive.d.ts +8 -0
- package/lib/ui-kit/floating-bar/floating-bar.component.d.ts +20 -0
- package/lib/ui-kit/floating-bar/floating-bar.module.d.ts +10 -0
- package/lib/ui-kit/formgroup/click-outside.directive.d.ts +10 -0
- package/lib/ui-kit/formgroup/cs-checkbox/cs-checkbox.component.d.ts +13 -0
- package/lib/ui-kit/formgroup/cs-radio/cs-radio.component.d.ts +15 -0
- package/lib/ui-kit/formgroup/cs-radio-group/cs-radio-group.component.d.ts +8 -0
- package/lib/ui-kit/formgroup/cs-select/cs-select.component.d.ts +36 -0
- package/lib/ui-kit/formgroup/cs-switch/cs-switch.component.d.ts +15 -0
- package/lib/ui-kit/formgroup/formgroup.module.d.ts +17 -0
- package/lib/ui-kit/formgroup/pipes/pascal.pipe.d.ts +7 -0
- package/lib/ui-kit/formgroup/pipes/searchMultiSelect.pipe.d.ts +7 -0
- package/lib/ui-kit/loaders/loaders.module.d.ts +8 -0
- package/lib/ui-kit/loaders/table-loader/table-loader.component.d.ts +9 -0
- package/lib/ui-kit/no-data/no-data.component.d.ts +19 -0
- package/lib/ui-kit/no-data/no-data.module.d.ts +8 -0
- package/lib/ui-kit/pagination/pagination.component.d.ts +21 -0
- package/lib/ui-kit/pagination/pagination.module.d.ts +8 -0
- package/lib/ui-kit/popover/popover.component.d.ts +28 -0
- package/lib/ui-kit/popover/popover.directive.d.ts +17 -0
- package/lib/ui-kit/popover/popover.module.d.ts +9 -0
- package/lib/ui-kit/popover/popover.service.d.ts +13 -0
- package/lib/ui-kit/select/cs-option/cs-option.component.d.ts +16 -0
- package/lib/ui-kit/select/cs-select/cs-select.component.d.ts +32 -0
- package/lib/ui-kit/select/safe-html.pipe.d.ts +10 -0
- package/lib/ui-kit/select/select.module.d.ts +11 -0
- package/lib/ui-kit/services/cs-select.service.d.ts +7 -0
- package/lib/ui-kit/smiley-dialog/smiley-dialog.component.d.ts +17 -0
- package/lib/ui-kit/smiley-dialog/smiley-dialog.module.d.ts +8 -0
- package/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.d.ts +17 -0
- package/lib/ui-kit/snack-bar/snack-bar.module.d.ts +8 -0
- package/lib/ui-kit/snack-bar/snack-bar.service.d.ts +9 -0
- package/lib/ui-kit/tooltip/tooltip.directive.d.ts +28 -0
- package/lib/ui-kit/tooltip/tooltip.module.d.ts +8 -0
- package/lib/ui-kit/v-loader/loader/loader.component.d.ts +11 -0
- package/lib/ui-kit/v-loader/loader-inline/loader-inline.component.d.ts +11 -0
- package/lib/ui-kit/v-loader/v-loader.module.d.ts +9 -0
- package/package.json +25 -11
- package/public-api.d.ts +3 -0
- package/karma.conf.js +0 -44
- package/ng-package.json +0 -7
- package/src/lib/categoryList.ts +0 -23
- package/src/lib/configurations.ts +0 -8
- package/src/lib/create-dashboard-container/categories/categories-config.ts +0 -18
- package/src/lib/create-dashboard-container/categories/categories.component.html +0 -150
- package/src/lib/create-dashboard-container/categories/categories.component.less +0 -252
- package/src/lib/create-dashboard-container/categories/categories.component.spec.ts +0 -43
- package/src/lib/create-dashboard-container/categories/categories.component.ts +0 -220
- package/src/lib/create-dashboard-container/configure-widgets/configure-widgets/configure-widgets.component.html +0 -141
- package/src/lib/create-dashboard-container/configure-widgets/configure-widgets/configure-widgets.component.less +0 -381
- package/src/lib/create-dashboard-container/configure-widgets/configure-widgets/configure-widgets.component.spec.ts +0 -48
- package/src/lib/create-dashboard-container/configure-widgets/configure-widgets/configure-widgets.component.ts +0 -392
- package/src/lib/create-dashboard-container/configure-widgets/configure-widgets/widget.interface.ts +0 -9
- package/src/lib/create-dashboard-container/configure-widgets/configure-widgets.module.ts +0 -30
- package/src/lib/create-dashboard-container/constants/assets.constant.ts +0 -37
- package/src/lib/create-dashboard-container/create-dashboard-config.ts +0 -24
- package/src/lib/create-dashboard-container/create-dashboard-mockData.ts +0 -341
- package/src/lib/create-dashboard-container/create-dashboard.component.html +0 -660
- package/src/lib/create-dashboard-container/create-dashboard.component.less +0 -1579
- package/src/lib/create-dashboard-container/create-dashboard.component.ts +0 -1886
- package/src/lib/create-dashboard-container/create-dashboard.module.ts +0 -76
- package/src/lib/create-dashboard-container/directives/directives.module.ts +0 -18
- package/src/lib/create-dashboard-container/directives/scroll-in-view.directive.ts +0 -28
- package/src/lib/create-dashboard-container/form-group/form-group.component.html +0 -288
- package/src/lib/create-dashboard-container/form-group/form-group.component.less +0 -450
- package/src/lib/create-dashboard-container/form-group/form-group.component.spec.ts +0 -90
- package/src/lib/create-dashboard-container/form-group/form-group.component.ts +0 -163
- package/src/lib/create-dashboard-container/frequency/frequency.component.html +0 -61
- package/src/lib/create-dashboard-container/frequency/frequency.component.less +0 -183
- package/src/lib/create-dashboard-container/frequency/frequency.component.spec.ts +0 -120
- package/src/lib/create-dashboard-container/frequency/frequency.component.ts +0 -303
- package/src/lib/create-dashboard-container/pipes/filter.pipe.ts +0 -25
- package/src/lib/create-dashboard-container/pipes/search-program.pipe.ts +0 -31
- package/src/lib/create-dashboard-container/pipes/search.pipe.ts +0 -23
- package/src/lib/create-dashboard-container/pipes/text-count.pipe.spec.ts +0 -8
- package/src/lib/create-dashboard-container/pipes/text-count.pipe.ts +0 -14
- package/src/lib/create-dashboard-container/program-list/constant.ts +0 -36
- package/src/lib/create-dashboard-container/program-list/information-block/information-block.component.html +0 -9
- package/src/lib/create-dashboard-container/program-list/information-block/information-block.component.less +0 -63
- package/src/lib/create-dashboard-container/program-list/information-block/information-block.component.ts +0 -15
- package/src/lib/create-dashboard-container/program-list/interfaces/data-source.interface.ts +0 -6
- package/src/lib/create-dashboard-container/program-list/interfaces/list-item.interface.ts +0 -8
- package/src/lib/create-dashboard-container/program-list/interfaces/selection-predicate.interface.ts +0 -4
- package/src/lib/create-dashboard-container/program-list/list-container/list-container.component.less +0 -57
- package/src/lib/create-dashboard-container/program-list/list-container/list-container.component.ts +0 -30
- package/src/lib/create-dashboard-container/program-list/pipes/check-selected-items.pipes.ts +0 -19
- package/src/lib/create-dashboard-container/program-list/program-list/program-list.component.html +0 -158
- package/src/lib/create-dashboard-container/program-list/program-list/program-list.component.less +0 -679
- package/src/lib/create-dashboard-container/program-list/program-list/program-list.component.ts +0 -342
- package/src/lib/create-dashboard-container/program-list/program-list.module.ts +0 -36
- package/src/lib/create-dashboard-container/program-list/services/list-utils.service.ts +0 -22
- package/src/lib/create-dashboard-container/program-list/services/program-list-api.service.ts +0 -24
- package/src/lib/create-dashboard-container/responsibility-center/responsibility-center.component.html +0 -70
- package/src/lib/create-dashboard-container/responsibility-center/responsibility-center.component.less +0 -181
- package/src/lib/create-dashboard-container/responsibility-center/responsibility-center.component.spec.ts +0 -41
- package/src/lib/create-dashboard-container/responsibility-center/responsibility-center.component.ts +0 -154
- package/src/lib/create-dashboard-container/risk-categories/risk-categories-config.ts +0 -18
- package/src/lib/create-dashboard-container/risk-categories/risk-categories.component.html +0 -152
- package/src/lib/create-dashboard-container/risk-categories/risk-categories.component.less +0 -230
- package/src/lib/create-dashboard-container/risk-categories/risk-categories.component.spec.ts +0 -39
- package/src/lib/create-dashboard-container/risk-categories/risk-categories.component.ts +0 -209
- package/src/lib/create-dashboard-container/services/auth.service.ts +0 -27
- package/src/lib/create-dashboard-container/services/configure-widgets.service.spec.ts +0 -19
- package/src/lib/create-dashboard-container/services/configure-widgets.service.ts +0 -235
- package/src/lib/create-dashboard-container/services/create-dashboard.service.spec.ts +0 -19
- package/src/lib/create-dashboard-container/services/create-dashboard.service.ts +0 -287
- package/src/lib/create-dashboard-container/services/pagination.service.spec.ts +0 -16
- package/src/lib/create-dashboard-container/services/pagination.service.ts +0 -25
- package/src/lib/create-dashboard-container/services/urlConfig.service.ts +0 -21
- package/src/lib/create-dashboard-container/user-list/user-list.component.html +0 -358
- package/src/lib/create-dashboard-container/user-list/user-list.component.less +0 -451
- package/src/lib/create-dashboard-container/user-list/user-list.component.spec.ts +0 -153
- package/src/lib/create-dashboard-container/user-list/user-list.component.ts +0 -472
- package/src/lib/create-dashboard-container/utils/dashboard-edit.utils.ts +0 -235
- package/src/lib/create-dashboard.service.ts +0 -8
- package/src/lib/ui-kit/action-dialog/access-capability/access-capability.component.html +0 -22
- package/src/lib/ui-kit/action-dialog/access-capability/access-capability.component.less +0 -218
- package/src/lib/ui-kit/action-dialog/access-capability/access-capability.component.ts +0 -30
- package/src/lib/ui-kit/action-dialog/action-dialog.module.ts +0 -53
- package/src/lib/ui-kit/action-dialog/active/active.component.html +0 -25
- package/src/lib/ui-kit/action-dialog/active/active.component.less +0 -168
- package/src/lib/ui-kit/action-dialog/active/active.component.ts +0 -31
- package/src/lib/ui-kit/action-dialog/assesment-confirmation/assesment-confirmation.component.html +0 -18
- package/src/lib/ui-kit/action-dialog/assesment-confirmation/assesment-confirmation.component.less +0 -98
- package/src/lib/ui-kit/action-dialog/assesment-confirmation/assesment-confirmation.component.ts +0 -18
- package/src/lib/ui-kit/action-dialog/confirmation/confirmation.component.html +0 -20
- package/src/lib/ui-kit/action-dialog/confirmation/confirmation.component.less +0 -325
- package/src/lib/ui-kit/action-dialog/confirmation/confirmation.component.ts +0 -26
- package/src/lib/ui-kit/action-dialog/delete/delete.component.html +0 -24
- package/src/lib/ui-kit/action-dialog/delete/delete.component.less +0 -240
- package/src/lib/ui-kit/action-dialog/delete/delete.component.ts +0 -22
- package/src/lib/ui-kit/action-dialog/error/error.component.html +0 -20
- package/src/lib/ui-kit/action-dialog/error/error.component.less +0 -103
- package/src/lib/ui-kit/action-dialog/error/error.component.ts +0 -18
- package/src/lib/ui-kit/action-dialog/inactive/inactive.component.html +0 -25
- package/src/lib/ui-kit/action-dialog/inactive/inactive.component.less +0 -167
- package/src/lib/ui-kit/action-dialog/inactive/inactive.component.ts +0 -29
- package/src/lib/ui-kit/action-dialog/link/link.component.html +0 -57
- package/src/lib/ui-kit/action-dialog/link/link.component.less +0 -222
- package/src/lib/ui-kit/action-dialog/link/link.component.ts +0 -18
- package/src/lib/ui-kit/action-dialog/move/move.component.html +0 -43
- package/src/lib/ui-kit/action-dialog/move/move.component.less +0 -157
- package/src/lib/ui-kit/action-dialog/move/move.component.ts +0 -25
- package/src/lib/ui-kit/action-dialog/my-rating/my-rating.component.html +0 -19
- package/src/lib/ui-kit/action-dialog/my-rating/my-rating.component.less +0 -97
- package/src/lib/ui-kit/action-dialog/my-rating/my-rating.component.ts +0 -18
- package/src/lib/ui-kit/action-dialog/upload/upload.component.html +0 -19
- package/src/lib/ui-kit/action-dialog/upload/upload.component.less +0 -97
- package/src/lib/ui-kit/action-dialog/upload/upload.component.ts +0 -12
- package/src/lib/ui-kit/chart/bar/bar.component.html +0 -28
- package/src/lib/ui-kit/chart/bar/bar.component.less +0 -13
- package/src/lib/ui-kit/chart/bar/bar.component.ts +0 -44
- package/src/lib/ui-kit/chart/chart.module.ts +0 -12
- package/src/lib/ui-kit/chart/pipes/segmenter.pipe.ts +0 -28
- package/src/lib/ui-kit/chart/pipes/x-calculator.pipe.ts +0 -22
- package/src/lib/ui-kit/circle-progresss/circle/circle.component.html +0 -37
- package/src/lib/ui-kit/circle-progresss/circle/circle.component.less +0 -1448
- package/src/lib/ui-kit/circle-progresss/circle/circle.component.ts +0 -19
- package/src/lib/ui-kit/circle-progresss/circle-progresss.module.ts +0 -10
- package/src/lib/ui-kit/click-outside/click-outside.directive.ts +0 -16
- package/src/lib/ui-kit/click-outside/click-outside.module.ts +0 -16
- package/src/lib/ui-kit/color-palette/color-palette.component.html +0 -110
- package/src/lib/ui-kit/color-palette/color-palette.component.less +0 -54
- package/src/lib/ui-kit/color-palette/color-palette.component.ts +0 -28
- package/src/lib/ui-kit/color-palette/color-palette.module.ts +0 -10
- package/src/lib/ui-kit/dashboard-footer/dashboard-footer/dashboard-footer.component.html +0 -37
- package/src/lib/ui-kit/dashboard-footer/dashboard-footer/dashboard-footer.component.less +0 -335
- package/src/lib/ui-kit/dashboard-footer/dashboard-footer/dashboard-footer.component.spec.ts +0 -25
- package/src/lib/ui-kit/dashboard-footer/dashboard-footer/dashboard-footer.component.ts +0 -44
- package/src/lib/ui-kit/dashboard-footer/dashboard-footer-config.ts +0 -11
- package/src/lib/ui-kit/dashboard-footer/dashboard-footer.module.ts +0 -22
- package/src/lib/ui-kit/dialog/dialog-config.ts +0 -6
- package/src/lib/ui-kit/dialog/dialog-injector.ts +0 -18
- package/src/lib/ui-kit/dialog/dialog-ref.ts +0 -12
- package/src/lib/ui-kit/dialog/dialog.component.css +0 -89
- package/src/lib/ui-kit/dialog/dialog.component.html +0 -27
- package/src/lib/ui-kit/dialog/dialog.component.ts +0 -112
- package/src/lib/ui-kit/dialog/dialog.module.ts +0 -11
- package/src/lib/ui-kit/dialog/dialog.service.ts +0 -57
- package/src/lib/ui-kit/dialog/insertion.directive.ts +0 -8
- package/src/lib/ui-kit/floating-bar/floating-bar.component.html +0 -42
- package/src/lib/ui-kit/floating-bar/floating-bar.component.less +0 -355
- package/src/lib/ui-kit/floating-bar/floating-bar.component.spec.ts +0 -25
- package/src/lib/ui-kit/floating-bar/floating-bar.component.ts +0 -40
- package/src/lib/ui-kit/floating-bar/floating-bar.module.ts +0 -22
- package/src/lib/ui-kit/formgroup/click-outside.directive.ts +0 -16
- package/src/lib/ui-kit/formgroup/cs-checkbox/cs-checkbox.component.html +0 -11
- package/src/lib/ui-kit/formgroup/cs-checkbox/cs-checkbox.component.less +0 -102
- package/src/lib/ui-kit/formgroup/cs-checkbox/cs-checkbox.component.ts +0 -19
- package/src/lib/ui-kit/formgroup/cs-radio/cs-radio.component.html +0 -11
- package/src/lib/ui-kit/formgroup/cs-radio/cs-radio.component.less +0 -125
- package/src/lib/ui-kit/formgroup/cs-radio/cs-radio.component.ts +0 -21
- package/src/lib/ui-kit/formgroup/cs-radio-group/cs-radio-group.component.html +0 -4
- 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 +0 -12
- package/src/lib/ui-kit/formgroup/cs-select/cs-select.component.html +0 -78
- package/src/lib/ui-kit/formgroup/cs-select/cs-select.component.less +0 -259
- package/src/lib/ui-kit/formgroup/cs-select/cs-select.component.ts +0 -92
- package/src/lib/ui-kit/formgroup/cs-switch/cs-switch.component.html +0 -30
- package/src/lib/ui-kit/formgroup/cs-switch/cs-switch.component.less +0 -103
- package/src/lib/ui-kit/formgroup/cs-switch/cs-switch.component.ts +0 -23
- package/src/lib/ui-kit/formgroup/formgroup.module.ts +0 -35
- package/src/lib/ui-kit/formgroup/pipes/pascal.pipe.ts +0 -13
- package/src/lib/ui-kit/formgroup/pipes/searchMultiSelect.pipe.ts +0 -18
- package/src/lib/ui-kit/line-loader/line-loader.component.html +0 -3
- package/src/lib/ui-kit/line-loader/line-loader.component.less +0 -34
- package/src/lib/ui-kit/line-loader/line-loader.component.ts +0 -14
- package/src/lib/ui-kit/line-loader/line-loader.module.ts +0 -10
- package/src/lib/ui-kit/loaders/loaders.module.ts +0 -18
- package/src/lib/ui-kit/loaders/table-loader/table-loader.component.html +0 -17
- package/src/lib/ui-kit/loaders/table-loader/table-loader.component.less +0 -136
- package/src/lib/ui-kit/loaders/table-loader/table-loader.component.ts +0 -17
- package/src/lib/ui-kit/longpress/longpress.directive.ts +0 -28
- package/src/lib/ui-kit/longpress/longpress.module.ts +0 -10
- package/src/lib/ui-kit/multi-select/cs-multiselect/cs-multiselect.component.html +0 -51
- package/src/lib/ui-kit/multi-select/cs-multiselect/cs-multiselect.component.less +0 -367
- package/src/lib/ui-kit/multi-select/cs-multiselect/cs-multiselect.component.spec.ts +0 -24
- package/src/lib/ui-kit/multi-select/cs-multiselect/cs-multiselect.component.ts +0 -141
- package/src/lib/ui-kit/multi-select/cs-multiselect-option/cs-multiselect-option.component.html +0 -9
- package/src/lib/ui-kit/multi-select/cs-multiselect-option/cs-multiselect-option.component.less +0 -105
- package/src/lib/ui-kit/multi-select/cs-multiselect-option/cs-multiselect-option.component.spec.ts +0 -27
- package/src/lib/ui-kit/multi-select/cs-multiselect-option/cs-multiselect-option.component.ts +0 -24
- package/src/lib/ui-kit/multi-select/multi-select.module.ts +0 -24
- package/src/lib/ui-kit/multi-select/multi-select.service.ts +0 -10
- package/src/lib/ui-kit/no-data/no-data.component.html +0 -14
- package/src/lib/ui-kit/no-data/no-data.component.less +0 -86
- package/src/lib/ui-kit/no-data/no-data.component.ts +0 -26
- package/src/lib/ui-kit/no-data/no-data.module.ts +0 -10
- package/src/lib/ui-kit/pagination/pagination.component.html +0 -11
- package/src/lib/ui-kit/pagination/pagination.component.less +0 -72
- package/src/lib/ui-kit/pagination/pagination.component.spec.ts +0 -25
- package/src/lib/ui-kit/pagination/pagination.component.ts +0 -138
- package/src/lib/ui-kit/pagination/pagination.module.ts +0 -10
- package/src/lib/ui-kit/pipes/pipes.module.ts +0 -10
- package/src/lib/ui-kit/pipes/safeHTML.pipe.ts +0 -12
- package/src/lib/ui-kit/pipes/trim.pipe.ts +0 -10
- package/src/lib/ui-kit/popover/popover.component.html +0 -6
- package/src/lib/ui-kit/popover/popover.component.less +0 -20
- package/src/lib/ui-kit/popover/popover.component.ts +0 -127
- package/src/lib/ui-kit/popover/popover.directive.ts +0 -72
- package/src/lib/ui-kit/popover/popover.module.ts +0 -13
- package/src/lib/ui-kit/popover/popover.service.ts +0 -17
- package/src/lib/ui-kit/ripple/ripple.directive.ts +0 -36
- package/src/lib/ui-kit/ripple/ripple.module.ts +0 -10
- package/src/lib/ui-kit/select/cs-option/cs-option.component.html +0 -8
- package/src/lib/ui-kit/select/cs-option/cs-option.component.less +0 -49
- package/src/lib/ui-kit/select/cs-option/cs-option.component.ts +0 -31
- package/src/lib/ui-kit/select/cs-select/cs-select.component.html +0 -16
- package/src/lib/ui-kit/select/cs-select/cs-select.component.less +0 -142
- package/src/lib/ui-kit/select/cs-select/cs-select.component.ts +0 -98
- package/src/lib/ui-kit/select/safe-html.pipe.ts +0 -13
- package/src/lib/ui-kit/select/select.module.ts +0 -13
- package/src/lib/ui-kit/services/cs-select.service.ts +0 -10
- package/src/lib/ui-kit/smiley-dialog/smiley-dialog.component.html +0 -30
- package/src/lib/ui-kit/smiley-dialog/smiley-dialog.component.less +0 -442
- package/src/lib/ui-kit/smiley-dialog/smiley-dialog.component.ts +0 -40
- package/src/lib/ui-kit/smiley-dialog/smiley-dialog.module.ts +0 -11
- package/src/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.html +0 -10
- package/src/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.less +0 -110
- package/src/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.ts +0 -42
- package/src/lib/ui-kit/snack-bar/snack-bar.module.ts +0 -10
- package/src/lib/ui-kit/snack-bar/snack-bar.service.ts +0 -18
- package/src/lib/ui-kit/time-filter/time-filter.component.html +0 -126
- package/src/lib/ui-kit/time-filter/time-filter.component.less +0 -482
- package/src/lib/ui-kit/time-filter/time-filter.component.ts +0 -284
- package/src/lib/ui-kit/time-filter/time-filter.module.ts +0 -10
- package/src/lib/ui-kit/tooltip/tooltip.directive.ts +0 -150
- package/src/lib/ui-kit/tooltip/tooltip.module.ts +0 -10
- package/src/lib/ui-kit/v-loader/loader/loader.component.html +0 -6
- package/src/lib/ui-kit/v-loader/loader/loader.component.less +0 -52
- package/src/lib/ui-kit/v-loader/loader/loader.component.ts +0 -22
- package/src/lib/ui-kit/v-loader/loader-inline/loader-inline.component.html +0 -6
- package/src/lib/ui-kit/v-loader/loader-inline/loader-inline.component.less +0 -52
- package/src/lib/ui-kit/v-loader/loader-inline/loader-inline.component.ts +0 -22
- package/src/lib/ui-kit/v-loader/v-loader.module.ts +0 -11
- package/src/public-api.ts +0 -11
- package/src/test.ts +0 -28
- package/tsconfig.lib.json +0 -20
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
<div class="create-frequency" [class.animate-slideInRight]="animation">
|
|
2
|
-
<div class="create-frequency-head vx-d-flex vx-align-center vx-justify-between vx-pl-4 vx-pr-4 vx-mb-4">
|
|
3
|
-
<div class="vx-fs-14 vx-fw-500 vx-label-txt">Select a Frequency</div>
|
|
4
|
-
</div>
|
|
5
|
-
<div class="create-frequency-body vx-pl-4 vx-pr-4">
|
|
6
|
-
<div class="create-frequency-body-inner">
|
|
7
|
-
<div class="create-frequency-tab" [ngSwitch]="frequencyTab">
|
|
8
|
-
<div class="create-frequency-tab-head">
|
|
9
|
-
<ul class="navigation">
|
|
10
|
-
<li><button [class.active]="frequencyTab == 'weekly'" (click)="changeTab('weekly')">Weekly</button></li>
|
|
11
|
-
<li><button [class.active]="frequencyTab == 'monthly'" (click)="changeTab('monthly')">Monthly</button></li>
|
|
12
|
-
<li><button [class.active]="frequencyTab == 'quarterly'" (click)="changeTab('quarterly')">Quarterly</button></li>
|
|
13
|
-
</ul>
|
|
14
|
-
</div>
|
|
15
|
-
<div class="create-frequency-tab-body vx-pl-4 vx-pr-4">
|
|
16
|
-
<div class="vx-fs-11 vx-fw-500 vx-label-txt vx-tt-uppercase vx-mb-1">Email Reminder Frequency:</div>
|
|
17
|
-
<div class="checkbox-list" *ngSwitchCase="'weekly'">
|
|
18
|
-
<div class="frequency-checkbox vx-d-flex vx-align-center">
|
|
19
|
-
<div class="frequency-checkbox-item vx-p-3 vx-pr-4 vx-d-flex vx-align-center" *ngFor="let day of dayNames; let dayIndex = index">
|
|
20
|
-
<app-cs-checkbox (ngValueChange)="daySelectionChange($event, dayIndex)" [ngValue]="selectedDays.includes(dayIndex)">{{day}}</app-cs-checkbox>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="checkbox-list month" *ngSwitchCase="'monthly'">
|
|
25
|
-
<div class="frequency-top vx-d-flex vx-align-center">
|
|
26
|
-
<div class="vx-fs-13 vx-paragraph-txt">Day</div>
|
|
27
|
-
<input type="number" (focusout)="checkDateValidity(monthlyDate,'monthly')" [(ngModel)]="monthlyDate" class="countNum" onkeydown="return event.keyCode !== 190" min="1" oninput="this.value = Math.abs(this.value)">
|
|
28
|
-
<div class="vx-fs-13 vx-paragraph-txt">of</div>
|
|
29
|
-
</div>
|
|
30
|
-
<div class="frequency-checkbox vx-d-flex vx-align-center vx-flex-wrap">
|
|
31
|
-
<div class="frequency-checkbox-item vx-p-3 vx-pr-4 vx-d-flex vx-align-center" *ngFor="let month of monthNames; let monthIndex = index">
|
|
32
|
-
<app-cs-checkbox (ngValueChange)="monthSelectionChange($event, monthIndex)" [ngValue]="selectedMonths.includes(monthIndex)">{{month}}</app-cs-checkbox>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
<div class="checkbox-list" *ngSwitchCase="'quarterly'">
|
|
37
|
-
<ng-container *ngIf="showRadio">
|
|
38
|
-
<div class="frequency-top vx-d-flex vx-align-center">
|
|
39
|
-
<div class="vx-fs-13 vx-paragraph-txt">Day</div>
|
|
40
|
-
<input type="number" (focusout)="checkDateValidity(quarterlyDate,'quarterly')" [(ngModel)]="quarterlyDate" class="countNum" onkeydown="return event.keyCode !== 190" min="1" oninput="this.value = Math.abs(this.value)">
|
|
41
|
-
<div class="vx-fs-13 vx-paragraph-txt">of</div>
|
|
42
|
-
</div>
|
|
43
|
-
<div class="frequency-checkbox vx-d-flex vx-align-center">
|
|
44
|
-
<div class="frequency-checkbox-item vx-p-3 vx-pr-4 vx-d-flex vx-align-center vx-w-100" *ngFor="let quarter of quarters, let quarterIndex = index">
|
|
45
|
-
<app-cs-radio (checkedEvent)="quarterSelectionChange($event, quarterIndex)" [checked]="selectedQuarter === quarterIndex">{{quarter}}</app-cs-radio>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</ng-container>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
<div class="create-frequency-footer">
|
|
55
|
-
<app-dashboard-footer
|
|
56
|
-
[footerDetails]="footerDetails"
|
|
57
|
-
(cancelEvent)="closeFrequencyPopup.emit()"
|
|
58
|
-
(submitEvent)="submitFrequency()"
|
|
59
|
-
></app-dashboard-footer>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
@import url("https://cdn.v-comply.com/design-system/css/icons/icons.css");
|
|
2
|
-
@import url("https://cdn.v-comply.com/design-system/css/display/display.css");
|
|
3
|
-
@import url("https://cdn.v-comply.com/design-system/css/alignment/alignment.css");
|
|
4
|
-
@import url("https://cdn.v-comply.com/design-system/css/text/text.css");
|
|
5
|
-
@import url("https://cdn.v-comply.com/design-system/css/color/color.css");
|
|
6
|
-
@import url("https://cdn.v-comply.com/design-system/css/width/width.css");
|
|
7
|
-
@import url("https://cdn.v-comply.com/design-system/css/margin/margin.css");
|
|
8
|
-
@import url("https://cdn.v-comply.com/design-system/css/margin/margin-top.css");
|
|
9
|
-
@import url("https://cdn.v-comply.com/design-system/css/margin/margin-bottom.css");
|
|
10
|
-
@import url("https://cdn.v-comply.com/design-system/css/margin/margin-left.css");
|
|
11
|
-
@import url("https://cdn.v-comply.com/design-system/css/margin/margin-right.css");
|
|
12
|
-
@import url("https://cdn.v-comply.com/design-system/css/padding/padding.css");
|
|
13
|
-
@import url("https://cdn.v-comply.com/design-system/css/padding/padding-top.css");
|
|
14
|
-
@import url("https://cdn.v-comply.com/design-system/css/padding/padding-bottom.css");
|
|
15
|
-
@import url("https://cdn.v-comply.com/design-system/css/padding/padding-left.css");
|
|
16
|
-
@import url("https://cdn.v-comply.com/design-system/css/padding/padding-right.css");
|
|
17
|
-
|
|
18
|
-
::ng-deep .create-frequency {
|
|
19
|
-
background: #FFFFFF;
|
|
20
|
-
border-right: 1px solid #F1F1F1;
|
|
21
|
-
position: fixed;
|
|
22
|
-
top: 0;
|
|
23
|
-
right: 500px;
|
|
24
|
-
bottom: 0;
|
|
25
|
-
left: 0;
|
|
26
|
-
|
|
27
|
-
&-head {
|
|
28
|
-
background: #fbfbfb;
|
|
29
|
-
height: 2.75rem;
|
|
30
|
-
border-bottom: 1px solid #f1f1f1;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&-body {
|
|
34
|
-
height: calc(100vh - 9.75rem);
|
|
35
|
-
margin: 0 auto 1rem;
|
|
36
|
-
overflow: hidden;
|
|
37
|
-
overflow-y: auto;
|
|
38
|
-
width: calc(100% - 2.5rem);
|
|
39
|
-
|
|
40
|
-
&::-webkit-scrollbar-track {
|
|
41
|
-
background: transparent;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&-inner {
|
|
45
|
-
width: 54.5rem;
|
|
46
|
-
margin: 0 auto;
|
|
47
|
-
|
|
48
|
-
@media screen and (min-width: 1366px) {
|
|
49
|
-
width: auto;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&-tab {
|
|
55
|
-
&-head {
|
|
56
|
-
border: none!important;
|
|
57
|
-
border-bottom: 1px solid #f1f1f1!important;
|
|
58
|
-
margin-bottom: 1.5rem;
|
|
59
|
-
|
|
60
|
-
ul {
|
|
61
|
-
padding: 0;
|
|
62
|
-
margin : 0;
|
|
63
|
-
|
|
64
|
-
&.navigation {
|
|
65
|
-
display : flex;
|
|
66
|
-
|
|
67
|
-
li {
|
|
68
|
-
list-style : none;
|
|
69
|
-
padding : 0;
|
|
70
|
-
margin: 0 1.5rem 0 0;
|
|
71
|
-
display : flex;
|
|
72
|
-
justify-content: center;
|
|
73
|
-
|
|
74
|
-
button {
|
|
75
|
-
background : transparent;
|
|
76
|
-
border-radius: 0;
|
|
77
|
-
border : none;
|
|
78
|
-
border-bottom: 0.125rem solid transparent;
|
|
79
|
-
font-size : 11px;
|
|
80
|
-
font-weight : 500;
|
|
81
|
-
color : #747576;
|
|
82
|
-
line-height : 1.5rem;
|
|
83
|
-
position : relative;
|
|
84
|
-
text-transform: uppercase;
|
|
85
|
-
cursor : pointer;
|
|
86
|
-
padding : 0;
|
|
87
|
-
|
|
88
|
-
&.active {
|
|
89
|
-
color: #1e5dd3;
|
|
90
|
-
border-color: #1e5dd3;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&-body {
|
|
99
|
-
.checkbox-list {
|
|
100
|
-
border-radius: .25rem;
|
|
101
|
-
border: 1px solid #f1f1f1;
|
|
102
|
-
|
|
103
|
-
.frequency {
|
|
104
|
-
&-top {
|
|
105
|
-
padding : 12px;
|
|
106
|
-
border-bottom: 1px solid #F1F1F1;
|
|
107
|
-
|
|
108
|
-
input.countNum {
|
|
109
|
-
-webkit-appearance: textfield;
|
|
110
|
-
-moz-appearance : textfield;
|
|
111
|
-
border: none;
|
|
112
|
-
border-bottom: 1px solid #DBDBDB;
|
|
113
|
-
color: #161b2f;
|
|
114
|
-
display: inline-block;
|
|
115
|
-
font-size: 13px;
|
|
116
|
-
text-align: center;
|
|
117
|
-
width: 2.75rem;
|
|
118
|
-
padding: 0.125rem;
|
|
119
|
-
margin: 0 0.5rem;
|
|
120
|
-
outline: none;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
&-checkbox {
|
|
125
|
-
background: #fff;
|
|
126
|
-
border-radius: .25rem;
|
|
127
|
-
|
|
128
|
-
&-item {
|
|
129
|
-
border-right: 1px solid #f1f1f1;
|
|
130
|
-
height: 2.75rem;
|
|
131
|
-
|
|
132
|
-
@media screen and (max-width: 1280px) {
|
|
133
|
-
padding: 0 .5rem !important;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
&:last-of-type {
|
|
137
|
-
border-right: none;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
app-cs-checkbox,
|
|
144
|
-
app-cs-radio {
|
|
145
|
-
display: flex;
|
|
146
|
-
|
|
147
|
-
label {
|
|
148
|
-
span.value {
|
|
149
|
-
font-size : 12px !important;
|
|
150
|
-
color : #161b2f !important;
|
|
151
|
-
font-weight: 400 !important;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
&.month {
|
|
157
|
-
.frequency-checkbox {
|
|
158
|
-
&-item {
|
|
159
|
-
width : calc(100% / 6);
|
|
160
|
-
|
|
161
|
-
&:first-of-type,
|
|
162
|
-
&:nth-child(2),
|
|
163
|
-
&:nth-child(3),
|
|
164
|
-
&:nth-child(4),
|
|
165
|
-
&:nth-child(5),
|
|
166
|
-
&:nth-child(6) {
|
|
167
|
-
border-bottom: 1px solid #f1f1f1;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
&:nth-child(6) {
|
|
171
|
-
border-right: none;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
&-footer {
|
|
181
|
-
padding: 0 2rem;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { FrequencyComponent } from './frequency.component';
|
|
4
|
-
|
|
5
|
-
describe('FrequencyComponent', () => {
|
|
6
|
-
let component: FrequencyComponent;
|
|
7
|
-
let fixture: ComponentFixture<FrequencyComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ FrequencyComponent ],
|
|
12
|
-
imports: []
|
|
13
|
-
})
|
|
14
|
-
.compileComponents();
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
beforeEach(() => {
|
|
18
|
-
fixture = TestBed.createComponent(FrequencyComponent);
|
|
19
|
-
component = fixture.componentInstance;
|
|
20
|
-
fixture.detectChanges();
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
it('should create', () => {
|
|
24
|
-
expect(component).toBeTruthy();
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it('frequency tab should be weekly by default', () => {
|
|
28
|
-
expect(component.frequencyTab).toEqual('weekly');
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
it('on init, tab should be updated to the saved tab', () => {
|
|
32
|
-
component.savedFrequencyTab = 'monthly';
|
|
33
|
-
component.savedFrequencies = ['January', 'February'];
|
|
34
|
-
component.ngOnInit();
|
|
35
|
-
expect(component.frequencyTab).toEqual('monthly');
|
|
36
|
-
//expect(component.selectedMonths).toEqual([0,2]);
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
it('should output the correct weekly string', () => {
|
|
40
|
-
component.frequencyTab = 'weekly';
|
|
41
|
-
component.selectedDays = [1,0,4,2];
|
|
42
|
-
let selectedFreq : any;
|
|
43
|
-
component.saveFrequency.pipe().subscribe((obj: any) => selectedFreq = obj);
|
|
44
|
-
|
|
45
|
-
component.submitFrequency();
|
|
46
|
-
|
|
47
|
-
expect(selectedFreq).toBeTruthy();
|
|
48
|
-
expect(selectedFreq.frequencyString).toEqual('Every Monday, Tuesday, Wednesday, Friday');
|
|
49
|
-
expect(selectedFreq.frequencyType).toEqual('weekly');
|
|
50
|
-
//expect(selectedFreq.frequencies).toEqual([0,1,2,4]);
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
it('day selection change should updated selectedDays', () => {
|
|
54
|
-
component.selectedDays = [];
|
|
55
|
-
|
|
56
|
-
component.daySelectionChange(true, 2);
|
|
57
|
-
component.daySelectionChange(true, 5);
|
|
58
|
-
|
|
59
|
-
expect(component.selectedDays.includes(2)).toBeTrue();
|
|
60
|
-
expect(component.selectedDays.includes(5)).toBeTrue();
|
|
61
|
-
|
|
62
|
-
component.daySelectionChange(false, 2);
|
|
63
|
-
expect(component.selectedDays.includes(2)).toBeFalse();
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
it('should set Default Values', () => {
|
|
67
|
-
component.setToDefaultValues();
|
|
68
|
-
expect(component.selectedDays).toEqual([0]);
|
|
69
|
-
expect(component.selectedMonths).toEqual([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]);
|
|
70
|
-
expect(component.selectedQuarter).toEqual(0);
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
it('is frequency change Tab working for weekly', () => {
|
|
74
|
-
component.changeTab('weekly');
|
|
75
|
-
expect(component.frequencyTab).toEqual('weekly');
|
|
76
|
-
component.savedFrequencies = [0]
|
|
77
|
-
component.savedFrequencyTab = 'weekly';
|
|
78
|
-
expect(component.savedFrequencies).toEqual(component.selectedDays);
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
it('is frequency change Tab working for months', () => {
|
|
82
|
-
component.changeTab('monthly');
|
|
83
|
-
expect(component.frequencyTab).toEqual('monthly');
|
|
84
|
-
component.savedFrequencies = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
|
|
85
|
-
component.savedFrequencyTab = 'monthly';
|
|
86
|
-
expect(component.savedFrequencies).toEqual(component.selectedMonths);
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
it('is frequency change Tab working for quarterly', () => {
|
|
90
|
-
component.changeTab('quarterly');
|
|
91
|
-
expect(component.frequencyTab).toEqual('quarterly');
|
|
92
|
-
component.savedFrequencies = 0;
|
|
93
|
-
component.savedFrequencyTab = 'quarterly';
|
|
94
|
-
expect(component.savedFrequencies).toEqual(component.selectedQuarter);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
it('month Selection Change for true', () => {
|
|
98
|
-
component.monthSelectionChange(true, 5);
|
|
99
|
-
component.monthSelectionChange(true, 8);
|
|
100
|
-
expect(component.selectedMonths).toContain(5);
|
|
101
|
-
expect(component.selectedMonths).toContain(8);
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
it('month Selection Change for false', () => {
|
|
105
|
-
component.monthSelectionChange(false, 2);
|
|
106
|
-
component.monthSelectionChange(false, 6);
|
|
107
|
-
expect(component.selectedMonths).not.toContain(2);
|
|
108
|
-
expect(component.selectedMonths).not.toContain(6);
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
it('quarter Selection Change', () => {
|
|
112
|
-
component.quarterSelectionChange(true, 2);
|
|
113
|
-
expect(component.selectedQuarter).toEqual(2);
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
it('quarter Selection Change', () => {
|
|
117
|
-
component.quarterSelectionChange(true, 0);
|
|
118
|
-
expect(component.selectedQuarter).toEqual(0);
|
|
119
|
-
});
|
|
120
|
-
});
|
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core';
|
|
2
|
-
import { DashboardFooterConfig } from '../../ui-kit/dashboard-footer/dashboard-footer-config';
|
|
3
|
-
import { SnackBarService } from '../../ui-kit/snack-bar/snack-bar.service';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'app-frequency',
|
|
8
|
-
templateUrl: './frequency.component.html',
|
|
9
|
-
styleUrls: ['./frequency.component.less']
|
|
10
|
-
})
|
|
11
|
-
export class FrequencyComponent implements OnInit,OnChanges {
|
|
12
|
-
animation = true;
|
|
13
|
-
@Input() savedFrequencyTab: string | undefined;
|
|
14
|
-
monthlyDate = 1;
|
|
15
|
-
quarterlyDate = 1;
|
|
16
|
-
@Input() savedFrequencies: any;
|
|
17
|
-
@Input() selectedDate: any;
|
|
18
|
-
frequencyTab = 'weekly';
|
|
19
|
-
showFrequency = true;
|
|
20
|
-
dayNames = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
|
|
21
|
-
monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
22
|
-
quarters = ['January, April, July, October', 'February, May, August, November', 'March, June, September, December'];
|
|
23
|
-
selectedDays: any[] = [0];
|
|
24
|
-
selectedMonths: any[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
|
|
25
|
-
selectedQuarter = 0;
|
|
26
|
-
@Output() closeFrequencyPopup = new EventEmitter<string>();
|
|
27
|
-
@Output() saveFrequency = new EventEmitter<any>();
|
|
28
|
-
footerDetails: DashboardFooterConfig = {
|
|
29
|
-
selectedData: [],
|
|
30
|
-
nonRemovableList:[],
|
|
31
|
-
displayElementKey: '',
|
|
32
|
-
elementId: '',
|
|
33
|
-
singularText: '',
|
|
34
|
-
pluralText: '',
|
|
35
|
-
showFrequency: true,
|
|
36
|
-
frequencyText: 'You have selected a <strong>' + this.frequencyTab + '</strong> frequency.',
|
|
37
|
-
isDisabled: false
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
showRadio = true;
|
|
41
|
-
constructor(private snackBar:SnackBarService) { }
|
|
42
|
-
ngOnChanges(){
|
|
43
|
-
this.savedFrequencies = [...new Set(this.savedFrequencies)]
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
ngOnInit(): void {
|
|
47
|
-
this.animation = true;
|
|
48
|
-
setTimeout(() => {
|
|
49
|
-
this.animation = false;
|
|
50
|
-
}, 300);
|
|
51
|
-
if (this.savedFrequencyTab) {
|
|
52
|
-
this.changeTab(this.savedFrequencyTab);
|
|
53
|
-
}
|
|
54
|
-
if (this.selectedDate) {
|
|
55
|
-
switch (this.savedFrequencyTab) {
|
|
56
|
-
case 'weekly':
|
|
57
|
-
this.selectedDays = [...new Set(this.savedFrequencies)]
|
|
58
|
-
break;
|
|
59
|
-
case 'monthly':
|
|
60
|
-
this.monthlyDate = this.selectedDate;
|
|
61
|
-
this.selectedMonths = [...new Set(this.savedFrequencies)]
|
|
62
|
-
|
|
63
|
-
break;
|
|
64
|
-
case 'quarterly':
|
|
65
|
-
this.showRadio = false;
|
|
66
|
-
setTimeout(() => {
|
|
67
|
-
this.showRadio = true
|
|
68
|
-
}, 100);
|
|
69
|
-
this.quarterlyDate = this.selectedDate
|
|
70
|
-
this.selectedQuarter = this.savedFrequencies;
|
|
71
|
-
|
|
72
|
-
break;
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
closeFrequency() {
|
|
79
|
-
this.closeFrequencyPopup.emit();
|
|
80
|
-
}
|
|
81
|
-
daySelectionChange(event: any, index: any) {
|
|
82
|
-
if (event) { //checkbox was selected
|
|
83
|
-
this.selectedDays.push(index);
|
|
84
|
-
} else {
|
|
85
|
-
let unselectedElementIndex = this.selectedDays.indexOf(index);
|
|
86
|
-
this.selectedDays.splice(unselectedElementIndex, 1);
|
|
87
|
-
}
|
|
88
|
-
this.checkFrequencyValidity();
|
|
89
|
-
}
|
|
90
|
-
monthSelectionChange(event: any, index: any) {
|
|
91
|
-
if (event) {
|
|
92
|
-
this.selectedMonths.push(index);
|
|
93
|
-
} else {
|
|
94
|
-
let unselectedElementIndex = this.selectedMonths.indexOf(index);
|
|
95
|
-
this.selectedMonths.splice(unselectedElementIndex, 1);
|
|
96
|
-
}
|
|
97
|
-
this.checkDateValidity(this.monthlyDate,'monthly')
|
|
98
|
-
this.checkFrequencyValidity();
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
quarterSelectionChange(event: any, index: any) {
|
|
102
|
-
this.selectedQuarter = index;
|
|
103
|
-
this.checkDateValidity(this.quarterlyDate,'quarterly');
|
|
104
|
-
this.checkFrequencyValidity();
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
changeTab(tabValue: string) {
|
|
108
|
-
this.frequencyTab = tabValue;
|
|
109
|
-
this.footerDetails.frequencyText = 'You have selected a <strong>' + this.frequencyTab + '</strong> frequency.';
|
|
110
|
-
this.footerDetails.isDisabled = false;
|
|
111
|
-
this.setToDefaultValues()
|
|
112
|
-
if (this.frequencyTab === this.savedFrequencyTab) {
|
|
113
|
-
switch (this.frequencyTab) {
|
|
114
|
-
case 'weekly': {
|
|
115
|
-
this.selectedDays = [...this.savedFrequencies];
|
|
116
|
-
this.monthlyDate = 1;
|
|
117
|
-
this.quarterlyDate = 1;
|
|
118
|
-
break;
|
|
119
|
-
}
|
|
120
|
-
case 'monthly': {
|
|
121
|
-
this.selectedMonths = [...this.savedFrequencies];
|
|
122
|
-
this.monthlyDate = this.selectedDate;
|
|
123
|
-
this.quarterlyDate = 1;
|
|
124
|
-
this.checkDateValidity(this.monthlyDate,'monthly')
|
|
125
|
-
break;
|
|
126
|
-
}
|
|
127
|
-
case 'quarterly': {
|
|
128
|
-
this.selectedQuarter = this.savedFrequencies;
|
|
129
|
-
this.quarterlyDate = this.selectedDate;
|
|
130
|
-
this.monthlyDate = 1;
|
|
131
|
-
this.checkDateValidity(this.quarterlyDate,'quarterly')
|
|
132
|
-
break;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
setToDefaultValues() {
|
|
139
|
-
this.selectedDays = [0];
|
|
140
|
-
this.selectedMonths = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
|
|
141
|
-
this.selectedQuarter = 0;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
submitFrequency() {
|
|
145
|
-
let stringVal = "Every ";
|
|
146
|
-
let frequencies;
|
|
147
|
-
let selectedDate = 1;
|
|
148
|
-
switch (this.frequencyTab) {
|
|
149
|
-
case 'weekly': {
|
|
150
|
-
if (this.selectedDays.length > 0) {
|
|
151
|
-
this.selectedDays.sort();
|
|
152
|
-
frequencies = this.selectedDays;
|
|
153
|
-
this.selectedDays.forEach((dayIndex, index) => {
|
|
154
|
-
stringVal += index === 0 ? this.dayNames[dayIndex] : ', ' + this.dayNames[dayIndex];
|
|
155
|
-
})
|
|
156
|
-
} else {
|
|
157
|
-
// nothing was selected
|
|
158
|
-
this.closeFrequency();
|
|
159
|
-
}
|
|
160
|
-
break;
|
|
161
|
-
}
|
|
162
|
-
case 'monthly': {
|
|
163
|
-
stringVal = " of every ";
|
|
164
|
-
if (this.selectedMonths.length > 0) {
|
|
165
|
-
frequencies = this.selectedMonths;
|
|
166
|
-
this.monthNames.forEach((monthNames: string, monthIndex: number) => {
|
|
167
|
-
if (this.selectedMonths.includes(monthIndex)) {
|
|
168
|
-
stringVal += monthIndex === 0 ? monthNames : ', ' + monthNames;
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
})
|
|
172
|
-
let monthDateName;
|
|
173
|
-
if (this.monthlyDate == 1) {
|
|
174
|
-
monthDateName = '1st'
|
|
175
|
-
}
|
|
176
|
-
else if (this.monthlyDate == 2) {
|
|
177
|
-
monthDateName = '2nd'
|
|
178
|
-
}
|
|
179
|
-
else if (this.monthlyDate == 3) {
|
|
180
|
-
monthDateName = '3rd'
|
|
181
|
-
}
|
|
182
|
-
else {
|
|
183
|
-
monthDateName = this.monthlyDate + 'th'
|
|
184
|
-
}
|
|
185
|
-
stringVal = monthDateName + stringVal;
|
|
186
|
-
selectedDate = this.monthlyDate;
|
|
187
|
-
} else {
|
|
188
|
-
// nothing was selected
|
|
189
|
-
this.closeFrequency();
|
|
190
|
-
}
|
|
191
|
-
break;
|
|
192
|
-
}
|
|
193
|
-
case 'quarterly': {
|
|
194
|
-
stringVal = " of every ";
|
|
195
|
-
|
|
196
|
-
if (this.selectedQuarter >= 0) {
|
|
197
|
-
frequencies = this.selectedQuarter;
|
|
198
|
-
stringVal += this.quarters[this.selectedQuarter];
|
|
199
|
-
selectedDate = this.quarterlyDate;
|
|
200
|
-
let monthDateName;
|
|
201
|
-
if (this.quarterlyDate == 1) {
|
|
202
|
-
monthDateName = '1st'
|
|
203
|
-
}
|
|
204
|
-
else if (this.quarterlyDate == 2) {
|
|
205
|
-
monthDateName = '2nd'
|
|
206
|
-
}
|
|
207
|
-
else if (this.quarterlyDate == 3) {
|
|
208
|
-
monthDateName = '3rd'
|
|
209
|
-
}
|
|
210
|
-
else {
|
|
211
|
-
monthDateName = this.quarterlyDate + 'th'
|
|
212
|
-
}
|
|
213
|
-
stringVal = monthDateName + stringVal;
|
|
214
|
-
selectedDate = this.quarterlyDate;
|
|
215
|
-
} else {
|
|
216
|
-
// nothing was selected
|
|
217
|
-
this.closeFrequency();
|
|
218
|
-
}
|
|
219
|
-
break;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
this.saveFrequency.emit({
|
|
223
|
-
frequencyString: stringVal,
|
|
224
|
-
frequencyType: this.frequencyTab,
|
|
225
|
-
frequencies: frequencies,
|
|
226
|
-
selectedDate
|
|
227
|
-
})
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
checkDateValidity(date:number, type:string){
|
|
231
|
-
if(date>31 || date<1){
|
|
232
|
-
this.snackBar.show('Select valid date.','alert');
|
|
233
|
-
this.footerDetails.isDisabled = true;
|
|
234
|
-
return
|
|
235
|
-
}else{
|
|
236
|
-
this.footerDetails.isDisabled = false;
|
|
237
|
-
}
|
|
238
|
-
const monthList=[{name:'January',maxDays:31,value:0},{name:'February',maxDays:28,value:1},{name:'March',maxDays:31,value:2},
|
|
239
|
-
{name:'April',maxDays:30,value:3},{name:'May',maxDays:31,value:4},{name:'June',maxDays:30,value:5},
|
|
240
|
-
{name:'July',maxDays:31,value:6},{name:'August',maxDays:31,value:7},{name:'September',maxDays:30,value:8},
|
|
241
|
-
{name:'October',maxDays:31,value:9},{name:'November',maxDays:30,value:10},{name:'December',maxDays:31,value:11}]
|
|
242
|
-
switch (type) {
|
|
243
|
-
case 'monthly':
|
|
244
|
-
if(this.selectedMonths.length==1){
|
|
245
|
-
const index = monthList.findIndex((ele:any)=>ele.value==this.selectedMonths[0]);
|
|
246
|
-
if(date<=monthList[index].maxDays){
|
|
247
|
-
this.footerDetails.isDisabled = false;
|
|
248
|
-
|
|
249
|
-
}else{
|
|
250
|
-
this.snackBar.show('Select valid date.','alert');
|
|
251
|
-
this.footerDetails.isDisabled = true;
|
|
252
|
-
}
|
|
253
|
-
}else if(this.selectedMonths.length==0){
|
|
254
|
-
this.footerDetails.isDisabled = true;
|
|
255
|
-
}else{
|
|
256
|
-
this.footerDetails.isDisabled = false;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
break;
|
|
260
|
-
default:
|
|
261
|
-
this.footerDetails.isDisabled = false;
|
|
262
|
-
return true;
|
|
263
|
-
break;
|
|
264
|
-
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
checkFrequencyValidity(){
|
|
270
|
-
switch (this.frequencyTab) {
|
|
271
|
-
case 'weekly': {
|
|
272
|
-
if (this.selectedDays.length > 0) {
|
|
273
|
-
this.footerDetails.isDisabled = false;
|
|
274
|
-
|
|
275
|
-
} else {
|
|
276
|
-
this.footerDetails.isDisabled = true;
|
|
277
|
-
}
|
|
278
|
-
break;
|
|
279
|
-
}
|
|
280
|
-
case 'monthly': {
|
|
281
|
-
|
|
282
|
-
if (this.selectedMonths.length > 0) {
|
|
283
|
-
this.footerDetails.isDisabled = false;
|
|
284
|
-
|
|
285
|
-
} else {
|
|
286
|
-
this.footerDetails.isDisabled = true;
|
|
287
|
-
}
|
|
288
|
-
break;
|
|
289
|
-
}
|
|
290
|
-
case 'quarterly': {
|
|
291
|
-
|
|
292
|
-
if (this.selectedQuarter >= 0){
|
|
293
|
-
this.footerDetails.isDisabled = false;
|
|
294
|
-
|
|
295
|
-
} else {
|
|
296
|
-
this.footerDetails.isDisabled = true;
|
|
297
|
-
}
|
|
298
|
-
break;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Pipe({
|
|
4
|
-
name: 'filter'
|
|
5
|
-
})
|
|
6
|
-
export class FilterPipe implements PipeTransform {
|
|
7
|
-
|
|
8
|
-
transform(items: any[], searchText: string): any[] {
|
|
9
|
-
if (!items) {
|
|
10
|
-
return [];
|
|
11
|
-
}
|
|
12
|
-
if (!searchText) {
|
|
13
|
-
return items;
|
|
14
|
-
}
|
|
15
|
-
searchText = searchText.toLowerCase();
|
|
16
|
-
if(items?.length){
|
|
17
|
-
return items.filter((it: any) => {
|
|
18
|
-
return JSON.stringify(it).toLowerCase().includes(searchText);
|
|
19
|
-
});
|
|
20
|
-
}else{
|
|
21
|
-
return [];
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
}
|