@posiwise/resource-module 0.0.163 → 0.0.165

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