@posiwise/resource-module 0.0.123 → 0.0.124
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/esm2022/lib/public/components/resource-post/resource-post-details/resource-post-details.component.mjs +31 -11
- package/fesm2022/posiwise-resource-module.mjs +21 -5
- package/fesm2022/posiwise-resource-module.mjs.map +1 -1
- package/lib/public/components/resource-post/resource-post-details/resource-post-details.component.d.ts +7 -1
- package/package.json +1 -1
|
@@ -1,25 +1,34 @@
|
|
|
1
1
|
import { Component, Injector } from '@angular/core';
|
|
2
2
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
3
|
import { AppBaseComponent } from '@posiwise/app-base-component';
|
|
4
|
+
import { TagService } from '@posiwise/common-services';
|
|
4
5
|
import { ADMIN_ROUTERS, TOKEN_KEY } from '@posiwise/common-utilities';
|
|
5
6
|
import { HelperService } from '@posiwise/helper-service';
|
|
6
7
|
import { ResourceService } from '../../../../resource.service';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
import * as i1 from "../../../../resource.service";
|
|
9
|
-
import * as i2 from "@
|
|
10
|
-
import * as i3 from "@angular/
|
|
11
|
-
import * as i4 from "@angular/
|
|
12
|
-
import * as i5 from "@
|
|
13
|
-
import * as i6 from "@posiwise/
|
|
10
|
+
import * as i2 from "@posiwise/common-services";
|
|
11
|
+
import * as i3 from "@angular/platform-browser";
|
|
12
|
+
import * as i4 from "@angular/common";
|
|
13
|
+
import * as i5 from "@angular/router";
|
|
14
|
+
import * as i6 from "@posiwise/shared-components";
|
|
15
|
+
import * as i7 from "@posiwise/directives";
|
|
16
|
+
import * as i8 from "@posiwise/pipes";
|
|
17
|
+
import * as i9 from "@jsverse/transloco";
|
|
14
18
|
export class ResourcePostDetailsComponent extends AppBaseComponent {
|
|
15
|
-
constructor(resourceService, injector, sanitizer) {
|
|
19
|
+
constructor(resourceService, tagService, injector, sanitizer) {
|
|
16
20
|
super(injector);
|
|
17
21
|
this.resourceService = resourceService;
|
|
22
|
+
this.tagService = tagService;
|
|
18
23
|
this.sanitizer = sanitizer;
|
|
19
24
|
this.routers = ADMIN_ROUTERS;
|
|
25
|
+
this.isLoaded = false;
|
|
20
26
|
}
|
|
21
27
|
ngOnInit() {
|
|
22
28
|
this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;
|
|
29
|
+
this.getUserSubscriptionId().subscribe(response => {
|
|
30
|
+
this.subscriptionId = response;
|
|
31
|
+
});
|
|
23
32
|
this.route.params.subscribe(params => {
|
|
24
33
|
this.slug = params['slug'] || '';
|
|
25
34
|
this.getBlogItem(this.slug);
|
|
@@ -32,6 +41,17 @@ export class ResourcePostDetailsComponent extends AppBaseComponent {
|
|
|
32
41
|
this.hasBlogAccess = HelperService.checkBlogPermission(this.user);
|
|
33
42
|
});
|
|
34
43
|
}
|
|
44
|
+
this.getPostTags();
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
getPostTags() {
|
|
48
|
+
this.tagService
|
|
49
|
+
.getTagsByType('post_categories', {}, this.subscriptionId || this.masterSubscriptionId)
|
|
50
|
+
.subscribe(response => {
|
|
51
|
+
this.blogPostTag = response.tags.find(tag => tag.name === 'Blog Posts');
|
|
52
|
+
})
|
|
53
|
+
.add(() => {
|
|
54
|
+
this.isLoaded = true;
|
|
35
55
|
});
|
|
36
56
|
}
|
|
37
57
|
getBlogItem(slug) {
|
|
@@ -43,11 +63,11 @@ export class ResourcePostDetailsComponent extends AppBaseComponent {
|
|
|
43
63
|
this.post = { ...response, body: blogBody };
|
|
44
64
|
});
|
|
45
65
|
}
|
|
46
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ResourcePostDetailsComponent, deps: [{ token: i1.ResourceService }, { token: i0.Injector }, { token:
|
|
47
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: ResourcePostDetailsComponent, selector: "pw-resource-post-details", usesInheritance: true, ngImport: i0, template: "<section class=\"nce-hero-section\">\n <div class=\"container d-flex flex-wrap\">\n <div class=\"hero-left\">\n <p class=\"blog-label\">BLOG</p>\n\n <h1 class=\"hero-title\">\n <span [innerHTML]=\"post?.title\"></span>\n <a *ngIf=\"userLoggedIn && hasBlogAccess\"\n class=\"ms-3 text-decoration-none\"\n ngbTooltip=\"Edit this post\"\n [routerLink]=\"['/admin/resources/', post?.slug]\"\n target=\"_blank\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </a>\n </h1>\n\n\n <div class=\"author-info\">\n <img [src]=\"post?.author?.avatar?.[0]?.url || 'assets/img/icons/male.png'\" alt=\"User Profile Logo\" class=\"author-img\" />\n <div class=\"author-meta\">\n <p>Article by {{ post?.author?.first_name }} {{ post?.author?.last_name }}</p>\n <p class=\"date\">{{post?.published_at | dateFormat}}</p>\n </div>\n
|
|
66
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ResourcePostDetailsComponent, deps: [{ token: i1.ResourceService }, { token: i2.TagService }, { token: i0.Injector }, { token: i3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
67
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: ResourcePostDetailsComponent, selector: "pw-resource-post-details", usesInheritance: true, ngImport: i0, template: "<section class=\"nce-hero-section\">\n <div class=\"container d-flex flex-wrap\" [ngClass]=\"blogPostTag?.image?.url ? 'container-top' : 'container-no-image'\">\n <div class=\"hero-left\">\n <p class=\"blog-label\">BLOG</p>\n\n <h1 class=\"hero-title\">\n <span [innerHTML]=\"post?.title\"></span>\n <a *ngIf=\"userLoggedIn && hasBlogAccess\"\n class=\"ms-3 text-decoration-none\"\n ngbTooltip=\"Edit this post\"\n [routerLink]=\"['/admin/resources/', post?.slug]\"\n target=\"_blank\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </a>\n </h1>\n\n\n <div class=\"author-info\">\n <img [src]=\"post?.author?.avatar?.[0]?.url || 'assets/img/icons/male.png'\" alt=\"User Profile Logo\" class=\"author-img\" />\n <div class=\"author-meta\">\n <p>Article by {{ post?.author?.first_name }} {{ post?.author?.last_name }}</p>\n <p class=\"date\">{{post?.published_at | dateFormat}}</p>\n </div>\n </div>\n </div>\n\n <div class=\"hero-right\" *ngIf=\"isLoaded\">\n <img\n *ngIf=\"(blogPostTag?.image?.url && !(blogPostTag?.image?.url.includes('no_image_uploaded_squared'))); else noImage\"\n [src]=\"blogPostTag.image.url\"\n alt=\"Math Icon Blob\"\n class=\"hero-image\"\n />\n\n <ng-template #noImage>\n <pw-no-data\n class=\"data-image\"\n [withImage]=\"true\"\n [message]=\"'Search.NoDataMessage' | transloco\"\n [description]=\"'Search.NoDataDescription' | transloco\"\n ></pw-no-data>\n </ng-template>\n </div>\n </div>\n </section>\n", styles: [".outer-section-fadeout{position:absolute;top:46rem;height:40px;width:100%;background:linear-gradient(to bottom,#fff0,#f8f9fa)}.container-top{padding-top:132px!important}.container-no-image{padding-top:232px!important}.container{padding-bottom:2.5rem!important}.edit-icon{vertical-align:middle!important}.nce-hero-section{background:#fff;box-shadow:0 4px 32px -14px #40576d4d!important;position:relative}.nce-hero-section .container{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap}.nce-hero-section .blog-label{font-weight:700;font-size:1.7rem;margin-bottom:3rem}.nce-hero-section .hero-title{font-size:3.75rem;font-weight:300;line-height:1.3;color:#000;margin-bottom:2rem}.nce-hero-section .hero-title strong{font-weight:800}.nce-hero-section .hero-left{max-width:700px}.nce-hero-section .author-info{display:flex;align-items:center;gap:1rem;max-width:100%;overflow:hidden}.nce-hero-section .author-info .mobile-math-image{margin-right:0!important;margin-bottom:1rem;height:100px!important}.nce-hero-section .author-info .author-img{width:60px;height:60px;border-radius:50%;object-fit:cover}.nce-hero-section .author-info .author-meta p{font-size:1.2rem;margin-bottom:0!important}.nce-hero-section .author-info .author-meta .date{font-size:.95rem;color:#333}.nce-hero-section .hero-right{flex-shrink:0;width:40%}.nce-hero-section .hero-right .hero-image{height:auto}@media (width <= 768px){.nce-hero-section .hero-title{font-size:2rem}.nce-hero-section .hero-right{margin-top:2rem;text-align:center;width:100%}.nce-hero-section .hero-right .data-image{width:100%}.nce-hero-section .hero-right .hero-image{max-width:300px;width:100%;position:relative;z-index:3;left:4%;height:auto!important;top:2rem}.nce-hero-section .author-info{flex-direction:row;justify-content:flex-start}}@media (width >= 1200px){.hero-image{max-width:500px!important;max-height:500px!important;height:auto;position:relative!important;top:2.5rem}}@media (width >= 1020px) and (width <= 1200px){.outer-section-fadeout{top:34rem!important}}@media (width >= 768px) and (width <= 869px){.hero-image{width:320px!important;height:auto;position:relative;top:7.7rem}.hero-left{max-width:500px!important}.nce-hero-section .container{flex-wrap:nowrap!important}}@media (width >= 869px) and (width <= 1199px){.hero-image{width:100%!important;left:3%;position:relative;width:100%;max-width:600px!important;top:6.1rem;height:auto}.hero-left{max-width:500px!important}.nce-hero-section .container{flex-wrap:nowrap!important}}@media (width >= 768px) and (width <= 991px){.container{padding:18rem 6rem 6rem!important}}@media (width >= 991px) and (width <= 1200px){.container{padding:14rem 6rem 6rem!important}}@media (width >= 768px) and (width <= 1200px){.nce-hero-section{padding:0!important}.outer-section-fadeout{top:53rem}.hero-title{font-size:2.75rem!important}.hero-right{text-align:center;width:40%}}@media (width <= 768px){.container{padding:16rem 3rem 2rem!important}.outer-section-fadeout{top:50rem}}@media (width <= 400px){.author-info{flex-wrap:wrap}.mobile-math-image{margin-left:-1rem!important}}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i6.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "directive", type: i7.LazyImgDirective, selector: "img" }, { kind: "pipe", type: i8.DateFormatPipe, name: "dateFormat" }, { kind: "pipe", type: i9.TranslocoPipe, name: "transloco" }] }); }
|
|
48
68
|
}
|
|
49
69
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ResourcePostDetailsComponent, decorators: [{
|
|
50
70
|
type: Component,
|
|
51
|
-
args: [{ selector: 'pw-resource-post-details', template: "<section class=\"nce-hero-section\">\n <div class=\"container d-flex flex-wrap\">\n <div class=\"hero-left\">\n <p class=\"blog-label\">BLOG</p>\n\n <h1 class=\"hero-title\">\n <span [innerHTML]=\"post?.title\"></span>\n <a *ngIf=\"userLoggedIn && hasBlogAccess\"\n class=\"ms-3 text-decoration-none\"\n ngbTooltip=\"Edit this post\"\n [routerLink]=\"['/admin/resources/', post?.slug]\"\n target=\"_blank\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </a>\n </h1>\n\n\n <div class=\"author-info\">\n <img [src]=\"post?.author?.avatar?.[0]?.url || 'assets/img/icons/male.png'\" alt=\"User Profile Logo\" class=\"author-img\" />\n <div class=\"author-meta\">\n <p>Article by {{ post?.author?.first_name }} {{ post?.author?.last_name }}</p>\n <p class=\"date\">{{post?.published_at | dateFormat}}</p>\n </div>\n
|
|
52
|
-
}], ctorParameters: () => [{ type: i1.ResourceService }, { type: i0.Injector }, { type:
|
|
53
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
71
|
+
args: [{ selector: 'pw-resource-post-details', template: "<section class=\"nce-hero-section\">\n <div class=\"container d-flex flex-wrap\" [ngClass]=\"blogPostTag?.image?.url ? 'container-top' : 'container-no-image'\">\n <div class=\"hero-left\">\n <p class=\"blog-label\">BLOG</p>\n\n <h1 class=\"hero-title\">\n <span [innerHTML]=\"post?.title\"></span>\n <a *ngIf=\"userLoggedIn && hasBlogAccess\"\n class=\"ms-3 text-decoration-none\"\n ngbTooltip=\"Edit this post\"\n [routerLink]=\"['/admin/resources/', post?.slug]\"\n target=\"_blank\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </a>\n </h1>\n\n\n <div class=\"author-info\">\n <img [src]=\"post?.author?.avatar?.[0]?.url || 'assets/img/icons/male.png'\" alt=\"User Profile Logo\" class=\"author-img\" />\n <div class=\"author-meta\">\n <p>Article by {{ post?.author?.first_name }} {{ post?.author?.last_name }}</p>\n <p class=\"date\">{{post?.published_at | dateFormat}}</p>\n </div>\n </div>\n </div>\n\n <div class=\"hero-right\" *ngIf=\"isLoaded\">\n <img\n *ngIf=\"(blogPostTag?.image?.url && !(blogPostTag?.image?.url.includes('no_image_uploaded_squared'))); else noImage\"\n [src]=\"blogPostTag.image.url\"\n alt=\"Math Icon Blob\"\n class=\"hero-image\"\n />\n\n <ng-template #noImage>\n <pw-no-data\n class=\"data-image\"\n [withImage]=\"true\"\n [message]=\"'Search.NoDataMessage' | transloco\"\n [description]=\"'Search.NoDataDescription' | transloco\"\n ></pw-no-data>\n </ng-template>\n </div>\n </div>\n </section>\n", styles: [".outer-section-fadeout{position:absolute;top:46rem;height:40px;width:100%;background:linear-gradient(to bottom,#fff0,#f8f9fa)}.container-top{padding-top:132px!important}.container-no-image{padding-top:232px!important}.container{padding-bottom:2.5rem!important}.edit-icon{vertical-align:middle!important}.nce-hero-section{background:#fff;box-shadow:0 4px 32px -14px #40576d4d!important;position:relative}.nce-hero-section .container{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap}.nce-hero-section .blog-label{font-weight:700;font-size:1.7rem;margin-bottom:3rem}.nce-hero-section .hero-title{font-size:3.75rem;font-weight:300;line-height:1.3;color:#000;margin-bottom:2rem}.nce-hero-section .hero-title strong{font-weight:800}.nce-hero-section .hero-left{max-width:700px}.nce-hero-section .author-info{display:flex;align-items:center;gap:1rem;max-width:100%;overflow:hidden}.nce-hero-section .author-info .mobile-math-image{margin-right:0!important;margin-bottom:1rem;height:100px!important}.nce-hero-section .author-info .author-img{width:60px;height:60px;border-radius:50%;object-fit:cover}.nce-hero-section .author-info .author-meta p{font-size:1.2rem;margin-bottom:0!important}.nce-hero-section .author-info .author-meta .date{font-size:.95rem;color:#333}.nce-hero-section .hero-right{flex-shrink:0;width:40%}.nce-hero-section .hero-right .hero-image{height:auto}@media (width <= 768px){.nce-hero-section .hero-title{font-size:2rem}.nce-hero-section .hero-right{margin-top:2rem;text-align:center;width:100%}.nce-hero-section .hero-right .data-image{width:100%}.nce-hero-section .hero-right .hero-image{max-width:300px;width:100%;position:relative;z-index:3;left:4%;height:auto!important;top:2rem}.nce-hero-section .author-info{flex-direction:row;justify-content:flex-start}}@media (width >= 1200px){.hero-image{max-width:500px!important;max-height:500px!important;height:auto;position:relative!important;top:2.5rem}}@media (width >= 1020px) and (width <= 1200px){.outer-section-fadeout{top:34rem!important}}@media (width >= 768px) and (width <= 869px){.hero-image{width:320px!important;height:auto;position:relative;top:7.7rem}.hero-left{max-width:500px!important}.nce-hero-section .container{flex-wrap:nowrap!important}}@media (width >= 869px) and (width <= 1199px){.hero-image{width:100%!important;left:3%;position:relative;width:100%;max-width:600px!important;top:6.1rem;height:auto}.hero-left{max-width:500px!important}.nce-hero-section .container{flex-wrap:nowrap!important}}@media (width >= 768px) and (width <= 991px){.container{padding:18rem 6rem 6rem!important}}@media (width >= 991px) and (width <= 1200px){.container{padding:14rem 6rem 6rem!important}}@media (width >= 768px) and (width <= 1200px){.nce-hero-section{padding:0!important}.outer-section-fadeout{top:53rem}.hero-title{font-size:2.75rem!important}.hero-right{text-align:center;width:40%}}@media (width <= 768px){.container{padding:16rem 3rem 2rem!important}.outer-section-fadeout{top:50rem}}@media (width <= 400px){.author-info{flex-wrap:wrap}.mobile-math-image{margin-left:-1rem!important}}\n"] }]
|
|
72
|
+
}], ctorParameters: () => [{ type: i1.Resource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AgICAgIDxwIGNsYXNzPVwiZGF0ZVwiPnt7cG9zdD8ucHVibGlzaGVkX2F0IHwgZGF0ZUZvcm1hdH19PC9wPlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICA8L2Rpdj5cbiAgICAgIDwvZGl2PlxuXG4gICAgICA8ZGl2IGNsYXNzPVwiaGVyby1yaWdodFwiICpuZ0lmPVwiaXNMb2FkZWRcIj5cbiAgICAgICAgPGltZ1xuICAgICAgICAqbmdJZj1cIihibG9nUG9zdFRhZz8uaW1hZ2U/LnVybCAmJiAhKGJsb2dQb3N0VGFnPy5pbWFnZT8udXJsLmluY2x1ZGVzKCdub19pbWFnZV91cGxvYWRlZF9zcXVhcmVkJykpKTsgZWxzZSBub0ltYWdlXCJcbiAgICAgICAgW3NyY109XCJibG9nUG9zdFRhZy5pbWFnZS51cmxcIlxuICAgICAgICBhbHQ9XCJNYXRoIEljb24gQmxvYlwiXG4gICAgICAgIGNsYXNzPVwiaGVyby1pbWFnZVwiXG4gICAgICAvPlxuXG4gICAgICA8bmctdGVtcGxhdGUgI25vSW1hZ2U+XG4gICAgICAgIDxwdy1uby1kYXRhXG4gICAgICAgICAgY2xhc3M9XCJkYXRhLWltYWdlXCJcbiAgICAgICAgICBbd2l0aEltYWdlXT1cInRydWVcIlxuICAgICAgICAgIFttZXNzYWdlXT1cIidTZWFyY2guTm9EYXRhTWVzc2FnZScgfCB0cmFuc2xvY29cIlxuICAgICAgICAgIFtkZXNjcmlwdGlvbl09XCInU2VhcmNoLk5vRGF0YURlc2NyaXB0aW9uJyB8IHRyYW5zbG9jb1wiXG4gICAgICAgID48L3B3LW5vLWRhdGE+XG4gICAgICA8L25nLXRlbXBsYXRlPlxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG4gIDwvc2VjdGlvbj5cbiJdfQ==
|
|
@@ -910,14 +910,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
|
|
|
910
910
|
}], ctorParameters: () => [{ type: ResourceService }, { type: i0.Injector }, { type: i2$2.DomSanitizer }, { type: i2.TagService }, { type: i2.CustomToastService }] });
|
|
911
911
|
|
|
912
912
|
class ResourcePostDetailsComponent extends AppBaseComponent {
|
|
913
|
-
constructor(resourceService, injector, sanitizer) {
|
|
913
|
+
constructor(resourceService, tagService, injector, sanitizer) {
|
|
914
914
|
super(injector);
|
|
915
915
|
this.resourceService = resourceService;
|
|
916
|
+
this.tagService = tagService;
|
|
916
917
|
this.sanitizer = sanitizer;
|
|
917
918
|
this.routers = ADMIN_ROUTERS;
|
|
919
|
+
this.isLoaded = false;
|
|
918
920
|
}
|
|
919
921
|
ngOnInit() {
|
|
920
922
|
this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;
|
|
923
|
+
this.getUserSubscriptionId().subscribe(response => {
|
|
924
|
+
this.subscriptionId = response;
|
|
925
|
+
});
|
|
921
926
|
this.route.params.subscribe(params => {
|
|
922
927
|
this.slug = params['slug'] || '';
|
|
923
928
|
this.getBlogItem(this.slug);
|
|
@@ -930,6 +935,17 @@ class ResourcePostDetailsComponent extends AppBaseComponent {
|
|
|
930
935
|
this.hasBlogAccess = HelperService.checkBlogPermission(this.user);
|
|
931
936
|
});
|
|
932
937
|
}
|
|
938
|
+
this.getPostTags();
|
|
939
|
+
});
|
|
940
|
+
}
|
|
941
|
+
getPostTags() {
|
|
942
|
+
this.tagService
|
|
943
|
+
.getTagsByType('post_categories', {}, this.subscriptionId || this.masterSubscriptionId)
|
|
944
|
+
.subscribe(response => {
|
|
945
|
+
this.blogPostTag = response.tags.find(tag => tag.name === 'Blog Posts');
|
|
946
|
+
})
|
|
947
|
+
.add(() => {
|
|
948
|
+
this.isLoaded = true;
|
|
933
949
|
});
|
|
934
950
|
}
|
|
935
951
|
getBlogItem(slug) {
|
|
@@ -941,13 +957,13 @@ class ResourcePostDetailsComponent extends AppBaseComponent {
|
|
|
941
957
|
this.post = { ...response, body: blogBody };
|
|
942
958
|
});
|
|
943
959
|
}
|
|
944
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ResourcePostDetailsComponent, deps: [{ token: ResourceService }, { token: i0.Injector }, { token: i2$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
945
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: ResourcePostDetailsComponent, selector: "pw-resource-post-details", usesInheritance: true, ngImport: i0, template: "<section class=\"nce-hero-section\">\n <div class=\"container d-flex flex-wrap\">\n <div class=\"hero-left\">\n <p class=\"blog-label\">BLOG</p>\n\n <h1 class=\"hero-title\">\n <span [innerHTML]=\"post?.title\"></span>\n <a *ngIf=\"userLoggedIn && hasBlogAccess\"\n class=\"ms-3 text-decoration-none\"\n ngbTooltip=\"Edit this post\"\n [routerLink]=\"['/admin/resources/', post?.slug]\"\n target=\"_blank\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </a>\n </h1>\n\n\n <div class=\"author-info\">\n <img [src]=\"post?.author?.avatar?.[0]?.url || 'assets/img/icons/male.png'\" alt=\"User Profile Logo\" class=\"author-img\" />\n <div class=\"author-meta\">\n <p>Article by {{ post?.author?.first_name }} {{ post?.author?.last_name }}</p>\n <p class=\"date\">{{post?.published_at | dateFormat}}</p>\n </div>\n
|
|
960
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ResourcePostDetailsComponent, deps: [{ token: ResourceService }, { token: i2.TagService }, { token: i0.Injector }, { token: i2$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
961
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: ResourcePostDetailsComponent, selector: "pw-resource-post-details", usesInheritance: true, ngImport: i0, template: "<section class=\"nce-hero-section\">\n <div class=\"container d-flex flex-wrap\" [ngClass]=\"blogPostTag?.image?.url ? 'container-top' : 'container-no-image'\">\n <div class=\"hero-left\">\n <p class=\"blog-label\">BLOG</p>\n\n <h1 class=\"hero-title\">\n <span [innerHTML]=\"post?.title\"></span>\n <a *ngIf=\"userLoggedIn && hasBlogAccess\"\n class=\"ms-3 text-decoration-none\"\n ngbTooltip=\"Edit this post\"\n [routerLink]=\"['/admin/resources/', post?.slug]\"\n target=\"_blank\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </a>\n </h1>\n\n\n <div class=\"author-info\">\n <img [src]=\"post?.author?.avatar?.[0]?.url || 'assets/img/icons/male.png'\" alt=\"User Profile Logo\" class=\"author-img\" />\n <div class=\"author-meta\">\n <p>Article by {{ post?.author?.first_name }} {{ post?.author?.last_name }}</p>\n <p class=\"date\">{{post?.published_at | dateFormat}}</p>\n </div>\n </div>\n </div>\n\n <div class=\"hero-right\" *ngIf=\"isLoaded\">\n <img\n *ngIf=\"(blogPostTag?.image?.url && !(blogPostTag?.image?.url.includes('no_image_uploaded_squared'))); else noImage\"\n [src]=\"blogPostTag.image.url\"\n alt=\"Math Icon Blob\"\n class=\"hero-image\"\n />\n\n <ng-template #noImage>\n <pw-no-data\n class=\"data-image\"\n [withImage]=\"true\"\n [message]=\"'Search.NoDataMessage' | transloco\"\n [description]=\"'Search.NoDataDescription' | transloco\"\n ></pw-no-data>\n </ng-template>\n </div>\n </div>\n </section>\n", styles: [".outer-section-fadeout{position:absolute;top:46rem;height:40px;width:100%;background:linear-gradient(to bottom,#fff0,#f8f9fa)}.container-top{padding-top:132px!important}.container-no-image{padding-top:232px!important}.container{padding-bottom:2.5rem!important}.edit-icon{vertical-align:middle!important}.nce-hero-section{background:#fff;box-shadow:0 4px 32px -14px #40576d4d!important;position:relative}.nce-hero-section .container{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap}.nce-hero-section .blog-label{font-weight:700;font-size:1.7rem;margin-bottom:3rem}.nce-hero-section .hero-title{font-size:3.75rem;font-weight:300;line-height:1.3;color:#000;margin-bottom:2rem}.nce-hero-section .hero-title strong{font-weight:800}.nce-hero-section .hero-left{max-width:700px}.nce-hero-section .author-info{display:flex;align-items:center;gap:1rem;max-width:100%;overflow:hidden}.nce-hero-section .author-info .mobile-math-image{margin-right:0!important;margin-bottom:1rem;height:100px!important}.nce-hero-section .author-info .author-img{width:60px;height:60px;border-radius:50%;object-fit:cover}.nce-hero-section .author-info .author-meta p{font-size:1.2rem;margin-bottom:0!important}.nce-hero-section .author-info .author-meta .date{font-size:.95rem;color:#333}.nce-hero-section .hero-right{flex-shrink:0;width:40%}.nce-hero-section .hero-right .hero-image{height:auto}@media (width <= 768px){.nce-hero-section .hero-title{font-size:2rem}.nce-hero-section .hero-right{margin-top:2rem;text-align:center;width:100%}.nce-hero-section .hero-right .data-image{width:100%}.nce-hero-section .hero-right .hero-image{max-width:300px;width:100%;position:relative;z-index:3;left:4%;height:auto!important;top:2rem}.nce-hero-section .author-info{flex-direction:row;justify-content:flex-start}}@media (width >= 1200px){.hero-image{max-width:500px!important;max-height:500px!important;height:auto;position:relative!important;top:2.5rem}}@media (width >= 1020px) and (width <= 1200px){.outer-section-fadeout{top:34rem!important}}@media (width >= 768px) and (width <= 869px){.hero-image{width:320px!important;height:auto;position:relative;top:7.7rem}.hero-left{max-width:500px!important}.nce-hero-section .container{flex-wrap:nowrap!important}}@media (width >= 869px) and (width <= 1199px){.hero-image{width:100%!important;left:3%;position:relative;width:100%;max-width:600px!important;top:6.1rem;height:auto}.hero-left{max-width:500px!important}.nce-hero-section .container{flex-wrap:nowrap!important}}@media (width >= 768px) and (width <= 991px){.container{padding:18rem 6rem 6rem!important}}@media (width >= 991px) and (width <= 1200px){.container{padding:14rem 6rem 6rem!important}}@media (width >= 768px) and (width <= 1200px){.nce-hero-section{padding:0!important}.outer-section-fadeout{top:53rem}.hero-title{font-size:2.75rem!important}.hero-right{text-align:center;width:40%}}@media (width <= 768px){.container{padding:16rem 3rem 2rem!important}.outer-section-fadeout{top:50rem}}@media (width <= 400px){.author-info{flex-wrap:wrap}.mobile-math-image{margin-left:-1rem!important}}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i5$1.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "directive", type: i4$1.LazyImgDirective, selector: "img" }, { kind: "pipe", type: i9.DateFormatPipe, name: "dateFormat" }, { kind: "pipe", type: i8.TranslocoPipe, name: "transloco" }] }); }
|
|
946
962
|
}
|
|
947
963
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ResourcePostDetailsComponent, decorators: [{
|
|
948
964
|
type: Component,
|
|
949
|
-
args: [{ selector: 'pw-resource-post-details', template: "<section class=\"nce-hero-section\">\n <div class=\"container d-flex flex-wrap\">\n <div class=\"hero-left\">\n <p class=\"blog-label\">BLOG</p>\n\n <h1 class=\"hero-title\">\n <span [innerHTML]=\"post?.title\"></span>\n <a *ngIf=\"userLoggedIn && hasBlogAccess\"\n class=\"ms-3 text-decoration-none\"\n ngbTooltip=\"Edit this post\"\n [routerLink]=\"['/admin/resources/', post?.slug]\"\n target=\"_blank\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </a>\n </h1>\n\n\n <div class=\"author-info\">\n <img [src]=\"post?.author?.avatar?.[0]?.url || 'assets/img/icons/male.png'\" alt=\"User Profile Logo\" class=\"author-img\" />\n <div class=\"author-meta\">\n <p>Article by {{ post?.author?.first_name }} {{ post?.author?.last_name }}</p>\n <p class=\"date\">{{post?.published_at | dateFormat}}</p>\n </div>\n
|
|
950
|
-
}], ctorParameters: () => [{ type: ResourceService }, { type: i0.Injector }, { type: i2$2.DomSanitizer }] });
|
|
965
|
+
args: [{ selector: 'pw-resource-post-details', template: "<section class=\"nce-hero-section\">\n <div class=\"container d-flex flex-wrap\" [ngClass]=\"blogPostTag?.image?.url ? 'container-top' : 'container-no-image'\">\n <div class=\"hero-left\">\n <p class=\"blog-label\">BLOG</p>\n\n <h1 class=\"hero-title\">\n <span [innerHTML]=\"post?.title\"></span>\n <a *ngIf=\"userLoggedIn && hasBlogAccess\"\n class=\"ms-3 text-decoration-none\"\n ngbTooltip=\"Edit this post\"\n [routerLink]=\"['/admin/resources/', post?.slug]\"\n target=\"_blank\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </a>\n </h1>\n\n\n <div class=\"author-info\">\n <img [src]=\"post?.author?.avatar?.[0]?.url || 'assets/img/icons/male.png'\" alt=\"User Profile Logo\" class=\"author-img\" />\n <div class=\"author-meta\">\n <p>Article by {{ post?.author?.first_name }} {{ post?.author?.last_name }}</p>\n <p class=\"date\">{{post?.published_at | dateFormat}}</p>\n </div>\n </div>\n </div>\n\n <div class=\"hero-right\" *ngIf=\"isLoaded\">\n <img\n *ngIf=\"(blogPostTag?.image?.url && !(blogPostTag?.image?.url.includes('no_image_uploaded_squared'))); else noImage\"\n [src]=\"blogPostTag.image.url\"\n alt=\"Math Icon Blob\"\n class=\"hero-image\"\n />\n\n <ng-template #noImage>\n <pw-no-data\n class=\"data-image\"\n [withImage]=\"true\"\n [message]=\"'Search.NoDataMessage' | transloco\"\n [description]=\"'Search.NoDataDescription' | transloco\"\n ></pw-no-data>\n </ng-template>\n </div>\n </div>\n </section>\n", styles: [".outer-section-fadeout{position:absolute;top:46rem;height:40px;width:100%;background:linear-gradient(to bottom,#fff0,#f8f9fa)}.container-top{padding-top:132px!important}.container-no-image{padding-top:232px!important}.container{padding-bottom:2.5rem!important}.edit-icon{vertical-align:middle!important}.nce-hero-section{background:#fff;box-shadow:0 4px 32px -14px #40576d4d!important;position:relative}.nce-hero-section .container{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap}.nce-hero-section .blog-label{font-weight:700;font-size:1.7rem;margin-bottom:3rem}.nce-hero-section .hero-title{font-size:3.75rem;font-weight:300;line-height:1.3;color:#000;margin-bottom:2rem}.nce-hero-section .hero-title strong{font-weight:800}.nce-hero-section .hero-left{max-width:700px}.nce-hero-section .author-info{display:flex;align-items:center;gap:1rem;max-width:100%;overflow:hidden}.nce-hero-section .author-info .mobile-math-image{margin-right:0!important;margin-bottom:1rem;height:100px!important}.nce-hero-section .author-info .author-img{width:60px;height:60px;border-radius:50%;object-fit:cover}.nce-hero-section .author-info .author-meta p{font-size:1.2rem;margin-bottom:0!important}.nce-hero-section .author-info .author-meta .date{font-size:.95rem;color:#333}.nce-hero-section .hero-right{flex-shrink:0;width:40%}.nce-hero-section .hero-right .hero-image{height:auto}@media (width <= 768px){.nce-hero-section .hero-title{font-size:2rem}.nce-hero-section .hero-right{margin-top:2rem;text-align:center;width:100%}.nce-hero-section .hero-right .data-image{width:100%}.nce-hero-section .hero-right .hero-image{max-width:300px;width:100%;position:relative;z-index:3;left:4%;height:auto!important;top:2rem}.nce-hero-section .author-info{flex-direction:row;justify-content:flex-start}}@media (width >= 1200px){.hero-image{max-width:500px!important;max-height:500px!important;height:auto;position:relative!important;top:2.5rem}}@media (width >= 1020px) and (width <= 1200px){.outer-section-fadeout{top:34rem!important}}@media (width >= 768px) and (width <= 869px){.hero-image{width:320px!important;height:auto;position:relative;top:7.7rem}.hero-left{max-width:500px!important}.nce-hero-section .container{flex-wrap:nowrap!important}}@media (width >= 869px) and (width <= 1199px){.hero-image{width:100%!important;left:3%;position:relative;width:100%;max-width:600px!important;top:6.1rem;height:auto}.hero-left{max-width:500px!important}.nce-hero-section .container{flex-wrap:nowrap!important}}@media (width >= 768px) and (width <= 991px){.container{padding:18rem 6rem 6rem!important}}@media (width >= 991px) and (width <= 1200px){.container{padding:14rem 6rem 6rem!important}}@media (width >= 768px) and (width <= 1200px){.nce-hero-section{padding:0!important}.outer-section-fadeout{top:53rem}.hero-title{font-size:2.75rem!important}.hero-right{text-align:center;width:40%}}@media (width <= 768px){.container{padding:16rem 3rem 2rem!important}.outer-section-fadeout{top:50rem}}@media (width <= 400px){.author-info{flex-wrap:wrap}.mobile-math-image{margin-left:-1rem!important}}\n"] }]
|
|
966
|
+
}], ctorParameters: () => [{ type: ResourceService }, { type: i2.TagService }, { type: i0.Injector }, { type: i2$2.DomSanitizer }] });
|
|
951
967
|
|
|
952
968
|
class ResourcePostComponent {
|
|
953
969
|
constructor(route, titleService) {
|