@annalib/anna-core 0.0.3 → 0.0.6
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/annalib-anna-core.d.ts +5 -0
- package/esm2020/annalib-anna-core.mjs +5 -0
- package/esm2020/lib/anna-core-shared-lib/anna-core-shared-lib.module.mjs +59 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.mjs +15 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.mjs +15 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.mjs +22 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.mjs +15 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.mjs +21 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.mjs +15 -0
- package/esm2020/lib/anna-core-shared-lib/constants/shared.constant.mjs +34 -0
- package/esm2020/lib/anna-core-shared-lib/index.mjs +2 -0
- package/esm2020/lib/anna-core-shared-lib/models/anna-generic-data-type.model.mjs +2 -0
- package/esm2020/lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.mjs +2 -0
- package/esm2020/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.mjs +3 -0
- package/esm2020/lib/anna-core-shared-lib/models/anna-tooltip.model.mjs +26 -0
- package/esm2020/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.mjs +31 -0
- package/esm2020/lib/anna-core-shared-lib/public-api.mjs +25 -0
- package/esm2020/lib/anna-core-shared-lib/services/anna-date-time-format.service.mjs +180 -0
- package/esm2020/lib/anna-core-shared-lib/services/anna-filter.service.mjs +536 -0
- package/esm2020/lib/anna-core-shared-lib/services/anna-generic-table.service.mjs +52 -0
- package/esm2020/lib/anna-core-shared-lib/services/anna-global-config.service.mjs +133 -0
- package/esm2020/lib/anna-core-shared-lib/services/anna-sort.service.mjs +185 -0
- package/esm2020/lib/anna-dropdown-lib/anna-dropdown-lib.module.mjs +43 -0
- package/esm2020/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.mjs +76 -0
- package/esm2020/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.mjs +360 -0
- package/esm2020/lib/anna-dropdown-lib/index.mjs +2 -0
- package/esm2020/lib/anna-dropdown-lib/public-api.mjs +6 -0
- package/esm2020/lib/anna-generic-table-lib/anna-generic-table-lib.module.mjs +86 -0
- package/esm2020/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.mjs +997 -0
- package/esm2020/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.mjs +125 -0
- package/esm2020/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.mjs +357 -0
- package/esm2020/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/anna-fixed-row-size-table-virtual-scroll-strategy.directive.mjs +189 -0
- package/esm2020/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.mjs +2 -0
- package/esm2020/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.mjs +178 -0
- package/esm2020/lib/anna-generic-table-lib/directives/anna-virtual-table/index.mjs +2 -0
- package/esm2020/lib/anna-generic-table-lib/index.mjs +2 -0
- package/esm2020/lib/anna-generic-table-lib/public-api.mjs +10 -0
- package/esm2020/public-api.mjs +7 -0
- package/esm2020/src/lib/anna-core-shared-lib/anna-core-shared-lib.module.mjs +59 -0
- package/esm2020/src/lib/anna-core-shared-lib/annalib-anna-core-src-lib-anna-core-shared-lib.mjs +5 -0
- package/esm2020/src/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.mjs +15 -0
- package/esm2020/src/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.mjs +15 -0
- package/esm2020/src/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.mjs +22 -0
- package/esm2020/src/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.mjs +15 -0
- package/esm2020/src/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.mjs +21 -0
- package/esm2020/src/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.mjs +15 -0
- package/esm2020/src/lib/anna-core-shared-lib/constants/shared.constant.mjs +34 -0
- package/esm2020/src/lib/anna-core-shared-lib/models/anna-generic-data-type.model.mjs +2 -0
- package/esm2020/src/lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.mjs +2 -0
- package/esm2020/src/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.mjs +3 -0
- package/esm2020/src/lib/anna-core-shared-lib/models/anna-tooltip.model.mjs +26 -0
- package/esm2020/src/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.mjs +31 -0
- package/esm2020/src/lib/anna-core-shared-lib/public-api.mjs +25 -0
- package/esm2020/src/lib/anna-core-shared-lib/services/anna-date-time-format.service.mjs +180 -0
- package/esm2020/src/lib/anna-core-shared-lib/services/anna-filter.service.mjs +536 -0
- package/esm2020/src/lib/anna-core-shared-lib/services/anna-generic-table.service.mjs +52 -0
- package/esm2020/src/lib/anna-core-shared-lib/services/anna-global-config.service.mjs +133 -0
- package/esm2020/src/lib/anna-core-shared-lib/services/anna-sort.service.mjs +185 -0
- package/esm2020/src/lib/anna-dropdown-lib/anna-dropdown-lib.module.mjs +43 -0
- package/esm2020/src/lib/anna-dropdown-lib/annalib-anna-core-src-lib-anna-dropdown-lib.mjs +5 -0
- package/esm2020/src/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.mjs +76 -0
- package/esm2020/src/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.mjs +360 -0
- package/esm2020/src/lib/anna-dropdown-lib/public-api.mjs +6 -0
- package/esm2020/src/lib/anna-generic-table-lib/anna-generic-table-lib.module.mjs +86 -0
- package/esm2020/src/lib/anna-generic-table-lib/annalib-anna-core-src-lib-anna-generic-table-lib.mjs +5 -0
- package/esm2020/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.mjs +997 -0
- package/esm2020/src/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.mjs +125 -0
- package/esm2020/src/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.mjs +357 -0
- package/esm2020/src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/anna-fixed-row-size-table-virtual-scroll-strategy.directive.mjs +189 -0
- package/esm2020/src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.mjs +2 -0
- package/esm2020/src/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.mjs +178 -0
- package/esm2020/src/lib/anna-generic-table-lib/directives/anna-virtual-table/index.mjs +2 -0
- package/esm2020/src/lib/anna-generic-table-lib/public-api.mjs +10 -0
- package/fesm2015/annalib-anna-core-src-lib-anna-core-shared-lib.mjs +1294 -0
- package/fesm2015/annalib-anna-core-src-lib-anna-core-shared-lib.mjs.map +1 -0
- package/fesm2015/annalib-anna-core-src-lib-anna-dropdown-lib.mjs +474 -0
- package/fesm2015/annalib-anna-core-src-lib-anna-dropdown-lib.mjs.map +1 -0
- package/fesm2015/annalib-anna-core-src-lib-anna-generic-table-lib.mjs +1895 -0
- package/fesm2015/annalib-anna-core-src-lib-anna-generic-table-lib.mjs.map +1 -0
- package/fesm2015/annalib-anna-core.mjs +3637 -0
- package/fesm2015/annalib-anna-core.mjs.map +1 -0
- package/fesm2020/annalib-anna-core-src-lib-anna-core-shared-lib.mjs +1294 -0
- package/fesm2020/annalib-anna-core-src-lib-anna-core-shared-lib.mjs.map +1 -0
- package/fesm2020/annalib-anna-core-src-lib-anna-dropdown-lib.mjs +472 -0
- package/fesm2020/annalib-anna-core-src-lib-anna-dropdown-lib.mjs.map +1 -0
- package/fesm2020/annalib-anna-core-src-lib-anna-generic-table-lib.mjs +1894 -0
- package/fesm2020/annalib-anna-core-src-lib-anna-generic-table-lib.mjs.map +1 -0
- package/fesm2020/annalib-anna-core.mjs +3634 -0
- package/fesm2020/annalib-anna-core.mjs.map +1 -0
- package/lib/anna-core-shared-lib/anna-core-shared-lib.module.d.ts +14 -0
- package/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.d.ts +8 -0
- package/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.d.ts +8 -0
- package/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.d.ts +11 -0
- package/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.d.ts +8 -0
- package/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.d.ts +11 -0
- package/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.d.ts +8 -0
- package/lib/anna-core-shared-lib/constants/shared.constant.d.ts +32 -0
- package/lib/anna-core-shared-lib/index.d.ts +1 -0
- package/lib/anna-core-shared-lib/models/anna-generic-data-type.model.d.ts +8 -0
- package/{src/lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.ts → lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.d.ts} +9 -21
- package/{src/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.ts → lib/anna-core-shared-lib/models/anna-non-editable-gt-models.d.ts} +17 -27
- package/lib/anna-core-shared-lib/models/anna-tooltip.model.d.ts +21 -0
- package/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.d.ts +9 -0
- package/{src/lib/anna-core-shared-lib/public-api.ts → lib/anna-core-shared-lib/public-api.d.ts} +0 -11
- package/lib/anna-core-shared-lib/services/anna-date-time-format.service.d.ts +25 -0
- package/lib/anna-core-shared-lib/services/anna-filter.service.d.ts +68 -0
- package/lib/anna-core-shared-lib/services/anna-generic-table.service.d.ts +14 -0
- package/lib/anna-core-shared-lib/services/anna-global-config.service.d.ts +21 -0
- package/lib/anna-core-shared-lib/services/anna-sort.service.d.ts +23 -0
- package/lib/anna-dropdown-lib/anna-dropdown-lib.module.d.ts +11 -0
- package/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.d.ts +29 -0
- package/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.d.ts +67 -0
- package/lib/anna-dropdown-lib/index.d.ts +1 -0
- package/{src/lib/anna-dropdown-lib/public-api.ts → lib/anna-dropdown-lib/public-api.d.ts} +1 -4
- package/lib/anna-generic-table-lib/anna-generic-table-lib.module.d.ts +21 -0
- package/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.d.ts +173 -0
- package/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.d.ts +27 -0
- package/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.d.ts +141 -0
- package/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/anna-fixed-row-size-table-virtual-scroll-strategy.directive.d.ts +89 -0
- package/{src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.ts → lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.d.ts} +0 -0
- package/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.d.ts +45 -0
- package/{src/lib/anna-generic-table-lib/directives/anna-virtual-table/index.ts → lib/anna-generic-table-lib/directives/anna-virtual-table/index.d.ts} +0 -0
- package/lib/anna-generic-table-lib/index.d.ts +1 -0
- package/{src/lib/anna-generic-table-lib/public-api.ts → lib/anna-generic-table-lib/public-api.d.ts} +0 -5
- package/package.json +61 -17
- package/{src/public-api.ts → public-api.d.ts} +0 -5
- package/src/lib/anna-core-shared-lib/anna-core-shared-lib.module.d.ts +14 -0
- package/src/lib/anna-core-shared-lib/annalib-anna-core-src-lib-anna-core-shared-lib.d.ts +5 -0
- package/src/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.d.ts +8 -0
- package/src/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.d.ts +8 -0
- package/src/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.d.ts +11 -0
- package/src/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.d.ts +8 -0
- package/src/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.d.ts +11 -0
- package/src/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.d.ts +8 -0
- package/src/lib/anna-core-shared-lib/constants/shared.constant.d.ts +32 -0
- package/src/lib/anna-core-shared-lib/models/anna-generic-data-type.model.d.ts +8 -0
- package/src/lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.d.ts +95 -0
- package/src/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.d.ts +70 -0
- package/src/lib/anna-core-shared-lib/models/anna-tooltip.model.d.ts +21 -0
- package/src/lib/anna-core-shared-lib/package.json +10 -0
- package/src/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.d.ts +9 -0
- package/src/lib/anna-core-shared-lib/public-api.d.ts +18 -0
- package/src/lib/anna-core-shared-lib/services/anna-date-time-format.service.d.ts +25 -0
- package/src/lib/anna-core-shared-lib/services/anna-filter.service.d.ts +68 -0
- package/src/lib/anna-core-shared-lib/services/anna-generic-table.service.d.ts +14 -0
- package/src/lib/anna-core-shared-lib/services/anna-global-config.service.d.ts +21 -0
- package/src/lib/anna-core-shared-lib/services/anna-sort.service.d.ts +23 -0
- package/src/lib/anna-dropdown-lib/anna-dropdown-lib.module.d.ts +11 -0
- package/src/lib/anna-dropdown-lib/annalib-anna-core-src-lib-anna-dropdown-lib.d.ts +5 -0
- package/src/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.d.ts +29 -0
- package/src/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.d.ts +67 -0
- package/src/lib/anna-dropdown-lib/package.json +10 -0
- package/src/lib/anna-dropdown-lib/public-api.d.ts +3 -0
- package/src/lib/anna-generic-table-lib/anna-generic-table-lib.module.d.ts +21 -0
- package/src/lib/anna-generic-table-lib/annalib-anna-core-src-lib-anna-generic-table-lib.d.ts +5 -0
- package/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.d.ts +173 -0
- package/src/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.d.ts +27 -0
- package/src/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.d.ts +141 -0
- package/src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/anna-fixed-row-size-table-virtual-scroll-strategy.directive.d.ts +89 -0
- package/src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.d.ts +1 -0
- package/src/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.d.ts +45 -0
- package/src/lib/anna-generic-table-lib/directives/anna-virtual-table/index.d.ts +1 -0
- package/src/lib/anna-generic-table-lib/package.json +10 -0
- package/src/lib/anna-generic-table-lib/public-api.d.ts +6 -0
- package/.browserslistrc +0 -16
- package/karma.conf.js +0 -44
- package/ng-package.json +0 -10
- package/src/lib/anna-core-shared-lib/anna-core-shared-lib.module.ts +0 -42
- package/src/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.html +0 -22
- package/src/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.scss +0 -0
- package/src/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.spec.ts +0 -25
- package/src/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.ts +0 -15
- package/src/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.html +0 -20
- package/src/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.scss +0 -0
- package/src/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.spec.ts +0 -25
- package/src/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.ts +0 -15
- package/src/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.html +0 -3
- package/src/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.scss +0 -16
- package/src/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.spec.ts +0 -24
- package/src/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.ts +0 -20
- package/src/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.html +0 -23
- package/src/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.scss +0 -0
- package/src/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.spec.ts +0 -25
- package/src/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.ts +0 -15
- package/src/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.html +0 -15
- package/src/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.scss +0 -0
- package/src/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.spec.ts +0 -25
- package/src/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.ts +0 -19
- package/src/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.html +0 -14
- package/src/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.scss +0 -0
- package/src/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.spec.ts +0 -25
- package/src/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.ts +0 -15
- package/src/lib/anna-core-shared-lib/constants/shared.constant.ts +0 -34
- package/src/lib/anna-core-shared-lib/index.ts +0 -1
- package/src/lib/anna-core-shared-lib/models/anna-generic-data-type.model.ts +0 -10
- package/src/lib/anna-core-shared-lib/models/anna-tooltip.model.ts +0 -36
- package/src/lib/anna-core-shared-lib/ng-package.json +0 -5
- package/src/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.ts +0 -26
- package/src/lib/anna-core-shared-lib/scss/_colors.scss +0 -107
- package/src/lib/anna-core-shared-lib/scss/_filters.scss +0 -486
- package/src/lib/anna-core-shared-lib/scss/_fonts.scss +0 -86
- package/src/lib/anna-core-shared-lib/scss/_sort.scss +0 -81
- package/src/lib/anna-core-shared-lib/services/anna-date-time-format.service.ts +0 -197
- package/src/lib/anna-core-shared-lib/services/anna-filter.service.ts +0 -616
- package/src/lib/anna-core-shared-lib/services/anna-generic-table.service.ts +0 -50
- package/src/lib/anna-core-shared-lib/services/anna-global-config.service.ts +0 -170
- package/src/lib/anna-core-shared-lib/services/anna-sort.service.ts +0 -200
- package/src/lib/anna-dropdown-lib/anna-dropdown-lib.module.ts +0 -31
- package/src/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.html +0 -29
- package/src/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.scss +0 -122
- package/src/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.spec.ts +0 -24
- package/src/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.ts +0 -76
- package/src/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.html +0 -129
- package/src/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.scss +0 -275
- package/src/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.spec.ts +0 -24
- package/src/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.ts +0 -410
- package/src/lib/anna-dropdown-lib/index.ts +0 -1
- package/src/lib/anna-dropdown-lib/ng-package.json +0 -5
- package/src/lib/anna-generic-table-lib/anna-generic-table-lib.module.ts +0 -56
- package/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.html +0 -848
- package/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.scss +0 -488
- package/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.spec.ts +0 -25
- package/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.ts +0 -1100
- package/src/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.html +0 -47
- package/src/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.scss +0 -1
- package/src/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.spec.ts +0 -24
- package/src/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.ts +0 -126
- package/src/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.html +0 -13
- package/src/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.scss +0 -88
- package/src/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.spec.ts +0 -25
- package/src/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.ts +0 -460
- package/src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/anna-fixed-row-size-table-virtual-scroll-strategy.directive.ts +0 -237
- package/src/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.ts +0 -204
- package/src/lib/anna-generic-table-lib/index.ts +0 -1
- package/src/lib/anna-generic-table-lib/ng-package.json +0 -5
- package/src/test.ts +0 -27
- package/tsconfig.lib.json +0 -16
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
|
@@ -1,1100 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// Angular import statements
|
|
3
|
-
import { Component, OnInit, Input, ViewChildren, QueryList, Output, EventEmitter, SimpleChanges, OnChanges, ChangeDetectorRef } from '@angular/core';
|
|
4
|
-
|
|
5
|
-
// Third party import statements
|
|
6
|
-
import moment from "moment";
|
|
7
|
-
import { NgbDate } from '@ng-bootstrap/ng-bootstrap';
|
|
8
|
-
import { Options } from '@angular-slider/ngx-slider';
|
|
9
|
-
import { cloneDeep, isEqual, map, uniq } from "lodash-es";
|
|
10
|
-
|
|
11
|
-
// User defined import statements
|
|
12
|
-
import { AnnaSortComponent } from '../anna-sort/anna-sort.component';
|
|
13
|
-
|
|
14
|
-
//sub-entries of anna lib import statement
|
|
15
|
-
import { SellerGroupHierarchy,IWeekCalendar,radioButtonModel,AnnaSortService,AnnaDateTimeFormatService, NgbDateType, AnnaFilterService, IGtGeneralConfig, IGtTableHeader, ITotalRowInfo, AnnaGenericTableService } from "@annalib/anna-core/src/lib/anna-core-shared-lib";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
@Component({
|
|
19
|
-
selector: 'anna-core-non-editable-generic-table-lib',
|
|
20
|
-
templateUrl: './anna-non-editable-generic-table.component.html',
|
|
21
|
-
styleUrls: ['./anna-non-editable-generic-table.component.scss']
|
|
22
|
-
})
|
|
23
|
-
export class AnnaNonEditableGenericTableComponent implements OnInit, OnChanges {
|
|
24
|
-
|
|
25
|
-
@Input() showSkeletonLoading: boolean;
|
|
26
|
-
@Input() tableHeaders: IGtTableHeader[];
|
|
27
|
-
@Input() tableData: any[];
|
|
28
|
-
@Input() clonedTableData: any[];
|
|
29
|
-
@Input() numberOfSkeletonRows: number[]; //this is not being used.
|
|
30
|
-
@Input() numberOfSkeletonColumns: number[][];
|
|
31
|
-
@Input() gtGeneralConfig: IGtGeneralConfig;
|
|
32
|
-
@Input() totalRowInfo?: ITotalRowInfo[];
|
|
33
|
-
@Input() gtDimension: { rowHeight: number, tableHeight: string, headerHeight: number };
|
|
34
|
-
@Input() tableClass: string;
|
|
35
|
-
@Input() maximumRowsWhichCanBeRenderedWithoutScroll: number = 5;
|
|
36
|
-
|
|
37
|
-
@Output() toggleCheckbox = new EventEmitter();
|
|
38
|
-
@Output() toggleRowCheckbox = new EventEmitter();
|
|
39
|
-
@Output() toggleHeaderCheckbox = new EventEmitter();
|
|
40
|
-
@Output() undoIconClicked = new EventEmitter();
|
|
41
|
-
@Output() filterAppliedToTable = new EventEmitter();
|
|
42
|
-
@Output() sortingAppliedToTable = new EventEmitter();
|
|
43
|
-
@Output() rowClicked = new EventEmitter();
|
|
44
|
-
@Output() radioButtonSelected = new EventEmitter();
|
|
45
|
-
@Output() columnFilterOpened = new EventEmitter();
|
|
46
|
-
@Output() columnFilterClosed = new EventEmitter();
|
|
47
|
-
@Output() gtIconClicked = new EventEmitter();
|
|
48
|
-
@Output() gtSVGIconClicked = new EventEmitter();
|
|
49
|
-
@Output() gtTextActionClicked = new EventEmitter();
|
|
50
|
-
@Output() gtViewDetailClicked = new EventEmitter();
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
tableDataWrapper: any[];
|
|
54
|
-
rowChecked: boolean;
|
|
55
|
-
isAllRowsChecked: boolean;
|
|
56
|
-
noDataWidth: string = "55%";
|
|
57
|
-
markedForCreditStatus: string;
|
|
58
|
-
markedForMGStatus: string;
|
|
59
|
-
|
|
60
|
-
//Sort and Filter
|
|
61
|
-
toolTipdata: any;
|
|
62
|
-
tempTooltipData: any;
|
|
63
|
-
tooltipRadioTextMap: Map<any, any>;
|
|
64
|
-
radioButtons: any[];
|
|
65
|
-
tooltip: any;
|
|
66
|
-
clonedTooltipData: any;
|
|
67
|
-
clonedTooltipSelectedMapData: any;
|
|
68
|
-
searchBar: string;
|
|
69
|
-
disableClearAllBtn: boolean = true;
|
|
70
|
-
disableColumnClearAllBtn: boolean = true;
|
|
71
|
-
allSelected = 0;
|
|
72
|
-
showAll: boolean;
|
|
73
|
-
disableCheckboxApply: boolean;
|
|
74
|
-
disableSliderApplyButton: boolean;
|
|
75
|
-
disableTimeApplyButton: boolean;
|
|
76
|
-
|
|
77
|
-
// Slider Filter
|
|
78
|
-
sliderMinValue: number;
|
|
79
|
-
sliderMaxValue: number;
|
|
80
|
-
options: Options = {
|
|
81
|
-
floor: 0,
|
|
82
|
-
ceil: 0,
|
|
83
|
-
step: 0.1
|
|
84
|
-
};
|
|
85
|
-
sliderValue: { min: number, max: number };
|
|
86
|
-
sliderFilterTextBoxStep: string;
|
|
87
|
-
|
|
88
|
-
// Calendar Filter
|
|
89
|
-
calendarMinEnabledDate: NgbDateType;
|
|
90
|
-
calendarMaxEnabledDate: NgbDateType;
|
|
91
|
-
selectedMinDate: NgbDateType;
|
|
92
|
-
selectedMaxDate: NgbDateType;
|
|
93
|
-
|
|
94
|
-
//Week Filter
|
|
95
|
-
multiWeekPickerConfig: IWeekCalendar;
|
|
96
|
-
|
|
97
|
-
//Time Filter
|
|
98
|
-
selectedFromTime: any[];
|
|
99
|
-
selectedToTime: any[];
|
|
100
|
-
clonedSelectedFromTime: any;
|
|
101
|
-
clonedSelectedToTime: any;
|
|
102
|
-
disableTimeFilterApplyBtn: boolean;
|
|
103
|
-
tableColumns: string[] = [];
|
|
104
|
-
totalRowColumns: string[] = null;
|
|
105
|
-
showMultiTimeCheckbox: boolean;
|
|
106
|
-
showZeroTimeCheckbox: boolean;
|
|
107
|
-
showEnterTimeCheckbox: boolean;
|
|
108
|
-
multiTimeCheckboxChecked: boolean;
|
|
109
|
-
zeroTimeCheckboxChecked: boolean;
|
|
110
|
-
enterTimeCheckboxChecked: boolean;
|
|
111
|
-
bindValueFuncCalled: boolean;
|
|
112
|
-
|
|
113
|
-
hierarchyTooltip: { open: () => void; close: () => void; };
|
|
114
|
-
sellerGroupHierarchy: SellerGroupHierarchy[];
|
|
115
|
-
showCheckboxFilterRadioButtons: boolean;
|
|
116
|
-
|
|
117
|
-
@ViewChildren(AnnaSortComponent) sortComponent: QueryList<AnnaSortComponent>;
|
|
118
|
-
isScrolledLeft: boolean = false;
|
|
119
|
-
rowBorderWidth: number = 2;
|
|
120
|
-
PfpIconActiveColor = "#9B1B93"
|
|
121
|
-
PfpIconDisableColor = "rgba(189,189,189,0.5)";
|
|
122
|
-
|
|
123
|
-
constructor(
|
|
124
|
-
private cdRef: ChangeDetectorRef,
|
|
125
|
-
private annaSortService: AnnaSortService,
|
|
126
|
-
public annaDateTimeFormatService: AnnaDateTimeFormatService,
|
|
127
|
-
public annaFilterService: AnnaFilterService,
|
|
128
|
-
private annaGenericTableService: AnnaGenericTableService
|
|
129
|
-
) {
|
|
130
|
-
this.setTooltipRadioNames();
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
ngOnInit() {
|
|
134
|
-
// this.tableData = this.numberOfSkeletonColumns;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
ngOnChanges(changes: SimpleChanges) {
|
|
138
|
-
// console.log("generic");
|
|
139
|
-
// console.log(this.tableHeaders);
|
|
140
|
-
// console.log(JSON.stringify(this.tableData));
|
|
141
|
-
if (this.showSkeletonLoading) {
|
|
142
|
-
this.tableData = this.numberOfSkeletonColumns;
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
this.setInitialValueMapData();
|
|
146
|
-
this.disableEnableEachColumnFilters();
|
|
147
|
-
this.tableColumns = this.tableHeaders.filter(x => x.visible).map(x => x.headerInfo[0].objectKey);
|
|
148
|
-
this.showSkeletonLoading = false;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
//setting table column here as well because while showing skeleton loader, we should show table headers.
|
|
152
|
-
if (changes['tableHeaders'] && changes['tableHeaders'].currentValue) {
|
|
153
|
-
this.tableColumns = this.tableHeaders.filter(x => x.visible).map(x => x.headerInfo[0].objectKey)
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
if (changes['totalRowInfo'] && changes['totalRowInfo'].currentValue) {
|
|
157
|
-
this.totalRowColumns = this.totalRowInfo.map(x => x.colName);
|
|
158
|
-
}
|
|
159
|
-
this.cdRef.detectChanges();
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
trackByFn(index: number) {
|
|
164
|
-
return index;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
setTooltipRadioNames() {
|
|
168
|
-
this.tooltipRadioTextMap = new Map();
|
|
169
|
-
this.tooltipRadioTextMap.set("StartTimeForFilter", "Start Time");
|
|
170
|
-
this.tooltipRadioTextMap.set("EndTimeForFilter", "End Time");
|
|
171
|
-
this.tooltipRadioTextMap.set("start_time_for_filter", "Start Time");
|
|
172
|
-
this.tooltipRadioTextMap.set("end_time_for_filter", "End Time");
|
|
173
|
-
this.tooltipRadioTextMap.set("primaryAEName", "Primary AE");
|
|
174
|
-
this.tooltipRadioTextMap.set("region", "Region");
|
|
175
|
-
this.tooltipRadioTextMap.set("agencyName", "Agency");
|
|
176
|
-
this.tooltipRadioTextMap.set("location", "Location");
|
|
177
|
-
this.tooltipRadioTextMap.set("advertiserName", "Advertiser");
|
|
178
|
-
this.tooltipRadioTextMap.set("productCode", "Product Code");
|
|
179
|
-
this.tooltipRadioTextMap.set("flightStartDate", "Start Date");
|
|
180
|
-
this.tooltipRadioTextMap.set("flightEndDate", "End Date");
|
|
181
|
-
this.tooltipRadioTextMap.set("orderIdAndRevNumber", "STN Order#-Rev#");
|
|
182
|
-
this.tooltipRadioTextMap.set("alternateOrderId", "Buyer Order#");
|
|
183
|
-
this.tooltipRadioTextMap.set("grp", "GRP");
|
|
184
|
-
this.tooltipRadioTextMap.set("cpp", "CPP");
|
|
185
|
-
this.tooltipRadioTextMap.set("imps", "IMPS");
|
|
186
|
-
this.tooltipRadioTextMap.set("cpm", "CPM");
|
|
187
|
-
this.tooltipRadioTextMap.set("offeredMGs", "Offered MG");
|
|
188
|
-
this.tooltipRadioTextMap.set("outstandingPE", "O/S PE");
|
|
189
|
-
this.tooltipRadioTextMap.set("offeredADUs", "Offered ADUs");
|
|
190
|
-
this.tooltipRadioTextMap.set("udDeficitValue", "Pending Audience Delta");
|
|
191
|
-
this.tooltipRadioTextMap.set("startEndTimeMulti", "Time");
|
|
192
|
-
this.tooltipRadioTextMap.set("bookedValue", "Booked");
|
|
193
|
-
this.tooltipRadioTextMap.set("bookedSpots", "Spots");
|
|
194
|
-
this.tooltipRadioTextMap.set("userChanges", "Other changes");
|
|
195
|
-
this.tooltipRadioTextMap.set("inventoryCode", "Inventory Code");
|
|
196
|
-
this.tooltipRadioTextMap.set("program", "Program");
|
|
197
|
-
this.tooltipRadioTextMap.set("agency", "Agency");
|
|
198
|
-
this.tooltipRadioTextMap.set("advertiser", "Advertiser");
|
|
199
|
-
this.tooltipRadioTextMap.set("startDate", "Start Date");
|
|
200
|
-
this.tooltipRadioTextMap.set("endDate", "End Date");
|
|
201
|
-
this.tooltipRadioTextMap.set("rcvPreempt", "Madegood PE");
|
|
202
|
-
this.tooltipRadioTextMap.set("osPreempt", "O/S PE");
|
|
203
|
-
this.tooltipRadioTextMap.set("rcvUnderDly", "Recovered UD");
|
|
204
|
-
this.tooltipRadioTextMap.set("osUnderDly", "O/s Under Dly");
|
|
205
|
-
this.tooltipRadioTextMap.set("primaryAe", "Primary AE");
|
|
206
|
-
this.tooltipRadioTextMap.set("region", "Region");
|
|
207
|
-
this.tooltipRadioTextMap.set("revCode1", "Rev code 1");
|
|
208
|
-
this.tooltipRadioTextMap.set("orderNoRevNo", "STN Order#-Rev#");
|
|
209
|
-
this.tooltipRadioTextMap.set("revCode2", "Rev code 2");
|
|
210
|
-
this.tooltipRadioTextMap.set("revCode3", "Rev code 3");
|
|
211
|
-
this.tooltipRadioTextMap.set("booked", "Booked");
|
|
212
|
-
this.tooltipRadioTextMap.set("spots", "Spots");
|
|
213
|
-
this.tooltipRadioTextMap.set("postedAudPercent", "Posted %");
|
|
214
|
-
this.tooltipRadioTextMap.set("revision", "Revision");
|
|
215
|
-
this.tooltipRadioTextMap.set("productCode", "Product Code");
|
|
216
|
-
this.tooltipRadioTextMap.set("buyerOrderId", "ALT Order#");
|
|
217
|
-
this.tooltipRadioTextMap.set("demo","Demo");
|
|
218
|
-
this.tooltipRadioTextMap.set("postedAdu","Posted ADUs");
|
|
219
|
-
this.tooltipRadioTextMap.set("scheduledAdu","Scheduled ADUs");
|
|
220
|
-
this.tooltipRadioTextMap.set("audienceDeficit","Audience Deficit");
|
|
221
|
-
this.tooltipRadioTextMap.set("postedAudPercent","Posted Audience %");
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
generateTableDataWrapper() {
|
|
225
|
-
this.showSkeletonLoading = true;
|
|
226
|
-
this.tableDataWrapper = [];
|
|
227
|
-
let rowObject: any;
|
|
228
|
-
let columnName: string;
|
|
229
|
-
let columnObject: { [x: string]: any; };
|
|
230
|
-
let columnObjectKey;
|
|
231
|
-
let keysUsedForTableDisplay: string[];
|
|
232
|
-
let keysUsedForColumn: string[];
|
|
233
|
-
let additionalInfoObject: { [x: string]: any; };
|
|
234
|
-
let additionalKeys;
|
|
235
|
-
this.tableData.forEach((obj: { [x: string]: any; }) => {
|
|
236
|
-
rowObject = {};
|
|
237
|
-
keysUsedForTableDisplay = [];
|
|
238
|
-
for (var colNum in this.tableHeaders) {
|
|
239
|
-
columnObject = {};
|
|
240
|
-
if (!this.tableHeaders[colNum].visible) {
|
|
241
|
-
continue;
|
|
242
|
-
}
|
|
243
|
-
columnName = "";
|
|
244
|
-
keysUsedForColumn = [];
|
|
245
|
-
this.tableHeaders[colNum].headerInfo.forEach((header) => {
|
|
246
|
-
if (header.typeOfBodyData === "STRING") {
|
|
247
|
-
columnObjectKey = header.objectKey;
|
|
248
|
-
columnObject[columnObjectKey] = obj[columnObjectKey];
|
|
249
|
-
keysUsedForTableDisplay.push(columnObjectKey);
|
|
250
|
-
keysUsedForColumn.push(columnObjectKey);
|
|
251
|
-
}
|
|
252
|
-
else if (header.typeOfBodyData === "ICON") {
|
|
253
|
-
columnObjectKey = header.typeOfBodyData;
|
|
254
|
-
columnObject[columnObjectKey] = obj[header.objectKey];
|
|
255
|
-
keysUsedForColumn.push(header.objectKey);
|
|
256
|
-
}
|
|
257
|
-
else if (header.typeOfBodyData === "CHECKBOX") {
|
|
258
|
-
columnObjectKey = header.typeOfBodyData;
|
|
259
|
-
columnObject[columnObjectKey] = obj[header.objectKey];
|
|
260
|
-
keysUsedForColumn.push(header.objectKey);
|
|
261
|
-
}
|
|
262
|
-
})
|
|
263
|
-
for (var i = 0; i < keysUsedForColumn.length; i++) {
|
|
264
|
-
columnName += keysUsedForColumn[i];
|
|
265
|
-
if (i !== keysUsedForColumn.length - 1) {
|
|
266
|
-
columnName += ',';
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
rowObject[columnName] = columnObject;
|
|
270
|
-
}
|
|
271
|
-
additionalInfoObject = {};
|
|
272
|
-
additionalKeys = Object.keys(obj).filter(key => !keysUsedForTableDisplay.includes(key));
|
|
273
|
-
additionalKeys.forEach(key => {
|
|
274
|
-
additionalInfoObject[key] = obj[key];
|
|
275
|
-
})
|
|
276
|
-
rowObject.AdditionalInfo = additionalInfoObject;
|
|
277
|
-
this.tableDataWrapper.push(rowObject);
|
|
278
|
-
})
|
|
279
|
-
this.tableData = this.tableDataWrapper;
|
|
280
|
-
this.showSkeletonLoading = false;
|
|
281
|
-
// console.log(JSON.stringify(this.tableDataWrapper));
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
selectOrUnselectCheckbox(rowData: any, columnKeys: any, isCheckboxSelected: any) {
|
|
286
|
-
this.toggleCheckbox.emit({ rowData, columnKeys, isCheckboxSelected });
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
selectUnselectAllRows() {
|
|
290
|
-
this.toggleHeaderCheckbox.emit();
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
selectUnselectRow(rowData: any) {
|
|
294
|
-
this.toggleRowCheckbox.emit(rowData);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
undoCreditedSpot(data: any) {
|
|
298
|
-
this.undoIconClicked.emit({ data, mgOrCredit: "Credit" });
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
undoMgSpot(data: any) {
|
|
302
|
-
this.undoIconClicked.emit({ data, mgOrCredit: "MakeGood" });
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
//Sort and Filter Logic begins!
|
|
306
|
-
closeTooltip() {
|
|
307
|
-
if (this.tooltip && this.tooltip.isOpen()) {
|
|
308
|
-
this.tooltip.close();
|
|
309
|
-
}
|
|
310
|
-
this.tooltip = null;
|
|
311
|
-
this.disableCheckboxApply = false;
|
|
312
|
-
if (!this.bindValueFuncCalled) {
|
|
313
|
-
this.columnFilterClosed.emit();
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
closeSortTooltip() {
|
|
318
|
-
if (this.annaSortService.tooltip && this.annaSortService.tooltip.isOpen()) {
|
|
319
|
-
this.annaSortService.tooltip.close();
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
initFilters() {
|
|
324
|
-
this.annaFilterService.tooltipMap = new Map();
|
|
325
|
-
this.annaFilterService.tooltipSelectedMap = new Map();
|
|
326
|
-
this.annaSortService.sortByAsc = new Map();
|
|
327
|
-
this.annaSortService.sortByDesc = new Map();
|
|
328
|
-
this.annaFilterService.selectedRadio = null;
|
|
329
|
-
this.annaFilterService.appliedFiltersArray = [];
|
|
330
|
-
//closing the sort tooltip if we route on the same route or if we click dropdown filters
|
|
331
|
-
this.closeSortTooltip();
|
|
332
|
-
this.annaSortService.tooltip = null;
|
|
333
|
-
this.disableClearAllBtn = true;
|
|
334
|
-
this.disableTimeFilterApplyBtn = false;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
setInitialValueMapData() {
|
|
338
|
-
this.annaFilterService.initialValueMap = new Map();
|
|
339
|
-
this.tableHeaders.forEach((column) => {
|
|
340
|
-
column.headerInfo.forEach((header) => {
|
|
341
|
-
if (header.filter === "SLIDER") {
|
|
342
|
-
header.filterObjectKeys.forEach((key) => {
|
|
343
|
-
let min = this.annaFilterService.returnMaxAndMinValue(this.clonedTableData, key, true);
|
|
344
|
-
let max = this.annaFilterService.returnMaxAndMinValue(this.clonedTableData, key, false);
|
|
345
|
-
let obj = { min, max };
|
|
346
|
-
|
|
347
|
-
this.annaFilterService.initialValueMap.set(key, obj);
|
|
348
|
-
})
|
|
349
|
-
}
|
|
350
|
-
else if (header.filter === "DATE") {
|
|
351
|
-
header.filterObjectKeys.forEach((key) => {
|
|
352
|
-
if(key == "period"){
|
|
353
|
-
const minMaxStartDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, "startDate");
|
|
354
|
-
const minMaxEndDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, "endDate");
|
|
355
|
-
let dateObj = { minSelectedDate: minMaxStartDate[0], maxSelectedDate: minMaxEndDate[1] };
|
|
356
|
-
this.annaFilterService.initialValueMap.set(key, dateObj);
|
|
357
|
-
}
|
|
358
|
-
else{
|
|
359
|
-
const minMaxDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, key);
|
|
360
|
-
let obj = { minSelectedDate: minMaxDate[0], maxSelectedDate: minMaxDate[1] };
|
|
361
|
-
this.annaFilterService.initialValueMap.set(key, obj);
|
|
362
|
-
}
|
|
363
|
-
})
|
|
364
|
-
}
|
|
365
|
-
else if (header.filter === "TIME") {
|
|
366
|
-
header.filterObjectKeys.forEach((key) => {
|
|
367
|
-
let data = this.clonedTableData.filter((obj: { [x: string]: string; }) => !["", "-", null, "0", "<multi>"].includes(obj[key]));
|
|
368
|
-
let timeArr = map(data, key);
|
|
369
|
-
timeArr.sort((a, b) => {
|
|
370
|
-
return this.annaDateTimeFormatService.sortByTimeAscending(a, b);
|
|
371
|
-
});
|
|
372
|
-
let obj = {
|
|
373
|
-
fromTime: timeArr[0],
|
|
374
|
-
toTime: timeArr[timeArr.length - 1],
|
|
375
|
-
};
|
|
376
|
-
if (this.gtGeneralConfig.component === "SPOTDETAILS" || this.gtGeneralConfig.component === "EXCLUDEINVENTORYPOPUP") {
|
|
377
|
-
let includeMulti = this.clonedTableData.findIndex((obj: { [x: string]: string; }) => obj[key] == "<multi>") != -1;
|
|
378
|
-
let includeZero = this.clonedTableData.findIndex((obj: { [x: string]: string; }) => obj[key] == "0") != -1;
|
|
379
|
-
let includeTimeRange = this.clonedTableData.findIndex((obj: { [x: string]: string; }) => obj[key] != "0" && obj[key] != "<multi>") != -1;
|
|
380
|
-
let obj = {
|
|
381
|
-
fromTime: timeArr[0],
|
|
382
|
-
toTime: timeArr[timeArr.length - 1],
|
|
383
|
-
includeMulti: includeMulti,
|
|
384
|
-
includeZero: includeZero,
|
|
385
|
-
includeTimeRange: includeTimeRange
|
|
386
|
-
};
|
|
387
|
-
this.annaFilterService.initialValueMap.set(key, obj);
|
|
388
|
-
}
|
|
389
|
-
else if (this.gtGeneralConfig.component === "RATING") {
|
|
390
|
-
let includeMulti = this.clonedTableData.findIndex((obj: any) => obj[key][0] == "<multi>") != -1;
|
|
391
|
-
let includeZero = this.clonedTableData.findIndex((obj: { [x: string]: string[]; }) => obj[key][0] == "0") != -1;
|
|
392
|
-
let includeTimeRange = this.clonedTableData.findIndex((obj: { [x: string]: string[]; }) => obj[key][0] != "0" && obj[key][0] != "<multi>") != -1;
|
|
393
|
-
|
|
394
|
-
let startTimeArr = map(this.clonedTableData, "startTime");
|
|
395
|
-
let endTimeArr = map(this.clonedTableData, "endTime");
|
|
396
|
-
|
|
397
|
-
startTimeArr.sort((a, b) => {
|
|
398
|
-
return this.annaDateTimeFormatService.sortByTimeAscending(a, b);
|
|
399
|
-
});
|
|
400
|
-
|
|
401
|
-
endTimeArr.sort((a, b) => {
|
|
402
|
-
return this.annaDateTimeFormatService.sortByTimeDescending(a, b);
|
|
403
|
-
});
|
|
404
|
-
|
|
405
|
-
let obj = {
|
|
406
|
-
fromTime: startTimeArr[0],
|
|
407
|
-
toTime: endTimeArr[0],
|
|
408
|
-
includeMulti: includeMulti,
|
|
409
|
-
includeZero: includeZero,
|
|
410
|
-
includeTimeRange: includeTimeRange
|
|
411
|
-
};
|
|
412
|
-
this.annaFilterService.initialValueMap.set(key, obj);
|
|
413
|
-
|
|
414
|
-
}
|
|
415
|
-
else {
|
|
416
|
-
this.annaFilterService.initialValueMap.set(key, obj);
|
|
417
|
-
}
|
|
418
|
-
})
|
|
419
|
-
}
|
|
420
|
-
})
|
|
421
|
-
})
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
isTooltipActive(header: any[]) {
|
|
425
|
-
return this.annaFilterService.isTooltipActive(header);
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
bindTheValueToToolTip(tooltip: any, header: any[]) {
|
|
429
|
-
|
|
430
|
-
this.bindValueFuncCalled = true;
|
|
431
|
-
let containerToScroll;
|
|
432
|
-
if (this.gtGeneralConfig.component === "SPOTDETAILS" || this.gtGeneralConfig.component === "DRRLISTING") {
|
|
433
|
-
containerToScroll = document.getElementsByClassName("scrollable-container")[0];
|
|
434
|
-
var mediaQuery = window.matchMedia("(max-width: 1366px)");
|
|
435
|
-
if (mediaQuery.matches) {
|
|
436
|
-
containerToScroll.scroll(0, this.gtGeneralConfig.verticalScrollOffsetForFilterTooltip);
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
// if same tooltip opened close it
|
|
440
|
-
if (tooltip == this.tooltip) {
|
|
441
|
-
this.bindValueFuncCalled = false;
|
|
442
|
-
this.closeTooltip();
|
|
443
|
-
}
|
|
444
|
-
else {
|
|
445
|
-
this.searchBar = '';
|
|
446
|
-
let enabledHeaders: any[] = [];
|
|
447
|
-
header.forEach((item: string | number) => {
|
|
448
|
-
if(item == "period"){
|
|
449
|
-
let uniqStartDate = uniq(this.tableData.map((u: { [x: string]: any; }) => u["startDate"]));
|
|
450
|
-
let uniqEndDate = uniq(this.tableData.map((u:{ [x: string]: any; }) => u["endDate"]));
|
|
451
|
-
if(uniqStartDate.length > 1 || uniqEndDate.length > 1 || this.isTooltipActive([item])){
|
|
452
|
-
enabledHeaders.push(item);
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
else if(uniq(this.tableData.map((u:{ [x: string]: any; }) => u[item])).length > 1 || this.isTooltipActive([item])){
|
|
456
|
-
enabledHeaders.push(item);
|
|
457
|
-
}
|
|
458
|
-
});
|
|
459
|
-
this.openTooltip(tooltip, enabledHeaders);
|
|
460
|
-
if (window.innerWidth < 1500 && window.innerHeight < 768 && !this.annaFilterService.sliderSet.has(header[0])) {
|
|
461
|
-
this.columnFilterOpened.emit();
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
this.showCheckboxFilterRadioButtons = enabledHeaders.length > 1;
|
|
465
|
-
|
|
466
|
-
this.populateTooltipDataBasedOnSelectedRadio(enabledHeaders[0]);
|
|
467
|
-
this.bindValueFuncCalled = false;
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
openTooltip(tooltip: any, header: any[]) {
|
|
472
|
-
this.closeTooltip();
|
|
473
|
-
this.tooltip = tooltip;
|
|
474
|
-
this.tooltip.open();
|
|
475
|
-
//convert key into the header
|
|
476
|
-
this.radioButtons = header.map((key: any) => {
|
|
477
|
-
let value = this.tooltipRadioTextMap.has(key)
|
|
478
|
-
? this.tooltipRadioTextMap.get(key)
|
|
479
|
-
: key; //change to display name
|
|
480
|
-
return new radioButtonModel(key, value);
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
clearColumnFilter() {
|
|
485
|
-
this.annaFilterService.clearColumnFilter();
|
|
486
|
-
this.toolTipdata = null;
|
|
487
|
-
this.tempTooltipData = null;
|
|
488
|
-
this.closeTooltip();
|
|
489
|
-
this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
|
|
490
|
-
this.checkIfSortingIsApplied();
|
|
491
|
-
this.filterAppliedToTable.emit(this.tableData);
|
|
492
|
-
this.disableEnableEachColumnFilters();
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
populateTooltipDataBasedOnSelectedRadio(header: string) {
|
|
496
|
-
|
|
497
|
-
this.disableSliderApplyButton = false;
|
|
498
|
-
this.disableCheckboxApply = false;
|
|
499
|
-
if (this.toolTipdata) {
|
|
500
|
-
this.revert();
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
this.annaFilterService.selectedRadio = header;
|
|
504
|
-
let selectedFilterSet = new Set(this.annaFilterService.appliedFiltersArray);
|
|
505
|
-
this.disableColumnClearAllBtn = selectedFilterSet.has(this.annaFilterService.selectedRadio) ? false : true;
|
|
506
|
-
if (this.annaFilterService.calendarSet.has(header)) {
|
|
507
|
-
this.getCalendarData();
|
|
508
|
-
} else if (this.annaFilterService.sliderSet.has(header)) {
|
|
509
|
-
this.getSliderData(header);
|
|
510
|
-
} else if (this.annaFilterService.timeSet.has(header)) {
|
|
511
|
-
this.getTimeFilterData(header);
|
|
512
|
-
} else {
|
|
513
|
-
this.getCheckboxData(header);
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
getSliderData(header: string) {
|
|
518
|
-
|
|
519
|
-
if (header === "Rate") {
|
|
520
|
-
this.annaFilterService.translateFunc = "currency";
|
|
521
|
-
}
|
|
522
|
-
else {
|
|
523
|
-
this.annaFilterService.translateFunc = "normal";
|
|
524
|
-
}
|
|
525
|
-
this.options = this.annaFilterService.populateSliderTooltip(this.clonedTableData, this.tableData);
|
|
526
|
-
|
|
527
|
-
this.disableSliderApplyButton = this.disableSliderApplyBtn();
|
|
528
|
-
let selectedTooltipObj;
|
|
529
|
-
if (this.annaFilterService.tooltipSelectedMap.has(header)) {
|
|
530
|
-
selectedTooltipObj = this.annaFilterService.tooltipSelectedMap.get(header);
|
|
531
|
-
}
|
|
532
|
-
else {
|
|
533
|
-
selectedTooltipObj = this.annaFilterService.initialValueMap.get(header);
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
this.sliderMinValue = selectedTooltipObj.min < this.options.floor ? this.options.floor : selectedTooltipObj.min;
|
|
537
|
-
this.sliderMaxValue = selectedTooltipObj.max < this.options.ceil ? selectedTooltipObj.max : this.options.ceil;
|
|
538
|
-
//default step values
|
|
539
|
-
this.options.step = 1;
|
|
540
|
-
this.sliderFilterTextBoxStep = "1";
|
|
541
|
-
if (header !== "WeekNumber") {
|
|
542
|
-
this.options.step = 0.1;
|
|
543
|
-
this.sliderFilterTextBoxStep = "0.1";
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
getCheckboxData(header: string) {
|
|
548
|
-
this.tempTooltipData = this.annaFilterService.populateTooltip(header, this.clonedTableData, this.tableData);
|
|
549
|
-
this.allSelected = this.annaFilterService.isAllOptionsSelected();
|
|
550
|
-
this.showAll = this.tempTooltipData.filter((x: { isHidden: any; }) => !x.isHidden).length > 1 ? true : false;
|
|
551
|
-
this.toolTipdata = cloneDeep(this.tempTooltipData);
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
getCalendarData() {
|
|
555
|
-
const parsingFormat = "MM/DD/YYYY";
|
|
556
|
-
let minMaxdate: any = this.annaFilterService.populateDatePickerTooltipWithData(this.clonedTableData, this.tableData);
|
|
557
|
-
let selectedDateObj;
|
|
558
|
-
if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
|
|
559
|
-
selectedDateObj = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
|
|
560
|
-
}
|
|
561
|
-
else {
|
|
562
|
-
selectedDateObj = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
// For startDate
|
|
566
|
-
// selected date is less than date which we get
|
|
567
|
-
if ((selectedDateObj.minSelectedDate).isAfter(minMaxdate.minStartDate)) {
|
|
568
|
-
this.selectedMinDate = this.annaDateTimeFormatService.convertToNgbDate(selectedDateObj.minSelectedDate, parsingFormat);
|
|
569
|
-
}
|
|
570
|
-
else {
|
|
571
|
-
this.selectedMinDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.minStartDate, parsingFormat);
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
// For endData
|
|
575
|
-
// selectedDate is less than date which we get
|
|
576
|
-
if ((selectedDateObj.maxSelectedDate).isAfter(minMaxdate.maxEndDate)) {
|
|
577
|
-
this.selectedMaxDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.maxEndDate, parsingFormat);
|
|
578
|
-
}
|
|
579
|
-
else {
|
|
580
|
-
this.selectedMaxDate = this.annaDateTimeFormatService.convertToNgbDate(selectedDateObj.maxSelectedDate, parsingFormat);
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
this.calendarMinEnabledDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.minStartDate, parsingFormat);
|
|
584
|
-
this.calendarMaxEnabledDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.maxEndDate, parsingFormat);
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
getTimeFilterData(header: string): void {
|
|
588
|
-
if (this.annaFilterService.tooltipSelectedMap.has(header)) {
|
|
589
|
-
this.selectedFromTime = this.annaFilterService.tooltipSelectedMap.get(header).fromTime;
|
|
590
|
-
this.selectedToTime = this.annaFilterService.tooltipSelectedMap.get(header).toTime;
|
|
591
|
-
} else {
|
|
592
|
-
this.selectedFromTime = this.annaFilterService.initialValueMap.get(header).fromTime;
|
|
593
|
-
this.selectedToTime = this.annaFilterService.initialValueMap.get(header).toTime;
|
|
594
|
-
}
|
|
595
|
-
if (this.selectedFromTime != undefined || this.selectedToTime != undefined) {
|
|
596
|
-
this.selectedFromTime = this.annaDateTimeFormatService.formatToTwelveHrs(this.selectedFromTime, true);
|
|
597
|
-
this.selectedToTime = this.annaDateTimeFormatService.formatToTwelveHrs(this.selectedToTime, true);
|
|
598
|
-
|
|
599
|
-
this.clonedSelectedFromTime = cloneDeep(this.selectedFromTime);
|
|
600
|
-
this.clonedSelectedToTime = cloneDeep(this.selectedToTime);
|
|
601
|
-
}
|
|
602
|
-
else {
|
|
603
|
-
this.selectedFromTime = ["-", "-", "-"];
|
|
604
|
-
this.selectedToTime = ["-", "-", "-"];
|
|
605
|
-
this.disableTimeFilterApplyBtn = true;
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
if (this.gtGeneralConfig.component === "SPOTDETAILS" || this.gtGeneralConfig.component === "EXCLUDEINVENTORYPOPUP") {
|
|
609
|
-
this.showMultiTimeCheckbox = false;
|
|
610
|
-
this.showZeroTimeCheckbox = false;
|
|
611
|
-
this.showEnterTimeCheckbox = false;
|
|
612
|
-
|
|
613
|
-
if (this.clonedTableData.findIndex((obj: any) => obj[header] == "0") != -1) {
|
|
614
|
-
this.showZeroTimeCheckbox = true;
|
|
615
|
-
this.annaFilterService.includeZeroTime = this.tableData.findIndex((obj: any) => obj[header] == "0") != -1;
|
|
616
|
-
this.zeroTimeCheckboxChecked = this.annaFilterService.includeZeroTime;
|
|
617
|
-
}
|
|
618
|
-
if (this.clonedTableData.findIndex((obj: any) => obj[header] == "<multi>") != -1) {
|
|
619
|
-
this.showMultiTimeCheckbox = true;
|
|
620
|
-
this.annaFilterService.includeMultiTime = this.tableData.findIndex((obj: any) => obj[header] == "<multi>") != -1;
|
|
621
|
-
this.multiTimeCheckboxChecked = this.annaFilterService.includeMultiTime;
|
|
622
|
-
}
|
|
623
|
-
if (this.showZeroTimeCheckbox || this.showMultiTimeCheckbox) {
|
|
624
|
-
this.showEnterTimeCheckbox = true;
|
|
625
|
-
}
|
|
626
|
-
if (this.clonedTableData.findIndex((obj: any) => obj[header] != "<multi>" && obj[header] != "0") != -1) {
|
|
627
|
-
this.annaFilterService.includeTimeRange = this.tableData.findIndex((obj: any) => obj[header] != "<multi>" && obj[header] != "0") != -1;
|
|
628
|
-
this.enterTimeCheckboxChecked = this.annaFilterService.includeTimeRange;
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
else if (this.gtGeneralConfig.component === "RATING") {
|
|
632
|
-
this.showMultiTimeCheckbox = false;
|
|
633
|
-
this.showZeroTimeCheckbox = false;
|
|
634
|
-
this.showEnterTimeCheckbox = false;
|
|
635
|
-
|
|
636
|
-
if (this.clonedTableData.findIndex((obj: any) => obj[header][0] == "0") != -1) {
|
|
637
|
-
this.showZeroTimeCheckbox = true;
|
|
638
|
-
this.annaFilterService.includeZeroTime = this.tableData.findIndex((obj: any) => obj[header][0] == "0") != -1;
|
|
639
|
-
this.zeroTimeCheckboxChecked = this.annaFilterService.includeZeroTime;
|
|
640
|
-
}
|
|
641
|
-
if (this.clonedTableData.findIndex((obj: any) => obj[header][0] == "<multi>") != -1) {
|
|
642
|
-
this.showMultiTimeCheckbox = true;
|
|
643
|
-
this.annaFilterService.includeMultiTime = this.tableData.findIndex((obj: any) => obj[header][0] == "<multi>") != -1;
|
|
644
|
-
this.multiTimeCheckboxChecked = this.annaFilterService.includeMultiTime;
|
|
645
|
-
}
|
|
646
|
-
if (this.showZeroTimeCheckbox || this.showMultiTimeCheckbox) {
|
|
647
|
-
this.showEnterTimeCheckbox = true;
|
|
648
|
-
}
|
|
649
|
-
if (this.clonedTableData.findIndex((obj: any) => obj[header][0] != "<multi>" && obj[header][0] != "0") != -1) {
|
|
650
|
-
this.annaFilterService.includeTimeRange = this.tableData.findIndex((obj: any) => obj[header][0] != "<multi>" && obj[header][0] != "0") != -1;
|
|
651
|
-
this.enterTimeCheckboxChecked = this.annaFilterService.includeTimeRange;
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
selectOrUnselectMultiTimeCheckbox() {
|
|
658
|
-
this.multiTimeCheckboxChecked = !this.multiTimeCheckboxChecked;
|
|
659
|
-
this.annaFilterService.includeMultiTime = !this.annaFilterService.includeMultiTime;
|
|
660
|
-
this.disableTimeFilterApplyButton();
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
selectOrUnselectZeroTimeCheckbox() {
|
|
664
|
-
this.zeroTimeCheckboxChecked = !this.zeroTimeCheckboxChecked;
|
|
665
|
-
this.annaFilterService.includeZeroTime = !this.annaFilterService.includeZeroTime;
|
|
666
|
-
this.disableTimeFilterApplyButton();
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
selectOrUnselectEnterTimeCheckbox() {
|
|
670
|
-
this.enterTimeCheckboxChecked = !this.enterTimeCheckboxChecked;
|
|
671
|
-
this.annaFilterService.includeTimeRange = !this.annaFilterService.includeTimeRange;
|
|
672
|
-
this.disableTimeFilterApplyButton();
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
disableSliderApplyBtn() {
|
|
676
|
-
return this.options.floor === this.options.ceil;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
isCheckboxSelected(data: boolean | number) {
|
|
680
|
-
this.allSelected = this.annaFilterService.isCheckboxSelected(data);
|
|
681
|
-
if (this.annaFilterService.tooltipMap.get(this.annaFilterService.selectedRadio).filter((x: any) => x.isSelected && !x.isHidden).length == 0) {
|
|
682
|
-
this.disableCheckboxApply = true;
|
|
683
|
-
} else {
|
|
684
|
-
this.disableCheckboxApply = false;
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
minValueChanged(value: string) {
|
|
689
|
-
if (isNaN(+value)) {
|
|
690
|
-
this.sliderMinValue = +this.options.floor;
|
|
691
|
-
}
|
|
692
|
-
else {
|
|
693
|
-
if (+value > this.sliderMaxValue) {
|
|
694
|
-
this.sliderMinValue = this.sliderMaxValue;
|
|
695
|
-
}
|
|
696
|
-
else if (+value < this.options.floor) {
|
|
697
|
-
this.sliderMinValue = this.options.floor;
|
|
698
|
-
} else {
|
|
699
|
-
this.sliderMinValue = +value;
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
maxValueChanged(value: string) {
|
|
705
|
-
if (isNaN(+value)) {
|
|
706
|
-
this.sliderMaxValue = +this.options.ceil;
|
|
707
|
-
}
|
|
708
|
-
else {
|
|
709
|
-
if (+value < this.sliderMinValue) {
|
|
710
|
-
this.sliderMaxValue = this.sliderMinValue;
|
|
711
|
-
}
|
|
712
|
-
else if (+value > this.options.ceil) {
|
|
713
|
-
this.sliderMinValue = this.options.ceil;
|
|
714
|
-
} else {
|
|
715
|
-
this.sliderMaxValue = +value;
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
sliderValueChange() {
|
|
721
|
-
this.sliderValue = { min: this.sliderMinValue, max: this.sliderMaxValue };
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
cancelSliderFilter() {
|
|
725
|
-
this.sliderValue = null;
|
|
726
|
-
this.closeTooltip();
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
allOptionClicked() {
|
|
730
|
-
if (this.allSelected == 0 || this.allSelected == 2) {
|
|
731
|
-
this.allSelected = 1;
|
|
732
|
-
this.disableCheckboxApply = false;
|
|
733
|
-
} else {
|
|
734
|
-
this.allSelected = 0;
|
|
735
|
-
this.disableCheckboxApply = true;
|
|
736
|
-
}
|
|
737
|
-
this.annaFilterService.allOptionsClicked(this.allSelected);
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
applyFilters() {
|
|
741
|
-
let isSame = isEqual(this.toolTipdata, this.tempTooltipData);
|
|
742
|
-
this.toolTipdata = cloneDeep(this.tempTooltipData);
|
|
743
|
-
this.annaFilterService.tooltipMap.set(this.annaFilterService.selectedRadio, this.tempTooltipData);
|
|
744
|
-
if (!isSame) {
|
|
745
|
-
this.annaFilterService.reOrderAppliedFiltersArray(false);
|
|
746
|
-
}
|
|
747
|
-
let tooltipSelectedDataArray = this.annaFilterService.tooltipMap.get(this.annaFilterService.selectedRadio).filter((x: { isSelected: any; }) => x.isSelected).map((x: { data: any; }) => x.data);
|
|
748
|
-
if (tooltipSelectedDataArray.length == 0) {
|
|
749
|
-
tooltipSelectedDataArray = this.annaFilterService.tooltipMap.get(this.annaFilterService.selectedRadio).map((x: { data: any; }) => x.data);
|
|
750
|
-
}
|
|
751
|
-
this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, tooltipSelectedDataArray);
|
|
752
|
-
this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
|
|
753
|
-
this.checkIfSortingIsApplied();
|
|
754
|
-
this.filterAppliedToTable.emit(this.tableData);
|
|
755
|
-
// this.generateTableDataWrapper();
|
|
756
|
-
this.disableEnableEachColumnFilters();
|
|
757
|
-
this.closeTooltip();
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
revert() {
|
|
761
|
-
this.tempTooltipData = cloneDeep(this.toolTipdata);
|
|
762
|
-
this.annaFilterService.tooltipMap.set(this.annaFilterService.selectedRadio, this.tempTooltipData);
|
|
763
|
-
this.toolTipdata = null;
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
closeCheckboxFilter() {
|
|
767
|
-
if (this.toolTipdata) {
|
|
768
|
-
this.revert();
|
|
769
|
-
}
|
|
770
|
-
this.closeTooltip();
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
applySliderFilter() {
|
|
774
|
-
if (this.sliderValue) {
|
|
775
|
-
let selectedDataObj;
|
|
776
|
-
if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
|
|
777
|
-
selectedDataObj = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
|
|
778
|
-
}
|
|
779
|
-
else {
|
|
780
|
-
selectedDataObj = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
|
|
781
|
-
}
|
|
782
|
-
|
|
783
|
-
let isSame = isEqual(selectedDataObj, this.sliderValue);
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
if (!isSame) {
|
|
787
|
-
this.annaFilterService.sliderData = { min: this.options.floor, max: this.options.ceil };
|
|
788
|
-
this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, this.sliderValue);
|
|
789
|
-
this.annaFilterService.reOrderAppliedFiltersArray(false);
|
|
790
|
-
this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
|
|
791
|
-
this.checkIfSortingIsApplied();
|
|
792
|
-
this.filterAppliedToTable.emit(this.tableData);
|
|
793
|
-
// this.generateTableDataWrapper();
|
|
794
|
-
this.disableEnableEachColumnFilters();
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
this.sliderValue = null;
|
|
798
|
-
this.closeTooltip();
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
cancelInDateFilter() {
|
|
802
|
-
this.closeTooltip();
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
applyDateFilter(selectedDate: { fromDate: NgbDate, toDate: NgbDate }) {
|
|
806
|
-
|
|
807
|
-
let selectedDateObj;
|
|
808
|
-
if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
|
|
809
|
-
selectedDateObj = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
|
|
810
|
-
}
|
|
811
|
-
else {
|
|
812
|
-
selectedDateObj = cloneDeep(this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio));
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
let isStartDateSame = isEqual(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.fromDate), selectedDateObj.minSelectedDate);
|
|
816
|
-
let isEndDateSame = isEqual(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.toDate), selectedDateObj.maxSelectedDate);
|
|
817
|
-
|
|
818
|
-
if (!isStartDateSame || !isEndDateSame) {
|
|
819
|
-
selectedDateObj.minSelectedDate = moment(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.fromDate));
|
|
820
|
-
selectedDateObj.maxSelectedDate = moment(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.toDate));
|
|
821
|
-
this.annaFilterService.flightDateRange = {
|
|
822
|
-
minSelectedDate: moment(this.annaDateTimeFormatService.convertNgbDateToMoment(this.calendarMinEnabledDate)),
|
|
823
|
-
maxSelectedDate: moment(this.annaDateTimeFormatService.convertNgbDateToMoment(this.calendarMaxEnabledDate))
|
|
824
|
-
};
|
|
825
|
-
this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, selectedDateObj);
|
|
826
|
-
this.annaFilterService.reOrderAppliedFiltersArray(false);
|
|
827
|
-
this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
|
|
828
|
-
this.checkIfSortingIsApplied();
|
|
829
|
-
this.filterAppliedToTable.emit(this.tableData);
|
|
830
|
-
// this.generateTableDataWrapper();
|
|
831
|
-
this.disableEnableEachColumnFilters();
|
|
832
|
-
}
|
|
833
|
-
this.closeTooltip();
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
applyWeekFilter(event: any) {
|
|
837
|
-
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
incrementHour(arr: any[]) {
|
|
841
|
-
if (arr[0] == "") {
|
|
842
|
-
arr[0] = 1;
|
|
843
|
-
} else if (parseInt(arr[0]) < 12) {
|
|
844
|
-
arr[0] = parseInt(arr[0]) + 1;
|
|
845
|
-
} else {
|
|
846
|
-
arr[0] = 1;
|
|
847
|
-
}
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
decrementHour(arr: any[]) {
|
|
851
|
-
if (arr[0] == "") {
|
|
852
|
-
arr[0] = 12;
|
|
853
|
-
} else if (parseInt(arr[0]) > 1) {
|
|
854
|
-
arr[0] = parseInt(arr[0]) - 1;
|
|
855
|
-
} else {
|
|
856
|
-
arr[0] = 12;
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
incrementMinute(arr: any[]) {
|
|
861
|
-
if (arr[1] == "" || parseInt(arr[1]) == 0) {
|
|
862
|
-
arr[1] = 30;
|
|
863
|
-
} else {
|
|
864
|
-
arr[1] = "00";
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
decrementMinute(arr: any) {
|
|
869
|
-
if (arr[1] == "" || parseInt(arr[1]) == 30) {
|
|
870
|
-
arr[1] = "00";
|
|
871
|
-
} else {
|
|
872
|
-
arr[1] = 30;
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
changeStartTimeHour(increment: boolean) {
|
|
877
|
-
if (increment) {
|
|
878
|
-
this.incrementHour(this.selectedFromTime);
|
|
879
|
-
} else {
|
|
880
|
-
this.decrementHour(this.selectedFromTime);
|
|
881
|
-
}
|
|
882
|
-
this.disableTimeFilterApplyButton();
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
changeEndTimeHour(increment: boolean) {
|
|
886
|
-
if (increment) {
|
|
887
|
-
this.incrementHour(this.selectedToTime);
|
|
888
|
-
} else {
|
|
889
|
-
this.decrementHour(this.selectedToTime);
|
|
890
|
-
}
|
|
891
|
-
this.disableTimeFilterApplyButton();
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
changeEndTimeMinute(increment: boolean) {
|
|
895
|
-
if (increment) {
|
|
896
|
-
this.incrementMinute(this.selectedToTime);
|
|
897
|
-
} else {
|
|
898
|
-
this.decrementMinute(this.selectedToTime);
|
|
899
|
-
}
|
|
900
|
-
this.disableTimeFilterApplyButton();
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
changeStartTimeMinute(increment: boolean) {
|
|
904
|
-
if (increment) {
|
|
905
|
-
this.incrementMinute(this.selectedFromTime);
|
|
906
|
-
} else {
|
|
907
|
-
this.decrementMinute(this.selectedFromTime);
|
|
908
|
-
}
|
|
909
|
-
this.disableTimeFilterApplyButton();
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
applyTimeFilters() {
|
|
913
|
-
let fromTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(
|
|
914
|
-
this.selectedFromTime[0] + ":" + this.selectedFromTime[1] + " " + this.selectedFromTime[2],
|
|
915
|
-
true
|
|
916
|
-
);
|
|
917
|
-
let fromTime24HrFormat = fromTime24HrFormatArr[0] + ":" + fromTime24HrFormatArr[1] + ":00";
|
|
918
|
-
let toTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(
|
|
919
|
-
this.selectedToTime[0] + ":" + this.selectedToTime[1] + " " + this.selectedToTime[2],
|
|
920
|
-
true
|
|
921
|
-
);
|
|
922
|
-
let toTime24HrFormat = toTime24HrFormatArr[0] + ":" + toTime24HrFormatArr[1] + ":00";
|
|
923
|
-
|
|
924
|
-
let previousSelectedData;
|
|
925
|
-
if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
|
|
926
|
-
previousSelectedData = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
|
|
927
|
-
} else {
|
|
928
|
-
previousSelectedData = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
let selectedData = {
|
|
932
|
-
fromTime: fromTime24HrFormat, toTime: toTime24HrFormat, includeMulti: this.annaFilterService.includeMultiTime,
|
|
933
|
-
includeZero: this.annaFilterService.includeZeroTime, includeTimeRange: this.annaFilterService.includeTimeRange
|
|
934
|
-
};
|
|
935
|
-
if (!isEqual(previousSelectedData, selectedData)) {
|
|
936
|
-
this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, selectedData);
|
|
937
|
-
this.annaFilterService.reOrderAppliedFiltersArray(false);
|
|
938
|
-
this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
|
|
939
|
-
this.checkIfSortingIsApplied();
|
|
940
|
-
this.filterAppliedToTable.emit(this.tableData);
|
|
941
|
-
// this.generateTableDataWrapper();
|
|
942
|
-
this.disableEnableEachColumnFilters();
|
|
943
|
-
}
|
|
944
|
-
this.closeTooltip();
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
closeTimeFilter() {
|
|
948
|
-
this.selectedFromTime = cloneDeep(this.clonedSelectedFromTime);
|
|
949
|
-
this.selectedToTime = cloneDeep(this.clonedSelectedToTime);
|
|
950
|
-
this.closeTooltip();
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
disableTimeFilterApplyButton() {
|
|
954
|
-
let timeFormat = "HH:mm:ss";
|
|
955
|
-
|
|
956
|
-
let startTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(
|
|
957
|
-
this.selectedFromTime[0] + ":" + this.selectedFromTime[1] + " " + this.selectedFromTime[2],
|
|
958
|
-
true
|
|
959
|
-
);
|
|
960
|
-
let startTime24HrFormat = startTime24HrFormatArr[0] + ":" + startTime24HrFormatArr[1] + ":00";
|
|
961
|
-
let endTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(
|
|
962
|
-
this.selectedToTime[0] + ":" + this.selectedToTime[1] + " " + this.selectedToTime[2],
|
|
963
|
-
true
|
|
964
|
-
);
|
|
965
|
-
let endTime24HrFormat = endTime24HrFormatArr[0] + ":" + endTime24HrFormatArr[1] + ":00";
|
|
966
|
-
|
|
967
|
-
this.disableTimeFilterApplyBtn = moment(startTime24HrFormat, timeFormat).isAfter(moment(endTime24HrFormat, timeFormat));
|
|
968
|
-
|
|
969
|
-
if (!this.multiTimeCheckboxChecked && !this.zeroTimeCheckboxChecked && !this.enterTimeCheckboxChecked) {
|
|
970
|
-
this.disableTimeFilterApplyBtn = true;
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
sortedData(event: any) {
|
|
975
|
-
if (event.type == "none") {
|
|
976
|
-
this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
|
|
977
|
-
} else {
|
|
978
|
-
this.tableData = event.data;
|
|
979
|
-
}
|
|
980
|
-
this.sortingAppliedToTable.emit(this.tableData);
|
|
981
|
-
// this.generateTableDataWrapper();
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
checkIfSortingIsApplied() {
|
|
985
|
-
let appliedkey;
|
|
986
|
-
let isAsc;
|
|
987
|
-
const arr = this.sortComponent.toArray();
|
|
988
|
-
|
|
989
|
-
let obj = this.annaSortService.checkIfSortingIsApplied(this.annaSortService.sortByAsc, true);
|
|
990
|
-
appliedkey = obj.key;
|
|
991
|
-
isAsc = obj.setValueTo;
|
|
992
|
-
|
|
993
|
-
if (!appliedkey) {
|
|
994
|
-
let obj = this.annaSortService.checkIfSortingIsApplied(this.annaSortService.sortByDesc, false);
|
|
995
|
-
appliedkey = obj.key;
|
|
996
|
-
isAsc = obj.setValueTo;
|
|
997
|
-
}
|
|
998
|
-
|
|
999
|
-
if (appliedkey) {
|
|
1000
|
-
this.applySorting(arr, appliedkey, isAsc);
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
applySorting(sortComponentArr: AnnaSortComponent[], appliedKey: string, isAsc: boolean) {
|
|
1005
|
-
sortComponentArr.forEach((component) => {
|
|
1006
|
-
if (component.sortBy === appliedKey) {
|
|
1007
|
-
this.setSortComponentDataProperty(component);
|
|
1008
|
-
isAsc ? component.sortByAscending() : component.sortByDescending();
|
|
1009
|
-
}
|
|
1010
|
-
});
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
setSortComponentDataProperty(sortComponent: AnnaSortComponent) {
|
|
1014
|
-
sortComponent.data = this.tableData;
|
|
1015
|
-
sortComponent.clonedData = cloneDeep(this.tableData);
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
disableEnableEachColumnFilters() {
|
|
1019
|
-
this.tableHeaders.forEach(header => {
|
|
1020
|
-
header.headerInfo.forEach(item => {
|
|
1021
|
-
if (item.filter != "") {
|
|
1022
|
-
let values = [];
|
|
1023
|
-
item.disableFilter = true;
|
|
1024
|
-
|
|
1025
|
-
item.filterObjectKeys.forEach(key => {
|
|
1026
|
-
|
|
1027
|
-
if(key == "period"){
|
|
1028
|
-
let uniqStartDate = uniq(this.tableData.map((u: { [x: string]: any; }) => u["startDate"]));
|
|
1029
|
-
let uniqEndDate = uniq(this.tableData.map((u: { [x: string]: any; }) => u["endDate"]));
|
|
1030
|
-
|
|
1031
|
-
item.disableFilter = (uniqStartDate.length > 1 || uniqEndDate.length > 1) ? false : true;
|
|
1032
|
-
}
|
|
1033
|
-
else{
|
|
1034
|
-
values = this.tableData.map((u: { [x: string]: any; }) => u[key]);
|
|
1035
|
-
if(uniq(values).filter(n => n!=null).length > 1){
|
|
1036
|
-
item.disableFilter = false;
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
})
|
|
1041
|
-
// if(uniq(values).length > 1){
|
|
1042
|
-
// item.disableFilter = false;
|
|
1043
|
-
// }else{
|
|
1044
|
-
// item.disableFilter = true;
|
|
1045
|
-
// }
|
|
1046
|
-
}
|
|
1047
|
-
if (item.sort) {
|
|
1048
|
-
if (uniq(this.tableData.map((u: { [x: string]: any; }) => u[item.objectKey])).length > 1) {
|
|
1049
|
-
item.disableSort = false;
|
|
1050
|
-
} else {
|
|
1051
|
-
item.disableSort = true;
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
});
|
|
1055
|
-
});
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
ngAfterViewInit() {
|
|
1059
|
-
this.annaGenericTableService.virtualScrollSubject.subscribe((val) =>{
|
|
1060
|
-
this.isScrolledLeft = document.getElementsByClassName("anna-table-virtual-scroll-viewport")[0].scrollLeft > 0;
|
|
1061
|
-
this.cdRef.detectChanges();
|
|
1062
|
-
});
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
dataRowClicked(rowData: any) {
|
|
1066
|
-
this.rowClicked.emit(rowData);
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
radioButtonClicked(data: any, action: string, isDisabled: boolean) {
|
|
1070
|
-
if (!isDisabled) {
|
|
1071
|
-
this.radioButtonSelected.emit({ data, action });
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
bindTheValueToSellerGroupTooltip(sellerGroupHierarchy: SellerGroupHierarchy[], tooltip: any): void {
|
|
1076
|
-
if (this.hierarchyTooltip && this.hierarchyTooltip.open) {
|
|
1077
|
-
this.hierarchyTooltip.close();
|
|
1078
|
-
}
|
|
1079
|
-
this.sellerGroupHierarchy = sellerGroupHierarchy;
|
|
1080
|
-
this.hierarchyTooltip = tooltip;
|
|
1081
|
-
this.hierarchyTooltip.open();
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
iconClicked(rowData: any,iconClass: string){
|
|
1085
|
-
this.gtIconClicked.emit({data: rowData,iconClass: iconClass});
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
svgIconClicked(rowData: any,key: string){
|
|
1089
|
-
this.gtSVGIconClicked.emit({data: rowData,key: key});
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
textActionClicked(rowData: any,id: number){
|
|
1093
|
-
this.gtTextActionClicked.emit({data:rowData,id});
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
viewDetailsClicked(rowData: any){
|
|
1097
|
-
this.gtViewDetailClicked.emit({data:rowData});
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
}
|