principal-dashboard-lib-v2 0.0.34 → 0.0.36
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/principal-dashboard-lib-v2.umd.js +33 -8
- package/bundles/principal-dashboard-lib-v2.umd.js.map +1 -1
- package/bundles/principal-dashboard-lib-v2.umd.min.js +1 -1
- package/bundles/principal-dashboard-lib-v2.umd.min.js.map +1 -1
- package/esm2015/lib/chartheader/chartheader.component.js +2 -2
- package/esm2015/lib/full-table-view/full-table-view.component.js +4 -1
- package/esm2015/lib/header/header.component.js +18 -4
- package/esm2015/lib/small-table-view/small-table-view.component.js +13 -5
- package/fesm2015/principal-dashboard-lib-v2.js +33 -8
- package/fesm2015/principal-dashboard-lib-v2.js.map +1 -1
- package/lib/header/header.component.d.ts +2 -0
- package/lib/small-table-view/small-table-view.component.d.ts +1 -0
- package/package.json +1 -1
- package/principal-dashboard-lib-v2.metadata.json +1 -1
|
@@ -891,7 +891,7 @@
|
|
|
891
891
|
this.isChartView = true;
|
|
892
892
|
}
|
|
893
893
|
ChartheaderComponent.prototype.ngOnInit = function () {
|
|
894
|
-
this.libVersion = "0.0.
|
|
894
|
+
this.libVersion = "0.0.36";
|
|
895
895
|
// this.myIcon = document.getElementById('myIconImg');
|
|
896
896
|
// this.changeChatType()
|
|
897
897
|
};
|
|
@@ -2504,6 +2504,7 @@
|
|
|
2504
2504
|
scrollBarColor: '#010001',
|
|
2505
2505
|
format: 'dd/LL/yyyy',
|
|
2506
2506
|
maxDate: new Date()
|
|
2507
|
+
// for demo purpose
|
|
2507
2508
|
};
|
|
2508
2509
|
}
|
|
2509
2510
|
Object.defineProperty(HeaderComponent.prototype, "data", {
|
|
@@ -2516,16 +2517,29 @@
|
|
|
2516
2517
|
configurable: true
|
|
2517
2518
|
});
|
|
2518
2519
|
HeaderComponent.prototype.ngOnInit = function () {
|
|
2520
|
+
this.urlParams = new URLSearchParams(window.location.search);
|
|
2521
|
+
this.isDemo = this.urlParams.get('demo') === '1';
|
|
2519
2522
|
this.getDefaultDate();
|
|
2520
2523
|
this.startTimer();
|
|
2521
2524
|
};
|
|
2522
2525
|
HeaderComponent.prototype.getDefaultDate = function () {
|
|
2523
|
-
var
|
|
2524
|
-
this.getDateFormat(
|
|
2526
|
+
var selectedDate = this.isDemo ? new Date('2025-05-21T00:00:00') : new Date();
|
|
2527
|
+
this.getDateFormat(selectedDate);
|
|
2525
2528
|
this.todayDate = this.calenderCurrentDate;
|
|
2529
|
+
console.log('this.isDemo', this.isDemo);
|
|
2530
|
+
if (this.isDemo) {
|
|
2531
|
+
this.mydata = null;
|
|
2532
|
+
this.refreshChart();
|
|
2533
|
+
this.pdService.openSmallTable.next(false);
|
|
2534
|
+
}
|
|
2526
2535
|
};
|
|
2527
2536
|
HeaderComponent.prototype.dateSelected = function (e) {
|
|
2528
|
-
this.
|
|
2537
|
+
var selectedDate = this.isDemo ? new Date('2025-05-21T00:00:00') : new Date(e);
|
|
2538
|
+
console.log("Selected Date:", selectedDate);
|
|
2539
|
+
this.getDateFormat(selectedDate);
|
|
2540
|
+
//const fixedDate = new Date('2025-05-21T00:00:00'); // Static date
|
|
2541
|
+
//console.log("Overriding selected date with fixed date:", fixedDate);
|
|
2542
|
+
//this.getDateFormat(fixedDate);
|
|
2529
2543
|
this.mydata = null;
|
|
2530
2544
|
this.refreshChart();
|
|
2531
2545
|
this.pdService.openSmallTable.next(false);
|
|
@@ -2934,6 +2948,7 @@
|
|
|
2934
2948
|
var resourceId = userResource.resourceId;
|
|
2935
2949
|
var resourceDetails = resourcesMetadata.find(function (resource) { return resource.resourceId === resourceId &&
|
|
2936
2950
|
userResource.type === resource.type; });
|
|
2951
|
+
// console.log('userResource.type',userResource.type)
|
|
2937
2952
|
var prefix = _this.getDisplayTypeValue(userResource.type);
|
|
2938
2953
|
var title = (resourceDetails === null || resourceDetails === void 0 ? void 0 : resourceDetails.title) || '';
|
|
2939
2954
|
var tp = (_a = resourceDetails === null || resourceDetails === void 0 ? void 0 : resourceDetails.teachingPoint) === null || _a === void 0 ? void 0 : _a.title;
|
|
@@ -2955,6 +2970,7 @@
|
|
|
2955
2970
|
if (title === '') {
|
|
2956
2971
|
finalAssetTitle = prefix + " : " + duration;
|
|
2957
2972
|
}
|
|
2973
|
+
// console.log('chapterTitlte', chapter)
|
|
2958
2974
|
_this.currentUserArray.push({
|
|
2959
2975
|
userId: user.userId,
|
|
2960
2976
|
teacherName: userIndex === 0 ? userDetails === null || userDetails === void 0 ? void 0 : userDetails.fullName : '',
|
|
@@ -3017,6 +3033,7 @@
|
|
|
3017
3033
|
{ type: 'video', display: 'Video' },
|
|
3018
3034
|
{ type: 'tools', display: 'Tools' },
|
|
3019
3035
|
{ type: 'feature', display: 'Feature' },
|
|
3036
|
+
{ type: 'ebook', display: 'Ebook' }
|
|
3020
3037
|
];
|
|
3021
3038
|
var asset = assetTypeConfig.find(function (value) { return value.type === key; });
|
|
3022
3039
|
return asset ? asset.display : key;
|
|
@@ -3154,10 +3171,10 @@
|
|
|
3154
3171
|
userResource.type === resource.type; });
|
|
3155
3172
|
var prefix = _this.getDisplayTypeValue(userResource.type);
|
|
3156
3173
|
var title = (resourceDetails === null || resourceDetails === void 0 ? void 0 : resourceDetails.title) || '';
|
|
3157
|
-
var tp = (_a = resourceDetails === null || resourceDetails === void 0 ? void 0 : resourceDetails.teachingPoint) === null || _a === void 0 ? void 0 : _a.title;
|
|
3158
|
-
var subject = (_b = resourceDetails === null || resourceDetails === void 0 ? void 0 : resourceDetails.subject) === null || _b === void 0 ? void 0 : _b.title;
|
|
3159
|
-
var chapter = (_c = resourceDetails === null || resourceDetails === void 0 ? void 0 : resourceDetails.chapter) === null || _c === void 0 ? void 0 : _c.title;
|
|
3160
|
-
var grade = (_d = resourceDetails === null || resourceDetails === void 0 ? void 0 : resourceDetails.grade) === null || _d === void 0 ? void 0 : _d.title;
|
|
3174
|
+
var tp = _this.decodeHtmlEntities((_a = resourceDetails === null || resourceDetails === void 0 ? void 0 : resourceDetails.teachingPoint) === null || _a === void 0 ? void 0 : _a.title);
|
|
3175
|
+
var subject = _this.decodeHtmlEntities((_b = resourceDetails === null || resourceDetails === void 0 ? void 0 : resourceDetails.subject) === null || _b === void 0 ? void 0 : _b.title);
|
|
3176
|
+
var chapter = _this.decodeHtmlEntities((_c = resourceDetails === null || resourceDetails === void 0 ? void 0 : resourceDetails.chapter) === null || _c === void 0 ? void 0 : _c.title);
|
|
3177
|
+
var grade = _this.decodeHtmlEntities((_d = resourceDetails === null || resourceDetails === void 0 ? void 0 : resourceDetails.grade) === null || _d === void 0 ? void 0 : _d.title);
|
|
3161
3178
|
var startTime = new Date(user === null || user === void 0 ? void 0 : user.startTime);
|
|
3162
3179
|
var endTime = new Date(user === null || user === void 0 ? void 0 : user.endTime);
|
|
3163
3180
|
var totalDuration = _this.formatTime(Math.round((endTime.getTime() - startTime.getTime()) / 1000));
|
|
@@ -3240,6 +3257,14 @@
|
|
|
3240
3257
|
});
|
|
3241
3258
|
return filteredData.map(function (entry, index) { return (Object.assign(Object.assign({}, entry), { subsequentCount: index })); });
|
|
3242
3259
|
};
|
|
3260
|
+
// Converts entities like ′ or & into their characters so they render as text
|
|
3261
|
+
SmallTableViewComponent.prototype.decodeHtmlEntities = function (value) {
|
|
3262
|
+
if (!value)
|
|
3263
|
+
return value;
|
|
3264
|
+
var textarea = document.createElement('textarea');
|
|
3265
|
+
textarea.innerHTML = value;
|
|
3266
|
+
return textarea.value;
|
|
3267
|
+
};
|
|
3243
3268
|
SmallTableViewComponent.prototype.getDisplayTypeValue = function (key) {
|
|
3244
3269
|
var assetTypeConfig = [
|
|
3245
3270
|
{ type: 'asset_media', display: 'Media' },
|