@posiwise/resource-module 0.0.178 → 0.0.180
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-B8SkNBpi.mjs → posiwise-resource-module-base-top-banner.component-Dm85-_ss.mjs} +5 -5
- package/fesm2022/{posiwise-resource-module-base-top-banner.component-B8SkNBpi.mjs.map → posiwise-resource-module-base-top-banner.component-Dm85-_ss.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-posiwise-resource-module-BwxxIB69.mjs → posiwise-resource-module-posiwise-resource-module-BWwZnZnI.mjs} +80 -80
- package/fesm2022/posiwise-resource-module-posiwise-resource-module-BWwZnZnI.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-blogs.module-BQnL-CmE.mjs → posiwise-resource-module-resource-blogs.module-B1UDfbwB.mjs} +13 -13
- package/fesm2022/{posiwise-resource-module-resource-blogs.module-BQnL-CmE.mjs.map → posiwise-resource-module-resource-blogs.module-B1UDfbwB.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-case-studies.module-Cf8nb6Fh.mjs → posiwise-resource-module-resource-case-studies.module-L_XmAfir.mjs} +9 -9
- package/fesm2022/{posiwise-resource-module-resource-case-studies.module-Cf8nb6Fh.mjs.map → posiwise-resource-module-resource-case-studies.module-L_XmAfir.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-events.module-BPBsWiQV.mjs → posiwise-resource-module-resource-events.module-6Np0cW5M.mjs} +12 -12
- package/fesm2022/{posiwise-resource-module-resource-events.module-BPBsWiQV.mjs.map → posiwise-resource-module-resource-events.module-6Np0cW5M.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-hub.module-B4yCTR1d.mjs → posiwise-resource-module-resource-hub.module-AUZSKKHf.mjs} +9 -9
- package/fesm2022/{posiwise-resource-module-resource-hub.module-B4yCTR1d.mjs.map → posiwise-resource-module-resource-hub.module-AUZSKKHf.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-integrations.module-BD4_2smy.mjs → posiwise-resource-module-resource-integrations.module-7Wrb4Wvu.mjs} +14 -14
- package/fesm2022/{posiwise-resource-module-resource-integrations.module-BD4_2smy.mjs.map → posiwise-resource-module-resource-integrations.module-7Wrb4Wvu.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-post.module-C7w-W4o_.mjs → posiwise-resource-module-resource-post.module-CZjuRmSN.mjs} +16 -26
- package/fesm2022/posiwise-resource-module-resource-post.module-CZjuRmSN.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-release-notes.module-Bb6hfpjz.mjs → posiwise-resource-module-resource-release-notes.module-CaScFppS.mjs} +13 -13
- package/fesm2022/{posiwise-resource-module-resource-release-notes.module-Bb6hfpjz.mjs.map → posiwise-resource-module-resource-release-notes.module-CaScFppS.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-root.module-D6mXJ5ON.mjs → posiwise-resource-module-resource-root.module-CCyU0YxG.mjs} +20 -21
- package/fesm2022/posiwise-resource-module-resource-root.module-CCyU0YxG.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-videos.module-Defu_y2P.mjs → posiwise-resource-module-resource-videos.module-BpDF8bbA.mjs} +13 -13
- package/fesm2022/{posiwise-resource-module-resource-videos.module-Defu_y2P.mjs.map → posiwise-resource-module-resource-videos.module-BpDF8bbA.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-white-papers.module-CVae2LWd.mjs → posiwise-resource-module-resource-white-papers.module-Oij6egPp.mjs} +13 -13
- package/fesm2022/{posiwise-resource-module-resource-white-papers.module-CVae2LWd.mjs.map → posiwise-resource-module-resource-white-papers.module-Oij6egPp.mjs.map} +1 -1
- package/fesm2022/posiwise-resource-module.mjs +1 -1
- package/package.json +1 -1
- package/fesm2022/posiwise-resource-module-posiwise-resource-module-BwxxIB69.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-post.module-C7w-W4o_.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-root.module-D6mXJ5ON.mjs.map +0 -1
|
@@ -4,7 +4,7 @@ import * as i3 from '@angular/platform-browser';
|
|
|
4
4
|
import { AppBaseComponent } from '@posiwise/app-base-component';
|
|
5
5
|
import * as i2 from '@posiwise/common-services';
|
|
6
6
|
import { HelperService } from '@posiwise/helper-service';
|
|
7
|
-
import { e as ResourceService } from './posiwise-resource-module-posiwise-resource-module-
|
|
7
|
+
import { e as ResourceService } from './posiwise-resource-module-posiwise-resource-module-BWwZnZnI.mjs';
|
|
8
8
|
|
|
9
9
|
class BaseTopBannerComponent extends AppBaseComponent {
|
|
10
10
|
constructor(resourceService, tagService, authService, titleService, injector) {
|
|
@@ -97,10 +97,10 @@ class BaseTopBannerComponent extends AppBaseComponent {
|
|
|
97
97
|
canEditResources() {
|
|
98
98
|
return this.canEditResourcesValue;
|
|
99
99
|
}
|
|
100
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
101
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
100
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: BaseTopBannerComponent, deps: [{ token: ResourceService }, { token: i2.TagService }, { token: i2.AuthService }, { token: i3.Title }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
101
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.19", type: BaseTopBannerComponent, isStandalone: false, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
102
102
|
}
|
|
103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: BaseTopBannerComponent, decorators: [{
|
|
104
104
|
type: Component,
|
|
105
105
|
args: [{
|
|
106
106
|
template: '',
|
|
@@ -109,4 +109,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
109
109
|
}], ctorParameters: () => [{ type: ResourceService }, { type: i2.TagService }, { type: i2.AuthService }, { type: i3.Title }, { type: i0.Injector }] });
|
|
110
110
|
|
|
111
111
|
export { BaseTopBannerComponent as B };
|
|
112
|
-
//# sourceMappingURL=posiwise-resource-module-base-top-banner.component-
|
|
112
|
+
//# sourceMappingURL=posiwise-resource-module-base-top-banner.component-Dm85-_ss.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posiwise-resource-module-base-top-banner.component-
|
|
1
|
+
{"version":3,"file":"posiwise-resource-module-base-top-banner.component-Dm85-_ss.mjs","sources":["../../../../libs/resource-module/src/lib/public/components/base/base-top-banner.component.ts"],"sourcesContent":["import { Component, Injector, OnInit } from '@angular/core';\nimport { Title } from '@angular/platform-browser';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AuthService, TagService } from '@posiwise/common-services';\nimport { Resource, User } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport { ResourceService } from '../../../resource.service';\n\n@Component({\n template: '',\n\n standalone: false\n})\nexport abstract class BaseTopBannerComponent extends AppBaseComponent implements OnInit {\n subscriptionId: number;\n masterSubscriptionId = this.appConfig.master_subscription.subscription_id;\n posts: Resource[] = [];\n testimonialsPosts = [];\n userLoggedIn: boolean;\n blogPostTag;\n tagCategory;\n blogTestimonialsPostTag;\n isLoaded = false;\n user: User;\n isMasterSubscription;\n\n canEditResourcesValue = false;\n\n constructor(\n protected readonly resourceService: ResourceService,\n protected readonly tagService: TagService,\n private readonly authService: AuthService,\n private readonly titleService: Title,\n injector: Injector\n ) {\n super(injector);\n }\n\n ngOnInit() {\n this.getUserSubscriptionId().subscribe(response => {\n this.subscriptionId = response;\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 });\n this.userService.getUserInfo().subscribe(data => {\n this.user = data;\n this.updateCanEditResourcesValue();\n this.getTags();\n });\n } else {\n this.getTags();\n }\n });\n }\n\n protected getTags() {\n this.isLoaded = false;\n this.tagService\n .getAllTagCategories(\n { search: this.getSearchTerm() },\n this.getEffectiveSubscriptionId()\n )\n .subscribe(response => {\n this.tagCategory = response.tag_categories[0];\n this.getPostTags();\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 })\n .add(() => {\n this.isLoaded = true;\n });\n }\n\n /** Helper method to get effective subscription ID */\n protected getEffectiveSubscriptionId(): number {\n return HelperService.getEffectiveSubscriptionId(\n this.user,\n this.subscriptionId,\n this.masterSubscriptionId\n );\n }\n\n protected updateSEOMetadata() {\n if (this.blogPostTag) {\n // Update page title if meta_title is available\n if (this.blogPostTag.meta_title) {\n this.titleService.setTitle(this.blogPostTag.meta_title);\n }\n\n // Update meta description if meta_description is available\n if (this.blogPostTag.meta_description) {\n this.updateMetaDescription(this.blogPostTag.meta_description);\n }\n }\n }\n\n private updateMetaDescription(description: string) {\n let metaDescription = document.querySelector('meta[name=\"description\"]');\n if (!metaDescription) {\n metaDescription = document.createElement('meta');\n metaDescription.setAttribute('name', 'description');\n document.head.appendChild(metaDescription);\n }\n metaDescription.setAttribute('content', description);\n }\n\n // Abstract method that each component must implement\n protected abstract getSearchTerm(): string;\n\n private updateCanEditResourcesValue(): void {\n if (this.userLoggedIn && this.user) {\n this.canEditResourcesValue = HelperService.canEditResources(\n this.user,\n this.userLoggedIn,\n this.permissionService\n );\n } else {\n this.canEditResourcesValue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