@posiwise/resource-module 0.0.189 → 0.0.191
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-CJao3glW.mjs → posiwise-resource-module-base-top-banner.component-XPaC2uLL.mjs} +13 -17
- package/fesm2022/posiwise-resource-module-base-top-banner.component-XPaC2uLL.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-posiwise-resource-module-BZKgTjU4.mjs → posiwise-resource-module-posiwise-resource-module-C-hPiIlg.mjs} +48 -44
- package/fesm2022/posiwise-resource-module-posiwise-resource-module-C-hPiIlg.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-blogs.module-CeRB6E1r.mjs +69 -0
- package/fesm2022/posiwise-resource-module-resource-blogs.module-CeRB6E1r.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-DL3JRVp5.mjs +135 -0
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-DL3JRVp5.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-events.module-BBHi-JUF.mjs +241 -0
- package/fesm2022/posiwise-resource-module-resource-events.module-BBHi-JUF.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-hub.module-mSjREp_s.mjs +244 -0
- package/fesm2022/posiwise-resource-module-resource-hub.module-mSjREp_s.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-integrations.module-BYM4LlIm.mjs +295 -0
- package/fesm2022/posiwise-resource-module-resource-integrations.module-BYM4LlIm.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-post.module-BhnGYNxN.mjs +334 -0
- package/fesm2022/posiwise-resource-module-resource-post.module-BhnGYNxN.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-release-notes.module-fyZp_sFo.mjs +110 -0
- package/fesm2022/posiwise-resource-module-resource-release-notes.module-fyZp_sFo.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-root.module-BPaJB-g2.mjs → posiwise-resource-module-resource-root.module-D9-M2alB.mjs} +7 -7
- package/fesm2022/posiwise-resource-module-resource-root.module-D9-M2alB.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-videos.module-mBQ3w0lv.mjs +68 -0
- package/fesm2022/posiwise-resource-module-resource-videos.module-mBQ3w0lv.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-white-papers.module-IGdisYOV.mjs +70 -0
- package/fesm2022/posiwise-resource-module-resource-white-papers.module-IGdisYOV.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module.mjs +1 -1
- package/package.json +1 -1
- package/fesm2022/posiwise-resource-module-base-top-banner.component-CJao3glW.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-posiwise-resource-module-BZKgTjU4.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-blogs.module-BgWNGP5s.mjs +0 -68
- package/fesm2022/posiwise-resource-module-resource-blogs.module-BgWNGP5s.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-jZAM6Z2I.mjs +0 -134
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-jZAM6Z2I.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-events.module-Bj5gs8IW.mjs +0 -240
- package/fesm2022/posiwise-resource-module-resource-events.module-Bj5gs8IW.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-hub.module-C5BJoiD3.mjs +0 -243
- package/fesm2022/posiwise-resource-module-resource-hub.module-C5BJoiD3.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-integrations.module-CekT8vLc.mjs +0 -295
- package/fesm2022/posiwise-resource-module-resource-integrations.module-CekT8vLc.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-post.module-BHN2bFTw.mjs +0 -332
- package/fesm2022/posiwise-resource-module-resource-post.module-BHN2bFTw.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-release-notes.module-DG6LWSTy.mjs +0 -109
- package/fesm2022/posiwise-resource-module-resource-release-notes.module-DG6LWSTy.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-root.module-BPaJB-g2.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-videos.module-68ofrmCt.mjs +0 -68
- package/fesm2022/posiwise-resource-module-resource-videos.module-68ofrmCt.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-white-papers.module-B9WGxaOx.mjs +0 -69
- package/fesm2022/posiwise-resource-module-resource-white-papers.module-B9WGxaOx.mjs.map +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component } from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
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 {
|
|
7
|
+
import { forkJoin } from 'rxjs';
|
|
8
|
+
import { e as ResourceService } from './posiwise-resource-module-posiwise-resource-module-C-hPiIlg.mjs';
|
|
8
9
|
|
|
9
10
|
class BaseTopBannerComponent extends AppBaseComponent {
|
|
10
11
|
constructor(resourceService, tagService, authService, titleService, cdr, injector) {
|
|
@@ -48,19 +49,13 @@ class BaseTopBannerComponent extends AppBaseComponent {
|
|
|
48
49
|
}
|
|
49
50
|
getTags() {
|
|
50
51
|
this.isLoaded = false;
|
|
51
|
-
|
|
52
|
-
.getAllTagCategories({ search: this.getSearchTerm() }, this.getEffectiveSubscriptionId())
|
|
53
|
-
.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
this.
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
getPostTags() {
|
|
60
|
-
this.tagService
|
|
61
|
-
.getTagsByType('post_categories', {}, this.getEffectiveSubscriptionId())
|
|
62
|
-
.subscribe(response => {
|
|
63
|
-
this.blogPostTag = response.tags.find(tag => tag.tag_category_id === this.tagCategory?.id);
|
|
52
|
+
forkJoin({
|
|
53
|
+
categories: this.tagService.getAllTagCategories({ search: this.getSearchTerm() }, this.getEffectiveSubscriptionId()),
|
|
54
|
+
tags: this.tagService.getTagsByType('post_categories', {}, this.getEffectiveSubscriptionId())
|
|
55
|
+
})
|
|
56
|
+
.subscribe(({ categories, tags }) => {
|
|
57
|
+
this.tagCategory = categories?.tag_categories?.[0];
|
|
58
|
+
this.blogPostTag = tags.tags.find(tag => tag.tag_category_id === this.tagCategory?.id);
|
|
64
59
|
this.updateSEOMetadata();
|
|
65
60
|
this.cdr.markForCheck();
|
|
66
61
|
})
|
|
@@ -106,15 +101,16 @@ class BaseTopBannerComponent extends AppBaseComponent {
|
|
|
106
101
|
return this.canEditResourcesValue;
|
|
107
102
|
}
|
|
108
103
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: BaseTopBannerComponent, deps: [{ token: ResourceService }, { token: i2.TagService }, { token: i2.AuthService }, { token: i3.Title }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
109
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.6", type: BaseTopBannerComponent, isStandalone: false, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
104
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.6", type: BaseTopBannerComponent, isStandalone: false, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
110
105
|
}
|
|
111
106
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: BaseTopBannerComponent, decorators: [{
|
|
112
107
|
type: Component,
|
|
113
108
|
args: [{
|
|
114
109
|
template: '',
|
|
110
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
115
111
|
standalone: false
|
|
116
112
|
}]
|
|
117
113
|
}], ctorParameters: () => [{ type: ResourceService }, { type: i2.TagService }, { type: i2.AuthService }, { type: i3.Title }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }] });
|
|
118
114
|
|
|
119
115
|
export { BaseTopBannerComponent as B };
|
|
120
|
-
//# sourceMappingURL=posiwise-resource-module-base-top-banner.component-
|
|
116
|
+
//# sourceMappingURL=posiwise-resource-module-base-top-banner.component-XPaC2uLL.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"posiwise-resource-module-base-top-banner.component-XPaC2uLL.mjs","sources":["../../../../libs/resource-module/src/lib/public/components/base/base-top-banner.component.ts"],"sourcesContent":["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, User } from '@posiwise/common-utilities';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport { forkJoin } from 'rxjs';\n\nimport { ResourceService } from '../../../resource.service';\n\n@Component({\n template: '',\n\n changeDetection: ChangeDetectionStrategy.OnPush,\n 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 protected 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.updateCanEditResourcesValue();\n this.getTags();\n this.cdr.markForCheck();\n });\n } else {\n this.getTags();\n }\n this.cdr.markForCheck();\n });\n }\n\n protected getTags() {\n this.isLoaded = false;\n forkJoin({\n categories: this.tagService.getAllTagCategories(\n { search: this.getSearchTerm() },\n this.getEffectiveSubscriptionId()\n ),\n tags: this.tagService.getTagsByType(\n 'post_categories',\n {},\n this.getEffectiveSubscriptionId()\n )\n })\n .subscribe(({ categories, tags }) => {\n this.tagCategory = categories?.tag_categories?.[0];\n this.blogPostTag = tags.tags.find(\n tag => tag.tag_category_id === this.tagCategory?.id\n );\n this.updateSEOMetadata();\n this.cdr.markForCheck();\n })\n .add(() => {\n this.isLoaded = true;\n this.cdr.markForCheck();\n });\n }\n\n /** Helper method to get effective subscription ID */\n protected getEffectiveSubscriptionId(): number {\n return HelperService.getEffectiveSubscriptionId(\n this.user,\n this.subscriptionId,\n this.masterSubscriptionId\n );\n }\n\n protected updateSEOMetadata() {\n if (this.blogPostTag) {\n // Update page title if meta_title is available\n if (this.blogPostTag.meta_title) {\n this.titleService.setTitle(this.blogPostTag.meta_title);\n }\n\n // Update meta description if meta_description is available\n if (this.blogPostTag.meta_description) {\n this.updateMetaDescription(this.blogPostTag.meta_description);\n }\n }\n }\n\n private updateMetaDescription(description: string) {\n let metaDescription = document.querySelector('meta[name=\"description\"]');\n if (!metaDescription) {\n metaDescription = document.createElement('meta');\n metaDescription.setAttribute('name', 'description');\n document.head.appendChild(metaDescription);\n }\n metaDescription.setAttribute('content', description);\n }\n\n // Abstract method that each component must implement\n protected abstract getSearchTerm(): string;\n\n private updateCanEditResourcesValue(): void {\n if (this.userLoggedIn && this.user) {\n this.canEditResourcesValue = HelperService.canEditResources(\n this.user,\n this.userLoggedIn,\n this.permissionService\n );\n } else {\n this.canEditResourcesValue = false;\n }\n }\n\n canEditResources(): boolean {\n return this.canEditResourcesValue;\n }\n}\n"],"names":["i1.ResourceService"],"mappings":";;;;;;;;;AAwBM,MAAgB,sBAAuB,SAAQ,gBAAgB,CAAA;IAejE,WAAA,CACuB,eAAgC,EAChC,UAAsB,EACxB,WAAwB,EACxB,YAAmB,EACjB,GAAsB,EACzC,QAAkB,EAAA;QAElB,KAAK,CAAC,QAAQ,CAAC;QAPI,IAAA,CAAA,eAAe,GAAf,eAAe;QACf,IAAA,CAAA,UAAU,GAAV,UAAU;QACZ,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,YAAY,GAAZ,YAAY;QACV,IAAA,CAAA,GAAG,GAAH,GAAG;QAlB1B,IAAA,CAAA,oBAAoB,GAAG,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,eAAe;QACzE,IAAA,CAAA,KAAK,GAAe,EAAE;QACtB,IAAA,CAAA,iBAAiB,GAAG,EAAE;QAKtB,IAAA,CAAA,QAAQ,GAAG,KAAK;QAIhB,IAAA,CAAA,qBAAqB,GAAG,KAAK;IAW7B;IAEA,QAAQ,GAAA;QACJ,IAAI,CAAC,qBAAqB,EAAE,CAAC,SAAS,CAAC,QAAQ,IAAG;AAC9C,YAAA,IAAI,CAAC,cAAc,GAAG,QAAQ;AAC9B,YAAA,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE;AAC3B,QAAA,CAAC,CAAC;QACF,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC,SAAS,CAAC,GAAG,IAAG;AACzC,YAAA,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,GAAG;AACzB,YAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,gBAAA,IAAI,CAAC,YAAY,CAAC,QAAQ,CA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