@posiwise/resource-module 0.0.193 → 0.0.195
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/fesm2022/posiwise-resource-module-base-top-banner.component-DSirXfem.mjs +142 -0
- package/fesm2022/posiwise-resource-module-base-top-banner.component-DSirXfem.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-blogs.module-DIh--y78.mjs +264 -0
- package/fesm2022/posiwise-resource-module-resource-blogs.module-DIh--y78.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-cards.module-Bp4BgXL2.mjs +1928 -0
- package/fesm2022/posiwise-resource-module-resource-cards.module-Bp4BgXL2.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-BtkkgIFa.mjs +246 -0
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-BtkkgIFa.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-events.module-BwK6UfCq.mjs +460 -0
- package/fesm2022/posiwise-resource-module-resource-events.module-BwK6UfCq.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-hub.module-BWvid8gs.mjs +443 -0
- package/fesm2022/posiwise-resource-module-resource-hub.module-BWvid8gs.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-integrations.module-qudabfwX.mjs +604 -0
- package/fesm2022/posiwise-resource-module-resource-integrations.module-qudabfwX.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-post.module-BJnApbtU.mjs +777 -0
- package/fesm2022/posiwise-resource-module-resource-post.module-BJnApbtU.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-release-notes.module-TH1usNf-.mjs +294 -0
- package/fesm2022/posiwise-resource-module-resource-release-notes.module-TH1usNf-.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-root.module-DP0EMP-_.mjs +769 -0
- package/fesm2022/posiwise-resource-module-resource-root.module-DP0EMP-_.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-videos.module-DR7dQ_8r.mjs +258 -0
- package/fesm2022/posiwise-resource-module-resource-videos.module-DR7dQ_8r.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-white-papers.module-C8J9-eqL.mjs +259 -0
- package/fesm2022/posiwise-resource-module-resource-white-papers.module-C8J9-eqL.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource.service-DjeMJX1O.mjs +88 -0
- package/fesm2022/posiwise-resource-module-resource.service-DjeMJX1O.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module.mjs +1603 -2
- package/fesm2022/posiwise-resource-module.mjs.map +1 -1
- package/package.json +6 -5
- package/types/posiwise-resource-module.d.ts +794 -506
- package/fesm2022/posiwise-resource-module-base-top-banner.component-CD5atqs7.mjs +0 -116
- package/fesm2022/posiwise-resource-module-base-top-banner.component-CD5atqs7.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-posiwise-resource-module-C-e2dNwR.mjs +0 -1888
- package/fesm2022/posiwise-resource-module-posiwise-resource-module-C-e2dNwR.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-blogs.module-BBFWP2C7.mjs +0 -69
- package/fesm2022/posiwise-resource-module-resource-blogs.module-BBFWP2C7.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-ByTD2_48.mjs +0 -135
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-ByTD2_48.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-events.module-DDRHt23j.mjs +0 -241
- package/fesm2022/posiwise-resource-module-resource-events.module-DDRHt23j.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-hub.module-BfsDOG9Y.mjs +0 -244
- package/fesm2022/posiwise-resource-module-resource-hub.module-BfsDOG9Y.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-integrations.module-HnP4CCtr.mjs +0 -295
- package/fesm2022/posiwise-resource-module-resource-integrations.module-HnP4CCtr.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-post.module-D1Y2bs-g.mjs +0 -334
- package/fesm2022/posiwise-resource-module-resource-post.module-D1Y2bs-g.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-release-notes.module-DXwH6xe3.mjs +0 -110
- package/fesm2022/posiwise-resource-module-resource-release-notes.module-DXwH6xe3.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-root.module-CFCC4-Ht.mjs +0 -398
- package/fesm2022/posiwise-resource-module-resource-root.module-CFCC4-Ht.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-videos.module-cV-K0XzH.mjs +0 -68
- package/fesm2022/posiwise-resource-module-resource-videos.module-cV-K0XzH.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-white-papers.module-C9piJ56m.mjs +0 -70
- package/fesm2022/posiwise-resource-module-resource-white-papers.module-C9piJ56m.mjs.map +0 -1
|
@@ -0,0 +1,777 @@
|
|
|
1
|
+
import { t as ResourceService } from "./posiwise-resource-module-resource.service-DjeMJX1O.mjs";
|
|
2
|
+
import { o as ResourceCardComponent } from "./posiwise-resource-module-resource-cards.module-Bp4BgXL2.mjs";
|
|
3
|
+
import { ResourceSharedModule } from "./posiwise-resource-module.mjs";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import { CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Component, NgModule } from "@angular/core";
|
|
6
|
+
import { HelperService } from "@posiwise/helper-service";
|
|
7
|
+
import * as i3$1 from "@posiwise/common-services";
|
|
8
|
+
import * as i6 from "@angular/router";
|
|
9
|
+
import { RouterModule } from "@angular/router";
|
|
10
|
+
import * as i3 from "@posiwise/resource-contact-us";
|
|
11
|
+
import * as i10 from "@angular/common";
|
|
12
|
+
import * as i5 from "@angular/forms";
|
|
13
|
+
import { UntypedFormBuilder, Validators } from "@angular/forms";
|
|
14
|
+
import * as i8$1 from "@posiwise/alpha-module";
|
|
15
|
+
import * as i7$1 from "@posiwise/directives";
|
|
16
|
+
import * as i9 from "@posiwise/pipes";
|
|
17
|
+
import * as i7 from "@posiwise/shared-components";
|
|
18
|
+
import * as i9$1 from "primeng/textarea";
|
|
19
|
+
import * as i11 from "@jsverse/transloco";
|
|
20
|
+
import { AppBaseComponent } from "@posiwise/app-base-component";
|
|
21
|
+
import * as i4 from "@posiwise/utils";
|
|
22
|
+
import * as i2 from "@angular/platform-browser";
|
|
23
|
+
import { ADMIN_ROUTERS } from "@posiwise/common-utilities";
|
|
24
|
+
import * as i8 from "primeng/tooltip";
|
|
25
|
+
import { TooltipModule } from "primeng/tooltip";
|
|
26
|
+
var ResourceBlog = class {
|
|
27
|
+
static getResourcePostsForm() {
|
|
28
|
+
return new UntypedFormBuilder().group({
|
|
29
|
+
related_entity_id: [""],
|
|
30
|
+
related_entity_type: [""],
|
|
31
|
+
comment: [null, Validators.required],
|
|
32
|
+
user_id: [""]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var RelatedResourcesComponent = class RelatedResourcesComponent extends AppBaseComponent {
|
|
37
|
+
constructor(resourceService, injector, sanitizer, tagService, authService, toastr, cdr) {
|
|
38
|
+
super(injector);
|
|
39
|
+
this.resourceService = resourceService;
|
|
40
|
+
this.sanitizer = sanitizer;
|
|
41
|
+
this.tagService = tagService;
|
|
42
|
+
this.authService = authService;
|
|
43
|
+
this.toastr = toastr;
|
|
44
|
+
this.cdr = cdr;
|
|
45
|
+
this.resourceCards = [
|
|
46
|
+
{
|
|
47
|
+
title: "BLOG: Here’s why you should QA your distributor invoices",
|
|
48
|
+
image: "/assets/img/resource/resource-qa.png",
|
|
49
|
+
alt: "QA distributor invoices",
|
|
50
|
+
url: "/resources/view/here-s-why-you-should-be-seeking-independent-qa-of-all-distributor-inv"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
title: "BLOG: 4 instant hacks to uplift your MSP’s monthly billing",
|
|
54
|
+
image: "/assets/img/resource/resource-hacks.png",
|
|
55
|
+
alt: "Monthly billing hacks",
|
|
56
|
+
url: "/resources/view/4-instant-hacks-to-uplift-your-msp-s-monthly-billing"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
title: "BLOG: The trivial detail that will either future-proof or sabotage your PSA.",
|
|
60
|
+
image: "/assets/img/resource/resource-psa.png",
|
|
61
|
+
alt: "PSA future-proof",
|
|
62
|
+
url: "/resources/view/the-trivial-detail-that-will-either-future-proof-or-sabotage-your-psa"
|
|
63
|
+
}
|
|
64
|
+
];
|
|
65
|
+
this.postComments = [];
|
|
66
|
+
this.demoLinks = this.appConfig?.pages_config?.book_demo?.items;
|
|
67
|
+
this.linkedInUrl = this.appConfig?.social?.linkedin_url;
|
|
68
|
+
this.company_email = this.appConfig.company.email;
|
|
69
|
+
this.commentForm = ResourceBlog.getResourcePostsForm();
|
|
70
|
+
}
|
|
71
|
+
ngOnInit() {
|
|
72
|
+
this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;
|
|
73
|
+
this.route.params.subscribe((params) => {
|
|
74
|
+
this.slug = params["slug"] ?? "";
|
|
75
|
+
this.getBlogItem(this.slug);
|
|
76
|
+
this.cdr.markForCheck();
|
|
77
|
+
});
|
|
78
|
+
this.authService.getToken$().subscribe((res) => {
|
|
79
|
+
this.userLoggedIn = !!res;
|
|
80
|
+
if (this.userLoggedIn) {
|
|
81
|
+
this.localStorage.getItem$("product").subscribe((res) => {
|
|
82
|
+
const data = res ? JSON.parse(res) : null;
|
|
83
|
+
this.subscriptionId = data?.subscriptionId;
|
|
84
|
+
this.cdr.markForCheck();
|
|
85
|
+
});
|
|
86
|
+
this.userService.getUserInfo().subscribe((data) => {
|
|
87
|
+
this.user = data;
|
|
88
|
+
this.getPostTags();
|
|
89
|
+
this.cdr.markForCheck();
|
|
90
|
+
});
|
|
91
|
+
} else this.getPostTags();
|
|
92
|
+
this.cdr.markForCheck();
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
get hasValidDemoLinks() {
|
|
96
|
+
return Array.isArray(this.demoLinks) && this.demoLinks.some((link) => link?.title ?? link?.url);
|
|
97
|
+
}
|
|
98
|
+
getPostTags() {
|
|
99
|
+
this.tagService.getTagsByType("post_categories", {}, this.getEffectiveSubscriptionId()).subscribe((response) => {
|
|
100
|
+
this.blogPostTag = response.tags.find((tag) => tag.name === "Blog Posts");
|
|
101
|
+
this.cdr.markForCheck();
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
getBlogItem(slug) {
|
|
105
|
+
this.resourceService.getPostBySlug(slug).subscribe((response) => {
|
|
106
|
+
let blogBody;
|
|
107
|
+
if (response?.body) blogBody = HelperService.sanitizeQuillBody(response.body, this.sanitizer);
|
|
108
|
+
const formatted = new Date(response?.when).toISOString().split("T")[0];
|
|
109
|
+
this.postComments = response.entity_comments;
|
|
110
|
+
this.post = {
|
|
111
|
+
...response,
|
|
112
|
+
body: blogBody,
|
|
113
|
+
when: formatted
|
|
114
|
+
};
|
|
115
|
+
this.cdr.markForCheck();
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
onComment() {
|
|
119
|
+
const data = { ...this.commentForm.value };
|
|
120
|
+
data.related_entity_id = this.post?.id;
|
|
121
|
+
data.related_entity_type = "Post";
|
|
122
|
+
data.user_id = this.user?.id;
|
|
123
|
+
this.resourceService.postComments(data).subscribe(() => {
|
|
124
|
+
this.getBlogItem(this.slug);
|
|
125
|
+
this.commentForm.reset();
|
|
126
|
+
this.toastr.success(this.translation.translate("Resource.Posts.CommentAdded"));
|
|
127
|
+
this.cdr.markForCheck();
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
trackByComment(_index, item) {
|
|
131
|
+
return item.id;
|
|
132
|
+
}
|
|
133
|
+
getEffectiveSubscriptionId() {
|
|
134
|
+
return HelperService.getEffectiveSubscriptionId(this.user, this.subscriptionId, this.masterSubscriptionId);
|
|
135
|
+
}
|
|
136
|
+
static {
|
|
137
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
138
|
+
minVersion: "12.0.0",
|
|
139
|
+
version: "22.2.0",
|
|
140
|
+
ngImport: i0,
|
|
141
|
+
type: RelatedResourcesComponent,
|
|
142
|
+
deps: [
|
|
143
|
+
{ token: ResourceService },
|
|
144
|
+
{ token: i0.Injector },
|
|
145
|
+
{ token: i2.DomSanitizer },
|
|
146
|
+
{ token: i3$1.TagService },
|
|
147
|
+
{ token: i3$1.AuthService },
|
|
148
|
+
{ token: i3$1.CustomToastService },
|
|
149
|
+
{ token: i0.ChangeDetectorRef }
|
|
150
|
+
],
|
|
151
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
static {
|
|
155
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
156
|
+
minVersion: "17.0.0",
|
|
157
|
+
version: "22.2.0",
|
|
158
|
+
type: RelatedResourcesComponent,
|
|
159
|
+
isStandalone: false,
|
|
160
|
+
selector: "pw-related-resources",
|
|
161
|
+
usesInheritance: true,
|
|
162
|
+
ngImport: i0,
|
|
163
|
+
template: "\n\n<section class=\"resource-body-section\">\n <div class=\"container\">\n <div class=\"ql-snow body-quill\"\n >\n <div class=\"ql-editor body post-body-text\"\n [innerHTML]=\"post?.body\">\n </div>\n </div>\n <section class=\"resource-offer-section\">\n\n <div class=\"row mt-5 mb-4 response-row\">\n <div class=\"col-12\">\n @if (userLoggedIn) {\n <form\n class=\"p-fluid mb-5\"\n [formGroup]=\"commentForm\"\n (ngSubmit)=\"onComment()\"\n >\n <div class=\"card shadow-sm no-border p-4\">\n <div class=\"field\">\n <label for=\"related-resources-comment\" class=\"font-bold text-lg mb-4 comment-label\">💬 LEAVE A COMMENT</label>\n <textarea\n id=\"related-resources-comment\"\n pInputTextarea\n formControlName=\"comment\"\n rows=\"6\"\n fluid\n placeholder=\"What's on your mind?\"\n\n aria-label=\"What's on your mind?\" ></textarea>\n @if (commentForm.get('comment')?.invalid && commentForm.get('comment')?.touched) {\n <small\n class=\"text-danger\"\n >Please enter comment</small\n >\n }\n </div>\n <div class=\"text-end mt-3\">\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"sign-btn sign-header-btn\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n </div>\n </form>\n } @else {\n <p class=\"text-center pt-3 pb-3 user-not-logged-in text-muted shadow-sm mb-5\">\n <a [routerLink]=\"['/login']\" class=\"text-primary fw-bold\">Log in</a> to leave a comment!\n </p>\n }\n </div>\n </div>\n\n @if (postComments.length > 0) {\n <div class=\"row mt-5 comment-row\">\n @for (comment of postComments; track trackByComment($index, comment)) {\n <div class=\"col-12\">\n <div class=\"card no-border shadow-sm p-3 mb-3\">\n <div class=\"d-flex align-items-start\">\n <img\n [src]=\"comment?.author?.avatar?.[0]?.url || 'assets/img/icons/male.png'\"\n alt=\"avatar\"\n class=\"rounded-circle me-3\"\n width=\"50\"\n height=\"50\"\n (error)=\"handleImageError($event, 'assets/img/icons/male.png')\"\n />\n <div class=\"flex-grow-1\">\n <div class=\"fw-bold text-dark\">\n {{ comment.user?.first_name || '' }} {{ comment.user?.last_name || '' }}\n </div>\n <div class=\"text-muted small mb-2\">{{ comment.created_at | date: 'dd MMM yyyy, h:mm a' }}</div>\n <div class=\"text-body\">\n {{ comment.comment }}\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n\n </section>\n </div>\n <hr class=\"resource-divider\" />\n </section>\n\n @if (hasValidDemoLinks) {\n <section class=\"resource-book-section\">\n <div class=\"container\">\n <p class=\"resource-contact\">\n Any questions, get in touch <a href=\"mailto:{{ company_email }}\">here</a>,\n <a [href]=\"linkedInUrl\" target=\"_blank\">connect on LinkedIn</a>, or book a meeting below:\n </p>\n </div>\n <pw-book-a-demo [isBlog]=\"true\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-book-a-demo>\n <hr class=\"resource-divider\" />\n </section>\n }\n\n\n @if (blogPostTag?.tag_category_id) {\n <pw-resource-cards [tag]=\"blogPostTag\" [categoryId]=\"blogPostTag?.tag_category_id\" [resourceTitle]=\"blogPostTag?.title\" [isHeaderVisible]=\"true\" resourceLink=\"/resources/blogs\" [isRelated]=\"true\" [resourceTitle]=\"'Other resources you may be interested in:'\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-cards>\n }\n",
|
|
164
|
+
styles: ["textarea{font-size:1rem!important}.resource-body-section{background-color:#fff}.resource-body-section .container{padding:3rem 1.5rem 4rem!important;max-width:850px!important;margin:0 auto;text-align:left}.user-not-logged-in{background:#fafbfc;border:1px solid #e2e5ea;border-radius:8px;font-size:14px;font-weight:400;color:#5a6473;padding:1rem 1.5rem;box-shadow:none!important;margin-bottom:2rem!important}.user-not-logged-in a{color:#1a1d21!important;text-decoration:none;font-weight:600;transition:color .15s ease-out}.user-not-logged-in a:hover,.user-not-logged-in a:focus-visible{color:var(--first)!important}.user-not-logged-in a:focus-visible{outline:2px solid var(--first);outline-offset:2px;border-radius:2px}.resource-book-section{background:#fff;padding-top:4rem;padding-bottom:0}.resource-book-section .container{max-width:850px;margin:0 auto;padding:0 1.5rem!important;text-align:left}.resource-book-section .resource-contact{line-height:1.6;font-size:1rem;color:#3d4654}.resource-book-section .resource-contact a{text-decoration:underline;color:#1a1d21;margin:0 .2rem;transition:color .15s ease-out}.resource-book-section .resource-contact a:hover{color:var(--first)!important}.resource-offer-section{background:#fff;padding-top:1rem}.resource-offer-section .container{max-width:850px;margin:0 auto;padding:0 1.5rem;text-align:left}.resource-divider{border:0;border-top:1px solid #e2e5ea;margin:2rem auto;max-width:850px;height:0;background:none}::ng-deep .body-quill{border-width:0!important;max-width:850px;display:block;margin-left:auto;margin-right:auto}::ng-deep .p-textarea{border-radius:8px;border:1px solid #e2e5ea;font-size:1rem!important}.card{background-color:#fff;border-radius:12px}.comment-row{gap:1.5rem;padding-bottom:3rem;max-width:850px;display:block;margin-left:auto;margin-right:auto}.comment-label{font-size:14px!important;font-weight:600!important;letter-spacing:.04em;text-transform:uppercase;color:#5a6473}.response-row{max-width:850px;display:block;margin-left:auto;margin-right:auto;margin-top:2rem!important}@media(width<=768px){.resource-body-section .container{padding:2rem 1rem 3rem}.resource-book-section{padding-top:2rem!important}.resource-book-section .resource-contact{font-size:.9375rem!important}}\n"],
|
|
165
|
+
dependencies: [
|
|
166
|
+
{
|
|
167
|
+
kind: "component",
|
|
168
|
+
type: ResourceCardComponent,
|
|
169
|
+
selector: "pw-resource-cards",
|
|
170
|
+
inputs: [
|
|
171
|
+
"categoryId",
|
|
172
|
+
"isHeaderVisible",
|
|
173
|
+
"isRelated",
|
|
174
|
+
"resourceTitle",
|
|
175
|
+
"postSlice",
|
|
176
|
+
"header",
|
|
177
|
+
"tag",
|
|
178
|
+
"resourceLink",
|
|
179
|
+
"user",
|
|
180
|
+
"userLoggedIn"
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
kind: "directive",
|
|
185
|
+
type: i5.ɵNgNoValidate,
|
|
186
|
+
selector: "form:not([ngNoForm]):not([ngNativeValidate])"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
kind: "directive",
|
|
190
|
+
type: i5.DefaultValueAccessor,
|
|
191
|
+
selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
kind: "directive",
|
|
195
|
+
type: i5.NgControlStatus,
|
|
196
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
kind: "directive",
|
|
200
|
+
type: i5.NgControlStatusGroup,
|
|
201
|
+
selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
kind: "directive",
|
|
205
|
+
type: i5.FormGroupDirective,
|
|
206
|
+
selector: "[formGroup]",
|
|
207
|
+
inputs: ["formGroup"],
|
|
208
|
+
outputs: ["ngSubmit"],
|
|
209
|
+
exportAs: ["ngForm"]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
kind: "directive",
|
|
213
|
+
type: i5.FormControlName,
|
|
214
|
+
selector: "[formControlName]",
|
|
215
|
+
inputs: [
|
|
216
|
+
"formControlName",
|
|
217
|
+
"disabled",
|
|
218
|
+
"ngModel"
|
|
219
|
+
],
|
|
220
|
+
outputs: ["ngModelChange"]
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
kind: "directive",
|
|
224
|
+
type: i6.RouterLink,
|
|
225
|
+
selector: "[routerLink]",
|
|
226
|
+
inputs: [
|
|
227
|
+
"target",
|
|
228
|
+
"queryParams",
|
|
229
|
+
"fragment",
|
|
230
|
+
"queryParamsHandling",
|
|
231
|
+
"state",
|
|
232
|
+
"info",
|
|
233
|
+
"relativeTo",
|
|
234
|
+
"preserveFragment",
|
|
235
|
+
"skipLocationChange",
|
|
236
|
+
"replaceUrl",
|
|
237
|
+
"browserUrl",
|
|
238
|
+
"routerLink"
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
kind: "directive",
|
|
243
|
+
type: i7$1.ButtonBusyDirective,
|
|
244
|
+
selector: "[buttonBusy]",
|
|
245
|
+
inputs: ["buttonBusy", "busyText"]
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
kind: "directive",
|
|
249
|
+
type: i7$1.LazyImgDirective,
|
|
250
|
+
selector: "img"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
kind: "component",
|
|
254
|
+
type: i8$1.HubSpotMeetingsComponent,
|
|
255
|
+
selector: "pw-book-a-demo",
|
|
256
|
+
inputs: [
|
|
257
|
+
"isBlog",
|
|
258
|
+
"user",
|
|
259
|
+
"userLoggedIn"
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
kind: "directive",
|
|
264
|
+
type: i9$1.Textarea,
|
|
265
|
+
selector: "[pTextarea], [pInputTextarea]",
|
|
266
|
+
inputs: [
|
|
267
|
+
"pTextareaPT",
|
|
268
|
+
"pTextareaUnstyled",
|
|
269
|
+
"autoResize",
|
|
270
|
+
"pSize",
|
|
271
|
+
"variant",
|
|
272
|
+
"fluid",
|
|
273
|
+
"invalid"
|
|
274
|
+
],
|
|
275
|
+
outputs: ["onResize"]
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
kind: "pipe",
|
|
279
|
+
type: i10.DatePipe,
|
|
280
|
+
name: "date"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
kind: "pipe",
|
|
284
|
+
type: i11.TranslocoPipe,
|
|
285
|
+
name: "transloco"
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
293
|
+
minVersion: "12.0.0",
|
|
294
|
+
version: "22.2.0",
|
|
295
|
+
ngImport: i0,
|
|
296
|
+
type: RelatedResourcesComponent,
|
|
297
|
+
decorators: [{
|
|
298
|
+
type: Component,
|
|
299
|
+
args: [{
|
|
300
|
+
selector: "pw-related-resources",
|
|
301
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
302
|
+
standalone: false,
|
|
303
|
+
template: "\n\n<section class=\"resource-body-section\">\n <div class=\"container\">\n <div class=\"ql-snow body-quill\"\n >\n <div class=\"ql-editor body post-body-text\"\n [innerHTML]=\"post?.body\">\n </div>\n </div>\n <section class=\"resource-offer-section\">\n\n <div class=\"row mt-5 mb-4 response-row\">\n <div class=\"col-12\">\n @if (userLoggedIn) {\n <form\n class=\"p-fluid mb-5\"\n [formGroup]=\"commentForm\"\n (ngSubmit)=\"onComment()\"\n >\n <div class=\"card shadow-sm no-border p-4\">\n <div class=\"field\">\n <label for=\"related-resources-comment\" class=\"font-bold text-lg mb-4 comment-label\">💬 LEAVE A COMMENT</label>\n <textarea\n id=\"related-resources-comment\"\n pInputTextarea\n formControlName=\"comment\"\n rows=\"6\"\n fluid\n placeholder=\"What's on your mind?\"\n\n aria-label=\"What's on your mind?\" ></textarea>\n @if (commentForm.get('comment')?.invalid && commentForm.get('comment')?.touched) {\n <small\n class=\"text-danger\"\n >Please enter comment</small\n >\n }\n </div>\n <div class=\"text-end mt-3\">\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"sign-btn sign-header-btn\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n </div>\n </form>\n } @else {\n <p class=\"text-center pt-3 pb-3 user-not-logged-in text-muted shadow-sm mb-5\">\n <a [routerLink]=\"['/login']\" class=\"text-primary fw-bold\">Log in</a> to leave a comment!\n </p>\n }\n </div>\n </div>\n\n @if (postComments.length > 0) {\n <div class=\"row mt-5 comment-row\">\n @for (comment of postComments; track trackByComment($index, comment)) {\n <div class=\"col-12\">\n <div class=\"card no-border shadow-sm p-3 mb-3\">\n <div class=\"d-flex align-items-start\">\n <img\n [src]=\"comment?.author?.avatar?.[0]?.url || 'assets/img/icons/male.png'\"\n alt=\"avatar\"\n class=\"rounded-circle me-3\"\n width=\"50\"\n height=\"50\"\n (error)=\"handleImageError($event, 'assets/img/icons/male.png')\"\n />\n <div class=\"flex-grow-1\">\n <div class=\"fw-bold text-dark\">\n {{ comment.user?.first_name || '' }} {{ comment.user?.last_name || '' }}\n </div>\n <div class=\"text-muted small mb-2\">{{ comment.created_at | date: 'dd MMM yyyy, h:mm a' }}</div>\n <div class=\"text-body\">\n {{ comment.comment }}\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n\n </section>\n </div>\n <hr class=\"resource-divider\" />\n </section>\n\n @if (hasValidDemoLinks) {\n <section class=\"resource-book-section\">\n <div class=\"container\">\n <p class=\"resource-contact\">\n Any questions, get in touch <a href=\"mailto:{{ company_email }}\">here</a>,\n <a [href]=\"linkedInUrl\" target=\"_blank\">connect on LinkedIn</a>, or book a meeting below:\n </p>\n </div>\n <pw-book-a-demo [isBlog]=\"true\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-book-a-demo>\n <hr class=\"resource-divider\" />\n </section>\n }\n\n\n @if (blogPostTag?.tag_category_id) {\n <pw-resource-cards [tag]=\"blogPostTag\" [categoryId]=\"blogPostTag?.tag_category_id\" [resourceTitle]=\"blogPostTag?.title\" [isHeaderVisible]=\"true\" resourceLink=\"/resources/blogs\" [isRelated]=\"true\" [resourceTitle]=\"'Other resources you may be interested in:'\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-cards>\n }\n",
|
|
304
|
+
styles: ["textarea{font-size:1rem!important}.resource-body-section{background-color:#fff}.resource-body-section .container{padding:3rem 1.5rem 4rem!important;max-width:850px!important;margin:0 auto;text-align:left}.user-not-logged-in{background:#fafbfc;border:1px solid #e2e5ea;border-radius:8px;font-size:14px;font-weight:400;color:#5a6473;padding:1rem 1.5rem;box-shadow:none!important;margin-bottom:2rem!important}.user-not-logged-in a{color:#1a1d21!important;text-decoration:none;font-weight:600;transition:color .15s ease-out}.user-not-logged-in a:hover,.user-not-logged-in a:focus-visible{color:var(--first)!important}.user-not-logged-in a:focus-visible{outline:2px solid var(--first);outline-offset:2px;border-radius:2px}.resource-book-section{background:#fff;padding-top:4rem;padding-bottom:0}.resource-book-section .container{max-width:850px;margin:0 auto;padding:0 1.5rem!important;text-align:left}.resource-book-section .resource-contact{line-height:1.6;font-size:1rem;color:#3d4654}.resource-book-section .resource-contact a{text-decoration:underline;color:#1a1d21;margin:0 .2rem;transition:color .15s ease-out}.resource-book-section .resource-contact a:hover{color:var(--first)!important}.resource-offer-section{background:#fff;padding-top:1rem}.resource-offer-section .container{max-width:850px;margin:0 auto;padding:0 1.5rem;text-align:left}.resource-divider{border:0;border-top:1px solid #e2e5ea;margin:2rem auto;max-width:850px;height:0;background:none}::ng-deep .body-quill{border-width:0!important;max-width:850px;display:block;margin-left:auto;margin-right:auto}::ng-deep .p-textarea{border-radius:8px;border:1px solid #e2e5ea;font-size:1rem!important}.card{background-color:#fff;border-radius:12px}.comment-row{gap:1.5rem;padding-bottom:3rem;max-width:850px;display:block;margin-left:auto;margin-right:auto}.comment-label{font-size:14px!important;font-weight:600!important;letter-spacing:.04em;text-transform:uppercase;color:#5a6473}.response-row{max-width:850px;display:block;margin-left:auto;margin-right:auto;margin-top:2rem!important}@media(width<=768px){.resource-body-section .container{padding:2rem 1rem 3rem}.resource-book-section{padding-top:2rem!important}.resource-book-section .resource-contact{font-size:.9375rem!important}}\n"]
|
|
305
|
+
}]
|
|
306
|
+
}],
|
|
307
|
+
ctorParameters: () => [
|
|
308
|
+
{ type: ResourceService },
|
|
309
|
+
{ type: i0.Injector },
|
|
310
|
+
{ type: i2.DomSanitizer },
|
|
311
|
+
{ type: i3$1.TagService },
|
|
312
|
+
{ type: i3$1.AuthService },
|
|
313
|
+
{ type: i3$1.CustomToastService },
|
|
314
|
+
{ type: i0.ChangeDetectorRef }
|
|
315
|
+
]
|
|
316
|
+
});
|
|
317
|
+
var ResourcePostDetailsComponent = class ResourcePostDetailsComponent extends AppBaseComponent {
|
|
318
|
+
static {
|
|
319
|
+
this.CATEGORY_LABEL_KEYS = {
|
|
320
|
+
"Blog Posts": "Resource.Posts.Category.BlogPosts",
|
|
321
|
+
"Case Studies": "Resource.Posts.Category.CaseStudies",
|
|
322
|
+
Webinars: "Resource.Posts.Category.Webinars",
|
|
323
|
+
Videos: "Resource.Posts.Category.Videos",
|
|
324
|
+
Events: "Resource.Posts.Category.Events",
|
|
325
|
+
"White Papers": "Resource.Posts.Category.WhitePapers",
|
|
326
|
+
"Product Release Notes": "Resource.Posts.Category.ProductReleaseNotes"
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
static {
|
|
330
|
+
this.DEFAULT_CATEGORY_LABEL_KEY = "Resource.Posts.Category.Default";
|
|
331
|
+
}
|
|
332
|
+
constructor(resourceService, tagService, authService, titleService, meta, injector, sanitizer, cdr) {
|
|
333
|
+
super(injector);
|
|
334
|
+
this.resourceService = resourceService;
|
|
335
|
+
this.tagService = tagService;
|
|
336
|
+
this.authService = authService;
|
|
337
|
+
this.titleService = titleService;
|
|
338
|
+
this.meta = meta;
|
|
339
|
+
this.sanitizer = sanitizer;
|
|
340
|
+
this.cdr = cdr;
|
|
341
|
+
this.routers = ADMIN_ROUTERS;
|
|
342
|
+
this.postCategoryTags = [];
|
|
343
|
+
this.isLoaded = false;
|
|
344
|
+
}
|
|
345
|
+
ngOnInit() {
|
|
346
|
+
this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;
|
|
347
|
+
this.getUserSubscriptionId().subscribe((response) => {
|
|
348
|
+
this.subscriptionId = response;
|
|
349
|
+
this.cdr.markForCheck();
|
|
350
|
+
});
|
|
351
|
+
this.route.params.subscribe((params) => {
|
|
352
|
+
this.slug = params["slug"] ?? "";
|
|
353
|
+
this.getBlogItem(this.slug);
|
|
354
|
+
this.cdr.markForCheck();
|
|
355
|
+
});
|
|
356
|
+
this.authService.getToken$().subscribe((res) => {
|
|
357
|
+
this.userLoggedIn = !!res;
|
|
358
|
+
if (res) this.userService.getUserInfo().subscribe((data) => {
|
|
359
|
+
this.user = data;
|
|
360
|
+
this.hasBlogAccess = HelperService.checkBlogPermission(this.user);
|
|
361
|
+
this.cdr.markForCheck();
|
|
362
|
+
});
|
|
363
|
+
this.getPostTags();
|
|
364
|
+
this.cdr.markForCheck();
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
getPostTags() {
|
|
368
|
+
this.tagService.getTagsByType("post_categories", {}, this.subscriptionId || this.masterSubscriptionId).subscribe((response) => {
|
|
369
|
+
this.postCategoryTags = response.tags ?? [];
|
|
370
|
+
this.blogPostTag = this.postCategoryTags.find((tag) => tag.name === "Blog Posts");
|
|
371
|
+
if (this.post) this.setOpenGraphMetaTags();
|
|
372
|
+
this.cdr.markForCheck();
|
|
373
|
+
}).add(() => {
|
|
374
|
+
this.isLoaded = true;
|
|
375
|
+
this.cdr.markForCheck();
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
get postCategoryLabelKey() {
|
|
379
|
+
const categoryIds = new Set(this.postCategoryTags.map((t) => t.id));
|
|
380
|
+
const match = this.post?.tags?.find((t) => categoryIds.has(t.id));
|
|
381
|
+
return ResourcePostDetailsComponent.CATEGORY_LABEL_KEYS[match?.name] ?? ResourcePostDetailsComponent.DEFAULT_CATEGORY_LABEL_KEY;
|
|
382
|
+
}
|
|
383
|
+
getBlogItem(slug) {
|
|
384
|
+
this.resourceService.getPostBySlug(slug).subscribe((response) => {
|
|
385
|
+
let blogBody;
|
|
386
|
+
if (response?.body) blogBody = HelperService.sanitizeQuillBody(response.body, this.sanitizer);
|
|
387
|
+
this.post = {
|
|
388
|
+
...response,
|
|
389
|
+
body: blogBody
|
|
390
|
+
};
|
|
391
|
+
this.cdr.markForCheck();
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
setOpenGraphMetaTags() {
|
|
395
|
+
if (this.post.title) {
|
|
396
|
+
this.meta.updateTag({
|
|
397
|
+
property: "og:title",
|
|
398
|
+
content: this.post.title
|
|
399
|
+
});
|
|
400
|
+
this.meta.updateTag({
|
|
401
|
+
name: "twitter:title",
|
|
402
|
+
content: this.post.title
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
if (this.post.blurb) {
|
|
406
|
+
this.meta.updateTag({
|
|
407
|
+
property: "og:description",
|
|
408
|
+
content: this.post.blurb
|
|
409
|
+
});
|
|
410
|
+
this.meta.updateTag({
|
|
411
|
+
name: "twitter:description",
|
|
412
|
+
content: this.post.blurb
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
let imageUrl = null;
|
|
416
|
+
if (this.post?.picture?.url && !this.post.picture.url.includes("default-photo.jpg")) imageUrl = this.post.picture.url;
|
|
417
|
+
else if (this.blogPostTag?.image?.url && !this.blogPostTag.image.url.includes("no_image_uploaded_squared")) imageUrl = this.blogPostTag.image.url;
|
|
418
|
+
if (imageUrl) {
|
|
419
|
+
this.meta.updateTag({
|
|
420
|
+
property: "og:image",
|
|
421
|
+
content: imageUrl
|
|
422
|
+
});
|
|
423
|
+
this.meta.updateTag({
|
|
424
|
+
name: "twitter:image",
|
|
425
|
+
content: imageUrl
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
this.meta.updateTag({
|
|
429
|
+
property: "og:type",
|
|
430
|
+
content: "article"
|
|
431
|
+
});
|
|
432
|
+
this.meta.updateTag({
|
|
433
|
+
property: "og:url",
|
|
434
|
+
content: window.location.href
|
|
435
|
+
});
|
|
436
|
+
this.meta.updateTag({
|
|
437
|
+
property: "og:site_name",
|
|
438
|
+
content: "PosiWise"
|
|
439
|
+
});
|
|
440
|
+
this.meta.updateTag({
|
|
441
|
+
name: "twitter:card",
|
|
442
|
+
content: "summary_large_image"
|
|
443
|
+
});
|
|
444
|
+
this.meta.updateTag({
|
|
445
|
+
name: "twitter:site",
|
|
446
|
+
content: "@posiwise"
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
getImageUrl() {
|
|
450
|
+
if (this.post?.picture?.url && !this.post.picture.url.includes("default-photo.jpg")) return this.post.picture.url;
|
|
451
|
+
else if (this.blogPostTag?.image?.url && !this.blogPostTag.image.url.includes("no_image_uploaded_squared")) return this.blogPostTag.image.url;
|
|
452
|
+
return null;
|
|
453
|
+
}
|
|
454
|
+
static {
|
|
455
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
456
|
+
minVersion: "12.0.0",
|
|
457
|
+
version: "22.2.0",
|
|
458
|
+
ngImport: i0,
|
|
459
|
+
type: ResourcePostDetailsComponent,
|
|
460
|
+
deps: [
|
|
461
|
+
{ token: ResourceService },
|
|
462
|
+
{ token: i3$1.TagService },
|
|
463
|
+
{ token: i3$1.AuthService },
|
|
464
|
+
{ token: i2.Title },
|
|
465
|
+
{ token: i2.Meta },
|
|
466
|
+
{ token: i0.Injector },
|
|
467
|
+
{ token: i2.DomSanitizer },
|
|
468
|
+
{ token: i0.ChangeDetectorRef }
|
|
469
|
+
],
|
|
470
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
static {
|
|
474
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
475
|
+
minVersion: "17.0.0",
|
|
476
|
+
version: "22.2.0",
|
|
477
|
+
type: ResourcePostDetailsComponent,
|
|
478
|
+
isStandalone: false,
|
|
479
|
+
selector: "pw-resource-post-details",
|
|
480
|
+
usesInheritance: true,
|
|
481
|
+
ngImport: i0,
|
|
482
|
+
template: "<section class=\"resource-hero-section\">\n <div class=\"container d-flex flex-wrap\" [ngClass]=\"getImageUrl() ? 'container-top' : 'container-no-image'\">\n <div class=\"hero-left\">\n <p class=\"blog-label\">{{ postCategoryLabelKey | transloco }}</p>\n\n <h1 class=\"hero-title\">\n @if (post?.title) {\n <span [innerHTML]=\"post.title\"></span>\n } @else {\n \n }\n @if (userLoggedIn && hasBlogAccess) {\n <a\n class=\"ms-3 text-decoration-none\"\n pTooltip=\"Edit this post\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n aria-label=\"Edit this blog 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 }\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 @if (isLoaded) {\n <div class=\"hero-right\">\n @if (getImageUrl()) {\n <img\n [src]=\"getImageUrl()\"\n alt=\"Blog Post\"\n class=\"hero-image\"\n />\n } @else {\n <pw-no-data\n class=\"data-image\"\n [withImage]=\"true\"\n [message]=\"'Resource.Tag.NoImageMessage' | transloco\"\n [description]=\"'Resource.Tag.NoDataMessage' | transloco\"\n ></pw-no-data>\n }\n </div>\n }\n </div>\n</section>\n",
|
|
483
|
+
styles: [".container-top,.container-no-image{padding-top:6rem!important}.container{padding-bottom:2.5rem!important}.edit-icon{vertical-align:middle!important}.resource-hero-section{background:#fff;position:relative}.resource-hero-section .container{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap}.resource-hero-section .blog-label{font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#5a6473;margin-bottom:12px}.resource-hero-section .hero-title{font-size:48px;font-weight:500;line-height:1.15;letter-spacing:-.015em;color:#1a1d21!important;margin-bottom:24px}.resource-hero-section .hero-title span{color:inherit!important}.resource-hero-section .hero-title strong{font-weight:700}.resource-hero-section .hero-left{flex:1 1 480px;max-width:640px}.resource-hero-section .author-info{display:flex;align-items:center;gap:.75rem;max-width:100%;overflow:hidden}.resource-hero-section .author-info .author-img{width:40px;height:40px;border-radius:50%;object-fit:cover;background:#eef0f3;flex-shrink:0}.resource-hero-section .author-info .author-meta p{font-size:14px;font-weight:500;color:var(--text);margin-bottom:0!important}.resource-hero-section .author-info .author-meta .date{font-size:13px;font-weight:400;color:#7c8696}.resource-hero-section .hero-right{flex:0 0 400px;max-width:400px}.resource-hero-section .hero-right .hero-image{width:100%;height:auto;border-radius:12px;display:block}@media(width<=768px){.resource-hero-section .hero-title{font-size:32px;letter-spacing:-.01em}.resource-hero-section .hero-right{margin-top:1.5rem;text-align:center;width:100%}.resource-hero-section .hero-right .data-image{width:100%}.resource-hero-section .hero-right .hero-image{max-width:360px;width:100%}.resource-hero-section .author-info{flex-direction:row;justify-content:flex-start}}@media(width>=768px)and (width<=1200px){.resource-hero-section .hero-title{font-size:40px}.resource-hero-section .hero-right{width:40%}}@media(width<=768px){.container{padding:5rem 1.5rem 2rem!important}}\n"],
|
|
484
|
+
dependencies: [
|
|
485
|
+
{
|
|
486
|
+
kind: "directive",
|
|
487
|
+
type: i10.NgClass,
|
|
488
|
+
selector: "[ngClass]",
|
|
489
|
+
inputs: ["class", "ngClass"]
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
kind: "directive",
|
|
493
|
+
type: i6.RouterLink,
|
|
494
|
+
selector: "[routerLink]",
|
|
495
|
+
inputs: [
|
|
496
|
+
"target",
|
|
497
|
+
"queryParams",
|
|
498
|
+
"fragment",
|
|
499
|
+
"queryParamsHandling",
|
|
500
|
+
"state",
|
|
501
|
+
"info",
|
|
502
|
+
"relativeTo",
|
|
503
|
+
"preserveFragment",
|
|
504
|
+
"skipLocationChange",
|
|
505
|
+
"replaceUrl",
|
|
506
|
+
"browserUrl",
|
|
507
|
+
"routerLink"
|
|
508
|
+
]
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
kind: "directive",
|
|
512
|
+
type: i7$1.LazyImgDirective,
|
|
513
|
+
selector: "img"
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
kind: "component",
|
|
517
|
+
type: i7.NoDataComponent,
|
|
518
|
+
selector: "pw-no-data",
|
|
519
|
+
inputs: [
|
|
520
|
+
"message",
|
|
521
|
+
"description",
|
|
522
|
+
"withImage"
|
|
523
|
+
]
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
kind: "directive",
|
|
527
|
+
type: i8.Tooltip,
|
|
528
|
+
selector: "[pTooltip]",
|
|
529
|
+
inputs: [
|
|
530
|
+
"tooltipPosition",
|
|
531
|
+
"tooltipEvent",
|
|
532
|
+
"positionStyle",
|
|
533
|
+
"tooltipStyleClass",
|
|
534
|
+
"tooltipZIndex",
|
|
535
|
+
"escape",
|
|
536
|
+
"showDelay",
|
|
537
|
+
"hideDelay",
|
|
538
|
+
"life",
|
|
539
|
+
"positionTop",
|
|
540
|
+
"positionLeft",
|
|
541
|
+
"autoHide",
|
|
542
|
+
"fitContent",
|
|
543
|
+
"hideOnEscape",
|
|
544
|
+
"showOnEllipsis",
|
|
545
|
+
"pTooltip",
|
|
546
|
+
"tooltipDisabled",
|
|
547
|
+
"tooltipOptions",
|
|
548
|
+
"appendTo",
|
|
549
|
+
"pTooltipPT",
|
|
550
|
+
"pTooltipUnstyled"
|
|
551
|
+
]
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
kind: "pipe",
|
|
555
|
+
type: i9.DateFormatPipe,
|
|
556
|
+
name: "dateFormat"
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
kind: "pipe",
|
|
560
|
+
type: i11.TranslocoPipe,
|
|
561
|
+
name: "transloco"
|
|
562
|
+
}
|
|
563
|
+
],
|
|
564
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
569
|
+
minVersion: "12.0.0",
|
|
570
|
+
version: "22.2.0",
|
|
571
|
+
ngImport: i0,
|
|
572
|
+
type: ResourcePostDetailsComponent,
|
|
573
|
+
decorators: [{
|
|
574
|
+
type: Component,
|
|
575
|
+
args: [{
|
|
576
|
+
selector: "pw-resource-post-details",
|
|
577
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
578
|
+
standalone: false,
|
|
579
|
+
template: "<section class=\"resource-hero-section\">\n <div class=\"container d-flex flex-wrap\" [ngClass]=\"getImageUrl() ? 'container-top' : 'container-no-image'\">\n <div class=\"hero-left\">\n <p class=\"blog-label\">{{ postCategoryLabelKey | transloco }}</p>\n\n <h1 class=\"hero-title\">\n @if (post?.title) {\n <span [innerHTML]=\"post.title\"></span>\n } @else {\n \n }\n @if (userLoggedIn && hasBlogAccess) {\n <a\n class=\"ms-3 text-decoration-none\"\n pTooltip=\"Edit this post\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n aria-label=\"Edit this blog 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 }\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 @if (isLoaded) {\n <div class=\"hero-right\">\n @if (getImageUrl()) {\n <img\n [src]=\"getImageUrl()\"\n alt=\"Blog Post\"\n class=\"hero-image\"\n />\n } @else {\n <pw-no-data\n class=\"data-image\"\n [withImage]=\"true\"\n [message]=\"'Resource.Tag.NoImageMessage' | transloco\"\n [description]=\"'Resource.Tag.NoDataMessage' | transloco\"\n ></pw-no-data>\n }\n </div>\n }\n </div>\n</section>\n",
|
|
580
|
+
styles: [".container-top,.container-no-image{padding-top:6rem!important}.container{padding-bottom:2.5rem!important}.edit-icon{vertical-align:middle!important}.resource-hero-section{background:#fff;position:relative}.resource-hero-section .container{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap}.resource-hero-section .blog-label{font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#5a6473;margin-bottom:12px}.resource-hero-section .hero-title{font-size:48px;font-weight:500;line-height:1.15;letter-spacing:-.015em;color:#1a1d21!important;margin-bottom:24px}.resource-hero-section .hero-title span{color:inherit!important}.resource-hero-section .hero-title strong{font-weight:700}.resource-hero-section .hero-left{flex:1 1 480px;max-width:640px}.resource-hero-section .author-info{display:flex;align-items:center;gap:.75rem;max-width:100%;overflow:hidden}.resource-hero-section .author-info .author-img{width:40px;height:40px;border-radius:50%;object-fit:cover;background:#eef0f3;flex-shrink:0}.resource-hero-section .author-info .author-meta p{font-size:14px;font-weight:500;color:var(--text);margin-bottom:0!important}.resource-hero-section .author-info .author-meta .date{font-size:13px;font-weight:400;color:#7c8696}.resource-hero-section .hero-right{flex:0 0 400px;max-width:400px}.resource-hero-section .hero-right .hero-image{width:100%;height:auto;border-radius:12px;display:block}@media(width<=768px){.resource-hero-section .hero-title{font-size:32px;letter-spacing:-.01em}.resource-hero-section .hero-right{margin-top:1.5rem;text-align:center;width:100%}.resource-hero-section .hero-right .data-image{width:100%}.resource-hero-section .hero-right .hero-image{max-width:360px;width:100%}.resource-hero-section .author-info{flex-direction:row;justify-content:flex-start}}@media(width>=768px)and (width<=1200px){.resource-hero-section .hero-title{font-size:40px}.resource-hero-section .hero-right{width:40%}}@media(width<=768px){.container{padding:5rem 1.5rem 2rem!important}}\n"]
|
|
581
|
+
}]
|
|
582
|
+
}],
|
|
583
|
+
ctorParameters: () => [
|
|
584
|
+
{ type: ResourceService },
|
|
585
|
+
{ type: i3$1.TagService },
|
|
586
|
+
{ type: i3$1.AuthService },
|
|
587
|
+
{ type: i2.Title },
|
|
588
|
+
{ type: i2.Meta },
|
|
589
|
+
{ type: i0.Injector },
|
|
590
|
+
{ type: i2.DomSanitizer },
|
|
591
|
+
{ type: i0.ChangeDetectorRef }
|
|
592
|
+
]
|
|
593
|
+
});
|
|
594
|
+
var ResourcePostComponent = class ResourcePostComponent extends AppBaseComponent {
|
|
595
|
+
constructor(titleService, authService, cdr, injector) {
|
|
596
|
+
super(injector);
|
|
597
|
+
this.titleService = titleService;
|
|
598
|
+
this.authService = authService;
|
|
599
|
+
this.cdr = cdr;
|
|
600
|
+
this.userLoggedIn = void 0;
|
|
601
|
+
}
|
|
602
|
+
ngOnInit() {
|
|
603
|
+
this.route.params.subscribe((params) => {
|
|
604
|
+
this.slug = params["slug"] ?? "Default";
|
|
605
|
+
this.cdr.markForCheck();
|
|
606
|
+
});
|
|
607
|
+
this.authService.getToken$().subscribe((res) => {
|
|
608
|
+
this.userLoggedIn = !!res;
|
|
609
|
+
if (this.userLoggedIn) this.userService.getUserInfo().subscribe((data) => {
|
|
610
|
+
this.user = data;
|
|
611
|
+
this.cdr.markForCheck();
|
|
612
|
+
});
|
|
613
|
+
this.cdr.markForCheck();
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
static {
|
|
617
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
618
|
+
minVersion: "12.0.0",
|
|
619
|
+
version: "22.2.0",
|
|
620
|
+
ngImport: i0,
|
|
621
|
+
type: ResourcePostComponent,
|
|
622
|
+
deps: [
|
|
623
|
+
{ token: i2.Title },
|
|
624
|
+
{ token: i3$1.AuthService },
|
|
625
|
+
{ token: i0.ChangeDetectorRef },
|
|
626
|
+
{ token: i0.Injector }
|
|
627
|
+
],
|
|
628
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
static {
|
|
632
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
633
|
+
minVersion: "14.0.0",
|
|
634
|
+
version: "22.2.0",
|
|
635
|
+
type: ResourcePostComponent,
|
|
636
|
+
isStandalone: false,
|
|
637
|
+
selector: "app-resource-post",
|
|
638
|
+
usesInheritance: true,
|
|
639
|
+
ngImport: i0,
|
|
640
|
+
template: "<pw-resource-header [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-header>\n<pw-resource-post-details></pw-resource-post-details>\n<pw-related-resources></pw-related-resources>\n<pw-trial-4-contact-us [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-trial-4-contact-us>",
|
|
641
|
+
styles: ["::ng-deep .resource-header .navbar-nav .nav-item .nav-link{color:#000!important}\n"],
|
|
642
|
+
dependencies: [
|
|
643
|
+
{
|
|
644
|
+
kind: "component",
|
|
645
|
+
type: i3.Trial4ContactUsComponent,
|
|
646
|
+
selector: "pw-trial-4-contact-us",
|
|
647
|
+
inputs: [
|
|
648
|
+
"subscriptionId",
|
|
649
|
+
"sourceId",
|
|
650
|
+
"masterSubscriptionId",
|
|
651
|
+
"experimentName",
|
|
652
|
+
"microserviceName",
|
|
653
|
+
"shardName",
|
|
654
|
+
"user",
|
|
655
|
+
"userLoggedIn"
|
|
656
|
+
]
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
kind: "component",
|
|
660
|
+
type: i4.ResourceHeaderComponent,
|
|
661
|
+
selector: "pw-resource-header",
|
|
662
|
+
inputs: ["user", "userLoggedIn"]
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
kind: "component",
|
|
666
|
+
type: ResourcePostDetailsComponent,
|
|
667
|
+
selector: "pw-resource-post-details"
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
kind: "component",
|
|
671
|
+
type: RelatedResourcesComponent,
|
|
672
|
+
selector: "pw-related-resources"
|
|
673
|
+
}
|
|
674
|
+
],
|
|
675
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
};
|
|
679
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
680
|
+
minVersion: "12.0.0",
|
|
681
|
+
version: "22.2.0",
|
|
682
|
+
ngImport: i0,
|
|
683
|
+
type: ResourcePostComponent,
|
|
684
|
+
decorators: [{
|
|
685
|
+
type: Component,
|
|
686
|
+
args: [{
|
|
687
|
+
selector: "app-resource-post",
|
|
688
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
689
|
+
standalone: false,
|
|
690
|
+
template: "<pw-resource-header [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-header>\n<pw-resource-post-details></pw-resource-post-details>\n<pw-related-resources></pw-related-resources>\n<pw-trial-4-contact-us [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-trial-4-contact-us>",
|
|
691
|
+
styles: ["::ng-deep .resource-header .navbar-nav .nav-item .nav-link{color:#000!important}\n"]
|
|
692
|
+
}]
|
|
693
|
+
}],
|
|
694
|
+
ctorParameters: () => [
|
|
695
|
+
{ type: i2.Title },
|
|
696
|
+
{ type: i3$1.AuthService },
|
|
697
|
+
{ type: i0.ChangeDetectorRef },
|
|
698
|
+
{ type: i0.Injector }
|
|
699
|
+
]
|
|
700
|
+
});
|
|
701
|
+
const routes = [{
|
|
702
|
+
path: "",
|
|
703
|
+
component: ResourcePostComponent,
|
|
704
|
+
data: {
|
|
705
|
+
title: "Resources - Post",
|
|
706
|
+
permission: "Pages.Blog",
|
|
707
|
+
preload: false
|
|
708
|
+
}
|
|
709
|
+
}];
|
|
710
|
+
var ResourcePostModule = class ResourcePostModule {
|
|
711
|
+
static {
|
|
712
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
713
|
+
minVersion: "12.0.0",
|
|
714
|
+
version: "22.2.0",
|
|
715
|
+
ngImport: i0,
|
|
716
|
+
type: ResourcePostModule,
|
|
717
|
+
deps: [],
|
|
718
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
static {
|
|
722
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
723
|
+
minVersion: "14.0.0",
|
|
724
|
+
version: "22.2.0",
|
|
725
|
+
ngImport: i0,
|
|
726
|
+
type: ResourcePostModule,
|
|
727
|
+
declarations: [
|
|
728
|
+
ResourcePostComponent,
|
|
729
|
+
ResourcePostDetailsComponent,
|
|
730
|
+
RelatedResourcesComponent
|
|
731
|
+
],
|
|
732
|
+
imports: [
|
|
733
|
+
ResourceSharedModule,
|
|
734
|
+
TooltipModule,
|
|
735
|
+
i6.RouterModule
|
|
736
|
+
]
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
static {
|
|
740
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
741
|
+
minVersion: "12.0.0",
|
|
742
|
+
version: "22.2.0",
|
|
743
|
+
ngImport: i0,
|
|
744
|
+
type: ResourcePostModule,
|
|
745
|
+
imports: [
|
|
746
|
+
ResourceSharedModule,
|
|
747
|
+
TooltipModule,
|
|
748
|
+
RouterModule.forChild(routes)
|
|
749
|
+
]
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
};
|
|
753
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
754
|
+
minVersion: "12.0.0",
|
|
755
|
+
version: "22.2.0",
|
|
756
|
+
ngImport: i0,
|
|
757
|
+
type: ResourcePostModule,
|
|
758
|
+
decorators: [{
|
|
759
|
+
type: NgModule,
|
|
760
|
+
args: [{
|
|
761
|
+
declarations: [
|
|
762
|
+
ResourcePostComponent,
|
|
763
|
+
ResourcePostDetailsComponent,
|
|
764
|
+
RelatedResourcesComponent
|
|
765
|
+
],
|
|
766
|
+
imports: [
|
|
767
|
+
ResourceSharedModule,
|
|
768
|
+
TooltipModule,
|
|
769
|
+
RouterModule.forChild(routes)
|
|
770
|
+
],
|
|
771
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
772
|
+
}]
|
|
773
|
+
}]
|
|
774
|
+
});
|
|
775
|
+
export { ResourcePostModule };
|
|
776
|
+
|
|
777
|
+
//# sourceMappingURL=posiwise-resource-module-resource-post.module-BJnApbtU.mjs.map
|