@posiwise/resource-module 0.0.206 → 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.
- package/fesm2022/{posiwise-resource-module-base-top-banner.component-BwujN_up.mjs → posiwise-resource-module-base-top-banner.component-DvZKkqPA.mjs} +4 -4
- package/fesm2022/posiwise-resource-module-base-top-banner.component-DvZKkqPA.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-blogs.module-DEXimOOY.mjs → posiwise-resource-module-resource-blogs.module-LKr-SjAo.mjs} +3 -3
- package/fesm2022/{posiwise-resource-module-resource-blogs.module-DEXimOOY.mjs.map → posiwise-resource-module-resource-blogs.module-LKr-SjAo.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-cards.module-DWV2LWdy.mjs → posiwise-resource-module-resource-cards.module-DOpH-f0N.mjs} +15 -15
- package/fesm2022/posiwise-resource-module-resource-cards.module-DOpH-f0N.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-case-studies.module-CQHAhbsv.mjs → posiwise-resource-module-resource-case-studies.module-CzB9wtnf.mjs} +4 -4
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-CzB9wtnf.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-edit-card.component-2VvTki2u.mjs → posiwise-resource-module-resource-edit-card.component-d9cDJUJf.mjs} +3 -3
- package/fesm2022/posiwise-resource-module-resource-edit-card.component-d9cDJUJf.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-events.module-D8mxidoP.mjs → posiwise-resource-module-resource-events.module-BO9CcIFp.mjs} +5 -5
- package/fesm2022/posiwise-resource-module-resource-events.module-BO9CcIFp.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-hub.module-DklN3KeA.mjs → posiwise-resource-module-resource-hub.module-B3EZao2L.mjs} +10 -10
- package/fesm2022/posiwise-resource-module-resource-hub.module-B3EZao2L.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-integrations.module-iTlhrAYt.mjs → posiwise-resource-module-resource-integrations.module-Djkoz9EF.mjs} +11 -11
- package/fesm2022/posiwise-resource-module-resource-integrations.module-Djkoz9EF.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-jobs.module-DpTqKqS9.mjs → posiwise-resource-module-resource-jobs.module-Dw-7KbET.mjs} +4 -4
- package/fesm2022/{posiwise-resource-module-resource-jobs.module-DpTqKqS9.mjs.map → posiwise-resource-module-resource-jobs.module-Dw-7KbET.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-post.module-PU-KBg_G.mjs → posiwise-resource-module-resource-post.module-C343zv-t.mjs} +13 -13
- package/fesm2022/posiwise-resource-module-resource-post.module-C343zv-t.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-release-notes.module-WESwTVu8.mjs → posiwise-resource-module-resource-release-notes.module-CE21Yiss.mjs} +4 -4
- package/fesm2022/{posiwise-resource-module-resource-release-notes.module-WESwTVu8.mjs.map → posiwise-resource-module-resource-release-notes.module-CE21Yiss.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-root.module-TMvR1c1H.mjs → posiwise-resource-module-resource-root.module-BzvAo30C.mjs} +3 -3
- package/fesm2022/posiwise-resource-module-resource-root.module-BzvAo30C.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-videos.module-BCDet6S9.mjs → posiwise-resource-module-resource-videos.module-OJpXslFg.mjs} +3 -3
- package/fesm2022/{posiwise-resource-module-resource-videos.module-BCDet6S9.mjs.map → posiwise-resource-module-resource-videos.module-OJpXslFg.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-white-papers.module-DtxUgC_Z.mjs → posiwise-resource-module-resource-white-papers.module-rr8wWULi.mjs} +3 -3
- package/fesm2022/{posiwise-resource-module-resource-white-papers.module-DtxUgC_Z.mjs.map → posiwise-resource-module-resource-white-papers.module-rr8wWULi.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource.service-DAXsq-WG.mjs → posiwise-resource-module-resource.service-BBvcVvWN.mjs} +10 -10
- package/fesm2022/posiwise-resource-module-resource.service-BBvcVvWN.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module.mjs +13 -13
- package/package.json +1 -1
- package/types/posiwise-resource-module.d.ts +17 -16
- package/fesm2022/posiwise-resource-module-base-top-banner.component-BwujN_up.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-cards.module-DWV2LWdy.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-CQHAhbsv.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-edit-card.component-2VvTki2u.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-events.module-D8mxidoP.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-hub.module-DklN3KeA.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-integrations.module-iTlhrAYt.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-post.module-PU-KBg_G.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-root.module-TMvR1c1H.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource.service-DAXsq-WG.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"posiwise-resource-module-resource-integrations.module-iTlhrAYt.mjs","names":["i1"],"sources":["../../../../libs/resource-module/src/lib/public/components/resource-integration/integration-top-banner/integration-top-banner.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-integration/integration-top-banner/integration-top-banner.component.html","../../../../libs/resource-module/src/lib/public/components/resource-integration/resource-integration.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-integration/resource-integration.component.html","../../../../libs/resource-module/src/lib/public/modules/integrations/resource-integrations.module.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\n\nimport { LazyImgDirective } from '@posiwise/directives';\n\nimport { BaseTopBannerComponent } from '../../base/base-top-banner.component';\nimport { ResourceTopBannerEditComponent } from '../../resource-top-banner-edit/resource-top-banner-edit.component';\n\n@Component({\n selector: 'pw-integration-top-banner',\n templateUrl: './integration-top-banner.component.html',\n styleUrls: [\n '../../resource-case-studies/resource-case-studies.component.scss',\n '../../resources/resources-shared.component.scss',\n '../../resource-post/related-resources/related-resources.component.scss'\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ResourceTopBannerEditComponent, LazyImgDirective]\n})\nexport class IntegrationTopBannerComponent extends BaseTopBannerComponent {\n contactUsUrl = this.appConfig?.pages_config?.contact_us?.url;\n\n protected getSearchTerm(): string {\n return 'Integrations';\n }\n}\n","<section class=\"bg-white pricing-section\">\n <div class=\"resource-banner\">\n @if (isLoaded) {\n <div class=\"container d-flex flex-column flex-lg-row align-items-center justify-content-between\">\n <div class=\"text-content\">\n <div class=\"resource-heading\">\n <h1 class=\"resource-header-text mb-4\">\n <span class=\"d-inline-flex align-items-center gap-2 flex-wrap\">\n <span [innerHTML]=\"blogPostTag?.title || 'Integrated vendors'\"></span>\n @if (canEditResourcesValue) {\n <pw-resource-top-banner-edit\n [blogPostTag]=\"blogPostTag\"\n [user]=\"user\"\n [userLoggedIn]=\"userLoggedIn\"\n (getUpdatedTag)=\"getTags()\"\n ></pw-resource-top-banner-edit>\n }\n </span>\n <span class=\"blue-text\"></span>\n </h1>\n </div>\n </div>\n <div class=\"text-extension mt-4\">\n <div class=\"cta-buttons d-flex flex-column justify-between h-100\">\n <div class=\"flex-grow-1\">\n @if (blogPostTag?.description && blogPostTag.description !== 'null' ) {\n <p class=\"intro\" [innerHTML]=\"blogPostTag.description\"></p>\n } @else {\n <p class=\"intro\">\n Browse below the vendor integrations<br />\n we support.\n </p>\n }\n </div>\n <div class=\"d-flex gap-3 flex-wrap mt-3\">\n <a [href]=\"contactUsUrl\" target=\"_blank\" rel=\"noopener noreferrer\"\n class=\"cta-btn filled\">Talk to us <i class=\"fa fa-chevron-right cta-btn__icon\" aria-hidden=\"true\"></i></a>\n </div>\n </div>\n </div>\n <div class=\"image-content ms-lg-5 mt-5 mt-lg-0\">\n <div class=\"resource-math-img\"></div>\n <img class=\"resource-laptop-img dyn-img\"\n [src]=\"(blogPostTag?.image?.url && !(blogPostTag?.image?.url.includes('no_image_uploaded_squared'))) ? blogPostTag?.image?.url : '/assets/img/resource/men.webp'\"\n alt=\"Integrated vendors banner\"\n width=\"600\"\n height=\"450\"\n loading=\"eager\"\n fetchpriority=\"high\" />\n </div>\n </div>\n }\n </div>\n</section>\n","import {\n CdkDrag,\n CdkDragDrop,\n CdkDragHandle,\n CdkDropList,\n moveItemInArray\n} from '@angular/cdk/drag-drop';\nimport { DOCUMENT, NgClass } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n inject,\n OnInit,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\n\nimport { AdminService } from '@posiwise/admin-module-utils';\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AuthService, TagService } from '@posiwise/common-services';\nimport { CompanyData, Resource, User } from '@posiwise/common-utilities';\nimport { LazyImgDirective } from '@posiwise/directives';\nimport { HelperService } from '@posiwise/helper-service';\nimport { Trial4ContactUsComponent } from '@posiwise/resource-contact-us';\nimport { NoDataComponent } from '@posiwise/shared-components';\nimport { CustomUploaderComponent, ResourceHeaderComponent } from '@posiwise/utils';\n\nimport { Bind } from 'primeng/bind';\nimport { ProgressSpinner } from 'primeng/progressspinner';\nimport { forkJoin } from 'rxjs';\n\nimport { TranslocoPipe } from '@jsverse/transloco';\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { ResourceService } from '../../../resource.service';\nimport { ResourceNoteCardComponent } from '../reslease-note-card/release-note-card.component';\nimport { ResourceCompanyCardComponent } from '../resource-company-card/resource-company-card.component';\n\nimport { IntegrationTopBannerComponent } from './integration-top-banner/integration-top-banner.component';\n\n@Component({\n selector: 'pw-resource-integration',\n templateUrl: './resource-integration.component.html',\n styleUrls: [\n './resource-integration.component.scss',\n '../resources/resources-shared.component.scss'\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n ResourceHeaderComponent,\n IntegrationTopBannerComponent,\n ResourceCompanyCardComponent,\n Bind,\n ProgressSpinner,\n NoDataComponent,\n NgClass,\n LazyImgDirective,\n ResourceNoteCardComponent,\n Trial4ContactUsComponent,\n FormsModule,\n CdkDropList,\n CdkDrag,\n CdkDragHandle,\n TranslocoPipe\n ]\n})\nexport class ResourceIntegrationComponent extends AppBaseComponent implements OnInit {\n private readonly sanitizer = inject(DomSanitizer);\n private readonly resourceService = inject(ResourceService);\n private readonly modalService = inject(NgbModal);\n private readonly tagService = inject(TagService);\n private readonly authService = inject(AuthService);\n private readonly adminService = inject(AdminService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n private readonly doc = inject(DOCUMENT);\n\n @ViewChild('editIntegrationsModal') editIntegrationsModal: TemplateRef<CustomUploaderComponent>;\n editingIntegrations;\n distributorsData = CompanyData?.distributorsData;\n vendorsData = CompanyData?.vendorsData;\n\n textColor = this.appConfig?.color_codes?.text;\n\n subscriptionId: number;\n masterSubscriptionId = this.appConfig.master_subscription.subscription_id;\n posts: Resource[] = [];\n distributerPosts = [];\n userLoggedIn: boolean;\n blogPostTag;\n isLoaded = false;\n resourcePostTag;\n blogPostVendorTag;\n isMasterSubscription;\n\n integrations = this.appConfig?.pages_config?.integrations;\n\n releaseNotesLink = '/resources/product-release-notes';\n q1NotesLink = '/resources/product-release-q1-2025';\n q3NotesLink = '/resources/product-release-q3-2024';\n q4NotesLink = '/resources/product-release-q4-2024';\n companyName;\n\n videoWebinarLoaded = false;\n videoDemoLoaded = false;\n youtubeVideoId = 'R7Vk219zbhA';\n videoTitle = 'CloudOlive Overview';\n sanitizedMicrosoftVideoUrl: SafeResourceUrl;\n sanitizedKesyaVideoUrl: SafeResourceUrl;\n integrationCountDisplay: number;\n contactUsUrl = this.appConfig?.pages_config?.contact_us?.url;\n tagCategory;\n totalPosts: number;\n\n guideData = this.appConfig?.pages_config?.guides;\n editingGuides = { items: [] };\n user: User;\n\n canEditResourcesValue = false;\n domainId = this.appConfig.domain_id;\n\n ngOnInit() {\n this.companyName = this.appConfig.company.name;\n\n this.doc.documentElement.style.setProperty('--text-color', this.textColor);\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\n this.getTags();\n this.updateCanEditResourcesValue();\n this.cdr.markForCheck();\n });\n } else {\n this.getTags();\n }\n this.cdr.markForCheck();\n });\n }\n\n private getTags() {\n this.isLoaded = false;\n this.tagService\n .getAllTagCategories({ search: 'Integrations' }, this.getEffectiveSubscriptionId())\n .subscribe(response => {\n this.tagCategory = response?.tag_categories?.[0];\n this.getPostTags();\n this.cdr.markForCheck();\n });\n }\n\n openEditIntegrationsModal(modalRef) {\n this.editingIntegrations = structuredClone(this.integrations);\n this.modalService.open(modalRef, {\n size: 'lg',\n centered: true,\n windowClass: 'modal-holder'\n });\n }\n\n showIntegrations(): boolean {\n if (this.userLoggedIn) {\n return true;\n }\n\n if (Array.isArray(this.guideData?.items) && this.guideData.items.length) {\n const item = this.guideData.items[0];\n return (\n !!item?.title ||\n !!item?.description ||\n !!item?.guide_url ||\n (!!item?.image_url && !item.image_url.includes('default-image.png'))\n );\n }\n\n return false;\n }\n\n private getPostTags() {\n this.tagService\n .getTagsByType('post_categories', {}, this.getEffectiveSubscriptionId())\n .subscribe(response => {\n this.resourcePostTag = response.tags.find(\n tag => tag.name === 'Product Release Notes'\n );\n this.blogPostTag = response.tags.find(\n tag =>\n tag.name === 'Integrated Distributors' &&\n tag.tag_category_id === this.tagCategory?.id\n );\n this.blogPostVendorTag = response.tags.find(\n tag =>\n tag.name === 'Integrated Vendors' &&\n tag.tag_category_id === this.tagCategory?.id\n );\n\n // use forkJoin to fetch both sets of posts in parallel\n forkJoin({\n vendorResponse: this.resourceService.getPublicPosts(\n this.getEffectiveSubscriptionId(),\n 1,\n 100,\n '',\n '',\n this.blogPostVendorTag?.id\n ),\n distributorResponse: this.resourceService.getPublicPosts(\n this.getEffectiveSubscriptionId(),\n 1,\n 100,\n '',\n '',\n this.blogPostTag?.id\n )\n }).subscribe(({ vendorResponse, distributorResponse }) => {\n const sortedVendors = vendorResponse.posts.sort(\n (a, b) =>\n new Date(b.published_at).getTime() - new Date(a.published_at).getTime()\n );\n const sortedDistributors = distributorResponse.posts.sort(\n (a, b) =>\n new Date(b.published_at).getTime() - new Date(a.published_at).getTime()\n );\n\n // Show only integrations that have an image; count still includes all\n this.posts = sortedVendors.filter(post => this.hasDisplayableImage(post));\n this.distributerPosts = sortedDistributors.filter(post =>\n this.hasDisplayableImage(post)\n );\n\n const vendorCount = vendorResponse?.object_count ?? 0;\n const distributorCount = distributorResponse?.object_count ?? 0;\n const total = vendorCount + distributorCount;\n\n this.integrationCountDisplay = total === 0 ? 0 : Math.ceil(total / 10) * 10;\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n this.cdr.markForCheck();\n });\n }\n\n loadMicrosoftVideo(videoUrl) {\n window.open(videoUrl, '_blank', 'noopener,noreferrer');\n }\n\n loadKeseyaVideo(): void {\n const baseUrl = `https://www.youtube.com/embed/${this.youtubeVideoId}?autoplay=1`;\n // baseUrl is a trusted internal source (e.g. YouTube embed URL)\n this.sanitizedKesyaVideoUrl = this.sanitizer.bypassSecurityTrustResourceUrl(baseUrl); // NOSONAR\n this.videoWebinarLoaded = true;\n }\n\n addIntegrationItem() {\n this.editingIntegrations.items.push({\n title: '',\n description: '',\n blog_url: '',\n image_url: '',\n video_url: ''\n });\n }\n\n removeIntegrationItem(index: number) {\n this.editingIntegrations.items.splice(index, 1);\n }\n\n dropIntegrationItems(event) {\n moveItemInArray(this.editingIntegrations.items, event.previousIndex, event.currentIndex);\n }\n\n saveIntegrations(modalRef) {\n const updatedIntegrations = {\n ...this.editingIntegrations\n };\n\n this.adminService\n .updateDomainConfig(this.domainId, {\n integrations: updatedIntegrations,\n subscription_id: this.getEffectiveSubscriptionId()\n })\n .subscribe(() => {\n this.integrations = updatedIntegrations;\n this.toast.success('Integrations updated');\n modalRef.close();\n this.cdr.markForCheck();\n });\n }\n\n saveGuides(modalRef) {\n const updatedGuides = {\n ...this.editingGuides\n };\n\n this.adminService\n .updateDomainConfig(this.domainId, {\n guides: updatedGuides,\n subscription_id: this.getEffectiveSubscriptionId()\n })\n .subscribe(() => {\n this.guideData = updatedGuides;\n this.toast.success('Guides updated');\n modalRef.close();\n this.cdr.markForCheck();\n });\n }\n\n openGuidesModal(template) {\n this.editingGuides = structuredClone(this.guideData ?? { items: [] });\n this.modalService.open(template, { size: 'xl' });\n }\n\n addGuide() {\n this.editingGuides.items.push({\n title: '',\n button_text: '',\n image_url: '',\n guide_url: '',\n description: ''\n });\n }\n\n removeGuide(index: number) {\n this.editingGuides.items.splice(index, 1);\n }\n\n dropGuides(event: CdkDragDrop<string[]>) {\n moveItemInArray(this.editingGuides.items, event.previousIndex, event.currentIndex);\n }\n\n private hasDisplayableImage(post: {\n companyImg?: string;\n rectangular_picture?: { url?: string };\n }): boolean {\n if (post?.companyImg) {\n return true;\n }\n const url = post?.rectangular_picture?.url;\n return !!url && !url.includes('default-photo');\n }\n\n /** Helper method to get effective subscription ID */\n private getEffectiveSubscriptionId(): number {\n return HelperService.getEffectiveSubscriptionId(\n this.user,\n this.subscriptionId,\n this.masterSubscriptionId\n );\n }\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","<pw-resource-header [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-header>\n<main>\n<pw-integration-top-banner></pw-integration-top-banner>\n<div class=\"bg-white\">\n <section class=\"guide-section bg-white py-5 section-outer\">\n <div class=\"container sec-container\">\n @if (isLoaded && (posts.length + distributerPosts.length) > 0) {\n <div>\n <h1 class=\"int-title mb-0\">{{ integrationCountDisplay }}+ integrations <span class=\"int-title__sub\">(& counting)</span></h1>\n <p class=\"int-text\">Search the current list of {{ companyName }} vendor and distributor integrations below.</p>\n </div>\n }\n @if (isLoaded) {\n <pw-resource-company-card [header]=\"'integrated vendors'\"\n (getPosts)=\"getPostTags()\"\n [integrationCountDisplay]=\"integrationCountDisplay\"\n [data]=\"posts\"\n [user]=\"user\"\n [userLoggedIn]=\"userLoggedIn\"></pw-resource-company-card>\n }\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (integrationCountDisplay === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n @if (isLoaded && (posts.length + distributerPosts.length) > 0) {\n <div class=\"text-center pt-3 mt-4\">\n <p class=\"see-span\">Don’t see what you’re after? <a [href]=\"contactUsUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"int-span team-span\">Speak with our team to request a connection <i class=\"fa fa-chevron-right team-span__icon\" aria-hidden=\"true\"></i></a>\n </p>\n </div>\n }\n </div>\n\n</section>\n<section class=\"guide-section bg-white py-5 section-outer\">\n <div class=\"container\">\n @if (isLoaded) {\n <pw-resource-company-card [header]=\"'integrated Distributors'\"\n [integrationCountDisplay]=\"integrationCountDisplay\"\n [vendor]=\"true\"\n (getPosts)=\"getPostTags()\"\n [data]=\"distributerPosts\"\n [user]=\"user\"\n [userLoggedIn]=\"userLoggedIn\"></pw-resource-company-card>\n }\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (integrationCountDisplay === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n </div>\n\n</section>\n@if (integrations) {\n <section class=\"guide-section bg-white py-5 section-outer\">\n <div class=\"container\">\n <div class=\"how-it-works-wrapper\">\n <div class=\"d-flex\">\n <h2 class=\"it-works-title mb-0\">{{ integrations?.title || 'How it works' }}</h2>\n @if (canEditResourcesValue) {\n <i\n class=\"fa fa-edit in-page-edit-icon text-black ms-4 mt-3 cursor-pointer\"\n (click)=\"openEditIntegrationsModal(editIntegrationsModal)\"\n (keydown.enter)=\"openEditIntegrationsModal(editIntegrationsModal)\"\n (keydown.space)=\"openEditIntegrationsModal(editIntegrationsModal)\"\n title=\"Edit Integrations Section\"></i>\n }\n </div>\n <p class=\"pb-20\" [innerHTML]=\"integrations?.description || 'View short example videos to understand how these integrations can work for you:'\"></p>\n <div class=\"row section-row\" [ngClass]=\"{ 'justify-content-center': integrations?.items?.length === 1 }\">\n @if (integrations?.items?.length > 0) {\n @for (integration of integrations?.items; track integration) {\n @if (integration?.image_url || integration?.title || integration?.description) {\n <div\n class=\"col-md-6\"\n >\n @if (integration?.video_url && integration?.video_url.includes('https')) {\n <div class=\"d-flex justify-content-center cursor-pointer\">\n @if (integration?.video_url) {\n <img\n [src]=\"integration?.image_url\"\n (click)=\"loadMicrosoftVideo(integration?.video_url)\"\n (keydown.enter)=\"loadMicrosoftVideo(integration?.video_url)\"\n class=\"how-it-works-img\"\n alt=\"Integration Video Thumbnail\"\n />\n }\n </div>\n } @else {\n <div class=\"d-flex justify-content-center\">\n <div class=\"w-100\">\n <pw-no-data [withImage]=\"true\" [message]=\"'No video found' | transloco\">\n </pw-no-data>\n </div>\n </div>\n }\n </div>\n }\n }\n } @else {\n <div class=\"w-100 text-center\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Integration.NoDataMessage' | transloco\"></pw-no-data>\n </div>\n }\n </div>\n </div>\n </div>\n </section>\n}\n@if (showIntegrations()) {\n <section class=\"guide-section bg-white py-5 section-outer\">\n <div class=\"container\">\n <div class=\"row align-items-start\">\n <div class=\"col-md-6 text-md-start text-center\">\n <div class=\"d-flex\">\n <h2 class=\"guide-title mb-3\">{{ guideData?.items?.[0]?.title || 'Featured guide' }}</h2>\n @if (canEditResourcesValue) {\n <button type=\"button\"\n class=\"in-page-edit-icon text-black ms-4 mt-3 cursor-pointer\"\n (click)=\"openGuidesModal(guidesEditModal)\"\n title=\"Edit featured guide\"\n aria-label=\"Edit featured guide\">\n <i class=\"fa fa-edit\" aria-hidden=\"true\"></i>\n </button>\n }\n </div>\n <p class=\"guide-subtext\"\n [innerHTML]=\"guideData?.items?.[0]?.description || (canEditResourcesValue ? 'Add a featured guide via Admin → Domain config → Integrations.' : 'A practical walkthrough of how to get the most from your integrations.')\">\n </p>\n @if (guideData?.items?.[0]?.guide_url) {\n <a class=\"vault-btn\"\n [href]=\"guideData?.items?.[0]?.guide_url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n {{ guideData?.items?.[0]?.button_text || 'View the guide' }} <i class=\"fa fa-chevron-right vault-btn__icon\" aria-hidden=\"true\"></i>\n </a>\n }\n </div>\n <div class=\"col-md-6 text-center\">\n @if (guideData?.items?.[0]?.image_url && !guideData?.items?.[0]?.image_url?.includes('default-photo.jpg')) {\n <img\n [src]=\"guideData?.items?.[0]?.image_url\"\n alt=\"\"\n class=\"guide-img\"\n loading=\"lazy\" />\n }\n </div>\n </div>\n </div>\n </section>\n}\n</div>\n\n@if (resourcePostTag?.tag_category_id) {\n <pw-resource-note-card [categoryId]=\"resourcePostTag?.tag_category_id\" [tag]=\"resourcePostTag\" [releaseHeader]=\"true\" [resourceTitle]=\"resourcePostTag?.title\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-note-card>\n}\n\n</main>\n<pw-trial-4-contact-us [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-trial-4-contact-us>\n\n\n\n<ng-template #editIntegrationsModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Integrations Section</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"integration-title\">Title</label>\n <input class=\"form-control\" id=\"integration-title\" [(ngModel)]=\"editingIntegrations.title\"\n aria-label=\"Integration Title\" />\n </div>\n\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"integration-description\">Description</label>\n <textarea class=\"form-control\" id=\"integration-description\" rows=\"3\" [(ngModel)]=\"editingIntegrations.description\"\n aria-label=\"Integration Description\"></textarea>\n </div>\n\n <div cdkDropList (cdkDropListDropped)=\"dropIntegrationItems($event)\">\n @for (integration of editingIntegrations.items; track integration; let i = $index) {\n <div class=\"border p-3 mb-3\" cdkDrag>\n <div class=\"d-flex justify-content-between align-items-center mb-2\">\n <span class=\"pw-label-style form-label mb-0\" id=\"integration-item-label\">Integration Item</span>\n <i class=\"fa fa-bars cursor-move in-page-bars-icon\" cdkDragHandle></i>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6 mb-2\">\n <label class=\"form-label\" [for]=\"'integration-item-title-' + i\">Title</label>\n <input class=\"form-control\" [id]=\"'integration-item-title-' + i\" [(ngModel)]=\"integration.title\" id=\"input_integration.title_7712\" name=\"input_integration.title_7712\"\n aria-label=\"Input Integration.title 7712\" />\n </div>\n <div class=\"col-md-6 mb-2\">\n <label class=\"form-label\" [for]=\"'integration-item-description-' + i\">Description</label>\n <input class=\"form-control\" [id]=\"'integration-item-description-' + i\" [(ngModel)]=\"integration.description\" id=\"input_integration.description_9056\" name=\"input_integration.description_9056\"\n aria-label=\"Input Integration.description 9056\" />\n </div>\n <div class=\"col-md-6 mb-2\">\n <label class=\"form-label\" [for]=\"'integration-item-blog-url-' + i\">Blog URL</label>\n <input class=\"form-control\" [id]=\"'integration-item-blog-url-' + i\" [(ngModel)]=\"integration.blog_url\" id=\"input_integration.blog_url_7856\" name=\"input_integration.blog_url_7856\"\n aria-label=\"Input Integration.blog Url 7856\" />\n </div>\n <div class=\"col-md-6 mb-2\">\n <label class=\"form-label\" [for]=\"'integration-item-image-url-' + i\">Image URL</label>\n <input class=\"form-control\" [id]=\"'integration-item-image-url-' + i\" [(ngModel)]=\"integration.image_url\" id=\"input_integration.image_url_9056\" name=\"input_integration.image_url_9056\"\n aria-label=\"Input Integration.image Url 9056\" />\n </div>\n <div class=\"col-md-12 mb-2\">\n <label class=\"form-label\" [for]=\"'integration-item-video-url-' + i\">Video URL</label>\n <input class=\"form-control\" [id]=\"'integration-item-video-url-' + i\" [(ngModel)]=\"integration.video_url\" id=\"input_integration.video_url_9056\" name=\"input_integration.video_url_9056\"\n aria-label=\"Input Integration.video Url 9056\" />\n </div>\n </div>\n <div class=\"d-flex justify-content-end\">\n <i class=\"fa fa-trash text-danger cursor-pointer\" (click)=\"removeIntegrationItem(i)\" (keydown.enter)=\"removeIntegrationItem(i)\"\n (keydown.space)=\"removeIntegrationItem(i)\"></i>\n </div>\n </div>\n }\n </div>\n\n <button class=\"btn btn-outline-primary btn-sm\" (click)=\"addIntegrationItem()\">+ Add Integration</button>\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\" (click)=\"saveIntegrations(modal)\">Save</button>\n </div>\n</ng-template>\n\n\n\n<ng-template #guidesEditModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Guides</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <h4 class=\"mb-3\">Guides Section</h4>\n\n <div cdkDropList (cdkDropListDropped)=\"dropGuides($event)\">\n @for (guide of editingGuides.items; track guide; let i = $index) {\n <div class=\"border p-3 mb-3\" cdkDrag>\n <div class=\"row\">\n <div class=\"col-md-6 mb-2\">\n <label class=\"form-label\" [for]=\"'guide-title-' + i\">Title</label>\n <input class=\"form-control\" [id]=\"'guide-title-' + i\" [(ngModel)]=\"guide.title\" id=\"input_guide.title_7072\" name=\"input_guide.title_7072\"\n aria-label=\"Input Guide.title 7072\" />\n </div>\n <div class=\"col-md-6 mb-2\">\n <label class=\"form-label\" [for]=\"'guide-button-text-' + i\">Button Text</label>\n <input class=\"form-control\" [id]=\"'guide-button-text-' + i\" [(ngModel)]=\"guide.button_text\" id=\"input_guide.button_text_7712\" name=\"input_guide.button_text_7712\"\n aria-label=\"Input Guide.button Text 7712\" />\n </div>\n <div class=\"col-md-6 mb-2\">\n <label class=\"form-label\" [for]=\"'guide-image-url-' + i\">Image URL</label>\n <input class=\"form-control\" [id]=\"'guide-image-url-' + i\" [(ngModel)]=\"guide.image_url\" id=\"input_guide.image_url_7856\" name=\"input_guide.image_url_7856\"\n aria-label=\"Input Guide.image Url 7856\" />\n </div>\n <div class=\"col-md-6 mb-2\">\n <label class=\"form-label\" [for]=\"'guide-url-' + i\">Guide URL</label>\n <input class=\"form-control\" [id]=\"'guide-url-' + i\" [(ngModel)]=\"guide.guide_url\" id=\"input_guide.guide_url_6944\" name=\"input_guide.guide_url_6944\"\n aria-label=\"Input Guide.guide Url 6944\" />\n </div>\n <div class=\"col-12 mb-2\">\n <label class=\"form-label\" [for]=\"'guide-description-' + i\">Description</label>\n <textarea class=\"form-control\" [id]=\"'guide-description-' + i\" [name]=\"'guide-description-' + i\" rows=\"3\" [(ngModel)]=\"guide.description\"></textarea>\n </div>\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <i class=\"fa fa-trash text-danger cursor-pointer\" (click)=\"removeGuide(i)\" (keydown.enter)=\"removeGuide(i)\" (keydown.space)=\"removeGuide(i)\"></i>\n <i class=\"fa fa-bars cursor-move\" cdkDragHandle></i>\n </div>\n </div>\n </div>\n }\n </div>\n\n <button class=\"btn btn-primary mt-2\" (click)=\"addGuide()\">+ Add Guide</button>\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\" (click)=\"saveGuides(modal)\">Save</button>\n </div>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { SeoGuard } from '@posiwise/core-guards';\n\nimport { IntegrationTopBannerComponent } from '../../components/resource-integration/integration-top-banner/integration-top-banner.component';\nimport { ResourceIntegrationComponent } from '../../components/resource-integration/resource-integration.component';\nimport { ResourceSharedModule } from '../../shared/resource-shared.module';\n\nconst routes: Routes = [\n {\n path: '',\n component: ResourceIntegrationComponent,\n data: {\n title: 'Integrations: Supported Vendors and Tools',\n description:\n 'See every integration the platform supports, how each one connects and what it keeps in sync.',\n permission: 'Pages.Blog',\n preload: false\n },\n canActivate: [SeoGuard]\n }\n];\n\n@NgModule({\n imports: [\n ResourceSharedModule,\n RouterModule.forChild(routes),\n ResourceIntegrationComponent,\n IntegrationTopBannerComponent\n ]\n})\nexport class ResourceIntegrationsModule {}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,IAAa,gCAAb,MAAa,sCAAsC,uBAAsB;CAXzE,cAAA;;EAYI,KAAA,eAAe,KAAK,WAAW,cAAc,YAAY;CAK5D;CAHa,gBAAa;EACnB,OAAO;CACX;CALS;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA6B,MAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAA7B;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAA6B,cAAA;GAAA,UAAA;GAAA,iBAAA;GAAA,U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AAA;GAAA,UAAA;GAAA,MAAA;GAA0B,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAA1B;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA0B,SAAA;IAN/B;IAAoB,GAAA;IAEpB;IACA;GAA6B;EAAA,CAAA;CAAA;CAGxB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA0B,SAAA;IAN/B;IACA,aAAa,SAAS,MAAM;IAC5B;IACA;GAA6B;EAAA,CAAA;CAAA;;AAGxB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA0B,YAAA,CAAA;EARtC,MAAA;EAAS,MAAA,CAAA,EACN,SAAS;GACL;GACA,aAAa,SAAS,MAAM;GAC5B;GACA;EACH,EACJ,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"posiwise-resource-module-resource-post.module-PU-KBg_G.mjs","names":["i1"],"sources":["../../../../libs/resource-module/src/lib/shared/models/resource.model.ts","../../../../libs/resource-module/src/lib/public/components/resource-post/related-resources/related-resources.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-post/related-resources/related-resources.component.html","../../../../libs/resource-module/src/lib/public/components/resource-post/resource-post-details/resource-post-details.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-post/resource-post-details/resource-post-details.component.html","../../../../libs/resource-module/src/lib/public/components/resource-post/resource-post.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-post/resource-post.component.html","../../../../libs/resource-module/src/lib/public/modules/post/resource-post.module.ts"],"sourcesContent":["import { FormBuilder, Validators } from '@angular/forms';\n\nexport class ResourceBlog {\n static getResourcePostsForm() {\n return new FormBuilder().group({\n related_entity_id: [''],\n related_entity_type: [''],\n comment: [null, Validators.required],\n user_id: ['']\n });\n }\n}\n","import { DatePipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n inject,\n OnInit\n} from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { RouterLink } from '@angular/router';\n\nimport { HubSpotMeetingsSharedModule } from '@posiwise/alpha-module';\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AuthService, CustomToastService, TagService } from '@posiwise/common-services';\nimport { User } from '@posiwise/common-utilities';\nimport { ButtonBusyDirective, LazyImgDirective } from '@posiwise/directives';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport { Bind } from 'primeng/bind';\nimport { Textarea } from 'primeng/textarea';\n\nimport { TranslocoPipe } from '@jsverse/transloco';\n\nimport { ResourceService } from '../../../../resource.service';\nimport { ResourceBlog } from '../../../../shared/models/resource.model';\n\nimport { ResourceCardComponent } from './resource-cards/resource-cards.component';\n\n@Component({\n selector: 'pw-related-resources',\n templateUrl: './related-resources.component.html',\n styleUrls: ['./related-resources.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n FormsModule,\n ReactiveFormsModule,\n Bind,\n Textarea,\n ButtonBusyDirective,\n RouterLink,\n LazyImgDirective,\n HubSpotMeetingsSharedModule,\n ResourceCardComponent,\n DatePipe,\n TranslocoPipe\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class RelatedResourcesComponent extends AppBaseComponent implements OnInit {\n private readonly resourceService = inject(ResourceService);\n private readonly sanitizer = inject(DomSanitizer);\n private readonly tagService = inject(TagService);\n private readonly authService = inject(AuthService);\n private readonly toastr = inject(CustomToastService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n resourceCards = [\n {\n title: 'BLOG: Here’s why you should QA your distributor invoices',\n image: '/assets/img/resource/resource-qa.png',\n alt: 'QA distributor invoices',\n url: '/resources/view/here-s-why-you-should-be-seeking-independent-qa-of-all-distributor-inv'\n },\n {\n title: 'BLOG: 4 instant hacks to uplift your MSP’s monthly billing',\n image: '/assets/img/resource/resource-hacks.png',\n alt: 'Monthly billing hacks',\n url: '/resources/view/4-instant-hacks-to-uplift-your-msp-s-monthly-billing'\n },\n {\n title: 'BLOG: The trivial detail that will either future-proof or sabotage your PSA.',\n image: '/assets/img/resource/resource-psa.png',\n alt: 'PSA future-proof',\n url: '/resources/view/the-trivial-detail-that-will-either-future-proof-or-sabotage-your-psa'\n }\n ];\n\n post;\n masterSubscriptionId;\n slug;\n\n postComments = [];\n commentForm;\n\n userLoggedIn: boolean;\n\n demoLinks = this.appConfig?.pages_config?.book_demo?.items;\n\n user: User;\n blogPostTag;\n subscriptionId;\n isMasterSubscription;\n linkedInUrl = this.appConfig?.social?.linkedin_url;\n company_email = this.appConfig.company.email;\n\n constructor() {\n super();\n this.commentForm = ResourceBlog.getResourcePostsForm();\n }\n\n ngOnInit(): void {\n this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;\n this.route.params.subscribe(params => {\n this.slug = params['slug'] ?? '';\n this.getBlogItem(this.slug);\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\n this.getPostTags();\n this.cdr.markForCheck();\n });\n } else {\n this.getPostTags();\n }\n this.cdr.markForCheck();\n });\n }\n\n get hasValidDemoLinks(): boolean {\n return (\n Array.isArray(this.demoLinks) && this.demoLinks.some(link => link?.title ?? link?.url)\n );\n }\n\n private getPostTags() {\n this.tagService\n .getTagsByType('post_categories', {}, this.getEffectiveSubscriptionId())\n .subscribe(response => {\n this.blogPostTag = response.tags.find(tag => tag.name === 'Blog Posts');\n this.cdr.markForCheck();\n });\n }\n\n private getBlogItem(slug: string) {\n this.resourceService.getPostBySlug(slug).subscribe(response => {\n let blogBody;\n if (response?.body) {\n blogBody = HelperService.sanitizeQuillBody(response.body, this.sanitizer);\n }\n const date = new Date(response?.when);\n const formatted = date.toISOString().split('T')[0];\n this.postComments = response.entity_comments;\n this.post = { ...response, body: blogBody, when: formatted };\n this.cdr.markForCheck();\n });\n }\n\n onComment() {\n const data = { ...this.commentForm.value };\n data.related_entity_id = this.post?.id;\n data.related_entity_type = 'Post';\n data.user_id = this.user?.id;\n this.resourceService.postComments(data).subscribe(() => {\n this.getBlogItem(this.slug);\n this.commentForm.reset();\n this.toastr.success(this.translation.translate('Resource.Posts.CommentAdded'));\n this.cdr.markForCheck();\n });\n }\n\n trackByComment(_index: number, item: { id: number }) {\n return item.id;\n }\n\n /** Helper method to get effective subscription ID */\n private getEffectiveSubscriptionId(): number {\n return HelperService.getEffectiveSubscriptionId(\n this.user,\n this.subscriptionId,\n this.masterSubscriptionId\n );\n }\n}\n","\n\n<section class=\"resource-body-section\">\n <div class=\"container\">\n <div class=\"ql-snow body-quill\"\n >\n <div class=\"ql-editor body post-body-text\"\n [innerHTML]=\"post?.body\">\n </div>\n </div>\n <section class=\"resource-offer-section\">\n\n <div class=\"row mt-5 mb-4 response-row\">\n <div class=\"col-12\">\n @if (userLoggedIn) {\n <form\n class=\"p-fluid mb-5\"\n [formGroup]=\"commentForm\"\n (ngSubmit)=\"onComment()\"\n >\n <div class=\"card shadow-sm no-border p-4\">\n <div class=\"field\">\n <label for=\"related-resources-comment\" class=\"font-bold text-lg mb-4 comment-label\">💬 LEAVE A COMMENT</label>\n <textarea\n id=\"related-resources-comment\"\n pInputTextarea\n formControlName=\"comment\"\n rows=\"6\"\n fluid\n placeholder=\"What's on your mind?\"\n\n aria-label=\"What's on your mind?\" ></textarea>\n @if (commentForm.get('comment')?.invalid && commentForm.get('comment')?.touched) {\n <small\n class=\"text-danger\"\n >Please enter comment</small\n >\n }\n </div>\n <div class=\"text-end mt-3\">\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"sign-btn sign-header-btn\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n </div>\n </form>\n } @else {\n <p class=\"text-center pt-3 pb-3 user-not-logged-in text-muted shadow-sm mb-5\">\n <a [routerLink]=\"['/login']\" class=\"text-primary fw-bold\">Log in</a> to leave a comment!\n </p>\n }\n </div>\n </div>\n\n @if (postComments.length > 0) {\n <div class=\"row mt-5 comment-row\">\n @for (comment of postComments; track trackByComment($index, comment)) {\n <div class=\"col-12\">\n <div class=\"card no-border shadow-sm p-3 mb-3\">\n <div class=\"d-flex align-items-start\">\n <img\n [src]=\"comment?.author?.avatar?.[0]?.url || 'assets/img/icons/male.png'\"\n alt=\"avatar\"\n class=\"rounded-circle me-3\"\n width=\"50\"\n height=\"50\"\n (error)=\"handleImageError($event, 'assets/img/icons/male.png')\"\n />\n <div class=\"flex-grow-1\">\n <div class=\"fw-bold text-dark\">\n {{ comment.user?.first_name || '' }} {{ comment.user?.last_name || '' }}\n </div>\n <div class=\"text-muted small mb-2\">{{ comment.created_at | date: 'dd MMM yyyy, h:mm a' }}</div>\n <div class=\"text-body\">\n {{ comment.comment }}\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n\n </section>\n </div>\n <hr class=\"resource-divider\" />\n </section>\n\n @if (hasValidDemoLinks) {\n <section class=\"resource-book-section\">\n <div class=\"container\">\n <p class=\"resource-contact\">\n Any questions, get in touch <a href=\"mailto:{{ company_email }}\">here</a>,\n <a [href]=\"linkedInUrl\" target=\"_blank\">connect on LinkedIn</a>, or book a meeting below:\n </p>\n </div>\n <pw-book-a-demo [isBlog]=\"true\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-book-a-demo>\n <hr class=\"resource-divider\" />\n </section>\n }\n\n\n @if (blogPostTag?.tag_category_id) {\n <pw-resource-cards [tag]=\"blogPostTag\" [categoryId]=\"blogPostTag?.tag_category_id\" [resourceTitle]=\"blogPostTag?.title\" [isHeaderVisible]=\"true\" resourceLink=\"/resources/blogs\" [isRelated]=\"true\" [resourceTitle]=\"'Other resources you may be interested in:'\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-cards>\n }\n","import { NgClass } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n inject,\n OnInit\n} from '@angular/core';\nimport { DomSanitizer, Meta, Title } from '@angular/platform-browser';\nimport { RouterLink } from '@angular/router';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AuthService, TagService } from '@posiwise/common-services';\nimport { ADMIN_ROUTERS, User } from '@posiwise/common-utilities';\nimport { LazyImgDirective } from '@posiwise/directives';\nimport { HelperService } from '@posiwise/helper-service';\nimport { DateFormatPipe } from '@posiwise/pipes';\nimport { NoDataComponent } from '@posiwise/shared-components';\n\nimport { Tooltip } from 'primeng/tooltip';\n\nimport { TranslocoPipe } from '@jsverse/transloco';\n\nimport { ResourceService } from '../../../../resource.service';\n@Component({\n selector: 'pw-resource-post-details',\n templateUrl: './resource-post-details.component.html',\n styleUrls: ['./resource-post-details.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgClass,\n Tooltip,\n RouterLink,\n LazyImgDirective,\n NoDataComponent,\n DateFormatPipe,\n TranslocoPipe\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourcePostDetailsComponent extends AppBaseComponent implements OnInit {\n private readonly resourceService = inject(ResourceService);\n private readonly tagService = inject(TagService);\n private readonly authService = inject(AuthService);\n private readonly titleService = inject(Title);\n private readonly meta = inject(Meta);\n private readonly sanitizer = inject(DomSanitizer);\n private readonly cdr = inject(ChangeDetectorRef);\n\n post;\n masterSubscriptionId;\n slug;\n blogPermission: string;\n userLoggedIn: boolean;\n routers = ADMIN_ROUTERS;\n hasBlogAccess: boolean;\n user: User;\n subscriptionId: number;\n blogPostTag;\n postCategoryTags = [];\n isLoaded = false;\n\n private static readonly CATEGORY_LABEL_KEYS: Record<string, string> = {\n 'Blog Posts': 'Resource.Posts.Category.BlogPosts',\n 'Case Studies': 'Resource.Posts.Category.CaseStudies',\n Webinars: 'Resource.Posts.Category.Webinars',\n Videos: 'Resource.Posts.Category.Videos',\n Events: 'Resource.Posts.Category.Events',\n 'White Papers': 'Resource.Posts.Category.WhitePapers',\n 'Product Release Notes': 'Resource.Posts.Category.ProductReleaseNotes'\n };\n private static readonly DEFAULT_CATEGORY_LABEL_KEY = 'Resource.Posts.Category.Default';\n\n ngOnInit(): void {\n this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;\n this.getUserSubscriptionId().subscribe(response => {\n this.subscriptionId = response;\n this.cdr.markForCheck();\n });\n this.route.params.subscribe(params => {\n this.slug = params['slug'] ?? '';\n this.getBlogItem(this.slug);\n this.cdr.markForCheck();\n });\n\n this.authService.getToken$().subscribe(res => {\n this.userLoggedIn = !!res;\n\n if (res) {\n this.userService.getUserInfo().subscribe(data => {\n this.user = data;\n this.hasBlogAccess = HelperService.checkBlogPermission(this.user);\n this.cdr.markForCheck();\n });\n }\n\n this.getPostTags();\n this.cdr.markForCheck();\n });\n }\n\n private getPostTags() {\n this.tagService\n .getTagsByType('post_categories', {}, this.subscriptionId || this.masterSubscriptionId)\n .subscribe(response => {\n this.postCategoryTags = response.tags ?? [];\n this.blogPostTag = this.postCategoryTags.find(tag => tag.name === 'Blog Posts');\n // Update SEO metadata again now that blogPostTag is available\n if (this.post) {\n this.setOpenGraphMetaTags();\n }\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n\n get postCategoryLabelKey(): string {\n const categoryIds = new Set(this.postCategoryTags.map(t => t.id));\n const match = this.post?.tags?.find(t => categoryIds.has(t.id));\n return (\n ResourcePostDetailsComponent.CATEGORY_LABEL_KEYS[match?.name] ??\n ResourcePostDetailsComponent.DEFAULT_CATEGORY_LABEL_KEY\n );\n }\n\n private getBlogItem(slug: string) {\n this.resourceService.getPostBySlug(slug).subscribe(response => {\n let blogBody;\n if (response?.body) {\n blogBody = HelperService.sanitizeQuillBody(response.body, this.sanitizer);\n }\n this.post = { ...response, body: blogBody };\n this.cdr.markForCheck();\n });\n }\n\n private setOpenGraphMetaTags() {\n if (this.post.title) {\n this.meta.updateTag({ property: 'og:title', content: this.post.title });\n this.meta.updateTag({ name: 'twitter:title', content: this.post.title });\n }\n\n if (this.post.blurb) {\n this.meta.updateTag({ property: 'og:description', content: this.post.blurb });\n this.meta.updateTag({ name: 'twitter:description', content: this.post.blurb });\n }\n\n let imageUrl = null;\n if (this.post?.picture?.url && !this.post.picture.url.includes('default-photo.jpg')) {\n imageUrl = this.post.picture.url;\n } else if (\n this.blogPostTag?.image?.url &&\n !this.blogPostTag.image.url.includes('no_image_uploaded_squared')\n ) {\n imageUrl = this.blogPostTag.image.url;\n }\n\n if (imageUrl) {\n this.meta.updateTag({ property: 'og:image', content: imageUrl });\n this.meta.updateTag({ name: 'twitter:image', content: imageUrl });\n }\n\n this.meta.updateTag({ property: 'og:type', content: 'article' });\n this.meta.updateTag({ property: 'og:url', content: window.location.href });\n this.meta.updateTag({ property: 'og:site_name', content: 'PosiWise' });\n\n // Twitter Card properties\n this.meta.updateTag({ name: 'twitter:card', content: 'summary_large_image' });\n this.meta.updateTag({ name: 'twitter:site', content: '@posiwise' });\n }\n\n getImageUrl(): string | null {\n if (this.post?.picture?.url && !this.post.picture.url.includes('default-photo.jpg')) {\n return this.post.picture.url;\n } else if (\n this.blogPostTag?.image?.url &&\n !this.blogPostTag.image.url.includes('no_image_uploaded_squared')\n ) {\n return this.blogPostTag.image.url;\n }\n return null;\n }\n}\n","<section class=\"resource-hero-section\">\n <div class=\"container d-flex flex-wrap\" [ngClass]=\"getImageUrl() ? 'container-top' : 'container-no-image'\">\n <div class=\"hero-left\">\n <p class=\"blog-label\">{{ postCategoryLabelKey | transloco }}</p>\n\n <h1 class=\"hero-title\">\n @if (post?.title) {\n <span [innerHTML]=\"post.title\"></span>\n } @else {\n \n }\n @if (userLoggedIn && hasBlogAccess) {\n <a\n class=\"ms-3 text-decoration-none\"\n pTooltip=\"Edit this post\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n aria-label=\"Edit this blog post\"\n [routerLink]=\"['/admin/resources/', post?.slug]\"\n target=\"_blank\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </a>\n }\n </h1>\n\n\n <div class=\"author-info\">\n <img [src]=\"post?.author?.avatar?.[0]?.url || 'assets/img/icons/male.png'\" alt=\"User Profile Logo\" class=\"author-img\" />\n <div class=\"author-meta\">\n <p>Article by {{ post?.author?.first_name }} {{ post?.author?.last_name }}</p>\n <p class=\"date\">{{post?.published_at | dateFormat}}</p>\n </div>\n </div>\n </div>\n\n @if (isLoaded) {\n <div class=\"hero-right\">\n @if (getImageUrl()) {\n <img\n [src]=\"getImageUrl()\"\n alt=\"Blog Post\"\n class=\"hero-image\"\n />\n } @else {\n <pw-no-data\n class=\"data-image\"\n [withImage]=\"true\"\n [message]=\"'Resource.Tag.NoImageMessage' | transloco\"\n [description]=\"'Resource.Tag.NoDataMessage' | transloco\"\n ></pw-no-data>\n }\n </div>\n }\n </div>\n</section>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n inject,\n OnInit\n} from '@angular/core';\nimport { Title } from '@angular/platform-browser';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AuthService } from '@posiwise/common-services';\nimport { User } from '@posiwise/common-utilities';\nimport { Trial4ContactUsComponent } from '@posiwise/resource-contact-us';\nimport { ResourceHeaderComponent } from '@posiwise/utils';\n\nimport { RelatedResourcesComponent } from './related-resources/related-resources.component';\nimport { ResourcePostDetailsComponent } from './resource-post-details/resource-post-details.component';\n\n@Component({\n selector: 'app-resource-post',\n templateUrl: './resource-post.component.html',\n styleUrl: './resource-post.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n ResourceHeaderComponent,\n ResourcePostDetailsComponent,\n RelatedResourcesComponent,\n Trial4ContactUsComponent\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourcePostComponent extends AppBaseComponent implements OnInit {\n private readonly titleService = inject(Title);\n private readonly authService = inject(AuthService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n slug: string;\n user: User;\n userLoggedIn: boolean | undefined = undefined;\n\n ngOnInit(): void {\n this.route.params.subscribe(params => {\n this.slug = params['slug'] ?? 'Default';\n this.cdr.markForCheck();\n });\n\n this.authService.getToken$().subscribe(res => {\n this.userLoggedIn = !!res;\n if (this.userLoggedIn) {\n this.userService.getUserInfo().subscribe(data => {\n this.user = data;\n this.cdr.markForCheck();\n });\n }\n this.cdr.markForCheck();\n });\n }\n}\n","<pw-resource-header [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-header>\n<main>\n<pw-resource-post-details></pw-resource-post-details>\n<pw-related-resources></pw-related-resources>\n</main>\n<pw-trial-4-contact-us [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-trial-4-contact-us>","import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { TooltipModule } from 'primeng/tooltip';\n\nimport { RelatedResourcesComponent } from '../../components/resource-post/related-resources/related-resources.component';\nimport { ResourcePostComponent } from '../../components/resource-post/resource-post.component';\nimport { ResourcePostDetailsComponent } from '../../components/resource-post/resource-post-details/resource-post-details.component';\nimport { ResourceSharedModule } from '../../shared/resource-shared.module';\n\nconst routes: Routes = [\n {\n path: '',\n component: ResourcePostComponent,\n data: {\n title: 'Resources - Post',\n permission: 'Pages.Blog',\n preload: false\n }\n }\n];\n\n@NgModule({\n imports: [\n ResourceSharedModule,\n TooltipModule,\n RouterModule.forChild(routes),\n ResourcePostComponent,\n ResourcePostDetailsComponent,\n RelatedResourcesComponent\n ],\n schemas: [CUSTOM_ELE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AAA;CAAA;CAAlB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAkB,SAAA;IATvB;IACA;IAAa,GAAA;IAEb;IACA;IACA;GAAyB;EAAA,CAAA;CAAA;CAIpB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAkB,SAAA;IATvB;IACA;IACA,aAAa,SAAS,MAAM;IAC5B;IACA;IACA;GAAyB;EAAA,CAAA;CAAA;;AAIpB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAkB,YAAA,CAAA;EAX9B,MAAA;EAAS,MAAA,CAAA;GACN,SAAS;IACL;IACA;IACA,aAAa,SAAS,MAAM;IAC5B;IACA;IACA;GACH;GACD,SAAS,CAAC,sBAAsB;EACnC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"posiwise-resource-module-resource-root.module-TMvR1c1H.mjs","names":["i1"],"sources":["../../../../libs/resource-module/src/lib/public/components/resources/resource-tags/resource-tags.component.ts","../../../../libs/resource-module/src/lib/public/components/resources/resource-tags/resource-tags.component.html","../../../../libs/resource-module/src/lib/public/components/resources/vault-section/vault-section.component.ts","../../../../libs/resource-module/src/lib/public/components/resources/vault-section/vault-section.component.html","../../../../libs/resource-module/src/lib/public/components/resources/resources.component.ts","../../../../libs/resource-module/src/lib/public/components/resources/resources.component.html","../../../../libs/resource-module/src/lib/public/modules/root/resource-root-shared.module.ts","../../../../libs/resource-module/src/lib/public/modules/root/resource-root.module.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n EventEmitter,\n inject,\n Input,\n OnChanges,\n OnInit,\n Output,\n type SimpleChanges\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { TagService } from '@posiwise/common-services';\nimport { Tag, User } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\n@Component({\n selector: 'pw-resource-tags',\n templateUrl: './resource-tags.component.html',\n styleUrls: [\n './resource-tags.component.scss',\n '../../resources-hub/resources-hub.component.scss'\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgClass],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceTagComponent extends AppBaseComponent implements OnInit, OnChanges {\n private readonly tagService = inject(TagService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n @Output() tagsLoaded = new EventEmitter<Tag[]>();\n @Output() tagSelected = new EventEmitter<Tag>();\n @Input() user: User;\n @Input() userLoggedIn: boolean;\n\n tags = [];\n subscriptionId: number;\n loading = true;\n loaded = false;\n\n selectedTag: Tag | null = null;\n isMasterSubscription;\n\n canEditResourcesValue = false;\n\n ngOnInit() {\n this.localStorage.getItem$('product').subscribe(product => {\n const data = product ? JSON.parse(product) : null;\n this.subscriptionId =\n data?.subscriptionId ?? this.appConfig.master_subscription.subscription_id;\n this.cdr.markForCheck();\n });\n this.getTags();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['user'] || changes['userLoggedIn']) {\n if (this.userLoggedIn && this.user) {\n this.updateCanEditResourcesValue();\n }\n }\n }\n\n navigateToTagList(): void {\n HelperService.navigateToTagList();\n }\n\n selectTag(tag: Tag): void {\n this.selectedTag = tag;\n this.tagSelected.emit(tag);\n }\n\n getTags() {\n this.loading = true;\n this.tagService\n .getTagsByType('post_categories', {}, this.getEffectiveSubscriptionId())\n .subscribe(res => {\n this.tags = (res?.tags ?? [])\n .filter(tag => tag.visible_in_resources)\n .map(tag => ({\n ...tag\n }));\n this.tagsLoaded.emit(this.tags);\n this.cdr.markForCheck();\n })\n .add(() => {\n this.loading = false;\n this.loaded = true;\n this.cdr.markForCheck();\n });\n }\n\n /** Helper method to get effective subscription ID */\n private getEffectiveSubscriptionId(): number {\n return HelperService.getEffectiveSubscriptionId(\n this.user,\n this.subscriptionId,\n this.appConfig.master_subscription.subscription_id\n );\n }\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","@if (loading) {\n <!-- Skeleton — holds same space as real content to prevent CLS -->\n <section class=\"tag-section py-5 bg-white\">\n <div class=\"container\">\n <div class=\"row g-4\">\n @for (i of [1, 2, 3, 4, 5, 6, 7, 8]; track i) {\n <div class=\"col-md-3 col-sm-6 col-6 mb-1 mb-lg-4\">\n <div class=\"resource-card d-flex align-items-center p-3 placeholder-wave\">\n <span class=\"placeholder col-8 rounded\" style=\"height:1rem\"></span>\n </div>\n </div>\n }\n </div>\n </div>\n </section>\n} @else if (tags?.length) {\n <section class=\"tag-section py-5 bg-white\">\n <div class=\"container\">\n @if (userLoggedIn && user?.auth?.granted['Pages.Admin']) {\n <i\n class=\"fa fa-edit in-page-edit-icon cursor-pointer text-black d-flex justify-content-end mb-3\"\n (click)=\"navigateToTagList()\"\n (keydown.enter)=\"navigateToTagList()\"\n (keydown.space)=\"navigateToTagList()\"\n title=\"Edit Tags\"></i>\n }\n <div class=\"row g-4\">\n @for (tag of tags; track tag) {\n <div class=\"col-md-3 col-sm-6 col-6 mb-1 mb-lg-4\">\n <div (click)=\"selectTag(tag)\" (keydown.enter)=\"selectTag(tag)\" class=\"resource-card d-flex align-items-center p-3\" [ngClass]=\"{ 'selected': selectedTag?.name === tag.name }\">\n @if (tag?.icon_name) {\n <i class=\"fa\" [ngClass]=\"tag.icon_name + ' resource-icon me-3'\"></i>\n }\n <span class=\"resource-text\">{{ tag.name }}</span>\n </div>\n </div>\n }\n </div>\n </div>\n </section>\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n type SimpleChanges,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { Title } from '@angular/platform-browser';\n\nimport { AdminService } from '@posiwise/admin-module-utils';\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { User } from '@posiwise/common-utilities';\nimport { LazyImgDirective } from '@posiwise/directives';\nimport { HelperService } from '@posiwise/helper-service';\nimport { NoDataComponent } from '@posiwise/shared-components';\nimport { CustomUploaderComponent, ProfileImageCropperComponent } from '@posiwise/utils';\n\nimport { TranslocoPipe } from '@jsverse/transloco';\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\n@Component({\n selector: 'pw-vault-section',\n templateUrl: './vault-section.component.html',\n styleUrls: ['./vault-section.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n LazyImgDirective,\n NoDataComponent,\n FormsModule,\n ProfileImageCropperComponent,\n TranslocoPipe\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class VaultSectionComponent\n extends AppBaseComponent\n implements OnInit, OnChanges, OnDestroy\n{\n private readonly modalService = inject(NgbModal);\n private readonly adminService = inject(AdminService);\n private readonly titleService = inject(Title);\n private readonly cdr = inject(ChangeDetectorRef);\n\n @ViewChild('editResourceModal') editResourceModalRef!: TemplateRef<CustomUploaderComponent>;\n @Input() user: User;\n @Input() userLoggedIn: boolean;\n\n companyName;\n resourceTagLine = this.appConfig.pages_config?.resources.resources_tagline;\n resourceImage = this.appConfig.pages_config?.resources.resources_image.url;\n resourceDescription = this.appConfig.pages_config?.resources.resources_description;\n domainId = this.appConfig.domain_id;\n\n image: string | null = null;\n file: File | null = null;\n imageModalRef;\n\n editingTagline = '';\n editingDescription = '';\n\n subscriptionId;\n isMasterSubscription;\n previewResourceImage: { url: string; name: string };\n\n canEditResourcesValue = false;\n\n private seoUpdateTimer;\n\n ngOnInit() {\n this.previewResourceImage = {\n url: this.appConfig.pages_config?.resources.resources_image.url ?? '',\n name: 'resources_image.png'\n };\n this.companyName = this.appConfig?.company.name;\n\n // Critical image preloading is now handled server-side for better LCP performance\n\n // Use proper timer management instead of setTimeout\n this.scheduleSEOMetadataUpdate();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['user'] || changes['userLoggedIn']) {\n if (this.userLoggedIn && this.user) {\n this.permissionService.user = this.user;\n this.updateCanEditResourcesValue();\n }\n }\n }\n\n private scheduleSEOMetadataUpdate(): void {\n // Clear any existing timer to prevent multiple timers\n this.clearSEOTimer();\n\n // Schedule the SEO update with proper timer management\n this.seoUpdateTimer = setTimeout(() => {\n this.updateSEOMetadata();\n this.seoUpdateTimer = null; // Clear reference after execution\n }, 2000);\n }\n\n private clearSEOTimer(): void {\n if (this.seoUpdateTimer) {\n clearTimeout(this.seoUpdateTimer);\n this.seoUpdateTimer = null;\n }\n }\n\n private updateSEOMetadata() {\n // Use resource tagline as page title\n if (this.resourceTagLine) {\n this.titleService.setTitle(this.resourceTagLine);\n }\n\n // Use resource description as meta description\n if (this.resourceDescription) {\n this.updateMetaDescription(this.resourceDescription);\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 openEditResourceModal(): void {\n this.editingTagline = this.resourceTagLine;\n this.editingDescription = this.resourceDescription;\n this.image = this.resourceImage;\n this.file = null;\n this.modalService.open(this.editResourceModalRef, { centered: true });\n }\n\n saveResourceContent(modal): void {\n const formData = new FormData();\n\n formData.append('subscription_id', this.getEffectiveSubscriptionId().toString());\n formData.append('resources_tagline', this.editingTagline || '');\n formData.append('resources_description', this.editingDescription || '');\n\n if (this.file) {\n formData.append('resources_image', this.file);\n } else if (!this.image) {\n formData.append('remove_resources_image', 'true');\n }\n this.adminService.updateDomainConfig(this.appConfig?.domain_id, formData).subscribe(() => {\n this.resourceTagLine = this.editingTagline;\n this.resourceDescription = this.editingDescription;\n this.resourceImage = this.image;\n this.toast.success('Resources updated');\n modal.close();\n this.updateSEOMetadata();\n this.cdr.markForCheck();\n });\n }\n\n openImageModal(modalTemplate): void {\n this.imageModalRef = this.modalService.open(modalTemplate, { centered: true, size: 'md' });\n }\n\n onImageSelected(base64: string): void {\n this.image = base64;\n this.file = HelperService.convertBase64ToFile(base64);\n this.imageModalRef?.close();\n }\n\n removeImage(): void {\n this.image = null;\n this.file = null;\n }\n\n override ngOnDestroy(): void {\n // Clean up timer to prevent memory leaks\n this.clearSEOTimer();\n }\n\n /** Helper method to get effective subscription ID */\n private getEffectiveSubscriptionId(): number {\n return HelperService.getEffectiveSubscriptionId(\n this.user,\n this.subscriptionId,\n this.appConfig.master_subscription.subscription_id\n );\n }\n handleImageError(event: Event, fallbackPath): void {\n HelperService.handleImageFallbackPath(event, fallbackPath);\n }\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","<section class=\"vault-section\">\n <div class=\"skewed-bg\"></div>\n\n <!-- Edit Icon (top-right) -->\n\n <div class=\"container\">\n <div class=\"row align-items-center vault-row\">\n <!-- Left Content -->\n <div class=\"col-lg-6 col-12 text-content\">\n <div class=\"d-flex\">\n <h1 class=\"headline\">{{resourceTagLine || 'UPDATE ME ON ADMIN/DOMAINS MODULE'}}</h1>\n @if (canEditResourcesValue) {\n <i\n class=\"fa fa-edit tag-edit-icon in-page-edit-icon mt-4 ms-3 cursor-pointer\"\n title=\"Edit Resource\"\n (click)=\"openEditResourceModal()\"\n (keydown.enter)=\"openEditResourceModal()\"\n (keydown.space)=\"openEditResourceModal()\"\n ></i>\n }\n </div>\n <div class=\"description-content\">\n <p class=\"description\" [innerHTML]=\"resourceDescription || 'UPDATE ME ON ADMIN/DOMAINS MODULE.'\">\n </p>\n </div>\n </div>\n\n <!-- Right Content -->\n <div class=\"col-lg-6 col-12 img-wrapper\">\n @if (resourceImage) {\n <img\n [src]=\"resourceImage\"\n alt=\"Vault Mockup\"\n class=\"img-fluid\"\n width=\"800\"\n height=\"600\"\n fetchpriority=\"high\"\n decoding=\"async\"\n loading=\"eager\" />\n } @else {\n <pw-no-data [withImage]=\"true\" [message]=\"'ADD ME ON ADMIN/DOMAINS MODULE' | transloco\"></pw-no-data>\n }\n\n <ng-template #noVideo>\n <pw-no-data [withImage]=\"true\" [message]=\"'ADD ME ON ADMIN/DOMAINS MODULE' | transloco\"></pw-no-data>\n </ng-template>\n </div>\n </div>\n </div>\n</section>\n\n<!-- Edit Modal -->\n<ng-template #editResourceModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Resources</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <div class=\"mb-3\">\n <label for=\"editTagline\" class=\"form-label\">Tagline</label>\n <input id=\"editTagline\" [(ngModel)]=\"editingTagline\" class=\"form-control\"\n aria-label=\"Edit Tagline\" />\n </div>\n <div class=\"mb-3\">\n <label for=\"editDescription\" class=\"form-label\">Description</label>\n <textarea id=\"editDescription\" name=\"editingDescription\" [(ngModel)]=\"editingDescription\" rows=\"4\" class=\"form-control\"\n aria-label=\"Editing Description\"></textarea>\n </div>\n <div class=\"mb-3\">\n <span class=\"pw-label-style form-label\" id=\"vault-section-resource-image-label\">Resource Image</span>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img\n [src]=\"image || 'assets/img/resource/blog.png'\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n class=\"image w-100 mb-2\"\n alt=\"Resource content\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <button type=\"button\" class=\"btn btn-link p-0 d-inline-block\" (click)=\"openImageModal(imageCropContent)\">\n {{ file || image ? 'Edit' : 'Add' }} Picture\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 (click)=\"removeImage()\"\n (keydown.enter)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n\n </div>\n <div class=\"modal-footer\">\n <button class=\"btn btn-primary\" (click)=\"saveResourceContent(modal)\">Save</button>\n <button class=\"btn btn-secondary\" (click)=\"modal.dismiss()\">Cancel</button>\n </div>\n</ng-template>\n\n\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\" class=\"btn-close\" [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.</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","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n inject,\n OnInit\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AuthService } from '@posiwise/common-services';\nimport { Tag, User } from '@posiwise/common-utilities';\nimport { Trial4ContactUsComponent } from '@posiwise/resource-contact-us';\nimport { ResourceHeaderComponent } from '@posiwise/utils';\n\nimport { ResourceNoteCardComponent } from '../reslease-note-card/release-note-card.component';\nimport { CaseStudyCardComponent } from '../resource-case-studies/case-studies-cards/case-studies-cards.component';\nimport { ResourceCardComponent } from '../resource-post/related-resources/resource-cards/resource-cards.component';\nimport { ResourceVaultComponent } from '../resource-vault/resource-vault.component';\nimport { ResourceVideoCardComponent } from '../resource-videos/resource-video-cards/resource-video-cards.component';\nimport { UpcomingEventCardComponent } from '../resource-webinars/upcoming-event-cards/upcoming-event-cards.component';\n\nimport { ResourceTagComponent } from './resource-tags/resource-tags.component';\nimport { VaultSectionComponent } from './vault-section/vault-section.component';\n\n@Component({\n selector: 'pw-resources',\n templateUrl: './resources.component.html',\n styleUrls: ['./resources.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n ResourceHeaderComponent,\n VaultSectionComponent,\n ResourceTagComponent,\n ResourceVideoCardComponent,\n UpcomingEventCardComponent,\n ResourceCardComponent,\n CaseStudyCardComponent,\n ResourceVaultComponent,\n ResourceNoteCardComponent,\n Trial4ContactUsComponent\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceComponent extends AppBaseComponent implements OnInit {\n private readonly authService = inject(AuthService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n allTags: Tag[] = [];\n user: User;\n userLoggedIn: boolean;\n isFooterLoaded: boolean;\n\n ngOnInit() {\n this.authService.getToken$().subscribe(res => {\n this.userLoggedIn = !!res;\n this.cdr.markForCheck();\n if (this.userLoggedIn) {\n this.userService.getUserInfo().subscribe(data => {\n this.user = data;\n this.cdr.markForCheck();\n });\n }\n });\n }\n\n onTagsLoaded(tags: Tag[]) {\n this.allTags = tags;\n this.cdr.markForCheck();\n }\n\n hasTag(name: string): boolean {\n return this.allTags.some(tag => tag.name?.toLowerCase() === name.toLowerCase());\n }\n\n getCategoryIdByTagName(name: string): number | undefined {\n const tag = this.allTags.find(t => t.name?.toLowerCase() === name.toLowerCase());\n return tag?.tag_category_id;\n }\n\n getTag(name: string) {\n const tag = this.allTags.find(t => t.name?.toLowerCase() === name.toLowerCase());\n return tag;\n }\n\n getTitleByTagName(name: string): string | undefined {\n const tag = this.allTags.find(t => t.name?.toLowerCase() === name.toLowerCase());\n return tag?.title;\n }\n\n scrollToTag(tag: Tag) {\n const sectionMap: { [key: string]: string } = {\n Videos: 'videos',\n Events: 'events',\n 'Blog Posts': 'blog-posts',\n 'Case Studies': 'case-studies',\n 'White Papers': 'white-papers',\n 'Product Release Notes': 'product-release-notes'\n };\n\n const sectionId = sectionMap[tag.name?.trim()];\n if (sectionId) {\n setTimeout(() => {\n const el = document.getElementById(sectionId);\n if (el) el.scrollIntoView({ behavior: 'smooth', block: 'start' });\n }, 100);\n }\n }\n\n onVaultLoaded(isLoaded: boolean) {\n this.isFooterLoaded = isLoaded;\n }\n}\n","\n<pw-resource-header [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-header>\n<main>\n<pw-vault-section [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-vault-section>\n<pw-resource-tags [user]=\"user\" [userLoggedIn]=\"userLoggedIn\" (tagsLoaded)=\"onTagsLoaded($event)\" (tagSelected)=\"scrollToTag($event)\"></pw-resource-tags>\n@if (hasTag('Videos')) {\n <pw-resource-video-card id=\"videos\" [tag]=\"getTag('Videos')\" [showVideoSection]=\"true\" [categoryId]=\"getCategoryIdByTagName('Videos')\" [resourceTitle]=\"getTitleByTagName('Videos')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-video-card>\n}\n@if (hasTag('Events')) {\n <pw-upcoming-event-card id=\"events\" [tag]=\"getTag('Events')\" [showEventContent]=\"true\" [categoryId]=\"getCategoryIdByTagName('Events')\" [resourceTitle]=\"getTitleByTagName('Events')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-upcoming-event-card>\n}\n@if (hasTag('Blog Posts')) {\n <pw-resource-cards resourceLink=\"/resources/blogs\" [tag]=\"getTag('Blog Posts')\" id=\"blog-posts\" [categoryId]=\"getCategoryIdByTagName('Blog Posts')\" [resourceTitle]=\"getTitleByTagName('Blog Posts')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-cards>\n}\n@if (hasTag('Case Studies')) {\n <pw-case-studies-card id=\"case-studies\" [tag]=\"getTag('Case Studies')\" [showCaseStudyHeader]=\"true\" [categoryId]=\"getCategoryIdByTagName('Case Studies')\" [resourceTitle]=\"getTitleByTagName('Case Studies')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-case-studies-card>\n}\n@if (hasTag('White Papers')) {\n <pw-resource--vault (isLoadedChange)=\"onVaultLoaded($event)\" id=\"white-papers\" [tag]=\"getTag('White Papers')\" [showVaultSection]=\"true\" [categoryId]=\"getCategoryIdByTagName('White Papers')\" [resourceTitle]=\"getTitleByTagName('White Papers')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource--vault>\n}\n@if (hasTag('Product Release Notes')) {\n <pw-resource-note-card [isResource]=\"true\" [isReleasePress]=\"true\" id=\"product-release-notes\" [tag]=\"getTag('Product Release Notes')\" [releaseHeader]=\"true\" [categoryId]=\"getCategoryIdByTagName('Product Release Notes')\" [resourceTitle]=\"getTitleByTagName('Product Release Notes')\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-note-card>\n}\n</main>\n@if (isFooterLoaded) {\n <pw-trial-4-contact-us [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-trial-4-contact-us>\n}","import { CommonModule } from '@angular/common';\nimport { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { CoreTranslocoModule } from '@posiwise/core-transloco';\nimport { ResourceSharedComponentsModule } from '@posiwise/shared-components';\n\nimport { TranslocoModule } from '@jsverse/transloco';\n\nimport { ResourceCardsModule } from '../../shared/resource-cards.module';\n\n/**\n * Shared module specifically for ResourceRootModule\n * Imports only the essential modules needed by the root resource page\n * without the unnecessary dependencies from ResourceSharedModule\n */\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n CoreTranslocoModule,\n TranslocoModule,\n ResourceSharedComponentsModule,\n ResourceCardsModule\n ],\n exports: [\n ResourceCardsModule,\n CommonModule,\n FormsModule,\n CoreTranslocoModule,\n TranslocoModule,\n ResourceSharedComponentsModule\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceRootSharedModule {}\n","import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { SeoGuard } from '@posiwise/core-guards';\n\nimport { ResourceTagComponent } from '../../components/resources/resource-tags/resource-tags.component';\nimport { ResourceComponent } from '../../components/resources/resources.component';\nimport { VaultSectionComponent } from '../../components/resources/vault-section/vault-section.component';\n\nimport { ResourceRootSharedModule } from './resource-root-shared.module';\n\nconst routes: Routes = [\n {\n path: '',\n component: ResourceComponent,\n data: {\n title: 'Resources: Guides, Videos and Case Studies',\n description:\n 'Browse guides, videos, case studies, white papers, events and release notes to get more out of the platform.',\n permission: 'Pages.Blog',\n preload: false\n },\n canActivate: [SeoGuard]\n }\n];\n\n@NgModule({\n imports: [\n ResourceRootSharedModule,\n RouterModule.forChild(routes),\n ResourceComponent,\n ResourceTagComponent,\n VaultSectionComponent\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceRootModule {}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA+BA,IAAa,uBAAb,MAAa,6BAA6B,iBAAgB;CAX1D,cAAA;;EAYqB,KAAA,aAAa,OAAO,UAAU;EAC9B,KAAA,MAAM,OAAO,iBAAiB;EAErC,KAAA,aAAa,IAAI,aAAY;EAC7B,KAAA,cAAc,IAAI,aAAY;EAIxC,KAAA,OAAO,CAAA;EAEP,KAAA,UAAU;EACV,KAAA,SAAS;EAET,KAAA,cAA0B;EAG1B,KAAA,wBAAwB;CAqE3B;CAnEG,WAAQ;EACJ,KAAK,aAAa,SAAS,SAAS,CAAC,CAAC,WAAU,YAAU;GACtD,MAAM,OAAO,UAAU,KAAK,MAAM,OAAO,IAAI;GAC7C,KAAK,iBACD,MAAM,kBAAkB,KAAK,UAAU,oBAAoB;GAC/D,KAAK,IAAI,aAAY;EACzB,CAAC;EACD,KAAK,QAAO;CAChB;CAEA,YAAY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,MAAA;EAAS,MAAA,CAAA;GACN,SAAS;IACL;IACA;IACA;IACA;IACA;IACA;GACH;GACD,SAAS;IACL;IACA;IACA;IACA;IACA;IACA;GACH;GACD,SAAS,CAAC,sBAAsB;EACnC,CAAA;;;ACvBD,MAAM,SAAiB,CACnB;CACI,MAAM;CACN,WAAW;CACX,MAAM;EACF,OAAO;EACP,aACI;EACJ,YAAY;EACZ,SAAS;CACZ;CACD,aAAa,CAAC,QAAQ;AACzB,CACJ;AAYD,IAAa,qBAAb,MAAa,mBAAkB;CAAlB;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAkB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAlB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAkB,SAAA;IARvB;IAAwB,GAAA;IAExB;IACA;IACA;GAAqB;EAAA,CAAA;CAAA;CAIhB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAkB,SAAA;IARvB;IACA,aAAa,SAAS,MAAM;IAC5B;IAEA;GAAqB;EAAA,CAAA;CAAA;;AAIhB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAkB,YAAA,CAAA;EAV9B,MAAA;EAAS,MAAA,CAAA;GACN,SAAS;IACL;IACA,aAAa,SAAS,MAAM;IAC5B;IACA;IACA;GACH;GACD,SAAS,CAAC,sBAAsB;EACnC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"posiwise-resource-module-resource.service-DAXsq-WG.mjs","names":[],"sources":["../../../../libs/resource-module/src/lib/resource.service.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\n\nimport { MainApiHttpService } from '@posiwise/common-services';\nimport { Paging } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\ntype PostFormValue = string | number | boolean | Blob | null | undefined;\n\n@Injectable()\nexport class ResourceService {\n private readonly api = inject(MainApiHttpService);\n\n private readonly resource = '/posts';\n\n private readonly comments = '/comments';\n\n getPublicPosts(\n master_subscription_id,\n page: number,\n pageSize: number,\n search: string,\n tagCategoryIds?: string,\n tagIds?: string,\n extraParams: Record<string, string | number> = {}\n ) {\n const params = {\n ...extraParams,\n page,\n page_size: pageSize,\n search: search,\n master_subscription_id\n };\n\n if (tagCategoryIds) {\n params['tag_category_ids'] = tagCategoryIds;\n }\n\n if (tagIds) {\n params['tag_ids'] = tagIds;\n }\n return this.api.getWithParams(`${this.resource}/get_all`, {\n ...params\n });\n }\n\n getAdminPosts(subscriptionId, paging?: Paging) {\n return this.api.getWithParams(`${this.resource}/admin_get_all`, {\n ...HelperService.getPagingParams(paging),\n subscription_id: subscriptionId\n });\n }\n\n addPost(post) {\n return this.api.post(this.resource, this.toPostFormData(post));\n }\n\n getPostBySlug(slug: string) {\n return this.api.get(`${this.resource}/${slug}`);\n }\n\n deletePost(id) {\n return this.api.delete(`${this.resource}/${id}`);\n }\n\n updatePost(post, id) {\n return this.api.put(`${this.resource}/${id}`, this.toPostFormData(post));\n }\n\n // FormData sends null as the TEXT \"null\", which main-api then stored (a post's\n // external_url became \"null\" and its card linked to /null). Unset fields are left out.\n private toPostFormData(post: Record<string, PostFormValue>): FormData {\n const formData = new FormData();\n Object.entries(post).forEach(([key, value]) => {\n if (value !== null && value !== undefined) {\n formData.append(key, value instanceof Blob ? value : String(value));\n }\n });\n return formData;\n }\n\n private getComments() {\n return this.api.get(`${this.comments}/get_all`);\n }\n\n postComments(post) {\n return this.api.post(this.comments, post);\n }\n\n getResourceInsight(subscription_id, starting_at?: string, ending_at?: string) {\n return this.api.getWithParams(\n `/admin/posts_analytics?type=views&subscription_id=${subscription_id}`,\n { starting_at, ending_at }\n );\n }\n\n getResourcePostsInsight(id) {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