@sunbird-cb/consumption 0.0.88 → 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 +1587 -1497
- 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/strips/content-strip-facet-filter/content-strip-facet-filter.component.js +5 -7
- 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/strips/content-strip-facet-filter/content-strip-facet-filter.component.js +5 -7
- 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 +1152 -1089
- package/fesm2015/sunbird-cb-consumption.js.map +1 -1
- package/fesm5/sunbird-cb-consumption.js +1512 -1422
- 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 { __assign, __awaiter, __generator, __extends, __values, __spread, __read } 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';
|
|
@@ -1474,691 +1474,1363 @@ function viewerRouteGenerator(id, mimeType, collectionId, collectionType, forPre
|
|
|
1474
1474
|
};
|
|
1475
1475
|
}
|
|
1476
1476
|
|
|
1477
|
+
/**
|
|
1478
|
+
* @fileoverview added by tsickle
|
|
1479
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1480
|
+
*/
|
|
1481
|
+
var NsCardContent;
|
|
1482
|
+
(function (NsCardContent) {
|
|
1483
|
+
/**
|
|
1484
|
+
* @record
|
|
1485
|
+
*/
|
|
1486
|
+
function ICard() { }
|
|
1487
|
+
NsCardContent.ICard = ICard;
|
|
1488
|
+
if (false) {
|
|
1489
|
+
/** @type {?} */
|
|
1490
|
+
ICard.prototype.content;
|
|
1491
|
+
/** @type {?} */
|
|
1492
|
+
ICard.prototype.cardSubType;
|
|
1493
|
+
/** @type {?} */
|
|
1494
|
+
ICard.prototype.context;
|
|
1495
|
+
/** @type {?|undefined} */
|
|
1496
|
+
ICard.prototype.intranetMode;
|
|
1497
|
+
/** @type {?|undefined} */
|
|
1498
|
+
ICard.prototype.deletedMode;
|
|
1499
|
+
/** @type {?|undefined} */
|
|
1500
|
+
ICard.prototype.likes;
|
|
1501
|
+
/** @type {?|undefined} */
|
|
1502
|
+
ICard.prototype.contentTags;
|
|
1503
|
+
/** @type {?} */
|
|
1504
|
+
ICard.prototype.stateData;
|
|
1505
|
+
}
|
|
1506
|
+
/**
|
|
1507
|
+
* @record
|
|
1508
|
+
*/
|
|
1509
|
+
function IContentTags() { }
|
|
1510
|
+
NsCardContent.IContentTags = IContentTags;
|
|
1511
|
+
if (false) {
|
|
1512
|
+
/** @type {?|undefined} */
|
|
1513
|
+
IContentTags.prototype.daysSpan;
|
|
1514
|
+
/** @type {?|undefined} */
|
|
1515
|
+
IContentTags.prototype.excludeContentType;
|
|
1516
|
+
/** @type {?|undefined} */
|
|
1517
|
+
IContentTags.prototype.excludeMimeType;
|
|
1518
|
+
/** @type {?} */
|
|
1519
|
+
IContentTags.prototype.tag;
|
|
1520
|
+
/** @type {?|undefined} */
|
|
1521
|
+
IContentTags.prototype.criteriaField;
|
|
1522
|
+
}
|
|
1523
|
+
/**
|
|
1524
|
+
* @record
|
|
1525
|
+
*/
|
|
1526
|
+
function ICompetency() { }
|
|
1527
|
+
NsCardContent.ICompetency = ICompetency;
|
|
1528
|
+
if (false) {
|
|
1529
|
+
/** @type {?} */
|
|
1530
|
+
ICompetency.prototype.competencyArea;
|
|
1531
|
+
/** @type {?} */
|
|
1532
|
+
ICompetency.prototype.competencyObject;
|
|
1533
|
+
}
|
|
1534
|
+
var EContentStatus;
|
|
1535
|
+
(function (EContentStatus) {
|
|
1536
|
+
EContentStatus["LIVE"] = "Live";
|
|
1537
|
+
EContentStatus["EXPIRED"] = "Expired";
|
|
1538
|
+
EContentStatus["DELETED"] = "Deleted";
|
|
1539
|
+
EContentStatus["MARK_FOR_DELETION"] = "MarkedForDeletion";
|
|
1540
|
+
})(EContentStatus = NsCardContent.EContentStatus || (NsCardContent.EContentStatus = {}));
|
|
1541
|
+
var ACBPConst;
|
|
1542
|
+
(function (ACBPConst) {
|
|
1543
|
+
ACBPConst["UPCOMING"] = "upcoming";
|
|
1544
|
+
ACBPConst["ALL"] = "All";
|
|
1545
|
+
ACBPConst["OVERDUE"] = "overdue";
|
|
1546
|
+
ACBPConst["SUCCESS"] = "success";
|
|
1547
|
+
})(ACBPConst = NsCardContent.ACBPConst || (NsCardContent.ACBPConst = {}));
|
|
1548
|
+
var IGOTConst;
|
|
1549
|
+
(function (IGOTConst) {
|
|
1550
|
+
IGOTConst["COMPETENCIES"] = "competencies_v5";
|
|
1551
|
+
IGOTConst["RETIRED"] = "Retired";
|
|
1552
|
+
})(IGOTConst = NsCardContent.IGOTConst || (NsCardContent.IGOTConst = {}));
|
|
1553
|
+
})(NsCardContent || (NsCardContent = {}));
|
|
1554
|
+
|
|
1477
1555
|
/**
|
|
1478
1556
|
* @fileoverview added by tsickle
|
|
1479
1557
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1480
1558
|
*/
|
|
1481
1559
|
/** @type {?} */
|
|
1482
|
-
var
|
|
1483
|
-
//
|
|
1484
|
-
|
|
1560
|
+
var dayjs = dayjs_
|
|
1561
|
+
// import { environment } from 'src/environments/environment'
|
|
1562
|
+
;
|
|
1485
1563
|
/** @type {?} */
|
|
1486
1564
|
var PROTECTED_SLAG_V8 = '/apis/protected/v8';
|
|
1487
1565
|
var ɵ0 = /**
|
|
1488
|
-
* @param {?}
|
|
1489
|
-
* @param {?} id
|
|
1566
|
+
* @param {?} userId
|
|
1490
1567
|
* @return {?}
|
|
1491
1568
|
*/
|
|
1492
|
-
function (
|
|
1493
|
-
return PROTECTED_SLAG_V8 + "/
|
|
1569
|
+
function (userId) {
|
|
1570
|
+
return PROTECTED_SLAG_V8 + "/user/group/fetchUserGroup?userId=" + userId;
|
|
1494
1571
|
}, ɵ1 = /**
|
|
1495
|
-
* @param {?}
|
|
1572
|
+
* @param {?} userId
|
|
1496
1573
|
* @return {?}
|
|
1497
1574
|
*/
|
|
1498
|
-
function (
|
|
1499
|
-
|
|
1575
|
+
function (userId) {
|
|
1576
|
+
// tslint:disable-next-line: max-line-length
|
|
1577
|
+
return "/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";
|
|
1578
|
+
}, ɵ2 = /**
|
|
1579
|
+
* @param {?} userId
|
|
1500
1580
|
* @return {?}
|
|
1501
1581
|
*/
|
|
1502
|
-
function (
|
|
1503
|
-
|
|
1582
|
+
function (userId) {
|
|
1583
|
+
// tslint:disable-next-line: max-line-length
|
|
1584
|
+
return "/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";
|
|
1585
|
+
}, ɵ3 = /**
|
|
1586
|
+
* @param {?} userId
|
|
1587
|
+
* @param {?} orgdetails
|
|
1588
|
+
* @param {?} licenseDetails
|
|
1589
|
+
* @param {?} fields
|
|
1590
|
+
* @param {?} batchDetails
|
|
1504
1591
|
* @return {?}
|
|
1505
1592
|
*/
|
|
1506
|
-
function (
|
|
1593
|
+
function (userId, orgdetails, licenseDetails, fields, batchDetails) {
|
|
1594
|
+
// tslint:disable-next-line: max-line-length
|
|
1595
|
+
return "apis/proxies/v8/learner/course/v2/user/enrollment/list/" + userId + "?orgdetails=" + orgdetails + "&licenseDetails=" + licenseDetails + "&fields=" + fields + ",courseCategory," + NsCardContent.IGOTConst.COMPETENCIES + "&batchDetails=" + batchDetails;
|
|
1596
|
+
};
|
|
1507
1597
|
/** @type {?} */
|
|
1508
1598
|
var API_END_POINTS = {
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
FETCH_WEB_MODULE_FILES: PROTECTED_SLAG_V8 + "/content/getWebModuleFiles",
|
|
1516
|
-
MULTIPLE_CONTENT: PROTECTED_SLAG_V8 + "/content/multiple",
|
|
1517
|
-
CONTENT_SEARCH_V5: PROTECTED_SLAG_V8 + "/content/searchV5",
|
|
1518
|
-
CONTENT_SEARCH_V6: "/apis/proxies/v8/sunbirdigot/search",
|
|
1519
|
-
TRENDING_CONTENT_SEARCH: "apis/proxies/v8/trending/content/search",
|
|
1520
|
-
CONTENT_SEARCH_RELATED_CBP_V6: "/apis/proxies/v8/sunbirdigot/search",
|
|
1521
|
-
CONTENT_SEARCH_REGION_RECOMMENDATION: PROTECTED_SLAG_V8 + "/content/searchRegionRecommendation",
|
|
1522
|
-
CONTENT_HISTORY: PROTECTED_SLAG_V8 + "/user/history",
|
|
1523
|
-
CONTENT_HISTORYV2: "/apis/proxies/v8/read/content-progres",
|
|
1524
|
-
COURSE_BATCH_LIST: "/apis/proxies/v8/learner/course/v1/batch/list",
|
|
1525
|
-
COURSE_BATCH: "/apis/proxies/v8/course/v1/batch/read",
|
|
1526
|
-
AUTO_ASSIGN_BATCH: "/apis/protected/v8/cohorts/user/autoenrollment/",
|
|
1527
|
-
AUTO_ASSIGN_CURATED_BATCH: "/apis/proxies/v8/curatedprogram/v1/enrol",
|
|
1528
|
-
AUTO_ASSIGN_OPEN_PROGRAM: "/apis/proxies/v8/openprogram/v1/enrol",
|
|
1529
|
-
USER_CONTINUE_LEARNING: PROTECTED_SLAG_V8 + "/user/history/continue",
|
|
1530
|
-
CONTENT_RATING: PROTECTED_SLAG_V8 + "/user/rating",
|
|
1531
|
-
COLLECTION_HIERARCHY: (ɵ0),
|
|
1532
|
-
REGISTRATION_STATUS: PROTECTED_SLAG_V8 + "/admin/userRegistration/checkUserRegistrationContent",
|
|
1533
|
-
MARK_AS_COMPLETE_META: (ɵ1),
|
|
1534
|
-
ENROLL_BATCH: "/apis/proxies/v8/learner/course/v1/enrol",
|
|
1535
|
-
ENROLL_BATCH_WF: "/apis/proxies/v8/workflow/blendedprogram/enrol",
|
|
1536
|
-
WITHDRAW_BATCH_WF: "/apis/proxies/v8/workflow/blendedprogram/unenrol",
|
|
1537
|
-
BLENDED_USER_WF: "/apis/proxies/v8/workflow/blendedprogram/user/search",
|
|
1538
|
-
BLENDED_USER_COUNT: "apis/proxies/v8/workflow/blendedprogram/enrol/status/count",
|
|
1539
|
-
CERT_ADD_TEMPLATE: PROTECTED_SLAG_V8 + "/cohorts/course/batch/cert/template/add",
|
|
1540
|
-
CERT_ISSUE: PROTECTED_SLAG_V8 + "/cohorts/course/batch/cert/issue",
|
|
1541
|
-
CERT_DOWNLOAD: (ɵ2),
|
|
1542
|
-
READ_KARMAPOINTS: "/apis/proxies/v8/karmapoints/read",
|
|
1543
|
-
CONTENT_READ: (ɵ3),
|
|
1544
|
-
READ_COURSE_KARMAPOINTS: '/apis/proxies/v8/karmapoints/user/course/read',
|
|
1545
|
-
CLAIM_KARMAPOINTS: '/apis/proxies/v8/claimkarmapoints',
|
|
1546
|
-
USER_KARMA_POINTS: '/apis/proxies/v8/user/totalkarmapoints',
|
|
1547
|
-
AGGREGATION_SEARCH: '/apis/proxies/v8/content/aggregation/search',
|
|
1548
|
-
FEATURE_SEARCH: '/apis/proxies/v8/featured/content/search',
|
|
1599
|
+
FETCH_USER_GROUPS: (ɵ0),
|
|
1600
|
+
FETCH_CPB_PLANS: "/apis/proxies/v8/user/v1/cbplan",
|
|
1601
|
+
FETCH_USER_ENROLLMENT_LIST: (ɵ1),
|
|
1602
|
+
FETCH_USER_ENROLLMENT_LIST_PROFILE: (ɵ2),
|
|
1603
|
+
// tslint:disable-next-line: max-line-length
|
|
1604
|
+
FETCH_USER_ENROLLMENT_LIST_V2: (ɵ3),
|
|
1549
1605
|
};
|
|
1550
|
-
var
|
|
1551
|
-
function
|
|
1606
|
+
var WidgetUserServiceLib = /** @class */ (function () {
|
|
1607
|
+
function WidgetUserServiceLib(environment, http) {
|
|
1552
1608
|
this.http = http;
|
|
1553
|
-
this.
|
|
1554
|
-
this.tocConfigData = new BehaviorSubject({});
|
|
1555
|
-
this.tocConfigData$ = this.tocConfigData.asObservable();
|
|
1556
|
-
this.telemetryData = new Subject();
|
|
1557
|
-
this.telemetryData$ = this.telemetryData.asObservable();
|
|
1558
|
-
this.programChildCourseResumeData = new BehaviorSubject({});
|
|
1559
|
-
this.programChildCourseResumeData$ = this.programChildCourseResumeData.asObservable();
|
|
1609
|
+
this.environment = environment;
|
|
1560
1610
|
}
|
|
1561
1611
|
/**
|
|
1562
|
-
* @param {?}
|
|
1612
|
+
* @param {?} error
|
|
1563
1613
|
* @return {?}
|
|
1564
1614
|
*/
|
|
1565
|
-
|
|
1566
|
-
* @param {?}
|
|
1615
|
+
WidgetUserServiceLib.prototype.handleError = /**
|
|
1616
|
+
* @param {?} error
|
|
1567
1617
|
* @return {?}
|
|
1568
1618
|
*/
|
|
1569
|
-
function (
|
|
1570
|
-
|
|
1619
|
+
function (error) {
|
|
1620
|
+
/** @type {?} */
|
|
1621
|
+
var errorMessage = '';
|
|
1622
|
+
if (error.error instanceof ErrorEvent) {
|
|
1623
|
+
errorMessage = "Error: " + error.error.message;
|
|
1624
|
+
}
|
|
1625
|
+
return throwError(errorMessage);
|
|
1571
1626
|
};
|
|
1572
1627
|
/**
|
|
1573
|
-
* @param {?}
|
|
1628
|
+
* @param {?} userId
|
|
1574
1629
|
* @return {?}
|
|
1575
1630
|
*/
|
|
1576
|
-
|
|
1577
|
-
* @param {?}
|
|
1631
|
+
WidgetUserServiceLib.prototype.fetchUserGroupDetails = /**
|
|
1632
|
+
* @param {?} userId
|
|
1578
1633
|
* @return {?}
|
|
1579
1634
|
*/
|
|
1580
|
-
function (
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
(primaryCategory === NsContent.EResourcePrimaryCategories.PRACTICE_RESOURCE) ||
|
|
1585
|
-
(primaryCategory === NsContent.EResourcePrimaryCategories.FINAL_ASSESSMENT) ||
|
|
1586
|
-
(primaryCategory === NsContent.EResourcePrimaryCategories.COMP_ASSESSMENT) ||
|
|
1587
|
-
(primaryCategory === NsContent.EResourcePrimaryCategories.OFFLINE_SESSION);
|
|
1588
|
-
return isResource;
|
|
1589
|
-
}
|
|
1590
|
-
return false;
|
|
1635
|
+
function (userId) {
|
|
1636
|
+
return this.http
|
|
1637
|
+
.get(API_END_POINTS.FETCH_USER_GROUPS(userId))
|
|
1638
|
+
.pipe(catchError(this.handleError));
|
|
1591
1639
|
};
|
|
1640
|
+
// tslint:disable-next-line: max-line-length
|
|
1641
|
+
// tslint:disable-next-line: max-line-length
|
|
1592
1642
|
/**
|
|
1593
|
-
* @param {?}
|
|
1643
|
+
* @param {?} userId
|
|
1644
|
+
* @param {?=} queryParams
|
|
1594
1645
|
* @return {?}
|
|
1595
1646
|
*/
|
|
1596
|
-
|
|
1597
|
-
|
|
1647
|
+
WidgetUserServiceLib.prototype.fetchUserBatchList =
|
|
1648
|
+
// tslint:disable-next-line: max-line-length
|
|
1649
|
+
/**
|
|
1650
|
+
* @param {?} userId
|
|
1651
|
+
* @param {?=} queryParams
|
|
1598
1652
|
* @return {?}
|
|
1599
1653
|
*/
|
|
1600
|
-
function (
|
|
1601
|
-
|
|
1654
|
+
function (userId, queryParams) {
|
|
1655
|
+
var _this = this;
|
|
1602
1656
|
/** @type {?} */
|
|
1603
|
-
var
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1657
|
+
var path = '';
|
|
1658
|
+
if (queryParams) {
|
|
1659
|
+
// tslint:disable-next-line: max-line-length
|
|
1660
|
+
path = API_END_POINTS.FETCH_USER_ENROLLMENT_LIST_V2(userId, queryParams.orgdetails, queryParams.licenseDetails, queryParams.fields, queryParams.batchDetails);
|
|
1661
|
+
}
|
|
1662
|
+
else {
|
|
1663
|
+
path = API_END_POINTS.FETCH_USER_ENROLLMENT_LIST(userId);
|
|
1664
|
+
}
|
|
1665
|
+
/** @type {?} */
|
|
1666
|
+
var headers = new HttpHeaders({
|
|
1667
|
+
'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
|
|
1668
|
+
Pragma: 'no-cache',
|
|
1669
|
+
Expires: '0',
|
|
1670
|
+
});
|
|
1671
|
+
/** @type {?} */
|
|
1672
|
+
var result = this.http.get(path, { headers: headers }).pipe(catchError(this.handleError), map((/**
|
|
1673
|
+
* @param {?} data
|
|
1674
|
+
* @return {?}
|
|
1675
|
+
*/
|
|
1676
|
+
function (data) {
|
|
1677
|
+
/** @type {?} */
|
|
1678
|
+
var coursesData = [];
|
|
1679
|
+
if (data && data.result && data.result.courses) {
|
|
1680
|
+
data.result.courses.forEach((/**
|
|
1681
|
+
* @param {?} content
|
|
1682
|
+
* @return {?}
|
|
1683
|
+
*/
|
|
1684
|
+
function (content) {
|
|
1685
|
+
if (content.contentStatus) {
|
|
1686
|
+
delete content.contentStatus;
|
|
1687
|
+
}
|
|
1688
|
+
coursesData.push(content);
|
|
1689
|
+
}));
|
|
1690
|
+
_this.storeUserEnrollmentInfo(data.result.userCourseEnrolmentInfo, data.result.courses.length);
|
|
1691
|
+
data.result.courses = coursesData;
|
|
1692
|
+
}
|
|
1693
|
+
return data.result;
|
|
1694
|
+
})));
|
|
1695
|
+
return result;
|
|
1609
1696
|
};
|
|
1697
|
+
// tslint:disable-next-line: max-line-length
|
|
1698
|
+
// tslint:disable-next-line: max-line-length
|
|
1610
1699
|
/**
|
|
1611
|
-
* @param {?}
|
|
1612
|
-
* @
|
|
1613
|
-
*/
|
|
1614
|
-
WidgetContentService.prototype.updateTocConfig = /**
|
|
1615
|
-
* @param {?} data
|
|
1700
|
+
* @param {?} userId
|
|
1701
|
+
* @param {?=} queryParams
|
|
1616
1702
|
* @return {?}
|
|
1617
1703
|
*/
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
};
|
|
1704
|
+
WidgetUserServiceLib.prototype.fetchProfileUserBatchList =
|
|
1705
|
+
// tslint:disable-next-line: max-line-length
|
|
1621
1706
|
/**
|
|
1622
|
-
* @param {?}
|
|
1623
|
-
* @param {?=}
|
|
1624
|
-
* @param {?=} _additionalFields
|
|
1625
|
-
* @param {?=} primaryCategory
|
|
1626
|
-
* @return {?}
|
|
1627
|
-
*/
|
|
1628
|
-
WidgetContentService.prototype.fetchContent = /**
|
|
1629
|
-
* @param {?} contentId
|
|
1630
|
-
* @param {?=} hierarchyType
|
|
1631
|
-
* @param {?=} _additionalFields
|
|
1632
|
-
* @param {?=} primaryCategory
|
|
1707
|
+
* @param {?} userId
|
|
1708
|
+
* @param {?=} queryParams
|
|
1633
1709
|
* @return {?}
|
|
1634
1710
|
*/
|
|
1635
|
-
function (
|
|
1636
|
-
if (hierarchyType === void 0) { hierarchyType = 'detail'; }
|
|
1637
|
-
if (_additionalFields === void 0) { _additionalFields = []; }
|
|
1638
|
-
// const url = `${API_END_POINTS.CONTENT}/${contentId}?hierarchyType=${hierarchyType}`
|
|
1711
|
+
function (userId, queryParams) {
|
|
1639
1712
|
/** @type {?} */
|
|
1640
|
-
var
|
|
1713
|
+
var path = '';
|
|
1714
|
+
if (queryParams) {
|
|
1715
|
+
// tslint:disable-next-line: max-line-length
|
|
1716
|
+
path = API_END_POINTS.FETCH_USER_ENROLLMENT_LIST_V2(userId, queryParams.orgdetails, queryParams.licenseDetails, queryParams.fields, queryParams.batchDetails);
|
|
1717
|
+
}
|
|
1718
|
+
else {
|
|
1719
|
+
path = API_END_POINTS.FETCH_USER_ENROLLMENT_LIST_PROFILE(userId);
|
|
1720
|
+
}
|
|
1641
1721
|
/** @type {?} */
|
|
1642
|
-
var
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
else {
|
|
1648
|
-
url = "/api/content/v1/read/" + contentId;
|
|
1649
|
-
}
|
|
1650
|
-
}
|
|
1651
|
-
else {
|
|
1652
|
-
if (!forPreview) {
|
|
1653
|
-
url = "/apis/proxies/v8/action/content/v3/hierarchy/" + contentId + "?hierarchyType=" + hierarchyType;
|
|
1654
|
-
}
|
|
1655
|
-
else {
|
|
1656
|
-
/** @type {?} */
|
|
1657
|
-
var forcreator = window.location.href.includes('editMode=true');
|
|
1658
|
-
if (forcreator) {
|
|
1659
|
-
url = "apis/proxies/v8/action/content/v3/hierarchy/" + contentId + "?mode=edit";
|
|
1660
|
-
}
|
|
1661
|
-
else {
|
|
1662
|
-
url = "/api/course/v1/hierarchy/" + contentId + "?hierarchyType=" + hierarchyType;
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
}
|
|
1666
|
-
// return this.http
|
|
1667
|
-
// .post<NsContent.IContent>(url, { additionalFields })
|
|
1668
|
-
// .pipe(retry(1))
|
|
1722
|
+
var headers = new HttpHeaders({
|
|
1723
|
+
'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
|
|
1724
|
+
Pragma: 'no-cache',
|
|
1725
|
+
Expires: '0',
|
|
1726
|
+
});
|
|
1669
1727
|
return this.http
|
|
1670
|
-
.get(
|
|
1671
|
-
.pipe(
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1728
|
+
.get(path, { headers: headers })
|
|
1729
|
+
.pipe(catchError(this.handleError), map((/**
|
|
1730
|
+
* @param {?} data
|
|
1731
|
+
* @return {?}
|
|
1732
|
+
*/
|
|
1733
|
+
function (data) { return data.result; })));
|
|
1675
1734
|
};
|
|
1676
1735
|
/**
|
|
1677
|
-
* @param {?}
|
|
1736
|
+
* @param {?} key
|
|
1737
|
+
* @param {?} dataKey
|
|
1678
1738
|
* @return {?}
|
|
1679
1739
|
*/
|
|
1680
|
-
|
|
1681
|
-
* @param {?}
|
|
1740
|
+
WidgetUserServiceLib.prototype.checkStorageData = /**
|
|
1741
|
+
* @param {?} key
|
|
1742
|
+
* @param {?} dataKey
|
|
1682
1743
|
* @return {?}
|
|
1683
1744
|
*/
|
|
1684
|
-
function (
|
|
1685
|
-
/** @type {?} */
|
|
1686
|
-
var forcreator = window.location.href.includes('editMode=true');
|
|
1745
|
+
function (key, dataKey) {
|
|
1687
1746
|
/** @type {?} */
|
|
1688
|
-
var
|
|
1689
|
-
if (
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1747
|
+
var checkTime = localStorage.getItem('timeCheck');
|
|
1748
|
+
if (checkTime) {
|
|
1749
|
+
/** @type {?} */
|
|
1750
|
+
var parsedData = JSON.parse(checkTime);
|
|
1751
|
+
if (parsedData[key]) {
|
|
1752
|
+
/** @type {?} */
|
|
1753
|
+
var date = dayjs();
|
|
1754
|
+
/** @type {?} */
|
|
1755
|
+
var diffMin = date.diff(parsedData[key], 'minute');
|
|
1756
|
+
/** @type {?} */
|
|
1757
|
+
var timeCheck = this.environment.apiCache || 0;
|
|
1758
|
+
if (diffMin >= timeCheck) {
|
|
1759
|
+
return true;
|
|
1760
|
+
}
|
|
1761
|
+
return localStorage.getItem(dataKey) ? false : true;
|
|
1762
|
+
}
|
|
1763
|
+
return true;
|
|
1694
1764
|
}
|
|
1695
|
-
return
|
|
1696
|
-
* @param {?} r
|
|
1697
|
-
* @return {?}
|
|
1698
|
-
*/
|
|
1699
|
-
function (r) { return r; }));
|
|
1765
|
+
return true;
|
|
1700
1766
|
};
|
|
1701
1767
|
/**
|
|
1702
|
-
* @param {?}
|
|
1768
|
+
* @param {?} key
|
|
1703
1769
|
* @return {?}
|
|
1704
1770
|
*/
|
|
1705
|
-
|
|
1706
|
-
* @param {?}
|
|
1771
|
+
WidgetUserServiceLib.prototype.getData = /**
|
|
1772
|
+
* @param {?} key
|
|
1707
1773
|
* @return {?}
|
|
1708
1774
|
*/
|
|
1709
|
-
function (
|
|
1710
|
-
return
|
|
1775
|
+
function (key) {
|
|
1776
|
+
return Observable.of(JSON.parse(localStorage.getItem(key) || '{}'));
|
|
1711
1777
|
};
|
|
1712
1778
|
/**
|
|
1713
|
-
* @param {?}
|
|
1714
|
-
* @param {?} id
|
|
1715
|
-
* @param {?=} pageNumber
|
|
1716
|
-
* @param {?=} pageSize
|
|
1779
|
+
* @param {?} key
|
|
1717
1780
|
* @return {?}
|
|
1718
1781
|
*/
|
|
1719
|
-
|
|
1720
|
-
* @param {?}
|
|
1721
|
-
* @param {?} id
|
|
1722
|
-
* @param {?=} pageNumber
|
|
1723
|
-
* @param {?=} pageSize
|
|
1782
|
+
WidgetUserServiceLib.prototype.getSavedData = /**
|
|
1783
|
+
* @param {?} key
|
|
1724
1784
|
* @return {?}
|
|
1725
1785
|
*/
|
|
1726
|
-
function (
|
|
1727
|
-
|
|
1728
|
-
if (pageSize === void 0) { pageSize = 1; }
|
|
1729
|
-
return this.http.get(API_END_POINTS.COLLECTION_HIERARCHY(type, id) + "?pageNumber=" + pageNumber + "&pageSize=" + pageSize);
|
|
1786
|
+
function (key) {
|
|
1787
|
+
return JSON.parse(localStorage.getItem(key) || '');
|
|
1730
1788
|
};
|
|
1731
1789
|
/**
|
|
1790
|
+
* @param {?} key
|
|
1732
1791
|
* @return {?}
|
|
1733
1792
|
*/
|
|
1734
|
-
|
|
1793
|
+
WidgetUserServiceLib.prototype.setTime = /**
|
|
1794
|
+
* @param {?} key
|
|
1735
1795
|
* @return {?}
|
|
1736
1796
|
*/
|
|
1737
|
-
function () {
|
|
1797
|
+
function (key) {
|
|
1798
|
+
/** @type {?} */
|
|
1799
|
+
var checkTime = localStorage.getItem('timeCheck');
|
|
1800
|
+
if (checkTime) {
|
|
1801
|
+
/** @type {?} */
|
|
1802
|
+
var parsedData = JSON.parse(checkTime);
|
|
1803
|
+
parsedData[key] = new Date().getTime();
|
|
1804
|
+
localStorage.setItem('timeCheck', JSON.stringify(parsedData));
|
|
1805
|
+
}
|
|
1806
|
+
else {
|
|
1807
|
+
/** @type {?} */
|
|
1808
|
+
var data = {};
|
|
1809
|
+
data[key] = new Date().getTime();
|
|
1810
|
+
localStorage.setItem('timeCheck', JSON.stringify(data));
|
|
1811
|
+
}
|
|
1738
1812
|
};
|
|
1739
1813
|
/**
|
|
1740
|
-
* @param {?}
|
|
1814
|
+
* @param {?} key
|
|
1741
1815
|
* @return {?}
|
|
1742
1816
|
*/
|
|
1743
|
-
|
|
1744
|
-
* @param {?}
|
|
1817
|
+
WidgetUserServiceLib.prototype.resetTime = /**
|
|
1818
|
+
* @param {?} key
|
|
1745
1819
|
* @return {?}
|
|
1746
1820
|
*/
|
|
1747
|
-
function (
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1821
|
+
function (key) {
|
|
1822
|
+
/** @type {?} */
|
|
1823
|
+
var checkTime = localStorage.getItem('timeCheck');
|
|
1824
|
+
if (checkTime) {
|
|
1825
|
+
/** @type {?} */
|
|
1826
|
+
var parsedData = JSON.parse(checkTime);
|
|
1827
|
+
if (parsedData[key]) {
|
|
1828
|
+
delete parsedData[key];
|
|
1829
|
+
localStorage.setItem('timeCheck', JSON.stringify(parsedData));
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1755
1832
|
};
|
|
1756
|
-
// fetch individual batch
|
|
1757
|
-
// fetch individual batch
|
|
1758
1833
|
/**
|
|
1759
|
-
* @param {?}
|
|
1834
|
+
* @param {?} userId
|
|
1760
1835
|
* @return {?}
|
|
1761
1836
|
*/
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
/**
|
|
1765
|
-
* @param {?} batchId
|
|
1837
|
+
WidgetUserServiceLib.prototype.fetchCbpPlanList = /**
|
|
1838
|
+
* @param {?} userId
|
|
1766
1839
|
* @return {?}
|
|
1767
1840
|
*/
|
|
1768
|
-
function (
|
|
1769
|
-
|
|
1841
|
+
function (userId) {
|
|
1842
|
+
var _this = this;
|
|
1843
|
+
if (this.checkStorageData('cbpService', 'cbpData')) {
|
|
1844
|
+
/** @type {?} */
|
|
1845
|
+
var result = this.http.get(API_END_POINTS.FETCH_CPB_PLANS).pipe(catchError(this.handleError), map((/**
|
|
1846
|
+
* @param {?} data
|
|
1847
|
+
* @return {?}
|
|
1848
|
+
*/
|
|
1849
|
+
function (data) { return __awaiter(_this, void 0, void 0, function () {
|
|
1850
|
+
var cbpData, cbpDoIds, cbpContentData, responseData;
|
|
1851
|
+
var _this = this;
|
|
1852
|
+
return __generator(this, function (_a) {
|
|
1853
|
+
switch (_a.label) {
|
|
1854
|
+
case 0:
|
|
1855
|
+
if (!(data.result && data.result.content && data.result.content.length)) return [3 /*break*/, 3];
|
|
1856
|
+
cbpData = this.getCbpFormatedData(data.result.content);
|
|
1857
|
+
cbpDoIds = cbpData.contentIds.join(',');
|
|
1858
|
+
cbpContentData = cbpData.cbpContentData || [];
|
|
1859
|
+
return [4 /*yield*/, this.fetchEnrollmentDataByContentId(userId, cbpDoIds).toPromise().then((/**
|
|
1860
|
+
* @param {?} res
|
|
1861
|
+
* @return {?}
|
|
1862
|
+
*/
|
|
1863
|
+
function (res) { return __awaiter(_this, void 0, void 0, function () {
|
|
1864
|
+
var enrollData;
|
|
1865
|
+
return __generator(this, function (_a) {
|
|
1866
|
+
enrollData = {};
|
|
1867
|
+
if (res && res.courses && res.courses.length) {
|
|
1868
|
+
res.courses.forEach((/**
|
|
1869
|
+
* @param {?} data
|
|
1870
|
+
* @return {?}
|
|
1871
|
+
*/
|
|
1872
|
+
function (data) {
|
|
1873
|
+
enrollData[data.collectionId] = data;
|
|
1874
|
+
}));
|
|
1875
|
+
return [2 /*return*/, enrollData];
|
|
1876
|
+
}
|
|
1877
|
+
else {
|
|
1878
|
+
return [2 /*return*/, {}];
|
|
1879
|
+
}
|
|
1880
|
+
return [2 /*return*/];
|
|
1881
|
+
});
|
|
1882
|
+
}); })).catch((/**
|
|
1883
|
+
* @param {?} _err
|
|
1884
|
+
* @return {?}
|
|
1885
|
+
*/
|
|
1886
|
+
function (_err) {
|
|
1887
|
+
return {};
|
|
1888
|
+
}))];
|
|
1889
|
+
case 1:
|
|
1890
|
+
responseData = _a.sent();
|
|
1891
|
+
return [4 /*yield*/, this.mapCbpData(cbpContentData, responseData)];
|
|
1892
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
1893
|
+
case 3: return [2 /*return*/];
|
|
1894
|
+
}
|
|
1895
|
+
});
|
|
1896
|
+
}); })));
|
|
1897
|
+
this.setTime('cbpService');
|
|
1898
|
+
return result;
|
|
1899
|
+
}
|
|
1900
|
+
return this.getData('cbpData');
|
|
1770
1901
|
};
|
|
1771
1902
|
/**
|
|
1772
|
-
* @param {?}
|
|
1903
|
+
* @param {?} enrollmentData
|
|
1904
|
+
* @param {?} enrolledCourseCount
|
|
1773
1905
|
* @return {?}
|
|
1774
1906
|
*/
|
|
1775
|
-
|
|
1776
|
-
* @param {?}
|
|
1907
|
+
WidgetUserServiceLib.prototype.storeUserEnrollmentInfo = /**
|
|
1908
|
+
* @param {?} enrollmentData
|
|
1909
|
+
* @param {?} enrolledCourseCount
|
|
1777
1910
|
* @return {?}
|
|
1778
1911
|
*/
|
|
1779
|
-
function (
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1912
|
+
function (enrollmentData, enrolledCourseCount) {
|
|
1913
|
+
/** @type {?} */
|
|
1914
|
+
var userData = {
|
|
1915
|
+
enrolledCourseCount: enrolledCourseCount,
|
|
1916
|
+
userCourseEnrolmentInfo: enrollmentData,
|
|
1917
|
+
};
|
|
1918
|
+
localStorage.removeItem('userEnrollmentCount');
|
|
1919
|
+
localStorage.setItem('userEnrollmentCount', JSON.stringify(userData));
|
|
1786
1920
|
};
|
|
1787
1921
|
/**
|
|
1788
|
-
* @param {?}
|
|
1789
|
-
* @param {?}
|
|
1922
|
+
* @param {?} userId
|
|
1923
|
+
* @param {?} contentdata
|
|
1790
1924
|
* @return {?}
|
|
1791
1925
|
*/
|
|
1792
|
-
|
|
1793
|
-
* @param {?}
|
|
1794
|
-
* @param {?}
|
|
1926
|
+
WidgetUserServiceLib.prototype.fetchEnrollmentDataByContentId = /**
|
|
1927
|
+
* @param {?} userId
|
|
1928
|
+
* @param {?} contentdata
|
|
1795
1929
|
* @return {?}
|
|
1796
1930
|
*/
|
|
1797
|
-
function (
|
|
1931
|
+
function (userId, contentdata) {
|
|
1798
1932
|
/** @type {?} */
|
|
1799
|
-
var
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1933
|
+
var path = API_END_POINTS.FETCH_USER_ENROLLMENT_LIST(userId);
|
|
1934
|
+
path = path + "&courseIds=" + contentdata + "&cache=false'";
|
|
1935
|
+
/** @type {?} */
|
|
1936
|
+
var headers = new HttpHeaders({
|
|
1937
|
+
'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
|
|
1938
|
+
Pragma: 'no-cache',
|
|
1939
|
+
Expires: '0',
|
|
1940
|
+
});
|
|
1941
|
+
return this.http
|
|
1942
|
+
.get(path, { headers: headers })
|
|
1943
|
+
.pipe(catchError(this.handleError), map((/**
|
|
1803
1944
|
* @param {?} data
|
|
1804
1945
|
* @return {?}
|
|
1805
1946
|
*/
|
|
1806
|
-
function (data) { return data.result
|
|
1807
|
-
};
|
|
1808
|
-
/**
|
|
1809
|
-
* @param {?} req
|
|
1810
|
-
* @return {?}
|
|
1811
|
-
*/
|
|
1812
|
-
WidgetContentService.prototype.enrollUserToBatch = /**
|
|
1813
|
-
* @param {?} req
|
|
1814
|
-
* @return {?}
|
|
1815
|
-
*/
|
|
1816
|
-
function (req) {
|
|
1817
|
-
return this.http
|
|
1818
|
-
.post(API_END_POINTS.ENROLL_BATCH, req)
|
|
1819
|
-
.toPromise();
|
|
1947
|
+
function (data) { return data.result; })));
|
|
1820
1948
|
};
|
|
1821
1949
|
/**
|
|
1822
|
-
* @param {?}
|
|
1823
|
-
* @param {?} type
|
|
1950
|
+
* @param {?} cbpContent
|
|
1824
1951
|
* @return {?}
|
|
1825
1952
|
*/
|
|
1826
|
-
|
|
1827
|
-
* @param {?}
|
|
1828
|
-
* @param {?} type
|
|
1953
|
+
WidgetUserServiceLib.prototype.getCbpFormatedData = /**
|
|
1954
|
+
* @param {?} cbpContent
|
|
1829
1955
|
* @return {?}
|
|
1830
1956
|
*/
|
|
1831
|
-
function (
|
|
1957
|
+
function (cbpContent) {
|
|
1832
1958
|
/** @type {?} */
|
|
1833
|
-
var
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1959
|
+
var cbpContentData = [];
|
|
1960
|
+
/** @type {?} */
|
|
1961
|
+
var contentIds = [];
|
|
1962
|
+
/** @type {?} */
|
|
1963
|
+
var todayDate = dayjs().format('YYYY-MM-DD');
|
|
1964
|
+
cbpContent.forEach((/**
|
|
1965
|
+
* @param {?} c
|
|
1966
|
+
* @return {?}
|
|
1967
|
+
*/
|
|
1968
|
+
function (c) {
|
|
1969
|
+
c.contentList.forEach((/**
|
|
1970
|
+
* @param {?} childData
|
|
1971
|
+
* @return {?}
|
|
1972
|
+
*/
|
|
1973
|
+
function (childData) {
|
|
1974
|
+
/** @type {?} */
|
|
1975
|
+
var endDate = dayjs(c.endDate).format('YYYY-MM-DD');
|
|
1976
|
+
/** @type {?} */
|
|
1977
|
+
var daysCount = dayjs(endDate).diff(todayDate, 'day');
|
|
1978
|
+
childData['planDuration'] = daysCount < 0 ? NsCardContent.ACBPConst.OVERDUE : daysCount > 29
|
|
1979
|
+
? NsCardContent.ACBPConst.SUCCESS : NsCardContent.ACBPConst.UPCOMING;
|
|
1980
|
+
childData['endDate'] = c.endDate;
|
|
1981
|
+
childData['parentId'] = c.id;
|
|
1982
|
+
childData['planType'] = 'cbPlan';
|
|
1983
|
+
childData['contentStatus'] = 0;
|
|
1984
|
+
contentIds.push(childData.identifier);
|
|
1985
|
+
if (childData.status !== NsCardContent.IGOTConst.RETIRED) {
|
|
1986
|
+
cbpContentData.push(childData);
|
|
1987
|
+
}
|
|
1988
|
+
}));
|
|
1989
|
+
}));
|
|
1990
|
+
return { cbpContentData: cbpContentData, contentIds: contentIds };
|
|
1837
1991
|
};
|
|
1838
1992
|
/**
|
|
1839
|
-
* @param {?}
|
|
1993
|
+
* @param {?} cbpContent
|
|
1994
|
+
* @param {?} enrollmentData
|
|
1840
1995
|
* @return {?}
|
|
1841
1996
|
*/
|
|
1842
|
-
|
|
1843
|
-
* @param {?}
|
|
1997
|
+
WidgetUserServiceLib.prototype.mapCbpData = /**
|
|
1998
|
+
* @param {?} cbpContent
|
|
1999
|
+
* @param {?} enrollmentData
|
|
1844
2000
|
* @return {?}
|
|
1845
2001
|
*/
|
|
1846
|
-
function (
|
|
1847
|
-
return this
|
|
1848
|
-
|
|
1849
|
-
|
|
2002
|
+
function (cbpContent, enrollmentData) {
|
|
2003
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2004
|
+
var cbpFilteredContent, sortedData, uniqueUsersByID, sortedByEndDate, sortedByStatus;
|
|
2005
|
+
return __generator(this, function (_a) {
|
|
2006
|
+
cbpFilteredContent = [];
|
|
2007
|
+
if (cbpContent && cbpContent.length) {
|
|
2008
|
+
if (Object.keys(enrollmentData).length) {
|
|
2009
|
+
cbpContent.forEach((/**
|
|
2010
|
+
* @param {?} cbp
|
|
2011
|
+
* @return {?}
|
|
2012
|
+
*/
|
|
2013
|
+
function (cbp) {
|
|
2014
|
+
/** @type {?} */
|
|
2015
|
+
var childEnrollData = enrollmentData[cbp.identifier];
|
|
2016
|
+
/** @type {?} */
|
|
2017
|
+
var competencyArea = [];
|
|
2018
|
+
/** @type {?} */
|
|
2019
|
+
var competencyTheme = [];
|
|
2020
|
+
/** @type {?} */
|
|
2021
|
+
var competencyThemeType = [];
|
|
2022
|
+
/** @type {?} */
|
|
2023
|
+
var competencySubTheme = [];
|
|
2024
|
+
/** @type {?} */
|
|
2025
|
+
var competencyAreaId = [];
|
|
2026
|
+
/** @type {?} */
|
|
2027
|
+
var competencyThemeId = [];
|
|
2028
|
+
/** @type {?} */
|
|
2029
|
+
var competencySubThemeId = [];
|
|
2030
|
+
cbp['contentStatus'] = 0;
|
|
2031
|
+
if (childEnrollData) {
|
|
2032
|
+
cbp['contentStatus'] = childEnrollData.status;
|
|
2033
|
+
}
|
|
2034
|
+
if (cbp.competencies_v5) {
|
|
2035
|
+
cbp.competencies_v5.forEach((/**
|
|
2036
|
+
* @param {?} element
|
|
2037
|
+
* @return {?}
|
|
2038
|
+
*/
|
|
2039
|
+
function (element) {
|
|
2040
|
+
if (!competencyArea.includes(element.competencyArea)) {
|
|
2041
|
+
competencyArea.push(element.competencyArea);
|
|
2042
|
+
competencyAreaId.push(element.competencyAreaId);
|
|
2043
|
+
}
|
|
2044
|
+
if (!competencyTheme.includes(element.competencyTheme)) {
|
|
2045
|
+
competencyTheme.push(element.competencyTheme);
|
|
2046
|
+
competencyThemeId.push(element.competencyThemeId);
|
|
2047
|
+
}
|
|
2048
|
+
if (!competencyThemeType.includes(element.competencyThemeType)) {
|
|
2049
|
+
competencyThemeType.push(element.competencyThemeType);
|
|
2050
|
+
}
|
|
2051
|
+
if (!competencySubTheme.includes(element.competencySubTheme)) {
|
|
2052
|
+
competencySubTheme.push(element.competencySubTheme);
|
|
2053
|
+
competencySubThemeId.push(element.competencySubThemeId);
|
|
2054
|
+
}
|
|
2055
|
+
}));
|
|
2056
|
+
}
|
|
2057
|
+
cbp['competencyArea'] = competencyArea;
|
|
2058
|
+
cbp['competencyTheme'] = competencyTheme;
|
|
2059
|
+
cbp['competencyThemeType'] = competencyThemeType;
|
|
2060
|
+
cbp['competencySubTheme'] = competencySubTheme;
|
|
2061
|
+
cbp['competencyAreaId'] = competencyAreaId;
|
|
2062
|
+
cbp['competencyThemeId'] = competencyThemeId;
|
|
2063
|
+
cbp['competencySubThemeId'] = competencySubThemeId;
|
|
2064
|
+
if (cbp.status !== NsCardContent.IGOTConst.RETIRED) {
|
|
2065
|
+
cbpFilteredContent.push(cbp);
|
|
2066
|
+
}
|
|
2067
|
+
else {
|
|
2068
|
+
if (childEnrollData && childEnrollData.status === 2) {
|
|
2069
|
+
cbpFilteredContent.push(cbp);
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
}));
|
|
2073
|
+
if (cbpFilteredContent.length > 1) {
|
|
2074
|
+
sortedData = cbpFilteredContent.sort((/**
|
|
2075
|
+
* @param {?} a
|
|
2076
|
+
* @param {?} b
|
|
2077
|
+
* @return {?}
|
|
2078
|
+
*/
|
|
2079
|
+
function (a, b) {
|
|
2080
|
+
/** @type {?} */
|
|
2081
|
+
var firstDate = new Date(a.endDate);
|
|
2082
|
+
/** @type {?} */
|
|
2083
|
+
var secondDate = new Date(b.endDate);
|
|
2084
|
+
return secondDate > firstDate ? 1 : -1;
|
|
2085
|
+
}));
|
|
2086
|
+
uniqueUsersByID = uniqBy(sortedData, 'identifier');
|
|
2087
|
+
sortedByEndDate = orderBy(uniqueUsersByID, ['endDate'], ['asc']);
|
|
2088
|
+
sortedByStatus = orderBy(sortedByEndDate, ['contentStatus'], ['asc']);
|
|
2089
|
+
localStorage.setItem('cbpData', JSON.stringify(sortedByStatus));
|
|
2090
|
+
return [2 /*return*/, sortedByStatus];
|
|
2091
|
+
}
|
|
2092
|
+
localStorage.setItem('cbpData', JSON.stringify(cbpFilteredContent));
|
|
2093
|
+
return [2 /*return*/, cbpFilteredContent];
|
|
2094
|
+
}
|
|
2095
|
+
localStorage.setItem('cbpData', JSON.stringify(cbpContent));
|
|
2096
|
+
return [2 /*return*/, cbpContent];
|
|
2097
|
+
}
|
|
2098
|
+
localStorage.setItem('cbpData', JSON.stringify([]));
|
|
2099
|
+
return [2 /*return*/, []];
|
|
2100
|
+
});
|
|
2101
|
+
});
|
|
1850
2102
|
};
|
|
1851
2103
|
/**
|
|
1852
|
-
* @param {?}
|
|
2104
|
+
* @param {?} courseData
|
|
1853
2105
|
* @return {?}
|
|
1854
2106
|
*/
|
|
1855
|
-
|
|
1856
|
-
* @param {?}
|
|
2107
|
+
WidgetUserServiceLib.prototype.mapEnrollmentData = /**
|
|
2108
|
+
* @param {?} courseData
|
|
1857
2109
|
* @return {?}
|
|
1858
2110
|
*/
|
|
1859
|
-
function (
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
2111
|
+
function (courseData) {
|
|
2112
|
+
/** @type {?} */
|
|
2113
|
+
var enrollData = {};
|
|
2114
|
+
if (courseData && courseData.courses.length) {
|
|
2115
|
+
courseData.courses.forEach((/**
|
|
2116
|
+
* @param {?} data
|
|
2117
|
+
* @return {?}
|
|
2118
|
+
*/
|
|
2119
|
+
function (data) {
|
|
2120
|
+
enrollData[data.collectionId] = data;
|
|
2121
|
+
}));
|
|
2122
|
+
}
|
|
2123
|
+
return enrollData;
|
|
1863
2124
|
};
|
|
2125
|
+
WidgetUserServiceLib.decorators = [
|
|
2126
|
+
{ type: Injectable, args: [{
|
|
2127
|
+
providedIn: 'root',
|
|
2128
|
+
},] }
|
|
2129
|
+
];
|
|
2130
|
+
/** @nocollapse */
|
|
2131
|
+
WidgetUserServiceLib.ctorParameters = function () { return [
|
|
2132
|
+
{ type: undefined, decorators: [{ type: Inject, args: ['environment',] }] },
|
|
2133
|
+
{ type: HttpClient }
|
|
2134
|
+
]; };
|
|
2135
|
+
/** @nocollapse */ WidgetUserServiceLib.ngInjectableDef = ɵɵdefineInjectable({ factory: function WidgetUserServiceLib_Factory() { return new WidgetUserServiceLib(ɵɵinject("environment"), ɵɵinject(HttpClient)); }, token: WidgetUserServiceLib, providedIn: "root" });
|
|
2136
|
+
return WidgetUserServiceLib;
|
|
2137
|
+
}());
|
|
2138
|
+
if (false) {
|
|
2139
|
+
/** @type {?} */
|
|
2140
|
+
WidgetUserServiceLib.prototype.environment;
|
|
1864
2141
|
/**
|
|
1865
|
-
* @
|
|
2142
|
+
* @type {?}
|
|
2143
|
+
* @private
|
|
2144
|
+
*/
|
|
2145
|
+
WidgetUserServiceLib.prototype.http;
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
/**
|
|
2149
|
+
* @fileoverview added by tsickle
|
|
2150
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2151
|
+
*/
|
|
2152
|
+
/** @type {?} */
|
|
2153
|
+
var moment = moment$4;
|
|
2154
|
+
// tslint:enable
|
|
2155
|
+
// TODO: move this in some common place
|
|
2156
|
+
/** @type {?} */
|
|
2157
|
+
var PROTECTED_SLAG_V8$1 = '/apis/protected/v8';
|
|
2158
|
+
var ɵ0$1 = /**
|
|
2159
|
+
* @param {?} type
|
|
2160
|
+
* @param {?} id
|
|
2161
|
+
* @return {?}
|
|
2162
|
+
*/
|
|
2163
|
+
function (type, id) {
|
|
2164
|
+
return PROTECTED_SLAG_V8$1 + "/content/collection/" + type + "/" + id;
|
|
2165
|
+
}, ɵ1$1 = /**
|
|
2166
|
+
* @param {?} contentId
|
|
2167
|
+
* @return {?}
|
|
2168
|
+
*/
|
|
2169
|
+
function (contentId) { return PROTECTED_SLAG_V8$1 + "/user/progress/" + contentId; }, ɵ2$1 = /**
|
|
2170
|
+
* @param {?} certId
|
|
2171
|
+
* @return {?}
|
|
2172
|
+
*/
|
|
2173
|
+
function (certId) { return PROTECTED_SLAG_V8$1 + "/cohorts/course/batch/cert/download/" + certId; }, ɵ3$1 = /**
|
|
2174
|
+
* @param {?} contentId
|
|
2175
|
+
* @return {?}
|
|
2176
|
+
*/
|
|
2177
|
+
function (contentId) { return "/apis/proxies/v8/action/content/v3/read/" + contentId; };
|
|
2178
|
+
/** @type {?} */
|
|
2179
|
+
var API_END_POINTS$1 = {
|
|
2180
|
+
CONTENT: PROTECTED_SLAG_V8$1 + "/content",
|
|
2181
|
+
AUTHORING_CONTENT: "/api/course/v1/hierarchy",
|
|
2182
|
+
CONTENT_LIKES: PROTECTED_SLAG_V8$1 + "/content/likeCount",
|
|
2183
|
+
SET_S3_COOKIE: PROTECTED_SLAG_V8$1 + "/content/setCookie",
|
|
2184
|
+
SET_S3_IMAGE_COOKIE: PROTECTED_SLAG_V8$1 + "/content/setImageCookie",
|
|
2185
|
+
FETCH_MANIFEST: PROTECTED_SLAG_V8$1 + "/content/getWebModuleManifest",
|
|
2186
|
+
FETCH_WEB_MODULE_FILES: PROTECTED_SLAG_V8$1 + "/content/getWebModuleFiles",
|
|
2187
|
+
MULTIPLE_CONTENT: PROTECTED_SLAG_V8$1 + "/content/multiple",
|
|
2188
|
+
CONTENT_SEARCH_V5: PROTECTED_SLAG_V8$1 + "/content/searchV5",
|
|
2189
|
+
CONTENT_SEARCH_V6: "/apis/proxies/v8/sunbirdigot/search",
|
|
2190
|
+
TRENDING_CONTENT_SEARCH: "apis/proxies/v8/trending/content/search",
|
|
2191
|
+
CONTENT_SEARCH_RELATED_CBP_V6: "/apis/proxies/v8/sunbirdigot/search",
|
|
2192
|
+
CONTENT_SEARCH_REGION_RECOMMENDATION: PROTECTED_SLAG_V8$1 + "/content/searchRegionRecommendation",
|
|
2193
|
+
CONTENT_HISTORY: PROTECTED_SLAG_V8$1 + "/user/history",
|
|
2194
|
+
CONTENT_HISTORYV2: "/apis/proxies/v8/read/content-progres",
|
|
2195
|
+
COURSE_BATCH_LIST: "/apis/proxies/v8/learner/course/v1/batch/list",
|
|
2196
|
+
COURSE_BATCH: "/apis/proxies/v8/course/v1/batch/read",
|
|
2197
|
+
AUTO_ASSIGN_BATCH: "/apis/protected/v8/cohorts/user/autoenrollment/",
|
|
2198
|
+
AUTO_ASSIGN_CURATED_BATCH: "/apis/proxies/v8/curatedprogram/v1/enrol",
|
|
2199
|
+
AUTO_ASSIGN_OPEN_PROGRAM: "/apis/proxies/v8/openprogram/v1/enrol",
|
|
2200
|
+
USER_CONTINUE_LEARNING: PROTECTED_SLAG_V8$1 + "/user/history/continue",
|
|
2201
|
+
CONTENT_RATING: PROTECTED_SLAG_V8$1 + "/user/rating",
|
|
2202
|
+
COLLECTION_HIERARCHY: (ɵ0$1),
|
|
2203
|
+
REGISTRATION_STATUS: PROTECTED_SLAG_V8$1 + "/admin/userRegistration/checkUserRegistrationContent",
|
|
2204
|
+
MARK_AS_COMPLETE_META: (ɵ1$1),
|
|
2205
|
+
ENROLL_BATCH: "/apis/proxies/v8/learner/course/v1/enrol",
|
|
2206
|
+
ENROLL_BATCH_WF: "/apis/proxies/v8/workflow/blendedprogram/enrol",
|
|
2207
|
+
WITHDRAW_BATCH_WF: "/apis/proxies/v8/workflow/blendedprogram/unenrol",
|
|
2208
|
+
BLENDED_USER_WF: "/apis/proxies/v8/workflow/blendedprogram/user/search",
|
|
2209
|
+
BLENDED_USER_COUNT: "apis/proxies/v8/workflow/blendedprogram/enrol/status/count",
|
|
2210
|
+
CERT_ADD_TEMPLATE: PROTECTED_SLAG_V8$1 + "/cohorts/course/batch/cert/template/add",
|
|
2211
|
+
CERT_ISSUE: PROTECTED_SLAG_V8$1 + "/cohorts/course/batch/cert/issue",
|
|
2212
|
+
CERT_DOWNLOAD: (ɵ2$1),
|
|
2213
|
+
READ_KARMAPOINTS: "/apis/proxies/v8/karmapoints/read",
|
|
2214
|
+
CONTENT_READ: (ɵ3$1),
|
|
2215
|
+
READ_COURSE_KARMAPOINTS: '/apis/proxies/v8/karmapoints/user/course/read',
|
|
2216
|
+
CLAIM_KARMAPOINTS: '/apis/proxies/v8/claimkarmapoints',
|
|
2217
|
+
USER_KARMA_POINTS: '/apis/proxies/v8/user/totalkarmapoints',
|
|
2218
|
+
AGGREGATION_SEARCH: '/apis/proxies/v8/content/aggregation/search',
|
|
2219
|
+
FEATURE_SEARCH: '/apis/proxies/v8/featured/content/search',
|
|
2220
|
+
};
|
|
2221
|
+
var WidgetContentLibService = /** @class */ (function () {
|
|
2222
|
+
function WidgetContentLibService(http, configSvc, userSvc) {
|
|
2223
|
+
this.http = http;
|
|
2224
|
+
this.configSvc = configSvc;
|
|
2225
|
+
this.userSvc = userSvc;
|
|
2226
|
+
this.tocConfigData = new BehaviorSubject({});
|
|
2227
|
+
this.tocConfigData$ = this.tocConfigData.asObservable();
|
|
2228
|
+
this.telemetryData = new Subject();
|
|
2229
|
+
this.telemetryData$ = this.telemetryData.asObservable();
|
|
2230
|
+
this.programChildCourseResumeData = new BehaviorSubject({});
|
|
2231
|
+
this.programChildCourseResumeData$ = this.programChildCourseResumeData.asObservable();
|
|
2232
|
+
}
|
|
2233
|
+
/**
|
|
2234
|
+
* @param {?} message
|
|
1866
2235
|
* @return {?}
|
|
1867
2236
|
*/
|
|
1868
|
-
|
|
1869
|
-
* @param {?}
|
|
2237
|
+
WidgetContentLibService.prototype.changeTelemetryData = /**
|
|
2238
|
+
* @param {?} message
|
|
1870
2239
|
* @return {?}
|
|
1871
2240
|
*/
|
|
1872
|
-
function (
|
|
1873
|
-
|
|
1874
|
-
.post(API_END_POINTS.CONTENT_LIKES, contentIds)
|
|
1875
|
-
.toPromise();
|
|
2241
|
+
function (message) {
|
|
2242
|
+
this.telemetryData.next(message);
|
|
1876
2243
|
};
|
|
1877
2244
|
/**
|
|
1878
|
-
* @param {?}
|
|
2245
|
+
* @param {?} primaryCategory
|
|
1879
2246
|
* @return {?}
|
|
1880
2247
|
*/
|
|
1881
|
-
|
|
1882
|
-
* @param {?}
|
|
2248
|
+
WidgetContentLibService.prototype.isResource = /**
|
|
2249
|
+
* @param {?} primaryCategory
|
|
1883
2250
|
* @return {?}
|
|
1884
2251
|
*/
|
|
1885
|
-
function (
|
|
1886
|
-
if (
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
2252
|
+
function (primaryCategory) {
|
|
2253
|
+
if (primaryCategory) {
|
|
2254
|
+
/** @type {?} */
|
|
2255
|
+
var isResource = (primaryCategory === NsContent.EResourcePrimaryCategories.LEARNING_RESOURCE) ||
|
|
2256
|
+
(primaryCategory === NsContent.EResourcePrimaryCategories.PRACTICE_RESOURCE) ||
|
|
2257
|
+
(primaryCategory === NsContent.EResourcePrimaryCategories.FINAL_ASSESSMENT) ||
|
|
2258
|
+
(primaryCategory === NsContent.EResourcePrimaryCategories.COMP_ASSESSMENT) ||
|
|
2259
|
+
(primaryCategory === NsContent.EResourcePrimaryCategories.OFFLINE_SESSION);
|
|
2260
|
+
return isResource;
|
|
2261
|
+
}
|
|
2262
|
+
return false;
|
|
1891
2263
|
};
|
|
1892
2264
|
/**
|
|
1893
|
-
* @param {?}
|
|
2265
|
+
* @param {?} identifier
|
|
1894
2266
|
* @return {?}
|
|
1895
2267
|
*/
|
|
1896
|
-
|
|
1897
|
-
* @param {?}
|
|
2268
|
+
WidgetContentLibService.prototype.fetchMarkAsCompleteMeta = /**
|
|
2269
|
+
* @param {?} identifier
|
|
1898
2270
|
* @return {?}
|
|
1899
2271
|
*/
|
|
1900
|
-
function (
|
|
1901
|
-
|
|
2272
|
+
function (identifier) {
|
|
2273
|
+
// tslint:disable-next-line
|
|
2274
|
+
/** @type {?} */
|
|
2275
|
+
var url = API_END_POINTS$1.MARK_AS_COMPLETE_META(identifier)
|
|
2276
|
+
// return this.http.get(url).toPromise()
|
|
2277
|
+
;
|
|
2278
|
+
// return this.http.get(url).toPromise()
|
|
2279
|
+
if (url) { }
|
|
2280
|
+
return of().toPromise();
|
|
1902
2281
|
};
|
|
1903
2282
|
/**
|
|
1904
|
-
* @param {?}
|
|
2283
|
+
* @param {?} data
|
|
1905
2284
|
* @return {?}
|
|
1906
2285
|
*/
|
|
1907
|
-
|
|
1908
|
-
* @param {?}
|
|
2286
|
+
WidgetContentLibService.prototype.updateTocConfig = /**
|
|
2287
|
+
* @param {?} data
|
|
1909
2288
|
* @return {?}
|
|
1910
2289
|
*/
|
|
1911
|
-
function (
|
|
1912
|
-
|
|
1913
|
-
req.request.fields = ['progressdetails'];
|
|
1914
|
-
/** @type {?} */
|
|
1915
|
-
var data = this.http.post(API_END_POINTS.CONTENT_HISTORYV2 + "/" + req.request.courseId, req);
|
|
1916
|
-
data.subscribe((/**
|
|
1917
|
-
* @param {?} subscribeData
|
|
1918
|
-
* @return {?}
|
|
1919
|
-
*/
|
|
1920
|
-
function (subscribeData) {
|
|
1921
|
-
_this.programChildCourseResumeData.next({ resumeData: subscribeData.result.contentList, courseId: req.request.courseId });
|
|
1922
|
-
}));
|
|
1923
|
-
return data;
|
|
2290
|
+
function (data) {
|
|
2291
|
+
this.tocConfigData.next(data);
|
|
1924
2292
|
};
|
|
1925
2293
|
/**
|
|
1926
|
-
* @param {?}
|
|
1927
|
-
* @param {?=}
|
|
1928
|
-
* @param {?=}
|
|
2294
|
+
* @param {?} contentId
|
|
2295
|
+
* @param {?=} hierarchyType
|
|
2296
|
+
* @param {?=} _additionalFields
|
|
2297
|
+
* @param {?=} primaryCategory
|
|
1929
2298
|
* @return {?}
|
|
1930
2299
|
*/
|
|
1931
|
-
|
|
1932
|
-
* @param {?}
|
|
1933
|
-
* @param {?=}
|
|
1934
|
-
* @param {?=}
|
|
2300
|
+
WidgetContentLibService.prototype.fetchContent = /**
|
|
2301
|
+
* @param {?} contentId
|
|
2302
|
+
* @param {?=} hierarchyType
|
|
2303
|
+
* @param {?=} _additionalFields
|
|
2304
|
+
* @param {?=} primaryCategory
|
|
1935
2305
|
* @return {?}
|
|
1936
2306
|
*/
|
|
1937
|
-
function (
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
};
|
|
1978
|
-
return [4 /*yield*/, this.saveContinueLearning(reqBody).toPromise().catch().finally((/**
|
|
1979
|
-
* @return {?}
|
|
1980
|
-
*/
|
|
1981
|
-
function () {
|
|
1982
|
-
resolve(true);
|
|
1983
|
-
}))];
|
|
1984
|
-
case 3:
|
|
1985
|
-
_a.sent();
|
|
1986
|
-
_a.label = 4;
|
|
1987
|
-
case 4: return [2 /*return*/];
|
|
1988
|
-
}
|
|
1989
|
-
});
|
|
1990
|
-
}); }))];
|
|
1991
|
-
});
|
|
1992
|
-
});
|
|
2307
|
+
function (contentId, hierarchyType, _additionalFields, primaryCategory) {
|
|
2308
|
+
if (hierarchyType === void 0) { hierarchyType = 'detail'; }
|
|
2309
|
+
if (_additionalFields === void 0) { _additionalFields = []; }
|
|
2310
|
+
// const url = `${API_END_POINTS.CONTENT}/${contentId}?hierarchyType=${hierarchyType}`
|
|
2311
|
+
/** @type {?} */
|
|
2312
|
+
var url = '';
|
|
2313
|
+
/** @type {?} */
|
|
2314
|
+
var forPreview = window.location.href.includes('/public/') || window.location.href.includes('&preview=true');
|
|
2315
|
+
if (primaryCategory && this.isResource(primaryCategory)) {
|
|
2316
|
+
if (!forPreview) {
|
|
2317
|
+
url = "/apis/proxies/v8/action/content/v3/read/" + contentId;
|
|
2318
|
+
}
|
|
2319
|
+
else {
|
|
2320
|
+
url = "/api/content/v1/read/" + contentId;
|
|
2321
|
+
}
|
|
2322
|
+
}
|
|
2323
|
+
else {
|
|
2324
|
+
if (!forPreview) {
|
|
2325
|
+
url = "/apis/proxies/v8/action/content/v3/hierarchy/" + contentId + "?hierarchyType=" + hierarchyType;
|
|
2326
|
+
}
|
|
2327
|
+
else {
|
|
2328
|
+
/** @type {?} */
|
|
2329
|
+
var forcreator = window.location.href.includes('editMode=true');
|
|
2330
|
+
if (forcreator) {
|
|
2331
|
+
url = "apis/proxies/v8/action/content/v3/hierarchy/" + contentId + "?mode=edit";
|
|
2332
|
+
}
|
|
2333
|
+
else {
|
|
2334
|
+
url = "/api/course/v1/hierarchy/" + contentId + "?hierarchyType=" + hierarchyType;
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
}
|
|
2338
|
+
// return this.http
|
|
2339
|
+
// .post<NsContent.IContent>(url, { additionalFields })
|
|
2340
|
+
// .pipe(retry(1))
|
|
2341
|
+
return this.http
|
|
2342
|
+
.get(url)
|
|
2343
|
+
.pipe(shareReplay(1));
|
|
2344
|
+
// if (apiData && apiData.result) {
|
|
2345
|
+
// return apiData.result.content
|
|
2346
|
+
// }
|
|
1993
2347
|
};
|
|
1994
2348
|
/**
|
|
1995
|
-
* @param {?}
|
|
2349
|
+
* @param {?} contentId
|
|
1996
2350
|
* @return {?}
|
|
1997
2351
|
*/
|
|
1998
|
-
|
|
1999
|
-
* @param {?}
|
|
2352
|
+
WidgetContentLibService.prototype.fetchAuthoringContent = /**
|
|
2353
|
+
* @param {?} contentId
|
|
2000
2354
|
* @return {?}
|
|
2001
2355
|
*/
|
|
2002
|
-
function (
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2356
|
+
function (contentId) {
|
|
2357
|
+
/** @type {?} */
|
|
2358
|
+
var forcreator = window.location.href.includes('editMode=true');
|
|
2359
|
+
/** @type {?} */
|
|
2360
|
+
var url = '';
|
|
2361
|
+
if (forcreator) {
|
|
2362
|
+
url = "apis/proxies/v8/action/content/v3/hierarchy/" + contentId + "?mode=edit";
|
|
2006
2363
|
}
|
|
2007
|
-
|
|
2364
|
+
else {
|
|
2365
|
+
url = API_END_POINTS$1.AUTHORING_CONTENT + "/" + contentId + "?hierarchyType=detail";
|
|
2366
|
+
}
|
|
2367
|
+
return this.http.get(url).pipe(shareReplay(1), (/**
|
|
2368
|
+
* @param {?} r
|
|
2369
|
+
* @return {?}
|
|
2370
|
+
*/
|
|
2371
|
+
function (r) { return r; }));
|
|
2008
2372
|
};
|
|
2009
2373
|
/**
|
|
2010
|
-
* @param {?}
|
|
2374
|
+
* @param {?} ids
|
|
2011
2375
|
* @return {?}
|
|
2012
2376
|
*/
|
|
2013
|
-
|
|
2014
|
-
* @param {?}
|
|
2377
|
+
WidgetContentLibService.prototype.fetchMultipleContent = /**
|
|
2378
|
+
* @param {?} ids
|
|
2015
2379
|
* @return {?}
|
|
2016
2380
|
*/
|
|
2017
|
-
function (
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2381
|
+
function (ids) {
|
|
2382
|
+
return this.http.get(API_END_POINTS$1.MULTIPLE_CONTENT + "/" + ids.join(','));
|
|
2383
|
+
};
|
|
2384
|
+
/**
|
|
2385
|
+
* @param {?} type
|
|
2386
|
+
* @param {?} id
|
|
2387
|
+
* @param {?=} pageNumber
|
|
2388
|
+
* @param {?=} pageSize
|
|
2389
|
+
* @return {?}
|
|
2390
|
+
*/
|
|
2391
|
+
WidgetContentLibService.prototype.fetchCollectionHierarchy = /**
|
|
2392
|
+
* @param {?} type
|
|
2393
|
+
* @param {?} id
|
|
2394
|
+
* @param {?=} pageNumber
|
|
2395
|
+
* @param {?=} pageSize
|
|
2396
|
+
* @return {?}
|
|
2397
|
+
*/
|
|
2398
|
+
function (type, id, pageNumber, pageSize) {
|
|
2399
|
+
if (pageNumber === void 0) { pageNumber = 0; }
|
|
2400
|
+
if (pageSize === void 0) { pageSize = 1; }
|
|
2401
|
+
return this.http.get(API_END_POINTS$1.COLLECTION_HIERARCHY(type, id) + "?pageNumber=" + pageNumber + "&pageSize=" + pageSize);
|
|
2022
2402
|
};
|
|
2023
2403
|
/**
|
|
2024
2404
|
* @return {?}
|
|
2025
2405
|
*/
|
|
2026
|
-
|
|
2406
|
+
WidgetContentLibService.prototype.fetchBlendedCourse = /**
|
|
2027
2407
|
* @return {?}
|
|
2028
2408
|
*/
|
|
2029
2409
|
function () {
|
|
2030
|
-
|
|
2031
|
-
|
|
2410
|
+
};
|
|
2411
|
+
/**
|
|
2412
|
+
* @param {?} req
|
|
2413
|
+
* @return {?}
|
|
2414
|
+
*/
|
|
2415
|
+
WidgetContentLibService.prototype.fetchCourseBatches = /**
|
|
2416
|
+
* @param {?} req
|
|
2417
|
+
* @return {?}
|
|
2418
|
+
*/
|
|
2419
|
+
function (req) {
|
|
2420
|
+
return this.http
|
|
2421
|
+
.post(API_END_POINTS$1.COURSE_BATCH_LIST, req)
|
|
2422
|
+
.pipe(retry(1), map((/**
|
|
2423
|
+
* @param {?} data
|
|
2032
2424
|
* @return {?}
|
|
2033
2425
|
*/
|
|
2034
|
-
function (
|
|
2426
|
+
function (data) { return data.result.response; })));
|
|
2035
2427
|
};
|
|
2428
|
+
// fetch individual batch
|
|
2429
|
+
// fetch individual batch
|
|
2036
2430
|
/**
|
|
2037
|
-
* @param {?}
|
|
2431
|
+
* @param {?} batchId
|
|
2038
2432
|
* @return {?}
|
|
2039
2433
|
*/
|
|
2040
|
-
|
|
2041
|
-
|
|
2434
|
+
WidgetContentLibService.prototype.fetchCourseBatch =
|
|
2435
|
+
// fetch individual batch
|
|
2436
|
+
/**
|
|
2437
|
+
* @param {?} batchId
|
|
2042
2438
|
* @return {?}
|
|
2043
2439
|
*/
|
|
2044
|
-
function (
|
|
2045
|
-
return this.http.
|
|
2440
|
+
function (batchId) {
|
|
2441
|
+
return this.http.get(API_END_POINTS$1.COURSE_BATCH + "/" + batchId);
|
|
2046
2442
|
};
|
|
2047
2443
|
/**
|
|
2048
|
-
* @param {?}
|
|
2444
|
+
* @param {?} identifier
|
|
2049
2445
|
* @return {?}
|
|
2050
2446
|
*/
|
|
2051
|
-
|
|
2052
|
-
* @param {?}
|
|
2447
|
+
WidgetContentLibService.prototype.autoAssignBatchApi = /**
|
|
2448
|
+
* @param {?} identifier
|
|
2053
2449
|
* @return {?}
|
|
2054
2450
|
*/
|
|
2055
|
-
function (
|
|
2056
|
-
return this.http.get(
|
|
2451
|
+
function (identifier) {
|
|
2452
|
+
return this.http.get("" + API_END_POINTS$1.AUTO_ASSIGN_BATCH + identifier)
|
|
2453
|
+
.pipe(retry(1), map((/**
|
|
2454
|
+
* @param {?} data
|
|
2455
|
+
* @return {?}
|
|
2456
|
+
*/
|
|
2457
|
+
function (data) { return data.result.response; })));
|
|
2458
|
+
};
|
|
2459
|
+
/**
|
|
2460
|
+
* @param {?} request
|
|
2461
|
+
* @param {?} programType
|
|
2462
|
+
* @return {?}
|
|
2463
|
+
*/
|
|
2464
|
+
WidgetContentLibService.prototype.autoAssignCuratedBatchApi = /**
|
|
2465
|
+
* @param {?} request
|
|
2466
|
+
* @param {?} programType
|
|
2467
|
+
* @return {?}
|
|
2468
|
+
*/
|
|
2469
|
+
function (request, programType) {
|
|
2470
|
+
/** @type {?} */
|
|
2471
|
+
var url = programType === NsContent.ECourseCategory.MODERATED_PROGRAM ?
|
|
2472
|
+
API_END_POINTS$1.AUTO_ASSIGN_OPEN_PROGRAM : API_END_POINTS$1.AUTO_ASSIGN_CURATED_BATCH;
|
|
2473
|
+
return this.http.post("" + url, request)
|
|
2474
|
+
.pipe(retry(1), map((/**
|
|
2475
|
+
* @param {?} data
|
|
2476
|
+
* @return {?}
|
|
2477
|
+
*/
|
|
2478
|
+
function (data) { return data.result.response; })));
|
|
2057
2479
|
};
|
|
2058
2480
|
/**
|
|
2059
2481
|
* @param {?} req
|
|
2060
2482
|
* @return {?}
|
|
2061
2483
|
*/
|
|
2062
|
-
|
|
2484
|
+
WidgetContentLibService.prototype.enrollUserToBatch = /**
|
|
2063
2485
|
* @param {?} req
|
|
2064
2486
|
* @return {?}
|
|
2065
2487
|
*/
|
|
2066
2488
|
function (req) {
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
});
|
|
2489
|
+
return this.http
|
|
2490
|
+
.post(API_END_POINTS$1.ENROLL_BATCH, req)
|
|
2491
|
+
.toPromise();
|
|
2071
2492
|
};
|
|
2072
2493
|
/**
|
|
2073
2494
|
* @param {?} req
|
|
2495
|
+
* @param {?} type
|
|
2074
2496
|
* @return {?}
|
|
2075
2497
|
*/
|
|
2076
|
-
|
|
2498
|
+
WidgetContentLibService.prototype.enrollAndUnenrollUserToBatchWF = /**
|
|
2077
2499
|
* @param {?} req
|
|
2500
|
+
* @param {?} type
|
|
2078
2501
|
* @return {?}
|
|
2079
2502
|
*/
|
|
2080
|
-
function (req) {
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
return this.http.post(API_END_POINTS.CONTENT_SEARCH_REGION_RECOMMENDATION, { request: req });
|
|
2503
|
+
function (req, type) {
|
|
2504
|
+
/** @type {?} */
|
|
2505
|
+
var url = type === 'WITHDRAW' ? API_END_POINTS$1.WITHDRAW_BATCH_WF : API_END_POINTS$1.ENROLL_BATCH_WF;
|
|
2506
|
+
return this.http
|
|
2507
|
+
.post(url, req)
|
|
2508
|
+
.toPromise();
|
|
2087
2509
|
};
|
|
2088
2510
|
/**
|
|
2089
2511
|
* @param {?} req
|
|
2090
2512
|
* @return {?}
|
|
2091
2513
|
*/
|
|
2092
|
-
|
|
2514
|
+
WidgetContentLibService.prototype.fetchBlendedUserWF = /**
|
|
2093
2515
|
* @param {?} req
|
|
2094
2516
|
* @return {?}
|
|
2095
2517
|
*/
|
|
2096
2518
|
function (req) {
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
if (apiPath) {
|
|
2101
|
-
return this.http.get(apiPath);
|
|
2102
|
-
}
|
|
2103
|
-
return this.http.post(API_END_POINTS.CONTENT_SEARCH_V6, req);
|
|
2519
|
+
return this.http
|
|
2520
|
+
.post(API_END_POINTS$1.BLENDED_USER_WF, req)
|
|
2521
|
+
.toPromise();
|
|
2104
2522
|
};
|
|
2105
2523
|
/**
|
|
2106
2524
|
* @param {?} req
|
|
2107
2525
|
* @return {?}
|
|
2108
2526
|
*/
|
|
2109
|
-
|
|
2527
|
+
WidgetContentLibService.prototype.fetchBlendedUserCOUNT = /**
|
|
2110
2528
|
* @param {?} req
|
|
2111
2529
|
* @return {?}
|
|
2112
2530
|
*/
|
|
2113
2531
|
function (req) {
|
|
2114
|
-
return this.http
|
|
2532
|
+
return this.http
|
|
2533
|
+
.post(API_END_POINTS$1.BLENDED_USER_COUNT, req)
|
|
2534
|
+
.toPromise();
|
|
2115
2535
|
};
|
|
2116
2536
|
/**
|
|
2117
|
-
* @param {?}
|
|
2537
|
+
* @param {?} contentIds
|
|
2118
2538
|
* @return {?}
|
|
2119
2539
|
*/
|
|
2120
|
-
|
|
2121
|
-
* @param {?}
|
|
2540
|
+
WidgetContentLibService.prototype.fetchContentLikes = /**
|
|
2541
|
+
* @param {?} contentIds
|
|
2122
2542
|
* @return {?}
|
|
2123
2543
|
*/
|
|
2124
|
-
function (
|
|
2125
|
-
return this.http
|
|
2544
|
+
function (contentIds) {
|
|
2545
|
+
return this.http
|
|
2546
|
+
.post(API_END_POINTS$1.CONTENT_LIKES, contentIds)
|
|
2547
|
+
.toPromise();
|
|
2548
|
+
};
|
|
2549
|
+
/**
|
|
2550
|
+
* @param {?} contentIds
|
|
2551
|
+
* @return {?}
|
|
2552
|
+
*/
|
|
2553
|
+
WidgetContentLibService.prototype.fetchContentRatings = /**
|
|
2554
|
+
* @param {?} contentIds
|
|
2555
|
+
* @return {?}
|
|
2556
|
+
*/
|
|
2557
|
+
function (contentIds) {
|
|
2558
|
+
if (contentIds) { }
|
|
2559
|
+
// return this.http
|
|
2560
|
+
// .post(`${API_END_POINTS.CONTENT_RATING}/rating`, contentIds)
|
|
2561
|
+
// .toPromise()
|
|
2562
|
+
return of().toPromise();
|
|
2126
2563
|
};
|
|
2127
2564
|
/**
|
|
2128
2565
|
* @param {?} contentId
|
|
2129
2566
|
* @return {?}
|
|
2130
2567
|
*/
|
|
2131
|
-
|
|
2568
|
+
WidgetContentLibService.prototype.fetchContentHistory = /**
|
|
2132
2569
|
* @param {?} contentId
|
|
2133
2570
|
* @return {?}
|
|
2134
2571
|
*/
|
|
2135
2572
|
function (contentId) {
|
|
2136
|
-
return this.http.
|
|
2573
|
+
return this.http.get(API_END_POINTS$1.CONTENT_HISTORY + "/" + contentId);
|
|
2137
2574
|
};
|
|
2138
2575
|
/**
|
|
2139
|
-
* @param {?}
|
|
2140
|
-
* @param {?} data
|
|
2576
|
+
* @param {?} req
|
|
2141
2577
|
* @return {?}
|
|
2142
2578
|
*/
|
|
2143
|
-
|
|
2144
|
-
* @param {?}
|
|
2145
|
-
* @param {?} data
|
|
2579
|
+
WidgetContentLibService.prototype.fetchContentHistoryV2 = /**
|
|
2580
|
+
* @param {?} req
|
|
2146
2581
|
* @return {?}
|
|
2147
2582
|
*/
|
|
2148
|
-
function (
|
|
2149
|
-
|
|
2583
|
+
function (req) {
|
|
2584
|
+
var _this = this;
|
|
2585
|
+
req.request.fields = ['progressdetails'];
|
|
2586
|
+
/** @type {?} */
|
|
2587
|
+
var data = this.http.post(API_END_POINTS$1.CONTENT_HISTORYV2 + "/" + req.request.courseId, req);
|
|
2588
|
+
data.subscribe((/**
|
|
2589
|
+
* @param {?} subscribeData
|
|
2590
|
+
* @return {?}
|
|
2591
|
+
*/
|
|
2592
|
+
function (subscribeData) {
|
|
2593
|
+
_this.programChildCourseResumeData.next({ resumeData: subscribeData.result.contentList, courseId: req.request.courseId });
|
|
2594
|
+
}));
|
|
2595
|
+
return data;
|
|
2150
2596
|
};
|
|
2151
2597
|
/**
|
|
2152
|
-
* @param {?}
|
|
2598
|
+
* @param {?} id
|
|
2599
|
+
* @param {?=} collectionId
|
|
2600
|
+
* @param {?=} collectionType
|
|
2153
2601
|
* @return {?}
|
|
2154
2602
|
*/
|
|
2155
|
-
|
|
2156
|
-
* @param {?}
|
|
2603
|
+
WidgetContentLibService.prototype.continueLearning = /**
|
|
2604
|
+
* @param {?} id
|
|
2605
|
+
* @param {?=} collectionId
|
|
2606
|
+
* @param {?=} collectionType
|
|
2157
2607
|
* @return {?}
|
|
2158
2608
|
*/
|
|
2159
|
-
function (
|
|
2160
|
-
|
|
2161
|
-
|
|
2609
|
+
function (id, collectionId, collectionType) {
|
|
2610
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2611
|
+
var _this = this;
|
|
2612
|
+
return __generator(this, function (_a) {
|
|
2613
|
+
return [2 /*return*/, new Promise((/**
|
|
2614
|
+
* @param {?} resolve
|
|
2615
|
+
* @return {?}
|
|
2616
|
+
*/
|
|
2617
|
+
function (resolve) { return __awaiter(_this, void 0, void 0, function () {
|
|
2618
|
+
var reqBody, reqBody;
|
|
2619
|
+
return __generator(this, function (_a) {
|
|
2620
|
+
switch (_a.label) {
|
|
2621
|
+
case 0:
|
|
2622
|
+
if (!(collectionType &&
|
|
2623
|
+
collectionType.toLowerCase() === 'playlist')) return [3 /*break*/, 2];
|
|
2624
|
+
reqBody = {
|
|
2625
|
+
contextPathId: collectionId ? collectionId : id,
|
|
2626
|
+
resourceId: id,
|
|
2627
|
+
data: JSON.stringify({
|
|
2628
|
+
timestamp: Date.now(),
|
|
2629
|
+
contextFullPath: [collectionId, id],
|
|
2630
|
+
}),
|
|
2631
|
+
dateAccessed: Date.now(),
|
|
2632
|
+
contextType: 'playlist',
|
|
2633
|
+
};
|
|
2634
|
+
return [4 /*yield*/, this.saveContinueLearning(reqBody).toPromise().catch().finally((/**
|
|
2635
|
+
* @return {?}
|
|
2636
|
+
*/
|
|
2637
|
+
function () {
|
|
2638
|
+
resolve(true);
|
|
2639
|
+
}))];
|
|
2640
|
+
case 1:
|
|
2641
|
+
_a.sent();
|
|
2642
|
+
return [3 /*break*/, 4];
|
|
2643
|
+
case 2:
|
|
2644
|
+
reqBody = {
|
|
2645
|
+
contextPathId: collectionId ? collectionId : id,
|
|
2646
|
+
resourceId: id,
|
|
2647
|
+
data: JSON.stringify({ timestamp: Date.now() }),
|
|
2648
|
+
dateAccessed: Date.now(),
|
|
2649
|
+
};
|
|
2650
|
+
return [4 /*yield*/, this.saveContinueLearning(reqBody).toPromise().catch().finally((/**
|
|
2651
|
+
* @return {?}
|
|
2652
|
+
*/
|
|
2653
|
+
function () {
|
|
2654
|
+
resolve(true);
|
|
2655
|
+
}))];
|
|
2656
|
+
case 3:
|
|
2657
|
+
_a.sent();
|
|
2658
|
+
_a.label = 4;
|
|
2659
|
+
case 4: return [2 /*return*/];
|
|
2660
|
+
}
|
|
2661
|
+
});
|
|
2662
|
+
}); }))];
|
|
2663
|
+
});
|
|
2664
|
+
});
|
|
2665
|
+
};
|
|
2666
|
+
/**
|
|
2667
|
+
* @param {?} content
|
|
2668
|
+
* @return {?}
|
|
2669
|
+
*/
|
|
2670
|
+
WidgetContentLibService.prototype.saveContinueLearning = /**
|
|
2671
|
+
* @param {?} content
|
|
2672
|
+
* @return {?}
|
|
2673
|
+
*/
|
|
2674
|
+
function (content) {
|
|
2675
|
+
// const url = API_END_POINTS.USER_CONTINUE_LEARNING
|
|
2676
|
+
// return this.http.post<any>(url, content)
|
|
2677
|
+
if (content) {
|
|
2678
|
+
}
|
|
2679
|
+
return (/** @type {?} */ (of()));
|
|
2680
|
+
};
|
|
2681
|
+
/**
|
|
2682
|
+
* @param {?} _contentId
|
|
2683
|
+
* @return {?}
|
|
2684
|
+
*/
|
|
2685
|
+
WidgetContentLibService.prototype.setS3Cookie = /**
|
|
2686
|
+
* @param {?} _contentId
|
|
2687
|
+
* @return {?}
|
|
2688
|
+
*/
|
|
2689
|
+
function (_contentId) {
|
|
2690
|
+
// return this.http
|
|
2691
|
+
// .post(API_END_POINTS.SET_S3_COOKIE, { contentId })
|
|
2692
|
+
// .pipe(catchError(_err => of(true)))
|
|
2693
|
+
return EMPTY;
|
|
2694
|
+
};
|
|
2695
|
+
/**
|
|
2696
|
+
* @return {?}
|
|
2697
|
+
*/
|
|
2698
|
+
WidgetContentLibService.prototype.setS3ImageCookie = /**
|
|
2699
|
+
* @return {?}
|
|
2700
|
+
*/
|
|
2701
|
+
function () {
|
|
2702
|
+
return this.http.post(API_END_POINTS$1.SET_S3_IMAGE_COOKIE, {}).pipe(catchError((/**
|
|
2703
|
+
* @param {?} _err
|
|
2704
|
+
* @return {?}
|
|
2705
|
+
*/
|
|
2706
|
+
function (_err) { return of(true); })));
|
|
2707
|
+
};
|
|
2708
|
+
/**
|
|
2709
|
+
* @param {?} url
|
|
2710
|
+
* @return {?}
|
|
2711
|
+
*/
|
|
2712
|
+
WidgetContentLibService.prototype.fetchManifest = /**
|
|
2713
|
+
* @param {?} url
|
|
2714
|
+
* @return {?}
|
|
2715
|
+
*/
|
|
2716
|
+
function (url) {
|
|
2717
|
+
return this.http.post(API_END_POINTS$1.FETCH_MANIFEST, { url: url });
|
|
2718
|
+
};
|
|
2719
|
+
/**
|
|
2720
|
+
* @param {?} url
|
|
2721
|
+
* @return {?}
|
|
2722
|
+
*/
|
|
2723
|
+
WidgetContentLibService.prototype.fetchWebModuleContent = /**
|
|
2724
|
+
* @param {?} url
|
|
2725
|
+
* @return {?}
|
|
2726
|
+
*/
|
|
2727
|
+
function (url) {
|
|
2728
|
+
return this.http.get(API_END_POINTS$1.FETCH_WEB_MODULE_FILES + "?url=" + encodeURIComponent(url));
|
|
2729
|
+
};
|
|
2730
|
+
/**
|
|
2731
|
+
* @param {?} req
|
|
2732
|
+
* @return {?}
|
|
2733
|
+
*/
|
|
2734
|
+
WidgetContentLibService.prototype.search = /**
|
|
2735
|
+
* @param {?} req
|
|
2736
|
+
* @return {?}
|
|
2737
|
+
*/
|
|
2738
|
+
function (req) {
|
|
2739
|
+
req.query = req.query || '';
|
|
2740
|
+
return this.http.post(API_END_POINTS$1.CONTENT_SEARCH_V5, {
|
|
2741
|
+
request: req,
|
|
2742
|
+
});
|
|
2743
|
+
};
|
|
2744
|
+
/**
|
|
2745
|
+
* @param {?} req
|
|
2746
|
+
* @return {?}
|
|
2747
|
+
*/
|
|
2748
|
+
WidgetContentLibService.prototype.searchRegionRecommendation = /**
|
|
2749
|
+
* @param {?} req
|
|
2750
|
+
* @return {?}
|
|
2751
|
+
*/
|
|
2752
|
+
function (req) {
|
|
2753
|
+
req.query = req.query || '';
|
|
2754
|
+
req.preLabelValue =
|
|
2755
|
+
(req.preLabelValue || '') +
|
|
2756
|
+
((this.configSvc.userProfile && this.configSvc.userProfile.country) || '');
|
|
2757
|
+
req.filters = __assign({}, req.filters, { labels: [req.preLabelValue || ''] });
|
|
2758
|
+
return this.http.post(API_END_POINTS$1.CONTENT_SEARCH_REGION_RECOMMENDATION, { request: req });
|
|
2759
|
+
};
|
|
2760
|
+
/**
|
|
2761
|
+
* @param {?} req
|
|
2762
|
+
* @return {?}
|
|
2763
|
+
*/
|
|
2764
|
+
WidgetContentLibService.prototype.searchV6 = /**
|
|
2765
|
+
* @param {?} req
|
|
2766
|
+
* @return {?}
|
|
2767
|
+
*/
|
|
2768
|
+
function (req) {
|
|
2769
|
+
/** @type {?} */
|
|
2770
|
+
var apiPath = get(req, 'api.path');
|
|
2771
|
+
req.query = req.query || '';
|
|
2772
|
+
if (apiPath) {
|
|
2773
|
+
return this.http.get(apiPath);
|
|
2774
|
+
}
|
|
2775
|
+
return this.http.post(API_END_POINTS$1.CONTENT_SEARCH_V6, req);
|
|
2776
|
+
};
|
|
2777
|
+
/**
|
|
2778
|
+
* @param {?} req
|
|
2779
|
+
* @return {?}
|
|
2780
|
+
*/
|
|
2781
|
+
WidgetContentLibService.prototype.searchRelatedCBPV6 = /**
|
|
2782
|
+
* @param {?} req
|
|
2783
|
+
* @return {?}
|
|
2784
|
+
*/
|
|
2785
|
+
function (req) {
|
|
2786
|
+
return this.http.post(API_END_POINTS$1.CONTENT_SEARCH_RELATED_CBP_V6, req);
|
|
2787
|
+
};
|
|
2788
|
+
/**
|
|
2789
|
+
* @param {?} contentId
|
|
2790
|
+
* @return {?}
|
|
2791
|
+
*/
|
|
2792
|
+
WidgetContentLibService.prototype.fetchContentRating = /**
|
|
2793
|
+
* @param {?} contentId
|
|
2794
|
+
* @return {?}
|
|
2795
|
+
*/
|
|
2796
|
+
function (contentId) {
|
|
2797
|
+
return this.http.get(API_END_POINTS$1.CONTENT_RATING + "/" + contentId);
|
|
2798
|
+
};
|
|
2799
|
+
/**
|
|
2800
|
+
* @param {?} contentId
|
|
2801
|
+
* @return {?}
|
|
2802
|
+
*/
|
|
2803
|
+
WidgetContentLibService.prototype.deleteContentRating = /**
|
|
2804
|
+
* @param {?} contentId
|
|
2805
|
+
* @return {?}
|
|
2806
|
+
*/
|
|
2807
|
+
function (contentId) {
|
|
2808
|
+
return this.http.delete(API_END_POINTS$1.CONTENT_RATING + "/" + contentId);
|
|
2809
|
+
};
|
|
2810
|
+
/**
|
|
2811
|
+
* @param {?} contentId
|
|
2812
|
+
* @param {?} data
|
|
2813
|
+
* @return {?}
|
|
2814
|
+
*/
|
|
2815
|
+
WidgetContentLibService.prototype.addContentRating = /**
|
|
2816
|
+
* @param {?} contentId
|
|
2817
|
+
* @param {?} data
|
|
2818
|
+
* @return {?}
|
|
2819
|
+
*/
|
|
2820
|
+
function (contentId, data) {
|
|
2821
|
+
return this.http.post(API_END_POINTS$1.CONTENT_RATING + "/" + contentId, data);
|
|
2822
|
+
};
|
|
2823
|
+
/**
|
|
2824
|
+
* @param {?} content
|
|
2825
|
+
* @return {?}
|
|
2826
|
+
*/
|
|
2827
|
+
WidgetContentLibService.prototype.getFirstChildInHierarchy = /**
|
|
2828
|
+
* @param {?} content
|
|
2829
|
+
* @return {?}
|
|
2830
|
+
*/
|
|
2831
|
+
function (content) {
|
|
2832
|
+
if (!(content.children || []).length) {
|
|
2833
|
+
return content;
|
|
2162
2834
|
}
|
|
2163
2835
|
if ((content.primaryCategory === NsContent.EPrimaryCategory.PROGRAM &&
|
|
2164
2836
|
!(content.artifactUrl && content.artifactUrl.length)) ||
|
|
@@ -2191,18 +2863,18 @@ var WidgetContentService = /** @class */ (function () {
|
|
|
2191
2863
|
* @param {?} source
|
|
2192
2864
|
* @return {?}
|
|
2193
2865
|
*/
|
|
2194
|
-
|
|
2866
|
+
WidgetContentLibService.prototype.getRegistrationStatus = /**
|
|
2195
2867
|
* @param {?} source
|
|
2196
2868
|
* @return {?}
|
|
2197
2869
|
*/
|
|
2198
2870
|
function (source) {
|
|
2199
|
-
return this.http.get(API_END_POINTS.REGISTRATION_STATUS + "/" + source).toPromise();
|
|
2871
|
+
return this.http.get(API_END_POINTS$1.REGISTRATION_STATUS + "/" + source).toPromise();
|
|
2200
2872
|
};
|
|
2201
2873
|
/**
|
|
2202
2874
|
* @param {?} url
|
|
2203
2875
|
* @return {?}
|
|
2204
2876
|
*/
|
|
2205
|
-
|
|
2877
|
+
WidgetContentLibService.prototype.fetchConfig = /**
|
|
2206
2878
|
* @param {?} url
|
|
2207
2879
|
* @return {?}
|
|
2208
2880
|
*/
|
|
@@ -2213,59 +2885,59 @@ var WidgetContentService = /** @class */ (function () {
|
|
|
2213
2885
|
* @param {?} body
|
|
2214
2886
|
* @return {?}
|
|
2215
2887
|
*/
|
|
2216
|
-
|
|
2888
|
+
WidgetContentLibService.prototype.addCertTemplate = /**
|
|
2217
2889
|
* @param {?} body
|
|
2218
2890
|
* @return {?}
|
|
2219
2891
|
*/
|
|
2220
2892
|
function (body) {
|
|
2221
|
-
return this.http.patch("" + API_END_POINTS.CERT_ADD_TEMPLATE, body);
|
|
2893
|
+
return this.http.patch("" + API_END_POINTS$1.CERT_ADD_TEMPLATE, body);
|
|
2222
2894
|
};
|
|
2223
2895
|
/**
|
|
2224
2896
|
* @param {?} body
|
|
2225
2897
|
* @return {?}
|
|
2226
2898
|
*/
|
|
2227
|
-
|
|
2899
|
+
WidgetContentLibService.prototype.issueCert = /**
|
|
2228
2900
|
* @param {?} body
|
|
2229
2901
|
* @return {?}
|
|
2230
2902
|
*/
|
|
2231
2903
|
function (body) {
|
|
2232
|
-
return this.http.post("" + API_END_POINTS.CERT_ISSUE, body);
|
|
2904
|
+
return this.http.post("" + API_END_POINTS$1.CERT_ISSUE, body);
|
|
2233
2905
|
};
|
|
2234
2906
|
/**
|
|
2235
2907
|
* @param {?} certId
|
|
2236
2908
|
* @return {?}
|
|
2237
2909
|
*/
|
|
2238
|
-
|
|
2910
|
+
WidgetContentLibService.prototype.downloadCert = /**
|
|
2239
2911
|
* @param {?} certId
|
|
2240
2912
|
* @return {?}
|
|
2241
2913
|
*/
|
|
2242
2914
|
function (certId) {
|
|
2243
|
-
return this.http.get("" + API_END_POINTS.CERT_DOWNLOAD(certId));
|
|
2915
|
+
return this.http.get("" + API_END_POINTS$1.CERT_DOWNLOAD(certId));
|
|
2244
2916
|
};
|
|
2245
2917
|
/**
|
|
2246
2918
|
* @param {?} req
|
|
2247
2919
|
* @return {?}
|
|
2248
2920
|
*/
|
|
2249
|
-
|
|
2921
|
+
WidgetContentLibService.prototype.trendingContentSearch = /**
|
|
2250
2922
|
* @param {?} req
|
|
2251
2923
|
* @return {?}
|
|
2252
2924
|
*/
|
|
2253
2925
|
function (req) {
|
|
2254
2926
|
req.query = req.query || '';
|
|
2255
|
-
return this.http.post(API_END_POINTS.TRENDING_CONTENT_SEARCH, req);
|
|
2927
|
+
return this.http.post(API_END_POINTS$1.TRENDING_CONTENT_SEARCH, req);
|
|
2256
2928
|
};
|
|
2257
2929
|
/**
|
|
2258
2930
|
* @param {?} limit
|
|
2259
2931
|
* @param {?} offset
|
|
2260
2932
|
* @return {?}
|
|
2261
2933
|
*/
|
|
2262
|
-
|
|
2934
|
+
WidgetContentLibService.prototype.getKarmaPoitns = /**
|
|
2263
2935
|
* @param {?} limit
|
|
2264
2936
|
* @param {?} offset
|
|
2265
2937
|
* @return {?}
|
|
2266
2938
|
*/
|
|
2267
2939
|
function (limit, offset) {
|
|
2268
|
-
return this.http.post(API_END_POINTS.READ_KARMAPOINTS, { limit: limit, offset: offset }).pipe(catchError((/**
|
|
2940
|
+
return this.http.post(API_END_POINTS$1.READ_KARMAPOINTS, { limit: limit, offset: offset }).pipe(catchError((/**
|
|
2269
2941
|
* @param {?} _err
|
|
2270
2942
|
* @return {?}
|
|
2271
2943
|
*/
|
|
@@ -2275,7 +2947,7 @@ var WidgetContentService = /** @class */ (function () {
|
|
|
2275
2947
|
* @param {?} contentId
|
|
2276
2948
|
* @return {?}
|
|
2277
2949
|
*/
|
|
2278
|
-
|
|
2950
|
+
WidgetContentLibService.prototype.fetchProgramContent = /**
|
|
2279
2951
|
* @param {?} contentId
|
|
2280
2952
|
* @return {?}
|
|
2281
2953
|
*/
|
|
@@ -2285,7 +2957,7 @@ var WidgetContentService = /** @class */ (function () {
|
|
|
2285
2957
|
/** @type {?} */
|
|
2286
2958
|
var forPreview = window.location.href.includes('/public/') || window.location.href.includes('&preview=true');
|
|
2287
2959
|
if (!forPreview) {
|
|
2288
|
-
return this.http.get(API_END_POINTS.CONTENT_READ(contentId));
|
|
2960
|
+
return this.http.get(API_END_POINTS$1.CONTENT_READ(contentId));
|
|
2289
2961
|
}
|
|
2290
2962
|
url = "/api/content/v1/read/" + contentId;
|
|
2291
2963
|
return this.http.get(url);
|
|
@@ -2295,81 +2967,112 @@ var WidgetContentService = /** @class */ (function () {
|
|
|
2295
2967
|
* @param {?} request
|
|
2296
2968
|
* @return {?}
|
|
2297
2969
|
*/
|
|
2298
|
-
|
|
2970
|
+
WidgetContentLibService.prototype.getCourseKarmaPoints = /**
|
|
2299
2971
|
* @param {?} request
|
|
2300
2972
|
* @return {?}
|
|
2301
2973
|
*/
|
|
2302
2974
|
function (request) {
|
|
2303
|
-
return this.http.post(API_END_POINTS.READ_COURSE_KARMAPOINTS, request);
|
|
2975
|
+
return this.http.post(API_END_POINTS$1.READ_COURSE_KARMAPOINTS, request);
|
|
2304
2976
|
};
|
|
2305
2977
|
/**
|
|
2306
2978
|
* @param {?} request
|
|
2307
2979
|
* @return {?}
|
|
2308
2980
|
*/
|
|
2309
|
-
|
|
2981
|
+
WidgetContentLibService.prototype.claimKarmapoints = /**
|
|
2310
2982
|
* @param {?} request
|
|
2311
2983
|
* @return {?}
|
|
2312
2984
|
*/
|
|
2313
2985
|
function (request) {
|
|
2314
|
-
return this.http.post(API_END_POINTS.CLAIM_KARMAPOINTS, request);
|
|
2986
|
+
return this.http.post(API_END_POINTS$1.CLAIM_KARMAPOINTS, request);
|
|
2315
2987
|
};
|
|
2316
2988
|
/**
|
|
2317
2989
|
* @return {?}
|
|
2318
2990
|
*/
|
|
2319
|
-
|
|
2991
|
+
WidgetContentLibService.prototype.userKarmaPoints = /**
|
|
2320
2992
|
* @return {?}
|
|
2321
2993
|
*/
|
|
2322
2994
|
function () {
|
|
2323
|
-
return this.http.post(API_END_POINTS.USER_KARMA_POINTS, {});
|
|
2995
|
+
return this.http.post(API_END_POINTS$1.USER_KARMA_POINTS, {});
|
|
2324
2996
|
};
|
|
2325
2997
|
/**
|
|
2326
2998
|
* @param {?} doId
|
|
2327
2999
|
* @return {?}
|
|
2328
3000
|
*/
|
|
2329
|
-
|
|
3001
|
+
WidgetContentLibService.prototype.getEnrolledData = /**
|
|
2330
3002
|
* @param {?} doId
|
|
2331
3003
|
* @return {?}
|
|
2332
3004
|
*/
|
|
2333
3005
|
function (doId) {
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
3006
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3007
|
+
var userId, responseData;
|
|
3008
|
+
var _this = this;
|
|
3009
|
+
return __generator(this, function (_a) {
|
|
3010
|
+
switch (_a.label) {
|
|
3011
|
+
case 0:
|
|
3012
|
+
userId = this.configSvc.userProfile.userId;
|
|
3013
|
+
return [4 /*yield*/, this.userSvc.fetchEnrollmentDataByContentId(userId, doId).toPromise().then((/**
|
|
3014
|
+
* @param {?} res
|
|
3015
|
+
* @return {?}
|
|
3016
|
+
*/
|
|
3017
|
+
function (res) { return __awaiter(_this, void 0, void 0, function () {
|
|
3018
|
+
return __generator(this, function (_a) {
|
|
3019
|
+
if (res && res.courses && res.courses.length) {
|
|
3020
|
+
return [2 /*return*/, res.courses];
|
|
3021
|
+
}
|
|
3022
|
+
else {
|
|
3023
|
+
return [2 /*return*/, []];
|
|
3024
|
+
}
|
|
3025
|
+
return [2 /*return*/];
|
|
3026
|
+
});
|
|
3027
|
+
}); })).catch((/**
|
|
3028
|
+
* @param {?} _err
|
|
3029
|
+
* @return {?}
|
|
3030
|
+
*/
|
|
3031
|
+
function (_err) {
|
|
3032
|
+
return [];
|
|
3033
|
+
}))];
|
|
3034
|
+
case 1:
|
|
3035
|
+
responseData = _a.sent();
|
|
3036
|
+
return [2 /*return*/, responseData || []];
|
|
3037
|
+
}
|
|
3038
|
+
});
|
|
3039
|
+
});
|
|
2339
3040
|
};
|
|
2340
3041
|
/**
|
|
2341
3042
|
* @param {?} content
|
|
2342
3043
|
* @return {?}
|
|
2343
3044
|
*/
|
|
2344
|
-
|
|
3045
|
+
WidgetContentLibService.prototype.getResourseLink = /**
|
|
2345
3046
|
* @param {?} content
|
|
2346
3047
|
* @return {?}
|
|
2347
3048
|
*/
|
|
2348
3049
|
function (content) {
|
|
2349
3050
|
return __awaiter(this, void 0, void 0, function () {
|
|
2350
|
-
var enrolledCourseData, data, data;
|
|
3051
|
+
var enrolledCourse, enrolledCourseData, data, data;
|
|
2351
3052
|
return __generator(this, function (_a) {
|
|
2352
3053
|
switch (_a.label) {
|
|
2353
|
-
case 0:
|
|
2354
|
-
|
|
2355
|
-
|
|
3054
|
+
case 0: return [4 /*yield*/, this.getEnrolledData(content.identifier)];
|
|
3055
|
+
case 1:
|
|
3056
|
+
enrolledCourse = _a.sent();
|
|
3057
|
+
if (!(enrolledCourse && enrolledCourse.length)) return [3 /*break*/, 5];
|
|
3058
|
+
enrolledCourseData = enrolledCourse[0];
|
|
2356
3059
|
if (!(enrolledCourseData.content.courseCategory === NsContent.ECourseCategory.BLENDED_PROGRAM ||
|
|
2357
3060
|
enrolledCourseData.content.courseCategory === NsContent.ECourseCategory.INVITE_ONLY_PROGRAM ||
|
|
2358
3061
|
enrolledCourseData.content.courseCategory === NsContent.ECourseCategory.MODERATED_PROGRAM ||
|
|
2359
3062
|
enrolledCourseData.content.primaryCategory === NsContent.EPrimaryCategory.BLENDED_PROGRAM ||
|
|
2360
|
-
enrolledCourseData.content.primaryCategory === NsContent.EPrimaryCategory.PROGRAM)) return [3 /*break*/,
|
|
3063
|
+
enrolledCourseData.content.primaryCategory === NsContent.EPrimaryCategory.PROGRAM)) return [3 /*break*/, 3];
|
|
2361
3064
|
if (!this.isBatchInProgress(enrolledCourseData.batch)) {
|
|
2362
3065
|
return [2 /*return*/, this.gotoTocPage(content)];
|
|
2363
3066
|
}
|
|
2364
3067
|
return [4 /*yield*/, this.checkForDataToFormUrl(content, enrolledCourseData)];
|
|
2365
|
-
case
|
|
3068
|
+
case 2:
|
|
2366
3069
|
data = _a.sent();
|
|
2367
3070
|
return [2 /*return*/, data];
|
|
2368
|
-
case
|
|
2369
|
-
case
|
|
3071
|
+
case 3: return [4 /*yield*/, this.checkForDataToFormUrl(content, enrolledCourseData)];
|
|
3072
|
+
case 4:
|
|
2370
3073
|
data = _a.sent();
|
|
2371
3074
|
return [2 /*return*/, data];
|
|
2372
|
-
case
|
|
3075
|
+
case 5: return [2 /*return*/, this.gotoTocPage(content)];
|
|
2373
3076
|
}
|
|
2374
3077
|
});
|
|
2375
3078
|
});
|
|
@@ -2379,7 +3082,7 @@ var WidgetContentService = /** @class */ (function () {
|
|
|
2379
3082
|
* @param {?} enrollData
|
|
2380
3083
|
* @return {?}
|
|
2381
3084
|
*/
|
|
2382
|
-
|
|
3085
|
+
WidgetContentLibService.prototype.checkForDataToFormUrl = /**
|
|
2383
3086
|
* @param {?} content
|
|
2384
3087
|
* @param {?} enrollData
|
|
2385
3088
|
* @return {?}
|
|
@@ -2437,7 +3140,7 @@ var WidgetContentService = /** @class */ (function () {
|
|
|
2437
3140
|
* @param {?} mimeType
|
|
2438
3141
|
* @return {?}
|
|
2439
3142
|
*/
|
|
2440
|
-
|
|
3143
|
+
WidgetContentLibService.prototype.getResourseDataWithData = /**
|
|
2441
3144
|
* @param {?} content
|
|
2442
3145
|
* @param {?} resourseId
|
|
2443
3146
|
* @param {?} mimeType
|
|
@@ -2455,7 +3158,7 @@ var WidgetContentService = /** @class */ (function () {
|
|
|
2455
3158
|
* @param {?} content
|
|
2456
3159
|
* @return {?}
|
|
2457
3160
|
*/
|
|
2458
|
-
|
|
3161
|
+
WidgetContentLibService.prototype.gotoTocPage = /**
|
|
2459
3162
|
* @param {?} content
|
|
2460
3163
|
* @return {?}
|
|
2461
3164
|
*/
|
|
@@ -2474,7 +3177,7 @@ var WidgetContentService = /** @class */ (function () {
|
|
|
2474
3177
|
* @param {?} batchData
|
|
2475
3178
|
* @return {?}
|
|
2476
3179
|
*/
|
|
2477
|
-
|
|
3180
|
+
WidgetContentLibService.prototype.isBatchInProgress = /**
|
|
2478
3181
|
* @param {?} batchData
|
|
2479
3182
|
* @return {?}
|
|
2480
3183
|
*/
|
|
@@ -2500,7 +3203,7 @@ var WidgetContentService = /** @class */ (function () {
|
|
|
2500
3203
|
* @param {?} req
|
|
2501
3204
|
* @return {?}
|
|
2502
3205
|
*/
|
|
2503
|
-
|
|
3206
|
+
WidgetContentLibService.prototype.postApiMethod = /**
|
|
2504
3207
|
* @param {?} apiUrl
|
|
2505
3208
|
* @param {?} req
|
|
2506
3209
|
* @return {?}
|
|
@@ -2512,7 +3215,7 @@ var WidgetContentService = /** @class */ (function () {
|
|
|
2512
3215
|
* @param {?} apiUrl
|
|
2513
3216
|
* @return {?}
|
|
2514
3217
|
*/
|
|
2515
|
-
|
|
3218
|
+
WidgetContentLibService.prototype.getApiMethod = /**
|
|
2516
3219
|
* @param {?} apiUrl
|
|
2517
3220
|
* @return {?}
|
|
2518
3221
|
*/
|
|
@@ -2520,51 +3223,78 @@ var WidgetContentService = /** @class */ (function () {
|
|
|
2520
3223
|
// req.query = req.query || '';
|
|
2521
3224
|
return this.http.get(apiUrl);
|
|
2522
3225
|
};
|
|
2523
|
-
|
|
3226
|
+
/**
|
|
3227
|
+
* @param {?} enrollmentList
|
|
3228
|
+
* @param {?} collectionId
|
|
3229
|
+
* @return {?}
|
|
3230
|
+
*/
|
|
3231
|
+
WidgetContentLibService.prototype.getEnrolledDataFromList = /**
|
|
3232
|
+
* @param {?} enrollmentList
|
|
3233
|
+
* @param {?} collectionId
|
|
3234
|
+
* @return {?}
|
|
3235
|
+
*/
|
|
3236
|
+
function (enrollmentList, collectionId) {
|
|
3237
|
+
if (enrollmentList && enrollmentList.length) {
|
|
3238
|
+
/** @type {?} */
|
|
3239
|
+
var enrolledData = enrollmentList.filter((/**
|
|
3240
|
+
* @param {?} ele
|
|
3241
|
+
* @return {?}
|
|
3242
|
+
*/
|
|
3243
|
+
function (ele) { return ele.collectionId === collectionId; }));
|
|
3244
|
+
return enrolledData.length ? enrolledData[0] : {};
|
|
3245
|
+
}
|
|
3246
|
+
};
|
|
3247
|
+
WidgetContentLibService.decorators = [
|
|
2524
3248
|
{ type: Injectable, args: [{
|
|
2525
3249
|
providedIn: 'root',
|
|
2526
3250
|
},] }
|
|
2527
3251
|
];
|
|
2528
3252
|
/** @nocollapse */
|
|
2529
|
-
|
|
3253
|
+
WidgetContentLibService.ctorParameters = function () { return [
|
|
2530
3254
|
{ type: HttpClient },
|
|
2531
|
-
{ type: ConfigurationsService$1 }
|
|
3255
|
+
{ type: ConfigurationsService$1 },
|
|
3256
|
+
{ type: WidgetUserServiceLib }
|
|
2532
3257
|
]; };
|
|
2533
|
-
/** @nocollapse */
|
|
2534
|
-
return
|
|
3258
|
+
/** @nocollapse */ WidgetContentLibService.ngInjectableDef = ɵɵdefineInjectable({ factory: function WidgetContentLibService_Factory() { return new WidgetContentLibService(ɵɵinject(HttpClient), ɵɵinject(ConfigurationsService$1), ɵɵinject(WidgetUserServiceLib)); }, token: WidgetContentLibService, providedIn: "root" });
|
|
3259
|
+
return WidgetContentLibService;
|
|
2535
3260
|
}());
|
|
2536
3261
|
if (false) {
|
|
2537
3262
|
/** @type {?} */
|
|
2538
|
-
|
|
3263
|
+
WidgetContentLibService.prototype.tocConfigData;
|
|
2539
3264
|
/** @type {?} */
|
|
2540
|
-
|
|
3265
|
+
WidgetContentLibService.prototype.tocConfigData$;
|
|
2541
3266
|
/**
|
|
2542
3267
|
* @type {?}
|
|
2543
3268
|
* @private
|
|
2544
3269
|
*/
|
|
2545
|
-
|
|
3270
|
+
WidgetContentLibService.prototype.telemetryData;
|
|
2546
3271
|
/** @type {?} */
|
|
2547
|
-
|
|
3272
|
+
WidgetContentLibService.prototype.telemetryData$;
|
|
2548
3273
|
/** @type {?} */
|
|
2549
|
-
|
|
3274
|
+
WidgetContentLibService.prototype.currentMetaData;
|
|
2550
3275
|
/** @type {?} */
|
|
2551
|
-
|
|
3276
|
+
WidgetContentLibService.prototype.currentContentReadMetaData;
|
|
2552
3277
|
/** @type {?} */
|
|
2553
|
-
|
|
3278
|
+
WidgetContentLibService.prototype.currentBatchEnrollmentList;
|
|
2554
3279
|
/** @type {?} */
|
|
2555
|
-
|
|
3280
|
+
WidgetContentLibService.prototype.programChildCourseResumeData;
|
|
2556
3281
|
/** @type {?} */
|
|
2557
|
-
|
|
3282
|
+
WidgetContentLibService.prototype.programChildCourseResumeData$;
|
|
3283
|
+
/**
|
|
3284
|
+
* @type {?}
|
|
3285
|
+
* @private
|
|
3286
|
+
*/
|
|
3287
|
+
WidgetContentLibService.prototype.http;
|
|
2558
3288
|
/**
|
|
2559
3289
|
* @type {?}
|
|
2560
3290
|
* @private
|
|
2561
3291
|
*/
|
|
2562
|
-
|
|
3292
|
+
WidgetContentLibService.prototype.configSvc;
|
|
2563
3293
|
/**
|
|
2564
3294
|
* @type {?}
|
|
2565
3295
|
* @private
|
|
2566
3296
|
*/
|
|
2567
|
-
|
|
3297
|
+
WidgetContentLibService.prototype.userSvc;
|
|
2568
3298
|
}
|
|
2569
3299
|
|
|
2570
3300
|
/**
|
|
@@ -2820,859 +3550,253 @@ if (false) {
|
|
|
2820
3550
|
ConfigurationsService.prototype.openExploreMenuForMWeb;
|
|
2821
3551
|
}
|
|
2822
3552
|
|
|
2823
|
-
/**
|
|
2824
|
-
* @fileoverview added by tsickle
|
|
2825
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2826
|
-
*/
|
|
2827
|
-
var MultilingualTranslationsService = /** @class */ (function () {
|
|
2828
|
-
function MultilingualTranslationsService(translate, http, configSvc) {
|
|
2829
|
-
this.translate = translate;
|
|
2830
|
-
this.http = http;
|
|
2831
|
-
this.configSvc = configSvc;
|
|
2832
|
-
this.selectedLang = '';
|
|
2833
|
-
// website lang change
|
|
2834
|
-
this.languageSelected = new BehaviorSubject(true);
|
|
2835
|
-
this.languageSelectedObservable = this.languageSelected.asObservable();
|
|
2836
|
-
this.editProfileDetails = '/apis/proxies/v8/user/v1/extPatch';
|
|
2837
|
-
// this.getLanguage()
|
|
2838
|
-
}
|
|
2839
|
-
/**
|
|
2840
|
-
* @return {?}
|
|
2841
|
-
*/
|
|
2842
|
-
MultilingualTranslationsService.prototype.getLanguage = /**
|
|
2843
|
-
* @return {?}
|
|
2844
|
-
*/
|
|
2845
|
-
function () {
|
|
2846
|
-
if (this.configSvc.unMappedUser) {
|
|
2847
|
-
if (this.configSvc.unMappedUser.profileDetails &&
|
|
2848
|
-
this.configSvc.unMappedUser.profileDetails.additionalProperties &&
|
|
2849
|
-
this.configSvc.unMappedUser.profileDetails.additionalProperties.webPortalLang) {
|
|
2850
|
-
/** @type {?} */
|
|
2851
|
-
var lang = this.configSvc.unMappedUser.profileDetails.additionalProperties.webPortalLang;
|
|
2852
|
-
this.translate.use(lang);
|
|
2853
|
-
localStorage.setItem('websiteLanguage', lang);
|
|
2854
|
-
}
|
|
2855
|
-
else {
|
|
2856
|
-
if (localStorage.getItem('websiteLanguage')) {
|
|
2857
|
-
// this.translate.setDefaultLang('en')
|
|
2858
|
-
/** @type {?} */
|
|
2859
|
-
var lang = JSON.stringify(localStorage.getItem('websiteLanguage'));
|
|
2860
|
-
lang = lang.replace(/\"/g, '');
|
|
2861
|
-
this.translate.use(lang);
|
|
2862
|
-
}
|
|
2863
|
-
else {
|
|
2864
|
-
this.translate.setDefaultLang('en');
|
|
2865
|
-
localStorage.setItem('websiteLanguage', 'en');
|
|
2866
|
-
}
|
|
2867
|
-
}
|
|
2868
|
-
}
|
|
2869
|
-
else {
|
|
2870
|
-
if (localStorage.getItem('websiteLanguage')) {
|
|
2871
|
-
// this.translate.setDefaultLang('en')
|
|
2872
|
-
/** @type {?} */
|
|
2873
|
-
var lang = JSON.stringify(localStorage.getItem('websiteLanguage'));
|
|
2874
|
-
lang = lang.replace(/\"/g, '');
|
|
2875
|
-
this.translate.use(lang);
|
|
2876
|
-
}
|
|
2877
|
-
}
|
|
2878
|
-
};
|
|
2879
|
-
/**
|
|
2880
|
-
* @param {?} label
|
|
2881
|
-
* @param {?} type
|
|
2882
|
-
* @param {?} subtype
|
|
2883
|
-
* @return {?}
|
|
2884
|
-
*/
|
|
2885
|
-
MultilingualTranslationsService.prototype.translateLabelWithoutspace = /**
|
|
2886
|
-
* @param {?} label
|
|
2887
|
-
* @param {?} type
|
|
2888
|
-
* @param {?} subtype
|
|
2889
|
-
* @return {?}
|
|
2890
|
-
*/
|
|
2891
|
-
function (label, type, subtype) {
|
|
2892
|
-
/** @type {?} */
|
|
2893
|
-
var nlabel = label;
|
|
2894
|
-
nlabel = nlabel && nlabel.replace(/\s/g, '');
|
|
2895
|
-
if (subtype) {
|
|
2896
|
-
// tslint:disable-next-line: prefer-template
|
|
2897
|
-
/** @type {?} */
|
|
2898
|
-
var translationKey = type + '.' + nlabel + subtype;
|
|
2899
|
-
return this.translate.instant(translationKey);
|
|
2900
|
-
}
|
|
2901
|
-
// tslint:disable-next-line: prefer-template
|
|
2902
|
-
/** @type {?} */
|
|
2903
|
-
var translationKeyn = type + '.' + nlabel;
|
|
2904
|
-
return this.translate.instant(translationKeyn);
|
|
2905
|
-
};
|
|
2906
|
-
/**
|
|
2907
|
-
* @param {?} label
|
|
2908
|
-
* @param {?} type
|
|
2909
|
-
* @param {?} subtype
|
|
2910
|
-
* @return {?}
|
|
2911
|
-
*/
|
|
2912
|
-
MultilingualTranslationsService.prototype.translateLabel = /**
|
|
2913
|
-
* @param {?} label
|
|
2914
|
-
* @param {?} type
|
|
2915
|
-
* @param {?} subtype
|
|
2916
|
-
* @return {?}
|
|
2917
|
-
*/
|
|
2918
|
-
function (label, type, subtype) {
|
|
2919
|
-
if (label) {
|
|
2920
|
-
/** @type {?} */
|
|
2921
|
-
var nlabel = label;
|
|
2922
|
-
nlabel = nlabel && nlabel.toLowerCase();
|
|
2923
|
-
/** @type {?} */
|
|
2924
|
-
var sl_1 = nlabel.split(' ');
|
|
2925
|
-
sl_1.forEach((/**
|
|
2926
|
-
* @param {?} w
|
|
2927
|
-
* @param {?} index
|
|
2928
|
-
* @return {?}
|
|
2929
|
-
*/
|
|
2930
|
-
function (w, index) {
|
|
2931
|
-
if (index !== 0) {
|
|
2932
|
-
sl_1[index] = w[0].toUpperCase() + w.slice(1);
|
|
2933
|
-
}
|
|
2934
|
-
}));
|
|
2935
|
-
nlabel = sl_1.join('');
|
|
2936
|
-
nlabel = nlabel.replace(/\s/g, '');
|
|
2937
|
-
if (subtype) {
|
|
2938
|
-
// tslint:disable-next-line: prefer-template
|
|
2939
|
-
/** @type {?} */
|
|
2940
|
-
var translationKey = type + '.' + nlabel + subtype;
|
|
2941
|
-
return this.translate.instant(translationKey);
|
|
2942
|
-
}
|
|
2943
|
-
// tslint:disable-next-line: prefer-template
|
|
2944
|
-
/** @type {?} */
|
|
2945
|
-
var translationKeyn = type + '.' + nlabel;
|
|
2946
|
-
return this.translate.instant(translationKeyn);
|
|
2947
|
-
}
|
|
2948
|
-
return label;
|
|
2949
|
-
};
|
|
2950
|
-
/**
|
|
2951
|
-
* @param {?} label
|
|
2952
|
-
* @param {?} type
|
|
2953
|
-
* @param {?} subtype
|
|
2954
|
-
* @return {?}
|
|
2955
|
-
*/
|
|
2956
|
-
MultilingualTranslationsService.prototype.translateActualLabel = /**
|
|
2957
|
-
* @param {?} label
|
|
2958
|
-
* @param {?} type
|
|
2959
|
-
* @param {?} subtype
|
|
2960
|
-
* @return {?}
|
|
2961
|
-
*/
|
|
2962
|
-
function (label, type, subtype) {
|
|
2963
|
-
/** @type {?} */
|
|
2964
|
-
var nlabel = label;
|
|
2965
|
-
/** @type {?} */
|
|
2966
|
-
var sl = nlabel.split(' ');
|
|
2967
|
-
sl.forEach((/**
|
|
2968
|
-
* @param {?} w
|
|
2969
|
-
* @param {?} index
|
|
2970
|
-
* @return {?}
|
|
2971
|
-
*/
|
|
2972
|
-
function (w, index) {
|
|
2973
|
-
if (index !== 0) {
|
|
2974
|
-
sl[index] = w[0].toUpperCase() + w.slice(1);
|
|
2975
|
-
}
|
|
2976
|
-
}));
|
|
2977
|
-
nlabel = sl.join('');
|
|
2978
|
-
nlabel = nlabel.replace(/\s/g, '');
|
|
2979
|
-
if (subtype) {
|
|
2980
|
-
// tslint:disable-next-line: prefer-template
|
|
2981
|
-
/** @type {?} */
|
|
2982
|
-
var translationKey = type + '.' + nlabel + subtype;
|
|
2983
|
-
return this.translate.instant(translationKey);
|
|
2984
|
-
}
|
|
2985
|
-
// tslint:disable-next-line: prefer-template
|
|
2986
|
-
/** @type {?} */
|
|
2987
|
-
var translationKeyn = type + '.' + nlabel;
|
|
2988
|
-
return this.translate.instant(translationKeyn);
|
|
2989
|
-
};
|
|
2990
|
-
/**
|
|
2991
|
-
* @param {?} data
|
|
2992
|
-
* @return {?}
|
|
2993
|
-
*/
|
|
2994
|
-
MultilingualTranslationsService.prototype.editProfileDetailsAPI = /**
|
|
2995
|
-
* @param {?} data
|
|
2996
|
-
* @return {?}
|
|
2997
|
-
*/
|
|
2998
|
-
function (data) {
|
|
2999
|
-
return this.http.post(this.editProfileDetails, data);
|
|
3000
|
-
};
|
|
3001
|
-
/**
|
|
3002
|
-
* @param {?} state
|
|
3003
|
-
* @param {?} lang
|
|
3004
|
-
* @param {?} userid
|
|
3005
|
-
* @return {?}
|
|
3006
|
-
*/
|
|
3007
|
-
MultilingualTranslationsService.prototype.updatelanguageSelected = /**
|
|
3008
|
-
* @param {?} state
|
|
3009
|
-
* @param {?} lang
|
|
3010
|
-
* @param {?} userid
|
|
3011
|
-
* @return {?}
|
|
3012
|
-
*/
|
|
3013
|
-
function (state, lang, userid) {
|
|
3014
|
-
this.languageSelected.next(state);
|
|
3015
|
-
this.translate.use(lang);
|
|
3016
|
-
this.selectedLang = lang;
|
|
3017
|
-
if (userid) {
|
|
3018
|
-
/** @type {?} */
|
|
3019
|
-
var reqUpdates = {
|
|
3020
|
-
request: {
|
|
3021
|
-
userId: userid,
|
|
3022
|
-
profileDetails: {
|
|
3023
|
-
additionalProperties: {
|
|
3024
|
-
webPortalLang: this.selectedLang,
|
|
3025
|
-
},
|
|
3026
|
-
},
|
|
3027
|
-
},
|
|
3028
|
-
};
|
|
3029
|
-
this.editProfileDetailsAPI(reqUpdates).subscribe();
|
|
3030
|
-
}
|
|
3031
|
-
};
|
|
3032
|
-
MultilingualTranslationsService.decorators = [
|
|
3033
|
-
{ type: Injectable, args: [{
|
|
3034
|
-
providedIn: 'root',
|
|
3035
|
-
},] }
|
|
3036
|
-
];
|
|
3037
|
-
/** @nocollapse */
|
|
3038
|
-
MultilingualTranslationsService.ctorParameters = function () { return [
|
|
3039
|
-
{ type: TranslateService },
|
|
3040
|
-
{ type: HttpClient },
|
|
3041
|
-
{ type: ConfigurationsService }
|
|
3042
|
-
]; };
|
|
3043
|
-
/** @nocollapse */ MultilingualTranslationsService.ngInjectableDef = ɵɵdefineInjectable({ factory: function MultilingualTranslationsService_Factory() { return new MultilingualTranslationsService(ɵɵinject(TranslateService), ɵɵinject(HttpClient), ɵɵinject(ConfigurationsService)); }, token: MultilingualTranslationsService, providedIn: "root" });
|
|
3044
|
-
return MultilingualTranslationsService;
|
|
3045
|
-
}());
|
|
3046
|
-
if (false) {
|
|
3047
|
-
/** @type {?} */
|
|
3048
|
-
MultilingualTranslationsService.prototype.selectedLang;
|
|
3049
|
-
/** @type {?} */
|
|
3050
|
-
MultilingualTranslationsService.prototype.languageSelected;
|
|
3051
|
-
/** @type {?} */
|
|
3052
|
-
MultilingualTranslationsService.prototype.languageSelectedObservable;
|
|
3053
|
-
/** @type {?} */
|
|
3054
|
-
MultilingualTranslationsService.prototype.editProfileDetails;
|
|
3055
|
-
/**
|
|
3056
|
-
* @type {?}
|
|
3057
|
-
* @private
|
|
3058
|
-
*/
|
|
3059
|
-
MultilingualTranslationsService.prototype.translate;
|
|
3060
|
-
/**
|
|
3061
|
-
* @type {?}
|
|
3062
|
-
* @private
|
|
3063
|
-
*/
|
|
3064
|
-
MultilingualTranslationsService.prototype.http;
|
|
3065
|
-
/**
|
|
3066
|
-
* @type {?}
|
|
3067
|
-
* @private
|
|
3068
|
-
*/
|
|
3069
|
-
MultilingualTranslationsService.prototype.configSvc;
|
|
3070
|
-
}
|
|
3071
|
-
|
|
3072
|
-
/**
|
|
3073
|
-
* @fileoverview added by tsickle
|
|
3074
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3075
|
-
*/
|
|
3076
|
-
var NsCardContent;
|
|
3077
|
-
(function (NsCardContent) {
|
|
3078
|
-
/**
|
|
3079
|
-
* @record
|
|
3080
|
-
*/
|
|
3081
|
-
function ICard() { }
|
|
3082
|
-
NsCardContent.ICard = ICard;
|
|
3083
|
-
if (false) {
|
|
3084
|
-
/** @type {?} */
|
|
3085
|
-
ICard.prototype.content;
|
|
3086
|
-
/** @type {?} */
|
|
3087
|
-
ICard.prototype.cardSubType;
|
|
3088
|
-
/** @type {?} */
|
|
3089
|
-
ICard.prototype.context;
|
|
3090
|
-
/** @type {?|undefined} */
|
|
3091
|
-
ICard.prototype.intranetMode;
|
|
3092
|
-
/** @type {?|undefined} */
|
|
3093
|
-
ICard.prototype.deletedMode;
|
|
3094
|
-
/** @type {?|undefined} */
|
|
3095
|
-
ICard.prototype.likes;
|
|
3096
|
-
/** @type {?|undefined} */
|
|
3097
|
-
ICard.prototype.contentTags;
|
|
3098
|
-
/** @type {?} */
|
|
3099
|
-
ICard.prototype.stateData;
|
|
3100
|
-
}
|
|
3101
|
-
/**
|
|
3102
|
-
* @record
|
|
3103
|
-
*/
|
|
3104
|
-
function IContentTags() { }
|
|
3105
|
-
NsCardContent.IContentTags = IContentTags;
|
|
3106
|
-
if (false) {
|
|
3107
|
-
/** @type {?|undefined} */
|
|
3108
|
-
IContentTags.prototype.daysSpan;
|
|
3109
|
-
/** @type {?|undefined} */
|
|
3110
|
-
IContentTags.prototype.excludeContentType;
|
|
3111
|
-
/** @type {?|undefined} */
|
|
3112
|
-
IContentTags.prototype.excludeMimeType;
|
|
3113
|
-
/** @type {?} */
|
|
3114
|
-
IContentTags.prototype.tag;
|
|
3115
|
-
/** @type {?|undefined} */
|
|
3116
|
-
IContentTags.prototype.criteriaField;
|
|
3117
|
-
}
|
|
3118
|
-
/**
|
|
3119
|
-
* @record
|
|
3120
|
-
*/
|
|
3121
|
-
function ICompetency() { }
|
|
3122
|
-
NsCardContent.ICompetency = ICompetency;
|
|
3123
|
-
if (false) {
|
|
3124
|
-
/** @type {?} */
|
|
3125
|
-
ICompetency.prototype.competencyArea;
|
|
3126
|
-
/** @type {?} */
|
|
3127
|
-
ICompetency.prototype.competencyObject;
|
|
3128
|
-
}
|
|
3129
|
-
var EContentStatus;
|
|
3130
|
-
(function (EContentStatus) {
|
|
3131
|
-
EContentStatus["LIVE"] = "Live";
|
|
3132
|
-
EContentStatus["EXPIRED"] = "Expired";
|
|
3133
|
-
EContentStatus["DELETED"] = "Deleted";
|
|
3134
|
-
EContentStatus["MARK_FOR_DELETION"] = "MarkedForDeletion";
|
|
3135
|
-
})(EContentStatus = NsCardContent.EContentStatus || (NsCardContent.EContentStatus = {}));
|
|
3136
|
-
var ACBPConst;
|
|
3137
|
-
(function (ACBPConst) {
|
|
3138
|
-
ACBPConst["UPCOMING"] = "upcoming";
|
|
3139
|
-
ACBPConst["ALL"] = "All";
|
|
3140
|
-
ACBPConst["OVERDUE"] = "overdue";
|
|
3141
|
-
ACBPConst["SUCCESS"] = "success";
|
|
3142
|
-
})(ACBPConst = NsCardContent.ACBPConst || (NsCardContent.ACBPConst = {}));
|
|
3143
|
-
var IGOTConst;
|
|
3144
|
-
(function (IGOTConst) {
|
|
3145
|
-
IGOTConst["COMPETENCIES"] = "competencies_v5";
|
|
3146
|
-
IGOTConst["RETIRED"] = "Retired";
|
|
3147
|
-
})(IGOTConst = NsCardContent.IGOTConst || (NsCardContent.IGOTConst = {}));
|
|
3148
|
-
})(NsCardContent || (NsCardContent = {}));
|
|
3149
|
-
|
|
3150
|
-
/**
|
|
3151
|
-
* @fileoverview added by tsickle
|
|
3152
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3153
|
-
*/
|
|
3154
|
-
/** @type {?} */
|
|
3155
|
-
var dayjs = dayjs_
|
|
3156
|
-
// import { environment } from 'src/environments/environment'
|
|
3157
|
-
;
|
|
3158
|
-
/** @type {?} */
|
|
3159
|
-
var PROTECTED_SLAG_V8$1 = '/apis/protected/v8';
|
|
3160
|
-
var ɵ0$1 = /**
|
|
3161
|
-
* @param {?} userId
|
|
3162
|
-
* @return {?}
|
|
3163
|
-
*/
|
|
3164
|
-
function (userId) {
|
|
3165
|
-
return PROTECTED_SLAG_V8$1 + "/user/group/fetchUserGroup?userId=" + userId;
|
|
3166
|
-
}, ɵ1$1 = /**
|
|
3167
|
-
* @param {?} userId
|
|
3168
|
-
* @return {?}
|
|
3169
|
-
*/
|
|
3170
|
-
function (userId) {
|
|
3171
|
-
// tslint:disable-next-line: max-line-length
|
|
3172
|
-
return "/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";
|
|
3173
|
-
}, ɵ2$1 = /**
|
|
3174
|
-
* @param {?} userId
|
|
3175
|
-
* @return {?}
|
|
3176
|
-
*/
|
|
3177
|
-
function (userId) {
|
|
3178
|
-
// tslint:disable-next-line: max-line-length
|
|
3179
|
-
return "/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";
|
|
3180
|
-
}, ɵ3$1 = /**
|
|
3181
|
-
* @param {?} userId
|
|
3182
|
-
* @param {?} orgdetails
|
|
3183
|
-
* @param {?} licenseDetails
|
|
3184
|
-
* @param {?} fields
|
|
3185
|
-
* @param {?} batchDetails
|
|
3186
|
-
* @return {?}
|
|
3187
|
-
*/
|
|
3188
|
-
function (userId, orgdetails, licenseDetails, fields, batchDetails) {
|
|
3189
|
-
// tslint:disable-next-line: max-line-length
|
|
3190
|
-
return "apis/proxies/v8/learner/course/v2/user/enrollment/list/" + userId + "?orgdetails=" + orgdetails + "&licenseDetails=" + licenseDetails + "&fields=" + fields + ",courseCategory," + NsCardContent.IGOTConst.COMPETENCIES + "&batchDetails=" + batchDetails;
|
|
3191
|
-
};
|
|
3192
|
-
/** @type {?} */
|
|
3193
|
-
var API_END_POINTS$1 = {
|
|
3194
|
-
FETCH_USER_GROUPS: (ɵ0$1),
|
|
3195
|
-
FETCH_CPB_PLANS: "/apis/proxies/v8/user/v1/cbplan",
|
|
3196
|
-
FETCH_USER_ENROLLMENT_LIST: (ɵ1$1),
|
|
3197
|
-
FETCH_USER_ENROLLMENT_LIST_PROFILE: (ɵ2$1),
|
|
3198
|
-
// tslint:disable-next-line: max-line-length
|
|
3199
|
-
FETCH_USER_ENROLLMENT_LIST_V2: (ɵ3$1),
|
|
3200
|
-
};
|
|
3201
|
-
var WidgetUserService = /** @class */ (function () {
|
|
3202
|
-
function WidgetUserService(environment, http) {
|
|
3203
|
-
this.http = http;
|
|
3204
|
-
this.environment = environment;
|
|
3205
|
-
}
|
|
3206
|
-
/**
|
|
3207
|
-
* @param {?} error
|
|
3208
|
-
* @return {?}
|
|
3209
|
-
*/
|
|
3210
|
-
WidgetUserService.prototype.handleError = /**
|
|
3211
|
-
* @param {?} error
|
|
3212
|
-
* @return {?}
|
|
3213
|
-
*/
|
|
3214
|
-
function (error) {
|
|
3215
|
-
/** @type {?} */
|
|
3216
|
-
var errorMessage = '';
|
|
3217
|
-
if (error.error instanceof ErrorEvent) {
|
|
3218
|
-
errorMessage = "Error: " + error.error.message;
|
|
3219
|
-
}
|
|
3220
|
-
return throwError(errorMessage);
|
|
3221
|
-
};
|
|
3222
|
-
/**
|
|
3223
|
-
* @param {?} userId
|
|
3224
|
-
* @return {?}
|
|
3225
|
-
*/
|
|
3226
|
-
WidgetUserService.prototype.fetchUserGroupDetails = /**
|
|
3227
|
-
* @param {?} userId
|
|
3228
|
-
* @return {?}
|
|
3229
|
-
*/
|
|
3230
|
-
function (userId) {
|
|
3231
|
-
return this.http
|
|
3232
|
-
.get(API_END_POINTS$1.FETCH_USER_GROUPS(userId))
|
|
3233
|
-
.pipe(catchError(this.handleError));
|
|
3234
|
-
};
|
|
3235
|
-
// tslint:disable-next-line: max-line-length
|
|
3236
|
-
// tslint:disable-next-line: max-line-length
|
|
3553
|
+
/**
|
|
3554
|
+
* @fileoverview added by tsickle
|
|
3555
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3556
|
+
*/
|
|
3557
|
+
var MultilingualTranslationsService = /** @class */ (function () {
|
|
3558
|
+
function MultilingualTranslationsService(translate, http, configSvc) {
|
|
3559
|
+
this.translate = translate;
|
|
3560
|
+
this.http = http;
|
|
3561
|
+
this.configSvc = configSvc;
|
|
3562
|
+
this.selectedLang = '';
|
|
3563
|
+
// website lang change
|
|
3564
|
+
this.languageSelected = new BehaviorSubject(true);
|
|
3565
|
+
this.languageSelectedObservable = this.languageSelected.asObservable();
|
|
3566
|
+
this.editProfileDetails = '/apis/proxies/v8/user/v1/extPatch';
|
|
3567
|
+
// this.getLanguage()
|
|
3568
|
+
}
|
|
3237
3569
|
/**
|
|
3238
|
-
* @param {?} userId
|
|
3239
|
-
* @param {?=} queryParams
|
|
3240
3570
|
* @return {?}
|
|
3241
3571
|
*/
|
|
3242
|
-
|
|
3243
|
-
// tslint:disable-next-line: max-line-length
|
|
3244
|
-
/**
|
|
3245
|
-
* @param {?} userId
|
|
3246
|
-
* @param {?=} queryParams
|
|
3572
|
+
MultilingualTranslationsService.prototype.getLanguage = /**
|
|
3247
3573
|
* @return {?}
|
|
3248
3574
|
*/
|
|
3249
|
-
function (
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
// tslint:disable-next-line: max-line-length
|
|
3255
|
-
path = API_END_POINTS$1.FETCH_USER_ENROLLMENT_LIST_V2(userId, queryParams.orgdetails, queryParams.licenseDetails, queryParams.fields, queryParams.batchDetails);
|
|
3256
|
-
}
|
|
3257
|
-
else {
|
|
3258
|
-
path = API_END_POINTS$1.FETCH_USER_ENROLLMENT_LIST(userId);
|
|
3259
|
-
}
|
|
3260
|
-
/** @type {?} */
|
|
3261
|
-
var headers = new HttpHeaders({
|
|
3262
|
-
'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
|
|
3263
|
-
Pragma: 'no-cache',
|
|
3264
|
-
Expires: '0',
|
|
3265
|
-
});
|
|
3266
|
-
if (this.checkStorageData('enrollmentService', 'enrollmentData')) {
|
|
3267
|
-
/** @type {?} */
|
|
3268
|
-
var result = this.http.get(path, { headers: headers }).pipe(catchError(this.handleError), map((/**
|
|
3269
|
-
* @param {?} data
|
|
3270
|
-
* @return {?}
|
|
3271
|
-
*/
|
|
3272
|
-
function (data) {
|
|
3575
|
+
function () {
|
|
3576
|
+
if (this.configSvc.unMappedUser) {
|
|
3577
|
+
if (this.configSvc.unMappedUser.profileDetails &&
|
|
3578
|
+
this.configSvc.unMappedUser.profileDetails.additionalProperties &&
|
|
3579
|
+
this.configSvc.unMappedUser.profileDetails.additionalProperties.webPortalLang) {
|
|
3273
3580
|
/** @type {?} */
|
|
3274
|
-
var
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
}));
|
|
3286
|
-
_this.storeUserEnrollmentInfo(data.result.userCourseEnrolmentInfo, data.result.courses.length);
|
|
3287
|
-
data.result.courses = coursesData;
|
|
3288
|
-
if (data.result.courses.length < 200) {
|
|
3289
|
-
localStorage.removeItem('enrollmentData');
|
|
3290
|
-
_this.setTime('enrollmentService');
|
|
3291
|
-
localStorage.setItem('enrollmentData', JSON.stringify(data.result));
|
|
3292
|
-
_this.mapEnrollmentData(data.result);
|
|
3293
|
-
return data.result;
|
|
3294
|
-
}
|
|
3581
|
+
var lang = this.configSvc.unMappedUser.profileDetails.additionalProperties.webPortalLang;
|
|
3582
|
+
this.translate.use(lang);
|
|
3583
|
+
localStorage.setItem('websiteLanguage', lang);
|
|
3584
|
+
}
|
|
3585
|
+
else {
|
|
3586
|
+
if (localStorage.getItem('websiteLanguage')) {
|
|
3587
|
+
// this.translate.setDefaultLang('en')
|
|
3588
|
+
/** @type {?} */
|
|
3589
|
+
var lang = JSON.stringify(localStorage.getItem('websiteLanguage'));
|
|
3590
|
+
lang = lang.replace(/\"/g, '');
|
|
3591
|
+
this.translate.use(lang);
|
|
3295
3592
|
}
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
return this.getData('enrollmentData');
|
|
3302
|
-
};
|
|
3303
|
-
// tslint:disable-next-line: max-line-length
|
|
3304
|
-
// tslint:disable-next-line: max-line-length
|
|
3305
|
-
/**
|
|
3306
|
-
* @param {?} userId
|
|
3307
|
-
* @param {?=} queryParams
|
|
3308
|
-
* @return {?}
|
|
3309
|
-
*/
|
|
3310
|
-
WidgetUserService.prototype.fetchProfileUserBatchList =
|
|
3311
|
-
// tslint:disable-next-line: max-line-length
|
|
3312
|
-
/**
|
|
3313
|
-
* @param {?} userId
|
|
3314
|
-
* @param {?=} queryParams
|
|
3315
|
-
* @return {?}
|
|
3316
|
-
*/
|
|
3317
|
-
function (userId, queryParams) {
|
|
3318
|
-
/** @type {?} */
|
|
3319
|
-
var path = '';
|
|
3320
|
-
if (queryParams) {
|
|
3321
|
-
// tslint:disable-next-line: max-line-length
|
|
3322
|
-
path = API_END_POINTS$1.FETCH_USER_ENROLLMENT_LIST_V2(userId, queryParams.orgdetails, queryParams.licenseDetails, queryParams.fields, queryParams.batchDetails);
|
|
3593
|
+
else {
|
|
3594
|
+
this.translate.setDefaultLang('en');
|
|
3595
|
+
localStorage.setItem('websiteLanguage', 'en');
|
|
3596
|
+
}
|
|
3597
|
+
}
|
|
3323
3598
|
}
|
|
3324
3599
|
else {
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
/** @type {?} */
|
|
3328
|
-
var headers = new HttpHeaders({
|
|
3329
|
-
'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
|
|
3330
|
-
Pragma: 'no-cache',
|
|
3331
|
-
Expires: '0',
|
|
3332
|
-
});
|
|
3333
|
-
return this.http
|
|
3334
|
-
.get(path, { headers: headers })
|
|
3335
|
-
.pipe(catchError(this.handleError), map((/**
|
|
3336
|
-
* @param {?} data
|
|
3337
|
-
* @return {?}
|
|
3338
|
-
*/
|
|
3339
|
-
function (data) { return data.result; })));
|
|
3340
|
-
// if (this.checkStorageData('enrollmentService')) {
|
|
3341
|
-
// const result: any = this.http.get(path, { headers }).pipe(catchError(this.handleError), map(
|
|
3342
|
-
// (data: any) => {
|
|
3343
|
-
// localStorage.setItem('enrollmentData', JSON.stringify(data.result))
|
|
3344
|
-
// this.mapEnrollmentData(data.result)
|
|
3345
|
-
// return data.result
|
|
3346
|
-
// }
|
|
3347
|
-
// )
|
|
3348
|
-
// )
|
|
3349
|
-
// this.setTime('enrollmentService')
|
|
3350
|
-
// return result
|
|
3351
|
-
// }
|
|
3352
|
-
// return this.getData('enrollmentData')
|
|
3353
|
-
};
|
|
3354
|
-
/**
|
|
3355
|
-
* @param {?} key
|
|
3356
|
-
* @param {?} dataKey
|
|
3357
|
-
* @return {?}
|
|
3358
|
-
*/
|
|
3359
|
-
WidgetUserService.prototype.checkStorageData = /**
|
|
3360
|
-
* @param {?} key
|
|
3361
|
-
* @param {?} dataKey
|
|
3362
|
-
* @return {?}
|
|
3363
|
-
*/
|
|
3364
|
-
function (key, dataKey) {
|
|
3365
|
-
/** @type {?} */
|
|
3366
|
-
var checkTime = localStorage.getItem('timeCheck');
|
|
3367
|
-
if (checkTime) {
|
|
3368
|
-
/** @type {?} */
|
|
3369
|
-
var parsedData = JSON.parse(checkTime);
|
|
3370
|
-
if (parsedData[key]) {
|
|
3371
|
-
/** @type {?} */
|
|
3372
|
-
var date = dayjs();
|
|
3373
|
-
/** @type {?} */
|
|
3374
|
-
var diffMin = date.diff(parsedData[key], 'minute');
|
|
3600
|
+
if (localStorage.getItem('websiteLanguage')) {
|
|
3601
|
+
// this.translate.setDefaultLang('en')
|
|
3375
3602
|
/** @type {?} */
|
|
3376
|
-
var
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
}
|
|
3380
|
-
return localStorage.getItem(dataKey) ? false : true;
|
|
3603
|
+
var lang = JSON.stringify(localStorage.getItem('websiteLanguage'));
|
|
3604
|
+
lang = lang.replace(/\"/g, '');
|
|
3605
|
+
this.translate.use(lang);
|
|
3381
3606
|
}
|
|
3382
|
-
return true;
|
|
3383
3607
|
}
|
|
3384
|
-
return true;
|
|
3385
|
-
};
|
|
3386
|
-
/**
|
|
3387
|
-
* @param {?} key
|
|
3388
|
-
* @return {?}
|
|
3389
|
-
*/
|
|
3390
|
-
WidgetUserService.prototype.getData = /**
|
|
3391
|
-
* @param {?} key
|
|
3392
|
-
* @return {?}
|
|
3393
|
-
*/
|
|
3394
|
-
function (key) {
|
|
3395
|
-
return Observable.of(JSON.parse(localStorage.getItem(key) || '{}'));
|
|
3396
|
-
};
|
|
3397
|
-
/**
|
|
3398
|
-
* @param {?} key
|
|
3399
|
-
* @return {?}
|
|
3400
|
-
*/
|
|
3401
|
-
WidgetUserService.prototype.getSavedData = /**
|
|
3402
|
-
* @param {?} key
|
|
3403
|
-
* @return {?}
|
|
3404
|
-
*/
|
|
3405
|
-
function (key) {
|
|
3406
|
-
return JSON.parse(localStorage.getItem(key) || '');
|
|
3407
3608
|
};
|
|
3408
3609
|
/**
|
|
3409
|
-
* @param {?}
|
|
3610
|
+
* @param {?} label
|
|
3611
|
+
* @param {?} type
|
|
3612
|
+
* @param {?} subtype
|
|
3410
3613
|
* @return {?}
|
|
3411
3614
|
*/
|
|
3412
|
-
|
|
3413
|
-
* @param {?}
|
|
3615
|
+
MultilingualTranslationsService.prototype.translateLabelWithoutspace = /**
|
|
3616
|
+
* @param {?} label
|
|
3617
|
+
* @param {?} type
|
|
3618
|
+
* @param {?} subtype
|
|
3414
3619
|
* @return {?}
|
|
3415
3620
|
*/
|
|
3416
|
-
function (
|
|
3621
|
+
function (label, type, subtype) {
|
|
3417
3622
|
/** @type {?} */
|
|
3418
|
-
var
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
parsedData[key] = new Date().getTime();
|
|
3423
|
-
localStorage.setItem('timeCheck', JSON.stringify(parsedData));
|
|
3424
|
-
}
|
|
3425
|
-
else {
|
|
3623
|
+
var nlabel = label;
|
|
3624
|
+
nlabel = nlabel && nlabel.replace(/\s/g, '');
|
|
3625
|
+
if (subtype) {
|
|
3626
|
+
// tslint:disable-next-line: prefer-template
|
|
3426
3627
|
/** @type {?} */
|
|
3427
|
-
var
|
|
3428
|
-
|
|
3429
|
-
localStorage.setItem('timeCheck', JSON.stringify(data));
|
|
3628
|
+
var translationKey = type + '.' + nlabel + subtype;
|
|
3629
|
+
return this.translate.instant(translationKey);
|
|
3430
3630
|
}
|
|
3631
|
+
// tslint:disable-next-line: prefer-template
|
|
3632
|
+
/** @type {?} */
|
|
3633
|
+
var translationKeyn = type + '.' + nlabel;
|
|
3634
|
+
return this.translate.instant(translationKeyn);
|
|
3431
3635
|
};
|
|
3432
3636
|
/**
|
|
3433
|
-
* @param {?}
|
|
3637
|
+
* @param {?} label
|
|
3638
|
+
* @param {?} type
|
|
3639
|
+
* @param {?} subtype
|
|
3434
3640
|
* @return {?}
|
|
3435
3641
|
*/
|
|
3436
|
-
|
|
3437
|
-
* @param {?}
|
|
3642
|
+
MultilingualTranslationsService.prototype.translateLabel = /**
|
|
3643
|
+
* @param {?} label
|
|
3644
|
+
* @param {?} type
|
|
3645
|
+
* @param {?} subtype
|
|
3438
3646
|
* @return {?}
|
|
3439
3647
|
*/
|
|
3440
|
-
function (
|
|
3441
|
-
|
|
3442
|
-
var checkTime = localStorage.getItem('timeCheck');
|
|
3443
|
-
if (checkTime) {
|
|
3648
|
+
function (label, type, subtype) {
|
|
3649
|
+
if (label) {
|
|
3444
3650
|
/** @type {?} */
|
|
3445
|
-
var
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3651
|
+
var nlabel = label;
|
|
3652
|
+
nlabel = nlabel && nlabel.toLowerCase();
|
|
3653
|
+
/** @type {?} */
|
|
3654
|
+
var sl_1 = nlabel.split(' ');
|
|
3655
|
+
sl_1.forEach((/**
|
|
3656
|
+
* @param {?} w
|
|
3657
|
+
* @param {?} index
|
|
3658
|
+
* @return {?}
|
|
3659
|
+
*/
|
|
3660
|
+
function (w, index) {
|
|
3661
|
+
if (index !== 0) {
|
|
3662
|
+
sl_1[index] = w[0].toUpperCase() + w.slice(1);
|
|
3663
|
+
}
|
|
3664
|
+
}));
|
|
3665
|
+
nlabel = sl_1.join('');
|
|
3666
|
+
nlabel = nlabel.replace(/\s/g, '');
|
|
3667
|
+
if (subtype) {
|
|
3668
|
+
// tslint:disable-next-line: prefer-template
|
|
3669
|
+
/** @type {?} */
|
|
3670
|
+
var translationKey = type + '.' + nlabel + subtype;
|
|
3671
|
+
return this.translate.instant(translationKey);
|
|
3449
3672
|
}
|
|
3673
|
+
// tslint:disable-next-line: prefer-template
|
|
3674
|
+
/** @type {?} */
|
|
3675
|
+
var translationKeyn = type + '.' + nlabel;
|
|
3676
|
+
return this.translate.instant(translationKeyn);
|
|
3450
3677
|
}
|
|
3678
|
+
return label;
|
|
3451
3679
|
};
|
|
3452
3680
|
/**
|
|
3681
|
+
* @param {?} label
|
|
3682
|
+
* @param {?} type
|
|
3683
|
+
* @param {?} subtype
|
|
3453
3684
|
* @return {?}
|
|
3454
3685
|
*/
|
|
3455
|
-
|
|
3686
|
+
MultilingualTranslationsService.prototype.translateActualLabel = /**
|
|
3687
|
+
* @param {?} label
|
|
3688
|
+
* @param {?} type
|
|
3689
|
+
* @param {?} subtype
|
|
3456
3690
|
* @return {?}
|
|
3457
3691
|
*/
|
|
3458
|
-
function () {
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3692
|
+
function (label, type, subtype) {
|
|
3693
|
+
/** @type {?} */
|
|
3694
|
+
var nlabel = label;
|
|
3695
|
+
/** @type {?} */
|
|
3696
|
+
var sl = nlabel.split(' ');
|
|
3697
|
+
sl.forEach((/**
|
|
3698
|
+
* @param {?} w
|
|
3699
|
+
* @param {?} index
|
|
3700
|
+
* @return {?}
|
|
3701
|
+
*/
|
|
3702
|
+
function (w, index) {
|
|
3703
|
+
if (index !== 0) {
|
|
3704
|
+
sl[index] = w[0].toUpperCase() + w.slice(1);
|
|
3705
|
+
}
|
|
3706
|
+
}));
|
|
3707
|
+
nlabel = sl.join('');
|
|
3708
|
+
nlabel = nlabel.replace(/\s/g, '');
|
|
3709
|
+
if (subtype) {
|
|
3710
|
+
// tslint:disable-next-line: prefer-template
|
|
3473
3711
|
/** @type {?} */
|
|
3474
|
-
var
|
|
3475
|
-
|
|
3476
|
-
* @return {?}
|
|
3477
|
-
*/
|
|
3478
|
-
function (data) { return __awaiter(_this, void 0, void 0, function () {
|
|
3479
|
-
return __generator(this, function (_a) {
|
|
3480
|
-
switch (_a.label) {
|
|
3481
|
-
case 0: return [4 /*yield*/, this.mapData(data.result)];
|
|
3482
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
3483
|
-
}
|
|
3484
|
-
});
|
|
3485
|
-
}); })));
|
|
3486
|
-
this.setTime('cbpService');
|
|
3487
|
-
return result;
|
|
3712
|
+
var translationKey = type + '.' + nlabel + subtype;
|
|
3713
|
+
return this.translate.instant(translationKey);
|
|
3488
3714
|
}
|
|
3489
|
-
|
|
3715
|
+
// tslint:disable-next-line: prefer-template
|
|
3716
|
+
/** @type {?} */
|
|
3717
|
+
var translationKeyn = type + '.' + nlabel;
|
|
3718
|
+
return this.translate.instant(translationKeyn);
|
|
3490
3719
|
};
|
|
3491
3720
|
/**
|
|
3492
3721
|
* @param {?} data
|
|
3493
3722
|
* @return {?}
|
|
3494
3723
|
*/
|
|
3495
|
-
|
|
3724
|
+
MultilingualTranslationsService.prototype.editProfileDetailsAPI = /**
|
|
3496
3725
|
* @param {?} data
|
|
3497
3726
|
* @return {?}
|
|
3498
3727
|
*/
|
|
3499
3728
|
function (data) {
|
|
3500
|
-
return
|
|
3501
|
-
var contentNew, todayDate, enrollList, sortedData, uniqueUsersByID, sortedByEndDate, sortedByStatus;
|
|
3502
|
-
return __generator(this, function (_a) {
|
|
3503
|
-
contentNew = [];
|
|
3504
|
-
todayDate = dayjs().format('YYYY-MM-DD');
|
|
3505
|
-
enrollList = JSON.parse(localStorage.getItem('enrollmentMapData') || '{}');
|
|
3506
|
-
if (data && data.count) {
|
|
3507
|
-
data.content.forEach((/**
|
|
3508
|
-
* @param {?} c
|
|
3509
|
-
* @return {?}
|
|
3510
|
-
*/
|
|
3511
|
-
function (c) {
|
|
3512
|
-
c.contentList.forEach((/**
|
|
3513
|
-
* @param {?} childData
|
|
3514
|
-
* @return {?}
|
|
3515
|
-
*/
|
|
3516
|
-
function (childData) {
|
|
3517
|
-
/** @type {?} */
|
|
3518
|
-
var childEnrollData = enrollList[childData.identifier];
|
|
3519
|
-
/** @type {?} */
|
|
3520
|
-
var endDate = dayjs(c.endDate).format('YYYY-MM-DD');
|
|
3521
|
-
/** @type {?} */
|
|
3522
|
-
var daysCount = dayjs(endDate).diff(todayDate, 'day');
|
|
3523
|
-
childData['planDuration'] = daysCount < 0 ? NsCardContent.ACBPConst.OVERDUE : daysCount > 29
|
|
3524
|
-
? NsCardContent.ACBPConst.SUCCESS : NsCardContent.ACBPConst.UPCOMING;
|
|
3525
|
-
childData['endDate'] = c.endDate;
|
|
3526
|
-
childData['parentId'] = c.id;
|
|
3527
|
-
childData['planType'] = 'cbPlan';
|
|
3528
|
-
if (childData.status !== NsCardContent.IGOTConst.RETIRED) {
|
|
3529
|
-
contentNew.push(childData);
|
|
3530
|
-
}
|
|
3531
|
-
else {
|
|
3532
|
-
if (childEnrollData && childEnrollData.status === 2) {
|
|
3533
|
-
contentNew.push(childData);
|
|
3534
|
-
}
|
|
3535
|
-
}
|
|
3536
|
-
/** @type {?} */
|
|
3537
|
-
var competencyArea = [];
|
|
3538
|
-
/** @type {?} */
|
|
3539
|
-
var competencyTheme = [];
|
|
3540
|
-
/** @type {?} */
|
|
3541
|
-
var competencyThemeType = [];
|
|
3542
|
-
/** @type {?} */
|
|
3543
|
-
var competencySubTheme = [];
|
|
3544
|
-
/** @type {?} */
|
|
3545
|
-
var competencyAreaId = [];
|
|
3546
|
-
/** @type {?} */
|
|
3547
|
-
var competencyThemeId = [];
|
|
3548
|
-
/** @type {?} */
|
|
3549
|
-
var competencySubThemeId = [];
|
|
3550
|
-
childData['contentStatus'] = 0;
|
|
3551
|
-
if (childEnrollData) {
|
|
3552
|
-
childData['contentStatus'] = childEnrollData.status;
|
|
3553
|
-
}
|
|
3554
|
-
if (childData.competencies_v5) {
|
|
3555
|
-
childData.competencies_v5.forEach((/**
|
|
3556
|
-
* @param {?} element
|
|
3557
|
-
* @return {?}
|
|
3558
|
-
*/
|
|
3559
|
-
function (element) {
|
|
3560
|
-
if (!competencyArea.includes(element.competencyArea)) {
|
|
3561
|
-
competencyArea.push(element.competencyArea);
|
|
3562
|
-
competencyAreaId.push(element.competencyAreaId);
|
|
3563
|
-
}
|
|
3564
|
-
if (!competencyTheme.includes(element.competencyTheme)) {
|
|
3565
|
-
competencyTheme.push(element.competencyTheme);
|
|
3566
|
-
competencyThemeId.push(element.competencyThemeId);
|
|
3567
|
-
}
|
|
3568
|
-
if (!competencyThemeType.includes(element.competencyThemeType)) {
|
|
3569
|
-
competencyThemeType.push(element.competencyThemeType);
|
|
3570
|
-
}
|
|
3571
|
-
if (!competencySubTheme.includes(element.competencySubTheme)) {
|
|
3572
|
-
competencySubTheme.push(element.competencySubTheme);
|
|
3573
|
-
competencySubThemeId.push(element.competencySubThemeId);
|
|
3574
|
-
}
|
|
3575
|
-
}));
|
|
3576
|
-
}
|
|
3577
|
-
childData['competencyArea'] = competencyArea;
|
|
3578
|
-
childData['competencyTheme'] = competencyTheme;
|
|
3579
|
-
childData['competencyThemeType'] = competencyThemeType;
|
|
3580
|
-
childData['competencySubTheme'] = competencySubTheme;
|
|
3581
|
-
childData['competencyAreaId'] = competencyAreaId;
|
|
3582
|
-
childData['competencyThemeId'] = competencyThemeId;
|
|
3583
|
-
childData['competencySubThemeId'] = competencySubThemeId;
|
|
3584
|
-
}));
|
|
3585
|
-
}));
|
|
3586
|
-
if (contentNew.length > 1) {
|
|
3587
|
-
sortedData = contentNew.sort((/**
|
|
3588
|
-
* @param {?} a
|
|
3589
|
-
* @param {?} b
|
|
3590
|
-
* @return {?}
|
|
3591
|
-
*/
|
|
3592
|
-
function (a, b) {
|
|
3593
|
-
/** @type {?} */
|
|
3594
|
-
var firstDate = new Date(a.endDate);
|
|
3595
|
-
/** @type {?} */
|
|
3596
|
-
var secondDate = new Date(b.endDate);
|
|
3597
|
-
return secondDate > firstDate ? 1 : -1;
|
|
3598
|
-
}));
|
|
3599
|
-
uniqueUsersByID = uniqBy(sortedData, 'identifier');
|
|
3600
|
-
sortedByEndDate = orderBy(uniqueUsersByID, ['endDate'], ['asc']);
|
|
3601
|
-
sortedByStatus = orderBy(sortedByEndDate, ['contentStatus'], ['asc']);
|
|
3602
|
-
localStorage.setItem('cbpData', JSON.stringify(sortedByStatus));
|
|
3603
|
-
return [2 /*return*/, sortedByStatus];
|
|
3604
|
-
}
|
|
3605
|
-
localStorage.setItem('cbpData', JSON.stringify(contentNew));
|
|
3606
|
-
return [2 /*return*/, contentNew];
|
|
3607
|
-
}
|
|
3608
|
-
localStorage.setItem('cbpData', JSON.stringify([]));
|
|
3609
|
-
return [2 /*return*/, []];
|
|
3610
|
-
});
|
|
3611
|
-
});
|
|
3729
|
+
return this.http.post(this.editProfileDetails, data);
|
|
3612
3730
|
};
|
|
3613
3731
|
/**
|
|
3614
|
-
* @param {?}
|
|
3732
|
+
* @param {?} state
|
|
3733
|
+
* @param {?} lang
|
|
3734
|
+
* @param {?} userid
|
|
3615
3735
|
* @return {?}
|
|
3616
3736
|
*/
|
|
3617
|
-
|
|
3618
|
-
* @param {?}
|
|
3737
|
+
MultilingualTranslationsService.prototype.updatelanguageSelected = /**
|
|
3738
|
+
* @param {?} state
|
|
3739
|
+
* @param {?} lang
|
|
3740
|
+
* @param {?} userid
|
|
3619
3741
|
* @return {?}
|
|
3620
3742
|
*/
|
|
3621
|
-
function (
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3743
|
+
function (state, lang, userid) {
|
|
3744
|
+
this.languageSelected.next(state);
|
|
3745
|
+
this.translate.use(lang);
|
|
3746
|
+
this.selectedLang = lang;
|
|
3747
|
+
if (userid) {
|
|
3748
|
+
/** @type {?} */
|
|
3749
|
+
var reqUpdates = {
|
|
3750
|
+
request: {
|
|
3751
|
+
userId: userid,
|
|
3752
|
+
profileDetails: {
|
|
3753
|
+
additionalProperties: {
|
|
3754
|
+
webPortalLang: this.selectedLang,
|
|
3755
|
+
},
|
|
3756
|
+
},
|
|
3757
|
+
},
|
|
3758
|
+
};
|
|
3759
|
+
this.editProfileDetailsAPI(reqUpdates).subscribe();
|
|
3632
3760
|
}
|
|
3633
|
-
localStorage.removeItem('enrollmentMapData');
|
|
3634
|
-
localStorage.setItem('enrollmentMapData', JSON.stringify(enrollData));
|
|
3635
|
-
};
|
|
3636
|
-
/**
|
|
3637
|
-
* @param {?} enrollmentData
|
|
3638
|
-
* @param {?} enrolledCourseCount
|
|
3639
|
-
* @return {?}
|
|
3640
|
-
*/
|
|
3641
|
-
WidgetUserService.prototype.storeUserEnrollmentInfo = /**
|
|
3642
|
-
* @param {?} enrollmentData
|
|
3643
|
-
* @param {?} enrolledCourseCount
|
|
3644
|
-
* @return {?}
|
|
3645
|
-
*/
|
|
3646
|
-
function (enrollmentData, enrolledCourseCount) {
|
|
3647
|
-
/** @type {?} */
|
|
3648
|
-
var userData = {
|
|
3649
|
-
enrolledCourseCount: enrolledCourseCount,
|
|
3650
|
-
userCourseEnrolmentInfo: enrollmentData,
|
|
3651
|
-
};
|
|
3652
|
-
localStorage.removeItem('userEnrollmentCount');
|
|
3653
|
-
localStorage.setItem('userEnrollmentCount', JSON.stringify(userData));
|
|
3654
3761
|
};
|
|
3655
|
-
|
|
3762
|
+
MultilingualTranslationsService.decorators = [
|
|
3656
3763
|
{ type: Injectable, args: [{
|
|
3657
3764
|
providedIn: 'root',
|
|
3658
3765
|
},] }
|
|
3659
3766
|
];
|
|
3660
3767
|
/** @nocollapse */
|
|
3661
|
-
|
|
3662
|
-
{ type:
|
|
3663
|
-
{ type: HttpClient }
|
|
3768
|
+
MultilingualTranslationsService.ctorParameters = function () { return [
|
|
3769
|
+
{ type: TranslateService },
|
|
3770
|
+
{ type: HttpClient },
|
|
3771
|
+
{ type: ConfigurationsService }
|
|
3664
3772
|
]; };
|
|
3665
|
-
/** @nocollapse */
|
|
3666
|
-
return
|
|
3773
|
+
/** @nocollapse */ MultilingualTranslationsService.ngInjectableDef = ɵɵdefineInjectable({ factory: function MultilingualTranslationsService_Factory() { return new MultilingualTranslationsService(ɵɵinject(TranslateService), ɵɵinject(HttpClient), ɵɵinject(ConfigurationsService)); }, token: MultilingualTranslationsService, providedIn: "root" });
|
|
3774
|
+
return MultilingualTranslationsService;
|
|
3667
3775
|
}());
|
|
3668
3776
|
if (false) {
|
|
3669
3777
|
/** @type {?} */
|
|
3670
|
-
|
|
3778
|
+
MultilingualTranslationsService.prototype.selectedLang;
|
|
3779
|
+
/** @type {?} */
|
|
3780
|
+
MultilingualTranslationsService.prototype.languageSelected;
|
|
3781
|
+
/** @type {?} */
|
|
3782
|
+
MultilingualTranslationsService.prototype.languageSelectedObservable;
|
|
3783
|
+
/** @type {?} */
|
|
3784
|
+
MultilingualTranslationsService.prototype.editProfileDetails;
|
|
3785
|
+
/**
|
|
3786
|
+
* @type {?}
|
|
3787
|
+
* @private
|
|
3788
|
+
*/
|
|
3789
|
+
MultilingualTranslationsService.prototype.translate;
|
|
3790
|
+
/**
|
|
3791
|
+
* @type {?}
|
|
3792
|
+
* @private
|
|
3793
|
+
*/
|
|
3794
|
+
MultilingualTranslationsService.prototype.http;
|
|
3671
3795
|
/**
|
|
3672
3796
|
* @type {?}
|
|
3673
3797
|
* @private
|
|
3674
3798
|
*/
|
|
3675
|
-
|
|
3799
|
+
MultilingualTranslationsService.prototype.configSvc;
|
|
3676
3800
|
}
|
|
3677
3801
|
|
|
3678
3802
|
/**
|
|
@@ -4233,9 +4357,6 @@ var ContentStripWithTabsLibComponent = /** @class */ (function (_super) {
|
|
|
4233
4357
|
this.fetchAllPlaylistSearch(strip, calculateParentStatus);
|
|
4234
4358
|
this.fetchPlaylistReadData(strip, calculateParentStatus);
|
|
4235
4359
|
this.fetchCiosContentData(strip, calculateParentStatus);
|
|
4236
|
-
// this.enrollInterval = setInterval(() => {
|
|
4237
|
-
// this.fetchAllCbpPlans(strip, calculateParentStatus)
|
|
4238
|
-
// }, 1000)
|
|
4239
4360
|
};
|
|
4240
4361
|
/**
|
|
4241
4362
|
* @param {?} strip
|
|
@@ -4478,12 +4599,12 @@ var ContentStripWithTabsLibComponent = /** @class */ (function (_super) {
|
|
|
4478
4599
|
function (strip, calculateParentStatus) {
|
|
4479
4600
|
if (calculateParentStatus === void 0) { calculateParentStatus = true; }
|
|
4480
4601
|
return __awaiter(this, void 0, void 0, function () {
|
|
4481
|
-
var originalFilters, firstTab, allTabs, currentTabFromMap,
|
|
4602
|
+
var originalFilters, firstTab, allTabs, currentTabFromMap, response, result, responseData, error_1;
|
|
4482
4603
|
var _this = this;
|
|
4483
4604
|
return __generator(this, function (_a) {
|
|
4484
4605
|
switch (_a.label) {
|
|
4485
4606
|
case 0:
|
|
4486
|
-
if (!(strip.request && strip.request.searchV6 && Object.keys(strip.request.searchV6).length)) return [3 /*break*/,
|
|
4607
|
+
if (!(strip.request && strip.request.searchV6 && Object.keys(strip.request.searchV6).length)) return [3 /*break*/, 11];
|
|
4487
4608
|
// if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
|
|
4488
4609
|
// if (this.configSvc.activeLocale) {
|
|
4489
4610
|
// strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
|
|
@@ -4512,44 +4633,75 @@ var ContentStripWithTabsLibComponent = /** @class */ (function (_super) {
|
|
|
4512
4633
|
this.getTabDataByNewReqSearchV6(strip, 0, currentTabFromMap, calculateParentStatus);
|
|
4513
4634
|
}
|
|
4514
4635
|
}
|
|
4515
|
-
return [3 /*break*/,
|
|
4636
|
+
return [3 /*break*/, 11];
|
|
4516
4637
|
case 1:
|
|
4517
|
-
_a.trys.push([1,
|
|
4638
|
+
_a.trys.push([1, 10, , 11]);
|
|
4518
4639
|
return [4 /*yield*/, this.searchV6Request(strip, strip.request, calculateParentStatus)];
|
|
4519
4640
|
case 2:
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
if (
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4641
|
+
response = _a.sent();
|
|
4642
|
+
if (!(response && response.results)) return [3 /*break*/, 8];
|
|
4643
|
+
if (!response.results.result.content) return [3 /*break*/, 6];
|
|
4644
|
+
if (!(strip.key === 'scheduledAssessment')) return [3 /*break*/, 4];
|
|
4645
|
+
result = response.results.result.content.map((/**
|
|
4646
|
+
* @param {?} a
|
|
4647
|
+
* @return {?}
|
|
4648
|
+
*/
|
|
4649
|
+
function (a) { return a.identifier; }));
|
|
4650
|
+
return [4 /*yield*/, this.userSvc.fetchEnrollmentDataByContentId(this.configSvc.userProfile.userId, result.join(',')).toPromise().then((/**
|
|
4651
|
+
* @param {?} res
|
|
4652
|
+
* @return {?}
|
|
4653
|
+
*/
|
|
4654
|
+
function (res) { return __awaiter(_this, void 0, void 0, function () {
|
|
4655
|
+
var enrollData;
|
|
4656
|
+
return __generator(this, function (_a) {
|
|
4657
|
+
enrollData = {};
|
|
4658
|
+
if (res && res.courses && res.courses.length) {
|
|
4659
|
+
res.courses.forEach((/**
|
|
4660
|
+
* @param {?} data
|
|
4661
|
+
* @return {?}
|
|
4662
|
+
*/
|
|
4663
|
+
function (data) {
|
|
4664
|
+
enrollData[data.collectionId] = data;
|
|
4665
|
+
}));
|
|
4666
|
+
return [2 /*return*/, enrollData];
|
|
4667
|
+
}
|
|
4668
|
+
else {
|
|
4669
|
+
return [2 /*return*/, {}];
|
|
4670
|
+
}
|
|
4671
|
+
return [2 /*return*/];
|
|
4672
|
+
});
|
|
4673
|
+
}); })).catch((/**
|
|
4674
|
+
* @param {?} _err
|
|
4675
|
+
* @return {?}
|
|
4676
|
+
*/
|
|
4677
|
+
function (_err) {
|
|
4678
|
+
return {};
|
|
4679
|
+
}))];
|
|
4680
|
+
case 3:
|
|
4681
|
+
responseData = _a.sent();
|
|
4682
|
+
this.checkInvitOnlyAssessments(response.results.result.content, strip, calculateParentStatus, response.viewMoreUrl, responseData);
|
|
4683
|
+
return [3 /*break*/, 5];
|
|
4684
|
+
case 4:
|
|
4685
|
+
this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
4686
|
+
_a.label = 5;
|
|
4687
|
+
case 5: return [3 /*break*/, 7];
|
|
4688
|
+
case 6:
|
|
4689
|
+
if (response.results.result.Event) {
|
|
4690
|
+
this.processStrip(strip, this.transformEventsToWidgets(response.results.result.Event, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
4544
4691
|
}
|
|
4545
4692
|
else {
|
|
4546
4693
|
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
4547
4694
|
}
|
|
4548
|
-
|
|
4549
|
-
case 3
|
|
4695
|
+
_a.label = 7;
|
|
4696
|
+
case 7: return [3 /*break*/, 9];
|
|
4697
|
+
case 8:
|
|
4698
|
+
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
4699
|
+
_a.label = 9;
|
|
4700
|
+
case 9: return [3 /*break*/, 11];
|
|
4701
|
+
case 10:
|
|
4550
4702
|
error_1 = _a.sent();
|
|
4551
|
-
return [3 /*break*/,
|
|
4552
|
-
case
|
|
4703
|
+
return [3 /*break*/, 11];
|
|
4704
|
+
case 11: return [2 /*return*/];
|
|
4553
4705
|
}
|
|
4554
4706
|
});
|
|
4555
4707
|
});
|
|
@@ -4559,6 +4711,7 @@ var ContentStripWithTabsLibComponent = /** @class */ (function (_super) {
|
|
|
4559
4711
|
* @param {?} strip
|
|
4560
4712
|
* @param {?} calculateParentStatus
|
|
4561
4713
|
* @param {?} viewMoreUrl
|
|
4714
|
+
* @param {?} enrollmentData
|
|
4562
4715
|
* @return {?}
|
|
4563
4716
|
*/
|
|
4564
4717
|
ContentStripWithTabsLibComponent.prototype.checkInvitOnlyAssessments = /**
|
|
@@ -4566,12 +4719,12 @@ var ContentStripWithTabsLibComponent = /** @class */ (function (_super) {
|
|
|
4566
4719
|
* @param {?} strip
|
|
4567
4720
|
* @param {?} calculateParentStatus
|
|
4568
4721
|
* @param {?} viewMoreUrl
|
|
4722
|
+
* @param {?} enrollmentData
|
|
4569
4723
|
* @return {?}
|
|
4570
4724
|
*/
|
|
4571
|
-
function (content, strip, calculateParentStatus, viewMoreUrl) {
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
this.enrollmentMapData = JSON.parse(localStorage.getItem('enrollmentMapData') || '{}');
|
|
4725
|
+
function (content, strip, calculateParentStatus, viewMoreUrl, enrollmentData) {
|
|
4726
|
+
if (Object.keys(enrollmentData).length) {
|
|
4727
|
+
enrollmentData = enrollmentData;
|
|
4575
4728
|
/** @type {?} */
|
|
4576
4729
|
var filteredArray_1 = [];
|
|
4577
4730
|
/** @type {?} */
|
|
@@ -4581,10 +4734,10 @@ var ContentStripWithTabsLibComponent = /** @class */ (function (_super) {
|
|
|
4581
4734
|
* @return {?}
|
|
4582
4735
|
*/
|
|
4583
4736
|
function (data) {
|
|
4584
|
-
if (
|
|
4585
|
-
if (
|
|
4737
|
+
if (enrollmentData[data.identifier]) {
|
|
4738
|
+
if (enrollmentData[data.identifier].status !== 2 && enrollmentData[data.identifier].batch) {
|
|
4586
4739
|
/** @type {?} */
|
|
4587
|
-
var enrollData =
|
|
4740
|
+
var enrollData = enrollmentData[data.identifier].batch;
|
|
4588
4741
|
/** @type {?} */
|
|
4589
4742
|
var endDate = new Date(enrollData.endDate).getTime()
|
|
4590
4743
|
// let endDate:any = '2024-07-7T00:00:00.000Z'
|
|
@@ -4593,8 +4746,8 @@ var ContentStripWithTabsLibComponent = /** @class */ (function (_super) {
|
|
|
4593
4746
|
/** @type {?} */
|
|
4594
4747
|
var timeDuration = endDate - now_1;
|
|
4595
4748
|
if (timeDuration > 0) {
|
|
4596
|
-
data['batch'] =
|
|
4597
|
-
data['completionPercentage'] =
|
|
4749
|
+
data['batch'] = enrollmentData[data.identifier].batch;
|
|
4750
|
+
data['completionPercentage'] = enrollmentData[data.identifier].completionPercentage;
|
|
4598
4751
|
filteredArray_1.push(data);
|
|
4599
4752
|
}
|
|
4600
4753
|
}
|
|
@@ -4613,7 +4766,6 @@ var ContentStripWithTabsLibComponent = /** @class */ (function (_super) {
|
|
|
4613
4766
|
return dateA - dateB;
|
|
4614
4767
|
}));
|
|
4615
4768
|
this.processStrip(strip, this.transformContentsToWidgets(filteredArray_1, strip), 'done', calculateParentStatus, viewMoreUrl);
|
|
4616
|
-
clearInterval(this.enrollInterval);
|
|
4617
4769
|
}
|
|
4618
4770
|
};
|
|
4619
4771
|
/**
|
|
@@ -5329,14 +5481,15 @@ var ContentStripWithTabsLibComponent = /** @class */ (function (_super) {
|
|
|
5329
5481
|
function (strip, calculateParentStatus) {
|
|
5330
5482
|
if (calculateParentStatus === void 0) { calculateParentStatus = true; }
|
|
5331
5483
|
return __awaiter(this, void 0, void 0, function () {
|
|
5332
|
-
var courses, tabResults, response;
|
|
5484
|
+
var courses, tabResults, userId, response;
|
|
5333
5485
|
return __generator(this, function (_a) {
|
|
5334
5486
|
switch (_a.label) {
|
|
5335
5487
|
case 0:
|
|
5336
|
-
if (!(strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length)) return [3 /*break*/,
|
|
5488
|
+
if (!(strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length)) return [3 /*break*/, 4];
|
|
5337
5489
|
courses = void 0;
|
|
5338
5490
|
tabResults = [];
|
|
5339
|
-
|
|
5491
|
+
userId = this.configSvc.userProfile.userId;
|
|
5492
|
+
return [4 /*yield*/, this.userSvc.fetchCbpPlanList(userId).toPromise()];
|
|
5340
5493
|
case 1:
|
|
5341
5494
|
response = _a.sent();
|
|
5342
5495
|
if (!response) return [3 /*break*/, 4];
|
|
@@ -5350,36 +5503,7 @@ var ContentStripWithTabsLibComponent = /** @class */ (function (_super) {
|
|
|
5350
5503
|
case 3:
|
|
5351
5504
|
this.processStrip(strip, this.transformContentsToWidgets(courses, strip), 'done', calculateParentStatus, 'viewMoreUrl');
|
|
5352
5505
|
_a.label = 4;
|
|
5353
|
-
case 4:
|
|
5354
|
-
// this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
|
|
5355
|
-
// if (res) {
|
|
5356
|
-
// console.log(res,'===============================>')
|
|
5357
|
-
// courses = res
|
|
5358
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
5359
|
-
// tabResults = this.splitCbpTabsData(courses, strip)
|
|
5360
|
-
// await this.processStrip(
|
|
5361
|
-
// strip,
|
|
5362
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
5363
|
-
// 'done',
|
|
5364
|
-
// calculateParentStatus,
|
|
5365
|
-
// '',
|
|
5366
|
-
// tabResults
|
|
5367
|
-
// )
|
|
5368
|
-
// } else {
|
|
5369
|
-
// this.processStrip(
|
|
5370
|
-
// strip,
|
|
5371
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
5372
|
-
// 'done',
|
|
5373
|
-
// calculateParentStatus,
|
|
5374
|
-
// 'viewMoreUrl',
|
|
5375
|
-
// )
|
|
5376
|
-
// }
|
|
5377
|
-
// }
|
|
5378
|
-
// }, (_err: any) => {
|
|
5379
|
-
// })
|
|
5380
|
-
clearInterval(this.enrollInterval);
|
|
5381
|
-
_a.label = 5;
|
|
5382
|
-
case 5: return [2 /*return*/];
|
|
5506
|
+
case 4: return [2 /*return*/];
|
|
5383
5507
|
}
|
|
5384
5508
|
});
|
|
5385
5509
|
});
|
|
@@ -6513,13 +6637,13 @@ var ContentStripWithTabsLibComponent = /** @class */ (function (_super) {
|
|
|
6513
6637
|
/** @nocollapse */
|
|
6514
6638
|
ContentStripWithTabsLibComponent.ctorParameters = function () { return [
|
|
6515
6639
|
{ type: undefined, decorators: [{ type: Inject, args: ['environment',] }] },
|
|
6516
|
-
{ type:
|
|
6640
|
+
{ type: WidgetContentLibService },
|
|
6517
6641
|
{ type: LoggerService },
|
|
6518
6642
|
{ type: EventService },
|
|
6519
6643
|
{ type: ConfigurationsService$1 },
|
|
6520
6644
|
{ type: UtilityService },
|
|
6521
6645
|
{ type: Router },
|
|
6522
|
-
{ type:
|
|
6646
|
+
{ type: WidgetUserServiceLib },
|
|
6523
6647
|
{ type: TranslateService },
|
|
6524
6648
|
{ type: MultilingualTranslationsService }
|
|
6525
6649
|
]; };
|
|
@@ -6583,11 +6707,7 @@ if (false) {
|
|
|
6583
6707
|
/** @type {?} */
|
|
6584
6708
|
ContentStripWithTabsLibComponent.prototype.defaultMaxWidgets;
|
|
6585
6709
|
/** @type {?} */
|
|
6586
|
-
ContentStripWithTabsLibComponent.prototype.enrollInterval;
|
|
6587
|
-
/** @type {?} */
|
|
6588
6710
|
ContentStripWithTabsLibComponent.prototype.todaysEvents;
|
|
6589
|
-
/** @type {?} */
|
|
6590
|
-
ContentStripWithTabsLibComponent.prototype.enrollmentMapData;
|
|
6591
6711
|
/**
|
|
6592
6712
|
* @type {?}
|
|
6593
6713
|
* @private
|
|
@@ -8805,12 +8925,12 @@ var CommonStripComponent = /** @class */ (function (_super) {
|
|
|
8805
8925
|
/** @nocollapse */
|
|
8806
8926
|
CommonStripComponent.ctorParameters = function () { return [
|
|
8807
8927
|
{ type: undefined, decorators: [{ type: Inject, args: ['environment',] }] },
|
|
8808
|
-
{ type:
|
|
8928
|
+
{ type: WidgetContentLibService },
|
|
8809
8929
|
{ type: LoggerService },
|
|
8810
8930
|
{ type: EventService },
|
|
8811
8931
|
{ type: ConfigurationsService$1 },
|
|
8812
8932
|
{ type: UtilityService },
|
|
8813
|
-
{ type:
|
|
8933
|
+
{ type: WidgetUserServiceLib },
|
|
8814
8934
|
{ type: TranslateService },
|
|
8815
8935
|
{ type: MultilingualTranslationsService },
|
|
8816
8936
|
{ type: CommonMethodsService }
|
|
@@ -10020,13 +10140,6 @@ var CardsComponent = /** @class */ (function (_super) {
|
|
|
10020
10140
|
function () {
|
|
10021
10141
|
_this.getCbPlanData();
|
|
10022
10142
|
}), 1000);
|
|
10023
|
-
this.enrollInterval = setInterval((/**
|
|
10024
|
-
* @return {?}
|
|
10025
|
-
*/
|
|
10026
|
-
function () {
|
|
10027
|
-
_this.getEnrollmentData();
|
|
10028
|
-
// tslint:disable-next-line
|
|
10029
|
-
}), 1000);
|
|
10030
10143
|
};
|
|
10031
10144
|
Object.defineProperty(CardsComponent.prototype, "isLiveOrMarkForDeletion", {
|
|
10032
10145
|
get: /**
|
|
@@ -10111,18 +10224,6 @@ var CardsComponent = /** @class */ (function (_super) {
|
|
|
10111
10224
|
clearInterval(this.cbPlanInterval);
|
|
10112
10225
|
}
|
|
10113
10226
|
};
|
|
10114
|
-
/**
|
|
10115
|
-
* @return {?}
|
|
10116
|
-
*/
|
|
10117
|
-
CardsComponent.prototype.getEnrollmentData = /**
|
|
10118
|
-
* @return {?}
|
|
10119
|
-
*/
|
|
10120
|
-
function () {
|
|
10121
|
-
if (localStorage.getItem('enrollmentMapData')) {
|
|
10122
|
-
this.enrollmentMapData = JSON.parse(localStorage.getItem('enrollmentMapData') || '{}');
|
|
10123
|
-
clearInterval(this.enrollInterval);
|
|
10124
|
-
}
|
|
10125
|
-
};
|
|
10126
10227
|
/**
|
|
10127
10228
|
* @param {?} data
|
|
10128
10229
|
* @return {?}
|
|
@@ -10137,14 +10238,14 @@ var CardsComponent = /** @class */ (function (_super) {
|
|
|
10137
10238
|
CardsComponent.decorators = [
|
|
10138
10239
|
{ type: Component, args: [{
|
|
10139
10240
|
selector: 'sb-uic-cards',
|
|
10140
|
-
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\"
|
|
10241
|
+
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",
|
|
10141
10242
|
styles: [""]
|
|
10142
10243
|
}] }
|
|
10143
10244
|
];
|
|
10144
10245
|
/** @nocollapse */
|
|
10145
10246
|
CardsComponent.ctorParameters = function () { return [
|
|
10146
10247
|
{ type: UtilityService },
|
|
10147
|
-
{ type:
|
|
10248
|
+
{ type: WidgetContentLibService },
|
|
10148
10249
|
{ type: Router }
|
|
10149
10250
|
]; };
|
|
10150
10251
|
CardsComponent.propDecorators = {
|
|
@@ -10164,10 +10265,6 @@ if (false) {
|
|
|
10164
10265
|
CardsComponent.prototype.cbPlanMapData;
|
|
10165
10266
|
/** @type {?} */
|
|
10166
10267
|
CardsComponent.prototype.cbPlanInterval;
|
|
10167
|
-
/** @type {?} */
|
|
10168
|
-
CardsComponent.prototype.enrollInterval;
|
|
10169
|
-
/** @type {?} */
|
|
10170
|
-
CardsComponent.prototype.enrollmentMapData;
|
|
10171
10268
|
/**
|
|
10172
10269
|
* @type {?}
|
|
10173
10270
|
* @private
|
|
@@ -10312,7 +10409,7 @@ var CardPortraitComponent = /** @class */ (function () {
|
|
|
10312
10409
|
{ type: TranslateService },
|
|
10313
10410
|
{ type: MultilingualTranslationsService },
|
|
10314
10411
|
{ type: ConfigurationsService$1 },
|
|
10315
|
-
{ type:
|
|
10412
|
+
{ type: WidgetContentLibService }
|
|
10316
10413
|
]; };
|
|
10317
10414
|
CardPortraitComponent.propDecorators = {
|
|
10318
10415
|
widgetData: [{ type: Input }],
|
|
@@ -11443,7 +11540,7 @@ var CardMDOChannelComponent = /** @class */ (function () {
|
|
|
11443
11540
|
{ type: TranslateService },
|
|
11444
11541
|
{ type: MultilingualTranslationsService$1 },
|
|
11445
11542
|
{ type: ConfigurationsService$1 },
|
|
11446
|
-
{ type:
|
|
11543
|
+
{ type: WidgetContentLibService },
|
|
11447
11544
|
{ type: Router }
|
|
11448
11545
|
]; };
|
|
11449
11546
|
CardMDOChannelComponent.propDecorators = {
|
|
@@ -11793,7 +11890,7 @@ var CardKarmaProgramsComponent = /** @class */ (function () {
|
|
|
11793
11890
|
{ type: TranslateService },
|
|
11794
11891
|
{ type: MultilingualTranslationsService$1 },
|
|
11795
11892
|
{ type: ConfigurationsService$1 },
|
|
11796
|
-
{ type:
|
|
11893
|
+
{ type: WidgetContentLibService },
|
|
11797
11894
|
{ type: Router }
|
|
11798
11895
|
]; };
|
|
11799
11896
|
CardKarmaProgramsComponent.propDecorators = {
|
|
@@ -12211,7 +12308,7 @@ var CardPortraitExtComponent = /** @class */ (function () {
|
|
|
12211
12308
|
{ type: TranslateService },
|
|
12212
12309
|
{ type: MultilingualTranslationsService },
|
|
12213
12310
|
{ type: ConfigurationsService$1 },
|
|
12214
|
-
{ type:
|
|
12311
|
+
{ type: WidgetContentLibService }
|
|
12215
12312
|
]; };
|
|
12216
12313
|
CardPortraitExtComponent.propDecorators = {
|
|
12217
12314
|
widgetData: [{ type: Input }],
|
|
@@ -12401,11 +12498,10 @@ var CardAssessmentComponent = /** @class */ (function () {
|
|
|
12401
12498
|
/** @nocollapse */
|
|
12402
12499
|
CardAssessmentComponent.ctorParameters = function () { return [
|
|
12403
12500
|
{ type: ConfigurationsService$1 },
|
|
12404
|
-
{ type:
|
|
12501
|
+
{ type: WidgetContentLibService }
|
|
12405
12502
|
]; };
|
|
12406
12503
|
CardAssessmentComponent.propDecorators = {
|
|
12407
12504
|
widgetData: [{ type: Input }],
|
|
12408
|
-
enrollmentMapData: [{ type: Input }],
|
|
12409
12505
|
contentData: [{ type: Output }],
|
|
12410
12506
|
isCardLoading: [{ type: Input }]
|
|
12411
12507
|
};
|
|
@@ -12415,8 +12511,6 @@ if (false) {
|
|
|
12415
12511
|
/** @type {?} */
|
|
12416
12512
|
CardAssessmentComponent.prototype.widgetData;
|
|
12417
12513
|
/** @type {?} */
|
|
12418
|
-
CardAssessmentComponent.prototype.enrollmentMapData;
|
|
12419
|
-
/** @type {?} */
|
|
12420
12514
|
CardAssessmentComponent.prototype.contentData;
|
|
12421
12515
|
/** @type {?} */
|
|
12422
12516
|
CardAssessmentComponent.prototype.isCardLoading;
|
|
@@ -12945,7 +13039,7 @@ var CardProgressPortraitLibComponent = /** @class */ (function () {
|
|
|
12945
13039
|
{ type: EventService },
|
|
12946
13040
|
{ type: MultilingualTranslationsService },
|
|
12947
13041
|
{ type: ConfigurationsService$1 },
|
|
12948
|
-
{ type:
|
|
13042
|
+
{ type: WidgetContentLibService },
|
|
12949
13043
|
{ type: CertificateService },
|
|
12950
13044
|
{ type: MatDialog }
|
|
12951
13045
|
]; };
|
|
@@ -13284,7 +13378,7 @@ var CardMdoChannelV1Component = /** @class */ (function () {
|
|
|
13284
13378
|
{ type: TranslateService },
|
|
13285
13379
|
{ type: MultilingualTranslationsService$1 },
|
|
13286
13380
|
{ type: ConfigurationsService$1 },
|
|
13287
|
-
{ type:
|
|
13381
|
+
{ type: WidgetContentLibService },
|
|
13288
13382
|
{ type: Router }
|
|
13289
13383
|
]; };
|
|
13290
13384
|
CardMdoChannelV1Component.propDecorators = {
|
|
@@ -15169,13 +15263,13 @@ var ContentStripFacetFilterComponent = /** @class */ (function (_super) {
|
|
|
15169
15263
|
/** @nocollapse */
|
|
15170
15264
|
ContentStripFacetFilterComponent.ctorParameters = function () { return [
|
|
15171
15265
|
{ type: undefined, decorators: [{ type: Inject, args: ['environment',] }] },
|
|
15172
|
-
{ type:
|
|
15266
|
+
{ type: WidgetContentLibService },
|
|
15173
15267
|
{ type: LoggerService },
|
|
15174
15268
|
{ type: EventService },
|
|
15175
15269
|
{ type: ConfigurationsService$1 },
|
|
15176
15270
|
{ type: UtilityService },
|
|
15177
15271
|
{ type: Router },
|
|
15178
|
-
{ type:
|
|
15272
|
+
{ type: WidgetUserServiceLib },
|
|
15179
15273
|
{ type: TranslateService },
|
|
15180
15274
|
{ type: MultilingualTranslationsService },
|
|
15181
15275
|
{ type: FormBuilder }
|
|
@@ -15244,8 +15338,6 @@ if (false) {
|
|
|
15244
15338
|
/** @type {?} */
|
|
15245
15339
|
ContentStripFacetFilterComponent.prototype.todaysEvents;
|
|
15246
15340
|
/** @type {?} */
|
|
15247
|
-
ContentStripFacetFilterComponent.prototype.enrollmentMapData;
|
|
15248
|
-
/** @type {?} */
|
|
15249
15341
|
ContentStripFacetFilterComponent.prototype.facetForm;
|
|
15250
15342
|
/**
|
|
15251
15343
|
* @type {?}
|
|
@@ -16801,14 +16893,15 @@ var ContentStripWithTabsPillsComponent = /** @class */ (function (_super) {
|
|
|
16801
16893
|
function (strip, calculateParentStatus) {
|
|
16802
16894
|
if (calculateParentStatus === void 0) { calculateParentStatus = true; }
|
|
16803
16895
|
return __awaiter(this, void 0, void 0, function () {
|
|
16804
|
-
var courses, tabResults, response, countOfWidget_1;
|
|
16896
|
+
var courses, tabResults, userId, response, countOfWidget_1;
|
|
16805
16897
|
return __generator(this, function (_a) {
|
|
16806
16898
|
switch (_a.label) {
|
|
16807
16899
|
case 0:
|
|
16808
16900
|
if (!(strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length)) return [3 /*break*/, 5];
|
|
16809
16901
|
courses = void 0;
|
|
16810
16902
|
tabResults = [];
|
|
16811
|
-
|
|
16903
|
+
userId = this.configSvc.userProfile.userId;
|
|
16904
|
+
return [4 /*yield*/, this.userSvc.fetchCbpPlanList(userId).toPromise()];
|
|
16812
16905
|
case 1:
|
|
16813
16906
|
response = _a.sent();
|
|
16814
16907
|
if (!response) return [3 /*break*/, 4];
|
|
@@ -17053,13 +17146,13 @@ var ContentStripWithTabsPillsComponent = /** @class */ (function (_super) {
|
|
|
17053
17146
|
/** @nocollapse */
|
|
17054
17147
|
ContentStripWithTabsPillsComponent.ctorParameters = function () { return [
|
|
17055
17148
|
{ type: undefined, decorators: [{ type: Inject, args: ['environment',] }] },
|
|
17056
|
-
{ type:
|
|
17149
|
+
{ type: WidgetContentLibService },
|
|
17057
17150
|
{ type: LoggerService },
|
|
17058
17151
|
{ type: EventService },
|
|
17059
17152
|
{ type: ConfigurationsService$1 },
|
|
17060
17153
|
{ type: UtilityService },
|
|
17061
17154
|
{ type: Router },
|
|
17062
|
-
{ type:
|
|
17155
|
+
{ type: WidgetUserServiceLib },
|
|
17063
17156
|
{ type: TranslateService },
|
|
17064
17157
|
{ type: MultilingualTranslationsService }
|
|
17065
17158
|
]; };
|
|
@@ -17126,8 +17219,6 @@ if (false) {
|
|
|
17126
17219
|
ContentStripWithTabsPillsComponent.prototype.enrollInterval;
|
|
17127
17220
|
/** @type {?} */
|
|
17128
17221
|
ContentStripWithTabsPillsComponent.prototype.todaysEvents;
|
|
17129
|
-
/** @type {?} */
|
|
17130
|
-
ContentStripWithTabsPillsComponent.prototype.enrollmentMapData;
|
|
17131
17222
|
/**
|
|
17132
17223
|
* @type {?}
|
|
17133
17224
|
* @private
|
|
@@ -17977,7 +18068,7 @@ var CompetencyPassbookComponent = /** @class */ (function () {
|
|
|
17977
18068
|
/** @nocollapse */
|
|
17978
18069
|
CompetencyPassbookComponent.ctorParameters = function () { return [
|
|
17979
18070
|
{ type: ConfigurationsService$1 },
|
|
17980
|
-
{ type:
|
|
18071
|
+
{ type: WidgetContentLibService },
|
|
17981
18072
|
{ type: CompetencyPassbookService },
|
|
17982
18073
|
{ type: Router },
|
|
17983
18074
|
{ type: undefined, decorators: [{ type: Inject, args: ['environment',] }] }
|
|
@@ -18536,7 +18627,7 @@ var CompetencyPassbookMdoComponent = /** @class */ (function () {
|
|
|
18536
18627
|
/** @nocollapse */
|
|
18537
18628
|
CompetencyPassbookMdoComponent.ctorParameters = function () { return [
|
|
18538
18629
|
{ type: ConfigurationsService$1 },
|
|
18539
|
-
{ type:
|
|
18630
|
+
{ type: WidgetContentLibService },
|
|
18540
18631
|
{ type: CompetencyPassbookMdoService },
|
|
18541
18632
|
{ type: Router },
|
|
18542
18633
|
{ type: undefined, decorators: [{ type: Inject, args: ['environment',] }] }
|
|
@@ -20864,7 +20955,6 @@ var UserProgressComponent = /** @class */ (function () {
|
|
|
20864
20955
|
*/
|
|
20865
20956
|
function () {
|
|
20866
20957
|
var _this = this;
|
|
20867
|
-
debugger;
|
|
20868
20958
|
this.insightSvc.fetchUserProgress().subscribe((/**
|
|
20869
20959
|
* @param {?} res
|
|
20870
20960
|
* @return {?}
|
|
@@ -21105,5 +21195,5 @@ var NationalLearningModule = /** @class */ (function () {
|
|
|
21105
21195
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
21106
21196
|
*/
|
|
21107
21197
|
|
|
21108
|
-
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,
|
|
21198
|
+
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 };
|
|
21109
21199
|
//# sourceMappingURL=sunbird-cb-consumption.js.map
|