@posiwise/resource-module 0.0.200 → 0.0.201
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-db9D53MI.mjs → posiwise-resource-module-base-top-banner.component-CrdBpNSj.mjs} +5 -5
- package/fesm2022/{posiwise-resource-module-base-top-banner.component-db9D53MI.mjs.map → posiwise-resource-module-base-top-banner.component-CrdBpNSj.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-blogs.module-C7DtGCXR.mjs → posiwise-resource-module-resource-blogs.module-hxktrj98.mjs} +14 -14
- package/fesm2022/{posiwise-resource-module-resource-blogs.module-C7DtGCXR.mjs.map → posiwise-resource-module-resource-blogs.module-hxktrj98.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-cards.module-mbvmvJpV.mjs → posiwise-resource-module-resource-cards.module-D3yf7FNt.mjs} +37 -37
- package/fesm2022/{posiwise-resource-module-resource-cards.module-mbvmvJpV.mjs.map → posiwise-resource-module-resource-cards.module-D3yf7FNt.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-case-studies.module-CPcpQWlI.mjs → posiwise-resource-module-resource-case-studies.module-CFcO0CI-.mjs} +10 -10
- package/fesm2022/{posiwise-resource-module-resource-case-studies.module-CPcpQWlI.mjs.map → posiwise-resource-module-resource-case-studies.module-CFcO0CI-.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-events.module-yyacWPwv.mjs → posiwise-resource-module-resource-events.module-0PDppSJ6.mjs} +10 -10
- package/fesm2022/{posiwise-resource-module-resource-events.module-yyacWPwv.mjs.map → posiwise-resource-module-resource-events.module-0PDppSJ6.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-hub.module-C-SpVctG.mjs → posiwise-resource-module-resource-hub.module-2qzLV9I1.mjs} +12 -12
- package/fesm2022/{posiwise-resource-module-resource-hub.module-C-SpVctG.mjs.map → posiwise-resource-module-resource-hub.module-2qzLV9I1.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-integrations.module-0Ei4NMHQ.mjs → posiwise-resource-module-resource-integrations.module-DqDd_1U9.mjs} +18 -16
- package/fesm2022/posiwise-resource-module-resource-integrations.module-DqDd_1U9.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-post.module-C8O8oiWv.mjs → posiwise-resource-module-resource-post.module-BFuEjqA9.mjs} +16 -16
- package/fesm2022/{posiwise-resource-module-resource-post.module-C8O8oiWv.mjs.map → posiwise-resource-module-resource-post.module-BFuEjqA9.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-release-notes.module-CZeNqmRV.mjs → posiwise-resource-module-resource-release-notes.module-BbofH_0n.mjs} +14 -14
- package/fesm2022/{posiwise-resource-module-resource-release-notes.module-CZeNqmRV.mjs.map → posiwise-resource-module-resource-release-notes.module-BbofH_0n.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-root.module-CQd_uoG7.mjs → posiwise-resource-module-resource-root.module-C9c17Dhm.mjs} +21 -21
- package/fesm2022/{posiwise-resource-module-resource-root.module-CQd_uoG7.mjs.map → posiwise-resource-module-resource-root.module-C9c17Dhm.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-videos.module-DUz-VKpv.mjs → posiwise-resource-module-resource-videos.module-BsnB9vFd.mjs} +14 -14
- package/fesm2022/{posiwise-resource-module-resource-videos.module-DUz-VKpv.mjs.map → posiwise-resource-module-resource-videos.module-BsnB9vFd.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-white-papers.module-Badb-ZZo.mjs → posiwise-resource-module-resource-white-papers.module-BC-OyhAK.mjs} +14 -14
- package/fesm2022/{posiwise-resource-module-resource-white-papers.module-Badb-ZZo.mjs.map → posiwise-resource-module-resource-white-papers.module-BC-OyhAK.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource.service-Dyxc3yQ6.mjs → posiwise-resource-module-resource.service-IK3r0iUB.mjs} +4 -4
- package/fesm2022/posiwise-resource-module-resource.service-IK3r0iUB.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module.mjs +44 -44
- package/package.json +1 -1
- package/fesm2022/posiwise-resource-module-resource-integrations.module-0Ei4NMHQ.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource.service-Dyxc3yQ6.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"posiwise-resource-module-resource-integrations.module-0Ei4NMHQ.mjs","names":["i1.ResourceService","i3","i4.ResourceTopBannerEditComponent","i5","i1","i2.ResourceService","i4","i6.ResourceCompanyCardComponent","i7.ResourceNoteCardComponent","i11","i16.IntegrationTopBannerComponent"],"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,\n ChangeDetectorRef, Component, Injector } from '@angular/core';\nimport { Title } from '@angular/platform-browser';\n\nimport { AuthService, TagService } from '@posiwise/common-services';\n\nimport { ResourceService } from '../../../../resource.service';\nimport { BaseTopBannerComponent } from '../../base/base-top-banner.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\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class IntegrationTopBannerComponent extends BaseTopBannerComponent {\n contactUsUrl = this.appConfig?.pages_config?.contact_us?.url;\n\n constructor(\n resourceService: ResourceService,\n tagService: TagService,\n authService: AuthService,\n titleService: Title,\n cdr: ChangeDetectorRef,\n injector: Injector\n ) {\n super(resourceService, tagService, authService, titleService, cdr, injector);\n }\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.png'\"\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 { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Injector,\n OnInit,\n TemplateRef,\n ViewChild\n} from '@angular/core';\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 { HelperService } from '@posiwise/helper-service';\nimport { CustomUploaderComponent } from '@posiwise/utils';\n\nimport { forkJoin } from 'rxjs';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { ResourceService } from '../../../resource.service';\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\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class ResourceIntegrationComponent extends AppBaseComponent implements OnInit {\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 constructor(\n private readonly sanitizer: DomSanitizer,\n private readonly resourceService: ResourceService,\n private readonly modalService: NgbModal,\n private readonly tagService: TagService,\n private readonly authService: AuthService,\n private readonly adminService: AdminService,\n private readonly cdr: ChangeDetectorRef,\n injector: Injector\n ) {\n super(injector);\n }\n\n ngOnInit() {\n this.companyName = this.appConfig.company.name;\n\n document.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<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<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 { 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: 'Resources - Integrations',\n permission: 'Pages.Blog',\n preload: false\n }\n }\n];\n\n@NgModule({\n declarations: [ResourceIntegrationComponent, IntegrationTopBannerComponent],\n imports: [ResourceSharedModule, RouterModule.forChild(routes)]\n})\nexport class ResourceIntegrationsModule {}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAa,gCAAb,MAAa,sCAAsC,uBAAsB;CAGrE,YACI,iBACA,YACA,aACA,cACA,KACA,UAAkB;EAElB,MAAM,iBAAiB,YAAY,aAAa,cAAc,KAAK,QAAQ;EAV/E,KAAA,eAAe,KAAK,WAAW,cAAc,YAAY;CAWzD;CAEU,gBAAa;EACnB,OAAO;CACX;CAhBS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module-resource.service-Dyxc3yQ6.mjs","names":[],"sources":["../../../../libs/resource-module/src/lib/resource.service.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nimport { MainApiHttpService } from '@posiwise/common-services';\nimport { Paging } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\n@Injectable()\nexport class ResourceService {\n private readonly resource = '/posts';\n\n private readonly comments = '/comments';\n\n constructor(private readonly api: MainApiHttpService) {}\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): 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) {\n return this.api.get(`${this.resource}/${id}/insights`);\n }\n}\n"],"mappings":";;;;AAOA,IAAa,kBAAb,MAAa,gBAAe;CAKxB,YAA6B,KAAuB;EAAvB,KAAA,MAAA;EAJZ,KAAA,WAAW;EAEX,KAAA,WAAW;CAE2B;CAEvD,eACI,wBACA,MACA,UACA,QACA,gBACA,QACA,cAA+C,CAAA,GAAE;EAEjD,MAAM,SAAS;GACX,GAAG;GACH;GACA,WAAW;GACH;GACR;EACH;EAED,IAAI,gBACA,OAAO,sBAAsB;EAGjC,IAAI,QACA,OAAO,aAAa;EAExB,OAAO,KAAK,IAAI,cAAc,GAAG,KAAK,SAAQ,WAAY,EACtD,GAAG,OACN,CAAA;CACL;CAEA,cAAc,gBAAgB,QAAe;EACzC,OAAO,KAAK,IAAI,cAAc,GAAG,KAAK,SAAQ,iBAAkB;GAC5D,GAAG,cAAc,gBAAgB,MAAM;GACvC,iBAAiB;EACpB,CAAA;CACL;CAEA,QAAQ,MAAI;EACR,OAAO,KAAK,IAAI,KAAK,KAAK,UAAU,KAAK,eAAe,IAAI,CAAC;CACjE;CAEA,cAAc,MAAY;EACtB,OAAO,KAAK,IAAI,IAAI,GAAG,KAAK,SAAQ,GAAI,MAAM;CAClD;CAEA,WAAW,IAAE;EACT,OAAO,KAAK,IAAI,OAAO,GAAG,KAAK,SAAQ,GAAI,IAAI;CACnD;CAEA,WAAW,MAAM,IAAE;EACf,OAAO,KAAK,IAAI,IAAI,GAAG,KAAK,SAAQ,GAAI,MAAM,KAAK,eAAe,IAAI,CAAC;CAC3E;CAIQ,eAAe,MAAI;EACvB,MAAM,WAAW,IAAI,SAAQ;EAC7B,OAAO,QAAQ,IAAI,CAAC,CAAC,SAAS,CAAC,KAAK,WAAU;GAC1C,IAAI,UAAU,QAAQ,UAAU,QAC5B,SAAS,OAAO,KAAK,iBAA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