@sunbird-cb/consumption 0.0.44 → 0.0.46

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.
Files changed (40) hide show
  1. package/bundles/sunbird-cb-consumption.umd.js +4429 -68
  2. package/bundles/sunbird-cb-consumption.umd.js.map +1 -1
  3. package/bundles/sunbird-cb-consumption.umd.min.js +1 -1
  4. package/bundles/sunbird-cb-consumption.umd.min.js.map +1 -1
  5. package/esm2015/lib/_common/cards/card-assessment/card-assessment/card-assessment.component.js +34 -24
  6. package/esm2015/lib/_common/cards/cards.component.js +2 -2
  7. package/esm2015/lib/_common/cards/cards.module.js +3 -1
  8. package/esm2015/lib/_common/cards/provider-card/provider-card.component.js +168 -0
  9. package/esm2015/lib/_common/dialog-components/certificate-dialog/certificate-dialog.component.js +3 -3
  10. package/esm2015/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.component.js +2794 -0
  11. package/esm2015/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.model.js +218 -0
  12. package/esm2015/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.module.js +69 -0
  13. package/esm2015/lib/_pipes/pipe-duration-transform/pipe-duration-transform.pipe.js +2 -2
  14. package/esm2015/public-api.js +2 -1
  15. package/esm2015/sunbird-cb-consumption.js +37 -35
  16. package/esm5/lib/_common/cards/card-assessment/card-assessment/card-assessment.component.js +46 -30
  17. package/esm5/lib/_common/cards/cards.component.js +2 -2
  18. package/esm5/lib/_common/cards/cards.module.js +3 -1
  19. package/esm5/lib/_common/cards/provider-card/provider-card.component.js +177 -0
  20. package/esm5/lib/_common/dialog-components/certificate-dialog/certificate-dialog.component.js +3 -3
  21. package/esm5/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.component.js +4119 -0
  22. package/esm5/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.model.js +218 -0
  23. package/esm5/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.module.js +73 -0
  24. package/esm5/lib/_pipes/pipe-duration-transform/pipe-duration-transform.pipe.js +3 -3
  25. package/esm5/public-api.js +2 -1
  26. package/esm5/sunbird-cb-consumption.js +37 -35
  27. package/fesm2015/sunbird-cb-consumption.js +3044 -28
  28. package/fesm2015/sunbird-cb-consumption.js.map +1 -1
  29. package/fesm5/sunbird-cb-consumption.js +4392 -35
  30. package/fesm5/sunbird-cb-consumption.js.map +1 -1
  31. package/lib/_common/cards/card-assessment/card-assessment/card-assessment.component.d.ts +4 -3
  32. package/lib/_common/cards/provider-card/provider-card.component.d.ts +12 -0
  33. package/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.component.d.ts +202 -0
  34. package/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.model.d.ts +149 -0
  35. package/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.module.d.ts +5 -0
  36. package/lib/_pipes/pipe-duration-transform/pipe-duration-transform.pipe.d.ts +1 -1
  37. package/package.json +1 -1
  38. package/public-api.d.ts +1 -0
  39. package/sunbird-cb-consumption.d.ts +35 -33
  40. package/sunbird-cb-consumption.metadata.json +1 -1
@@ -9007,7 +9007,7 @@
9007
9007
  CardsComponent.decorators = [
9008
9008
  { type: core.Component, args: [{
9009
9009
  selector: 'sb-uic-cards',
9010
- template: "<div class=\"widget-card-content-new\">\n <ng-container *ngIf=\"widgetData && (((widgetData?.deletedMode || 'none') === 'hide' && !!!isLiveOrMarkForDeletion)\n ? false\n : !((widgetData?.intranetMode || 'none') === 'hide' && !!showIntranetContent))\"\n [ngSwitch]=\"( (widgetData && widgetData?.cardSubType) || 'cardPortraitLib')\">\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"cardPortraitLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'user-card'\" [ngTemplateOutlet]=\"cardUser\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-lib-skeleton'\" [ngTemplateOutlet]=\"cardPortraitLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-lib'\" [ngTemplateOutlet]=\"cardPortraitLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-landscape-lib-skeleton'\" [ngTemplateOutlet]=\"cardLandscapeLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-landscape-lib'\" [ngTemplateOutlet]=\"cardLandscapeLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-lib-skeleton'\" [ngTemplateOutlet]=\"cardWideLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-lib'\" [ngTemplateOutlet]=\"cardWideLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-v2'\" [ngTemplateOutlet]=\"cardWideV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-v2-skeleton'\" [ngTemplateOutlet]=\"cardWideV2Skeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-lib'\" [ngTemplateOutlet]=\"cardMdo\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-home-lib'\" [ngTemplateOutlet]=\"cardMdoHome\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-lib-skeleton'\" [ngTemplateOutlet]=\"cardMdoSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-scheduled-assessment'\" [ngTemplateOutlet]=\"cardScheduledAssessment\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-scheduled-assessment-skeleton'\" [ngTemplateOutlet]=\"cardScheduledAssessmentSkelton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib'\" [ngTemplateOutlet]=\"cardKarmaProgram\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-skeleton'\" [ngTemplateOutlet]=\"cardKarmaProgramSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-progress-portrait-lib'\" [ngTemplateOutlet]=\"cardProgressLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-progress-portrait-lib-skeleton'\" [ngTemplateOutlet]=\"cardProgressLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-v2'\" [ngTemplateOutlet]=\"cardKarmaProgramV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-v2-skeleton'\" [ngTemplateOutlet]=\"cardKarmaProgramV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-ext-lib-skeleton'\" [ngTemplateOutlet]=\"cardPortraitExtLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-ext-lib'\" [ngTemplateOutlet]=\"cardPortraitExtLib\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #cardPortraitLibSkeleton>\n <sb-uic-card-portrait [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-portrait>\n</ng-template>\n<ng-template #cardPortraitLib>\n <sb-uic-card-portrait \n [cbPlanMapData]=\"cbPlanMapData\"\n (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\" [isCardLoading]=\"false\"></sb-uic-card-portrait>\n</ng-template>\n<ng-template #cardLandscapeLibSkeleton>\n <sb-uic-card-landscape [widgetData]=\"widgetData\" \n [cbPlanMapData]=\"cbPlanMapData\" [isCardLoading]=\"true\"></sb-uic-card-landscape>\n</ng-template>\n<ng-template #cardLandscapeLib>\n <sb-uic-card-landscape\n (contentData)=\"getRedirectUrlData($event)\"\n (triggerTelemetry)=\"raiseCardClick($event)\"\n [widgetData]=\"widgetData\"\n [cbPlanMapData]=\"cbPlanMapData\"\n [isCardLoading]=\"false\">\n </sb-uic-card-landscape>\n</ng-template>\n\n<ng-template #cardWideLib>\n <sb-uic-card-wide (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\"></sb-uic-card-wide>\n</ng-template>\n<ng-template #cardWideLibSkeleton>\n <sb-uic-card-wide [widgetData]=\"widgetData\"></sb-uic-card-wide>\n</ng-template>\n\n<ng-template #cardWideV2Skeleton>\n <sb-uic-card-wide-v2 [widgetData]=\"widgetData\" [isCardLoading]=\"true\" ></sb-uic-card-wide-v2>\n</ng-template>\n<ng-template #cardWideV2>\n <sb-uic-card-wide-v2\n (contentData)=\"getRedirectUrlData($event)\"\n (triggerTelemetry)=\"raiseCardClick($event)\"\n [cbPlanMapData]=\"cbPlanMapData\"\n [isCardLoading]=\"false\"\n [widgetData]=\"widgetData\">\n </sb-uic-card-wide-v2>\n</ng-template>\n\n<ng-template #cardUser>\n <sb-uic-card-user [widgetData]=\"widgetData\"></sb-uic-card-user>\n</ng-template>\n<ng-template #cardMdoHome>\n <sb-uic-card-mdo-channel-v1 [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel-v1>\n</ng-template>\n<ng-template #cardMdo>\n <sb-uic-card-mdo-channel [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel>\n</ng-template>\n<ng-template #cardMdoSkeleton>\n <sb-uic-card-mdo-channel [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel>\n</ng-template>\n<ng-template #cardKarmaProgramSkeleton>\n <sb-uic-card-karma-programs [randomColorApply]=\"true\" \n [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-karma-programs>\n</ng-template>\n<ng-template #cardKarmaProgram>\n <sb-uic-card-karma-programs [randomColorApply]=\"true\" \n [isCardLoading]=\"false\" [widgetData]=\"widgetData\"></sb-uic-card-karma-programs>\n</ng-template>\n<ng-template #cardScheduledAssessmentSkelton>\n <sb-uic-card-assessment [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-assessment>\n</ng-template>\n<ng-template #cardScheduledAssessment>\n <sb-uic-card-assessment [widgetData]=\"widgetData\" (contentData)=\"getRedirectUrlData($event)\" [isCardLoading]=\"false\" [enrollmentMapData]=\"enrollmentMapData\"></sb-uic-card-assessment>\n</ng-template>\n<ng-template #cardProgressLibSkeleton>\n <sb-uic-card-progress-portrait-lib \n [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-progress-portrait-lib>\n</ng-template>\n<ng-template #cardProgressLib>\n <sb-uic-card-progress-portrait-lib \n [isCardLoading]=\"false\" (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\"></sb-uic-card-progress-portrait-lib>\n</ng-template>\n<ng-template #cardKarmaProgramV2>\n <!-- <sb-uic-card-karma-programs-v2 [widgetData]=\"widgetData\"><sb-uic-card-karma-programs-v2> -->\n</ng-template>\n\n<!-- cios card -->\n<ng-template #cardPortraitExtLibSkeleton>\n <sb-uic-card-portrait-ext [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-portrait-ext>\n</ng-template>\n<ng-template #cardPortraitExtLib>\n <sb-uic-card-portrait-ext \n [cbPlanMapData]=\"cbPlanMapData\"\n (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\" [isCardLoading]=\"false\"></sb-uic-card-portrait-ext>\n</ng-template>",
9010
+ template: "<div class=\"widget-card-content-new\">\n <ng-container *ngIf=\"widgetData && (((widgetData?.deletedMode || 'none') === 'hide' && !!!isLiveOrMarkForDeletion)\n ? false\n : !((widgetData?.intranetMode || 'none') === 'hide' && !!showIntranetContent))\"\n [ngSwitch]=\"( (widgetData && widgetData?.cardSubType) || 'cardPortraitLib')\">\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"cardPortraitLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'user-card'\" [ngTemplateOutlet]=\"cardUser\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-lib-skeleton'\" [ngTemplateOutlet]=\"cardPortraitLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-lib'\" [ngTemplateOutlet]=\"cardPortraitLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-landscape-lib-skeleton'\" [ngTemplateOutlet]=\"cardLandscapeLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-landscape-lib'\" [ngTemplateOutlet]=\"cardLandscapeLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-lib-skeleton'\" [ngTemplateOutlet]=\"cardWideLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-lib'\" [ngTemplateOutlet]=\"cardWideLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-v2'\" [ngTemplateOutlet]=\"cardWideV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-v2-skeleton'\" [ngTemplateOutlet]=\"cardWideV2Skeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-lib'\" [ngTemplateOutlet]=\"cardMdo\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-home-lib'\" [ngTemplateOutlet]=\"cardMdoHome\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-lib-skeleton'\" [ngTemplateOutlet]=\"cardMdoSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-scheduled-assessment'\" [ngTemplateOutlet]=\"cardScheduledAssessment\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-scheduled-assessment-skeleton'\" [ngTemplateOutlet]=\"cardScheduledAssessmentSkelton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib'\" [ngTemplateOutlet]=\"cardKarmaProgram\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-skeleton'\" [ngTemplateOutlet]=\"cardKarmaProgramSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-progress-portrait-lib'\" [ngTemplateOutlet]=\"cardProgressLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-progress-portrait-lib-skeleton'\" [ngTemplateOutlet]=\"cardProgressLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-v2'\" [ngTemplateOutlet]=\"cardKarmaProgramV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-v2-skeleton'\" [ngTemplateOutlet]=\"cardKarmaProgramV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-providers-lib'\" [ngTemplateOutlet]=\"cardProvider\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-ext-lib-skeleton'\" [ngTemplateOutlet]=\"cardPortraitExtLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-ext-lib'\" [ngTemplateOutlet]=\"cardPortraitExtLib\"></ng-container>\n\n </ng-container>\n</div>\n\n<ng-template #cardPortraitLibSkeleton>\n <sb-uic-card-portrait [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-portrait>\n</ng-template>\n<ng-template #cardPortraitLib>\n <sb-uic-card-portrait \n [cbPlanMapData]=\"cbPlanMapData\"\n (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\" [isCardLoading]=\"false\"></sb-uic-card-portrait>\n</ng-template>\n<ng-template #cardLandscapeLibSkeleton>\n <sb-uic-card-landscape [widgetData]=\"widgetData\" \n [cbPlanMapData]=\"cbPlanMapData\" [isCardLoading]=\"true\"></sb-uic-card-landscape>\n</ng-template>\n<ng-template #cardLandscapeLib>\n <sb-uic-card-landscape\n (contentData)=\"getRedirectUrlData($event)\"\n (triggerTelemetry)=\"raiseCardClick($event)\"\n [widgetData]=\"widgetData\"\n [cbPlanMapData]=\"cbPlanMapData\"\n [isCardLoading]=\"false\">\n </sb-uic-card-landscape>\n</ng-template>\n\n<ng-template #cardWideLib>\n <sb-uic-card-wide (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\"></sb-uic-card-wide>\n</ng-template>\n<ng-template #cardWideLibSkeleton>\n <sb-uic-card-wide [widgetData]=\"widgetData\"></sb-uic-card-wide>\n</ng-template>\n\n<ng-template #cardWideV2Skeleton>\n <sb-uic-card-wide-v2 [widgetData]=\"widgetData\" [isCardLoading]=\"true\" ></sb-uic-card-wide-v2>\n</ng-template>\n<ng-template #cardWideV2>\n <sb-uic-card-wide-v2\n (contentData)=\"getRedirectUrlData($event)\"\n (triggerTelemetry)=\"raiseCardClick($event)\"\n [cbPlanMapData]=\"cbPlanMapData\"\n [isCardLoading]=\"false\"\n [widgetData]=\"widgetData\">\n </sb-uic-card-wide-v2>\n</ng-template>\n\n<ng-template #cardUser>\n <sb-uic-card-user [widgetData]=\"widgetData\"></sb-uic-card-user>\n</ng-template>\n<ng-template #cardMdoHome>\n <sb-uic-card-mdo-channel-v1 [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel-v1>\n</ng-template>\n<ng-template #cardMdo>\n <sb-uic-card-mdo-channel [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel>\n</ng-template>\n<ng-template #cardMdoSkeleton>\n <sb-uic-card-mdo-channel [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel>\n</ng-template>\n<ng-template #cardKarmaProgramSkeleton>\n <sb-uic-card-karma-programs [randomColorApply]=\"true\" \n [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-karma-programs>\n</ng-template>\n<ng-template #cardKarmaProgram>\n <sb-uic-card-karma-programs [randomColorApply]=\"true\" \n [isCardLoading]=\"false\" [widgetData]=\"widgetData\"></sb-uic-card-karma-programs>\n</ng-template>\n<ng-template #cardScheduledAssessmentSkelton>\n <sb-uic-card-assessment [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-assessment>\n</ng-template>\n<ng-template #cardScheduledAssessment>\n <sb-uic-card-assessment [widgetData]=\"widgetData\" (contentData)=\"getRedirectUrlData($event)\" [isCardLoading]=\"false\" [enrollmentMapData]=\"enrollmentMapData\"></sb-uic-card-assessment>\n</ng-template>\n<ng-template #cardProgressLibSkeleton>\n <sb-uic-card-progress-portrait-lib \n [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-progress-portrait-lib>\n</ng-template>\n<ng-template #cardProgressLib>\n <sb-uic-card-progress-portrait-lib \n [isCardLoading]=\"false\" (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\"></sb-uic-card-progress-portrait-lib>\n</ng-template>\n<ng-template #cardKarmaProgramV2>\n <!-- <sb-uic-card-karma-programs-v2 [widgetData]=\"widgetData\"><sb-uic-card-karma-programs-v2> -->\n</ng-template>\n<ng-template #cardProvider>\n <sb-uic-provider-card ></sb-uic-provider-card>\n</ng-template>\n\n<!-- cios card -->\n<ng-template #cardPortraitExtLibSkeleton>\n <sb-uic-card-portrait-ext [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-portrait-ext>\n</ng-template>\n<ng-template #cardPortraitExtLib>\n <sb-uic-card-portrait-ext \n [cbPlanMapData]=\"cbPlanMapData\"\n (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\" [isCardLoading]=\"false\"></sb-uic-card-portrait-ext>\n</ng-template>\n",
9011
9011
  styles: [""]
9012
9012
  }] }
9013
9013
  ];
@@ -9551,12 +9551,12 @@
9551
9551
  }
9552
9552
  /**
9553
9553
  * @param {?} data
9554
- * @param {?=} type
9554
+ * @param {?} type
9555
9555
  * @return {?}
9556
9556
  */
9557
9557
  PipeDurationTransformPipe.prototype.transform = /**
9558
9558
  * @param {?} data
9559
- * @param {?=} type
9559
+ * @param {?} type
9560
9560
  * @return {?}
9561
9561
  */
9562
9562
  function (data, type) {
@@ -10894,6 +10894,181 @@
10894
10894
  CardKarmaProgramsV2Component.prototype.router;
10895
10895
  }
10896
10896
 
10897
+ /**
10898
+ * @fileoverview added by tsickle
10899
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
10900
+ */
10901
+ var ProviderCardComponent = /** @class */ (function () {
10902
+ function ProviderCardComponent() {
10903
+ this.providers = [
10904
+ {
10905
+ name: 'Indian Institute of Management Bengaluru (IIMB)',
10906
+ link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/IIMB/all-CBP',
10907
+ logo: 'assets/icons/top-providers/ef8a88cf-33cc-42de-bdc3-7deed1ab2418.png'
10908
+ },
10909
+ {
10910
+ name: 'Department for Promotion of Industry and Internal Trade',
10911
+ link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Department for Promotion of Industry and Internal Trade/all-CBP',
10912
+ logo: 'assets/icons/top-providers/0d400bdf-4ad8-45bf-914c-be44018c2d07.png'
10913
+ },
10914
+ {
10915
+ name: 'RAKNPA',
10916
+ link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/RAKNPA/all-CBP',
10917
+ logo: 'assets/icons/top-providers/1becfffa-956e-48ba-8ffd-77c19cd720c8.jpeg'
10918
+ },
10919
+ {
10920
+ name: 'Lal Bahadur Shastri National Academy of Administration (LBSNAA)',
10921
+ link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Ministry of Environment, Forest and Climate Change/all-CBP',
10922
+ logo: 'assets/icons/top-providers/1d76c041-a7c9-437c-94d9-36d997f3804c.jpeg'
10923
+ },
10924
+ {
10925
+ name: 'Ministry of Environment, Forest and Climate Change',
10926
+ link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/LBSNAA/all-CBP',
10927
+ logo: 'assets/icons/top-providers/1fb72c3f-1c96-4600-8e22-09871a85e6c4.jpeg'
10928
+ },
10929
+ {
10930
+ name: 'ISTM',
10931
+ link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Institute of Secretariat Training and Management/all-CBP',
10932
+ logo: 'assets/icons/top-providers/6f046f76-b778-476a-987b-8669e106b44c.jpeg'
10933
+ },
10934
+ {
10935
+ name: 'Department of Expenditure',
10936
+ link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Department%20of%20Expenditure%20/all-CBP',
10937
+ logo: 'assets/icons/top-providers/7f6df809-6930-44f4-abcf-c8297363d3e0.png'
10938
+ },
10939
+ {
10940
+ name: 'Department of Personnel and Training DoPT',
10941
+ link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Department%20of%20Personnel%20and%20Training%20DoPT/all-CBP',
10942
+ logo: 'assets/icons/top-providers/dopt.png'
10943
+ },
10944
+ {
10945
+ name: 'Indian Cybercrime Coordination Centre - I4C',
10946
+ link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Indian%20Cybercrime%20Coordination%20Centre%20-%20I4C/all-CBP',
10947
+ logo: 'assets/icons/top-providers/7f8cab8e-9d22-44ba-a41e-83b907e5a5f0.jpeg'
10948
+ },
10949
+ {
10950
+ "name": "Capacity Building Commission",
10951
+ "link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Capacity%20Building%20Commission/all-CBP",
10952
+ "logo": "assets/icons/top-providers/33e9c66f-312f-4244-901e-7d7525ae8847.jpeg"
10953
+ },
10954
+ {
10955
+ "name": "Ministry of Railways",
10956
+ "link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Ministry%20of%20Railways/all-CBP",
10957
+ "logo": "assets/icons/top-providers/36d93700-c43f-499e-ab3c-68ea76388a2a.png"
10958
+ },
10959
+ {
10960
+ "name": "World Bank",
10961
+ "link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/World%20Bank/all-CBP",
10962
+ "logo": "assets/icons/top-providers/385ff4a0-41af-4114-8015-10d26c1e8af4.jpeg"
10963
+ },
10964
+ {
10965
+ "name": "Sashastra Seema Bal (SSB)",
10966
+ "link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Sashastra%20Seema%20Bal%20%28SSB%29/all-CBP",
10967
+ "logo": "assets/icons/top-providers/778b56bf-8946-45fe-87d3-358203f2faf4.png"
10968
+ },
10969
+ {
10970
+ "name": "SVPNPA",
10971
+ "link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/SVPNPA/all-CBP",
10972
+ "logo": "assets/icons/top-providers/2862d2e5-473e-4c55-abaa-8a2f86e5eee4.jpeg"
10973
+ },
10974
+ {
10975
+ "name": "Microsoft",
10976
+ "link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Microsoft/all-CBP",
10977
+ "logo": "assets/icons/top-providers/53407dd6-d22c-4dba-a394-015fae667636.png"
10978
+ },
10979
+ {
10980
+ "name": "Indian Institute of Public Administration",
10981
+ "link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Indian%20Institute%20of%20Public%20Administration/all-CBP",
10982
+ "logo": "assets/icons/top-providers/869960d7-2dc7-4205-8c4b-11321d901060.jpeg"
10983
+ },
10984
+ {
10985
+ "name": "Food Corporation of India (FCI)",
10986
+ "link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Food%20Corporation%20of%20India%20%28FCI%29/all-CBP",
10987
+ "logo": "assets/icons/top-providers/4183673f-9063-4fa9-bf84-1e8856c8e531.jpeg"
10988
+ },
10989
+ {
10990
+ "name": "National Telecommunications Institute for Policy Research, Innovation and Training",
10991
+ "link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/NTIPRIT/all-CBP",
10992
+ "logo": "assets/icons/top-providers/a976f025-e990-49b0-a52a-9bd0a8e43584.jpeg"
10993
+ },
10994
+ {
10995
+ "name": "The Art of Living",
10996
+ "link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/The%20Art%20of%20Living/all-CBP",
10997
+ "logo": "assets/icons/top-providers/abbb8f64-84db-4a92-85c9-1b394ffab71c.png"
10998
+ },
10999
+ {
11000
+ "name": "National Institute of Communication Finance",
11001
+ "link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/National%20Institute%20of%20Communication%20Finance/all-CBP",
11002
+ "logo": "assets/icons/top-providers/b6bf0be6-7e29-4187-a29d-da6db1db7c69.jpeg"
11003
+ },
11004
+ {
11005
+ "name": "Department of Posts",
11006
+ "link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Department%20of%20Posts/all-CBP",
11007
+ "logo": "assets/icons/top-providers/cf567f4c-d0fa-447f-aba4-cb378ea3c90d.png"
11008
+ },
11009
+ {
11010
+ "name": "Government e Market Place(GeM)",
11011
+ "link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Government%20e%20Market%20Place%28GeM%29/all-CBP",
11012
+ "logo": "assets/icons/top-providers/f445c11b-ff73-4ca4-9dea-8d8945d92a4a.png"
11013
+ },
11014
+ {
11015
+ "name": "Bharat Sanchar Nigam Limited(BSNL)",
11016
+ "link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Bharat%20Sanchar%20Nigam%20Limited%28BSNL%29/all-CBP",
11017
+ "logo": "assets/icons/top-providers/fc67226a-4bbc-449a-8c5c-e1b338716545.png"
11018
+ },
11019
+ {
11020
+ "name": "Defence Accounts Department (DAD)",
11021
+ "link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Defence%20Accounts%20Department%20%28DAD%29/all-CBP",
11022
+ "logo": "assets/icons/top-providers/fccdb487-a389-48d9-bce0-c4d64315b546.png"
11023
+ },
11024
+ {
11025
+ "name": "Morarji Desai National Institute of Yoga (MDNIY)",
11026
+ "link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Morarji%20Desai%20National%20Institute%20of%20Yoga%20%28MDNIY%29/all-CBP",
11027
+ "logo": "assets/icons/top-providers/fcde4c60-7ccd-456e-a5df-260dcfa2d3ee.png"
11028
+ }
11029
+ ];
11030
+ this.colors = [
11031
+ '#EF941D', '#F97440', '#35B5B0', '#9988FF', '#816FEC',
11032
+ '#254092', '#926525', '#4F72DF'
11033
+ ];
11034
+ }
11035
+ /**
11036
+ * @return {?}
11037
+ */
11038
+ ProviderCardComponent.prototype.ngOnInit = /**
11039
+ * @return {?}
11040
+ */
11041
+ function () {
11042
+ };
11043
+ /**
11044
+ * @param {?} provider
11045
+ * @return {?}
11046
+ */
11047
+ ProviderCardComponent.prototype.redirectTo = /**
11048
+ * @param {?} provider
11049
+ * @return {?}
11050
+ */
11051
+ function (provider) {
11052
+ window.open(provider.link, '_blank');
11053
+ };
11054
+ ProviderCardComponent.decorators = [
11055
+ { type: core.Component, args: [{
11056
+ selector: 'sb-uic-provider-card',
11057
+ template: "<div class=\"providers-container\">\n <div class=\"provider-card\" *ngFor=\"let provider of providers; let i = index\" [ngStyle]=\"{'border-top': '72px solid ' + colors[i % colors.length]}\">\n <div class=\"circle-wrapper\">\n <div class=\"circle\">\n <div class=\"background-circle\">\n <img [src]=\"provider.logo\" alt=\"{{ provider.name }}\">\n </div>\n </div>\n </div>\n <div class=\"provider-content\">\n <p>{{ provider.name }}</p>\n <div class=\"view-provider-button\" (click)=\"redirectTo(provider)\">View Provider ></div>\n </div>\n </div>\n </div>\n ",
11058
+ styles: [".providers-container{display:flex;justify-content:center}.provider-card{height:168px;width:245px;margin:20px 8px;border-radius:12px;box-shadow:0 2px 4px rgba(0,0,0,.1);background-color:#fff;position:relative;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;z-index:1}.circle-wrapper{position:absolute;display:flex;justify-content:center;top:-50px;z-index:1}.circle{width:90px;height:90px;border-radius:50%;background-color:#f0f0f0;box-shadow:0 4px 8px rgba(0,0,0,.1)}.background-circle{position:relative;display:flex;justify-content:center;align-items:center;height:80px;width:80px;background-color:#fff;border-radius:50%;border:5px solid #fff;margin:0 auto}.background-circle img{width:66px;height:50px;background-size:cover;background-position:center;position:relative}.provider-content{padding:16px;text-align:center;flex-grow:1;display:flex;flex-direction:column;justify-content:center;align-items:center}.provider-content p{font-size:14px;font-weight:700;font-family:Lato,sans-serif;margin-bottom:8px;line-height:16.8px;word-wrap:break-word;white-space:normal;height:51px}.view-provider-button{color:#1b4ca1;font-size:14px;font-family:Lato,sans-serif;cursor:pointer;transition:color .3s}"]
11059
+ }] }
11060
+ ];
11061
+ /** @nocollapse */
11062
+ ProviderCardComponent.ctorParameters = function () { return []; };
11063
+ return ProviderCardComponent;
11064
+ }());
11065
+ if (false) {
11066
+ /** @type {?} */
11067
+ ProviderCardComponent.prototype.providers;
11068
+ /** @type {?} */
11069
+ ProviderCardComponent.prototype.colors;
11070
+ }
11071
+
10897
11072
  /**
10898
11073
  * @fileoverview added by tsickle
10899
11074
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -11074,6 +11249,7 @@
11074
11249
  this.activeResource = [];
11075
11250
  this.daysRemaining = 0;
11076
11251
  this.daysPending = false;
11252
+ this.daysFinish = false;
11077
11253
  }
11078
11254
  /**
11079
11255
  * @return {?}
@@ -11086,65 +11262,69 @@
11086
11262
  var instanceConfig = this.configSvc.instanceConfig;
11087
11263
  if (instanceConfig) {
11088
11264
  this.defaultThumbnail = instanceConfig.logos.defaultContent || '';
11089
- this.defaultSLogo = instanceConfig.logos.defaultSourceLogo || '/assets/instances/eagle/app_logos/KarmayogiBharat_Logo.svg';
11090
- }
11091
- else {
11092
- this.defaultThumbnail = '/assets/instances/eagle/app_logos/default.png';
11093
- this.defaultSLogo = '/assets/instances/eagle/app_logos/KarmayogiBharat_Logo.svg';
11265
+ this.defaultSLogo = instanceConfig.logos.defaultSourceLogo || '';
11094
11266
  }
11267
+ // console.log( this.daysPending, " this.daysPending===")
11095
11268
  };
11269
+ // updateStartDate(data: any ):void {
11270
+ // // this.startDate = startDate;
11271
+ // this.startCountdown(data)
11272
+ // }
11273
+ // updateStartDate(data: any ):void {
11274
+ // // this.startDate = startDate;
11275
+ // this.startCountdown(data)
11276
+ // }
11096
11277
  /**
11097
- * @param {?} startDate
11098
- * @return {?}
11099
- */
11100
- CardAssessmentComponent.prototype.updateStartDate = /**
11101
- * @param {?} startDate
11278
+ * @param {?} data
11102
11279
  * @return {?}
11103
11280
  */
11104
- function (startDate) {
11105
- this.startDate = startDate;
11106
- this.startCountdown(this.startDate);
11107
- };
11281
+ CardAssessmentComponent.prototype.startCountdown =
11282
+ // updateStartDate(data: any ):void {
11283
+ // // this.startDate = startDate;
11284
+ // this.startCountdown(data)
11285
+ // }
11108
11286
  /**
11109
- * @param {?} date
11110
- * @return {?}
11111
- */
11112
- CardAssessmentComponent.prototype.startCountdown = /**
11113
- * @param {?} date
11287
+ * @param {?} data
11114
11288
  * @return {?}
11115
11289
  */
11116
- function (date) {
11290
+ function (data) {
11117
11291
  var _this = this;
11118
- // Update the countdown immediately on start
11119
- this.updateCountdown(date);
11292
+ this.updateCountdown(data.startDate, data.endDate);
11120
11293
  // Update the countdown every second
11121
11294
  this.intervalId = setInterval((/**
11122
11295
  * @return {?}
11123
11296
  */
11124
11297
  function () {
11125
- _this.updateCountdown(date);
11298
+ _this.updateCountdown(data.startDate, data.endDate);
11126
11299
  }), 1000);
11127
11300
  };
11128
11301
  // Method to update the countdown values
11129
11302
  // Method to update the countdown values
11130
11303
  /**
11131
- * @param {?} targetDate
11304
+ * @param {?} startDate
11305
+ * @param {?} endDate
11132
11306
  * @return {?}
11133
11307
  */
11134
11308
  CardAssessmentComponent.prototype.updateCountdown =
11135
11309
  // Method to update the countdown values
11136
11310
  /**
11137
- * @param {?} targetDate
11311
+ * @param {?} startDate
11312
+ * @param {?} endDate
11138
11313
  * @return {?}
11139
11314
  */
11140
- function (targetDate) {
11315
+ function (startDate, endDate) {
11141
11316
  /** @type {?} */
11142
11317
  var now = new Date().getTime();
11143
11318
  // Current time in milliseconds
11144
11319
  /** @type {?} */
11145
- var targetTime = new Date(targetDate).getTime();
11320
+ var targetTime = new Date(startDate).getTime();
11321
+ /** @type {?} */
11322
+ var targetEndDate = new Date(endDate).getTime();
11146
11323
  /** @type {?} */
11147
11324
  var distance = targetTime - now;
11325
+ // Distance in milliseconds
11326
+ /** @type {?} */
11327
+ var endDistance = now - targetEndDate;
11148
11328
  if (distance > 0) {
11149
11329
  this.daysRemaining = Math.ceil(distance / (1000 * 60 * 60 * 24));
11150
11330
  this.daysPending = true;
@@ -11154,6 +11334,13 @@
11154
11334
  this.daysPending = false;
11155
11335
  this.clearTimer();
11156
11336
  }
11337
+ if (endDistance > 0) {
11338
+ this.daysFinish = true;
11339
+ this.clearTimer();
11340
+ }
11341
+ else {
11342
+ this.daysFinish = false;
11343
+ }
11157
11344
  };
11158
11345
  // Method to clear the interval
11159
11346
  // Method to clear the interval
@@ -11197,8 +11384,8 @@
11197
11384
  CardAssessmentComponent.decorators = [
11198
11385
  { type: core.Component, args: [{
11199
11386
  selector: 'sb-uic-card-assessment',
11200
- template: "<ng-container *ngIf=\"!isCardLoading\">\n<ng-container >\n\t<mat-card class=\"card-assessment card-scheduled-assessment card-users-container padding-remove cursor-pointer mr-4\">\n\t<a (click)=\"getRedirectUrlData(widgetData?.content); $event.stopPropagation()\">\n\t\t<div class=\"display-contents\">\n\t\t\t<ng-container *ngIf=\"widgetData\">\n\t\t\t\t<mat-card-content>\n\t\t\t\t\t<div class=\"flex flex-col h-full\">\n\t\t\t\t\t\t<div class=\"flex flex-1 flex-row padding-s\">\n\t\t\t\t\t\t\t<div class=\"flex image-container\">\n\t\t\t\t\t\t\t\t<ng-container *ngIf=\"widgetData?.content?.posterImage\">\n\t\t\t\t\t\t\t\t\t<img mat-card-image class=\"margin-remove assess-img\" [src]=\"widgetData?.content?.posterImage | pipePublicURL\"\n\t\t\t\t\t\t\t\t\t\t[alt]=\"widgetData?.content?.name\">\n\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t<ng-container *ngIf=\"!widgetData?.content?.posterImage\">\n\t\t\t\t\t\t\t\t\t<ng-template #defaultImg>\n\t\t\t\t\t\t\t\t\t\t<img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n\t\t\t\t\t\t\t\t\t\t\tclass=\"card-wide-img ws-mat-primary-lite-background margin-remove assess-img\"\n\t\t\t\t\t\t\t\t\t\t\t[alt]=\"widgetData?.content?.name\" />\n\t\t\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t\t</ng-container>\n\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"flex title-container flex-col\">\n\t\t\t\t\t\t\t\t<div class=\"flex title-text mat-subheading-1\">\n\t\t\t\t\t\t\t\t\t{{ widgetData?.content?.name }}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"flex margin-remove margin-top-s font-normal mat-caption sub-title-text\">\n\t\t\t\t\t\t\t\t\t<div class=\"course_logo_box\">\n\t\t\t\t\t\t\t\t\t\t<img [src]=\"widgetData?.content?.creatorLogo | pipePublicURL \" class=\"source-icon\"\n\t\t\t\t\t\t\t\t\t\t\t[wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n\t\t\t\t\t\t\t\t\t\t\t[alt]=\"(widgetData?.content?.sourceName + '_' + widgetData?.content?.identifier)\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<span class=\"sub-title-text\">\n\t\t\t\t\t\t\t\t\t\t{{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ?\n\t\t\t\t\t\t\t\t\t\twidgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span class=\"start-span\">Assessment starts in </span>\n\t\t\t\t\t\t<mat-card-footer class=\"assessment-card-footer padding-m\">\n\t\t\t\t\t\t\t<div class=\"flex flex-1 items-center justify-center col-row margin-top-m\">\n\t\t\t\t\t\t\t\t<div class=\"flex margin-right-m\">\n\t\t\t\t\t\t\t\t\t<span *ngIf=\"daysPending\"> {{ startCountdown(widgetData?.content?.batch?.startDate) }}<div id=\"demo\"></div> </span>\n\t\t\t\t\t\t\t\t\t<span *ngIf=\"!daysPending\" class=\"start-btn\"> Start Assessment\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"flex\">\n\t\t\t\t\t\t\t\t\t<span class=\"time-span flex items-center justify-center\">{{widgetData?.content?.batch?.startDate | date: 'd MMM, y' }}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</mat-card-footer>\n\t\t\t\t\t</div>\n\t\t\t\t</mat-card-content>\n\t\t\t</ng-container>\n\t\t</div>\n\t</a>\n</mat-card>\n</ng-container>\n</ng-container>\n\n\n\n<ng-container *ngIf=\"isCardLoading\">\n\t<ng-container [ngTemplateOutlet]=\"skeltonLoader\"></ng-container>\n</ng-container>\n\n<ng-template #skeltonLoader>\n\n\t<mat-card class=\"card-assessment card-scheduled-assessment card-users-container padding-remove cursor-pointer mr-4\">\n\t\t<a>\n\t\t\t<div class=\"display-contents\">\n\t\t\t\t<ng-container>\n\t\t\t\t\t<mat-card-content>\n\t\t\t\t\t\t<div class=\"flex flex-col h-full\">\n\t\t\t\t\t\t\t<div class=\"flex flex-1 flex-row padding-s\">\n\t\t\t\t\t\t\t\t<div class=\"flex image-container\">\n\t\t\t\t\t\t\t\t\t<ng-container>\n\t\t\t\t\t\t\t\t\t\t<sb-uic-skeleton-loader [width]=\"'300px'\" [height]=\"'155px'\"\n\t\t\t\t\t\t\t\t\t\t\t></sb-uic-skeleton-loader>\n\t\t\t\t\t\t\t\t\t</ng-container>\n\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"flex title-container flex-col\">\n\t\t\t\t\t\t\t\t\t<div class=\"flex\">\n\t\t\t\t\t\t\t\t\t\t<sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'16px'\"\n\t\t\t\t\t\t\t\t\t\t\t[bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"flex margin-remove margin-top-l font-normal\">\n\t\t\t\t\t\t\t\t\t\t<sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'16px'\"\n\t\t\t\t\t\t\t\t\t\t\t[bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<!-- <span class=\"text-center\"><sb-uic-skeleton-loader [width]=\"'90px'\" [height]=\"'16px'\"\n\t\t\t\t\t\t\t\t\t[bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader> </span> -->\n\t\t\t\t\t\t\t<mat-card-footer\n\t\t\t\t\t\t\t\tclass=\"assessment-card-footer col-row padding-l\">\n\t\t\t\t\t\t\t\t<div class=\"flex flex-1 items-center justify-center col-row margin-top-m\">\n\t\t\t\t\t\t\t\t<div class=\"flex margin-right-m\">\n\t\t\t\t\t\t\t\t\t<sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'16px'\"\n\t\t\t\t\t\t\t\t\t\t[bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"flex\">\n\t\t\t\t\t\t\t\t\t<sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'16px'\"\n\t\t\t\t\t\t\t\t\t\t[bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</mat-card-footer>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</mat-card-content>\n\t\t\t\t</ng-container>\n\t\t\t</div>\n\t\t</a>\n\t</mat-card>\n</ng-template>",
11201
- styles: [".card-assessment{width:100%;min-height:190px;box-sizing:border-box;min-width:335px;margin-top:16px}.image-container{width:155px;height:120px;border-radius:8px;overflow:hidden;border:1px solid rgba(0,0,0,.08)}.title-container{margin-left:12px}.title-text{word-break:break-word;white-space:initial;margin:8px 0;position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;max-height:48px;font:600 14px/24px Montserrat}.sub-title-text{width:75%;word-break:break-word;white-space:initial;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.course_logo_box{width:38px;height:38px;background:#fff;border-radius:8px;box-sizing:border-box;margin-right:4px;box-shadow:0 2px 1px -1px rgb(0 0 0 / 20%),0 1px 1px 0 rgb(0 0 0 / 14%),0 1px 3px 0 rgb(0 0 0 / 12%)}.course_logo_box img.source-icon{height:28px;width:28px;padding:5px;display:inline-block}.mat-card-footer{margin:0!important}.time-span{padding:2px 8px;color:#fff;border-radius:4px;text-align:center;font-size:12px;background-color:green}span.start-span{border-radius:50px;border:2px solid rgba(0,0,0,.08);font-size:12px;text-align:center;position:absolute;bottom:0;width:140px;left:50%;margin-left:-70px;background-color:#fff;margin-bottom:62px;margin-right:8px}.assessment-card-footer{background:rgba(239,149,30,.16)!important;text-align:center;box-sizing:border-box}.start-btn{background:#1b4ca1!important;color:#fff;font-size:14px;font-weight:600;border-radius:25px;text-align:center;padding:4px 12px}.dots-container{display:none}"]
11387
+ template: "\n<ng-container *ngIf=\"!isCardLoading\">\n\t<ng-container *ngIf=\"!daysFinish\">\n\t<mat-card class=\"card-assessment card-scheduled-assessment card-users-container padding-remove cursor-pointer mr-4\">\n\t<a (click)=\"getRedirectUrlData(widgetData?.content); $event.stopPropagation()\">\n\t\t<div class=\"display-contents\">\n\t\t\t<ng-container *ngIf=\"widgetData\">\n\t\t\t\t<mat-card-content>\n\t\t\t\t\t<div class=\"flex flex-col h-full\">\n\t\t\t\t\t\t<div class=\"flex flex-1 flex-row padding-s\">\n\t\t\t\t\t\t\t<div class=\"flex image-container\">\n\t\t\t\t\t\t\t\t<ng-container *ngIf=\"widgetData?.content?.posterImage\">\n\t\t\t\t\t\t\t\t\t<img mat-card-image class=\"margin-remove assess-img\" [src]=\"widgetData?.content?.posterImage | pipePublicURL\"\n\t\t\t\t\t\t\t\t\t\t[alt]=\"widgetData?.content?.name\">\n\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t<ng-container *ngIf=\"!widgetData?.content?.posterImage\">\n\t\t\t\t\t\t\t\t\t<ng-template #defaultImg>\n\t\t\t\t\t\t\t\t\t\t<img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n\t\t\t\t\t\t\t\t\t\t\tclass=\"card-wide-img ws-mat-primary-lite-background margin-remove assess-img\"\n\t\t\t\t\t\t\t\t\t\t\t[alt]=\"widgetData?.content?.name\" />\n\t\t\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t\t</ng-container>\n\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"flex title-container flex-col\">\n\t\t\t\t\t\t\t\t<div class=\"flex title-text mat-subheading-1\">\n\t\t\t\t\t\t\t\t\t{{ widgetData?.content?.name }}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"flex margin-remove margin-top-s font-normal mat-caption sub-title-text\">\n\t\t\t\t\t\t\t\t\t<div class=\"course_logo_box\">\n\t\t\t\t\t\t\t\t\t\t<img [src]=\"widgetData?.content?.creatorLogo | pipePublicURL \" class=\"source-icon\"\n\t\t\t\t\t\t\t\t\t\t\t[wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n\t\t\t\t\t\t\t\t\t\t\t[alt]=\"(widgetData?.content?.sourceName + '_' + widgetData?.content?.identifier)\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<span class=\"sub-title-text\">\n\t\t\t\t\t\t\t\t\t\t{{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ?\n\t\t\t\t\t\t\t\t\t\twidgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span class=\"start-span\">Assessment starts in </span>\n\t\t\t\t\t\t<mat-card-footer class=\"assessment-card-footer padding-m\">\n\t\t\t\t\t\t\t<div class=\"flex flex-1 items-center justify-center col-row margin-top-m\">\n\t\t\t\t\t\t\t\t<div class=\"flex margin-right-m\">\n\t\t\t\t\t\t\t\t\t<span *ngIf=\"daysPending\"> {{ startCountdown(widgetData?.content?.batch?.startDate) }}<div id=\"demo\"></div> </span>\n\t\t\t\t\t\t\t\t\t<span *ngIf=\"!daysPending\" class=\"start-btn\"> Start Assessment </span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"flex\">\n\t\t\t\t\t\t\t\t\t<span class=\"time-span flex items-center justify-center\">{{widgetData?.content?.batch?.startDate | date: 'd MMM, y' }}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</mat-card-footer>\n\t\t\t\t\t</div>\n\t\t\t\t</mat-card-content>\n\t\t\t</ng-container>\n\t\t</div>\n\t</a>\n</mat-card>\n</ng-container>\n</ng-container>\n\n\n\n<ng-container *ngIf=\"isCardLoading\">\n\t<ng-container [ngTemplateOutlet]=\"skeltonLoader\"></ng-container>\n</ng-container>\n\n<ng-template #skeltonLoader>\n\n\t<mat-card class=\"card-assessment card-scheduled-assessment card-users-container padding-remove cursor-pointer mr-4\">\n\t\t<a>\n\t\t\t<div class=\"display-contents\">\n\t\t\t\t<ng-container>\n\t\t\t\t\t<mat-card-content>\n\t\t\t\t\t\t<div class=\"flex flex-col h-full\">\n\t\t\t\t\t\t\t<div class=\"flex flex-1 flex-row padding-s\">\n\t\t\t\t\t\t\t\t<div class=\"flex image-container\">\n\t\t\t\t\t\t\t\t\t<ng-container>\n\t\t\t\t\t\t\t\t\t\t<sb-uic-skeleton-loader [width]=\"'300px'\" [height]=\"'155px'\"\n\t\t\t\t\t\t\t\t\t\t\t></sb-uic-skeleton-loader>\n\t\t\t\t\t\t\t\t\t</ng-container>\n\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"flex title-container flex-col margin-top-m\">\n\t\t\t\t\t\t\t\t\t<div class=\"flex\">\n\t\t\t\t\t\t\t\t\t\t<sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'16px'\"\n\t\t\t\t\t\t\t\t\t\t\t[bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"flex margin-remove margin-top-l font-normal\">\n\t\t\t\t\t\t\t\t\t\t<sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'16px'\"\n\t\t\t\t\t\t\t\t\t\t\t[bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<!-- <span class=\"text-center\"><sb-uic-skeleton-loader [width]=\"'90px'\" [height]=\"'16px'\"\n\t\t\t\t\t\t\t\t\t[bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader> </span> -->\n\t\t\t\t\t\t\t<mat-card-footer\n\t\t\t\t\t\t\t\tclass=\"assessment-card-footer col-row padding-l\">\n\t\t\t\t\t\t\t\t<div class=\"flex flex-1 items-center justify-center col-row margin-top-m\">\n\t\t\t\t\t\t\t\t<div class=\"flex margin-right-m\">\n\t\t\t\t\t\t\t\t\t<sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'16px'\"\n\t\t\t\t\t\t\t\t\t\t[bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"flex\">\n\t\t\t\t\t\t\t\t\t<sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'16px'\"\n\t\t\t\t\t\t\t\t\t\t[bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</mat-card-footer>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</mat-card-content>\n\t\t\t\t</ng-container>\n\t\t\t</div>\n\t\t</a>\n\t</mat-card>\n</ng-template>\n\n",
11388
+ styles: [".card-assessment{width:100%;min-height:190px;box-sizing:border-box;min-width:340px;margin-top:16px;margin-right:12px;border-radius:12px}.image-container{width:145px;height:120px;border-radius:8px;overflow:hidden;border:1px solid rgba(0,0,0,.08)}.image-container img{border-radius:8px;opacity:1;background-size:100%;width:145px!important;height:120px!important;display:flex}.title-container{width:155px;margin-left:12px}.title-text{word-break:break-word;white-space:initial;margin:8px 0;position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;max-height:48px;font:600 14px/24px Montserrat}.sub-title-text{width:75%;word-break:break-word;white-space:initial;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.course_logo_box{width:38px;height:38px;background:#fff;border-radius:8px;box-sizing:border-box;margin-right:4px;box-shadow:0 2px 1px -1px rgb(0 0 0 / 20%),0 1px 1px 0 rgb(0 0 0 / 14%),0 1px 3px 0 rgb(0 0 0 / 12%)}.course_logo_box img.source-icon{height:28px;width:28px;padding:5px;display:inline-block}.mat-card-footer{margin:0!important}.time-span{padding:2px 8px;color:#fff;border-radius:4px;text-align:center;font-size:12px;background-color:green;width:75px}span.start-span{border-radius:50px;border:2px solid rgba(0,0,0,.08);font-size:12px;text-align:center;position:absolute;bottom:0;width:140px;left:50%;margin-left:-70px;background-color:#fff;margin-bottom:62px;margin-right:8px}.assessment-card-footer{background:rgba(239,149,30,.16)!important;text-align:center;box-sizing:border-box;border-radius:0 0 8px 8px}.start-btn{background:#1b4ca1!important;color:#fff;font-size:14px;font-weight:600;border-radius:25px;text-align:center;padding:4px 12px}.dots-container{display:none}"]
11202
11389
  }] }
11203
11390
  ];
11204
11391
  /** @nocollapse */
@@ -11238,7 +11425,11 @@
11238
11425
  /** @type {?} */
11239
11426
  CardAssessmentComponent.prototype.startDate;
11240
11427
  /** @type {?} */
11428
+ CardAssessmentComponent.prototype.endDate;
11429
+ /** @type {?} */
11241
11430
  CardAssessmentComponent.prototype.daysPending;
11431
+ /** @type {?} */
11432
+ CardAssessmentComponent.prototype.daysFinish;
11242
11433
  /**
11243
11434
  * @type {?}
11244
11435
  * @private
@@ -11516,10 +11707,10 @@
11516
11707
  CertificateDialogComponent.decorators = [
11517
11708
  { type: core.Component, args: [{
11518
11709
  selector: 'sb-uic-certificate-dialog',
11519
- template: "<mat-card class=\"no-shadow certificate-img-box\">\n <button mat-icon-button class=\"close-button\" [mat-dialog-close]=\"true\">\n <mat-icon class=\"close-icon\" color=\"warn\">close</mat-icon>\n </button>\n <!-- <mat-card-title>\n\n </mat-card-title> -->\n <mat-card-content class=\"certificate-img-content\">\n <img #certificate [src]=\"url| pipeSafeSanitizer: 'url'\" alt=\"Certificate\" role=\"image\" class=\"certificate-banner-image\">\n </mat-card-content>\n <mat-card-actions class=\"flex flex-row-reverse\">\n <!-- <ws-widget-svg-to-pdf></ws-widget-svg-to-pdf> -->\n <a mat-button (click)=\"shareCert()\" class=\"ws-mat-accent-border-active mat-accent\">\n <mat-icon class=\"mat-icon material-icons-outlined download_icon margin-right-xs\">share</mat-icon>\n Share\n </a>\n <a mat-button [matMenuTriggerFor]=\"menu\" class=\"ws-mat-accent-border-active mat-accent\" (click)=\"raiseIntreactTelemetry()\">\n <mat-icon class=\"mat-icon material-icons-outlined download_icon margin-right-xs\">cloud_download</mat-icon>\n {{'certificatedialog.download' | translate}}\n </a>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item (click)='downloadCertPdf()'>\n <mat-icon>picture_as_pdf</mat-icon>\n <span>{{'certificatedialog.pdf' | translate}}</span>\n </button>\n <button mat-menu-item (click)='downloadCertPng()'>\n <mat-icon>photo</mat-icon>\n <span>{{'certificatedialog.png' | translate}}</span>\n </button>\n <button mat-menu-item (click)='downloadCert()'>\n <mat-icon>photo_size_select_actual</mat-icon>\n <span>{{'certificatedialog.svg' | translate}}</span>\n </button>\n </mat-menu>\n </mat-card-actions>\n</mat-card>\n",
11710
+ template: "<mat-card class=\"no-shadow certificate-img-box\">\n <button mat-icon-button class=\"close-button\" [mat-dialog-close]=\"true\">\n <mat-icon class=\"close-icon\" color=\"warn\">close</mat-icon>\n </button>\n <!-- <mat-card-title>\n\n </mat-card-title> -->\n <mat-card-content class=\"certificate-img-content\">\n <img #certificate [src]=\"url| pipeSafeSanitizer: 'url'\" alt=\"Certificate\" role=\"image\" class=\"certificate-banner-image\">\n </mat-card-content>\n <mat-card-actions class=\"flex gap-4 flex-row-reverse\">\n <!-- <ws-widget-svg-to-pdf></ws-widget-svg-to-pdf> -->\n <a mat-button (click)=\"shareCert()\" class=\"ws-mat-accent-border-active mat-accent btn-custom\">\n <mat-icon class=\"mat-icon material-icons-outlined download_icon margin-right-xs\">share</mat-icon>\n Share\n </a>\n <a mat-button [matMenuTriggerFor]=\"menu\" class=\"ws-mat-accent-border-active mat-accent btn-custom\" (click)=\"raiseIntreactTelemetry()\">\n <mat-icon class=\"mat-icon material-icons-outlined download_icon margin-right-xs\">cloud_download</mat-icon>\n {{'certificatedialog.download' | translate}}\n </a>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item (click)='downloadCertPdf()'>\n <mat-icon>picture_as_pdf</mat-icon>\n <span>{{'certificatedialog.pdf' | translate}}</span>\n </button>\n <button mat-menu-item (click)='downloadCertPng()'>\n <mat-icon>photo</mat-icon>\n <span>{{'certificatedialog.png' | translate}}</span>\n </button>\n <button mat-menu-item (click)='downloadCert()'>\n <mat-icon>photo_size_select_actual</mat-icon>\n <span>{{'certificatedialog.svg' | translate}}</span>\n </button>\n </mat-menu>\n </mat-card-actions>\n</mat-card>\n",
11520
11711
  /* tslint:disable */
11521
11712
  host: { class: 'certificate-inner-dialog-panel' },
11522
- styles: [".no-shadow{box-shadow:none!important}.certificate-banner-image{height:30rem;display:flex;width:auto;margin:0 auto}.certificate-img-box{max-height:35rem;overflow-y:auto;overflow-x:hidden}.certificate-img-content{overflow:hidden}a.download_btn{background-color:#f0f0f0;border-radius:4px;float:right;height:40px;padding:0 16px;text-align:center;line-height:40px;text-decoration:none;color:rgba(0,0,0,.6);font-size:14px;font-weight:600;margin-top:16px;margin-right:0}.download_icon{font-size:16px;vertical-align:text-top}.close-icon{transition:1s ease-in-out;color:#fff!important}.close-icon:hover{transform:rotate(180deg)}::ng-deep .icon-outside .close-button{float:right;top:-52px;right:-52px}::ng-deep .icon-outside .mat-dialog-container{overflow:unset}::ng-deep .cdk-overlay-pane{max-height:96%!important;overflow-y:auto!important}.certificate-banner-image svg{width:500;height:500}@media only screen and (max-width:1279px){.certificate-banner-image{width:100%;height:auto;flex:1}.certificate-banner-image svg{width:auto;height:auto;flex:1}}.close-button{float:right;top:-16px;right:-12px;height:30px;width:30px;line-height:30px;background:#000!important;color:#fff!important;border-radius:50%!important}.ws-mat-accent-border{border:1px solid rgba(255,255,255,.08)}.ws-mat-accent-border-active{border:1px solid #1b4ca1;color:#1b4ca1}.mat-button,.mat-flat-button,.mat-icon-button,.mat-stroked-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}"]
11713
+ styles: [".no-shadow{box-shadow:none!important}.certificate-banner-image{height:30rem;display:flex;width:auto;margin:0 auto}.certificate-img-box{max-height:35rem;overflow-y:auto;overflow-x:hidden}.certificate-img-content{overflow:hidden}a.download_btn{background-color:#f0f0f0;border-radius:4px;float:right;height:40px;padding:0 16px;text-align:center;line-height:40px;text-decoration:none;color:rgba(0,0,0,.6);font-size:14px;font-weight:600;margin-top:16px;margin-right:0}.download_icon{font-size:16px;vertical-align:text-top}.close-icon{transition:1s ease-in-out;color:#fff!important}.close-icon:hover{transform:rotate(180deg)}::ng-deep .icon-outside .close-button{float:right;top:-52px;right:-52px}::ng-deep .icon-outside .mat-dialog-container{overflow:unset}::ng-deep .cdk-overlay-pane{max-height:96%!important;overflow-y:auto!important}.certificate-banner-image svg{width:500;height:500}@media only screen and (max-width:1279px){.certificate-banner-image{width:100%;height:auto;flex:1}.certificate-banner-image svg{width:auto;height:auto;flex:1}}.close-button{float:right;top:-16px;right:-12px;height:30px;width:30px;line-height:30px;background:#000!important;color:#fff!important;border-radius:50%!important}.ws-mat-accent-border{border:1px solid rgba(255,255,255,.08)}.ws-mat-accent-border-active{border:1px solid #1b4ca1;color:#1b4ca1}.btn-custom,.mat-button,.mat-flat-button,.mat-icon-button,.mat-stroked-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.close-icon{position:absolute!important;top:19px!important;right:18px!important}"]
11523
11714
  }] }
11524
11715
  ];
11525
11716
  /** @nocollapse */
@@ -12351,6 +12542,7 @@
12351
12542
  CardWideV2Component,
12352
12543
  CardKarmaProgramsComponent,
12353
12544
  CardKarmaProgramsV2Component,
12545
+ ProviderCardComponent,
12354
12546
  CardPortraitExtComponent,
12355
12547
  CardAssessmentComponent,
12356
12548
  CardProgressPortraitLibComponent,
@@ -12417,6 +12609,4171 @@
12417
12609
  }
12418
12610
  ];
12419
12611
 
12612
+ /**
12613
+ * @fileoverview added by tsickle
12614
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
12615
+ */
12616
+ /**
12617
+ * @record
12618
+ */
12619
+ function IStripUnitContentData$1() { }
12620
+ if (false) {
12621
+ /** @type {?} */
12622
+ IStripUnitContentData$1.prototype.key;
12623
+ /** @type {?} */
12624
+ IStripUnitContentData$1.prototype.canHideStrip;
12625
+ /** @type {?|undefined} */
12626
+ IStripUnitContentData$1.prototype.mode;
12627
+ /** @type {?} */
12628
+ IStripUnitContentData$1.prototype.showStrip;
12629
+ /** @type {?} */
12630
+ IStripUnitContentData$1.prototype.disableTranslate;
12631
+ /** @type {?|undefined} */
12632
+ IStripUnitContentData$1.prototype.widgets;
12633
+ /** @type {?} */
12634
+ IStripUnitContentData$1.prototype.stripTitle;
12635
+ /** @type {?|undefined} */
12636
+ IStripUnitContentData$1.prototype.stripTitleLink;
12637
+ /** @type {?|undefined} */
12638
+ IStripUnitContentData$1.prototype.sliderConfig;
12639
+ /** @type {?} */
12640
+ IStripUnitContentData$1.prototype.stripConfig;
12641
+ /** @type {?|undefined} */
12642
+ IStripUnitContentData$1.prototype.tabs;
12643
+ /** @type {?|undefined} */
12644
+ IStripUnitContentData$1.prototype.stripName;
12645
+ /** @type {?|undefined} */
12646
+ IStripUnitContentData$1.prototype.stripLogo;
12647
+ /** @type {?|undefined} */
12648
+ IStripUnitContentData$1.prototype.description;
12649
+ /** @type {?|undefined} */
12650
+ IStripUnitContentData$1.prototype.stripInfo;
12651
+ /** @type {?|undefined} */
12652
+ IStripUnitContentData$1.prototype.noDataWidget;
12653
+ /** @type {?|undefined} */
12654
+ IStripUnitContentData$1.prototype.errorWidget;
12655
+ /** @type {?} */
12656
+ IStripUnitContentData$1.prototype.showOnNoData;
12657
+ /** @type {?} */
12658
+ IStripUnitContentData$1.prototype.showOnLoader;
12659
+ /** @type {?} */
12660
+ IStripUnitContentData$1.prototype.showOnError;
12661
+ /** @type {?|undefined} */
12662
+ IStripUnitContentData$1.prototype.loaderWidgets;
12663
+ /** @type {?|undefined} */
12664
+ IStripUnitContentData$1.prototype.stripBackground;
12665
+ /** @type {?|undefined} */
12666
+ IStripUnitContentData$1.prototype.secondaryHeading;
12667
+ /** @type {?} */
12668
+ IStripUnitContentData$1.prototype.viewMoreUrl;
12669
+ /** @type {?|undefined} */
12670
+ IStripUnitContentData$1.prototype.request;
12671
+ }
12672
+ var ContentStripWithTabsPillsComponent = /** @class */ (function (_super) {
12673
+ __extends(ContentStripWithTabsPillsComponent, _super);
12674
+ function ContentStripWithTabsPillsComponent(
12675
+ // private contentStripSvc: ContentStripNewMultipleService,
12676
+ environment, contentSvc, loggerSvc, eventSvc, configSvc, utilitySvc, router, userSvc, translate, langtranslations) {
12677
+ var _this = _super.call(this) || this;
12678
+ _this.contentSvc = contentSvc;
12679
+ _this.loggerSvc = loggerSvc;
12680
+ _this.eventSvc = eventSvc;
12681
+ _this.configSvc = configSvc;
12682
+ _this.utilitySvc = utilitySvc;
12683
+ _this.router = router;
12684
+ _this.userSvc = userSvc;
12685
+ _this.translate = translate;
12686
+ _this.langtranslations = langtranslations;
12687
+ _this.emptyResponse = new core.EventEmitter();
12688
+ _this.viewAllResponse = new core.EventEmitter();
12689
+ _this.telemtryResponse = new core.EventEmitter();
12690
+ _this.providerId = '';
12691
+ _this.emitViewAll = false;
12692
+ _this.channnelName = '';
12693
+ _this.id = "ws-strip-miltiple_" + Math.random();
12694
+ _this.stripsResultDataMap = {};
12695
+ _this.stripsKeyOrder = [];
12696
+ _this.showAccordionData = true;
12697
+ _this.showParentLoader = false;
12698
+ _this.showParentError = false;
12699
+ _this.showParentNoData = false;
12700
+ _this.errorDataCount = 0;
12701
+ _this.noDataCount = 0;
12702
+ _this.successDataCount = 0;
12703
+ _this.contentAvailable = true;
12704
+ _this.baseUrl = _this.configSvc.sitePath || '';
12705
+ _this.veifiedKarmayogi = false;
12706
+ _this.changeEventSubscription = null;
12707
+ _this.defaultMaxWidgets = 12;
12708
+ _this.todaysEvents = [];
12709
+ if (localStorage.getItem('websiteLanguage')) {
12710
+ _this.translate.setDefaultLang('en');
12711
+ /** @type {?} */
12712
+ var lang = JSON.stringify(localStorage.getItem('websiteLanguage'));
12713
+ lang = lang.replace(/\"/g, '');
12714
+ _this.translate.use(lang);
12715
+ }
12716
+ _this.environment = environment;
12717
+ return _this;
12718
+ }
12719
+ /**
12720
+ * @return {?}
12721
+ */
12722
+ ContentStripWithTabsPillsComponent.prototype.ngOnInit = /**
12723
+ * @return {?}
12724
+ */
12725
+ function () {
12726
+ var _this = this;
12727
+ // const url = window.location.href
12728
+ this.initData();
12729
+ this.contentSvc.telemetryData$.subscribe((/**
12730
+ * @param {?} data
12731
+ * @return {?}
12732
+ */
12733
+ function (data) {
12734
+ _this.telemtryResponse.emit(data);
12735
+ }));
12736
+ };
12737
+ /**
12738
+ * @return {?}
12739
+ */
12740
+ ContentStripWithTabsPillsComponent.prototype.ngOnDestroy = /**
12741
+ * @return {?}
12742
+ */
12743
+ function () {
12744
+ if (this.changeEventSubscription) {
12745
+ this.changeEventSubscription.unsubscribe();
12746
+ }
12747
+ };
12748
+ /**
12749
+ * @param {?} key
12750
+ * @return {?}
12751
+ */
12752
+ ContentStripWithTabsPillsComponent.prototype.showAccordion = /**
12753
+ * @param {?} key
12754
+ * @return {?}
12755
+ */
12756
+ function (key) {
12757
+ if (this.utilitySvc.isMobile && this.stripsResultDataMap[key].mode === 'accordion') {
12758
+ return this.showAccordionData;
12759
+ }
12760
+ return true;
12761
+ };
12762
+ /**
12763
+ * @param {?} key
12764
+ * @return {?}
12765
+ */
12766
+ ContentStripWithTabsPillsComponent.prototype.setHiddenForStrip = /**
12767
+ * @param {?} key
12768
+ * @return {?}
12769
+ */
12770
+ function (key) {
12771
+ this.stripsResultDataMap[key].showStrip = false;
12772
+ sessionStorage.setItem("cstrip_" + key, '1');
12773
+ };
12774
+ /**
12775
+ * @private
12776
+ * @param {?} key
12777
+ * @return {?}
12778
+ */
12779
+ ContentStripWithTabsPillsComponent.prototype.getIfStripHidden = /**
12780
+ * @private
12781
+ * @param {?} key
12782
+ * @return {?}
12783
+ */
12784
+ function (key) {
12785
+ /** @type {?} */
12786
+ var storageItem = sessionStorage.getItem("cstrip_" + key);
12787
+ return Boolean(storageItem !== '1');
12788
+ };
12789
+ /**
12790
+ * @private
12791
+ * @return {?}
12792
+ */
12793
+ ContentStripWithTabsPillsComponent.prototype.initData = /**
12794
+ * @private
12795
+ * @return {?}
12796
+ */
12797
+ function () {
12798
+ var e_1, _a;
12799
+ var _this = this;
12800
+ this.stripsKeyOrder = this.widgetData && this.widgetData.strips && this.widgetData.strips.map((/**
12801
+ * @param {?} strip
12802
+ * @return {?}
12803
+ */
12804
+ function (strip) { return strip.key; })) || [];
12805
+ if (this.widgetData.loader && this.widgetData.strips.length) {
12806
+ this.showParentLoader = true;
12807
+ }
12808
+ try {
12809
+ // Fetch the data
12810
+ for (var _b = __values(this.widgetData.strips), _c = _b.next(); !_c.done; _c = _b.next()) {
12811
+ var strip = _c.value;
12812
+ if (this.checkForEmptyWidget(strip)) {
12813
+ this.fetchStripFromRequestData(strip, false);
12814
+ }
12815
+ else {
12816
+ this.processStrip(strip, [], 'done', true, null);
12817
+ }
12818
+ }
12819
+ }
12820
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
12821
+ finally {
12822
+ try {
12823
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
12824
+ }
12825
+ finally { if (e_1) throw e_1.error; }
12826
+ }
12827
+ // Subscription for changes
12828
+ /** @type {?} */
12829
+ var keyAndEvent = this.widgetData.strips
12830
+ .map((/**
12831
+ * @param {?} strip
12832
+ * @return {?}
12833
+ */
12834
+ function (strip) { return ({
12835
+ key: strip.key,
12836
+ type: (strip.refreshEvent && strip.refreshEvent.eventType) || '',
12837
+ from: (strip.refreshEvent && strip.refreshEvent.from.toString()) || '',
12838
+ }); }))
12839
+ .filter((/**
12840
+ * @param {?} __0
12841
+ * @return {?}
12842
+ */
12843
+ function (_a) {
12844
+ var key = _a.key, type = _a.type, from = _a.from;
12845
+ return key && type && from;
12846
+ }));
12847
+ /** @type {?} */
12848
+ var eventTypeSet = new Set(keyAndEvent.map((/**
12849
+ * @param {?} e
12850
+ * @return {?}
12851
+ */
12852
+ function (e) { return e.type; })));
12853
+ this.changeEventSubscription = this.eventSvc.events$
12854
+ .pipe(operators.filter((/**
12855
+ * @param {?} event
12856
+ * @return {?}
12857
+ */
12858
+ function (event) { return eventTypeSet.has(event.eventType); })))
12859
+ .subscribe((/**
12860
+ * @param {?} event
12861
+ * @return {?}
12862
+ */
12863
+ function (event) {
12864
+ keyAndEvent
12865
+ .filter((/**
12866
+ * @param {?} e
12867
+ * @return {?}
12868
+ */
12869
+ function (e) { return e.type === event.eventType && e.from === event.from; }))
12870
+ .map((/**
12871
+ * @param {?} e
12872
+ * @return {?}
12873
+ */
12874
+ function (e) { return e.key; }))
12875
+ .forEach((/**
12876
+ * @param {?} k
12877
+ * @return {?}
12878
+ */
12879
+ function (k) { return _this.fetchStripFromKey(k, false); }));
12880
+ }));
12881
+ };
12882
+ /**
12883
+ * @private
12884
+ * @param {?} key
12885
+ * @param {?=} calculateParentStatus
12886
+ * @return {?}
12887
+ */
12888
+ ContentStripWithTabsPillsComponent.prototype.fetchStripFromKey = /**
12889
+ * @private
12890
+ * @param {?} key
12891
+ * @param {?=} calculateParentStatus
12892
+ * @return {?}
12893
+ */
12894
+ function (key, calculateParentStatus) {
12895
+ if (calculateParentStatus === void 0) { calculateParentStatus = true; }
12896
+ /** @type {?} */
12897
+ var stripData = this.widgetData.strips.find((/**
12898
+ * @param {?} strip
12899
+ * @return {?}
12900
+ */
12901
+ function (strip) { return strip.key === key; }));
12902
+ if (stripData) {
12903
+ this.fetchStripFromRequestData(stripData, calculateParentStatus);
12904
+ }
12905
+ };
12906
+ /**
12907
+ * @param {?} data
12908
+ * @return {?}
12909
+ */
12910
+ ContentStripWithTabsPillsComponent.prototype.isStripShowing = /**
12911
+ * @param {?} data
12912
+ * @return {?}
12913
+ */
12914
+ function (data) {
12915
+ var _this = this;
12916
+ /** @type {?} */
12917
+ var count = 0;
12918
+ if (data && data.key === this.environment.programStripKey && (!data.tabs || !data.tabs.length) &&
12919
+ data.stripTitle === this.environment.programStripName && data.widgets.length > 0) {
12920
+ data.widgets.forEach((/**
12921
+ * @param {?} key
12922
+ * @return {?}
12923
+ */
12924
+ function (key) {
12925
+ if (key && key.widgetData.content.primaryCategory === _this.environment.programStripPrimaryCategory) {
12926
+ count = count + 1;
12927
+ }
12928
+ }));
12929
+ if (count > 0) {
12930
+ data.showStrip = true;
12931
+ }
12932
+ else {
12933
+ data.showStrip = false;
12934
+ }
12935
+ }
12936
+ // console.log('data.key', data, data.key, data.widgets);
12937
+ return data.showStrip;
12938
+ };
12939
+ Object.defineProperty(ContentStripWithTabsPillsComponent.prototype, "isMobile", {
12940
+ get: /**
12941
+ * @return {?}
12942
+ */
12943
+ function () {
12944
+ return this.utilitySvc.isMobile || false;
12945
+ },
12946
+ enumerable: true,
12947
+ configurable: true
12948
+ });
12949
+ /**
12950
+ * @param {?} data
12951
+ * @return {?}
12952
+ */
12953
+ ContentStripWithTabsPillsComponent.prototype.getdata = /**
12954
+ * @param {?} data
12955
+ * @return {?}
12956
+ */
12957
+ function (data) {
12958
+ if (data.stripInfo) {
12959
+ return data.stripInfo.widget;
12960
+ }
12961
+ return {};
12962
+ };
12963
+ /**
12964
+ * @param {?} wData
12965
+ * @param {?} data
12966
+ * @return {?}
12967
+ */
12968
+ ContentStripWithTabsPillsComponent.prototype.checkCondition = /**
12969
+ * @param {?} wData
12970
+ * @param {?} data
12971
+ * @return {?}
12972
+ */
12973
+ function (wData, data) {
12974
+ if (wData.strips[0].stripConfig && wData.strips[0].stripConfig.hideShowAll) {
12975
+ return !wData.strips[0].stripConfig.hideShowAll;
12976
+ }
12977
+ return wData.strips[0].viewMoreUrl && data.widgets && data.widgets.length >= 4;
12978
+ };
12979
+ /**
12980
+ * @param {?} data
12981
+ * @return {?}
12982
+ */
12983
+ ContentStripWithTabsPillsComponent.prototype.checkVisible = /**
12984
+ * @param {?} data
12985
+ * @return {?}
12986
+ */
12987
+ function (data) {
12988
+ return data.stripInfo && data.stripInfo.visibilityMode === 'visible';
12989
+ };
12990
+ /**
12991
+ * @param {?} data
12992
+ * @return {?}
12993
+ */
12994
+ ContentStripWithTabsPillsComponent.prototype.getContineuLearningLenth = /**
12995
+ * @param {?} data
12996
+ * @return {?}
12997
+ */
12998
+ function (data) {
12999
+ return data.widgets ? data.widgets.length : 0;
13000
+ };
13001
+ /**
13002
+ * @param {?} data
13003
+ * @return {?}
13004
+ */
13005
+ ContentStripWithTabsPillsComponent.prototype.getLength = /**
13006
+ * @param {?} data
13007
+ * @return {?}
13008
+ */
13009
+ function (data) {
13010
+ if (!data.tabs || !data.tabs.length) {
13011
+ return data.widgets ? data.widgets.length : 0;
13012
+ }
13013
+ {
13014
+ // if tabs are there check if each tab has widgets and get the tab with max widgets
13015
+ /** @type {?} */
13016
+ var tabWithMaxWidgets_1 = {};
13017
+ data.tabs.forEach((/**
13018
+ * @param {?} tab
13019
+ * @return {?}
13020
+ */
13021
+ function (tab) {
13022
+ if (tab.pillsData && tab.pillsData.length) {
13023
+ tabWithMaxWidgets_1 = tab.pillsData.reduce((/**
13024
+ * @param {?} prev
13025
+ * @param {?} current
13026
+ * @return {?}
13027
+ */
13028
+ function (prev, current) {
13029
+ if (!prev.widgets && !current.widgets) {
13030
+ return current;
13031
+ }
13032
+ if (prev.widgets && current.widgets) {
13033
+ return (prev.widgets.length > current.widgets.length) ? prev : current;
13034
+ }
13035
+ if (current.widgets && !prev.widgets) {
13036
+ return current;
13037
+ }
13038
+ if (!current.widgets && prev.widgets) {
13039
+ return prev;
13040
+ }
13041
+ return current;
13042
+ // return (prev.widgets && current.widgets && (prev.widgets.length > current.widgets.length) ) ? prev : current
13043
+ // tslint:disable-next-line: align
13044
+ }), data.tabs[0]);
13045
+ }
13046
+ }));
13047
+ // if tabs has atleast 1 widgets then strip will show or else not
13048
+ return tabWithMaxWidgets_1.widgets ? tabWithMaxWidgets_1.widgets.length : 0;
13049
+ }
13050
+ };
13051
+ /**
13052
+ * @private
13053
+ * @param {?} v6filters
13054
+ * @return {?}
13055
+ */
13056
+ ContentStripWithTabsPillsComponent.prototype.getFiltersFromArray = /**
13057
+ * @private
13058
+ * @param {?} v6filters
13059
+ * @return {?}
13060
+ */
13061
+ function (v6filters) {
13062
+ /** @type {?} */
13063
+ var filters = {};
13064
+ if (v6filters.constructor === Array) {
13065
+ v6filters.forEach(((/**
13066
+ * @param {?} f
13067
+ * @return {?}
13068
+ */
13069
+ function (f) {
13070
+ Object.keys(f).forEach((/**
13071
+ * @param {?} key
13072
+ * @return {?}
13073
+ */
13074
+ function (key) {
13075
+ filters[key] = f[key];
13076
+ }));
13077
+ })));
13078
+ return filters;
13079
+ }
13080
+ return v6filters;
13081
+ };
13082
+ /**
13083
+ * @private
13084
+ * @param {?} v6filters
13085
+ * @return {?}
13086
+ */
13087
+ ContentStripWithTabsPillsComponent.prototype.transformSearchV6FiltersV2 = /**
13088
+ * @private
13089
+ * @param {?} v6filters
13090
+ * @return {?}
13091
+ */
13092
+ function (v6filters) {
13093
+ /** @type {?} */
13094
+ var filters = {};
13095
+ if (v6filters.constructor === Array) {
13096
+ v6filters.forEach(((/**
13097
+ * @param {?} f
13098
+ * @return {?}
13099
+ */
13100
+ function (f) {
13101
+ Object.keys(f).forEach((/**
13102
+ * @param {?} key
13103
+ * @return {?}
13104
+ */
13105
+ function (key) {
13106
+ filters[key] = f[key];
13107
+ }));
13108
+ })));
13109
+ return filters;
13110
+ }
13111
+ return v6filters;
13112
+ };
13113
+ /**
13114
+ * @param {?} filters
13115
+ * @return {?}
13116
+ */
13117
+ ContentStripWithTabsPillsComponent.prototype.checkForDateFilters = /**
13118
+ * @param {?} filters
13119
+ * @return {?}
13120
+ */
13121
+ function (filters) {
13122
+ /** @type {?} */
13123
+ var userData;
13124
+ if (this.configSvc.userProfile) {
13125
+ userData = this.configSvc.userProfile;
13126
+ }
13127
+ if (filters && filters.hasOwnProperty('batches.endDate')) {
13128
+ // tslint:disable-next-line
13129
+ filters['batches.endDate']['>='] = eval(filters['batches.endDate']['>=']);
13130
+ }
13131
+ else if (filters && filters.hasOwnProperty('batches.enrollmentEndDate')) {
13132
+ // tslint:disable-next-line
13133
+ filters['batches.enrollmentEndDate']['>='] = eval(filters['batches.enrollmentEndDate']['>=']);
13134
+ }
13135
+ else if (filters.organisation &&
13136
+ filters.organisation.indexOf('<orgID>') >= 0) {
13137
+ if (this.providerId) {
13138
+ filters.organisation = this.providerId;
13139
+ }
13140
+ else {
13141
+ filters.organisation = userData && userData.rootOrgId;
13142
+ if (filters && filters.hasOwnProperty('designation')) {
13143
+ filters.designation = userData.professionalDetails.length > 0 ?
13144
+ userData.professionalDetails[0].designation : '';
13145
+ }
13146
+ }
13147
+ }
13148
+ return filters;
13149
+ };
13150
+ /**
13151
+ * @private
13152
+ * @param {?} strip
13153
+ * @param {?=} calculateParentStatus
13154
+ * @return {?}
13155
+ */
13156
+ ContentStripWithTabsPillsComponent.prototype.fetchStripFromRequestData = /**
13157
+ * @private
13158
+ * @param {?} strip
13159
+ * @param {?=} calculateParentStatus
13160
+ * @return {?}
13161
+ */
13162
+ function (strip, calculateParentStatus) {
13163
+ if (calculateParentStatus === void 0) { calculateParentStatus = true; }
13164
+ // setting initial values
13165
+ strip.loaderWidgets = this.transformSkeletonToWidgets(strip);
13166
+ this.processStrip(strip, [], 'fetching', false, null);
13167
+ this.fetchFromEnrollmentList(strip, calculateParentStatus);
13168
+ this.fetchFromSearchV6(strip, calculateParentStatus);
13169
+ this.fetchFromTrendingContent(strip, calculateParentStatus);
13170
+ this.fetchAllTopContent(strip, calculateParentStatus);
13171
+ this.fetchAllFeaturedContent(strip, calculateParentStatus);
13172
+ this.fetchAllBookMarkData(strip, calculateParentStatus);
13173
+ this.fetchAllPlaylistSearch(strip, calculateParentStatus);
13174
+ this.fetchPlaylistReadData(strip, calculateParentStatus);
13175
+ this.fetchCiosContentData(strip, calculateParentStatus);
13176
+ this.fetchForYouData(strip, calculateParentStatus);
13177
+ this.fetchAllCbpPlans(strip, calculateParentStatus);
13178
+ // this.enrollInterval = setInterval(() => {
13179
+ // this.fetchAllCbpPlans(strip, calculateParentStatus)
13180
+ // }, 1000)
13181
+ };
13182
+ /**
13183
+ * @param {?} strip
13184
+ * @param {?=} calculateParentStatus
13185
+ * @return {?}
13186
+ */
13187
+ ContentStripWithTabsPillsComponent.prototype.fetchFromEnrollmentList = /**
13188
+ * @param {?} strip
13189
+ * @param {?=} calculateParentStatus
13190
+ * @return {?}
13191
+ */
13192
+ function (strip, calculateParentStatus) {
13193
+ var _this = this;
13194
+ if (calculateParentStatus === void 0) { calculateParentStatus = true; }
13195
+ if (strip.request && strip.request.enrollmentList && Object.keys(strip.request.enrollmentList).length) {
13196
+ /** @type {?} */
13197
+ var userId = '';
13198
+ /** @type {?} */
13199
+ var content_1;
13200
+ /** @type {?} */
13201
+ var contentNew_1;
13202
+ /** @type {?} */
13203
+ var tabResults_1 = [];
13204
+ /** @type {?} */
13205
+ var queryParams = lodash.get(strip.request.enrollmentList, 'queryParams');
13206
+ if (this.configSvc.userProfile) {
13207
+ userId = this.configSvc.userProfile.userId;
13208
+ }
13209
+ // tslint:disable-next-line: deprecation
13210
+ this.userSvc.fetchUserBatchList(userId, queryParams).subscribe((/**
13211
+ * @param {?} result
13212
+ * @return {?}
13213
+ */
13214
+ function (result) {
13215
+ /** @type {?} */
13216
+ var courses = result && result.courses;
13217
+ /** @type {?} */
13218
+ var showViewMore = Boolean(courses.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
13219
+ /** @type {?} */
13220
+ var viewMoreUrl = showViewMore
13221
+ ? {
13222
+ path: (strip.viewMoreUrl && strip.viewMoreUrl.path) || '',
13223
+ queryParams: {
13224
+ q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
13225
+ f: strip.request && strip.request.searchV6 && strip.request.searchV6.filters
13226
+ ? JSON.stringify(
13227
+ // this.searchServSvc.transformSearchV6Filters(
13228
+ strip.request.searchV6.filters
13229
+ // ),
13230
+ )
13231
+ : {},
13232
+ },
13233
+ }
13234
+ : null;
13235
+ if (courses && courses.length) {
13236
+ content_1 = courses.map((/**
13237
+ * @param {?} c
13238
+ * @return {?}
13239
+ */
13240
+ function (c) {
13241
+ /** @type {?} */
13242
+ var contentTemp = c.content;
13243
+ contentTemp.completionPercentage = c.completionPercentage || c.progress || 0;
13244
+ contentTemp.completionStatus = c.completionStatus || c.status || 0;
13245
+ contentTemp.enrolledDate = c.enrolledDate || '';
13246
+ contentTemp.lastContentAccessTime = c.lastContentAccessTime || '';
13247
+ contentTemp.lastReadContentStatus = c.lastReadContentStatus || '';
13248
+ contentTemp.lastReadContentId = c.lastReadContentId || '';
13249
+ contentTemp.lrcProgressDetails = c.lrcProgressDetails || '';
13250
+ contentTemp.issuedCertificates = c.issuedCertificates || [];
13251
+ contentTemp.batchId = c.batchId || '';
13252
+ return contentTemp;
13253
+ }));
13254
+ }
13255
+ // To filter content with completionPercentage > 0,
13256
+ // so that only those content will show in home page
13257
+ // continue learing strip
13258
+ // if (content && content.length) {
13259
+ // contentNew = content.filter((c: any) => {
13260
+ // /** commented as both are 0 after enrolll */
13261
+ // if (c.completionPercentage && c.completionPercentage > 0) {
13262
+ // return c
13263
+ // }
13264
+ // })
13265
+ // }
13266
+ // To sort in descending order of the enrolled date
13267
+ contentNew_1 = (content_1 || []).sort((/**
13268
+ * @param {?} a
13269
+ * @param {?} b
13270
+ * @return {?}
13271
+ */
13272
+ function (a, b) {
13273
+ /** @type {?} */
13274
+ var dateA = new Date(a.lastContentAccessTime || 0);
13275
+ /** @type {?} */
13276
+ var dateB = new Date(b.lastContentAccessTime || 0);
13277
+ return dateB - dateA;
13278
+ }));
13279
+ if (strip.tabs && strip.tabs.length) {
13280
+ tabResults_1 = _this.splitEnrollmentTabsData(contentNew_1, strip);
13281
+ _this.processStrip(strip, _this.transformContentsToWidgets(contentNew_1, strip), 'done', calculateParentStatus, viewMoreUrl, tabResults_1);
13282
+ }
13283
+ else {
13284
+ _this.processStrip(strip, _this.transformContentsToWidgets(contentNew_1, strip), 'done', calculateParentStatus, viewMoreUrl);
13285
+ }
13286
+ }), (/**
13287
+ * @return {?}
13288
+ */
13289
+ function () {
13290
+ _this.processStrip(strip, [], 'error', calculateParentStatus, null);
13291
+ }));
13292
+ }
13293
+ };
13294
+ /**
13295
+ * @param {?} contentNew
13296
+ * @param {?} strip
13297
+ * @return {?}
13298
+ */
13299
+ ContentStripWithTabsPillsComponent.prototype.splitEnrollmentTabsData = /**
13300
+ * @param {?} contentNew
13301
+ * @param {?} strip
13302
+ * @return {?}
13303
+ */
13304
+ function (contentNew, strip) {
13305
+ /** @type {?} */
13306
+ var tabResults = [];
13307
+ /** @type {?} */
13308
+ var splitData = this.getInprogressAndCompleted(contentNew, (/**
13309
+ * @param {?} e
13310
+ * @return {?}
13311
+ */
13312
+ function (e) { return e.completionStatus === 1 || e.completionPercentage < 100; }), strip);
13313
+ if (strip.tabs && strip.tabs.length) {
13314
+ var _loop_1 = function (i) {
13315
+ if (strip.tabs[i]) {
13316
+ tabResults.push(__assign({}, strip.tabs[i], { fetchTabStatus: 'done' }, (splitData.find((/**
13317
+ * @param {?} itmInner
13318
+ * @return {?}
13319
+ */
13320
+ function (itmInner) {
13321
+ if (strip.tabs && strip.tabs[i] && itmInner.value === strip.tabs[i].value) {
13322
+ return itmInner;
13323
+ }
13324
+ return undefined;
13325
+ })))));
13326
+ }
13327
+ };
13328
+ for (var i = 0; i < strip.tabs.length; i += 1) {
13329
+ _loop_1(i);
13330
+ }
13331
+ }
13332
+ return tabResults;
13333
+ };
13334
+ /**
13335
+ * @param {?} array
13336
+ * @param {?} customFilter
13337
+ * @param {?} strip
13338
+ * @return {?}
13339
+ */
13340
+ ContentStripWithTabsPillsComponent.prototype.getInprogressAndCompleted = /**
13341
+ * @param {?} array
13342
+ * @param {?} customFilter
13343
+ * @param {?} strip
13344
+ * @return {?}
13345
+ */
13346
+ function (array, customFilter, strip) {
13347
+ /** @type {?} */
13348
+ var inprogress = [];
13349
+ /** @type {?} */
13350
+ var completed = [];
13351
+ array.forEach((/**
13352
+ * @param {?} e
13353
+ * @param {?} idx
13354
+ * @param {?} arr
13355
+ * @return {?}
13356
+ */
13357
+ function (e, idx, arr) { return (customFilter(e, idx, arr) ? inprogress : completed).push(e); }));
13358
+ return [
13359
+ { value: 'inprogress', widgets: this.transformContentsToWidgets(inprogress, strip) },
13360
+ { value: 'completed', widgets: this.transformContentsToWidgets(completed, strip) }
13361
+ ];
13362
+ };
13363
+ // async fetchFromSearchV6(strip: NsContentStripWithTabs.IContentStripUnit, calculateParentStatus = true) {
13364
+ // if (strip.request && strip.request.searchV6 && Object.keys(strip.request.searchV6).length) {
13365
+ // // if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
13366
+ // // if (this.configSvc.activeLocale) {
13367
+ // // strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
13368
+ // // } else {
13369
+ // // strip.request.searchV6.locale = ['en']
13370
+ // // }
13371
+ // // }
13372
+ // let originalFilters: any = [];
13373
+ // // tslint:disable:no-console
13374
+ // console.log(originalFilters);
13375
+ // if (strip.request &&
13376
+ // strip.request.searchV6 &&
13377
+ // strip.request.searchV6.request &&
13378
+ // strip.request.searchV6.request.filters) {
13379
+ // originalFilters = strip.request.searchV6.request.filters;
13380
+ // strip.request.searchV6.request.filters = this.checkForDateFilters(strip.request.searchV6.request.filters);
13381
+ // strip.request.searchV6.request.filters = this.getFiltersFromArray(
13382
+ // strip.request.searchV6.request.filters,
13383
+ // );
13384
+ // }
13385
+ // if (strip.tabs && strip.tabs.length) {
13386
+ // // TODO: Have to extract requestRequired to outer level of tabs config
13387
+ // const firstTab = strip.tabs[0];
13388
+ // if (firstTab.requestRequired) {
13389
+ // if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
13390
+ // const allTabs = this.stripsResultDataMap[strip.key].tabs;
13391
+ // const currentTabFromMap = (allTabs && allTabs.length && allTabs[0]) as NsContentStripWithTabs.IContentStripTab;
13392
+ // this.getTabDataByNewReqSearchV6(strip, 0, currentTabFromMap, calculateParentStatus);
13393
+ // }
13394
+ // }
13395
+ // } else {
13396
+ // try {
13397
+ // const response = await this.searchV6Request(strip, strip.request, calculateParentStatus);
13398
+ // // console.log('calling after - response, ', response)
13399
+ // if (response && response.results) {
13400
+ // // console.log('calling after-- ')
13401
+ // if (response.results.result.content) {
13402
+ // if(strip.key === 'scheduledAssessment') {
13403
+ // this.enrollInterval = setInterval(() => {
13404
+ // this.checkInvitOnlyAssessments(response.results.result.content, strip, calculateParentStatus, response.viewMoreUrl)
13405
+ // // tslint:disable-next-line
13406
+ // }, 1000)
13407
+ // } else {
13408
+ // this.processStrip(
13409
+ // strip,
13410
+ // this.transformContentsToWidgets(response.results.result.content, strip),
13411
+ // 'done',
13412
+ // calculateParentStatus,
13413
+ // response.viewMoreUrl,
13414
+ // );
13415
+ // }
13416
+ // } else if (response.results.result.Event) {
13417
+ // this.processStrip(
13418
+ // strip,
13419
+ // this.transformEventsToWidgets(response.results.result.Event, strip),
13420
+ // 'done',
13421
+ // calculateParentStatus,
13422
+ // response.viewMoreUrl,
13423
+ // );
13424
+ // } else {
13425
+ // this.processStrip(strip, [], 'error', calculateParentStatus, null);
13426
+ // }
13427
+ // } else {
13428
+ // this.processStrip(strip, [], 'error', calculateParentStatus, null);
13429
+ // }
13430
+ // } catch (error) {
13431
+ // // Handle errors
13432
+ // // console.error('Error:', error);
13433
+ // }
13434
+ // }
13435
+ // }
13436
+ // }
13437
+ // async fetchFromSearchV6(strip: NsContentStripWithTabs.IContentStripUnit, calculateParentStatus = true) {
13438
+ // if (strip.request && strip.request.searchV6 && Object.keys(strip.request.searchV6).length) {
13439
+ // // if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
13440
+ // // if (this.configSvc.activeLocale) {
13441
+ // // strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
13442
+ // // } else {
13443
+ // // strip.request.searchV6.locale = ['en']
13444
+ // // }
13445
+ // // }
13446
+ // let originalFilters: any = [];
13447
+ // // tslint:disable:no-console
13448
+ // console.log(originalFilters);
13449
+ // if (strip.request &&
13450
+ // strip.request.searchV6 &&
13451
+ // strip.request.searchV6.request &&
13452
+ // strip.request.searchV6.request.filters) {
13453
+ // originalFilters = strip.request.searchV6.request.filters;
13454
+ // strip.request.searchV6.request.filters = this.checkForDateFilters(strip.request.searchV6.request.filters);
13455
+ // strip.request.searchV6.request.filters = this.getFiltersFromArray(
13456
+ // strip.request.searchV6.request.filters,
13457
+ // );
13458
+ // }
13459
+ // if (strip.tabs && strip.tabs.length) {
13460
+ // // TODO: Have to extract requestRequired to outer level of tabs config
13461
+ // const firstTab = strip.tabs[0];
13462
+ // if (firstTab.requestRequired) {
13463
+ // if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
13464
+ // const allTabs = this.stripsResultDataMap[strip.key].tabs;
13465
+ // const currentTabFromMap = (allTabs && allTabs.length && allTabs[0]) as NsContentStripWithTabs.IContentStripTab;
13466
+ // this.getTabDataByNewReqSearchV6(strip, 0, currentTabFromMap, calculateParentStatus);
13467
+ // }
13468
+ // }
13469
+ // } else {
13470
+ // try {
13471
+ // const response = await this.searchV6Request(strip, strip.request, calculateParentStatus);
13472
+ // // console.log('calling after - response, ', response)
13473
+ // if (response && response.results) {
13474
+ // // console.log('calling after-- ')
13475
+ // if (response.results.result.content) {
13476
+ // if(strip.key === 'scheduledAssessment') {
13477
+ // this.enrollInterval = setInterval(() => {
13478
+ // this.checkInvitOnlyAssessments(response.results.result.content, strip, calculateParentStatus, response.viewMoreUrl)
13479
+ // // tslint:disable-next-line
13480
+ // }, 1000)
13481
+ // } else {
13482
+ // this.processStrip(
13483
+ // strip,
13484
+ // this.transformContentsToWidgets(response.results.result.content, strip),
13485
+ // 'done',
13486
+ // calculateParentStatus,
13487
+ // response.viewMoreUrl,
13488
+ // );
13489
+ // }
13490
+ // } else if (response.results.result.Event) {
13491
+ // this.processStrip(
13492
+ // strip,
13493
+ // this.transformEventsToWidgets(response.results.result.Event, strip),
13494
+ // 'done',
13495
+ // calculateParentStatus,
13496
+ // response.viewMoreUrl,
13497
+ // );
13498
+ // } else {
13499
+ // this.processStrip(strip, [], 'error', calculateParentStatus, null);
13500
+ // }
13501
+ // } else {
13502
+ // this.processStrip(strip, [], 'error', calculateParentStatus, null);
13503
+ // }
13504
+ // } catch (error) {
13505
+ // // Handle errors
13506
+ // // console.error('Error:', error);
13507
+ // }
13508
+ // }
13509
+ // }
13510
+ // }
13511
+ /**
13512
+ * @param {?} content
13513
+ * @param {?} strip
13514
+ * @param {?} calculateParentStatus
13515
+ * @param {?} viewMoreUrl
13516
+ * @return {?}
13517
+ */
13518
+ ContentStripWithTabsPillsComponent.prototype.checkInvitOnlyAssessments =
13519
+ // async fetchFromSearchV6(strip: NsContentStripWithTabs.IContentStripUnit, calculateParentStatus = true) {
13520
+ // if (strip.request && strip.request.searchV6 && Object.keys(strip.request.searchV6).length) {
13521
+ // // if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
13522
+ // // if (this.configSvc.activeLocale) {
13523
+ // // strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
13524
+ // // } else {
13525
+ // // strip.request.searchV6.locale = ['en']
13526
+ // // }
13527
+ // // }
13528
+ // let originalFilters: any = [];
13529
+ // // tslint:disable:no-console
13530
+ // console.log(originalFilters);
13531
+ // if (strip.request &&
13532
+ // strip.request.searchV6 &&
13533
+ // strip.request.searchV6.request &&
13534
+ // strip.request.searchV6.request.filters) {
13535
+ // originalFilters = strip.request.searchV6.request.filters;
13536
+ // strip.request.searchV6.request.filters = this.checkForDateFilters(strip.request.searchV6.request.filters);
13537
+ // strip.request.searchV6.request.filters = this.getFiltersFromArray(
13538
+ // strip.request.searchV6.request.filters,
13539
+ // );
13540
+ // }
13541
+ // if (strip.tabs && strip.tabs.length) {
13542
+ // // TODO: Have to extract requestRequired to outer level of tabs config
13543
+ // const firstTab = strip.tabs[0];
13544
+ // if (firstTab.requestRequired) {
13545
+ // if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
13546
+ // const allTabs = this.stripsResultDataMap[strip.key].tabs;
13547
+ // const currentTabFromMap = (allTabs && allTabs.length && allTabs[0]) as NsContentStripWithTabs.IContentStripTab;
13548
+ // this.getTabDataByNewReqSearchV6(strip, 0, currentTabFromMap, calculateParentStatus);
13549
+ // }
13550
+ // }
13551
+ // } else {
13552
+ // try {
13553
+ // const response = await this.searchV6Request(strip, strip.request, calculateParentStatus);
13554
+ // // console.log('calling after - response, ', response)
13555
+ // if (response && response.results) {
13556
+ // // console.log('calling after-- ')
13557
+ // if (response.results.result.content) {
13558
+ // if(strip.key === 'scheduledAssessment') {
13559
+ // this.enrollInterval = setInterval(() => {
13560
+ // this.checkInvitOnlyAssessments(response.results.result.content, strip, calculateParentStatus, response.viewMoreUrl)
13561
+ // // tslint:disable-next-line
13562
+ // }, 1000)
13563
+ // } else {
13564
+ // this.processStrip(
13565
+ // strip,
13566
+ // this.transformContentsToWidgets(response.results.result.content, strip),
13567
+ // 'done',
13568
+ // calculateParentStatus,
13569
+ // response.viewMoreUrl,
13570
+ // );
13571
+ // }
13572
+ // } else if (response.results.result.Event) {
13573
+ // this.processStrip(
13574
+ // strip,
13575
+ // this.transformEventsToWidgets(response.results.result.Event, strip),
13576
+ // 'done',
13577
+ // calculateParentStatus,
13578
+ // response.viewMoreUrl,
13579
+ // );
13580
+ // } else {
13581
+ // this.processStrip(strip, [], 'error', calculateParentStatus, null);
13582
+ // }
13583
+ // } else {
13584
+ // this.processStrip(strip, [], 'error', calculateParentStatus, null);
13585
+ // }
13586
+ // } catch (error) {
13587
+ // // Handle errors
13588
+ // // console.error('Error:', error);
13589
+ // }
13590
+ // }
13591
+ // }
13592
+ // }
13593
+ /**
13594
+ * @param {?} content
13595
+ * @param {?} strip
13596
+ * @param {?} calculateParentStatus
13597
+ * @param {?} viewMoreUrl
13598
+ * @return {?}
13599
+ */
13600
+ function (content, strip, calculateParentStatus, viewMoreUrl) {
13601
+ var _this = this;
13602
+ if (localStorage.getItem('enrollmentMapData')) {
13603
+ this.enrollmentMapData = JSON.parse(localStorage.getItem('enrollmentMapData') || '{}');
13604
+ /** @type {?} */
13605
+ var filteredArray_1 = [];
13606
+ content.forEach((/**
13607
+ * @param {?} data
13608
+ * @return {?}
13609
+ */
13610
+ function (data) {
13611
+ if (_this.enrollmentMapData[data.identifier]) {
13612
+ data['batch'] = _this.enrollmentMapData[data.identifier].batch;
13613
+ data['completionPercentage'] = _this.enrollmentMapData[data.identifier].completionPercentage;
13614
+ filteredArray_1.push(data);
13615
+ }
13616
+ }));
13617
+ this.processStrip(strip, this.transformContentsToWidgets(filteredArray_1, strip), 'done', calculateParentStatus, viewMoreUrl);
13618
+ clearInterval(this.enrollInterval);
13619
+ }
13620
+ };
13621
+ // async searchV6Request(strip: NsContentStripWithTabs.IContentStripUnit,
13622
+ // request: NsContentStripWithTabs.IContentStripUnit['request'],
13623
+ // calculateParentStatus: boolean
13624
+ // ): Promise<any> {
13625
+ // const originalFilters: any = [];
13626
+ // return new Promise<any>((resolve, reject) => {
13627
+ // if (request && request.searchV6) {
13628
+ // this.contentSvc.searchV6(request.searchV6).subscribe(results => {
13629
+ // const showViewMore = Boolean(
13630
+ // results.result.content && results.result.content.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch,
13631
+ // );
13632
+ // const viewMoreUrl = showViewMore
13633
+ // ? {
13634
+ // path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
13635
+ // queryParams: {
13636
+ // tab: 'Learn',
13637
+ // q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
13638
+ // f:
13639
+ // request &&
13640
+ // request.searchV6 &&
13641
+ // request.searchV6.request &&
13642
+ // request.searchV6.request.filters
13643
+ // ? JSON.stringify(
13644
+ // this.transformSearchV6FiltersV2(
13645
+ // originalFilters,
13646
+ // )
13647
+ // )
13648
+ // : {},
13649
+ // },
13650
+ // }
13651
+ // : null;
13652
+ // // if (viewMoreUrl && viewMoreUrl.queryParams) {
13653
+ // // viewMoreUrl.queryParams = viewMoreUrl.queryParams
13654
+ // // }
13655
+ // resolve({ results, viewMoreUrl });
13656
+ // }, (error: any) => {
13657
+ // this.processStrip(strip, [], 'error', calculateParentStatus, null);
13658
+ // reject(error);
13659
+ // },
13660
+ // );
13661
+ // }
13662
+ // });
13663
+ // }
13664
+ // async searchV6Request(strip: NsContentStripWithTabs.IContentStripUnit,
13665
+ // request: NsContentStripWithTabs.IContentStripUnit['request'],
13666
+ // calculateParentStatus: boolean
13667
+ // ): Promise<any> {
13668
+ // const originalFilters: any = [];
13669
+ // return new Promise<any>((resolve, reject) => {
13670
+ // if (request && request.searchV6) {
13671
+ // this.contentSvc.searchV6(request.searchV6).subscribe(results => {
13672
+ // const showViewMore = Boolean(
13673
+ // results.result.content && results.result.content.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch,
13674
+ // );
13675
+ // const viewMoreUrl = showViewMore
13676
+ // ? {
13677
+ // path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
13678
+ // queryParams: {
13679
+ // tab: 'Learn',
13680
+ // q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
13681
+ // f:
13682
+ // request &&
13683
+ // request.searchV6 &&
13684
+ // request.searchV6.request &&
13685
+ // request.searchV6.request.filters
13686
+ // ? JSON.stringify(
13687
+ // this.transformSearchV6FiltersV2(
13688
+ // originalFilters,
13689
+ // )
13690
+ // )
13691
+ // : {},
13692
+ // },
13693
+ // }
13694
+ // : null;
13695
+ // // if (viewMoreUrl && viewMoreUrl.queryParams) {
13696
+ // // viewMoreUrl.queryParams = viewMoreUrl.queryParams
13697
+ // // }
13698
+ // resolve({ results, viewMoreUrl });
13699
+ // }, (error: any) => {
13700
+ // this.processStrip(strip, [], 'error', calculateParentStatus, null);
13701
+ // reject(error);
13702
+ // },
13703
+ // );
13704
+ // }
13705
+ // });
13706
+ // }
13707
+ /**
13708
+ * @param {?} strip
13709
+ * @param {?=} calculateParentStatus
13710
+ * @return {?}
13711
+ */
13712
+ ContentStripWithTabsPillsComponent.prototype.fetchFromTrendingContent =
13713
+ // async searchV6Request(strip: NsContentStripWithTabs.IContentStripUnit,
13714
+ // request: NsContentStripWithTabs.IContentStripUnit['request'],
13715
+ // calculateParentStatus: boolean
13716
+ // ): Promise<any> {
13717
+ // const originalFilters: any = [];
13718
+ // return new Promise<any>((resolve, reject) => {
13719
+ // if (request && request.searchV6) {
13720
+ // this.contentSvc.searchV6(request.searchV6).subscribe(results => {
13721
+ // const showViewMore = Boolean(
13722
+ // results.result.content && results.result.content.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch,
13723
+ // );
13724
+ // const viewMoreUrl = showViewMore
13725
+ // ? {
13726
+ // path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
13727
+ // queryParams: {
13728
+ // tab: 'Learn',
13729
+ // q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
13730
+ // f:
13731
+ // request &&
13732
+ // request.searchV6 &&
13733
+ // request.searchV6.request &&
13734
+ // request.searchV6.request.filters
13735
+ // ? JSON.stringify(
13736
+ // this.transformSearchV6FiltersV2(
13737
+ // originalFilters,
13738
+ // )
13739
+ // )
13740
+ // : {},
13741
+ // },
13742
+ // }
13743
+ // : null;
13744
+ // // if (viewMoreUrl && viewMoreUrl.queryParams) {
13745
+ // // viewMoreUrl.queryParams = viewMoreUrl.queryParams
13746
+ // // }
13747
+ // resolve({ results, viewMoreUrl });
13748
+ // }, (error: any) => {
13749
+ // this.processStrip(strip, [], 'error', calculateParentStatus, null);
13750
+ // reject(error);
13751
+ // },
13752
+ // );
13753
+ // }
13754
+ // });
13755
+ // }
13756
+ /**
13757
+ * @param {?} strip
13758
+ * @param {?=} calculateParentStatus
13759
+ * @return {?}
13760
+ */
13761
+ function (strip, calculateParentStatus) {
13762
+ if (calculateParentStatus === void 0) { calculateParentStatus = true; }
13763
+ return __awaiter(this, void 0, void 0, function () {
13764
+ var originalFilters, firstTab, allTabs, currentTabFromMap, response, content, error_1;
13765
+ return __generator(this, function (_a) {
13766
+ switch (_a.label) {
13767
+ case 0:
13768
+ if (!(strip.request && strip.request.trendingSearch && Object.keys(strip.request.trendingSearch).length)) return [3 /*break*/, 4];
13769
+ // if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
13770
+ // if (this.configSvc.activeLocale) {
13771
+ // strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
13772
+ // } else {
13773
+ // strip.request.searchV6.locale = ['en']
13774
+ // }
13775
+ // }
13776
+ originalFilters = [];
13777
+ // tslint:disable:no-console
13778
+ if (strip.request &&
13779
+ strip.request.trendingSearch &&
13780
+ strip.request.trendingSearch.request &&
13781
+ strip.request.trendingSearch.request.filters) {
13782
+ originalFilters = strip.request.trendingSearch.request.filters;
13783
+ strip.request.trendingSearch.request.filters = this.checkForDateFilters(strip.request.trendingSearch.request.filters);
13784
+ strip.request.trendingSearch.request.filters = this.getFiltersFromArray(strip.request.trendingSearch.request.filters);
13785
+ }
13786
+ if (!(strip.tabs && strip.tabs.length)) return [3 /*break*/, 1];
13787
+ // TODO: Have to extract requestRequired to outer level of tabs config
13788
+ firstTab = strip.tabs[0];
13789
+ if (firstTab.requestRequired) {
13790
+ if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
13791
+ allTabs = this.stripsResultDataMap[strip.key].tabs;
13792
+ currentTabFromMap = (/** @type {?} */ ((allTabs && allTabs.length && allTabs[0])));
13793
+ this.getTabDataByNewReqTrending(strip, 0, 0, currentTabFromMap, calculateParentStatus);
13794
+ }
13795
+ }
13796
+ return [3 /*break*/, 4];
13797
+ case 1:
13798
+ _a.trys.push([1, 3, , 4]);
13799
+ return [4 /*yield*/, this.trendingSearchRequest(strip, strip.request, calculateParentStatus)];
13800
+ case 2:
13801
+ response = _a.sent();
13802
+ if (response && response.results && response.results.response) {
13803
+ content = response.results.response[strip.request.trendingSearch.responseKey] || [];
13804
+ this.processStrip(strip, this.transformContentsToWidgets(content, strip), 'done', calculateParentStatus, response.viewMoreUrl || '');
13805
+ if (!content.length) {
13806
+ this.emptyResponse.emit(true);
13807
+ }
13808
+ }
13809
+ else {
13810
+ this.emptyResponse.emit(true);
13811
+ this.processStrip(strip, [], 'done', calculateParentStatus, null);
13812
+ }
13813
+ return [3 /*break*/, 4];
13814
+ case 3:
13815
+ error_1 = _a.sent();
13816
+ // Handle errors
13817
+ this.emptyResponse.emit(true);
13818
+ this.processStrip(strip, [], 'error', calculateParentStatus, null);
13819
+ return [3 /*break*/, 4];
13820
+ case 4: return [2 /*return*/];
13821
+ }
13822
+ });
13823
+ });
13824
+ };
13825
+ // async trendingSearchRequest(strip: NsContentStripWithTabs.IContentStripUnit,
13826
+ // request: NsContentStripWithTabs.IContentStripUnit['request'],
13827
+ // calculateParentStatus: boolean
13828
+ // ): Promise<any> {
13829
+ // const originalFilters: any = [];
13830
+ // return new Promise<any>((resolve, reject) => {
13831
+ // if (request && request.trendingSearch) {
13832
+ // // check for the request if it has dynamic values]
13833
+ // if (request.trendingSearch.request.filters.organisation &&
13834
+ // request.trendingSearch.request.filters.organisation.indexOf('<orgID>') >= 0
13835
+ // ) {
13836
+ // let userRootOrgId;
13837
+ // if (this.configSvc.userProfile) {
13838
+ // userRootOrgId = this.configSvc.userProfile.rootOrgId;
13839
+ // }
13840
+ // request.trendingSearch.request.filters.organisation = userRootOrgId;
13841
+ // }
13842
+ // this.contentSvc.trendingContentSearch(request.trendingSearch).subscribe(results => {
13843
+ // const showViewMore = Boolean(
13844
+ // results.result &&
13845
+ // strip.request &&
13846
+ // results.result[strip.request.trendingSearch.responseKey] &&
13847
+ // results.result[strip.request.trendingSearch.responseKey].length > 5 &&
13848
+ // strip.stripConfig && strip.stripConfig.postCardForSearch,
13849
+ // );
13850
+ // const viewMoreUrl = showViewMore
13851
+ // ? {
13852
+ // path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
13853
+ // queryParams: {
13854
+ // tab: 'Learn',
13855
+ // q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
13856
+ // f:
13857
+ // request &&
13858
+ // request.trendingSearch &&
13859
+ // request.trendingSearch.request &&
13860
+ // request.trendingSearch.request.filters
13861
+ // ? JSON.stringify(
13862
+ // this.transformSearchV6FiltersV2(
13863
+ // originalFilters,
13864
+ // )
13865
+ // )
13866
+ // : {},
13867
+ // },
13868
+ // }
13869
+ // : null;
13870
+ // let proccesedResult: any = []
13871
+ // if (results && results.response && results.response.certifications) {
13872
+ // results.response.certifications.map((result: any) => {
13873
+ // if (result.source === this.channnelName) {
13874
+ // proccesedResult.push(result)
13875
+ // }
13876
+ // })
13877
+ // }
13878
+ // results = {response: {certifications: proccesedResult}}
13879
+ // resolve({ results, viewMoreUrl });
13880
+ // }, (error: any) => {
13881
+ // if (error.error && error.error.status === 400) {
13882
+ // this.processStrip(strip, [], 'done', calculateParentStatus, null);
13883
+ // }
13884
+ // // this.processStrip(strip, [], 'done', calculateParentStatus, null)
13885
+ // reject(error);
13886
+ // },
13887
+ // );
13888
+ // }
13889
+ // });
13890
+ // }
13891
+ // async trendingSearchRequest(strip: NsContentStripWithTabs.IContentStripUnit,
13892
+ // request: NsContentStripWithTabs.IContentStripUnit['request'],
13893
+ // calculateParentStatus: boolean
13894
+ // ): Promise<any> {
13895
+ // const originalFilters: any = [];
13896
+ // return new Promise<any>((resolve, reject) => {
13897
+ // if (request && request.trendingSearch) {
13898
+ // // check for the request if it has dynamic values]
13899
+ // if (request.trendingSearch.request.filters.organisation &&
13900
+ // request.trendingSearch.request.filters.organisation.indexOf('<orgID>') >= 0
13901
+ // ) {
13902
+ // let userRootOrgId;
13903
+ // if (this.configSvc.userProfile) {
13904
+ // userRootOrgId = this.configSvc.userProfile.rootOrgId;
13905
+ // }
13906
+ // request.trendingSearch.request.filters.organisation = userRootOrgId;
13907
+ // }
13908
+ // this.contentSvc.trendingContentSearch(request.trendingSearch).subscribe(results => {
13909
+ // const showViewMore = Boolean(
13910
+ // results.result &&
13911
+ // strip.request &&
13912
+ // results.result[strip.request.trendingSearch.responseKey] &&
13913
+ // results.result[strip.request.trendingSearch.responseKey].length > 5 &&
13914
+ // strip.stripConfig && strip.stripConfig.postCardForSearch,
13915
+ // );
13916
+ // const viewMoreUrl = showViewMore
13917
+ // ? {
13918
+ // path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
13919
+ // queryParams: {
13920
+ // tab: 'Learn',
13921
+ // q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
13922
+ // f:
13923
+ // request &&
13924
+ // request.trendingSearch &&
13925
+ // request.trendingSearch.request &&
13926
+ // request.trendingSearch.request.filters
13927
+ // ? JSON.stringify(
13928
+ // this.transformSearchV6FiltersV2(
13929
+ // originalFilters,
13930
+ // )
13931
+ // )
13932
+ // : {},
13933
+ // },
13934
+ // }
13935
+ // : null;
13936
+ // let proccesedResult: any = []
13937
+ // if (results && results.response && results.response.certifications) {
13938
+ // results.response.certifications.map((result: any) => {
13939
+ // if (result.source === this.channnelName) {
13940
+ // proccesedResult.push(result)
13941
+ // }
13942
+ // })
13943
+ // }
13944
+ // results = {response: {certifications: proccesedResult}}
13945
+ // resolve({ results, viewMoreUrl });
13946
+ // }, (error: any) => {
13947
+ // if (error.error && error.error.status === 400) {
13948
+ // this.processStrip(strip, [], 'done', calculateParentStatus, null);
13949
+ // }
13950
+ // // this.processStrip(strip, [], 'done', calculateParentStatus, null)
13951
+ // reject(error);
13952
+ // },
13953
+ // );
13954
+ // }
13955
+ // });
13956
+ // }
13957
+ /**
13958
+ * @param {?} data
13959
+ * @return {?}
13960
+ */
13961
+ ContentStripWithTabsPillsComponent.prototype.toggleInfo =
13962
+ // async trendingSearchRequest(strip: NsContentStripWithTabs.IContentStripUnit,
13963
+ // request: NsContentStripWithTabs.IContentStripUnit['request'],
13964
+ // calculateParentStatus: boolean
13965
+ // ): Promise<any> {
13966
+ // const originalFilters: any = [];
13967
+ // return new Promise<any>((resolve, reject) => {
13968
+ // if (request && request.trendingSearch) {
13969
+ // // check for the request if it has dynamic values]
13970
+ // if (request.trendingSearch.request.filters.organisation &&
13971
+ // request.trendingSearch.request.filters.organisation.indexOf('<orgID>') >= 0
13972
+ // ) {
13973
+ // let userRootOrgId;
13974
+ // if (this.configSvc.userProfile) {
13975
+ // userRootOrgId = this.configSvc.userProfile.rootOrgId;
13976
+ // }
13977
+ // request.trendingSearch.request.filters.organisation = userRootOrgId;
13978
+ // }
13979
+ // this.contentSvc.trendingContentSearch(request.trendingSearch).subscribe(results => {
13980
+ // const showViewMore = Boolean(
13981
+ // results.result &&
13982
+ // strip.request &&
13983
+ // results.result[strip.request.trendingSearch.responseKey] &&
13984
+ // results.result[strip.request.trendingSearch.responseKey].length > 5 &&
13985
+ // strip.stripConfig && strip.stripConfig.postCardForSearch,
13986
+ // );
13987
+ // const viewMoreUrl = showViewMore
13988
+ // ? {
13989
+ // path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
13990
+ // queryParams: {
13991
+ // tab: 'Learn',
13992
+ // q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
13993
+ // f:
13994
+ // request &&
13995
+ // request.trendingSearch &&
13996
+ // request.trendingSearch.request &&
13997
+ // request.trendingSearch.request.filters
13998
+ // ? JSON.stringify(
13999
+ // this.transformSearchV6FiltersV2(
14000
+ // originalFilters,
14001
+ // )
14002
+ // )
14003
+ // : {},
14004
+ // },
14005
+ // }
14006
+ // : null;
14007
+ // let proccesedResult: any = []
14008
+ // if (results && results.response && results.response.certifications) {
14009
+ // results.response.certifications.map((result: any) => {
14010
+ // if (result.source === this.channnelName) {
14011
+ // proccesedResult.push(result)
14012
+ // }
14013
+ // })
14014
+ // }
14015
+ // results = {response: {certifications: proccesedResult}}
14016
+ // resolve({ results, viewMoreUrl });
14017
+ // }, (error: any) => {
14018
+ // if (error.error && error.error.status === 400) {
14019
+ // this.processStrip(strip, [], 'done', calculateParentStatus, null);
14020
+ // }
14021
+ // // this.processStrip(strip, [], 'done', calculateParentStatus, null)
14022
+ // reject(error);
14023
+ // },
14024
+ // );
14025
+ // }
14026
+ // });
14027
+ // }
14028
+ /**
14029
+ * @param {?} data
14030
+ * @return {?}
14031
+ */
14032
+ function (data) {
14033
+ /** @type {?} */
14034
+ var stripInfo = this.stripsResultDataMap[data.key].stripInfo;
14035
+ if (stripInfo) {
14036
+ if (stripInfo.mode !== 'below') {
14037
+ this.loggerSvc.warn("strip info mode: " + stripInfo.mode + " not implemented yet");
14038
+ stripInfo.mode = 'below';
14039
+ }
14040
+ if (stripInfo.mode === 'below') {
14041
+ this.stripsResultDataMap[data.key].stripInfo = __assign({}, stripInfo, { visibilityMode: stripInfo.visibilityMode === 'hidden' ? 'visible' : 'hidden' });
14042
+ }
14043
+ }
14044
+ };
14045
+ /**
14046
+ * @private
14047
+ * @param {?} contents
14048
+ * @param {?} strip
14049
+ * @return {?}
14050
+ */
14051
+ ContentStripWithTabsPillsComponent.prototype.transformContentsToWidgets = /**
14052
+ * @private
14053
+ * @param {?} contents
14054
+ * @param {?} strip
14055
+ * @return {?}
14056
+ */
14057
+ function (contents, strip) {
14058
+ return (contents || []).map((/**
14059
+ * @param {?} content
14060
+ * @param {?} idx
14061
+ * @return {?}
14062
+ */
14063
+ function (content, idx) { return (content ? {
14064
+ widgetType: 'cardLib',
14065
+ widgetSubType: 'cardContentLib',
14066
+ widgetHostClass: 'mb-2',
14067
+ widgetData: __assign({ content: content }, (content.batch && { batch: content.batch }), { cardSubType: strip.stripConfig && strip.stripConfig.cardSubType, cardCustomeClass: strip.customeClass ? strip.customeClass : '', context: { pageSection: strip.key, position: idx }, intranetMode: strip.stripConfig && strip.stripConfig.intranetMode, deletedMode: strip.stripConfig && strip.stripConfig.deletedMode, contentTags: strip.stripConfig && strip.stripConfig.contentTags }),
14068
+ } : {
14069
+ widgetType: 'card',
14070
+ widgetSubType: 'cardContent',
14071
+ widgetHostClass: 'mb-2',
14072
+ widgetData: {},
14073
+ }); }));
14074
+ };
14075
+ /**
14076
+ * @private
14077
+ * @param {?} contents
14078
+ * @param {?} strip
14079
+ * @return {?}
14080
+ */
14081
+ ContentStripWithTabsPillsComponent.prototype.transformEventsToWidgets = /**
14082
+ * @private
14083
+ * @param {?} contents
14084
+ * @param {?} strip
14085
+ * @return {?}
14086
+ */
14087
+ function (contents, strip) {
14088
+ this.eventSvc.setEventListData(contents);
14089
+ return (this.eventSvc.todaysEvents || []).map((/**
14090
+ * @param {?} content
14091
+ * @param {?} idx
14092
+ * @return {?}
14093
+ */
14094
+ function (content, idx) { return (content ? {
14095
+ widgetType: 'card',
14096
+ widgetSubType: 'eventHubCard',
14097
+ widgetHostClass: 'mb-2',
14098
+ widgetData: {
14099
+ content: content,
14100
+ cardSubType: strip.stripConfig && strip.stripConfig.cardSubType,
14101
+ cardCustomeClass: strip.customeClass ? strip.customeClass : '',
14102
+ context: { pageSection: strip.key, position: idx },
14103
+ intranetMode: strip.stripConfig && strip.stripConfig.intranetMode,
14104
+ deletedMode: strip.stripConfig && strip.stripConfig.deletedMode,
14105
+ contentTags: strip.stripConfig && strip.stripConfig.contentTags,
14106
+ },
14107
+ } : {
14108
+ widgetType: 'card',
14109
+ widgetSubType: 'eventHubCard',
14110
+ widgetHostClass: 'mb-2',
14111
+ widgetData: {},
14112
+ }); }));
14113
+ };
14114
+ /**
14115
+ * @private
14116
+ * @param {?} strip
14117
+ * @return {?}
14118
+ */
14119
+ ContentStripWithTabsPillsComponent.prototype.transformSkeletonToWidgets = /**
14120
+ * @private
14121
+ * @param {?} strip
14122
+ * @return {?}
14123
+ */
14124
+ function (strip) {
14125
+ return [1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10].map((/**
14126
+ * @param {?} _content
14127
+ * @return {?}
14128
+ */
14129
+ function (_content) { return ({
14130
+ widgetType: 'cardLib',
14131
+ widgetSubType: 'cardContentLib',
14132
+ widgetHostClass: 'mb-2',
14133
+ widgetData: {
14134
+ cardSubType: strip.loaderConfig && strip.loaderConfig.cardSubType || 'card-standard-skeleton',
14135
+ cardCustomeClass: strip.customeClass ? strip.customeClass : '',
14136
+ },
14137
+ }); }));
14138
+ };
14139
+ /**
14140
+ * @private
14141
+ * @param {?} strip
14142
+ * @param {?=} results
14143
+ * @param {?=} fetchStatus
14144
+ * @param {?=} calculateParentStatus
14145
+ * @param {?=} _viewMoreUrl
14146
+ * @param {?=} tabsResults
14147
+ * @return {?}
14148
+ */
14149
+ ContentStripWithTabsPillsComponent.prototype.processStrip = /**
14150
+ * @private
14151
+ * @param {?} strip
14152
+ * @param {?=} results
14153
+ * @param {?=} fetchStatus
14154
+ * @param {?=} calculateParentStatus
14155
+ * @param {?=} _viewMoreUrl
14156
+ * @param {?=} tabsResults
14157
+ * @return {?}
14158
+ */
14159
+ function (strip, results, fetchStatus, calculateParentStatus, _viewMoreUrl, tabsResults) {
14160
+ if (results === void 0) { results = []; }
14161
+ if (calculateParentStatus === void 0) { calculateParentStatus = true; }
14162
+ return __awaiter(this, void 0, void 0, function () {
14163
+ var stripData;
14164
+ var _a;
14165
+ return __generator(this, function (_b) {
14166
+ stripData = {
14167
+ viewMoreUrl: strip.viewMoreUrl,
14168
+ key: strip.key,
14169
+ canHideStrip: Boolean(strip.canHideStrip),
14170
+ showStrip: this.getIfStripHidden(strip.key),
14171
+ noDataWidget: strip.noDataWidget,
14172
+ errorWidget: strip.errorWidget,
14173
+ stripInfo: strip.info,
14174
+ stripTitle: strip.title,
14175
+ stripTitleLink: strip.stripTitleLink,
14176
+ disableTranslate: strip.disableTranslate,
14177
+ sliderConfig: strip.sliderConfig,
14178
+ tabs: tabsResults ? tabsResults : strip.tabs,
14179
+ stripName: strip.name,
14180
+ mode: strip.mode,
14181
+ stripConfig: strip.stripConfig,
14182
+ stripBackground: strip.stripBackground,
14183
+ secondaryHeading: strip.secondaryHeading,
14184
+ loaderWidgets: strip.loaderWidgets || [],
14185
+ widgets: fetchStatus === 'done'
14186
+ ? __spread((strip.preWidgets || []).map((/**
14187
+ * @param {?} w
14188
+ * @return {?}
14189
+ */
14190
+ function (w) { return (__assign({}, w, { widgetHostClass: "mb-2 " + w.widgetHostClass })); })), results, (strip.postWidgets || []).map((/**
14191
+ * @param {?} w
14192
+ * @return {?}
14193
+ */
14194
+ function (w) { return (__assign({}, w, { widgetHostClass: "mb-2 " + w.widgetHostClass })); }))) : [],
14195
+ showOnNoData: Boolean(strip.noDataWidget &&
14196
+ !((strip.preWidgets || []).length + results.length + (strip.postWidgets || []).length) &&
14197
+ fetchStatus === 'done'),
14198
+ showOnLoader: Boolean(strip.loader && fetchStatus === 'fetching'),
14199
+ showOnError: Boolean(strip.errorWidget && fetchStatus === 'error'),
14200
+ };
14201
+ // const stripData = this.stripsResultDataMap[strip.key]
14202
+ this.stripsResultDataMap = __assign({}, this.stripsResultDataMap, (_a = {}, _a[strip.key] = stripData, _a));
14203
+ if (!tabsResults) {
14204
+ if (calculateParentStatus &&
14205
+ (fetchStatus === 'done' || fetchStatus === 'error') &&
14206
+ stripData.widgets) {
14207
+ this.checkParentStatus(fetchStatus, stripData.widgets.length);
14208
+ }
14209
+ if (calculateParentStatus && !(results && results.length > 0)) {
14210
+ this.contentAvailable = false;
14211
+ }
14212
+ else if (results && results.length > 0) {
14213
+ this.contentAvailable = true;
14214
+ }
14215
+ }
14216
+ else {
14217
+ this.contentAvailable = true;
14218
+ }
14219
+ return [2 /*return*/];
14220
+ });
14221
+ });
14222
+ };
14223
+ /**
14224
+ * @private
14225
+ * @param {?} fetchStatus
14226
+ * @param {?} stripWidgetsCount
14227
+ * @return {?}
14228
+ */
14229
+ ContentStripWithTabsPillsComponent.prototype.checkParentStatus = /**
14230
+ * @private
14231
+ * @param {?} fetchStatus
14232
+ * @param {?} stripWidgetsCount
14233
+ * @return {?}
14234
+ */
14235
+ function (fetchStatus, stripWidgetsCount) {
14236
+ if (fetchStatus === 'done' && !stripWidgetsCount) {
14237
+ this.noDataCount += 1;
14238
+ }
14239
+ else if (fetchStatus === 'done' && stripWidgetsCount) {
14240
+ this.successDataCount += 1;
14241
+ }
14242
+ else if (fetchStatus === 'error') {
14243
+ this.errorDataCount += 1;
14244
+ }
14245
+ /** @type {?} */
14246
+ var settledCount = this.noDataCount + this.successDataCount + this.errorDataCount;
14247
+ /** @type {?} */
14248
+ var totalCount = this.widgetData.strips.length;
14249
+ if (this.successDataCount > 0 && settledCount < totalCount) {
14250
+ return;
14251
+ }
14252
+ this.showParentLoader = settledCount !== totalCount;
14253
+ this.showParentNoData =
14254
+ this.noDataCount > 0 && this.noDataCount + this.errorDataCount === totalCount;
14255
+ this.showParentError = this.errorDataCount === totalCount;
14256
+ };
14257
+ /**
14258
+ * @param {?} strip
14259
+ * @return {?}
14260
+ */
14261
+ ContentStripWithTabsPillsComponent.prototype.checkForEmptyWidget = /**
14262
+ * @param {?} strip
14263
+ * @return {?}
14264
+ */
14265
+ function (strip) {
14266
+ if (strip.request &&
14267
+ ((strip.request.api && Object.keys(strip.request.api).length) ||
14268
+ (strip.request.search && Object.keys(strip.request.search).length) ||
14269
+ (strip.request.searchRegionRecommendation &&
14270
+ Object.keys(strip.request.searchRegionRecommendation).length) ||
14271
+ (strip.request.searchV6 && Object.keys(strip.request.searchV6).length) ||
14272
+ (strip.request.enrollmentList && Object.keys(strip.request.enrollmentList).length) ||
14273
+ (strip.request.cbpList && Object.keys(strip.request.cbpList).length) ||
14274
+ (strip.request.trendingSearch && Object.keys(strip.request.trendingSearch).length) ||
14275
+ (strip.request.topContent && Object.keys(strip.request.topContent).length) ||
14276
+ (strip.request.featureContent && Object.keys(strip.request.featureContent).length) ||
14277
+ (strip.request.bookmarkRead && Object.keys(strip.request.bookmarkRead).length) ||
14278
+ (strip.request.playlistSearch && Object.keys(strip.request.playlistSearch).length) ||
14279
+ (strip.request.playlistRead && Object.keys(strip.request.playlistRead).length) ||
14280
+ (strip.request.ciosContent && Object.keys(strip.request.ciosContent).length) ||
14281
+ (strip && strip.tabs.length))) {
14282
+ return true;
14283
+ }
14284
+ return false;
14285
+ };
14286
+ // public tabClicked(tabEvent: MatTabChangeEvent, stripMap: IStripUnitContentData, stripKey: string) {
14287
+ // if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
14288
+ // stripMap.tabs[tabEvent.index].fetchTabStatus = 'inprogress';
14289
+ // stripMap.tabs[tabEvent.index].tabLoading = true;
14290
+ // stripMap.showOnLoader = true;
14291
+ // }
14292
+ // const data: WsEvents.ITelemetryTabData = {
14293
+ // label: `${tabEvent.tab.textLabel}`,
14294
+ // index: tabEvent.index,
14295
+ // };
14296
+ // this.eventSvc.raiseInteractTelemetry(
14297
+ // {
14298
+ // type: WsEvents.EnumInteractTypes.CLICK,
14299
+ // subType: WsEvents.EnumInteractSubTypes.HOME_PAGE_STRIP_TABS,
14300
+ // id: `${_.camelCase(data.label)}-tab`,
14301
+ // },
14302
+ // {},
14303
+ // {
14304
+ // module: WsEvents.EnumTelemetrymodules.HOME,
14305
+ // }
14306
+ // );
14307
+ // const currentTabFromMap: any = stripMap.tabs && stripMap.tabs[tabEvent.index];
14308
+ // const currentStrip = this.widgetData.strips.find(s => s.key === stripKey);
14309
+ // if (this.stripsResultDataMap[stripKey] && currentTabFromMap) {
14310
+ // this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams = {
14311
+ // ...this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams,
14312
+ // tabSelected: currentTabFromMap.label,
14313
+ // };
14314
+ // }
14315
+ // if (currentStrip && currentTabFromMap && !currentTabFromMap.computeDataOnClick) {
14316
+ // if (currentTabFromMap.requestRequired && currentTabFromMap.request) {
14317
+ // // call API to get tab data and process
14318
+ // // this.processStrip(currentStrip, [], 'fetching', true, null)
14319
+ // if (currentTabFromMap.request.searchV6) {
14320
+ // this.getTabDataByNewReqSearchV6(currentStrip, tabEvent.index, currentTabFromMap, true);
14321
+ // } else if (currentTabFromMap.request.trendingSearch) {
14322
+ // this.getTabDataByNewReqTrending(currentStrip, tabEvent.index, 0, currentTabFromMap, true);
14323
+ // }
14324
+ // if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
14325
+ // stripMap.tabs[tabEvent.index].tabLoading = false;
14326
+ // }
14327
+ // } else {
14328
+ // this.getTabDataByfilter(currentStrip, currentTabFromMap, true);
14329
+ // setTimeout(() => {
14330
+ // if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
14331
+ // stripMap.tabs[tabEvent.index].tabLoading = false;
14332
+ // stripMap.tabs[tabEvent.index].fetchTabStatus = 'done';
14333
+ // stripMap.showOnLoader = false;
14334
+ // }
14335
+ // }, 200);
14336
+ // }
14337
+ // }
14338
+ // }
14339
+ // async getTabDataByNewReqSearchV6(
14340
+ // strip: NsContentStripWithTabs.IContentStripUnit,
14341
+ // tabIndex: number,
14342
+ // currentTab: NsContentStripWithTabs.IContentStripTab,
14343
+ // calculateParentStatus: boolean
14344
+ // ) {
14345
+ // try {
14346
+ // const response = await this.searchV6Request(strip, currentTab.request, calculateParentStatus);
14347
+ // if (response && response.results) {
14348
+ // const widgets = this.transformContentsToWidgets(response.results.result.content, strip);
14349
+ // let tabResults: any[] = [];
14350
+ // if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
14351
+ // const allTabs = this.stripsResultDataMap[strip.key].tabs;
14352
+ // if (allTabs && allTabs.length && allTabs[tabIndex]) {
14353
+ // allTabs[tabIndex] = {
14354
+ // ...allTabs[tabIndex],
14355
+ // widgets,
14356
+ // fetchTabStatus: 'done',
14357
+ // };
14358
+ // tabResults = allTabs;
14359
+ // }
14360
+ // }
14361
+ // this.processStrip(
14362
+ // strip,
14363
+ // widgets,
14364
+ // 'done',
14365
+ // calculateParentStatus,
14366
+ // response.viewMoreUrl,
14367
+ // tabResults // tabResults as widgets
14368
+ // );
14369
+ // } else {
14370
+ // this.processStrip(strip, [], 'error', calculateParentStatus, null);
14371
+ // }
14372
+ // } catch (error) {
14373
+ // // Handle errors
14374
+ // // console.error('Error:', error);
14375
+ // }
14376
+ // }
14377
+ // async getTabDataByNewReqTrending(
14378
+ // strip: NsContentStripWithTabs.IContentStripUnit,
14379
+ // tabIndex: number,
14380
+ // currentTab: NsContentStripWithTabs.IContentStripTab,
14381
+ // calculateParentStatus: boolean
14382
+ // ) {
14383
+ // try {
14384
+ // const response = await this.trendingSearchRequest(strip, currentTab.request, calculateParentStatus);
14385
+ // if (response && response.results && response.results.response) {
14386
+ // const content = response.results.response[currentTab.value] || [];
14387
+ // const widgets = this.transformContentsToWidgets(content, strip);
14388
+ // // console.log('currentTab --- widgets', widgets)
14389
+ // let tabResults: any[] = [];
14390
+ // if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
14391
+ // const allTabs = this.stripsResultDataMap[strip.key].tabs;
14392
+ // if (allTabs && allTabs.length && allTabs[tabIndex]) {
14393
+ // allTabs[tabIndex] = {
14394
+ // ...allTabs[tabIndex],
14395
+ // widgets,
14396
+ // fetchTabStatus: 'done',
14397
+ // };
14398
+ // tabResults = allTabs;
14399
+ // }
14400
+ // }
14401
+ // // console.log('tabResults -++++***--', tabResults)
14402
+ // // console.log('calling after-- ')
14403
+ // this.processStrip(
14404
+ // strip,
14405
+ // widgets,
14406
+ // 'done',
14407
+ // calculateParentStatus,
14408
+ // response.viewMoreUrl,
14409
+ // tabResults // tabResults as widgets
14410
+ // );
14411
+ // } else {
14412
+ // this.processStrip(strip, [], 'done', calculateParentStatus, null);
14413
+ // }
14414
+ // } catch (error) {
14415
+ // // Handle errors
14416
+ // this.processStrip(strip, [], 'error', calculateParentStatus, null);
14417
+ // }
14418
+ // }
14419
+ // public tabClicked(tabEvent: MatTabChangeEvent, stripMap: IStripUnitContentData, stripKey: string) {
14420
+ // if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
14421
+ // stripMap.tabs[tabEvent.index].fetchTabStatus = 'inprogress';
14422
+ // stripMap.tabs[tabEvent.index].tabLoading = true;
14423
+ // stripMap.showOnLoader = true;
14424
+ // }
14425
+ // const data: WsEvents.ITelemetryTabData = {
14426
+ // label: `${tabEvent.tab.textLabel}`,
14427
+ // index: tabEvent.index,
14428
+ // };
14429
+ // this.eventSvc.raiseInteractTelemetry(
14430
+ // {
14431
+ // type: WsEvents.EnumInteractTypes.CLICK,
14432
+ // subType: WsEvents.EnumInteractSubTypes.HOME_PAGE_STRIP_TABS,
14433
+ // id: `${_.camelCase(data.label)}-tab`,
14434
+ // },
14435
+ // {},
14436
+ // {
14437
+ // module: WsEvents.EnumTelemetrymodules.HOME,
14438
+ // }
14439
+ // );
14440
+ // const currentTabFromMap: any = stripMap.tabs && stripMap.tabs[tabEvent.index];
14441
+ // const currentStrip = this.widgetData.strips.find(s => s.key === stripKey);
14442
+ // if (this.stripsResultDataMap[stripKey] && currentTabFromMap) {
14443
+ // this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams = {
14444
+ // ...this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams,
14445
+ // tabSelected: currentTabFromMap.label,
14446
+ // };
14447
+ // }
14448
+ // if (currentStrip && currentTabFromMap && !currentTabFromMap.computeDataOnClick) {
14449
+ // if (currentTabFromMap.requestRequired && currentTabFromMap.request) {
14450
+ // // call API to get tab data and process
14451
+ // // this.processStrip(currentStrip, [], 'fetching', true, null)
14452
+ // if (currentTabFromMap.request.searchV6) {
14453
+ // this.getTabDataByNewReqSearchV6(currentStrip, tabEvent.index, currentTabFromMap, true);
14454
+ // } else if (currentTabFromMap.request.trendingSearch) {
14455
+ // this.getTabDataByNewReqTrending(currentStrip, tabEvent.index, 0, currentTabFromMap, true);
14456
+ // }
14457
+ // if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
14458
+ // stripMap.tabs[tabEvent.index].tabLoading = false;
14459
+ // }
14460
+ // } else {
14461
+ // this.getTabDataByfilter(currentStrip, currentTabFromMap, true);
14462
+ // setTimeout(() => {
14463
+ // if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
14464
+ // stripMap.tabs[tabEvent.index].tabLoading = false;
14465
+ // stripMap.tabs[tabEvent.index].fetchTabStatus = 'done';
14466
+ // stripMap.showOnLoader = false;
14467
+ // }
14468
+ // }, 200);
14469
+ // }
14470
+ // }
14471
+ // }
14472
+ // async getTabDataByNewReqSearchV6(
14473
+ // strip: NsContentStripWithTabs.IContentStripUnit,
14474
+ // tabIndex: number,
14475
+ // currentTab: NsContentStripWithTabs.IContentStripTab,
14476
+ // calculateParentStatus: boolean
14477
+ // ) {
14478
+ // try {
14479
+ // const response = await this.searchV6Request(strip, currentTab.request, calculateParentStatus);
14480
+ // if (response && response.results) {
14481
+ // const widgets = this.transformContentsToWidgets(response.results.result.content, strip);
14482
+ // let tabResults: any[] = [];
14483
+ // if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
14484
+ // const allTabs = this.stripsResultDataMap[strip.key].tabs;
14485
+ // if (allTabs && allTabs.length && allTabs[tabIndex]) {
14486
+ // allTabs[tabIndex] = {
14487
+ // ...allTabs[tabIndex],
14488
+ // widgets,
14489
+ // fetchTabStatus: 'done',
14490
+ // };
14491
+ // tabResults = allTabs;
14492
+ // }
14493
+ // }
14494
+ // this.processStrip(
14495
+ // strip,
14496
+ // widgets,
14497
+ // 'done',
14498
+ // calculateParentStatus,
14499
+ // response.viewMoreUrl,
14500
+ // tabResults // tabResults as widgets
14501
+ // );
14502
+ // } else {
14503
+ // this.processStrip(strip, [], 'error', calculateParentStatus, null);
14504
+ // }
14505
+ // } catch (error) {
14506
+ // // Handle errors
14507
+ // // console.error('Error:', error);
14508
+ // }
14509
+ // }
14510
+ // async getTabDataByNewReqTrending(
14511
+ // strip: NsContentStripWithTabs.IContentStripUnit,
14512
+ // tabIndex: number,
14513
+ // currentTab: NsContentStripWithTabs.IContentStripTab,
14514
+ // calculateParentStatus: boolean
14515
+ // ) {
14516
+ // try {
14517
+ // const response = await this.trendingSearchRequest(strip, currentTab.request, calculateParentStatus);
14518
+ // if (response && response.results && response.results.response) {
14519
+ // const content = response.results.response[currentTab.value] || [];
14520
+ // const widgets = this.transformContentsToWidgets(content, strip);
14521
+ // // console.log('currentTab --- widgets', widgets)
14522
+ // let tabResults: any[] = [];
14523
+ // if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
14524
+ // const allTabs = this.stripsResultDataMap[strip.key].tabs;
14525
+ // if (allTabs && allTabs.length && allTabs[tabIndex]) {
14526
+ // allTabs[tabIndex] = {
14527
+ // ...allTabs[tabIndex],
14528
+ // widgets,
14529
+ // fetchTabStatus: 'done',
14530
+ // };
14531
+ // tabResults = allTabs;
14532
+ // }
14533
+ // }
14534
+ // // console.log('tabResults -++++***--', tabResults)
14535
+ // // console.log('calling after-- ')
14536
+ // this.processStrip(
14537
+ // strip,
14538
+ // widgets,
14539
+ // 'done',
14540
+ // calculateParentStatus,
14541
+ // response.viewMoreUrl,
14542
+ // tabResults // tabResults as widgets
14543
+ // );
14544
+ // } else {
14545
+ // this.processStrip(strip, [], 'done', calculateParentStatus, null);
14546
+ // }
14547
+ // } catch (error) {
14548
+ // // Handle errors
14549
+ // this.processStrip(strip, [], 'error', calculateParentStatus, null);
14550
+ // }
14551
+ // }
14552
+ /**
14553
+ * @param {?} strip
14554
+ * @param {?} currentTab
14555
+ * @param {?} calculateParentStatus
14556
+ * @return {?}
14557
+ */
14558
+ ContentStripWithTabsPillsComponent.prototype.getTabDataByfilter =
14559
+ // public tabClicked(tabEvent: MatTabChangeEvent, stripMap: IStripUnitContentData, stripKey: string) {
14560
+ // if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
14561
+ // stripMap.tabs[tabEvent.index].fetchTabStatus = 'inprogress';
14562
+ // stripMap.tabs[tabEvent.index].tabLoading = true;
14563
+ // stripMap.showOnLoader = true;
14564
+ // }
14565
+ // const data: WsEvents.ITelemetryTabData = {
14566
+ // label: `${tabEvent.tab.textLabel}`,
14567
+ // index: tabEvent.index,
14568
+ // };
14569
+ // this.eventSvc.raiseInteractTelemetry(
14570
+ // {
14571
+ // type: WsEvents.EnumInteractTypes.CLICK,
14572
+ // subType: WsEvents.EnumInteractSubTypes.HOME_PAGE_STRIP_TABS,
14573
+ // id: `${_.camelCase(data.label)}-tab`,
14574
+ // },
14575
+ // {},
14576
+ // {
14577
+ // module: WsEvents.EnumTelemetrymodules.HOME,
14578
+ // }
14579
+ // );
14580
+ // const currentTabFromMap: any = stripMap.tabs && stripMap.tabs[tabEvent.index];
14581
+ // const currentStrip = this.widgetData.strips.find(s => s.key === stripKey);
14582
+ // if (this.stripsResultDataMap[stripKey] && currentTabFromMap) {
14583
+ // this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams = {
14584
+ // ...this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams,
14585
+ // tabSelected: currentTabFromMap.label,
14586
+ // };
14587
+ // }
14588
+ // if (currentStrip && currentTabFromMap && !currentTabFromMap.computeDataOnClick) {
14589
+ // if (currentTabFromMap.requestRequired && currentTabFromMap.request) {
14590
+ // // call API to get tab data and process
14591
+ // // this.processStrip(currentStrip, [], 'fetching', true, null)
14592
+ // if (currentTabFromMap.request.searchV6) {
14593
+ // this.getTabDataByNewReqSearchV6(currentStrip, tabEvent.index, currentTabFromMap, true);
14594
+ // } else if (currentTabFromMap.request.trendingSearch) {
14595
+ // this.getTabDataByNewReqTrending(currentStrip, tabEvent.index, 0, currentTabFromMap, true);
14596
+ // }
14597
+ // if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
14598
+ // stripMap.tabs[tabEvent.index].tabLoading = false;
14599
+ // }
14600
+ // } else {
14601
+ // this.getTabDataByfilter(currentStrip, currentTabFromMap, true);
14602
+ // setTimeout(() => {
14603
+ // if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
14604
+ // stripMap.tabs[tabEvent.index].tabLoading = false;
14605
+ // stripMap.tabs[tabEvent.index].fetchTabStatus = 'done';
14606
+ // stripMap.showOnLoader = false;
14607
+ // }
14608
+ // }, 200);
14609
+ // }
14610
+ // }
14611
+ // }
14612
+ // async getTabDataByNewReqSearchV6(
14613
+ // strip: NsContentStripWithTabs.IContentStripUnit,
14614
+ // tabIndex: number,
14615
+ // currentTab: NsContentStripWithTabs.IContentStripTab,
14616
+ // calculateParentStatus: boolean
14617
+ // ) {
14618
+ // try {
14619
+ // const response = await this.searchV6Request(strip, currentTab.request, calculateParentStatus);
14620
+ // if (response && response.results) {
14621
+ // const widgets = this.transformContentsToWidgets(response.results.result.content, strip);
14622
+ // let tabResults: any[] = [];
14623
+ // if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
14624
+ // const allTabs = this.stripsResultDataMap[strip.key].tabs;
14625
+ // if (allTabs && allTabs.length && allTabs[tabIndex]) {
14626
+ // allTabs[tabIndex] = {
14627
+ // ...allTabs[tabIndex],
14628
+ // widgets,
14629
+ // fetchTabStatus: 'done',
14630
+ // };
14631
+ // tabResults = allTabs;
14632
+ // }
14633
+ // }
14634
+ // this.processStrip(
14635
+ // strip,
14636
+ // widgets,
14637
+ // 'done',
14638
+ // calculateParentStatus,
14639
+ // response.viewMoreUrl,
14640
+ // tabResults // tabResults as widgets
14641
+ // );
14642
+ // } else {
14643
+ // this.processStrip(strip, [], 'error', calculateParentStatus, null);
14644
+ // }
14645
+ // } catch (error) {
14646
+ // // Handle errors
14647
+ // // console.error('Error:', error);
14648
+ // }
14649
+ // }
14650
+ // async getTabDataByNewReqTrending(
14651
+ // strip: NsContentStripWithTabs.IContentStripUnit,
14652
+ // tabIndex: number,
14653
+ // currentTab: NsContentStripWithTabs.IContentStripTab,
14654
+ // calculateParentStatus: boolean
14655
+ // ) {
14656
+ // try {
14657
+ // const response = await this.trendingSearchRequest(strip, currentTab.request, calculateParentStatus);
14658
+ // if (response && response.results && response.results.response) {
14659
+ // const content = response.results.response[currentTab.value] || [];
14660
+ // const widgets = this.transformContentsToWidgets(content, strip);
14661
+ // // console.log('currentTab --- widgets', widgets)
14662
+ // let tabResults: any[] = [];
14663
+ // if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
14664
+ // const allTabs = this.stripsResultDataMap[strip.key].tabs;
14665
+ // if (allTabs && allTabs.length && allTabs[tabIndex]) {
14666
+ // allTabs[tabIndex] = {
14667
+ // ...allTabs[tabIndex],
14668
+ // widgets,
14669
+ // fetchTabStatus: 'done',
14670
+ // };
14671
+ // tabResults = allTabs;
14672
+ // }
14673
+ // }
14674
+ // // console.log('tabResults -++++***--', tabResults)
14675
+ // // console.log('calling after-- ')
14676
+ // this.processStrip(
14677
+ // strip,
14678
+ // widgets,
14679
+ // 'done',
14680
+ // calculateParentStatus,
14681
+ // response.viewMoreUrl,
14682
+ // tabResults // tabResults as widgets
14683
+ // );
14684
+ // } else {
14685
+ // this.processStrip(strip, [], 'done', calculateParentStatus, null);
14686
+ // }
14687
+ // } catch (error) {
14688
+ // // Handle errors
14689
+ // this.processStrip(strip, [], 'error', calculateParentStatus, null);
14690
+ // }
14691
+ // }
14692
+ /**
14693
+ * @param {?} strip
14694
+ * @param {?} currentTab
14695
+ * @param {?} calculateParentStatus
14696
+ * @return {?}
14697
+ */
14698
+ function (strip, currentTab, calculateParentStatus) {
14699
+ // tslint:disable:no-console
14700
+ console.log('strip -- ', strip);
14701
+ // tslint:disable:no-console
14702
+ console.log('currentTab -- ', currentTab);
14703
+ // tslint:disable:no-console
14704
+ console.log('calculateParentStatus-- ', calculateParentStatus);
14705
+ // TODO: Write logic for individual filter if passed in config
14706
+ // add switch case based on config key passed
14707
+ };
14708
+ // async fetchAllCbpPlans(strip: any, calculateParentStatus = true) {
14709
+ // if (strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length) {
14710
+ // let courses: NsContent.IContent[];
14711
+ // let tabResults: any[] = [];
14712
+ // const response = await this.userSvc.fetchCbpPlanList().toPromise();
14713
+ // if (response) {
14714
+ // courses = response;
14715
+ // if (strip.tabs && strip.tabs.length) {
14716
+ // tabResults = this.splitCbpTabsData(courses, strip);
14717
+ // await this.processStrip(
14718
+ // strip,
14719
+ // this.transformContentsToWidgets(courses, strip),
14720
+ // 'done',
14721
+ // calculateParentStatus,
14722
+ // '',
14723
+ // tabResults
14724
+ // );
14725
+ // } else {
14726
+ // this.processStrip(
14727
+ // strip,
14728
+ // this.transformContentsToWidgets(courses, strip),
14729
+ // 'done',
14730
+ // calculateParentStatus,
14731
+ // 'viewMoreUrl',
14732
+ // );
14733
+ // }
14734
+ // }
14735
+ // // this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
14736
+ // // if (res) {
14737
+ // // console.log(res,'===============================>')
14738
+ // // courses = res
14739
+ // // if (strip.tabs && strip.tabs.length) {
14740
+ // // tabResults = this.splitCbpTabsData(courses, strip)
14741
+ // // await this.processStrip(
14742
+ // // strip,
14743
+ // // this.transformContentsToWidgets(courses, strip),
14744
+ // // 'done',
14745
+ // // calculateParentStatus,
14746
+ // // '',
14747
+ // // tabResults
14748
+ // // )
14749
+ // // } else {
14750
+ // // this.processStrip(
14751
+ // // strip,
14752
+ // // this.transformContentsToWidgets(courses, strip),
14753
+ // // 'done',
14754
+ // // calculateParentStatus,
14755
+ // // 'viewMoreUrl',
14756
+ // // )
14757
+ // // }
14758
+ // // }
14759
+ // // }, (_err: any) => {
14760
+ // // })
14761
+ // clearInterval(this.enrollInterval);
14762
+ // }
14763
+ // }
14764
+ // splitCbpTabsData(contentNew: NsContent.IContent[], strip: NsContentStripWithTabs.IContentStripUnit) {
14765
+ // const tabResults: any[] = [];
14766
+ // const splitData = this.getTabsList(
14767
+ // contentNew,
14768
+ // strip,
14769
+ // );
14770
+ // if (strip.tabs && strip.tabs.length) {
14771
+ // for (let i = 0; i < strip.tabs.length; i += 1) {
14772
+ // if (strip.tabs[i]) {
14773
+ // tabResults.push(
14774
+ // {
14775
+ // ...strip.tabs[i],
14776
+ // fetchTabStatus: 'done',
14777
+ // ...(splitData.find(itmInner => {
14778
+ // if (strip.tabs && strip.tabs[i] && itmInner.value === strip.tabs[i].value) {
14779
+ // return itmInner;
14780
+ // }
14781
+ // return undefined;
14782
+ // })),
14783
+ // }
14784
+ // );
14785
+ // }
14786
+ // }
14787
+ // }
14788
+ // return tabResults;
14789
+ // }
14790
+ // getTabsList(array: NsContent.IContent[],
14791
+ // strip: NsContentStripWithTabs.IContentStripUnit) {
14792
+ // let all: any[] = [];
14793
+ // let upcoming: any[] = [];
14794
+ // let overdue: any[] = [];
14795
+ // array.forEach((e: any) => {
14796
+ // all.push(e);
14797
+ // if (e.planDuration === NsCardContent.ACBPConst.OVERDUE) {
14798
+ // overdue.push(e);
14799
+ // } else if (e.planDuration === NsCardContent.ACBPConst.UPCOMING) {
14800
+ // upcoming.push(e);
14801
+ // }
14802
+ // });
14803
+ // const allCompleted = all.filter((allData: any) => allData.contentStatus === 2);
14804
+ // let allInCompleted = all.filter((allData: any) => allData.contentStatus < 2);
14805
+ // let allCompletedOverDue = allCompleted.filter((allData: any) => allData.planDuration === NsCardContent.ACBPConst.OVERDUE);
14806
+ // const allCompletedAll = allCompleted.filter((allData: any) => allData.planDuration !== NsCardContent.ACBPConst.OVERDUE);
14807
+ // allCompletedOverDue = allCompletedOverDue.sort((a: any, b: any): any => {
14808
+ // if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
14809
+ // const firstDate: any = new Date(a.endDate);
14810
+ // const secondDate: any = new Date(b.endDate);
14811
+ // return firstDate > secondDate ? -1 : 1;
14812
+ // }
14813
+ // });
14814
+ // allInCompleted = allInCompleted.sort((a: any, b: any): any => {
14815
+ // if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
14816
+ // const firstDate: any = new Date(a.endDate);
14817
+ // const secondDate: any = new Date(b.endDate);
14818
+ // return firstDate > secondDate ? -1 : 1;
14819
+ // }
14820
+ // });
14821
+ // all = [...allInCompleted, ...allCompletedAll, ...allCompletedOverDue];
14822
+ // overdue = overdue.filter((data: any): any => {
14823
+ // return data.contentStatus < 2;
14824
+ // });
14825
+ // overdue = overdue.sort((a: any, b: any): any => {
14826
+ // const firstDate: any = new Date(a.endDate);
14827
+ // const secondDate: any = new Date(b.endDate);
14828
+ // return firstDate > secondDate ? -1 : 1;
14829
+ // });
14830
+ // upcoming = upcoming.filter((data: any): any => {
14831
+ // return data.contentStatus < 2;
14832
+ // });
14833
+ // // this.getSelectedIndex(1)
14834
+ // return [
14835
+ // { value: 'all', widgets: this.transformContentsToWidgets(all, strip) },
14836
+ // { value: 'upcoming', widgets: this.transformContentsToWidgets(upcoming, strip) },
14837
+ // { value: 'overdue', widgets: this.transformContentsToWidgets(overdue, strip) }];
14838
+ // }
14839
+ // async fetchAllCbpPlans(strip: any, calculateParentStatus = true) {
14840
+ // if (strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length) {
14841
+ // let courses: NsContent.IContent[];
14842
+ // let tabResults: any[] = [];
14843
+ // const response = await this.userSvc.fetchCbpPlanList().toPromise();
14844
+ // if (response) {
14845
+ // courses = response;
14846
+ // if (strip.tabs && strip.tabs.length) {
14847
+ // tabResults = this.splitCbpTabsData(courses, strip);
14848
+ // await this.processStrip(
14849
+ // strip,
14850
+ // this.transformContentsToWidgets(courses, strip),
14851
+ // 'done',
14852
+ // calculateParentStatus,
14853
+ // '',
14854
+ // tabResults
14855
+ // );
14856
+ // } else {
14857
+ // this.processStrip(
14858
+ // strip,
14859
+ // this.transformContentsToWidgets(courses, strip),
14860
+ // 'done',
14861
+ // calculateParentStatus,
14862
+ // 'viewMoreUrl',
14863
+ // );
14864
+ // }
14865
+ // }
14866
+ // // this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
14867
+ // // if (res) {
14868
+ // // console.log(res,'===============================>')
14869
+ // // courses = res
14870
+ // // if (strip.tabs && strip.tabs.length) {
14871
+ // // tabResults = this.splitCbpTabsData(courses, strip)
14872
+ // // await this.processStrip(
14873
+ // // strip,
14874
+ // // this.transformContentsToWidgets(courses, strip),
14875
+ // // 'done',
14876
+ // // calculateParentStatus,
14877
+ // // '',
14878
+ // // tabResults
14879
+ // // )
14880
+ // // } else {
14881
+ // // this.processStrip(
14882
+ // // strip,
14883
+ // // this.transformContentsToWidgets(courses, strip),
14884
+ // // 'done',
14885
+ // // calculateParentStatus,
14886
+ // // 'viewMoreUrl',
14887
+ // // )
14888
+ // // }
14889
+ // // }
14890
+ // // }, (_err: any) => {
14891
+ // // })
14892
+ // clearInterval(this.enrollInterval);
14893
+ // }
14894
+ // }
14895
+ // splitCbpTabsData(contentNew: NsContent.IContent[], strip: NsContentStripWithTabs.IContentStripUnit) {
14896
+ // const tabResults: any[] = [];
14897
+ // const splitData = this.getTabsList(
14898
+ // contentNew,
14899
+ // strip,
14900
+ // );
14901
+ // if (strip.tabs && strip.tabs.length) {
14902
+ // for (let i = 0; i < strip.tabs.length; i += 1) {
14903
+ // if (strip.tabs[i]) {
14904
+ // tabResults.push(
14905
+ // {
14906
+ // ...strip.tabs[i],
14907
+ // fetchTabStatus: 'done',
14908
+ // ...(splitData.find(itmInner => {
14909
+ // if (strip.tabs && strip.tabs[i] && itmInner.value === strip.tabs[i].value) {
14910
+ // return itmInner;
14911
+ // }
14912
+ // return undefined;
14913
+ // })),
14914
+ // }
14915
+ // );
14916
+ // }
14917
+ // }
14918
+ // }
14919
+ // return tabResults;
14920
+ // }
14921
+ // getTabsList(array: NsContent.IContent[],
14922
+ // strip: NsContentStripWithTabs.IContentStripUnit) {
14923
+ // let all: any[] = [];
14924
+ // let upcoming: any[] = [];
14925
+ // let overdue: any[] = [];
14926
+ // array.forEach((e: any) => {
14927
+ // all.push(e);
14928
+ // if (e.planDuration === NsCardContent.ACBPConst.OVERDUE) {
14929
+ // overdue.push(e);
14930
+ // } else if (e.planDuration === NsCardContent.ACBPConst.UPCOMING) {
14931
+ // upcoming.push(e);
14932
+ // }
14933
+ // });
14934
+ // const allCompleted = all.filter((allData: any) => allData.contentStatus === 2);
14935
+ // let allInCompleted = all.filter((allData: any) => allData.contentStatus < 2);
14936
+ // let allCompletedOverDue = allCompleted.filter((allData: any) => allData.planDuration === NsCardContent.ACBPConst.OVERDUE);
14937
+ // const allCompletedAll = allCompleted.filter((allData: any) => allData.planDuration !== NsCardContent.ACBPConst.OVERDUE);
14938
+ // allCompletedOverDue = allCompletedOverDue.sort((a: any, b: any): any => {
14939
+ // if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
14940
+ // const firstDate: any = new Date(a.endDate);
14941
+ // const secondDate: any = new Date(b.endDate);
14942
+ // return firstDate > secondDate ? -1 : 1;
14943
+ // }
14944
+ // });
14945
+ // allInCompleted = allInCompleted.sort((a: any, b: any): any => {
14946
+ // if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
14947
+ // const firstDate: any = new Date(a.endDate);
14948
+ // const secondDate: any = new Date(b.endDate);
14949
+ // return firstDate > secondDate ? -1 : 1;
14950
+ // }
14951
+ // });
14952
+ // all = [...allInCompleted, ...allCompletedAll, ...allCompletedOverDue];
14953
+ // overdue = overdue.filter((data: any): any => {
14954
+ // return data.contentStatus < 2;
14955
+ // });
14956
+ // overdue = overdue.sort((a: any, b: any): any => {
14957
+ // const firstDate: any = new Date(a.endDate);
14958
+ // const secondDate: any = new Date(b.endDate);
14959
+ // return firstDate > secondDate ? -1 : 1;
14960
+ // });
14961
+ // upcoming = upcoming.filter((data: any): any => {
14962
+ // return data.contentStatus < 2;
14963
+ // });
14964
+ // // this.getSelectedIndex(1)
14965
+ // return [
14966
+ // { value: 'all', widgets: this.transformContentsToWidgets(all, strip) },
14967
+ // { value: 'upcoming', widgets: this.transformContentsToWidgets(upcoming, strip) },
14968
+ // { value: 'overdue', widgets: this.transformContentsToWidgets(overdue, strip) }];
14969
+ // }
14970
+ /**
14971
+ * @param {?} stripsResultDataMap
14972
+ * @param {?} key
14973
+ * @return {?}
14974
+ */
14975
+ ContentStripWithTabsPillsComponent.prototype.getSelectedIndex =
14976
+ // async fetchAllCbpPlans(strip: any, calculateParentStatus = true) {
14977
+ // if (strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length) {
14978
+ // let courses: NsContent.IContent[];
14979
+ // let tabResults: any[] = [];
14980
+ // const response = await this.userSvc.fetchCbpPlanList().toPromise();
14981
+ // if (response) {
14982
+ // courses = response;
14983
+ // if (strip.tabs && strip.tabs.length) {
14984
+ // tabResults = this.splitCbpTabsData(courses, strip);
14985
+ // await this.processStrip(
14986
+ // strip,
14987
+ // this.transformContentsToWidgets(courses, strip),
14988
+ // 'done',
14989
+ // calculateParentStatus,
14990
+ // '',
14991
+ // tabResults
14992
+ // );
14993
+ // } else {
14994
+ // this.processStrip(
14995
+ // strip,
14996
+ // this.transformContentsToWidgets(courses, strip),
14997
+ // 'done',
14998
+ // calculateParentStatus,
14999
+ // 'viewMoreUrl',
15000
+ // );
15001
+ // }
15002
+ // }
15003
+ // // this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
15004
+ // // if (res) {
15005
+ // // console.log(res,'===============================>')
15006
+ // // courses = res
15007
+ // // if (strip.tabs && strip.tabs.length) {
15008
+ // // tabResults = this.splitCbpTabsData(courses, strip)
15009
+ // // await this.processStrip(
15010
+ // // strip,
15011
+ // // this.transformContentsToWidgets(courses, strip),
15012
+ // // 'done',
15013
+ // // calculateParentStatus,
15014
+ // // '',
15015
+ // // tabResults
15016
+ // // )
15017
+ // // } else {
15018
+ // // this.processStrip(
15019
+ // // strip,
15020
+ // // this.transformContentsToWidgets(courses, strip),
15021
+ // // 'done',
15022
+ // // calculateParentStatus,
15023
+ // // 'viewMoreUrl',
15024
+ // // )
15025
+ // // }
15026
+ // // }
15027
+ // // }, (_err: any) => {
15028
+ // // })
15029
+ // clearInterval(this.enrollInterval);
15030
+ // }
15031
+ // }
15032
+ // splitCbpTabsData(contentNew: NsContent.IContent[], strip: NsContentStripWithTabs.IContentStripUnit) {
15033
+ // const tabResults: any[] = [];
15034
+ // const splitData = this.getTabsList(
15035
+ // contentNew,
15036
+ // strip,
15037
+ // );
15038
+ // if (strip.tabs && strip.tabs.length) {
15039
+ // for (let i = 0; i < strip.tabs.length; i += 1) {
15040
+ // if (strip.tabs[i]) {
15041
+ // tabResults.push(
15042
+ // {
15043
+ // ...strip.tabs[i],
15044
+ // fetchTabStatus: 'done',
15045
+ // ...(splitData.find(itmInner => {
15046
+ // if (strip.tabs && strip.tabs[i] && itmInner.value === strip.tabs[i].value) {
15047
+ // return itmInner;
15048
+ // }
15049
+ // return undefined;
15050
+ // })),
15051
+ // }
15052
+ // );
15053
+ // }
15054
+ // }
15055
+ // }
15056
+ // return tabResults;
15057
+ // }
15058
+ // getTabsList(array: NsContent.IContent[],
15059
+ // strip: NsContentStripWithTabs.IContentStripUnit) {
15060
+ // let all: any[] = [];
15061
+ // let upcoming: any[] = [];
15062
+ // let overdue: any[] = [];
15063
+ // array.forEach((e: any) => {
15064
+ // all.push(e);
15065
+ // if (e.planDuration === NsCardContent.ACBPConst.OVERDUE) {
15066
+ // overdue.push(e);
15067
+ // } else if (e.planDuration === NsCardContent.ACBPConst.UPCOMING) {
15068
+ // upcoming.push(e);
15069
+ // }
15070
+ // });
15071
+ // const allCompleted = all.filter((allData: any) => allData.contentStatus === 2);
15072
+ // let allInCompleted = all.filter((allData: any) => allData.contentStatus < 2);
15073
+ // let allCompletedOverDue = allCompleted.filter((allData: any) => allData.planDuration === NsCardContent.ACBPConst.OVERDUE);
15074
+ // const allCompletedAll = allCompleted.filter((allData: any) => allData.planDuration !== NsCardContent.ACBPConst.OVERDUE);
15075
+ // allCompletedOverDue = allCompletedOverDue.sort((a: any, b: any): any => {
15076
+ // if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
15077
+ // const firstDate: any = new Date(a.endDate);
15078
+ // const secondDate: any = new Date(b.endDate);
15079
+ // return firstDate > secondDate ? -1 : 1;
15080
+ // }
15081
+ // });
15082
+ // allInCompleted = allInCompleted.sort((a: any, b: any): any => {
15083
+ // if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
15084
+ // const firstDate: any = new Date(a.endDate);
15085
+ // const secondDate: any = new Date(b.endDate);
15086
+ // return firstDate > secondDate ? -1 : 1;
15087
+ // }
15088
+ // });
15089
+ // all = [...allInCompleted, ...allCompletedAll, ...allCompletedOverDue];
15090
+ // overdue = overdue.filter((data: any): any => {
15091
+ // return data.contentStatus < 2;
15092
+ // });
15093
+ // overdue = overdue.sort((a: any, b: any): any => {
15094
+ // const firstDate: any = new Date(a.endDate);
15095
+ // const secondDate: any = new Date(b.endDate);
15096
+ // return firstDate > secondDate ? -1 : 1;
15097
+ // });
15098
+ // upcoming = upcoming.filter((data: any): any => {
15099
+ // return data.contentStatus < 2;
15100
+ // });
15101
+ // // this.getSelectedIndex(1)
15102
+ // return [
15103
+ // { value: 'all', widgets: this.transformContentsToWidgets(all, strip) },
15104
+ // { value: 'upcoming', widgets: this.transformContentsToWidgets(upcoming, strip) },
15105
+ // { value: 'overdue', widgets: this.transformContentsToWidgets(overdue, strip) }];
15106
+ // }
15107
+ /**
15108
+ * @param {?} stripsResultDataMap
15109
+ * @param {?} key
15110
+ * @return {?}
15111
+ */
15112
+ function (stripsResultDataMap, key) {
15113
+ /** @type {?} */
15114
+ var returnValue = 0;
15115
+ // if (key === 'cbpPlan') {
15116
+ // if (stripsResultDataMap.tabs.length) {
15117
+ // const data = stripsResultDataMap.tabs.filter((ele: any) => ele.value === 'upcoming');
15118
+ // returnValue = data[0].widgets && data[0].widgets.length > 0 ? 1 : 0;
15119
+ // }
15120
+ // }
15121
+ return returnValue;
15122
+ };
15123
+ /**
15124
+ * @param {?} label
15125
+ * @param {?} type
15126
+ * @return {?}
15127
+ */
15128
+ ContentStripWithTabsPillsComponent.prototype.translateLabels = /**
15129
+ * @param {?} label
15130
+ * @param {?} type
15131
+ * @return {?}
15132
+ */
15133
+ function (label, type) {
15134
+ return this.langtranslations.translateLabel(label, type, '');
15135
+ };
15136
+ /**
15137
+ * @param {?} index
15138
+ * @param {?} item
15139
+ * @return {?}
15140
+ */
15141
+ ContentStripWithTabsPillsComponent.prototype.identify = /**
15142
+ * @param {?} index
15143
+ * @param {?} item
15144
+ * @return {?}
15145
+ */
15146
+ function (index, item) {
15147
+ if (index >= 0) { }
15148
+ return item;
15149
+ };
15150
+ /**
15151
+ * @param {?} index
15152
+ * @param {?} item
15153
+ * @return {?}
15154
+ */
15155
+ ContentStripWithTabsPillsComponent.prototype.tracker = /**
15156
+ * @param {?} index
15157
+ * @param {?} item
15158
+ * @return {?}
15159
+ */
15160
+ function (index, item) {
15161
+ if (index >= 0) { }
15162
+ return lodash.get(item, 'widgetData.content.identifier');
15163
+ };
15164
+ /**
15165
+ * @param {?} strip
15166
+ * @param {?=} calculateParentStatus
15167
+ * @return {?}
15168
+ */
15169
+ ContentStripWithTabsPillsComponent.prototype.fetchAllTopContent = /**
15170
+ * @param {?} strip
15171
+ * @param {?=} calculateParentStatus
15172
+ * @return {?}
15173
+ */
15174
+ function (strip, calculateParentStatus) {
15175
+ if (calculateParentStatus === void 0) { calculateParentStatus = true; }
15176
+ return __awaiter(this, void 0, void 0, function () {
15177
+ var originalFilters, response, error_2;
15178
+ return __generator(this, function (_a) {
15179
+ switch (_a.label) {
15180
+ case 0:
15181
+ if (!(strip.request && strip.request.topContent && Object.keys(strip.request.topContent).length)) return [3 /*break*/, 4];
15182
+ originalFilters = [];
15183
+ if (strip.request &&
15184
+ strip.request.topContent &&
15185
+ strip.request.topContent.request &&
15186
+ strip.request.topContent.request.filters) {
15187
+ originalFilters = strip.request.topContent.request.filters;
15188
+ strip.request.topContent.request.filters = this.postMethodFilters(strip.request.topContent.request.filters);
15189
+ }
15190
+ _a.label = 1;
15191
+ case 1:
15192
+ _a.trys.push([1, 3, , 4]);
15193
+ return [4 /*yield*/, this.postRequestMethod(strip, strip.request.topContent, strip.request.apiUrl, calculateParentStatus)];
15194
+ case 2:
15195
+ response = _a.sent();
15196
+ // console.log('calling after - response, ', response)
15197
+ if (response && response.results) {
15198
+ // console.log('calling after-- ')
15199
+ if (response.results.result.content && response.results.result.content.length) {
15200
+ this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
15201
+ }
15202
+ else {
15203
+ this.processStrip(strip, [], 'error', calculateParentStatus, null);
15204
+ this.emptyResponse.emit(true);
15205
+ }
15206
+ }
15207
+ else {
15208
+ this.processStrip(strip, [], 'error', calculateParentStatus, null);
15209
+ this.emptyResponse.emit(true);
15210
+ }
15211
+ return [3 /*break*/, 4];
15212
+ case 3:
15213
+ error_2 = _a.sent();
15214
+ return [3 /*break*/, 4];
15215
+ case 4: return [2 /*return*/];
15216
+ }
15217
+ });
15218
+ });
15219
+ };
15220
+ /**
15221
+ * @param {?} strip
15222
+ * @param {?=} calculateParentStatus
15223
+ * @return {?}
15224
+ */
15225
+ ContentStripWithTabsPillsComponent.prototype.fetchAllFeaturedContent = /**
15226
+ * @param {?} strip
15227
+ * @param {?=} calculateParentStatus
15228
+ * @return {?}
15229
+ */
15230
+ function (strip, calculateParentStatus) {
15231
+ if (calculateParentStatus === void 0) { calculateParentStatus = true; }
15232
+ return __awaiter(this, void 0, void 0, function () {
15233
+ var originalFilters, response, error_3;
15234
+ return __generator(this, function (_a) {
15235
+ switch (_a.label) {
15236
+ case 0:
15237
+ if (!(strip.request && strip.request.featureContent && Object.keys(strip.request.featureContent).length)) return [3 /*break*/, 4];
15238
+ originalFilters = [];
15239
+ if (strip.request &&
15240
+ strip.request.featureContent &&
15241
+ strip.request.featureContent.request &&
15242
+ strip.request.featureContent.request.filters) {
15243
+ originalFilters = strip.request.featureContent.request.filters;
15244
+ strip.request.featureContent.request.filters = this.postMethodFilters(strip.request.featureContent.request.filters);
15245
+ }
15246
+ _a.label = 1;
15247
+ case 1:
15248
+ _a.trys.push([1, 3, , 4]);
15249
+ return [4 /*yield*/, this.postRequestMethod(strip, strip.request.featureContent, strip.request.apiUrl, calculateParentStatus)];
15250
+ case 2:
15251
+ response = _a.sent();
15252
+ // console.log('calling after - response, ', response)
15253
+ if (response && response.results) {
15254
+ // console.log('calling after-- ')
15255
+ if (response.results.result.content && response.results.result.content.length) {
15256
+ this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
15257
+ }
15258
+ else {
15259
+ this.processStrip(strip, [], 'error', calculateParentStatus, null);
15260
+ this.emptyResponse.emit(true);
15261
+ }
15262
+ }
15263
+ else {
15264
+ this.processStrip(strip, [], 'error', calculateParentStatus, null);
15265
+ this.emptyResponse.emit(true);
15266
+ }
15267
+ return [3 /*break*/, 4];
15268
+ case 3:
15269
+ error_3 = _a.sent();
15270
+ this.emptyResponse.emit(true);
15271
+ return [3 /*break*/, 4];
15272
+ case 4: return [2 /*return*/];
15273
+ }
15274
+ });
15275
+ });
15276
+ };
15277
+ /**
15278
+ * @param {?} stripData
15279
+ * @return {?}
15280
+ */
15281
+ ContentStripWithTabsPillsComponent.prototype.raiseTelemetry = /**
15282
+ * @param {?} stripData
15283
+ * @return {?}
15284
+ */
15285
+ function (stripData) {
15286
+ this.telemtryResponse.emit(stripData);
15287
+ };
15288
+ /**
15289
+ * @param {?} strip
15290
+ * @param {?} request
15291
+ * @param {?} apiUrl
15292
+ * @param {?} calculateParentStatus
15293
+ * @return {?}
15294
+ */
15295
+ ContentStripWithTabsPillsComponent.prototype.postRequestMethod = /**
15296
+ * @param {?} strip
15297
+ * @param {?} request
15298
+ * @param {?} apiUrl
15299
+ * @param {?} calculateParentStatus
15300
+ * @return {?}
15301
+ */
15302
+ function (strip, request, apiUrl, calculateParentStatus) {
15303
+ return __awaiter(this, void 0, void 0, function () {
15304
+ var _this = this;
15305
+ return __generator(this, function (_a) {
15306
+ return [2 /*return*/, new Promise((/**
15307
+ * @param {?} resolve
15308
+ * @param {?} reject
15309
+ * @return {?}
15310
+ */
15311
+ function (resolve, reject) {
15312
+ if (request && request) {
15313
+ _this.contentSvc.postApiMethod(apiUrl, request).subscribe((/**
15314
+ * @param {?} results
15315
+ * @return {?}
15316
+ */
15317
+ function (results) {
15318
+ if (results.result && results.result.content) {
15319
+ /** @type {?} */
15320
+ var showViewMore = Boolean(results.result.content && results.result.content.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
15321
+ /** @type {?} */
15322
+ var viewMoreUrl = showViewMore
15323
+ ? {
15324
+ path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
15325
+ queryParams: {
15326
+ tab: 'Learn',
15327
+ q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
15328
+ f: {},
15329
+ },
15330
+ }
15331
+ : null;
15332
+ resolve({ results: results, viewMoreUrl: viewMoreUrl });
15333
+ }
15334
+ else if (results && results.data) {
15335
+ /** @type {?} */
15336
+ var showViewMore = Boolean(results.data && results.data.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
15337
+ /** @type {?} */
15338
+ var viewMoreUrl = showViewMore ? {
15339
+ path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
15340
+ queryParams: {
15341
+ tab: 'Learn',
15342
+ q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
15343
+ f: {},
15344
+ },
15345
+ }
15346
+ : null;
15347
+ resolve({ results: results, viewMoreUrl: viewMoreUrl });
15348
+ }
15349
+ else if (results.result && results.result.data) {
15350
+ /** @type {?} */
15351
+ var showViewMore = Boolean(results.data && results.result.data && results.result.data.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
15352
+ /** @type {?} */
15353
+ var viewMoreUrl = showViewMore ? {
15354
+ path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
15355
+ queryParams: {
15356
+ tab: 'Learn',
15357
+ q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
15358
+ f: {},
15359
+ },
15360
+ }
15361
+ : null;
15362
+ resolve({ results: results, viewMoreUrl: viewMoreUrl });
15363
+ }
15364
+ }), (/**
15365
+ * @param {?} error
15366
+ * @return {?}
15367
+ */
15368
+ function (error) {
15369
+ _this.processStrip(strip, [], 'error', calculateParentStatus, null);
15370
+ reject(error);
15371
+ }));
15372
+ }
15373
+ }))];
15374
+ });
15375
+ });
15376
+ };
15377
+ /**
15378
+ * @param {?} strip
15379
+ * @param {?} request
15380
+ * @param {?} apiUrl
15381
+ * @param {?} calculateParentStatus
15382
+ * @return {?}
15383
+ */
15384
+ ContentStripWithTabsPillsComponent.prototype.getRequestMethod = /**
15385
+ * @param {?} strip
15386
+ * @param {?} request
15387
+ * @param {?} apiUrl
15388
+ * @param {?} calculateParentStatus
15389
+ * @return {?}
15390
+ */
15391
+ function (strip, request, apiUrl, calculateParentStatus) {
15392
+ return __awaiter(this, void 0, void 0, function () {
15393
+ var originalFilters;
15394
+ var _this = this;
15395
+ return __generator(this, function (_a) {
15396
+ originalFilters = [];
15397
+ return [2 /*return*/, new Promise((/**
15398
+ * @param {?} resolve
15399
+ * @param {?} reject
15400
+ * @return {?}
15401
+ */
15402
+ function (resolve, reject) {
15403
+ if (request && request) {
15404
+ _this.contentSvc.getApiMethod(apiUrl).subscribe((/**
15405
+ * @param {?} results
15406
+ * @return {?}
15407
+ */
15408
+ function (results) {
15409
+ /** @type {?} */
15410
+ var showViewMore = Boolean(results.result.data && results.result.data.orgList.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
15411
+ /** @type {?} */
15412
+ var viewMoreUrl = showViewMore
15413
+ ? {
15414
+ path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
15415
+ }
15416
+ : null;
15417
+ resolve({ results: results, viewMoreUrl: viewMoreUrl });
15418
+ }), (/**
15419
+ * @param {?} error
15420
+ * @return {?}
15421
+ */
15422
+ function (error) {
15423
+ _this.processStrip(strip, [], 'error', calculateParentStatus, null);
15424
+ reject(error);
15425
+ }));
15426
+ }
15427
+ }))];
15428
+ });
15429
+ });
15430
+ };
15431
+ /**
15432
+ * @param {?} filters
15433
+ * @return {?}
15434
+ */
15435
+ ContentStripWithTabsPillsComponent.prototype.postMethodFilters = /**
15436
+ * @param {?} filters
15437
+ * @return {?}
15438
+ */
15439
+ function (filters) {
15440
+ if (filters.organisation &&
15441
+ filters.organisation.indexOf('<orgID>') >= 0) {
15442
+ filters.organisation = this.providerId;
15443
+ }
15444
+ return filters;
15445
+ };
15446
+ /**
15447
+ * @param {?} apiUrl
15448
+ * @param {?} id
15449
+ * @return {?}
15450
+ */
15451
+ ContentStripWithTabsPillsComponent.prototype.getFullUrl = /**
15452
+ * @param {?} apiUrl
15453
+ * @param {?} id
15454
+ * @return {?}
15455
+ */
15456
+ function (apiUrl, id) {
15457
+ /** @type {?} */
15458
+ var formedUrl = '';
15459
+ if (apiUrl.indexOf('<bookmarkId>') >= 0) {
15460
+ formedUrl = apiUrl.replace('<bookmarkId>', this.environment.mdoChannelsBookmarkId);
15461
+ }
15462
+ else if (apiUrl.indexOf('<playlistKey>') >= 0 && apiUrl.indexOf('<orgID>') >= 0) {
15463
+ formedUrl = apiUrl.replace('<playlistKey>', this.providerId + id);
15464
+ formedUrl = formedUrl.replace('<orgID>', this.providerId);
15465
+ }
15466
+ return formedUrl;
15467
+ };
15468
+ /**
15469
+ * @param {?} stripData
15470
+ * @param {?} path
15471
+ * @param {?} queryParamsData
15472
+ * @return {?}
15473
+ */
15474
+ ContentStripWithTabsPillsComponent.prototype.redirectViewAll = /**
15475
+ * @param {?} stripData
15476
+ * @param {?} path
15477
+ * @param {?} queryParamsData
15478
+ * @return {?}
15479
+ */
15480
+ function (stripData, path, queryParamsData) {
15481
+ if (this.emitViewAll) {
15482
+ this.viewAllResponse.emit(stripData);
15483
+ }
15484
+ else {
15485
+ this.router.navigate([path], { queryParams: queryParamsData });
15486
+ }
15487
+ };
15488
+ /**
15489
+ * @param {?} strip
15490
+ * @param {?=} calculateParentStatus
15491
+ * @return {?}
15492
+ */
15493
+ ContentStripWithTabsPillsComponent.prototype.fetchAllBookMarkData = /**
15494
+ * @param {?} strip
15495
+ * @param {?=} calculateParentStatus
15496
+ * @return {?}
15497
+ */
15498
+ function (strip, calculateParentStatus) {
15499
+ if (calculateParentStatus === void 0) { calculateParentStatus = true; }
15500
+ return __awaiter(this, void 0, void 0, function () {
15501
+ var originalFilters, response, content, error_4;
15502
+ return __generator(this, function (_a) {
15503
+ switch (_a.label) {
15504
+ case 0:
15505
+ if (!(strip.request && strip.request.bookmarkRead && Object.keys(strip.request.bookmarkRead).length)) return [3 /*break*/, 4];
15506
+ originalFilters = [];
15507
+ if (strip.request &&
15508
+ strip.request.bookmarkRead &&
15509
+ strip.request.bookmarkRead.bookmarkId) {
15510
+ strip.request.apiUrl = this.getFullUrl(strip.request.apiUrl, strip.request.bookmarkRead.bookmarkId);
15511
+ }
15512
+ _a.label = 1;
15513
+ case 1:
15514
+ _a.trys.push([1, 3, , 4]);
15515
+ return [4 /*yield*/, this.getRequestMethod(strip, strip.request.bookmarkRead, strip.request.apiUrl, calculateParentStatus)];
15516
+ case 2:
15517
+ response = _a.sent();
15518
+ content = response.results.result.data.orgList;
15519
+ if (response) {
15520
+ this.processStrip(strip, this.transformAllContentsToWidgets(content, strip), 'done', calculateParentStatus, response);
15521
+ }
15522
+ else {
15523
+ this.processStrip(strip, [], 'error', calculateParentStatus, null);
15524
+ this.emptyResponse.emit(true);
15525
+ }
15526
+ return [3 /*break*/, 4];
15527
+ case 3:
15528
+ error_4 = _a.sent();
15529
+ this.emptyResponse.emit(true);
15530
+ return [3 /*break*/, 4];
15531
+ case 4: return [2 /*return*/];
15532
+ }
15533
+ });
15534
+ });
15535
+ };
15536
+ /**
15537
+ * @private
15538
+ * @param {?} contents
15539
+ * @param {?} strip
15540
+ * @return {?}
15541
+ */
15542
+ ContentStripWithTabsPillsComponent.prototype.transformAllContentsToWidgets = /**
15543
+ * @private
15544
+ * @param {?} contents
15545
+ * @param {?} strip
15546
+ * @return {?}
15547
+ */
15548
+ function (contents, strip) {
15549
+ return (contents || []).map((/**
15550
+ * @param {?} content
15551
+ * @param {?} idx
15552
+ * @return {?}
15553
+ */
15554
+ function (content, idx) { return (content ? {
15555
+ widgetType: 'cardLib',
15556
+ widgetSubType: 'cardContentLib',
15557
+ widgetHostClass: 'mb-2',
15558
+ widgetData: __assign({ content: content }, (content.batch && { batch: content.batch }), { cardSubType: strip.stripConfig && strip.stripConfig.cardSubType, cardCustomeClass: strip.customeClass ? strip.customeClass : '', context: { pageSection: strip.key, position: idx }, intranetMode: strip.stripConfig && strip.stripConfig.intranetMode, deletedMode: strip.stripConfig && strip.stripConfig.deletedMode, contentTags: strip.stripConfig && strip.stripConfig.contentTags }),
15559
+ } : {
15560
+ widgetType: 'card',
15561
+ widgetSubType: 'cardContent',
15562
+ widgetHostClass: 'mb-2',
15563
+ widgetData: {},
15564
+ }); }));
15565
+ };
15566
+ /**
15567
+ * @param {?} strip
15568
+ * @param {?=} calculateParentStatus
15569
+ * @return {?}
15570
+ */
15571
+ ContentStripWithTabsPillsComponent.prototype.fetchAllPlaylistSearch = /**
15572
+ * @param {?} strip
15573
+ * @param {?=} calculateParentStatus
15574
+ * @return {?}
15575
+ */
15576
+ function (strip, calculateParentStatus) {
15577
+ if (calculateParentStatus === void 0) { calculateParentStatus = true; }
15578
+ return __awaiter(this, void 0, void 0, function () {
15579
+ var originalFilters, response, finalPlaylistData_1, programData, error_5;
15580
+ return __generator(this, function (_a) {
15581
+ switch (_a.label) {
15582
+ case 0:
15583
+ if (!(strip.request && strip.request.playlistSearch && Object.keys(strip.request.playlistSearch).length)) return [3 /*break*/, 4];
15584
+ originalFilters = [];
15585
+ if (strip.request &&
15586
+ strip.request.playlistSearch &&
15587
+ strip.request.playlistSearch.request &&
15588
+ strip.request.playlistSearch.request.filters) {
15589
+ originalFilters = strip.request.playlistSearch.request.filters;
15590
+ strip.request.playlistSearch.request.filters = this.postMethodFilters(strip.request.playlistSearch.request.filters);
15591
+ }
15592
+ _a.label = 1;
15593
+ case 1:
15594
+ _a.trys.push([1, 3, , 4]);
15595
+ return [4 /*yield*/, this.postRequestMethod(strip, strip.request.playlistSearch.request, strip.request.apiUrl, calculateParentStatus)];
15596
+ case 2:
15597
+ response = _a.sent();
15598
+ // console.log('calling after - response, ', response)
15599
+ if (response && response.results) {
15600
+ // console.log('calling after-- ')
15601
+ if (response.results.result.data && response.results.result.data.length) {
15602
+ finalPlaylistData_1 = [];
15603
+ programData = response.results.result.data;
15604
+ programData.forEach((/**
15605
+ * @param {?} prgData
15606
+ * @return {?}
15607
+ */
15608
+ function (prgData) {
15609
+ if (prgData.children && prgData.children.length) {
15610
+ finalPlaylistData_1.push(prgData);
15611
+ }
15612
+ }));
15613
+ if (finalPlaylistData_1.length) {
15614
+ this.processStrip(strip, this.transformContentsToWidgets(finalPlaylistData_1, strip), 'done', calculateParentStatus, response.viewMoreUrl);
15615
+ }
15616
+ else {
15617
+ this.emptyResponse.emit(true);
15618
+ }
15619
+ }
15620
+ else {
15621
+ this.processStrip(strip, [], 'error', calculateParentStatus, null);
15622
+ this.emptyResponse.emit(true);
15623
+ }
15624
+ }
15625
+ else {
15626
+ this.processStrip(strip, [], 'error', calculateParentStatus, null);
15627
+ this.emptyResponse.emit(true);
15628
+ }
15629
+ return [3 /*break*/, 4];
15630
+ case 3:
15631
+ error_5 = _a.sent();
15632
+ this.emptyResponse.emit(true);
15633
+ return [3 /*break*/, 4];
15634
+ case 4: return [2 /*return*/];
15635
+ }
15636
+ });
15637
+ });
15638
+ };
15639
+ /**
15640
+ * @param {?} strip
15641
+ * @param {?=} calculateParentStatus
15642
+ * @return {?}
15643
+ */
15644
+ ContentStripWithTabsPillsComponent.prototype.fetchPlaylistReadData = /**
15645
+ * @param {?} strip
15646
+ * @param {?=} calculateParentStatus
15647
+ * @return {?}
15648
+ */
15649
+ function (strip, calculateParentStatus) {
15650
+ if (calculateParentStatus === void 0) { calculateParentStatus = true; }
15651
+ return __awaiter(this, void 0, void 0, function () {
15652
+ var originalFilters, response, content, error_6;
15653
+ return __generator(this, function (_a) {
15654
+ switch (_a.label) {
15655
+ case 0:
15656
+ if (!(strip.request && strip.request.playlistRead && Object.keys(strip.request.playlistRead).length)) return [3 /*break*/, 4];
15657
+ originalFilters = [];
15658
+ if (strip.request &&
15659
+ strip.request.playlistRead &&
15660
+ strip.request.playlistRead.type) {
15661
+ strip.request.apiUrl = this.getFullUrl(strip.request.apiUrl, strip.request.playlistRead.type);
15662
+ }
15663
+ _a.label = 1;
15664
+ case 1:
15665
+ _a.trys.push([1, 3, , 4]);
15666
+ return [4 /*yield*/, this.getRequestMethod(strip, strip.request.playlistRead, strip.request.apiUrl, calculateParentStatus)];
15667
+ case 2:
15668
+ response = _a.sent();
15669
+ if (response && response.results.result.content) {
15670
+ content = response.results.result.content;
15671
+ this.processStrip(strip, this.transformAllContentsToWidgets(content, strip), 'done', calculateParentStatus, response);
15672
+ }
15673
+ else {
15674
+ this.processStrip(strip, [], 'error', calculateParentStatus, null);
15675
+ this.emptyResponse.emit(true);
15676
+ }
15677
+ return [3 /*break*/, 4];
15678
+ case 3:
15679
+ error_6 = _a.sent();
15680
+ this.emptyResponse.emit(true);
15681
+ return [3 /*break*/, 4];
15682
+ case 4: return [2 /*return*/];
15683
+ }
15684
+ });
15685
+ });
15686
+ };
15687
+ /**
15688
+ * @param {?} strip
15689
+ * @param {?=} calculateParentStatus
15690
+ * @return {?}
15691
+ */
15692
+ ContentStripWithTabsPillsComponent.prototype.fetchCiosContentData = /**
15693
+ * @param {?} strip
15694
+ * @param {?=} calculateParentStatus
15695
+ * @return {?}
15696
+ */
15697
+ function (strip, calculateParentStatus) {
15698
+ if (calculateParentStatus === void 0) { calculateParentStatus = true; }
15699
+ return __awaiter(this, void 0, void 0, function () {
15700
+ var originalFilters, response, extContentData, error_7;
15701
+ return __generator(this, function (_a) {
15702
+ switch (_a.label) {
15703
+ case 0:
15704
+ if (!(strip.request && strip.request.ciosContent && Object.keys(strip.request.ciosContent).length)) return [3 /*break*/, 4];
15705
+ originalFilters = [];
15706
+ if (strip.request &&
15707
+ strip.request.ciosContent &&
15708
+ strip.request.ciosContent.filterCriteriaMap) {
15709
+ originalFilters = strip.request.ciosContent.filterCriteriaMap;
15710
+ strip.request.ciosContent.filterCriteriaMap = this.postMethodFilters(strip.request.ciosContent.filterCriteriaMap);
15711
+ }
15712
+ _a.label = 1;
15713
+ case 1:
15714
+ _a.trys.push([1, 3, , 4]);
15715
+ return [4 /*yield*/, this.postRequestMethod(strip, strip.request.ciosContent, strip.request.apiUrl, calculateParentStatus)];
15716
+ case 2:
15717
+ response = _a.sent();
15718
+ // console.log('calling after - response, ', response)
15719
+ if (response && response.results) {
15720
+ // console.log('calling after-- ')
15721
+ if (response.results.data && response.results.data.length) {
15722
+ extContentData = response.results.data;
15723
+ if (extContentData.length) {
15724
+ this.processStrip(strip, this.transformContentsToWidgets(extContentData, strip), 'done', calculateParentStatus, response.viewMoreUrl);
15725
+ }
15726
+ else {
15727
+ this.emptyResponse.emit(true);
15728
+ }
15729
+ }
15730
+ else {
15731
+ this.processStrip(strip, [], 'error', calculateParentStatus, null);
15732
+ this.emptyResponse.emit(true);
15733
+ }
15734
+ }
15735
+ else {
15736
+ this.processStrip(strip, [], 'error', calculateParentStatus, null);
15737
+ this.emptyResponse.emit(true);
15738
+ }
15739
+ return [3 /*break*/, 4];
15740
+ case 3:
15741
+ error_7 = _a.sent();
15742
+ this.emptyResponse.emit(true);
15743
+ return [3 /*break*/, 4];
15744
+ case 4: return [2 /*return*/];
15745
+ }
15746
+ });
15747
+ });
15748
+ };
15749
+ // new code writting from here====new====
15750
+ // new code writting from here====new====
15751
+ /**
15752
+ * @param {?} strip
15753
+ * @param {?=} calculateParentStatus
15754
+ * @return {?}
15755
+ */
15756
+ ContentStripWithTabsPillsComponent.prototype.fetchForYouData =
15757
+ // new code writting from here====new====
15758
+ /**
15759
+ * @param {?} strip
15760
+ * @param {?=} calculateParentStatus
15761
+ * @return {?}
15762
+ */
15763
+ function (strip, calculateParentStatus) {
15764
+ if (calculateParentStatus === void 0) { calculateParentStatus = true; }
15765
+ if (strip && strip.type === 'forYou') {
15766
+ if (strip.tabs && strip.tabs.length) {
15767
+ /** @type {?} */
15768
+ var firstTab = strip.tabs[0];
15769
+ /** @type {?} */
15770
+ var pillData = firstTab.pillsData[0];
15771
+ if (pillData.requestRequired) {
15772
+ if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
15773
+ /** @type {?} */
15774
+ var allPills = this.stripsResultDataMap[strip.key].tabs[0].pillsData;
15775
+ /** @type {?} */
15776
+ var currenPillsFromMap = (/** @type {?} */ ((allPills && allPills.length && allPills[0])));
15777
+ this.getTabDataByNewReqTrending(strip, 0, 0, currenPillsFromMap, calculateParentStatus);
15778
+ if (this.stripsResultDataMap[strip.key] && currenPillsFromMap) {
15779
+ this.stripsResultDataMap[strip.key].viewMoreUrl.queryParams = __assign({}, this.stripsResultDataMap[strip.key].viewMoreUrl.queryParams, { key: strip.key, tabSelected: firstTab.value, pillSelected: pillData.value });
15780
+ }
15781
+ }
15782
+ }
15783
+ }
15784
+ }
15785
+ };
15786
+ /**
15787
+ * @param {?} strip
15788
+ * @param {?=} calculateParentStatus
15789
+ * @return {?}
15790
+ */
15791
+ ContentStripWithTabsPillsComponent.prototype.fetchFromSearchV6 = /**
15792
+ * @param {?} strip
15793
+ * @param {?=} calculateParentStatus
15794
+ * @return {?}
15795
+ */
15796
+ function (strip, calculateParentStatus) {
15797
+ if (calculateParentStatus === void 0) { calculateParentStatus = true; }
15798
+ return __awaiter(this, void 0, void 0, function () {
15799
+ var originalFilters, firstTab, allTabs, currentTabFromMap, response_1, error_8;
15800
+ var _this = this;
15801
+ return __generator(this, function (_a) {
15802
+ switch (_a.label) {
15803
+ case 0:
15804
+ if (!(strip.request && strip.request.searchV6 && Object.keys(strip.request.searchV6).length)) return [3 /*break*/, 4];
15805
+ // if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
15806
+ // if (this.configSvc.activeLocale) {
15807
+ // strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
15808
+ // } else {
15809
+ // strip.request.searchV6.locale = ['en']
15810
+ // }
15811
+ // }
15812
+ originalFilters = [];
15813
+ // tslint:disable:no-console
15814
+ if (strip.request &&
15815
+ strip.request.searchV6 &&
15816
+ strip.request.searchV6.request &&
15817
+ strip.request.searchV6.request.filters) {
15818
+ originalFilters = strip.request.searchV6.request.filters;
15819
+ strip.request.searchV6.request.filters = this.checkForDateFilters(strip.request.searchV6.request.filters);
15820
+ strip.request.searchV6.request.filters = this.getFiltersFromArray(strip.request.searchV6.request.filters);
15821
+ }
15822
+ if (!(strip.tabs && strip.tabs.length)) return [3 /*break*/, 1];
15823
+ // TODO: Have to extract requestRequired to outer level of tabs config
15824
+ firstTab = strip.tabs[0];
15825
+ if (firstTab.requestRequired) {
15826
+ if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
15827
+ allTabs = this.stripsResultDataMap[strip.key].tabs;
15828
+ currentTabFromMap = (/** @type {?} */ ((allTabs && allTabs.length && allTabs[0])));
15829
+ this.getTabDataByNewReqSearchV6(strip, 0, 0, currentTabFromMap, calculateParentStatus);
15830
+ }
15831
+ }
15832
+ return [3 /*break*/, 4];
15833
+ case 1:
15834
+ _a.trys.push([1, 3, , 4]);
15835
+ return [4 /*yield*/, this.searchV6Request(strip, strip.request, calculateParentStatus)];
15836
+ case 2:
15837
+ response_1 = _a.sent();
15838
+ // console.log('calling after - response, ', response)
15839
+ if (response_1 && response_1.results) {
15840
+ // console.log('calling after-- ')
15841
+ if (response_1.results.result.content) {
15842
+ if (strip.key === 'scheduledAssessment') {
15843
+ this.enrollInterval = setInterval((/**
15844
+ * @return {?}
15845
+ */
15846
+ function () {
15847
+ _this.checkInvitOnlyAssessments(response_1.results.result.content, strip, calculateParentStatus, response_1.viewMoreUrl);
15848
+ // tslint:disable-next-line
15849
+ }), 1000);
15850
+ }
15851
+ else {
15852
+ this.processStrip(strip, this.transformContentsToWidgets(response_1.results.result.content, strip), 'done', calculateParentStatus, response_1.viewMoreUrl);
15853
+ }
15854
+ }
15855
+ else if (response_1.results.result.Event) {
15856
+ this.processStrip(strip, this.transformEventsToWidgets(response_1.results.result.Event, strip), 'done', calculateParentStatus, response_1.viewMoreUrl);
15857
+ }
15858
+ else {
15859
+ this.processStrip(strip, [], 'error', calculateParentStatus, null);
15860
+ }
15861
+ }
15862
+ else {
15863
+ this.processStrip(strip, [], 'error', calculateParentStatus, null);
15864
+ }
15865
+ return [3 /*break*/, 4];
15866
+ case 3:
15867
+ error_8 = _a.sent();
15868
+ return [3 /*break*/, 4];
15869
+ case 4: return [2 /*return*/];
15870
+ }
15871
+ });
15872
+ });
15873
+ };
15874
+ /**
15875
+ * @param {?} strip
15876
+ * @param {?} tabIndex
15877
+ * @param {?} pillIndex
15878
+ * @param {?} currentTab
15879
+ * @param {?} calculateParentStatus
15880
+ * @return {?}
15881
+ */
15882
+ ContentStripWithTabsPillsComponent.prototype.getTabDataByNewReqTrending = /**
15883
+ * @param {?} strip
15884
+ * @param {?} tabIndex
15885
+ * @param {?} pillIndex
15886
+ * @param {?} currentTab
15887
+ * @param {?} calculateParentStatus
15888
+ * @return {?}
15889
+ */
15890
+ function (strip, tabIndex, pillIndex, currentTab, calculateParentStatus) {
15891
+ return __awaiter(this, void 0, void 0, function () {
15892
+ var response, tabResults, content, widgets, allTabs, allPills, allTabs, allPills, error_9;
15893
+ return __generator(this, function (_a) {
15894
+ switch (_a.label) {
15895
+ case 0:
15896
+ _a.trys.push([0, 2, , 3]);
15897
+ return [4 /*yield*/, this.trendingSearchRequest(strip, currentTab.request, calculateParentStatus)];
15898
+ case 1:
15899
+ response = _a.sent();
15900
+ tabResults = [];
15901
+ if (response && response.results && response.results.response) {
15902
+ content = response.results.response[currentTab.value] || [];
15903
+ widgets = this.transformContentsToWidgets(content, strip);
15904
+ if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
15905
+ allTabs = this.stripsResultDataMap[strip.key].tabs;
15906
+ allPills = this.stripsResultDataMap[strip.key].tabs[tabIndex].pillsData;
15907
+ this.resetSelectedPill(allPills);
15908
+ if (allTabs && allTabs.length && allTabs[tabIndex]) {
15909
+ if (allPills && allPills.length && allPills[pillIndex]) {
15910
+ allPills[pillIndex] = __assign({}, allPills[pillIndex], { widgets: widgets, fetchTabStatus: 'done', selected: true });
15911
+ }
15912
+ allTabs[tabIndex] = __assign({}, allTabs[tabIndex], { widgets: widgets, fetchTabStatus: 'done' });
15913
+ tabResults = allTabs;
15914
+ }
15915
+ }
15916
+ this.processStrip(strip, widgets, 'done', calculateParentStatus, response.viewMoreUrl, tabResults // tabResults as widgets
15917
+ );
15918
+ }
15919
+ else {
15920
+ if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
15921
+ allTabs = this.stripsResultDataMap[strip.key].tabs;
15922
+ allPills = this.stripsResultDataMap[strip.key].tabs[tabIndex].pillsData;
15923
+ this.resetSelectedPill(allPills);
15924
+ if (allTabs && allTabs.length && allTabs[tabIndex]) {
15925
+ if (allPills && allPills.length && allPills[pillIndex]) {
15926
+ allPills[pillIndex] = __assign({}, allPills[pillIndex], { widgets: [], fetchTabStatus: 'done', selected: true });
15927
+ }
15928
+ allTabs[tabIndex] = __assign({}, allTabs[tabIndex], { widgets: [], fetchTabStatus: 'done' });
15929
+ tabResults = allTabs;
15930
+ }
15931
+ }
15932
+ this.processStrip(strip, [], 'done', calculateParentStatus, null);
15933
+ }
15934
+ return [3 /*break*/, 3];
15935
+ case 2:
15936
+ error_9 = _a.sent();
15937
+ // Handle errors
15938
+ this.processStrip(strip, [], 'error', calculateParentStatus, null);
15939
+ return [3 /*break*/, 3];
15940
+ case 3: return [2 /*return*/];
15941
+ }
15942
+ });
15943
+ });
15944
+ };
15945
+ /**
15946
+ * @param {?} strip
15947
+ * @param {?} tabIndex
15948
+ * @param {?} pillIndex
15949
+ * @param {?} currentTab
15950
+ * @param {?} calculateParentStatus
15951
+ * @return {?}
15952
+ */
15953
+ ContentStripWithTabsPillsComponent.prototype.getTabDataByNewReqSearchV6 = /**
15954
+ * @param {?} strip
15955
+ * @param {?} tabIndex
15956
+ * @param {?} pillIndex
15957
+ * @param {?} currentTab
15958
+ * @param {?} calculateParentStatus
15959
+ * @return {?}
15960
+ */
15961
+ function (strip, tabIndex, pillIndex, currentTab, calculateParentStatus) {
15962
+ return __awaiter(this, void 0, void 0, function () {
15963
+ var response, widgets, tabResults, allTabs, allPills, error_10;
15964
+ return __generator(this, function (_a) {
15965
+ switch (_a.label) {
15966
+ case 0:
15967
+ _a.trys.push([0, 2, , 3]);
15968
+ return [4 /*yield*/, this.searchV6Request(strip, currentTab.request, calculateParentStatus)];
15969
+ case 1:
15970
+ response = _a.sent();
15971
+ if (response && response.results) {
15972
+ widgets = this.transformContentsToWidgets(response.results.result.content, strip);
15973
+ tabResults = [];
15974
+ if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
15975
+ allTabs = this.stripsResultDataMap[strip.key].tabs;
15976
+ allPills = this.stripsResultDataMap[strip.key].tabs[tabIndex].pillsData;
15977
+ this.resetSelectedPill(allPills);
15978
+ if (allTabs && allTabs.length && allTabs[tabIndex]) {
15979
+ if (allPills && allPills.length && allPills[pillIndex]) {
15980
+ allPills[pillIndex] = __assign({}, allPills[pillIndex], { widgets: widgets, fetchTabStatus: 'done', selected: true });
15981
+ }
15982
+ allTabs[tabIndex] = __assign({}, allTabs[tabIndex], { widgets: widgets, fetchTabStatus: 'done' });
15983
+ tabResults = allTabs;
15984
+ }
15985
+ }
15986
+ this.processStrip(strip, widgets, 'done', calculateParentStatus, response.viewMoreUrl, tabResults // tabResults as widgets
15987
+ );
15988
+ }
15989
+ else {
15990
+ this.processStrip(strip, [], 'error', calculateParentStatus, null);
15991
+ }
15992
+ return [3 /*break*/, 3];
15993
+ case 2:
15994
+ error_10 = _a.sent();
15995
+ return [3 /*break*/, 3];
15996
+ case 3: return [2 /*return*/];
15997
+ }
15998
+ });
15999
+ });
16000
+ };
16001
+ /**
16002
+ * @param {?} strip
16003
+ * @param {?} request
16004
+ * @param {?} calculateParentStatus
16005
+ * @return {?}
16006
+ */
16007
+ ContentStripWithTabsPillsComponent.prototype.trendingSearchRequest = /**
16008
+ * @param {?} strip
16009
+ * @param {?} request
16010
+ * @param {?} calculateParentStatus
16011
+ * @return {?}
16012
+ */
16013
+ function (strip, request, calculateParentStatus) {
16014
+ return __awaiter(this, void 0, void 0, function () {
16015
+ var originalFilters;
16016
+ var _this = this;
16017
+ return __generator(this, function (_a) {
16018
+ originalFilters = [];
16019
+ return [2 /*return*/, new Promise((/**
16020
+ * @param {?} resolve
16021
+ * @param {?} reject
16022
+ * @return {?}
16023
+ */
16024
+ function (resolve, reject) {
16025
+ if (request && request.trendingSearch) {
16026
+ // check for the request if it has dynamic values]
16027
+ if (request.trendingSearch.request.filters.organisation &&
16028
+ request.trendingSearch.request.filters.organisation.indexOf('<orgID>') >= 0) {
16029
+ /** @type {?} */
16030
+ var userRootOrgId = void 0;
16031
+ if (_this.configSvc.userProfile) {
16032
+ userRootOrgId = _this.configSvc.userProfile.rootOrgId;
16033
+ }
16034
+ request.trendingSearch.request.filters.organisation = userRootOrgId;
16035
+ }
16036
+ _this.contentSvc.trendingContentSearch(request.trendingSearch).subscribe((/**
16037
+ * @param {?} results
16038
+ * @return {?}
16039
+ */
16040
+ function (results) {
16041
+ /** @type {?} */
16042
+ var showViewMore = Boolean(results.result &&
16043
+ strip.request &&
16044
+ results.result[strip.request.trendingSearch.responseKey] &&
16045
+ results.result[strip.request.trendingSearch.responseKey].length > 5 &&
16046
+ strip.stripConfig && strip.stripConfig.postCardForSearch);
16047
+ /** @type {?} */
16048
+ var viewMoreUrl = showViewMore
16049
+ ? {
16050
+ path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
16051
+ queryParams: {
16052
+ tab: 'Learn',
16053
+ q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
16054
+ f: request &&
16055
+ request.trendingSearch &&
16056
+ request.trendingSearch.request &&
16057
+ request.trendingSearch.request.filters
16058
+ ? JSON.stringify(_this.transformSearchV6FiltersV2(originalFilters))
16059
+ : {},
16060
+ },
16061
+ }
16062
+ : null;
16063
+ /** @type {?} */
16064
+ var proccesedResult = [];
16065
+ if (results && results.response && results.response.certifications) {
16066
+ results.response.certifications.map((/**
16067
+ * @param {?} result
16068
+ * @return {?}
16069
+ */
16070
+ function (result) {
16071
+ if (result.source === _this.channnelName) {
16072
+ proccesedResult.push(result);
16073
+ }
16074
+ }));
16075
+ results = { response: { certifications: proccesedResult } };
16076
+ }
16077
+ resolve({ results: results, viewMoreUrl: viewMoreUrl });
16078
+ }), (/**
16079
+ * @param {?} error
16080
+ * @return {?}
16081
+ */
16082
+ function (error) {
16083
+ if (error.error && error.error.status === 400) {
16084
+ _this.processStrip(strip, [], 'done', calculateParentStatus, null);
16085
+ }
16086
+ // this.processStrip(strip, [], 'done', calculateParentStatus, null)
16087
+ reject(error);
16088
+ }));
16089
+ }
16090
+ }))];
16091
+ });
16092
+ });
16093
+ };
16094
+ /**
16095
+ * @param {?} tabEvent
16096
+ * @param {?} pillIndex
16097
+ * @param {?} stripMap
16098
+ * @param {?} stripKey
16099
+ * @return {?}
16100
+ */
16101
+ ContentStripWithTabsPillsComponent.prototype.tabClicked = /**
16102
+ * @param {?} tabEvent
16103
+ * @param {?} pillIndex
16104
+ * @param {?} stripMap
16105
+ * @param {?} stripKey
16106
+ * @return {?}
16107
+ */
16108
+ function (tabEvent, pillIndex, stripMap, stripKey) {
16109
+ if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
16110
+ stripMap.tabs[tabEvent.index].pillsData[pillIndex].fetchTabStatus = 'inprogress';
16111
+ stripMap.tabs[tabEvent.index].pillsData[pillIndex].tabLoading = true;
16112
+ stripMap.showOnLoader = true;
16113
+ }
16114
+ /** @type {?} */
16115
+ var data = {
16116
+ label: "" + tabEvent.tab.textLabel,
16117
+ index: tabEvent.index,
16118
+ };
16119
+ this.eventSvc.raiseInteractTelemetry({
16120
+ type: utilsV2.WsEvents.EnumInteractTypes.CLICK,
16121
+ subType: utilsV2.WsEvents.EnumInteractSubTypes.HOME_PAGE_STRIP_TABS,
16122
+ id: lodash.camelCase(data.label) + "-tab",
16123
+ }, {}, {
16124
+ module: utilsV2.WsEvents.EnumTelemetrymodules.HOME,
16125
+ });
16126
+ /** @type {?} */
16127
+ var currentTabFromMap = stripMap.tabs && stripMap.tabs[tabEvent.index];
16128
+ /** @type {?} */
16129
+ var currentPillFromMap = stripMap.tabs && stripMap.tabs[tabEvent.index].pillsData[pillIndex];
16130
+ /** @type {?} */
16131
+ var currentStrip = this.widgetData.strips.find((/**
16132
+ * @param {?} s
16133
+ * @return {?}
16134
+ */
16135
+ function (s) { return s.key === stripKey; }));
16136
+ if (this.stripsResultDataMap[stripKey] && currentTabFromMap) {
16137
+ this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams = __assign({}, this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams, { tabSelected: currentTabFromMap.value, pillSelected: currentPillFromMap.value });
16138
+ }
16139
+ if (currentStrip && currentTabFromMap && !currentTabFromMap.computeDataOnClick && currentPillFromMap) {
16140
+ if (currentPillFromMap.requestRequired && currentPillFromMap.request) {
16141
+ // call API to get tab data and process
16142
+ // this.processStrip(currentStrip, [], 'fetching', true, null)
16143
+ if (currentPillFromMap.request.searchV6) {
16144
+ this.getTabDataByNewReqSearchV6(currentStrip, tabEvent.index, 0, currentPillFromMap, true);
16145
+ }
16146
+ else if (currentPillFromMap.request.trendingSearch) {
16147
+ this.getTabDataByNewReqTrending(currentStrip, tabEvent.index, 0, currentPillFromMap, true);
16148
+ }
16149
+ // if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
16150
+ // stripMap.tabs[tabEvent.index].tabLoading = false;
16151
+ // }
16152
+ stripMap.tabs[tabEvent.index].pillsData[pillIndex].tabLoading = false;
16153
+ }
16154
+ else {
16155
+ // this.getTabDataByfilter(currentStrip, currentTabFromMap, true);
16156
+ // setTimeout(() => {
16157
+ // if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
16158
+ // stripMap.tabs[tabEvent.index].tabLoading = false;
16159
+ // stripMap.tabs[tabEvent.index].fetchTabStatus = 'done';
16160
+ // stripMap.showOnLoader = false;
16161
+ // }
16162
+ // }, 200);
16163
+ }
16164
+ }
16165
+ };
16166
+ /**
16167
+ * @param {?} event
16168
+ * @param {?} stripMap
16169
+ * @param {?} stripKey
16170
+ * @param {?} pillIndex
16171
+ * @param {?} tabIndex
16172
+ * @return {?}
16173
+ */
16174
+ ContentStripWithTabsPillsComponent.prototype.pillClicked = /**
16175
+ * @param {?} event
16176
+ * @param {?} stripMap
16177
+ * @param {?} stripKey
16178
+ * @param {?} pillIndex
16179
+ * @param {?} tabIndex
16180
+ * @return {?}
16181
+ */
16182
+ function (event, stripMap, stripKey, pillIndex, tabIndex) {
16183
+ var _this = this;
16184
+ if (stripMap && stripMap.tabs && stripMap.tabs[tabIndex]) {
16185
+ stripMap.tabs[tabIndex].pillsData[pillIndex].fetchTabStatus = 'inprogress';
16186
+ stripMap.tabs[tabIndex].pillsData[pillIndex].tabLoading = true;
16187
+ stripMap.showOnLoader = true;
16188
+ }
16189
+ /** @type {?} */
16190
+ var currentTabFromMap = stripMap.tabs && stripMap.tabs[tabIndex];
16191
+ /** @type {?} */
16192
+ var currentPillFromMap = stripMap.tabs && stripMap.tabs[tabIndex].pillsData[pillIndex];
16193
+ /** @type {?} */
16194
+ var currentStrip = this.widgetData.strips.find((/**
16195
+ * @param {?} s
16196
+ * @return {?}
16197
+ */
16198
+ function (s) { return s.key === stripKey; }));
16199
+ if (this.stripsResultDataMap[stripKey] && currentTabFromMap) {
16200
+ this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams = __assign({}, this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams, { tabSelected: currentTabFromMap.value, pillSelected: currentPillFromMap.value });
16201
+ }
16202
+ if (currentStrip && currentTabFromMap && !currentTabFromMap.computeDataOnClick && currentPillFromMap) {
16203
+ if (currentPillFromMap.requestRequired && currentPillFromMap.request) {
16204
+ // call API to get tab data and process
16205
+ // this.processStrip(currentStrip, [], 'fetching', true, null)
16206
+ if (currentPillFromMap.request.searchV6) {
16207
+ this.getTabDataByNewReqSearchV6(currentStrip, tabIndex, pillIndex, currentPillFromMap, true);
16208
+ }
16209
+ else if (currentPillFromMap.request.trendingSearch) {
16210
+ this.getTabDataByNewReqTrending(currentStrip, tabIndex, pillIndex, currentPillFromMap, true);
16211
+ }
16212
+ // if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
16213
+ // stripMap.tabs[tabEvent.index].tabLoading = false;
16214
+ // }
16215
+ stripMap.tabs[tabIndex].pillsData[pillIndex].tabLoading = false;
16216
+ }
16217
+ else {
16218
+ this.getTabDataByfilter(currentStrip, currentTabFromMap, true);
16219
+ setTimeout((/**
16220
+ * @return {?}
16221
+ */
16222
+ function () {
16223
+ if (stripMap && stripMap.tabs && stripMap.tabs[tabIndex]) {
16224
+ stripMap.tabs[tabIndex].pillsData[pillIndex].fetchTabStatus = 'inprogress';
16225
+ stripMap.tabs[tabIndex].pillsData[pillIndex].tabLoading = false;
16226
+ stripMap.showOnLoader = false;
16227
+ _this.resetSelectedPill(stripMap.tabs[tabIndex].pillsData);
16228
+ stripMap.tabs[tabIndex].pillsData[pillIndex]['selected'] = true;
16229
+ }
16230
+ }), 200);
16231
+ }
16232
+ }
16233
+ };
16234
+ /**
16235
+ * @param {?} strip
16236
+ * @param {?} request
16237
+ * @param {?} calculateParentStatus
16238
+ * @return {?}
16239
+ */
16240
+ ContentStripWithTabsPillsComponent.prototype.searchV6Request = /**
16241
+ * @param {?} strip
16242
+ * @param {?} request
16243
+ * @param {?} calculateParentStatus
16244
+ * @return {?}
16245
+ */
16246
+ function (strip, request, calculateParentStatus) {
16247
+ return __awaiter(this, void 0, void 0, function () {
16248
+ var originalFilters;
16249
+ var _this = this;
16250
+ return __generator(this, function (_a) {
16251
+ originalFilters = [];
16252
+ return [2 /*return*/, new Promise((/**
16253
+ * @param {?} resolve
16254
+ * @param {?} reject
16255
+ * @return {?}
16256
+ */
16257
+ function (resolve, reject) {
16258
+ if (request && request.searchV6) {
16259
+ _this.contentSvc.searchV6(request.searchV6).subscribe((/**
16260
+ * @param {?} results
16261
+ * @return {?}
16262
+ */
16263
+ function (results) {
16264
+ /** @type {?} */
16265
+ var showViewMore = Boolean(results.result.content && results.result.content.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
16266
+ /** @type {?} */
16267
+ var viewMoreUrl = showViewMore
16268
+ ? {
16269
+ path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
16270
+ queryParams: {
16271
+ tab: 'Learn',
16272
+ q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
16273
+ f: request &&
16274
+ request.searchV6 &&
16275
+ request.searchV6.request &&
16276
+ request.searchV6.request.filters
16277
+ ? JSON.stringify(_this.transformSearchV6FiltersV2(originalFilters))
16278
+ : {},
16279
+ },
16280
+ }
16281
+ : null;
16282
+ // if (viewMoreUrl && viewMoreUrl.queryParams) {
16283
+ // viewMoreUrl.queryParams = viewMoreUrl.queryParams
16284
+ // }
16285
+ resolve({ results: results, viewMoreUrl: viewMoreUrl });
16286
+ }), (/**
16287
+ * @param {?} error
16288
+ * @return {?}
16289
+ */
16290
+ function (error) {
16291
+ _this.processStrip(strip, [], 'error', calculateParentStatus, null);
16292
+ reject(error);
16293
+ }));
16294
+ }
16295
+ }))];
16296
+ });
16297
+ });
16298
+ };
16299
+ /**
16300
+ * @param {?} tabdata
16301
+ * @param {?} tabIndex
16302
+ * @return {?}
16303
+ */
16304
+ ContentStripWithTabsPillsComponent.prototype.getSelectedPillIndex = /**
16305
+ * @param {?} tabdata
16306
+ * @param {?} tabIndex
16307
+ * @return {?}
16308
+ */
16309
+ function (tabdata, tabIndex) {
16310
+ if (tabdata.pillsData && tabdata.pillsData.length) {
16311
+ // tabdata.pillsData.forEach((ele: any, index: any) => {
16312
+ // if(ele.selected) {
16313
+ // console.log(ele,'---------')
16314
+ // return index
16315
+ // }
16316
+ // // })
16317
+ // console.log(tabdata,'==========123')
16318
+ /** @type {?} */
16319
+ var index = tabdata.pillsData.findIndex((/**
16320
+ * @param {?} pill
16321
+ * @return {?}
16322
+ */
16323
+ function (pill) {
16324
+ // if(pill.selected){
16325
+ return pill.selected;
16326
+ // }
16327
+ }));
16328
+ return index;
16329
+ }
16330
+ return 0;
16331
+ };
16332
+ // cbp plans
16333
+ // cbp plans
16334
+ /**
16335
+ * @param {?} strip
16336
+ * @param {?=} calculateParentStatus
16337
+ * @return {?}
16338
+ */
16339
+ ContentStripWithTabsPillsComponent.prototype.fetchAllCbpPlans =
16340
+ // cbp plans
16341
+ /**
16342
+ * @param {?} strip
16343
+ * @param {?=} calculateParentStatus
16344
+ * @return {?}
16345
+ */
16346
+ function (strip, calculateParentStatus) {
16347
+ if (calculateParentStatus === void 0) { calculateParentStatus = true; }
16348
+ return __awaiter(this, void 0, void 0, function () {
16349
+ var courses, tabResults, response;
16350
+ return __generator(this, function (_a) {
16351
+ switch (_a.label) {
16352
+ case 0:
16353
+ if (!(strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length)) return [3 /*break*/, 5];
16354
+ courses = void 0;
16355
+ tabResults = [];
16356
+ return [4 /*yield*/, this.userSvc.fetchCbpPlanList().toPromise()];
16357
+ case 1:
16358
+ response = _a.sent();
16359
+ if (!response) return [3 /*break*/, 4];
16360
+ courses = response;
16361
+ if (!(strip.tabs && strip.tabs.length)) return [3 /*break*/, 3];
16362
+ tabResults = this.splitCbpTabsData(courses, strip);
16363
+ return [4 /*yield*/, this.processStrip(strip, this.transformContentsToWidgets(courses, strip), 'done', calculateParentStatus, '', tabResults)];
16364
+ case 2:
16365
+ _a.sent();
16366
+ return [3 /*break*/, 4];
16367
+ case 3:
16368
+ this.processStrip(strip, this.transformContentsToWidgets(courses, strip), 'done', calculateParentStatus, 'viewMoreUrl');
16369
+ _a.label = 4;
16370
+ case 4:
16371
+ // this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
16372
+ // if (res) {
16373
+ // console.log(res,'===============================>')
16374
+ // courses = res
16375
+ // if (strip.tabs && strip.tabs.length) {
16376
+ // tabResults = this.splitCbpTabsData(courses, strip)
16377
+ // await this.processStrip(
16378
+ // strip,
16379
+ // this.transformContentsToWidgets(courses, strip),
16380
+ // 'done',
16381
+ // calculateParentStatus,
16382
+ // '',
16383
+ // tabResults
16384
+ // )
16385
+ // } else {
16386
+ // this.processStrip(
16387
+ // strip,
16388
+ // this.transformContentsToWidgets(courses, strip),
16389
+ // 'done',
16390
+ // calculateParentStatus,
16391
+ // 'viewMoreUrl',
16392
+ // )
16393
+ // }
16394
+ // }
16395
+ // }, (_err: any) => {
16396
+ // })
16397
+ clearInterval(this.enrollInterval);
16398
+ _a.label = 5;
16399
+ case 5: return [2 /*return*/];
16400
+ }
16401
+ });
16402
+ });
16403
+ };
16404
+ /**
16405
+ * @param {?} contentNew
16406
+ * @param {?} strip
16407
+ * @return {?}
16408
+ */
16409
+ ContentStripWithTabsPillsComponent.prototype.splitCbpTabsData = /**
16410
+ * @param {?} contentNew
16411
+ * @param {?} strip
16412
+ * @return {?}
16413
+ */
16414
+ function (contentNew, strip) {
16415
+ /** @type {?} */
16416
+ var tabResults = [];
16417
+ /** @type {?} */
16418
+ var splitData = this.getTabsList(contentNew, strip);
16419
+ if (strip.tabs && strip.tabs.length) {
16420
+ var _loop_2 = function (i) {
16421
+ if (strip.tabs[i].value === "myIgotPlans") {
16422
+ if (strip.tabs[i].pillsData && strip.tabs[i].pillsData.length) {
16423
+ var _loop_3 = function (j) {
16424
+ if (j === 0) {
16425
+ strip.tabs[i].pillsData[j].selected = true;
16426
+ }
16427
+ if (strip.tabs[i].pillsData[j]) {
16428
+ tabResults.push(__assign({}, strip.tabs[i].pillsData[j], { fetchTabStatus: 'done' }, (splitData.find((/**
16429
+ * @param {?} itmInner
16430
+ * @return {?}
16431
+ */
16432
+ function (itmInner) {
16433
+ if (strip.tabs[i].pillsData && strip.tabs[i].pillsData[j] && itmInner.value === strip.tabs[i].pillsData[j].value) {
16434
+ return itmInner;
16435
+ }
16436
+ return undefined;
16437
+ })))));
16438
+ }
16439
+ };
16440
+ for (var j = 0; j < strip.tabs[i].pillsData.length; j += 1) {
16441
+ _loop_3(j);
16442
+ }
16443
+ strip.tabs[i].pillsData = tabResults;
16444
+ }
16445
+ }
16446
+ };
16447
+ for (var i = 0; i < strip.tabs.length; i += 1) {
16448
+ _loop_2(i);
16449
+ }
16450
+ }
16451
+ return strip.tabs;
16452
+ };
16453
+ /**
16454
+ * @param {?} array
16455
+ * @param {?} strip
16456
+ * @return {?}
16457
+ */
16458
+ ContentStripWithTabsPillsComponent.prototype.getTabsList = /**
16459
+ * @param {?} array
16460
+ * @param {?} strip
16461
+ * @return {?}
16462
+ */
16463
+ function (array, strip) {
16464
+ /** @type {?} */
16465
+ var all = [];
16466
+ /** @type {?} */
16467
+ var upcoming = [];
16468
+ /** @type {?} */
16469
+ var overdue = [];
16470
+ array.forEach((/**
16471
+ * @param {?} e
16472
+ * @return {?}
16473
+ */
16474
+ function (e) {
16475
+ all.push(e);
16476
+ if (e.planDuration === NsCardContent.ACBPConst.OVERDUE) {
16477
+ overdue.push(e);
16478
+ }
16479
+ else if (e.planDuration === NsCardContent.ACBPConst.UPCOMING) {
16480
+ upcoming.push(e);
16481
+ }
16482
+ }));
16483
+ /** @type {?} */
16484
+ var allCompleted = all.filter((/**
16485
+ * @param {?} allData
16486
+ * @return {?}
16487
+ */
16488
+ function (allData) { return allData.contentStatus === 2; }));
16489
+ /** @type {?} */
16490
+ var allInCompleted = all.filter((/**
16491
+ * @param {?} allData
16492
+ * @return {?}
16493
+ */
16494
+ function (allData) { return allData.contentStatus < 2; }));
16495
+ /** @type {?} */
16496
+ var allCompletedOverDue = allCompleted.filter((/**
16497
+ * @param {?} allData
16498
+ * @return {?}
16499
+ */
16500
+ function (allData) { return allData.planDuration === NsCardContent.ACBPConst.OVERDUE; }));
16501
+ /** @type {?} */
16502
+ var allCompletedAll = allCompleted.filter((/**
16503
+ * @param {?} allData
16504
+ * @return {?}
16505
+ */
16506
+ function (allData) { return allData.planDuration !== NsCardContent.ACBPConst.OVERDUE; }));
16507
+ allCompletedOverDue = allCompletedOverDue.sort((/**
16508
+ * @param {?} a
16509
+ * @param {?} b
16510
+ * @return {?}
16511
+ */
16512
+ function (a, b) {
16513
+ if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
16514
+ /** @type {?} */
16515
+ var firstDate = new Date(a.endDate);
16516
+ /** @type {?} */
16517
+ var secondDate = new Date(b.endDate);
16518
+ return firstDate > secondDate ? -1 : 1;
16519
+ }
16520
+ }));
16521
+ allInCompleted = allInCompleted.sort((/**
16522
+ * @param {?} a
16523
+ * @param {?} b
16524
+ * @return {?}
16525
+ */
16526
+ function (a, b) {
16527
+ if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
16528
+ /** @type {?} */
16529
+ var firstDate = new Date(a.endDate);
16530
+ /** @type {?} */
16531
+ var secondDate = new Date(b.endDate);
16532
+ return firstDate > secondDate ? -1 : 1;
16533
+ }
16534
+ }));
16535
+ all = __spread(allInCompleted, allCompletedAll, allCompletedOverDue);
16536
+ overdue = overdue.filter((/**
16537
+ * @param {?} data
16538
+ * @return {?}
16539
+ */
16540
+ function (data) {
16541
+ return data.contentStatus < 2;
16542
+ }));
16543
+ overdue = overdue.sort((/**
16544
+ * @param {?} a
16545
+ * @param {?} b
16546
+ * @return {?}
16547
+ */
16548
+ function (a, b) {
16549
+ /** @type {?} */
16550
+ var firstDate = new Date(a.endDate);
16551
+ /** @type {?} */
16552
+ var secondDate = new Date(b.endDate);
16553
+ return firstDate > secondDate ? -1 : 1;
16554
+ }));
16555
+ upcoming = upcoming.filter((/**
16556
+ * @param {?} data
16557
+ * @return {?}
16558
+ */
16559
+ function (data) {
16560
+ return data.contentStatus < 2;
16561
+ }));
16562
+ // this.getSelectedIndex(1)
16563
+ return [
16564
+ { value: 'all', widgets: this.transformContentsToWidgets(all, strip) },
16565
+ { value: 'upcoming', widgets: this.transformContentsToWidgets(upcoming, strip) },
16566
+ { value: 'completed', widgets: this.transformContentsToWidgets(allCompleted, strip) },
16567
+ { value: 'overdue', widgets: this.transformContentsToWidgets(overdue, strip) }
16568
+ ];
16569
+ };
16570
+ /**
16571
+ * @param {?} pillData
16572
+ * @return {?}
16573
+ */
16574
+ ContentStripWithTabsPillsComponent.prototype.resetSelectedPill = /**
16575
+ * @param {?} pillData
16576
+ * @return {?}
16577
+ */
16578
+ function (pillData) {
16579
+ if (pillData && pillData.length) {
16580
+ pillData.forEach((/**
16581
+ * @param {?} pill
16582
+ * @return {?}
16583
+ */
16584
+ function (pill) {
16585
+ pill['selected'] = false;
16586
+ }));
16587
+ }
16588
+ };
16589
+ ContentStripWithTabsPillsComponent.decorators = [
16590
+ { type: core.Component, args: [{
16591
+ selector: 'sb-uic-content-strip-with-tabs-pills',
16592
+ template: "<ng-container *ngIf=\"!contentAvailable; else otherTemplate\"></ng-container>\n<ng-template #otherTemplate>\n <!-- <div *ngIf=\"showParentLoader\" class=\"text-center my-2\">\n <mat-spinner class=\"inline-block\"></mat-spinner>\n </div> -->\n <ng-container *ngIf=\"showParentError\" [sbUiResolverWidget]=\"widgetData.errorWidget\"></ng-container>\n <ng-container *ngIf=\"showParentNoData\" [sbUiResolverWidget]=\"widgetData.noDataWidget\"></ng-container>\n <ng-container *ngFor=\"let key of stripsKeyOrder; let i = index; trackBy: identify\">\n <ng-container *ngIf=\"isStripShowing(stripsResultDataMap[key])\">\n <a name=\"{{stripsResultDataMap[key]?.stripTitle}}\" [class]=\"key\">\n <div *ngIf=\"stripsResultDataMap && (getLength(stripsResultDataMap[key]) ||\n stripsResultDataMap[key]?.showOnNoData ||\n stripsResultDataMap[key]?.showOnLoader ||\n stripsResultDataMap[key]?.showOnError)\n \" [ngClass]=\"\n !widgetData?.isChannelStrip ? 'xs:px-8 sx:px-10ss' : i > 0 ? 'mt-12' : ''\n \" [id]=\"key\" [ngClass]=\"!widgetData?.isChannelStrip ? margin-bottom-custom : margin-bottom-xs\">\n <div [ngClass]=\"{ pad: stripsResultDataMap[key]?.stripBackground }\"\n [ngStyle]=\"{ 'background-color': stripsResultDataMap[key]?.stripBackground }\">\n <div class=\"flex flex-col pl-4 pr-4 md:pr-0 md:pl-0 \" [ngClass]=\"\n !widgetData?.isChannelStrip\n ? ''\n : stripsResultDataMap[key]?.stripTitle\n ? 'mb-8'\n : ''\n \">\n <div class=\"flex flex-1 items-center\">\n <p class=\"mat-subheading-1 margin-remove inline-block \" *ngIf=\"stripsResultDataMap[key]?.stripTitle\">\n <span class=\"capitalize\" *ngIf=\"stripsResultDataMap[key]?.disableTranslate\">\n {{stripsResultDataMap[key]?.stripTitle}}\n </span>\n <span *ngIf=\"!stripsResultDataMap[key]?.disableTranslate\">\n {{ translateLabels(stripsResultDataMap[key]?.stripTitle, 'home') }}\n </span>\n </p>\n\n <button *ngIf=\"stripsResultDataMap[key]?.stripInfo?.icon\" type=\"button\" mat-icon-button\n (click)=\"toggleInfo(stripsResultDataMap[key])\" i18n-matTooltip matTooltip=\"info\"\n class=\"margin-left-xs\">\n <mat-icon>{{ stripsResultDataMap[key]?.stripInfo?.icon.icon }}</mat-icon>\n </button>\n <a *ngIf=\"stripsResultDataMap[key]?.stripTitleLink?.link\"\n [routerLink]=\"stripsResultDataMap[key]?.stripTitleLink?.link\"\n [queryParams]=\"stripsResultDataMap[key]?.stripTitleLink?.link?.queryParams\">\n <mat-icon class=\"ws-mat-primary-primary-text ws-mat-default-text\" [color]=\"'accent'\">{{\n stripsResultDataMap[key]?.stripTitleLink?.icon }}</mat-icon>\n </a>\n <span class=\"spacer\"></span>\n <!-- viewAll start-->\n <!-- <div *ngIf=\"checkCondition(widgetData , stripsResultDataMap[key])\"\n class=\"ml-4 pl-2 view-more ws-mat-default-text\">\n <a class=\"flex ws-mat-default-text items-center justify-center mat-body-1 cursor-pointer\" \n (click)=\"raiseTelemetry(stripsResultDataMap[key]);redirectViewAll(stripsResultDataMap[key], stripsResultDataMap[key]?.viewMoreUrl?.path, stripsResultDataMap[key]?.viewMoreUrl?.queryParams )\">\n <span i18n class=\"ws-mat-default-text\">{{translateLabels(widgetData.strips[0].viewMoreUrl.viewMoreText,'home') || 'See all'}}</span>\n <mat-icon class=\"ws-mat-default-text mat-icon notranslate material-icons mat-icon-no-color\" color=\"accent\">navigate_next</mat-icon>\n </a>\n </div> -->\n <!-- viewAll end-->\n </div>\n <button mat-icon-button (click)=\"setHiddenForStrip(key)\" *ngIf=\"stripsResultDataMap[key]?.canHideStrip\">\n <mat-icon>close</mat-icon>\n </button>\n <mat-icon class=\"cursor-pointer\" *ngIf=\"stripsResultDataMap[key]?.mode === 'accordion' && isMobile\"\n (click)=\"showAccordionData = !showAccordionData\">{{ showAccordionData ? 'expand_less' : 'expand_more' }}\n </mat-icon>\n </div>\n\n <div class=\"mb-4\" *ngIf=\"checkVisible(stripsResultDataMap[key])\">\n <ng-container [sbUiResolverWidget]=\"getdata(stripsResultDataMap[key])\">\n </ng-container>\n </div>\n <ng-container *ngIf=\"stripsResultDataMap[key]?.showOnNoData\"\n [sbUiResolverWidget]=\"stripsResultDataMap[key]?.noDataWidget\"></ng-container>\n <ng-container *ngIf=\"stripsResultDataMap[key]?.showOnError\"\n [sbUiResolverWidget]=\"stripsResultDataMap[key]?.errorWidget\"></ng-container>\n <!-- IF no errors then proceed to show tabs or non tabs strip -->\n <ng-container *ngIf=\"!stripsResultDataMap[key]?.showOnNoData && !stripsResultDataMap[key]?.showOnError\">\n <ng-container *ngIf=\"stripsResultDataMap[key].tabs && stripsResultDataMap[key].tabs.length\">\n <mat-tab-group animationDuration=\"0ms\" [selectedIndex]=\"getSelectedIndex(stripsResultDataMap[key], key)\"\n class=\"mat-tab-labels w-full strips-tabgroup\" dynamicHeight\n (selectedTabChange)=\"tabClicked($event, 0, stripsResultDataMap[key], key)\">\n <mat-tab label=\"{{tab?.label}}\" *ngFor=\"let tab of stripsResultDataMap[key].tabs; let last = last;let tabIndex = index\">\n <ng-template mat-tab-label>\n <span>{{ translateLabels(tab?.label, 'home') }} &nbsp;</span>\n <span *ngIf=\"tab?.showTabDataCount && tab?.widgets?.length\">({{tab?.widgets?.length}})</span>\n </ng-template>\n\n <div class=\"wfull\" *ngIf=\"tab?.pillsData && tab?.pillsData?.length\">\n <div class=\"flex justify-between\">\n <div>\n <ng-container >\n <mat-chip-list class=\"content-pill\" aria-label=\"Fish selection\">\n <ng-container *ngFor=\"let pill of tab?.pillsData;let p = index\">\n <mat-chip [selected]=\"pill?.selected\" (click)=\"pillClicked($event, stripsResultDataMap[key], key, p, tabIndex)\">\n <span class=\"pill-name\">{{pill?.label}}</span></mat-chip>\n </ng-container>\n </mat-chip-list>\n </ng-container>\n </div>\n <!-- viewAll start-->\n <!-- <div *ngIf=\"checkCondition(widgetData , stripsResultDataMap[key])\"\n class=\"ml-4 pl-2 view-more ws-mat-default-text\">\n <a class=\"flex ws-mat-default-text items-center justify-center mat-body-1 cursor-pointer\" \n (click)=\"raiseTelemetry(stripsResultDataMap[key]);redirectViewAll(stripsResultDataMap[key], stripsResultDataMap[key]?.viewMoreUrl?.path, stripsResultDataMap[key]?.viewMoreUrl?.queryParams )\">\n <span i18n class=\"ws-mat-default-text\">{{translateLabels(widgetData.strips[0].viewMoreUrl.viewMoreText,'home') || 'See all'}}</span>\n <mat-icon class=\"ws-mat-default-text mat-icon notranslate material-icons mat-icon-no-color\" color=\"accent\">navigate_next</mat-icon>\n </a>\n </div> -->\n <!-- viewAll end-->\n </div>\n <div *ngIf=\"stripsResultDataMap && stripsResultDataMap[key]?.showOnLoader ||\n !tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus\"\n class=\"text-center my-2\">\n <sb-uic-horizontal-scroller-v2 [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\" [id]=\"key+'-scroller'\"\n [loadStatus]=\"'fetching'\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of stripsResultDataMap[key]?.loaderWidgets; trackBy: tracker\">\n <ng-container [sbUiResolverWidget]=\"widget\"></ng-container>\n </ng-container>\n </sb-uic-horizontal-scroller-v2>\n </div>\n <ng-container *ngIf=\"tab?.pillsData && tab?.pillsData.length && tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]\">\n <div *ngIf=\"((tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus && tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus === 'done') &&\n (!tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets || !tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length))\">\n <ng-container *ngIf=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.value === 'inprogress'; else msgTemp\">\n <div class=\"w-full flex flex-col items-center justify-center\">\n <img alt=\"\" class=\"mt-4 mb-4\" src=\"assets/icons/home/nodataDefault.svg\">\n <div class=\"mat-subheading-1 text-center info-content\">{{ 'contentstripmultiple.getReadyForLearningAdventure' | translate }} -\n <a class=\"click-here\" [routerLink]=\"'/page/learn'\">{{ 'contentstripmultiple.clickHere' | translate }}</a> {{ 'contentstripmultiple.toEnrollNextCourse' | translate }}</div>\n </div>\n </ng-container>\n <ng-template #msgTemp>\n <div class=\"w-full flex flex-col items-center justify-center\">\n <img alt=\"\" class=\"mt-4 mb-4\" src=\"assets/icons/home/nodataDefault.png\">\n <div class=\"mat-subheading-1 text-center\">{{ translateLabels(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.nodataMsg, 'home') }}</div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n <ng-container *ngIf=\"(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus === 'done' || tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length)\">\n <ng-container *ngIf=\"!tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.tabLoading\">\n <sb-uic-horizontal-scroller-v2 [id]=\"key+'-scroller'\" [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\" [widgetsLength]=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length\"\n *ngIf=\"getContineuLearningLenth(stripsResultDataMap[key]) && showAccordion(key)\"\n [loadStatus]=\"'done'\" [defaultMaxWidgets]=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.maxWidgets ||\n stripsResultDataMap[key]?.sliderConfig?.maxWidgets || defaultMaxWidgets\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets| slice:0:(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.maxWidgets ||\n stripsResultDataMap[key]?.sliderConfig?.maxWidgets || defaultMaxWidgets); trackBy: tracker\">\n <ng-container [sbUiResolverWidget]=\"widget\"></ng-container>\n </ng-container>\n </sb-uic-horizontal-scroller-v2>\n </ng-container>\n </ng-container>\n </div>\n </mat-tab>\n </mat-tab-group>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </a>\n\n </ng-container>\n </ng-container>\n</ng-template>",
16593
+ styles: [".view-more{display:flex;align-items:center;text-align:center;height:40px;justify-content:center}.view-more .icon{font-size:24px;width:24px;height:24px;border:1px solid;border-radius:50%;padding:8px;margin-bottom:8px}.margin-bottom-custom{margin-bottom:60px}.view-more:hover{background-color:#dcdfe5}::ng-deep.strips-tabgroup .mat-tab-header{border-bottom:2px solid rgba(0,0,0,.12)}::ng-deep.strips-tabgroup .mat-tab-body{padding:20px 0!important;box-sizing:border-box;overflow-y:initial!important}::ng-deep.strips-tabgroup .mat-tab-body-wrapper{overflow:inherit!important}::ng-deep.strips-tabgroup .mat-tab-label{border-bottom:0 solid rgba(0,0,0,.1);margin-right:0;opacity:1}::ng-deep.strips-tabgroup .mat-tab-label .mat-tab-label-content{text-transform:inherit;font:400 14px/20px Lato}::ng-deep.strips-tabgroup .mat-tab-label-active .mat-tab-label-content{font-weight:700!important}.click-here{color:#1b4ca1}.info-content{opacity:1;color:rgba(0,0,0,.87);font:700 14px/20px Lato-Bold;text-align:center}.active{background:#1b4ca1!important}.active .pill-name{color:#fff!important}::ng-deep .content-pill .mat-chip-selected{background-color:#1b4ca1!important}::ng-deep .content-pill .mat-chip-selected .pill-name{color:#fff!important}"]
16594
+ }] }
16595
+ ];
16596
+ /** @nocollapse */
16597
+ ContentStripWithTabsPillsComponent.ctorParameters = function () { return [
16598
+ { type: undefined, decorators: [{ type: core.Inject, args: ['environment',] }] },
16599
+ { type: WidgetContentService },
16600
+ { type: utilsV2.LoggerService },
16601
+ { type: utilsV2.EventService },
16602
+ { type: utilsV2.ConfigurationsService },
16603
+ { type: utilsV2.UtilityService },
16604
+ { type: router.Router },
16605
+ { type: WidgetUserService },
16606
+ { type: core$1.TranslateService },
16607
+ { type: MultilingualTranslationsService }
16608
+ ]; };
16609
+ ContentStripWithTabsPillsComponent.propDecorators = {
16610
+ widgetData: [{ type: core.Input }],
16611
+ emptyResponse: [{ type: core.Output }],
16612
+ viewAllResponse: [{ type: core.Output }],
16613
+ telemtryResponse: [{ type: core.Output }],
16614
+ providerId: [{ type: core.Input }],
16615
+ emitViewAll: [{ type: core.Input }],
16616
+ channnelName: [{ type: core.Input }],
16617
+ id: [{ type: core.HostBinding, args: ['id',] }]
16618
+ };
16619
+ return ContentStripWithTabsPillsComponent;
16620
+ }(resolverV2.WidgetBaseComponent));
16621
+ if (false) {
16622
+ /** @type {?} */
16623
+ ContentStripWithTabsPillsComponent.prototype.widgetData;
16624
+ /** @type {?} */
16625
+ ContentStripWithTabsPillsComponent.prototype.emptyResponse;
16626
+ /** @type {?} */
16627
+ ContentStripWithTabsPillsComponent.prototype.viewAllResponse;
16628
+ /** @type {?} */
16629
+ ContentStripWithTabsPillsComponent.prototype.telemtryResponse;
16630
+ /** @type {?} */
16631
+ ContentStripWithTabsPillsComponent.prototype.providerId;
16632
+ /** @type {?} */
16633
+ ContentStripWithTabsPillsComponent.prototype.emitViewAll;
16634
+ /** @type {?} */
16635
+ ContentStripWithTabsPillsComponent.prototype.channnelName;
16636
+ /** @type {?} */
16637
+ ContentStripWithTabsPillsComponent.prototype.id;
16638
+ /** @type {?} */
16639
+ ContentStripWithTabsPillsComponent.prototype.stripsResultDataMap;
16640
+ /** @type {?} */
16641
+ ContentStripWithTabsPillsComponent.prototype.stripsKeyOrder;
16642
+ /** @type {?} */
16643
+ ContentStripWithTabsPillsComponent.prototype.showAccordionData;
16644
+ /** @type {?} */
16645
+ ContentStripWithTabsPillsComponent.prototype.showParentLoader;
16646
+ /** @type {?} */
16647
+ ContentStripWithTabsPillsComponent.prototype.showParentError;
16648
+ /** @type {?} */
16649
+ ContentStripWithTabsPillsComponent.prototype.showParentNoData;
16650
+ /** @type {?} */
16651
+ ContentStripWithTabsPillsComponent.prototype.errorDataCount;
16652
+ /** @type {?} */
16653
+ ContentStripWithTabsPillsComponent.prototype.noDataCount;
16654
+ /** @type {?} */
16655
+ ContentStripWithTabsPillsComponent.prototype.successDataCount;
16656
+ /** @type {?} */
16657
+ ContentStripWithTabsPillsComponent.prototype.contentAvailable;
16658
+ /** @type {?} */
16659
+ ContentStripWithTabsPillsComponent.prototype.baseUrl;
16660
+ /** @type {?} */
16661
+ ContentStripWithTabsPillsComponent.prototype.veifiedKarmayogi;
16662
+ /** @type {?} */
16663
+ ContentStripWithTabsPillsComponent.prototype.environment;
16664
+ /** @type {?} */
16665
+ ContentStripWithTabsPillsComponent.prototype.changeEventSubscription;
16666
+ /** @type {?} */
16667
+ ContentStripWithTabsPillsComponent.prototype.defaultMaxWidgets;
16668
+ /** @type {?} */
16669
+ ContentStripWithTabsPillsComponent.prototype.enrollInterval;
16670
+ /** @type {?} */
16671
+ ContentStripWithTabsPillsComponent.prototype.todaysEvents;
16672
+ /** @type {?} */
16673
+ ContentStripWithTabsPillsComponent.prototype.enrollmentMapData;
16674
+ /**
16675
+ * @type {?}
16676
+ * @private
16677
+ */
16678
+ ContentStripWithTabsPillsComponent.prototype.contentSvc;
16679
+ /**
16680
+ * @type {?}
16681
+ * @private
16682
+ */
16683
+ ContentStripWithTabsPillsComponent.prototype.loggerSvc;
16684
+ /**
16685
+ * @type {?}
16686
+ * @private
16687
+ */
16688
+ ContentStripWithTabsPillsComponent.prototype.eventSvc;
16689
+ /**
16690
+ * @type {?}
16691
+ * @private
16692
+ */
16693
+ ContentStripWithTabsPillsComponent.prototype.configSvc;
16694
+ /** @type {?} */
16695
+ ContentStripWithTabsPillsComponent.prototype.utilitySvc;
16696
+ /** @type {?} */
16697
+ ContentStripWithTabsPillsComponent.prototype.router;
16698
+ /**
16699
+ * @type {?}
16700
+ * @private
16701
+ */
16702
+ ContentStripWithTabsPillsComponent.prototype.userSvc;
16703
+ /**
16704
+ * @type {?}
16705
+ * @private
16706
+ */
16707
+ ContentStripWithTabsPillsComponent.prototype.translate;
16708
+ /**
16709
+ * @type {?}
16710
+ * @private
16711
+ */
16712
+ ContentStripWithTabsPillsComponent.prototype.langtranslations;
16713
+ }
16714
+
16715
+ /**
16716
+ * @fileoverview added by tsickle
16717
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
16718
+ */
16719
+ // tslint:disable-next-line:function-name
16720
+ /**
16721
+ * @param {?} http
16722
+ * @return {?}
16723
+ */
16724
+ function HttpLoaderFactory1(http) {
16725
+ return new httpLoader.TranslateHttpLoader(http);
16726
+ }
16727
+ var ContentStripWithTabsPillsModule = /** @class */ (function () {
16728
+ function ContentStripWithTabsPillsModule() {
16729
+ }
16730
+ ContentStripWithTabsPillsModule.decorators = [
16731
+ { type: core.NgModule, args: [{
16732
+ declarations: [ContentStripWithTabsPillsComponent],
16733
+ imports: [
16734
+ resolverV2.SbUiResolverModule,
16735
+ common.CommonModule,
16736
+ router.RouterModule,
16737
+ HorizontalScrollerV2Module,
16738
+ material.MatProgressSpinnerModule,
16739
+ material.MatToolbarModule,
16740
+ material.MatIconModule,
16741
+ material.MatButtonModule,
16742
+ material.MatTooltipModule,
16743
+ material.MatListModule,
16744
+ material.MatSidenavModule,
16745
+ material.MatCardModule,
16746
+ material.MatExpansionModule,
16747
+ material.MatRadioModule,
16748
+ material.MatChipsModule,
16749
+ material.MatInputModule,
16750
+ material.MatFormFieldModule,
16751
+ material.MatDialogModule,
16752
+ material.MatSnackBarModule,
16753
+ material.MatSelectModule,
16754
+ material.MatDatepickerModule,
16755
+ material.MatNativeDateModule,
16756
+ material.MatTableModule,
16757
+ material.MatCheckboxModule,
16758
+ material.MatProgressSpinnerModule,
16759
+ material.MatButtonToggleModule,
16760
+ material.MatTabsModule,
16761
+ material.MatAutocompleteModule,
16762
+ core$1.TranslateModule.forRoot({
16763
+ loader: {
16764
+ provide: core$1.TranslateLoader,
16765
+ useFactory: HttpLoaderFactory1,
16766
+ deps: [http.HttpClient],
16767
+ },
16768
+ }),
16769
+ ],
16770
+ entryComponents: [ContentStripWithTabsPillsComponent],
16771
+ exports: [ContentStripWithTabsPillsComponent],
16772
+ },] }
16773
+ ];
16774
+ return ContentStripWithTabsPillsModule;
16775
+ }());
16776
+
12420
16777
  /**
12421
16778
  * @fileoverview added by tsickle
12422
16779
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -14281,8 +18638,10 @@
14281
18638
  exports.ConsumptionService = ConsumptionService;
14282
18639
  exports.ContentProgressModule = ContentProgressModule;
14283
18640
  exports.ContentStripWithTabsLibModule = ContentStripWithTabsLibModule;
18641
+ exports.ContentStripWithTabsPillsModule = ContentStripWithTabsPillsModule;
14284
18642
  exports.DataPointsModule = DataPointsModule;
14285
18643
  exports.HttpLoaderFactory = HttpLoaderFactory;
18644
+ exports.HttpLoaderFactory1 = HttpLoaderFactory1;
14286
18645
  exports.MyHammerConfig = MyHammerConfig;
14287
18646
  exports.ROOT_WIDGET_CONFIG = ROOT_WIDGET_CONFIG;
14288
18647
  exports.SlidersLibModule = SlidersLibModule;
@@ -14295,41 +18654,43 @@
14295
18654
  exports.ɵba = CardWideV2Component;
14296
18655
  exports.ɵbb = CardKarmaProgramsComponent;
14297
18656
  exports.ɵbc = CardKarmaProgramsV2Component;
14298
- exports.ɵbd = CardPortraitExtComponent;
14299
- exports.ɵbe = CardAssessmentComponent;
14300
- exports.ɵbf = CardProgressPortraitLibComponent;
14301
- exports.ɵbg = CertificateService;
14302
- exports.ɵbh = CardMdoChannelV1Component;
14303
- exports.ɵbi = PipePublicURLModule;
14304
- exports.ɵbj = PipePublicURL;
14305
- exports.ɵbk = ObjectToArrayPipeModule;
14306
- exports.ɵbl = ObjectToArrayPipe;
14307
- exports.ɵbm = DisplayContentTypeLibModule;
14308
- exports.ɵbn = DisplayContentTypeLibComponent;
14309
- exports.ɵbo = DefaultThumbnailModule;
14310
- exports.ɵbp = DefaultThumbnailDirective;
14311
- exports.ɵbq = PipeDurationTransformModule;
14312
- exports.ɵbr = PipeDurationTransformPipe;
14313
- exports.ɵbs = ContentProgressComponent;
14314
- exports.ɵbt = DialogComponentsModule;
14315
- exports.ɵbu = CertificateDialogComponent;
14316
- exports.ɵbv = AvatarPhotoLibModule;
14317
- exports.ɵbw = AvatarPhotoLibComponent;
14318
- exports.ɵbx = CompetencyPassbookComponent;
14319
- exports.ɵby = CompetencyPassbookService;
14320
- exports.ɵbz = PillsModule;
18657
+ exports.ɵbd = ProviderCardComponent;
18658
+ exports.ɵbe = CardPortraitExtComponent;
18659
+ exports.ɵbf = CardAssessmentComponent;
18660
+ exports.ɵbg = CardProgressPortraitLibComponent;
18661
+ exports.ɵbh = CertificateService;
18662
+ exports.ɵbi = CardMdoChannelV1Component;
18663
+ exports.ɵbj = PipePublicURLModule;
18664
+ exports.ɵbk = PipePublicURL;
18665
+ exports.ɵbl = ObjectToArrayPipeModule;
18666
+ exports.ɵbm = ObjectToArrayPipe;
18667
+ exports.ɵbn = DisplayContentTypeLibModule;
18668
+ exports.ɵbo = DisplayContentTypeLibComponent;
18669
+ exports.ɵbp = DefaultThumbnailModule;
18670
+ exports.ɵbq = DefaultThumbnailDirective;
18671
+ exports.ɵbr = PipeDurationTransformModule;
18672
+ exports.ɵbs = PipeDurationTransformPipe;
18673
+ exports.ɵbt = ContentProgressComponent;
18674
+ exports.ɵbu = DialogComponentsModule;
18675
+ exports.ɵbv = CertificateDialogComponent;
18676
+ exports.ɵbw = AvatarPhotoLibModule;
18677
+ exports.ɵbx = AvatarPhotoLibComponent;
18678
+ exports.ɵby = ContentStripWithTabsPillsComponent;
18679
+ exports.ɵbz = CompetencyPassbookComponent;
14321
18680
  exports.ɵc = MultilingualTranslationsService;
14322
- exports.ɵca = PillsComponent;
14323
- exports.ɵcb = CompetencyPassbookMdoComponent;
14324
- exports.ɵcc = CompetencyPassbookMdoService;
14325
- exports.ɵcd = UserContentRatingLibComponent;
14326
- exports.ɵce = ScrollableItemDirective;
14327
- exports.ɵcf = RatingService;
14328
- exports.ɵcg = UserContentRatingLibService;
14329
- exports.ɵch = MyHammerConfig$1;
14330
- exports.ɵci = SlidersNgContentLibModule;
14331
- exports.ɵcj = SlidersNgContentLibComponent;
14332
- exports.ɵck = ScrollableItemModule;
18681
+ exports.ɵca = CompetencyPassbookService;
18682
+ exports.ɵcb = PillsModule;
18683
+ exports.ɵcc = PillsComponent;
18684
+ exports.ɵcd = CompetencyPassbookMdoComponent;
18685
+ exports.ɵce = CompetencyPassbookMdoService;
18686
+ exports.ɵcf = UserContentRatingLibComponent;
18687
+ exports.ɵcg = ScrollableItemDirective;
18688
+ exports.ɵch = RatingService;
18689
+ exports.ɵci = UserContentRatingLibService;
18690
+ exports.ɵcj = MyHammerConfig$1;
18691
+ exports.ɵck = SlidersNgContentLibModule;
18692
+ exports.ɵcl = SlidersNgContentLibComponent;
18693
+ exports.ɵcm = ScrollableItemModule;
14333
18694
  exports.ɵd = ConfigurationsService;
14334
18695
  exports.ɵe = HorizontalScrollerV2Module;
14335
18696
  exports.ɵf = HorizontalScrollerV2Component;