@posiwise/resource-module 0.0.190 → 0.0.192

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/fesm2022/{posiwise-resource-module-base-top-banner.component-Cf04fHND.mjs → posiwise-resource-module-base-top-banner.component-CIvGr9du.mjs} +15 -19
  2. package/fesm2022/posiwise-resource-module-base-top-banner.component-CIvGr9du.mjs.map +1 -0
  3. package/fesm2022/posiwise-resource-module-posiwise-resource-module-QIX6Y1Ol.mjs +1888 -0
  4. package/fesm2022/posiwise-resource-module-posiwise-resource-module-QIX6Y1Ol.mjs.map +1 -0
  5. package/fesm2022/posiwise-resource-module-resource-blogs.module-DQhQ9YWu.mjs +69 -0
  6. package/fesm2022/posiwise-resource-module-resource-blogs.module-DQhQ9YWu.mjs.map +1 -0
  7. package/fesm2022/posiwise-resource-module-resource-case-studies.module-D7ALgcL_.mjs +135 -0
  8. package/fesm2022/posiwise-resource-module-resource-case-studies.module-D7ALgcL_.mjs.map +1 -0
  9. package/fesm2022/posiwise-resource-module-resource-events.module-UnO7wcUI.mjs +241 -0
  10. package/fesm2022/posiwise-resource-module-resource-events.module-UnO7wcUI.mjs.map +1 -0
  11. package/fesm2022/posiwise-resource-module-resource-hub.module-UBFt3bki.mjs +244 -0
  12. package/fesm2022/posiwise-resource-module-resource-hub.module-UBFt3bki.mjs.map +1 -0
  13. package/fesm2022/posiwise-resource-module-resource-integrations.module-D7idZK_y.mjs +295 -0
  14. package/fesm2022/posiwise-resource-module-resource-integrations.module-D7idZK_y.mjs.map +1 -0
  15. package/fesm2022/posiwise-resource-module-resource-post.module-CR9sCgeR.mjs +334 -0
  16. package/fesm2022/posiwise-resource-module-resource-post.module-CR9sCgeR.mjs.map +1 -0
  17. package/fesm2022/posiwise-resource-module-resource-release-notes.module-DxRiC1Q4.mjs +110 -0
  18. package/fesm2022/posiwise-resource-module-resource-release-notes.module-DxRiC1Q4.mjs.map +1 -0
  19. package/fesm2022/posiwise-resource-module-resource-root.module-PmW6b6c0.mjs +398 -0
  20. package/fesm2022/posiwise-resource-module-resource-root.module-PmW6b6c0.mjs.map +1 -0
  21. package/fesm2022/posiwise-resource-module-resource-videos.module-VJAmMFn-.mjs +68 -0
  22. package/fesm2022/posiwise-resource-module-resource-videos.module-VJAmMFn-.mjs.map +1 -0
  23. package/fesm2022/posiwise-resource-module-resource-white-papers.module-jsS-ik0o.mjs +70 -0
  24. package/fesm2022/posiwise-resource-module-resource-white-papers.module-jsS-ik0o.mjs.map +1 -0
  25. package/fesm2022/posiwise-resource-module.mjs +1 -1
  26. package/package.json +3 -3
  27. package/fesm2022/posiwise-resource-module-base-top-banner.component-Cf04fHND.mjs.map +0 -1
  28. package/fesm2022/posiwise-resource-module-posiwise-resource-module-BQQJRWpa.mjs +0 -1884
  29. package/fesm2022/posiwise-resource-module-posiwise-resource-module-BQQJRWpa.mjs.map +0 -1
  30. package/fesm2022/posiwise-resource-module-resource-blogs.module-BR7TSMOR.mjs +0 -69
  31. package/fesm2022/posiwise-resource-module-resource-blogs.module-BR7TSMOR.mjs.map +0 -1
  32. package/fesm2022/posiwise-resource-module-resource-case-studies.module-opMXWIeg.mjs +0 -135
  33. package/fesm2022/posiwise-resource-module-resource-case-studies.module-opMXWIeg.mjs.map +0 -1
  34. package/fesm2022/posiwise-resource-module-resource-events.module-C5Q81-a4.mjs +0 -241
  35. package/fesm2022/posiwise-resource-module-resource-events.module-C5Q81-a4.mjs.map +0 -1
  36. package/fesm2022/posiwise-resource-module-resource-hub.module-0G1ymGn3.mjs +0 -244
  37. package/fesm2022/posiwise-resource-module-resource-hub.module-0G1ymGn3.mjs.map +0 -1
  38. package/fesm2022/posiwise-resource-module-resource-integrations.module-Bmon54E1.mjs +0 -295
  39. package/fesm2022/posiwise-resource-module-resource-integrations.module-Bmon54E1.mjs.map +0 -1
  40. package/fesm2022/posiwise-resource-module-resource-post.module-C5tpRpPE.mjs +0 -332
  41. package/fesm2022/posiwise-resource-module-resource-post.module-C5tpRpPE.mjs.map +0 -1
  42. package/fesm2022/posiwise-resource-module-resource-release-notes.module-Cfrtxu7y.mjs +0 -110
  43. package/fesm2022/posiwise-resource-module-resource-release-notes.module-Cfrtxu7y.mjs.map +0 -1
  44. package/fesm2022/posiwise-resource-module-resource-root.module-D0L-M3Xf.mjs +0 -398
  45. package/fesm2022/posiwise-resource-module-resource-root.module-D0L-M3Xf.mjs.map +0 -1
  46. package/fesm2022/posiwise-resource-module-resource-videos.module-BJz8jCt8.mjs +0 -68
  47. package/fesm2022/posiwise-resource-module-resource-videos.module-BJz8jCt8.mjs.map +0 -1
  48. package/fesm2022/posiwise-resource-module-resource-white-papers.module-XAPem1wC.mjs +0 -70
  49. package/fesm2022/posiwise-resource-module-resource-white-papers.module-XAPem1wC.mjs.map +0 -1
@@ -1,1884 +0,0 @@
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 { IconFieldModule } from 'primeng/iconfield';
20
- import { InputIconModule } from 'primeng/inputicon';
21
- import { InputTextModule } from 'primeng/inputtext';
22
- import { TextareaModule } from 'primeng/textarea';
23
- import * as i10 from '@jsverse/transloco';
24
- import { TranslocoModule } from '@jsverse/transloco';
25
- import { AppBaseComponent } from '@posiwise/app-base-component';
26
- import { Subject } from 'rxjs';
27
- import * as i5$1 from 'primeng/paginator';
28
- import { PaginatorModule } from 'primeng/paginator';
29
- import * as i2$1 from '@ng-bootstrap/ng-bootstrap';
30
- import * as i8 from '@posiwise/utils';
31
- import { DragDropModule } from '@angular/cdk/drag-drop';
32
- import { NgxCaptchaModule } from 'ngx-captcha';
33
- import { SelectModule } from 'primeng/select';
34
- import * as i7 from 'primeng/progressspinner';
35
- import * as i3$1 from '@angular/platform-browser';
36
- import * as i11 from 'ngx-quill';
37
- import { QuillModule } from 'ngx-quill';
38
- import * as i12 from 'ngx-ui-switch';
39
- import { UiSwitchModule } from 'ngx-ui-switch';
40
- import * as i7$1 from 'primeng/autocomplete';
41
- import { AutoCompleteModule } from 'primeng/autocomplete';
42
- import * as i6$1 from 'primeng/datepicker';
43
- import { DatePickerModule } from 'primeng/datepicker';
44
- import moment from 'moment';
45
-
46
- class ResourceService {
47
- constructor(api) {
48
- this.api = api;
49
- this.resource = '/posts';
50
- this.comments = '/comments';
51
- }
52
- getPublicPosts(master_subscription_id, page, pageSize, search, tagCategoryIds, tagIds) {
53
- const params = {
54
- page,
55
- page_size: pageSize,
56
- search: search,
57
- master_subscription_id
58
- };
59
- if (tagCategoryIds) {
60
- params['tag_category_ids'] = tagCategoryIds;
61
- }
62
- if (tagIds) {
63
- params['tag_ids'] = tagIds;
64
- }
65
- return this.api.getWithParams(`${this.resource}/get_all`, {
66
- ...params
67
- });
68
- }
69
- getAdminPosts(subscriptionId, paging) {
70
- return this.api.getWithParams(`${this.resource}/admin_get_all`, {
71
- ...HelperService.getPagingParams(paging),
72
- subscription_id: subscriptionId
73
- });
74
- }
75
- addPost(post) {
76
- const formData = new FormData();
77
- // eslint-disable-next-line no-restricted-syntax
78
- for (const key in post) {
79
- if (key in post) {
80
- formData.append(key, post[key]);
81
- }
82
- }
83
- return this.api.post(this.resource, formData);
84
- }
85
- getPostBySlug(slug) {
86
- return this.api.get(`${this.resource}/${slug}`);
87
- }
88
- deletePost(id) {
89
- return this.api.delete(`${this.resource}/${id}`);
90
- }
91
- updatePost(post, id) {
92
- const formData = new FormData();
93
- // eslint-disable-next-line no-restricted-syntax
94
- for (const key in post) {
95
- if (key in post) {
96
- formData.append(key, post[key]);
97
- }
98
- }
99
- return this.api.put(`${this.resource}/${id}`, formData);
100
- }
101
- getComments() {
102
- return this.api.get(`${this.comments}/get_all`);
103
- }
104
- postComments(post) {
105
- return this.api.post(this.comments, post);
106
- }
107
- getResourceInsight(subscription_id, starting_at, ending_at) {
108
- return this.api.getWithParams(`/admin/posts_analytics?type=views&subscription_id=${subscription_id}`, { starting_at, ending_at });
109
- }
110
- getResourcePostsInsight(id) {
111
- return this.api.get(`${this.resource}/${id}/insights`);
112
- }
113
- 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 }); }
114
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceService }); }
115
- }
116
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceService, decorators: [{
117
- type: Injectable
118
- }], ctorParameters: () => [{ type: i2.MainApiHttpService }] });
119
-
120
- // Lazy loaded routes - each route now loads its own module with only the components it needs
121
- const routes = [
122
- {
123
- path: '',
124
- pathMatch: 'full',
125
- loadChildren: () => import('./posiwise-resource-module-resource-root.module-D0L-M3Xf.mjs').then(m => m.ResourceRootModule)
126
- },
127
- {
128
- path: 'hub',
129
- loadChildren: () => import('./posiwise-resource-module-resource-hub.module-0G1ymGn3.mjs').then(m => m.ResourceHubModule)
130
- },
131
- {
132
- path: 'blogs',
133
- loadChildren: () => import('./posiwise-resource-module-resource-blogs.module-BR7TSMOR.mjs').then(m => m.ResourceBlogsModule)
134
- },
135
- {
136
- path: 'videos',
137
- loadChildren: () => import('./posiwise-resource-module-resource-videos.module-BJz8jCt8.mjs').then(m => m.ResourceVideosModule)
138
- },
139
- {
140
- path: 'integrations',
141
- loadChildren: () => import('./posiwise-resource-module-resource-integrations.module-Bmon54E1.mjs').then(m => m.ResourceIntegrationsModule)
142
- },
143
- {
144
- path: 'release-notes',
145
- loadChildren: () => import('./posiwise-resource-module-resource-release-notes.module-Cfrtxu7y.mjs').then(m => m.ResourceReleaseNotesModule)
146
- },
147
- {
148
- path: 'events',
149
- loadChildren: () => import('./posiwise-resource-module-resource-events.module-C5Q81-a4.mjs').then(m => m.ResourceEventsModule)
150
- },
151
- {
152
- path: 'white-papers',
153
- loadChildren: () => import('./posiwise-resource-module-resource-white-papers.module-XAPem1wC.mjs').then(m => m.ResourceWhitePapersModule)
154
- },
155
- {
156
- path: 'case-studies',
157
- loadChildren: () => import('./posiwise-resource-module-resource-case-studies.module-opMXWIeg.mjs').then(m => m.ResourceCaseStudiesModule)
158
- },
159
- {
160
- path: 'view/:slug',
161
- loadChildren: () => import('./posiwise-resource-module-resource-post.module-C5tpRpPE.mjs').then(m => m.ResourcePostModule)
162
- }
163
- ];
164
- class BlogPublicRoutingModule {
165
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: BlogPublicRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
166
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.6", ngImport: i0, type: BlogPublicRoutingModule, imports: [i1.RouterModule], exports: [RouterModule] }); }
167
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: BlogPublicRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
168
- }
169
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: BlogPublicRoutingModule, decorators: [{
170
- type: NgModule,
171
- args: [{
172
- imports: [RouterModule.forChild(routes)],
173
- exports: [RouterModule]
174
- }]
175
- }] });
176
-
177
- class ResourcePublicModule {
178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourcePublicModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
179
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.6", ngImport: i0, type: ResourcePublicModule, imports: [BlogPublicRoutingModule] }); }
180
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourcePublicModule, providers: [ResourceService], imports: [BlogPublicRoutingModule] }); }
181
- }
182
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourcePublicModule, decorators: [{
183
- type: NgModule,
184
- args: [{
185
- imports: [BlogPublicRoutingModule],
186
- providers: [ResourceService],
187
- schemas: [CUSTOM_ELEMENTS_SCHEMA]
188
- }]
189
- }] });
190
-
191
- class ResourceModule {
192
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
193
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.6", ngImport: i0, type: ResourceModule, imports: [ResourcePublicModule] }); }
194
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceModule, imports: [ResourcePublicModule] }); }
195
- }
196
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceModule, decorators: [{
197
- type: NgModule,
198
- args: [{
199
- imports: [ResourcePublicModule]
200
- }]
201
- }] });
202
-
203
- class Trial4ContactUsModule {
204
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: Trial4ContactUsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
205
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.6", ngImport: i0, type: Trial4ContactUsModule, imports: [Trial4SharedContactUsModule], exports: [Trial4SharedContactUsModule] }); }
206
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: Trial4ContactUsModule, imports: [Trial4SharedContactUsModule, Trial4SharedContactUsModule] }); }
207
- }
208
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: Trial4ContactUsModule, decorators: [{
209
- type: NgModule,
210
- args: [{
211
- imports: [Trial4SharedContactUsModule],
212
- exports: [Trial4SharedContactUsModule]
213
- }]
214
- }] });
215
-
216
- /**
217
- * Lazy-loading wrapper for ResourceEditCard
218
- */
219
- class ResourceEditCardLazyComponent {
220
- constructor(cdr) {
221
- this.cdr = cdr;
222
- this.canEdit = false;
223
- this.updated = new EventEmitter();
224
- this.componentRef = null;
225
- this.loading = false;
226
- }
227
- async ngOnChanges(changes) {
228
- if (this.canEdit && !this.componentRef && !this.loading) {
229
- await this.loadEditCard();
230
- }
231
- else if (!this.canEdit && this.componentRef) {
232
- this.container.clear();
233
- this.componentRef = null;
234
- }
235
- else if (this.componentRef && (changes['id'] || changes['resourceData'])) {
236
- // Update existing component inputs
237
- this.componentRef.instance.id = this.id;
238
- this.componentRef.instance.resourceData = this.resourceData;
239
- }
240
- }
241
- async loadEditCard() {
242
- if (this.componentRef || this.loading)
243
- return; // Prevent double loading
244
- this.loading = true; // Set BEFORE async operation
245
- try {
246
- // Dynamically import ResourceEditCard component (145 KB)
247
- const module = await Promise.resolve().then(function () { return resourceEditCard_component; });
248
- const ResourceEditCardComponent = module.ResourceEditCardComponent;
249
- // Ensure container exists and is clear
250
- if (!this.container)
251
- return;
252
- this.container.clear();
253
- // Create component dynamically (only once)
254
- this.componentRef = this.container.createComponent(ResourceEditCardComponent);
255
- this.componentRef.instance.id = this.id;
256
- this.componentRef.instance.resourceData = this.resourceData;
257
- this.componentRef.instance.updated.subscribe(() => {
258
- this.updated.emit();
259
- this.cdr.markForCheck();
260
- });
261
- this.loading = false;
262
- }
263
- catch (error) {
264
- console.error('Failed to load ResourceEditCard:', error);
265
- this.loading = false;
266
- }
267
- }
268
- ngOnDestroy() {
269
- this.componentRef?.destroy();
270
- }
271
- 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 }); }
272
- 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 }); }
273
- }
274
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceEditCardLazyComponent, decorators: [{
275
- type: Component,
276
- args: [{
277
- selector: 'pw-resource-edit-card-lazy',
278
- template: `<ng-container #editCardContainer></ng-container>`,
279
- standalone: false
280
- }]
281
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { container: [{
282
- type: ViewChild,
283
- args: ['editCardContainer', { read: ViewContainerRef, static: true }]
284
- }], id: [{
285
- type: Input
286
- }], resourceData: [{
287
- type: Input
288
- }], canEdit: [{
289
- type: Input
290
- }], updated: [{
291
- type: Output
292
- }] } });
293
-
294
- class ResourceCompanyCardComponent extends AppBaseComponent {
295
- constructor(injector, cdr) {
296
- super(injector);
297
- this.cdr = cdr;
298
- this.getPosts = new EventEmitter();
299
- this.destroy$ = new Subject();
300
- this.canEditResourcesValue = false;
301
- this.header = '';
302
- this.data = [];
303
- this.vendor = false;
304
- this.postData = false;
305
- this.filteredData = [];
306
- this.first = 0;
307
- this.rows = 12;
308
- }
309
- ngOnChanges() {
310
- this.search();
311
- }
312
- ngOnInit() {
313
- if (this.userLoggedIn) {
314
- this.updateCanEditResourcesValue();
315
- this.localStorage.getItem$('product').subscribe(res => {
316
- const data = res ? JSON.parse(res) : null;
317
- this.subscriptionId = data?.subscriptionId;
318
- this.cdr.markForCheck();
319
- });
320
- }
321
- }
322
- search(keywords) {
323
- if (keywords) {
324
- this.filteredData = this.data.filter(x => x.title.toLowerCase().includes(keywords.toLowerCase()));
325
- if (this.filteredData.length === 0) {
326
- this.postData = true;
327
- }
328
- else {
329
- this.postData = false;
330
- }
331
- }
332
- else {
333
- this.filteredData = [...this.data];
334
- this.postData = false;
335
- }
336
- }
337
- onPageChange(event) {
338
- this.first = event.first;
339
- this.rows = event.rows;
340
- }
341
- ngOnDestroy() {
342
- this.destroy$.next();
343
- this.destroy$.complete();
344
- }
345
- updateCanEditResourcesValue() {
346
- this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
347
- }
348
- canEditResources() {
349
- return this.canEditResourcesValue;
350
- }
351
- /** Show no-data when there is integration count but no posts (postData is false, filteredData empty). */
352
- get showNoPostsMessage() {
353
- return (this.integrationCountDisplay > 0 &&
354
- !this.postData &&
355
- (!this.filteredData || this.filteredData.length === 0));
356
- }
357
- 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 }); }
358
- 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" }] }); }
359
- }
360
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceCompanyCardComponent, decorators: [{
361
- type: Component,
362
- 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"] }]
363
- }], ctorParameters: () => [{ type: i0.Injector }, { type: i0.ChangeDetectorRef }], propDecorators: { getPosts: [{
364
- type: Output
365
- }], header: [{
366
- type: Input
367
- }], data: [{
368
- type: Input
369
- }], integrationCountDisplay: [{
370
- type: Input
371
- }], vendor: [{
372
- type: Input
373
- }], user: [{
374
- type: Input
375
- }], userLoggedIn: [{
376
- type: Input
377
- }] } });
378
-
379
- class ResourceTopBannerEditComponent extends AppBaseComponent {
380
- constructor(fb, modalService, tagService, cdr, injector) {
381
- super(injector);
382
- this.fb = fb;
383
- this.modalService = modalService;
384
- this.tagService = tagService;
385
- this.cdr = cdr;
386
- this.getUpdatedTag = new EventEmitter();
387
- this.image = null;
388
- this.defaultImage = 'assets/img/resource/blog.png';
389
- }
390
- ngOnInit() {
391
- if (this.userLoggedIn) {
392
- this.localStorage.getItem$('product').subscribe(res => {
393
- const data = res ? JSON.parse(res) : null;
394
- this.subscriptionId = data?.subscriptionId;
395
- this.cdr.markForCheck();
396
- });
397
- }
398
- this.form = this.fb.group({
399
- title: [this.blogPostTag?.title ?? ''],
400
- description: [this.blogPostTag?.description ?? ''],
401
- meta_title: [this.blogPostTag?.meta_title ?? ''],
402
- meta_description: [this.blogPostTag?.meta_description ?? '']
403
- });
404
- this.image = this.blogPostTag?.image?.url ?? null;
405
- }
406
- openEditModal() {
407
- this.modalService.open(this.editModal, { centered: true, size: 'lg' });
408
- }
409
- openImageModal(modalRef) {
410
- this.imageModalRef = this.modalService.open(modalRef, { centered: true });
411
- }
412
- onImageSelected(base64) {
413
- this.image = base64;
414
- this.file = HelperService.convertBase64ToFile(base64);
415
- this.imageModalRef?.close();
416
- }
417
- onClose() {
418
- this.imageModalRef?.close();
419
- }
420
- removeImage() {
421
- this.image = null;
422
- }
423
- handleImageError(event) {
424
- event.target.src = this.defaultImage;
425
- }
426
- save() {
427
- this.buttonBusy = true;
428
- const payload = {
429
- title: this.form.value.title ?? this.blogPostTag?.title,
430
- description: this.form.value.description ?? this.blogPostTag?.description,
431
- meta_title: this.form.value.meta_title ?? this.blogPostTag?.meta_title,
432
- meta_description: this.form.value.meta_description ?? this.blogPostTag?.meta_description,
433
- tag_category_id: this.blogPostTag?.tag_category_id,
434
- tag_type: this.blogPostTag?.tag_type,
435
- subscription_id: this.subscriptionId,
436
- name: this.blogPostTag?.name
437
- };
438
- if (this.file) {
439
- payload['image'] = this.file;
440
- }
441
- else if (!this.image) {
442
- payload['remove_image'] = true;
443
- }
444
- this.tagService.updateTagById(this.blogPostTag?.id, payload).subscribe(() => {
445
- this.buttonBusy = false;
446
- this.toast.success('Tag Updated');
447
- this.getUpdatedTag.emit();
448
- this.modalService.dismissAll();
449
- this.cdr.markForCheck();
450
- });
451
- }
452
- 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 }); }
453
- 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" }] }); }
454
- }
455
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceTopBannerEditComponent, decorators: [{
456
- type: Component,
457
- 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" }]
458
- }], ctorParameters: () => [{ type: i5$2.FormBuilder }, { type: i2$1.NgbModal }, { type: i2.TagService }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }], propDecorators: { blogPostTag: [{
459
- type: Input
460
- }], user: [{
461
- type: Input
462
- }], userLoggedIn: [{
463
- type: Input
464
- }], getUpdatedTag: [{
465
- type: Output
466
- }], editModal: [{
467
- type: ViewChild,
468
- args: ['editModal']
469
- }], imageCropContent: [{
470
- type: ViewChild,
471
- args: ['imageCropContent']
472
- }] } });
473
-
474
- class ResourceNoteCardComponent extends AppBaseComponent {
475
- constructor(injector, resourceService, tagService, cdr) {
476
- super(injector);
477
- this.resourceService = resourceService;
478
- this.tagService = tagService;
479
- this.cdr = cdr;
480
- this.releaseHeader = false;
481
- this.isReleasePress = false;
482
- this.isResource = false;
483
- this.postSlice = false;
484
- this.canEditResourcesValue = false;
485
- this.isLoaded = false;
486
- this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;
487
- this.postTags = {};
488
- this.releasePosts = {};
489
- }
490
- ngOnInit() {
491
- if (this.userLoggedIn) {
492
- this.localStorage.getItem$('product').subscribe(res => {
493
- const data = res ? JSON.parse(res) : null;
494
- this.subscriptionId = data?.subscriptionId;
495
- this.cdr.markForCheck();
496
- });
497
- }
498
- this.getTags();
499
- }
500
- ngOnChanges(changes) {
501
- if (changes['user'] || changes['userLoggedIn']) {
502
- if (this.userLoggedIn && this.user) {
503
- this.updateCanEditResourcesValue();
504
- }
505
- }
506
- }
507
- getTags() {
508
- this.isLoaded = false;
509
- this.tagService
510
- .getAllTagCategories({ search: 'Release Notes' }, this.getEffectiveSubscriptionId())
511
- .subscribe(response => {
512
- this.tagCategory = response?.tag_categories?.[0];
513
- this.getPostTags();
514
- this.cdr.markForCheck();
515
- });
516
- }
517
- getPostTags() {
518
- this.tagService
519
- .getTagsByType('post_categories', {}, this.getEffectiveSubscriptionId())
520
- .subscribe(response => {
521
- this.postTags['product'] = this.findTag(response.tags, 'Product Release Notes', this.tagCategory?.id);
522
- this.postTags['press'] = this.findTag(response.tags, 'Press Release Notes', this.tagCategory?.id);
523
- if (this.postTags['product']?.id) {
524
- this.getProductReleasePosts(1, 100);
525
- }
526
- else {
527
- this.isLoaded = true;
528
- this.releasePosts['product'] = [];
529
- }
530
- if (this.postTags['press']?.id) {
531
- this.getPressReleasePosts(1, 100);
532
- }
533
- else {
534
- this.isLoaded = true;
535
- this.releasePosts['press'] = [];
536
- }
537
- this.cdr.markForCheck();
538
- });
539
- }
540
- findTag(tags, name, categoryId) {
541
- return tags.find(tag => tag.name === name && tag.tag_category_id === categoryId);
542
- }
543
- hasPressReleases() {
544
- return this.releasePosts['press']?.length !== 0 && this.isLoaded;
545
- }
546
- hasProductReleases() {
547
- return this.releasePosts['product']?.length !== 0 && this.isLoaded;
548
- }
549
- getProductReleasePosts(page, pageSize) {
550
- this.isLoaded = false;
551
- this.resourceService
552
- .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', '', this.postTags['product']?.id)
553
- .subscribe(response => {
554
- const sortedPosts = response.posts
555
- .filter(post => post.showcase === true)
556
- .sort((a, b) => new Date(b.published_at).getTime() - new Date(a.published_at).getTime());
557
- this.releasePosts['product'] = this.getProcessedPosts(sortedPosts);
558
- this.cdr.markForCheck();
559
- })
560
- .add(() => {
561
- this.isLoaded = true;
562
- this.cdr.markForCheck();
563
- });
564
- }
565
- getPressReleasePosts(page, pageSize) {
566
- this.isLoaded = false;
567
- this.resourceService
568
- .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', '', this.postTags['press']?.id)
569
- .subscribe(response => {
570
- const sortedPosts = response?.posts
571
- .filter(post => post.showcase === true)
572
- .sort((a, b) => new Date(b.published_at).getTime() - new Date(a.published_at).getTime());
573
- this.releasePosts['press'] = this.getProcessedPosts(sortedPosts);
574
- this.cdr.markForCheck();
575
- })
576
- .add(() => {
577
- this.isLoaded = true;
578
- this.cdr.markForCheck();
579
- });
580
- }
581
- getProcessedPosts(posts, sliceCount = 3) {
582
- const cloned = [...posts];
583
- return this.postSlice ? cloned.reverse() : cloned.slice(0, sliceCount).reverse();
584
- }
585
- toggleEditTitle() {
586
- this.isEditingTitle = true;
587
- this.editedTitle = this.postTags['product'].title;
588
- }
589
- toggleEditPressTitle() {
590
- this.isPressEditingTitle = true;
591
- this.editedTitle = this.postTags['press'].title;
592
- }
593
- saveEditedTitle(type) {
594
- HelperService.updateTagTitle(this.postTags[type], this.editedTitle, this.tagService, this.getEffectiveSubscriptionId(), this.toast).subscribe(() => {
595
- this.postTags[type].title = this.editedTitle;
596
- if (type === 'product') {
597
- this.isEditingTitle = false;
598
- }
599
- else {
600
- this.isPressEditingTitle = false;
601
- }
602
- this.cdr.markForCheck();
603
- });
604
- }
605
- /** Helper method to get effective subscription ID */
606
- getEffectiveSubscriptionId() {
607
- return HelperService.getEffectiveSubscriptionId(this.user, this.subscriptionId, this.masterSubscriptionId);
608
- }
609
- updateCanEditResourcesValue() {
610
- this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
611
- }
612
- canEditResources() {
613
- return this.canEditResourcesValue;
614
- }
615
- 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 }); }
616
- 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" }] }); }
617
- }
618
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceNoteCardComponent, decorators: [{
619
- type: Component,
620
- 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"] }]
621
- }], ctorParameters: () => [{ type: i0.Injector }, { type: ResourceService }, { type: i2.TagService }, { type: i0.ChangeDetectorRef }], propDecorators: { releaseHeader: [{
622
- type: Input
623
- }], categoryId: [{
624
- type: Input
625
- }], isReleasePress: [{
626
- type: Input
627
- }], isResource: [{
628
- type: Input
629
- }], postSlice: [{
630
- type: Input
631
- }], resourceTitle: [{
632
- type: Input
633
- }], tag: [{
634
- type: Input
635
- }], user: [{
636
- type: Input
637
- }], userLoggedIn: [{
638
- type: Input
639
- }] } });
640
-
641
- class CaseStudyCardComponent extends AppBaseComponent {
642
- constructor(injector, resourceService, tagService, cdr) {
643
- super(injector);
644
- this.resourceService = resourceService;
645
- this.tagService = tagService;
646
- this.cdr = cdr;
647
- this.showCaseStudyHeader = false;
648
- this.postSlice = false;
649
- this.canEditResourcesValue = false;
650
- this.isLoaded = false;
651
- this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;
652
- this.companyName = this.appConfig.company.name;
653
- this.posts = [];
654
- this.isEditingTitle = false;
655
- }
656
- ngOnInit() {
657
- if (this.userLoggedIn) {
658
- this.localStorage.getItem$('product').subscribe(res => {
659
- const data = res ? JSON.parse(res) : null;
660
- this.subscriptionId = data?.subscriptionId;
661
- this.cdr.markForCheck();
662
- });
663
- }
664
- this.getPosts(1, 10);
665
- }
666
- ngOnChanges(changes) {
667
- if (changes['user'] || changes['userLoggedIn']) {
668
- if (this.userLoggedIn && this.user) {
669
- this.updateCanEditResourcesValue();
670
- }
671
- }
672
- }
673
- getPosts(page, pageSize) {
674
- this.isLoaded = false;
675
- this.resourceService
676
- .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', this.categoryId)
677
- .subscribe(response => {
678
- const sortedPosts = (response.posts ?? [])
679
- .filter(post => post.showcase === true)
680
- .sort((a, b) => new Date(b.published_at).getTime() - new Date(a.published_at).getTime());
681
- this.posts = this.postSlice ? sortedPosts : [...sortedPosts].slice(0, 3);
682
- this.cdr.markForCheck();
683
- })
684
- .add(() => {
685
- this.isLoaded = true;
686
- this.cdr.markForCheck();
687
- });
688
- }
689
- toggleEditTitle() {
690
- this.isEditingTitle = true;
691
- this.editedTitle = this.resourceTitle;
692
- }
693
- saveEditedTitle() {
694
- HelperService.updateTagTitle(this.tag, this.editedTitle, this.tagService, this.getEffectiveSubscriptionId(), this.toast).subscribe(() => {
695
- this.resourceTitle = this.editedTitle;
696
- this.isEditingTitle = false;
697
- this.cdr.markForCheck();
698
- });
699
- }
700
- /** Helper method to get effective subscription ID */
701
- getEffectiveSubscriptionId() {
702
- return HelperService.getEffectiveSubscriptionId(this.user, this.subscriptionId, this.masterSubscriptionId);
703
- }
704
- updateCanEditResourcesValue() {
705
- this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
706
- }
707
- canEditResources() {
708
- return this.canEditResourcesValue;
709
- }
710
- trackByPostId(index, post) {
711
- return post.id;
712
- }
713
- 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 }); }
714
- 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 }); }
715
- }
716
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: CaseStudyCardComponent, decorators: [{
717
- type: Component,
718
- 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"] }]
719
- }], ctorParameters: () => [{ type: i0.Injector }, { type: ResourceService }, { type: i2.TagService }, { type: i0.ChangeDetectorRef }], propDecorators: { showCaseStudyHeader: [{
720
- type: Input
721
- }], categoryId: [{
722
- type: Input
723
- }], postSlice: [{
724
- type: Input
725
- }], tag: [{
726
- type: Input
727
- }], resourceTitle: [{
728
- type: Input
729
- }], user: [{
730
- type: Input
731
- }], userLoggedIn: [{
732
- type: Input
733
- }] } });
734
-
735
- class ResourceCardComponent extends AppBaseComponent {
736
- constructor(injector, resourceService, tagService, cdr) {
737
- super(injector);
738
- this.resourceService = resourceService;
739
- this.tagService = tagService;
740
- this.cdr = cdr;
741
- this.isHeaderVisible = true;
742
- this.isRelated = false;
743
- this.postSlice = false;
744
- this.isLoaded = false;
745
- this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;
746
- this.posts = [];
747
- this.canEditResourcesValue = false;
748
- }
749
- ngOnInit() {
750
- if (this.userLoggedIn) {
751
- this.localStorage.getItem$('product').subscribe(res => {
752
- const data = res ? JSON.parse(res) : null;
753
- this.subscriptionId = data?.subscriptionId;
754
- this.cdr.markForCheck();
755
- });
756
- }
757
- this.getPosts(1, 10);
758
- }
759
- ngOnChanges(changes) {
760
- if (changes['user'] || changes['userLoggedIn']) {
761
- if (this.userLoggedIn && this.user) {
762
- this.updateCanEditResourcesValue();
763
- }
764
- }
765
- }
766
- getPosts(page, pageSize) {
767
- this.isLoaded = false;
768
- this.resourceService
769
- .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', this.categoryId)
770
- .subscribe(response => {
771
- const sortedPosts = (response.posts ?? [])
772
- .filter(post => post.showcase === true)
773
- .sort((a, b) => new Date(b.published_at).getTime() - new Date(a.published_at).getTime());
774
- this.posts = this.postSlice ? sortedPosts : [...sortedPosts].slice(0, 3);
775
- this.cdr.markForCheck();
776
- })
777
- .add(() => {
778
- this.isLoaded = true;
779
- this.cdr.markForCheck();
780
- });
781
- }
782
- toggleTagEditTitle() {
783
- this.isEditingTitle = true;
784
- this.editedTitle = this.resourceTitle;
785
- }
786
- saveEditedTitle() {
787
- HelperService.updateTagTitle(this.tag, this.editedTitle, this.tagService, this.getEffectiveSubscriptionId(), this.toast).subscribe(() => {
788
- this.resourceTitle = this.editedTitle;
789
- this.isEditingTitle = false;
790
- this.cdr.markForCheck();
791
- });
792
- }
793
- /** Helper method to get effective subscription ID */
794
- getEffectiveSubscriptionId() {
795
- return HelperService.getEffectiveSubscriptionId(this.user, this.subscriptionId, this.masterSubscriptionId);
796
- }
797
- updateCanEditResourcesValue() {
798
- this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
799
- }
800
- canEditResources() {
801
- return this.canEditResourcesValue;
802
- }
803
- 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 }); }
804
- 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" }] }); }
805
- }
806
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceCardComponent, decorators: [{
807
- type: Component,
808
- 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"] }]
809
- }], ctorParameters: () => [{ type: i0.Injector }, { type: ResourceService }, { type: i2.TagService }, { type: i0.ChangeDetectorRef }], propDecorators: { categoryId: [{
810
- type: Input
811
- }], isHeaderVisible: [{
812
- type: Input
813
- }], isRelated: [{
814
- type: Input
815
- }], resourceTitle: [{
816
- type: Input
817
- }], postSlice: [{
818
- type: Input
819
- }], header: [{
820
- type: Input
821
- }], tag: [{
822
- type: Input
823
- }], resourceLink: [{
824
- type: Input
825
- }], user: [{
826
- type: Input
827
- }], userLoggedIn: [{
828
- type: Input
829
- }] } });
830
-
831
- class BaseResourceComponent extends AppBaseComponent {
832
- constructor(resourceService, tagService, authService, cdr, injector) {
833
- super(injector);
834
- this.resourceService = resourceService;
835
- this.tagService = tagService;
836
- this.authService = authService;
837
- this.cdr = cdr;
838
- this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;
839
- this.posts = [];
840
- this.testimonialsPosts = [];
841
- this.isLoaded = false;
842
- this.canEditResourcesValue = false;
843
- }
844
- ngOnInit() {
845
- this.getUserSubscriptionId().subscribe(response => {
846
- this.subscriptionId = response;
847
- this.cdr.markForCheck();
848
- });
849
- this.authService.getToken$().subscribe(res => {
850
- this.userLoggedIn = !!res;
851
- if (this.userLoggedIn) {
852
- this.localStorage.getItem$('product').subscribe(res => {
853
- const data = res ? JSON.parse(res) : null;
854
- this.subscriptionId = data?.subscriptionId;
855
- this.cdr.markForCheck();
856
- });
857
- this.userService.getUserInfo().subscribe(data => {
858
- this.user = data;
859
- this.updateCanEditResourcesValue();
860
- this.initializeComponent();
861
- this.cdr.markForCheck();
862
- });
863
- }
864
- else {
865
- this.initializeComponent();
866
- }
867
- this.cdr.markForCheck();
868
- });
869
- }
870
- initializeComponent() {
871
- if (this.shouldUseTagCategories()) {
872
- this.getTags();
873
- }
874
- else {
875
- this.getPostTags();
876
- }
877
- if (this.shouldLoadTestimonials()) {
878
- this.getTestimonialTags();
879
- }
880
- }
881
- getTags() {
882
- this.isLoaded = false;
883
- this.tagService
884
- .getAllTagCategories({ search: this.getSearchTerm() }, this.getEffectiveSubscriptionId())
885
- .subscribe(response => {
886
- this.tagCategory = response?.tag_categories?.[0];
887
- this.getPostTags();
888
- this.cdr.markForCheck();
889
- });
890
- }
891
- getPostTags() {
892
- this.tagService
893
- .getTagsByType('post_categories', {}, this.getEffectiveSubscriptionId())
894
- .subscribe(response => {
895
- if (this.shouldUseTagCategories()) {
896
- this.blogPostTag = response.tags.find(tag => tag.tag_category_id === this.tagCategory?.id);
897
- }
898
- else {
899
- this.blogPostTag = response.tags.find(tag => tag.name === this.getResourceType());
900
- }
901
- this.getPosts(1, 100);
902
- this.cdr.markForCheck();
903
- })
904
- .add(() => {
905
- this.isLoaded = true;
906
- this.cdr.markForCheck();
907
- });
908
- }
909
- getTestimonialTags() {
910
- this.tagService
911
- .getTagsByType('post_categories', {}, this.getEffectiveSubscriptionId())
912
- .subscribe(response => {
913
- this.blogTestimonialsPostTag = response.tags.find(tag => tag.name === 'Testimonials');
914
- this.getTestimonialsPosts(1, 100);
915
- this.cdr.markForCheck();
916
- });
917
- }
918
- getPosts(page, pageSize) {
919
- this.fetchPosts(page, pageSize, this.blogPostTag?.tag_category_id, 'posts');
920
- }
921
- getTestimonialsPosts(page, pageSize) {
922
- this.fetchPosts(page, pageSize, this.blogTestimonialsPostTag?.tag_category_id, 'testimonialsPosts');
923
- }
924
- /** Shared method to fetch posts with common filtering, sorting, and slicing logic */
925
- fetchPosts(page, pageSize, tagCategoryId, targetProperty) {
926
- this.resourceService
927
- .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', tagCategoryId)
928
- .subscribe(response => {
929
- const filteredPosts = response.posts
930
- .filter(post => post.tags?.some(tag => tag.tag_category_id === tagCategoryId))
931
- .sort((a, b) => new Date(b.published_at).getTime() - new Date(a.published_at).getTime())
932
- .slice(0, 12);
933
- if (targetProperty === 'posts') {
934
- this.posts = filteredPosts;
935
- }
936
- else {
937
- this.testimonialsPosts = filteredPosts;
938
- }
939
- this.cdr.markForCheck();
940
- });
941
- }
942
- /** Helper method to get effective subscription ID */
943
- getEffectiveSubscriptionId() {
944
- return HelperService.getEffectiveSubscriptionId(this.user, this.subscriptionId, this.masterSubscriptionId);
945
- }
946
- // Optional methods that can be overridden
947
- getSearchTerm() {
948
- return this.getResourceType();
949
- }
950
- shouldUseTagCategories() {
951
- return false;
952
- }
953
- shouldLoadTestimonials() {
954
- return false;
955
- }
956
- updateCanEditResourcesValue() {
957
- if (this.userLoggedIn && this.user) {
958
- this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
959
- }
960
- else {
961
- this.canEditResourcesValue = false;
962
- }
963
- }
964
- canEditResources() {
965
- return this.canEditResourcesValue;
966
- }
967
- 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 }); }
968
- 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 }); }
969
- }
970
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: BaseResourceComponent, decorators: [{
971
- type: Component,
972
- args: [{
973
- template: '',
974
- standalone: false
975
- }]
976
- }], ctorParameters: () => [{ type: ResourceService }, { type: i2.TagService }, { type: i2.AuthService }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }] });
977
-
978
- class ResourceVaultComponent extends BaseResourceComponent {
979
- constructor(resourceService, tagService, authService, cdr, injector) {
980
- super(resourceService, tagService, authService, cdr, injector);
981
- this.showVaultSection = false;
982
- this.postSlice = false;
983
- this.isLoadedChange = new EventEmitter();
984
- this.isEditingTitle = false;
985
- }
986
- ngOnInit() {
987
- super.ngOnInit();
988
- this.getPosts(1, 10);
989
- }
990
- getResourceType() {
991
- return 'Vault';
992
- }
993
- getPosts(page, pageSize) {
994
- this.isLoaded = false;
995
- this.resourceService
996
- .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', this.categoryId)
997
- .subscribe(response => {
998
- const sortedPosts = (response.posts ?? [])
999
- .filter(post => post.showcase === true)
1000
- .sort((a, b) => new Date(b.published_at).getTime() - new Date(a.published_at).getTime());
1001
- this.posts = this.postSlice ? sortedPosts : [...sortedPosts].slice(0, 3);
1002
- this.cdr.markForCheck();
1003
- })
1004
- .add(() => {
1005
- this.isLoaded = true;
1006
- this.isLoadedChange.emit(this.isLoaded);
1007
- this.cdr.markForCheck();
1008
- });
1009
- }
1010
- toggleEditTitle() {
1011
- this.isEditingTitle = true;
1012
- this.editedTitle = this.resourceTitle;
1013
- }
1014
- saveEditedTitle() {
1015
- HelperService.updateTagTitle(this.tag, this.editedTitle, this.tagService, this.getEffectiveSubscriptionId(), this.toast).subscribe(() => {
1016
- this.resourceTitle = this.editedTitle;
1017
- this.isEditingTitle = false;
1018
- this.cdr.markForCheck();
1019
- });
1020
- }
1021
- 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 }); }
1022
- 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" }] }); }
1023
- }
1024
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceVaultComponent, decorators: [{
1025
- type: Component,
1026
- 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"] }]
1027
- }], ctorParameters: () => [{ type: ResourceService }, { type: i2.TagService }, { type: i2.AuthService }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }], propDecorators: { showVaultSection: [{
1028
- type: Input
1029
- }], postSlice: [{
1030
- type: Input
1031
- }], categoryId: [{
1032
- type: Input
1033
- }], resourceTitle: [{
1034
- type: Input
1035
- }], tag: [{
1036
- type: Input
1037
- }], isLoadedChange: [{
1038
- type: Output
1039
- }] } });
1040
-
1041
- class ResourceVideoCardComponent extends AppBaseComponent {
1042
- constructor(sanitizer, resourceService, tagService, cdr, injector) {
1043
- super(injector);
1044
- this.sanitizer = sanitizer;
1045
- this.resourceService = resourceService;
1046
- this.tagService = tagService;
1047
- this.cdr = cdr;
1048
- this.showVideoSection = false;
1049
- this.postSlice = false;
1050
- this.canEditResourcesValue = false;
1051
- this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;
1052
- this.posts = [];
1053
- this.isLoaded = false;
1054
- this.videoStates = {};
1055
- this.isEditingTitle = false;
1056
- }
1057
- ngOnInit() {
1058
- if (this.userLoggedIn) {
1059
- this.localStorage.getItem$('product').subscribe(res => {
1060
- const data = res ? JSON.parse(res) : null;
1061
- this.subscriptionId = data?.subscriptionId;
1062
- this.cdr.markForCheck();
1063
- });
1064
- }
1065
- this.getPosts(1, 10);
1066
- }
1067
- ngOnChanges(changes) {
1068
- if (changes['user'] || changes['userLoggedIn']) {
1069
- if (this.userLoggedIn && this.user) {
1070
- this.updateCanEditResourcesValue();
1071
- }
1072
- }
1073
- }
1074
- loadVideo(post) {
1075
- if (!post.external_url)
1076
- return;
1077
- const slug = post.slug;
1078
- let externalUrl = post.external_url;
1079
- // Append autoplay only when clicked
1080
- externalUrl += externalUrl.includes('?') ? '&autoplay=1' : '?autoplay=1';
1081
- // baseUrl is a trusted internal source (e.g. YouTube embed URL)
1082
- this.videoStates[slug].url = this.sanitizer.bypassSecurityTrustResourceUrl(externalUrl); //NOSONAR
1083
- }
1084
- getPosts(page, pageSize) {
1085
- this.isLoaded = false;
1086
- this.resourceService
1087
- .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', this.categoryId)
1088
- .subscribe(response => {
1089
- const sortedPosts = (response.posts ?? [])
1090
- .filter(post => post.showcase === true)
1091
- .sort((a, b) => new Date(b.published_at).getTime() - new Date(a.published_at).getTime());
1092
- this.posts = this.postSlice ? sortedPosts : [...sortedPosts].slice(0, 3);
1093
- this.posts.forEach(post => {
1094
- if (post.external_url) {
1095
- this.videoStates[post.slug] = {
1096
- loaded: true,
1097
- // baseUrl is a trusted internal source (e.g. YouTube embed URL)
1098
- url: this.sanitizer.bypassSecurityTrustResourceUrl(post.external_url) //NOSONAR
1099
- };
1100
- }
1101
- });
1102
- this.cdr.markForCheck();
1103
- })
1104
- .add(() => {
1105
- this.isLoaded = true;
1106
- this.cdr.markForCheck();
1107
- });
1108
- }
1109
- toggleTagEditTitle() {
1110
- this.isEditingTitle = true;
1111
- this.editedTitle = this.resourceTitle;
1112
- }
1113
- saveEditedTitle() {
1114
- HelperService.updateTagTitle(this.tag, this.editedTitle, this.tagService, this.getEffectiveSubscriptionId(), this.toast).subscribe(() => {
1115
- this.resourceTitle = this.editedTitle;
1116
- this.isEditingTitle = false;
1117
- this.cdr.markForCheck();
1118
- });
1119
- }
1120
- /** Helper method to get effective subscription ID */
1121
- getEffectiveSubscriptionId() {
1122
- return HelperService.getEffectiveSubscriptionId(this.user, this.subscriptionId, this.masterSubscriptionId);
1123
- }
1124
- updateCanEditResourcesValue() {
1125
- this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
1126
- }
1127
- canEditResources() {
1128
- return this.canEditResourcesValue;
1129
- }
1130
- trackByPostId(index, post) {
1131
- return post.id;
1132
- }
1133
- 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 }); }
1134
- 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 }); }
1135
- }
1136
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceVideoCardComponent, decorators: [{
1137
- type: Component,
1138
- 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"] }]
1139
- }], ctorParameters: () => [{ type: i3$1.DomSanitizer }, { type: ResourceService }, { type: i2.TagService }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }], propDecorators: { showVideoSection: [{
1140
- type: Input
1141
- }], categoryId: [{
1142
- type: Input
1143
- }], tag: [{
1144
- type: Input
1145
- }], postSlice: [{
1146
- type: Input
1147
- }], resourceTitle: [{
1148
- type: Input
1149
- }], user: [{
1150
- type: Input
1151
- }], userLoggedIn: [{
1152
- type: Input
1153
- }] } });
1154
-
1155
- class UpcomingEventCardComponent extends AppBaseComponent {
1156
- constructor(resourceService, tagService, cdr, injector) {
1157
- super(injector);
1158
- this.resourceService = resourceService;
1159
- this.tagService = tagService;
1160
- this.cdr = cdr;
1161
- this.showEventContent = false;
1162
- this.postSlice = false;
1163
- this.canEditResourcesValue = false;
1164
- this.now = new Date().getTime();
1165
- this.isEditingTitle = false;
1166
- this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;
1167
- this.posts = [];
1168
- this.isLoaded = false;
1169
- }
1170
- ngOnInit() {
1171
- if (this.userLoggedIn) {
1172
- this.localStorage.getItem$('product').subscribe(res => {
1173
- const data = res ? JSON.parse(res) : null;
1174
- this.subscriptionId = data?.subscriptionId;
1175
- this.cdr.markForCheck();
1176
- });
1177
- this.getPostTags();
1178
- }
1179
- else {
1180
- this.getPostTags();
1181
- }
1182
- }
1183
- ngOnChanges(changes) {
1184
- if (changes['user'] || changes['userLoggedIn']) {
1185
- if (this.userLoggedIn && this.user) {
1186
- this.updateCanEditResourcesValue();
1187
- }
1188
- }
1189
- }
1190
- getPostTags() {
1191
- this.tagService
1192
- .getTagsByType('post_categories', {}, this.getEffectiveSubscriptionId())
1193
- .subscribe(response => {
1194
- this.blogPostTag = response.tags.find(tag => tag.name === 'Events');
1195
- if (this.blogPostTag?.tag_category_id) {
1196
- if (this.postSlice) {
1197
- this.getPosts(1, 100);
1198
- }
1199
- else {
1200
- this.getAllPosts(1, 100);
1201
- }
1202
- }
1203
- else {
1204
- this.isLoaded = true;
1205
- this.cdr.markForCheck();
1206
- }
1207
- this.cdr.markForCheck();
1208
- });
1209
- }
1210
- getPosts(page, pageSize) {
1211
- this.isLoaded = false;
1212
- this.resourceService
1213
- .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', this.categoryId ?? this.blogPostTag?.tag_category_id)
1214
- .subscribe(response => {
1215
- const sortedPosts = (response.posts ?? [])
1216
- .filter(post => post.showcase === true && new Date(post?.when).getTime() > this.now)
1217
- .sort((a, b) => new Date(b.published_at).getTime() - new Date(a.published_at).getTime());
1218
- this.posts = sortedPosts;
1219
- this.cdr.markForCheck();
1220
- })
1221
- .add(() => {
1222
- this.isLoaded = true;
1223
- this.cdr.markForCheck();
1224
- });
1225
- }
1226
- isUpcoming(post) {
1227
- return new Date(post?.when).getTime() > this.now;
1228
- }
1229
- getAllPosts(page, pageSize) {
1230
- this.isLoaded = false;
1231
- this.resourceService
1232
- .getPublicPosts(this.getEffectiveSubscriptionId(), page, pageSize, '', this.categoryId ?? this.blogPostTag?.tag_category_id)
1233
- .subscribe(response => {
1234
- const sortedPosts = (response.posts ?? [])
1235
- .filter(post => post.showcase === true)
1236
- .sort((a, b) => new Date(b.when).getTime() - new Date(a.when).getTime());
1237
- this.posts = [...sortedPosts].slice(0, 3).reverse();
1238
- this.cdr.markForCheck();
1239
- })
1240
- .add(() => {
1241
- this.isLoaded = true;
1242
- this.cdr.markForCheck();
1243
- });
1244
- }
1245
- toggleEditTitle() {
1246
- this.isEditingTitle = true;
1247
- this.editedTitle = this.resourceTitle;
1248
- }
1249
- saveEditedTitle() {
1250
- HelperService.updateTagTitle(this.tag, this.editedTitle, this.tagService, this.getEffectiveSubscriptionId(), this.toast).subscribe(() => {
1251
- this.resourceTitle = this.editedTitle;
1252
- this.isEditingTitle = false;
1253
- this.cdr.markForCheck();
1254
- });
1255
- }
1256
- /** Helper method to get effective subscription ID */
1257
- getEffectiveSubscriptionId() {
1258
- return HelperService.getEffectiveSubscriptionId(this.user, this.subscriptionId, this.masterSubscriptionId);
1259
- }
1260
- updateCanEditResourcesValue() {
1261
- this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
1262
- }
1263
- canEditResources() {
1264
- return this.canEditResourcesValue;
1265
- }
1266
- trackByPostId(index, post) {
1267
- return post.id;
1268
- }
1269
- 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 }); }
1270
- 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 }); }
1271
- }
1272
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: UpcomingEventCardComponent, decorators: [{
1273
- type: Component,
1274
- 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"] }]
1275
- }], ctorParameters: () => [{ type: ResourceService }, { type: i2.TagService }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }], propDecorators: { showEventContent: [{
1276
- type: Input
1277
- }], categoryId: [{
1278
- type: Input
1279
- }], tag: [{
1280
- type: Input
1281
- }], postSlice: [{
1282
- type: Input
1283
- }], resourceTitle: [{
1284
- type: Input
1285
- }], user: [{
1286
- type: Input
1287
- }], userLoggedIn: [{
1288
- type: Input
1289
- }] } });
1290
-
1291
- /**
1292
- * Module containing resource card components (lightweight version)
1293
- * ResourceEditCard is lazy-loaded on demand to save 145 KB
1294
- * Trial4ContactUs moved to separate module for better tree-shaking
1295
- * Used by both ResourceRootModule and ResourceSharedModule
1296
- */
1297
- class ResourceCardsModule {
1298
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceCardsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1299
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.6", ngImport: i0, type: ResourceCardsModule, declarations: [ResourceVideoCardComponent,
1300
- UpcomingEventCardComponent,
1301
- ResourceCardComponent,
1302
- CaseStudyCardComponent,
1303
- ResourceNoteCardComponent,
1304
- ResourceVaultComponent,
1305
- ResourceEditCardLazyComponent], imports: [CommonModule,
1306
- RouterModule,
1307
- FormsModule,
1308
- ReactiveFormsModule,
1309
- PipesModule,
1310
- PaginatorModule,
1311
- SelectModule,
1312
- ResourceSharedComponentsModule,
1313
- CoreTranslocoModule,
1314
- TranslocoModule,
1315
- DirectivesModule,
1316
- DragDropModule,
1317
- NgxCaptchaModule,
1318
- Trial4ContactUsModule // ✅ Import standalone module
1319
- ], exports: [ResourceVideoCardComponent,
1320
- UpcomingEventCardComponent,
1321
- ResourceCardComponent,
1322
- CaseStudyCardComponent,
1323
- ResourceNoteCardComponent,
1324
- ResourceVaultComponent,
1325
- Trial4ContactUsModule, // ✅ Re-export for backward compatibility
1326
- ResourceEditCardLazyComponent,
1327
- PaginatorModule // Export PaginatorModule so ResourceCompanyCardComponent can use p-paginator
1328
- ] }); }
1329
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceCardsModule, imports: [CommonModule,
1330
- RouterModule,
1331
- FormsModule,
1332
- ReactiveFormsModule,
1333
- PipesModule,
1334
- PaginatorModule,
1335
- SelectModule,
1336
- ResourceSharedComponentsModule,
1337
- CoreTranslocoModule,
1338
- TranslocoModule,
1339
- DirectivesModule,
1340
- DragDropModule,
1341
- NgxCaptchaModule,
1342
- Trial4ContactUsModule // ✅ Import standalone module
1343
- , Trial4ContactUsModule,
1344
- PaginatorModule // Export PaginatorModule so ResourceCompanyCardComponent can use p-paginator
1345
- ] }); }
1346
- }
1347
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceCardsModule, decorators: [{
1348
- type: NgModule,
1349
- args: [{
1350
- declarations: [
1351
- ResourceVideoCardComponent,
1352
- UpcomingEventCardComponent,
1353
- ResourceCardComponent,
1354
- CaseStudyCardComponent,
1355
- ResourceNoteCardComponent,
1356
- ResourceVaultComponent,
1357
- ResourceEditCardLazyComponent
1358
- ],
1359
- imports: [
1360
- CommonModule,
1361
- RouterModule,
1362
- FormsModule,
1363
- ReactiveFormsModule,
1364
- PipesModule,
1365
- PaginatorModule,
1366
- SelectModule,
1367
- ResourceSharedComponentsModule,
1368
- CoreTranslocoModule,
1369
- TranslocoModule,
1370
- DirectivesModule,
1371
- DragDropModule,
1372
- NgxCaptchaModule,
1373
- Trial4ContactUsModule // ✅ Import standalone module
1374
- ],
1375
- exports: [
1376
- ResourceVideoCardComponent,
1377
- UpcomingEventCardComponent,
1378
- ResourceCardComponent,
1379
- CaseStudyCardComponent,
1380
- ResourceNoteCardComponent,
1381
- ResourceVaultComponent,
1382
- Trial4ContactUsModule, // ✅ Re-export for backward compatibility
1383
- ResourceEditCardLazyComponent,
1384
- PaginatorModule // Export PaginatorModule so ResourceCompanyCardComponent can use p-paginator
1385
- ],
1386
- schemas: [CUSTOM_ELEMENTS_SCHEMA]
1387
- }]
1388
- }] });
1389
-
1390
- // Shared components used across multiple resource routes
1391
- // Note: Most heavy modules (Quill, Calendar, UiSwitch, etc.) are now in ResourceCardsModule
1392
- class ResourceSharedModule {
1393
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1394
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.6", ngImport: i0, type: ResourceSharedModule, declarations: [ResourceCompanyCardComponent, ResourceTopBannerEditComponent], imports: [CommonModule,
1395
- RouterModule,
1396
- FormsModule,
1397
- ReactiveFormsModule,
1398
- PipesModule,
1399
- ResourceSharedComponentsModule,
1400
- CoreTranslocoModule,
1401
- TranslocoModule,
1402
- DirectivesModule,
1403
- InputTextModule,
1404
- IconFieldModule,
1405
- InputIconModule,
1406
- TextareaModule,
1407
- ResourceCardsModule,
1408
- HubSpotMeetingsSharedModule // For pw-book-a-demo component (HubSpotMeetingsComponent)
1409
- ], exports: [
1410
- // Export the 2 components specific to this module
1411
- ResourceCompanyCardComponent,
1412
- ResourceTopBannerEditComponent,
1413
- // Export card components module (includes all heavy modules + card components)
1414
- ResourceCardsModule,
1415
- // Export HubSpotMeetingsSharedModule to make pw-book-a-demo component available
1416
- HubSpotMeetingsSharedModule,
1417
- // Export common lightweight modules
1418
- CommonModule,
1419
- RouterModule,
1420
- FormsModule,
1421
- ReactiveFormsModule,
1422
- PipesModule,
1423
- ResourceSharedComponentsModule,
1424
- CoreTranslocoModule,
1425
- TranslocoModule,
1426
- DirectivesModule,
1427
- InputTextModule,
1428
- IconFieldModule,
1429
- InputIconModule,
1430
- TextareaModule] }); }
1431
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceSharedModule, imports: [CommonModule,
1432
- RouterModule,
1433
- FormsModule,
1434
- ReactiveFormsModule,
1435
- PipesModule,
1436
- ResourceSharedComponentsModule,
1437
- CoreTranslocoModule,
1438
- TranslocoModule,
1439
- DirectivesModule,
1440
- InputTextModule,
1441
- IconFieldModule,
1442
- InputIconModule,
1443
- TextareaModule,
1444
- ResourceCardsModule,
1445
- HubSpotMeetingsSharedModule // For pw-book-a-demo component (HubSpotMeetingsComponent)
1446
- ,
1447
- // Export card components module (includes all heavy modules + card components)
1448
- ResourceCardsModule,
1449
- // Export HubSpotMeetingsSharedModule to make pw-book-a-demo component available
1450
- HubSpotMeetingsSharedModule,
1451
- // Export common lightweight modules
1452
- CommonModule,
1453
- RouterModule,
1454
- FormsModule,
1455
- ReactiveFormsModule,
1456
- PipesModule,
1457
- ResourceSharedComponentsModule,
1458
- CoreTranslocoModule,
1459
- TranslocoModule,
1460
- DirectivesModule,
1461
- InputTextModule,
1462
- IconFieldModule,
1463
- InputIconModule,
1464
- TextareaModule] }); }
1465
- }
1466
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceSharedModule, decorators: [{
1467
- type: NgModule,
1468
- args: [{
1469
- declarations: [ResourceCompanyCardComponent, ResourceTopBannerEditComponent],
1470
- imports: [
1471
- CommonModule,
1472
- RouterModule,
1473
- FormsModule,
1474
- ReactiveFormsModule,
1475
- PipesModule,
1476
- ResourceSharedComponentsModule,
1477
- CoreTranslocoModule,
1478
- TranslocoModule,
1479
- DirectivesModule,
1480
- InputTextModule,
1481
- IconFieldModule,
1482
- InputIconModule,
1483
- TextareaModule,
1484
- ResourceCardsModule,
1485
- HubSpotMeetingsSharedModule // For pw-book-a-demo component (HubSpotMeetingsComponent)
1486
- ],
1487
- exports: [
1488
- // Export the 2 components specific to this module
1489
- ResourceCompanyCardComponent,
1490
- ResourceTopBannerEditComponent,
1491
- // Export card components module (includes all heavy modules + card components)
1492
- ResourceCardsModule,
1493
- // Export HubSpotMeetingsSharedModule to make pw-book-a-demo component available
1494
- HubSpotMeetingsSharedModule,
1495
- // Export common lightweight modules
1496
- CommonModule,
1497
- RouterModule,
1498
- FormsModule,
1499
- ReactiveFormsModule,
1500
- PipesModule,
1501
- ResourceSharedComponentsModule,
1502
- CoreTranslocoModule,
1503
- TranslocoModule,
1504
- DirectivesModule,
1505
- InputTextModule,
1506
- IconFieldModule,
1507
- InputIconModule,
1508
- TextareaModule
1509
- ],
1510
- schemas: [CUSTOM_ELEMENTS_SCHEMA]
1511
- }]
1512
- }] });
1513
-
1514
- class ResourceEditCardComponent extends AppBaseComponent {
1515
- constructor(fb, modalService, resourceService, authService, tagService, cdr, injector) {
1516
- super(injector);
1517
- this.fb = fb;
1518
- this.modalService = modalService;
1519
- this.resourceService = resourceService;
1520
- this.authService = authService;
1521
- this.tagService = tagService;
1522
- this.cdr = cdr;
1523
- this.updated = new EventEmitter();
1524
- this.image = '';
1525
- this.rectangularImage = '';
1526
- this.file = null;
1527
- this.rectangularFile = null;
1528
- this.selectedTags = [];
1529
- this.allTags = [];
1530
- this.tagsSuggestion = [];
1531
- this.buttonBusy = false;
1532
- this.editForm = this.fb.group({
1533
- title: [''],
1534
- external_url: [''],
1535
- cta_text: [''],
1536
- when: [''],
1537
- showcase: [false],
1538
- published_at: [false],
1539
- accepted_at: [false],
1540
- body: ['']
1541
- });
1542
- }
1543
- ngOnInit() {
1544
- this.authService.getToken$().subscribe(res => {
1545
- this.userLoggedIn = !!res;
1546
- if (this.userLoggedIn) {
1547
- this.localStorage.getItem$('product').subscribe(res => {
1548
- const data = res ? JSON.parse(res) : null;
1549
- this.subscriptionId = data?.subscriptionId;
1550
- this.cdr.markForCheck();
1551
- });
1552
- }
1553
- this.cdr.markForCheck();
1554
- });
1555
- }
1556
- navigateToResourceEdit() {
1557
- const basePath = `/admin/resources/${this.resourceData?.slug}`;
1558
- const fullUrl = `${location.origin}${basePath}`;
1559
- window.open(fullUrl, '_blank');
1560
- }
1561
- openModal(modalTemplate) {
1562
- if (this.resourceData) {
1563
- const when = this.resourceData.when ? new Date(this.resourceData.when) : null;
1564
- this.editForm.setValue({
1565
- title: this.resourceData.title ?? '',
1566
- external_url: this.resourceData.external_url ?? '',
1567
- cta_text: this.resourceData.cta_text ?? '',
1568
- when: when ?? '',
1569
- showcase: !!this.resourceData.showcase,
1570
- published_at: !!this.resourceData.published_at,
1571
- accepted_at: !!this.resourceData.accepted_at,
1572
- body: this.resourceData.body
1573
- });
1574
- this.image = this.resourceData.picture?.url ?? '';
1575
- this.selectedTags = this.resourceData?.tags?.length ? [...this.resourceData.tags] : [];
1576
- this.rectangularImage = this.resourceData.rectangular_picture?.url ?? '';
1577
- }
1578
- this.modalService.open(modalTemplate, { centered: true, size: 'lg' });
1579
- this.getPostTags();
1580
- }
1581
- search(event) {
1582
- let values = [];
1583
- if (event.query) {
1584
- values = this.allTags.filter(x => x.name.toLowerCase().includes(event.query.toLowerCase()));
1585
- }
1586
- else {
1587
- this.allTags.forEach(element => {
1588
- values.push(element);
1589
- });
1590
- }
1591
- this.tagsSuggestion = values;
1592
- }
1593
- getPostTags() {
1594
- this.tagService
1595
- .getTagsByType('post_categories', {}, this.subscriptionId)
1596
- .subscribe(response => {
1597
- this.allTags = response.tags;
1598
- this.cdr.markForCheck();
1599
- });
1600
- }
1601
- deleteRectangularImage() {
1602
- this.rectangularImage = null;
1603
- this.rectangularFile = null;
1604
- }
1605
- openImageModal(modalTemplate) {
1606
- this.imageModalRef = this.modalService.open(modalTemplate, { centered: true, size: 'md' });
1607
- }
1608
- onImageSelected(base64) {
1609
- this.image = base64;
1610
- this.file = HelperService.convertBase64ToFile(base64);
1611
- this.imageModalRef?.close();
1612
- }
1613
- onRectangularImageSelection(base64) {
1614
- this.rectangularImage = base64;
1615
- this.rectangularFile = HelperService.convertBase64ToFile(base64);
1616
- this.imageModalRef?.close();
1617
- }
1618
- removeImage() {
1619
- this.image = null;
1620
- this.file = null;
1621
- }
1622
- saveResource() {
1623
- this.buttonBusy = true;
1624
- this.saveTags(this.id);
1625
- const payload = {
1626
- ...this.editForm.value,
1627
- subscription_id: this.subscriptionId
1628
- };
1629
- this.handlePicture(payload);
1630
- this.handlePublishedAt(payload);
1631
- this.handleAcceptedAt(payload);
1632
- this.handleAcceptedAt(payload);
1633
- this.handleOptionalFields(payload);
1634
- this.handleRectangularPicture(payload);
1635
- this.handleRemovals(payload);
1636
- this.resourceService.updatePost(payload, this.id).subscribe({
1637
- next: () => {
1638
- // NG0100: Toastr + dismissAll can run CD in the same macrotask as clearing [buttonBusy].
1639
- // Clear busy in one task; toast/emit/modal in the next so dev-mode "verify" sees a stable binding.
1640
- setTimeout(() => {
1641
- this.buttonBusy = false;
1642
- this.cdr.markForCheck();
1643
- setTimeout(() => {
1644
- this.toast.success('Blog Post Updated');
1645
- this.updated.emit();
1646
- this.modalService.dismissAll();
1647
- this.cdr.markForCheck();
1648
- }, 0);
1649
- }, 0);
1650
- },
1651
- error: () => {
1652
- setTimeout(() => {
1653
- this.buttonBusy = false;
1654
- this.cdr.markForCheck();
1655
- }, 0);
1656
- }
1657
- });
1658
- }
1659
- saveTags(id) {
1660
- if (this.selectedTags.length) {
1661
- const data = {
1662
- entity_tags: this.selectedTags.map(tag => ({ tag_id: tag.id })),
1663
- slug: id,
1664
- tag_entity: 'Post' // or use TAG_ENTITY.POST if you imported it
1665
- };
1666
- this.tagService.addTags(data, this.subscriptionId).subscribe(() => {
1667
- this.cdr.markForCheck();
1668
- });
1669
- }
1670
- }
1671
- handlePicture(data) {
1672
- if (this.file) {
1673
- data.picture = this.file;
1674
- }
1675
- else {
1676
- delete data.picture;
1677
- }
1678
- }
1679
- handlePublishedAt(data) {
1680
- const control = this.editForm.get('published_at');
1681
- if (control?.dirty) {
1682
- data.published_at = control.value ? moment().format('DD-MMM-YYYY') : '';
1683
- }
1684
- else {
1685
- delete data.published_at;
1686
- }
1687
- }
1688
- handleAcceptedAt(data) {
1689
- const control = this.editForm.get('accepted_at');
1690
- if (control?.dirty) {
1691
- data.accepted_at = control.value ? moment().format('DD-MMM-YYYY') : '';
1692
- }
1693
- else {
1694
- delete data.accepted_at;
1695
- }
1696
- }
1697
- handleOptionalFields(data) {
1698
- if (!this.editForm.get('when')?.value) {
1699
- data.when = '';
1700
- }
1701
- if (!this.editForm.get('showcase')?.value) {
1702
- data.showcase = '';
1703
- }
1704
- }
1705
- handleRectangularPicture(data) {
1706
- if (this.rectangularFile) {
1707
- data.rectangular_picture = this.rectangularFile;
1708
- }
1709
- else {
1710
- delete data.rectangular_picture;
1711
- }
1712
- }
1713
- handleRemovals(data) {
1714
- if (!this.file && !this.image) {
1715
- data.remove_picture = true;
1716
- }
1717
- if (!this.rectangularFile && !this.rectangularImage) {
1718
- data.remove_rectangular_picture = true;
1719
- }
1720
- }
1721
- openRectModal(content) {
1722
- this.imageModalRef = this.modalService.open(content, {
1723
- centered: true,
1724
- windowClass: 'modal-holder'
1725
- });
1726
- }
1727
- handleImageError(event, fallbackPath) {
1728
- HelperService.handleImageFallbackPath(event, fallbackPath);
1729
- }
1730
- 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 }); }
1731
- 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 appendTo=\"body\" [(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" }] }); }
1732
- }
1733
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceEditCardComponent, decorators: [{
1734
- type: Component,
1735
- 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 appendTo=\"body\" [(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"] }]
1736
- }], 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: [{
1737
- type: Input
1738
- }], resourceData: [{
1739
- type: Input
1740
- }], updated: [{
1741
- type: Output
1742
- }] } });
1743
-
1744
- var resourceEditCard_component = /*#__PURE__*/Object.freeze({
1745
- __proto__: null,
1746
- ResourceEditCardComponent: ResourceEditCardComponent
1747
- });
1748
-
1749
- /**
1750
- * Lazy-loadable module for ResourceEditCard
1751
- * Contains heavy dependencies (Quill, Calendar, etc.) that are only needed for admins
1752
- * This module is dynamically imported when edit button is clicked
1753
- */
1754
- class ResourceEditModule {
1755
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceEditModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1756
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.6", ngImport: i0, type: ResourceEditModule, declarations: [ResourceEditCardComponent], imports: [CommonModule,
1757
- FormsModule,
1758
- ReactiveFormsModule,
1759
- DatePickerModule,
1760
- AutoCompleteModule,
1761
- ResourceSharedComponentsModule,
1762
- CoreTranslocoModule,
1763
- TranslocoModule,
1764
- DirectivesModule, i11.QuillModule, UiSwitchModule], exports: [ResourceEditCardComponent] }); }
1765
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceEditModule, imports: [CommonModule,
1766
- FormsModule,
1767
- ReactiveFormsModule,
1768
- DatePickerModule,
1769
- AutoCompleteModule,
1770
- ResourceSharedComponentsModule,
1771
- CoreTranslocoModule,
1772
- TranslocoModule,
1773
- DirectivesModule,
1774
- QuillModule.forRoot(),
1775
- UiSwitchModule] }); }
1776
- }
1777
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ResourceEditModule, decorators: [{
1778
- type: NgModule,
1779
- args: [{
1780
- declarations: [ResourceEditCardComponent],
1781
- imports: [
1782
- CommonModule,
1783
- FormsModule,
1784
- ReactiveFormsModule,
1785
- DatePickerModule,
1786
- AutoCompleteModule,
1787
- ResourceSharedComponentsModule,
1788
- CoreTranslocoModule,
1789
- TranslocoModule,
1790
- DirectivesModule,
1791
- QuillModule.forRoot(),
1792
- UiSwitchModule
1793
- ],
1794
- exports: [ResourceEditCardComponent],
1795
- schemas: [CUSTOM_ELEMENTS_SCHEMA]
1796
- }]
1797
- }] });
1798
-
1799
- class TestimonialCardListComponent {
1800
- constructor() {
1801
- this.editPost = new EventEmitter();
1802
- this.posts = [];
1803
- this.postHeader = '';
1804
- this.canEdit = false;
1805
- }
1806
- ngOnChanges(changes) {
1807
- if (changes.posts && this.posts?.length) {
1808
- setTimeout(() => this.initSwiper(), 0); // Wait for DOM to render
1809
- }
1810
- }
1811
- async initSwiper() {
1812
- // Dynamically import Swiper only when needed (lazy-load ~150KB library)
1813
- const { default: Swiper } = await import('swiper');
1814
- const { Navigation, Pagination } = await import('swiper/modules');
1815
- this.swiper = new Swiper('.swiper-container', {
1816
- modules: [Navigation, Pagination],
1817
- slidesPerView: 1,
1818
- spaceBetween: 24,
1819
- centeredSlides: true,
1820
- touchRatio: 1,
1821
- touchAngle: 45,
1822
- grabCursor: true,
1823
- navigation: {
1824
- nextEl: '.swiper-button-next',
1825
- prevEl: '.swiper-button-prev'
1826
- },
1827
- pagination: {
1828
- el: '.swiper-pagination',
1829
- clickable: true
1830
- },
1831
- breakpoints: {
1832
- 425: {
1833
- slidesPerView: 1.05,
1834
- centeredSlides: true
1835
- },
1836
- 470: {
1837
- slidesPerView: 1.25,
1838
- centeredSlides: true
1839
- },
1840
- 564: {
1841
- slidesPerView: 1.5,
1842
- centeredSlides: true
1843
- },
1844
- 640: {
1845
- slidesPerView: 1.5,
1846
- centeredSlides: true
1847
- },
1848
- 768: {
1849
- slidesPerView: 1.5,
1850
- centeredSlides: true
1851
- },
1852
- 1024: {
1853
- slidesPerView: 2, // Allow room between cards
1854
- centeredSlides: false
1855
- },
1856
- 1200: {
1857
- slidesPerView: 3,
1858
- centeredSlides: false
1859
- }
1860
- }
1861
- });
1862
- }
1863
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: TestimonialCardListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1864
- 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", "textarea{font-size:1rem!important}.resource-body-section{background-color:#fff}.resource-body-section .container{padding:3rem 1.5rem 4rem!important;max-width:850px!important;margin:0 auto;text-align:left}.user-not-logged-in{background:#fafbfc;border:1px solid #e2e5ea;border-radius:8px;font-size:14px;font-weight:400;color:#5a6473;padding:1rem 1.5rem;box-shadow:none!important;margin-bottom:2rem!important}.user-not-logged-in a{color:#1a1d21!important;text-decoration:none;font-weight:600;transition:color .15s ease-out}.user-not-logged-in a:hover,.user-not-logged-in a:focus-visible{color:var(--first)!important}.user-not-logged-in a:focus-visible{outline:2px solid var(--first);outline-offset:2px;border-radius:2px}.resource-book-section{background:#fff;padding-top:4rem;padding-bottom:0}.resource-book-section .container{max-width:850px;margin:0 auto;padding:0 1.5rem!important;text-align:left}.resource-book-section .resource-contact{line-height:1.6;font-size:1rem;color:#3d4654}.resource-book-section .resource-contact a{text-decoration:underline;color:#1a1d21;margin:0 .2rem;transition:color .15s ease-out}.resource-book-section .resource-contact a:hover{color:var(--first)!important}.resource-offer-section{background:#fff;padding-top:1rem}.resource-offer-section .container{max-width:850px;margin:0 auto;padding:0 1.5rem;text-align:left}.resource-divider{border:0;border-top:1px solid #e2e5ea;margin:2rem auto;max-width:850px;height:0;background:none}::ng-deep .body-quill{border-width:0!important;max-width:850px;display:block;margin-left:auto;margin-right:auto}::ng-deep .p-textarea{border-radius:8px;border:1px solid #e2e5ea;font-size:1rem!important}.card{background-color:#fff;border-radius:12px}.comment-row{gap:1.5rem;padding-bottom:3rem;max-width:850px;display:block;margin-left:auto;margin-right:auto}.comment-label{font-size:14px!important;font-weight:600!important;letter-spacing:.04em;text-transform:uppercase;color:#5a6473}.response-row{max-width:850px;display:block;margin-left:auto;margin-right:auto;margin-top:2rem!important}@media(width<=768px){.resource-body-section .container{padding:2rem 1rem 3rem}.resource-book-section{padding-top:2rem!important}.resource-book-section .resource-contact{font-size:.9375rem!important}}\n"], 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" }] }); }
1865
- }
1866
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: TestimonialCardListComponent, decorators: [{
1867
- type: Component,
1868
- 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", "textarea{font-size:1rem!important}.resource-body-section{background-color:#fff}.resource-body-section .container{padding:3rem 1.5rem 4rem!important;max-width:850px!important;margin:0 auto;text-align:left}.user-not-logged-in{background:#fafbfc;border:1px solid #e2e5ea;border-radius:8px;font-size:14px;font-weight:400;color:#5a6473;padding:1rem 1.5rem;box-shadow:none!important;margin-bottom:2rem!important}.user-not-logged-in a{color:#1a1d21!important;text-decoration:none;font-weight:600;transition:color .15s ease-out}.user-not-logged-in a:hover,.user-not-logged-in a:focus-visible{color:var(--first)!important}.user-not-logged-in a:focus-visible{outline:2px solid var(--first);outline-offset:2px;border-radius:2px}.resource-book-section{background:#fff;padding-top:4rem;padding-bottom:0}.resource-book-section .container{max-width:850px;margin:0 auto;padding:0 1.5rem!important;text-align:left}.resource-book-section .resource-contact{line-height:1.6;font-size:1rem;color:#3d4654}.resource-book-section .resource-contact a{text-decoration:underline;color:#1a1d21;margin:0 .2rem;transition:color .15s ease-out}.resource-book-section .resource-contact a:hover{color:var(--first)!important}.resource-offer-section{background:#fff;padding-top:1rem}.resource-offer-section .container{max-width:850px;margin:0 auto;padding:0 1.5rem;text-align:left}.resource-divider{border:0;border-top:1px solid #e2e5ea;margin:2rem auto;max-width:850px;height:0;background:none}::ng-deep .body-quill{border-width:0!important;max-width:850px;display:block;margin-left:auto;margin-right:auto}::ng-deep .p-textarea{border-radius:8px;border:1px solid #e2e5ea;font-size:1rem!important}.card{background-color:#fff;border-radius:12px}.comment-row{gap:1.5rem;padding-bottom:3rem;max-width:850px;display:block;margin-left:auto;margin-right:auto}.comment-label{font-size:14px!important;font-weight:600!important;letter-spacing:.04em;text-transform:uppercase;color:#5a6473}.response-row{max-width:850px;display:block;margin-left:auto;margin-right:auto;margin-top:2rem!important}@media(width<=768px){.resource-body-section .container{padding:2rem 1rem 3rem}.resource-book-section{padding-top:2rem!important}.resource-book-section .resource-contact{font-size:.9375rem!important}}\n"] }]
1869
- }], propDecorators: { editPost: [{
1870
- type: Output
1871
- }], posts: [{
1872
- type: Input
1873
- }], postHeader: [{
1874
- type: Input
1875
- }], canEdit: [{
1876
- type: Input
1877
- }] } });
1878
-
1879
- /**
1880
- * Generated bundle index. Do not edit.
1881
- */
1882
-
1883
- 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 };
1884
- //# sourceMappingURL=posiwise-resource-module-posiwise-resource-module-BQQJRWpa.mjs.map