@posiwise/resource-module 0.0.205 → 0.0.207

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 (43) hide show
  1. package/fesm2022/{posiwise-resource-module-base-top-banner.component-BwujN_up.mjs → posiwise-resource-module-base-top-banner.component-DvZKkqPA.mjs} +4 -4
  2. package/fesm2022/posiwise-resource-module-base-top-banner.component-DvZKkqPA.mjs.map +1 -0
  3. package/fesm2022/{posiwise-resource-module-resource-blogs.module-C_sTQ0w2.mjs → posiwise-resource-module-resource-blogs.module-LKr-SjAo.mjs} +3 -3
  4. package/fesm2022/{posiwise-resource-module-resource-blogs.module-C_sTQ0w2.mjs.map → posiwise-resource-module-resource-blogs.module-LKr-SjAo.mjs.map} +1 -1
  5. package/fesm2022/{posiwise-resource-module-resource-cards.module-BSJpkk9V.mjs → posiwise-resource-module-resource-cards.module-DOpH-f0N.mjs} +15 -15
  6. package/fesm2022/posiwise-resource-module-resource-cards.module-DOpH-f0N.mjs.map +1 -0
  7. package/fesm2022/{posiwise-resource-module-resource-case-studies.module-D1hCU5_H.mjs → posiwise-resource-module-resource-case-studies.module-CzB9wtnf.mjs} +4 -4
  8. package/fesm2022/posiwise-resource-module-resource-case-studies.module-CzB9wtnf.mjs.map +1 -0
  9. package/fesm2022/posiwise-resource-module-resource-edit-card.component-d9cDJUJf.mjs +632 -0
  10. package/fesm2022/posiwise-resource-module-resource-edit-card.component-d9cDJUJf.mjs.map +1 -0
  11. package/fesm2022/{posiwise-resource-module-resource-events.module-D7yC0Sqt.mjs → posiwise-resource-module-resource-events.module-BO9CcIFp.mjs} +5 -5
  12. package/fesm2022/posiwise-resource-module-resource-events.module-BO9CcIFp.mjs.map +1 -0
  13. package/fesm2022/{posiwise-resource-module-resource-hub.module-alVvQLvR.mjs → posiwise-resource-module-resource-hub.module-B3EZao2L.mjs} +10 -10
  14. package/fesm2022/posiwise-resource-module-resource-hub.module-B3EZao2L.mjs.map +1 -0
  15. package/fesm2022/{posiwise-resource-module-resource-integrations.module-G4XvMMYf.mjs → posiwise-resource-module-resource-integrations.module-Djkoz9EF.mjs} +16 -13
  16. package/fesm2022/posiwise-resource-module-resource-integrations.module-Djkoz9EF.mjs.map +1 -0
  17. package/fesm2022/{posiwise-resource-module-resource-jobs.module-DOdaBrZi.mjs → posiwise-resource-module-resource-jobs.module-Dw-7KbET.mjs} +4 -4
  18. package/fesm2022/{posiwise-resource-module-resource-jobs.module-DOdaBrZi.mjs.map → posiwise-resource-module-resource-jobs.module-Dw-7KbET.mjs.map} +1 -1
  19. package/fesm2022/{posiwise-resource-module-resource-post.module-CGxj27dN.mjs → posiwise-resource-module-resource-post.module-C343zv-t.mjs} +13 -13
  20. package/fesm2022/posiwise-resource-module-resource-post.module-C343zv-t.mjs.map +1 -0
  21. package/fesm2022/{posiwise-resource-module-resource-release-notes.module-CLry1QNC.mjs → posiwise-resource-module-resource-release-notes.module-CE21Yiss.mjs} +9 -6
  22. package/fesm2022/{posiwise-resource-module-resource-release-notes.module-CLry1QNC.mjs.map → posiwise-resource-module-resource-release-notes.module-CE21Yiss.mjs.map} +1 -1
  23. package/fesm2022/{posiwise-resource-module-resource-root.module-x4TYntdq.mjs → posiwise-resource-module-resource-root.module-BzvAo30C.mjs} +12 -9
  24. package/fesm2022/posiwise-resource-module-resource-root.module-BzvAo30C.mjs.map +1 -0
  25. package/fesm2022/{posiwise-resource-module-resource-videos.module-2ugtK7wA.mjs → posiwise-resource-module-resource-videos.module-OJpXslFg.mjs} +3 -3
  26. package/fesm2022/{posiwise-resource-module-resource-videos.module-2ugtK7wA.mjs.map → posiwise-resource-module-resource-videos.module-OJpXslFg.mjs.map} +1 -1
  27. package/fesm2022/{posiwise-resource-module-resource-white-papers.module-pn6rtDc3.mjs → posiwise-resource-module-resource-white-papers.module-rr8wWULi.mjs} +3 -3
  28. package/fesm2022/{posiwise-resource-module-resource-white-papers.module-pn6rtDc3.mjs.map → posiwise-resource-module-resource-white-papers.module-rr8wWULi.mjs.map} +1 -1
  29. package/fesm2022/{posiwise-resource-module-resource.service-DAXsq-WG.mjs → posiwise-resource-module-resource.service-BBvcVvWN.mjs} +10 -10
  30. package/fesm2022/posiwise-resource-module-resource.service-BBvcVvWN.mjs.map +1 -0
  31. package/fesm2022/posiwise-resource-module.mjs +24 -734
  32. package/fesm2022/posiwise-resource-module.mjs.map +1 -1
  33. package/package.json +1 -1
  34. package/types/posiwise-resource-module.d.ts +25 -144
  35. package/fesm2022/posiwise-resource-module-base-top-banner.component-BwujN_up.mjs.map +0 -1
  36. package/fesm2022/posiwise-resource-module-resource-cards.module-BSJpkk9V.mjs.map +0 -1
  37. package/fesm2022/posiwise-resource-module-resource-case-studies.module-D1hCU5_H.mjs.map +0 -1
  38. package/fesm2022/posiwise-resource-module-resource-events.module-D7yC0Sqt.mjs.map +0 -1
  39. package/fesm2022/posiwise-resource-module-resource-hub.module-alVvQLvR.mjs.map +0 -1
  40. package/fesm2022/posiwise-resource-module-resource-integrations.module-G4XvMMYf.mjs.map +0 -1
  41. package/fesm2022/posiwise-resource-module-resource-post.module-CGxj27dN.mjs.map +0 -1
  42. package/fesm2022/posiwise-resource-module-resource-root.module-x4TYntdq.mjs.map +0 -1
  43. package/fesm2022/posiwise-resource-module-resource.service-DAXsq-WG.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"posiwise-resource-module.mjs","names":["i1","i1","i1"],"sources":["../../../../libs/resource-module/src/lib/public/resource-public.routing.module.ts","../../../../libs/resource-module/src/lib/public/resource-public.module.ts","../../../../libs/resource-module/src/lib/resource.module.ts","../../../../libs/resource-module/src/lib/public/components/resource-company-card/resource-company-card.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-company-card/resource-company-card.component.html","../../../../libs/resource-module/src/lib/public/components/resource-top-banner-edit/resource-top-banner-edit.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-top-banner-edit/resource-top-banner-edit.component.html","../../../../libs/resource-module/src/lib/public/shared/resource-shared.module.ts","../../../../libs/resource-module/src/lib/public/components/resource-edit-card/resource-edit-card-images.ts","../../../../libs/resource-module/src/lib/public/components/resource-edit-card/resource-edit-payload.ts","../../../../libs/resource-module/src/lib/public/components/resource-edit-card/resource-edit-card.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-edit-card/resource-edit-card.component.html","../../../../libs/resource-module/src/lib/public/shared/resource-edit.module.ts","../../../../libs/resource-module/src/lib/public/components/testimonial-card/testimonial-card.component.ts","../../../../libs/resource-module/src/lib/public/components/testimonial-card/testimonial-card.component.html"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\n// Lazy loaded routes - each route now loads its own module with only the components it needs\nconst routes: Routes = [\n {\n path: '',\n pathMatch: 'full',\n loadChildren: () =>\n import('./modules/root/resource-root.module').then(m => m.ResourceRootModule)\n },\n {\n path: 'hub',\n loadChildren: () =>\n import('./modules/hub/resource-hub.module').then(m => m.ResourceHubModule)\n },\n {\n path: 'blogs',\n loadChildren: () =>\n import('./modules/blogs/resource-blogs.module').then(m => m.ResourceBlogsModule)\n },\n {\n path: 'videos',\n loadChildren: () =>\n import('./modules/videos/resource-videos.module').then(m => m.ResourceVideosModule)\n },\n {\n path: 'integrations',\n loadChildren: () =>\n import('./modules/integrations/resource-integrations.module').then(\n m => m.ResourceIntegrationsModule\n )\n },\n {\n path: 'release-notes',\n loadChildren: () =>\n import('./modules/release-notes/resource-release-notes.module').then(\n m => m.ResourceReleaseNotesModule\n )\n },\n {\n path: 'events',\n loadChildren: () =>\n import('./modules/events/resource-events.module').then(m => m.ResourceEventsModule)\n },\n {\n path: 'white-papers',\n loadChildren: () =>\n import('./modules/white-papers/resource-white-papers.module').then(\n m => m.ResourceWhitePapersModule\n )\n },\n {\n path: 'case-studies',\n loadChildren: () =>\n import('./modules/case-studies/resource-case-studies.module').then(\n m => m.ResourceCaseStudiesModule\n )\n },\n {\n path: 'careers',\n loadChildren: () =>\n import('./modules/jobs/resource-jobs.module').then(m => m.ResourceJobsModule)\n },\n {\n path: 'view/:slug',\n loadChildren: () =>\n import('./modules/post/resource-post.module').then(m => m.ResourcePostModule)\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class BlogPublicRoutingModule {}\n","import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\n\nimport { ResourceService } from '../resource.service';\n\nimport { BlogPublicRoutingModule } from './resource-public.routing.module';\n\n@NgModule({\n imports: [BlogPublicRoutingModule],\n providers: [ResourceService],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourcePublicModule {}\n","import { NgModule } from '@angular/core';\n\nimport { ResourcePublicModule } from './public/resource-public.module';\n\n@NgModule({\n imports: [ResourcePublicModule]\n})\nexport class ResourceModule {}\n","import { NgClass, NgTemplateOutlet, SlicePipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n EventEmitter,\n inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ResourcePost, User } from '@posiwise/common-utilities';\nimport { LazyImgDirective } from '@posiwise/directives';\nimport { HelperService } from '@posiwise/helper-service';\nimport { NoDataComponent } from '@posiwise/shared-components';\n\nimport { Bind } from 'primeng/bind';\nimport { Paginator } from 'primeng/paginator';\nimport { Subject } from 'rxjs';\n\nimport { TranslocoPipe } from '@jsverse/transloco';\n\nimport { ResourceEditCardLazyComponent } from '../resource-edit-card-lazy/resource-edit-card-lazy.component';\n\ninterface PageEvent {\n first: number;\n rows: number;\n page: number;\n pageCount: number;\n}\n@Component({\n selector: 'pw-resource-company-card',\n templateUrl: './resource-company-card.component.html',\n styleUrl: './resource-company-card.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgClass,\n NoDataComponent,\n LazyImgDirective,\n ResourceEditCardLazyComponent,\n NgTemplateOutlet,\n Bind,\n Paginator,\n SlicePipe,\n TranslocoPipe\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceCompanyCardComponent\n extends AppBaseComponent\n implements OnChanges, OnInit, OnDestroy\n{\n private readonly cdr = inject(ChangeDetectorRef);\n\n @Output() getPosts = new EventEmitter<ResourcePost[]>();\n private readonly destroy$ = new Subject<void>();\n\n canEditResourcesValue = false;\n @Input() header = '';\n @Input() data = [];\n @Input() integrationCountDisplay;\n @Input() vendor = false;\n @Input() user: User;\n @Input() userLoggedIn: boolean;\n\n postData = false;\n filteredData = [];\n first = 0;\n rows = 12;\n subscriptionId: string;\n\n ngOnChanges(): void {\n this.search();\n }\n ngOnInit() {\n if (this.userLoggedIn) {\n this.updateCanEditResourcesValue();\n this.localStorage.getItem$('product').subscribe(res => {\n const data = res ? JSON.parse(res) : null;\n this.subscriptionId = data?.subscriptionId;\n this.cdr.markForCheck();\n });\n }\n }\n search(keywords?) {\n if (keywords) {\n this.filteredData = this.data.filter(x =>\n x.title.toLowerCase().includes(keywords.toLowerCase())\n );\n if (this.filteredData.length === 0) {\n this.postData = true;\n } else {\n this.postData = false;\n }\n } else {\n this.filteredData = [...this.data];\n this.postData = false;\n }\n }\n onPageChange(event: PageEvent) {\n this.first = event.first;\n this.rows = event.rows;\n }\n\n override ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n private updateCanEditResourcesValue(): void {\n this.canEditResourcesValue = HelperService.canEditResources(\n this.user,\n this.userLoggedIn,\n this.permissionService\n );\n }\n\n canEditResources(): boolean {\n return this.canEditResourcesValue;\n }\n\n /** Show no-data when there is integration count but no posts (postData is false, filteredData empty). */\n get showNoPostsMessage(): boolean {\n return (\n this.integrationCountDisplay > 0 &&\n !this.postData &&\n (!this.filteredData || this.filteredData.length === 0)\n );\n }\n}\n","<div [ngClass]=\"{ 'vendors-distributor-wrapper': !vendor }\">\n <div class=\"d-flex justify-content-between align-items-center mb-3 search-container\">\n <div>\n <span class=\"int-span\">{{header}}</span>\n </div>\n @if (integrationCountDisplay > 0) {\n <div class=\"search-wrapper position-relative\">\n <i class=\"fa fa-search search-icon\"></i>\n <input type=\"text\"\n (keyup)=\"search($event.target.value)\"\n placeholder=\"Search eg security\"\n class=\"search-input top-search-input\" id=\"input_search_eg_security_9712\" name=\"input_search_eg_security_9712\"\n aria-label=\"Search eg security\" />\n </div>\n }\n\n </div>\n\n @if (postData) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\"> </pw-no-data>\n </div>\n }\n\n @if (showNoPostsMessage) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"></pw-no-data>\n </div>\n }\n\n @if (!postData && integrationCountDisplay > 0 && filteredData.length > 0) {\n <div class=\"row\">\n @for (img of filteredData | slice:first:(first + rows); track img) {\n <div class=\"col-md-3 mt-4\"\n >\n <div class=\"boxes d-flex align-items-center justify-content-center\">\n @if (img?.companyImg) {\n <img [src]=\"img.companyImg\" alt=\"Vendor Company Icon\" class=\"vendor-icon\" />\n } @else {\n @if (img?.rectangular_picture?.url) {\n @if (!img.rectangular_picture.url.includes('default-photo')) {\n @if (img?.showcase) {\n <a class=\"vendor-link\" [href]=\"img.external_url || ('/resources/view/' + img.slug)\">\n <img [src]=\"img.rectangular_picture.url\" alt=\"Vendor Rectangular Company Icon\" class=\"vendor-icon\" />\n </a>\n } @else {\n <img [src]=\"img.rectangular_picture.url\" alt=\"Vendor Rectangular Company Icon\" class=\"vendor-icon\" />\n }\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"img?.id\"\n [resourceData]=\"img\"\n (updated)=\"getPosts.emit()\">\n </pw-resource-edit-card-lazy>\n } @else {\n @if (img?.showcase) {\n <a class=\"vendor-link\" [href]=\"img.external_url || ('/resources/view/' + img.slug)\">\n <span class=\"vendor-name text-center mt-2\">{{ img?.title }}</span>\n </a>\n } @else {\n <span class=\"vendor-name text-center\">{{ img?.title }}</span>\n }\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"img?.id\"\n [resourceData]=\"img\"\n (updated)=\"getPosts.emit()\">\n </pw-resource-edit-card-lazy>\n }\n } @else {\n <ng-template [ngTemplateOutlet]=\"noImage\"></ng-template>\n }\n }\n </div>\n </div>\n }\n @if (filteredData.length > 0) {\n <div class=\"customPaginator d-flex align-items-center mt-5 justify-content-center\"\n >\n <p-paginator\n [first]=\"first\"\n [rows]=\"rows\"\n [totalRecords]=\"filteredData.length\"\n (onPageChange)=\"onPageChange($event)\"></p-paginator>\n </div>\n }\n </div>\n }\n</div>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n EventEmitter,\n inject,\n Input,\n OnInit,\n Output,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { FormBuilder, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { TagService } from '@posiwise/common-services';\nimport { User } from '@posiwise/common-utilities';\nimport { ButtonBusyDirective, LazyImgDirective } from '@posiwise/directives';\nimport { HelperService } from '@posiwise/helper-service';\nimport { InputContainerComponent } from '@posiwise/shared-components';\nimport { CustomUploaderComponent, ProfileImageCropperComponent } from '@posiwise/utils';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\n@Component({\n selector: 'pw-resource-top-banner-edit',\n templateUrl: './resource-top-banner-edit.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n FormsModule,\n ReactiveFormsModule,\n InputContainerComponent,\n LazyImgDirective,\n ButtonBusyDirective,\n ProfileImageCropperComponent\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceTopBannerEditComponent extends AppBaseComponent implements OnInit {\n private readonly fb = inject(FormBuilder);\n private readonly modalService = inject(NgbModal);\n private readonly tagService = inject(TagService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n @Input() blogPostTag;\n @Input() user: User;\n @Input() userLoggedIn: boolean;\n @Output() getUpdatedTag = new EventEmitter();\n @ViewChild('editModal') editModal: TemplateRef<CustomUploaderComponent>;\n @ViewChild('imageCropContent') imageCropContent: TemplateRef<CustomUploaderComponent>;\n\n form: FormGroup;\n image: string | null = null;\n defaultImage = 'assets/img/resource/blog.png';\n file: File;\n subscriptionId: string;\n imageModalRef;\n buttonBusy: boolean;\n\n ngOnInit(): void {\n if (this.userLoggedIn) {\n this.localStorage.getItem$('product').subscribe(res => {\n const data = res ? JSON.parse(res) : null;\n this.subscriptionId = data?.subscriptionId;\n this.cdr.markForCheck();\n });\n }\n this.form = this.fb.group({\n title: [this.blogPostTag?.title ?? ''],\n description: [this.blogPostTag?.description ?? ''],\n meta_title: [this.blogPostTag?.meta_title ?? ''],\n meta_description: [this.blogPostTag?.meta_description ?? '']\n });\n\n this.image = this.blogPostTag?.image?.url ?? null;\n }\n\n openEditModal() {\n this.modalService.open(this.editModal, { centered: true, size: 'lg' });\n }\n\n openImageModal(modalRef) {\n this.imageModalRef = this.modalService.open(modalRef, { centered: true });\n }\n\n onImageSelected(base64: string): void {\n this.image = base64;\n this.file = HelperService.convertBase64ToFile(base64);\n this.imageModalRef?.close();\n }\n\n onClose() {\n this.imageModalRef?.close();\n }\n\n removeImage() {\n this.image = null;\n }\n\n handleImageError(event: Event) {\n (event.target as HTMLImageElement).src = this.defaultImage;\n }\n\n save() {\n this.buttonBusy = true;\n const payload = {\n title: this.form.value.title ?? this.blogPostTag?.title,\n description: this.form.value.description ?? this.blogPostTag?.description,\n meta_title: this.form.value.meta_title ?? this.blogPostTag?.meta_title,\n meta_description:\n this.form.value.meta_description ?? this.blogPostTag?.meta_description,\n tag_category_id: this.blogPostTag?.tag_category_id,\n tag_type: this.blogPostTag?.tag_type,\n subscription_id: this.subscriptionId,\n name: this.blogPostTag?.name\n };\n\n if (this.file) {\n payload['image'] = this.file;\n } else if (!this.image) {\n payload['remove_image'] = true;\n }\n\n this.tagService.updateTagById(this.blogPostTag?.id, payload).subscribe(() => {\n this.buttonBusy = false;\n this.toast.success('Tag Updated');\n this.getUpdatedTag.emit();\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n });\n }\n}\n","<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-black in-page-edit-icon mb-1 ms-3\"\n (click)=\"openEditModal()\"\n (keydown.enter)=\"openEditModal()\"\n (keydown.space)=\"openEditModal()\"\n title=\"Edit Blog Tag\"></i>\n</div>\n\n<ng-template #editModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Blog Post Tag</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row\">\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"\n aria-label=\"Title\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Description\" name=\"description\" controlId=\"resource-top-banner-description\">\n <textarea id=\"resource-top-banner-description\" name=\"description\" class=\"form-control\" rows=\"4\" formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Title\" name=\"meta_title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"meta_title\" placeholder=\"Meta Title for SEO\" id=\"input_meta_title_2\" name=\"input_meta_title_2\"\n aria-label=\"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\" controlId=\"resource-top-banner-meta_description\">\n <textarea id=\"resource-top-banner-meta_description\" name=\"meta_description\" class=\"form-control\" rows=\"3\" formControlName=\"meta_description\" placeholder=\"Meta Description for SEO\"\n aria-label=\"Meta Description for SEO\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 my-4\">\n <span id=\"resource-top-banner-tag-image-label\" class=\"pw-label-style\">Blog Tag Image</span>\n <div class=\"text-center d-flex flex-column align-items-center col-6\">\n <img [src]=\"image || defaultImage\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n (keydown.space)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Blog\"\n (error)=\"handleImageError($event)\"\n />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <button type=\"button\" class=\"btn btn-link p-0 d-inline-block mt-2\"\n (click)=\"openImageModal(imageCropContent)\">\n {{ image ? 'Update' : 'Add' }} Image\n </button>\n @if (image) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (keydown.enter)=\"removeImage()\"\n (keydown.space)=\"removeImage()\"\n (click)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n\n </div>\n </form>\n </div>\n\n <div class=\"modal-footer\">\n <button class=\"btn btn-secondary\" (click)=\"modal.dismiss()\">Cancel</button>\n <button class=\"btn btn-primary\" [buttonBusy]=\"buttonBusy\" (click)=\"save()\">Save</button>\n </div>\n</ng-template>\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Image</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. Avoid artwork, celebrities, or copyrighted images.</small>\n <pw-image-cropper\n #cropper\n aspectRatio=\"dynamic\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n","import { CommonModule } from '@angular/common';\nimport { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\n\nimport { HubSpotMeetingsSharedModule } from '@posiwise/alpha-module';\nimport { CoreTranslocoModule } from '@posiwise/core-transloco';\nimport { DirectivesModule } from '@posiwise/directives';\nimport { PipesModule } from '@posiwise/pipes';\nimport { ResourceSharedComponentsModule } from '@posiwise/shared-components';\n\nimport { IconFieldModule } from 'primeng/iconfield';\nimport { InputIconModule } from 'primeng/inputicon';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { TextareaModule } from 'primeng/textarea';\n\nimport { TranslocoModule } from '@jsverse/transloco';\n\nimport { ResourceCompanyCardComponent } from '../components/resource-company-card/resource-company-card.component';\nimport { ResourceTopBannerEditComponent } from '../components/resource-top-banner-edit/resource-top-banner-edit.component';\n\nimport { ResourceCardsModule } from './resource-cards.module';\n\n// Shared components used across multiple resource routes\n// Note: Most heavy modules (Quill, Calendar, UiSwitch, etc.) are now in ResourceCardsModule\n@NgModule({\n imports: [\n CommonModule,\n RouterModule,\n FormsModule,\n ReactiveFormsModule,\n PipesModule,\n ResourceSharedComponentsModule,\n CoreTranslocoModule,\n TranslocoModule,\n DirectivesModule,\n InputTextModule,\n IconFieldModule,\n InputIconModule,\n TextareaModule,\n ResourceCardsModule,\n HubSpotMeetingsSharedModule, // For pw-book-a-demo component (HubSpotMeetingsComponent)\n ResourceCompanyCardComponent,\n ResourceTopBannerEditComponent\n ],\n exports: [\n // Export the 2 components specific to this module\n ResourceCompanyCardComponent,\n ResourceTopBannerEditComponent,\n // Export card components module (includes all heavy modules + card components)\n ResourceCardsModule,\n // Export HubSpotMeetingsSharedModule to make pw-book-a-demo component available\n HubSpotMeetingsSharedModule,\n // Export common lightweight modules\n CommonModule,\n RouterModule,\n FormsModule,\n ReactiveFormsModule,\n PipesModule,\n ResourceSharedComponentsModule,\n CoreTranslocoModule,\n TranslocoModule,\n DirectivesModule,\n InputTextModule,\n IconFieldModule,\n InputIconModule,\n TextareaModule\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceSharedModule {}\n","import { Component, inject } from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\n/** The two cover pictures of the resource edit card: square and rectangular. */\n@Component({\n template: ''\n})\nexport abstract class ResourceEditCardImages extends AppBaseComponent {\n protected readonly modalService = inject(NgbModal);\n\n image = '';\n rectangularImage = '';\n file: File | null = null;\n rectangularFile: File | null = null;\n imageModalRef;\n\n openImageModal(modalTemplate): void {\n this.imageModalRef = this.modalService.open(modalTemplate, { centered: true, size: 'md' });\n }\n\n openRectModal(content) {\n this.imageModalRef = this.modalService.open(content, {\n centered: true,\n windowClass: 'modal-holder'\n });\n }\n\n onImageSelected(base64: string): void {\n this.image = base64;\n this.file = HelperService.convertBase64ToFile(base64);\n this.imageModalRef?.close();\n }\n\n onRectangularImageSelection(base64: string) {\n this.rectangularImage = base64;\n this.rectangularFile = HelperService.convertBase64ToFile(base64);\n this.imageModalRef?.close();\n }\n\n removeImage(): void {\n this.image = null;\n this.file = null;\n }\n\n deleteRectangularImage() {\n this.rectangularImage = null;\n this.rectangularFile = null;\n }\n\n handleImageError(event: Event, fallbackPath): void {\n HelperService.handleImageFallbackPath(event, fallbackPath);\n }\n}\n","import { FormBuilder, FormGroup } from '@angular/forms';\n\nimport moment from 'moment';\n\n/** The cover images as the edit card holds them: a new file, or the current URL, or nothing. */\nexport interface ResourceEditImages {\n file: File | null;\n image: string | null;\n rectangularFile: File | null;\n rectangularImage: string | null;\n}\n\nexport function resourceEditForm(fb: FormBuilder): FormGroup {\n return fb.group({\n title: [''],\n external_url: [''],\n cta_text: [''],\n when: [''],\n showcase: [false],\n published_at: [false],\n accepted_at: [false],\n body: ['']\n });\n}\n\n/** The form's values for a post, with blanks where the post has no value yet. */\nexport function resourceFormValue(resource) {\n return {\n title: resource.title ?? '',\n external_url: resource.external_url ?? '',\n cta_text: resource.cta_text ?? '',\n when: resource.when ? new Date(resource.when) : '',\n showcase: !!resource.showcase,\n published_at: !!resource.published_at,\n accepted_at: !!resource.accepted_at,\n body: resource.body\n };\n}\n\n/** The update payload: the form's values plus the cover-image changes and the toggled dates. */\nexport function buildResourcePayload(\n form: FormGroup,\n subscriptionId: number,\n images: ResourceEditImages\n) {\n const data = { ...form.value, subscription_id: subscriptionId };\n setFile(data, 'picture', images.file);\n setFile(data, 'rectangular_picture', images.rectangularFile);\n setToggledDate(form, data, 'published_at');\n setToggledDate(form, data, 'accepted_at');\n if (!form.get('when')?.value) {\n data.when = '';\n }\n if (!form.get('showcase')?.value) {\n data.showcase = '';\n }\n if (!images.file && !images.image) {\n data.remove_picture = true;\n }\n if (!images.rectangularFile && !images.rectangularImage) {\n data.remove_rectangular_picture = true;\n }\n return data;\n}\n\nfunction setFile(data, key: string, file: File | null): void {\n if (file) {\n data[key] = file;\n } else {\n delete data[key];\n }\n}\n\n/** A date sent only when its switch was touched: today when on, blank when off. */\nfunction setToggledDate(form: FormGroup, data, key: string): void {\n const control = form.get(key);\n if (control?.dirty) {\n data[key] = control.value ? moment().format('DD-MMM-YYYY') : '';\n } else {\n delete data[key];\n }\n}\n\n/** Tags whose name contains the query; all tags when the query is empty. */\nexport function filterTags<T extends { name: string }>(tags: T[], query: string): T[] {\n if (!query) {\n return [...tags];\n }\n const needle = query.toLowerCase();\n return tags.filter(tag => tag.name.toLowerCase().includes(needle));\n}\n\n/** The request that links the selected tags to the post. */\nexport function postTagsPayload(tags: { id: number }[], postId: number | string) {\n return {\n entity_tags: tags.map(tag => ({ tag_id: tag.id })),\n slug: postId,\n tag_entity: 'Post'\n };\n}\n","import { NgClass } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n EventEmitter,\n inject,\n Input,\n OnInit,\n Output\n} from '@angular/core';\nimport { FormBuilder, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { AuthService, TagService } from '@posiwise/common-services';\nimport { ButtonBusyDirective, LazyImgDirective } from '@posiwise/directives';\nimport { InputContainerComponent } from '@posiwise/shared-components';\nimport { ProfileImageCropperComponent } from '@posiwise/utils';\nimport { editorImageUpload, QuillHelper } from '@posiwise/utils/quill';\n\nimport { QuillEditorComponent } from 'ngx-quill';\nimport { UiSwitchModule } from 'ngx-ui-switch';\nimport { AutoComplete } from 'primeng/autocomplete';\nimport { Bind } from 'primeng/bind';\nimport { DatePicker } from 'primeng/datepicker';\n\nimport { TranslocoPipe } from '@jsverse/transloco';\n\nimport { ResourceService } from '../../../resource.service';\n\nimport { ResourceEditCardImages } from './resource-edit-card-images';\nimport {\n buildResourcePayload,\n filterTags,\n postTagsPayload,\n resourceEditForm,\n resourceFormValue\n} from './resource-edit-payload';\n\n@Component({\n selector: 'pw-resource-edit-card',\n templateUrl: './resource-edit-card.component.html',\n styleUrl: './resource-edit-card.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n FormsModule,\n ReactiveFormsModule,\n InputContainerComponent,\n QuillEditorComponent,\n NgClass,\n Bind,\n DatePicker,\n AutoComplete,\n UiSwitchModule,\n LazyImgDirective,\n ButtonBusyDirective,\n ProfileImageCropperComponent,\n TranslocoPipe\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceEditCardComponent extends ResourceEditCardImages implements OnInit {\n private readonly fb = inject(FormBuilder);\n private readonly resourceService = inject(ResourceService);\n private readonly authService = inject(AuthService);\n private readonly tagService = inject(TagService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n @Input() id!: number;\n @Input() resourceData;\n @Output() updated = new EventEmitter<void>();\n\n editForm: FormGroup;\n selectedTags = [];\n allTags = [];\n tagsSuggestion = [];\n subscriptionId: number;\n userLoggedIn: boolean;\n buttonBusy = false;\n // Uploads go to the subscription the post is saved under (#4272).\n editorConfig = QuillHelper.getEditorConfig(\n [],\n editorImageUpload(() => this.subscriptionId)\n );\n\n constructor() {\n super();\n QuillHelper.init();\n this.editForm = resourceEditForm(this.fb);\n }\n\n ngOnInit(): void {\n this.authService.getToken$().subscribe(res => {\n this.userLoggedIn = !!res;\n if (this.userLoggedIn) {\n this.localStorage.getItem$('product').subscribe(res => {\n const data = res ? JSON.parse(res) : null;\n this.subscriptionId = data?.subscriptionId;\n this.cdr.markForCheck();\n });\n }\n this.cdr.markForCheck();\n });\n }\n\n navigateToResourceEdit() {\n const basePath = `/admin/resources/${this.resourceData?.slug}`;\n const fullUrl = `${location.origin}${basePath}`;\n window.open(fullUrl, '_blank');\n }\n\n openModal(modalTemplate): void {\n if (this.resourceData) {\n this.editForm.setValue(resourceFormValue(this.resourceData));\n this.image = this.resourceData.picture?.url ?? '';\n this.selectedTags = this.resourceData?.tags?.length ? [...this.resourceData.tags] : [];\n this.rectangularImage = this.resourceData.rectangular_picture?.url ?? '';\n }\n this.modalService.open(modalTemplate, { centered: true, size: 'lg' });\n this.getPostTags();\n }\n\n search(event) {\n this.tagsSuggestion = filterTags(this.allTags, event.query);\n }\n\n private getPostTags() {\n this.tagService\n .getTagsByType('post_categories', {}, this.subscriptionId)\n .subscribe(response => {\n this.allTags = response.tags;\n this.cdr.markForCheck();\n });\n }\n\n saveResource(): void {\n this.buttonBusy = true;\n this.saveTags(this.id);\n const payload = buildResourcePayload(this.editForm, this.subscriptionId, this);\n\n this.resourceService.updatePost(payload, this.id).subscribe({\n next: () =>\n this.settleSave(() => {\n this.toast.success('Blog Post Updated');\n this.updated.emit();\n this.modalService.dismissAll();\n }),\n error: () => this.settleSave()\n });\n }\n\n // NG0100: Toastr + dismissAll can run CD in the same macrotask as clearing [buttonBusy].\n // Clear busy in one task; toast/emit/modal in the next so dev-mode \"verify\" sees a stable binding.\n private settleSave(afterSuccess?: () => void): void {\n setTimeout(() => {\n this.buttonBusy = false;\n this.cdr.markForCheck();\n if (afterSuccess) {\n setTimeout(() => {\n afterSuccess();\n this.cdr.markForCheck();\n }, 0);\n }\n }, 0);\n }\n\n private saveTags(id: number | string): void {\n if (this.selectedTags.length) {\n const data = postTagsPayload(this.selectedTags, id);\n this.tagService.addTags(data, this.subscriptionId).subscribe(() => {\n this.cdr.markForCheck();\n });\n }\n }\n}\n","<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-dark in-page-edit-icon d-flex justify-content-center mb-2\"\n (click)=\"openModal(editResourceModal)\"\n (keydown.enter)=\"openModal(editResourceModal)\"\n (keydown.space)=\"openModal(editResourceModal)\"\n title=\"Edit Resource\"></i>\n</div>\n\n<ng-template #editResourceModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Resource</h5>\n <i class=\"fa fa-edit cursor-pointer text-dark in-page-edit-icon d-flex justify-content-center ms-3\"\n (click)=\"navigateToResourceEdit()\"\n (keydown.enter)=\"navigateToResourceEdit()\"\n (keydown.space)=\"navigateToResourceEdit()\"\n title=\"Go to the main edit page\"></i>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"editForm\">\n <div class=\"row\">\n\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"\n aria-label=\"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\" id=\"input_cta_text_2\" name=\"input_cta_text_2\"\n aria-label=\"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\" id=\"input_external_url_3\" name=\"input_external_url_3\"\n [attr.aria-label]=\"'Resource.Posts.Body' | transloco\"/>\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\">\n <quill-editor\n [styles]=\"{ height: '300px' }\"\n class=\"quillEditor\"\n [modules]=\"editorConfig\"\n formControlName=\"body\"\n [ngClass]=\"{\n 'w-100': true,\n 'quill-container': true,\n 'is-invalid': submitted && f['body'].errors\n }\">\n </quill-editor>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-3 col-sm-6\">\n <pw-input-container\n [label]=\"'Resource.Posts.When' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.When' | transloco\"\n name=\"when\">\n <p-datepicker inputId=\"resource-edit-card-when\" formControlName=\"when\"\n [ariaLabel]=\"'Resource.Posts.When' | transloco\"\n [showIcon]=\"true\"\n dateFormat=\"dd-M-yy\"\n [placeholder]=\"'Select Date'\"\n [ngClass]=\"{ 'is-invalid': submitted && f['when'].errors }\">\n </p-datepicker>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-8\">\n <pw-input-container\n [label]=\"'Resource.Posts.Tags' | transloco\"\n class=\"ui-fluid skills-modal tags\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\"\n name=\"cta_text\">\n <p-auto-complete appendTo=\"body\" [(ngModel)]=\"selectedTags\"\n [ariaLabel]=\"'Resource.Posts.Tags' | transloco\"\n class=\"body-bg w-100\"\n [suggestions]=\"tagsSuggestion\"\n dataKey=\"id\"\n optionLabel=\"name\"\n (completeMethod)=\"search($event)\"\n [minLength]=\"1\"\n [maxlength]=\"10\"\n [dropdown]=\"true\"\n [ngModelOptions]=\"{ standalone: true }\"\n placeholder=\"Tags\"\n [multiple]=\"true\">\n </p-auto-complete>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 row\">\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'SHOWCASE'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Mark as showcase post'\"\n name=\"showcase\">\n <ui-switch formControlName=\"showcase\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'PUBLISHED'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Set to publish the post'\"\n name=\"published_at\">\n <ui-switch formControlName=\"published_at\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'ACCEPTED BY ADMIN'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Indicates approval by admin'\"\n name=\"accepted_at\">\n <ui-switch formControlName=\"accepted_at\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4 col-sm-4 my-4 ms-3\">\n <div class=\"text-center mb-4\">\n <span id=\"resource-edit-cover-picture-label\" class=\"pw-label-style\">{{ 'Resource.Posts.CoverPicture' | transloco }}</span>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"(image && !image.includes('default-photo.jpg')) ? image : 'assets/img/resource/blog.png'\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Modal\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <button type=\"button\" class=\"btn btn-link p-0 d-inline-block\" (click)=\"openImageModal(imageCropContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </button>\n @if (image && !image.includes('default-photo.jpg')) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (click)=\"removeImage()\"\n (keydown.enter)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4 col-sm-4 my-4 ms-3\">\n <div class=\"text-center mb-4\">\n <span id=\"resource-edit-rectangular-picture-label\" class=\"pw-label-style\">Rectangular Picture</span>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"(rectangularImage && !rectangularImage.includes('default-photo.jpg')) ? rectangularImage : 'assets/img/resource/blog.png'\"\n (click)=\"openRectModal(rectContent)\"\n (keydown.enter)=\"openRectModal(rectContent)\"\n class=\"image w-100\"\n alt=\"Uploaded rectangular media preview\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <button type=\"button\" class=\"btn btn-link p-0 d-inline-block\" (click)=\"openRectModal(rectContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </button>\n @if (rectangularImage && !rectangularImage.includes('default-photo.jpg')) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (click)=\"deleteRectangularImage()\"\n (keydown.enter)=\"deleteRectangularImage()\"></i>\n }\n </div>\n </div>\n </div>\n </div>\n\n </div>\n </form>\n </div>\n\n <div class=\"modal-footer\">\n <button class=\"btn btn-secondary\" (click)=\"modal.dismiss()\">Cancel</button>\n <button class=\"btn btn-primary\" [buttonBusy]=\"buttonBusy\" (click)=\"saveResource()\">Save</button>\n </div>\n</ng-template>\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\" class=\"btn-close\" [attr.aria-label]=\"'Common.Close' | transloco\" (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","import { CommonModule } from '@angular/common';\nimport { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { CoreTranslocoModule } from '@posiwise/core-transloco';\nimport { DirectivesModule } from '@posiwise/directives';\nimport { ResourceSharedComponentsModule } from '@posiwise/shared-components';\n\nimport { QuillModule } from 'ngx-quill';\nimport { UiSwitchModule } from 'ngx-ui-switch';\nimport { AutoCompleteModule } from 'primeng/autocomplete';\nimport { DatePickerModule } from 'primeng/datepicker';\n\nimport { TranslocoModule } from '@jsverse/transloco';\n\nimport { ResourceEditCardComponent } from '../components/resource-edit-card/resource-edit-card.component';\n\n/**\n * Lazy-loadable module for ResourceEditCard\n * Contains heavy dependencies (Quill, Calendar, etc.) that are only needed for admins\n * This module is dynamically imported when edit button is clicked\n */\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n DatePickerModule,\n AutoCompleteModule,\n ResourceSharedComponentsModule,\n CoreTranslocoModule,\n TranslocoModule,\n DirectivesModule,\n QuillModule.forRoot(),\n UiSwitchModule,\n ResourceEditCardComponent\n ],\n exports: [ResourceEditCardComponent],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceEditModule {}\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output\n} from '@angular/core';\n\nimport { Resource } from '@posiwise/common-utilities';\nimport { LazyImgDirective } from '@posiwise/directives';\nimport { NoDataComponent } from '@posiwise/shared-components';\n\nimport { TranslocoPipe } from '@jsverse/transloco';\n\nimport { ResourceEditCardLazyComponent } from '../resource-edit-card-lazy/resource-edit-card-lazy.component';\n\n@Component({\n selector: 'pw-testimonial-card',\n templateUrl: './testimonial-card.component.html',\n styleUrls: [\n './testimonial-card.component.scss',\n '../resource-post/related-resources/related-resources.component.scss'\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NoDataComponent, ResourceEditCardLazyComponent, LazyImgDirective, TranslocoPipe]\n})\nexport class TestimonialCardListComponent implements OnChanges {\n @Output() editPost: EventEmitter<object> = new EventEmitter();\n\n @Input() posts: Resource[] = [];\n @Input() postHeader = '';\n @Input() canEdit = false;\n swiper;\n\n ngOnChanges(changes): void {\n if (changes.posts && this.posts?.length) {\n setTimeout(() => this.initSwiper(), 0); // Wait for DOM to render\n }\n }\n\n private async initSwiper() {\n // Dynamically import Swiper only when needed (lazy-load ~150KB library)\n const { default: Swiper } = await import('swiper');\n const { Navigation, Pagination } = await import('swiper/modules');\n\n this.swiper = new Swiper('.swiper-container', {\n modules: [Navigation, Pagination],\n slidesPerView: 1,\n spaceBetween: 24,\n centeredSlides: true,\n touchRatio: 1,\n touchAngle: 45,\n grabCursor: true,\n navigation: {\n nextEl: '.swiper-button-next',\n prevEl: '.swiper-button-prev'\n },\n pagination: {\n el: '.swiper-pagination',\n clickable: true\n },\n breakpoints: {\n 425: {\n slidesPerView: 1.05,\n centeredSlides: true\n },\n 470: {\n slidesPerView: 1.25,\n centeredSlides: true\n },\n 564: {\n slidesPerView: 1.5,\n centeredSlides: true\n },\n 640: {\n slidesPerView: 1.5,\n centeredSlides: true\n },\n 768: {\n slidesPerView: 1.5,\n centeredSlides: true\n },\n 1024: {\n slidesPerView: 2, // Allow room between cards\n centeredSlides: false\n },\n 1200: {\n slidesPerView: 3,\n centeredSlides: false\n }\n }\n });\n }\n}\n","<section class=\"resource-section section-outer bg-white\">\n <div class=\"container\">\n @if (postHeader) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap mb-3\">\n <h2 class=\"section-heading\">{{postHeader}}</h2>\n </div>\n }\n @if (posts.length === 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n <div [hidden]=\"posts.length === 0\">\n <div class=\"swiper-container\">\n <div class=\"swiper-wrapper\">\n @for (post of posts; track post) {\n <div class=\"swiper-slide\">\n <div class=\"testimonial-box\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEdit\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"editPost.emit(1, 100)\">\n </pw-resource-edit-card-lazy>\n <div class=\"stars mb-5\">★★★★★</div>\n <div class=\"testimonial-content\">\n <div class=\"ql-container ql-snow ql-res\">\n <div class=\"ql-editor\"\n [innerHTML]=\"post?.body\">\n </div>\n </div>\n </div>\n <!-- THIS STAYS AT BOTTOM -->\n <div class=\"avatar-container\">\n @if (!post.rectangular_picture.url.includes('default-photo.jpg') ) {\n <img\n [src]=\"post.rectangular_picture.url\"\n alt=\"Logo\"\n class=\"testimonial-logo mt-4\"\n />\n }\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"swiper-pagination\"></div>\n <div class=\"swiper-button-prev\"></div>\n <div class=\"swiper-button-next\"></div>\n </div>\n </div>\n </div>\n</section>"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,SAAiB;CACnB;EACI,MAAM;EACN,WAAW;EACX,oBACI,OAAO,+DAAsC,CAAC,MAAK,MAAK,EAAE,kBAAkB;CACnF;CACD;EACI,MAAM;EACN,oBACI,OAAO,8DAAoC,CAAC,MAAK,MAAK,EAAE,iBAAiB;CAChF;CACD;E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B;GAAa;GAAC,UAAA;GAAA,QAAA,CAAA,+jEAAA,sjFAAA;EAAA,CAAA;;;EAGzF,UAAA,CAAA,EAAA,MAAA,OAAA,CAAA;EAEA,OAAA,CAAA,EAAA,MAAA,MAAA,CAAA;EACA,YAAA,CAAA,EAAA,MAAA,MAAA,CAAA;EACA,SAAA,CAAA,EAAA,MAAA,MAAA,CAAA"}
1
+ {"version":3,"file":"posiwise-resource-module.mjs","names":["i1"],"sources":["../../../../libs/resource-module/src/lib/public/resource-public.routing.module.ts","../../../../libs/resource-module/src/lib/public/resource-public.module.ts","../../../../libs/resource-module/src/lib/resource.module.ts","../../../../libs/resource-module/src/lib/public/components/resource-company-card/resource-company-card.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-company-card/resource-company-card.component.html","../../../../libs/resource-module/src/lib/public/components/resource-top-banner-edit/resource-top-banner-edit.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-top-banner-edit/resource-top-banner-edit.component.html","../../../../libs/resource-module/src/lib/public/shared/resource-shared.module.ts","../../../../libs/resource-module/src/lib/public/components/testimonial-card/testimonial-card.component.ts","../../../../libs/resource-module/src/lib/public/components/testimonial-card/testimonial-card.component.html"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\n// Lazy loaded routes - each route now loads its own module with only the components it needs\nconst routes: Routes = [\n {\n path: '',\n pathMatch: 'full',\n loadChildren: () =>\n import('./modules/root/resource-root.module').then(m => m.ResourceRootModule)\n },\n {\n path: 'hub',\n loadChildren: () =>\n import('./modules/hub/resource-hub.module').then(m => m.ResourceHubModule)\n },\n {\n path: 'blogs',\n loadChildren: () =>\n import('./modules/blogs/resource-blogs.module').then(m => m.ResourceBlogsModule)\n },\n {\n path: 'videos',\n loadChildren: () =>\n import('./modules/videos/resource-videos.module').then(m => m.ResourceVideosModule)\n },\n {\n path: 'integrations',\n loadChildren: () =>\n import('./modules/integrations/resource-integrations.module').then(\n m => m.ResourceIntegrationsModule\n )\n },\n {\n path: 'release-notes',\n loadChildren: () =>\n import('./modules/release-notes/resource-release-notes.module').then(\n m => m.ResourceReleaseNotesModule\n )\n },\n {\n path: 'events',\n loadChildren: () =>\n import('./modules/events/resource-events.module').then(m => m.ResourceEventsModule)\n },\n {\n path: 'white-papers',\n loadChildren: () =>\n import('./modules/white-papers/resource-white-papers.module').then(\n m => m.ResourceWhitePapersModule\n )\n },\n {\n path: 'case-studies',\n loadChildren: () =>\n import('./modules/case-studies/resource-case-studies.module').then(\n m => m.ResourceCaseStudiesModule\n )\n },\n {\n path: 'careers',\n loadChildren: () =>\n import('./modules/jobs/resource-jobs.module').then(m => m.ResourceJobsModule)\n },\n {\n path: 'view/:slug',\n loadChildren: () =>\n import('./modules/post/resource-post.module').then(m => m.ResourcePostModule)\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class BlogPublicRoutingModule {}\n","import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\n\nimport { ResourceService } from '../resource.service';\n\nimport { BlogPublicRoutingModule } from './resource-public.routing.module';\n\n@NgModule({\n imports: [BlogPublicRoutingModule],\n providers: [ResourceService],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourcePublicModule {}\n","import { NgModule } from '@angular/core';\n\nimport { ResourcePublicModule } from './public/resource-public.module';\n\n@NgModule({\n imports: [ResourcePublicModule]\n})\nexport class ResourceModule {}\n","import { NgClass, NgTemplateOutlet, SlicePipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n EventEmitter,\n inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ResourcePost, User } from '@posiwise/common-utilities';\nimport { LazyImgDirective } from '@posiwise/directives';\nimport { HelperService } from '@posiwise/helper-service';\nimport { NoDataComponent } from '@posiwise/shared-components';\n\nimport { Bind } from 'primeng/bind';\nimport { Paginator } from 'primeng/paginator';\nimport { Subject } from 'rxjs';\n\nimport { TranslocoPipe } from '@jsverse/transloco';\n\nimport { ResourceEditCardLazyComponent } from '../resource-edit-card-lazy/resource-edit-card-lazy.component';\n\ninterface PageEvent {\n first: number;\n rows: number;\n page: number;\n pageCount: number;\n}\n@Component({\n selector: 'pw-resource-company-card',\n templateUrl: './resource-company-card.component.html',\n styleUrl: './resource-company-card.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgClass,\n NoDataComponent,\n LazyImgDirective,\n ResourceEditCardLazyComponent,\n NgTemplateOutlet,\n Bind,\n Paginator,\n SlicePipe,\n TranslocoPipe\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceCompanyCardComponent\n extends AppBaseComponent\n implements OnChanges, OnInit, OnDestroy\n{\n private readonly cdr = inject(ChangeDetectorRef);\n\n @Output() getPosts = new EventEmitter<ResourcePost[]>();\n private readonly destroy$ = new Subject<void>();\n\n canEditResourcesValue = false;\n @Input() header = '';\n @Input() data = [];\n @Input() integrationCountDisplay;\n @Input() vendor = false;\n @Input() user: User;\n @Input() userLoggedIn: boolean;\n\n postData = false;\n filteredData = [];\n first = 0;\n rows = 12;\n subscriptionId: string;\n\n ngOnChanges(): void {\n this.search();\n }\n ngOnInit() {\n if (this.userLoggedIn) {\n this.updateCanEditResourcesValue();\n this.localStorage.getItem$('product').subscribe(res => {\n const data = res ? JSON.parse(res) : null;\n this.subscriptionId = data?.subscriptionId;\n this.cdr.markForCheck();\n });\n }\n }\n search(keywords?) {\n if (keywords) {\n this.filteredData = this.data.filter(x =>\n x.title.toLowerCase().includes(keywords.toLowerCase())\n );\n if (this.filteredData.length === 0) {\n this.postData = true;\n } else {\n this.postData = false;\n }\n } else {\n this.filteredData = [...this.data];\n this.postData = false;\n }\n }\n onPageChange(event: PageEvent) {\n this.first = event.first;\n this.rows = event.rows;\n }\n\n override ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n private updateCanEditResourcesValue(): void {\n this.canEditResourcesValue = HelperService.canEditResources(\n this.user,\n this.userLoggedIn,\n this.permissionService\n );\n }\n\n canEditResources(): boolean {\n return this.canEditResourcesValue;\n }\n\n /** Show no-data when there is integration count but no posts (postData is false, filteredData empty). */\n get showNoPostsMessage(): boolean {\n return (\n this.integrationCountDisplay > 0 &&\n !this.postData &&\n (!this.filteredData || this.filteredData.length === 0)\n );\n }\n}\n","<div [ngClass]=\"{ 'vendors-distributor-wrapper': !vendor }\">\n <div class=\"d-flex justify-content-between align-items-center mb-3 search-container\">\n <div>\n <span class=\"int-span\">{{header}}</span>\n </div>\n @if (integrationCountDisplay > 0) {\n <div class=\"search-wrapper position-relative\">\n <i class=\"fa fa-search search-icon\"></i>\n <input type=\"text\"\n (keyup)=\"search($event.target.value)\"\n placeholder=\"Search eg security\"\n class=\"search-input top-search-input\" id=\"input_search_eg_security_9712\" name=\"input_search_eg_security_9712\"\n aria-label=\"Search eg security\" />\n </div>\n }\n\n </div>\n\n @if (postData) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\"> </pw-no-data>\n </div>\n }\n\n @if (showNoPostsMessage) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"></pw-no-data>\n </div>\n }\n\n @if (!postData && integrationCountDisplay > 0 && filteredData.length > 0) {\n <div class=\"row\">\n @for (img of filteredData | slice:first:(first + rows); track img) {\n <div class=\"col-md-3 mt-4\"\n >\n <div class=\"boxes d-flex align-items-center justify-content-center\">\n @if (img?.companyImg) {\n <img [src]=\"img.companyImg\" alt=\"Vendor Company Icon\" class=\"vendor-icon\" />\n } @else {\n @if (img?.rectangular_picture?.url) {\n @if (!img.rectangular_picture.url.includes('default-photo')) {\n @if (img?.showcase) {\n <a class=\"vendor-link\" [href]=\"img.external_url || ('/resources/view/' + img.slug)\">\n <img [src]=\"img.rectangular_picture.url\" alt=\"Vendor Rectangular Company Icon\" class=\"vendor-icon\" />\n </a>\n } @else {\n <img [src]=\"img.rectangular_picture.url\" alt=\"Vendor Rectangular Company Icon\" class=\"vendor-icon\" />\n }\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"img?.id\"\n [resourceData]=\"img\"\n (updated)=\"getPosts.emit()\">\n </pw-resource-edit-card-lazy>\n } @else {\n @if (img?.showcase) {\n <a class=\"vendor-link\" [href]=\"img.external_url || ('/resources/view/' + img.slug)\">\n <span class=\"vendor-name text-center mt-2\">{{ img?.title }}</span>\n </a>\n } @else {\n <span class=\"vendor-name text-center\">{{ img?.title }}</span>\n }\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"img?.id\"\n [resourceData]=\"img\"\n (updated)=\"getPosts.emit()\">\n </pw-resource-edit-card-lazy>\n }\n } @else {\n <ng-template [ngTemplateOutlet]=\"noImage\"></ng-template>\n }\n }\n </div>\n </div>\n }\n @if (filteredData.length > 0) {\n <div class=\"customPaginator d-flex align-items-center mt-5 justify-content-center\"\n >\n <p-paginator\n [first]=\"first\"\n [rows]=\"rows\"\n [totalRecords]=\"filteredData.length\"\n (onPageChange)=\"onPageChange($event)\"></p-paginator>\n </div>\n }\n </div>\n }\n</div>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n EventEmitter,\n inject,\n Input,\n OnInit,\n Output,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { FormBuilder, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { TagService } from '@posiwise/common-services';\nimport { User } from '@posiwise/common-utilities';\nimport { ButtonBusyDirective, LazyImgDirective } from '@posiwise/directives';\nimport { HelperService } from '@posiwise/helper-service';\nimport { InputContainerComponent } from '@posiwise/shared-components';\nimport { CustomUploaderComponent, ProfileImageCropperComponent } from '@posiwise/utils';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\n@Component({\n selector: 'pw-resource-top-banner-edit',\n templateUrl: './resource-top-banner-edit.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n FormsModule,\n ReactiveFormsModule,\n InputContainerComponent,\n LazyImgDirective,\n ButtonBusyDirective,\n ProfileImageCropperComponent\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceTopBannerEditComponent extends AppBaseComponent implements OnInit {\n private readonly fb = inject(FormBuilder);\n private readonly modalService = inject(NgbModal);\n private readonly tagService = inject(TagService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n @Input() blogPostTag;\n @Input() user: User;\n @Input() userLoggedIn: boolean;\n @Output() getUpdatedTag = new EventEmitter();\n @ViewChild('editModal') editModal: TemplateRef<CustomUploaderComponent>;\n @ViewChild('imageCropContent') imageCropContent: TemplateRef<CustomUploaderComponent>;\n\n form: FormGroup;\n image: string | null = null;\n defaultImage = 'assets/img/resource/blog.png';\n file: File;\n subscriptionId: string;\n imageModalRef;\n buttonBusy: boolean;\n\n ngOnInit(): void {\n if (this.userLoggedIn) {\n this.localStorage.getItem$('product').subscribe(res => {\n const data = res ? JSON.parse(res) : null;\n this.subscriptionId = data?.subscriptionId;\n this.cdr.markForCheck();\n });\n }\n this.form = this.fb.group({\n title: [this.blogPostTag?.title ?? ''],\n description: [this.blogPostTag?.description ?? ''],\n meta_title: [this.blogPostTag?.meta_title ?? ''],\n meta_description: [this.blogPostTag?.meta_description ?? '']\n });\n\n this.image = this.blogPostTag?.image?.url ?? null;\n }\n\n openEditModal() {\n this.modalService.open(this.editModal, { centered: true, size: 'lg' });\n }\n\n openImageModal(modalRef) {\n this.imageModalRef = this.modalService.open(modalRef, { centered: true });\n }\n\n onImageSelected(base64: string): void {\n this.image = base64;\n this.file = HelperService.convertBase64ToFile(base64);\n this.imageModalRef?.close();\n }\n\n onClose() {\n this.imageModalRef?.close();\n }\n\n removeImage() {\n this.image = null;\n }\n\n handleImageError(event: Event) {\n (event.target as HTMLImageElement).src = this.defaultImage;\n }\n\n save() {\n this.buttonBusy = true;\n const payload = {\n title: this.form.value.title ?? this.blogPostTag?.title,\n description: this.form.value.description ?? this.blogPostTag?.description,\n meta_title: this.form.value.meta_title ?? this.blogPostTag?.meta_title,\n meta_description:\n this.form.value.meta_description ?? this.blogPostTag?.meta_description,\n tag_category_id: this.blogPostTag?.tag_category_id,\n tag_type: this.blogPostTag?.tag_type,\n subscription_id: this.subscriptionId,\n name: this.blogPostTag?.name\n };\n\n if (this.file) {\n payload['image'] = this.file;\n } else if (!this.image) {\n payload['remove_image'] = true;\n }\n\n this.tagService.updateTagById(this.blogPostTag?.id, payload).subscribe(() => {\n this.buttonBusy = false;\n this.toast.success('Tag Updated');\n this.getUpdatedTag.emit();\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n });\n }\n}\n","<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-black in-page-edit-icon mb-1 ms-3\"\n (click)=\"openEditModal()\"\n (keydown.enter)=\"openEditModal()\"\n (keydown.space)=\"openEditModal()\"\n title=\"Edit Blog Tag\"></i>\n</div>\n\n<ng-template #editModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Blog Post Tag</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row\">\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"\n aria-label=\"Title\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Description\" name=\"description\" controlId=\"resource-top-banner-description\">\n <textarea id=\"resource-top-banner-description\" name=\"description\" class=\"form-control\" rows=\"4\" formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Title\" name=\"meta_title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"meta_title\" placeholder=\"Meta Title for SEO\" id=\"input_meta_title_2\" name=\"input_meta_title_2\"\n aria-label=\"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\" controlId=\"resource-top-banner-meta_description\">\n <textarea id=\"resource-top-banner-meta_description\" name=\"meta_description\" class=\"form-control\" rows=\"3\" formControlName=\"meta_description\" placeholder=\"Meta Description for SEO\"\n aria-label=\"Meta Description for SEO\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 my-4\">\n <span id=\"resource-top-banner-tag-image-label\" class=\"pw-label-style\">Blog Tag Image</span>\n <div class=\"text-center d-flex flex-column align-items-center col-6\">\n <img [src]=\"image || defaultImage\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n (keydown.space)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Blog\"\n (error)=\"handleImageError($event)\"\n />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <button type=\"button\" class=\"btn btn-link p-0 d-inline-block mt-2\"\n (click)=\"openImageModal(imageCropContent)\">\n {{ image ? 'Update' : 'Add' }} Image\n </button>\n @if (image) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (keydown.enter)=\"removeImage()\"\n (keydown.space)=\"removeImage()\"\n (click)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n\n </div>\n </form>\n </div>\n\n <div class=\"modal-footer\">\n <button class=\"btn btn-secondary\" (click)=\"modal.dismiss()\">Cancel</button>\n <button class=\"btn btn-primary\" [buttonBusy]=\"buttonBusy\" (click)=\"save()\">Save</button>\n </div>\n</ng-template>\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Image</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. Avoid artwork, celebrities, or copyrighted images.</small>\n <pw-image-cropper\n #cropper\n aspectRatio=\"dynamic\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n","import { CommonModule } from '@angular/common';\nimport { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\n\nimport { HubSpotMeetingsSharedModule } from '@posiwise/alpha-module';\nimport { CoreTranslocoModule } from '@posiwise/core-transloco';\nimport { DirectivesModule } from '@posiwise/directives';\nimport { PipesModule } from '@posiwise/pipes';\nimport { ResourceSharedComponentsModule } from '@posiwise/shared-components';\n\nimport { IconFieldModule } from 'primeng/iconfield';\nimport { InputIconModule } from 'primeng/inputicon';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { TextareaModule } from 'primeng/textarea';\n\nimport { TranslocoModule } from '@jsverse/transloco';\n\nimport { ResourceCompanyCardComponent } from '../components/resource-company-card/resource-company-card.component';\nimport { ResourceTopBannerEditComponent } from '../components/resource-top-banner-edit/resource-top-banner-edit.component';\n\nimport { ResourceCardsModule } from './resource-cards.module';\n\n// Shared components used across multiple resource routes\n// Note: Most heavy modules (Quill, Calendar, UiSwitch, etc.) are now in ResourceCardsModule\n@NgModule({\n imports: [\n CommonModule,\n RouterModule,\n FormsModule,\n ReactiveFormsModule,\n PipesModule,\n ResourceSharedComponentsModule,\n CoreTranslocoModule,\n TranslocoModule,\n DirectivesModule,\n InputTextModule,\n IconFieldModule,\n InputIconModule,\n TextareaModule,\n ResourceCardsModule,\n HubSpotMeetingsSharedModule, // For pw-book-a-demo component (HubSpotMeetingsComponent)\n ResourceCompanyCardComponent,\n ResourceTopBannerEditComponent\n ],\n exports: [\n // Export the 2 components specific to this module\n ResourceCompanyCardComponent,\n ResourceTopBannerEditComponent,\n // Export card components module (includes all heavy modules + card components)\n ResourceCardsModule,\n // Export HubSpotMeetingsSharedModule to make pw-book-a-demo component available\n HubSpotMeetingsSharedModule,\n // Export common lightweight modules\n CommonModule,\n RouterModule,\n FormsModule,\n ReactiveFormsModule,\n PipesModule,\n ResourceSharedComponentsModule,\n CoreTranslocoModule,\n TranslocoModule,\n DirectivesModule,\n InputTextModule,\n IconFieldModule,\n InputIconModule,\n TextareaModule\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceSharedModule {}\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output\n} from '@angular/core';\n\nimport { Resource } from '@posiwise/common-utilities';\nimport { LazyImgDirective } from '@posiwise/directives';\nimport { NoDataComponent } from '@posiwise/shared-components';\n\nimport { TranslocoPipe } from '@jsverse/transloco';\n\nimport { ResourceEditCardLazyComponent } from '../resource-edit-card-lazy/resource-edit-card-lazy.component';\n\n@Component({\n selector: 'pw-testimonial-card',\n templateUrl: './testimonial-card.component.html',\n styleUrls: [\n './testimonial-card.component.scss',\n '../resource-post/related-resources/related-resources.component.scss'\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NoDataComponent, ResourceEditCardLazyComponent, LazyImgDirective, TranslocoPipe]\n})\nexport class TestimonialCardListComponent implements OnChanges {\n @Output() editPost: EventEmitter<object> = new EventEmitter();\n\n @Input() posts: Resource[] = [];\n @Input() postHeader = '';\n @Input() canEdit = false;\n swiper;\n\n ngOnChanges(changes): void {\n if (changes.posts && this.posts?.length) {\n setTimeout(() => this.initSwiper(), 0); // Wait for DOM to render\n }\n }\n\n private async initSwiper() {\n // Dynamically import Swiper only when needed (lazy-load ~150KB library)\n const { default: Swiper } = await import('swiper');\n const { Navigation, Pagination } = await import('swiper/modules');\n\n this.swiper = new Swiper('.swiper-container', {\n modules: [Navigation, Pagination],\n slidesPerView: 1,\n spaceBetween: 24,\n centeredSlides: true,\n touchRatio: 1,\n touchAngle: 45,\n grabCursor: true,\n navigation: {\n nextEl: '.swiper-button-next',\n prevEl: '.swiper-button-prev'\n },\n pagination: {\n el: '.swiper-pagination',\n clickable: true\n },\n breakpoints: {\n 425: {\n slidesPerView: 1.05,\n centeredSlides: true\n },\n 470: {\n slidesPerView: 1.25,\n centeredSlides: true\n },\n 564: {\n slidesPerView: 1.5,\n centeredSlides: true\n },\n 640: {\n slidesPerView: 1.5,\n centeredSlides: true\n },\n 768: {\n slidesPerView: 1.5,\n centeredSlides: true\n },\n 1024: {\n slidesPerView: 2, // Allow room between cards\n centeredSlides: false\n },\n 1200: {\n slidesPerView: 3,\n centeredSlides: false\n }\n }\n });\n }\n}\n","<section class=\"resource-section section-outer bg-white\">\n <div class=\"container\">\n @if (postHeader) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap mb-3\">\n <h2 class=\"section-heading\">{{postHeader}}</h2>\n </div>\n }\n @if (posts.length === 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n <div [hidden]=\"posts.length === 0\">\n <div class=\"swiper-container\">\n <div class=\"swiper-wrapper\">\n @for (post of posts; track post) {\n <div class=\"swiper-slide\">\n <div class=\"testimonial-box\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEdit\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"editPost.emit(1, 100)\">\n </pw-resource-edit-card-lazy>\n <div class=\"stars mb-5\">★★★★★</div>\n <div class=\"testimonial-content\">\n <div class=\"ql-container ql-snow ql-res\">\n <div class=\"ql-editor\"\n [innerHTML]=\"post?.body\">\n </div>\n </div>\n </div>\n <!-- THIS STAYS AT BOTTOM -->\n <div class=\"avatar-container\">\n @if (!post.rectangular_picture.url.includes('default-photo.jpg') ) {\n <img\n [src]=\"post.rectangular_picture.url\"\n alt=\"Logo\"\n class=\"testimonial-logo mt-4\"\n />\n }\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"swiper-pagination\"></div>\n <div class=\"swiper-button-prev\"></div>\n <div class=\"swiper-button-next\"></div>\n </div>\n </div>\n </div>\n</section>"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,SAAiB;CACnB;EACI,MAAM;EACN,WAAW;EACX,oBACI,OAAO,+DAAsC,CAAC,MAAK,MAAK,EAAE,kBAAkB;CACnF;CACD;EACI,MAAM;EACN,oBACI,OAAO,8DAAoC,CAAC,MAAK,MAAK,EAAE,iBAAiB;CAChF;CACD;EACI,MAAM;EACN,oBACI,OAAO,gEAAwC,CAAC,MAAK,MAAK,EAAE,mBAAmB;CACtF;CACD;EACI,MAAM;EACN,oBACI,OAAO,iEAA0C,CAAC,MAAK,MAAK,EAAE,oBAAoB;CACzF;CACD;EACI,MAAM;EACN,oBACI,OAAO,uEAAsD,CAAC,MAC1D,MAAK,EAAE,0BAA0B;CAE5C;CACD;EACI,MAAM;EACN,oBACI,OAAO,wEAAwD,CAAC,MAC5D,MAAK,EAAE,0BAA0B;CAE5C;CACD;EACI,MAAM;EACN,oBACI,OAAO,iEAA0C,CAAC,MAAK,MAAK,EAAE,oBAAoB;CACzF;CACD;EACI,MAAM;EACN,oBACI,OAAO,uEAAsD,CAAC,MAC1D,MAAK,EAAE,yBAAyB;CAE3C;CACD;EACI,MAAM;EACN,oBACI,OAAO,uEAAsD,CAAC,MAC1D,MAAK,EAAE,yBAAyB;CAE3C;CACD;EACI,MAAM;EACN,oBACI,OAAO,+DAAsC,CAAC,MAAK,MAAK,EAAE,kBAAkB;CACnF;CACD;EACI,MAAM;EACN,oBACI,OAAO,+DAAsC,CAAC,MAAK,MAAK,EAAE,kBAAkB;CACnF;AACJ;AAMD,IAAa,0BAAb,MAAa,wBAAuB;CAAvB;EAAA,KAAA,OAAA,GAAA,mBAAA;GA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4B,cAAA;GAAA,UAAA;GAAA,QAAA;IAAA,OAAA;IAAA,YAAA;IAAA,SAAA;GAAA;GAAA,SAAA,EAAA,UAAA,WAAA;GAAA,eAAA;GAAA,UAAA;GAAA,UC3BzC;GAoDU,QAAA,CAAA,+jEAAA,sjFAAA;GAAA,cAAA;IAAA;KAAA,MAAA;KAAA,MD3BI;KAAe,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;KAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAA6B,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;KAAA;KAAA,SAAA,CAAA,SAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAgB,UAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAa,MAAA;IAAA;GAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAEhF,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA4B,YAAA,CAAA;EAVxC,MAAA;EACa,MAAA,CAAA;GAAA,UAAA;GAAqB,iBAMd,wBAAwB;GAAM,SACtC;IAAC;IAAiB;IAA+B;IAAkB;GAAa;GAAC,UAAA;GAAA,QAAA,CAAA,+jEAAA,sjFAAA;EAAA,CAAA;;;EAGzF,UAAA,CAAA,EAAA,MAAA,OAAA,CAAA;EAEA,OAAA,CAAA,EAAA,MAAA,MAAA,CAAA;EACA,YAAA,CAAA,EAAA,MAAA,MAAA,CAAA;EACA,SAAA,CAAA,EAAA,MAAA,MAAA,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posiwise/resource-module",
3
- "version": "0.0.205",
3
+ "version": "0.0.207",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.2.0",
6
6
  "@angular/core": "^22.2.0",
@@ -3,15 +3,15 @@ import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleCh
3
3
  import * as i1$2 from "@angular/router";
4
4
  import * as i1$1 from "@posiwise/resource-contact-us";
5
5
  import * as i1 from "@angular/common";
6
- import * as i3$1 from "@angular/forms";
6
+ import * as i3 from "@angular/forms";
7
7
  import { FormGroup } from "@angular/forms";
8
- import * as i4$1 from "@posiwise/pipes";
8
+ import * as i4 from "@posiwise/pipes";
9
9
  import * as i7 from "@posiwise/shared-components";
10
10
  import * as i8 from "@posiwise/core-transloco";
11
- import * as i9$2 from "@jsverse/transloco";
12
- import * as i10$2 from "@posiwise/directives";
13
- import * as i9$1 from "primeng/inputtext";
14
- import * as i10$1 from "primeng/iconfield";
11
+ import * as i9$1 from "@jsverse/transloco";
12
+ import * as i10$1 from "@posiwise/directives";
13
+ import * as i9 from "primeng/inputtext";
14
+ import * as i10 from "primeng/iconfield";
15
15
  import * as i11 from "primeng/inputicon";
16
16
  import * as i12 from "primeng/textarea";
17
17
  import * as i5 from "primeng/paginator";
@@ -21,15 +21,10 @@ import * as i12$1 from "ngx-captcha";
21
21
  import { SafeResourceUrl } from "@angular/platform-browser";
22
22
  import { AppBaseComponent } from "@posiwise/app-base-component";
23
23
  import { Paging, Resource, ResourcePost, User } from "@posiwise/common-utilities";
24
+ import { ListResponse, TagService } from "@posiwise/common-services";
24
25
  import { Observable } from "rxjs";
25
- import { TagService } from "@posiwise/common-services";
26
26
  import * as i14 from "@posiwise/alpha-module";
27
27
  import { CustomUploaderComponent } from "@posiwise/utils";
28
- import * as i3 from "primeng/datepicker";
29
- import * as i4 from "primeng/autocomplete";
30
- import * as i9 from "ngx-quill";
31
- import * as i10 from "ngx-ui-switch";
32
- import { NgbModal } from "@ng-bootstrap/ng-bootstrap";
33
28
  declare namespace resource_public_routing_module_d_exports {
34
29
  export { BlogPublicRoutingModule };
35
30
  }
@@ -63,25 +58,22 @@ export declare class ResourceService {
63
58
  private readonly api;
64
59
  private readonly resource;
65
60
  private readonly comments;
66
- getPublicPosts(master_subscription_id: any, page: number, pageSize: number, search: string, tagCategoryIds?: string, tagIds?: string, extraParams?: Record<string, string | number>): import("rxjs").Observable<any>;
67
- getAdminPosts(subscriptionId: any, paging?: Paging): import("rxjs").Observable<any>;
68
- addPost(post: any): import("rxjs").Observable<any>;
69
- getPostBySlug(slug: string): import("rxjs").Observable<any>;
70
- deletePost(id: any): import("rxjs").Observable<any>;
71
- updatePost(post: any, id: any): import("rxjs").Observable<any>;
61
+ getPublicPosts<T = PublicPost>(master_subscription_id: any, page: number, pageSize: number, search: string, tagCategoryIds?: string, tagIds?: string, extraParams?: Record<string, string | number>): import("rxjs").Observable<import("@posiwise/common-services").ListResponse<T>>;
62
+ getAdminPosts<T>(subscriptionId: any, paging?: Paging): import("rxjs").Observable<import("@posiwise/common-services").ListResponse<T>>;
63
+ addPost<T>(post: any): import("rxjs").Observable<import("@posiwise/common-services").WriteResponse<T>>;
64
+ getPostBySlug<T = PublicPost>(slug: string): import("rxjs").Observable<import("@posiwise/common-services").ItemResponse<T>>;
65
+ deletePost(id: any): import("rxjs").Observable<import("@posiwise/common-services").WriteResponse<{
66
+ message: string;
67
+ }>>;
68
+ updatePost<T>(post: any, id: any): import("rxjs").Observable<import("@posiwise/common-services").WriteResponse<T>>;
72
69
  private toPostFormData;
73
70
  private getComments;
74
- postComments(post: any): import("rxjs").Observable<any>;
75
- getResourceInsight(subscription_id: any, starting_at?: string, ending_at?: string): import("rxjs").Observable<any>;
76
- getResourcePostsInsight(id: any): import("rxjs").Observable<any>;
71
+ postComments<T>(post: any): import("rxjs").Observable<import("@posiwise/common-services").WriteResponse<T>>;
72
+ getResourceInsight<T>(subscription_id: any, starting_at?: string, ending_at?: string): import("rxjs").Observable<import("@posiwise/common-services").ItemResponse<T>>;
73
+ getResourcePostsInsight<T>(id: any): import("rxjs").Observable<import("@posiwise/common-services").ListResponse<T>>;
77
74
  static ɵfac: i0.ɵɵFactoryDeclaration<ResourceService, never>;
78
75
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
79
76
  }
80
- /** One page of `/posts/get_all`; `object_count` is the total after filtering. */
81
- interface ResourcePostsPage<T> {
82
- posts?: T[];
83
- object_count?: number;
84
- }
85
77
  /** Sort sent to `/posts/get_all` so that pages line up with the order the cards are shown. */
86
78
  declare const NEWEST_PUBLISHED_FIRST: {
87
79
  order_by: string;
@@ -91,6 +83,10 @@ declare const NEWEST_PUBLISHED_FIRST: {
91
83
  type PublicPost = Resource & {
92
84
  showcase?: boolean;
93
85
  when?: string;
86
+ published_at?: string;
87
+ rectangular_picture?: {
88
+ url?: string;
89
+ };
94
90
  };
95
91
  /** What to list: the subscription plus a tag category or specific tags. */
96
92
  interface PublicPostsQuery {
@@ -119,7 +115,7 @@ declare class ResourcePager<T> {
119
115
  private fetched;
120
116
  private total;
121
117
  private generation;
122
- constructor(fetchPage: (page: number, pageSize: number) => Observable<ResourcePostsPage<T>>, onChange: () => void, keep?: (post: T) => boolean, pageSize?: number);
118
+ constructor(fetchPage: (page: number, pageSize: number) => Observable<ListResponse<T>>, onChange: () => void, keep?: (post: T) => boolean, pageSize?: number);
123
119
  /** A pager over the public `/posts` list, newest-published first. */
124
120
  static forPublicPosts(service: ResourceService, query: () => PublicPostsQuery, onChange: () => void, keep: (post: PublicPost) => boolean, pageSize?: number): ResourcePager<PublicPost>;
125
121
  get hasMore(): boolean;
@@ -722,7 +718,7 @@ declare namespace resource_cards_module_d_exports {
722
718
  */
723
719
  export declare class ResourceCardsModule {
724
720
  static ɵfac: i0.ɵɵFactoryDeclaration<ResourceCardsModule, never>;
725
- static ɵmod: i0.ɵɵNgModuleDeclaration<ResourceCardsModule, never, [typeof i1.CommonModule, typeof i1$2.RouterModule, typeof i3$1.FormsModule, typeof i3$1.ReactiveFormsModule, typeof i4$1.PipesModule, typeof i5.PaginatorModule, typeof i6.SelectModule, typeof i7.ResourceSharedComponentsModule, typeof i8.CoreTranslocoModule, typeof i9$2.TranslocoModule, typeof i10$2.DirectivesModule, typeof i11$1.DragDropModule, typeof i12$1.NgxCaptchaModule, typeof Trial4ContactUsModule, typeof ResourceVideoCardComponent, typeof UpcomingEventCardComponent, typeof ReplayEventCardComponent, typeof ResourceCardComponent, typeof CaseStudyCardComponent, typeof ResourceNoteCardComponent, typeof ResourceVaultComponent, typeof ResourceEditCardLazyComponent], [typeof ResourceVideoCardComponent, typeof UpcomingEventCardComponent, typeof ResourceCardComponent, typeof CaseStudyCardComponent, typeof ResourceNoteCardComponent, typeof ResourceVaultComponent, typeof Trial4ContactUsModule, typeof ResourceEditCardLazyComponent, typeof i5.PaginatorModule]>;
721
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ResourceCardsModule, never, [typeof i1.CommonModule, typeof i1$2.RouterModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.PipesModule, typeof i5.PaginatorModule, typeof i6.SelectModule, typeof i7.ResourceSharedComponentsModule, typeof i8.CoreTranslocoModule, typeof i9$1.TranslocoModule, typeof i10$1.DirectivesModule, typeof i11$1.DragDropModule, typeof i12$1.NgxCaptchaModule, typeof Trial4ContactUsModule, typeof ResourceVideoCardComponent, typeof UpcomingEventCardComponent, typeof ReplayEventCardComponent, typeof ResourceCardComponent, typeof CaseStudyCardComponent, typeof ResourceNoteCardComponent, typeof ResourceVaultComponent, typeof ResourceEditCardLazyComponent], [typeof ResourceVideoCardComponent, typeof UpcomingEventCardComponent, typeof ResourceCardComponent, typeof CaseStudyCardComponent, typeof ResourceNoteCardComponent, typeof ResourceVaultComponent, typeof Trial4ContactUsModule, typeof ResourceEditCardLazyComponent, typeof i5.PaginatorModule]>;
726
722
  static ɵinj: i0.ɵɵInjectorDeclaration<ResourceCardsModule>;
727
723
  }
728
724
  declare namespace resource_company_card_component_d_exports {
@@ -838,124 +834,9 @@ export declare class ResourceTopBannerEditComponent extends AppBaseComponent imp
838
834
  }
839
835
  export declare class ResourceSharedModule {
840
836
  static ɵfac: i0.ɵɵFactoryDeclaration<ResourceSharedModule, never>;
841
- static ɵmod: i0.ɵɵNgModuleDeclaration<ResourceSharedModule, never, [typeof i1.CommonModule, typeof i1$2.RouterModule, typeof i3$1.FormsModule, typeof i3$1.ReactiveFormsModule, typeof i4$1.PipesModule, typeof i7.ResourceSharedComponentsModule, typeof i8.CoreTranslocoModule, typeof i9$2.TranslocoModule, typeof i10$2.DirectivesModule, typeof i9$1.InputTextModule, typeof i10$1.IconFieldModule, typeof i11.InputIconModule, typeof i12.TextareaModule, typeof ResourceCardsModule, typeof i14.HubSpotMeetingsSharedModule, typeof ResourceCompanyCardComponent, typeof ResourceTopBannerEditComponent], [typeof ResourceCompanyCardComponent, typeof ResourceTopBannerEditComponent, typeof ResourceCardsModule, typeof i14.HubSpotMeetingsSharedModule, typeof i1.CommonModule, typeof i1$2.RouterModule, typeof i3$1.FormsModule, typeof i3$1.ReactiveFormsModule, typeof i4$1.PipesModule, typeof i7.ResourceSharedComponentsModule, typeof i8.CoreTranslocoModule, typeof i9$2.TranslocoModule, typeof i10$2.DirectivesModule, typeof i9$1.InputTextModule, typeof i10$1.IconFieldModule, typeof i11.InputIconModule, typeof i12.TextareaModule]>;
837
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ResourceSharedModule, never, [typeof i1.CommonModule, typeof i1$2.RouterModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.PipesModule, typeof i7.ResourceSharedComponentsModule, typeof i8.CoreTranslocoModule, typeof i9$1.TranslocoModule, typeof i10$1.DirectivesModule, typeof i9.InputTextModule, typeof i10.IconFieldModule, typeof i11.InputIconModule, typeof i12.TextareaModule, typeof ResourceCardsModule, typeof i14.HubSpotMeetingsSharedModule, typeof ResourceCompanyCardComponent, typeof ResourceTopBannerEditComponent], [typeof ResourceCompanyCardComponent, typeof ResourceTopBannerEditComponent, typeof ResourceCardsModule, typeof i14.HubSpotMeetingsSharedModule, typeof i1.CommonModule, typeof i1$2.RouterModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.PipesModule, typeof i7.ResourceSharedComponentsModule, typeof i8.CoreTranslocoModule, typeof i9$1.TranslocoModule, typeof i10$1.DirectivesModule, typeof i9.InputTextModule, typeof i10.IconFieldModule, typeof i11.InputIconModule, typeof i12.TextareaModule]>;
842
838
  static ɵinj: i0.ɵɵInjectorDeclaration<ResourceSharedModule>;
843
839
  }
844
- /** The two cover pictures of the resource edit card: square and rectangular. */
845
- declare abstract class ResourceEditCardImages extends AppBaseComponent {
846
- protected readonly modalService: NgbModal;
847
- image: string;
848
- rectangularImage: string;
849
- file: File | null;
850
- rectangularFile: File | null;
851
- imageModalRef: any;
852
- openImageModal(modalTemplate: any): void;
853
- openRectModal(content: any): void;
854
- onImageSelected(base64: string): void;
855
- onRectangularImageSelection(base64: string): void;
856
- removeImage(): void;
857
- deleteRectangularImage(): void;
858
- handleImageError(event: Event, fallbackPath: any): void;
859
- static ɵfac: i0.ɵɵFactoryDeclaration<ResourceEditCardImages, never>;
860
- static ɵcmp: i0.ɵɵComponentDeclaration<ResourceEditCardImages, "ng-component", never, {}, {}, never, never, true, never>;
861
- }
862
- declare namespace resource_edit_card_component_d_exports {
863
- export { ResourceEditCardComponent };
864
- }
865
- export declare class ResourceEditCardComponent extends ResourceEditCardImages implements OnInit {
866
- private readonly fb;
867
- private readonly resourceService;
868
- private readonly authService;
869
- private readonly tagService;
870
- private readonly cdr;
871
- id: number;
872
- resourceData: any;
873
- updated: EventEmitter<void>;
874
- editForm: FormGroup;
875
- selectedTags: any[];
876
- allTags: any[];
877
- tagsSuggestion: any[];
878
- subscriptionId: number;
879
- userLoggedIn: boolean;
880
- buttonBusy: boolean;
881
- editorConfig: {
882
- uploader: {
883
- mimetypes: string[];
884
- handler(this: {
885
- quill: Pick<import("quill").default, "insertEmbed" | "insertText" | "deleteText" | "getContents" | "setSelection" | "getSelection"> & import("@posiwise/utils/quill").IndicatorQuill & {
886
- getModule?: (name: string) => unknown;
887
- };
888
- }, range: {
889
- index: number;
890
- }, files: File[]): void;
891
- };
892
- imageDropHint: {
893
- label: () => string;
894
- };
895
- imageLinkImport: {
896
- importUrl: (url: string) => Promise<string>;
897
- busyLabel: () => string;
898
- };
899
- pasteGuard: {
900
- allowImageFiles: boolean;
901
- };
902
- toolbar: {
903
- container: any[];
904
- handlers: {
905
- image: () => void;
906
- video: () => void;
907
- };
908
- };
909
- imageResize: {
910
- displaySize: boolean;
911
- };
912
- } | {
913
- noDragDrop: boolean;
914
- pasteGuard: boolean;
915
- toolbar: {
916
- container: any[];
917
- handlers: {
918
- image: () => void;
919
- video: () => void;
920
- };
921
- };
922
- imageResize: {
923
- displaySize: boolean;
924
- };
925
- };
926
- constructor();
927
- ngOnInit(): void;
928
- navigateToResourceEdit(): void;
929
- openModal(modalTemplate: any): void;
930
- search(event: any): void;
931
- private getPostTags;
932
- saveResource(): void;
933
- private settleSave;
934
- private saveTags;
935
- static ɵfac: i0.ɵɵFactoryDeclaration<ResourceEditCardComponent, never>;
936
- static ɵcmp: i0.ɵɵComponentDeclaration<ResourceEditCardComponent, "pw-resource-edit-card", never, {
937
- "id": {
938
- "alias": "id";
939
- "required": false;
940
- };
941
- "resourceData": {
942
- "alias": "resourceData";
943
- "required": false;
944
- };
945
- }, {
946
- "updated": "updated";
947
- }, never, never, true, never>;
948
- }
949
- /**
950
- * Lazy-loadable module for ResourceEditCard
951
- * Contains heavy dependencies (Quill, Calendar, etc.) that are only needed for admins
952
- * This module is dynamically imported when edit button is clicked
953
- */
954
- export declare class ResourceEditModule {
955
- static ɵfac: i0.ɵɵFactoryDeclaration<ResourceEditModule, never>;
956
- static ɵmod: i0.ɵɵNgModuleDeclaration<ResourceEditModule, never, [typeof i1.CommonModule, typeof i3$1.FormsModule, typeof i3$1.ReactiveFormsModule, typeof i3.DatePickerModule, typeof i4.AutoCompleteModule, typeof i7.ResourceSharedComponentsModule, typeof i8.CoreTranslocoModule, typeof i9$2.TranslocoModule, typeof i10$2.DirectivesModule, typeof i9.QuillModule, typeof i10.UiSwitchModule, typeof ResourceEditCardComponent], [typeof ResourceEditCardComponent]>;
957
- static ɵinj: i0.ɵɵInjectorDeclaration<ResourceEditModule>;
958
- }
959
840
  export interface ResourceModalContext {
960
841
  modal: {
961
842
  dismiss: () => void;
@@ -1 +0,0 @@
1
- {"version":3,"file":"posiwise-resource-module-base-top-banner.component-BwujN_up.mjs","names":[],"sources":["../../../../libs/resource-module/src/lib/public/components/base/base-top-banner.component.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n inject,\n OnInit\n} from '@angular/core';\nimport { Title } from '@angular/platform-browser';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AuthService, TagService } from '@posiwise/common-services';\nimport { Resource, User } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport { forkJoin } from 'rxjs';\n\nimport { ResourceService } from '../../../resource.service';\n\n@Component({\n template: '',\n\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport abstract class BaseTopBannerComponent extends AppBaseComponent implements OnInit {\n protected readonly resourceService = inject(ResourceService);\n protected readonly tagService = inject(TagService);\n private readonly authService = inject(AuthService);\n private readonly titleService = inject(Title);\n protected readonly cdr = inject(ChangeDetectorRef);\n\n subscriptionId: number;\n masterSubscriptionId = this.appConfig.master_subscription.subscription_id;\n posts: Resource[] = [];\n testimonialsPosts = [];\n userLoggedIn: boolean;\n blogPostTag;\n tagCategory;\n blogTestimonialsPostTag;\n isLoaded = false;\n user: User;\n isMasterSubscription;\n\n canEditResourcesValue = false;\n\n ngOnInit() {\n this.getUserSubscriptionId().subscribe(response => {\n this.subscriptionId = response;\n this.cdr.markForCheck();\n });\n this.authService.getToken$().subscribe(res => {\n this.userLoggedIn = !!res;\n if (this.userLoggedIn) {\n this.localStorage.getItem$('product').subscribe(res => {\n const data = res ? JSON.parse(res) : null;\n this.subscriptionId = data?.subscriptionId;\n this.cdr.markForCheck();\n });\n this.userService.getUserInfo().subscribe(data => {\n this.user = data;\n this.updateCanEditResourcesValue();\n this.getTags();\n this.cdr.markForCheck();\n });\n } else {\n this.getTags();\n }\n this.cdr.markForCheck();\n });\n }\n\n protected getTags() {\n this.isLoaded = false;\n forkJoin({\n categories: this.tagService.getAllTagCategories(\n { search: this.getSearchTerm() },\n this.getEffectiveSubscriptionId()\n ),\n tags: this.tagService.getTagsByType(\n 'post_categories',\n {},\n this.getEffectiveSubscriptionId()\n )\n })\n .subscribe(({ categories, tags }) => {\n this.tagCategory = categories?.tag_categories?.[0];\n this.blogPostTag = tags.tags.find(\n tag => tag.tag_category_id === this.tagCategory?.id\n );\n this.updateSEOMetadata();\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n\n /** Helper method to get effective subscription ID */\n protected getEffectiveSubscriptionId(): number {\n return HelperService.getEffectiveSubscriptionId(\n this.user,\n this.subscriptionId,\n this.masterSubscriptionId\n );\n }\n\n protected updateSEOMetadata() {\n if (this.blogPostTag) {\n // Update page title if meta_title is available\n if (this.blogPostTag.meta_title) {\n this.titleService.setTitle(this.blogPostTag.meta_title);\n }\n\n // Update meta description if meta_description is available\n if (this.blogPostTag.meta_description) {\n this.updateMetaDescription(this.blogPostTag.meta_description);\n }\n }\n }\n\n private updateMetaDescription(description: string) {\n let metaDescription = document.querySelector('meta[name=\"description\"]');\n if (!metaDescription) {\n metaDescription = document.createElement('meta');\n metaDescription.setAttribute('name', 'description');\n document.head.appendChild(metaDescription);\n }\n metaDescription.setAttribute('content', description);\n }\n\n // Abstract method that each component must implement\n protected abstract getSearchTerm(): string;\n\n private updateCanEditResourcesValue(): void {\n if (this.userLoggedIn && this.user) {\n this.canEditResourcesValue = HelperService.canEditResources(\n this.user,\n this.userLoggedIn,\n this.permissionService\n );\n } else {\n this.canEditResourcesValue = false;\n }\n }\n\n canEditResources(): boolean {\n return this.canEditResourcesValue;\n }\n}\n"],"mappings":";;;;;;;;AAuBA,IAAsB,yBAAtB,MAAsB,+BAA+B,iBAAgB;CALrE,cAAA;;EAMuB,KAAA,kBAAkB,OAAO,eAAe;EACxC,KAAA,aAAa,OAAO,UAAU;EAChC,K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