@sunbird-cb/consumption 0.0.87 → 0.0.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/sunbird-cb-consumption.umd.js +1594 -1504
- package/bundles/sunbird-cb-consumption.umd.js.map +1 -1
- package/bundles/sunbird-cb-consumption.umd.min.js +2 -2
- package/bundles/sunbird-cb-consumption.umd.min.js.map +1 -1
- package/esm2015/lib/_common/cards/card-assessment/card-assessment/card-assessment.component.js +4 -7
- package/esm2015/lib/_common/cards/card-karma-programs/card-karma-programs.component.js +3 -3
- package/esm2015/lib/_common/cards/card-mdo-channel/card-mdo-channel.component.js +3 -3
- package/esm2015/lib/_common/cards/card-mdo-channel-v1/card-mdo-channel-v1.component.js +3 -3
- package/esm2015/lib/_common/cards/card-portrait/card-portrait.component.js +3 -3
- package/esm2015/lib/_common/cards/card-portrait-ext/card-portrait-ext.component.js +3 -3
- package/esm2015/lib/_common/cards/card-progress-portrait-lib/card-progress-portrait-lib.component.js +3 -3
- package/esm2015/lib/_common/cards/cards.component.js +4 -24
- package/esm2015/lib/_common/common-strip/common-strip.component.js +5 -5
- package/esm2015/lib/_common/competency-passbook/competency-passbook.component.js +3 -3
- package/esm2015/lib/_common/competency-passbook-mdo/competency-passbook-mdo.component.js +3 -3
- package/esm2015/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.js +50 -54
- package/esm2015/lib/_common/mdo-leaderboard/mdo-leaderboard.component.js +6 -6
- package/esm2015/lib/_common/strips/content-strip-facet-filter/content-strip-facet-filter.component.js +7 -9
- package/esm2015/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.component.js +8 -8
- package/esm2015/lib/_common/user-progress/user-progress.component.js +1 -2
- package/esm2015/lib/_services/widget-content-lib.service.js +899 -0
- package/esm2015/lib/_services/widget-user-lib.service.js +523 -0
- package/esm2015/public-api.js +3 -2
- package/esm2015/sunbird-cb-consumption.js +77 -78
- package/esm5/lib/_common/cards/card-assessment/card-assessment/card-assessment.component.js +4 -7
- package/esm5/lib/_common/cards/card-karma-programs/card-karma-programs.component.js +3 -3
- package/esm5/lib/_common/cards/card-mdo-channel/card-mdo-channel.component.js +3 -3
- package/esm5/lib/_common/cards/card-mdo-channel-v1/card-mdo-channel-v1.component.js +3 -3
- package/esm5/lib/_common/cards/card-portrait/card-portrait.component.js +3 -3
- package/esm5/lib/_common/cards/card-portrait-ext/card-portrait-ext.component.js +3 -3
- package/esm5/lib/_common/cards/card-progress-portrait-lib/card-progress-portrait-lib.component.js +3 -3
- package/esm5/lib/_common/cards/cards.component.js +4 -27
- package/esm5/lib/_common/common-strip/common-strip.component.js +5 -5
- package/esm5/lib/_common/competency-passbook/competency-passbook.component.js +3 -3
- package/esm5/lib/_common/competency-passbook-mdo/competency-passbook-mdo.component.js +3 -3
- package/esm5/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.js +83 -87
- package/esm5/lib/_common/mdo-leaderboard/mdo-leaderboard.component.js +6 -6
- package/esm5/lib/_common/strips/content-strip-facet-filter/content-strip-facet-filter.component.js +7 -9
- package/esm5/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.component.js +8 -9
- package/esm5/lib/_common/user-progress/user-progress.component.js +1 -2
- package/esm5/lib/_services/widget-content-lib.service.js +1170 -0
- package/esm5/lib/_services/widget-user-lib.service.js +607 -0
- package/esm5/public-api.js +3 -2
- package/esm5/sunbird-cb-consumption.js +77 -78
- package/fesm2015/sunbird-cb-consumption.js +1159 -1096
- package/fesm2015/sunbird-cb-consumption.js.map +1 -1
- package/fesm5/sunbird-cb-consumption.js +1519 -1429
- package/fesm5/sunbird-cb-consumption.js.map +1 -1
- package/lib/_common/cards/card-assessment/card-assessment/card-assessment.component.d.ts +2 -3
- package/lib/_common/cards/card-karma-programs/card-karma-programs.component.d.ts +2 -2
- package/lib/_common/cards/card-mdo-channel/card-mdo-channel.component.d.ts +2 -2
- package/lib/_common/cards/card-mdo-channel-v1/card-mdo-channel-v1.component.d.ts +2 -2
- package/lib/_common/cards/card-portrait/card-portrait.component.d.ts +2 -2
- package/lib/_common/cards/card-portrait-ext/card-portrait-ext.component.d.ts +2 -2
- package/lib/_common/cards/card-progress-portrait-lib/card-progress-portrait-lib.component.d.ts +2 -2
- package/lib/_common/cards/cards.component.d.ts +2 -5
- package/lib/_common/common-strip/common-strip.component.d.ts +3 -3
- package/lib/_common/competency-passbook/competency-passbook.component.d.ts +3 -3
- package/lib/_common/competency-passbook-mdo/competency-passbook-mdo.component.d.ts +3 -3
- package/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.d.ts +4 -6
- package/lib/_common/strips/content-strip-facet-filter/content-strip-facet-filter.component.d.ts +3 -4
- package/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.component.d.ts +3 -4
- package/lib/_services/{widget-content.service.d.ts → widget-content-lib.service.d.ts} +6 -3
- package/lib/_services/{widget-user.service.d.ts → widget-user-lib.service.d.ts} +9 -4
- package/package.json +1 -1
- package/public-api.d.ts +2 -1
- package/sunbird-cb-consumption.d.ts +75 -76
- package/sunbird-cb-consumption.metadata.json +1 -1
- package/esm2015/lib/_services/widget-content.service.js +0 -852
- package/esm2015/lib/_services/widget-user.service.js +0 -475
- package/esm5/lib/_services/widget-content.service.js +0 -1109
- package/esm5/lib/_services/widget-user.service.js +0 -542
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { Injectable, ɵɵdefineInjectable, Component, EventEmitter, Input, Output, ViewChild, NgModule,
|
|
1
|
+
import { Injectable, ɵɵdefineInjectable, Component, EventEmitter, Input, Output, ViewChild, NgModule, Inject, ɵɵinject, HostBinding, Directive, HostListener, CUSTOM_ELEMENTS_SCHEMA, ElementRef, ViewChildren, Pipe } from '@angular/core';
|
|
2
2
|
import { CommonModule, DatePipe } from '@angular/common';
|
|
3
3
|
import { Router, RouterModule, ActivatedRoute } from '@angular/router';
|
|
4
|
-
import { fromEvent, timer, BehaviorSubject, Subject, of, EMPTY, ReplaySubject,
|
|
5
|
-
import { debounceTime, throttleTime,
|
|
4
|
+
import { fromEvent, timer, throwError, Observable, BehaviorSubject, Subject, of, EMPTY, ReplaySubject, interval } from 'rxjs';
|
|
5
|
+
import { debounceTime, throttleTime, catchError, map, shareReplay, retry, filter, distinctUntilChanged } from 'rxjs/operators';
|
|
6
6
|
import { ValueService, ConfigurationsService as ConfigurationsService$1, WsEvents, LoggerService, EventService, UtilityService, MultilingualTranslationsService as MultilingualTranslationsService$1, PipeSafeSanitizerModule } from '@sunbird-cb/utils-v2';
|
|
7
7
|
import { MatButtonModule, MatIconModule, MatProgressSpinnerModule, MatToolbarModule, MatTooltipModule, MatListModule, MatSidenavModule, MatCardModule, MatExpansionModule, MatRadioModule, MatChipsModule, MatInputModule, MatFormFieldModule, MatDialogModule, MatSnackBarModule, MatSelectModule, MatDatepickerModule, MatNativeDateModule, MatTableModule, MatCheckboxModule, MatButtonToggleModule, MatTabsModule, MatAutocompleteModule, MatSnackBar, MatDialogRef, MAT_DIALOG_DATA, MatDialog, MatProgressBarModule, MatMenuModule, MatRippleModule } from '@angular/material';
|
|
8
8
|
import { __awaiter } from 'tslib';
|
|
9
9
|
import { WidgetBaseComponent, SbUiResolverModule } from '@sunbird-cb/resolver-v2';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { HttpHeaders, HttpClient } from '@angular/common/http';
|
|
11
|
+
import { uniqBy, orderBy, get, camelCase, kebabCase } from 'lodash';
|
|
12
|
+
import 'rxjs/add/observable/of';
|
|
13
|
+
import * as dayjs_ from 'dayjs';
|
|
12
14
|
import * as moment$4 from 'moment';
|
|
13
15
|
import { duration, utc } from 'moment';
|
|
14
16
|
import { TranslateService, TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
|
15
|
-
import 'rxjs/add/observable/of';
|
|
16
|
-
import * as dayjs_ from 'dayjs';
|
|
17
17
|
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
18
18
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
19
19
|
import { HammerGestureConfig, HAMMER_GESTURE_CONFIG } from '@angular/platform-browser';
|
|
@@ -1439,426 +1439,1016 @@ function viewerRouteGenerator(id, mimeType, collectionId, collectionType, forPre
|
|
|
1439
1439
|
};
|
|
1440
1440
|
}
|
|
1441
1441
|
|
|
1442
|
+
/**
|
|
1443
|
+
* @fileoverview added by tsickle
|
|
1444
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1445
|
+
*/
|
|
1446
|
+
var NsCardContent;
|
|
1447
|
+
(function (NsCardContent) {
|
|
1448
|
+
/**
|
|
1449
|
+
* @record
|
|
1450
|
+
*/
|
|
1451
|
+
function ICard() { }
|
|
1452
|
+
NsCardContent.ICard = ICard;
|
|
1453
|
+
if (false) {
|
|
1454
|
+
/** @type {?} */
|
|
1455
|
+
ICard.prototype.content;
|
|
1456
|
+
/** @type {?} */
|
|
1457
|
+
ICard.prototype.cardSubType;
|
|
1458
|
+
/** @type {?} */
|
|
1459
|
+
ICard.prototype.context;
|
|
1460
|
+
/** @type {?|undefined} */
|
|
1461
|
+
ICard.prototype.intranetMode;
|
|
1462
|
+
/** @type {?|undefined} */
|
|
1463
|
+
ICard.prototype.deletedMode;
|
|
1464
|
+
/** @type {?|undefined} */
|
|
1465
|
+
ICard.prototype.likes;
|
|
1466
|
+
/** @type {?|undefined} */
|
|
1467
|
+
ICard.prototype.contentTags;
|
|
1468
|
+
/** @type {?} */
|
|
1469
|
+
ICard.prototype.stateData;
|
|
1470
|
+
}
|
|
1471
|
+
/**
|
|
1472
|
+
* @record
|
|
1473
|
+
*/
|
|
1474
|
+
function IContentTags() { }
|
|
1475
|
+
NsCardContent.IContentTags = IContentTags;
|
|
1476
|
+
if (false) {
|
|
1477
|
+
/** @type {?|undefined} */
|
|
1478
|
+
IContentTags.prototype.daysSpan;
|
|
1479
|
+
/** @type {?|undefined} */
|
|
1480
|
+
IContentTags.prototype.excludeContentType;
|
|
1481
|
+
/** @type {?|undefined} */
|
|
1482
|
+
IContentTags.prototype.excludeMimeType;
|
|
1483
|
+
/** @type {?} */
|
|
1484
|
+
IContentTags.prototype.tag;
|
|
1485
|
+
/** @type {?|undefined} */
|
|
1486
|
+
IContentTags.prototype.criteriaField;
|
|
1487
|
+
}
|
|
1488
|
+
/**
|
|
1489
|
+
* @record
|
|
1490
|
+
*/
|
|
1491
|
+
function ICompetency() { }
|
|
1492
|
+
NsCardContent.ICompetency = ICompetency;
|
|
1493
|
+
if (false) {
|
|
1494
|
+
/** @type {?} */
|
|
1495
|
+
ICompetency.prototype.competencyArea;
|
|
1496
|
+
/** @type {?} */
|
|
1497
|
+
ICompetency.prototype.competencyObject;
|
|
1498
|
+
}
|
|
1499
|
+
let EContentStatus;
|
|
1500
|
+
(function (EContentStatus) {
|
|
1501
|
+
EContentStatus["LIVE"] = "Live";
|
|
1502
|
+
EContentStatus["EXPIRED"] = "Expired";
|
|
1503
|
+
EContentStatus["DELETED"] = "Deleted";
|
|
1504
|
+
EContentStatus["MARK_FOR_DELETION"] = "MarkedForDeletion";
|
|
1505
|
+
})(EContentStatus = NsCardContent.EContentStatus || (NsCardContent.EContentStatus = {}));
|
|
1506
|
+
let ACBPConst;
|
|
1507
|
+
(function (ACBPConst) {
|
|
1508
|
+
ACBPConst["UPCOMING"] = "upcoming";
|
|
1509
|
+
ACBPConst["ALL"] = "All";
|
|
1510
|
+
ACBPConst["OVERDUE"] = "overdue";
|
|
1511
|
+
ACBPConst["SUCCESS"] = "success";
|
|
1512
|
+
})(ACBPConst = NsCardContent.ACBPConst || (NsCardContent.ACBPConst = {}));
|
|
1513
|
+
let IGOTConst;
|
|
1514
|
+
(function (IGOTConst) {
|
|
1515
|
+
IGOTConst["COMPETENCIES"] = "competencies_v5";
|
|
1516
|
+
IGOTConst["RETIRED"] = "Retired";
|
|
1517
|
+
})(IGOTConst = NsCardContent.IGOTConst || (NsCardContent.IGOTConst = {}));
|
|
1518
|
+
})(NsCardContent || (NsCardContent = {}));
|
|
1519
|
+
|
|
1442
1520
|
/**
|
|
1443
1521
|
* @fileoverview added by tsickle
|
|
1444
1522
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1445
1523
|
*/
|
|
1446
1524
|
/** @type {?} */
|
|
1447
|
-
const
|
|
1448
|
-
//
|
|
1449
|
-
|
|
1525
|
+
const dayjs = dayjs_
|
|
1526
|
+
// import { environment } from 'src/environments/environment'
|
|
1527
|
+
;
|
|
1450
1528
|
/** @type {?} */
|
|
1451
1529
|
const PROTECTED_SLAG_V8 = '/apis/protected/v8';
|
|
1452
1530
|
const ɵ0 = /**
|
|
1453
|
-
* @param {?}
|
|
1454
|
-
* @param {?} id
|
|
1531
|
+
* @param {?} userId
|
|
1455
1532
|
* @return {?}
|
|
1456
1533
|
*/
|
|
1457
|
-
(
|
|
1458
|
-
* @param {?}
|
|
1534
|
+
(userId) => `${PROTECTED_SLAG_V8}/user/group/fetchUserGroup?userId=${userId}`, ɵ1 = /**
|
|
1535
|
+
* @param {?} userId
|
|
1459
1536
|
* @return {?}
|
|
1460
1537
|
*/
|
|
1461
|
-
(
|
|
1462
|
-
|
|
1538
|
+
(userId) =>
|
|
1539
|
+
// tslint:disable-next-line: max-line-length
|
|
1540
|
+
`/apis/proxies/v8/learner/course/v2/user/enrollment/list/${userId}?orgdetails=orgName,email&licenseDetails=name,description,url&fields=contentType,primaryCategory,courseCategory,topic,name,channel,mimeType,appIcon,gradeLevel,resourceType,identifier,medium,pkgVersion,board,subject,trackable,posterImage,duration,creatorLogo,license,version,versionKey,avgRating,additionalTags,${NsCardContent.IGOTConst.COMPETENCIES}&batchDetails=name,endDate,startDate,status,enrollmentType,createdBy,certificates,batchAttributes`, ɵ2 = /**
|
|
1541
|
+
* @param {?} userId
|
|
1463
1542
|
* @return {?}
|
|
1464
1543
|
*/
|
|
1465
|
-
(
|
|
1466
|
-
|
|
1544
|
+
(userId) =>
|
|
1545
|
+
// tslint:disable-next-line: max-line-length
|
|
1546
|
+
`/apis/proxies/v8/learner/course/v2/user/enrollment/list/${userId}?orgdetails=orgName,email&licenseDetails=name,description,url&fields=contentType,primaryCategory,courseCategory,topic,name,channel,mimeType,appIcon,gradeLevel,resourceType,identifier,medium,pkgVersion,board,subject,trackable,posterImage,duration,creatorLogo,license,version,versionKey,avgRating,additionalTags,${NsCardContent.IGOTConst.COMPETENCIES}&batchDetails=name,endDate,startDate,status,enrollmentType,createdBy,certificates,batchAttributes&retiredCoursesEnabled=true`, ɵ3 = /**
|
|
1547
|
+
* @param {?} userId
|
|
1548
|
+
* @param {?} orgdetails
|
|
1549
|
+
* @param {?} licenseDetails
|
|
1550
|
+
* @param {?} fields
|
|
1551
|
+
* @param {?} batchDetails
|
|
1467
1552
|
* @return {?}
|
|
1468
1553
|
*/
|
|
1469
|
-
(
|
|
1554
|
+
(userId, orgdetails, licenseDetails, fields, batchDetails) =>
|
|
1555
|
+
// tslint:disable-next-line: max-line-length
|
|
1556
|
+
`apis/proxies/v8/learner/course/v2/user/enrollment/list/${userId}?orgdetails=${orgdetails}&licenseDetails=${licenseDetails}&fields=${fields},courseCategory,${NsCardContent.IGOTConst.COMPETENCIES}&batchDetails=${batchDetails}`;
|
|
1470
1557
|
/** @type {?} */
|
|
1471
1558
|
const API_END_POINTS = {
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
FETCH_WEB_MODULE_FILES: `${PROTECTED_SLAG_V8}/content/getWebModuleFiles`,
|
|
1479
|
-
MULTIPLE_CONTENT: `${PROTECTED_SLAG_V8}/content/multiple`,
|
|
1480
|
-
CONTENT_SEARCH_V5: `${PROTECTED_SLAG_V8}/content/searchV5`,
|
|
1481
|
-
CONTENT_SEARCH_V6: `/apis/proxies/v8/sunbirdigot/search`,
|
|
1482
|
-
TRENDING_CONTENT_SEARCH: `apis/proxies/v8/trending/content/search`,
|
|
1483
|
-
CONTENT_SEARCH_RELATED_CBP_V6: `/apis/proxies/v8/sunbirdigot/search`,
|
|
1484
|
-
CONTENT_SEARCH_REGION_RECOMMENDATION: `${PROTECTED_SLAG_V8}/content/searchRegionRecommendation`,
|
|
1485
|
-
CONTENT_HISTORY: `${PROTECTED_SLAG_V8}/user/history`,
|
|
1486
|
-
CONTENT_HISTORYV2: `/apis/proxies/v8/read/content-progres`,
|
|
1487
|
-
COURSE_BATCH_LIST: `/apis/proxies/v8/learner/course/v1/batch/list`,
|
|
1488
|
-
COURSE_BATCH: `/apis/proxies/v8/course/v1/batch/read`,
|
|
1489
|
-
AUTO_ASSIGN_BATCH: `/apis/protected/v8/cohorts/user/autoenrollment/`,
|
|
1490
|
-
AUTO_ASSIGN_CURATED_BATCH: `/apis/proxies/v8/curatedprogram/v1/enrol`,
|
|
1491
|
-
AUTO_ASSIGN_OPEN_PROGRAM: `/apis/proxies/v8/openprogram/v1/enrol`,
|
|
1492
|
-
USER_CONTINUE_LEARNING: `${PROTECTED_SLAG_V8}/user/history/continue`,
|
|
1493
|
-
CONTENT_RATING: `${PROTECTED_SLAG_V8}/user/rating`,
|
|
1494
|
-
COLLECTION_HIERARCHY: (ɵ0),
|
|
1495
|
-
REGISTRATION_STATUS: `${PROTECTED_SLAG_V8}/admin/userRegistration/checkUserRegistrationContent`,
|
|
1496
|
-
MARK_AS_COMPLETE_META: (ɵ1),
|
|
1497
|
-
ENROLL_BATCH: `/apis/proxies/v8/learner/course/v1/enrol`,
|
|
1498
|
-
ENROLL_BATCH_WF: `/apis/proxies/v8/workflow/blendedprogram/enrol`,
|
|
1499
|
-
WITHDRAW_BATCH_WF: `/apis/proxies/v8/workflow/blendedprogram/unenrol`,
|
|
1500
|
-
BLENDED_USER_WF: `/apis/proxies/v8/workflow/blendedprogram/user/search`,
|
|
1501
|
-
BLENDED_USER_COUNT: `apis/proxies/v8/workflow/blendedprogram/enrol/status/count`,
|
|
1502
|
-
CERT_ADD_TEMPLATE: `${PROTECTED_SLAG_V8}/cohorts/course/batch/cert/template/add`,
|
|
1503
|
-
CERT_ISSUE: `${PROTECTED_SLAG_V8}/cohorts/course/batch/cert/issue`,
|
|
1504
|
-
CERT_DOWNLOAD: (ɵ2),
|
|
1505
|
-
READ_KARMAPOINTS: `/apis/proxies/v8/karmapoints/read`,
|
|
1506
|
-
CONTENT_READ: (ɵ3),
|
|
1507
|
-
READ_COURSE_KARMAPOINTS: '/apis/proxies/v8/karmapoints/user/course/read',
|
|
1508
|
-
CLAIM_KARMAPOINTS: '/apis/proxies/v8/claimkarmapoints',
|
|
1509
|
-
USER_KARMA_POINTS: '/apis/proxies/v8/user/totalkarmapoints',
|
|
1510
|
-
AGGREGATION_SEARCH: '/apis/proxies/v8/content/aggregation/search',
|
|
1511
|
-
FEATURE_SEARCH: '/apis/proxies/v8/featured/content/search',
|
|
1559
|
+
FETCH_USER_GROUPS: (ɵ0),
|
|
1560
|
+
FETCH_CPB_PLANS: `/apis/proxies/v8/user/v1/cbplan`,
|
|
1561
|
+
FETCH_USER_ENROLLMENT_LIST: (ɵ1),
|
|
1562
|
+
FETCH_USER_ENROLLMENT_LIST_PROFILE: (ɵ2),
|
|
1563
|
+
// tslint:disable-next-line: max-line-length
|
|
1564
|
+
FETCH_USER_ENROLLMENT_LIST_V2: (ɵ3),
|
|
1512
1565
|
};
|
|
1513
|
-
class
|
|
1566
|
+
class WidgetUserServiceLib {
|
|
1514
1567
|
/**
|
|
1568
|
+
* @param {?} environment
|
|
1515
1569
|
* @param {?} http
|
|
1516
|
-
* @param {?} configSvc
|
|
1517
1570
|
*/
|
|
1518
|
-
constructor(
|
|
1571
|
+
constructor(environment, http) {
|
|
1519
1572
|
this.http = http;
|
|
1520
|
-
this.
|
|
1521
|
-
this.tocConfigData = new BehaviorSubject({});
|
|
1522
|
-
this.tocConfigData$ = this.tocConfigData.asObservable();
|
|
1523
|
-
this.telemetryData = new Subject();
|
|
1524
|
-
this.telemetryData$ = this.telemetryData.asObservable();
|
|
1525
|
-
this.programChildCourseResumeData = new BehaviorSubject({});
|
|
1526
|
-
this.programChildCourseResumeData$ = this.programChildCourseResumeData.asObservable();
|
|
1573
|
+
this.environment = environment;
|
|
1527
1574
|
}
|
|
1528
1575
|
/**
|
|
1529
|
-
* @param {?}
|
|
1576
|
+
* @param {?} error
|
|
1530
1577
|
* @return {?}
|
|
1531
1578
|
*/
|
|
1532
|
-
|
|
1533
|
-
|
|
1579
|
+
handleError(error) {
|
|
1580
|
+
/** @type {?} */
|
|
1581
|
+
let errorMessage = '';
|
|
1582
|
+
if (error.error instanceof ErrorEvent) {
|
|
1583
|
+
errorMessage = `Error: ${error.error.message}`;
|
|
1584
|
+
}
|
|
1585
|
+
return throwError(errorMessage);
|
|
1534
1586
|
}
|
|
1535
1587
|
/**
|
|
1536
|
-
* @param {?}
|
|
1588
|
+
* @param {?} userId
|
|
1537
1589
|
* @return {?}
|
|
1538
1590
|
*/
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
(primaryCategory === NsContent.EResourcePrimaryCategories.PRACTICE_RESOURCE) ||
|
|
1544
|
-
(primaryCategory === NsContent.EResourcePrimaryCategories.FINAL_ASSESSMENT) ||
|
|
1545
|
-
(primaryCategory === NsContent.EResourcePrimaryCategories.COMP_ASSESSMENT) ||
|
|
1546
|
-
(primaryCategory === NsContent.EResourcePrimaryCategories.OFFLINE_SESSION);
|
|
1547
|
-
return isResource;
|
|
1548
|
-
}
|
|
1549
|
-
return false;
|
|
1591
|
+
fetchUserGroupDetails(userId) {
|
|
1592
|
+
return this.http
|
|
1593
|
+
.get(API_END_POINTS.FETCH_USER_GROUPS(userId))
|
|
1594
|
+
.pipe(catchError(this.handleError));
|
|
1550
1595
|
}
|
|
1596
|
+
// tslint:disable-next-line: max-line-length
|
|
1551
1597
|
/**
|
|
1552
|
-
* @param {?}
|
|
1598
|
+
* @param {?} userId
|
|
1599
|
+
* @param {?=} queryParams
|
|
1553
1600
|
* @return {?}
|
|
1554
1601
|
*/
|
|
1555
|
-
|
|
1556
|
-
// tslint:disable-next-line
|
|
1602
|
+
fetchUserBatchList(userId, queryParams) {
|
|
1557
1603
|
/** @type {?} */
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1604
|
+
let path = '';
|
|
1605
|
+
if (queryParams) {
|
|
1606
|
+
// tslint:disable-next-line: max-line-length
|
|
1607
|
+
path = API_END_POINTS.FETCH_USER_ENROLLMENT_LIST_V2(userId, queryParams.orgdetails, queryParams.licenseDetails, queryParams.fields, queryParams.batchDetails);
|
|
1608
|
+
}
|
|
1609
|
+
else {
|
|
1610
|
+
path = API_END_POINTS.FETCH_USER_ENROLLMENT_LIST(userId);
|
|
1611
|
+
}
|
|
1612
|
+
/** @type {?} */
|
|
1613
|
+
const headers = new HttpHeaders({
|
|
1614
|
+
'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
|
|
1615
|
+
Pragma: 'no-cache',
|
|
1616
|
+
Expires: '0',
|
|
1617
|
+
});
|
|
1618
|
+
/** @type {?} */
|
|
1619
|
+
const result = this.http.get(path, { headers }).pipe(catchError(this.handleError), map((/**
|
|
1620
|
+
* @param {?} data
|
|
1621
|
+
* @return {?}
|
|
1622
|
+
*/
|
|
1623
|
+
(data) => {
|
|
1624
|
+
/** @type {?} */
|
|
1625
|
+
const coursesData = [];
|
|
1626
|
+
if (data && data.result && data.result.courses) {
|
|
1627
|
+
data.result.courses.forEach((/**
|
|
1628
|
+
* @param {?} content
|
|
1629
|
+
* @return {?}
|
|
1630
|
+
*/
|
|
1631
|
+
(content) => {
|
|
1632
|
+
if (content.contentStatus) {
|
|
1633
|
+
delete content.contentStatus;
|
|
1634
|
+
}
|
|
1635
|
+
coursesData.push(content);
|
|
1636
|
+
}));
|
|
1637
|
+
this.storeUserEnrollmentInfo(data.result.userCourseEnrolmentInfo, data.result.courses.length);
|
|
1638
|
+
data.result.courses = coursesData;
|
|
1639
|
+
}
|
|
1640
|
+
return data.result;
|
|
1641
|
+
})));
|
|
1642
|
+
return result;
|
|
1564
1643
|
}
|
|
1644
|
+
// tslint:disable-next-line: max-line-length
|
|
1565
1645
|
/**
|
|
1566
|
-
* @param {?}
|
|
1646
|
+
* @param {?} userId
|
|
1647
|
+
* @param {?=} queryParams
|
|
1567
1648
|
* @return {?}
|
|
1568
1649
|
*/
|
|
1569
|
-
|
|
1570
|
-
|
|
1650
|
+
fetchProfileUserBatchList(userId, queryParams) {
|
|
1651
|
+
/** @type {?} */
|
|
1652
|
+
let path = '';
|
|
1653
|
+
if (queryParams) {
|
|
1654
|
+
// tslint:disable-next-line: max-line-length
|
|
1655
|
+
path = API_END_POINTS.FETCH_USER_ENROLLMENT_LIST_V2(userId, queryParams.orgdetails, queryParams.licenseDetails, queryParams.fields, queryParams.batchDetails);
|
|
1656
|
+
}
|
|
1657
|
+
else {
|
|
1658
|
+
path = API_END_POINTS.FETCH_USER_ENROLLMENT_LIST_PROFILE(userId);
|
|
1659
|
+
}
|
|
1660
|
+
/** @type {?} */
|
|
1661
|
+
const headers = new HttpHeaders({
|
|
1662
|
+
'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
|
|
1663
|
+
Pragma: 'no-cache',
|
|
1664
|
+
Expires: '0',
|
|
1665
|
+
});
|
|
1666
|
+
return this.http
|
|
1667
|
+
.get(path, { headers })
|
|
1668
|
+
.pipe(catchError(this.handleError), map((/**
|
|
1669
|
+
* @param {?} data
|
|
1670
|
+
* @return {?}
|
|
1671
|
+
*/
|
|
1672
|
+
(data) => data.result)));
|
|
1571
1673
|
}
|
|
1572
1674
|
/**
|
|
1573
|
-
* @param {?}
|
|
1574
|
-
* @param {
|
|
1575
|
-
* @param {?=} _additionalFields
|
|
1576
|
-
* @param {?=} primaryCategory
|
|
1675
|
+
* @param {?} key
|
|
1676
|
+
* @param {?} dataKey
|
|
1577
1677
|
* @return {?}
|
|
1578
1678
|
*/
|
|
1579
|
-
|
|
1580
|
-
// const url = `${API_END_POINTS.CONTENT}/${contentId}?hierarchyType=${hierarchyType}`
|
|
1581
|
-
/** @type {?} */
|
|
1582
|
-
let url = '';
|
|
1679
|
+
checkStorageData(key, dataKey) {
|
|
1583
1680
|
/** @type {?} */
|
|
1584
|
-
const
|
|
1585
|
-
if (
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
else {
|
|
1590
|
-
url = `/api/content/v1/read/${contentId}`;
|
|
1591
|
-
}
|
|
1592
|
-
}
|
|
1593
|
-
else {
|
|
1594
|
-
if (!forPreview) {
|
|
1595
|
-
url = `/apis/proxies/v8/action/content/v3/hierarchy/${contentId}?hierarchyType=${hierarchyType}`;
|
|
1596
|
-
}
|
|
1597
|
-
else {
|
|
1681
|
+
const checkTime = localStorage.getItem('timeCheck');
|
|
1682
|
+
if (checkTime) {
|
|
1683
|
+
/** @type {?} */
|
|
1684
|
+
const parsedData = JSON.parse(checkTime);
|
|
1685
|
+
if (parsedData[key]) {
|
|
1598
1686
|
/** @type {?} */
|
|
1599
|
-
const
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
}
|
|
1603
|
-
|
|
1604
|
-
|
|
1687
|
+
const date = dayjs();
|
|
1688
|
+
/** @type {?} */
|
|
1689
|
+
const diffMin = date.diff(parsedData[key], 'minute');
|
|
1690
|
+
/** @type {?} */
|
|
1691
|
+
const timeCheck = this.environment.apiCache || 0;
|
|
1692
|
+
if (diffMin >= timeCheck) {
|
|
1693
|
+
return true;
|
|
1605
1694
|
}
|
|
1695
|
+
return localStorage.getItem(dataKey) ? false : true;
|
|
1606
1696
|
}
|
|
1697
|
+
return true;
|
|
1607
1698
|
}
|
|
1608
|
-
|
|
1609
|
-
// .post<NsContent.IContent>(url, { additionalFields })
|
|
1610
|
-
// .pipe(retry(1))
|
|
1611
|
-
return this.http
|
|
1612
|
-
.get(url)
|
|
1613
|
-
.pipe(shareReplay(1));
|
|
1614
|
-
// if (apiData && apiData.result) {
|
|
1615
|
-
// return apiData.result.content
|
|
1616
|
-
// }
|
|
1699
|
+
return true;
|
|
1617
1700
|
}
|
|
1618
1701
|
/**
|
|
1619
|
-
* @param {?}
|
|
1702
|
+
* @param {?} key
|
|
1620
1703
|
* @return {?}
|
|
1621
1704
|
*/
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
const forcreator = window.location.href.includes('editMode=true');
|
|
1625
|
-
/** @type {?} */
|
|
1626
|
-
let url = '';
|
|
1627
|
-
if (forcreator) {
|
|
1628
|
-
url = `apis/proxies/v8/action/content/v3/hierarchy/${contentId}?mode=edit`;
|
|
1629
|
-
}
|
|
1630
|
-
else {
|
|
1631
|
-
url = `${API_END_POINTS.AUTHORING_CONTENT}/${contentId}?hierarchyType=detail`;
|
|
1632
|
-
}
|
|
1633
|
-
return this.http.get(url).pipe(shareReplay(1), (/**
|
|
1634
|
-
* @param {?} r
|
|
1635
|
-
* @return {?}
|
|
1636
|
-
*/
|
|
1637
|
-
r => r));
|
|
1705
|
+
getData(key) {
|
|
1706
|
+
return Observable.of(JSON.parse(localStorage.getItem(key) || '{}'));
|
|
1638
1707
|
}
|
|
1639
1708
|
/**
|
|
1640
|
-
* @param {?}
|
|
1709
|
+
* @param {?} key
|
|
1641
1710
|
* @return {?}
|
|
1642
1711
|
*/
|
|
1643
|
-
|
|
1644
|
-
return
|
|
1712
|
+
getSavedData(key) {
|
|
1713
|
+
return JSON.parse(localStorage.getItem(key) || '');
|
|
1645
1714
|
}
|
|
1646
1715
|
/**
|
|
1647
|
-
* @param {?}
|
|
1648
|
-
* @param {?} id
|
|
1649
|
-
* @param {?=} pageNumber
|
|
1650
|
-
* @param {?=} pageSize
|
|
1716
|
+
* @param {?} key
|
|
1651
1717
|
* @return {?}
|
|
1652
1718
|
*/
|
|
1653
|
-
|
|
1654
|
-
|
|
1719
|
+
setTime(key) {
|
|
1720
|
+
/** @type {?} */
|
|
1721
|
+
const checkTime = localStorage.getItem('timeCheck');
|
|
1722
|
+
if (checkTime) {
|
|
1723
|
+
/** @type {?} */
|
|
1724
|
+
const parsedData = JSON.parse(checkTime);
|
|
1725
|
+
parsedData[key] = new Date().getTime();
|
|
1726
|
+
localStorage.setItem('timeCheck', JSON.stringify(parsedData));
|
|
1727
|
+
}
|
|
1728
|
+
else {
|
|
1729
|
+
/** @type {?} */
|
|
1730
|
+
const data = {};
|
|
1731
|
+
data[key] = new Date().getTime();
|
|
1732
|
+
localStorage.setItem('timeCheck', JSON.stringify(data));
|
|
1733
|
+
}
|
|
1655
1734
|
}
|
|
1656
1735
|
/**
|
|
1736
|
+
* @param {?} key
|
|
1657
1737
|
* @return {?}
|
|
1658
1738
|
*/
|
|
1659
|
-
|
|
1739
|
+
resetTime(key) {
|
|
1740
|
+
/** @type {?} */
|
|
1741
|
+
const checkTime = localStorage.getItem('timeCheck');
|
|
1742
|
+
if (checkTime) {
|
|
1743
|
+
/** @type {?} */
|
|
1744
|
+
const parsedData = JSON.parse(checkTime);
|
|
1745
|
+
if (parsedData[key]) {
|
|
1746
|
+
delete parsedData[key];
|
|
1747
|
+
localStorage.setItem('timeCheck', JSON.stringify(parsedData));
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1660
1750
|
}
|
|
1661
1751
|
/**
|
|
1662
|
-
* @param {?}
|
|
1752
|
+
* @param {?} userId
|
|
1663
1753
|
* @return {?}
|
|
1664
1754
|
*/
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
.pipe(
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1755
|
+
fetchCbpPlanList(userId) {
|
|
1756
|
+
if (this.checkStorageData('cbpService', 'cbpData')) {
|
|
1757
|
+
/** @type {?} */
|
|
1758
|
+
const result = this.http.get(API_END_POINTS.FETCH_CPB_PLANS).pipe(catchError(this.handleError), map((/**
|
|
1759
|
+
* @param {?} data
|
|
1760
|
+
* @return {?}
|
|
1761
|
+
*/
|
|
1762
|
+
(data) => __awaiter(this, void 0, void 0, function* () {
|
|
1763
|
+
if (data.result && data.result.content && data.result.content.length) {
|
|
1764
|
+
/** @type {?} */
|
|
1765
|
+
let cbpData = this.getCbpFormatedData(data.result.content);
|
|
1766
|
+
/** @type {?} */
|
|
1767
|
+
let cbpDoIds = cbpData.contentIds.join(',');
|
|
1768
|
+
/** @type {?} */
|
|
1769
|
+
let cbpContentData = cbpData.cbpContentData || [];
|
|
1770
|
+
/** @type {?} */
|
|
1771
|
+
const responseData = yield this.fetchEnrollmentDataByContentId(userId, cbpDoIds).toPromise().then((/**
|
|
1772
|
+
* @param {?} res
|
|
1773
|
+
* @return {?}
|
|
1774
|
+
*/
|
|
1775
|
+
(res) => __awaiter(this, void 0, void 0, function* () {
|
|
1776
|
+
/** @type {?} */
|
|
1777
|
+
const enrollData = {};
|
|
1778
|
+
if (res && res.courses && res.courses.length) {
|
|
1779
|
+
res.courses.forEach((/**
|
|
1780
|
+
* @param {?} data
|
|
1781
|
+
* @return {?}
|
|
1782
|
+
*/
|
|
1783
|
+
(data) => {
|
|
1784
|
+
enrollData[data.collectionId] = data;
|
|
1785
|
+
}));
|
|
1786
|
+
return enrollData;
|
|
1787
|
+
}
|
|
1788
|
+
else {
|
|
1789
|
+
return {};
|
|
1790
|
+
}
|
|
1791
|
+
}))).catch((/**
|
|
1792
|
+
* @param {?} _err
|
|
1793
|
+
* @return {?}
|
|
1794
|
+
*/
|
|
1795
|
+
(_err) => {
|
|
1796
|
+
return {};
|
|
1797
|
+
}));
|
|
1798
|
+
return yield this.mapCbpData(cbpContentData, responseData);
|
|
1799
|
+
}
|
|
1800
|
+
}))));
|
|
1801
|
+
this.setTime('cbpService');
|
|
1802
|
+
return result;
|
|
1803
|
+
}
|
|
1804
|
+
return this.getData('cbpData');
|
|
1673
1805
|
}
|
|
1674
|
-
// fetch individual batch
|
|
1675
1806
|
/**
|
|
1676
|
-
* @param {?}
|
|
1807
|
+
* @param {?} enrollmentData
|
|
1808
|
+
* @param {?} enrolledCourseCount
|
|
1677
1809
|
* @return {?}
|
|
1678
1810
|
*/
|
|
1679
|
-
|
|
1680
|
-
|
|
1811
|
+
storeUserEnrollmentInfo(enrollmentData, enrolledCourseCount) {
|
|
1812
|
+
/** @type {?} */
|
|
1813
|
+
const userData = {
|
|
1814
|
+
enrolledCourseCount,
|
|
1815
|
+
userCourseEnrolmentInfo: enrollmentData,
|
|
1816
|
+
};
|
|
1817
|
+
localStorage.removeItem('userEnrollmentCount');
|
|
1818
|
+
localStorage.setItem('userEnrollmentCount', JSON.stringify(userData));
|
|
1681
1819
|
}
|
|
1682
1820
|
/**
|
|
1683
|
-
* @param {?}
|
|
1821
|
+
* @param {?} userId
|
|
1822
|
+
* @param {?} contentdata
|
|
1684
1823
|
* @return {?}
|
|
1685
1824
|
*/
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1825
|
+
fetchEnrollmentDataByContentId(userId, contentdata) {
|
|
1826
|
+
/** @type {?} */
|
|
1827
|
+
let path = API_END_POINTS.FETCH_USER_ENROLLMENT_LIST(userId);
|
|
1828
|
+
path = `${path}&courseIds=${contentdata}&cache=false'`;
|
|
1829
|
+
/** @type {?} */
|
|
1830
|
+
const headers = new HttpHeaders({
|
|
1831
|
+
'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
|
|
1832
|
+
Pragma: 'no-cache',
|
|
1833
|
+
Expires: '0',
|
|
1834
|
+
});
|
|
1835
|
+
return this.http
|
|
1836
|
+
.get(path, { headers })
|
|
1837
|
+
.pipe(catchError(this.handleError), map((/**
|
|
1689
1838
|
* @param {?} data
|
|
1690
1839
|
* @return {?}
|
|
1691
1840
|
*/
|
|
1692
|
-
(data) => data.result
|
|
1841
|
+
(data) => data.result)));
|
|
1693
1842
|
}
|
|
1694
1843
|
/**
|
|
1695
|
-
* @param {?}
|
|
1696
|
-
* @param {?} programType
|
|
1844
|
+
* @param {?} cbpContent
|
|
1697
1845
|
* @return {?}
|
|
1698
1846
|
*/
|
|
1699
|
-
|
|
1847
|
+
getCbpFormatedData(cbpContent) {
|
|
1700
1848
|
/** @type {?} */
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1849
|
+
let cbpContentData = [];
|
|
1850
|
+
/** @type {?} */
|
|
1851
|
+
let contentIds = [];
|
|
1852
|
+
/** @type {?} */
|
|
1853
|
+
const todayDate = dayjs().format('YYYY-MM-DD');
|
|
1854
|
+
cbpContent.forEach((/**
|
|
1855
|
+
* @param {?} c
|
|
1706
1856
|
* @return {?}
|
|
1707
1857
|
*/
|
|
1708
|
-
(
|
|
1858
|
+
(c) => {
|
|
1859
|
+
c.contentList.forEach((/**
|
|
1860
|
+
* @param {?} childData
|
|
1861
|
+
* @return {?}
|
|
1862
|
+
*/
|
|
1863
|
+
(childData) => {
|
|
1864
|
+
/** @type {?} */
|
|
1865
|
+
const endDate = dayjs(c.endDate).format('YYYY-MM-DD');
|
|
1866
|
+
/** @type {?} */
|
|
1867
|
+
const daysCount = dayjs(endDate).diff(todayDate, 'day');
|
|
1868
|
+
childData['planDuration'] = daysCount < 0 ? NsCardContent.ACBPConst.OVERDUE : daysCount > 29
|
|
1869
|
+
? NsCardContent.ACBPConst.SUCCESS : NsCardContent.ACBPConst.UPCOMING;
|
|
1870
|
+
childData['endDate'] = c.endDate;
|
|
1871
|
+
childData['parentId'] = c.id;
|
|
1872
|
+
childData['planType'] = 'cbPlan';
|
|
1873
|
+
childData['contentStatus'] = 0;
|
|
1874
|
+
contentIds.push(childData.identifier);
|
|
1875
|
+
if (childData.status !== NsCardContent.IGOTConst.RETIRED) {
|
|
1876
|
+
cbpContentData.push(childData);
|
|
1877
|
+
}
|
|
1878
|
+
}));
|
|
1879
|
+
}));
|
|
1880
|
+
return { cbpContentData, contentIds };
|
|
1709
1881
|
}
|
|
1710
1882
|
/**
|
|
1711
|
-
* @param {?}
|
|
1883
|
+
* @param {?} cbpContent
|
|
1884
|
+
* @param {?} enrollmentData
|
|
1712
1885
|
* @return {?}
|
|
1713
1886
|
*/
|
|
1714
|
-
|
|
1715
|
-
return this
|
|
1716
|
-
|
|
1717
|
-
|
|
1887
|
+
mapCbpData(cbpContent, enrollmentData) {
|
|
1888
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1889
|
+
/** @type {?} */
|
|
1890
|
+
let cbpFilteredContent = [];
|
|
1891
|
+
if (cbpContent && cbpContent.length) {
|
|
1892
|
+
if (Object.keys(enrollmentData).length) {
|
|
1893
|
+
cbpContent.forEach((/**
|
|
1894
|
+
* @param {?} cbp
|
|
1895
|
+
* @return {?}
|
|
1896
|
+
*/
|
|
1897
|
+
(cbp) => {
|
|
1898
|
+
/** @type {?} */
|
|
1899
|
+
const childEnrollData = enrollmentData[cbp.identifier];
|
|
1900
|
+
/** @type {?} */
|
|
1901
|
+
const competencyArea = [];
|
|
1902
|
+
/** @type {?} */
|
|
1903
|
+
const competencyTheme = [];
|
|
1904
|
+
/** @type {?} */
|
|
1905
|
+
const competencyThemeType = [];
|
|
1906
|
+
/** @type {?} */
|
|
1907
|
+
const competencySubTheme = [];
|
|
1908
|
+
/** @type {?} */
|
|
1909
|
+
const competencyAreaId = [];
|
|
1910
|
+
/** @type {?} */
|
|
1911
|
+
const competencyThemeId = [];
|
|
1912
|
+
/** @type {?} */
|
|
1913
|
+
const competencySubThemeId = [];
|
|
1914
|
+
cbp['contentStatus'] = 0;
|
|
1915
|
+
if (childEnrollData) {
|
|
1916
|
+
cbp['contentStatus'] = childEnrollData.status;
|
|
1917
|
+
}
|
|
1918
|
+
if (cbp.competencies_v5) {
|
|
1919
|
+
cbp.competencies_v5.forEach((/**
|
|
1920
|
+
* @param {?} element
|
|
1921
|
+
* @return {?}
|
|
1922
|
+
*/
|
|
1923
|
+
(element) => {
|
|
1924
|
+
if (!competencyArea.includes(element.competencyArea)) {
|
|
1925
|
+
competencyArea.push(element.competencyArea);
|
|
1926
|
+
competencyAreaId.push(element.competencyAreaId);
|
|
1927
|
+
}
|
|
1928
|
+
if (!competencyTheme.includes(element.competencyTheme)) {
|
|
1929
|
+
competencyTheme.push(element.competencyTheme);
|
|
1930
|
+
competencyThemeId.push(element.competencyThemeId);
|
|
1931
|
+
}
|
|
1932
|
+
if (!competencyThemeType.includes(element.competencyThemeType)) {
|
|
1933
|
+
competencyThemeType.push(element.competencyThemeType);
|
|
1934
|
+
}
|
|
1935
|
+
if (!competencySubTheme.includes(element.competencySubTheme)) {
|
|
1936
|
+
competencySubTheme.push(element.competencySubTheme);
|
|
1937
|
+
competencySubThemeId.push(element.competencySubThemeId);
|
|
1938
|
+
}
|
|
1939
|
+
}));
|
|
1940
|
+
}
|
|
1941
|
+
cbp['competencyArea'] = competencyArea;
|
|
1942
|
+
cbp['competencyTheme'] = competencyTheme;
|
|
1943
|
+
cbp['competencyThemeType'] = competencyThemeType;
|
|
1944
|
+
cbp['competencySubTheme'] = competencySubTheme;
|
|
1945
|
+
cbp['competencyAreaId'] = competencyAreaId;
|
|
1946
|
+
cbp['competencyThemeId'] = competencyThemeId;
|
|
1947
|
+
cbp['competencySubThemeId'] = competencySubThemeId;
|
|
1948
|
+
if (cbp.status !== NsCardContent.IGOTConst.RETIRED) {
|
|
1949
|
+
cbpFilteredContent.push(cbp);
|
|
1950
|
+
}
|
|
1951
|
+
else {
|
|
1952
|
+
if (childEnrollData && childEnrollData.status === 2) {
|
|
1953
|
+
cbpFilteredContent.push(cbp);
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
}));
|
|
1957
|
+
if (cbpFilteredContent.length > 1) {
|
|
1958
|
+
/** @type {?} */
|
|
1959
|
+
const sortedData = cbpFilteredContent.sort((/**
|
|
1960
|
+
* @param {?} a
|
|
1961
|
+
* @param {?} b
|
|
1962
|
+
* @return {?}
|
|
1963
|
+
*/
|
|
1964
|
+
(a, b) => {
|
|
1965
|
+
/** @type {?} */
|
|
1966
|
+
const firstDate = new Date(a.endDate);
|
|
1967
|
+
/** @type {?} */
|
|
1968
|
+
const secondDate = new Date(b.endDate);
|
|
1969
|
+
return secondDate > firstDate ? 1 : -1;
|
|
1970
|
+
}));
|
|
1971
|
+
/** @type {?} */
|
|
1972
|
+
const uniqueUsersByID = uniqBy(sortedData, 'identifier');
|
|
1973
|
+
/** @type {?} */
|
|
1974
|
+
const sortedByEndDate = orderBy(uniqueUsersByID, ['endDate'], ['asc']);
|
|
1975
|
+
/** @type {?} */
|
|
1976
|
+
const sortedByStatus = orderBy(sortedByEndDate, ['contentStatus'], ['asc']);
|
|
1977
|
+
localStorage.setItem('cbpData', JSON.stringify(sortedByStatus));
|
|
1978
|
+
return sortedByStatus;
|
|
1979
|
+
}
|
|
1980
|
+
localStorage.setItem('cbpData', JSON.stringify(cbpFilteredContent));
|
|
1981
|
+
return cbpFilteredContent;
|
|
1982
|
+
}
|
|
1983
|
+
localStorage.setItem('cbpData', JSON.stringify(cbpContent));
|
|
1984
|
+
return cbpContent;
|
|
1985
|
+
}
|
|
1986
|
+
localStorage.setItem('cbpData', JSON.stringify([]));
|
|
1987
|
+
return [];
|
|
1988
|
+
});
|
|
1718
1989
|
}
|
|
1719
1990
|
/**
|
|
1720
|
-
* @param {?}
|
|
1721
|
-
* @param {?} type
|
|
1991
|
+
* @param {?} courseData
|
|
1722
1992
|
* @return {?}
|
|
1723
1993
|
*/
|
|
1724
|
-
|
|
1994
|
+
mapEnrollmentData(courseData) {
|
|
1725
1995
|
/** @type {?} */
|
|
1726
|
-
const
|
|
1727
|
-
|
|
1728
|
-
.
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
return
|
|
1737
|
-
.post(API_END_POINTS.BLENDED_USER_WF, req)
|
|
1738
|
-
.toPromise();
|
|
1996
|
+
const enrollData = {};
|
|
1997
|
+
if (courseData && courseData.courses.length) {
|
|
1998
|
+
courseData.courses.forEach((/**
|
|
1999
|
+
* @param {?} data
|
|
2000
|
+
* @return {?}
|
|
2001
|
+
*/
|
|
2002
|
+
(data) => {
|
|
2003
|
+
enrollData[data.collectionId] = data;
|
|
2004
|
+
}));
|
|
2005
|
+
}
|
|
2006
|
+
return enrollData;
|
|
1739
2007
|
}
|
|
2008
|
+
}
|
|
2009
|
+
WidgetUserServiceLib.decorators = [
|
|
2010
|
+
{ type: Injectable, args: [{
|
|
2011
|
+
providedIn: 'root',
|
|
2012
|
+
},] }
|
|
2013
|
+
];
|
|
2014
|
+
/** @nocollapse */
|
|
2015
|
+
WidgetUserServiceLib.ctorParameters = () => [
|
|
2016
|
+
{ type: undefined, decorators: [{ type: Inject, args: ['environment',] }] },
|
|
2017
|
+
{ type: HttpClient }
|
|
2018
|
+
];
|
|
2019
|
+
/** @nocollapse */ WidgetUserServiceLib.ngInjectableDef = ɵɵdefineInjectable({ factory: function WidgetUserServiceLib_Factory() { return new WidgetUserServiceLib(ɵɵinject("environment"), ɵɵinject(HttpClient)); }, token: WidgetUserServiceLib, providedIn: "root" });
|
|
2020
|
+
if (false) {
|
|
2021
|
+
/** @type {?} */
|
|
2022
|
+
WidgetUserServiceLib.prototype.environment;
|
|
1740
2023
|
/**
|
|
1741
|
-
* @
|
|
1742
|
-
* @
|
|
2024
|
+
* @type {?}
|
|
2025
|
+
* @private
|
|
1743
2026
|
*/
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
2027
|
+
WidgetUserServiceLib.prototype.http;
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
/**
|
|
2031
|
+
* @fileoverview added by tsickle
|
|
2032
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2033
|
+
*/
|
|
2034
|
+
/** @type {?} */
|
|
2035
|
+
const moment = moment$4;
|
|
2036
|
+
// tslint:enable
|
|
2037
|
+
// TODO: move this in some common place
|
|
2038
|
+
/** @type {?} */
|
|
2039
|
+
const PROTECTED_SLAG_V8$1 = '/apis/protected/v8';
|
|
2040
|
+
const ɵ0$1 = /**
|
|
2041
|
+
* @param {?} type
|
|
2042
|
+
* @param {?} id
|
|
2043
|
+
* @return {?}
|
|
2044
|
+
*/
|
|
2045
|
+
(type, id) => `${PROTECTED_SLAG_V8$1}/content/collection/${type}/${id}`, ɵ1$1 = /**
|
|
2046
|
+
* @param {?} contentId
|
|
2047
|
+
* @return {?}
|
|
2048
|
+
*/
|
|
2049
|
+
(contentId) => `${PROTECTED_SLAG_V8$1}/user/progress/${contentId}`, ɵ2$1 = /**
|
|
2050
|
+
* @param {?} certId
|
|
2051
|
+
* @return {?}
|
|
2052
|
+
*/
|
|
2053
|
+
(certId) => `${PROTECTED_SLAG_V8$1}/cohorts/course/batch/cert/download/${certId}`, ɵ3$1 = /**
|
|
2054
|
+
* @param {?} contentId
|
|
2055
|
+
* @return {?}
|
|
2056
|
+
*/
|
|
2057
|
+
(contentId) => `/apis/proxies/v8/action/content/v3/read/${contentId}`;
|
|
2058
|
+
/** @type {?} */
|
|
2059
|
+
const API_END_POINTS$1 = {
|
|
2060
|
+
CONTENT: `${PROTECTED_SLAG_V8$1}/content`,
|
|
2061
|
+
AUTHORING_CONTENT: `/api/course/v1/hierarchy`,
|
|
2062
|
+
CONTENT_LIKES: `${PROTECTED_SLAG_V8$1}/content/likeCount`,
|
|
2063
|
+
SET_S3_COOKIE: `${PROTECTED_SLAG_V8$1}/content/setCookie`,
|
|
2064
|
+
SET_S3_IMAGE_COOKIE: `${PROTECTED_SLAG_V8$1}/content/setImageCookie`,
|
|
2065
|
+
FETCH_MANIFEST: `${PROTECTED_SLAG_V8$1}/content/getWebModuleManifest`,
|
|
2066
|
+
FETCH_WEB_MODULE_FILES: `${PROTECTED_SLAG_V8$1}/content/getWebModuleFiles`,
|
|
2067
|
+
MULTIPLE_CONTENT: `${PROTECTED_SLAG_V8$1}/content/multiple`,
|
|
2068
|
+
CONTENT_SEARCH_V5: `${PROTECTED_SLAG_V8$1}/content/searchV5`,
|
|
2069
|
+
CONTENT_SEARCH_V6: `/apis/proxies/v8/sunbirdigot/search`,
|
|
2070
|
+
TRENDING_CONTENT_SEARCH: `apis/proxies/v8/trending/content/search`,
|
|
2071
|
+
CONTENT_SEARCH_RELATED_CBP_V6: `/apis/proxies/v8/sunbirdigot/search`,
|
|
2072
|
+
CONTENT_SEARCH_REGION_RECOMMENDATION: `${PROTECTED_SLAG_V8$1}/content/searchRegionRecommendation`,
|
|
2073
|
+
CONTENT_HISTORY: `${PROTECTED_SLAG_V8$1}/user/history`,
|
|
2074
|
+
CONTENT_HISTORYV2: `/apis/proxies/v8/read/content-progres`,
|
|
2075
|
+
COURSE_BATCH_LIST: `/apis/proxies/v8/learner/course/v1/batch/list`,
|
|
2076
|
+
COURSE_BATCH: `/apis/proxies/v8/course/v1/batch/read`,
|
|
2077
|
+
AUTO_ASSIGN_BATCH: `/apis/protected/v8/cohorts/user/autoenrollment/`,
|
|
2078
|
+
AUTO_ASSIGN_CURATED_BATCH: `/apis/proxies/v8/curatedprogram/v1/enrol`,
|
|
2079
|
+
AUTO_ASSIGN_OPEN_PROGRAM: `/apis/proxies/v8/openprogram/v1/enrol`,
|
|
2080
|
+
USER_CONTINUE_LEARNING: `${PROTECTED_SLAG_V8$1}/user/history/continue`,
|
|
2081
|
+
CONTENT_RATING: `${PROTECTED_SLAG_V8$1}/user/rating`,
|
|
2082
|
+
COLLECTION_HIERARCHY: (ɵ0$1),
|
|
2083
|
+
REGISTRATION_STATUS: `${PROTECTED_SLAG_V8$1}/admin/userRegistration/checkUserRegistrationContent`,
|
|
2084
|
+
MARK_AS_COMPLETE_META: (ɵ1$1),
|
|
2085
|
+
ENROLL_BATCH: `/apis/proxies/v8/learner/course/v1/enrol`,
|
|
2086
|
+
ENROLL_BATCH_WF: `/apis/proxies/v8/workflow/blendedprogram/enrol`,
|
|
2087
|
+
WITHDRAW_BATCH_WF: `/apis/proxies/v8/workflow/blendedprogram/unenrol`,
|
|
2088
|
+
BLENDED_USER_WF: `/apis/proxies/v8/workflow/blendedprogram/user/search`,
|
|
2089
|
+
BLENDED_USER_COUNT: `apis/proxies/v8/workflow/blendedprogram/enrol/status/count`,
|
|
2090
|
+
CERT_ADD_TEMPLATE: `${PROTECTED_SLAG_V8$1}/cohorts/course/batch/cert/template/add`,
|
|
2091
|
+
CERT_ISSUE: `${PROTECTED_SLAG_V8$1}/cohorts/course/batch/cert/issue`,
|
|
2092
|
+
CERT_DOWNLOAD: (ɵ2$1),
|
|
2093
|
+
READ_KARMAPOINTS: `/apis/proxies/v8/karmapoints/read`,
|
|
2094
|
+
CONTENT_READ: (ɵ3$1),
|
|
2095
|
+
READ_COURSE_KARMAPOINTS: '/apis/proxies/v8/karmapoints/user/course/read',
|
|
2096
|
+
CLAIM_KARMAPOINTS: '/apis/proxies/v8/claimkarmapoints',
|
|
2097
|
+
USER_KARMA_POINTS: '/apis/proxies/v8/user/totalkarmapoints',
|
|
2098
|
+
AGGREGATION_SEARCH: '/apis/proxies/v8/content/aggregation/search',
|
|
2099
|
+
FEATURE_SEARCH: '/apis/proxies/v8/featured/content/search',
|
|
2100
|
+
};
|
|
2101
|
+
class WidgetContentLibService {
|
|
2102
|
+
/**
|
|
2103
|
+
* @param {?} http
|
|
2104
|
+
* @param {?} configSvc
|
|
2105
|
+
* @param {?} userSvc
|
|
2106
|
+
*/
|
|
2107
|
+
constructor(http, configSvc, userSvc) {
|
|
2108
|
+
this.http = http;
|
|
2109
|
+
this.configSvc = configSvc;
|
|
2110
|
+
this.userSvc = userSvc;
|
|
2111
|
+
this.tocConfigData = new BehaviorSubject({});
|
|
2112
|
+
this.tocConfigData$ = this.tocConfigData.asObservable();
|
|
2113
|
+
this.telemetryData = new Subject();
|
|
2114
|
+
this.telemetryData$ = this.telemetryData.asObservable();
|
|
2115
|
+
this.programChildCourseResumeData = new BehaviorSubject({});
|
|
2116
|
+
this.programChildCourseResumeData$ = this.programChildCourseResumeData.asObservable();
|
|
1748
2117
|
}
|
|
1749
2118
|
/**
|
|
1750
|
-
* @param {?}
|
|
2119
|
+
* @param {?} message
|
|
1751
2120
|
* @return {?}
|
|
1752
2121
|
*/
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
.post(API_END_POINTS.CONTENT_LIKES, contentIds)
|
|
1756
|
-
.toPromise();
|
|
2122
|
+
changeTelemetryData(message) {
|
|
2123
|
+
this.telemetryData.next(message);
|
|
1757
2124
|
}
|
|
1758
2125
|
/**
|
|
1759
|
-
* @param {?}
|
|
2126
|
+
* @param {?} primaryCategory
|
|
1760
2127
|
* @return {?}
|
|
1761
2128
|
*/
|
|
1762
|
-
|
|
1763
|
-
if (
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
2129
|
+
isResource(primaryCategory) {
|
|
2130
|
+
if (primaryCategory) {
|
|
2131
|
+
/** @type {?} */
|
|
2132
|
+
const isResource = (primaryCategory === NsContent.EResourcePrimaryCategories.LEARNING_RESOURCE) ||
|
|
2133
|
+
(primaryCategory === NsContent.EResourcePrimaryCategories.PRACTICE_RESOURCE) ||
|
|
2134
|
+
(primaryCategory === NsContent.EResourcePrimaryCategories.FINAL_ASSESSMENT) ||
|
|
2135
|
+
(primaryCategory === NsContent.EResourcePrimaryCategories.COMP_ASSESSMENT) ||
|
|
2136
|
+
(primaryCategory === NsContent.EResourcePrimaryCategories.OFFLINE_SESSION);
|
|
2137
|
+
return isResource;
|
|
2138
|
+
}
|
|
2139
|
+
return false;
|
|
1768
2140
|
}
|
|
1769
2141
|
/**
|
|
1770
|
-
* @param {?}
|
|
2142
|
+
* @param {?} identifier
|
|
1771
2143
|
* @return {?}
|
|
1772
2144
|
*/
|
|
1773
|
-
|
|
1774
|
-
|
|
2145
|
+
fetchMarkAsCompleteMeta(identifier) {
|
|
2146
|
+
// tslint:disable-next-line
|
|
2147
|
+
/** @type {?} */
|
|
2148
|
+
const url = API_END_POINTS$1.MARK_AS_COMPLETE_META(identifier)
|
|
2149
|
+
// return this.http.get(url).toPromise()
|
|
2150
|
+
;
|
|
2151
|
+
// return this.http.get(url).toPromise()
|
|
2152
|
+
if (url) { }
|
|
2153
|
+
return of().toPromise();
|
|
1775
2154
|
}
|
|
1776
2155
|
/**
|
|
1777
|
-
* @param {?}
|
|
2156
|
+
* @param {?} data
|
|
1778
2157
|
* @return {?}
|
|
1779
2158
|
*/
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
/** @type {?} */
|
|
1783
|
-
const data = this.http.post(`${API_END_POINTS.CONTENT_HISTORYV2}/${req.request.courseId}`, req);
|
|
1784
|
-
data.subscribe((/**
|
|
1785
|
-
* @param {?} subscribeData
|
|
1786
|
-
* @return {?}
|
|
1787
|
-
*/
|
|
1788
|
-
(subscribeData) => {
|
|
1789
|
-
this.programChildCourseResumeData.next({ resumeData: subscribeData.result.contentList, courseId: req.request.courseId });
|
|
1790
|
-
}));
|
|
1791
|
-
return data;
|
|
2159
|
+
updateTocConfig(data) {
|
|
2160
|
+
this.tocConfigData.next(data);
|
|
1792
2161
|
}
|
|
1793
2162
|
/**
|
|
1794
|
-
* @param {?}
|
|
1795
|
-
* @param {?=}
|
|
1796
|
-
* @param {?=}
|
|
2163
|
+
* @param {?} contentId
|
|
2164
|
+
* @param {?=} hierarchyType
|
|
2165
|
+
* @param {?=} _additionalFields
|
|
2166
|
+
* @param {?=} primaryCategory
|
|
1797
2167
|
* @return {?}
|
|
1798
2168
|
*/
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
() => {
|
|
1823
|
-
resolve(true);
|
|
1824
|
-
}));
|
|
2169
|
+
fetchContent(contentId, hierarchyType = 'detail', _additionalFields = [], primaryCategory) {
|
|
2170
|
+
// const url = `${API_END_POINTS.CONTENT}/${contentId}?hierarchyType=${hierarchyType}`
|
|
2171
|
+
/** @type {?} */
|
|
2172
|
+
let url = '';
|
|
2173
|
+
/** @type {?} */
|
|
2174
|
+
const forPreview = window.location.href.includes('/public/') || window.location.href.includes('&preview=true');
|
|
2175
|
+
if (primaryCategory && this.isResource(primaryCategory)) {
|
|
2176
|
+
if (!forPreview) {
|
|
2177
|
+
url = `/apis/proxies/v8/action/content/v3/read/${contentId}`;
|
|
2178
|
+
}
|
|
2179
|
+
else {
|
|
2180
|
+
url = `/api/content/v1/read/${contentId}`;
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
else {
|
|
2184
|
+
if (!forPreview) {
|
|
2185
|
+
url = `/apis/proxies/v8/action/content/v3/hierarchy/${contentId}?hierarchyType=${hierarchyType}`;
|
|
2186
|
+
}
|
|
2187
|
+
else {
|
|
2188
|
+
/** @type {?} */
|
|
2189
|
+
const forcreator = window.location.href.includes('editMode=true');
|
|
2190
|
+
if (forcreator) {
|
|
2191
|
+
url = `apis/proxies/v8/action/content/v3/hierarchy/${contentId}?mode=edit`;
|
|
1825
2192
|
}
|
|
1826
2193
|
else {
|
|
1827
|
-
|
|
1828
|
-
const reqBody = {
|
|
1829
|
-
contextPathId: collectionId ? collectionId : id,
|
|
1830
|
-
resourceId: id,
|
|
1831
|
-
data: JSON.stringify({ timestamp: Date.now() }),
|
|
1832
|
-
dateAccessed: Date.now(),
|
|
1833
|
-
};
|
|
1834
|
-
yield this.saveContinueLearning(reqBody).toPromise().catch().finally((/**
|
|
1835
|
-
* @return {?}
|
|
1836
|
-
*/
|
|
1837
|
-
() => {
|
|
1838
|
-
resolve(true);
|
|
1839
|
-
}));
|
|
2194
|
+
url = `/api/course/v1/hierarchy/${contentId}?hierarchyType=${hierarchyType}`;
|
|
1840
2195
|
}
|
|
1841
|
-
}
|
|
1842
|
-
}
|
|
2196
|
+
}
|
|
2197
|
+
}
|
|
2198
|
+
// return this.http
|
|
2199
|
+
// .post<NsContent.IContent>(url, { additionalFields })
|
|
2200
|
+
// .pipe(retry(1))
|
|
2201
|
+
return this.http
|
|
2202
|
+
.get(url)
|
|
2203
|
+
.pipe(shareReplay(1));
|
|
2204
|
+
// if (apiData && apiData.result) {
|
|
2205
|
+
// return apiData.result.content
|
|
2206
|
+
// }
|
|
1843
2207
|
}
|
|
1844
2208
|
/**
|
|
1845
|
-
* @param {?}
|
|
2209
|
+
* @param {?} contentId
|
|
1846
2210
|
* @return {?}
|
|
1847
2211
|
*/
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
2212
|
+
fetchAuthoringContent(contentId) {
|
|
2213
|
+
/** @type {?} */
|
|
2214
|
+
const forcreator = window.location.href.includes('editMode=true');
|
|
2215
|
+
/** @type {?} */
|
|
2216
|
+
let url = '';
|
|
2217
|
+
if (forcreator) {
|
|
2218
|
+
url = `apis/proxies/v8/action/content/v3/hierarchy/${contentId}?mode=edit`;
|
|
1852
2219
|
}
|
|
1853
|
-
|
|
2220
|
+
else {
|
|
2221
|
+
url = `${API_END_POINTS$1.AUTHORING_CONTENT}/${contentId}?hierarchyType=detail`;
|
|
2222
|
+
}
|
|
2223
|
+
return this.http.get(url).pipe(shareReplay(1), (/**
|
|
2224
|
+
* @param {?} r
|
|
2225
|
+
* @return {?}
|
|
2226
|
+
*/
|
|
2227
|
+
r => r));
|
|
1854
2228
|
}
|
|
1855
2229
|
/**
|
|
1856
|
-
* @param {?}
|
|
2230
|
+
* @param {?} ids
|
|
1857
2231
|
* @return {?}
|
|
1858
2232
|
*/
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
2233
|
+
fetchMultipleContent(ids) {
|
|
2234
|
+
return this.http.get(`${API_END_POINTS$1.MULTIPLE_CONTENT}/${ids.join(',')}`);
|
|
2235
|
+
}
|
|
2236
|
+
/**
|
|
2237
|
+
* @param {?} type
|
|
2238
|
+
* @param {?} id
|
|
2239
|
+
* @param {?=} pageNumber
|
|
2240
|
+
* @param {?=} pageSize
|
|
2241
|
+
* @return {?}
|
|
2242
|
+
*/
|
|
2243
|
+
fetchCollectionHierarchy(type, id, pageNumber = 0, pageSize = 1) {
|
|
2244
|
+
return this.http.get(`${API_END_POINTS$1.COLLECTION_HIERARCHY(type, id)}?pageNumber=${pageNumber}&pageSize=${pageSize}`);
|
|
2245
|
+
}
|
|
2246
|
+
/**
|
|
2247
|
+
* @return {?}
|
|
2248
|
+
*/
|
|
2249
|
+
fetchBlendedCourse() {
|
|
2250
|
+
}
|
|
2251
|
+
/**
|
|
2252
|
+
* @param {?} req
|
|
2253
|
+
* @return {?}
|
|
2254
|
+
*/
|
|
2255
|
+
fetchCourseBatches(req) {
|
|
2256
|
+
return this.http
|
|
2257
|
+
.post(API_END_POINTS$1.COURSE_BATCH_LIST, req)
|
|
2258
|
+
.pipe(retry(1), map((/**
|
|
2259
|
+
* @param {?} data
|
|
2260
|
+
* @return {?}
|
|
2261
|
+
*/
|
|
2262
|
+
(data) => data.result.response)));
|
|
2263
|
+
}
|
|
2264
|
+
// fetch individual batch
|
|
2265
|
+
/**
|
|
2266
|
+
* @param {?} batchId
|
|
2267
|
+
* @return {?}
|
|
2268
|
+
*/
|
|
2269
|
+
fetchCourseBatch(batchId) {
|
|
2270
|
+
return this.http.get(`${API_END_POINTS$1.COURSE_BATCH}/${batchId}`);
|
|
2271
|
+
}
|
|
2272
|
+
/**
|
|
2273
|
+
* @param {?} identifier
|
|
2274
|
+
* @return {?}
|
|
2275
|
+
*/
|
|
2276
|
+
autoAssignBatchApi(identifier) {
|
|
2277
|
+
return this.http.get(`${API_END_POINTS$1.AUTO_ASSIGN_BATCH}${identifier}`)
|
|
2278
|
+
.pipe(retry(1), map((/**
|
|
2279
|
+
* @param {?} data
|
|
2280
|
+
* @return {?}
|
|
2281
|
+
*/
|
|
2282
|
+
(data) => data.result.response)));
|
|
2283
|
+
}
|
|
2284
|
+
/**
|
|
2285
|
+
* @param {?} request
|
|
2286
|
+
* @param {?} programType
|
|
2287
|
+
* @return {?}
|
|
2288
|
+
*/
|
|
2289
|
+
autoAssignCuratedBatchApi(request, programType) {
|
|
2290
|
+
/** @type {?} */
|
|
2291
|
+
const url = programType === NsContent.ECourseCategory.MODERATED_PROGRAM ?
|
|
2292
|
+
API_END_POINTS$1.AUTO_ASSIGN_OPEN_PROGRAM : API_END_POINTS$1.AUTO_ASSIGN_CURATED_BATCH;
|
|
2293
|
+
return this.http.post(`${url}`, request)
|
|
2294
|
+
.pipe(retry(1), map((/**
|
|
2295
|
+
* @param {?} data
|
|
2296
|
+
* @return {?}
|
|
2297
|
+
*/
|
|
2298
|
+
(data) => data.result.response)));
|
|
2299
|
+
}
|
|
2300
|
+
/**
|
|
2301
|
+
* @param {?} req
|
|
2302
|
+
* @return {?}
|
|
2303
|
+
*/
|
|
2304
|
+
enrollUserToBatch(req) {
|
|
2305
|
+
return this.http
|
|
2306
|
+
.post(API_END_POINTS$1.ENROLL_BATCH, req)
|
|
2307
|
+
.toPromise();
|
|
2308
|
+
}
|
|
2309
|
+
/**
|
|
2310
|
+
* @param {?} req
|
|
2311
|
+
* @param {?} type
|
|
2312
|
+
* @return {?}
|
|
2313
|
+
*/
|
|
2314
|
+
enrollAndUnenrollUserToBatchWF(req, type) {
|
|
2315
|
+
/** @type {?} */
|
|
2316
|
+
const url = type === 'WITHDRAW' ? API_END_POINTS$1.WITHDRAW_BATCH_WF : API_END_POINTS$1.ENROLL_BATCH_WF;
|
|
2317
|
+
return this.http
|
|
2318
|
+
.post(url, req)
|
|
2319
|
+
.toPromise();
|
|
2320
|
+
}
|
|
2321
|
+
/**
|
|
2322
|
+
* @param {?} req
|
|
2323
|
+
* @return {?}
|
|
2324
|
+
*/
|
|
2325
|
+
fetchBlendedUserWF(req) {
|
|
2326
|
+
return this.http
|
|
2327
|
+
.post(API_END_POINTS$1.BLENDED_USER_WF, req)
|
|
2328
|
+
.toPromise();
|
|
2329
|
+
}
|
|
2330
|
+
/**
|
|
2331
|
+
* @param {?} req
|
|
2332
|
+
* @return {?}
|
|
2333
|
+
*/
|
|
2334
|
+
fetchBlendedUserCOUNT(req) {
|
|
2335
|
+
return this.http
|
|
2336
|
+
.post(API_END_POINTS$1.BLENDED_USER_COUNT, req)
|
|
2337
|
+
.toPromise();
|
|
2338
|
+
}
|
|
2339
|
+
/**
|
|
2340
|
+
* @param {?} contentIds
|
|
2341
|
+
* @return {?}
|
|
2342
|
+
*/
|
|
2343
|
+
fetchContentLikes(contentIds) {
|
|
2344
|
+
return this.http
|
|
2345
|
+
.post(API_END_POINTS$1.CONTENT_LIKES, contentIds)
|
|
2346
|
+
.toPromise();
|
|
2347
|
+
}
|
|
2348
|
+
/**
|
|
2349
|
+
* @param {?} contentIds
|
|
2350
|
+
* @return {?}
|
|
2351
|
+
*/
|
|
2352
|
+
fetchContentRatings(contentIds) {
|
|
2353
|
+
if (contentIds) { }
|
|
2354
|
+
// return this.http
|
|
2355
|
+
// .post(`${API_END_POINTS.CONTENT_RATING}/rating`, contentIds)
|
|
2356
|
+
// .toPromise()
|
|
2357
|
+
return of().toPromise();
|
|
2358
|
+
}
|
|
2359
|
+
/**
|
|
2360
|
+
* @param {?} contentId
|
|
2361
|
+
* @return {?}
|
|
2362
|
+
*/
|
|
2363
|
+
fetchContentHistory(contentId) {
|
|
2364
|
+
return this.http.get(`${API_END_POINTS$1.CONTENT_HISTORY}/${contentId}`);
|
|
2365
|
+
}
|
|
2366
|
+
/**
|
|
2367
|
+
* @param {?} req
|
|
2368
|
+
* @return {?}
|
|
2369
|
+
*/
|
|
2370
|
+
fetchContentHistoryV2(req) {
|
|
2371
|
+
req.request.fields = ['progressdetails'];
|
|
2372
|
+
/** @type {?} */
|
|
2373
|
+
const data = this.http.post(`${API_END_POINTS$1.CONTENT_HISTORYV2}/${req.request.courseId}`, req);
|
|
2374
|
+
data.subscribe((/**
|
|
2375
|
+
* @param {?} subscribeData
|
|
2376
|
+
* @return {?}
|
|
2377
|
+
*/
|
|
2378
|
+
(subscribeData) => {
|
|
2379
|
+
this.programChildCourseResumeData.next({ resumeData: subscribeData.result.contentList, courseId: req.request.courseId });
|
|
2380
|
+
}));
|
|
2381
|
+
return data;
|
|
2382
|
+
}
|
|
2383
|
+
/**
|
|
2384
|
+
* @param {?} id
|
|
2385
|
+
* @param {?=} collectionId
|
|
2386
|
+
* @param {?=} collectionType
|
|
2387
|
+
* @return {?}
|
|
2388
|
+
*/
|
|
2389
|
+
continueLearning(id, collectionId, collectionType) {
|
|
2390
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2391
|
+
return new Promise((/**
|
|
2392
|
+
* @param {?} resolve
|
|
2393
|
+
* @return {?}
|
|
2394
|
+
*/
|
|
2395
|
+
(resolve) => __awaiter(this, void 0, void 0, function* () {
|
|
2396
|
+
if (collectionType &&
|
|
2397
|
+
collectionType.toLowerCase() === 'playlist') {
|
|
2398
|
+
/** @type {?} */
|
|
2399
|
+
const reqBody = {
|
|
2400
|
+
contextPathId: collectionId ? collectionId : id,
|
|
2401
|
+
resourceId: id,
|
|
2402
|
+
data: JSON.stringify({
|
|
2403
|
+
timestamp: Date.now(),
|
|
2404
|
+
contextFullPath: [collectionId, id],
|
|
2405
|
+
}),
|
|
2406
|
+
dateAccessed: Date.now(),
|
|
2407
|
+
contextType: 'playlist',
|
|
2408
|
+
};
|
|
2409
|
+
yield this.saveContinueLearning(reqBody).toPromise().catch().finally((/**
|
|
2410
|
+
* @return {?}
|
|
2411
|
+
*/
|
|
2412
|
+
() => {
|
|
2413
|
+
resolve(true);
|
|
2414
|
+
}));
|
|
2415
|
+
}
|
|
2416
|
+
else {
|
|
2417
|
+
/** @type {?} */
|
|
2418
|
+
const reqBody = {
|
|
2419
|
+
contextPathId: collectionId ? collectionId : id,
|
|
2420
|
+
resourceId: id,
|
|
2421
|
+
data: JSON.stringify({ timestamp: Date.now() }),
|
|
2422
|
+
dateAccessed: Date.now(),
|
|
2423
|
+
};
|
|
2424
|
+
yield this.saveContinueLearning(reqBody).toPromise().catch().finally((/**
|
|
2425
|
+
* @return {?}
|
|
2426
|
+
*/
|
|
2427
|
+
() => {
|
|
2428
|
+
resolve(true);
|
|
2429
|
+
}));
|
|
2430
|
+
}
|
|
2431
|
+
})));
|
|
2432
|
+
});
|
|
2433
|
+
}
|
|
2434
|
+
/**
|
|
2435
|
+
* @param {?} content
|
|
2436
|
+
* @return {?}
|
|
2437
|
+
*/
|
|
2438
|
+
saveContinueLearning(content) {
|
|
2439
|
+
// const url = API_END_POINTS.USER_CONTINUE_LEARNING
|
|
2440
|
+
// return this.http.post<any>(url, content)
|
|
2441
|
+
if (content) {
|
|
2442
|
+
}
|
|
2443
|
+
return (/** @type {?} */ (of()));
|
|
2444
|
+
}
|
|
2445
|
+
/**
|
|
2446
|
+
* @param {?} _contentId
|
|
2447
|
+
* @return {?}
|
|
2448
|
+
*/
|
|
2449
|
+
setS3Cookie(_contentId) {
|
|
2450
|
+
// return this.http
|
|
2451
|
+
// .post(API_END_POINTS.SET_S3_COOKIE, { contentId })
|
|
1862
2452
|
// .pipe(catchError(_err => of(true)))
|
|
1863
2453
|
return EMPTY;
|
|
1864
2454
|
}
|
|
@@ -1866,7 +2456,7 @@ class WidgetContentService {
|
|
|
1866
2456
|
* @return {?}
|
|
1867
2457
|
*/
|
|
1868
2458
|
setS3ImageCookie() {
|
|
1869
|
-
return this.http.post(API_END_POINTS.SET_S3_IMAGE_COOKIE, {}).pipe(catchError((/**
|
|
2459
|
+
return this.http.post(API_END_POINTS$1.SET_S3_IMAGE_COOKIE, {}).pipe(catchError((/**
|
|
1870
2460
|
* @param {?} _err
|
|
1871
2461
|
* @return {?}
|
|
1872
2462
|
*/
|
|
@@ -1877,14 +2467,14 @@ class WidgetContentService {
|
|
|
1877
2467
|
* @return {?}
|
|
1878
2468
|
*/
|
|
1879
2469
|
fetchManifest(url) {
|
|
1880
|
-
return this.http.post(API_END_POINTS.FETCH_MANIFEST, { url });
|
|
2470
|
+
return this.http.post(API_END_POINTS$1.FETCH_MANIFEST, { url });
|
|
1881
2471
|
}
|
|
1882
2472
|
/**
|
|
1883
2473
|
* @param {?} url
|
|
1884
2474
|
* @return {?}
|
|
1885
2475
|
*/
|
|
1886
2476
|
fetchWebModuleContent(url) {
|
|
1887
|
-
return this.http.get(`${API_END_POINTS.FETCH_WEB_MODULE_FILES}?url=${encodeURIComponent(url)}`);
|
|
2477
|
+
return this.http.get(`${API_END_POINTS$1.FETCH_WEB_MODULE_FILES}?url=${encodeURIComponent(url)}`);
|
|
1888
2478
|
}
|
|
1889
2479
|
/**
|
|
1890
2480
|
* @param {?} req
|
|
@@ -1892,7 +2482,7 @@ class WidgetContentService {
|
|
|
1892
2482
|
*/
|
|
1893
2483
|
search(req) {
|
|
1894
2484
|
req.query = req.query || '';
|
|
1895
|
-
return this.http.post(API_END_POINTS.CONTENT_SEARCH_V5, {
|
|
2485
|
+
return this.http.post(API_END_POINTS$1.CONTENT_SEARCH_V5, {
|
|
1896
2486
|
request: req,
|
|
1897
2487
|
});
|
|
1898
2488
|
}
|
|
@@ -1906,7 +2496,7 @@ class WidgetContentService {
|
|
|
1906
2496
|
(req.preLabelValue || '') +
|
|
1907
2497
|
((this.configSvc.userProfile && this.configSvc.userProfile.country) || '');
|
|
1908
2498
|
req.filters = Object.assign({}, req.filters, { labels: [req.preLabelValue || ''] });
|
|
1909
|
-
return this.http.post(API_END_POINTS.CONTENT_SEARCH_REGION_RECOMMENDATION, { request: req });
|
|
2499
|
+
return this.http.post(API_END_POINTS$1.CONTENT_SEARCH_REGION_RECOMMENDATION, { request: req });
|
|
1910
2500
|
}
|
|
1911
2501
|
/**
|
|
1912
2502
|
* @param {?} req
|
|
@@ -1919,28 +2509,28 @@ class WidgetContentService {
|
|
|
1919
2509
|
if (apiPath) {
|
|
1920
2510
|
return this.http.get(apiPath);
|
|
1921
2511
|
}
|
|
1922
|
-
return this.http.post(API_END_POINTS.CONTENT_SEARCH_V6, req);
|
|
2512
|
+
return this.http.post(API_END_POINTS$1.CONTENT_SEARCH_V6, req);
|
|
1923
2513
|
}
|
|
1924
2514
|
/**
|
|
1925
2515
|
* @param {?} req
|
|
1926
2516
|
* @return {?}
|
|
1927
2517
|
*/
|
|
1928
2518
|
searchRelatedCBPV6(req) {
|
|
1929
|
-
return this.http.post(API_END_POINTS.CONTENT_SEARCH_RELATED_CBP_V6, req);
|
|
2519
|
+
return this.http.post(API_END_POINTS$1.CONTENT_SEARCH_RELATED_CBP_V6, req);
|
|
1930
2520
|
}
|
|
1931
2521
|
/**
|
|
1932
2522
|
* @param {?} contentId
|
|
1933
2523
|
* @return {?}
|
|
1934
2524
|
*/
|
|
1935
2525
|
fetchContentRating(contentId) {
|
|
1936
|
-
return this.http.get(`${API_END_POINTS.CONTENT_RATING}/${contentId}`);
|
|
2526
|
+
return this.http.get(`${API_END_POINTS$1.CONTENT_RATING}/${contentId}`);
|
|
1937
2527
|
}
|
|
1938
2528
|
/**
|
|
1939
2529
|
* @param {?} contentId
|
|
1940
2530
|
* @return {?}
|
|
1941
2531
|
*/
|
|
1942
2532
|
deleteContentRating(contentId) {
|
|
1943
|
-
return this.http.delete(`${API_END_POINTS.CONTENT_RATING}/${contentId}`);
|
|
2533
|
+
return this.http.delete(`${API_END_POINTS$1.CONTENT_RATING}/${contentId}`);
|
|
1944
2534
|
}
|
|
1945
2535
|
/**
|
|
1946
2536
|
* @param {?} contentId
|
|
@@ -1948,7 +2538,7 @@ class WidgetContentService {
|
|
|
1948
2538
|
* @return {?}
|
|
1949
2539
|
*/
|
|
1950
2540
|
addContentRating(contentId, data) {
|
|
1951
|
-
return this.http.post(`${API_END_POINTS.CONTENT_RATING}/${contentId}`, data);
|
|
2541
|
+
return this.http.post(`${API_END_POINTS$1.CONTENT_RATING}/${contentId}`, data);
|
|
1952
2542
|
}
|
|
1953
2543
|
/**
|
|
1954
2544
|
* @param {?} content
|
|
@@ -1990,7 +2580,7 @@ class WidgetContentService {
|
|
|
1990
2580
|
* @return {?}
|
|
1991
2581
|
*/
|
|
1992
2582
|
getRegistrationStatus(source) {
|
|
1993
|
-
return this.http.get(`${API_END_POINTS.REGISTRATION_STATUS}/${source}`).toPromise();
|
|
2583
|
+
return this.http.get(`${API_END_POINTS$1.REGISTRATION_STATUS}/${source}`).toPromise();
|
|
1994
2584
|
}
|
|
1995
2585
|
/**
|
|
1996
2586
|
* @param {?} url
|
|
@@ -2004,21 +2594,21 @@ class WidgetContentService {
|
|
|
2004
2594
|
* @return {?}
|
|
2005
2595
|
*/
|
|
2006
2596
|
addCertTemplate(body) {
|
|
2007
|
-
return this.http.patch(`${API_END_POINTS.CERT_ADD_TEMPLATE}`, body);
|
|
2597
|
+
return this.http.patch(`${API_END_POINTS$1.CERT_ADD_TEMPLATE}`, body);
|
|
2008
2598
|
}
|
|
2009
2599
|
/**
|
|
2010
2600
|
* @param {?} body
|
|
2011
2601
|
* @return {?}
|
|
2012
2602
|
*/
|
|
2013
2603
|
issueCert(body) {
|
|
2014
|
-
return this.http.post(`${API_END_POINTS.CERT_ISSUE}`, body);
|
|
2604
|
+
return this.http.post(`${API_END_POINTS$1.CERT_ISSUE}`, body);
|
|
2015
2605
|
}
|
|
2016
2606
|
/**
|
|
2017
2607
|
* @param {?} certId
|
|
2018
2608
|
* @return {?}
|
|
2019
2609
|
*/
|
|
2020
2610
|
downloadCert(certId) {
|
|
2021
|
-
return this.http.get(`${API_END_POINTS.CERT_DOWNLOAD(certId)}`);
|
|
2611
|
+
return this.http.get(`${API_END_POINTS$1.CERT_DOWNLOAD(certId)}`);
|
|
2022
2612
|
}
|
|
2023
2613
|
/**
|
|
2024
2614
|
* @param {?} req
|
|
@@ -2026,7 +2616,7 @@ class WidgetContentService {
|
|
|
2026
2616
|
*/
|
|
2027
2617
|
trendingContentSearch(req) {
|
|
2028
2618
|
req.query = req.query || '';
|
|
2029
|
-
return this.http.post(API_END_POINTS.TRENDING_CONTENT_SEARCH, req);
|
|
2619
|
+
return this.http.post(API_END_POINTS$1.TRENDING_CONTENT_SEARCH, req);
|
|
2030
2620
|
}
|
|
2031
2621
|
/**
|
|
2032
2622
|
* @param {?} limit
|
|
@@ -2034,7 +2624,7 @@ class WidgetContentService {
|
|
|
2034
2624
|
* @return {?}
|
|
2035
2625
|
*/
|
|
2036
2626
|
getKarmaPoitns(limit, offset) {
|
|
2037
|
-
return this.http.post(API_END_POINTS.READ_KARMAPOINTS, { limit, offset }).pipe(catchError((/**
|
|
2627
|
+
return this.http.post(API_END_POINTS$1.READ_KARMAPOINTS, { limit, offset }).pipe(catchError((/**
|
|
2038
2628
|
* @param {?} _err
|
|
2039
2629
|
* @return {?}
|
|
2040
2630
|
*/
|
|
@@ -2050,7 +2640,7 @@ class WidgetContentService {
|
|
|
2050
2640
|
/** @type {?} */
|
|
2051
2641
|
const forPreview = window.location.href.includes('/public/') || window.location.href.includes('&preview=true');
|
|
2052
2642
|
if (!forPreview) {
|
|
2053
|
-
return this.http.get(API_END_POINTS.CONTENT_READ(contentId));
|
|
2643
|
+
return this.http.get(API_END_POINTS$1.CONTENT_READ(contentId));
|
|
2054
2644
|
}
|
|
2055
2645
|
url = `/api/content/v1/read/${contentId}`;
|
|
2056
2646
|
return this.http.get(url);
|
|
@@ -2061,31 +2651,50 @@ class WidgetContentService {
|
|
|
2061
2651
|
* @return {?}
|
|
2062
2652
|
*/
|
|
2063
2653
|
getCourseKarmaPoints(request) {
|
|
2064
|
-
return this.http.post(API_END_POINTS.READ_COURSE_KARMAPOINTS, request);
|
|
2654
|
+
return this.http.post(API_END_POINTS$1.READ_COURSE_KARMAPOINTS, request);
|
|
2065
2655
|
}
|
|
2066
2656
|
/**
|
|
2067
2657
|
* @param {?} request
|
|
2068
2658
|
* @return {?}
|
|
2069
2659
|
*/
|
|
2070
2660
|
claimKarmapoints(request) {
|
|
2071
|
-
return this.http.post(API_END_POINTS.CLAIM_KARMAPOINTS, request);
|
|
2661
|
+
return this.http.post(API_END_POINTS$1.CLAIM_KARMAPOINTS, request);
|
|
2072
2662
|
}
|
|
2073
2663
|
/**
|
|
2074
2664
|
* @return {?}
|
|
2075
2665
|
*/
|
|
2076
2666
|
userKarmaPoints() {
|
|
2077
|
-
return this.http.post(API_END_POINTS.USER_KARMA_POINTS, {});
|
|
2667
|
+
return this.http.post(API_END_POINTS$1.USER_KARMA_POINTS, {});
|
|
2078
2668
|
}
|
|
2079
2669
|
/**
|
|
2080
2670
|
* @param {?} doId
|
|
2081
2671
|
* @return {?}
|
|
2082
2672
|
*/
|
|
2083
2673
|
getEnrolledData(doId) {
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2674
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2675
|
+
/** @type {?} */
|
|
2676
|
+
let userId = this.configSvc.userProfile.userId;
|
|
2677
|
+
/** @type {?} */
|
|
2678
|
+
const responseData = yield this.userSvc.fetchEnrollmentDataByContentId(userId, doId).toPromise().then((/**
|
|
2679
|
+
* @param {?} res
|
|
2680
|
+
* @return {?}
|
|
2681
|
+
*/
|
|
2682
|
+
(res) => __awaiter(this, void 0, void 0, function* () {
|
|
2683
|
+
if (res && res.courses && res.courses.length) {
|
|
2684
|
+
return res.courses;
|
|
2685
|
+
}
|
|
2686
|
+
else {
|
|
2687
|
+
return [];
|
|
2688
|
+
}
|
|
2689
|
+
}))).catch((/**
|
|
2690
|
+
* @param {?} _err
|
|
2691
|
+
* @return {?}
|
|
2692
|
+
*/
|
|
2693
|
+
(_err) => {
|
|
2694
|
+
return [];
|
|
2695
|
+
}));
|
|
2696
|
+
return responseData || [];
|
|
2697
|
+
});
|
|
2089
2698
|
}
|
|
2090
2699
|
/**
|
|
2091
2700
|
* @param {?} content
|
|
@@ -2094,8 +2703,10 @@ class WidgetContentService {
|
|
|
2094
2703
|
getResourseLink(content) {
|
|
2095
2704
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2096
2705
|
/** @type {?} */
|
|
2097
|
-
const
|
|
2098
|
-
if (
|
|
2706
|
+
const enrolledCourse = yield this.getEnrolledData(content.identifier);
|
|
2707
|
+
if (enrolledCourse && enrolledCourse.length) {
|
|
2708
|
+
/** @type {?} */
|
|
2709
|
+
const enrolledCourseData = enrolledCourse[0];
|
|
2099
2710
|
if (enrolledCourseData.content.courseCategory === NsContent.ECourseCategory.BLENDED_PROGRAM ||
|
|
2100
2711
|
enrolledCourseData.content.courseCategory === NsContent.ECourseCategory.INVITE_ONLY_PROGRAM ||
|
|
2101
2712
|
enrolledCourseData.content.courseCategory === NsContent.ECourseCategory.MODERATED_PROGRAM ||
|
|
@@ -2230,50 +2841,72 @@ class WidgetContentService {
|
|
|
2230
2841
|
// req.query = req.query || '';
|
|
2231
2842
|
return this.http.get(apiUrl);
|
|
2232
2843
|
}
|
|
2844
|
+
/**
|
|
2845
|
+
* @param {?} enrollmentList
|
|
2846
|
+
* @param {?} collectionId
|
|
2847
|
+
* @return {?}
|
|
2848
|
+
*/
|
|
2849
|
+
getEnrolledDataFromList(enrollmentList, collectionId) {
|
|
2850
|
+
if (enrollmentList && enrollmentList.length) {
|
|
2851
|
+
/** @type {?} */
|
|
2852
|
+
let enrolledData = enrollmentList.filter((/**
|
|
2853
|
+
* @param {?} ele
|
|
2854
|
+
* @return {?}
|
|
2855
|
+
*/
|
|
2856
|
+
(ele) => ele.collectionId === collectionId));
|
|
2857
|
+
return enrolledData.length ? enrolledData[0] : {};
|
|
2858
|
+
}
|
|
2859
|
+
}
|
|
2233
2860
|
}
|
|
2234
|
-
|
|
2861
|
+
WidgetContentLibService.decorators = [
|
|
2235
2862
|
{ type: Injectable, args: [{
|
|
2236
2863
|
providedIn: 'root',
|
|
2237
2864
|
},] }
|
|
2238
2865
|
];
|
|
2239
2866
|
/** @nocollapse */
|
|
2240
|
-
|
|
2867
|
+
WidgetContentLibService.ctorParameters = () => [
|
|
2241
2868
|
{ type: HttpClient },
|
|
2242
|
-
{ type: ConfigurationsService$1 }
|
|
2869
|
+
{ type: ConfigurationsService$1 },
|
|
2870
|
+
{ type: WidgetUserServiceLib }
|
|
2243
2871
|
];
|
|
2244
|
-
/** @nocollapse */
|
|
2872
|
+
/** @nocollapse */ WidgetContentLibService.ngInjectableDef = ɵɵdefineInjectable({ factory: function WidgetContentLibService_Factory() { return new WidgetContentLibService(ɵɵinject(HttpClient), ɵɵinject(ConfigurationsService$1), ɵɵinject(WidgetUserServiceLib)); }, token: WidgetContentLibService, providedIn: "root" });
|
|
2245
2873
|
if (false) {
|
|
2246
2874
|
/** @type {?} */
|
|
2247
|
-
|
|
2875
|
+
WidgetContentLibService.prototype.tocConfigData;
|
|
2248
2876
|
/** @type {?} */
|
|
2249
|
-
|
|
2877
|
+
WidgetContentLibService.prototype.tocConfigData$;
|
|
2250
2878
|
/**
|
|
2251
2879
|
* @type {?}
|
|
2252
2880
|
* @private
|
|
2253
2881
|
*/
|
|
2254
|
-
|
|
2882
|
+
WidgetContentLibService.prototype.telemetryData;
|
|
2255
2883
|
/** @type {?} */
|
|
2256
|
-
|
|
2884
|
+
WidgetContentLibService.prototype.telemetryData$;
|
|
2257
2885
|
/** @type {?} */
|
|
2258
|
-
|
|
2886
|
+
WidgetContentLibService.prototype.currentMetaData;
|
|
2259
2887
|
/** @type {?} */
|
|
2260
|
-
|
|
2888
|
+
WidgetContentLibService.prototype.currentContentReadMetaData;
|
|
2261
2889
|
/** @type {?} */
|
|
2262
|
-
|
|
2890
|
+
WidgetContentLibService.prototype.currentBatchEnrollmentList;
|
|
2263
2891
|
/** @type {?} */
|
|
2264
|
-
|
|
2892
|
+
WidgetContentLibService.prototype.programChildCourseResumeData;
|
|
2265
2893
|
/** @type {?} */
|
|
2266
|
-
|
|
2894
|
+
WidgetContentLibService.prototype.programChildCourseResumeData$;
|
|
2895
|
+
/**
|
|
2896
|
+
* @type {?}
|
|
2897
|
+
* @private
|
|
2898
|
+
*/
|
|
2899
|
+
WidgetContentLibService.prototype.http;
|
|
2267
2900
|
/**
|
|
2268
2901
|
* @type {?}
|
|
2269
2902
|
* @private
|
|
2270
2903
|
*/
|
|
2271
|
-
|
|
2904
|
+
WidgetContentLibService.prototype.configSvc;
|
|
2272
2905
|
/**
|
|
2273
2906
|
* @type {?}
|
|
2274
2907
|
* @private
|
|
2275
2908
|
*/
|
|
2276
|
-
|
|
2909
|
+
WidgetContentLibService.prototype.userSvc;
|
|
2277
2910
|
}
|
|
2278
2911
|
|
|
2279
2912
|
/**
|
|
@@ -2587,695 +3220,155 @@ class MultilingualTranslationsService {
|
|
|
2587
3220
|
if (subtype) {
|
|
2588
3221
|
// tslint:disable-next-line: prefer-template
|
|
2589
3222
|
/** @type {?} */
|
|
2590
|
-
const translationKey = type + '.' + nlabel + subtype;
|
|
2591
|
-
return this.translate.instant(translationKey);
|
|
2592
|
-
}
|
|
2593
|
-
// tslint:disable-next-line: prefer-template
|
|
2594
|
-
/** @type {?} */
|
|
2595
|
-
const translationKeyn = type + '.' + nlabel;
|
|
2596
|
-
return this.translate.instant(translationKeyn);
|
|
2597
|
-
}
|
|
2598
|
-
/**
|
|
2599
|
-
* @param {?} label
|
|
2600
|
-
* @param {?} type
|
|
2601
|
-
* @param {?} subtype
|
|
2602
|
-
* @return {?}
|
|
2603
|
-
*/
|
|
2604
|
-
translateLabel(label, type, subtype) {
|
|
2605
|
-
if (label) {
|
|
2606
|
-
/** @type {?} */
|
|
2607
|
-
let nlabel = label;
|
|
2608
|
-
nlabel = nlabel && nlabel.toLowerCase();
|
|
2609
|
-
/** @type {?} */
|
|
2610
|
-
const sl = nlabel.split(' ');
|
|
2611
|
-
sl.forEach((/**
|
|
2612
|
-
* @param {?} w
|
|
2613
|
-
* @param {?} index
|
|
2614
|
-
* @return {?}
|
|
2615
|
-
*/
|
|
2616
|
-
(w, index) => {
|
|
2617
|
-
if (index !== 0) {
|
|
2618
|
-
sl[index] = w[0].toUpperCase() + w.slice(1);
|
|
2619
|
-
}
|
|
2620
|
-
}));
|
|
2621
|
-
nlabel = sl.join('');
|
|
2622
|
-
nlabel = nlabel.replace(/\s/g, '');
|
|
2623
|
-
if (subtype) {
|
|
2624
|
-
// tslint:disable-next-line: prefer-template
|
|
2625
|
-
/** @type {?} */
|
|
2626
|
-
const translationKey = type + '.' + nlabel + subtype;
|
|
2627
|
-
return this.translate.instant(translationKey);
|
|
2628
|
-
}
|
|
2629
|
-
// tslint:disable-next-line: prefer-template
|
|
2630
|
-
/** @type {?} */
|
|
2631
|
-
const translationKeyn = type + '.' + nlabel;
|
|
2632
|
-
return this.translate.instant(translationKeyn);
|
|
2633
|
-
}
|
|
2634
|
-
return label;
|
|
2635
|
-
}
|
|
2636
|
-
/**
|
|
2637
|
-
* @param {?} label
|
|
2638
|
-
* @param {?} type
|
|
2639
|
-
* @param {?} subtype
|
|
2640
|
-
* @return {?}
|
|
2641
|
-
*/
|
|
2642
|
-
translateActualLabel(label, type, subtype) {
|
|
2643
|
-
/** @type {?} */
|
|
2644
|
-
let nlabel = label;
|
|
2645
|
-
/** @type {?} */
|
|
2646
|
-
const sl = nlabel.split(' ');
|
|
2647
|
-
sl.forEach((/**
|
|
2648
|
-
* @param {?} w
|
|
2649
|
-
* @param {?} index
|
|
2650
|
-
* @return {?}
|
|
2651
|
-
*/
|
|
2652
|
-
(w, index) => {
|
|
2653
|
-
if (index !== 0) {
|
|
2654
|
-
sl[index] = w[0].toUpperCase() + w.slice(1);
|
|
2655
|
-
}
|
|
2656
|
-
}));
|
|
2657
|
-
nlabel = sl.join('');
|
|
2658
|
-
nlabel = nlabel.replace(/\s/g, '');
|
|
2659
|
-
if (subtype) {
|
|
2660
|
-
// tslint:disable-next-line: prefer-template
|
|
2661
|
-
/** @type {?} */
|
|
2662
|
-
const translationKey = type + '.' + nlabel + subtype;
|
|
2663
|
-
return this.translate.instant(translationKey);
|
|
2664
|
-
}
|
|
2665
|
-
// tslint:disable-next-line: prefer-template
|
|
2666
|
-
/** @type {?} */
|
|
2667
|
-
const translationKeyn = type + '.' + nlabel;
|
|
2668
|
-
return this.translate.instant(translationKeyn);
|
|
2669
|
-
}
|
|
2670
|
-
/**
|
|
2671
|
-
* @param {?} data
|
|
2672
|
-
* @return {?}
|
|
2673
|
-
*/
|
|
2674
|
-
editProfileDetailsAPI(data) {
|
|
2675
|
-
return this.http.post(this.editProfileDetails, data);
|
|
2676
|
-
}
|
|
2677
|
-
/**
|
|
2678
|
-
* @param {?} state
|
|
2679
|
-
* @param {?} lang
|
|
2680
|
-
* @param {?} userid
|
|
2681
|
-
* @return {?}
|
|
2682
|
-
*/
|
|
2683
|
-
updatelanguageSelected(state, lang, userid) {
|
|
2684
|
-
this.languageSelected.next(state);
|
|
2685
|
-
this.translate.use(lang);
|
|
2686
|
-
this.selectedLang = lang;
|
|
2687
|
-
if (userid) {
|
|
2688
|
-
/** @type {?} */
|
|
2689
|
-
const reqUpdates = {
|
|
2690
|
-
request: {
|
|
2691
|
-
userId: userid,
|
|
2692
|
-
profileDetails: {
|
|
2693
|
-
additionalProperties: {
|
|
2694
|
-
webPortalLang: this.selectedLang,
|
|
2695
|
-
},
|
|
2696
|
-
},
|
|
2697
|
-
},
|
|
2698
|
-
};
|
|
2699
|
-
this.editProfileDetailsAPI(reqUpdates).subscribe();
|
|
2700
|
-
}
|
|
2701
|
-
}
|
|
2702
|
-
}
|
|
2703
|
-
MultilingualTranslationsService.decorators = [
|
|
2704
|
-
{ type: Injectable, args: [{
|
|
2705
|
-
providedIn: 'root',
|
|
2706
|
-
},] }
|
|
2707
|
-
];
|
|
2708
|
-
/** @nocollapse */
|
|
2709
|
-
MultilingualTranslationsService.ctorParameters = () => [
|
|
2710
|
-
{ type: TranslateService },
|
|
2711
|
-
{ type: HttpClient },
|
|
2712
|
-
{ type: ConfigurationsService }
|
|
2713
|
-
];
|
|
2714
|
-
/** @nocollapse */ MultilingualTranslationsService.ngInjectableDef = ɵɵdefineInjectable({ factory: function MultilingualTranslationsService_Factory() { return new MultilingualTranslationsService(ɵɵinject(TranslateService), ɵɵinject(HttpClient), ɵɵinject(ConfigurationsService)); }, token: MultilingualTranslationsService, providedIn: "root" });
|
|
2715
|
-
if (false) {
|
|
2716
|
-
/** @type {?} */
|
|
2717
|
-
MultilingualTranslationsService.prototype.selectedLang;
|
|
2718
|
-
/** @type {?} */
|
|
2719
|
-
MultilingualTranslationsService.prototype.languageSelected;
|
|
2720
|
-
/** @type {?} */
|
|
2721
|
-
MultilingualTranslationsService.prototype.languageSelectedObservable;
|
|
2722
|
-
/** @type {?} */
|
|
2723
|
-
MultilingualTranslationsService.prototype.editProfileDetails;
|
|
2724
|
-
/**
|
|
2725
|
-
* @type {?}
|
|
2726
|
-
* @private
|
|
2727
|
-
*/
|
|
2728
|
-
MultilingualTranslationsService.prototype.translate;
|
|
2729
|
-
/**
|
|
2730
|
-
* @type {?}
|
|
2731
|
-
* @private
|
|
2732
|
-
*/
|
|
2733
|
-
MultilingualTranslationsService.prototype.http;
|
|
2734
|
-
/**
|
|
2735
|
-
* @type {?}
|
|
2736
|
-
* @private
|
|
2737
|
-
*/
|
|
2738
|
-
MultilingualTranslationsService.prototype.configSvc;
|
|
2739
|
-
}
|
|
2740
|
-
|
|
2741
|
-
/**
|
|
2742
|
-
* @fileoverview added by tsickle
|
|
2743
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2744
|
-
*/
|
|
2745
|
-
var NsCardContent;
|
|
2746
|
-
(function (NsCardContent) {
|
|
2747
|
-
/**
|
|
2748
|
-
* @record
|
|
2749
|
-
*/
|
|
2750
|
-
function ICard() { }
|
|
2751
|
-
NsCardContent.ICard = ICard;
|
|
2752
|
-
if (false) {
|
|
2753
|
-
/** @type {?} */
|
|
2754
|
-
ICard.prototype.content;
|
|
2755
|
-
/** @type {?} */
|
|
2756
|
-
ICard.prototype.cardSubType;
|
|
2757
|
-
/** @type {?} */
|
|
2758
|
-
ICard.prototype.context;
|
|
2759
|
-
/** @type {?|undefined} */
|
|
2760
|
-
ICard.prototype.intranetMode;
|
|
2761
|
-
/** @type {?|undefined} */
|
|
2762
|
-
ICard.prototype.deletedMode;
|
|
2763
|
-
/** @type {?|undefined} */
|
|
2764
|
-
ICard.prototype.likes;
|
|
2765
|
-
/** @type {?|undefined} */
|
|
2766
|
-
ICard.prototype.contentTags;
|
|
2767
|
-
/** @type {?} */
|
|
2768
|
-
ICard.prototype.stateData;
|
|
2769
|
-
}
|
|
2770
|
-
/**
|
|
2771
|
-
* @record
|
|
2772
|
-
*/
|
|
2773
|
-
function IContentTags() { }
|
|
2774
|
-
NsCardContent.IContentTags = IContentTags;
|
|
2775
|
-
if (false) {
|
|
2776
|
-
/** @type {?|undefined} */
|
|
2777
|
-
IContentTags.prototype.daysSpan;
|
|
2778
|
-
/** @type {?|undefined} */
|
|
2779
|
-
IContentTags.prototype.excludeContentType;
|
|
2780
|
-
/** @type {?|undefined} */
|
|
2781
|
-
IContentTags.prototype.excludeMimeType;
|
|
2782
|
-
/** @type {?} */
|
|
2783
|
-
IContentTags.prototype.tag;
|
|
2784
|
-
/** @type {?|undefined} */
|
|
2785
|
-
IContentTags.prototype.criteriaField;
|
|
2786
|
-
}
|
|
2787
|
-
/**
|
|
2788
|
-
* @record
|
|
2789
|
-
*/
|
|
2790
|
-
function ICompetency() { }
|
|
2791
|
-
NsCardContent.ICompetency = ICompetency;
|
|
2792
|
-
if (false) {
|
|
2793
|
-
/** @type {?} */
|
|
2794
|
-
ICompetency.prototype.competencyArea;
|
|
2795
|
-
/** @type {?} */
|
|
2796
|
-
ICompetency.prototype.competencyObject;
|
|
2797
|
-
}
|
|
2798
|
-
let EContentStatus;
|
|
2799
|
-
(function (EContentStatus) {
|
|
2800
|
-
EContentStatus["LIVE"] = "Live";
|
|
2801
|
-
EContentStatus["EXPIRED"] = "Expired";
|
|
2802
|
-
EContentStatus["DELETED"] = "Deleted";
|
|
2803
|
-
EContentStatus["MARK_FOR_DELETION"] = "MarkedForDeletion";
|
|
2804
|
-
})(EContentStatus = NsCardContent.EContentStatus || (NsCardContent.EContentStatus = {}));
|
|
2805
|
-
let ACBPConst;
|
|
2806
|
-
(function (ACBPConst) {
|
|
2807
|
-
ACBPConst["UPCOMING"] = "upcoming";
|
|
2808
|
-
ACBPConst["ALL"] = "All";
|
|
2809
|
-
ACBPConst["OVERDUE"] = "overdue";
|
|
2810
|
-
ACBPConst["SUCCESS"] = "success";
|
|
2811
|
-
})(ACBPConst = NsCardContent.ACBPConst || (NsCardContent.ACBPConst = {}));
|
|
2812
|
-
let IGOTConst;
|
|
2813
|
-
(function (IGOTConst) {
|
|
2814
|
-
IGOTConst["COMPETENCIES"] = "competencies_v5";
|
|
2815
|
-
IGOTConst["RETIRED"] = "Retired";
|
|
2816
|
-
})(IGOTConst = NsCardContent.IGOTConst || (NsCardContent.IGOTConst = {}));
|
|
2817
|
-
})(NsCardContent || (NsCardContent = {}));
|
|
2818
|
-
|
|
2819
|
-
/**
|
|
2820
|
-
* @fileoverview added by tsickle
|
|
2821
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2822
|
-
*/
|
|
2823
|
-
/** @type {?} */
|
|
2824
|
-
const dayjs = dayjs_
|
|
2825
|
-
// import { environment } from 'src/environments/environment'
|
|
2826
|
-
;
|
|
2827
|
-
/** @type {?} */
|
|
2828
|
-
const PROTECTED_SLAG_V8$1 = '/apis/protected/v8';
|
|
2829
|
-
const ɵ0$1 = /**
|
|
2830
|
-
* @param {?} userId
|
|
2831
|
-
* @return {?}
|
|
2832
|
-
*/
|
|
2833
|
-
(userId) => `${PROTECTED_SLAG_V8$1}/user/group/fetchUserGroup?userId=${userId}`, ɵ1$1 = /**
|
|
2834
|
-
* @param {?} userId
|
|
2835
|
-
* @return {?}
|
|
2836
|
-
*/
|
|
2837
|
-
(userId) =>
|
|
2838
|
-
// tslint:disable-next-line: max-line-length
|
|
2839
|
-
`/apis/proxies/v8/learner/course/v2/user/enrollment/list/${userId}?orgdetails=orgName,email&licenseDetails=name,description,url&fields=contentType,primaryCategory,courseCategory,topic,name,channel,mimeType,appIcon,gradeLevel,resourceType,identifier,medium,pkgVersion,board,subject,trackable,posterImage,duration,creatorLogo,license,version,versionKey,avgRating,additionalTags,${NsCardContent.IGOTConst.COMPETENCIES}&batchDetails=name,endDate,startDate,status,enrollmentType,createdBy,certificates,batchAttributes`, ɵ2$1 = /**
|
|
2840
|
-
* @param {?} userId
|
|
2841
|
-
* @return {?}
|
|
2842
|
-
*/
|
|
2843
|
-
(userId) =>
|
|
2844
|
-
// tslint:disable-next-line: max-line-length
|
|
2845
|
-
`/apis/proxies/v8/learner/course/v2/user/enrollment/list/${userId}?orgdetails=orgName,email&licenseDetails=name,description,url&fields=contentType,primaryCategory,courseCategory,topic,name,channel,mimeType,appIcon,gradeLevel,resourceType,identifier,medium,pkgVersion,board,subject,trackable,posterImage,duration,creatorLogo,license,version,versionKey,avgRating,additionalTags,${NsCardContent.IGOTConst.COMPETENCIES}&batchDetails=name,endDate,startDate,status,enrollmentType,createdBy,certificates,batchAttributes&retiredCoursesEnabled=true`, ɵ3$1 = /**
|
|
2846
|
-
* @param {?} userId
|
|
2847
|
-
* @param {?} orgdetails
|
|
2848
|
-
* @param {?} licenseDetails
|
|
2849
|
-
* @param {?} fields
|
|
2850
|
-
* @param {?} batchDetails
|
|
2851
|
-
* @return {?}
|
|
2852
|
-
*/
|
|
2853
|
-
(userId, orgdetails, licenseDetails, fields, batchDetails) =>
|
|
2854
|
-
// tslint:disable-next-line: max-line-length
|
|
2855
|
-
`apis/proxies/v8/learner/course/v2/user/enrollment/list/${userId}?orgdetails=${orgdetails}&licenseDetails=${licenseDetails}&fields=${fields},courseCategory,${NsCardContent.IGOTConst.COMPETENCIES}&batchDetails=${batchDetails}`;
|
|
2856
|
-
/** @type {?} */
|
|
2857
|
-
const API_END_POINTS$1 = {
|
|
2858
|
-
FETCH_USER_GROUPS: (ɵ0$1),
|
|
2859
|
-
FETCH_CPB_PLANS: `/apis/proxies/v8/user/v1/cbplan`,
|
|
2860
|
-
FETCH_USER_ENROLLMENT_LIST: (ɵ1$1),
|
|
2861
|
-
FETCH_USER_ENROLLMENT_LIST_PROFILE: (ɵ2$1),
|
|
2862
|
-
// tslint:disable-next-line: max-line-length
|
|
2863
|
-
FETCH_USER_ENROLLMENT_LIST_V2: (ɵ3$1),
|
|
2864
|
-
};
|
|
2865
|
-
class WidgetUserService {
|
|
2866
|
-
/**
|
|
2867
|
-
* @param {?} environment
|
|
2868
|
-
* @param {?} http
|
|
2869
|
-
*/
|
|
2870
|
-
constructor(environment, http) {
|
|
2871
|
-
this.http = http;
|
|
2872
|
-
this.environment = environment;
|
|
2873
|
-
}
|
|
2874
|
-
/**
|
|
2875
|
-
* @param {?} error
|
|
2876
|
-
* @return {?}
|
|
2877
|
-
*/
|
|
2878
|
-
handleError(error) {
|
|
2879
|
-
/** @type {?} */
|
|
2880
|
-
let errorMessage = '';
|
|
2881
|
-
if (error.error instanceof ErrorEvent) {
|
|
2882
|
-
errorMessage = `Error: ${error.error.message}`;
|
|
2883
|
-
}
|
|
2884
|
-
return throwError(errorMessage);
|
|
2885
|
-
}
|
|
2886
|
-
/**
|
|
2887
|
-
* @param {?} userId
|
|
2888
|
-
* @return {?}
|
|
2889
|
-
*/
|
|
2890
|
-
fetchUserGroupDetails(userId) {
|
|
2891
|
-
return this.http
|
|
2892
|
-
.get(API_END_POINTS$1.FETCH_USER_GROUPS(userId))
|
|
2893
|
-
.pipe(catchError(this.handleError));
|
|
2894
|
-
}
|
|
2895
|
-
// tslint:disable-next-line: max-line-length
|
|
2896
|
-
/**
|
|
2897
|
-
* @param {?} userId
|
|
2898
|
-
* @param {?=} queryParams
|
|
2899
|
-
* @return {?}
|
|
2900
|
-
*/
|
|
2901
|
-
fetchUserBatchList(userId, queryParams) {
|
|
2902
|
-
/** @type {?} */
|
|
2903
|
-
let path = '';
|
|
2904
|
-
if (queryParams) {
|
|
2905
|
-
// tslint:disable-next-line: max-line-length
|
|
2906
|
-
path = API_END_POINTS$1.FETCH_USER_ENROLLMENT_LIST_V2(userId, queryParams.orgdetails, queryParams.licenseDetails, queryParams.fields, queryParams.batchDetails);
|
|
2907
|
-
}
|
|
2908
|
-
else {
|
|
2909
|
-
path = API_END_POINTS$1.FETCH_USER_ENROLLMENT_LIST(userId);
|
|
2910
|
-
}
|
|
2911
|
-
/** @type {?} */
|
|
2912
|
-
const headers = new HttpHeaders({
|
|
2913
|
-
'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
|
|
2914
|
-
Pragma: 'no-cache',
|
|
2915
|
-
Expires: '0',
|
|
2916
|
-
});
|
|
2917
|
-
if (this.checkStorageData('enrollmentService', 'enrollmentData')) {
|
|
2918
|
-
/** @type {?} */
|
|
2919
|
-
const result = this.http.get(path, { headers }).pipe(catchError(this.handleError), map((/**
|
|
2920
|
-
* @param {?} data
|
|
2921
|
-
* @return {?}
|
|
2922
|
-
*/
|
|
2923
|
-
(data) => {
|
|
2924
|
-
/** @type {?} */
|
|
2925
|
-
const coursesData = [];
|
|
2926
|
-
if (data && data.result && data.result.courses) {
|
|
2927
|
-
data.result.courses.forEach((/**
|
|
2928
|
-
* @param {?} content
|
|
2929
|
-
* @return {?}
|
|
2930
|
-
*/
|
|
2931
|
-
(content) => {
|
|
2932
|
-
if (content.contentStatus) {
|
|
2933
|
-
delete content.contentStatus;
|
|
2934
|
-
}
|
|
2935
|
-
coursesData.push(content);
|
|
2936
|
-
}));
|
|
2937
|
-
this.storeUserEnrollmentInfo(data.result.userCourseEnrolmentInfo, data.result.courses.length);
|
|
2938
|
-
data.result.courses = coursesData;
|
|
2939
|
-
if (data.result.courses.length < 200) {
|
|
2940
|
-
localStorage.removeItem('enrollmentData');
|
|
2941
|
-
this.setTime('enrollmentService');
|
|
2942
|
-
localStorage.setItem('enrollmentData', JSON.stringify(data.result));
|
|
2943
|
-
this.mapEnrollmentData(data.result);
|
|
2944
|
-
return data.result;
|
|
2945
|
-
}
|
|
2946
|
-
}
|
|
2947
|
-
this.mapEnrollmentData(data.result);
|
|
2948
|
-
return data.result;
|
|
2949
|
-
})));
|
|
2950
|
-
return result;
|
|
2951
|
-
}
|
|
2952
|
-
return this.getData('enrollmentData');
|
|
2953
|
-
}
|
|
2954
|
-
// tslint:disable-next-line: max-line-length
|
|
2955
|
-
/**
|
|
2956
|
-
* @param {?} userId
|
|
2957
|
-
* @param {?=} queryParams
|
|
2958
|
-
* @return {?}
|
|
2959
|
-
*/
|
|
2960
|
-
fetchProfileUserBatchList(userId, queryParams) {
|
|
2961
|
-
/** @type {?} */
|
|
2962
|
-
let path = '';
|
|
2963
|
-
if (queryParams) {
|
|
2964
|
-
// tslint:disable-next-line: max-line-length
|
|
2965
|
-
path = API_END_POINTS$1.FETCH_USER_ENROLLMENT_LIST_V2(userId, queryParams.orgdetails, queryParams.licenseDetails, queryParams.fields, queryParams.batchDetails);
|
|
2966
|
-
}
|
|
2967
|
-
else {
|
|
2968
|
-
path = API_END_POINTS$1.FETCH_USER_ENROLLMENT_LIST_PROFILE(userId);
|
|
2969
|
-
}
|
|
2970
|
-
/** @type {?} */
|
|
2971
|
-
const headers = new HttpHeaders({
|
|
2972
|
-
'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
|
|
2973
|
-
Pragma: 'no-cache',
|
|
2974
|
-
Expires: '0',
|
|
2975
|
-
});
|
|
2976
|
-
return this.http
|
|
2977
|
-
.get(path, { headers })
|
|
2978
|
-
.pipe(catchError(this.handleError), map((/**
|
|
2979
|
-
* @param {?} data
|
|
2980
|
-
* @return {?}
|
|
2981
|
-
*/
|
|
2982
|
-
(data) => data.result)));
|
|
2983
|
-
// if (this.checkStorageData('enrollmentService')) {
|
|
2984
|
-
// const result: any = this.http.get(path, { headers }).pipe(catchError(this.handleError), map(
|
|
2985
|
-
// (data: any) => {
|
|
2986
|
-
// localStorage.setItem('enrollmentData', JSON.stringify(data.result))
|
|
2987
|
-
// this.mapEnrollmentData(data.result)
|
|
2988
|
-
// return data.result
|
|
2989
|
-
// }
|
|
2990
|
-
// )
|
|
2991
|
-
// )
|
|
2992
|
-
// this.setTime('enrollmentService')
|
|
2993
|
-
// return result
|
|
2994
|
-
// }
|
|
2995
|
-
// return this.getData('enrollmentData')
|
|
2996
|
-
}
|
|
2997
|
-
/**
|
|
2998
|
-
* @param {?} key
|
|
2999
|
-
* @param {?} dataKey
|
|
3000
|
-
* @return {?}
|
|
3001
|
-
*/
|
|
3002
|
-
checkStorageData(key, dataKey) {
|
|
3003
|
-
/** @type {?} */
|
|
3004
|
-
const checkTime = localStorage.getItem('timeCheck');
|
|
3005
|
-
if (checkTime) {
|
|
3006
|
-
/** @type {?} */
|
|
3007
|
-
const parsedData = JSON.parse(checkTime);
|
|
3008
|
-
if (parsedData[key]) {
|
|
3009
|
-
/** @type {?} */
|
|
3010
|
-
const date = dayjs();
|
|
3011
|
-
/** @type {?} */
|
|
3012
|
-
const diffMin = date.diff(parsedData[key], 'minute');
|
|
3013
|
-
/** @type {?} */
|
|
3014
|
-
const timeCheck = this.environment.apiCache || 0;
|
|
3015
|
-
if (diffMin >= timeCheck) {
|
|
3016
|
-
return true;
|
|
3017
|
-
}
|
|
3018
|
-
return localStorage.getItem(dataKey) ? false : true;
|
|
3019
|
-
}
|
|
3020
|
-
return true;
|
|
3021
|
-
}
|
|
3022
|
-
return true;
|
|
3023
|
-
}
|
|
3024
|
-
/**
|
|
3025
|
-
* @param {?} key
|
|
3026
|
-
* @return {?}
|
|
3027
|
-
*/
|
|
3028
|
-
getData(key) {
|
|
3029
|
-
return Observable.of(JSON.parse(localStorage.getItem(key) || '{}'));
|
|
3030
|
-
}
|
|
3031
|
-
/**
|
|
3032
|
-
* @param {?} key
|
|
3033
|
-
* @return {?}
|
|
3034
|
-
*/
|
|
3035
|
-
getSavedData(key) {
|
|
3036
|
-
return JSON.parse(localStorage.getItem(key) || '');
|
|
3037
|
-
}
|
|
3038
|
-
/**
|
|
3039
|
-
* @param {?} key
|
|
3040
|
-
* @return {?}
|
|
3041
|
-
*/
|
|
3042
|
-
setTime(key) {
|
|
3043
|
-
/** @type {?} */
|
|
3044
|
-
const checkTime = localStorage.getItem('timeCheck');
|
|
3045
|
-
if (checkTime) {
|
|
3046
|
-
/** @type {?} */
|
|
3047
|
-
const parsedData = JSON.parse(checkTime);
|
|
3048
|
-
parsedData[key] = new Date().getTime();
|
|
3049
|
-
localStorage.setItem('timeCheck', JSON.stringify(parsedData));
|
|
3050
|
-
}
|
|
3051
|
-
else {
|
|
3052
|
-
/** @type {?} */
|
|
3053
|
-
const data = {};
|
|
3054
|
-
data[key] = new Date().getTime();
|
|
3055
|
-
localStorage.setItem('timeCheck', JSON.stringify(data));
|
|
3056
|
-
}
|
|
3057
|
-
}
|
|
3058
|
-
/**
|
|
3059
|
-
* @param {?} key
|
|
3060
|
-
* @return {?}
|
|
3061
|
-
*/
|
|
3062
|
-
resetTime(key) {
|
|
3063
|
-
/** @type {?} */
|
|
3064
|
-
const checkTime = localStorage.getItem('timeCheck');
|
|
3065
|
-
if (checkTime) {
|
|
3066
|
-
/** @type {?} */
|
|
3067
|
-
const parsedData = JSON.parse(checkTime);
|
|
3068
|
-
if (parsedData[key]) {
|
|
3069
|
-
delete parsedData[key];
|
|
3070
|
-
localStorage.setItem('timeCheck', JSON.stringify(parsedData));
|
|
3071
|
-
}
|
|
3223
|
+
const translationKey = type + '.' + nlabel + subtype;
|
|
3224
|
+
return this.translate.instant(translationKey);
|
|
3072
3225
|
}
|
|
3226
|
+
// tslint:disable-next-line: prefer-template
|
|
3227
|
+
/** @type {?} */
|
|
3228
|
+
const translationKeyn = type + '.' + nlabel;
|
|
3229
|
+
return this.translate.instant(translationKeyn);
|
|
3073
3230
|
}
|
|
3074
3231
|
/**
|
|
3232
|
+
* @param {?} label
|
|
3233
|
+
* @param {?} type
|
|
3234
|
+
* @param {?} subtype
|
|
3075
3235
|
* @return {?}
|
|
3076
3236
|
*/
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
// if(!data) {
|
|
3080
|
-
// this.http.get(API_END_POINTS.FETCH_CPB_PLANS).pipe(catchError(this.handleError), map(
|
|
3081
|
-
// (data: any) => {
|
|
3082
|
-
// const courseData = this.mapData(data.result)
|
|
3083
|
-
// return courseData
|
|
3084
|
-
// }
|
|
3085
|
-
// )
|
|
3086
|
-
// )
|
|
3087
|
-
// } else {
|
|
3088
|
-
// return this.getData('cbpData')
|
|
3089
|
-
// }
|
|
3090
|
-
if (this.checkStorageData('cbpService', 'cbpData')) {
|
|
3237
|
+
translateLabel(label, type, subtype) {
|
|
3238
|
+
if (label) {
|
|
3091
3239
|
/** @type {?} */
|
|
3092
|
-
|
|
3093
|
-
|
|
3240
|
+
let nlabel = label;
|
|
3241
|
+
nlabel = nlabel && nlabel.toLowerCase();
|
|
3242
|
+
/** @type {?} */
|
|
3243
|
+
const sl = nlabel.split(' ');
|
|
3244
|
+
sl.forEach((/**
|
|
3245
|
+
* @param {?} w
|
|
3246
|
+
* @param {?} index
|
|
3094
3247
|
* @return {?}
|
|
3095
3248
|
*/
|
|
3096
|
-
(
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3249
|
+
(w, index) => {
|
|
3250
|
+
if (index !== 0) {
|
|
3251
|
+
sl[index] = w[0].toUpperCase() + w.slice(1);
|
|
3252
|
+
}
|
|
3253
|
+
}));
|
|
3254
|
+
nlabel = sl.join('');
|
|
3255
|
+
nlabel = nlabel.replace(/\s/g, '');
|
|
3256
|
+
if (subtype) {
|
|
3257
|
+
// tslint:disable-next-line: prefer-template
|
|
3258
|
+
/** @type {?} */
|
|
3259
|
+
const translationKey = type + '.' + nlabel + subtype;
|
|
3260
|
+
return this.translate.instant(translationKey);
|
|
3261
|
+
}
|
|
3262
|
+
// tslint:disable-next-line: prefer-template
|
|
3263
|
+
/** @type {?} */
|
|
3264
|
+
const translationKeyn = type + '.' + nlabel;
|
|
3265
|
+
return this.translate.instant(translationKeyn);
|
|
3101
3266
|
}
|
|
3102
|
-
return
|
|
3267
|
+
return label;
|
|
3103
3268
|
}
|
|
3104
3269
|
/**
|
|
3105
|
-
* @param {?}
|
|
3270
|
+
* @param {?} label
|
|
3271
|
+
* @param {?} type
|
|
3272
|
+
* @param {?} subtype
|
|
3106
3273
|
* @return {?}
|
|
3107
3274
|
*/
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
(c) => {
|
|
3122
|
-
c.contentList.forEach((/**
|
|
3123
|
-
* @param {?} childData
|
|
3124
|
-
* @return {?}
|
|
3125
|
-
*/
|
|
3126
|
-
(childData) => {
|
|
3127
|
-
/** @type {?} */
|
|
3128
|
-
const childEnrollData = enrollList[childData.identifier];
|
|
3129
|
-
/** @type {?} */
|
|
3130
|
-
const endDate = dayjs(c.endDate).format('YYYY-MM-DD');
|
|
3131
|
-
/** @type {?} */
|
|
3132
|
-
const daysCount = dayjs(endDate).diff(todayDate, 'day');
|
|
3133
|
-
childData['planDuration'] = daysCount < 0 ? NsCardContent.ACBPConst.OVERDUE : daysCount > 29
|
|
3134
|
-
? NsCardContent.ACBPConst.SUCCESS : NsCardContent.ACBPConst.UPCOMING;
|
|
3135
|
-
childData['endDate'] = c.endDate;
|
|
3136
|
-
childData['parentId'] = c.id;
|
|
3137
|
-
childData['planType'] = 'cbPlan';
|
|
3138
|
-
if (childData.status !== NsCardContent.IGOTConst.RETIRED) {
|
|
3139
|
-
contentNew.push(childData);
|
|
3140
|
-
}
|
|
3141
|
-
else {
|
|
3142
|
-
if (childEnrollData && childEnrollData.status === 2) {
|
|
3143
|
-
contentNew.push(childData);
|
|
3144
|
-
}
|
|
3145
|
-
}
|
|
3146
|
-
/** @type {?} */
|
|
3147
|
-
const competencyArea = [];
|
|
3148
|
-
/** @type {?} */
|
|
3149
|
-
const competencyTheme = [];
|
|
3150
|
-
/** @type {?} */
|
|
3151
|
-
const competencyThemeType = [];
|
|
3152
|
-
/** @type {?} */
|
|
3153
|
-
const competencySubTheme = [];
|
|
3154
|
-
/** @type {?} */
|
|
3155
|
-
const competencyAreaId = [];
|
|
3156
|
-
/** @type {?} */
|
|
3157
|
-
const competencyThemeId = [];
|
|
3158
|
-
/** @type {?} */
|
|
3159
|
-
const competencySubThemeId = [];
|
|
3160
|
-
childData['contentStatus'] = 0;
|
|
3161
|
-
if (childEnrollData) {
|
|
3162
|
-
childData['contentStatus'] = childEnrollData.status;
|
|
3163
|
-
}
|
|
3164
|
-
if (childData.competencies_v5) {
|
|
3165
|
-
childData.competencies_v5.forEach((/**
|
|
3166
|
-
* @param {?} element
|
|
3167
|
-
* @return {?}
|
|
3168
|
-
*/
|
|
3169
|
-
(element) => {
|
|
3170
|
-
if (!competencyArea.includes(element.competencyArea)) {
|
|
3171
|
-
competencyArea.push(element.competencyArea);
|
|
3172
|
-
competencyAreaId.push(element.competencyAreaId);
|
|
3173
|
-
}
|
|
3174
|
-
if (!competencyTheme.includes(element.competencyTheme)) {
|
|
3175
|
-
competencyTheme.push(element.competencyTheme);
|
|
3176
|
-
competencyThemeId.push(element.competencyThemeId);
|
|
3177
|
-
}
|
|
3178
|
-
if (!competencyThemeType.includes(element.competencyThemeType)) {
|
|
3179
|
-
competencyThemeType.push(element.competencyThemeType);
|
|
3180
|
-
}
|
|
3181
|
-
if (!competencySubTheme.includes(element.competencySubTheme)) {
|
|
3182
|
-
competencySubTheme.push(element.competencySubTheme);
|
|
3183
|
-
competencySubThemeId.push(element.competencySubThemeId);
|
|
3184
|
-
}
|
|
3185
|
-
}));
|
|
3186
|
-
}
|
|
3187
|
-
childData['competencyArea'] = competencyArea;
|
|
3188
|
-
childData['competencyTheme'] = competencyTheme;
|
|
3189
|
-
childData['competencyThemeType'] = competencyThemeType;
|
|
3190
|
-
childData['competencySubTheme'] = competencySubTheme;
|
|
3191
|
-
childData['competencyAreaId'] = competencyAreaId;
|
|
3192
|
-
childData['competencyThemeId'] = competencyThemeId;
|
|
3193
|
-
childData['competencySubThemeId'] = competencySubThemeId;
|
|
3194
|
-
}));
|
|
3195
|
-
}));
|
|
3196
|
-
if (contentNew.length > 1) {
|
|
3197
|
-
/** @type {?} */
|
|
3198
|
-
const sortedData = contentNew.sort((/**
|
|
3199
|
-
* @param {?} a
|
|
3200
|
-
* @param {?} b
|
|
3201
|
-
* @return {?}
|
|
3202
|
-
*/
|
|
3203
|
-
(a, b) => {
|
|
3204
|
-
/** @type {?} */
|
|
3205
|
-
const firstDate = new Date(a.endDate);
|
|
3206
|
-
/** @type {?} */
|
|
3207
|
-
const secondDate = new Date(b.endDate);
|
|
3208
|
-
return secondDate > firstDate ? 1 : -1;
|
|
3209
|
-
}));
|
|
3210
|
-
/** @type {?} */
|
|
3211
|
-
const uniqueUsersByID = uniqBy(sortedData, 'identifier');
|
|
3212
|
-
/** @type {?} */
|
|
3213
|
-
const sortedByEndDate = orderBy(uniqueUsersByID, ['endDate'], ['asc']);
|
|
3214
|
-
/** @type {?} */
|
|
3215
|
-
const sortedByStatus = orderBy(sortedByEndDate, ['contentStatus'], ['asc']);
|
|
3216
|
-
localStorage.setItem('cbpData', JSON.stringify(sortedByStatus));
|
|
3217
|
-
return sortedByStatus;
|
|
3218
|
-
}
|
|
3219
|
-
localStorage.setItem('cbpData', JSON.stringify(contentNew));
|
|
3220
|
-
return contentNew;
|
|
3275
|
+
translateActualLabel(label, type, subtype) {
|
|
3276
|
+
/** @type {?} */
|
|
3277
|
+
let nlabel = label;
|
|
3278
|
+
/** @type {?} */
|
|
3279
|
+
const sl = nlabel.split(' ');
|
|
3280
|
+
sl.forEach((/**
|
|
3281
|
+
* @param {?} w
|
|
3282
|
+
* @param {?} index
|
|
3283
|
+
* @return {?}
|
|
3284
|
+
*/
|
|
3285
|
+
(w, index) => {
|
|
3286
|
+
if (index !== 0) {
|
|
3287
|
+
sl[index] = w[0].toUpperCase() + w.slice(1);
|
|
3221
3288
|
}
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3289
|
+
}));
|
|
3290
|
+
nlabel = sl.join('');
|
|
3291
|
+
nlabel = nlabel.replace(/\s/g, '');
|
|
3292
|
+
if (subtype) {
|
|
3293
|
+
// tslint:disable-next-line: prefer-template
|
|
3294
|
+
/** @type {?} */
|
|
3295
|
+
const translationKey = type + '.' + nlabel + subtype;
|
|
3296
|
+
return this.translate.instant(translationKey);
|
|
3297
|
+
}
|
|
3298
|
+
// tslint:disable-next-line: prefer-template
|
|
3299
|
+
/** @type {?} */
|
|
3300
|
+
const translationKeyn = type + '.' + nlabel;
|
|
3301
|
+
return this.translate.instant(translationKeyn);
|
|
3225
3302
|
}
|
|
3226
3303
|
/**
|
|
3227
|
-
* @param {?}
|
|
3304
|
+
* @param {?} data
|
|
3228
3305
|
* @return {?}
|
|
3229
3306
|
*/
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
const enrollData = {};
|
|
3233
|
-
if (courseData && courseData.courses.length) {
|
|
3234
|
-
courseData.courses.forEach((/**
|
|
3235
|
-
* @param {?} data
|
|
3236
|
-
* @return {?}
|
|
3237
|
-
*/
|
|
3238
|
-
(data) => {
|
|
3239
|
-
enrollData[data.collectionId] = data;
|
|
3240
|
-
}));
|
|
3241
|
-
}
|
|
3242
|
-
localStorage.removeItem('enrollmentMapData');
|
|
3243
|
-
localStorage.setItem('enrollmentMapData', JSON.stringify(enrollData));
|
|
3307
|
+
editProfileDetailsAPI(data) {
|
|
3308
|
+
return this.http.post(this.editProfileDetails, data);
|
|
3244
3309
|
}
|
|
3245
3310
|
/**
|
|
3246
|
-
* @param {?}
|
|
3247
|
-
* @param {?}
|
|
3311
|
+
* @param {?} state
|
|
3312
|
+
* @param {?} lang
|
|
3313
|
+
* @param {?} userid
|
|
3248
3314
|
* @return {?}
|
|
3249
3315
|
*/
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3316
|
+
updatelanguageSelected(state, lang, userid) {
|
|
3317
|
+
this.languageSelected.next(state);
|
|
3318
|
+
this.translate.use(lang);
|
|
3319
|
+
this.selectedLang = lang;
|
|
3320
|
+
if (userid) {
|
|
3321
|
+
/** @type {?} */
|
|
3322
|
+
const reqUpdates = {
|
|
3323
|
+
request: {
|
|
3324
|
+
userId: userid,
|
|
3325
|
+
profileDetails: {
|
|
3326
|
+
additionalProperties: {
|
|
3327
|
+
webPortalLang: this.selectedLang,
|
|
3328
|
+
},
|
|
3329
|
+
},
|
|
3330
|
+
},
|
|
3331
|
+
};
|
|
3332
|
+
this.editProfileDetailsAPI(reqUpdates).subscribe();
|
|
3333
|
+
}
|
|
3258
3334
|
}
|
|
3259
3335
|
}
|
|
3260
|
-
|
|
3336
|
+
MultilingualTranslationsService.decorators = [
|
|
3261
3337
|
{ type: Injectable, args: [{
|
|
3262
3338
|
providedIn: 'root',
|
|
3263
3339
|
},] }
|
|
3264
3340
|
];
|
|
3265
3341
|
/** @nocollapse */
|
|
3266
|
-
|
|
3267
|
-
{ type:
|
|
3268
|
-
{ type: HttpClient }
|
|
3342
|
+
MultilingualTranslationsService.ctorParameters = () => [
|
|
3343
|
+
{ type: TranslateService },
|
|
3344
|
+
{ type: HttpClient },
|
|
3345
|
+
{ type: ConfigurationsService }
|
|
3269
3346
|
];
|
|
3270
|
-
/** @nocollapse */
|
|
3347
|
+
/** @nocollapse */ MultilingualTranslationsService.ngInjectableDef = ɵɵdefineInjectable({ factory: function MultilingualTranslationsService_Factory() { return new MultilingualTranslationsService(ɵɵinject(TranslateService), ɵɵinject(HttpClient), ɵɵinject(ConfigurationsService)); }, token: MultilingualTranslationsService, providedIn: "root" });
|
|
3271
3348
|
if (false) {
|
|
3272
3349
|
/** @type {?} */
|
|
3273
|
-
|
|
3350
|
+
MultilingualTranslationsService.prototype.selectedLang;
|
|
3351
|
+
/** @type {?} */
|
|
3352
|
+
MultilingualTranslationsService.prototype.languageSelected;
|
|
3353
|
+
/** @type {?} */
|
|
3354
|
+
MultilingualTranslationsService.prototype.languageSelectedObservable;
|
|
3355
|
+
/** @type {?} */
|
|
3356
|
+
MultilingualTranslationsService.prototype.editProfileDetails;
|
|
3357
|
+
/**
|
|
3358
|
+
* @type {?}
|
|
3359
|
+
* @private
|
|
3360
|
+
*/
|
|
3361
|
+
MultilingualTranslationsService.prototype.translate;
|
|
3274
3362
|
/**
|
|
3275
3363
|
* @type {?}
|
|
3276
3364
|
* @private
|
|
3277
3365
|
*/
|
|
3278
|
-
|
|
3366
|
+
MultilingualTranslationsService.prototype.http;
|
|
3367
|
+
/**
|
|
3368
|
+
* @type {?}
|
|
3369
|
+
* @private
|
|
3370
|
+
*/
|
|
3371
|
+
MultilingualTranslationsService.prototype.configSvc;
|
|
3279
3372
|
}
|
|
3280
3373
|
|
|
3281
3374
|
/**
|
|
@@ -3749,9 +3842,6 @@ class ContentStripWithTabsLibComponent extends WidgetBaseComponent {
|
|
|
3749
3842
|
this.fetchAllPlaylistSearch(strip, calculateParentStatus);
|
|
3750
3843
|
this.fetchPlaylistReadData(strip, calculateParentStatus);
|
|
3751
3844
|
this.fetchCiosContentData(strip, calculateParentStatus);
|
|
3752
|
-
// this.enrollInterval = setInterval(() => {
|
|
3753
|
-
// this.fetchAllCbpPlans(strip, calculateParentStatus)
|
|
3754
|
-
// }, 1000)
|
|
3755
3845
|
}
|
|
3756
3846
|
/**
|
|
3757
3847
|
* @param {?} strip
|
|
@@ -4010,13 +4100,41 @@ class ContentStripWithTabsLibComponent extends WidgetBaseComponent {
|
|
|
4010
4100
|
// console.log('calling after-- ')
|
|
4011
4101
|
if (response.results.result.content) {
|
|
4012
4102
|
if (strip.key === 'scheduledAssessment') {
|
|
4013
|
-
|
|
4103
|
+
/** @type {?} */
|
|
4104
|
+
let result = response.results.result.content.map((/**
|
|
4105
|
+
* @param {?} a
|
|
4106
|
+
* @return {?}
|
|
4107
|
+
*/
|
|
4108
|
+
a => a.identifier));
|
|
4109
|
+
/** @type {?} */
|
|
4110
|
+
const responseData = yield this.userSvc.fetchEnrollmentDataByContentId(this.configSvc.userProfile.userId, result.join(',')).toPromise().then((/**
|
|
4111
|
+
* @param {?} res
|
|
4112
|
+
* @return {?}
|
|
4113
|
+
*/
|
|
4114
|
+
(res) => __awaiter(this, void 0, void 0, function* () {
|
|
4115
|
+
/** @type {?} */
|
|
4116
|
+
const enrollData = {};
|
|
4117
|
+
if (res && res.courses && res.courses.length) {
|
|
4118
|
+
res.courses.forEach((/**
|
|
4119
|
+
* @param {?} data
|
|
4120
|
+
* @return {?}
|
|
4121
|
+
*/
|
|
4122
|
+
(data) => {
|
|
4123
|
+
enrollData[data.collectionId] = data;
|
|
4124
|
+
}));
|
|
4125
|
+
return enrollData;
|
|
4126
|
+
}
|
|
4127
|
+
else {
|
|
4128
|
+
return {};
|
|
4129
|
+
}
|
|
4130
|
+
}))).catch((/**
|
|
4131
|
+
* @param {?} _err
|
|
4014
4132
|
* @return {?}
|
|
4015
4133
|
*/
|
|
4016
|
-
() => {
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4134
|
+
(_err) => {
|
|
4135
|
+
return {};
|
|
4136
|
+
}));
|
|
4137
|
+
this.checkInvitOnlyAssessments(response.results.result.content, strip, calculateParentStatus, response.viewMoreUrl, responseData);
|
|
4020
4138
|
}
|
|
4021
4139
|
else {
|
|
4022
4140
|
this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
@@ -4046,11 +4164,12 @@ class ContentStripWithTabsLibComponent extends WidgetBaseComponent {
|
|
|
4046
4164
|
* @param {?} strip
|
|
4047
4165
|
* @param {?} calculateParentStatus
|
|
4048
4166
|
* @param {?} viewMoreUrl
|
|
4167
|
+
* @param {?} enrollmentData
|
|
4049
4168
|
* @return {?}
|
|
4050
4169
|
*/
|
|
4051
|
-
checkInvitOnlyAssessments(content, strip, calculateParentStatus, viewMoreUrl) {
|
|
4052
|
-
if (
|
|
4053
|
-
|
|
4170
|
+
checkInvitOnlyAssessments(content, strip, calculateParentStatus, viewMoreUrl, enrollmentData) {
|
|
4171
|
+
if (Object.keys(enrollmentData).length) {
|
|
4172
|
+
enrollmentData = enrollmentData;
|
|
4054
4173
|
/** @type {?} */
|
|
4055
4174
|
let filteredArray = [];
|
|
4056
4175
|
/** @type {?} */
|
|
@@ -4060,10 +4179,10 @@ class ContentStripWithTabsLibComponent extends WidgetBaseComponent {
|
|
|
4060
4179
|
* @return {?}
|
|
4061
4180
|
*/
|
|
4062
4181
|
(data) => {
|
|
4063
|
-
if (
|
|
4064
|
-
if (
|
|
4182
|
+
if (enrollmentData[data.identifier]) {
|
|
4183
|
+
if (enrollmentData[data.identifier].status !== 2 && enrollmentData[data.identifier].batch) {
|
|
4065
4184
|
/** @type {?} */
|
|
4066
|
-
const enrollData =
|
|
4185
|
+
const enrollData = enrollmentData[data.identifier].batch;
|
|
4067
4186
|
/** @type {?} */
|
|
4068
4187
|
let endDate = new Date(enrollData.endDate).getTime()
|
|
4069
4188
|
// let endDate:any = '2024-07-7T00:00:00.000Z'
|
|
@@ -4072,8 +4191,8 @@ class ContentStripWithTabsLibComponent extends WidgetBaseComponent {
|
|
|
4072
4191
|
/** @type {?} */
|
|
4073
4192
|
let timeDuration = endDate - now;
|
|
4074
4193
|
if (timeDuration > 0) {
|
|
4075
|
-
data['batch'] =
|
|
4076
|
-
data['completionPercentage'] =
|
|
4194
|
+
data['batch'] = enrollmentData[data.identifier].batch;
|
|
4195
|
+
data['completionPercentage'] = enrollmentData[data.identifier].completionPercentage;
|
|
4077
4196
|
filteredArray.push(data);
|
|
4078
4197
|
}
|
|
4079
4198
|
}
|
|
@@ -4092,7 +4211,6 @@ class ContentStripWithTabsLibComponent extends WidgetBaseComponent {
|
|
|
4092
4211
|
return dateA - dateB;
|
|
4093
4212
|
}));
|
|
4094
4213
|
this.processStrip(strip, this.transformContentsToWidgets(filteredArray, strip), 'done', calculateParentStatus, viewMoreUrl);
|
|
4095
|
-
clearInterval(this.enrollInterval);
|
|
4096
4214
|
}
|
|
4097
4215
|
}
|
|
4098
4216
|
/**
|
|
@@ -4705,7 +4823,9 @@ class ContentStripWithTabsLibComponent extends WidgetBaseComponent {
|
|
|
4705
4823
|
/** @type {?} */
|
|
4706
4824
|
let tabResults = [];
|
|
4707
4825
|
/** @type {?} */
|
|
4708
|
-
|
|
4826
|
+
let userId = this.configSvc.userProfile.userId;
|
|
4827
|
+
/** @type {?} */
|
|
4828
|
+
const response = yield this.userSvc.fetchCbpPlanList(userId).toPromise();
|
|
4709
4829
|
if (response) {
|
|
4710
4830
|
courses = response;
|
|
4711
4831
|
if (strip.tabs && strip.tabs.length) {
|
|
@@ -4716,33 +4836,6 @@ class ContentStripWithTabsLibComponent extends WidgetBaseComponent {
|
|
|
4716
4836
|
this.processStrip(strip, this.transformContentsToWidgets(courses, strip), 'done', calculateParentStatus, 'viewMoreUrl');
|
|
4717
4837
|
}
|
|
4718
4838
|
}
|
|
4719
|
-
// this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
|
|
4720
|
-
// if (res) {
|
|
4721
|
-
// console.log(res,'===============================>')
|
|
4722
|
-
// courses = res
|
|
4723
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
4724
|
-
// tabResults = this.splitCbpTabsData(courses, strip)
|
|
4725
|
-
// await this.processStrip(
|
|
4726
|
-
// strip,
|
|
4727
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
4728
|
-
// 'done',
|
|
4729
|
-
// calculateParentStatus,
|
|
4730
|
-
// '',
|
|
4731
|
-
// tabResults
|
|
4732
|
-
// )
|
|
4733
|
-
// } else {
|
|
4734
|
-
// this.processStrip(
|
|
4735
|
-
// strip,
|
|
4736
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
4737
|
-
// 'done',
|
|
4738
|
-
// calculateParentStatus,
|
|
4739
|
-
// 'viewMoreUrl',
|
|
4740
|
-
// )
|
|
4741
|
-
// }
|
|
4742
|
-
// }
|
|
4743
|
-
// }, (_err: any) => {
|
|
4744
|
-
// })
|
|
4745
|
-
clearInterval(this.enrollInterval);
|
|
4746
4839
|
}
|
|
4747
4840
|
});
|
|
4748
4841
|
}
|
|
@@ -5708,13 +5801,13 @@ ContentStripWithTabsLibComponent.decorators = [
|
|
|
5708
5801
|
/** @nocollapse */
|
|
5709
5802
|
ContentStripWithTabsLibComponent.ctorParameters = () => [
|
|
5710
5803
|
{ type: undefined, decorators: [{ type: Inject, args: ['environment',] }] },
|
|
5711
|
-
{ type:
|
|
5804
|
+
{ type: WidgetContentLibService },
|
|
5712
5805
|
{ type: LoggerService },
|
|
5713
5806
|
{ type: EventService },
|
|
5714
5807
|
{ type: ConfigurationsService$1 },
|
|
5715
5808
|
{ type: UtilityService },
|
|
5716
5809
|
{ type: Router },
|
|
5717
|
-
{ type:
|
|
5810
|
+
{ type: WidgetUserServiceLib },
|
|
5718
5811
|
{ type: TranslateService },
|
|
5719
5812
|
{ type: MultilingualTranslationsService }
|
|
5720
5813
|
];
|
|
@@ -5776,11 +5869,7 @@ if (false) {
|
|
|
5776
5869
|
/** @type {?} */
|
|
5777
5870
|
ContentStripWithTabsLibComponent.prototype.defaultMaxWidgets;
|
|
5778
5871
|
/** @type {?} */
|
|
5779
|
-
ContentStripWithTabsLibComponent.prototype.enrollInterval;
|
|
5780
|
-
/** @type {?} */
|
|
5781
5872
|
ContentStripWithTabsLibComponent.prototype.todaysEvents;
|
|
5782
|
-
/** @type {?} */
|
|
5783
|
-
ContentStripWithTabsLibComponent.prototype.enrollmentMapData;
|
|
5784
5873
|
/**
|
|
5785
5874
|
* @type {?}
|
|
5786
5875
|
* @private
|
|
@@ -7702,12 +7791,12 @@ CommonStripComponent.decorators = [
|
|
|
7702
7791
|
/** @nocollapse */
|
|
7703
7792
|
CommonStripComponent.ctorParameters = () => [
|
|
7704
7793
|
{ type: undefined, decorators: [{ type: Inject, args: ['environment',] }] },
|
|
7705
|
-
{ type:
|
|
7794
|
+
{ type: WidgetContentLibService },
|
|
7706
7795
|
{ type: LoggerService },
|
|
7707
7796
|
{ type: EventService },
|
|
7708
7797
|
{ type: ConfigurationsService$1 },
|
|
7709
7798
|
{ type: UtilityService },
|
|
7710
|
-
{ type:
|
|
7799
|
+
{ type: WidgetUserServiceLib },
|
|
7711
7800
|
{ type: TranslateService },
|
|
7712
7801
|
{ type: MultilingualTranslationsService },
|
|
7713
7802
|
{ type: CommonMethodsService }
|
|
@@ -8807,13 +8896,6 @@ class CardsComponent extends WidgetBaseComponent {
|
|
|
8807
8896
|
() => {
|
|
8808
8897
|
this.getCbPlanData();
|
|
8809
8898
|
}), 1000);
|
|
8810
|
-
this.enrollInterval = setInterval((/**
|
|
8811
|
-
* @return {?}
|
|
8812
|
-
*/
|
|
8813
|
-
() => {
|
|
8814
|
-
this.getEnrollmentData();
|
|
8815
|
-
// tslint:disable-next-line
|
|
8816
|
-
}), 1000);
|
|
8817
8899
|
}
|
|
8818
8900
|
/**
|
|
8819
8901
|
* @return {?}
|
|
@@ -8876,15 +8958,6 @@ class CardsComponent extends WidgetBaseComponent {
|
|
|
8876
8958
|
clearInterval(this.cbPlanInterval);
|
|
8877
8959
|
}
|
|
8878
8960
|
}
|
|
8879
|
-
/**
|
|
8880
|
-
* @return {?}
|
|
8881
|
-
*/
|
|
8882
|
-
getEnrollmentData() {
|
|
8883
|
-
if (localStorage.getItem('enrollmentMapData')) {
|
|
8884
|
-
this.enrollmentMapData = JSON.parse(localStorage.getItem('enrollmentMapData') || '{}');
|
|
8885
|
-
clearInterval(this.enrollInterval);
|
|
8886
|
-
}
|
|
8887
|
-
}
|
|
8888
8961
|
/**
|
|
8889
8962
|
* @param {?} data
|
|
8890
8963
|
* @return {?}
|
|
@@ -8896,14 +8969,14 @@ class CardsComponent extends WidgetBaseComponent {
|
|
|
8896
8969
|
CardsComponent.decorators = [
|
|
8897
8970
|
{ type: Component, args: [{
|
|
8898
8971
|
selector: 'sb-uic-cards',
|
|
8899
|
-
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-home-lib-skeleton'\" [ngTemplateOutlet]=\"cardMdoHomeSkeleton\"></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-providers-lib-skeleton'\" [ngTemplateOutlet]=\"cardProviderSkeleton\"></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 [isCardLoading]=\"false\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel-v1>\n</ng-template>\n<ng-template #cardMdoHomeSkeleton>\n <sb-uic-card-mdo-channel-v1 [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel-v1>\n</ng-template>\n<ng-template #cardMdo>\n <sb-uic-card-mdo-channel [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel>\n</ng-template>\n<ng-template #cardMdoSkeleton>\n <sb-uic-card-mdo-channel [isCardLoading]=\"true\" [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\"
|
|
8972
|
+
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-home-lib-skeleton'\" [ngTemplateOutlet]=\"cardMdoHomeSkeleton\"></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-providers-lib-skeleton'\" [ngTemplateOutlet]=\"cardProviderSkeleton\"></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 [isCardLoading]=\"false\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel-v1>\n</ng-template>\n<ng-template #cardMdoHomeSkeleton>\n <sb-uic-card-mdo-channel-v1 [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel-v1>\n</ng-template>\n<ng-template #cardMdo>\n <sb-uic-card-mdo-channel [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel>\n</ng-template>\n<ng-template #cardMdoSkeleton>\n <sb-uic-card-mdo-channel [isCardLoading]=\"true\" [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\" ></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 [isCardLoading]=\"false\" [widgetData]=\"widgetData\"></sb-uic-provider-card>\n</ng-template>\n<ng-template #cardProviderSkeleton>\n <sb-uic-provider-card [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></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",
|
|
8900
8973
|
styles: [""]
|
|
8901
8974
|
}] }
|
|
8902
8975
|
];
|
|
8903
8976
|
/** @nocollapse */
|
|
8904
8977
|
CardsComponent.ctorParameters = () => [
|
|
8905
8978
|
{ type: UtilityService },
|
|
8906
|
-
{ type:
|
|
8979
|
+
{ type: WidgetContentLibService },
|
|
8907
8980
|
{ type: Router }
|
|
8908
8981
|
];
|
|
8909
8982
|
CardsComponent.propDecorators = {
|
|
@@ -8921,10 +8994,6 @@ if (false) {
|
|
|
8921
8994
|
CardsComponent.prototype.cbPlanMapData;
|
|
8922
8995
|
/** @type {?} */
|
|
8923
8996
|
CardsComponent.prototype.cbPlanInterval;
|
|
8924
|
-
/** @type {?} */
|
|
8925
|
-
CardsComponent.prototype.enrollInterval;
|
|
8926
|
-
/** @type {?} */
|
|
8927
|
-
CardsComponent.prototype.enrollmentMapData;
|
|
8928
8997
|
/**
|
|
8929
8998
|
* @type {?}
|
|
8930
8999
|
* @private
|
|
@@ -9061,7 +9130,7 @@ CardPortraitComponent.ctorParameters = () => [
|
|
|
9061
9130
|
{ type: TranslateService },
|
|
9062
9131
|
{ type: MultilingualTranslationsService },
|
|
9063
9132
|
{ type: ConfigurationsService$1 },
|
|
9064
|
-
{ type:
|
|
9133
|
+
{ type: WidgetContentLibService }
|
|
9065
9134
|
];
|
|
9066
9135
|
CardPortraitComponent.propDecorators = {
|
|
9067
9136
|
widgetData: [{ type: Input }],
|
|
@@ -10080,7 +10149,7 @@ CardMDOChannelComponent.ctorParameters = () => [
|
|
|
10080
10149
|
{ type: TranslateService },
|
|
10081
10150
|
{ type: MultilingualTranslationsService$1 },
|
|
10082
10151
|
{ type: ConfigurationsService$1 },
|
|
10083
|
-
{ type:
|
|
10152
|
+
{ type: WidgetContentLibService },
|
|
10084
10153
|
{ type: Router }
|
|
10085
10154
|
];
|
|
10086
10155
|
CardMDOChannelComponent.propDecorators = {
|
|
@@ -10413,7 +10482,7 @@ CardKarmaProgramsComponent.ctorParameters = () => [
|
|
|
10413
10482
|
{ type: TranslateService },
|
|
10414
10483
|
{ type: MultilingualTranslationsService$1 },
|
|
10415
10484
|
{ type: ConfigurationsService$1 },
|
|
10416
|
-
{ type:
|
|
10485
|
+
{ type: WidgetContentLibService },
|
|
10417
10486
|
{ type: Router }
|
|
10418
10487
|
];
|
|
10419
10488
|
CardKarmaProgramsComponent.propDecorators = {
|
|
@@ -10809,7 +10878,7 @@ CardPortraitExtComponent.ctorParameters = () => [
|
|
|
10809
10878
|
{ type: TranslateService },
|
|
10810
10879
|
{ type: MultilingualTranslationsService },
|
|
10811
10880
|
{ type: ConfigurationsService$1 },
|
|
10812
|
-
{ type:
|
|
10881
|
+
{ type: WidgetContentLibService }
|
|
10813
10882
|
];
|
|
10814
10883
|
CardPortraitExtComponent.propDecorators = {
|
|
10815
10884
|
widgetData: [{ type: Input }],
|
|
@@ -10984,11 +11053,10 @@ CardAssessmentComponent.decorators = [
|
|
|
10984
11053
|
/** @nocollapse */
|
|
10985
11054
|
CardAssessmentComponent.ctorParameters = () => [
|
|
10986
11055
|
{ type: ConfigurationsService$1 },
|
|
10987
|
-
{ type:
|
|
11056
|
+
{ type: WidgetContentLibService }
|
|
10988
11057
|
];
|
|
10989
11058
|
CardAssessmentComponent.propDecorators = {
|
|
10990
11059
|
widgetData: [{ type: Input }],
|
|
10991
|
-
enrollmentMapData: [{ type: Input }],
|
|
10992
11060
|
contentData: [{ type: Output }],
|
|
10993
11061
|
isCardLoading: [{ type: Input }]
|
|
10994
11062
|
};
|
|
@@ -10996,8 +11064,6 @@ if (false) {
|
|
|
10996
11064
|
/** @type {?} */
|
|
10997
11065
|
CardAssessmentComponent.prototype.widgetData;
|
|
10998
11066
|
/** @type {?} */
|
|
10999
|
-
CardAssessmentComponent.prototype.enrollmentMapData;
|
|
11000
|
-
/** @type {?} */
|
|
11001
11067
|
CardAssessmentComponent.prototype.contentData;
|
|
11002
11068
|
/** @type {?} */
|
|
11003
11069
|
CardAssessmentComponent.prototype.isCardLoading;
|
|
@@ -11484,7 +11550,7 @@ CardProgressPortraitLibComponent.ctorParameters = () => [
|
|
|
11484
11550
|
{ type: EventService },
|
|
11485
11551
|
{ type: MultilingualTranslationsService },
|
|
11486
11552
|
{ type: ConfigurationsService$1 },
|
|
11487
|
-
{ type:
|
|
11553
|
+
{ type: WidgetContentLibService },
|
|
11488
11554
|
{ type: CertificateService },
|
|
11489
11555
|
{ type: MatDialog }
|
|
11490
11556
|
];
|
|
@@ -11804,7 +11870,7 @@ CardMdoChannelV1Component.ctorParameters = () => [
|
|
|
11804
11870
|
{ type: TranslateService },
|
|
11805
11871
|
{ type: MultilingualTranslationsService$1 },
|
|
11806
11872
|
{ type: ConfigurationsService$1 },
|
|
11807
|
-
{ type:
|
|
11873
|
+
{ type: WidgetContentLibService },
|
|
11808
11874
|
{ type: Router }
|
|
11809
11875
|
];
|
|
11810
11876
|
CardMdoChannelV1Component.propDecorators = {
|
|
@@ -13435,20 +13501,20 @@ class ContentStripFacetFilterComponent extends WidgetBaseComponent {
|
|
|
13435
13501
|
ContentStripFacetFilterComponent.decorators = [
|
|
13436
13502
|
{ type: Component, args: [{
|
|
13437
13503
|
selector: 'sb-uic-content-strip-facet-filter',
|
|
13438
|
-
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])\" class=\"block md:hidden\">\n <div \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 </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><span *ngIf=\"!tab?.disableTranslate\">{{ translateLabels(tab?.label, 'home') }}</span>\n <span *ngIf=\"tab?.disableTranslate\">{{tab?.label}}</span> </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 item-center flex-wrap gap-4\">\n <div class=\"\">\n <ng-container *ngFor=\"let facet of tab?.facets\">\n <form [formGroup]=\"facetForm\">\n <div class=\"facets-select\">\n <select formControlName=\"org\" (change)=\"getorgData($event, stripsResultDataMap[key], tabIndex)\">\n <option value=\"0\" selected disabled>Choose by organisation</option>\n <option value=\"{{d.name}}\" *ngFor=\"let d of facet.values\" >{{d.name}}</option>\n </select>\n </div>\n </form>\n </ng-container>\n </div>\n <div>\n <ng-container >\n <mat-chip-list class=\"content-pill-data\" 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=\"!stripsResultDataMap[key]?.hideViewMoreUrl && checkCondition(widgetData , stripsResultDataMap[key])\" class=\" hidden md:block\">\n <div 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 </div>\n \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 [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>",
|
|
13439
|
-
styles: ["@charset \"UTF-8\";.facets-select{position:relative;display:inline-block;width:250px}.facets-select select{appearance:none;-webkit-appearance:none;-moz-appearance:none;background-color:#fff;border:1px solid #ccc;border-radius:25px;padding:10px 30px 10px 10px;font-size:16px;font-family:Arial,sans-serif;width:100%;height:100%;cursor:pointer}.facets-select:after{content:\"\u25BC\";position:absolute;top:50%;right:10px;transform:translateY(-50%);pointer-events:none;font-size:14px;color:#555}::ng-deep mat-chip-list.content-pill-data .mat-chip-selected{background-color:#1b4ca1!important}::ng-deep mat-chip-list.content-pill-data .mat-chip-selected .pill-name{color:#fff!important}::ng-deep mat-chip-list.content-pill-data .mat-chip-list-wrapper .mat-chip{cursor:pointer!important}::ng-deep mat-chip-list.content-pill-data .mat-chip-list-wrapper .mat-chip.mat-standard-chip.mat-chip-selected.mat-primary{background:#1b4ca1!important;color:#fff!important}::ng-deep mat-chip-list.content-pill-data .mat-chip-list-wrapper .mat-chip.mat-standard-chip{background:#fff!important;border:1px solid rgba(0,0,0,.0784313725)!important}"]
|
|
13504
|
+
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])\" class=\"block md:hidden\">\n <div \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 </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><span *ngIf=\"!tab?.disableTranslate\">{{ translateLabels(tab?.label, 'home') }}</span>\n <span class=\"tab-highlight\" *ngIf=\"tab?.disableTranslate\">{{tab?.label}}</span> </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 item-center flex-wrap gap-4\">\n <div class=\"\">\n <ng-container *ngFor=\"let facet of tab?.facets\">\n <form [formGroup]=\"facetForm\">\n <div class=\"facets-select\">\n <select formControlName=\"org\" (change)=\"getorgData($event, stripsResultDataMap[key], tabIndex)\">\n <option value=\"0\" selected disabled>Choose by organisation</option>\n <option value=\"{{d.name}}\" *ngFor=\"let d of facet.values\" >{{d.name}}</option>\n </select>\n </div>\n </form>\n </ng-container>\n </div>\n <div>\n <ng-container >\n <mat-chip-list class=\"content-pill-data\" 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=\"!stripsResultDataMap[key]?.hideViewMoreUrl && checkCondition(widgetData , stripsResultDataMap[key])\" class=\" hidden md:block\">\n <div 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 </div>\n \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 [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>",
|
|
13505
|
+
styles: ["@charset \"UTF-8\";.facets-select{position:relative;display:inline-block;width:250px}.facets-select select{appearance:none;-webkit-appearance:none;-moz-appearance:none;background-color:#fff;border:1px solid #ccc;border-radius:25px;padding:10px 30px 10px 10px;font-size:16px;font-family:Arial,sans-serif;width:100%;height:100%;cursor:pointer}.facets-select:after{content:\"\u25BC\";position:absolute;top:50%;right:10px;transform:translateY(-50%);pointer-events:none;font-size:14px;color:#555}.tab-highlight{color:#1b4ca1!important;font-weight:700}::ng-deep mat-chip-list.content-pill-data .mat-chip-selected{background-color:#1b4ca1!important}::ng-deep mat-chip-list.content-pill-data .mat-chip-selected .pill-name{color:#fff!important}::ng-deep mat-chip-list.content-pill-data .mat-chip-list-wrapper .mat-chip{cursor:pointer!important}::ng-deep mat-chip-list.content-pill-data .mat-chip-list-wrapper .mat-chip.mat-standard-chip.mat-chip-selected.mat-primary{background:#1b4ca1!important;color:#fff!important}::ng-deep mat-chip-list.content-pill-data .mat-chip-list-wrapper .mat-chip.mat-standard-chip{background:#fff!important;border:1px solid rgba(0,0,0,.0784313725)!important}"]
|
|
13440
13506
|
}] }
|
|
13441
13507
|
];
|
|
13442
13508
|
/** @nocollapse */
|
|
13443
13509
|
ContentStripFacetFilterComponent.ctorParameters = () => [
|
|
13444
13510
|
{ type: undefined, decorators: [{ type: Inject, args: ['environment',] }] },
|
|
13445
|
-
{ type:
|
|
13511
|
+
{ type: WidgetContentLibService },
|
|
13446
13512
|
{ type: LoggerService },
|
|
13447
13513
|
{ type: EventService },
|
|
13448
13514
|
{ type: ConfigurationsService$1 },
|
|
13449
13515
|
{ type: UtilityService },
|
|
13450
13516
|
{ type: Router },
|
|
13451
|
-
{ type:
|
|
13517
|
+
{ type: WidgetUserServiceLib },
|
|
13452
13518
|
{ type: TranslateService },
|
|
13453
13519
|
{ type: MultilingualTranslationsService },
|
|
13454
13520
|
{ type: FormBuilder }
|
|
@@ -13515,8 +13581,6 @@ if (false) {
|
|
|
13515
13581
|
/** @type {?} */
|
|
13516
13582
|
ContentStripFacetFilterComponent.prototype.todaysEvents;
|
|
13517
13583
|
/** @type {?} */
|
|
13518
|
-
ContentStripFacetFilterComponent.prototype.enrollmentMapData;
|
|
13519
|
-
/** @type {?} */
|
|
13520
13584
|
ContentStripFacetFilterComponent.prototype.facetForm;
|
|
13521
13585
|
/**
|
|
13522
13586
|
* @type {?}
|
|
@@ -14828,7 +14892,9 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
14828
14892
|
/** @type {?} */
|
|
14829
14893
|
let tabResults = [];
|
|
14830
14894
|
/** @type {?} */
|
|
14831
|
-
|
|
14895
|
+
let userId = this.configSvc.userProfile.userId;
|
|
14896
|
+
/** @type {?} */
|
|
14897
|
+
const response = yield this.userSvc.fetchCbpPlanList(userId).toPromise();
|
|
14832
14898
|
if (response) {
|
|
14833
14899
|
courses = response;
|
|
14834
14900
|
if (strip.tabs && strip.tabs.length) {
|
|
@@ -15048,13 +15114,13 @@ ContentStripWithTabsPillsComponent.decorators = [
|
|
|
15048
15114
|
/** @nocollapse */
|
|
15049
15115
|
ContentStripWithTabsPillsComponent.ctorParameters = () => [
|
|
15050
15116
|
{ type: undefined, decorators: [{ type: Inject, args: ['environment',] }] },
|
|
15051
|
-
{ type:
|
|
15117
|
+
{ type: WidgetContentLibService },
|
|
15052
15118
|
{ type: LoggerService },
|
|
15053
15119
|
{ type: EventService },
|
|
15054
15120
|
{ type: ConfigurationsService$1 },
|
|
15055
15121
|
{ type: UtilityService },
|
|
15056
15122
|
{ type: Router },
|
|
15057
|
-
{ type:
|
|
15123
|
+
{ type: WidgetUserServiceLib },
|
|
15058
15124
|
{ type: TranslateService },
|
|
15059
15125
|
{ type: MultilingualTranslationsService }
|
|
15060
15126
|
];
|
|
@@ -15119,8 +15185,6 @@ if (false) {
|
|
|
15119
15185
|
ContentStripWithTabsPillsComponent.prototype.enrollInterval;
|
|
15120
15186
|
/** @type {?} */
|
|
15121
15187
|
ContentStripWithTabsPillsComponent.prototype.todaysEvents;
|
|
15122
|
-
/** @type {?} */
|
|
15123
|
-
ContentStripWithTabsPillsComponent.prototype.enrollmentMapData;
|
|
15124
15188
|
/**
|
|
15125
15189
|
* @type {?}
|
|
15126
15190
|
* @private
|
|
@@ -15843,7 +15907,7 @@ CompetencyPassbookComponent.decorators = [
|
|
|
15843
15907
|
/** @nocollapse */
|
|
15844
15908
|
CompetencyPassbookComponent.ctorParameters = () => [
|
|
15845
15909
|
{ type: ConfigurationsService$1 },
|
|
15846
|
-
{ type:
|
|
15910
|
+
{ type: WidgetContentLibService },
|
|
15847
15911
|
{ type: CompetencyPassbookService },
|
|
15848
15912
|
{ type: Router },
|
|
15849
15913
|
{ type: undefined, decorators: [{ type: Inject, args: ['environment',] }] }
|
|
@@ -16330,7 +16394,7 @@ CompetencyPassbookMdoComponent.decorators = [
|
|
|
16330
16394
|
/** @nocollapse */
|
|
16331
16395
|
CompetencyPassbookMdoComponent.ctorParameters = () => [
|
|
16332
16396
|
{ type: ConfigurationsService$1 },
|
|
16333
|
-
{ type:
|
|
16397
|
+
{ type: WidgetContentLibService },
|
|
16334
16398
|
{ type: CompetencyPassbookMdoService },
|
|
16335
16399
|
{ type: Router },
|
|
16336
16400
|
{ type: undefined, decorators: [{ type: Inject, args: ['environment',] }] }
|
|
@@ -17942,7 +18006,7 @@ class MdoLeaderboardComponent {
|
|
|
17942
18006
|
* @param {?} user
|
|
17943
18007
|
* @return {?}
|
|
17944
18008
|
*/
|
|
17945
|
-
user => (Object.assign({}, user, { children: [], selected: false }))));
|
|
18009
|
+
user => (Object.assign({}, user, { children: [], selected: false })))).slice(0, 5);
|
|
17946
18010
|
}
|
|
17947
18011
|
}), (/**
|
|
17948
18012
|
* @param {?} error
|
|
@@ -17969,7 +18033,7 @@ class MdoLeaderboardComponent {
|
|
|
17969
18033
|
* @param {?} user
|
|
17970
18034
|
* @return {?}
|
|
17971
18035
|
*/
|
|
17972
|
-
user => (Object.assign({}, user, { children: [], selected: false }))));
|
|
18036
|
+
user => (Object.assign({}, user, { children: [], selected: false })))).slice(0, 5);
|
|
17973
18037
|
/** @type {?} */
|
|
17974
18038
|
let nameStr = '';
|
|
17975
18039
|
switch (name) {
|
|
@@ -18030,7 +18094,7 @@ class MdoLeaderboardComponent {
|
|
|
18030
18094
|
* @param {?} user
|
|
18031
18095
|
* @return {?}
|
|
18032
18096
|
*/
|
|
18033
|
-
user => (Object.assign({}, user, { children: [] }))));
|
|
18097
|
+
user => (Object.assign({}, user, { children: [] })))).slice(0, 5);
|
|
18034
18098
|
}
|
|
18035
18099
|
else {
|
|
18036
18100
|
this.filteredData = this.result.mdoLeaderBoard
|
|
@@ -18043,7 +18107,7 @@ class MdoLeaderboardComponent {
|
|
|
18043
18107
|
* @param {?} user
|
|
18044
18108
|
* @return {?}
|
|
18045
18109
|
*/
|
|
18046
|
-
user => (Object.assign({}, user, { children: [] }))));
|
|
18110
|
+
user => (Object.assign({}, user, { children: [] })))).slice(0, 5);
|
|
18047
18111
|
}
|
|
18048
18112
|
}
|
|
18049
18113
|
/**
|
|
@@ -18056,7 +18120,7 @@ class MdoLeaderboardComponent {
|
|
|
18056
18120
|
MdoLeaderboardComponent.decorators = [
|
|
18057
18121
|
{ type: Component, args: [{
|
|
18058
18122
|
selector: 'sb-uic-mdo-leaderboard',
|
|
18059
|
-
template: "<div class=\"mdo-leaderboard-container\">\n <div class=\"flex l-title gap-2 items-center justify-between px-4 md:px-0 py-4 md:py-0\">\n <div class=\"flex gap-2\">\n {{object?.title}} <div><img [src]=\"object?.infoIcon\" alt=\"\" i18n-matTooltip [matTooltip]=\"object?.infoText\"></div>\n </div>\n <div class=\"block md:hidden\">\n <mat-icon (click)=\"toggleWeekHightlits()\">expand_more</mat-icon>\n </div>\n </div>\n <div class=\"flex item-center justify-center\" *ngIf=\"expand\">\n <div class=\"flex fl-div\">\n <div class=\"pointer\">\n <span class=\"dot-dot\"></span>\n </div>\n </div>\n </div>\n <div class=\"l-content\" *ngIf=\"expand\">\n <div class=\"horizontal-scroll-container\">\n <div class=\"scroll-content\">\n <span class=\"tab-title\" [ngClass]=\"{'active' : currentTab === 'XL' }\" (click)=\"getTabData('XL')\">Greater than 50K</span>\n <span class=\"tab-title\" [ngClass]=\"{'active' : currentTab === 'L' }\" (click)=\"getTabData('L')\">10K-50K</span>\n <span class=\"tab-title\" [ngClass]=\"{'active' : currentTab === 'M' }\" (click)=\"getTabData('M')\">1K-10K</span>\n <span class=\"tab-title\" [ngClass]=\"{'active' : currentTab === 'S' }\" (click)=\"getTabData('S')\">500-1K</span>\n <span class=\"tab-title\" [ngClass]=\"{'active' : currentTab === 'XS' }\" (click)=\"getTabData('XS')\">Less than 500</span>\n </div>\n </div>\n <div class=\"relative search-wrapper margin-top-m mb-5\">\n <mat-icon matPrefix class=\"flex absolute items-center justify-center mr-2 icon-search\">search\n </mat-icon>\n <input type=\"search\" name=\"searchKey\" class=\"search-field\" i18-aria-label\n aria-label=\"Search\" i18n-placeholder=\"search\" [(ngModel)]=\"searchTerm\"\n placeholder=\"Search your MDO\" (keyup)=\"handleSearchQuery($event)\" />\n </div>\n <div class=\"l-tab-data\">\n <div *ngFor=\"let user of filteredData\">\n <div class=\"flex flex-row item mb-5 gap-3 {{user.row_num === 1 ? 'relative' : ''}}\" >\n <div><img class=\"crown absolute\" src=\"assets/images/national-learning/rank-crown.svg\" *ngIf=\"user.row_num === 1\"/></div>\n <div class=\"{{getRank(user.row_num)}}\">{{user.row_num}}</div>\n <div class=\"w-full\">\n <div class=\"flex flex-between gap-2\">\n <div>\n <div class=\"rank-name\">{{user.org_name}}</div>\n <div class=\"rank-points flex mt-1 gap-1\">\n <img class=\"nlw-kb\" src=\"assets/icons/home/karma-badge.svg\"/>\n <div class=\"points\">{{user.total_points || 0 }} points</div>\n </div>\n </div>\n <div class=\"rank-crown\" *ngIf=\"[1,2,3].includes(user.row_num)\">\n <img class=\"nlw-animation\" [src]=\"getMedal(user.row_num)\"/>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"no-data px-1\" *ngIf=\"filteredData?.length === 0\">\n No data found!\n </div>\n </div>\n </div>\n</div>\n",
|
|
18123
|
+
template: "<div class=\"mdo-leaderboard-container\">\n <div class=\"flex l-title gap-2 items-center justify-between px-4 md:px-0 py-4 md:py-0\">\n <div class=\"flex gap-2\">\n {{object?.title}} <div><img [src]=\"object?.infoIcon\" alt=\"\" i18n-matTooltip [matTooltip]=\"object?.infoText\"></div>\n </div>\n <div class=\"block md:hidden\">\n <mat-icon (click)=\"toggleWeekHightlits()\">expand_more</mat-icon>\n </div>\n </div>\n <div class=\"flex item-center justify-center\" *ngIf=\"expand\">\n <div class=\"flex fl-div\">\n <div class=\"pointer\">\n <span class=\"dot-dot\"></span>\n </div>\n </div>\n </div>\n <div class=\"l-content\" *ngIf=\"expand\">\n <div class=\"horizontal-scroll-container\">\n <div class=\"scroll-content\">\n <span class=\"tab-title\" [ngClass]=\"{'active' : currentTab === 'XL' }\" (click)=\"getTabData('XL')\">Greater than 50K</span>\n <span class=\"tab-title\" [ngClass]=\"{'active' : currentTab === 'L' }\" (click)=\"getTabData('L')\">10K-50K</span>\n <span class=\"tab-title\" [ngClass]=\"{'active' : currentTab === 'M' }\" (click)=\"getTabData('M')\">1K-10K</span>\n <span class=\"tab-title\" [ngClass]=\"{'active' : currentTab === 'S' }\" (click)=\"getTabData('S')\">500-1K</span>\n <span class=\"tab-title\" [ngClass]=\"{'active' : currentTab === 'XS' }\" (click)=\"getTabData('XS')\">Less than 500</span>\n </div>\n </div>\n <div class=\"relative search-wrapper margin-top-m mb-5\">\n <mat-icon matPrefix class=\"flex absolute items-center justify-center mr-2 icon-search\">search\n </mat-icon>\n <input type=\"search\" name=\"searchKey\" class=\"search-field\" i18-aria-label\n aria-label=\"Search\" i18n-placeholder=\"search\" [(ngModel)]=\"searchTerm\"\n placeholder=\"Search your MDO\" (keyup)=\"handleSearchQuery($event)\" />\n </div>\n <div class=\"l-tab-data\">\n <div *ngFor=\"let user of filteredData; let i = index\">\n <div class=\"flex flex-row item mb-{{filteredData.length - 1 === i ? 0 : 5}} gap-3 {{user.row_num === 1 ? 'relative' : ''}}\" >\n <div><img class=\"crown absolute\" src=\"assets/images/national-learning/rank-crown.svg\" *ngIf=\"user.row_num === 1\"/></div>\n <div class=\"{{getRank(user.row_num)}}\">{{user.row_num}}</div>\n <div class=\"w-full\">\n <div class=\"flex flex-between gap-2\">\n <div>\n <div class=\"rank-name\">{{user.org_name}}</div>\n <div class=\"rank-points flex mt-1 gap-1\">\n <img class=\"nlw-kb\" src=\"assets/icons/home/karma-badge.svg\"/>\n <div class=\"points\">{{user.total_points || 0 }} points</div>\n </div>\n </div>\n <div class=\"rank-crown\" *ngIf=\"[1,2,3].includes(user.row_num)\">\n <img class=\"nlw-animation\" [src]=\"getMedal(user.row_num)\"/>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"no-data px-1\" *ngIf=\"filteredData?.length === 0\">\n No data found!\n </div>\n </div>\n </div>\n</div>\n",
|
|
18060
18124
|
styles: [".l-title{font-family:Montserrat;font-size:20px;font-weight:600;line-height:24.38px;text-align:left}.l-content{background-color:#e9eef6;border-radius:16px;padding:16px}.horizontal-scroll-container{overflow-x:auto;white-space:nowrap;-ms-overflow-style:none;scrollbar-width:none;height:32px}.horizontal-scroll-container::-webkit-scrollbar{display:none}.scroll-content{display:inline-block}.tab-title{font-family:Lato;font-size:14px;line-height:16.8px;text-align:left;cursor:pointer;padding:0 15px 8px;border-bottom:2px solid #c3c3c3}.active{font-weight:700;border-bottom:2px solid #1b4ca1}.search-field{height:34px;padding:0 16px 0 40px;border-radius:52px;background:#fff;border:2px solid rgba(0,0,0,.0784313725);width:100%}.icon-search{top:10px;left:15px;height:15px;width:17px}.item{border-radius:12px;background-color:#fff;padding:16px;align-items:flex-start}.rank1{background:#ffca28;font-family:Lato;font-size:14px;font-weight:700;line-height:9px;text-align:center;border-radius:50%;padding:10px}.rank2{background:#1b4ca1;font-family:Lato;font-size:14px;font-weight:700;line-height:9px;text-align:center;border-radius:50%;padding:10px;color:#fff}.rank3{background:#ff8228;font-family:Lato;font-size:14px;font-weight:700;line-height:9px;text-align:center;border-radius:50%;padding:10px}.rank0{font-family:Lato;font-size:14px;font-weight:700;line-height:9px;text-align:center;border-radius:50%;padding:10px;border:1px solid #c3c3c3}.rank-name{font-family:Montserrat;line-height:1.5em;font-size:16px;font-weight:600;text-align:left;align-items:center;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;line-clamp:2}.rank-points{align-items:center}.nlw-kb{height:24px;width:24px}.points{font-family:Lato;font-size:14px;font-weight:600;line-height:16.8px;text-align:right}.crown{left:10px;top:0;width:36px;height:36px}.l-tab-data{height:520px;overflow:auto;padding-bottom:16px}.l-tab-data::-webkit-scrollbar{display:none}.pointer{margin-bottom:-59px;border-radius:41px;background:#c3c3c3;border:35px solid #e9eef6}.dot-dot{width:7px;display:flex;height:7px;background:#c3c3c3;margin-top:-25px;border-radius:10px}@media screen and (min-width:320px) and (max-width:769px){.mdo-leaderboard-container{background-color:#d1dbec}}"]
|
|
18061
18125
|
}] }
|
|
18062
18126
|
];
|
|
@@ -18364,7 +18428,6 @@ class UserProgressComponent {
|
|
|
18364
18428
|
* @return {?}
|
|
18365
18429
|
*/
|
|
18366
18430
|
getUserProgress() {
|
|
18367
|
-
debugger;
|
|
18368
18431
|
this.insightSvc.fetchUserProgress().subscribe((/**
|
|
18369
18432
|
* @param {?} res
|
|
18370
18433
|
* @return {?}
|
|
@@ -18579,5 +18642,5 @@ NationalLearningModule.decorators = [
|
|
|
18579
18642
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
18580
18643
|
*/
|
|
18581
18644
|
|
|
18582
|
-
export { AnnouncementsModule, CalenderModule, CardsModule, CbpPlanModule, CommonMethodsService, CommonStripModule, CompetencyPassbookMdoModule, CompetencyPassbookModule, ConsumptionComponent, ConsumptionModule, ConsumptionService, ContentProgressModule, ContentStripFacetFilterModule, ContentStripWithTabsLibModule, ContentStripWithTabsPillsModule, DataPointsModule, DialogComponentsModule, EventsModule, HighlightsOfWeekModule, HttpLoaderFactory, HttpLoaderFactory1, KeyHighlightsModule, MDOChannelModule, MdoLeaderboardModule, MyHammerConfig, NationalLearningModule, ProvidersModule, ROOT_WIDGET_CONFIG, SlidersLibModule, SpeakersModule, TopLearnersModule, UserContentRatingLibModule, UserProgressModule, WIDGET_REGISTERED_LIB_MODULES, WIDGET_REGISTRATION_LIB_CONFIG,
|
|
18645
|
+
export { AnnouncementsModule, CalenderModule, CardsModule, CbpPlanModule, CommonMethodsService, CommonStripModule, CompetencyPassbookMdoModule, CompetencyPassbookModule, ConsumptionComponent, ConsumptionModule, ConsumptionService, ContentProgressModule, ContentStripFacetFilterModule, ContentStripWithTabsLibModule, ContentStripWithTabsPillsModule, DataPointsModule, DialogComponentsModule, EventsModule, HighlightsOfWeekModule, HttpLoaderFactory, HttpLoaderFactory1, KeyHighlightsModule, MDOChannelModule, MdoLeaderboardModule, MyHammerConfig, NationalLearningModule, ProvidersModule, ROOT_WIDGET_CONFIG, SlidersLibModule, SpeakersModule, TopLearnersModule, UserContentRatingLibModule, UserProgressModule, WIDGET_REGISTERED_LIB_MODULES, WIDGET_REGISTRATION_LIB_CONFIG, WidgetContentLibService, WidgetUserServiceLib, ContentStripWithTabsLibComponent as ɵa, MultilingualTranslationsService as ɵb, CardsComponent as ɵba, CardPortraitComponent as ɵbb, CardUserComponent as ɵbc, CardLandscapeComponent as ɵbd, CardWideComponent as ɵbe, CardMDOChannelComponent as ɵbf, CardWideV2Component as ɵbg, CardKarmaProgramsComponent as ɵbh, CardKarmaProgramsV2Component as ɵbi, ProviderCardComponent as ɵbj, CardPortraitExtComponent as ɵbk, CardAssessmentComponent as ɵbl, CardProgressPortraitLibComponent as ɵbm, CertificateService as ɵbn, CardMdoChannelV1Component as ɵbo, PipePublicURLModule as ɵbp, PipePublicURL as ɵbq, ObjectToArrayPipeModule as ɵbr, ObjectToArrayPipe as ɵbs, DisplayContentTypeLibModule as ɵbt, DisplayContentTypeLibComponent as ɵbu, DefaultThumbnailModule as ɵbv, DefaultThumbnailDirective as ɵbw, PipeDurationTransformModule as ɵbx, PipeDurationTransformPipe as ɵby, ContentProgressComponent as ɵbz, ConfigurationsService as ɵc, CertificateDialogComponent as ɵca, AvatarPhotoLibModule as ɵcb, AvatarPhotoLibComponent as ɵcc, ContentStripFacetFilterComponent as ɵcd, ContentStripWithTabsPillsComponent as ɵce, CompetencyPassbookComponent as ɵcf, CompetencyPassbookService as ɵcg, PillsModule as ɵch, PillsComponent as ɵci, CompetencyPassbookMdoComponent as ɵcj, CompetencyPassbookMdoService as ɵck, UserContentRatingLibComponent as ɵcl, RatingService as ɵcm, UserContentRatingLibService as ɵcn, MdoChannelV1Component as ɵco, MdoChannelV2Component as ɵcp, ProvidersV2Component as ɵcq, NationalLearningComponent as ɵcr, KeyHighlightsComponent as ɵcs, EventsComponent as ɵct, EventCardComponent as ɵcu, MdoLeaderboardComponent as ɵcv, HighlightsOfWeekComponent as ɵcw, SpeakersComponent as ɵcx, UserProgressComponent as ɵcy, HorizontalScrollerV2Module as ɵd, HorizontalScrollerV2Component as ɵe, SlidersLibComponent as ɵf, NavigationModule as ɵg, NavigationDirective as ɵh, ImageResponsiveModule as ɵi, ImageResponsiveDirective as ɵj, DataPointsComponent as ɵk, InsiteDataService as ɵl, SkeletonLoaderLibModule as ɵm, SkeletonLoaderLibComponent as ɵn, CalenderComponent as ɵo, CalenderDayComponent as ɵp, CommonStripComponent as ɵq, AnnouncementsComponent as ɵr, TopLearnersComponent as ɵs, CbpPlanComponent as ɵt, ScrollableItemDirective as ɵu, ScrollableItemModule as ɵv, MyHammerConfig$1 as ɵw, SlidersNgContentLibModule as ɵx, SlidersNgContentLibComponent as ɵy, CardResourceComponent as ɵz };
|
|
18583
18646
|
//# sourceMappingURL=sunbird-cb-consumption.js.map
|