@posiwise/resource-module 0.0.192 → 0.0.194
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-CIvGr9du.mjs +0 -116
- package/fesm2022/posiwise-resource-module-base-top-banner.component-CIvGr9du.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-posiwise-resource-module-QIX6Y1Ol.mjs +0 -1888
- package/fesm2022/posiwise-resource-module-posiwise-resource-module-QIX6Y1Ol.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-blogs.module-DQhQ9YWu.mjs +0 -69
- package/fesm2022/posiwise-resource-module-resource-blogs.module-DQhQ9YWu.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-D7ALgcL_.mjs +0 -135
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-D7ALgcL_.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-events.module-UnO7wcUI.mjs +0 -241
- package/fesm2022/posiwise-resource-module-resource-events.module-UnO7wcUI.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-hub.module-UBFt3bki.mjs +0 -244
- package/fesm2022/posiwise-resource-module-resource-hub.module-UBFt3bki.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-integrations.module-D7idZK_y.mjs +0 -295
- package/fesm2022/posiwise-resource-module-resource-integrations.module-D7idZK_y.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-post.module-CR9sCgeR.mjs +0 -334
- package/fesm2022/posiwise-resource-module-resource-post.module-CR9sCgeR.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-release-notes.module-DxRiC1Q4.mjs +0 -110
- package/fesm2022/posiwise-resource-module-resource-release-notes.module-DxRiC1Q4.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-root.module-PmW6b6c0.mjs +0 -398
- package/fesm2022/posiwise-resource-module-resource-root.module-PmW6b6c0.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-videos.module-VJAmMFn-.mjs +0 -68
- package/fesm2022/posiwise-resource-module-resource-videos.module-VJAmMFn-.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-white-papers.module-jsS-ik0o.mjs +0 -70
- package/fesm2022/posiwise-resource-module-resource-white-papers.module-jsS-ik0o.mjs.map +0 -1
|
@@ -0,0 +1,769 @@
|
|
|
1
|
+
import { c as ResourceNoteCardComponent, i as ResourceVaultComponent, n as UpcomingEventCardComponent, o as ResourceCardComponent, r as ResourceVideoCardComponent, s as CaseStudyCardComponent, t as ResourceCardsModule } from "./posiwise-resource-module-resource-cards.module-Bp4BgXL2.mjs";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Component, EventEmitter, Input, NgModule, Output, ViewChild } from "@angular/core";
|
|
4
|
+
import { HelperService } from "@posiwise/helper-service";
|
|
5
|
+
import * as i1$2 from "@posiwise/common-services";
|
|
6
|
+
import * as i1 from "@angular/router";
|
|
7
|
+
import { RouterModule } from "@angular/router";
|
|
8
|
+
import * as i8 from "@posiwise/resource-contact-us";
|
|
9
|
+
import * as i2$1 from "@angular/common";
|
|
10
|
+
import { CommonModule } from "@angular/common";
|
|
11
|
+
import * as i4 from "@angular/forms";
|
|
12
|
+
import { FormsModule } from "@angular/forms";
|
|
13
|
+
import { CoreTranslocoModule } from "@posiwise/core-transloco";
|
|
14
|
+
import * as i5 from "@posiwise/directives";
|
|
15
|
+
import * as i7 from "@posiwise/shared-components";
|
|
16
|
+
import { ResourceSharedComponentsModule } from "@posiwise/shared-components";
|
|
17
|
+
import * as i8$1 from "@jsverse/transloco";
|
|
18
|
+
import { TranslocoModule } from "@jsverse/transloco";
|
|
19
|
+
import { AppBaseComponent } from "@posiwise/app-base-component";
|
|
20
|
+
import * as i1$1 from "@ng-bootstrap/ng-bootstrap";
|
|
21
|
+
import * as i6 from "@posiwise/utils";
|
|
22
|
+
import * as i3 from "@angular/platform-browser";
|
|
23
|
+
import * as i2 from "@posiwise/admin-module-utils";
|
|
24
|
+
var ResourceTagComponent = class ResourceTagComponent extends AppBaseComponent {
|
|
25
|
+
constructor(tagService, cdr, injector) {
|
|
26
|
+
super(injector);
|
|
27
|
+
this.tagService = tagService;
|
|
28
|
+
this.cdr = cdr;
|
|
29
|
+
this.tagsLoaded = new EventEmitter();
|
|
30
|
+
this.tagSelected = new EventEmitter();
|
|
31
|
+
this.tags = [];
|
|
32
|
+
this.loading = true;
|
|
33
|
+
this.loaded = false;
|
|
34
|
+
this.selectedTag = null;
|
|
35
|
+
this.canEditResourcesValue = false;
|
|
36
|
+
}
|
|
37
|
+
ngOnInit() {
|
|
38
|
+
this.localStorage.getItem$("product").subscribe((product) => {
|
|
39
|
+
const data = product ? JSON.parse(product) : null;
|
|
40
|
+
this.subscriptionId = data?.subscriptionId ?? this.appConfig.master_subscription.subscription_id;
|
|
41
|
+
this.cdr.markForCheck();
|
|
42
|
+
});
|
|
43
|
+
this.getTags();
|
|
44
|
+
}
|
|
45
|
+
ngOnChanges(changes) {
|
|
46
|
+
if (changes["user"] || changes["userLoggedIn"]) {
|
|
47
|
+
if (this.userLoggedIn && this.user) this.updateCanEditResourcesValue();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
navigateToTagList() {
|
|
51
|
+
HelperService.navigateToTagList();
|
|
52
|
+
}
|
|
53
|
+
selectTag(tag) {
|
|
54
|
+
this.selectedTag = tag;
|
|
55
|
+
this.tagSelected.emit(tag);
|
|
56
|
+
}
|
|
57
|
+
getTags() {
|
|
58
|
+
this.loading = true;
|
|
59
|
+
this.tagService.getTagsByType("post_categories", {}, this.getEffectiveSubscriptionId()).subscribe((res) => {
|
|
60
|
+
this.tags = (res?.tags ?? []).filter((tag) => tag.visible_in_resources).map((tag) => ({ ...tag }));
|
|
61
|
+
this.tagsLoaded.emit(this.tags);
|
|
62
|
+
this.cdr.markForCheck();
|
|
63
|
+
}).add(() => {
|
|
64
|
+
this.loading = false;
|
|
65
|
+
this.loaded = true;
|
|
66
|
+
this.cdr.markForCheck();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
getEffectiveSubscriptionId() {
|
|
70
|
+
return HelperService.getEffectiveSubscriptionId(this.user, this.subscriptionId, this.appConfig.master_subscription.subscription_id);
|
|
71
|
+
}
|
|
72
|
+
updateCanEditResourcesValue() {
|
|
73
|
+
this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
|
|
74
|
+
}
|
|
75
|
+
canEditResources() {
|
|
76
|
+
return this.canEditResourcesValue;
|
|
77
|
+
}
|
|
78
|
+
static {
|
|
79
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
80
|
+
minVersion: "12.0.0",
|
|
81
|
+
version: "22.2.0",
|
|
82
|
+
ngImport: i0,
|
|
83
|
+
type: ResourceTagComponent,
|
|
84
|
+
deps: [
|
|
85
|
+
{ token: i1$2.TagService },
|
|
86
|
+
{ token: i0.ChangeDetectorRef },
|
|
87
|
+
{ token: i0.Injector }
|
|
88
|
+
],
|
|
89
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
static {
|
|
93
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
94
|
+
minVersion: "17.0.0",
|
|
95
|
+
version: "22.2.0",
|
|
96
|
+
type: ResourceTagComponent,
|
|
97
|
+
isStandalone: false,
|
|
98
|
+
selector: "pw-resource-tags",
|
|
99
|
+
inputs: {
|
|
100
|
+
user: "user",
|
|
101
|
+
userLoggedIn: "userLoggedIn"
|
|
102
|
+
},
|
|
103
|
+
outputs: {
|
|
104
|
+
tagsLoaded: "tagsLoaded",
|
|
105
|
+
tagSelected: "tagSelected"
|
|
106
|
+
},
|
|
107
|
+
usesInheritance: true,
|
|
108
|
+
usesOnChanges: true,
|
|
109
|
+
ngImport: i0,
|
|
110
|
+
template: "@if (loading) {\n <!-- Skeleton — 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",
|
|
111
|
+
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;overflow-wrap:break-word;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: $c0}.hub-post__media[data-cat=\"1\"]{--accent: $c1}.hub-post__media[data-cat=\"2\"]{--accent: $c2}.hub-post__media[data-cat=\"3\"]{--accent: $c3}.hub-post__media[data-cat=\"4\"]{--accent: $c4}.hub-post__media[data-cat=\"5\"]{--accent: $c5}.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: $c0}.hub-post__eyebrow[data-cat=\"1\"]{--cat: $c1}.hub-post__eyebrow[data-cat=\"2\"]{--cat: $c2}.hub-post__eyebrow[data-cat=\"3\"]{--cat: $c3}.hub-post__eyebrow[data-cat=\"4\"]{--cat: $c4}.hub-post__eyebrow[data-cat=\"5\"]{--cat: $c5}.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"],
|
|
112
|
+
dependencies: [{
|
|
113
|
+
kind: "directive",
|
|
114
|
+
type: i2$1.NgClass,
|
|
115
|
+
selector: "[ngClass]",
|
|
116
|
+
inputs: ["class", "ngClass"]
|
|
117
|
+
}],
|
|
118
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
123
|
+
minVersion: "12.0.0",
|
|
124
|
+
version: "22.2.0",
|
|
125
|
+
ngImport: i0,
|
|
126
|
+
type: ResourceTagComponent,
|
|
127
|
+
decorators: [{
|
|
128
|
+
type: Component,
|
|
129
|
+
args: [{
|
|
130
|
+
selector: "pw-resource-tags",
|
|
131
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
132
|
+
standalone: false,
|
|
133
|
+
template: "@if (loading) {\n <!-- Skeleton — 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",
|
|
134
|
+
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;overflow-wrap:break-word;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: $c0}.hub-post__media[data-cat=\"1\"]{--accent: $c1}.hub-post__media[data-cat=\"2\"]{--accent: $c2}.hub-post__media[data-cat=\"3\"]{--accent: $c3}.hub-post__media[data-cat=\"4\"]{--accent: $c4}.hub-post__media[data-cat=\"5\"]{--accent: $c5}.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: $c0}.hub-post__eyebrow[data-cat=\"1\"]{--cat: $c1}.hub-post__eyebrow[data-cat=\"2\"]{--cat: $c2}.hub-post__eyebrow[data-cat=\"3\"]{--cat: $c3}.hub-post__eyebrow[data-cat=\"4\"]{--cat: $c4}.hub-post__eyebrow[data-cat=\"5\"]{--cat: $c5}.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"]
|
|
135
|
+
}]
|
|
136
|
+
}],
|
|
137
|
+
ctorParameters: () => [
|
|
138
|
+
{ type: i1$2.TagService },
|
|
139
|
+
{ type: i0.ChangeDetectorRef },
|
|
140
|
+
{ type: i0.Injector }
|
|
141
|
+
],
|
|
142
|
+
propDecorators: {
|
|
143
|
+
tagsLoaded: [{ type: Output }],
|
|
144
|
+
tagSelected: [{ type: Output }],
|
|
145
|
+
user: [{ type: Input }],
|
|
146
|
+
userLoggedIn: [{ type: Input }]
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
var VaultSectionComponent = class VaultSectionComponent extends AppBaseComponent {
|
|
150
|
+
constructor(injector, modalService, adminService, titleService, cdr) {
|
|
151
|
+
super(injector);
|
|
152
|
+
this.modalService = modalService;
|
|
153
|
+
this.adminService = adminService;
|
|
154
|
+
this.titleService = titleService;
|
|
155
|
+
this.cdr = cdr;
|
|
156
|
+
this.resourceTagLine = this.appConfig.pages_config?.resources.resources_tagline;
|
|
157
|
+
this.resourceImage = this.appConfig.pages_config?.resources.resources_image.url;
|
|
158
|
+
this.resourceDescription = this.appConfig.pages_config?.resources.resources_description;
|
|
159
|
+
this.domainId = this.appConfig.domain_id;
|
|
160
|
+
this.image = null;
|
|
161
|
+
this.file = null;
|
|
162
|
+
this.editingTagline = "";
|
|
163
|
+
this.editingDescription = "";
|
|
164
|
+
this.canEditResourcesValue = false;
|
|
165
|
+
}
|
|
166
|
+
ngOnInit() {
|
|
167
|
+
this.previewResourceImage = {
|
|
168
|
+
url: this.appConfig.pages_config?.resources.resources_image.url ?? "",
|
|
169
|
+
name: "resources_image.png"
|
|
170
|
+
};
|
|
171
|
+
this.companyName = this.appConfig?.company.name;
|
|
172
|
+
this.scheduleSEOMetadataUpdate();
|
|
173
|
+
}
|
|
174
|
+
ngOnChanges(changes) {
|
|
175
|
+
if (changes["user"] || changes["userLoggedIn"]) {
|
|
176
|
+
if (this.userLoggedIn && this.user) {
|
|
177
|
+
this.permissionService.user = this.user;
|
|
178
|
+
this.updateCanEditResourcesValue();
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
scheduleSEOMetadataUpdate() {
|
|
183
|
+
this.clearSEOTimer();
|
|
184
|
+
this.seoUpdateTimer = setTimeout(() => {
|
|
185
|
+
this.updateSEOMetadata();
|
|
186
|
+
this.seoUpdateTimer = null;
|
|
187
|
+
}, 2e3);
|
|
188
|
+
}
|
|
189
|
+
clearSEOTimer() {
|
|
190
|
+
if (this.seoUpdateTimer) {
|
|
191
|
+
clearTimeout(this.seoUpdateTimer);
|
|
192
|
+
this.seoUpdateTimer = null;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
updateSEOMetadata() {
|
|
196
|
+
if (this.resourceTagLine) this.titleService.setTitle(this.resourceTagLine);
|
|
197
|
+
if (this.resourceDescription) this.updateMetaDescription(this.resourceDescription);
|
|
198
|
+
}
|
|
199
|
+
updateMetaDescription(description) {
|
|
200
|
+
let metaDescription = document.querySelector("meta[name=\"description\"]");
|
|
201
|
+
if (!metaDescription) {
|
|
202
|
+
metaDescription = document.createElement("meta");
|
|
203
|
+
metaDescription.setAttribute("name", "description");
|
|
204
|
+
document.head.appendChild(metaDescription);
|
|
205
|
+
}
|
|
206
|
+
metaDescription.setAttribute("content", description);
|
|
207
|
+
}
|
|
208
|
+
openEditResourceModal() {
|
|
209
|
+
this.editingTagline = this.resourceTagLine;
|
|
210
|
+
this.editingDescription = this.resourceDescription;
|
|
211
|
+
this.image = this.resourceImage;
|
|
212
|
+
this.file = null;
|
|
213
|
+
this.modalService.open(this.editResourceModalRef, { centered: true });
|
|
214
|
+
}
|
|
215
|
+
saveResourceContent(modal) {
|
|
216
|
+
const formData = new FormData();
|
|
217
|
+
formData.append("subscription_id", this.getEffectiveSubscriptionId().toString());
|
|
218
|
+
formData.append("resources_tagline", this.editingTagline || "");
|
|
219
|
+
formData.append("resources_description", this.editingDescription || "");
|
|
220
|
+
if (this.file) formData.append("resources_image", this.file);
|
|
221
|
+
else if (!this.image) formData.append("remove_resources_image", "true");
|
|
222
|
+
this.adminService.updateDomainConfig(this.appConfig?.domain_id, formData).subscribe(() => {
|
|
223
|
+
this.resourceTagLine = this.editingTagline;
|
|
224
|
+
this.resourceDescription = this.editingDescription;
|
|
225
|
+
this.resourceImage = this.image;
|
|
226
|
+
this.toast.success("Resources updated");
|
|
227
|
+
modal.close();
|
|
228
|
+
this.updateSEOMetadata();
|
|
229
|
+
this.cdr.markForCheck();
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
openImageModal(modalTemplate) {
|
|
233
|
+
this.imageModalRef = this.modalService.open(modalTemplate, {
|
|
234
|
+
centered: true,
|
|
235
|
+
size: "md"
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
onImageSelected(base64) {
|
|
239
|
+
this.image = base64;
|
|
240
|
+
this.file = HelperService.convertBase64ToFile(base64);
|
|
241
|
+
this.imageModalRef?.close();
|
|
242
|
+
}
|
|
243
|
+
removeImage() {
|
|
244
|
+
this.image = null;
|
|
245
|
+
this.file = null;
|
|
246
|
+
}
|
|
247
|
+
ngOnDestroy() {
|
|
248
|
+
this.clearSEOTimer();
|
|
249
|
+
}
|
|
250
|
+
getEffectiveSubscriptionId() {
|
|
251
|
+
return HelperService.getEffectiveSubscriptionId(this.user, this.subscriptionId, this.appConfig.master_subscription.subscription_id);
|
|
252
|
+
}
|
|
253
|
+
handleImageError(event, fallbackPath) {
|
|
254
|
+
HelperService.handleImageFallbackPath(event, fallbackPath);
|
|
255
|
+
}
|
|
256
|
+
updateCanEditResourcesValue() {
|
|
257
|
+
if (this.userLoggedIn && this.user) this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
|
|
258
|
+
else this.canEditResourcesValue = false;
|
|
259
|
+
}
|
|
260
|
+
canEditResources() {
|
|
261
|
+
return this.canEditResourcesValue;
|
|
262
|
+
}
|
|
263
|
+
static {
|
|
264
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
265
|
+
minVersion: "12.0.0",
|
|
266
|
+
version: "22.2.0",
|
|
267
|
+
ngImport: i0,
|
|
268
|
+
type: VaultSectionComponent,
|
|
269
|
+
deps: [
|
|
270
|
+
{ token: i0.Injector },
|
|
271
|
+
{ token: i1$1.NgbModal },
|
|
272
|
+
{ token: i2.AdminService },
|
|
273
|
+
{ token: i3.Title },
|
|
274
|
+
{ token: i0.ChangeDetectorRef }
|
|
275
|
+
],
|
|
276
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
static {
|
|
280
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
281
|
+
minVersion: "17.0.0",
|
|
282
|
+
version: "22.2.0",
|
|
283
|
+
type: VaultSectionComponent,
|
|
284
|
+
isStandalone: false,
|
|
285
|
+
selector: "pw-vault-section",
|
|
286
|
+
inputs: {
|
|
287
|
+
user: "user",
|
|
288
|
+
userLoggedIn: "userLoggedIn"
|
|
289
|
+
},
|
|
290
|
+
viewQueries: [{
|
|
291
|
+
propertyName: "editResourceModalRef",
|
|
292
|
+
first: true,
|
|
293
|
+
predicate: ["editResourceModal"],
|
|
294
|
+
descendants: true
|
|
295
|
+
}],
|
|
296
|
+
usesInheritance: true,
|
|
297
|
+
usesOnChanges: true,
|
|
298
|
+
ngImport: i0,
|
|
299
|
+
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 aria-label=\"Edit Tagline\" />\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\"\n aria-label=\"Editing Description\"></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",
|
|
300
|
+
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"],
|
|
301
|
+
dependencies: [
|
|
302
|
+
{
|
|
303
|
+
kind: "directive",
|
|
304
|
+
type: i4.DefaultValueAccessor,
|
|
305
|
+
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]"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
kind: "directive",
|
|
309
|
+
type: i4.NgControlStatus,
|
|
310
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
kind: "directive",
|
|
314
|
+
type: i4.NgModel,
|
|
315
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
316
|
+
inputs: [
|
|
317
|
+
"name",
|
|
318
|
+
"disabled",
|
|
319
|
+
"ngModel",
|
|
320
|
+
"ngModelOptions"
|
|
321
|
+
],
|
|
322
|
+
outputs: ["ngModelChange"],
|
|
323
|
+
exportAs: ["ngModel"]
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
kind: "directive",
|
|
327
|
+
type: i5.LazyImgDirective,
|
|
328
|
+
selector: "img"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
kind: "component",
|
|
332
|
+
type: i6.ProfileImageCropperComponent,
|
|
333
|
+
selector: "pw-image-cropper",
|
|
334
|
+
inputs: ["aspectRatio", "dynamicData"],
|
|
335
|
+
outputs: [
|
|
336
|
+
"imageSelectionEvent",
|
|
337
|
+
"closeEvent",
|
|
338
|
+
"fileChangeEvent"
|
|
339
|
+
]
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
kind: "component",
|
|
343
|
+
type: i7.NoDataComponent,
|
|
344
|
+
selector: "pw-no-data",
|
|
345
|
+
inputs: [
|
|
346
|
+
"message",
|
|
347
|
+
"description",
|
|
348
|
+
"withImage"
|
|
349
|
+
]
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
kind: "pipe",
|
|
353
|
+
type: i8$1.TranslocoPipe,
|
|
354
|
+
name: "transloco"
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
362
|
+
minVersion: "12.0.0",
|
|
363
|
+
version: "22.2.0",
|
|
364
|
+
ngImport: i0,
|
|
365
|
+
type: VaultSectionComponent,
|
|
366
|
+
decorators: [{
|
|
367
|
+
type: Component,
|
|
368
|
+
args: [{
|
|
369
|
+
selector: "pw-vault-section",
|
|
370
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
371
|
+
standalone: false,
|
|
372
|
+
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 aria-label=\"Edit Tagline\" />\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\"\n aria-label=\"Editing Description\"></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",
|
|
373
|
+
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"]
|
|
374
|
+
}]
|
|
375
|
+
}],
|
|
376
|
+
ctorParameters: () => [
|
|
377
|
+
{ type: i0.Injector },
|
|
378
|
+
{ type: i1$1.NgbModal },
|
|
379
|
+
{ type: i2.AdminService },
|
|
380
|
+
{ type: i3.Title },
|
|
381
|
+
{ type: i0.ChangeDetectorRef }
|
|
382
|
+
],
|
|
383
|
+
propDecorators: {
|
|
384
|
+
editResourceModalRef: [{
|
|
385
|
+
type: ViewChild,
|
|
386
|
+
args: ["editResourceModal"]
|
|
387
|
+
}],
|
|
388
|
+
user: [{ type: Input }],
|
|
389
|
+
userLoggedIn: [{ type: Input }]
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
var ResourceComponent = class ResourceComponent extends AppBaseComponent {
|
|
393
|
+
constructor(authService, cdr, injector) {
|
|
394
|
+
super(injector);
|
|
395
|
+
this.authService = authService;
|
|
396
|
+
this.cdr = cdr;
|
|
397
|
+
this.allTags = [];
|
|
398
|
+
}
|
|
399
|
+
ngOnInit() {
|
|
400
|
+
this.authService.getToken$().subscribe((res) => {
|
|
401
|
+
this.userLoggedIn = !!res;
|
|
402
|
+
this.cdr.markForCheck();
|
|
403
|
+
if (this.userLoggedIn) this.userService.getUserInfo().subscribe((data) => {
|
|
404
|
+
this.user = data;
|
|
405
|
+
this.cdr.markForCheck();
|
|
406
|
+
});
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
onTagsLoaded(tags) {
|
|
410
|
+
this.allTags = tags;
|
|
411
|
+
this.cdr.markForCheck();
|
|
412
|
+
}
|
|
413
|
+
hasTag(name) {
|
|
414
|
+
return this.allTags.some((tag) => tag.name?.toLowerCase() === name.toLowerCase());
|
|
415
|
+
}
|
|
416
|
+
getCategoryIdByTagName(name) {
|
|
417
|
+
return this.allTags.find((t) => t.name?.toLowerCase() === name.toLowerCase())?.tag_category_id;
|
|
418
|
+
}
|
|
419
|
+
getTag(name) {
|
|
420
|
+
return this.allTags.find((t) => t.name?.toLowerCase() === name.toLowerCase());
|
|
421
|
+
}
|
|
422
|
+
getTitleByTagName(name) {
|
|
423
|
+
return this.allTags.find((t) => t.name?.toLowerCase() === name.toLowerCase())?.title;
|
|
424
|
+
}
|
|
425
|
+
scrollToTag(tag) {
|
|
426
|
+
const sectionId = {
|
|
427
|
+
Videos: "videos",
|
|
428
|
+
Events: "events",
|
|
429
|
+
"Blog Posts": "blog-posts",
|
|
430
|
+
"Case Studies": "case-studies",
|
|
431
|
+
"White Papers": "white-papers",
|
|
432
|
+
"Product Release Notes": "product-release-notes"
|
|
433
|
+
}[tag.name?.trim()];
|
|
434
|
+
if (sectionId) setTimeout(() => {
|
|
435
|
+
const el = document.getElementById(sectionId);
|
|
436
|
+
if (el) el.scrollIntoView({
|
|
437
|
+
behavior: "smooth",
|
|
438
|
+
block: "start"
|
|
439
|
+
});
|
|
440
|
+
}, 100);
|
|
441
|
+
}
|
|
442
|
+
onVaultLoaded(isLoaded) {
|
|
443
|
+
this.isFooterLoaded = isLoaded;
|
|
444
|
+
}
|
|
445
|
+
static {
|
|
446
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
447
|
+
minVersion: "12.0.0",
|
|
448
|
+
version: "22.2.0",
|
|
449
|
+
ngImport: i0,
|
|
450
|
+
type: ResourceComponent,
|
|
451
|
+
deps: [
|
|
452
|
+
{ token: i1$2.AuthService },
|
|
453
|
+
{ token: i0.ChangeDetectorRef },
|
|
454
|
+
{ token: i0.Injector }
|
|
455
|
+
],
|
|
456
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
static {
|
|
460
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
461
|
+
minVersion: "17.0.0",
|
|
462
|
+
version: "22.2.0",
|
|
463
|
+
type: ResourceComponent,
|
|
464
|
+
isStandalone: false,
|
|
465
|
+
selector: "pw-resources",
|
|
466
|
+
usesInheritance: true,
|
|
467
|
+
ngImport: i0,
|
|
468
|
+
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}",
|
|
469
|
+
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"],
|
|
470
|
+
dependencies: [
|
|
471
|
+
{
|
|
472
|
+
kind: "component",
|
|
473
|
+
type: ResourceVideoCardComponent,
|
|
474
|
+
selector: "pw-resource-video-card",
|
|
475
|
+
inputs: [
|
|
476
|
+
"showVideoSection",
|
|
477
|
+
"categoryId",
|
|
478
|
+
"tag",
|
|
479
|
+
"postSlice",
|
|
480
|
+
"resourceTitle",
|
|
481
|
+
"user",
|
|
482
|
+
"userLoggedIn"
|
|
483
|
+
]
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
kind: "component",
|
|
487
|
+
type: UpcomingEventCardComponent,
|
|
488
|
+
selector: "pw-upcoming-event-card",
|
|
489
|
+
inputs: [
|
|
490
|
+
"showEventContent",
|
|
491
|
+
"categoryId",
|
|
492
|
+
"tag",
|
|
493
|
+
"postSlice",
|
|
494
|
+
"resourceTitle",
|
|
495
|
+
"user",
|
|
496
|
+
"userLoggedIn"
|
|
497
|
+
]
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
kind: "component",
|
|
501
|
+
type: ResourceCardComponent,
|
|
502
|
+
selector: "pw-resource-cards",
|
|
503
|
+
inputs: [
|
|
504
|
+
"categoryId",
|
|
505
|
+
"isHeaderVisible",
|
|
506
|
+
"isRelated",
|
|
507
|
+
"resourceTitle",
|
|
508
|
+
"postSlice",
|
|
509
|
+
"header",
|
|
510
|
+
"tag",
|
|
511
|
+
"resourceLink",
|
|
512
|
+
"user",
|
|
513
|
+
"userLoggedIn"
|
|
514
|
+
]
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
kind: "component",
|
|
518
|
+
type: CaseStudyCardComponent,
|
|
519
|
+
selector: "pw-case-studies-card",
|
|
520
|
+
inputs: [
|
|
521
|
+
"showCaseStudyHeader",
|
|
522
|
+
"categoryId",
|
|
523
|
+
"postSlice",
|
|
524
|
+
"tag",
|
|
525
|
+
"resourceTitle",
|
|
526
|
+
"user",
|
|
527
|
+
"userLoggedIn"
|
|
528
|
+
]
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
kind: "component",
|
|
532
|
+
type: ResourceNoteCardComponent,
|
|
533
|
+
selector: "pw-resource-note-card",
|
|
534
|
+
inputs: [
|
|
535
|
+
"releaseHeader",
|
|
536
|
+
"categoryId",
|
|
537
|
+
"isReleasePress",
|
|
538
|
+
"isResource",
|
|
539
|
+
"postSlice",
|
|
540
|
+
"resourceTitle",
|
|
541
|
+
"tag",
|
|
542
|
+
"user",
|
|
543
|
+
"userLoggedIn"
|
|
544
|
+
]
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
kind: "component",
|
|
548
|
+
type: ResourceVaultComponent,
|
|
549
|
+
selector: "pw-resource--vault",
|
|
550
|
+
inputs: [
|
|
551
|
+
"showVaultSection",
|
|
552
|
+
"postSlice",
|
|
553
|
+
"categoryId",
|
|
554
|
+
"resourceTitle",
|
|
555
|
+
"tag"
|
|
556
|
+
],
|
|
557
|
+
outputs: ["isLoadedChange"]
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
kind: "component",
|
|
561
|
+
type: i8.Trial4ContactUsComponent,
|
|
562
|
+
selector: "pw-trial-4-contact-us",
|
|
563
|
+
inputs: [
|
|
564
|
+
"subscriptionId",
|
|
565
|
+
"sourceId",
|
|
566
|
+
"masterSubscriptionId",
|
|
567
|
+
"experimentName",
|
|
568
|
+
"microserviceName",
|
|
569
|
+
"shardName",
|
|
570
|
+
"user",
|
|
571
|
+
"userLoggedIn"
|
|
572
|
+
]
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
kind: "component",
|
|
576
|
+
type: i6.ResourceHeaderComponent,
|
|
577
|
+
selector: "pw-resource-header",
|
|
578
|
+
inputs: ["user", "userLoggedIn"]
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
kind: "component",
|
|
582
|
+
type: ResourceTagComponent,
|
|
583
|
+
selector: "pw-resource-tags",
|
|
584
|
+
inputs: ["user", "userLoggedIn"],
|
|
585
|
+
outputs: ["tagsLoaded", "tagSelected"]
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
kind: "component",
|
|
589
|
+
type: VaultSectionComponent,
|
|
590
|
+
selector: "pw-vault-section",
|
|
591
|
+
inputs: ["user", "userLoggedIn"]
|
|
592
|
+
}
|
|
593
|
+
],
|
|
594
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
599
|
+
minVersion: "12.0.0",
|
|
600
|
+
version: "22.2.0",
|
|
601
|
+
ngImport: i0,
|
|
602
|
+
type: ResourceComponent,
|
|
603
|
+
decorators: [{
|
|
604
|
+
type: Component,
|
|
605
|
+
args: [{
|
|
606
|
+
selector: "pw-resources",
|
|
607
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
608
|
+
standalone: false,
|
|
609
|
+
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}",
|
|
610
|
+
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"]
|
|
611
|
+
}]
|
|
612
|
+
}],
|
|
613
|
+
ctorParameters: () => [
|
|
614
|
+
{ type: i1$2.AuthService },
|
|
615
|
+
{ type: i0.ChangeDetectorRef },
|
|
616
|
+
{ type: i0.Injector }
|
|
617
|
+
]
|
|
618
|
+
});
|
|
619
|
+
var ResourceRootSharedModule = class ResourceRootSharedModule {
|
|
620
|
+
static {
|
|
621
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
622
|
+
minVersion: "12.0.0",
|
|
623
|
+
version: "22.2.0",
|
|
624
|
+
ngImport: i0,
|
|
625
|
+
type: ResourceRootSharedModule,
|
|
626
|
+
deps: [],
|
|
627
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
static {
|
|
631
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
632
|
+
minVersion: "14.0.0",
|
|
633
|
+
version: "22.2.0",
|
|
634
|
+
ngImport: i0,
|
|
635
|
+
type: ResourceRootSharedModule,
|
|
636
|
+
imports: [
|
|
637
|
+
CommonModule,
|
|
638
|
+
FormsModule,
|
|
639
|
+
CoreTranslocoModule,
|
|
640
|
+
TranslocoModule,
|
|
641
|
+
ResourceSharedComponentsModule,
|
|
642
|
+
ResourceCardsModule
|
|
643
|
+
],
|
|
644
|
+
exports: [
|
|
645
|
+
ResourceCardsModule,
|
|
646
|
+
CommonModule,
|
|
647
|
+
FormsModule,
|
|
648
|
+
CoreTranslocoModule,
|
|
649
|
+
TranslocoModule,
|
|
650
|
+
ResourceSharedComponentsModule
|
|
651
|
+
]
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
static {
|
|
655
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
656
|
+
minVersion: "12.0.0",
|
|
657
|
+
version: "22.2.0",
|
|
658
|
+
ngImport: i0,
|
|
659
|
+
type: ResourceRootSharedModule,
|
|
660
|
+
imports: [
|
|
661
|
+
CommonModule,
|
|
662
|
+
FormsModule,
|
|
663
|
+
CoreTranslocoModule,
|
|
664
|
+
TranslocoModule,
|
|
665
|
+
ResourceSharedComponentsModule,
|
|
666
|
+
ResourceCardsModule,
|
|
667
|
+
ResourceCardsModule,
|
|
668
|
+
CommonModule,
|
|
669
|
+
FormsModule,
|
|
670
|
+
CoreTranslocoModule,
|
|
671
|
+
TranslocoModule,
|
|
672
|
+
ResourceSharedComponentsModule
|
|
673
|
+
]
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
678
|
+
minVersion: "12.0.0",
|
|
679
|
+
version: "22.2.0",
|
|
680
|
+
ngImport: i0,
|
|
681
|
+
type: ResourceRootSharedModule,
|
|
682
|
+
decorators: [{
|
|
683
|
+
type: NgModule,
|
|
684
|
+
args: [{
|
|
685
|
+
imports: [
|
|
686
|
+
CommonModule,
|
|
687
|
+
FormsModule,
|
|
688
|
+
CoreTranslocoModule,
|
|
689
|
+
TranslocoModule,
|
|
690
|
+
ResourceSharedComponentsModule,
|
|
691
|
+
ResourceCardsModule
|
|
692
|
+
],
|
|
693
|
+
exports: [
|
|
694
|
+
ResourceCardsModule,
|
|
695
|
+
CommonModule,
|
|
696
|
+
FormsModule,
|
|
697
|
+
CoreTranslocoModule,
|
|
698
|
+
TranslocoModule,
|
|
699
|
+
ResourceSharedComponentsModule
|
|
700
|
+
],
|
|
701
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
702
|
+
}]
|
|
703
|
+
}]
|
|
704
|
+
});
|
|
705
|
+
const routes = [{
|
|
706
|
+
path: "",
|
|
707
|
+
component: ResourceComponent,
|
|
708
|
+
data: {
|
|
709
|
+
title: "Resources Library",
|
|
710
|
+
permission: "Pages.Blog",
|
|
711
|
+
preload: false
|
|
712
|
+
}
|
|
713
|
+
}];
|
|
714
|
+
var ResourceRootModule = class ResourceRootModule {
|
|
715
|
+
static {
|
|
716
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
717
|
+
minVersion: "12.0.0",
|
|
718
|
+
version: "22.2.0",
|
|
719
|
+
ngImport: i0,
|
|
720
|
+
type: ResourceRootModule,
|
|
721
|
+
deps: [],
|
|
722
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
static {
|
|
726
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
727
|
+
minVersion: "14.0.0",
|
|
728
|
+
version: "22.2.0",
|
|
729
|
+
ngImport: i0,
|
|
730
|
+
type: ResourceRootModule,
|
|
731
|
+
declarations: [
|
|
732
|
+
ResourceComponent,
|
|
733
|
+
ResourceTagComponent,
|
|
734
|
+
VaultSectionComponent
|
|
735
|
+
],
|
|
736
|
+
imports: [ResourceRootSharedModule, i1.RouterModule]
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
static {
|
|
740
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
741
|
+
minVersion: "12.0.0",
|
|
742
|
+
version: "22.2.0",
|
|
743
|
+
ngImport: i0,
|
|
744
|
+
type: ResourceRootModule,
|
|
745
|
+
imports: [ResourceRootSharedModule, RouterModule.forChild(routes)]
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
};
|
|
749
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
750
|
+
minVersion: "12.0.0",
|
|
751
|
+
version: "22.2.0",
|
|
752
|
+
ngImport: i0,
|
|
753
|
+
type: ResourceRootModule,
|
|
754
|
+
decorators: [{
|
|
755
|
+
type: NgModule,
|
|
756
|
+
args: [{
|
|
757
|
+
declarations: [
|
|
758
|
+
ResourceComponent,
|
|
759
|
+
ResourceTagComponent,
|
|
760
|
+
VaultSectionComponent
|
|
761
|
+
],
|
|
762
|
+
imports: [ResourceRootSharedModule, RouterModule.forChild(routes)],
|
|
763
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
764
|
+
}]
|
|
765
|
+
}]
|
|
766
|
+
});
|
|
767
|
+
export { ResourceRootModule };
|
|
768
|
+
|
|
769
|
+
//# sourceMappingURL=posiwise-resource-module-resource-root.module-DP0EMP-_.mjs.map
|