@posiwise/resource-module 0.0.183 → 0.0.185

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.
Files changed (105) hide show
  1. package/fesm2022/{posiwise-resource-module-base-top-banner.component-Dd-cEWOK.mjs → posiwise-resource-module-base-top-banner.component-BxV9TVG1.mjs} +15 -7
  2. package/fesm2022/posiwise-resource-module-base-top-banner.component-BxV9TVG1.mjs.map +1 -0
  3. package/fesm2022/posiwise-resource-module-posiwise-resource-module-DfgyQYhP.mjs +1870 -0
  4. package/fesm2022/posiwise-resource-module-posiwise-resource-module-DfgyQYhP.mjs.map +1 -0
  5. package/fesm2022/posiwise-resource-module-resource-blogs.module-DHqU4Ypf.mjs +68 -0
  6. package/fesm2022/posiwise-resource-module-resource-blogs.module-DHqU4Ypf.mjs.map +1 -0
  7. package/fesm2022/posiwise-resource-module-resource-case-studies.module-DghO167h.mjs +134 -0
  8. package/fesm2022/posiwise-resource-module-resource-case-studies.module-DghO167h.mjs.map +1 -0
  9. package/fesm2022/posiwise-resource-module-resource-events.module-DtZaPh7n.mjs +240 -0
  10. package/fesm2022/posiwise-resource-module-resource-events.module-DtZaPh7n.mjs.map +1 -0
  11. package/fesm2022/posiwise-resource-module-resource-hub.module-jxpqriFN.mjs +241 -0
  12. package/fesm2022/posiwise-resource-module-resource-hub.module-jxpqriFN.mjs.map +1 -0
  13. package/fesm2022/posiwise-resource-module-resource-integrations.module-xg0Ziiw8.mjs +294 -0
  14. package/fesm2022/posiwise-resource-module-resource-integrations.module-xg0Ziiw8.mjs.map +1 -0
  15. package/fesm2022/posiwise-resource-module-resource-post.module-DcudivrB.mjs +314 -0
  16. package/fesm2022/posiwise-resource-module-resource-post.module-DcudivrB.mjs.map +1 -0
  17. package/fesm2022/posiwise-resource-module-resource-release-notes.module-CuQLcCDR.mjs +109 -0
  18. package/fesm2022/posiwise-resource-module-resource-release-notes.module-CuQLcCDR.mjs.map +1 -0
  19. package/fesm2022/posiwise-resource-module-resource-root.module-gVu6s-NV.mjs +398 -0
  20. package/fesm2022/posiwise-resource-module-resource-root.module-gVu6s-NV.mjs.map +1 -0
  21. package/fesm2022/posiwise-resource-module-resource-videos.module-xt6vq-z-.mjs +68 -0
  22. package/fesm2022/posiwise-resource-module-resource-videos.module-xt6vq-z-.mjs.map +1 -0
  23. package/fesm2022/posiwise-resource-module-resource-white-papers.module-Bm2M2II6.mjs +69 -0
  24. package/fesm2022/posiwise-resource-module-resource-white-papers.module-Bm2M2II6.mjs.map +1 -0
  25. package/fesm2022/posiwise-resource-module.mjs +1 -1
  26. package/package.json +6 -6
  27. package/types/posiwise-resource-module.d.ts +521 -0
  28. package/fesm2022/posiwise-resource-module-base-top-banner.component-Dd-cEWOK.mjs.map +0 -1
  29. package/fesm2022/posiwise-resource-module-posiwise-resource-module-CWeJVSOI.mjs +0 -1802
  30. package/fesm2022/posiwise-resource-module-posiwise-resource-module-CWeJVSOI.mjs.map +0 -1
  31. package/fesm2022/posiwise-resource-module-resource-blogs.module-DF9jSJ0X.mjs +0 -69
  32. package/fesm2022/posiwise-resource-module-resource-blogs.module-DF9jSJ0X.mjs.map +0 -1
  33. package/fesm2022/posiwise-resource-module-resource-case-studies.module-BeMlmXY-.mjs +0 -133
  34. package/fesm2022/posiwise-resource-module-resource-case-studies.module-BeMlmXY-.mjs.map +0 -1
  35. package/fesm2022/posiwise-resource-module-resource-events.module-DsvJFj3K.mjs +0 -228
  36. package/fesm2022/posiwise-resource-module-resource-events.module-DsvJFj3K.mjs.map +0 -1
  37. package/fesm2022/posiwise-resource-module-resource-hub.module-FmZJs_UC.mjs +0 -233
  38. package/fesm2022/posiwise-resource-module-resource-hub.module-FmZJs_UC.mjs.map +0 -1
  39. package/fesm2022/posiwise-resource-module-resource-integrations.module-CGlY0hNK.mjs +0 -284
  40. package/fesm2022/posiwise-resource-module-resource-integrations.module-CGlY0hNK.mjs.map +0 -1
  41. package/fesm2022/posiwise-resource-module-resource-post.module-BYxES6zP.mjs +0 -294
  42. package/fesm2022/posiwise-resource-module-resource-post.module-BYxES6zP.mjs.map +0 -1
  43. package/fesm2022/posiwise-resource-module-resource-release-notes.module-D5r9nNZn.mjs +0 -104
  44. package/fesm2022/posiwise-resource-module-resource-release-notes.module-D5r9nNZn.mjs.map +0 -1
  45. package/fesm2022/posiwise-resource-module-resource-root.module-BP_9gdii.mjs +0 -392
  46. package/fesm2022/posiwise-resource-module-resource-root.module-BP_9gdii.mjs.map +0 -1
  47. package/fesm2022/posiwise-resource-module-resource-videos.module-BGOf2jrC.mjs +0 -69
  48. package/fesm2022/posiwise-resource-module-resource-videos.module-BGOf2jrC.mjs.map +0 -1
  49. package/fesm2022/posiwise-resource-module-resource-white-papers.module-WOMqD8QC.mjs +0 -70
  50. package/fesm2022/posiwise-resource-module-resource-white-papers.module-WOMqD8QC.mjs.map +0 -1
  51. package/index.d.ts +0 -19
  52. package/lib/public/components/base/base-resource.component.d.ts +0 -43
  53. package/lib/public/components/base/base-top-banner.component.d.ts +0 -38
  54. package/lib/public/components/reslease-note-card/release-note-card.component.d.ts +0 -57
  55. package/lib/public/components/resource-blogs/resource-blog-top-banner/resource-blog-top-banner.component.d.ts +0 -12
  56. package/lib/public/components/resource-blogs/resource-blog.component.d.ts +0 -11
  57. package/lib/public/components/resource-case-studies/case-studies-cards/case-studies-cards.component.d.ts +0 -40
  58. package/lib/public/components/resource-case-studies/resource-case-studies.component.d.ts +0 -20
  59. package/lib/public/components/resource-company-card/resource-company-card.component.d.ts +0 -39
  60. package/lib/public/components/resource-contact-us/resource-contact-us.module.d.ts +0 -7
  61. package/lib/public/components/resource-edit-card/resource-edit-card.component.d.ts +0 -52
  62. package/lib/public/components/resource-edit-card-lazy/resource-edit-card-lazy.component.d.ts +0 -19
  63. package/lib/public/components/resource-integration/integration-top-banner/integration-top-banner.component.d.ts +0 -12
  64. package/lib/public/components/resource-integration/resource-integration.component.d.ts +0 -89
  65. package/lib/public/components/resource-post/related-resources/related-resources.component.d.ts +0 -46
  66. package/lib/public/components/resource-post/related-resources/resource-cards/resource-cards.component.d.ts +0 -40
  67. package/lib/public/components/resource-post/resource-post-details/resource-post-details.component.d.ts +0 -71
  68. package/lib/public/components/resource-post/resource-post.component.d.ts +0 -17
  69. package/lib/public/components/resource-release-notes/resource-release-notes-top-banner/resource-release-notes-top-banner.component.d.ts +0 -12
  70. package/lib/public/components/resource-release-notes/resource-release-notes.component.d.ts +0 -23
  71. package/lib/public/components/resource-top-banner-edit/resource-top-banner-edit.component.d.ts +0 -37
  72. package/lib/public/components/resource-vault/resource-vault.component.d.ts +0 -23
  73. package/lib/public/components/resource-videos/resource-video-cards/resource-video-cards.component.d.ts +0 -48
  74. package/lib/public/components/resource-videos/resource-videos-top-banner/resource-videos-top-banner.component.d.ts +0 -12
  75. package/lib/public/components/resource-videos/resource-videos.component.d.ts +0 -11
  76. package/lib/public/components/resource-webinars/replay-event-cards/replay-event-cards.component.d.ts +0 -33
  77. package/lib/public/components/resource-webinars/resource-webinars.component.d.ts +0 -36
  78. package/lib/public/components/resource-webinars/upcoming-event-cards/upcoming-event-cards.component.d.ts +0 -44
  79. package/lib/public/components/resources/resource-tags/resource-tags.component.d.ts +0 -31
  80. package/lib/public/components/resources/resources.component.d.ts +0 -24
  81. package/lib/public/components/resources/vault-section/vault-section.component.d.ts +0 -54
  82. package/lib/public/components/resources-hub/resources-hub.component.d.ts +0 -52
  83. package/lib/public/components/testimonial-card/testimonial-card.component.d.ts +0 -14
  84. package/lib/public/components/white-papers/white-papers-top-banner/white-papers-top-banner.component.d.ts +0 -12
  85. package/lib/public/components/white-papers/white-papers.component.d.ts +0 -11
  86. package/lib/public/modules/blogs/resource-blogs.module.d.ts +0 -10
  87. package/lib/public/modules/case-studies/resource-case-studies.module.d.ts +0 -10
  88. package/lib/public/modules/events/resource-events.module.d.ts +0 -10
  89. package/lib/public/modules/hub/resource-hub.module.d.ts +0 -9
  90. package/lib/public/modules/integrations/resource-integrations.module.d.ts +0 -10
  91. package/lib/public/modules/post/resource-post.module.d.ts +0 -11
  92. package/lib/public/modules/release-notes/resource-release-notes.module.d.ts +0 -10
  93. package/lib/public/modules/root/resource-root-shared.module.d.ts +0 -17
  94. package/lib/public/modules/root/resource-root.module.d.ts +0 -11
  95. package/lib/public/modules/videos/resource-videos.module.d.ts +0 -10
  96. package/lib/public/modules/white-papers/resource-white-papers.module.d.ts +0 -10
  97. package/lib/public/resource-public.module.d.ts +0 -7
  98. package/lib/public/resource-public.routing.module.d.ts +0 -7
  99. package/lib/public/shared/resource-cards.module.d.ts +0 -32
  100. package/lib/public/shared/resource-edit.module.d.ts +0 -22
  101. package/lib/public/shared/resource-shared.module.d.ts +0 -20
  102. package/lib/resource.module.d.ts +0 -7
  103. package/lib/resource.service.d.ts +0 -21
  104. package/lib/shared/models/resource.model.d.ts +0 -3
  105. package/lib/shared/resource-modal.interface.d.ts +0 -6
@@ -0,0 +1,1870 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, NgModule, CUSTOM_ELEMENTS_SCHEMA, EventEmitter, ViewContainerRef, Output, Input, ViewChild, Component, ChangeDetectionStrategy } from '@angular/core';
3
+ import * as i2 from '@posiwise/common-services';
4
+ import { HelperService } from '@posiwise/helper-service';
5
+ import * as i1 from '@angular/router';
6
+ import { RouterModule } from '@angular/router';
7
+ import { Trial4SharedContactUsModule } from '@posiwise/resource-contact-us';
8
+ import * as i3 from '@angular/common';
9
+ import { CommonModule } from '@angular/common';
10
+ import * as i5$2 from '@angular/forms';
11
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
12
+ import { HubSpotMeetingsSharedModule } from '@posiwise/alpha-module';
13
+ import { CoreTranslocoModule } from '@posiwise/core-transloco';
14
+ import * as i5 from '@posiwise/directives';
15
+ import { DirectivesModule } from '@posiwise/directives';
16
+ import { PipesModule } from '@posiwise/pipes';
17
+ import * as i6 from '@posiwise/shared-components';
18
+ import { ResourceSharedComponentsModule } from '@posiwise/shared-components';
19
+ import { InputTextModule } from 'primeng/inputtext';
20
+ import { TextareaModule } from 'primeng/textarea';
21
+ import * as i10 from '@jsverse/transloco';
22
+ import { TranslocoModule } from '@jsverse/transloco';
23
+ import { AppBaseComponent } from '@posiwise/app-base-component';
24
+ import { Subject } from 'rxjs';
25
+ import * as i5$1 from 'primeng/paginator';
26
+ import { PaginatorModule } from 'primeng/paginator';
27
+ import * as i2$1 from '@ng-bootstrap/ng-bootstrap';
28
+ import * as i8 from '@posiwise/utils';
29
+ import { DragDropModule } from '@angular/cdk/drag-drop';
30
+ import { NgxCaptchaModule } from 'ngx-captcha';
31
+ import { SelectModule } from 'primeng/select';
32
+ import * as i7 from 'primeng/progressspinner';
33
+ import * as i3$1 from '@angular/platform-browser';
34
+ import * as i11 from 'ngx-quill';
35
+ import { QuillModule } from 'ngx-quill';
36
+ import * as i12 from 'ngx-ui-switch';
37
+ import { UiSwitchModule } from 'ngx-ui-switch';
38
+ import * as i7$1 from 'primeng/autocomplete';
39
+ import { AutoCompleteModule } from 'primeng/autocomplete';
40
+ import * as i6$1 from 'primeng/datepicker';
41
+ import { DatePickerModule } from 'primeng/datepicker';
42
+ import moment from 'moment';
43
+
44
+ class ResourceService {
45
+ constructor(api) {
46
+ this.api = api;
47
+ this.resource = '/posts';
48
+ this.comments = '/comments';
49
+ }
50
+ getPublicPosts(master_subscription_id, page, pageSize, search, tagCategoryIds, tagIds) {
51
+ const params = {
52
+ page,
53
+ page_size: pageSize,
54
+ search: search,
55
+ master_subscription_id
56
+ };
57
+ if (tagCategoryIds) {
58
+ params['tag_category_ids'] = tagCategoryIds;
59
+ }
60
+ if (tagIds) {
61
+ params['tag_ids'] = tagIds;
62
+ }
63
+ return this.api.getWithParams(`${this.resource}/get_all`, {
64
+ ...params
65
+ });
66
+ }
67
+ getAdminPosts(subscriptionId, paging) {
68
+ return this.api.getWithParams(`${this.resource}/admin_get_all`, {
69
+ ...HelperService.getPagingParams(paging),
70
+ subscription_id: subscriptionId
71
+ });
72
+ }
73
+ addPost(post) {
74
+ const formData = new FormData();
75
+ // eslint-disable-next-line no-restricted-syntax
76
+ for (const key in post) {
77
+ if (key in post) {
78
+ formData.append(key, post[key]);
79
+ }
80
+ }
81
+ return this.api.post(this.resource, formData);
82
+ }
83
+ getPostBySlug(slug) {
84
+ return this.api.get(`${this.resource}/${slug}`);
85
+ }
86
+ deletePost(id) {
87
+ return this.api.delete(`${this.resource}/${id}`);
88
+ }
89
+ updatePost(post, id) {
90
+ const formData = new FormData();
91
+ // eslint-disable-next-line no-restricted-syntax
92
+ for (const key in post) {
93
+ if (key in post) {
94
+ formData.append(key, post[key]);
95
+ }
96
+ }
97
+ return this.api.put(`${this.resource}/${id}`, formData);
98
+ }
99
+ getComments() {
100
+ return this.api.get(`${this.comments}/get_all`);
101
+ }
102
+ postComments(post) {
103
+ return this.api.post(this.comments, post);
104
+ }
105
+ getResourceInsight(subscription_id, starting_at, ending_at) {
106
+ return this.api.getWithParams(`/admin/posts_analytics?type=views&subscription_id=${subscription_id}`, { starting_at, ending_at });
107
+ }
108
+ getResourcePostsInsight(id) {
109
+ return this.api.get(`${this.resource}/${id}/insights`);
110
+ }
111
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceService, deps: [{ token: i2.MainApiHttpService }], target: i0.ɵɵFactoryTarget.Injectable }); }
112
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceService }); }
113
+ }
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceService, decorators: [{
115
+ type: Injectable
116
+ }], ctorParameters: () => [{ type: i2.MainApiHttpService }] });
117
+
118
+ // Lazy loaded routes - each route now loads its own module with only the components it needs
119
+ const routes = [
120
+ {
121
+ path: '',
122
+ pathMatch: 'full',
123
+ loadChildren: () => import('./posiwise-resource-module-resource-root.module-gVu6s-NV.mjs').then(m => m.ResourceRootModule)
124
+ },
125
+ {
126
+ path: 'hub',
127
+ loadChildren: () => import('./posiwise-resource-module-resource-hub.module-jxpqriFN.mjs').then(m => m.ResourceHubModule)
128
+ },
129
+ {
130
+ path: 'blogs',
131
+ loadChildren: () => import('./posiwise-resource-module-resource-blogs.module-DHqU4Ypf.mjs').then(m => m.ResourceBlogsModule)
132
+ },
133
+ {
134
+ path: 'videos',
135
+ loadChildren: () => import('./posiwise-resource-module-resource-videos.module-xt6vq-z-.mjs').then(m => m.ResourceVideosModule)
136
+ },
137
+ {
138
+ path: 'integrations',
139
+ loadChildren: () => import('./posiwise-resource-module-resource-integrations.module-xg0Ziiw8.mjs').then(m => m.ResourceIntegrationsModule)
140
+ },
141
+ {
142
+ path: 'release-notes',
143
+ loadChildren: () => import('./posiwise-resource-module-resource-release-notes.module-CuQLcCDR.mjs').then(m => m.ResourceReleaseNotesModule)
144
+ },
145
+ {
146
+ path: 'events',
147
+ loadChildren: () => import('./posiwise-resource-module-resource-events.module-DtZaPh7n.mjs').then(m => m.ResourceEventsModule)
148
+ },
149
+ {
150
+ path: 'white-papers',
151
+ loadChildren: () => import('./posiwise-resource-module-resource-white-papers.module-Bm2M2II6.mjs').then(m => m.ResourceWhitePapersModule)
152
+ },
153
+ {
154
+ path: 'case-studies',
155
+ loadChildren: () => import('./posiwise-resource-module-resource-case-studies.module-DghO167h.mjs').then(m => m.ResourceCaseStudiesModule)
156
+ },
157
+ {
158
+ path: 'view/:slug',
159
+ loadChildren: () => import('./posiwise-resource-module-resource-post.module-DcudivrB.mjs').then(m => m.ResourcePostModule)
160
+ }
161
+ ];
162
+ class BlogPublicRoutingModule {
163
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: BlogPublicRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
164
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.6", ngImport: i0, type: BlogPublicRoutingModule, imports: [i1.RouterModule], exports: [RouterModule] }); }
165
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: BlogPublicRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
166
+ }
167
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: BlogPublicRoutingModule, decorators: [{
168
+ type: NgModule,
169
+ args: [{
170
+ imports: [RouterModule.forChild(routes)],
171
+ exports: [RouterModule]
172
+ }]
173
+ }] });
174
+
175
+ class ResourcePublicModule {
176
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourcePublicModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
177
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.6", ngImport: i0, type: ResourcePublicModule, imports: [BlogPublicRoutingModule] }); }
178
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourcePublicModule, providers: [ResourceService], imports: [BlogPublicRoutingModule] }); }
179
+ }
180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourcePublicModule, decorators: [{
181
+ type: NgModule,
182
+ args: [{
183
+ imports: [BlogPublicRoutingModule],
184
+ providers: [ResourceService],
185
+ schemas: [CUSTOM_ELEMENTS_SCHEMA]
186
+ }]
187
+ }] });
188
+
189
+ class ResourceModule {
190
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
191
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.6", ngImport: i0, type: ResourceModule, imports: [ResourcePublicModule] }); }
192
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceModule, imports: [ResourcePublicModule] }); }
193
+ }
194
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceModule, decorators: [{
195
+ type: NgModule,
196
+ args: [{
197
+ imports: [ResourcePublicModule]
198
+ }]
199
+ }] });
200
+
201
+ class Trial4ContactUsModule {
202
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: Trial4ContactUsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
203
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.6", ngImport: i0, type: Trial4ContactUsModule, imports: [Trial4SharedContactUsModule], exports: [Trial4SharedContactUsModule] }); }
204
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: Trial4ContactUsModule, imports: [Trial4SharedContactUsModule, Trial4SharedContactUsModule] }); }
205
+ }
206
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: Trial4ContactUsModule, decorators: [{
207
+ type: NgModule,
208
+ args: [{
209
+ imports: [Trial4SharedContactUsModule],
210
+ exports: [Trial4SharedContactUsModule]
211
+ }]
212
+ }] });
213
+
214
+ /**
215
+ * Lazy-loading wrapper for ResourceEditCard
216
+ */
217
+ class ResourceEditCardLazyComponent {
218
+ constructor(cdr) {
219
+ this.cdr = cdr;
220
+ this.canEdit = false;
221
+ this.updated = new EventEmitter();
222
+ this.componentRef = null;
223
+ this.loading = false;
224
+ }
225
+ async ngOnChanges(changes) {
226
+ if (this.canEdit && !this.componentRef && !this.loading) {
227
+ await this.loadEditCard();
228
+ }
229
+ else if (!this.canEdit && this.componentRef) {
230
+ this.container.clear();
231
+ this.componentRef = null;
232
+ }
233
+ else if (this.componentRef && (changes['id'] || changes['resourceData'])) {
234
+ // Update existing component inputs
235
+ this.componentRef.instance.id = this.id;
236
+ this.componentRef.instance.resourceData = this.resourceData;
237
+ }
238
+ }
239
+ async loadEditCard() {
240
+ if (this.componentRef || this.loading)
241
+ return; // Prevent double loading
242
+ this.loading = true; // Set BEFORE async operation
243
+ try {
244
+ // Dynamically import ResourceEditCard component (145 KB)
245
+ const module = await Promise.resolve().then(function () { return resourceEditCard_component; });
246
+ const ResourceEditCardComponent = module.ResourceEditCardComponent;
247
+ // Ensure container exists and is clear
248
+ if (!this.container)
249
+ return;
250
+ this.container.clear();
251
+ // Create component dynamically (only once)
252
+ this.componentRef = this.container.createComponent(ResourceEditCardComponent);
253
+ this.componentRef.instance.id = this.id;
254
+ this.componentRef.instance.resourceData = this.resourceData;
255
+ this.componentRef.instance.updated.subscribe(() => {
256
+ this.updated.emit();
257
+ this.cdr.markForCheck();
258
+ });
259
+ this.loading = false;
260
+ }
261
+ catch (error) {
262
+ console.error('Failed to load ResourceEditCard:', error);
263
+ this.loading = false;
264
+ }
265
+ }
266
+ ngOnDestroy() {
267
+ this.componentRef?.destroy();
268
+ }
269
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceEditCardLazyComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
270
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.6", type: ResourceEditCardLazyComponent, isStandalone: false, selector: "pw-resource-edit-card-lazy", inputs: { id: "id", resourceData: "resourceData", canEdit: "canEdit" }, outputs: { updated: "updated" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["editCardContainer"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: `<ng-container #editCardContainer></ng-container>`, isInline: true }); }
271
+ }
272
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceEditCardLazyComponent, decorators: [{
273
+ type: Component,
274
+ args: [{
275
+ selector: 'pw-resource-edit-card-lazy',
276
+ template: `<ng-container #editCardContainer></ng-container>`,
277
+ standalone: false
278
+ }]
279
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { container: [{
280
+ type: ViewChild,
281
+ args: ['editCardContainer', { read: ViewContainerRef, static: true }]
282
+ }], id: [{
283
+ type: Input
284
+ }], resourceData: [{
285
+ type: Input
286
+ }], canEdit: [{
287
+ type: Input
288
+ }], updated: [{
289
+ type: Output
290
+ }] } });
291
+
292
+ class ResourceCompanyCardComponent extends AppBaseComponent {
293
+ constructor(injector, cdr) {
294
+ super(injector);
295
+ this.cdr = cdr;
296
+ this.getPosts = new EventEmitter();
297
+ this.destroy$ = new Subject();
298
+ this.canEditResourcesValue = false;
299
+ this.header = '';
300
+ this.data = [];
301
+ this.vendor = false;
302
+ this.postData = false;
303
+ this.filteredData = [];
304
+ this.first = 0;
305
+ this.rows = 12;
306
+ }
307
+ ngOnChanges() {
308
+ this.search();
309
+ }
310
+ ngOnInit() {
311
+ if (this.userLoggedIn) {
312
+ this.updateCanEditResourcesValue();
313
+ this.localStorage.getItem$('product').subscribe(res => {
314
+ const data = res ? JSON.parse(res) : null;
315
+ this.subscriptionId = data?.subscriptionId;
316
+ this.cdr.markForCheck();
317
+ });
318
+ }
319
+ }
320
+ search(keywords) {
321
+ if (keywords) {
322
+ this.filteredData = this.data.filter(x => x.title.toLowerCase().includes(keywords.toLowerCase()));
323
+ if (this.filteredData.length === 0) {
324
+ this.postData = true;
325
+ }
326
+ else {
327
+ this.postData = false;
328
+ }
329
+ }
330
+ else {
331
+ this.filteredData = [...this.data];
332
+ this.postData = false;
333
+ }
334
+ }
335
+ onPageChange(event) {
336
+ this.first = event.first;
337
+ this.rows = event.rows;
338
+ }
339
+ ngOnDestroy() {
340
+ this.destroy$.next();
341
+ this.destroy$.complete();
342
+ }
343
+ updateCanEditResourcesValue() {
344
+ this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
345
+ }
346
+ canEditResources() {
347
+ return this.canEditResourcesValue;
348
+ }
349
+ /** Show no-data when there is integration count but no posts (postData is false, filteredData empty). */
350
+ get showNoPostsMessage() {
351
+ return (this.integrationCountDisplay > 0 &&
352
+ !this.postData &&
353
+ (!this.filteredData || this.filteredData.length === 0));
354
+ }
355
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceCompanyCardComponent, deps: [{ token: i0.Injector }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
356
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: ResourceCompanyCardComponent, isStandalone: false, selector: "pw-resource-company-card", inputs: { header: "header", data: "data", integrationCountDisplay: "integrationCountDisplay", vendor: "vendor", user: "user", userLoggedIn: "userLoggedIn" }, outputs: { getPosts: "getPosts" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div [ngClass]=\"{ 'vendors-distributor-wrapper': !vendor }\">\n <div class=\"d-flex justify-content-between align-items-center mb-3 search-container\">\n <div>\n <span class=\"int-span\">{{header}}</span>\n </div>\n @if (integrationCountDisplay > 0) {\n <div class=\"search-wrapper position-relative\">\n <i class=\"fa fa-search search-icon\"></i>\n <input type=\"text\"\n (keyup)=\"search($event.target.value)\"\n placeholder=\"Search eg security\"\n class=\"search-input top-search-input\" id=\"input_search_eg_security_9712\" name=\"input_search_eg_security_9712\" />\n </div>\n }\n\n </div>\n\n @if (postData) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\"> </pw-no-data>\n </div>\n }\n\n @if (showNoPostsMessage) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"></pw-no-data>\n </div>\n }\n\n @if (!postData && integrationCountDisplay > 0 && filteredData.length > 0) {\n <div class=\"row\">\n @for (img of filteredData | slice:first:(first + rows); track img) {\n <div class=\"col-md-3 mt-4\"\n >\n <div class=\"boxes d-flex align-items-center justify-content-center\">\n @if (img?.companyImg) {\n <img [src]=\"img.companyImg\" alt=\"Vendor Company Icon\" class=\"vendor-icon\" />\n } @else {\n @if (img?.rectangular_picture?.url) {\n @if (!img.rectangular_picture.url.includes('default-photo')) {\n @if (img?.showcase) {\n <a class=\"vendor-link\" [href]=\"img.external_url || ('/resources/view/' + img.slug)\">\n <img [src]=\"img.rectangular_picture.url\" alt=\"Vendor Rectangular Company Icon\" class=\"vendor-icon\" />\n </a>\n } @else {\n <img [src]=\"img.rectangular_picture.url\" alt=\"Vendor Rectangular Company Icon\" class=\"vendor-icon\" />\n }\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"img?.id\"\n [resourceData]=\"img\"\n (updated)=\"getPosts.emit()\">\n </pw-resource-edit-card-lazy>\n } @else {\n @if (img?.showcase) {\n <a class=\"vendor-link\" [href]=\"img.external_url || ('/resources/view/' + img.slug)\">\n <span class=\"vendor-name text-center mt-2\">{{ img?.title }}</span>\n </a>\n } @else {\n <span class=\"vendor-name text-center\">{{ img?.title }}</span>\n }\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"img?.id\"\n [resourceData]=\"img\"\n (updated)=\"getPosts.emit()\">\n </pw-resource-edit-card-lazy>\n }\n } @else {\n <ng-template [ngTemplateOutlet]=\"noImage\"></ng-template>\n }\n }\n </div>\n </div>\n }\n @if (filteredData.length > 0) {\n <div class=\"customPaginator d-flex align-items-center mt-5 justify-content-center\"\n >\n <p-paginator\n [first]=\"first\"\n [rows]=\"rows\"\n [totalRecords]=\"filteredData.length\"\n (onPageChange)=\"onPageChange($event)\"></p-paginator>\n </div>\n }\n </div>\n }\n</div>\n", styles: [".top-search-input{color:#000!important;border:3px solid #d4d4d4!important;padding:5px 30px!important;border-radius:29px!important}::placeholder{color:#d4d4d4}.vendors-distributor-wrapper{margin-top:5rem!important}.vendor-icon{max-width:180px;max-height:100%;width:100%!important}.vendor-name{font-size:3rem;line-height:3rem;color:var(--text-color, black)}::ng-deep .customPaginator .p-paginator{border:none!important}::ng-deep .customPaginator .p-paginator button{border:none!important}.int-span{text-transform:uppercase;font-size:2.5rem;color:var(--first)}.boxes{width:100%;min-height:150px;display:flex;align-items:center;justify-content:center;text-align:center;padding:15px;border:1px dashed #ccc;border-radius:8px;word-break:break-word;white-space:normal;height:100%}a.vendor-link{display:inline-block;transition:transform .2s ease}a.vendor-link:hover{transform:scale(1.05);cursor:pointer}.search-wrapper{position:relative;width:300px}.search-input{width:100%;padding:10px 20px 10px 40px;border:2px solid #d4d4d4;border-radius:30px;font-size:1rem;color:#000;background-color:#fff}.search-input::placeholder{color:silver}.search-input:focus{outline:none;border-color:var(--first)}.search-icon{position:absolute;top:50%;left:14px;transform:translateY(-50%);color:#d4d4d4;font-size:1.1rem}@media(width<=768px){.vendor-icon{width:50!important}.search-container{flex-wrap:wrap!important;gap:2rem}.int-span{font-size:1.75rem}}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "directive", type: i5.LazyImgDirective, selector: "img" }, { kind: "component", type: ResourceEditCardLazyComponent, selector: "pw-resource-edit-card-lazy", inputs: ["id", "resourceData", "canEdit"], outputs: ["updated"] }, { kind: "component", type: i5$1.Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first", "appendTo"], outputs: ["onPageChange"] }, { kind: "pipe", type: i3.SlicePipe, name: "slice" }, { kind: "pipe", type: i10.TranslocoPipe, name: "transloco" }] }); }
357
+ }
358
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceCompanyCardComponent, decorators: [{
359
+ type: Component,
360
+ args: [{ selector: 'pw-resource-company-card', standalone: false, template: "<div [ngClass]=\"{ 'vendors-distributor-wrapper': !vendor }\">\n <div class=\"d-flex justify-content-between align-items-center mb-3 search-container\">\n <div>\n <span class=\"int-span\">{{header}}</span>\n </div>\n @if (integrationCountDisplay > 0) {\n <div class=\"search-wrapper position-relative\">\n <i class=\"fa fa-search search-icon\"></i>\n <input type=\"text\"\n (keyup)=\"search($event.target.value)\"\n placeholder=\"Search eg security\"\n class=\"search-input top-search-input\" id=\"input_search_eg_security_9712\" name=\"input_search_eg_security_9712\" />\n </div>\n }\n\n </div>\n\n @if (postData) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\"> </pw-no-data>\n </div>\n }\n\n @if (showNoPostsMessage) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"></pw-no-data>\n </div>\n }\n\n @if (!postData && integrationCountDisplay > 0 && filteredData.length > 0) {\n <div class=\"row\">\n @for (img of filteredData | slice:first:(first + rows); track img) {\n <div class=\"col-md-3 mt-4\"\n >\n <div class=\"boxes d-flex align-items-center justify-content-center\">\n @if (img?.companyImg) {\n <img [src]=\"img.companyImg\" alt=\"Vendor Company Icon\" class=\"vendor-icon\" />\n } @else {\n @if (img?.rectangular_picture?.url) {\n @if (!img.rectangular_picture.url.includes('default-photo')) {\n @if (img?.showcase) {\n <a class=\"vendor-link\" [href]=\"img.external_url || ('/resources/view/' + img.slug)\">\n <img [src]=\"img.rectangular_picture.url\" alt=\"Vendor Rectangular Company Icon\" class=\"vendor-icon\" />\n </a>\n } @else {\n <img [src]=\"img.rectangular_picture.url\" alt=\"Vendor Rectangular Company Icon\" class=\"vendor-icon\" />\n }\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"img?.id\"\n [resourceData]=\"img\"\n (updated)=\"getPosts.emit()\">\n </pw-resource-edit-card-lazy>\n } @else {\n @if (img?.showcase) {\n <a class=\"vendor-link\" [href]=\"img.external_url || ('/resources/view/' + img.slug)\">\n <span class=\"vendor-name text-center mt-2\">{{ img?.title }}</span>\n </a>\n } @else {\n <span class=\"vendor-name text-center\">{{ img?.title }}</span>\n }\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"img?.id\"\n [resourceData]=\"img\"\n (updated)=\"getPosts.emit()\">\n </pw-resource-edit-card-lazy>\n }\n } @else {\n <ng-template [ngTemplateOutlet]=\"noImage\"></ng-template>\n }\n }\n </div>\n </div>\n }\n @if (filteredData.length > 0) {\n <div class=\"customPaginator d-flex align-items-center mt-5 justify-content-center\"\n >\n <p-paginator\n [first]=\"first\"\n [rows]=\"rows\"\n [totalRecords]=\"filteredData.length\"\n (onPageChange)=\"onPageChange($event)\"></p-paginator>\n </div>\n }\n </div>\n }\n</div>\n", styles: [".top-search-input{color:#000!important;border:3px solid #d4d4d4!important;padding:5px 30px!important;border-radius:29px!important}::placeholder{color:#d4d4d4}.vendors-distributor-wrapper{margin-top:5rem!important}.vendor-icon{max-width:180px;max-height:100%;width:100%!important}.vendor-name{font-size:3rem;line-height:3rem;color:var(--text-color, black)}::ng-deep .customPaginator .p-paginator{border:none!important}::ng-deep .customPaginator .p-paginator button{border:none!important}.int-span{text-transform:uppercase;font-size:2.5rem;color:var(--first)}.boxes{width:100%;min-height:150px;display:flex;align-items:center;justify-content:center;text-align:center;padding:15px;border:1px dashed #ccc;border-radius:8px;word-break:break-word;white-space:normal;height:100%}a.vendor-link{display:inline-block;transition:transform .2s ease}a.vendor-link:hover{transform:scale(1.05);cursor:pointer}.search-wrapper{position:relative;width:300px}.search-input{width:100%;padding:10px 20px 10px 40px;border:2px solid #d4d4d4;border-radius:30px;font-size:1rem;color:#000;background-color:#fff}.search-input::placeholder{color:silver}.search-input:focus{outline:none;border-color:var(--first)}.search-icon{position:absolute;top:50%;left:14px;transform:translateY(-50%);color:#d4d4d4;font-size:1.1rem}@media(width<=768px){.vendor-icon{width:50!important}.search-container{flex-wrap:wrap!important;gap:2rem}.int-span{font-size:1.75rem}}\n"] }]
361
+ }], ctorParameters: () => [{ type: i0.Injector }, { type: i0.ChangeDetectorRef }], propDecorators: { getPosts: [{
362
+ type: Output
363
+ }], header: [{
364
+ type: Input
365
+ }], data: [{
366
+ type: Input
367
+ }], integrationCountDisplay: [{
368
+ type: Input
369
+ }], vendor: [{
370
+ type: Input
371
+ }], user: [{
372
+ type: Input
373
+ }], userLoggedIn: [{
374
+ type: Input
375
+ }] } });
376
+
377
+ class ResourceTopBannerEditComponent extends AppBaseComponent {
378
+ constructor(fb, modalService, tagService, cdr, injector) {
379
+ super(injector);
380
+ this.fb = fb;
381
+ this.modalService = modalService;
382
+ this.tagService = tagService;
383
+ this.cdr = cdr;
384
+ this.getUpdatedTag = new EventEmitter();
385
+ this.image = null;
386
+ this.defaultImage = 'assets/img/resource/blog.png';
387
+ }
388
+ ngOnInit() {
389
+ if (this.userLoggedIn) {
390
+ this.localStorage.getItem$('product').subscribe(res => {
391
+ const data = res ? JSON.parse(res) : null;
392
+ this.subscriptionId = data?.subscriptionId;
393
+ this.cdr.markForCheck();
394
+ });
395
+ }
396
+ this.form = this.fb.group({
397
+ title: [this.blogPostTag?.title ?? ''],
398
+ description: [this.blogPostTag?.description ?? ''],
399
+ meta_title: [this.blogPostTag?.meta_title ?? ''],
400
+ meta_description: [this.blogPostTag?.meta_description ?? '']
401
+ });
402
+ this.image = this.blogPostTag?.image?.url ?? null;
403
+ }
404
+ openEditModal() {
405
+ this.modalService.open(this.editModal, { centered: true, size: 'lg' });
406
+ }
407
+ openImageModal(modalRef) {
408
+ this.imageModalRef = this.modalService.open(modalRef, { centered: true });
409
+ }
410
+ onImageSelected(base64) {
411
+ this.image = base64;
412
+ this.file = HelperService.convertBase64ToFile(base64);
413
+ this.imageModalRef?.close();
414
+ }
415
+ onClose() {
416
+ this.imageModalRef?.close();
417
+ }
418
+ removeImage() {
419
+ this.image = null;
420
+ }
421
+ handleImageError(event) {
422
+ event.target.src = this.defaultImage;
423
+ }
424
+ save() {
425
+ this.buttonBusy = true;
426
+ const payload = {
427
+ title: this.form.value.title ?? this.blogPostTag?.title,
428
+ description: this.form.value.description ?? this.blogPostTag?.description,
429
+ meta_title: this.form.value.meta_title ?? this.blogPostTag?.meta_title,
430
+ meta_description: this.form.value.meta_description ?? this.blogPostTag?.meta_description,
431
+ tag_category_id: this.blogPostTag?.tag_category_id,
432
+ tag_type: this.blogPostTag?.tag_type,
433
+ subscription_id: this.subscriptionId,
434
+ name: this.blogPostTag?.name
435
+ };
436
+ if (this.file) {
437
+ payload['image'] = this.file;
438
+ }
439
+ else if (!this.image) {
440
+ payload['remove_image'] = true;
441
+ }
442
+ this.tagService.updateTagById(this.blogPostTag?.id, payload).subscribe(() => {
443
+ this.buttonBusy = false;
444
+ this.toast.success('Tag Updated');
445
+ this.getUpdatedTag.emit();
446
+ this.modalService.dismissAll();
447
+ this.cdr.markForCheck();
448
+ });
449
+ }
450
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceTopBannerEditComponent, deps: [{ token: i5$2.FormBuilder }, { token: i2$1.NgbModal }, { token: i2.TagService }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
451
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: ResourceTopBannerEditComponent, isStandalone: false, selector: "pw-resource-top-banner-edit", inputs: { blogPostTag: "blogPostTag", user: "user", userLoggedIn: "userLoggedIn" }, outputs: { getUpdatedTag: "getUpdatedTag" }, viewQueries: [{ propertyName: "editModal", first: true, predicate: ["editModal"], descendants: true }, { propertyName: "imageCropContent", first: true, predicate: ["imageCropContent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-black in-page-edit-icon mb-1 ms-3\"\n (click)=\"openEditModal()\"\n (keydown.enter)=\"openEditModal()\"\n (keydown.space)=\"openEditModal()\"\n title=\"Edit Blog Tag\"></i>\n</div>\n\n<ng-template #editModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Blog Post Tag</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row\">\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Description\" name=\"description\" controlId=\"resource-top-banner-description\">\n <textarea id=\"resource-top-banner-description\" name=\"description\" class=\"form-control\" rows=\"4\" formControlName=\"description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Title\" name=\"meta_title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"meta_title\" placeholder=\"Meta Title for SEO\" id=\"input_meta_title_2\" name=\"input_meta_title_2\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Description\" name=\"meta_description\" controlId=\"resource-top-banner-meta_description\">\n <textarea id=\"resource-top-banner-meta_description\" name=\"meta_description\" class=\"form-control\" rows=\"3\" formControlName=\"meta_description\" placeholder=\"Meta Description for SEO\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 my-4\">\n <span id=\"resource-top-banner-tag-image-label\" class=\"pw-label-style\">Blog Tag Image</span>\n <div class=\"text-center d-flex flex-column align-items-center col-6\">\n <img [src]=\"image || defaultImage\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n (keydown.space)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Blog\"\n (error)=\"handleImageError($event)\"\n />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block mt-2\"\n (click)=\"openImageModal(imageCropContent)\">\n {{ image ? 'Update' : 'Add' }} Image\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 (keydown.enter)=\"removeImage()\"\n (keydown.space)=\"removeImage()\"\n (click)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n\n </div>\n </form>\n </div>\n\n <div class=\"modal-footer\">\n <button class=\"btn btn-secondary\" (click)=\"modal.dismiss()\">Cancel</button>\n <button class=\"btn btn-primary\" [buttonBusy]=\"buttonBusy\" (click)=\"save()\">Save</button>\n </div>\n</ng-template>\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Image</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. Avoid artwork, celebrities, or copyrighted images.</small>\n <pw-image-cropper\n #cropper\n aspectRatio=\"dynamic\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i5$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i8.ProfileImageCropperComponent, selector: "pw-image-cropper", inputs: ["aspectRatio", "dynamicData"], outputs: ["imageSelectionEvent", "closeEvent", "fileChangeEvent"] }, { kind: "component", type: i6.InputContainerComponent, selector: "pw-input-container", inputs: ["name", "controlId", "useAriaLabelledbyOnly", "label", "labelClass", "tooltipPosition", "required", "errorMsg", "isReadOnly", "showTooltip", "tooltipText", "showTriangle", "afterLabel", "showAfterLabel", "showTriangleText", "isLeftTooltip"] }, { kind: "directive", type: i5.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "directive", type: i5.LazyImgDirective, selector: "img" }] }); }
452
+ }
453
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceTopBannerEditComponent, decorators: [{
454
+ type: Component,
455
+ args: [{ selector: 'pw-resource-top-banner-edit', standalone: false, template: "<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-black in-page-edit-icon mb-1 ms-3\"\n (click)=\"openEditModal()\"\n (keydown.enter)=\"openEditModal()\"\n (keydown.space)=\"openEditModal()\"\n title=\"Edit Blog Tag\"></i>\n</div>\n\n<ng-template #editModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Blog Post Tag</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row\">\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Description\" name=\"description\" controlId=\"resource-top-banner-description\">\n <textarea id=\"resource-top-banner-description\" name=\"description\" class=\"form-control\" rows=\"4\" formControlName=\"description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Title\" name=\"meta_title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"meta_title\" placeholder=\"Meta Title for SEO\" id=\"input_meta_title_2\" name=\"input_meta_title_2\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Description\" name=\"meta_description\" controlId=\"resource-top-banner-meta_description\">\n <textarea id=\"resource-top-banner-meta_description\" name=\"meta_description\" class=\"form-control\" rows=\"3\" formControlName=\"meta_description\" placeholder=\"Meta Description for SEO\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 my-4\">\n <span id=\"resource-top-banner-tag-image-label\" class=\"pw-label-style\">Blog Tag Image</span>\n <div class=\"text-center d-flex flex-column align-items-center col-6\">\n <img [src]=\"image || defaultImage\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n (keydown.space)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Blog\"\n (error)=\"handleImageError($event)\"\n />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block mt-2\"\n (click)=\"openImageModal(imageCropContent)\">\n {{ image ? 'Update' : 'Add' }} Image\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 (keydown.enter)=\"removeImage()\"\n (keydown.space)=\"removeImage()\"\n (click)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n\n </div>\n </form>\n </div>\n\n <div class=\"modal-footer\">\n <button class=\"btn btn-secondary\" (click)=\"modal.dismiss()\">Cancel</button>\n <button class=\"btn btn-primary\" [buttonBusy]=\"buttonBusy\" (click)=\"save()\">Save</button>\n </div>\n</ng-template>\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Image</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. Avoid artwork, celebrities, or copyrighted images.</small>\n <pw-image-cropper\n #cropper\n aspectRatio=\"dynamic\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n" }]
456
+ }], ctorParameters: () => [{ type: i5$2.FormBuilder }, { type: i2$1.NgbModal }, { type: i2.TagService }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }], propDecorators: { blogPostTag: [{
457
+ type: Input
458
+ }], user: [{
459
+ type: Input
460
+ }], userLoggedIn: [{
461
+ type: Input
462
+ }], getUpdatedTag: [{
463
+ type: Output
464
+ }], editModal: [{
465
+ type: ViewChild,
466
+ args: ['editModal']
467
+ }], imageCropContent: [{
468
+ type: ViewChild,
469
+ args: ['imageCropContent']
470
+ }] } });
471
+
472
+ class ResourceNoteCardComponent extends AppBaseComponent {
473
+ constructor(injector, resourceService, tagService, cdr) {
474
+ super(injector);
475
+ this.resourceService = resourceService;
476
+ this.tagService = tagService;
477
+ this.cdr = cdr;
478
+ this.releaseHeader = false;
479
+ this.isReleasePress = false;
480
+ this.isResource = false;
481
+ this.postSlice = false;
482
+ this.canEditResourcesValue = false;
483
+ this.isLoaded = false;
484
+ this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;
485
+ this.postTags = {};
486
+ this.releasePosts = {};
487
+ }
488
+ ngOnInit() {
489
+ if (this.userLoggedIn) {
490
+ this.localStorage.getItem$('product').subscribe(res => {
491
+ const data = res ? JSON.parse(res) : null;
492
+ this.subscriptionId = data?.subscriptionId;
493
+ this.cdr.markForCheck();
494
+ });
495
+ }
496
+ this.getTags();
497
+ }
498
+ ngOnChanges(changes) {
499
+ if (changes['user'] || changes['userLoggedIn']) {
500
+ if (this.userLoggedIn && this.user) {
501
+ this.updateCanEditResourcesValue();
502
+ }
503
+ }
504
+ }
505
+ getTags() {
506
+ this.isLoaded = false;
507
+ this.tagService
508
+ .getAllTagCategories({ search: 'Release Notes' }, this.getEffectiveSubscriptionId())
509
+ .subscribe(response => {
510
+ this.tagCategory = response?.tag_categories?.[0];
511
+ this.getPostTags();
512
+ this.cdr.markForCheck();
513
+ });
514
+ }
515
+ getPostTags() {
516
+ this.tagService
517
+ .getTagsByType('post_categories', {}, this.getEffectiveSubscriptionId())
518
+ .subscribe(response => {
519
+ this.postTags['product'] = this.findTag(response.tags, 'Product Release Notes', this.tagCategory?.id);
520
+ this.postTags['press'] = this.findTag(response.tags, 'Press Release Notes', this.tagCategory?.id);
521
+ if (this.postTags['product']?.id) {
522
+ this.getProductReleasePosts(1, 100);
523
+ }
524
+ else {
525
+ this.isLoaded = true;
526
+ this.releasePosts['product'] = [];
527
+ }
528
+ if (this.postTags['press']?.id) {
529
+ this.getPressReleasePosts(1, 100);
530
+ }
531
+ else {
532
+ this.isLoaded = true;
533
+ this.releasePosts['press'] = [];
534
+ }
535
+ this.cdr.markForCheck();
536
+ });
537
+ }
538
+ findTag(tags, name, categoryId) {
539
+ return tags.find(tag => tag.name === name && tag.tag_category_id === categoryId);
540
+ }
541
+ hasPressReleases() {
542
+ return this.releasePosts['press']?.length !== 0 && this.isLoaded;
543
+ }
544
+ hasProductReleases() {
545
+ return this.releasePosts['product']?.length !== 0 && this.isLoaded;
546
+ }
547
+ getProductReleasePosts(page, pageSize) {
548
+ this.isLoaded = false;
549
+ this.resourceService
550
+ .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', '', this.postTags['product']?.id)
551
+ .subscribe(response => {
552
+ const sortedPosts = response.posts
553
+ .filter(post => post.showcase === true)
554
+ .sort((a, b) => new Date(b.published_at).getTime() - new Date(a.published_at).getTime());
555
+ this.releasePosts['product'] = this.getProcessedPosts(sortedPosts);
556
+ this.cdr.markForCheck();
557
+ })
558
+ .add(() => {
559
+ this.isLoaded = true;
560
+ this.cdr.markForCheck();
561
+ });
562
+ }
563
+ getPressReleasePosts(page, pageSize) {
564
+ this.isLoaded = false;
565
+ this.resourceService
566
+ .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', '', this.postTags['press']?.id)
567
+ .subscribe(response => {
568
+ const sortedPosts = response?.posts
569
+ .filter(post => post.showcase === true)
570
+ .sort((a, b) => new Date(b.published_at).getTime() - new Date(a.published_at).getTime());
571
+ this.releasePosts['press'] = this.getProcessedPosts(sortedPosts);
572
+ this.cdr.markForCheck();
573
+ })
574
+ .add(() => {
575
+ this.isLoaded = true;
576
+ this.cdr.markForCheck();
577
+ });
578
+ }
579
+ getProcessedPosts(posts, sliceCount = 3) {
580
+ const cloned = [...posts];
581
+ return this.postSlice ? cloned.reverse() : cloned.slice(0, sliceCount).reverse();
582
+ }
583
+ toggleEditTitle() {
584
+ this.isEditingTitle = true;
585
+ this.editedTitle = this.postTags['product'].title;
586
+ }
587
+ toggleEditPressTitle() {
588
+ this.isPressEditingTitle = true;
589
+ this.editedTitle = this.postTags['press'].title;
590
+ }
591
+ saveEditedTitle(type) {
592
+ HelperService.updateTagTitle(this.postTags[type], this.editedTitle, this.tagService, this.getEffectiveSubscriptionId(), this.toast).subscribe(() => {
593
+ this.postTags[type].title = this.editedTitle;
594
+ if (type === 'product') {
595
+ this.isEditingTitle = false;
596
+ }
597
+ else {
598
+ this.isPressEditingTitle = false;
599
+ }
600
+ this.cdr.markForCheck();
601
+ });
602
+ }
603
+ /** Helper method to get effective subscription ID */
604
+ getEffectiveSubscriptionId() {
605
+ return HelperService.getEffectiveSubscriptionId(this.user, this.subscriptionId, this.masterSubscriptionId);
606
+ }
607
+ updateCanEditResourcesValue() {
608
+ this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
609
+ }
610
+ canEditResources() {
611
+ return this.canEditResourcesValue;
612
+ }
613
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceNoteCardComponent, deps: [{ token: i0.Injector }, { token: ResourceService }, { token: i2.TagService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
614
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: ResourceNoteCardComponent, isStandalone: false, selector: "pw-resource-note-card", inputs: { releaseHeader: "releaseHeader", categoryId: "categoryId", isReleasePress: "isReleasePress", isResource: "isResource", postSlice: "postSlice", resourceTitle: "resourceTitle", tag: "tag", user: "user", userLoggedIn: "userLoggedIn" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (hasProductReleases()) {\n<section class=\"resource-vault-section bg-white\">\n <div class=\"container\">\n <div class=\"d-flex justify-content-between align-items-center flex-wrap\">\n <h2 class=\"section-heading d-flex align-items-center\" [ngClass]=\"{ 'w-50': isEditingTitle }\">\n @if (!isEditingTitle) {\n @if (postTags['product']?.title) {\n <span [innerHTML]=\"postTags['product']?.title\"></span>\n } @else {\n Product Release Notes\n }\n @if (canEditResourcesValue) {\n <i class=\"fa fa-edit in-page-edit-icon ms-3 cursor-pointer\" (click)=\"toggleEditTitle()\" (keydown.enter)=\"toggleEditTitle()\" (keydown.space)=\"toggleEditTitle()\" title=\"Edit Title\"></i>\n }\n } @else {\n <input [(ngModel)]=\"editedTitle\" class=\"form-control d-inline w-auto me-2\" [ngClass]=\"{ 'w-100': isEditingTitle }\" id=\"input_editedTitle_9216\" name=\"input_editedTitle_9216\" />\n <button class=\"btn btn-sm btn-primary me-1\" (click)=\"saveEditedTitle('product')\">Save</button>\n <button class=\"btn btn-sm btn-secondary\" (click)=\"isEditingTitle = false\">Cancel</button>\n }\n </h2>\n @if (!postSlice) {\n <a class=\"view-all\" routerLink=\"/resources/release-notes\">VIEW ALL ></a>\n }\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (releasePosts['product']?.length === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n @if (hasProductReleases()) {\n <div class=\"row mt-5 d-flex flex-wrap justify-content-center gap-4 video-row\">\n @for (post of releasePosts['product']; track post.id) {\n <div class=\"resource-blog-card p-4\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"getProductReleasePosts(1, 100)\">\n </pw-resource-edit-card-lazy>\n <p class=\"resource-title\" [innerHTML]=\"post.title\"></p>\n @if (!post.picture?.url?.includes('default-photo.jpg')) {\n <img\n src=\"{{ post.picture.url }}\"\n class=\"resource-image mt-auto\"\n alt=\"Product Resource Icon\" />\n } @else {\n <img\n src=\"assets/img/resource/rocket-box.png\"\n class=\"press-release-icon mt-auto\"\n alt=\"Product Resource Default Icon\" />\n }\n @if (post?.external_url) {\n <a\n class=\"resource-btn mt-3\"\n aria-label=\"Navigate to external url\"\n [href]=\"post.external_url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n } @else {\n <a class=\"resource-btn mt-3\" aria-label=\"Navigate to resource view\" [routerLink]=\"['/resources/view', post?.slug]\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n }\n </div>\n }\n </div>\n }\n </div>\n</section>\n}\n@if (isReleasePress && hasPressReleases()) {\n<section class=\"resource-vault-section bg-white\">\n <div class=\"container\">\n <div class=\"d-flex justify-content-between align-items-center flex-wrap\">\n <h2 class=\"section-heading d-flex align-items-center\" [ngClass]=\"{ 'w-50': isPressEditingTitle }\">\n @if (!isPressEditingTitle) {\n @if (postTags['press']?.title) {\n <span [innerHTML]=\"postTags['press']?.title\"></span>\n } @else {\n Press Release Notes\n }\n @if (canEditResourcesValue) {\n <i class=\"fa fa-edit in-page-edit-icon ms-3 cursor-pointer\" (click)=\"toggleEditPressTitle()\" (keydown.enter)=\"toggleEditPressTitle()\" (keydown.space)=\"toggleEditPressTitle()\" title=\"Edit Title\"></i>\n }\n } @else {\n <input [(ngModel)]=\"editedTitle\" class=\"form-control d-inline w-auto me-2\" [ngClass]=\"{ 'w-100': isPressEditingTitle }\" id=\"input_editedTitle_1600\" name=\"input_editedTitle_1600\" />\n <button class=\"btn btn-sm btn-primary me-1\" (click)=\"saveEditedTitle('press')\">Save</button>\n <button class=\"btn btn-sm btn-secondary\" (click)=\"isPressEditingTitle = false\">Cancel</button>\n }\n </h2>\n @if (!postSlice) {\n <a class=\"view-all\" routerLink=\"/resources/release-notes\">VIEW ALL ></a>\n }\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (releasePosts['press']?.length === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n @if (hasPressReleases()) {\n <div class=\"row mt-5 d-flex flex-wrap justify-content-center gap-4 video-row\">\n @for (post of releasePosts['press']; track post.id) {\n <div class=\"resource-blog-card p-4\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"getPressReleasePosts(1, 100)\">\n </pw-resource-edit-card-lazy>\n <p class=\"resource-title\" [innerHTML]=\"post.title\"></p>\n @if (!post.picture?.url.includes('default-photo.jpg')) {\n <img\n src=\"{{ post.picture.url }}\"\n class=\"resource-image mt-auto\"\n alt=\"Press Resource Icon\" />\n } @else {\n <img\n src=\"assets/img/resource/rocket-box.png\"\n class=\"press-release-icon mt-auto\"\n alt=\"Press Resource Default Icon\" />\n }\n @if (post?.external_url) {\n <a\n class=\"resource-btn mt-3\"\n aria-label=\"Navigate to external url\"\n [href]=\"post.external_url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n } @else {\n <a class=\"resource-btn mt-3\" aria-label=\"Navigate to resource view\" [routerLink]=\"['/resources/view', post?.slug]\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n }\n </div>\n }\n </div>\n }\n </div>\n</section>\n}\n", styles: [".bold{font-weight:700}.resource-heading{margin-bottom:2rem}.resource-note{margin-top:1rem;font-size:.85rem;color:#555}.resource-divider{border:0;height:40px;width:100%;background:linear-gradient(to bottom,#0000,#00000026);margin:0}.press-release-icon{height:auto!important;margin:0 11px 1.9rem;display:block;align-self:center;width:auto!important;aspect-ratio:0!important;object-fit:cover;margin-top:auto;margin-right:0!important}.resource-vault-section{padding:60px 0;background:#fff;padding-bottom:9rem!important;padding-top:7rem!important;box-shadow:0 4px 32px -14px #40576d4d!important}.resource-vault-section .vault-heading{font-size:3rem;font-weight:300}.resource-vault-section .explore-link{color:#000;font-weight:400;text-decoration:none;font-size:1.5rem}.resource-vault-section .resource-blog-card{display:flex;flex-direction:column;justify-content:space-between;background-color:#fff;border-radius:30px;box-shadow:0 20px 40px #00000014;padding:25px;text-align:center;width:338px;height:auto!important}.resource-vault-section .resource-blog-card h5{font-size:1.5rem;font-weight:400;margin-bottom:.5rem;color:var(--text-color, black)}.resource-vault-section .resource-blog-card p{font-size:1.5rem;color:var(--text-color, black);line-height:2rem}.resource-vault-section .resource-blog-card img{width:100%;border-radius:10px;aspect-ratio:1/1;object-fit:cover;margin-top:auto;margin-right:0!important;max-width:250px!important;align-self:center!important}.resource-vault-section .resource-blog-card iframe{height:210px;border-radius:10px;object-fit:cover;margin-right:0!important;max-width:280px!important}.resource-vault-section .resource-blog-card .resource-btn{background-color:var(--text-color, black);color:#fff;margin-top:auto;padding:10px 24px;border-radius:24px;font-size:1.5rem;font-weight:500;width:100%;max-width:240px;cursor:pointer;transition:background .3s ease;display:flex;justify-content:space-between;align-self:center;align-items:center;text-align:left;text-decoration:none;border:1px solid;box-shadow:none!important;border-color:var(--text-color, black)}.resource-vault-section .resource-blog-card .resource-btn:hover{background:#fff;color:var(--text-color, black)!important}.resource-vault-section .vault-description{text-align:left;max-width:657px;color:#182527;line-height:2.3rem!important;font-size:1.65rem}@media(width<=1200px){.resource-vault-section .vault-heading{font-size:3.5rem}.resource-vault-section .vault-description{margin-top:1.35rem}.resource-vault-section .resource-btn{margin-left:0!important}}.video-row{gap:5.5rem!important;margin-top:3rem!important}@media(width>=991px){section.bg-white.text-center.extra-top-padding{position:relative;overflow:hidden}section.bg-white.text-center.extra-top-padding .banner-header{margin-bottom:4rem!important}}.vault-header{text-align:left}@media(width>=768px)and (width<=1200px){.container{padding:0 6rem!important}}@media(width<=768px){.video-row{gap:3rem!important}}@media(max-width:768px){.resource-vault-section{padding-bottom:6rem!important}.resource-vault-section .container{padding-top:0rem!important;padding-bottom:0rem!important}.vault-header{text-align:center!important}.vault-heading{font-size:3rem!important}}@media(width<=1200px){.container{padding:7rem 3rem 1rem!important}}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i5$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "component", type: i7.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "directive", type: i5.LazyImgDirective, selector: "img" }, { kind: "component", type: ResourceEditCardLazyComponent, selector: "pw-resource-edit-card-lazy", inputs: ["id", "resourceData", "canEdit"], outputs: ["updated"] }, { kind: "pipe", type: i10.TranslocoPipe, name: "transloco" }] }); }
615
+ }
616
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceNoteCardComponent, decorators: [{
617
+ type: Component,
618
+ args: [{ selector: 'pw-resource-note-card', standalone: false, template: "@if (hasProductReleases()) {\n<section class=\"resource-vault-section bg-white\">\n <div class=\"container\">\n <div class=\"d-flex justify-content-between align-items-center flex-wrap\">\n <h2 class=\"section-heading d-flex align-items-center\" [ngClass]=\"{ 'w-50': isEditingTitle }\">\n @if (!isEditingTitle) {\n @if (postTags['product']?.title) {\n <span [innerHTML]=\"postTags['product']?.title\"></span>\n } @else {\n Product Release Notes\n }\n @if (canEditResourcesValue) {\n <i class=\"fa fa-edit in-page-edit-icon ms-3 cursor-pointer\" (click)=\"toggleEditTitle()\" (keydown.enter)=\"toggleEditTitle()\" (keydown.space)=\"toggleEditTitle()\" title=\"Edit Title\"></i>\n }\n } @else {\n <input [(ngModel)]=\"editedTitle\" class=\"form-control d-inline w-auto me-2\" [ngClass]=\"{ 'w-100': isEditingTitle }\" id=\"input_editedTitle_9216\" name=\"input_editedTitle_9216\" />\n <button class=\"btn btn-sm btn-primary me-1\" (click)=\"saveEditedTitle('product')\">Save</button>\n <button class=\"btn btn-sm btn-secondary\" (click)=\"isEditingTitle = false\">Cancel</button>\n }\n </h2>\n @if (!postSlice) {\n <a class=\"view-all\" routerLink=\"/resources/release-notes\">VIEW ALL ></a>\n }\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (releasePosts['product']?.length === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n @if (hasProductReleases()) {\n <div class=\"row mt-5 d-flex flex-wrap justify-content-center gap-4 video-row\">\n @for (post of releasePosts['product']; track post.id) {\n <div class=\"resource-blog-card p-4\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"getProductReleasePosts(1, 100)\">\n </pw-resource-edit-card-lazy>\n <p class=\"resource-title\" [innerHTML]=\"post.title\"></p>\n @if (!post.picture?.url?.includes('default-photo.jpg')) {\n <img\n src=\"{{ post.picture.url }}\"\n class=\"resource-image mt-auto\"\n alt=\"Product Resource Icon\" />\n } @else {\n <img\n src=\"assets/img/resource/rocket-box.png\"\n class=\"press-release-icon mt-auto\"\n alt=\"Product Resource Default Icon\" />\n }\n @if (post?.external_url) {\n <a\n class=\"resource-btn mt-3\"\n aria-label=\"Navigate to external url\"\n [href]=\"post.external_url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n } @else {\n <a class=\"resource-btn mt-3\" aria-label=\"Navigate to resource view\" [routerLink]=\"['/resources/view', post?.slug]\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n }\n </div>\n }\n </div>\n }\n </div>\n</section>\n}\n@if (isReleasePress && hasPressReleases()) {\n<section class=\"resource-vault-section bg-white\">\n <div class=\"container\">\n <div class=\"d-flex justify-content-between align-items-center flex-wrap\">\n <h2 class=\"section-heading d-flex align-items-center\" [ngClass]=\"{ 'w-50': isPressEditingTitle }\">\n @if (!isPressEditingTitle) {\n @if (postTags['press']?.title) {\n <span [innerHTML]=\"postTags['press']?.title\"></span>\n } @else {\n Press Release Notes\n }\n @if (canEditResourcesValue) {\n <i class=\"fa fa-edit in-page-edit-icon ms-3 cursor-pointer\" (click)=\"toggleEditPressTitle()\" (keydown.enter)=\"toggleEditPressTitle()\" (keydown.space)=\"toggleEditPressTitle()\" title=\"Edit Title\"></i>\n }\n } @else {\n <input [(ngModel)]=\"editedTitle\" class=\"form-control d-inline w-auto me-2\" [ngClass]=\"{ 'w-100': isPressEditingTitle }\" id=\"input_editedTitle_1600\" name=\"input_editedTitle_1600\" />\n <button class=\"btn btn-sm btn-primary me-1\" (click)=\"saveEditedTitle('press')\">Save</button>\n <button class=\"btn btn-sm btn-secondary\" (click)=\"isPressEditingTitle = false\">Cancel</button>\n }\n </h2>\n @if (!postSlice) {\n <a class=\"view-all\" routerLink=\"/resources/release-notes\">VIEW ALL ></a>\n }\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (releasePosts['press']?.length === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n @if (hasPressReleases()) {\n <div class=\"row mt-5 d-flex flex-wrap justify-content-center gap-4 video-row\">\n @for (post of releasePosts['press']; track post.id) {\n <div class=\"resource-blog-card p-4\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"getPressReleasePosts(1, 100)\">\n </pw-resource-edit-card-lazy>\n <p class=\"resource-title\" [innerHTML]=\"post.title\"></p>\n @if (!post.picture?.url.includes('default-photo.jpg')) {\n <img\n src=\"{{ post.picture.url }}\"\n class=\"resource-image mt-auto\"\n alt=\"Press Resource Icon\" />\n } @else {\n <img\n src=\"assets/img/resource/rocket-box.png\"\n class=\"press-release-icon mt-auto\"\n alt=\"Press Resource Default Icon\" />\n }\n @if (post?.external_url) {\n <a\n class=\"resource-btn mt-3\"\n aria-label=\"Navigate to external url\"\n [href]=\"post.external_url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n } @else {\n <a class=\"resource-btn mt-3\" aria-label=\"Navigate to resource view\" [routerLink]=\"['/resources/view', post?.slug]\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n }\n </div>\n }\n </div>\n }\n </div>\n</section>\n}\n", styles: [".bold{font-weight:700}.resource-heading{margin-bottom:2rem}.resource-note{margin-top:1rem;font-size:.85rem;color:#555}.resource-divider{border:0;height:40px;width:100%;background:linear-gradient(to bottom,#0000,#00000026);margin:0}.press-release-icon{height:auto!important;margin:0 11px 1.9rem;display:block;align-self:center;width:auto!important;aspect-ratio:0!important;object-fit:cover;margin-top:auto;margin-right:0!important}.resource-vault-section{padding:60px 0;background:#fff;padding-bottom:9rem!important;padding-top:7rem!important;box-shadow:0 4px 32px -14px #40576d4d!important}.resource-vault-section .vault-heading{font-size:3rem;font-weight:300}.resource-vault-section .explore-link{color:#000;font-weight:400;text-decoration:none;font-size:1.5rem}.resource-vault-section .resource-blog-card{display:flex;flex-direction:column;justify-content:space-between;background-color:#fff;border-radius:30px;box-shadow:0 20px 40px #00000014;padding:25px;text-align:center;width:338px;height:auto!important}.resource-vault-section .resource-blog-card h5{font-size:1.5rem;font-weight:400;margin-bottom:.5rem;color:var(--text-color, black)}.resource-vault-section .resource-blog-card p{font-size:1.5rem;color:var(--text-color, black);line-height:2rem}.resource-vault-section .resource-blog-card img{width:100%;border-radius:10px;aspect-ratio:1/1;object-fit:cover;margin-top:auto;margin-right:0!important;max-width:250px!important;align-self:center!important}.resource-vault-section .resource-blog-card iframe{height:210px;border-radius:10px;object-fit:cover;margin-right:0!important;max-width:280px!important}.resource-vault-section .resource-blog-card .resource-btn{background-color:var(--text-color, black);color:#fff;margin-top:auto;padding:10px 24px;border-radius:24px;font-size:1.5rem;font-weight:500;width:100%;max-width:240px;cursor:pointer;transition:background .3s ease;display:flex;justify-content:space-between;align-self:center;align-items:center;text-align:left;text-decoration:none;border:1px solid;box-shadow:none!important;border-color:var(--text-color, black)}.resource-vault-section .resource-blog-card .resource-btn:hover{background:#fff;color:var(--text-color, black)!important}.resource-vault-section .vault-description{text-align:left;max-width:657px;color:#182527;line-height:2.3rem!important;font-size:1.65rem}@media(width<=1200px){.resource-vault-section .vault-heading{font-size:3.5rem}.resource-vault-section .vault-description{margin-top:1.35rem}.resource-vault-section .resource-btn{margin-left:0!important}}.video-row{gap:5.5rem!important;margin-top:3rem!important}@media(width>=991px){section.bg-white.text-center.extra-top-padding{position:relative;overflow:hidden}section.bg-white.text-center.extra-top-padding .banner-header{margin-bottom:4rem!important}}.vault-header{text-align:left}@media(width>=768px)and (width<=1200px){.container{padding:0 6rem!important}}@media(width<=768px){.video-row{gap:3rem!important}}@media(max-width:768px){.resource-vault-section{padding-bottom:6rem!important}.resource-vault-section .container{padding-top:0rem!important;padding-bottom:0rem!important}.vault-header{text-align:center!important}.vault-heading{font-size:3rem!important}}@media(width<=1200px){.container{padding:7rem 3rem 1rem!important}}\n"] }]
619
+ }], ctorParameters: () => [{ type: i0.Injector }, { type: ResourceService }, { type: i2.TagService }, { type: i0.ChangeDetectorRef }], propDecorators: { releaseHeader: [{
620
+ type: Input
621
+ }], categoryId: [{
622
+ type: Input
623
+ }], isReleasePress: [{
624
+ type: Input
625
+ }], isResource: [{
626
+ type: Input
627
+ }], postSlice: [{
628
+ type: Input
629
+ }], resourceTitle: [{
630
+ type: Input
631
+ }], tag: [{
632
+ type: Input
633
+ }], user: [{
634
+ type: Input
635
+ }], userLoggedIn: [{
636
+ type: Input
637
+ }] } });
638
+
639
+ class CaseStudyCardComponent extends AppBaseComponent {
640
+ constructor(injector, resourceService, tagService, cdr) {
641
+ super(injector);
642
+ this.resourceService = resourceService;
643
+ this.tagService = tagService;
644
+ this.cdr = cdr;
645
+ this.showCaseStudyHeader = false;
646
+ this.postSlice = false;
647
+ this.canEditResourcesValue = false;
648
+ this.isLoaded = false;
649
+ this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;
650
+ this.companyName = this.appConfig.company.name;
651
+ this.posts = [];
652
+ this.isEditingTitle = false;
653
+ }
654
+ ngOnInit() {
655
+ if (this.userLoggedIn) {
656
+ this.localStorage.getItem$('product').subscribe(res => {
657
+ const data = res ? JSON.parse(res) : null;
658
+ this.subscriptionId = data?.subscriptionId;
659
+ this.cdr.markForCheck();
660
+ });
661
+ }
662
+ this.getPosts(1, 10);
663
+ }
664
+ ngOnChanges(changes) {
665
+ if (changes['user'] || changes['userLoggedIn']) {
666
+ if (this.userLoggedIn && this.user) {
667
+ this.updateCanEditResourcesValue();
668
+ }
669
+ }
670
+ }
671
+ getPosts(page, pageSize) {
672
+ this.isLoaded = false;
673
+ this.resourceService
674
+ .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', this.categoryId)
675
+ .subscribe(response => {
676
+ const sortedPosts = (response.posts ?? [])
677
+ .filter(post => post.showcase === true)
678
+ .sort((a, b) => new Date(b.published_at).getTime() - new Date(a.published_at).getTime());
679
+ this.posts = this.postSlice ? sortedPosts : [...sortedPosts].slice(0, 3);
680
+ this.cdr.markForCheck();
681
+ })
682
+ .add(() => {
683
+ this.isLoaded = true;
684
+ this.cdr.markForCheck();
685
+ });
686
+ }
687
+ toggleEditTitle() {
688
+ this.isEditingTitle = true;
689
+ this.editedTitle = this.resourceTitle;
690
+ }
691
+ saveEditedTitle() {
692
+ HelperService.updateTagTitle(this.tag, this.editedTitle, this.tagService, this.getEffectiveSubscriptionId(), this.toast).subscribe(() => {
693
+ this.resourceTitle = this.editedTitle;
694
+ this.isEditingTitle = false;
695
+ this.cdr.markForCheck();
696
+ });
697
+ }
698
+ /** Helper method to get effective subscription ID */
699
+ getEffectiveSubscriptionId() {
700
+ return HelperService.getEffectiveSubscriptionId(this.user, this.subscriptionId, this.masterSubscriptionId);
701
+ }
702
+ updateCanEditResourcesValue() {
703
+ this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
704
+ }
705
+ canEditResources() {
706
+ return this.canEditResourcesValue;
707
+ }
708
+ trackByPostId(index, post) {
709
+ return post.id;
710
+ }
711
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: CaseStudyCardComponent, deps: [{ token: i0.Injector }, { token: ResourceService }, { token: i2.TagService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
712
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: CaseStudyCardComponent, isStandalone: false, selector: "pw-case-studies-card", inputs: { showCaseStudyHeader: "showCaseStudyHeader", categoryId: "categoryId", postSlice: "postSlice", tag: "tag", resourceTitle: "resourceTitle", user: "user", userLoggedIn: "userLoggedIn" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<section class=\"resource-vault-section bg-white text-center py-5 extra-top-padding section-outer\" id=\"case-studies\">\n <div class=\"container\">\n @if (showCaseStudyHeader) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap\">\n <ng-container *ngTemplateOutlet=\"caseStudyHeaderTemplate\"></ng-container>\n <a class=\"view-all\" routerLink=\"/resources/case-studies\">VIEW ALL ></a>\n </div>\n } @else {\n <div class=\"d-md-flex justify-content-between align-items-start\">\n <ng-container *ngTemplateOutlet=\"caseStudyHeaderTemplate\"></ng-container>\n </div>\n }\n\n\n <ng-template #caseStudyHeaderTemplate>\n <h2 class=\"section-heading d-flex align-items-center\" id=\"case-studies\" [ngClass]=\"{ 'w-50': isEditingTitle }\">\n @if (!isEditingTitle) {\n @if (resourceTitle) {\n <span>\n <span [innerHTML]=\"resourceTitle\"></span>\n </span>\n } @else {\n Case Studies\n }\n @if (canEditResourcesValue) {\n <i\n class=\"fa fa-edit in-page-edit-icon ms-3 cursor-pointer\"\n (click)=\"toggleEditTitle()\"\n (keydown.enter)=\"toggleEditTitle()\"\n (keydown.space)=\"toggleEditTitle()\"\n title=\"Edit Title\"></i>\n }\n } @else {\n <input [(ngModel)]=\"editedTitle\" class=\"form-control d-inline w-auto me-2\" [ngClass]=\"{ 'w-100': isEditingTitle }\" id=\"input_editedTitle_9216\" name=\"input_editedTitle_9216\" />\n <button class=\"btn btn-sm btn-primary me-1\" (click)=\"saveEditedTitle()\">Save</button>\n <button class=\"btn btn-sm btn-secondary\" (click)=\"isEditingTitle = false\">Cancel</button>\n }\n\n </h2>\n </ng-template>\n\n\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (posts.length === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n\n\n @if (posts.length !== 0 && isLoaded) {\n <div class=\"row d-flex flex-wrap justify-content-center gap-4 video-row\">\n @for (post of posts; track trackByPostId($index, post)) {\n <div class=\"testimonial-box\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"getPosts(1, 100)\">\n </pw-resource-edit-card-lazy>\n <div>\n @if (!post.rectangular_picture.url.includes('default-photo.jpg') ) {\n <img [src]=\"post.rectangular_picture.url\"\n alt=\"IT Partners Logo\"\n class=\"company-logo mb-3\"\n loading=\"lazy\" />\n }\n <p class=\"mb-4 mt-3 testimonial-section\">\n <span [innerHTML]=\"post.title\"></span>\n </p>\n </div>\n <!-- BOTTOM AVATAR -->\n <div class=\"avatar-container mt-5\">\n @if (post.picture.url && !post.picture.url.includes('default-photo.jpg')) {\n <img [src]=\"post.picture.url\"\n alt=\"User Avatar\"\n class=\"testimonial-avatar\"\n loading=\"lazy\" />\n }\n @if (post?.external_url) {\n <a\n class=\"read-more-btn-overlay\"\n aria-label=\"Navigate to external url\"\n [href]=\"post.external_url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n } @else {\n <a class=\"read-more-btn-overlay\" aria-label=\"Navigate to resource view\" [routerLink]=\"['/resources/view', post?.slug]\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n</section>\n", styles: [".resource-vault-section{background:#fff;text-align:center;padding:3rem 0}.section-outer,.container{padding:0 15px}.d-md-flex{display:flex}.justify-content-between{justify-content:space-between}.align-items-start{align-items:flex-start}.vault-heading{font-size:2rem;font-weight:700}.video-row{margin-top:3rem;gap:5.5rem!important}.row{display:flex;flex-wrap:wrap}.col-md-6,.col-lg-4{flex:0 0 auto;width:100%}@media(width>=768px){.col-md-6,.col-lg-4{width:50%}}@media(width>=992px){.col-md-6,.col-lg-4{width:33.3333%}}.mb-4{margin-bottom:1.5rem}.testimonial-box{display:flex;flex-direction:column;justify-content:space-between;background:#fff;color:#000;border-radius:20px;box-shadow:0 0 20px #0000001a;text-align:center;width:338px;height:auto;padding:2.5rem 1.5rem;font-size:1.1rem;min-height:421.4px!important}.testimonial-box .testimonial-section{font-size:1.5rem;line-height:2rem;font-weight:400;color:var(--text-color, black)}.testimonial-box .testimonial-section strong{display:block}.testimonial-box .company-logo{width:100%!important;height:auto!important;max-width:150px!important;object-fit:contain;align-self:center}.testimonial-box .avatar-container{margin-top:auto;position:relative;display:inline-block}.testimonial-box .avatar-container .testimonial-avatar{width:60%;aspect-ratio:1/1;height:auto;border-radius:50%;object-fit:fill}.testimonial-box .avatar-container .read-more-btn-overlay{position:absolute;text-decoration:none!important;bottom:0;left:50%;transform:translate(-50%);background-color:var(--text-color, black);color:#fff;width:240px;padding:10px 24px;border-radius:24px;font-size:1.5rem;font-weight:500;cursor:pointer;transition:background .3s ease;display:flex;justify-content:space-between;align-items:center;text-align:left;border:1px solid;box-shadow:none!important;border-color:var(--text-color, black)}.testimonial-box .avatar-container .read-more-btn-overlay:hover{background:#fff;color:var(--text-color, black)!important}.testimonial-box .avatar-container .read-more-btn-overlay .arrow{margin-bottom:.3rem}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i5$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "component", type: i7.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "directive", type: i5.LazyImgDirective, selector: "img" }, { kind: "component", type: ResourceEditCardLazyComponent, selector: "pw-resource-edit-card-lazy", inputs: ["id", "resourceData", "canEdit"], outputs: ["updated"] }, { kind: "pipe", type: i10.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
713
+ }
714
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: CaseStudyCardComponent, decorators: [{
715
+ type: Component,
716
+ args: [{ selector: 'pw-case-studies-card', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<section class=\"resource-vault-section bg-white text-center py-5 extra-top-padding section-outer\" id=\"case-studies\">\n <div class=\"container\">\n @if (showCaseStudyHeader) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap\">\n <ng-container *ngTemplateOutlet=\"caseStudyHeaderTemplate\"></ng-container>\n <a class=\"view-all\" routerLink=\"/resources/case-studies\">VIEW ALL ></a>\n </div>\n } @else {\n <div class=\"d-md-flex justify-content-between align-items-start\">\n <ng-container *ngTemplateOutlet=\"caseStudyHeaderTemplate\"></ng-container>\n </div>\n }\n\n\n <ng-template #caseStudyHeaderTemplate>\n <h2 class=\"section-heading d-flex align-items-center\" id=\"case-studies\" [ngClass]=\"{ 'w-50': isEditingTitle }\">\n @if (!isEditingTitle) {\n @if (resourceTitle) {\n <span>\n <span [innerHTML]=\"resourceTitle\"></span>\n </span>\n } @else {\n Case Studies\n }\n @if (canEditResourcesValue) {\n <i\n class=\"fa fa-edit in-page-edit-icon ms-3 cursor-pointer\"\n (click)=\"toggleEditTitle()\"\n (keydown.enter)=\"toggleEditTitle()\"\n (keydown.space)=\"toggleEditTitle()\"\n title=\"Edit Title\"></i>\n }\n } @else {\n <input [(ngModel)]=\"editedTitle\" class=\"form-control d-inline w-auto me-2\" [ngClass]=\"{ 'w-100': isEditingTitle }\" id=\"input_editedTitle_9216\" name=\"input_editedTitle_9216\" />\n <button class=\"btn btn-sm btn-primary me-1\" (click)=\"saveEditedTitle()\">Save</button>\n <button class=\"btn btn-sm btn-secondary\" (click)=\"isEditingTitle = false\">Cancel</button>\n }\n\n </h2>\n </ng-template>\n\n\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (posts.length === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n\n\n @if (posts.length !== 0 && isLoaded) {\n <div class=\"row d-flex flex-wrap justify-content-center gap-4 video-row\">\n @for (post of posts; track trackByPostId($index, post)) {\n <div class=\"testimonial-box\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"getPosts(1, 100)\">\n </pw-resource-edit-card-lazy>\n <div>\n @if (!post.rectangular_picture.url.includes('default-photo.jpg') ) {\n <img [src]=\"post.rectangular_picture.url\"\n alt=\"IT Partners Logo\"\n class=\"company-logo mb-3\"\n loading=\"lazy\" />\n }\n <p class=\"mb-4 mt-3 testimonial-section\">\n <span [innerHTML]=\"post.title\"></span>\n </p>\n </div>\n <!-- BOTTOM AVATAR -->\n <div class=\"avatar-container mt-5\">\n @if (post.picture.url && !post.picture.url.includes('default-photo.jpg')) {\n <img [src]=\"post.picture.url\"\n alt=\"User Avatar\"\n class=\"testimonial-avatar\"\n loading=\"lazy\" />\n }\n @if (post?.external_url) {\n <a\n class=\"read-more-btn-overlay\"\n aria-label=\"Navigate to external url\"\n [href]=\"post.external_url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n } @else {\n <a class=\"read-more-btn-overlay\" aria-label=\"Navigate to resource view\" [routerLink]=\"['/resources/view', post?.slug]\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n</section>\n", styles: [".resource-vault-section{background:#fff;text-align:center;padding:3rem 0}.section-outer,.container{padding:0 15px}.d-md-flex{display:flex}.justify-content-between{justify-content:space-between}.align-items-start{align-items:flex-start}.vault-heading{font-size:2rem;font-weight:700}.video-row{margin-top:3rem;gap:5.5rem!important}.row{display:flex;flex-wrap:wrap}.col-md-6,.col-lg-4{flex:0 0 auto;width:100%}@media(width>=768px){.col-md-6,.col-lg-4{width:50%}}@media(width>=992px){.col-md-6,.col-lg-4{width:33.3333%}}.mb-4{margin-bottom:1.5rem}.testimonial-box{display:flex;flex-direction:column;justify-content:space-between;background:#fff;color:#000;border-radius:20px;box-shadow:0 0 20px #0000001a;text-align:center;width:338px;height:auto;padding:2.5rem 1.5rem;font-size:1.1rem;min-height:421.4px!important}.testimonial-box .testimonial-section{font-size:1.5rem;line-height:2rem;font-weight:400;color:var(--text-color, black)}.testimonial-box .testimonial-section strong{display:block}.testimonial-box .company-logo{width:100%!important;height:auto!important;max-width:150px!important;object-fit:contain;align-self:center}.testimonial-box .avatar-container{margin-top:auto;position:relative;display:inline-block}.testimonial-box .avatar-container .testimonial-avatar{width:60%;aspect-ratio:1/1;height:auto;border-radius:50%;object-fit:fill}.testimonial-box .avatar-container .read-more-btn-overlay{position:absolute;text-decoration:none!important;bottom:0;left:50%;transform:translate(-50%);background-color:var(--text-color, black);color:#fff;width:240px;padding:10px 24px;border-radius:24px;font-size:1.5rem;font-weight:500;cursor:pointer;transition:background .3s ease;display:flex;justify-content:space-between;align-items:center;text-align:left;border:1px solid;box-shadow:none!important;border-color:var(--text-color, black)}.testimonial-box .avatar-container .read-more-btn-overlay:hover{background:#fff;color:var(--text-color, black)!important}.testimonial-box .avatar-container .read-more-btn-overlay .arrow{margin-bottom:.3rem}\n"] }]
717
+ }], ctorParameters: () => [{ type: i0.Injector }, { type: ResourceService }, { type: i2.TagService }, { type: i0.ChangeDetectorRef }], propDecorators: { showCaseStudyHeader: [{
718
+ type: Input
719
+ }], categoryId: [{
720
+ type: Input
721
+ }], postSlice: [{
722
+ type: Input
723
+ }], tag: [{
724
+ type: Input
725
+ }], resourceTitle: [{
726
+ type: Input
727
+ }], user: [{
728
+ type: Input
729
+ }], userLoggedIn: [{
730
+ type: Input
731
+ }] } });
732
+
733
+ class ResourceCardComponent extends AppBaseComponent {
734
+ constructor(injector, resourceService, tagService, cdr) {
735
+ super(injector);
736
+ this.resourceService = resourceService;
737
+ this.tagService = tagService;
738
+ this.cdr = cdr;
739
+ this.isHeaderVisible = true;
740
+ this.isRelated = false;
741
+ this.postSlice = false;
742
+ this.isLoaded = false;
743
+ this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;
744
+ this.posts = [];
745
+ this.canEditResourcesValue = false;
746
+ }
747
+ ngOnInit() {
748
+ if (this.userLoggedIn) {
749
+ this.localStorage.getItem$('product').subscribe(res => {
750
+ const data = res ? JSON.parse(res) : null;
751
+ this.subscriptionId = data?.subscriptionId;
752
+ this.cdr.markForCheck();
753
+ });
754
+ }
755
+ this.getPosts(1, 10);
756
+ }
757
+ ngOnChanges(changes) {
758
+ if (changes['user'] || changes['userLoggedIn']) {
759
+ if (this.userLoggedIn && this.user) {
760
+ this.updateCanEditResourcesValue();
761
+ }
762
+ }
763
+ }
764
+ getPosts(page, pageSize) {
765
+ this.isLoaded = false;
766
+ this.resourceService
767
+ .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', this.categoryId)
768
+ .subscribe(response => {
769
+ const sortedPosts = (response.posts ?? [])
770
+ .filter(post => post.showcase === true)
771
+ .sort((a, b) => new Date(b.published_at).getTime() - new Date(a.published_at).getTime());
772
+ this.posts = this.postSlice ? sortedPosts : [...sortedPosts].slice(0, 3);
773
+ this.cdr.markForCheck();
774
+ })
775
+ .add(() => {
776
+ this.isLoaded = true;
777
+ this.cdr.markForCheck();
778
+ });
779
+ }
780
+ toggleTagEditTitle() {
781
+ this.isEditingTitle = true;
782
+ this.editedTitle = this.resourceTitle;
783
+ }
784
+ saveEditedTitle() {
785
+ HelperService.updateTagTitle(this.tag, this.editedTitle, this.tagService, this.getEffectiveSubscriptionId(), this.toast).subscribe(() => {
786
+ this.resourceTitle = this.editedTitle;
787
+ this.isEditingTitle = false;
788
+ this.cdr.markForCheck();
789
+ });
790
+ }
791
+ /** Helper method to get effective subscription ID */
792
+ getEffectiveSubscriptionId() {
793
+ return HelperService.getEffectiveSubscriptionId(this.user, this.subscriptionId, this.masterSubscriptionId);
794
+ }
795
+ updateCanEditResourcesValue() {
796
+ this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
797
+ }
798
+ canEditResources() {
799
+ return this.canEditResourcesValue;
800
+ }
801
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceCardComponent, deps: [{ token: i0.Injector }, { token: ResourceService }, { token: i2.TagService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
802
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: ResourceCardComponent, isStandalone: false, selector: "pw-resource-cards", inputs: { categoryId: "categoryId", isHeaderVisible: "isHeaderVisible", isRelated: "isRelated", resourceTitle: "resourceTitle", postSlice: "postSlice", header: "header", tag: "tag", resourceLink: "resourceLink", user: "user", userLoggedIn: "userLoggedIn" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<section class=\"resource-vault-section bg-white\">\n <div class=\"container\">\n @if (isHeaderVisible) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap\">\n <h2 class=\"section-heading d-flex align-items-center\" [ngClass]=\"{ 'w-50': isEditingTitle }\">\n @if (!isEditingTitle) {\n @if (resourceTitle) {\n <span [innerHTML]=\"resourceTitle\"></span>\n } @else {\n Our team\u2019s articles\n }\n @if (!isRelated && canEditResourcesValue) {\n <i class=\"fa fa-edit in-page-edit-icon ms-3 cursor-pointer\" (click)=\"toggleTagEditTitle()\" (keydown.enter)=\"toggleTagEditTitle()\" (keydown.space)=\"toggleTagEditTitle()\" title=\"Edit Title\"></i>\n }\n } @else {\n <input [(ngModel)]=\"editedTitle\" class=\"form-control d-inline w-auto me-2\" [ngClass]=\"{ 'w-100': isEditingTitle }\" id=\"input_editedTitle_9056\" name=\"input_editedTitle_9056\" />\n <button class=\"btn btn-sm btn-primary me-1\" (click)=\"saveEditedTitle()\">Save</button>\n <button class=\"btn btn-sm btn-secondary\" (click)=\"isEditingTitle = false\">Cancel</button>\n }\n </h2>\n <a class=\"view-all\" [routerLink]=\"resourceLink\">VIEW ALL ></a>\n </div>\n }\n\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (posts.length === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n\n @if (posts.length !== 0 && isLoaded) {\n <div class=\"row d-flex flex-wrap justify-content-center gap-4 video-row\">\n @for (post of posts; track post) {\n <div class=\"resource-blog-card p-4\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"getPosts(1, 100)\">\n </pw-resource-edit-card-lazy>\n <p class=\"resource-title\" [innerHTML]=\"post.title \"></p>\n <a\n [href]=\"post.external_url || ('/resources/view/' + post?.slug)\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label=\"Navigate to resource\"\n >\n <img\n [src]=\"post.picture.url\"\n class=\"img-fluid my-3 mt-auto\"\n alt=\"Webinar\"\n /></a>\n @if (post?.external_url) {\n <a\n class=\"resource-btn mt-3\"\n [href]=\"post.external_url\"\n aria-label=\"Navigate to external url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n } @else {\n <a class=\"resource-btn mt-3\" aria-label=\"Navigate to resource view\" [href]=\"'/resources/view/' + post?.slug\" target=\"_blank\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n }\n </div>\n }\n </div>\n }\n </div>\n</section>", styles: [".bold{font-weight:700}.resource-heading{margin-bottom:2rem}.resource-note{margin-top:1rem;font-size:.85rem;color:#555}.resource-divider{border:0;height:40px;width:100%;background:linear-gradient(to bottom,#0000,#00000026);margin:0}.press-release-icon{height:auto!important;margin:0 11px 1.9rem;display:block;align-self:center;width:auto!important;aspect-ratio:0!important;object-fit:cover;margin-top:auto;margin-right:0!important}.resource-vault-section{padding:60px 0;background:#fff;padding-bottom:9rem!important;padding-top:7rem!important;box-shadow:0 4px 32px -14px #40576d4d!important}.resource-vault-section .vault-heading{font-size:3rem;font-weight:300}.resource-vault-section .explore-link{color:#000;font-weight:400;text-decoration:none;font-size:1.5rem}.resource-vault-section .resource-blog-card{display:flex;flex-direction:column;justify-content:space-between;background-color:#fff;border-radius:30px;box-shadow:0 20px 40px #00000014;padding:25px;text-align:center;width:338px;height:auto!important}.resource-vault-section .resource-blog-card h5{font-size:1.5rem;font-weight:400;margin-bottom:.5rem;color:var(--text-color, black)}.resource-vault-section .resource-blog-card p{font-size:1.5rem;color:var(--text-color, black);line-height:2rem}.resource-vault-section .resource-blog-card img{width:100%;border-radius:10px;aspect-ratio:1/1;object-fit:cover;margin-top:auto;margin-right:0!important;max-width:250px!important;align-self:center!important}.resource-vault-section .resource-blog-card iframe{height:210px;border-radius:10px;object-fit:cover;margin-right:0!important;max-width:280px!important}.resource-vault-section .resource-blog-card .resource-btn{background-color:var(--text-color, black);color:#fff;margin-top:auto;padding:10px 24px;border-radius:24px;font-size:1.5rem;font-weight:500;width:100%;max-width:240px;cursor:pointer;transition:background .3s ease;display:flex;justify-content:space-between;align-self:center;align-items:center;text-align:left;text-decoration:none;border:1px solid;box-shadow:none!important;border-color:var(--text-color, black)}.resource-vault-section .resource-blog-card .resource-btn:hover{background:#fff;color:var(--text-color, black)!important}.resource-vault-section .vault-description{text-align:left;max-width:657px;color:#182527;line-height:2.3rem!important;font-size:1.65rem}@media(width<=1200px){.resource-vault-section .vault-heading{font-size:3.5rem}.resource-vault-section .vault-description{margin-top:1.35rem}.resource-vault-section .resource-btn{margin-left:0!important}}.video-row{gap:5.5rem!important;margin-top:3rem!important}@media(width>=991px){section.bg-white.text-center.extra-top-padding{position:relative;overflow:hidden}section.bg-white.text-center.extra-top-padding .banner-header{margin-bottom:4rem!important}}.vault-header{text-align:left}@media(width>=768px)and (width<=1200px){.container{padding:0 6rem!important}}@media(width<=768px){.video-row{gap:3rem!important}}@media(max-width:768px){.resource-vault-section{padding-bottom:6rem!important}.resource-vault-section .container{padding-top:0rem!important;padding-bottom:0rem!important}.vault-header{text-align:center!important}.vault-heading{font-size:3rem!important}}@media(width<=1200px){.container{padding:7rem 3rem 1rem!important}}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i5$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "component", type: i7.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "directive", type: i5.LazyImgDirective, selector: "img" }, { kind: "component", type: ResourceEditCardLazyComponent, selector: "pw-resource-edit-card-lazy", inputs: ["id", "resourceData", "canEdit"], outputs: ["updated"] }, { kind: "pipe", type: i10.TranslocoPipe, name: "transloco" }] }); }
803
+ }
804
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceCardComponent, decorators: [{
805
+ type: Component,
806
+ args: [{ selector: 'pw-resource-cards', standalone: false, template: "<section class=\"resource-vault-section bg-white\">\n <div class=\"container\">\n @if (isHeaderVisible) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap\">\n <h2 class=\"section-heading d-flex align-items-center\" [ngClass]=\"{ 'w-50': isEditingTitle }\">\n @if (!isEditingTitle) {\n @if (resourceTitle) {\n <span [innerHTML]=\"resourceTitle\"></span>\n } @else {\n Our team\u2019s articles\n }\n @if (!isRelated && canEditResourcesValue) {\n <i class=\"fa fa-edit in-page-edit-icon ms-3 cursor-pointer\" (click)=\"toggleTagEditTitle()\" (keydown.enter)=\"toggleTagEditTitle()\" (keydown.space)=\"toggleTagEditTitle()\" title=\"Edit Title\"></i>\n }\n } @else {\n <input [(ngModel)]=\"editedTitle\" class=\"form-control d-inline w-auto me-2\" [ngClass]=\"{ 'w-100': isEditingTitle }\" id=\"input_editedTitle_9056\" name=\"input_editedTitle_9056\" />\n <button class=\"btn btn-sm btn-primary me-1\" (click)=\"saveEditedTitle()\">Save</button>\n <button class=\"btn btn-sm btn-secondary\" (click)=\"isEditingTitle = false\">Cancel</button>\n }\n </h2>\n <a class=\"view-all\" [routerLink]=\"resourceLink\">VIEW ALL ></a>\n </div>\n }\n\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (posts.length === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n\n @if (posts.length !== 0 && isLoaded) {\n <div class=\"row d-flex flex-wrap justify-content-center gap-4 video-row\">\n @for (post of posts; track post) {\n <div class=\"resource-blog-card p-4\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"getPosts(1, 100)\">\n </pw-resource-edit-card-lazy>\n <p class=\"resource-title\" [innerHTML]=\"post.title \"></p>\n <a\n [href]=\"post.external_url || ('/resources/view/' + post?.slug)\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label=\"Navigate to resource\"\n >\n <img\n [src]=\"post.picture.url\"\n class=\"img-fluid my-3 mt-auto\"\n alt=\"Webinar\"\n /></a>\n @if (post?.external_url) {\n <a\n class=\"resource-btn mt-3\"\n [href]=\"post.external_url\"\n aria-label=\"Navigate to external url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n } @else {\n <a class=\"resource-btn mt-3\" aria-label=\"Navigate to resource view\" [href]=\"'/resources/view/' + post?.slug\" target=\"_blank\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n }\n </div>\n }\n </div>\n }\n </div>\n</section>", styles: [".bold{font-weight:700}.resource-heading{margin-bottom:2rem}.resource-note{margin-top:1rem;font-size:.85rem;color:#555}.resource-divider{border:0;height:40px;width:100%;background:linear-gradient(to bottom,#0000,#00000026);margin:0}.press-release-icon{height:auto!important;margin:0 11px 1.9rem;display:block;align-self:center;width:auto!important;aspect-ratio:0!important;object-fit:cover;margin-top:auto;margin-right:0!important}.resource-vault-section{padding:60px 0;background:#fff;padding-bottom:9rem!important;padding-top:7rem!important;box-shadow:0 4px 32px -14px #40576d4d!important}.resource-vault-section .vault-heading{font-size:3rem;font-weight:300}.resource-vault-section .explore-link{color:#000;font-weight:400;text-decoration:none;font-size:1.5rem}.resource-vault-section .resource-blog-card{display:flex;flex-direction:column;justify-content:space-between;background-color:#fff;border-radius:30px;box-shadow:0 20px 40px #00000014;padding:25px;text-align:center;width:338px;height:auto!important}.resource-vault-section .resource-blog-card h5{font-size:1.5rem;font-weight:400;margin-bottom:.5rem;color:var(--text-color, black)}.resource-vault-section .resource-blog-card p{font-size:1.5rem;color:var(--text-color, black);line-height:2rem}.resource-vault-section .resource-blog-card img{width:100%;border-radius:10px;aspect-ratio:1/1;object-fit:cover;margin-top:auto;margin-right:0!important;max-width:250px!important;align-self:center!important}.resource-vault-section .resource-blog-card iframe{height:210px;border-radius:10px;object-fit:cover;margin-right:0!important;max-width:280px!important}.resource-vault-section .resource-blog-card .resource-btn{background-color:var(--text-color, black);color:#fff;margin-top:auto;padding:10px 24px;border-radius:24px;font-size:1.5rem;font-weight:500;width:100%;max-width:240px;cursor:pointer;transition:background .3s ease;display:flex;justify-content:space-between;align-self:center;align-items:center;text-align:left;text-decoration:none;border:1px solid;box-shadow:none!important;border-color:var(--text-color, black)}.resource-vault-section .resource-blog-card .resource-btn:hover{background:#fff;color:var(--text-color, black)!important}.resource-vault-section .vault-description{text-align:left;max-width:657px;color:#182527;line-height:2.3rem!important;font-size:1.65rem}@media(width<=1200px){.resource-vault-section .vault-heading{font-size:3.5rem}.resource-vault-section .vault-description{margin-top:1.35rem}.resource-vault-section .resource-btn{margin-left:0!important}}.video-row{gap:5.5rem!important;margin-top:3rem!important}@media(width>=991px){section.bg-white.text-center.extra-top-padding{position:relative;overflow:hidden}section.bg-white.text-center.extra-top-padding .banner-header{margin-bottom:4rem!important}}.vault-header{text-align:left}@media(width>=768px)and (width<=1200px){.container{padding:0 6rem!important}}@media(width<=768px){.video-row{gap:3rem!important}}@media(max-width:768px){.resource-vault-section{padding-bottom:6rem!important}.resource-vault-section .container{padding-top:0rem!important;padding-bottom:0rem!important}.vault-header{text-align:center!important}.vault-heading{font-size:3rem!important}}@media(width<=1200px){.container{padding:7rem 3rem 1rem!important}}\n"] }]
807
+ }], ctorParameters: () => [{ type: i0.Injector }, { type: ResourceService }, { type: i2.TagService }, { type: i0.ChangeDetectorRef }], propDecorators: { categoryId: [{
808
+ type: Input
809
+ }], isHeaderVisible: [{
810
+ type: Input
811
+ }], isRelated: [{
812
+ type: Input
813
+ }], resourceTitle: [{
814
+ type: Input
815
+ }], postSlice: [{
816
+ type: Input
817
+ }], header: [{
818
+ type: Input
819
+ }], tag: [{
820
+ type: Input
821
+ }], resourceLink: [{
822
+ type: Input
823
+ }], user: [{
824
+ type: Input
825
+ }], userLoggedIn: [{
826
+ type: Input
827
+ }] } });
828
+
829
+ class BaseResourceComponent extends AppBaseComponent {
830
+ constructor(resourceService, tagService, authService, cdr, injector) {
831
+ super(injector);
832
+ this.resourceService = resourceService;
833
+ this.tagService = tagService;
834
+ this.authService = authService;
835
+ this.cdr = cdr;
836
+ this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;
837
+ this.posts = [];
838
+ this.testimonialsPosts = [];
839
+ this.isLoaded = false;
840
+ this.canEditResourcesValue = false;
841
+ }
842
+ ngOnInit() {
843
+ this.getUserSubscriptionId().subscribe(response => {
844
+ this.subscriptionId = response;
845
+ this.cdr.markForCheck();
846
+ });
847
+ this.authService.getToken$().subscribe(res => {
848
+ this.userLoggedIn = !!res;
849
+ if (this.userLoggedIn) {
850
+ this.localStorage.getItem$('product').subscribe(res => {
851
+ const data = res ? JSON.parse(res) : null;
852
+ this.subscriptionId = data?.subscriptionId;
853
+ this.cdr.markForCheck();
854
+ });
855
+ this.userService.getUserInfo().subscribe(data => {
856
+ this.user = data;
857
+ this.updateCanEditResourcesValue();
858
+ this.initializeComponent();
859
+ this.cdr.markForCheck();
860
+ });
861
+ }
862
+ else {
863
+ this.initializeComponent();
864
+ }
865
+ this.cdr.markForCheck();
866
+ });
867
+ }
868
+ initializeComponent() {
869
+ if (this.shouldUseTagCategories()) {
870
+ this.getTags();
871
+ }
872
+ else {
873
+ this.getPostTags();
874
+ }
875
+ if (this.shouldLoadTestimonials()) {
876
+ this.getTestimonialTags();
877
+ }
878
+ }
879
+ getTags() {
880
+ this.isLoaded = false;
881
+ this.tagService
882
+ .getAllTagCategories({ search: this.getSearchTerm() }, this.getEffectiveSubscriptionId())
883
+ .subscribe(response => {
884
+ this.tagCategory = response?.tag_categories?.[0];
885
+ this.getPostTags();
886
+ this.cdr.markForCheck();
887
+ });
888
+ }
889
+ getPostTags() {
890
+ this.tagService
891
+ .getTagsByType('post_categories', {}, this.getEffectiveSubscriptionId())
892
+ .subscribe(response => {
893
+ if (this.shouldUseTagCategories()) {
894
+ this.blogPostTag = response.tags.find(tag => tag.tag_category_id === this.tagCategory?.id);
895
+ }
896
+ else {
897
+ this.blogPostTag = response.tags.find(tag => tag.name === this.getResourceType());
898
+ }
899
+ this.getPosts(1, 100);
900
+ this.cdr.markForCheck();
901
+ })
902
+ .add(() => {
903
+ this.isLoaded = true;
904
+ this.cdr.markForCheck();
905
+ });
906
+ }
907
+ getTestimonialTags() {
908
+ this.tagService
909
+ .getTagsByType('post_categories', {}, this.getEffectiveSubscriptionId())
910
+ .subscribe(response => {
911
+ this.blogTestimonialsPostTag = response.tags.find(tag => tag.name === 'Testimonials');
912
+ this.getTestimonialsPosts(1, 100);
913
+ this.cdr.markForCheck();
914
+ });
915
+ }
916
+ getPosts(page, pageSize) {
917
+ this.fetchPosts(page, pageSize, this.blogPostTag?.tag_category_id, 'posts');
918
+ }
919
+ getTestimonialsPosts(page, pageSize) {
920
+ this.fetchPosts(page, pageSize, this.blogTestimonialsPostTag?.tag_category_id, 'testimonialsPosts');
921
+ }
922
+ /** Shared method to fetch posts with common filtering, sorting, and slicing logic */
923
+ fetchPosts(page, pageSize, tagCategoryId, targetProperty) {
924
+ this.resourceService
925
+ .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', tagCategoryId)
926
+ .subscribe(response => {
927
+ const filteredPosts = response.posts
928
+ .filter(post => post.tags?.some(tag => tag.tag_category_id === tagCategoryId))
929
+ .sort((a, b) => new Date(b.published_at).getTime() - new Date(a.published_at).getTime())
930
+ .slice(0, 12);
931
+ if (targetProperty === 'posts') {
932
+ this.posts = filteredPosts;
933
+ }
934
+ else {
935
+ this.testimonialsPosts = filteredPosts;
936
+ }
937
+ this.cdr.markForCheck();
938
+ });
939
+ }
940
+ /** Helper method to get effective subscription ID */
941
+ getEffectiveSubscriptionId() {
942
+ return HelperService.getEffectiveSubscriptionId(this.user, this.subscriptionId, this.masterSubscriptionId);
943
+ }
944
+ // Optional methods that can be overridden
945
+ getSearchTerm() {
946
+ return this.getResourceType();
947
+ }
948
+ shouldUseTagCategories() {
949
+ return false;
950
+ }
951
+ shouldLoadTestimonials() {
952
+ return false;
953
+ }
954
+ updateCanEditResourcesValue() {
955
+ if (this.userLoggedIn && this.user) {
956
+ this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
957
+ }
958
+ else {
959
+ this.canEditResourcesValue = false;
960
+ }
961
+ }
962
+ canEditResources() {
963
+ return this.canEditResourcesValue;
964
+ }
965
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: BaseResourceComponent, deps: [{ token: ResourceService }, { token: i2.TagService }, { token: i2.AuthService }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
966
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.6", type: BaseResourceComponent, isStandalone: false, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
967
+ }
968
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: BaseResourceComponent, decorators: [{
969
+ type: Component,
970
+ args: [{
971
+ template: '',
972
+ standalone: false
973
+ }]
974
+ }], ctorParameters: () => [{ type: ResourceService }, { type: i2.TagService }, { type: i2.AuthService }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }] });
975
+
976
+ class ResourceVaultComponent extends BaseResourceComponent {
977
+ constructor(resourceService, tagService, authService, cdr, injector) {
978
+ super(resourceService, tagService, authService, cdr, injector);
979
+ this.showVaultSection = false;
980
+ this.postSlice = false;
981
+ this.isLoadedChange = new EventEmitter();
982
+ this.isEditingTitle = false;
983
+ }
984
+ ngOnInit() {
985
+ super.ngOnInit();
986
+ this.getPosts(1, 10);
987
+ }
988
+ getResourceType() {
989
+ return 'Vault';
990
+ }
991
+ getPosts(page, pageSize) {
992
+ this.isLoaded = false;
993
+ this.resourceService
994
+ .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', this.categoryId)
995
+ .subscribe(response => {
996
+ const sortedPosts = (response.posts ?? [])
997
+ .filter(post => post.showcase === true)
998
+ .sort((a, b) => new Date(b.published_at).getTime() - new Date(a.published_at).getTime());
999
+ this.posts = this.postSlice ? sortedPosts : [...sortedPosts].slice(0, 3);
1000
+ this.cdr.markForCheck();
1001
+ })
1002
+ .add(() => {
1003
+ this.isLoaded = true;
1004
+ this.isLoadedChange.emit(this.isLoaded);
1005
+ this.cdr.markForCheck();
1006
+ });
1007
+ }
1008
+ toggleEditTitle() {
1009
+ this.isEditingTitle = true;
1010
+ this.editedTitle = this.resourceTitle;
1011
+ }
1012
+ saveEditedTitle() {
1013
+ HelperService.updateTagTitle(this.tag, this.editedTitle, this.tagService, this.getEffectiveSubscriptionId(), this.toast).subscribe(() => {
1014
+ this.resourceTitle = this.editedTitle;
1015
+ this.isEditingTitle = false;
1016
+ this.cdr.markForCheck();
1017
+ });
1018
+ }
1019
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceVaultComponent, deps: [{ token: ResourceService }, { token: i2.TagService }, { token: i2.AuthService }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
1020
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: ResourceVaultComponent, isStandalone: false, selector: "pw-resource--vault", inputs: { showVaultSection: "showVaultSection", postSlice: "postSlice", categoryId: "categoryId", resourceTitle: "resourceTitle", tag: "tag" }, outputs: { isLoadedChange: "isLoadedChange" }, usesInheritance: true, ngImport: i0, template: "<section class=\"resource-vault-section bg-white text-center py-5 extra-top-padding section-outer\">\n <div class=\"container\">\n @if (showVaultSection) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap mb-5\">\n <h2 class=\"section-heading d-flex align-items-center\" [ngClass]=\"{ 'w-50': isEditingTitle }\">\n @if (!isEditingTitle) {\n @if (resourceTitle) {\n <span [innerHTML]=\"resourceTitle\"></span>\n } @else {\n Whitepapers &amp; Tools\n }\n @if (canEditResourcesValue) {\n <i class=\"fa fa-edit in-page-edit-icon ms-3 cursor-pointer\" (click)=\"toggleEditTitle()\" (keydown.enter)=\"toggleEditTitle()\" (keydown.space)=\"toggleEditTitle()\" title=\"Edit Title\"></i>\n }\n } @else {\n <input [(ngModel)]=\"editedTitle\" class=\"form-control d-inline w-auto me-2\" [ngClass]=\"{ 'w-100': isEditingTitle }\" id=\"input_editedTitle_9216\" name=\"input_editedTitle_9216\" />\n <button class=\"btn btn-sm btn-primary me-1\" (click)=\"saveEditedTitle()\">Save</button>\n <button class=\"btn btn-sm btn-secondary\" (click)=\"isEditingTitle = false\">Cancel</button>\n }\n </h2>\n <a class=\"view-all\" routerLink=\"/resources/white-papers\">VIEW ALL ></a>\n </div>\n }\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (posts.length === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n @if (posts.length !== 0 && isLoaded) {\n <div class=\"d-flex mt-2 flex-wrap justify-content-center gap-4 video-row\">\n @for (post of posts; track post) {\n <div class=\"resource-blog-card text-center p-4\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"getPosts(1, 100)\">\n </pw-resource-edit-card-lazy>\n <p class=\"mb-4\" [innerHTML]=\"post.title\"></p>\n <a\n [href]=\"post.external_url || ('/resources/view/' + post?.slug)\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label=\"Navigate to resource\"\n >\n <img\n [src]=\"post.picture.url\"\n class=\"img-fluid my-3 mt-auto\"\n alt=\"Webinar\"\n loading=\"lazy\"\n />\n </a>\n @if (post?.external_url) {\n <a\n class=\"resource-btn mt-3\"\n aria-label=\"Navigate to external url\"\n [href]=\"post.external_url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n } @else {\n <a class=\"resource-btn mt-3\" aria-label=\"Navigate to resource view\" [href]=\"'/resources/view/' + post?.slug\" target=\"_blank\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n }\n </div>\n }\n </div>\n }\n </div>\n</section>\n", styles: [".bold{font-weight:700}.resource-heading{margin-bottom:2rem}.resource-note{margin-top:1rem;font-size:.85rem;color:#555}.resource-divider{border:0;height:40px;width:100%;background:linear-gradient(to bottom,#0000,#00000026);margin:0}.press-release-icon{height:auto!important;margin:0 11px 1.9rem;display:block;align-self:center;width:auto!important;aspect-ratio:0!important;object-fit:cover;margin-top:auto;margin-right:0!important}.resource-vault-section{padding:60px 0;background:#fff;padding-bottom:9rem!important;padding-top:7rem!important;box-shadow:0 4px 32px -14px #40576d4d!important}.resource-vault-section .vault-heading{font-size:3rem;font-weight:300}.resource-vault-section .explore-link{color:#000;font-weight:400;text-decoration:none;font-size:1.5rem}.resource-vault-section .resource-blog-card{display:flex;flex-direction:column;justify-content:space-between;background-color:#fff;border-radius:30px;box-shadow:0 20px 40px #00000014;padding:25px;text-align:center;width:338px;height:auto!important}.resource-vault-section .resource-blog-card h5{font-size:1.5rem;font-weight:400;margin-bottom:.5rem;color:var(--text-color, black)}.resource-vault-section .resource-blog-card p{font-size:1.5rem;color:var(--text-color, black);line-height:2rem}.resource-vault-section .resource-blog-card img{width:100%;border-radius:10px;aspect-ratio:1/1;object-fit:cover;margin-top:auto;margin-right:0!important;max-width:250px!important;align-self:center!important}.resource-vault-section .resource-blog-card iframe{height:210px;border-radius:10px;object-fit:cover;margin-right:0!important;max-width:280px!important}.resource-vault-section .resource-blog-card .resource-btn{background-color:var(--text-color, black);color:#fff;margin-top:auto;padding:10px 24px;border-radius:24px;font-size:1.5rem;font-weight:500;width:100%;max-width:240px;cursor:pointer;transition:background .3s ease;display:flex;justify-content:space-between;align-self:center;align-items:center;text-align:left;text-decoration:none;border:1px solid;box-shadow:none!important;border-color:var(--text-color, black)}.resource-vault-section .resource-blog-card .resource-btn:hover{background:#fff;color:var(--text-color, black)!important}.resource-vault-section .vault-description{text-align:left;max-width:657px;color:#182527;line-height:2.3rem!important;font-size:1.65rem}@media(width<=1200px){.resource-vault-section .vault-heading{font-size:3.5rem}.resource-vault-section .vault-description{margin-top:1.35rem}.resource-vault-section .resource-btn{margin-left:0!important}}.video-row{gap:5.5rem!important;margin-top:3rem!important}@media(width>=991px){section.bg-white.text-center.extra-top-padding{position:relative;overflow:hidden}section.bg-white.text-center.extra-top-padding .banner-header{margin-bottom:4rem!important}}.vault-header{text-align:left}@media(width>=768px)and (width<=1200px){.container{padding:0 6rem!important}}@media(width<=768px){.video-row{gap:3rem!important}}@media(max-width:768px){.resource-vault-section{padding-bottom:6rem!important}.resource-vault-section .container{padding-top:0rem!important;padding-bottom:0rem!important}.vault-header{text-align:center!important}.vault-heading{font-size:3rem!important}}@media(width<=1200px){.container{padding:7rem 3rem 1rem!important}}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i5$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "component", type: i7.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "directive", type: i5.LazyImgDirective, selector: "img" }, { kind: "component", type: ResourceEditCardLazyComponent, selector: "pw-resource-edit-card-lazy", inputs: ["id", "resourceData", "canEdit"], outputs: ["updated"] }, { kind: "pipe", type: i10.TranslocoPipe, name: "transloco" }] }); }
1021
+ }
1022
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceVaultComponent, decorators: [{
1023
+ type: Component,
1024
+ args: [{ selector: 'pw-resource--vault', standalone: false, template: "<section class=\"resource-vault-section bg-white text-center py-5 extra-top-padding section-outer\">\n <div class=\"container\">\n @if (showVaultSection) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap mb-5\">\n <h2 class=\"section-heading d-flex align-items-center\" [ngClass]=\"{ 'w-50': isEditingTitle }\">\n @if (!isEditingTitle) {\n @if (resourceTitle) {\n <span [innerHTML]=\"resourceTitle\"></span>\n } @else {\n Whitepapers &amp; Tools\n }\n @if (canEditResourcesValue) {\n <i class=\"fa fa-edit in-page-edit-icon ms-3 cursor-pointer\" (click)=\"toggleEditTitle()\" (keydown.enter)=\"toggleEditTitle()\" (keydown.space)=\"toggleEditTitle()\" title=\"Edit Title\"></i>\n }\n } @else {\n <input [(ngModel)]=\"editedTitle\" class=\"form-control d-inline w-auto me-2\" [ngClass]=\"{ 'w-100': isEditingTitle }\" id=\"input_editedTitle_9216\" name=\"input_editedTitle_9216\" />\n <button class=\"btn btn-sm btn-primary me-1\" (click)=\"saveEditedTitle()\">Save</button>\n <button class=\"btn btn-sm btn-secondary\" (click)=\"isEditingTitle = false\">Cancel</button>\n }\n </h2>\n <a class=\"view-all\" routerLink=\"/resources/white-papers\">VIEW ALL ></a>\n </div>\n }\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (posts.length === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n @if (posts.length !== 0 && isLoaded) {\n <div class=\"d-flex mt-2 flex-wrap justify-content-center gap-4 video-row\">\n @for (post of posts; track post) {\n <div class=\"resource-blog-card text-center p-4\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"getPosts(1, 100)\">\n </pw-resource-edit-card-lazy>\n <p class=\"mb-4\" [innerHTML]=\"post.title\"></p>\n <a\n [href]=\"post.external_url || ('/resources/view/' + post?.slug)\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label=\"Navigate to resource\"\n >\n <img\n [src]=\"post.picture.url\"\n class=\"img-fluid my-3 mt-auto\"\n alt=\"Webinar\"\n loading=\"lazy\"\n />\n </a>\n @if (post?.external_url) {\n <a\n class=\"resource-btn mt-3\"\n aria-label=\"Navigate to external url\"\n [href]=\"post.external_url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n } @else {\n <a class=\"resource-btn mt-3\" aria-label=\"Navigate to resource view\" [href]=\"'/resources/view/' + post?.slug\" target=\"_blank\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n }\n </div>\n }\n </div>\n }\n </div>\n</section>\n", styles: [".bold{font-weight:700}.resource-heading{margin-bottom:2rem}.resource-note{margin-top:1rem;font-size:.85rem;color:#555}.resource-divider{border:0;height:40px;width:100%;background:linear-gradient(to bottom,#0000,#00000026);margin:0}.press-release-icon{height:auto!important;margin:0 11px 1.9rem;display:block;align-self:center;width:auto!important;aspect-ratio:0!important;object-fit:cover;margin-top:auto;margin-right:0!important}.resource-vault-section{padding:60px 0;background:#fff;padding-bottom:9rem!important;padding-top:7rem!important;box-shadow:0 4px 32px -14px #40576d4d!important}.resource-vault-section .vault-heading{font-size:3rem;font-weight:300}.resource-vault-section .explore-link{color:#000;font-weight:400;text-decoration:none;font-size:1.5rem}.resource-vault-section .resource-blog-card{display:flex;flex-direction:column;justify-content:space-between;background-color:#fff;border-radius:30px;box-shadow:0 20px 40px #00000014;padding:25px;text-align:center;width:338px;height:auto!important}.resource-vault-section .resource-blog-card h5{font-size:1.5rem;font-weight:400;margin-bottom:.5rem;color:var(--text-color, black)}.resource-vault-section .resource-blog-card p{font-size:1.5rem;color:var(--text-color, black);line-height:2rem}.resource-vault-section .resource-blog-card img{width:100%;border-radius:10px;aspect-ratio:1/1;object-fit:cover;margin-top:auto;margin-right:0!important;max-width:250px!important;align-self:center!important}.resource-vault-section .resource-blog-card iframe{height:210px;border-radius:10px;object-fit:cover;margin-right:0!important;max-width:280px!important}.resource-vault-section .resource-blog-card .resource-btn{background-color:var(--text-color, black);color:#fff;margin-top:auto;padding:10px 24px;border-radius:24px;font-size:1.5rem;font-weight:500;width:100%;max-width:240px;cursor:pointer;transition:background .3s ease;display:flex;justify-content:space-between;align-self:center;align-items:center;text-align:left;text-decoration:none;border:1px solid;box-shadow:none!important;border-color:var(--text-color, black)}.resource-vault-section .resource-blog-card .resource-btn:hover{background:#fff;color:var(--text-color, black)!important}.resource-vault-section .vault-description{text-align:left;max-width:657px;color:#182527;line-height:2.3rem!important;font-size:1.65rem}@media(width<=1200px){.resource-vault-section .vault-heading{font-size:3.5rem}.resource-vault-section .vault-description{margin-top:1.35rem}.resource-vault-section .resource-btn{margin-left:0!important}}.video-row{gap:5.5rem!important;margin-top:3rem!important}@media(width>=991px){section.bg-white.text-center.extra-top-padding{position:relative;overflow:hidden}section.bg-white.text-center.extra-top-padding .banner-header{margin-bottom:4rem!important}}.vault-header{text-align:left}@media(width>=768px)and (width<=1200px){.container{padding:0 6rem!important}}@media(width<=768px){.video-row{gap:3rem!important}}@media(max-width:768px){.resource-vault-section{padding-bottom:6rem!important}.resource-vault-section .container{padding-top:0rem!important;padding-bottom:0rem!important}.vault-header{text-align:center!important}.vault-heading{font-size:3rem!important}}@media(width<=1200px){.container{padding:7rem 3rem 1rem!important}}\n"] }]
1025
+ }], ctorParameters: () => [{ type: ResourceService }, { type: i2.TagService }, { type: i2.AuthService }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }], propDecorators: { showVaultSection: [{
1026
+ type: Input
1027
+ }], postSlice: [{
1028
+ type: Input
1029
+ }], categoryId: [{
1030
+ type: Input
1031
+ }], resourceTitle: [{
1032
+ type: Input
1033
+ }], tag: [{
1034
+ type: Input
1035
+ }], isLoadedChange: [{
1036
+ type: Output
1037
+ }] } });
1038
+
1039
+ class ResourceVideoCardComponent extends AppBaseComponent {
1040
+ constructor(sanitizer, resourceService, tagService, cdr, injector) {
1041
+ super(injector);
1042
+ this.sanitizer = sanitizer;
1043
+ this.resourceService = resourceService;
1044
+ this.tagService = tagService;
1045
+ this.cdr = cdr;
1046
+ this.showVideoSection = false;
1047
+ this.postSlice = false;
1048
+ this.canEditResourcesValue = false;
1049
+ this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;
1050
+ this.posts = [];
1051
+ this.isLoaded = false;
1052
+ this.videoStates = {};
1053
+ this.isEditingTitle = false;
1054
+ }
1055
+ ngOnInit() {
1056
+ if (this.userLoggedIn) {
1057
+ this.localStorage.getItem$('product').subscribe(res => {
1058
+ const data = res ? JSON.parse(res) : null;
1059
+ this.subscriptionId = data?.subscriptionId;
1060
+ this.cdr.markForCheck();
1061
+ });
1062
+ }
1063
+ this.getPosts(1, 10);
1064
+ }
1065
+ ngOnChanges(changes) {
1066
+ if (changes['user'] || changes['userLoggedIn']) {
1067
+ if (this.userLoggedIn && this.user) {
1068
+ this.updateCanEditResourcesValue();
1069
+ }
1070
+ }
1071
+ }
1072
+ loadVideo(post) {
1073
+ if (!post.external_url)
1074
+ return;
1075
+ const slug = post.slug;
1076
+ let externalUrl = post.external_url;
1077
+ // Append autoplay only when clicked
1078
+ externalUrl += externalUrl.includes('?') ? '&autoplay=1' : '?autoplay=1';
1079
+ // baseUrl is a trusted internal source (e.g. YouTube embed URL)
1080
+ this.videoStates[slug].url = this.sanitizer.bypassSecurityTrustResourceUrl(externalUrl); //NOSONAR
1081
+ }
1082
+ getPosts(page, pageSize) {
1083
+ this.isLoaded = false;
1084
+ this.resourceService
1085
+ .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', this.categoryId)
1086
+ .subscribe(response => {
1087
+ const sortedPosts = (response.posts ?? [])
1088
+ .filter(post => post.showcase === true)
1089
+ .sort((a, b) => new Date(b.published_at).getTime() - new Date(a.published_at).getTime());
1090
+ this.posts = this.postSlice ? sortedPosts : [...sortedPosts].slice(0, 3);
1091
+ this.posts.forEach(post => {
1092
+ if (post.external_url) {
1093
+ this.videoStates[post.slug] = {
1094
+ loaded: true,
1095
+ // baseUrl is a trusted internal source (e.g. YouTube embed URL)
1096
+ url: this.sanitizer.bypassSecurityTrustResourceUrl(post.external_url) //NOSONAR
1097
+ };
1098
+ }
1099
+ });
1100
+ this.cdr.markForCheck();
1101
+ })
1102
+ .add(() => {
1103
+ this.isLoaded = true;
1104
+ this.cdr.markForCheck();
1105
+ });
1106
+ }
1107
+ toggleTagEditTitle() {
1108
+ this.isEditingTitle = true;
1109
+ this.editedTitle = this.resourceTitle;
1110
+ }
1111
+ saveEditedTitle() {
1112
+ HelperService.updateTagTitle(this.tag, this.editedTitle, this.tagService, this.getEffectiveSubscriptionId(), this.toast).subscribe(() => {
1113
+ this.resourceTitle = this.editedTitle;
1114
+ this.isEditingTitle = false;
1115
+ this.cdr.markForCheck();
1116
+ });
1117
+ }
1118
+ /** Helper method to get effective subscription ID */
1119
+ getEffectiveSubscriptionId() {
1120
+ return HelperService.getEffectiveSubscriptionId(this.user, this.subscriptionId, this.masterSubscriptionId);
1121
+ }
1122
+ updateCanEditResourcesValue() {
1123
+ this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
1124
+ }
1125
+ canEditResources() {
1126
+ return this.canEditResourcesValue;
1127
+ }
1128
+ trackByPostId(index, post) {
1129
+ return post.id;
1130
+ }
1131
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceVideoCardComponent, deps: [{ token: i3$1.DomSanitizer }, { token: ResourceService }, { token: i2.TagService }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
1132
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: ResourceVideoCardComponent, isStandalone: false, selector: "pw-resource-video-card", inputs: { showVideoSection: "showVideoSection", categoryId: "categoryId", tag: "tag", postSlice: "postSlice", resourceTitle: "resourceTitle", user: "user", userLoggedIn: "userLoggedIn" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<section class=\"resource-vault-section bg-white text-center py-5 extra-top-padding section-outer\">\n <div class=\"container\">\n @if (showVideoSection) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap\">\n <h2 class=\"section-heading d-flex align-items-center\" [ngClass]=\"{ 'w-50': isEditingTitle }\">\n @if (!isEditingTitle) {\n @if (resourceTitle) {\n <span [innerHTML]=\"resourceTitle\"></span>\n } @else {\n On-Demand Videos\n }\n @if (canEditResourcesValue) {\n <i class=\"fa fa-edit in-page-edit-icon ms-3 cursor-pointer\" (click)=\"toggleTagEditTitle()\" (keydown.enter)=\"toggleTagEditTitle()\" (keydown.space)=\"toggleTagEditTitle()\" title=\"Edit Title\"></i>\n }\n } @else {\n <input [(ngModel)]=\"editedTitle\" class=\"form-control d-inline w-auto me-2\" [ngClass]=\"{ 'w-100': isEditingTitle }\" id=\"input_editedTitle_9216\" name=\"input_editedTitle_9216\" />\n <button class=\"btn btn-sm btn-primary me-1\" (click)=\"saveEditedTitle()\">Save</button>\n <button class=\"btn btn-sm btn-secondary\" (click)=\"isEditingTitle = false\">Cancel</button>\n }\n </h2>\n <a class=\"view-all\" routerLink=\"/resources/videos\">VIEW ALL ></a>\n </div>\n }\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (posts.length === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n @if (posts.length !== 0 && isLoaded) {\n <div class=\"row mt-5 d-flex flex-wrap justify-content-center video-row\">\n @for (post of posts; track trackByPostId($index, post)) {\n <div class=\"resource-blog-card\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"getPosts(1, 10)\">\n </pw-resource-edit-card-lazy>\n <p [innerHTML]=\"post.title\" class=\"mb-5\"></p>\n <a [href]=\" post.external_url\" target=\"_blank\">\n <img\n [src]=\"post.picture?.url\"\n class=\"img-fluid mb-3\"\n [alt]=\"post.title\"\n loading=\"lazy\" />\n </a>\n <a class=\"resource-btn mt-3\" [href]=\" post.external_url\" target=\"_blank\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Watch now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n </div>\n }\n </div>\n }\n </div>\n\n</section>\n", styles: [".bold{font-weight:700}.resource-heading{margin-bottom:2rem}.resource-note{margin-top:1rem;font-size:.85rem;color:#555}.resource-divider{border:0;height:40px;width:100%;background:linear-gradient(to bottom,#0000,#00000026);margin:0}.press-release-icon{height:auto!important;margin:0 11px 1.9rem;display:block;align-self:center;width:auto!important;aspect-ratio:0!important;object-fit:cover;margin-top:auto;margin-right:0!important}.resource-vault-section{padding:60px 0;background:#fff;padding-bottom:9rem!important;padding-top:7rem!important;box-shadow:0 4px 32px -14px #40576d4d!important}.resource-vault-section .vault-heading{font-size:3rem;font-weight:300}.resource-vault-section .explore-link{color:#000;font-weight:400;text-decoration:none;font-size:1.5rem}.resource-vault-section .resource-blog-card{display:flex;flex-direction:column;justify-content:space-between;background-color:#fff;border-radius:30px;box-shadow:0 20px 40px #00000014;padding:25px;text-align:center;width:338px;height:auto!important}.resource-vault-section .resource-blog-card h5{font-size:1.5rem;font-weight:400;margin-bottom:.5rem;color:var(--text-color, black)}.resource-vault-section .resource-blog-card p{font-size:1.5rem;color:var(--text-color, black);line-height:2rem}.resource-vault-section .resource-blog-card img{width:100%;border-radius:10px;aspect-ratio:1/1;object-fit:cover;margin-top:auto;margin-right:0!important;max-width:250px!important;align-self:center!important}.resource-vault-section .resource-blog-card iframe{height:210px;border-radius:10px;object-fit:cover;margin-right:0!important;max-width:280px!important}.resource-vault-section .resource-blog-card .resource-btn{background-color:var(--text-color, black);color:#fff;margin-top:auto;padding:10px 24px;border-radius:24px;font-size:1.5rem;font-weight:500;width:100%;max-width:240px;cursor:pointer;transition:background .3s ease;display:flex;justify-content:space-between;align-self:center;align-items:center;text-align:left;text-decoration:none;border:1px solid;box-shadow:none!important;border-color:var(--text-color, black)}.resource-vault-section .resource-blog-card .resource-btn:hover{background:#fff;color:var(--text-color, black)!important}.resource-vault-section .vault-description{text-align:left;max-width:657px;color:#182527;line-height:2.3rem!important;font-size:1.65rem}@media(width<=1200px){.resource-vault-section .vault-heading{font-size:3.5rem}.resource-vault-section .vault-description{margin-top:1.35rem}.resource-vault-section .resource-btn{margin-left:0!important}}.video-row{gap:5.5rem!important;margin-top:3rem!important}@media(width>=991px){section.bg-white.text-center.extra-top-padding{position:relative;overflow:hidden}section.bg-white.text-center.extra-top-padding .banner-header{margin-bottom:4rem!important}}.vault-header{text-align:left}@media(width>=768px)and (width<=1200px){.container{padding:0 6rem!important}}@media(width<=768px){.video-row{gap:3rem!important}}@media(max-width:768px){.resource-vault-section{padding-bottom:6rem!important}.resource-vault-section .container{padding-top:0rem!important;padding-bottom:0rem!important}.vault-header{text-align:center!important}.vault-heading{font-size:3rem!important}}@media(width<=1200px){.container{padding:7rem 3rem 1rem!important}}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i5$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "component", type: i7.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "directive", type: i5.LazyImgDirective, selector: "img" }, { kind: "component", type: ResourceEditCardLazyComponent, selector: "pw-resource-edit-card-lazy", inputs: ["id", "resourceData", "canEdit"], outputs: ["updated"] }, { kind: "pipe", type: i10.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1133
+ }
1134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceVideoCardComponent, decorators: [{
1135
+ type: Component,
1136
+ args: [{ selector: 'pw-resource-video-card', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<section class=\"resource-vault-section bg-white text-center py-5 extra-top-padding section-outer\">\n <div class=\"container\">\n @if (showVideoSection) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap\">\n <h2 class=\"section-heading d-flex align-items-center\" [ngClass]=\"{ 'w-50': isEditingTitle }\">\n @if (!isEditingTitle) {\n @if (resourceTitle) {\n <span [innerHTML]=\"resourceTitle\"></span>\n } @else {\n On-Demand Videos\n }\n @if (canEditResourcesValue) {\n <i class=\"fa fa-edit in-page-edit-icon ms-3 cursor-pointer\" (click)=\"toggleTagEditTitle()\" (keydown.enter)=\"toggleTagEditTitle()\" (keydown.space)=\"toggleTagEditTitle()\" title=\"Edit Title\"></i>\n }\n } @else {\n <input [(ngModel)]=\"editedTitle\" class=\"form-control d-inline w-auto me-2\" [ngClass]=\"{ 'w-100': isEditingTitle }\" id=\"input_editedTitle_9216\" name=\"input_editedTitle_9216\" />\n <button class=\"btn btn-sm btn-primary me-1\" (click)=\"saveEditedTitle()\">Save</button>\n <button class=\"btn btn-sm btn-secondary\" (click)=\"isEditingTitle = false\">Cancel</button>\n }\n </h2>\n <a class=\"view-all\" routerLink=\"/resources/videos\">VIEW ALL ></a>\n </div>\n }\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (posts.length === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n @if (posts.length !== 0 && isLoaded) {\n <div class=\"row mt-5 d-flex flex-wrap justify-content-center video-row\">\n @for (post of posts; track trackByPostId($index, post)) {\n <div class=\"resource-blog-card\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"getPosts(1, 10)\">\n </pw-resource-edit-card-lazy>\n <p [innerHTML]=\"post.title\" class=\"mb-5\"></p>\n <a [href]=\" post.external_url\" target=\"_blank\">\n <img\n [src]=\"post.picture?.url\"\n class=\"img-fluid mb-3\"\n [alt]=\"post.title\"\n loading=\"lazy\" />\n </a>\n <a class=\"resource-btn mt-3\" [href]=\" post.external_url\" target=\"_blank\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Watch now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n </div>\n }\n </div>\n }\n </div>\n\n</section>\n", styles: [".bold{font-weight:700}.resource-heading{margin-bottom:2rem}.resource-note{margin-top:1rem;font-size:.85rem;color:#555}.resource-divider{border:0;height:40px;width:100%;background:linear-gradient(to bottom,#0000,#00000026);margin:0}.press-release-icon{height:auto!important;margin:0 11px 1.9rem;display:block;align-self:center;width:auto!important;aspect-ratio:0!important;object-fit:cover;margin-top:auto;margin-right:0!important}.resource-vault-section{padding:60px 0;background:#fff;padding-bottom:9rem!important;padding-top:7rem!important;box-shadow:0 4px 32px -14px #40576d4d!important}.resource-vault-section .vault-heading{font-size:3rem;font-weight:300}.resource-vault-section .explore-link{color:#000;font-weight:400;text-decoration:none;font-size:1.5rem}.resource-vault-section .resource-blog-card{display:flex;flex-direction:column;justify-content:space-between;background-color:#fff;border-radius:30px;box-shadow:0 20px 40px #00000014;padding:25px;text-align:center;width:338px;height:auto!important}.resource-vault-section .resource-blog-card h5{font-size:1.5rem;font-weight:400;margin-bottom:.5rem;color:var(--text-color, black)}.resource-vault-section .resource-blog-card p{font-size:1.5rem;color:var(--text-color, black);line-height:2rem}.resource-vault-section .resource-blog-card img{width:100%;border-radius:10px;aspect-ratio:1/1;object-fit:cover;margin-top:auto;margin-right:0!important;max-width:250px!important;align-self:center!important}.resource-vault-section .resource-blog-card iframe{height:210px;border-radius:10px;object-fit:cover;margin-right:0!important;max-width:280px!important}.resource-vault-section .resource-blog-card .resource-btn{background-color:var(--text-color, black);color:#fff;margin-top:auto;padding:10px 24px;border-radius:24px;font-size:1.5rem;font-weight:500;width:100%;max-width:240px;cursor:pointer;transition:background .3s ease;display:flex;justify-content:space-between;align-self:center;align-items:center;text-align:left;text-decoration:none;border:1px solid;box-shadow:none!important;border-color:var(--text-color, black)}.resource-vault-section .resource-blog-card .resource-btn:hover{background:#fff;color:var(--text-color, black)!important}.resource-vault-section .vault-description{text-align:left;max-width:657px;color:#182527;line-height:2.3rem!important;font-size:1.65rem}@media(width<=1200px){.resource-vault-section .vault-heading{font-size:3.5rem}.resource-vault-section .vault-description{margin-top:1.35rem}.resource-vault-section .resource-btn{margin-left:0!important}}.video-row{gap:5.5rem!important;margin-top:3rem!important}@media(width>=991px){section.bg-white.text-center.extra-top-padding{position:relative;overflow:hidden}section.bg-white.text-center.extra-top-padding .banner-header{margin-bottom:4rem!important}}.vault-header{text-align:left}@media(width>=768px)and (width<=1200px){.container{padding:0 6rem!important}}@media(width<=768px){.video-row{gap:3rem!important}}@media(max-width:768px){.resource-vault-section{padding-bottom:6rem!important}.resource-vault-section .container{padding-top:0rem!important;padding-bottom:0rem!important}.vault-header{text-align:center!important}.vault-heading{font-size:3rem!important}}@media(width<=1200px){.container{padding:7rem 3rem 1rem!important}}\n"] }]
1137
+ }], ctorParameters: () => [{ type: i3$1.DomSanitizer }, { type: ResourceService }, { type: i2.TagService }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }], propDecorators: { showVideoSection: [{
1138
+ type: Input
1139
+ }], categoryId: [{
1140
+ type: Input
1141
+ }], tag: [{
1142
+ type: Input
1143
+ }], postSlice: [{
1144
+ type: Input
1145
+ }], resourceTitle: [{
1146
+ type: Input
1147
+ }], user: [{
1148
+ type: Input
1149
+ }], userLoggedIn: [{
1150
+ type: Input
1151
+ }] } });
1152
+
1153
+ class UpcomingEventCardComponent extends AppBaseComponent {
1154
+ constructor(resourceService, tagService, cdr, injector) {
1155
+ super(injector);
1156
+ this.resourceService = resourceService;
1157
+ this.tagService = tagService;
1158
+ this.cdr = cdr;
1159
+ this.showEventContent = false;
1160
+ this.postSlice = false;
1161
+ this.canEditResourcesValue = false;
1162
+ this.now = new Date().getTime();
1163
+ this.isEditingTitle = false;
1164
+ this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;
1165
+ this.posts = [];
1166
+ this.isLoaded = false;
1167
+ }
1168
+ ngOnInit() {
1169
+ if (this.userLoggedIn) {
1170
+ this.localStorage.getItem$('product').subscribe(res => {
1171
+ const data = res ? JSON.parse(res) : null;
1172
+ this.subscriptionId = data?.subscriptionId;
1173
+ this.cdr.markForCheck();
1174
+ });
1175
+ this.getPostTags();
1176
+ }
1177
+ else {
1178
+ this.getPostTags();
1179
+ }
1180
+ }
1181
+ ngOnChanges(changes) {
1182
+ if (changes['user'] || changes['userLoggedIn']) {
1183
+ if (this.userLoggedIn && this.user) {
1184
+ this.updateCanEditResourcesValue();
1185
+ }
1186
+ }
1187
+ }
1188
+ getPostTags() {
1189
+ this.tagService
1190
+ .getTagsByType('post_categories', {}, this.getEffectiveSubscriptionId())
1191
+ .subscribe(response => {
1192
+ this.blogPostTag = response.tags.find(tag => tag.name === 'Events');
1193
+ if (this.blogPostTag?.tag_category_id) {
1194
+ if (this.postSlice) {
1195
+ this.getPosts(1, 100);
1196
+ }
1197
+ else {
1198
+ this.getAllPosts(1, 100);
1199
+ }
1200
+ }
1201
+ else {
1202
+ this.isLoaded = true;
1203
+ this.cdr.markForCheck();
1204
+ }
1205
+ this.cdr.markForCheck();
1206
+ });
1207
+ }
1208
+ getPosts(page, pageSize) {
1209
+ this.isLoaded = false;
1210
+ this.resourceService
1211
+ .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', this.categoryId ?? this.blogPostTag?.tag_category_id)
1212
+ .subscribe(response => {
1213
+ const sortedPosts = (response.posts ?? [])
1214
+ .filter(post => post.showcase === true && new Date(post?.when).getTime() > this.now)
1215
+ .sort((a, b) => new Date(b.published_at).getTime() - new Date(a.published_at).getTime());
1216
+ this.posts = sortedPosts;
1217
+ this.cdr.markForCheck();
1218
+ })
1219
+ .add(() => {
1220
+ this.isLoaded = true;
1221
+ this.cdr.markForCheck();
1222
+ });
1223
+ }
1224
+ isUpcoming(post) {
1225
+ return new Date(post?.when).getTime() > this.now;
1226
+ }
1227
+ getAllPosts(page, pageSize) {
1228
+ this.isLoaded = false;
1229
+ this.resourceService
1230
+ .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', this.categoryId ?? this.blogPostTag?.tag_category_id)
1231
+ .subscribe(response => {
1232
+ const sortedPosts = (response.posts ?? [])
1233
+ .filter(post => post.showcase === true)
1234
+ .sort((a, b) => new Date(b.when).getTime() - new Date(a.when).getTime());
1235
+ this.posts = [...sortedPosts].slice(0, 3).reverse();
1236
+ this.cdr.markForCheck();
1237
+ })
1238
+ .add(() => {
1239
+ this.isLoaded = true;
1240
+ this.cdr.markForCheck();
1241
+ });
1242
+ }
1243
+ toggleEditTitle() {
1244
+ this.isEditingTitle = true;
1245
+ this.editedTitle = this.resourceTitle;
1246
+ }
1247
+ saveEditedTitle() {
1248
+ HelperService.updateTagTitle(this.tag, this.editedTitle, this.tagService, this.getEffectiveSubscriptionId(), this.toast).subscribe(() => {
1249
+ this.resourceTitle = this.editedTitle;
1250
+ this.isEditingTitle = false;
1251
+ this.cdr.markForCheck();
1252
+ });
1253
+ }
1254
+ /** Helper method to get effective subscription ID */
1255
+ getEffectiveSubscriptionId() {
1256
+ return HelperService.getEffectiveSubscriptionId(this.user, this.subscriptionId, this.masterSubscriptionId);
1257
+ }
1258
+ updateCanEditResourcesValue() {
1259
+ this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
1260
+ }
1261
+ canEditResources() {
1262
+ return this.canEditResourcesValue;
1263
+ }
1264
+ trackByPostId(index, post) {
1265
+ return post.id;
1266
+ }
1267
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: UpcomingEventCardComponent, deps: [{ token: ResourceService }, { token: i2.TagService }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
1268
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: UpcomingEventCardComponent, isStandalone: false, selector: "pw-upcoming-event-card", inputs: { showEventContent: "showEventContent", categoryId: "categoryId", tag: "tag", postSlice: "postSlice", resourceTitle: "resourceTitle", user: "user", userLoggedIn: "userLoggedIn" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<section class=\"resource-vault-section bg-white text-center py-5 extra-top-padding section-outer\">\n <div class=\"container\">\n @if (showEventContent) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap\">\n <h2 class=\"section-heading d-flex align-items-center\" [ngClass]=\"{ 'w-50': isEditingTitle }\">\n @if (!isEditingTitle) {\n @if (resourceTitle) {\n <span [innerHTML]=\"resourceTitle\"></span>\n } @else {\n Events &amp; Webinars\n }\n @if (canEditResourcesValue) {\n <i class=\"fa fa-edit in-page-edit-icon ms-3 cursor-pointer\" (click)=\"toggleEditTitle()\" (keydown.enter)=\"toggleEditTitle()\" (keydown.space)=\"toggleEditTitle()\" title=\"Edit Title\"></i>\n }\n } @else {\n <input [(ngModel)]=\"editedTitle\" class=\"form-control d-inline w-auto me-2\" [ngClass]=\"{ 'w-100': isEditingTitle }\" id=\"input_editedTitle_7936\" name=\"input_editedTitle_7936\" />\n <button class=\"btn btn-sm btn-primary me-1\" (click)=\"saveEditedTitle()\">Save</button>\n <button class=\"btn btn-sm btn-secondary\" (click)=\"isEditingTitle = false\">Cancel</button>\n }\n </h2>\n <a class=\"view-all\" routerLink=\"/resources/events\">VIEW ALL ></a>\n </div>\n }\n @if (!showEventContent) {\n <div class=\"d-md-flex justify-content-between align-items-start\">\n <h2 class=\"section-heading d-flex align-items-center\" [ngClass]=\"{ 'w-50': isEditingTitle }\">\n @if (!isEditingTitle) {\n @if (resourceTitle) {\n <span [innerHTML]=\"resourceTitle\"></span>\n } @else {\n Upcoming Events\n }\n @if (canEditResourcesValue) {\n <i class=\"fa fa-edit in-page-edit-icon ms-3 cursor-pointer\" (click)=\"toggleEditTitle()\" (keydown.enter)=\"toggleEditTitle()\" (keydown.space)=\"toggleEditTitle()\" title=\"Edit Title\"></i>\n }\n } @else {\n <input [(ngModel)]=\"editedTitle\" class=\"form-control d-inline w-auto me-2\" [ngClass]=\"{ 'w-100': isEditingTitle }\" id=\"input_editedTitle_7936\" name=\"input_editedTitle_7936\" />\n <button class=\"btn btn-sm btn-primary me-1\" (click)=\"saveEditedTitle()\">Save</button>\n <button class=\"btn btn-sm btn-secondary\" (click)=\"isEditingTitle = false\">Cancel</button>\n }\n </h2>\n </div>\n }\n\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (posts.length === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n\n @if (posts.length !== 0 && isLoaded) {\n <div class=\"row mt-5 d-flex flex-wrap justify-content-center gap-4 video-row\">\n @for (post of posts; track trackByPostId($index, post)) {\n <div class=\"resource-blog-card d text-center p-4\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"getAllPosts(1, 100)\">\n </pw-resource-edit-card-lazy>\n @if (postSlice) {\n <h5 class=\"badge-title fw-bold\">UPCOMING:</h5>\n } @else {\n <h5 class=\"badge-title fw-bold\">\n {{ isUpcoming(post) ? 'UPCOMING:' : 'REPLAY:' }}\n </h5>\n }\n\n <p class=\"event-title mb-4\" [innerHtml]=\"post?.title\"></p>\n <a\n [href]=\"post.external_url || ('/resources/view/' + post?.slug)\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label=\"Navigate to resource\"\n >\n <img\n [src]=\"post.picture?.url\"\n class=\"img-fluid my-3 mt-auto\"\n alt=\"Webinar\"\n loading=\"lazy\"\n />\n </a>\n\n @if (post?.external_url) {\n <a\n class=\"resource-btn mt-3\"\n aria-label=\"Navigate to external url\"\n [href]=\"post.external_url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n } @else {\n <a class=\"resource-btn mt-3\" aria-label=\"Navigate to resource view\" [href]=\"'/resources/view/' + post?.slug\" target=\"_blank\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n }\n </div>\n }\n </div>\n }\n </div>\n</section>\n\n\n@if (!showEventContent) {\n<section class=\"bg-white\">\n <pw-replay-event-card [resourceTitle]=\"resourceTitle\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-replay-event-card>\n</section>\n}\n", styles: [".bold{font-weight:700}.resource-heading{margin-bottom:2rem}.resource-note{margin-top:1rem;font-size:.85rem;color:#555}.resource-divider{border:0;height:40px;width:100%;background:linear-gradient(to bottom,#0000,#00000026);margin:0}.press-release-icon{height:auto!important;margin:0 11px 1.9rem;display:block;align-self:center;width:auto!important;aspect-ratio:0!important;object-fit:cover;margin-top:auto;margin-right:0!important}.resource-vault-section{padding:60px 0;background:#fff;padding-bottom:9rem!important;padding-top:7rem!important;box-shadow:0 4px 32px -14px #40576d4d!important}.resource-vault-section .vault-heading{font-size:3rem;font-weight:300}.resource-vault-section .explore-link{color:#000;font-weight:400;text-decoration:none;font-size:1.5rem}.resource-vault-section .resource-blog-card{display:flex;flex-direction:column;justify-content:space-between;background-color:#fff;border-radius:30px;box-shadow:0 20px 40px #00000014;padding:25px;text-align:center;width:338px;height:auto!important}.resource-vault-section .resource-blog-card h5{font-size:1.5rem;font-weight:400;margin-bottom:.5rem;color:var(--text-color, black)}.resource-vault-section .resource-blog-card p{font-size:1.5rem;color:var(--text-color, black);line-height:2rem}.resource-vault-section .resource-blog-card img{width:100%;border-radius:10px;aspect-ratio:1/1;object-fit:cover;margin-top:auto;margin-right:0!important;max-width:250px!important;align-self:center!important}.resource-vault-section .resource-blog-card iframe{height:210px;border-radius:10px;object-fit:cover;margin-right:0!important;max-width:280px!important}.resource-vault-section .resource-blog-card .resource-btn{background-color:var(--text-color, black);color:#fff;margin-top:auto;padding:10px 24px;border-radius:24px;font-size:1.5rem;font-weight:500;width:100%;max-width:240px;cursor:pointer;transition:background .3s ease;display:flex;justify-content:space-between;align-self:center;align-items:center;text-align:left;text-decoration:none;border:1px solid;box-shadow:none!important;border-color:var(--text-color, black)}.resource-vault-section .resource-blog-card .resource-btn:hover{background:#fff;color:var(--text-color, black)!important}.resource-vault-section .vault-description{text-align:left;max-width:657px;color:#182527;line-height:2.3rem!important;font-size:1.65rem}@media(width<=1200px){.resource-vault-section .vault-heading{font-size:3.5rem}.resource-vault-section .vault-description{margin-top:1.35rem}.resource-vault-section .resource-btn{margin-left:0!important}}.video-row{gap:5.5rem!important;margin-top:3rem!important}@media(width>=991px){section.bg-white.text-center.extra-top-padding{position:relative;overflow:hidden}section.bg-white.text-center.extra-top-padding .banner-header{margin-bottom:4rem!important}}.vault-header{text-align:left}@media(width>=768px)and (width<=1200px){.container{padding:0 6rem!important}}@media(width<=768px){.video-row{gap:3rem!important}}@media(max-width:768px){.resource-vault-section{padding-bottom:6rem!important}.resource-vault-section .container{padding-top:0rem!important;padding-bottom:0rem!important}.vault-header{text-align:center!important}.vault-heading{font-size:3rem!important}}@media(width<=1200px){.container{padding:7rem 3rem 1rem!important}}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i5$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "component", type: i7.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "directive", type: i5.LazyImgDirective, selector: "img" }, { kind: "component", type: ResourceEditCardLazyComponent, selector: "pw-resource-edit-card-lazy", inputs: ["id", "resourceData", "canEdit"], outputs: ["updated"] }, { kind: "pipe", type: i10.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1269
+ }
1270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: UpcomingEventCardComponent, decorators: [{
1271
+ type: Component,
1272
+ args: [{ selector: 'pw-upcoming-event-card', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<section class=\"resource-vault-section bg-white text-center py-5 extra-top-padding section-outer\">\n <div class=\"container\">\n @if (showEventContent) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap\">\n <h2 class=\"section-heading d-flex align-items-center\" [ngClass]=\"{ 'w-50': isEditingTitle }\">\n @if (!isEditingTitle) {\n @if (resourceTitle) {\n <span [innerHTML]=\"resourceTitle\"></span>\n } @else {\n Events &amp; Webinars\n }\n @if (canEditResourcesValue) {\n <i class=\"fa fa-edit in-page-edit-icon ms-3 cursor-pointer\" (click)=\"toggleEditTitle()\" (keydown.enter)=\"toggleEditTitle()\" (keydown.space)=\"toggleEditTitle()\" title=\"Edit Title\"></i>\n }\n } @else {\n <input [(ngModel)]=\"editedTitle\" class=\"form-control d-inline w-auto me-2\" [ngClass]=\"{ 'w-100': isEditingTitle }\" id=\"input_editedTitle_7936\" name=\"input_editedTitle_7936\" />\n <button class=\"btn btn-sm btn-primary me-1\" (click)=\"saveEditedTitle()\">Save</button>\n <button class=\"btn btn-sm btn-secondary\" (click)=\"isEditingTitle = false\">Cancel</button>\n }\n </h2>\n <a class=\"view-all\" routerLink=\"/resources/events\">VIEW ALL ></a>\n </div>\n }\n @if (!showEventContent) {\n <div class=\"d-md-flex justify-content-between align-items-start\">\n <h2 class=\"section-heading d-flex align-items-center\" [ngClass]=\"{ 'w-50': isEditingTitle }\">\n @if (!isEditingTitle) {\n @if (resourceTitle) {\n <span [innerHTML]=\"resourceTitle\"></span>\n } @else {\n Upcoming Events\n }\n @if (canEditResourcesValue) {\n <i class=\"fa fa-edit in-page-edit-icon ms-3 cursor-pointer\" (click)=\"toggleEditTitle()\" (keydown.enter)=\"toggleEditTitle()\" (keydown.space)=\"toggleEditTitle()\" title=\"Edit Title\"></i>\n }\n } @else {\n <input [(ngModel)]=\"editedTitle\" class=\"form-control d-inline w-auto me-2\" [ngClass]=\"{ 'w-100': isEditingTitle }\" id=\"input_editedTitle_7936\" name=\"input_editedTitle_7936\" />\n <button class=\"btn btn-sm btn-primary me-1\" (click)=\"saveEditedTitle()\">Save</button>\n <button class=\"btn btn-sm btn-secondary\" (click)=\"isEditingTitle = false\">Cancel</button>\n }\n </h2>\n </div>\n }\n\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (posts.length === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n\n @if (posts.length !== 0 && isLoaded) {\n <div class=\"row mt-5 d-flex flex-wrap justify-content-center gap-4 video-row\">\n @for (post of posts; track trackByPostId($index, post)) {\n <div class=\"resource-blog-card d text-center p-4\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"getAllPosts(1, 100)\">\n </pw-resource-edit-card-lazy>\n @if (postSlice) {\n <h5 class=\"badge-title fw-bold\">UPCOMING:</h5>\n } @else {\n <h5 class=\"badge-title fw-bold\">\n {{ isUpcoming(post) ? 'UPCOMING:' : 'REPLAY:' }}\n </h5>\n }\n\n <p class=\"event-title mb-4\" [innerHtml]=\"post?.title\"></p>\n <a\n [href]=\"post.external_url || ('/resources/view/' + post?.slug)\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label=\"Navigate to resource\"\n >\n <img\n [src]=\"post.picture?.url\"\n class=\"img-fluid my-3 mt-auto\"\n alt=\"Webinar\"\n loading=\"lazy\"\n />\n </a>\n\n @if (post?.external_url) {\n <a\n class=\"resource-btn mt-3\"\n aria-label=\"Navigate to external url\"\n [href]=\"post.external_url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n } @else {\n <a class=\"resource-btn mt-3\" aria-label=\"Navigate to resource view\" [href]=\"'/resources/view/' + post?.slug\" target=\"_blank\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"arrow\">\u2192</span>\n </a>\n }\n </div>\n }\n </div>\n }\n </div>\n</section>\n\n\n@if (!showEventContent) {\n<section class=\"bg-white\">\n <pw-replay-event-card [resourceTitle]=\"resourceTitle\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-replay-event-card>\n</section>\n}\n", styles: [".bold{font-weight:700}.resource-heading{margin-bottom:2rem}.resource-note{margin-top:1rem;font-size:.85rem;color:#555}.resource-divider{border:0;height:40px;width:100%;background:linear-gradient(to bottom,#0000,#00000026);margin:0}.press-release-icon{height:auto!important;margin:0 11px 1.9rem;display:block;align-self:center;width:auto!important;aspect-ratio:0!important;object-fit:cover;margin-top:auto;margin-right:0!important}.resource-vault-section{padding:60px 0;background:#fff;padding-bottom:9rem!important;padding-top:7rem!important;box-shadow:0 4px 32px -14px #40576d4d!important}.resource-vault-section .vault-heading{font-size:3rem;font-weight:300}.resource-vault-section .explore-link{color:#000;font-weight:400;text-decoration:none;font-size:1.5rem}.resource-vault-section .resource-blog-card{display:flex;flex-direction:column;justify-content:space-between;background-color:#fff;border-radius:30px;box-shadow:0 20px 40px #00000014;padding:25px;text-align:center;width:338px;height:auto!important}.resource-vault-section .resource-blog-card h5{font-size:1.5rem;font-weight:400;margin-bottom:.5rem;color:var(--text-color, black)}.resource-vault-section .resource-blog-card p{font-size:1.5rem;color:var(--text-color, black);line-height:2rem}.resource-vault-section .resource-blog-card img{width:100%;border-radius:10px;aspect-ratio:1/1;object-fit:cover;margin-top:auto;margin-right:0!important;max-width:250px!important;align-self:center!important}.resource-vault-section .resource-blog-card iframe{height:210px;border-radius:10px;object-fit:cover;margin-right:0!important;max-width:280px!important}.resource-vault-section .resource-blog-card .resource-btn{background-color:var(--text-color, black);color:#fff;margin-top:auto;padding:10px 24px;border-radius:24px;font-size:1.5rem;font-weight:500;width:100%;max-width:240px;cursor:pointer;transition:background .3s ease;display:flex;justify-content:space-between;align-self:center;align-items:center;text-align:left;text-decoration:none;border:1px solid;box-shadow:none!important;border-color:var(--text-color, black)}.resource-vault-section .resource-blog-card .resource-btn:hover{background:#fff;color:var(--text-color, black)!important}.resource-vault-section .vault-description{text-align:left;max-width:657px;color:#182527;line-height:2.3rem!important;font-size:1.65rem}@media(width<=1200px){.resource-vault-section .vault-heading{font-size:3.5rem}.resource-vault-section .vault-description{margin-top:1.35rem}.resource-vault-section .resource-btn{margin-left:0!important}}.video-row{gap:5.5rem!important;margin-top:3rem!important}@media(width>=991px){section.bg-white.text-center.extra-top-padding{position:relative;overflow:hidden}section.bg-white.text-center.extra-top-padding .banner-header{margin-bottom:4rem!important}}.vault-header{text-align:left}@media(width>=768px)and (width<=1200px){.container{padding:0 6rem!important}}@media(width<=768px){.video-row{gap:3rem!important}}@media(max-width:768px){.resource-vault-section{padding-bottom:6rem!important}.resource-vault-section .container{padding-top:0rem!important;padding-bottom:0rem!important}.vault-header{text-align:center!important}.vault-heading{font-size:3rem!important}}@media(width<=1200px){.container{padding:7rem 3rem 1rem!important}}\n"] }]
1273
+ }], ctorParameters: () => [{ type: ResourceService }, { type: i2.TagService }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }], propDecorators: { showEventContent: [{
1274
+ type: Input
1275
+ }], categoryId: [{
1276
+ type: Input
1277
+ }], tag: [{
1278
+ type: Input
1279
+ }], postSlice: [{
1280
+ type: Input
1281
+ }], resourceTitle: [{
1282
+ type: Input
1283
+ }], user: [{
1284
+ type: Input
1285
+ }], userLoggedIn: [{
1286
+ type: Input
1287
+ }] } });
1288
+
1289
+ /**
1290
+ * Module containing resource card components (lightweight version)
1291
+ * ResourceEditCard is lazy-loaded on demand to save 145 KB
1292
+ * Trial4ContactUs moved to separate module for better tree-shaking
1293
+ * Used by both ResourceRootModule and ResourceSharedModule
1294
+ */
1295
+ class ResourceCardsModule {
1296
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceCardsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1297
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.6", ngImport: i0, type: ResourceCardsModule, declarations: [ResourceVideoCardComponent,
1298
+ UpcomingEventCardComponent,
1299
+ ResourceCardComponent,
1300
+ CaseStudyCardComponent,
1301
+ ResourceNoteCardComponent,
1302
+ ResourceVaultComponent,
1303
+ ResourceEditCardLazyComponent], imports: [CommonModule,
1304
+ RouterModule,
1305
+ FormsModule,
1306
+ ReactiveFormsModule,
1307
+ PipesModule,
1308
+ PaginatorModule,
1309
+ SelectModule,
1310
+ ResourceSharedComponentsModule,
1311
+ CoreTranslocoModule,
1312
+ TranslocoModule,
1313
+ DirectivesModule,
1314
+ DragDropModule,
1315
+ NgxCaptchaModule,
1316
+ Trial4ContactUsModule // ✅ Import standalone module
1317
+ ], exports: [ResourceVideoCardComponent,
1318
+ UpcomingEventCardComponent,
1319
+ ResourceCardComponent,
1320
+ CaseStudyCardComponent,
1321
+ ResourceNoteCardComponent,
1322
+ ResourceVaultComponent,
1323
+ Trial4ContactUsModule, // ✅ Re-export for backward compatibility
1324
+ ResourceEditCardLazyComponent,
1325
+ PaginatorModule // Export PaginatorModule so ResourceCompanyCardComponent can use p-paginator
1326
+ ] }); }
1327
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceCardsModule, imports: [CommonModule,
1328
+ RouterModule,
1329
+ FormsModule,
1330
+ ReactiveFormsModule,
1331
+ PipesModule,
1332
+ PaginatorModule,
1333
+ SelectModule,
1334
+ ResourceSharedComponentsModule,
1335
+ CoreTranslocoModule,
1336
+ TranslocoModule,
1337
+ DirectivesModule,
1338
+ DragDropModule,
1339
+ NgxCaptchaModule,
1340
+ Trial4ContactUsModule // ✅ Import standalone module
1341
+ , Trial4ContactUsModule,
1342
+ PaginatorModule // Export PaginatorModule so ResourceCompanyCardComponent can use p-paginator
1343
+ ] }); }
1344
+ }
1345
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceCardsModule, decorators: [{
1346
+ type: NgModule,
1347
+ args: [{
1348
+ declarations: [
1349
+ ResourceVideoCardComponent,
1350
+ UpcomingEventCardComponent,
1351
+ ResourceCardComponent,
1352
+ CaseStudyCardComponent,
1353
+ ResourceNoteCardComponent,
1354
+ ResourceVaultComponent,
1355
+ ResourceEditCardLazyComponent
1356
+ ],
1357
+ imports: [
1358
+ CommonModule,
1359
+ RouterModule,
1360
+ FormsModule,
1361
+ ReactiveFormsModule,
1362
+ PipesModule,
1363
+ PaginatorModule,
1364
+ SelectModule,
1365
+ ResourceSharedComponentsModule,
1366
+ CoreTranslocoModule,
1367
+ TranslocoModule,
1368
+ DirectivesModule,
1369
+ DragDropModule,
1370
+ NgxCaptchaModule,
1371
+ Trial4ContactUsModule // ✅ Import standalone module
1372
+ ],
1373
+ exports: [
1374
+ ResourceVideoCardComponent,
1375
+ UpcomingEventCardComponent,
1376
+ ResourceCardComponent,
1377
+ CaseStudyCardComponent,
1378
+ ResourceNoteCardComponent,
1379
+ ResourceVaultComponent,
1380
+ Trial4ContactUsModule, // ✅ Re-export for backward compatibility
1381
+ ResourceEditCardLazyComponent,
1382
+ PaginatorModule // Export PaginatorModule so ResourceCompanyCardComponent can use p-paginator
1383
+ ],
1384
+ schemas: [CUSTOM_ELEMENTS_SCHEMA]
1385
+ }]
1386
+ }] });
1387
+
1388
+ // Shared components used across multiple resource routes
1389
+ // Note: Most heavy modules (Quill, Calendar, UiSwitch, etc.) are now in ResourceCardsModule
1390
+ class ResourceSharedModule {
1391
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1392
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.6", ngImport: i0, type: ResourceSharedModule, declarations: [ResourceCompanyCardComponent, ResourceTopBannerEditComponent], imports: [CommonModule,
1393
+ RouterModule,
1394
+ FormsModule,
1395
+ ReactiveFormsModule,
1396
+ PipesModule,
1397
+ ResourceSharedComponentsModule,
1398
+ CoreTranslocoModule,
1399
+ TranslocoModule,
1400
+ DirectivesModule,
1401
+ InputTextModule,
1402
+ TextareaModule,
1403
+ ResourceCardsModule,
1404
+ HubSpotMeetingsSharedModule // For pw-book-a-demo component (HubSpotMeetingsComponent)
1405
+ ], exports: [
1406
+ // Export the 2 components specific to this module
1407
+ ResourceCompanyCardComponent,
1408
+ ResourceTopBannerEditComponent,
1409
+ // Export card components module (includes all heavy modules + card components)
1410
+ ResourceCardsModule,
1411
+ // Export HubSpotMeetingsSharedModule to make pw-book-a-demo component available
1412
+ HubSpotMeetingsSharedModule,
1413
+ // Export common lightweight modules
1414
+ CommonModule,
1415
+ RouterModule,
1416
+ FormsModule,
1417
+ ReactiveFormsModule,
1418
+ PipesModule,
1419
+ ResourceSharedComponentsModule,
1420
+ CoreTranslocoModule,
1421
+ TranslocoModule,
1422
+ DirectivesModule,
1423
+ InputTextModule,
1424
+ TextareaModule] }); }
1425
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceSharedModule, imports: [CommonModule,
1426
+ RouterModule,
1427
+ FormsModule,
1428
+ ReactiveFormsModule,
1429
+ PipesModule,
1430
+ ResourceSharedComponentsModule,
1431
+ CoreTranslocoModule,
1432
+ TranslocoModule,
1433
+ DirectivesModule,
1434
+ InputTextModule,
1435
+ TextareaModule,
1436
+ ResourceCardsModule,
1437
+ HubSpotMeetingsSharedModule // For pw-book-a-demo component (HubSpotMeetingsComponent)
1438
+ ,
1439
+ // Export card components module (includes all heavy modules + card components)
1440
+ ResourceCardsModule,
1441
+ // Export HubSpotMeetingsSharedModule to make pw-book-a-demo component available
1442
+ HubSpotMeetingsSharedModule,
1443
+ // Export common lightweight modules
1444
+ CommonModule,
1445
+ RouterModule,
1446
+ FormsModule,
1447
+ ReactiveFormsModule,
1448
+ PipesModule,
1449
+ ResourceSharedComponentsModule,
1450
+ CoreTranslocoModule,
1451
+ TranslocoModule,
1452
+ DirectivesModule,
1453
+ InputTextModule,
1454
+ TextareaModule] }); }
1455
+ }
1456
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceSharedModule, decorators: [{
1457
+ type: NgModule,
1458
+ args: [{
1459
+ declarations: [ResourceCompanyCardComponent, ResourceTopBannerEditComponent],
1460
+ imports: [
1461
+ CommonModule,
1462
+ RouterModule,
1463
+ FormsModule,
1464
+ ReactiveFormsModule,
1465
+ PipesModule,
1466
+ ResourceSharedComponentsModule,
1467
+ CoreTranslocoModule,
1468
+ TranslocoModule,
1469
+ DirectivesModule,
1470
+ InputTextModule,
1471
+ TextareaModule,
1472
+ ResourceCardsModule,
1473
+ HubSpotMeetingsSharedModule // For pw-book-a-demo component (HubSpotMeetingsComponent)
1474
+ ],
1475
+ exports: [
1476
+ // Export the 2 components specific to this module
1477
+ ResourceCompanyCardComponent,
1478
+ ResourceTopBannerEditComponent,
1479
+ // Export card components module (includes all heavy modules + card components)
1480
+ ResourceCardsModule,
1481
+ // Export HubSpotMeetingsSharedModule to make pw-book-a-demo component available
1482
+ HubSpotMeetingsSharedModule,
1483
+ // Export common lightweight modules
1484
+ CommonModule,
1485
+ RouterModule,
1486
+ FormsModule,
1487
+ ReactiveFormsModule,
1488
+ PipesModule,
1489
+ ResourceSharedComponentsModule,
1490
+ CoreTranslocoModule,
1491
+ TranslocoModule,
1492
+ DirectivesModule,
1493
+ InputTextModule,
1494
+ TextareaModule
1495
+ ],
1496
+ schemas: [CUSTOM_ELEMENTS_SCHEMA]
1497
+ }]
1498
+ }] });
1499
+
1500
+ class ResourceEditCardComponent extends AppBaseComponent {
1501
+ constructor(fb, modalService, resourceService, authService, tagService, cdr, injector) {
1502
+ super(injector);
1503
+ this.fb = fb;
1504
+ this.modalService = modalService;
1505
+ this.resourceService = resourceService;
1506
+ this.authService = authService;
1507
+ this.tagService = tagService;
1508
+ this.cdr = cdr;
1509
+ this.updated = new EventEmitter();
1510
+ this.image = '';
1511
+ this.rectangularImage = '';
1512
+ this.file = null;
1513
+ this.rectangularFile = null;
1514
+ this.selectedTags = [];
1515
+ this.allTags = [];
1516
+ this.tagsSuggestion = [];
1517
+ this.buttonBusy = false;
1518
+ this.editForm = this.fb.group({
1519
+ title: [''],
1520
+ external_url: [''],
1521
+ cta_text: [''],
1522
+ when: [''],
1523
+ showcase: [false],
1524
+ published_at: [false],
1525
+ accepted_at: [false],
1526
+ body: ['']
1527
+ });
1528
+ }
1529
+ ngOnInit() {
1530
+ this.authService.getToken$().subscribe(res => {
1531
+ this.userLoggedIn = !!res;
1532
+ if (this.userLoggedIn) {
1533
+ this.localStorage.getItem$('product').subscribe(res => {
1534
+ const data = res ? JSON.parse(res) : null;
1535
+ this.subscriptionId = data?.subscriptionId;
1536
+ this.cdr.markForCheck();
1537
+ });
1538
+ }
1539
+ this.cdr.markForCheck();
1540
+ });
1541
+ }
1542
+ navigateToResourceEdit() {
1543
+ const basePath = `/admin/resources/${this.resourceData?.slug}`;
1544
+ const fullUrl = `${location.origin}${basePath}`;
1545
+ window.open(fullUrl, '_blank');
1546
+ }
1547
+ openModal(modalTemplate) {
1548
+ if (this.resourceData) {
1549
+ const when = this.resourceData.when ? new Date(this.resourceData.when) : null;
1550
+ this.editForm.setValue({
1551
+ title: this.resourceData.title ?? '',
1552
+ external_url: this.resourceData.external_url ?? '',
1553
+ cta_text: this.resourceData.cta_text ?? '',
1554
+ when: when ?? '',
1555
+ showcase: !!this.resourceData.showcase,
1556
+ published_at: !!this.resourceData.published_at,
1557
+ accepted_at: !!this.resourceData.accepted_at,
1558
+ body: this.resourceData.body
1559
+ });
1560
+ this.image = this.resourceData.picture?.url ?? '';
1561
+ this.selectedTags = this.resourceData?.tags?.length ? [...this.resourceData.tags] : [];
1562
+ this.rectangularImage = this.resourceData.rectangular_picture?.url ?? '';
1563
+ }
1564
+ this.modalService.open(modalTemplate, { centered: true, size: 'lg' });
1565
+ this.getPostTags();
1566
+ }
1567
+ search(event) {
1568
+ let values = [];
1569
+ if (event.query) {
1570
+ values = this.allTags.filter(x => x.name.toLowerCase().includes(event.query.toLowerCase()));
1571
+ }
1572
+ else {
1573
+ this.allTags.forEach(element => {
1574
+ values.push(element);
1575
+ });
1576
+ }
1577
+ this.tagsSuggestion = values;
1578
+ }
1579
+ getPostTags() {
1580
+ this.tagService
1581
+ .getTagsByType('post_categories', {}, this.subscriptionId)
1582
+ .subscribe(response => {
1583
+ this.allTags = response.tags;
1584
+ this.cdr.markForCheck();
1585
+ });
1586
+ }
1587
+ deleteRectangularImage() {
1588
+ this.rectangularImage = null;
1589
+ this.rectangularFile = null;
1590
+ }
1591
+ openImageModal(modalTemplate) {
1592
+ this.imageModalRef = this.modalService.open(modalTemplate, { centered: true, size: 'md' });
1593
+ }
1594
+ onImageSelected(base64) {
1595
+ this.image = base64;
1596
+ this.file = HelperService.convertBase64ToFile(base64);
1597
+ this.imageModalRef?.close();
1598
+ }
1599
+ onRectangularImageSelection(base64) {
1600
+ this.rectangularImage = base64;
1601
+ this.rectangularFile = HelperService.convertBase64ToFile(base64);
1602
+ this.imageModalRef?.close();
1603
+ }
1604
+ removeImage() {
1605
+ this.image = null;
1606
+ this.file = null;
1607
+ }
1608
+ saveResource() {
1609
+ this.buttonBusy = true;
1610
+ this.saveTags(this.id);
1611
+ const payload = {
1612
+ ...this.editForm.value,
1613
+ subscription_id: this.subscriptionId
1614
+ };
1615
+ this.handlePicture(payload);
1616
+ this.handlePublishedAt(payload);
1617
+ this.handleAcceptedAt(payload);
1618
+ this.handleAcceptedAt(payload);
1619
+ this.handleOptionalFields(payload);
1620
+ this.handleRectangularPicture(payload);
1621
+ this.handleRemovals(payload);
1622
+ this.resourceService.updatePost(payload, this.id).subscribe({
1623
+ next: () => {
1624
+ // NG0100: Toastr + dismissAll can run CD in the same macrotask as clearing [buttonBusy].
1625
+ // Clear busy in one task; toast/emit/modal in the next so dev-mode "verify" sees a stable binding.
1626
+ setTimeout(() => {
1627
+ this.buttonBusy = false;
1628
+ this.cdr.markForCheck();
1629
+ setTimeout(() => {
1630
+ this.toast.success('Blog Post Updated');
1631
+ this.updated.emit();
1632
+ this.modalService.dismissAll();
1633
+ this.cdr.markForCheck();
1634
+ }, 0);
1635
+ }, 0);
1636
+ },
1637
+ error: () => {
1638
+ setTimeout(() => {
1639
+ this.buttonBusy = false;
1640
+ this.cdr.markForCheck();
1641
+ }, 0);
1642
+ }
1643
+ });
1644
+ }
1645
+ saveTags(id) {
1646
+ if (this.selectedTags.length) {
1647
+ const data = {
1648
+ entity_tags: this.selectedTags.map(tag => ({ tag_id: tag.id })),
1649
+ slug: id,
1650
+ tag_entity: 'Post' // or use TAG_ENTITY.POST if you imported it
1651
+ };
1652
+ this.tagService.addTags(data, this.subscriptionId).subscribe(() => {
1653
+ this.cdr.markForCheck();
1654
+ });
1655
+ }
1656
+ }
1657
+ handlePicture(data) {
1658
+ if (this.file) {
1659
+ data.picture = this.file;
1660
+ }
1661
+ else {
1662
+ delete data.picture;
1663
+ }
1664
+ }
1665
+ handlePublishedAt(data) {
1666
+ const control = this.editForm.get('published_at');
1667
+ if (control?.dirty) {
1668
+ data.published_at = control.value ? moment().format('DD-MMM-YYYY') : '';
1669
+ }
1670
+ else {
1671
+ delete data.published_at;
1672
+ }
1673
+ }
1674
+ handleAcceptedAt(data) {
1675
+ const control = this.editForm.get('accepted_at');
1676
+ if (control?.dirty) {
1677
+ data.accepted_at = control.value ? moment().format('DD-MMM-YYYY') : '';
1678
+ }
1679
+ else {
1680
+ delete data.accepted_at;
1681
+ }
1682
+ }
1683
+ handleOptionalFields(data) {
1684
+ if (!this.editForm.get('when')?.value) {
1685
+ data.when = '';
1686
+ }
1687
+ if (!this.editForm.get('showcase')?.value) {
1688
+ data.showcase = '';
1689
+ }
1690
+ }
1691
+ handleRectangularPicture(data) {
1692
+ if (this.rectangularFile) {
1693
+ data.rectangular_picture = this.rectangularFile;
1694
+ }
1695
+ else {
1696
+ delete data.rectangular_picture;
1697
+ }
1698
+ }
1699
+ handleRemovals(data) {
1700
+ if (!this.file && !this.image) {
1701
+ data.remove_picture = true;
1702
+ }
1703
+ if (!this.rectangularFile && !this.rectangularImage) {
1704
+ data.remove_rectangular_picture = true;
1705
+ }
1706
+ }
1707
+ openRectModal(content) {
1708
+ this.imageModalRef = this.modalService.open(content, {
1709
+ centered: true,
1710
+ windowClass: 'modal-holder'
1711
+ });
1712
+ }
1713
+ handleImageError(event, fallbackPath) {
1714
+ HelperService.handleImageFallbackPath(event, fallbackPath);
1715
+ }
1716
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceEditCardComponent, deps: [{ token: i5$2.FormBuilder }, { token: i2$1.NgbModal }, { token: ResourceService }, { token: i2.AuthService }, { token: i2.TagService }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
1717
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: ResourceEditCardComponent, isStandalone: false, selector: "pw-resource-edit-card", inputs: { id: "id", resourceData: "resourceData" }, outputs: { updated: "updated" }, usesInheritance: true, ngImport: i0, template: "<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-dark in-page-edit-icon d-flex justify-content-center mb-2\"\n (click)=\"openModal(editResourceModal)\"\n (keydown.enter)=\"openModal(editResourceModal)\"\n (keydown.space)=\"openModal(editResourceModal)\"\n title=\"Edit Resource\"></i>\n</div>\n\n<ng-template #editResourceModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Resource</h5>\n <i class=\"fa fa-edit cursor-pointer text-dark in-page-edit-icon d-flex justify-content-center ms-3\"\n (click)=\"navigateToResourceEdit()\"\n (keydown.enter)=\"navigateToResourceEdit()\"\n (keydown.space)=\"navigateToResourceEdit()\"\n title=\"Go to the main edit page\"></i>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"editForm\">\n <div class=\"row\">\n\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 row\">\n <pw-input-container label=\"CTA Text\" name=\"cta_text\" class=\"col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"cta_text\" id=\"input_cta_text_2\" name=\"input_cta_text_2\"/>\n </pw-input-container>\n\n <pw-input-container label=\"External URL\" name=\"external_url\" class=\"col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.ExternalUrl' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"external_url\" id=\"input_external_url_3\" name=\"input_external_url_3\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container\n [label]=\"'Resource.Posts.Body' | transloco\"\n name=\"body\"\n [errorMsg]=\"'Resource.Posts.Validation.Body' | transloco\">\n <quill-editor\n [styles]=\"{ height: '300px' }\"\n class=\"quillEditor\"\n [modules]=\"editorConfig\"\n formControlName=\"body\"\n [ngClass]=\"{\n 'w-100': true,\n 'quill-container': true,\n 'is-invalid': submitted && f['body'].errors\n }\">\n </quill-editor>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-3 col-sm-6\">\n <pw-input-container\n [label]=\"'Resource.Posts.When' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.When' | transloco\"\n name=\"when\">\n <p-datepicker inputId=\"resource-edit-card-when\" formControlName=\"when\"\n [showIcon]=\"true\"\n dateFormat=\"dd-M-yy\"\n [placeholder]=\"'Select Date'\"\n [ngClass]=\"{ 'is-invalid': submitted && f['when'].errors }\">\n </p-datepicker>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-8\">\n <pw-input-container\n [label]=\"'Resource.Posts.Tags' | transloco\"\n class=\"ui-fluid skills-modal tags\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\"\n name=\"cta_text\">\n <p-autoComplete [(ngModel)]=\"selectedTags\"\n class=\"body-bg\"\n [suggestions]=\"tagsSuggestion\"\n dataKey=\"id\"\n optionLabel=\"name\"\n (completeMethod)=\"search($event)\"\n styleClass=\"w-100\"\n [minLength]=\"1\"\n [maxlength]=\"10\"\n [dropdown]=\"true\"\n [ngModelOptions]=\"{ standalone: true }\"\n placeholder=\"Tags\"\n [multiple]=\"true\">\n </p-autoComplete>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 row\">\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'SHOWCASE'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Mark as showcase post'\"\n name=\"showcase\">\n <ui-switch formControlName=\"showcase\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'PUBLISHED'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Set to publish the post'\"\n name=\"published_at\">\n <ui-switch formControlName=\"published_at\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'ACCEPTED BY ADMIN'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Indicates approval by admin'\"\n name=\"accepted_at\">\n <ui-switch formControlName=\"accepted_at\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4 col-sm-4 my-4 ms-3\">\n <div class=\"text-center mb-4\">\n <span id=\"resource-edit-cover-picture-label\" class=\"pw-label-style\">{{ 'Resource.Posts.CoverPicture' | transloco }}</span>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"(image && !image.includes('default-photo.jpg')) ? image : 'assets/img/resource/blog.png'\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Modal\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openImageModal(imageCropContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\n @if (image && !image.includes('default-photo.jpg')) {\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 </div>\n\n <div class=\"col-12 col-md-4 col-sm-4 my-4 ms-3\">\n <div class=\"text-center mb-4\">\n <span id=\"resource-edit-rectangular-picture-label\" class=\"pw-label-style\">Rectangular Picture</span>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"(rectangularImage && !rectangularImage.includes('default-photo.jpg')) ? rectangularImage : 'assets/img/resource/blog.png'\"\n (click)=\"openRectModal(rectContent)\"\n (keydown.enter)=\"openRectModal(rectContent)\"\n class=\"image w-100\"\n alt=\"Uploaded rectangular media preview\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openRectModal(rectContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\n @if (rectangularImage && !rectangularImage.includes('default-photo.jpg')) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (click)=\"deleteRectangularImage()\"\n (keydown.enter)=\"deleteRectangularImage()\"></i>\n }\n </div>\n </div>\n </div>\n </div>\n\n </div>\n </form>\n </div>\n\n <div class=\"modal-footer\">\n <button class=\"btn btn-secondary\" (click)=\"modal.dismiss()\">Cancel</button>\n <button class=\"btn btn-primary\" [buttonBusy]=\"buttonBusy\" (click)=\"saveResource()\">Save</button>\n </div>\n</ng-template>\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. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)</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\n<ng-template #rectContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)</small>\n <pw-image-cropper\n #profile\n [aspectRatio]=\"'dynamic'\"\n (imageSelectionEvent)=\"onRectangularImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n", styles: ["::ng-deep .modal-content{margin-top:5rem!important}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i5$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6$1.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "component", type: i7$1.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "addOnTab", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "addOnBlur", "separator", "appendTo", "motionOptions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onAdd", "onFocus", "onBlur", "onDropdownClick", "onClear", "onInputKeydown", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "component", type: i8.ProfileImageCropperComponent, selector: "pw-image-cropper", inputs: ["aspectRatio", "dynamicData"], outputs: ["imageSelectionEvent", "closeEvent", "fileChangeEvent"] }, { kind: "component", type: i6.InputContainerComponent, selector: "pw-input-container", inputs: ["name", "controlId", "useAriaLabelledbyOnly", "label", "labelClass", "tooltipPosition", "required", "errorMsg", "isReadOnly", "showTooltip", "tooltipText", "showTriangle", "afterLabel", "showAfterLabel", "showTriangleText", "isLeftTooltip"] }, { kind: "directive", type: i5.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "directive", type: i5.LazyImgDirective, selector: "img" }, { kind: "component", type: i11.QuillEditorComponent, selector: "quill-editor" }, { kind: "component", type: i12.UiSwitchComponent, selector: "ui-switch", inputs: ["size", "color", "switchOffColor", "switchColor", "defaultBgColor", "defaultBoColor", "checkedLabel", "uncheckedLabel", "checkedTextColor", "uncheckedTextColor", "beforeChange", "ariaLabel", "checked", "disabled", "reverse", "loading"], outputs: ["change", "changeEvent", "valueChange"] }, { kind: "pipe", type: i10.TranslocoPipe, name: "transloco" }] }); }
1718
+ }
1719
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceEditCardComponent, decorators: [{
1720
+ type: Component,
1721
+ args: [{ selector: 'pw-resource-edit-card', standalone: false, template: "<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-dark in-page-edit-icon d-flex justify-content-center mb-2\"\n (click)=\"openModal(editResourceModal)\"\n (keydown.enter)=\"openModal(editResourceModal)\"\n (keydown.space)=\"openModal(editResourceModal)\"\n title=\"Edit Resource\"></i>\n</div>\n\n<ng-template #editResourceModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Resource</h5>\n <i class=\"fa fa-edit cursor-pointer text-dark in-page-edit-icon d-flex justify-content-center ms-3\"\n (click)=\"navigateToResourceEdit()\"\n (keydown.enter)=\"navigateToResourceEdit()\"\n (keydown.space)=\"navigateToResourceEdit()\"\n title=\"Go to the main edit page\"></i>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"editForm\">\n <div class=\"row\">\n\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 row\">\n <pw-input-container label=\"CTA Text\" name=\"cta_text\" class=\"col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"cta_text\" id=\"input_cta_text_2\" name=\"input_cta_text_2\"/>\n </pw-input-container>\n\n <pw-input-container label=\"External URL\" name=\"external_url\" class=\"col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.ExternalUrl' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"external_url\" id=\"input_external_url_3\" name=\"input_external_url_3\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container\n [label]=\"'Resource.Posts.Body' | transloco\"\n name=\"body\"\n [errorMsg]=\"'Resource.Posts.Validation.Body' | transloco\">\n <quill-editor\n [styles]=\"{ height: '300px' }\"\n class=\"quillEditor\"\n [modules]=\"editorConfig\"\n formControlName=\"body\"\n [ngClass]=\"{\n 'w-100': true,\n 'quill-container': true,\n 'is-invalid': submitted && f['body'].errors\n }\">\n </quill-editor>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-3 col-sm-6\">\n <pw-input-container\n [label]=\"'Resource.Posts.When' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.When' | transloco\"\n name=\"when\">\n <p-datepicker inputId=\"resource-edit-card-when\" formControlName=\"when\"\n [showIcon]=\"true\"\n dateFormat=\"dd-M-yy\"\n [placeholder]=\"'Select Date'\"\n [ngClass]=\"{ 'is-invalid': submitted && f['when'].errors }\">\n </p-datepicker>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-8\">\n <pw-input-container\n [label]=\"'Resource.Posts.Tags' | transloco\"\n class=\"ui-fluid skills-modal tags\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\"\n name=\"cta_text\">\n <p-autoComplete [(ngModel)]=\"selectedTags\"\n class=\"body-bg\"\n [suggestions]=\"tagsSuggestion\"\n dataKey=\"id\"\n optionLabel=\"name\"\n (completeMethod)=\"search($event)\"\n styleClass=\"w-100\"\n [minLength]=\"1\"\n [maxlength]=\"10\"\n [dropdown]=\"true\"\n [ngModelOptions]=\"{ standalone: true }\"\n placeholder=\"Tags\"\n [multiple]=\"true\">\n </p-autoComplete>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 row\">\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'SHOWCASE'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Mark as showcase post'\"\n name=\"showcase\">\n <ui-switch formControlName=\"showcase\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'PUBLISHED'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Set to publish the post'\"\n name=\"published_at\">\n <ui-switch formControlName=\"published_at\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'ACCEPTED BY ADMIN'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Indicates approval by admin'\"\n name=\"accepted_at\">\n <ui-switch formControlName=\"accepted_at\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4 col-sm-4 my-4 ms-3\">\n <div class=\"text-center mb-4\">\n <span id=\"resource-edit-cover-picture-label\" class=\"pw-label-style\">{{ 'Resource.Posts.CoverPicture' | transloco }}</span>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"(image && !image.includes('default-photo.jpg')) ? image : 'assets/img/resource/blog.png'\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Modal\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openImageModal(imageCropContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\n @if (image && !image.includes('default-photo.jpg')) {\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 </div>\n\n <div class=\"col-12 col-md-4 col-sm-4 my-4 ms-3\">\n <div class=\"text-center mb-4\">\n <span id=\"resource-edit-rectangular-picture-label\" class=\"pw-label-style\">Rectangular Picture</span>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"(rectangularImage && !rectangularImage.includes('default-photo.jpg')) ? rectangularImage : 'assets/img/resource/blog.png'\"\n (click)=\"openRectModal(rectContent)\"\n (keydown.enter)=\"openRectModal(rectContent)\"\n class=\"image w-100\"\n alt=\"Uploaded rectangular media preview\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openRectModal(rectContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\n @if (rectangularImage && !rectangularImage.includes('default-photo.jpg')) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (click)=\"deleteRectangularImage()\"\n (keydown.enter)=\"deleteRectangularImage()\"></i>\n }\n </div>\n </div>\n </div>\n </div>\n\n </div>\n </form>\n </div>\n\n <div class=\"modal-footer\">\n <button class=\"btn btn-secondary\" (click)=\"modal.dismiss()\">Cancel</button>\n <button class=\"btn btn-primary\" [buttonBusy]=\"buttonBusy\" (click)=\"saveResource()\">Save</button>\n </div>\n</ng-template>\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. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)</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\n<ng-template #rectContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)</small>\n <pw-image-cropper\n #profile\n [aspectRatio]=\"'dynamic'\"\n (imageSelectionEvent)=\"onRectangularImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n", styles: ["::ng-deep .modal-content{margin-top:5rem!important}\n"] }]
1722
+ }], ctorParameters: () => [{ type: i5$2.FormBuilder }, { type: i2$1.NgbModal }, { type: ResourceService }, { type: i2.AuthService }, { type: i2.TagService }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }], propDecorators: { id: [{
1723
+ type: Input
1724
+ }], resourceData: [{
1725
+ type: Input
1726
+ }], updated: [{
1727
+ type: Output
1728
+ }] } });
1729
+
1730
+ var resourceEditCard_component = /*#__PURE__*/Object.freeze({
1731
+ __proto__: null,
1732
+ ResourceEditCardComponent: ResourceEditCardComponent
1733
+ });
1734
+
1735
+ /**
1736
+ * Lazy-loadable module for ResourceEditCard
1737
+ * Contains heavy dependencies (Quill, Calendar, etc.) that are only needed for admins
1738
+ * This module is dynamically imported when edit button is clicked
1739
+ */
1740
+ class ResourceEditModule {
1741
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceEditModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1742
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.6", ngImport: i0, type: ResourceEditModule, declarations: [ResourceEditCardComponent], imports: [CommonModule,
1743
+ FormsModule,
1744
+ ReactiveFormsModule,
1745
+ DatePickerModule,
1746
+ AutoCompleteModule,
1747
+ ResourceSharedComponentsModule,
1748
+ CoreTranslocoModule,
1749
+ TranslocoModule,
1750
+ DirectivesModule, i11.QuillModule, UiSwitchModule], exports: [ResourceEditCardComponent] }); }
1751
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceEditModule, imports: [CommonModule,
1752
+ FormsModule,
1753
+ ReactiveFormsModule,
1754
+ DatePickerModule,
1755
+ AutoCompleteModule,
1756
+ ResourceSharedComponentsModule,
1757
+ CoreTranslocoModule,
1758
+ TranslocoModule,
1759
+ DirectivesModule,
1760
+ QuillModule.forRoot(),
1761
+ UiSwitchModule] }); }
1762
+ }
1763
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceEditModule, decorators: [{
1764
+ type: NgModule,
1765
+ args: [{
1766
+ declarations: [ResourceEditCardComponent],
1767
+ imports: [
1768
+ CommonModule,
1769
+ FormsModule,
1770
+ ReactiveFormsModule,
1771
+ DatePickerModule,
1772
+ AutoCompleteModule,
1773
+ ResourceSharedComponentsModule,
1774
+ CoreTranslocoModule,
1775
+ TranslocoModule,
1776
+ DirectivesModule,
1777
+ QuillModule.forRoot(),
1778
+ UiSwitchModule
1779
+ ],
1780
+ exports: [ResourceEditCardComponent],
1781
+ schemas: [CUSTOM_ELEMENTS_SCHEMA]
1782
+ }]
1783
+ }] });
1784
+
1785
+ class TestimonialCardListComponent {
1786
+ constructor() {
1787
+ this.editPost = new EventEmitter();
1788
+ this.posts = [];
1789
+ this.postHeader = '';
1790
+ this.canEdit = false;
1791
+ }
1792
+ ngOnChanges(changes) {
1793
+ if (changes.posts && this.posts?.length) {
1794
+ setTimeout(() => this.initSwiper(), 0); // Wait for DOM to render
1795
+ }
1796
+ }
1797
+ async initSwiper() {
1798
+ // Dynamically import Swiper only when needed (lazy-load ~150KB library)
1799
+ const { default: Swiper } = await import('swiper');
1800
+ const { Navigation, Pagination } = await import('swiper/modules');
1801
+ this.swiper = new Swiper('.swiper-container', {
1802
+ modules: [Navigation, Pagination],
1803
+ slidesPerView: 1,
1804
+ spaceBetween: 24,
1805
+ centeredSlides: true,
1806
+ touchRatio: 1,
1807
+ touchAngle: 45,
1808
+ grabCursor: true,
1809
+ navigation: {
1810
+ nextEl: '.swiper-button-next',
1811
+ prevEl: '.swiper-button-prev'
1812
+ },
1813
+ pagination: {
1814
+ el: '.swiper-pagination',
1815
+ clickable: true
1816
+ },
1817
+ breakpoints: {
1818
+ 425: {
1819
+ slidesPerView: 1.05,
1820
+ centeredSlides: true
1821
+ },
1822
+ 470: {
1823
+ slidesPerView: 1.25,
1824
+ centeredSlides: true
1825
+ },
1826
+ 564: {
1827
+ slidesPerView: 1.5,
1828
+ centeredSlides: true
1829
+ },
1830
+ 640: {
1831
+ slidesPerView: 1.5,
1832
+ centeredSlides: true
1833
+ },
1834
+ 768: {
1835
+ slidesPerView: 1.5,
1836
+ centeredSlides: true
1837
+ },
1838
+ 1024: {
1839
+ slidesPerView: 2, // Allow room between cards
1840
+ centeredSlides: false
1841
+ },
1842
+ 1200: {
1843
+ slidesPerView: 3,
1844
+ centeredSlides: false
1845
+ }
1846
+ }
1847
+ });
1848
+ }
1849
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: TestimonialCardListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1850
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: TestimonialCardListComponent, isStandalone: false, selector: "pw-testimonial-card", inputs: { posts: "posts", postHeader: "postHeader", canEdit: "canEdit" }, outputs: { editPost: "editPost" }, usesOnChanges: true, ngImport: i0, template: "<section class=\"resource-section section-outer bg-white\">\n <div class=\"container\">\n @if (postHeader) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap mb-3\">\n <h2 class=\"section-heading\">{{postHeader}}</h2>\n </div>\n }\n @if (posts.length === 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n <div [hidden]=\"posts.length === 0\">\n <div class=\"swiper-container\">\n <div class=\"swiper-wrapper\">\n @for (post of posts; track post) {\n <div class=\"swiper-slide\">\n <div class=\"testimonial-box\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEdit\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"editPost.emit(1, 100)\">\n </pw-resource-edit-card-lazy>\n <div class=\"stars mb-5\">\u2605\u2605\u2605\u2605\u2605</div>\n <div class=\"testimonial-content\">\n <div class=\"ql-container ql-snow ql-res\">\n <div class=\"ql-editor\"\n [innerHTML]=\"post?.body\">\n </div>\n </div>\n </div>\n <!-- THIS STAYS AT BOTTOM -->\n <div class=\"avatar-container\">\n @if (!post.rectangular_picture.url.includes('default-photo.jpg') ) {\n <img\n [src]=\"post.rectangular_picture.url\"\n alt=\"Logo\"\n class=\"testimonial-logo mt-4\"\n />\n }\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"swiper-pagination\"></div>\n <div class=\"swiper-button-prev\"></div>\n <div class=\"swiper-button-next\"></div>\n </div>\n </div>\n </div>\n</section>", styles: [".resource-section{box-shadow:0 4px 32px -14px #40576d4d!important;position:relative}@media(width>=768px)and (width<=1200px){.container{padding:0 6rem!important}}@media(width<=767px){.container{padding:0 1rem!important}}.ql-res{resize:none!important;border-width:0}.swiper-container{padding:20px;position:relative;overflow:hidden}@media(width>=768px){.swiper-container{padding:20px 40px}}.resource-card{background:#fff;border-radius:8px;box-shadow:0 0 20px #0000001a;padding:1.5rem;height:100%;display:flex;flex-direction:column;margin:0 auto;width:100%;max-width:350px}.resource-title{font-size:1.25rem;font-weight:600;margin-bottom:1rem}.resource-image{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:4px}.read-now-btn{margin-top:auto;display:inline-flex;align-items:center;gap:.5rem;color:#000;text-decoration:none;font-weight:500}.read-now-btn .arrow{transition:transform .2s ease}.read-now-btn:hover .arrow{transform:translate(5px)}.swiper-button-prev,.swiper-button-next{color:#000}.swiper-button-prev:after,.swiper-button-next:after{font-size:24px}@media(width<=767px){.swiper-button-prev,.swiper-button-next{display:none}}.swiper-pagination{position:relative;margin-top:20px}.swiper-pagination-bullet{background:#000;opacity:.5}.swiper-pagination-bullet-active{opacity:1}.swiper-wrapper{display:flex;align-items:stretch}.swiper-slide{display:flex;align-items:stretch;height:auto}.testimonial-box{display:flex;flex-direction:column;justify-content:space-between;background:#fff;border-radius:20px;padding:2.5rem 1.5rem;box-shadow:0 0 20px #0000001a;text-align:center;width:338px;font-size:1.1rem;height:100%;min-height:100%}.testimonial-box span{margin:0;font-size:22px}.testimonial-box .avatar-container{margin-top:auto}.testimonial-box .testimonial-logo{width:100%!important;height:auto!important;max-width:150px!important;object-fit:contain;align-self:center}.testimonial-box .stars{font-size:2.2rem;color:#f6b300;margin-bottom:2.5rem}.centaris-text{margin-bottom:3rem!important}@media(width<=768px){::ng-deep .swiper-wrapper{gap:1rem!important}.testimonial-box{width:300px!important}}\n", ".video-row{gap:5.5rem!important;margin-top:3rem!important}::ng-deep .resource-section{box-shadow:0 4px 32px -14px #40576d4d!important}.release-icon{height:auto;margin:0 11px 1.9rem;display:block;align-self:center}@media(width>=768px)and (width<=1200px){.resource-title{font-size:1.4rem!important}}textarea{font-size:1.4rem!important}@media(width<=768px){.resource-title{font-size:1.2rem!important}.container{padding:1rem!important}}@media(width>=768px)and (width<=1200px){.container{padding:1rem 3rem!important}}@media(width<=1200px){.resource-vault-section .vault-heading{font-size:3.5rem}.resource-vault-section .vault-description{margin-top:1.35rem}.resource-vault-section .vault-card{width:100%!important}.resource-vault-section .vault-btn{margin-left:0!important;width:100%!important}}@media(width>=991px){::ng-deep .trial-meeting-section:before{top:600px!important}::ng-deep .dashboard{margin-bottom:1rem!important}section.bg-white.text-center.extra-top-padding{position:relative;overflow:hidden}section.bg-white.text-center.extra-top-padding .banner-header{margin-bottom:4rem!important}section.bg-white.text-center.extra-top-padding:before,section.bg-white.text-center.extra-top-padding:after{content:\"\";position:absolute;background:url(/assets/img/logos/background-banner.png) no-repeat;background-size:contain;width:160px;height:450px;z-index:0;opacity:.8}section.bg-white.text-center.extra-top-padding:before{top:500px;left:0}section.bg-white.text-center.extra-top-padding:after{top:90px;right:0}}.vault-header{text-align:left}@media(width>=768px)and (width<=1200px){.container{padding:0 6rem!important}}@media(width<=1200px){.resource-card{width:100%!important}.release-notes-section{padding:7rem 0!important}}@media(width>=768px)and (width<=1200px){.resource-hero-section{padding:0 6rem!important}.cards-row{justify-content:center}}.resource-body-section{background-color:#fff}.resource-body-section .container{padding:0 1.5rem;padding-bottom:4rem!important;padding-top:7rem!important;max-width:850px;margin:0 auto;text-align:left}.user-not-logged-in{background:#f7f7f7;border:1px solid rgb(238,238,238);font-weight:400}.user-not-logged-in a{color:var(--first)!important;text-decoration:none;font-weight:500}.resource-book-section{background:#fff;padding-top:7rem;padding-bottom:0}.resource-book-section .container{max-width:850px;margin:0 auto;padding:0 2rem!important;text-align:left}.resource-book-section .resource-contact{line-height:1.6;font-size:1.5rem}.resource-book-section .resource-contact a{text-decoration:underline;color:#000;margin:0 .2rem}.resource-book-section .resource-contact a:hover{color:var(--first)!important}.resource-offer-section{background:#fff;padding-top:2rem}.resource-offer-section .container{max-width:850px;margin:0 auto;padding:0 1.5rem;text-align:left}.resource-offer-section .resource-title{font-size:2rem;font-weight:700;color:#000;margin-bottom:.25em!important}.resource-offer-section .resource-title strong{font-weight:700}.resource-offer-section .resource-description{font-size:1.5rem;line-height:1.8rem;color:#333;margin-bottom:1.5rem}.resource-offer-section .resource-offer-list{font-size:1.1rem;line-height:1.5rem;margin-bottom:2.5rem;margin-top:2.5rem}.resource-offer-section .resource-offer-list p{font-size:1.5rem;margin:.5rem 0;font-weight:400}.resource-offer-section .resource-signup{margin-bottom:2.5rem}.resource-offer-section .resource-signup .signup-link{font-size:1.5rem;font-weight:400;text-decoration:underline;color:#000}@media(width<=768px){.resource-offer-section .resource-book-section{padding-top:2rem!important}.resource-offer-section .container{text-align:left}.resource-offer-section .resource-title{font-size:1.5rem}.resource-offer-section .resource-description,.resource-offer-section .resource-offer-list,.resource-offer-section .resource-signup,.resource-offer-section .signup-link,.resource-offer-section .resource-contact,.resource-offer-section .resource-offer-list p{font-size:1.2rem!important}}.resource-offer-intro{font-size:1.5rem;font-weight:400}.outer-section-fadeout{position:absolute;top:139rem;height:40px;width:100%;background:linear-gradient(to bottom,#fff0,#f8f9fa)}.body-divider{border:0;height:40px;width:100%;background:linear-gradient(to bottom,#0000,#00000026);margin:0}@media(width<=768px){.resource-book-section{padding-top:2rem!important}.resource-contact{font-size:1.2rem!important}}::ng-deep .body-quill{border-width:0!important;max-width:900px;display:block;margin-left:auto;margin-right:auto}::ng-deep .p-textarea{border-radius:.5rem;border:1px solid #ced4da;font-size:1rem!important}.card{background-color:#fff;border-radius:12px}.comment-row{gap:2rem;padding-bottom:5rem;max-width:1000px;display:block;margin-left:auto;margin-right:auto}.comment-label{font-size:1.5rem!important}.response-row{max-width:1000px;display:block;margin-left:auto;margin-right:auto;margin-top:3rem!important}\n"], dependencies: [{ kind: "directive", type: i5.LazyImgDirective, selector: "img" }, { kind: "component", type: ResourceEditCardLazyComponent, selector: "pw-resource-edit-card-lazy", inputs: ["id", "resourceData", "canEdit"], outputs: ["updated"] }, { kind: "component", type: i6.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "pipe", type: i10.TranslocoPipe, name: "transloco" }] }); }
1851
+ }
1852
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: TestimonialCardListComponent, decorators: [{
1853
+ type: Component,
1854
+ args: [{ selector: 'pw-testimonial-card', standalone: false, template: "<section class=\"resource-section section-outer bg-white\">\n <div class=\"container\">\n @if (postHeader) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap mb-3\">\n <h2 class=\"section-heading\">{{postHeader}}</h2>\n </div>\n }\n @if (posts.length === 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n <div [hidden]=\"posts.length === 0\">\n <div class=\"swiper-container\">\n <div class=\"swiper-wrapper\">\n @for (post of posts; track post) {\n <div class=\"swiper-slide\">\n <div class=\"testimonial-box\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEdit\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"editPost.emit(1, 100)\">\n </pw-resource-edit-card-lazy>\n <div class=\"stars mb-5\">\u2605\u2605\u2605\u2605\u2605</div>\n <div class=\"testimonial-content\">\n <div class=\"ql-container ql-snow ql-res\">\n <div class=\"ql-editor\"\n [innerHTML]=\"post?.body\">\n </div>\n </div>\n </div>\n <!-- THIS STAYS AT BOTTOM -->\n <div class=\"avatar-container\">\n @if (!post.rectangular_picture.url.includes('default-photo.jpg') ) {\n <img\n [src]=\"post.rectangular_picture.url\"\n alt=\"Logo\"\n class=\"testimonial-logo mt-4\"\n />\n }\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"swiper-pagination\"></div>\n <div class=\"swiper-button-prev\"></div>\n <div class=\"swiper-button-next\"></div>\n </div>\n </div>\n </div>\n</section>", styles: [".resource-section{box-shadow:0 4px 32px -14px #40576d4d!important;position:relative}@media(width>=768px)and (width<=1200px){.container{padding:0 6rem!important}}@media(width<=767px){.container{padding:0 1rem!important}}.ql-res{resize:none!important;border-width:0}.swiper-container{padding:20px;position:relative;overflow:hidden}@media(width>=768px){.swiper-container{padding:20px 40px}}.resource-card{background:#fff;border-radius:8px;box-shadow:0 0 20px #0000001a;padding:1.5rem;height:100%;display:flex;flex-direction:column;margin:0 auto;width:100%;max-width:350px}.resource-title{font-size:1.25rem;font-weight:600;margin-bottom:1rem}.resource-image{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:4px}.read-now-btn{margin-top:auto;display:inline-flex;align-items:center;gap:.5rem;color:#000;text-decoration:none;font-weight:500}.read-now-btn .arrow{transition:transform .2s ease}.read-now-btn:hover .arrow{transform:translate(5px)}.swiper-button-prev,.swiper-button-next{color:#000}.swiper-button-prev:after,.swiper-button-next:after{font-size:24px}@media(width<=767px){.swiper-button-prev,.swiper-button-next{display:none}}.swiper-pagination{position:relative;margin-top:20px}.swiper-pagination-bullet{background:#000;opacity:.5}.swiper-pagination-bullet-active{opacity:1}.swiper-wrapper{display:flex;align-items:stretch}.swiper-slide{display:flex;align-items:stretch;height:auto}.testimonial-box{display:flex;flex-direction:column;justify-content:space-between;background:#fff;border-radius:20px;padding:2.5rem 1.5rem;box-shadow:0 0 20px #0000001a;text-align:center;width:338px;font-size:1.1rem;height:100%;min-height:100%}.testimonial-box span{margin:0;font-size:22px}.testimonial-box .avatar-container{margin-top:auto}.testimonial-box .testimonial-logo{width:100%!important;height:auto!important;max-width:150px!important;object-fit:contain;align-self:center}.testimonial-box .stars{font-size:2.2rem;color:#f6b300;margin-bottom:2.5rem}.centaris-text{margin-bottom:3rem!important}@media(width<=768px){::ng-deep .swiper-wrapper{gap:1rem!important}.testimonial-box{width:300px!important}}\n", ".video-row{gap:5.5rem!important;margin-top:3rem!important}::ng-deep .resource-section{box-shadow:0 4px 32px -14px #40576d4d!important}.release-icon{height:auto;margin:0 11px 1.9rem;display:block;align-self:center}@media(width>=768px)and (width<=1200px){.resource-title{font-size:1.4rem!important}}textarea{font-size:1.4rem!important}@media(width<=768px){.resource-title{font-size:1.2rem!important}.container{padding:1rem!important}}@media(width>=768px)and (width<=1200px){.container{padding:1rem 3rem!important}}@media(width<=1200px){.resource-vault-section .vault-heading{font-size:3.5rem}.resource-vault-section .vault-description{margin-top:1.35rem}.resource-vault-section .vault-card{width:100%!important}.resource-vault-section .vault-btn{margin-left:0!important;width:100%!important}}@media(width>=991px){::ng-deep .trial-meeting-section:before{top:600px!important}::ng-deep .dashboard{margin-bottom:1rem!important}section.bg-white.text-center.extra-top-padding{position:relative;overflow:hidden}section.bg-white.text-center.extra-top-padding .banner-header{margin-bottom:4rem!important}section.bg-white.text-center.extra-top-padding:before,section.bg-white.text-center.extra-top-padding:after{content:\"\";position:absolute;background:url(/assets/img/logos/background-banner.png) no-repeat;background-size:contain;width:160px;height:450px;z-index:0;opacity:.8}section.bg-white.text-center.extra-top-padding:before{top:500px;left:0}section.bg-white.text-center.extra-top-padding:after{top:90px;right:0}}.vault-header{text-align:left}@media(width>=768px)and (width<=1200px){.container{padding:0 6rem!important}}@media(width<=1200px){.resource-card{width:100%!important}.release-notes-section{padding:7rem 0!important}}@media(width>=768px)and (width<=1200px){.resource-hero-section{padding:0 6rem!important}.cards-row{justify-content:center}}.resource-body-section{background-color:#fff}.resource-body-section .container{padding:0 1.5rem;padding-bottom:4rem!important;padding-top:7rem!important;max-width:850px;margin:0 auto;text-align:left}.user-not-logged-in{background:#f7f7f7;border:1px solid rgb(238,238,238);font-weight:400}.user-not-logged-in a{color:var(--first)!important;text-decoration:none;font-weight:500}.resource-book-section{background:#fff;padding-top:7rem;padding-bottom:0}.resource-book-section .container{max-width:850px;margin:0 auto;padding:0 2rem!important;text-align:left}.resource-book-section .resource-contact{line-height:1.6;font-size:1.5rem}.resource-book-section .resource-contact a{text-decoration:underline;color:#000;margin:0 .2rem}.resource-book-section .resource-contact a:hover{color:var(--first)!important}.resource-offer-section{background:#fff;padding-top:2rem}.resource-offer-section .container{max-width:850px;margin:0 auto;padding:0 1.5rem;text-align:left}.resource-offer-section .resource-title{font-size:2rem;font-weight:700;color:#000;margin-bottom:.25em!important}.resource-offer-section .resource-title strong{font-weight:700}.resource-offer-section .resource-description{font-size:1.5rem;line-height:1.8rem;color:#333;margin-bottom:1.5rem}.resource-offer-section .resource-offer-list{font-size:1.1rem;line-height:1.5rem;margin-bottom:2.5rem;margin-top:2.5rem}.resource-offer-section .resource-offer-list p{font-size:1.5rem;margin:.5rem 0;font-weight:400}.resource-offer-section .resource-signup{margin-bottom:2.5rem}.resource-offer-section .resource-signup .signup-link{font-size:1.5rem;font-weight:400;text-decoration:underline;color:#000}@media(width<=768px){.resource-offer-section .resource-book-section{padding-top:2rem!important}.resource-offer-section .container{text-align:left}.resource-offer-section .resource-title{font-size:1.5rem}.resource-offer-section .resource-description,.resource-offer-section .resource-offer-list,.resource-offer-section .resource-signup,.resource-offer-section .signup-link,.resource-offer-section .resource-contact,.resource-offer-section .resource-offer-list p{font-size:1.2rem!important}}.resource-offer-intro{font-size:1.5rem;font-weight:400}.outer-section-fadeout{position:absolute;top:139rem;height:40px;width:100%;background:linear-gradient(to bottom,#fff0,#f8f9fa)}.body-divider{border:0;height:40px;width:100%;background:linear-gradient(to bottom,#0000,#00000026);margin:0}@media(width<=768px){.resource-book-section{padding-top:2rem!important}.resource-contact{font-size:1.2rem!important}}::ng-deep .body-quill{border-width:0!important;max-width:900px;display:block;margin-left:auto;margin-right:auto}::ng-deep .p-textarea{border-radius:.5rem;border:1px solid #ced4da;font-size:1rem!important}.card{background-color:#fff;border-radius:12px}.comment-row{gap:2rem;padding-bottom:5rem;max-width:1000px;display:block;margin-left:auto;margin-right:auto}.comment-label{font-size:1.5rem!important}.response-row{max-width:1000px;display:block;margin-left:auto;margin-right:auto;margin-top:3rem!important}\n"] }]
1855
+ }], propDecorators: { editPost: [{
1856
+ type: Output
1857
+ }], posts: [{
1858
+ type: Input
1859
+ }], postHeader: [{
1860
+ type: Input
1861
+ }], canEdit: [{
1862
+ type: Input
1863
+ }] } });
1864
+
1865
+ /**
1866
+ * Generated bundle index. Do not edit.
1867
+ */
1868
+
1869
+ export { BaseResourceComponent as B, CaseStudyCardComponent as C, ResourceVideoCardComponent as R, TestimonialCardListComponent as T, UpcomingEventCardComponent as U, ResourceCardComponent as a, ResourceNoteCardComponent as b, ResourceVaultComponent as c, ResourceCardsModule as d, ResourceService as e, ResourceEditCardLazyComponent as f, ResourceSharedModule as g, ResourceTopBannerEditComponent as h, ResourceCompanyCardComponent as i, ResourceEditCardComponent as j, ResourceEditModule as k, ResourceModule as l, ResourcePublicModule as m, Trial4ContactUsModule as n };
1870
+ //# sourceMappingURL=posiwise-resource-module-posiwise-resource-module-DfgyQYhP.mjs.map