@posiwise/resource-module 0.0.191 → 0.0.192
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-XPaC2uLL.mjs → posiwise-resource-module-base-top-banner.component-CIvGr9du.mjs} +5 -5
- package/fesm2022/{posiwise-resource-module-base-top-banner.component-XPaC2uLL.mjs.map → posiwise-resource-module-base-top-banner.component-CIvGr9du.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-posiwise-resource-module-C-hPiIlg.mjs → posiwise-resource-module-posiwise-resource-module-QIX6Y1Ol.mjs} +78 -78
- package/fesm2022/{posiwise-resource-module-posiwise-resource-module-C-hPiIlg.mjs.map → posiwise-resource-module-posiwise-resource-module-QIX6Y1Ol.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-blogs.module-CeRB6E1r.mjs → posiwise-resource-module-resource-blogs.module-DQhQ9YWu.mjs} +13 -13
- package/fesm2022/{posiwise-resource-module-resource-blogs.module-CeRB6E1r.mjs.map → posiwise-resource-module-resource-blogs.module-DQhQ9YWu.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-case-studies.module-DL3JRVp5.mjs → posiwise-resource-module-resource-case-studies.module-D7ALgcL_.mjs} +9 -9
- package/fesm2022/{posiwise-resource-module-resource-case-studies.module-DL3JRVp5.mjs.map → posiwise-resource-module-resource-case-studies.module-D7ALgcL_.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-events.module-BBHi-JUF.mjs → posiwise-resource-module-resource-events.module-UnO7wcUI.mjs} +12 -12
- package/fesm2022/{posiwise-resource-module-resource-events.module-BBHi-JUF.mjs.map → posiwise-resource-module-resource-events.module-UnO7wcUI.mjs.map} +1 -1
- package/fesm2022/posiwise-resource-module-resource-hub.module-UBFt3bki.mjs +244 -0
- package/fesm2022/{posiwise-resource-module-resource-hub.module-mSjREp_s.mjs.map → posiwise-resource-module-resource-hub.module-UBFt3bki.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-integrations.module-BYM4LlIm.mjs → posiwise-resource-module-resource-integrations.module-D7idZK_y.mjs} +13 -13
- package/fesm2022/{posiwise-resource-module-resource-integrations.module-BYM4LlIm.mjs.map → posiwise-resource-module-resource-integrations.module-D7idZK_y.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-post.module-BhnGYNxN.mjs → posiwise-resource-module-resource-post.module-CR9sCgeR.mjs} +15 -15
- package/fesm2022/{posiwise-resource-module-resource-post.module-BhnGYNxN.mjs.map → posiwise-resource-module-resource-post.module-CR9sCgeR.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-release-notes.module-fyZp_sFo.mjs → posiwise-resource-module-resource-release-notes.module-DxRiC1Q4.mjs} +13 -13
- package/fesm2022/{posiwise-resource-module-resource-release-notes.module-fyZp_sFo.mjs.map → posiwise-resource-module-resource-release-notes.module-DxRiC1Q4.mjs.map} +1 -1
- package/fesm2022/posiwise-resource-module-resource-root.module-PmW6b6c0.mjs +398 -0
- package/fesm2022/{posiwise-resource-module-resource-root.module-D9-M2alB.mjs.map → posiwise-resource-module-resource-root.module-PmW6b6c0.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-videos.module-mBQ3w0lv.mjs → posiwise-resource-module-resource-videos.module-VJAmMFn-.mjs} +13 -13
- package/fesm2022/{posiwise-resource-module-resource-videos.module-mBQ3w0lv.mjs.map → posiwise-resource-module-resource-videos.module-VJAmMFn-.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-white-papers.module-IGdisYOV.mjs → posiwise-resource-module-resource-white-papers.module-jsS-ik0o.mjs} +13 -13
- package/fesm2022/{posiwise-resource-module-resource-white-papers.module-IGdisYOV.mjs.map → posiwise-resource-module-resource-white-papers.module-jsS-ik0o.mjs.map} +1 -1
- package/fesm2022/posiwise-resource-module.mjs +1 -1
- package/package.json +3 -3
- package/fesm2022/posiwise-resource-module-resource-hub.module-mSjREp_s.mjs +0 -244
- package/fesm2022/posiwise-resource-module-resource-root.module-D9-M2alB.mjs +0 -398
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Input, Output, ChangeDetectionStrategy, Component, ViewChild, CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/router';
|
|
4
|
+
import { RouterModule } from '@angular/router';
|
|
5
|
+
import { AppBaseComponent } from '@posiwise/app-base-component';
|
|
6
|
+
import * as i2 from '@posiwise/common-services';
|
|
7
|
+
import { HelperService } from '@posiwise/helper-service';
|
|
8
|
+
import * as i3 from '@angular/common';
|
|
9
|
+
import { CommonModule } from '@angular/common';
|
|
10
|
+
import { R as ResourceVideoCardComponent, U as UpcomingEventCardComponent, a as ResourceCardComponent, C as CaseStudyCardComponent, b as ResourceNoteCardComponent, c as ResourceVaultComponent, d as ResourceCardsModule } from './posiwise-resource-module-posiwise-resource-module-QIX6Y1Ol.mjs';
|
|
11
|
+
import * as i4 from '@posiwise/resource-contact-us';
|
|
12
|
+
import * as i8 from '@posiwise/utils';
|
|
13
|
+
import * as i3$1 from '@angular/platform-browser';
|
|
14
|
+
import * as i2$2 from '@posiwise/admin-module-utils';
|
|
15
|
+
import * as i2$1 from '@ng-bootstrap/ng-bootstrap';
|
|
16
|
+
import * as i5 from '@angular/forms';
|
|
17
|
+
import { FormsModule } from '@angular/forms';
|
|
18
|
+
import * as i5$1 from '@posiwise/directives';
|
|
19
|
+
import * as i6 from '@posiwise/shared-components';
|
|
20
|
+
import { ResourceSharedComponentsModule } from '@posiwise/shared-components';
|
|
21
|
+
import * as i10 from '@jsverse/transloco';
|
|
22
|
+
import { TranslocoModule } from '@jsverse/transloco';
|
|
23
|
+
import { CoreTranslocoModule } from '@posiwise/core-transloco';
|
|
24
|
+
|
|
25
|
+
class ResourceTagComponent extends AppBaseComponent {
|
|
26
|
+
constructor(tagService, cdr, injector) {
|
|
27
|
+
super(injector);
|
|
28
|
+
this.tagService = tagService;
|
|
29
|
+
this.cdr = cdr;
|
|
30
|
+
this.tagsLoaded = new EventEmitter();
|
|
31
|
+
this.tagSelected = new EventEmitter();
|
|
32
|
+
this.tags = [];
|
|
33
|
+
this.loading = true;
|
|
34
|
+
this.loaded = false;
|
|
35
|
+
this.selectedTag = null;
|
|
36
|
+
this.canEditResourcesValue = false;
|
|
37
|
+
}
|
|
38
|
+
ngOnInit() {
|
|
39
|
+
this.localStorage.getItem$('product').subscribe(product => {
|
|
40
|
+
const data = product ? JSON.parse(product) : null;
|
|
41
|
+
this.subscriptionId =
|
|
42
|
+
data?.subscriptionId ?? this.appConfig.master_subscription.subscription_id;
|
|
43
|
+
this.cdr.markForCheck();
|
|
44
|
+
});
|
|
45
|
+
this.getTags();
|
|
46
|
+
}
|
|
47
|
+
ngOnChanges(changes) {
|
|
48
|
+
if (changes['user'] || changes['userLoggedIn']) {
|
|
49
|
+
if (this.userLoggedIn && this.user) {
|
|
50
|
+
this.updateCanEditResourcesValue();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
navigateToTagList() {
|
|
55
|
+
HelperService.navigateToTagList();
|
|
56
|
+
}
|
|
57
|
+
selectTag(tag) {
|
|
58
|
+
this.selectedTag = tag;
|
|
59
|
+
this.tagSelected.emit(tag);
|
|
60
|
+
}
|
|
61
|
+
getTags() {
|
|
62
|
+
this.loading = true;
|
|
63
|
+
this.tagService
|
|
64
|
+
.getTagsByType('post_categories', {}, this.getEffectiveSubscriptionId())
|
|
65
|
+
.subscribe(res => {
|
|
66
|
+
this.tags = (res?.tags ?? [])
|
|
67
|
+
.filter(tag => tag.visible_in_resources)
|
|
68
|
+
.map(tag => ({
|
|
69
|
+
...tag
|
|
70
|
+
}));
|
|
71
|
+
this.tagsLoaded.emit(this.tags);
|
|
72
|
+
this.cdr.markForCheck();
|
|
73
|
+
})
|
|
74
|
+
.add(() => {
|
|
75
|
+
this.loading = false;
|
|
76
|
+
this.loaded = true;
|
|
77
|
+
this.cdr.markForCheck();
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/** Helper method to get effective subscription ID */
|
|
81
|
+
getEffectiveSubscriptionId() {
|
|
82
|
+
return HelperService.getEffectiveSubscriptionId(this.user, this.subscriptionId, this.appConfig.master_subscription.subscription_id);
|
|
83
|
+
}
|
|
84
|
+
updateCanEditResourcesValue() {
|
|
85
|
+
this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
|
|
86
|
+
}
|
|
87
|
+
canEditResources() {
|
|
88
|
+
return this.canEditResourcesValue;
|
|
89
|
+
}
|
|
90
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ResourceTagComponent, deps: [{ token: i2.TagService }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
91
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: ResourceTagComponent, isStandalone: false, selector: "pw-resource-tags", inputs: { user: "user", userLoggedIn: "userLoggedIn" }, outputs: { tagsLoaded: "tagsLoaded", tagSelected: "tagSelected" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (loading) {\n <!-- Skeleton \u2014 holds same space as real content to prevent CLS -->\n <section class=\"tag-section py-5 bg-white\">\n <div class=\"container\">\n <div class=\"row g-4\">\n @for (i of [1, 2, 3, 4, 5, 6, 7, 8]; track i) {\n <div class=\"col-md-3 col-sm-6 col-6 mb-1 mb-lg-4\">\n <div class=\"resource-card d-flex align-items-center p-3 placeholder-wave\">\n <span class=\"placeholder col-8 rounded\" style=\"height:1rem\"></span>\n </div>\n </div>\n }\n </div>\n </div>\n </section>\n} @else if (tags?.length) {\n <section class=\"tag-section py-5 bg-white\">\n <div class=\"container\">\n @if (userLoggedIn && user?.auth?.granted['Pages.Admin']) {\n <i\n class=\"fa fa-edit in-page-edit-icon cursor-pointer text-black d-flex justify-content-end mb-3\"\n (click)=\"navigateToTagList()\"\n (keydown.enter)=\"navigateToTagList()\"\n (keydown.space)=\"navigateToTagList()\"\n title=\"Edit Tags\"></i>\n }\n <div class=\"row g-4\">\n @for (tag of tags; track tag) {\n <div class=\"col-md-3 col-sm-6 col-6 mb-1 mb-lg-4\">\n <div (click)=\"selectTag(tag)\" (keydown.enter)=\"selectTag(tag)\" class=\"resource-card d-flex align-items-center p-3\" [ngClass]=\"{ 'selected': selectedTag?.name === tag.name }\">\n @if (tag?.icon_name) {\n <i class=\"fa\" [ngClass]=\"tag.icon_name + ' resource-icon me-3'\"></i>\n }\n <span class=\"resource-text\">{{ tag.name }}</span>\n </div>\n </div>\n }\n </div>\n </div>\n </section>\n}\n", styles: [".tag-section{padding-top:4.5rem!important}.resource-card{border:2px dashed #d4d4d4;border-radius:16px;background-color:#fff;transition:box-shadow .3s ease;cursor:pointer;min-height:95px;padding:1.5rem!important}.resource-card:hover{box-shadow:0 0 30px #00000014}.selected{border:4px dashed #d4d4d4;border-color:var(--first)!important}.resource-icon{font-size:2.5rem;color:var(--first)}.resource-text{font-size:1.4rem;font-weight:500;color:var(--text-color, currentColor);line-height:2rem}@media(width<=576px){.resource-card{padding:.3rem 1rem!important;height:100%;min-height:75px}.tag-section{padding-bottom:4.5rem!important}.resource-icon{font-size:2rem!important}.resource-text{font-size:1.2rem!important;line-height:1.6rem!important;word-break:break-word;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto}}\n", "@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--public-btn-radius: 24px}.hub-page{display:block}.hub-page section,.hub-page header,.hub-page footer,.hub-page nav,.hub-page ul,.hub-page li,.hub-page article,.hub-page aside{float:none;clear:both}.hub-page ul,.hub-page li{list-style:none}.hub-page .hub-hero{background:linear-gradient(180deg,#061f2a 0%,#042230 60%,var(--sidebar_bg, #00303f) 100%);color:#f5f7fa;overflow:hidden;padding:88px 24px 96px;position:relative}.hub-page .hub-hero h1.hub-hero__title{color:#f5f7fa!important}.hub-page .hub-hero p.hub-hero__eyebrow{color:color-mix(in srgb,var(--first) 70%,white)!important}.hub-page .hub-hero p.hub-hero__subtitle{color:#aab3c0!important}.hub-page .hub-hero__glow{background:radial-gradient(60% 80% at 78% 18%,color-mix(in srgb,var(--first) 38%,transparent),transparent 70%),radial-gradient(40% 60% at 12% 100%,color-mix(in srgb,var(--second, #36c283) 22%,transparent),transparent 70%);inset:0;pointer-events:none;position:absolute}.hub-page .hub-hero__grid{background-image:linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px);background-size:56px 56px;inset:0;opacity:.7;pointer-events:none;position:absolute;-webkit-mask-image:radial-gradient(120% 80% at 50% 30%,#000 30%,transparent 75%);mask-image:radial-gradient(120% 80% at 50% 30%,#000 30%,transparent 75%)}.hub-page .hub-hero__inner{margin:0 auto;max-width:1140px;position:relative}.hub-page .hub-hero__eyebrow{color:color-mix(in srgb,var(--first) 70%,white);font-size:12px;font-weight:600;letter-spacing:.18em;margin:0 0 18px}.hub-page .hub-hero__title{color:#f5f7fa;font-size:64px;font-weight:700;letter-spacing:-.02em;line-height:1.05;margin:0 0 18px;max-width:880px}.hub-page .hub-hero__subtitle{color:#aab3c0;font-size:18px;line-height:1.6;margin:0 0 36px;max-width:620px}.hub-page .hub-hero__br{display:inline}.hub-page .hub-hero__search{align-items:center;display:flex;gap:10px;max-width:560px}.hub-page .hub-hero__search .p-iconfield{flex:1}.hub-page .hub-hero__search .p-iconfield input.hub-hero__search-input{background:#ffffff12;border:1px solid rgba(255,255,255,.14);border-radius:10px;color:#f5f7fa;font-size:15px;height:48px;padding-left:42px;width:100%;transition:border-color .18s cubic-bezier(.2,.7,.2,1),background .18s cubic-bezier(.2,.7,.2,1),box-shadow .18s cubic-bezier(.2,.7,.2,1)}.hub-page .hub-hero__search .p-iconfield input.hub-hero__search-input::placeholder{color:#ffffff73}.hub-page .hub-hero__search .p-iconfield input.hub-hero__search-input:focus,.hub-page .hub-hero__search .p-iconfield input.hub-hero__search-input:focus-visible{background:#ffffff1f;border-color:#ffffff59;box-shadow:0 0 0 4px color-mix(in srgb,var(--first) 24%,transparent);outline:0}.hub-page .hub-hero__search .p-inputicon i{color:#ffffff8c}.hub-page .hub-hero__edit{align-items:center;background:#ffffff14;border:1px solid rgba(255,255,255,.14);border-radius:10px;color:#f5f7fa;cursor:pointer;display:inline-flex;height:48px;justify-content:center;transition:background .18s cubic-bezier(.2,.7,.2,1);width:48px}.hub-page .hub-hero__edit:hover{background:#ffffff29}.hub-shell{background:#fff;margin:0 auto;max-width:1188px;padding:40px 24px 96px;position:relative;width:100%}.hub-shell header,.hub-shell footer{float:none;clear:both}.hub-chips{border-bottom:1px solid #e7eaef;display:flex;flex-wrap:wrap;gap:4px;margin:0 0 32px;padding:0 0 12px}.hub-chip{align-items:center;background:transparent;border:0;border-radius:8px;color:#5a6473;cursor:pointer;display:inline-flex;font-size:14px;font-weight:500;gap:8px;line-height:1.2;padding:10px 14px;position:relative;transition:color .18s cubic-bezier(.2,.7,.2,1),background .18s cubic-bezier(.2,.7,.2,1)}.hub-chip__dot{background:#8a93a3;border-radius:9999px;flex-shrink:0;height:8px;transition:transform .18s cubic-bezier(.2,.7,.2,1),background .18s cubic-bezier(.2,.7,.2,1);width:8px}.hub-chip__dot[data-cat=\"0\"]{background:#2c7be5}.hub-chip__dot[data-cat=\"1\"]{background:#1f9d57}.hub-chip__dot[data-cat=\"2\"]{background:#b7791f}.hub-chip__dot[data-cat=\"3\"]{background:#b94c8c}.hub-chip__dot[data-cat=\"4\"]{background:#6a4ec2}.hub-chip__dot[data-cat=\"5\"]{background:#0aa39a}.hub-chip--all .hub-chip__dot{background:var(--first)}.hub-chip__count{background:#f7f8fa;border-radius:9999px;color:#8a93a3;font-size:11px;font-weight:600;padding:2px 8px;transition:background .18s cubic-bezier(.2,.7,.2,1),color .18s cubic-bezier(.2,.7,.2,1)}.hub-chip:hover{background:#f7f8fa;color:#0b0d10}.hub-chip:hover .hub-chip__dot{transform:scale(1.2)}.hub-chip:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--first) 22%,transparent);outline:0}.hub-chip--selected{color:#0b0d10}.hub-chip--selected:after{background:var(--first);border-radius:1px 1px 0 0;bottom:-13px;content:\"\";height:2px;left:14px;position:absolute;right:14px}.hub-chip--selected .hub-chip__count{background:color-mix(in srgb,var(--first) 14%,white);color:var(--first)}.hub-loading{padding:64px 0;text-align:center}.hub-grid{display:grid;gap:28px 24px;grid-template-columns:repeat(3,minmax(0,1fr));list-style:none;margin:0;padding:0}.hub-post{--reveal-delay: 0ms;animation:hubReveal .42s .18s cubic-bezier(.2,.7,.2,1) both;animation-delay:var(--reveal-delay);background:#fff;border:1px solid #e7eaef;border-radius:14px;display:flex;flex-direction:column;overflow:hidden;position:relative;transition:border-color .18s cubic-bezier(.2,.7,.2,1),transform .18s cubic-bezier(.2,.7,.2,1),box-shadow .18s cubic-bezier(.2,.7,.2,1)}.hub-post>pw-resource-edit-card-lazy{display:contents}.hub-post:hover{border-color:#cfd4dc;box-shadow:0 12px 28px #0b0d1014;transform:translateY(-2px)}.hub-post:hover .hub-post__title{color:var(--first)!important}.hub-post:hover .hub-post__media{transform:scale(1.02)}.hub-post__media{aspect-ratio:16/9;align-items:center;background:linear-gradient(135deg,#f7f8fa,#eef0f3);display:flex;justify-content:center;overflow:hidden;position:relative;text-decoration:none;transition:transform .18s cubic-bezier(.2,.7,.2,1)}.hub-post__media[data-cat=\"0\"]{--accent: #2c7be5}.hub-post__media[data-cat=\"1\"]{--accent: #1f9d57}.hub-post__media[data-cat=\"2\"]{--accent: #b7791f}.hub-post__media[data-cat=\"3\"]{--accent: #b94c8c}.hub-post__media[data-cat=\"4\"]{--accent: #6a4ec2}.hub-post__media[data-cat=\"5\"]{--accent: #0aa39a}.hub-post__media:before{background:linear-gradient(135deg,var(--accent, #2c7be5) 0%,color-mix(in srgb,var(--accent, #2c7be5) 30%,#0b0d10) 100%);content:\"\";inset:0;position:absolute}.hub-post__media:after{background-image:radial-gradient(1px 1px at 20% 30%,rgba(255,255,255,.18),transparent 60%),radial-gradient(1px 1px at 70% 60%,rgba(255,255,255,.14),transparent 60%),radial-gradient(1px 1px at 40% 80%,rgba(255,255,255,.12),transparent 60%);background-size:200px 200px,180px 180px,220px 220px;content:\"\";inset:0;mix-blend-mode:overlay;opacity:.6;position:absolute}.hub-post__image{display:block;height:100%;object-fit:cover;position:relative;width:100%;z-index:2}.hub-post__glyph{color:#ffffffeb;font-size:76px;font-weight:700;letter-spacing:-.04em;position:relative;z-index:2}.hub-post__icon{color:#ffffffc7;font-size:18px;position:absolute;right:16px;top:16px;z-index:2}.hub-post__body{display:flex;flex:1;flex-direction:column;gap:10px;padding:22px 22px 20px}.hub-post__eyebrow{align-items:center;color:#5a6473;display:flex;font-size:11px;font-weight:600;gap:6px;letter-spacing:.1em;margin:0;text-transform:uppercase}.hub-post__eyebrow[data-cat=\"0\"]{--cat: #2c7be5}.hub-post__eyebrow[data-cat=\"1\"]{--cat: #1f9d57}.hub-post__eyebrow[data-cat=\"2\"]{--cat: #b7791f}.hub-post__eyebrow[data-cat=\"3\"]{--cat: #b94c8c}.hub-post__eyebrow[data-cat=\"4\"]{--cat: #6a4ec2}.hub-post__eyebrow[data-cat=\"5\"]{--cat: #0aa39a}.hub-post__eyebrow .hub-post__dot{background:var(--cat, #8a93a3);border-radius:9999px;flex-shrink:0;height:6px;width:6px}.hub-post__title{color:#0b0d10!important;cursor:pointer;font-size:19px!important;font-weight:600;letter-spacing:-.01em;line-height:1.35;margin:0;transition:color .18s cubic-bezier(.2,.7,.2,1);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;padding:0!important}.hub-post__excerpt{color:#5a6473;font-size:14px;line-height:1.55;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.hub-post__foot{align-items:center;border-top:1px solid #e7eaef;display:flex;flex-wrap:nowrap;gap:10px;margin-top:auto;padding-top:14px}.hub-post__avatar{background:#f7f8fa;border-radius:9999px;flex:0 0 28px;height:28px;object-fit:cover;width:28px}.hub-post__avatar--text{align-items:center;background:color-mix(in srgb,var(--first) 14%,#f7f8fa);color:var(--first);display:inline-flex;font-size:11px;font-weight:700;justify-content:center}.hub-post__author-meta{display:flex;flex:1 1 auto;flex-direction:column;min-width:0;overflow:hidden}.hub-post__author-name{color:#0b0d10;font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hub-post__author-sub{color:#8a93a3;display:block;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hub-post__author-sub time,.hub-post__author-sub span{display:inline}.hub-post__sep{color:#cfd4dc;margin:0 4px}.hub-post__views{background:#f7f8fa;border-radius:9999px;color:#8a93a3;flex:0 0 auto;font-size:11px;font-weight:600;padding:4px 10px}@keyframes hubReveal{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.hub-empty{background:#f7f8fa;border:1px dashed #e7eaef;border-radius:14px;margin-top:16px;padding:56px 24px;text-align:center}@media(max-width:1100px){.hub-hero__title{font-size:52px}.hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:767px){.hub-hero{padding:64px 20px 56px}.hub-hero__title{font-size:36px;line-height:1.1}.hub-hero__subtitle{font-size:16px;margin-bottom:28px}.hub-hero__br{display:none}.hub-shell{padding:28px 16px 64px}.hub-chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin}.hub-chip{flex-shrink:0}.hub-grid{gap:20px;grid-template-columns:1fr}}@media(max-width:479px){.hub-hero__title{font-size:30px}.hub-post__body{padding:18px}}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
92
|
+
}
|
|
93
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ResourceTagComponent, decorators: [{
|
|
94
|
+
type: Component,
|
|
95
|
+
args: [{ selector: 'pw-resource-tags', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "@if (loading) {\n <!-- Skeleton \u2014 holds same space as real content to prevent CLS -->\n <section class=\"tag-section py-5 bg-white\">\n <div class=\"container\">\n <div class=\"row g-4\">\n @for (i of [1, 2, 3, 4, 5, 6, 7, 8]; track i) {\n <div class=\"col-md-3 col-sm-6 col-6 mb-1 mb-lg-4\">\n <div class=\"resource-card d-flex align-items-center p-3 placeholder-wave\">\n <span class=\"placeholder col-8 rounded\" style=\"height:1rem\"></span>\n </div>\n </div>\n }\n </div>\n </div>\n </section>\n} @else if (tags?.length) {\n <section class=\"tag-section py-5 bg-white\">\n <div class=\"container\">\n @if (userLoggedIn && user?.auth?.granted['Pages.Admin']) {\n <i\n class=\"fa fa-edit in-page-edit-icon cursor-pointer text-black d-flex justify-content-end mb-3\"\n (click)=\"navigateToTagList()\"\n (keydown.enter)=\"navigateToTagList()\"\n (keydown.space)=\"navigateToTagList()\"\n title=\"Edit Tags\"></i>\n }\n <div class=\"row g-4\">\n @for (tag of tags; track tag) {\n <div class=\"col-md-3 col-sm-6 col-6 mb-1 mb-lg-4\">\n <div (click)=\"selectTag(tag)\" (keydown.enter)=\"selectTag(tag)\" class=\"resource-card d-flex align-items-center p-3\" [ngClass]=\"{ 'selected': selectedTag?.name === tag.name }\">\n @if (tag?.icon_name) {\n <i class=\"fa\" [ngClass]=\"tag.icon_name + ' resource-icon me-3'\"></i>\n }\n <span class=\"resource-text\">{{ tag.name }}</span>\n </div>\n </div>\n }\n </div>\n </div>\n </section>\n}\n", styles: [".tag-section{padding-top:4.5rem!important}.resource-card{border:2px dashed #d4d4d4;border-radius:16px;background-color:#fff;transition:box-shadow .3s ease;cursor:pointer;min-height:95px;padding:1.5rem!important}.resource-card:hover{box-shadow:0 0 30px #00000014}.selected{border:4px dashed #d4d4d4;border-color:var(--first)!important}.resource-icon{font-size:2.5rem;color:var(--first)}.resource-text{font-size:1.4rem;font-weight:500;color:var(--text-color, currentColor);line-height:2rem}@media(width<=576px){.resource-card{padding:.3rem 1rem!important;height:100%;min-height:75px}.tag-section{padding-bottom:4.5rem!important}.resource-icon{font-size:2rem!important}.resource-text{font-size:1.2rem!important;line-height:1.6rem!important;word-break:break-word;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto}}\n", "@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--public-btn-radius: 24px}.hub-page{display:block}.hub-page section,.hub-page header,.hub-page footer,.hub-page nav,.hub-page ul,.hub-page li,.hub-page article,.hub-page aside{float:none;clear:both}.hub-page ul,.hub-page li{list-style:none}.hub-page .hub-hero{background:linear-gradient(180deg,#061f2a 0%,#042230 60%,var(--sidebar_bg, #00303f) 100%);color:#f5f7fa;overflow:hidden;padding:88px 24px 96px;position:relative}.hub-page .hub-hero h1.hub-hero__title{color:#f5f7fa!important}.hub-page .hub-hero p.hub-hero__eyebrow{color:color-mix(in srgb,var(--first) 70%,white)!important}.hub-page .hub-hero p.hub-hero__subtitle{color:#aab3c0!important}.hub-page .hub-hero__glow{background:radial-gradient(60% 80% at 78% 18%,color-mix(in srgb,var(--first) 38%,transparent),transparent 70%),radial-gradient(40% 60% at 12% 100%,color-mix(in srgb,var(--second, #36c283) 22%,transparent),transparent 70%);inset:0;pointer-events:none;position:absolute}.hub-page .hub-hero__grid{background-image:linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px);background-size:56px 56px;inset:0;opacity:.7;pointer-events:none;position:absolute;-webkit-mask-image:radial-gradient(120% 80% at 50% 30%,#000 30%,transparent 75%);mask-image:radial-gradient(120% 80% at 50% 30%,#000 30%,transparent 75%)}.hub-page .hub-hero__inner{margin:0 auto;max-width:1140px;position:relative}.hub-page .hub-hero__eyebrow{color:color-mix(in srgb,var(--first) 70%,white);font-size:12px;font-weight:600;letter-spacing:.18em;margin:0 0 18px}.hub-page .hub-hero__title{color:#f5f7fa;font-size:64px;font-weight:700;letter-spacing:-.02em;line-height:1.05;margin:0 0 18px;max-width:880px}.hub-page .hub-hero__subtitle{color:#aab3c0;font-size:18px;line-height:1.6;margin:0 0 36px;max-width:620px}.hub-page .hub-hero__br{display:inline}.hub-page .hub-hero__search{align-items:center;display:flex;gap:10px;max-width:560px}.hub-page .hub-hero__search .p-iconfield{flex:1}.hub-page .hub-hero__search .p-iconfield input.hub-hero__search-input{background:#ffffff12;border:1px solid rgba(255,255,255,.14);border-radius:10px;color:#f5f7fa;font-size:15px;height:48px;padding-left:42px;width:100%;transition:border-color .18s cubic-bezier(.2,.7,.2,1),background .18s cubic-bezier(.2,.7,.2,1),box-shadow .18s cubic-bezier(.2,.7,.2,1)}.hub-page .hub-hero__search .p-iconfield input.hub-hero__search-input::placeholder{color:#ffffff73}.hub-page .hub-hero__search .p-iconfield input.hub-hero__search-input:focus,.hub-page .hub-hero__search .p-iconfield input.hub-hero__search-input:focus-visible{background:#ffffff1f;border-color:#ffffff59;box-shadow:0 0 0 4px color-mix(in srgb,var(--first) 24%,transparent);outline:0}.hub-page .hub-hero__search .p-inputicon i{color:#ffffff8c}.hub-page .hub-hero__edit{align-items:center;background:#ffffff14;border:1px solid rgba(255,255,255,.14);border-radius:10px;color:#f5f7fa;cursor:pointer;display:inline-flex;height:48px;justify-content:center;transition:background .18s cubic-bezier(.2,.7,.2,1);width:48px}.hub-page .hub-hero__edit:hover{background:#ffffff29}.hub-shell{background:#fff;margin:0 auto;max-width:1188px;padding:40px 24px 96px;position:relative;width:100%}.hub-shell header,.hub-shell footer{float:none;clear:both}.hub-chips{border-bottom:1px solid #e7eaef;display:flex;flex-wrap:wrap;gap:4px;margin:0 0 32px;padding:0 0 12px}.hub-chip{align-items:center;background:transparent;border:0;border-radius:8px;color:#5a6473;cursor:pointer;display:inline-flex;font-size:14px;font-weight:500;gap:8px;line-height:1.2;padding:10px 14px;position:relative;transition:color .18s cubic-bezier(.2,.7,.2,1),background .18s cubic-bezier(.2,.7,.2,1)}.hub-chip__dot{background:#8a93a3;border-radius:9999px;flex-shrink:0;height:8px;transition:transform .18s cubic-bezier(.2,.7,.2,1),background .18s cubic-bezier(.2,.7,.2,1);width:8px}.hub-chip__dot[data-cat=\"0\"]{background:#2c7be5}.hub-chip__dot[data-cat=\"1\"]{background:#1f9d57}.hub-chip__dot[data-cat=\"2\"]{background:#b7791f}.hub-chip__dot[data-cat=\"3\"]{background:#b94c8c}.hub-chip__dot[data-cat=\"4\"]{background:#6a4ec2}.hub-chip__dot[data-cat=\"5\"]{background:#0aa39a}.hub-chip--all .hub-chip__dot{background:var(--first)}.hub-chip__count{background:#f7f8fa;border-radius:9999px;color:#8a93a3;font-size:11px;font-weight:600;padding:2px 8px;transition:background .18s cubic-bezier(.2,.7,.2,1),color .18s cubic-bezier(.2,.7,.2,1)}.hub-chip:hover{background:#f7f8fa;color:#0b0d10}.hub-chip:hover .hub-chip__dot{transform:scale(1.2)}.hub-chip:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--first) 22%,transparent);outline:0}.hub-chip--selected{color:#0b0d10}.hub-chip--selected:after{background:var(--first);border-radius:1px 1px 0 0;bottom:-13px;content:\"\";height:2px;left:14px;position:absolute;right:14px}.hub-chip--selected .hub-chip__count{background:color-mix(in srgb,var(--first) 14%,white);color:var(--first)}.hub-loading{padding:64px 0;text-align:center}.hub-grid{display:grid;gap:28px 24px;grid-template-columns:repeat(3,minmax(0,1fr));list-style:none;margin:0;padding:0}.hub-post{--reveal-delay: 0ms;animation:hubReveal .42s .18s cubic-bezier(.2,.7,.2,1) both;animation-delay:var(--reveal-delay);background:#fff;border:1px solid #e7eaef;border-radius:14px;display:flex;flex-direction:column;overflow:hidden;position:relative;transition:border-color .18s cubic-bezier(.2,.7,.2,1),transform .18s cubic-bezier(.2,.7,.2,1),box-shadow .18s cubic-bezier(.2,.7,.2,1)}.hub-post>pw-resource-edit-card-lazy{display:contents}.hub-post:hover{border-color:#cfd4dc;box-shadow:0 12px 28px #0b0d1014;transform:translateY(-2px)}.hub-post:hover .hub-post__title{color:var(--first)!important}.hub-post:hover .hub-post__media{transform:scale(1.02)}.hub-post__media{aspect-ratio:16/9;align-items:center;background:linear-gradient(135deg,#f7f8fa,#eef0f3);display:flex;justify-content:center;overflow:hidden;position:relative;text-decoration:none;transition:transform .18s cubic-bezier(.2,.7,.2,1)}.hub-post__media[data-cat=\"0\"]{--accent: #2c7be5}.hub-post__media[data-cat=\"1\"]{--accent: #1f9d57}.hub-post__media[data-cat=\"2\"]{--accent: #b7791f}.hub-post__media[data-cat=\"3\"]{--accent: #b94c8c}.hub-post__media[data-cat=\"4\"]{--accent: #6a4ec2}.hub-post__media[data-cat=\"5\"]{--accent: #0aa39a}.hub-post__media:before{background:linear-gradient(135deg,var(--accent, #2c7be5) 0%,color-mix(in srgb,var(--accent, #2c7be5) 30%,#0b0d10) 100%);content:\"\";inset:0;position:absolute}.hub-post__media:after{background-image:radial-gradient(1px 1px at 20% 30%,rgba(255,255,255,.18),transparent 60%),radial-gradient(1px 1px at 70% 60%,rgba(255,255,255,.14),transparent 60%),radial-gradient(1px 1px at 40% 80%,rgba(255,255,255,.12),transparent 60%);background-size:200px 200px,180px 180px,220px 220px;content:\"\";inset:0;mix-blend-mode:overlay;opacity:.6;position:absolute}.hub-post__image{display:block;height:100%;object-fit:cover;position:relative;width:100%;z-index:2}.hub-post__glyph{color:#ffffffeb;font-size:76px;font-weight:700;letter-spacing:-.04em;position:relative;z-index:2}.hub-post__icon{color:#ffffffc7;font-size:18px;position:absolute;right:16px;top:16px;z-index:2}.hub-post__body{display:flex;flex:1;flex-direction:column;gap:10px;padding:22px 22px 20px}.hub-post__eyebrow{align-items:center;color:#5a6473;display:flex;font-size:11px;font-weight:600;gap:6px;letter-spacing:.1em;margin:0;text-transform:uppercase}.hub-post__eyebrow[data-cat=\"0\"]{--cat: #2c7be5}.hub-post__eyebrow[data-cat=\"1\"]{--cat: #1f9d57}.hub-post__eyebrow[data-cat=\"2\"]{--cat: #b7791f}.hub-post__eyebrow[data-cat=\"3\"]{--cat: #b94c8c}.hub-post__eyebrow[data-cat=\"4\"]{--cat: #6a4ec2}.hub-post__eyebrow[data-cat=\"5\"]{--cat: #0aa39a}.hub-post__eyebrow .hub-post__dot{background:var(--cat, #8a93a3);border-radius:9999px;flex-shrink:0;height:6px;width:6px}.hub-post__title{color:#0b0d10!important;cursor:pointer;font-size:19px!important;font-weight:600;letter-spacing:-.01em;line-height:1.35;margin:0;transition:color .18s cubic-bezier(.2,.7,.2,1);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;padding:0!important}.hub-post__excerpt{color:#5a6473;font-size:14px;line-height:1.55;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.hub-post__foot{align-items:center;border-top:1px solid #e7eaef;display:flex;flex-wrap:nowrap;gap:10px;margin-top:auto;padding-top:14px}.hub-post__avatar{background:#f7f8fa;border-radius:9999px;flex:0 0 28px;height:28px;object-fit:cover;width:28px}.hub-post__avatar--text{align-items:center;background:color-mix(in srgb,var(--first) 14%,#f7f8fa);color:var(--first);display:inline-flex;font-size:11px;font-weight:700;justify-content:center}.hub-post__author-meta{display:flex;flex:1 1 auto;flex-direction:column;min-width:0;overflow:hidden}.hub-post__author-name{color:#0b0d10;font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hub-post__author-sub{color:#8a93a3;display:block;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hub-post__author-sub time,.hub-post__author-sub span{display:inline}.hub-post__sep{color:#cfd4dc;margin:0 4px}.hub-post__views{background:#f7f8fa;border-radius:9999px;color:#8a93a3;flex:0 0 auto;font-size:11px;font-weight:600;padding:4px 10px}@keyframes hubReveal{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.hub-empty{background:#f7f8fa;border:1px dashed #e7eaef;border-radius:14px;margin-top:16px;padding:56px 24px;text-align:center}@media(max-width:1100px){.hub-hero__title{font-size:52px}.hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:767px){.hub-hero{padding:64px 20px 56px}.hub-hero__title{font-size:36px;line-height:1.1}.hub-hero__subtitle{font-size:16px;margin-bottom:28px}.hub-hero__br{display:none}.hub-shell{padding:28px 16px 64px}.hub-chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin}.hub-chip{flex-shrink:0}.hub-grid{gap:20px;grid-template-columns:1fr}}@media(max-width:479px){.hub-hero__title{font-size:30px}.hub-post__body{padding:18px}}\n"] }]
|
|
96
|
+
}], ctorParameters: () => [{ type: i2.TagService }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }], propDecorators: { tagsLoaded: [{
|
|
97
|
+
type: Output
|
|
98
|
+
}], tagSelected: [{
|
|
99
|
+
type: Output
|
|
100
|
+
}], user: [{
|
|
101
|
+
type: Input
|
|
102
|
+
}], userLoggedIn: [{
|
|
103
|
+
type: Input
|
|
104
|
+
}] } });
|
|
105
|
+
|
|
106
|
+
class VaultSectionComponent extends AppBaseComponent {
|
|
107
|
+
constructor(injector, modalService, adminService, titleService, cdr) {
|
|
108
|
+
super(injector);
|
|
109
|
+
this.modalService = modalService;
|
|
110
|
+
this.adminService = adminService;
|
|
111
|
+
this.titleService = titleService;
|
|
112
|
+
this.cdr = cdr;
|
|
113
|
+
this.resourceTagLine = this.appConfig.pages_config?.resources.resources_tagline;
|
|
114
|
+
this.resourceImage = this.appConfig.pages_config?.resources.resources_image.url;
|
|
115
|
+
this.resourceDescription = this.appConfig.pages_config?.resources.resources_description;
|
|
116
|
+
this.domainId = this.appConfig.domain_id;
|
|
117
|
+
this.image = null;
|
|
118
|
+
this.file = null;
|
|
119
|
+
this.editingTagline = '';
|
|
120
|
+
this.editingDescription = '';
|
|
121
|
+
this.canEditResourcesValue = false;
|
|
122
|
+
}
|
|
123
|
+
ngOnInit() {
|
|
124
|
+
this.previewResourceImage = {
|
|
125
|
+
url: this.appConfig.pages_config?.resources.resources_image.url ?? '',
|
|
126
|
+
name: 'resources_image.png'
|
|
127
|
+
};
|
|
128
|
+
this.companyName = this.appConfig?.company.name;
|
|
129
|
+
// Critical image preloading is now handled server-side for better LCP performance
|
|
130
|
+
// Use proper timer management instead of setTimeout
|
|
131
|
+
this.scheduleSEOMetadataUpdate();
|
|
132
|
+
}
|
|
133
|
+
ngOnChanges(changes) {
|
|
134
|
+
if (changes['user'] || changes['userLoggedIn']) {
|
|
135
|
+
if (this.userLoggedIn && this.user) {
|
|
136
|
+
this.permissionService.user = this.user;
|
|
137
|
+
this.updateCanEditResourcesValue();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
scheduleSEOMetadataUpdate() {
|
|
142
|
+
// Clear any existing timer to prevent multiple timers
|
|
143
|
+
this.clearSEOTimer();
|
|
144
|
+
// Schedule the SEO update with proper timer management
|
|
145
|
+
this.seoUpdateTimer = setTimeout(() => {
|
|
146
|
+
this.updateSEOMetadata();
|
|
147
|
+
this.seoUpdateTimer = null; // Clear reference after execution
|
|
148
|
+
}, 2000);
|
|
149
|
+
}
|
|
150
|
+
clearSEOTimer() {
|
|
151
|
+
if (this.seoUpdateTimer) {
|
|
152
|
+
clearTimeout(this.seoUpdateTimer);
|
|
153
|
+
this.seoUpdateTimer = null;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
updateSEOMetadata() {
|
|
157
|
+
// Use resource tagline as page title
|
|
158
|
+
if (this.resourceTagLine) {
|
|
159
|
+
this.titleService.setTitle(this.resourceTagLine);
|
|
160
|
+
}
|
|
161
|
+
// Use resource description as meta description
|
|
162
|
+
if (this.resourceDescription) {
|
|
163
|
+
this.updateMetaDescription(this.resourceDescription);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
updateMetaDescription(description) {
|
|
167
|
+
let metaDescription = document.querySelector('meta[name="description"]');
|
|
168
|
+
if (!metaDescription) {
|
|
169
|
+
metaDescription = document.createElement('meta');
|
|
170
|
+
metaDescription.setAttribute('name', 'description');
|
|
171
|
+
document.head.appendChild(metaDescription);
|
|
172
|
+
}
|
|
173
|
+
metaDescription.setAttribute('content', description);
|
|
174
|
+
}
|
|
175
|
+
openEditResourceModal() {
|
|
176
|
+
this.editingTagline = this.resourceTagLine;
|
|
177
|
+
this.editingDescription = this.resourceDescription;
|
|
178
|
+
this.image = this.resourceImage;
|
|
179
|
+
this.file = null;
|
|
180
|
+
this.modalService.open(this.editResourceModalRef, { centered: true });
|
|
181
|
+
}
|
|
182
|
+
saveResourceContent(modal) {
|
|
183
|
+
const formData = new FormData();
|
|
184
|
+
formData.append('subscription_id', this.getEffectiveSubscriptionId().toString());
|
|
185
|
+
formData.append('resources_tagline', this.editingTagline || '');
|
|
186
|
+
formData.append('resources_description', this.editingDescription || '');
|
|
187
|
+
if (this.file) {
|
|
188
|
+
formData.append('resources_image', this.file);
|
|
189
|
+
}
|
|
190
|
+
else if (!this.image) {
|
|
191
|
+
formData.append('remove_resources_image', 'true');
|
|
192
|
+
}
|
|
193
|
+
this.adminService.updateDomainConfig(this.appConfig?.domain_id, formData).subscribe(() => {
|
|
194
|
+
this.resourceTagLine = this.editingTagline;
|
|
195
|
+
this.resourceDescription = this.editingDescription;
|
|
196
|
+
this.resourceImage = this.image;
|
|
197
|
+
this.toast.success('Resources updated');
|
|
198
|
+
modal.close();
|
|
199
|
+
this.updateSEOMetadata();
|
|
200
|
+
this.cdr.markForCheck();
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
openImageModal(modalTemplate) {
|
|
204
|
+
this.imageModalRef = this.modalService.open(modalTemplate, { centered: true, size: 'md' });
|
|
205
|
+
}
|
|
206
|
+
onImageSelected(base64) {
|
|
207
|
+
this.image = base64;
|
|
208
|
+
this.file = HelperService.convertBase64ToFile(base64);
|
|
209
|
+
this.imageModalRef?.close();
|
|
210
|
+
}
|
|
211
|
+
removeImage() {
|
|
212
|
+
this.image = null;
|
|
213
|
+
this.file = null;
|
|
214
|
+
}
|
|
215
|
+
ngOnDestroy() {
|
|
216
|
+
// Clean up timer to prevent memory leaks
|
|
217
|
+
this.clearSEOTimer();
|
|
218
|
+
}
|
|
219
|
+
/** Helper method to get effective subscription ID */
|
|
220
|
+
getEffectiveSubscriptionId() {
|
|
221
|
+
return HelperService.getEffectiveSubscriptionId(this.user, this.subscriptionId, this.appConfig.master_subscription.subscription_id);
|
|
222
|
+
}
|
|
223
|
+
handleImageError(event, fallbackPath) {
|
|
224
|
+
HelperService.handleImageFallbackPath(event, fallbackPath);
|
|
225
|
+
}
|
|
226
|
+
updateCanEditResourcesValue() {
|
|
227
|
+
if (this.userLoggedIn && this.user) {
|
|
228
|
+
this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
this.canEditResourcesValue = false;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
canEditResources() {
|
|
235
|
+
return this.canEditResourcesValue;
|
|
236
|
+
}
|
|
237
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: VaultSectionComponent, deps: [{ token: i0.Injector }, { token: i2$1.NgbModal }, { token: i2$2.AdminService }, { token: i3$1.Title }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
238
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: VaultSectionComponent, isStandalone: false, selector: "pw-vault-section", inputs: { user: "user", userLoggedIn: "userLoggedIn" }, viewQueries: [{ propertyName: "editResourceModalRef", first: true, predicate: ["editResourceModal"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<section class=\"vault-section\">\n <div class=\"skewed-bg\"></div>\n\n <!-- Edit Icon (top-right) -->\n\n <div class=\"container\">\n <div class=\"row align-items-center vault-row\">\n <!-- Left Content -->\n <div class=\"col-lg-6 col-12 text-content\">\n <div class=\"d-flex\">\n <h2 class=\"headline\">{{resourceTagLine || 'UPDATE ME ON ADMIN/DOMAINS MODULE'}}</h2>\n @if (canEditResourcesValue) {\n <i\n class=\"fa fa-edit tag-edit-icon in-page-edit-icon mt-4 ms-3 cursor-pointer\"\n title=\"Edit Resource\"\n (click)=\"openEditResourceModal()\"\n (keydown.enter)=\"openEditResourceModal()\"\n (keydown.space)=\"openEditResourceModal()\"\n ></i>\n }\n </div>\n <div class=\"description-content\">\n <p class=\"description\" [innerHTML]=\"resourceDescription || 'UPDATE ME ON ADMIN/DOMAINS MODULE.'\">\n </p>\n </div>\n </div>\n\n <!-- Right Content -->\n <div class=\"col-lg-6 col-12 img-wrapper\">\n @if (resourceImage) {\n <img\n [src]=\"resourceImage\"\n alt=\"Vault Mockup\"\n class=\"img-fluid\"\n width=\"800\"\n height=\"600\"\n fetchpriority=\"high\"\n decoding=\"async\"\n loading=\"eager\" />\n } @else {\n <pw-no-data [withImage]=\"true\" [message]=\"'ADD ME ON ADMIN/DOMAINS MODULE' | transloco\"></pw-no-data>\n }\n\n <ng-template #noVideo>\n <pw-no-data [withImage]=\"true\" [message]=\"'ADD ME ON ADMIN/DOMAINS MODULE' | transloco\"></pw-no-data>\n </ng-template>\n </div>\n </div>\n </div>\n</section>\n\n<!-- Edit Modal -->\n<ng-template #editResourceModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Resources</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <div class=\"mb-3\">\n <label for=\"editTagline\" class=\"form-label\">Tagline</label>\n <input id=\"editTagline\" [(ngModel)]=\"editingTagline\" class=\"form-control\" />\n </div>\n <div class=\"mb-3\">\n <label for=\"editDescription\" class=\"form-label\">Description</label>\n <textarea id=\"editDescription\" name=\"editingDescription\" [(ngModel)]=\"editingDescription\" rows=\"4\" class=\"form-control\"></textarea>\n </div>\n <div class=\"mb-3\">\n <span class=\"pw-label-style form-label\" id=\"vault-section-resource-image-label\">Resource Image</span>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img\n [src]=\"image || 'assets/img/resource/blog.png'\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n class=\"image w-100 mb-2\"\n alt=\"Resource content\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openImageModal(imageCropContent)\">\n {{ file || image ? 'Edit' : 'Add' }} Picture\n </a>\n @if (image) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (click)=\"removeImage()\"\n (keydown.enter)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n\n </div>\n <div class=\"modal-footer\">\n <button class=\"btn btn-primary\" (click)=\"saveResourceContent(modal)\">Save</button>\n <button class=\"btn btn-secondary\" (click)=\"modal.dismiss()\">Cancel</button>\n </div>\n</ng-template>\n\n\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\" class=\"btn-close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file.</small>\n <pw-image-cropper\n [aspectRatio]=\"'dynamic'\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"modal.close()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n", styles: [".vault-section{position:relative;padding:5rem 0;color:#fff;background:linear-gradient(90deg,var(--first) 0%,#a8e1fb 100%);overflow:hidden}.vault-section:after{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:61%;background:#fff;clip-path:polygon(0 18%,100% 0%,100% 100%,0% 100%);z-index:1}.vault-section .container{position:relative;z-index:2}.vault-section .row{min-height:600px;align-items:center}.vault-section .text-content{max-width:550px;height:100%;display:flex;flex-direction:column;justify-content:center}.vault-section .text-content .headline{font-weight:500;color:#fff!important;font-size:4.5rem!important}.vault-section .text-content .description{font-size:2rem;line-height:3rem;font-weight:400;color:var(--text-color, currentColor);margin-bottom:1rem}.vault-section .text-content .description strong{font-weight:700}.vault-section .text-content .cta-btn{display:inline-block;background:var(--text-color, black);color:#fff;padding:1rem 2rem;border-radius:40px;font-weight:500;text-decoration:none;font-size:1.4rem;border:1px solid;box-shadow:none!important;border-color:var(--text-color, textColor)}.vault-section .text-content .cta-btn:hover{background-color:#fff!important;color:var(--text-color, black)!important}.vault-section .img-wrapper{text-align:center;min-height:400px;display:flex;align-items:center;justify-content:center}@media(width>=991px){.vault-section .img-wrapper{min-height:600px}.vault-section .img-wrapper img,.vault-section .img-wrapper pw-no-data{max-width:800px;max-height:800px;height:auto;width:100%;object-fit:contain}}@media(width>=991px){.vault-section img,.vault-section pw-no-data{max-width:800px;width:100%;height:auto;position:relative;top:11.6rem}.vault-section .description-content{max-width:500px;position:absolute;margin-top:31rem!important}.vault-section .headline{margin-bottom:21rem!important}}@media(width>=1100px){.vault-section img,.vault-section pw-no-data{left:25%}}@media(width>=991px)and (width<=1100px){.vault-section img,.vault-section pw-no-data{top:12.9rem!important;left:19%}}@media(width<=991px){.vault-section .vault-row{text-align:center;justify-content:center}.vault-section img,.vault-section pw-no-data{top:5rem!important;position:relative}}@media(width<=768px){.vault-section .text-content{text-align:center;margin-bottom:2rem;margin-top:3rem!important}.vault-section .text-content .headline{font-size:3rem!important}.vault-section .text-content .description{font-size:1.5rem;line-height:2rem}}.tag-edit-icon{margin-top:2rem!important}\n"], dependencies: [{ kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5$1.LazyImgDirective, selector: "img" }, { kind: "component", type: i8.ProfileImageCropperComponent, selector: "pw-image-cropper", inputs: ["aspectRatio", "dynamicData"], outputs: ["imageSelectionEvent", "closeEvent", "fileChangeEvent"] }, { kind: "component", type: i6.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "pipe", type: i10.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
239
|
+
}
|
|
240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: VaultSectionComponent, decorators: [{
|
|
241
|
+
type: Component,
|
|
242
|
+
args: [{ selector: 'pw-vault-section', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<section class=\"vault-section\">\n <div class=\"skewed-bg\"></div>\n\n <!-- Edit Icon (top-right) -->\n\n <div class=\"container\">\n <div class=\"row align-items-center vault-row\">\n <!-- Left Content -->\n <div class=\"col-lg-6 col-12 text-content\">\n <div class=\"d-flex\">\n <h2 class=\"headline\">{{resourceTagLine || 'UPDATE ME ON ADMIN/DOMAINS MODULE'}}</h2>\n @if (canEditResourcesValue) {\n <i\n class=\"fa fa-edit tag-edit-icon in-page-edit-icon mt-4 ms-3 cursor-pointer\"\n title=\"Edit Resource\"\n (click)=\"openEditResourceModal()\"\n (keydown.enter)=\"openEditResourceModal()\"\n (keydown.space)=\"openEditResourceModal()\"\n ></i>\n }\n </div>\n <div class=\"description-content\">\n <p class=\"description\" [innerHTML]=\"resourceDescription || 'UPDATE ME ON ADMIN/DOMAINS MODULE.'\">\n </p>\n </div>\n </div>\n\n <!-- Right Content -->\n <div class=\"col-lg-6 col-12 img-wrapper\">\n @if (resourceImage) {\n <img\n [src]=\"resourceImage\"\n alt=\"Vault Mockup\"\n class=\"img-fluid\"\n width=\"800\"\n height=\"600\"\n fetchpriority=\"high\"\n decoding=\"async\"\n loading=\"eager\" />\n } @else {\n <pw-no-data [withImage]=\"true\" [message]=\"'ADD ME ON ADMIN/DOMAINS MODULE' | transloco\"></pw-no-data>\n }\n\n <ng-template #noVideo>\n <pw-no-data [withImage]=\"true\" [message]=\"'ADD ME ON ADMIN/DOMAINS MODULE' | transloco\"></pw-no-data>\n </ng-template>\n </div>\n </div>\n </div>\n</section>\n\n<!-- Edit Modal -->\n<ng-template #editResourceModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Resources</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <div class=\"mb-3\">\n <label for=\"editTagline\" class=\"form-label\">Tagline</label>\n <input id=\"editTagline\" [(ngModel)]=\"editingTagline\" class=\"form-control\" />\n </div>\n <div class=\"mb-3\">\n <label for=\"editDescription\" class=\"form-label\">Description</label>\n <textarea id=\"editDescription\" name=\"editingDescription\" [(ngModel)]=\"editingDescription\" rows=\"4\" class=\"form-control\"></textarea>\n </div>\n <div class=\"mb-3\">\n <span class=\"pw-label-style form-label\" id=\"vault-section-resource-image-label\">Resource Image</span>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img\n [src]=\"image || 'assets/img/resource/blog.png'\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n class=\"image w-100 mb-2\"\n alt=\"Resource content\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openImageModal(imageCropContent)\">\n {{ file || image ? 'Edit' : 'Add' }} Picture\n </a>\n @if (image) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (click)=\"removeImage()\"\n (keydown.enter)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n\n </div>\n <div class=\"modal-footer\">\n <button class=\"btn btn-primary\" (click)=\"saveResourceContent(modal)\">Save</button>\n <button class=\"btn btn-secondary\" (click)=\"modal.dismiss()\">Cancel</button>\n </div>\n</ng-template>\n\n\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\" class=\"btn-close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file.</small>\n <pw-image-cropper\n [aspectRatio]=\"'dynamic'\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"modal.close()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n", styles: [".vault-section{position:relative;padding:5rem 0;color:#fff;background:linear-gradient(90deg,var(--first) 0%,#a8e1fb 100%);overflow:hidden}.vault-section:after{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:61%;background:#fff;clip-path:polygon(0 18%,100% 0%,100% 100%,0% 100%);z-index:1}.vault-section .container{position:relative;z-index:2}.vault-section .row{min-height:600px;align-items:center}.vault-section .text-content{max-width:550px;height:100%;display:flex;flex-direction:column;justify-content:center}.vault-section .text-content .headline{font-weight:500;color:#fff!important;font-size:4.5rem!important}.vault-section .text-content .description{font-size:2rem;line-height:3rem;font-weight:400;color:var(--text-color, currentColor);margin-bottom:1rem}.vault-section .text-content .description strong{font-weight:700}.vault-section .text-content .cta-btn{display:inline-block;background:var(--text-color, black);color:#fff;padding:1rem 2rem;border-radius:40px;font-weight:500;text-decoration:none;font-size:1.4rem;border:1px solid;box-shadow:none!important;border-color:var(--text-color, textColor)}.vault-section .text-content .cta-btn:hover{background-color:#fff!important;color:var(--text-color, black)!important}.vault-section .img-wrapper{text-align:center;min-height:400px;display:flex;align-items:center;justify-content:center}@media(width>=991px){.vault-section .img-wrapper{min-height:600px}.vault-section .img-wrapper img,.vault-section .img-wrapper pw-no-data{max-width:800px;max-height:800px;height:auto;width:100%;object-fit:contain}}@media(width>=991px){.vault-section img,.vault-section pw-no-data{max-width:800px;width:100%;height:auto;position:relative;top:11.6rem}.vault-section .description-content{max-width:500px;position:absolute;margin-top:31rem!important}.vault-section .headline{margin-bottom:21rem!important}}@media(width>=1100px){.vault-section img,.vault-section pw-no-data{left:25%}}@media(width>=991px)and (width<=1100px){.vault-section img,.vault-section pw-no-data{top:12.9rem!important;left:19%}}@media(width<=991px){.vault-section .vault-row{text-align:center;justify-content:center}.vault-section img,.vault-section pw-no-data{top:5rem!important;position:relative}}@media(width<=768px){.vault-section .text-content{text-align:center;margin-bottom:2rem;margin-top:3rem!important}.vault-section .text-content .headline{font-size:3rem!important}.vault-section .text-content .description{font-size:1.5rem;line-height:2rem}}.tag-edit-icon{margin-top:2rem!important}\n"] }]
|
|
243
|
+
}], ctorParameters: () => [{ type: i0.Injector }, { type: i2$1.NgbModal }, { type: i2$2.AdminService }, { type: i3$1.Title }, { type: i0.ChangeDetectorRef }], propDecorators: { editResourceModalRef: [{
|
|
244
|
+
type: ViewChild,
|
|
245
|
+
args: ['editResourceModal']
|
|
246
|
+
}], user: [{
|
|
247
|
+
type: Input
|
|
248
|
+
}], userLoggedIn: [{
|
|
249
|
+
type: Input
|
|
250
|
+
}] } });
|
|
251
|
+
|
|
252
|
+
class ResourceComponent extends AppBaseComponent {
|
|
253
|
+
constructor(authService, cdr, injector) {
|
|
254
|
+
super(injector);
|
|
255
|
+
this.authService = authService;
|
|
256
|
+
this.cdr = cdr;
|
|
257
|
+
this.allTags = [];
|
|
258
|
+
}
|
|
259
|
+
ngOnInit() {
|
|
260
|
+
this.authService.getToken$().subscribe(res => {
|
|
261
|
+
this.userLoggedIn = !!res;
|
|
262
|
+
this.cdr.markForCheck();
|
|
263
|
+
if (this.userLoggedIn) {
|
|
264
|
+
this.userService.getUserInfo().subscribe(data => {
|
|
265
|
+
this.user = data;
|
|
266
|
+
this.cdr.markForCheck();
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
onTagsLoaded(tags) {
|
|
272
|
+
this.allTags = tags;
|
|
273
|
+
this.cdr.markForCheck();
|
|
274
|
+
}
|
|
275
|
+
hasTag(name) {
|
|
276
|
+
return this.allTags.some(tag => tag.name?.toLowerCase() === name.toLowerCase());
|
|
277
|
+
}
|
|
278
|
+
getCategoryIdByTagName(name) {
|
|
279
|
+
const tag = this.allTags.find(t => t.name?.toLowerCase() === name.toLowerCase());
|
|
280
|
+
return tag?.tag_category_id;
|
|
281
|
+
}
|
|
282
|
+
getTag(name) {
|
|
283
|
+
const tag = this.allTags.find(t => t.name?.toLowerCase() === name.toLowerCase());
|
|
284
|
+
return tag;
|
|
285
|
+
}
|
|
286
|
+
getTitleByTagName(name) {
|
|
287
|
+
const tag = this.allTags.find(t => t.name?.toLowerCase() === name.toLowerCase());
|
|
288
|
+
return tag?.title;
|
|
289
|
+
}
|
|
290
|
+
scrollToTag(tag) {
|
|
291
|
+
const sectionMap = {
|
|
292
|
+
Videos: 'videos',
|
|
293
|
+
Events: 'events',
|
|
294
|
+
'Blog Posts': 'blog-posts',
|
|
295
|
+
'Case Studies': 'case-studies',
|
|
296
|
+
'White Papers': 'white-papers',
|
|
297
|
+
'Product Release Notes': 'product-release-notes'
|
|
298
|
+
};
|
|
299
|
+
const sectionId = sectionMap[tag.name?.trim()];
|
|
300
|
+
if (sectionId) {
|
|
301
|
+
setTimeout(() => {
|
|
302
|
+
const el = document.getElementById(sectionId);
|
|
303
|
+
if (el)
|
|
304
|
+
el.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
305
|
+
}, 100);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
onVaultLoaded(isLoaded) {
|
|
309
|
+
this.isFooterLoaded = isLoaded;
|
|
310
|
+
}
|
|
311
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ResourceComponent, deps: [{ token: i2.AuthService }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
312
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: ResourceComponent, isStandalone: false, selector: "pw-resources", usesInheritance: true, ngImport: i0, template: "\n<pw-resource-header [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-header>\n<pw-vault-section [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-vault-section>\n<pw-resource-tags [user]=\"user\" [userLoggedIn]=\"userLoggedIn\" (tagsLoaded)=\"onTagsLoaded($event)\" (tagSelected)=\"scrollToTag($event)\"></pw-resource-tags>\n@if (hasTag('Videos')) {\n <pw-resource-video-card id=\"videos\" [tag]=\"getTag('Videos')\" [showVideoSection]=\"true\" [categoryId]=\"getCategoryIdByTagName('Videos')\" [resourceTitle]=\"getTitleByTagName('Videos')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-video-card>\n}\n@if (hasTag('Events')) {\n <pw-upcoming-event-card id=\"events\" [tag]=\"getTag('Events')\" [showEventContent]=\"true\" [categoryId]=\"getCategoryIdByTagName('Events')\" [resourceTitle]=\"getTitleByTagName('Events')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-upcoming-event-card>\n}\n@if (hasTag('Blog Posts')) {\n <pw-resource-cards resourceLink=\"/resources/blogs\" [tag]=\"getTag('Blog Posts')\" id=\"blog-posts\" [categoryId]=\"getCategoryIdByTagName('Blog Posts')\" [resourceTitle]=\"getTitleByTagName('Blog Posts')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-cards>\n}\n@if (hasTag('Case Studies')) {\n <pw-case-studies-card id=\"case-studies\" [tag]=\"getTag('Case Studies')\" [showCaseStudyHeader]=\"true\" [categoryId]=\"getCategoryIdByTagName('Case Studies')\" [resourceTitle]=\"getTitleByTagName('Case Studies')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-case-studies-card>\n}\n@if (hasTag('White Papers')) {\n <pw-resource--vault (isLoadedChange)=\"onVaultLoaded($event)\" id=\"white-papers\" [tag]=\"getTag('White Papers')\" [showVaultSection]=\"true\" [categoryId]=\"getCategoryIdByTagName('White Papers')\" [resourceTitle]=\"getTitleByTagName('White Papers')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource--vault>\n}\n@if (hasTag('Product Release Notes')) {\n <pw-resource-note-card [isResource]=\"true\" [isReleasePress]=\"true\" id=\"product-release-notes\" [tag]=\"getTag('Product Release Notes')\" [releaseHeader]=\"true\" [categoryId]=\"getCategoryIdByTagName('Product Release Notes')\" [resourceTitle]=\"getTitleByTagName('Product Release Notes')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-note-card>\n}\n@if (isFooterLoaded) {\n <pw-trial-4-contact-us [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-trial-4-contact-us>\n}", styles: ["::ng-deep .resource-vault-section,::ng-deep .release-notes-section,::ng-deep .resource-section,::ng-deep .vault-section{box-shadow:0 4px 32px -14px #40576d4d!important}\n"], dependencies: [{ kind: "component", type: ResourceVideoCardComponent, selector: "pw-resource-video-card", inputs: ["showVideoSection", "categoryId", "tag", "postSlice", "resourceTitle", "user", "userLoggedIn"] }, { kind: "component", type: UpcomingEventCardComponent, selector: "pw-upcoming-event-card", inputs: ["showEventContent", "categoryId", "tag", "postSlice", "resourceTitle", "user", "userLoggedIn"] }, { kind: "component", type: ResourceCardComponent, selector: "pw-resource-cards", inputs: ["categoryId", "isHeaderVisible", "isRelated", "resourceTitle", "postSlice", "header", "tag", "resourceLink", "user", "userLoggedIn"] }, { kind: "component", type: CaseStudyCardComponent, selector: "pw-case-studies-card", inputs: ["showCaseStudyHeader", "categoryId", "postSlice", "tag", "resourceTitle", "user", "userLoggedIn"] }, { kind: "component", type: ResourceNoteCardComponent, selector: "pw-resource-note-card", inputs: ["releaseHeader", "categoryId", "isReleasePress", "isResource", "postSlice", "resourceTitle", "tag", "user", "userLoggedIn"] }, { kind: "component", type: ResourceVaultComponent, selector: "pw-resource--vault", inputs: ["showVaultSection", "postSlice", "categoryId", "resourceTitle", "tag"], outputs: ["isLoadedChange"] }, { kind: "component", type: i4.Trial4ContactUsComponent, selector: "pw-trial-4-contact-us", inputs: ["subscriptionId", "sourceId", "masterSubscriptionId", "experimentName", "microserviceName", "shardName", "user", "userLoggedIn"] }, { kind: "component", type: i8.ResourceHeaderComponent, selector: "pw-resource-header", inputs: ["user", "userLoggedIn"] }, { kind: "component", type: ResourceTagComponent, selector: "pw-resource-tags", inputs: ["user", "userLoggedIn"], outputs: ["tagsLoaded", "tagSelected"] }, { kind: "component", type: VaultSectionComponent, selector: "pw-vault-section", inputs: ["user", "userLoggedIn"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
313
|
+
}
|
|
314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ResourceComponent, decorators: [{
|
|
315
|
+
type: Component,
|
|
316
|
+
args: [{ selector: 'pw-resources', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "\n<pw-resource-header [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-header>\n<pw-vault-section [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-vault-section>\n<pw-resource-tags [user]=\"user\" [userLoggedIn]=\"userLoggedIn\" (tagsLoaded)=\"onTagsLoaded($event)\" (tagSelected)=\"scrollToTag($event)\"></pw-resource-tags>\n@if (hasTag('Videos')) {\n <pw-resource-video-card id=\"videos\" [tag]=\"getTag('Videos')\" [showVideoSection]=\"true\" [categoryId]=\"getCategoryIdByTagName('Videos')\" [resourceTitle]=\"getTitleByTagName('Videos')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-video-card>\n}\n@if (hasTag('Events')) {\n <pw-upcoming-event-card id=\"events\" [tag]=\"getTag('Events')\" [showEventContent]=\"true\" [categoryId]=\"getCategoryIdByTagName('Events')\" [resourceTitle]=\"getTitleByTagName('Events')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-upcoming-event-card>\n}\n@if (hasTag('Blog Posts')) {\n <pw-resource-cards resourceLink=\"/resources/blogs\" [tag]=\"getTag('Blog Posts')\" id=\"blog-posts\" [categoryId]=\"getCategoryIdByTagName('Blog Posts')\" [resourceTitle]=\"getTitleByTagName('Blog Posts')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-cards>\n}\n@if (hasTag('Case Studies')) {\n <pw-case-studies-card id=\"case-studies\" [tag]=\"getTag('Case Studies')\" [showCaseStudyHeader]=\"true\" [categoryId]=\"getCategoryIdByTagName('Case Studies')\" [resourceTitle]=\"getTitleByTagName('Case Studies')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-case-studies-card>\n}\n@if (hasTag('White Papers')) {\n <pw-resource--vault (isLoadedChange)=\"onVaultLoaded($event)\" id=\"white-papers\" [tag]=\"getTag('White Papers')\" [showVaultSection]=\"true\" [categoryId]=\"getCategoryIdByTagName('White Papers')\" [resourceTitle]=\"getTitleByTagName('White Papers')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource--vault>\n}\n@if (hasTag('Product Release Notes')) {\n <pw-resource-note-card [isResource]=\"true\" [isReleasePress]=\"true\" id=\"product-release-notes\" [tag]=\"getTag('Product Release Notes')\" [releaseHeader]=\"true\" [categoryId]=\"getCategoryIdByTagName('Product Release Notes')\" [resourceTitle]=\"getTitleByTagName('Product Release Notes')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-note-card>\n}\n@if (isFooterLoaded) {\n <pw-trial-4-contact-us [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-trial-4-contact-us>\n}", styles: ["::ng-deep .resource-vault-section,::ng-deep .release-notes-section,::ng-deep .resource-section,::ng-deep .vault-section{box-shadow:0 4px 32px -14px #40576d4d!important}\n"] }]
|
|
317
|
+
}], ctorParameters: () => [{ type: i2.AuthService }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }] });
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Shared module specifically for ResourceRootModule
|
|
321
|
+
* Imports only the essential modules needed by the root resource page
|
|
322
|
+
* without the unnecessary dependencies from ResourceSharedModule
|
|
323
|
+
*/
|
|
324
|
+
class ResourceRootSharedModule {
|
|
325
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ResourceRootSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
326
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.19", ngImport: i0, type: ResourceRootSharedModule, imports: [CommonModule,
|
|
327
|
+
FormsModule,
|
|
328
|
+
CoreTranslocoModule,
|
|
329
|
+
TranslocoModule,
|
|
330
|
+
ResourceSharedComponentsModule,
|
|
331
|
+
ResourceCardsModule], exports: [ResourceCardsModule,
|
|
332
|
+
CommonModule,
|
|
333
|
+
FormsModule,
|
|
334
|
+
CoreTranslocoModule,
|
|
335
|
+
TranslocoModule,
|
|
336
|
+
ResourceSharedComponentsModule] }); }
|
|
337
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ResourceRootSharedModule, imports: [CommonModule,
|
|
338
|
+
FormsModule,
|
|
339
|
+
CoreTranslocoModule,
|
|
340
|
+
TranslocoModule,
|
|
341
|
+
ResourceSharedComponentsModule,
|
|
342
|
+
ResourceCardsModule, ResourceCardsModule,
|
|
343
|
+
CommonModule,
|
|
344
|
+
FormsModule,
|
|
345
|
+
CoreTranslocoModule,
|
|
346
|
+
TranslocoModule,
|
|
347
|
+
ResourceSharedComponentsModule] }); }
|
|
348
|
+
}
|
|
349
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ResourceRootSharedModule, decorators: [{
|
|
350
|
+
type: NgModule,
|
|
351
|
+
args: [{
|
|
352
|
+
imports: [
|
|
353
|
+
CommonModule,
|
|
354
|
+
FormsModule,
|
|
355
|
+
CoreTranslocoModule,
|
|
356
|
+
TranslocoModule,
|
|
357
|
+
ResourceSharedComponentsModule,
|
|
358
|
+
ResourceCardsModule
|
|
359
|
+
],
|
|
360
|
+
exports: [
|
|
361
|
+
ResourceCardsModule,
|
|
362
|
+
CommonModule,
|
|
363
|
+
FormsModule,
|
|
364
|
+
CoreTranslocoModule,
|
|
365
|
+
TranslocoModule,
|
|
366
|
+
ResourceSharedComponentsModule
|
|
367
|
+
],
|
|
368
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
369
|
+
}]
|
|
370
|
+
}] });
|
|
371
|
+
|
|
372
|
+
const routes = [
|
|
373
|
+
{
|
|
374
|
+
path: '',
|
|
375
|
+
component: ResourceComponent,
|
|
376
|
+
data: {
|
|
377
|
+
title: 'Resources Library',
|
|
378
|
+
permission: 'Pages.Blog',
|
|
379
|
+
preload: false
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
];
|
|
383
|
+
class ResourceRootModule {
|
|
384
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ResourceRootModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
385
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.19", ngImport: i0, type: ResourceRootModule, declarations: [ResourceComponent, ResourceTagComponent, VaultSectionComponent], imports: [ResourceRootSharedModule, i1.RouterModule] }); }
|
|
386
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ResourceRootModule, imports: [ResourceRootSharedModule, RouterModule.forChild(routes)] }); }
|
|
387
|
+
}
|
|
388
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ResourceRootModule, decorators: [{
|
|
389
|
+
type: NgModule,
|
|
390
|
+
args: [{
|
|
391
|
+
declarations: [ResourceComponent, ResourceTagComponent, VaultSectionComponent],
|
|
392
|
+
imports: [ResourceRootSharedModule, RouterModule.forChild(routes)],
|
|
393
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
394
|
+
}]
|
|
395
|
+
}] });
|
|
396
|
+
|
|
397
|
+
export { ResourceRootModule };
|
|
398
|
+
//# sourceMappingURL=posiwise-resource-module-resource-root.module-PmW6b6c0.mjs.map
|