@posiwise/resource-module 0.0.196 → 0.0.198

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/fesm2022/{posiwise-resource-module-base-top-banner.component-DSirXfem.mjs → posiwise-resource-module-base-top-banner.component-Bxj0WwXC.mjs} +2 -2
  2. package/fesm2022/{posiwise-resource-module-base-top-banner.component-DSirXfem.mjs.map → posiwise-resource-module-base-top-banner.component-Bxj0WwXC.mjs.map} +1 -1
  3. package/fesm2022/{posiwise-resource-module-resource-blogs.module-CScGlSG5.mjs → posiwise-resource-module-resource-blogs.module-C6KzoRWc.mjs} +4 -4
  4. package/fesm2022/{posiwise-resource-module-resource-blogs.module-CScGlSG5.mjs.map → posiwise-resource-module-resource-blogs.module-C6KzoRWc.mjs.map} +1 -1
  5. package/fesm2022/{posiwise-resource-module-resource-cards.module-Bp4BgXL2.mjs → posiwise-resource-module-resource-cards.module-BX8R0Cng.mjs} +463 -138
  6. package/fesm2022/posiwise-resource-module-resource-cards.module-BX8R0Cng.mjs.map +1 -0
  7. package/fesm2022/{posiwise-resource-module-resource-case-studies.module-BtkkgIFa.mjs → posiwise-resource-module-resource-case-studies.module-BDIf5gLH.mjs} +3 -3
  8. package/fesm2022/{posiwise-resource-module-resource-case-studies.module-BtkkgIFa.mjs.map → posiwise-resource-module-resource-case-studies.module-BDIf5gLH.mjs.map} +1 -1
  9. package/fesm2022/{posiwise-resource-module-resource-events.module-BwK6UfCq.mjs → posiwise-resource-module-resource-events.module-B7xJNXXA.mjs} +10 -202
  10. package/fesm2022/posiwise-resource-module-resource-events.module-B7xJNXXA.mjs.map +1 -0
  11. package/fesm2022/{posiwise-resource-module-resource-hub.module-BWvid8gs.mjs → posiwise-resource-module-resource-hub.module-BIlT8XPx.mjs} +7 -7
  12. package/fesm2022/posiwise-resource-module-resource-hub.module-BIlT8XPx.mjs.map +1 -0
  13. package/fesm2022/{posiwise-resource-module-resource-integrations.module-G3zPgwRM.mjs → posiwise-resource-module-resource-integrations.module-Bto11niw.mjs} +4 -4
  14. package/fesm2022/{posiwise-resource-module-resource-integrations.module-G3zPgwRM.mjs.map → posiwise-resource-module-resource-integrations.module-Bto11niw.mjs.map} +1 -1
  15. package/fesm2022/{posiwise-resource-module-resource-post.module-Cs_ytaXd.mjs → posiwise-resource-module-resource-post.module-DijUa5vO.mjs} +3 -3
  16. package/fesm2022/{posiwise-resource-module-resource-post.module-Cs_ytaXd.mjs.map → posiwise-resource-module-resource-post.module-DijUa5vO.mjs.map} +1 -1
  17. package/fesm2022/{posiwise-resource-module-resource-release-notes.module-Bk82KN0U.mjs → posiwise-resource-module-resource-release-notes.module-u6O3JD9u.mjs} +6 -6
  18. package/fesm2022/posiwise-resource-module-resource-release-notes.module-u6O3JD9u.mjs.map +1 -0
  19. package/fesm2022/{posiwise-resource-module-resource-root.module-DP0EMP-_.mjs → posiwise-resource-module-resource-root.module-3WYuuuw6.mjs} +2 -2
  20. package/fesm2022/{posiwise-resource-module-resource-root.module-DP0EMP-_.mjs.map → posiwise-resource-module-resource-root.module-3WYuuuw6.mjs.map} +1 -1
  21. package/fesm2022/{posiwise-resource-module-resource-videos.module-smQ7_8vz.mjs → posiwise-resource-module-resource-videos.module-BTPdGGSf.mjs} +4 -4
  22. package/fesm2022/{posiwise-resource-module-resource-videos.module-smQ7_8vz.mjs.map → posiwise-resource-module-resource-videos.module-BTPdGGSf.mjs.map} +1 -1
  23. package/fesm2022/{posiwise-resource-module-resource-white-papers.module-BPzrpciQ.mjs → posiwise-resource-module-resource-white-papers.module-Bonf8OHM.mjs} +4 -4
  24. package/fesm2022/{posiwise-resource-module-resource-white-papers.module-BPzrpciQ.mjs.map → posiwise-resource-module-resource-white-papers.module-Bonf8OHM.mjs.map} +1 -1
  25. package/fesm2022/{posiwise-resource-module-resource.service-DjeMJX1O.mjs → posiwise-resource-module-resource.service-B09CoD3d.mjs} +3 -2
  26. package/fesm2022/posiwise-resource-module-resource.service-B09CoD3d.mjs.map +1 -0
  27. package/fesm2022/posiwise-resource-module.mjs +12 -12
  28. package/package.json +1 -1
  29. package/types/posiwise-resource-module.d.ts +172 -31
  30. package/fesm2022/posiwise-resource-module-resource-cards.module-Bp4BgXL2.mjs.map +0 -1
  31. package/fesm2022/posiwise-resource-module-resource-events.module-BwK6UfCq.mjs.map +0 -1
  32. package/fesm2022/posiwise-resource-module-resource-hub.module-BWvid8gs.mjs.map +0 -1
  33. package/fesm2022/posiwise-resource-module-resource-release-notes.module-Bk82KN0U.mjs.map +0 -1
  34. package/fesm2022/posiwise-resource-module-resource.service-DjeMJX1O.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"posiwise-resource-module-resource-events.module-BwK6UfCq.mjs","names":["i1.ResourceService","i3","i5.ResourceEditCardLazyComponent","i6","i8","i1.ResourceService","i4.ResourceTopBannerEditComponent","i5.UpcomingEventCardComponent","i7","i1"],"sources":["../../../../libs/resource-module/src/lib/public/components/resource-webinars/replay-event-cards/replay-event-cards.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-webinars/replay-event-cards/replay-event-cards.component.html","../../../../libs/resource-module/src/lib/public/components/resource-webinars/resource-webinars.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-webinars/resource-webinars.component.html","../../../../libs/resource-module/src/lib/public/modules/events/resource-events.module.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Injector,\n Input,\n OnChanges,\n OnInit,\n type SimpleChanges\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { TagService } from '@posiwise/common-services';\nimport { Resource, User } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport { ResourceService } from '../../../../resource.service';\n\n@Component({\n selector: 'pw-replay-event-card',\n templateUrl: './replay-event-cards.component.html',\n styleUrls: ['../../resources/resources-shared.component.scss'],\n\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class ReplayEventCardComponent extends AppBaseComponent implements OnInit, OnChanges {\n @Input() showEventContent = false;\n @Input() categoryId!: string;\n @Input() resourceTitle!: string;\n @Input() user: User;\n\n canEditResourcesValue = false;\n @Input() userLoggedIn: boolean;\n\n subscriptionId;\n\n masterSubscriptionId = this.appConfig.master_subscription.subscription_id;\n\n posts: Resource[] = [];\n\n isLoaded = false;\n blogPostTag;\n\n isMasterSubscription;\n\n constructor(\n private readonly resourceService: ResourceService,\n private readonly tagService: TagService,\n private readonly cdr: ChangeDetectorRef,\n injector: Injector\n ) {\n super(injector);\n }\n\n ngOnInit(): void {\n if (this.userLoggedIn) {\n this.localStorage.getItem$('product').subscribe(res => {\n const data = res ? JSON.parse(res) : null;\n this.subscriptionId = data?.subscriptionId;\n this.cdr.markForCheck();\n });\n this.getPostTags();\n } else {\n this.getPostTags();\n }\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 private getPostTags() {\n this.tagService\n .getTagsByType('post_categories', {}, this.getEffectiveSubscriptionId())\n .subscribe(response => {\n this.blogPostTag = response.tags.find(tag => tag.name === 'Events');\n if (this.blogPostTag?.tag_category_id) {\n this.getPosts(1, 100);\n } else {\n this.isLoaded = true;\n }\n this.cdr.markForCheck();\n });\n }\n\n getPosts(page: number, pageSize: number): void {\n this.isLoaded = false;\n this.resourceService\n .getPublicPosts(\n this.getEffectiveSubscriptionId(),\n page,\n pageSize,\n '',\n this.blogPostTag?.tag_category_id\n )\n .subscribe(response => {\n const now = Date.now();\n const sortedPosts = (response.posts ?? [])\n .filter(post => post.showcase === true && new Date(post?.when).getTime() < now)\n .sort(\n (a, b) =>\n new Date(b.published_at).getTime() - new Date(a.published_at).getTime()\n );\n this.posts = sortedPosts;\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n\n /** Helper method to get effective subscription ID */\n private getEffectiveSubscriptionId(): number {\n return HelperService.getEffectiveSubscriptionId(\n this.user,\n this.subscriptionId,\n this.masterSubscriptionId\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","<section class=\"resource-vault-section bg-white text-center py-5 extra-top-padding section-outer\">\n <div class=\"container\">\n <div class=\"d-md-flex justify-content-between align-items-start\">\n <div class=\"vault-header\">\n @if (resourceTitle) {\n <h2 class=\"vault-heading\">{{resourceTitle}} Replays</h2>\n } @else {\n <h2 class=\"vault-heading\">Events &amp; Webinars Replays</h2>\n }\n </div>\n </div>\n\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (posts.length === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n\n @if (posts.length !== 0 && isLoaded) {\n <div class=\"row mt-5 d-flex flex-wrap justify-content-center gap-4 video-row\">\n @for (post of posts; track post) {\n <div class=\"resource-blog-card vault-card text-center p-4\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"getPosts(1, 100)\">\n </pw-resource-edit-card-lazy>\n <h5 class=\"badge-title fw-bold\">REPLAY:</h5>\n <p class=\"event-title mb-4\" [innerHtml]=\"post?.title\"></p>\n <img\n [src]=\"post.picture.url\"\n class=\"img-fluid my-3 mt-auto\"\n alt=\"Webinar\" />\n @if (post?.external_url) {\n <a\n class=\"resource-btn mt-3\"\n [href]=\"post.external_url\"\n [attr.aria-label]=\"'Open external: ' + (post?.title || 'article')\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"visually-hidden\">external</span>\n <span class=\"arrow\">→</span>\n </a>\n } @else {\n <a class=\"resource-btn mt-3\" [attr.aria-label]=\"'Read resource: ' + (post?.title || 'article')\" [routerLink]=\"['/resources/view', post?.slug]\">\n <span>{{ post?.cta_text && post.cta_text !== 'null' ? post.cta_text : 'Read Now' }}</span>\n <span class=\"visually-hidden\">on site</span>\n <span class=\"arrow\">→</span>\n </a>\n }\n </div>\n }\n </div>\n }\n </div>\n</section>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Injector,\n OnInit\n} from '@angular/core';\nimport { Title } from '@angular/platform-browser';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AuthService, TagService } from '@posiwise/common-services';\nimport { Resource, Tag, User } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport { ResourceService } from '../../../resource.service';\n\n@Component({\n selector: 'pw-resource-webinars',\n templateUrl: './resource-webinars.component.html',\n styleUrls: [\n './resource-webinars.component.scss',\n '../resource-case-studies/resource-case-studies.component.scss',\n '../resources/resources-shared.component.scss'\n ],\n\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class ResourceWebinarComponent extends AppBaseComponent implements OnInit {\n subscriptionId: number;\n masterSubscriptionId = this.appConfig.master_subscription.subscription_id;\n posts: Resource[] = [];\n upcomingPosts = [];\n tagCategory;\n userLoggedIn: boolean;\n blogPostTag;\n isLoaded = false;\n\n canEditResourcesValue = false;\n\n contactUsUrl = this.appConfig?.pages_config?.contact_us?.url;\n\n user: User;\n isMasterSubscription;\n\n constructor(\n private readonly resourceService: ResourceService,\n private readonly authService: AuthService,\n private readonly tagService: TagService,\n private readonly titleService: Title,\n private readonly cdr: ChangeDetectorRef,\n injector: Injector\n ) {\n super(injector);\n }\n\n ngOnInit() {\n this.getUserSubscriptionId().subscribe(response => {\n this.subscriptionId = response;\n this.cdr.markForCheck();\n });\n this.authService.getToken$().subscribe(res => {\n this.userLoggedIn = !!res;\n if (this.userLoggedIn) {\n this.localStorage.getItem$('product').subscribe(res => {\n const data = res ? JSON.parse(res) : null;\n this.subscriptionId = data?.subscriptionId;\n this.cdr.markForCheck();\n });\n this.userService.getUserInfo().subscribe(data => {\n this.user = data;\n this.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: 'Events' }, this.getEffectiveSubscriptionId())\n .subscribe(response => {\n this.tagCategory = response?.tag_categories?.[0];\n this.getPostTags();\n this.cdr.markForCheck();\n });\n }\n\n private getPostTags() {\n this.tagService\n .getTagsByType('post_categories', {}, this.getEffectiveSubscriptionId())\n .subscribe(response => {\n this.blogPostTag = response.tags.find(\n tag => tag.tag_category_id === this.tagCategory?.id\n );\n this.updateSEOMetadata();\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n\n private updateSEOMetadata() {\n if (this.blogPostTag) {\n // Update page title if meta_title is available\n if ((this.blogPostTag as Tag).meta_title) {\n this.titleService.setTitle((this.blogPostTag as Tag).meta_title);\n }\n\n // Update meta description if meta_description is available\n if ((this.blogPostTag as Tag).meta_description) {\n this.updateMetaDescription((this.blogPostTag as Tag).meta_description);\n }\n }\n }\n\n private updateMetaDescription(description: string) {\n let metaDescription = document.querySelector('meta[name=\"description\"]');\n if (!metaDescription) {\n metaDescription = document.createElement('meta');\n metaDescription.setAttribute('name', 'description');\n document.head.appendChild(metaDescription);\n }\n metaDescription.setAttribute('content', description);\n }\n\n /** 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\n<section class=\"bg-white\">\n <div class=\"resource-banner resource-section\">\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 || 'Events & Webinars'\"></span>\n @if (canEditResourcesValue) {\n <pw-resource-top-banner-edit\n [blogPostTag]=\"blogPostTag\"\n [user]=\"user\"\n [userLoggedIn]=\"userLoggedIn\"\n (getUpdatedTag)=\"getPostTags()\"\n ></pw-resource-top-banner-edit>\n }\n </span>\n </h1>\n </div>\n </div>\n <div class=\"text-extension\">\n @if (!blogPostTag?.description || blogPostTag.description === 'null') {\n <p class=\"intro\">\n We&rsquo;re big on community and even bigger on sharing what works.\n </p>\n } @else {\n <p class=\"intro\" [innerHTML]=\"blogPostTag.description\"></p>\n }\n <div class=\"cta-buttons d-flex gap-3 flex-wrap mt-3\">\n <a [href]=\"contactUsUrl\" target=\"_blank\" rel=\"noopener noreferrer\"\n class=\"cta-btn filled\">Speak to sales <i class=\"fa fa-chevron-right cta-btn__icon\" aria-hidden=\"true\"></i></a>\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\"\n [src]=\"(blogPostTag?.image?.url !== null && !blogPostTag?.image?.url?.includes('default-photo.jpg') && !(blogPostTag?.image?.url.includes('no_image_uploaded_squared')) ) ? blogPostTag?.image?.url : 'assets/img/resource/events-women.png'\"\n alt=\"Events and webinars banner\"\n width=\"600\"\n height=\"450\"\n loading=\"eager\"\n fetchpriority=\"high\" />\n </div>\n </div>\n }\n </div>\n</section>\n\n<section class=\"bg-white\">\n <pw-upcoming-event-card [tag]=\"blogPostTag\" [categoryId]=\"blogPostTag?.tag_category_id\" [resourceTitle]=\"blogPostTag?.title\" [postSlice]=\"true\" [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-upcoming-event-card>\n</section>\n\n<pw-trial-4-contact-us [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-trial-4-contact-us>\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { ReplayEventCardComponent } from '../../components/resource-webinars/replay-event-cards/replay-event-cards.component';\nimport { ResourceWebinarComponent } from '../../components/resource-webinars/resource-webinars.component';\nimport { ResourceSharedModule } from '../../shared/resource-shared.module';\n\nconst routes: Routes = [\n {\n path: '',\n component: ResourceWebinarComponent,\n data: {\n title: 'Resources - Events',\n permission: 'Pages.Blog',\n preload: false\n }\n }\n];\n\n@NgModule({\n declarations: [ResourceWebinarComponent, ReplayEventCardComponent],\n imports: [ResourceSharedModule, RouterModule.forChild(routes)]\n})\nexport class ResourceEventsModule {}\n"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,IAAa,2BAAb,MAAa,iCAAiC,iBAAgB;CAoB1D,YACqB,iBACA,YACA,KACjB,UAAkB;EAElB,MAAM,QAAQ;EALG,KAAA,kBAAA;EACA,KAAA,aAAA;EACA,KAAA,MAAA;EAtBZ,KAAA,mBAAmB;EAK5B,KAAA,wBAAwB;EAKxB,KAAA,uBAAuB,KAAK,UAAU,oBAAoB;EAE1D,KAAA,QAAoB,CAAA;EAEpB,KAAA,WAAW;CAYX;CAEA,WAAQ;EACJ,IAAI,KAAK,cAAc;GACnB,KAAK,aAAa,SAAS,SAAS,CAAC,CAAC,WAAU,QAAM;IAClD,MAAM,OAAO,MAAM,KAAK,MAAM,GAAG,IAAI;IACrC,KAAK,iBAAiB,MAAM;IAC5B,KAAK,IAAI,aAAY;GACzB,CAAC;GACD,KAAK,YA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AAA;GAAA,UAAA;GAAsB,iBAQf,wBAAwB;GAAM,YACnC;GAAK,UAAA;GAAA,QAAA;IAAA;IAAA;IAAA;GAAA;EAAA,CAAA;;;;;;;;;;;AEnBrB,MAAM,SAAiB,CACnB;CACI,MAAM;CACN,WAAW;CACX,MAAM;EACF,OAAO;EACP,YAAY;EACZ,SAAS;CACZ;AACJ,CACJ;AAMD,IAAa,uBAAb,MAAa,qBAAoB;CAApB;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAoB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAApB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAoB,cAAA,CAHd,0BAA0B,wBAAwB;GAAA,SAAA,CACvD,sBAAoBC,KAAA,YAAA;EAAA,CAAA;CAAA;CAErB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAoB,SAAA,CAFnB,sBAAsB,aAAa,SAAS,MAAM,CAAC;EAAA,CAAA;CAAA;;AAEpD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAoB,YAAA,CAAA;EAJhC,MAAA;EAAS,MAAA,CAAA;GACN,cAAc,CAAC,0BAA0B,wBAAwB;GACjE,SAAS,CAAC,sBAAsB,aAAa,SAAS,MAAM,CAAC;EAChE,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"posiwise-resource-module-resource-hub.module-BWvid8gs.mjs","names":["i1.ResourceService","i7.ResourceEditCardLazyComponent","i1"],"sources":["../../../../libs/resource-module/src/lib/public/components/resources-hub/resources-hub.component.ts","../../../../libs/resource-module/src/lib/public/components/resources-hub/resources-hub.component.html","../../../../libs/resource-module/src/lib/public/modules/hub/resource-hub.module.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n HostListener,\n Injector,\n OnDestroy,\n OnInit,\n ViewEncapsulation\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AuthService, TagService } from '@posiwise/common-services';\nimport { Resource, Tag, User } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport { forkJoin, Subscription } from 'rxjs';\n\nimport { ResourceService } from '../../../resource.service';\n\n@Component({\n selector: 'pw-posts-list',\n templateUrl: './resources-hub.component.html',\n styleUrls: [\n './resources-hub.component.scss',\n '../resource-company-card/resource-company-card.component.scss'\n ],\n encapsulation: ViewEncapsulation.None,\n\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class ResourceHubComponent extends AppBaseComponent implements OnInit, OnDestroy {\n private delayTimeout: ReturnType<typeof setTimeout> | null = null;\n private userSub: Subscription;\n\n data = [];\n\n posts: Resource[] = [];\n tags: Tag[] = [];\n\n selectedTags = [];\n\n currentPage = 1;\n pageSize = 20;\n objectCount = 0;\n\n searchTextItems = '';\n searchInput = false;\n\n readingTime: number;\n\n totalRecords: number;\n\n loading = true;\n loaded = false;\n\n masterSubscriptionId: number;\n subscriptionId;\n userLoggedIn: boolean;\n isMasterSubscription;\n\n scrollLocked = false;\n\n iconClasses: string[] = [\n 'fa-lightbulb',\n 'fa-rocket',\n 'fa-file-alt',\n 'fa-users',\n 'fa-video',\n 'fa-pencil-alt',\n 'fa-book-open',\n 'fa-cogs'\n ];\n user: User;\n\n canEditResourcesValue = false;\n\n constructor(\n private readonly resourceService: ResourceService,\n private readonly authService: AuthService,\n private readonly tagService: TagService,\n private readonly cdr: ChangeDetectorRef,\n injector: Injector\n ) {\n super(injector);\n }\n\n ngOnInit() {\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.userSub = this.userService.getUserInfo().subscribe(data => {\n this.user = data;\n this.updateCanEditResourcesValue();\n this.getPostsAndTags();\n this.cdr.markForCheck();\n });\n } else {\n this.getPostsAndTags();\n }\n this.cdr.markForCheck();\n });\n this.masterSubscriptionId = this.appConfig.master_subscription.subscription_id;\n this.readingTime = 0;\n }\n\n getPostsAndTags() {\n this.loading = true;\n this.loaded = false;\n forkJoin({\n resPosts: this.resourceService.getPublicPosts(\n this.getEffectiveSubscriptionId(),\n this.currentPage,\n this.pageSize,\n this.searchTextItems\n ),\n resTags: this.tagService.getTagsByType(\n 'post_categories',\n {},\n this.getEffectiveSubscriptionId()\n )\n })\n .subscribe(res => {\n this.posts = res?.resPosts?.posts;\n this.objectCount = res?.resPosts.object_count;\n this.data = res?.resPosts?.posts;\n this.data = res?.resPosts?.posts.map(post => ({\n ...post,\n expandedTags: false\n }));\n this.totalRecords = this.posts?.length;\n\n this.tags = res?.resTags?.tags?.filter(tag => tag.visible_in_resources);\n this.tags = this.tags.map(tag => ({\n ...tag\n }));\n this.cdr.markForCheck();\n })\n .add(() => {\n this.loading = false;\n this.loaded = true;\n this.cdr.markForCheck();\n });\n }\n\n toggleDropdown(event: Event, post): void {\n event.stopPropagation();\n post.showDropdown = !post.showDropdown;\n }\n\n getPosts(page: number, pageSize: number, fetchAll = false, append = false) {\n if (fetchAll) this.selectedTags = [];\n\n if (!append) {\n this.loading = true;\n this.loaded = false;\n }\n\n const tagCategoryParam = this.selectedTags.map(tag => tag.tag_category_id).join(',');\n\n this.resourceService\n .getPublicPosts(\n this.getEffectiveSubscriptionId(),\n page,\n append ? 10 : pageSize,\n this.searchTextItems,\n tagCategoryParam\n )\n .subscribe(response => {\n this.objectCount = response.object_count;\n this.posts = append ? [...this.posts, ...response.posts] : response.posts;\n this.data = [...this.posts];\n this.totalRecords = this.posts?.length;\n this.cdr.markForCheck();\n })\n .add(() => {\n this.loading = false;\n this.loaded = true;\n this.cdr.markForCheck();\n });\n }\n\n onSearch(seconds: number) {\n let delay = 0;\n delay = seconds * 1000;\n clearTimeout(this.delayTimeout);\n const delayTimeout = setTimeout(() => {\n this.currentPage = 1;\n this.getPosts(1, this.pageSize);\n }, delay);\n\n this.delayTimeout = delayTimeout;\n }\n\n navigateToTagList(): void {\n HelperService.navigateToTagList();\n }\n\n @HostListener('window:scroll', [])\n onWindowScroll(): void {\n const scrollPosition = window.scrollY + window.innerHeight;\n const pageHeight = document.documentElement.scrollHeight;\n\n const nearBottom = scrollPosition >= pageHeight - 100;\n\n if (\n nearBottom &&\n this.posts.length < this.objectCount &&\n !this.loading &&\n !this.scrollLocked\n ) {\n this.scrollLocked = true;\n this.currentPage += 1;\n\n this.getPosts(this.currentPage, this.pageSize, false, true);\n\n setTimeout(() => {\n this.scrollLocked = false;\n }, 500);\n }\n }\n\n isSelected(tagId: number): boolean {\n return this.selectedTags.map(tag => tag.id).includes(tagId);\n }\n\n tagPost(selectedTag) {\n const index = this.selectedTags.findIndex(\n tag => tag.tag_category_id === selectedTag?.tag_category_id && tag.id === selectedTag.id\n );\n\n if (index === -1) {\n this.selectedTags.push({\n tag_category_id: selectedTag?.tag_category_id,\n id: selectedTag.id\n });\n } else {\n this.selectedTags.splice(index, 1);\n }\n\n this.currentPage = 1;\n this.getPosts(1, this.pageSize);\n }\n\n thisPostReadingTime(text: string): string {\n if (text) {\n const wordsPerMinute = 200;\n const noOfWords = text.split(/\\s/g).length;\n const minutes = noOfWords / wordsPerMinute;\n const readTime = Math.ceil(minutes);\n\n return `${readTime} minute read`;\n }\n\n return '';\n }\n\n override ngOnDestroy() {\n this.userSub?.unsubscribe();\n super.ngOnDestroy();\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 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\n<div class=\"hub-page\">\n<section class=\"hub-hero\" aria-labelledby=\"hub-hero-title\">\n <div class=\"hub-hero__glow\" aria-hidden=\"true\"></div>\n <div class=\"hub-hero__grid\" aria-hidden=\"true\"></div>\n <div class=\"hub-hero__inner\">\n <p class=\"hub-hero__eyebrow\">{{ 'Resource.Posts.Title' | transloco | uppercase }}</p>\n <h1 id=\"hub-hero-title\" class=\"hub-hero__title\">\n Stories, guides, and notes <br class=\"hub-hero__br\" />from the team.\n </h1>\n <p class=\"hub-hero__subtitle\">{{ 'Resource.Hub.Subtitle' | transloco }}</p>\n <div class=\"hub-hero__search\">\n <p-iconfield class=\"hub-hero__search-field\" iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input type=\"text\" id=\"resources-hub-search\" name=\"resources-hub-search\"\n [(ngModel)]=\"searchTextItems\" pInputText\n [placeholder]=\"'Resource.Hub.SearchPlaceholder' | transloco\"\n (input)=\"onSearch(1)\" class=\"hub-hero__search-input\"\n aria-label=\"Resources Hub Search\" />\n </p-iconfield>\n @if (userLoggedIn && user?.auth?.granted['Pages.Admin']) {\n <button type=\"button\" class=\"hub-hero__edit\"\n [title]=\"'Resource.Hub.EditTagsTooltip' | transloco\"\n [attr.aria-label]=\"'Resource.Hub.EditTagsTooltip' | transloco\"\n (click)=\"navigateToTagList()\" (keydown.enter)=\"navigateToTagList()\">\n <i class=\"fa fa-edit\" aria-hidden=\"true\"></i>\n </button>\n }\n </div>\n </div>\n</section>\n\n<div class=\"hub-shell\">\n <nav class=\"hub-chips\" aria-label=\"Resource categories\">\n <button type=\"button\" class=\"hub-chip hub-chip--all\"\n [class.hub-chip--selected]=\"selectedTags.length === 0\"\n (click)=\"getPosts(1, 20, true)\" (keydown.enter)=\"getPosts(1, 20, true)\">\n <span class=\"hub-chip__dot\" aria-hidden=\"true\"></span>\n <span class=\"hub-chip__label\">{{ 'Resource.Hub.AllResources' | transloco }}</span>\n @if (objectCount) { <span class=\"hub-chip__count\">{{ objectCount }}</span> }\n </button>\n @for (tag of tags; track tag.id) {\n <button type=\"button\" class=\"hub-chip\"\n [class.hub-chip--selected]=\"isSelected(tag.id)\"\n (click)=\"tagPost(tag)\" (keydown.enter)=\"tagPost(tag)\">\n <span class=\"hub-chip__dot\" [attr.data-cat]=\"tag.id % 6\" aria-hidden=\"true\"></span>\n <span class=\"hub-chip__label\">{{ tag.name }}</span>\n </button>\n }\n </nav>\n\n @if (loading && !loaded) {\n <div class=\"hub-loading\"><p-progress-spinner strokeWidth=\"2\"></p-progress-spinner></div>\n }\n\n @if (posts?.length && !loading) {\n <ul class=\"hub-grid\" role=\"list\">\n @for (post of data; track post.id; let i = $index) {\n <li class=\"hub-post\" [style.--reveal-delay.ms]=\"i * 40\">\n <pw-resource-edit-card-lazy [canEdit]=\"canEditResourcesValue\" [id]=\"post?.id\"\n [resourceData]=\"post\" (updated)=\"getPosts(1, pageSize)\"></pw-resource-edit-card-lazy>\n\n <a class=\"hub-post__media\" [routerLink]=\"['/resources/view', post.slug]\"\n [attr.aria-label]=\"post.title\"\n [attr.data-cat]=\"(post?.tags?.[0]?.id || 0) % 6\">\n @if (post.picture?.url && !post.picture.url.includes('default-photo')) {\n <img [src]=\"post.picture?.url\" alt=\"\" loading=\"lazy\" class=\"hub-post__image\" />\n } @else {\n <span class=\"hub-post__glyph\" aria-hidden=\"true\">\n {{ (post.title?.[0] || '?').toUpperCase() }}\n </span>\n @if (post?.tags?.[0]?.icon_name) {\n <i class=\"fa hub-post__icon\" [ngClass]=\"post.tags[0].icon_name\" aria-hidden=\"true\"></i>\n }\n }\n </a>\n\n <div class=\"hub-post__body\">\n @if (post?.tags?.[0]) {\n <p class=\"hub-post__eyebrow\" [attr.data-cat]=\"post.tags[0].id % 6\">\n <span class=\"hub-post__dot\" aria-hidden=\"true\"></span>\n {{ post.tags[0].name }}\n </p>\n }\n <h2 class=\"hub-post__title\" [routerLink]=\"['/resources/view', post.slug]\">{{ post.title }}</h2>\n <p class=\"hub-post__excerpt\">{{ post.blurb || (post.body | removeHtml: 'quill' | textTruncate: 140) }}</p>\n <div class=\"hub-post__foot\">\n @if (post.author?.avatar?.[0]?.url) {\n <img class=\"hub-post__avatar\" [src]=\"post.author.avatar[0].url\" alt=\"\" />\n } @else {\n <span class=\"hub-post__avatar hub-post__avatar--text\" aria-hidden=\"true\">{{ (post.author?.first_name?.[0] || '?').toUpperCase() }}</span>\n }\n <div class=\"hub-post__author-meta\">\n <span class=\"hub-post__author-name\">{{ post.author?.first_name }}</span>\n <span class=\"hub-post__author-sub\">\n <time [attr.datetime]=\"post.published_at\">{{ post.published_at | date: 'd MMM' }}</time>\n <span class=\"hub-post__sep\" aria-hidden=\"true\">·</span>\n <span class=\"hub-post__rt\">{{ thisPostReadingTime(post.body) }}</span>\n </span>\n </div>\n <span class=\"hub-post__views\" [title]=\"'Resource.Hub.ViewCount' | transloco: { count: post.view ?? 0 }\">\n {{ post.view ?? 0 }}\n </span>\n </div>\n </div>\n </li>\n }\n </ul>\n }\n\n @if (!posts?.length && loaded) {\n <div class=\"hub-empty\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"></pw-no-data>\n </div>\n }\n</div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { ResourceHubComponent } from '../../components/resources-hub/resources-hub.component';\nimport { ResourceSharedModule } from '../../shared/resource-shared.module';\n\nconst routes: Routes = [\n {\n path: '',\n component: ResourceHubComponent,\n data: {\n title: 'Resources - Hub',\n permission: 'Pages.Blog',\n preload: false\n }\n }\n];\n\n@NgModule({\n declarations: [ResourceHubComponent],\n imports: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ResourceTopBannerEditComponent","i1","i2.ResourceNoteCardComponent","i5.ReleaseTopBannerComponent"],"sources":["../../../../libs/resource-module/src/lib/public/components/resource-release-notes/resource-release-notes-top-banner/resource-release-notes-top-banner.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-release-notes/resource-release-notes-top-banner/resource-release-notes-top-banner.component.html","../../../../libs/resource-module/src/lib/public/components/resource-release-notes/resource-release-notes.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-release-notes/resource-release-notes.component.html","../../../../libs/resource-module/src/lib/public/modules/release-notes/resource-release-notes.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-resource-release-notes-top-banner',\n templateUrl: './resource-release-notes-top-banner.component.html',\n styleUrls: [\n '../../resource-case-studies/resource-case-studies.component.scss',\n './resource-release-notes-top-banner.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 ReleaseTopBannerComponent 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 'Release Notes';\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 || 'Release Notes'\"></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 </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 We&rsquo;re obsessed with solving real problems for our customers.\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\">Speak to sales <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/release-person.png'\"\n alt=\"Release notes banner\"\n width=\"600\"\n height=\"450\"\n loading=\"eager\"\n fetchpriority=\"high\" />\n </div>\n </div>\n }\n </div>\n</section>\n","import { ChangeDetectionStrategy,\n ChangeDetectorRef, Component, Injector, OnInit } from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AuthService, TagService } from '@posiwise/common-services';\nimport { Resource, User } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\n@Component({\n selector: 'pw-resource-release-notes',\n templateUrl: './resource-release-notes.component.html',\n\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class ResourceReleaseNoteComponent extends AppBaseComponent implements OnInit {\n subscriptionId: number;\n masterSubscriptionId = this.appConfig.master_subscription.subscription_id;\n posts: Resource[] = [];\n userLoggedIn: boolean;\n blogPostTag;\n user: User;\n isMasterSubscription;\n\n constructor(\n private readonly authService: AuthService,\n private readonly tagService: TagService,\n private readonly cdr: ChangeDetectorRef,\n injector: Injector\n ) {\n super(injector);\n }\n\n ngOnInit() {\n this.getUserSubscriptionId().subscribe(response => {\n this.subscriptionId = response;\n this.cdr.markForCheck();\n });\n this.authService.getToken$().subscribe(res => {\n this.userLoggedIn = !!res;\n if (this.userLoggedIn) {\n this.localStorage.getItem$('product').subscribe(res => {\n const data = res ? JSON.parse(res) : null;\n this.subscriptionId = data?.subscriptionId;\n this.cdr.markForCheck();\n });\n this.userService.getUserInfo().subscribe(data => {\n this.user = data;\n this.getPostTags();\n this.cdr.markForCheck();\n });\n } else {\n this.getPostTags();\n }\n this.cdr.markForCheck();\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 === 'Product Release Notes');\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.masterSubscriptionId\n );\n }\n}\n","<pw-resource-header [user]=\"user\" [userLoggedIn]=\"userLoggedIn\"></pw-resource-header>\n<pw-resource-release-notes-top-banner></pw-resource-release-notes-top-banner>\n\n@if (blogPostTag?.tag_category_id) {\n <pw-resource-note-card [isReleasePress]=\"true\" [tag]=\"blogPostTag\" [categoryId]=\"blogPostTag?.tag_category_id\" [releaseHeader]=\"true\" [resourceTitle]=\"blogPostTag?.title\" [postSlice]=\"true\" [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","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { ResourceReleaseNoteComponent } from '../../components/resource-release-notes/resource-release-notes.component';\nimport { ReleaseTopBannerComponent } from '../../components/resource-release-notes/resource-release-notes-top-banner/resource-release-notes-top-banner.component';\nimport { ResourceSharedModule } from '../../shared/resource-shared.module';\n\nconst routes: Routes = [\n {\n path: '',\n component: ResourceReleaseNoteComponent,\n data: {\n title: 'Resources - Release Notes',\n permission: 'Pages.Blog',\n preload: false\n }\n }\n];\n\n@NgModule({\n declarations: [ResourceReleaseNoteComponent, ReleaseTopBannerComponent],\n imports: [ResourceSharedModule, RouterModule.forChild(routes)]\n})\nexport class ResourceReleaseNotesModule {}\n"],"mappings":";;;;;;;;;;;;;;;AAsBA,IAAa,4BAAb,MAAa,kCAAkC,uBAAsB;CAGjE,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;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAyB,MAAA;IAAA,EAAA,OAAAA,gBAAA;IAAA,EAAA,OAAA,GAAA,WAAA;IAAA,EAAA,OAAA,GAAA,YAAA;IAAA,EAAA,OAAAC,KAAA,MAAA;IAAA,EAAA,OAAA,GAAA,kBAAA;IAAA,EAAA,OAAA,GAAA,SAAA;GAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAzB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAyB,cAAA;GAAA,UAAA;GAAA,iBAAA;GAAA,UAAA;GAAA,UCtBtC;GAoDA,QAAA;IAAA;IAAA;IAAA;IAAA;GAAA;G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AAA;CAA4B,YAAA,CAAA;EAPxC,MAAA;EACa,MAAA,CAAA;GAAA,UAAA;GAA2B,iBAGpB,wBAAwB;GAAM,YACnC;GAAK,UAAA;EAAA,CAAA;;;;;;;;;AENrB,MAAM,SAAiB,CACnB;CACI,MAAM;CACN,WAAW;CACX,MAAM;EACF,OAAO;EACP,YAAY;EACZ,SAAS;CACZ;AACJ,CACJ;AAMD,IAAa,6BAAb,MAAa,2BAA0B;CAA1B;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;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,cAAA,CAHpB,8BAA8B,yBAAyB;GAAA,SAAA,CAC5D,sBAAoB,GAAA,YAAA;EAAA,CAAA;CAAA;CAErB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA0B,SAAA,CAFzB,sBAAsB,aAAa,SAAS,MAAM,CAAC;EAAA,CAAA;CAAA;;AAEpD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA0B,YAAA,CAAA;EAJtC,MAAA;EAAS,MAAA,CAAA;GACN,cAAc,CAAC,8BAA8B,yBAAyB;GACtE,SAAS,CAAC,sBAAsB,aAAa,SAAS,MAAM,CAAC;EAChE,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"posiwise-resource-module-resource.service-DjeMJX1O.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 ) {\n const params = {\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 const formData = new FormData();\n\n // eslint-disable-next-line no-restricted-syntax\n for (const key in post) {\n if (key in post) {\n formData.append(key, post[key]);\n }\n }\n\n return this.api.post(this.resource, formData);\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 const formData = new FormData();\n\n // eslint-disable-next-line no-restricted-syntax\n for (const key in post) {\n if (key in post) {\n formData.append(key, post[key]);\n }\n }\n\n return this.api.put(`${this.resource}/${id}`, 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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