@posiwise/resource-module 0.0.204 → 0.0.205

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.
@@ -31,6 +31,7 @@ import * as i2 from "ngx-ui-switch";
31
31
  import { UiSwitchModule } from "ngx-ui-switch";
32
32
  import { AutoComplete, AutoCompleteModule } from "primeng/autocomplete";
33
33
  import { DatePicker, DatePickerModule } from "primeng/datepicker";
34
+ import { QuillHelper, editorImageUpload } from "@posiwise/utils/quill";
34
35
  import moment from "moment";
35
36
  var __defProp = Object.defineProperty;
36
37
  var __exportAll = (all, no_symbols) => {
@@ -821,35 +822,159 @@ i0.ɵɵngDeclareClassMetadata({
821
822
  }]
822
823
  }]
823
824
  });
825
+ var ResourceEditCardImages = class ResourceEditCardImages extends AppBaseComponent {
826
+ constructor() {
827
+ super(...arguments);
828
+ this.modalService = inject(NgbModal);
829
+ this.image = "";
830
+ this.rectangularImage = "";
831
+ this.file = null;
832
+ this.rectangularFile = null;
833
+ }
834
+ openImageModal(modalTemplate) {
835
+ this.imageModalRef = this.modalService.open(modalTemplate, {
836
+ centered: true,
837
+ size: "md"
838
+ });
839
+ }
840
+ openRectModal(content) {
841
+ this.imageModalRef = this.modalService.open(content, {
842
+ centered: true,
843
+ windowClass: "modal-holder"
844
+ });
845
+ }
846
+ onImageSelected(base64) {
847
+ this.image = base64;
848
+ this.file = HelperService.convertBase64ToFile(base64);
849
+ this.imageModalRef?.close();
850
+ }
851
+ onRectangularImageSelection(base64) {
852
+ this.rectangularImage = base64;
853
+ this.rectangularFile = HelperService.convertBase64ToFile(base64);
854
+ this.imageModalRef?.close();
855
+ }
856
+ removeImage() {
857
+ this.image = null;
858
+ this.file = null;
859
+ }
860
+ deleteRectangularImage() {
861
+ this.rectangularImage = null;
862
+ this.rectangularFile = null;
863
+ }
864
+ handleImageError(event, fallbackPath) {
865
+ HelperService.handleImageFallbackPath(event, fallbackPath);
866
+ }
867
+ static {
868
+ this.ɵfac = i0.ɵɵngDeclareFactory({
869
+ minVersion: "12.0.0",
870
+ version: "22.2.3",
871
+ ngImport: i0,
872
+ type: ResourceEditCardImages,
873
+ deps: null,
874
+ target: i0.ɵɵFactoryTarget.Component
875
+ });
876
+ }
877
+ static {
878
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
879
+ minVersion: "14.0.0",
880
+ version: "22.2.3",
881
+ type: ResourceEditCardImages,
882
+ isStandalone: true,
883
+ selector: "ng-component",
884
+ usesInheritance: true,
885
+ ngImport: i0,
886
+ template: "",
887
+ isInline: true
888
+ });
889
+ }
890
+ };
891
+ i0.ɵɵngDeclareClassMetadata({
892
+ minVersion: "12.0.0",
893
+ version: "22.2.3",
894
+ ngImport: i0,
895
+ type: ResourceEditCardImages,
896
+ decorators: [{
897
+ type: Component,
898
+ args: [{ template: "" }]
899
+ }]
900
+ });
901
+ function resourceEditForm(fb) {
902
+ return fb.group({
903
+ title: [""],
904
+ external_url: [""],
905
+ cta_text: [""],
906
+ when: [""],
907
+ showcase: [false],
908
+ published_at: [false],
909
+ accepted_at: [false],
910
+ body: [""]
911
+ });
912
+ }
913
+ function resourceFormValue(resource) {
914
+ return {
915
+ title: resource.title ?? "",
916
+ external_url: resource.external_url ?? "",
917
+ cta_text: resource.cta_text ?? "",
918
+ when: resource.when ? new Date(resource.when) : "",
919
+ showcase: !!resource.showcase,
920
+ published_at: !!resource.published_at,
921
+ accepted_at: !!resource.accepted_at,
922
+ body: resource.body
923
+ };
924
+ }
925
+ function buildResourcePayload(form, subscriptionId, images) {
926
+ const data = {
927
+ ...form.value,
928
+ subscription_id: subscriptionId
929
+ };
930
+ setFile(data, "picture", images.file);
931
+ setFile(data, "rectangular_picture", images.rectangularFile);
932
+ setToggledDate(form, data, "published_at");
933
+ setToggledDate(form, data, "accepted_at");
934
+ if (!form.get("when")?.value) data.when = "";
935
+ if (!form.get("showcase")?.value) data.showcase = "";
936
+ if (!images.file && !images.image) data.remove_picture = true;
937
+ if (!images.rectangularFile && !images.rectangularImage) data.remove_rectangular_picture = true;
938
+ return data;
939
+ }
940
+ function setFile(data, key, file) {
941
+ if (file) data[key] = file;
942
+ else delete data[key];
943
+ }
944
+ function setToggledDate(form, data, key) {
945
+ const control = form.get(key);
946
+ if (control?.dirty) data[key] = control.value ? moment().format("DD-MMM-YYYY") : "";
947
+ else delete data[key];
948
+ }
949
+ function filterTags(tags, query) {
950
+ if (!query) return [...tags];
951
+ const needle = query.toLowerCase();
952
+ return tags.filter((tag) => tag.name.toLowerCase().includes(needle));
953
+ }
954
+ function postTagsPayload(tags, postId) {
955
+ return {
956
+ entity_tags: tags.map((tag) => ({ tag_id: tag.id })),
957
+ slug: postId,
958
+ tag_entity: "Post"
959
+ };
960
+ }
824
961
  var resource_edit_card_component_exports = /* @__PURE__ */ __exportAll({ ResourceEditCardComponent: () => ResourceEditCardComponent });
825
- var ResourceEditCardComponent = class ResourceEditCardComponent extends AppBaseComponent {
962
+ var ResourceEditCardComponent = class ResourceEditCardComponent extends ResourceEditCardImages {
826
963
  constructor() {
827
964
  super();
828
965
  this.fb = inject(FormBuilder);
829
- this.modalService = inject(NgbModal);
830
966
  this.resourceService = inject(ResourceService);
831
967
  this.authService = inject(AuthService);
832
968
  this.tagService = inject(TagService);
833
969
  this.cdr = inject(ChangeDetectorRef);
834
970
  this.updated = new EventEmitter();
835
- this.image = "";
836
- this.rectangularImage = "";
837
- this.file = null;
838
- this.rectangularFile = null;
839
971
  this.selectedTags = [];
840
972
  this.allTags = [];
841
973
  this.tagsSuggestion = [];
842
974
  this.buttonBusy = false;
843
- this.editForm = this.fb.group({
844
- title: [""],
845
- external_url: [""],
846
- cta_text: [""],
847
- when: [""],
848
- showcase: [false],
849
- published_at: [false],
850
- accepted_at: [false],
851
- body: [""]
852
- });
975
+ this.editorConfig = QuillHelper.getEditorConfig([], editorImageUpload(() => this.subscriptionId));
976
+ QuillHelper.init();
977
+ this.editForm = resourceEditForm(this.fb);
853
978
  }
854
979
  ngOnInit() {
855
980
  this.authService.getToken$().subscribe((res) => {
@@ -869,17 +994,7 @@ var ResourceEditCardComponent = class ResourceEditCardComponent extends AppBaseC
869
994
  }
870
995
  openModal(modalTemplate) {
871
996
  if (this.resourceData) {
872
- const when = this.resourceData.when ? new Date(this.resourceData.when) : null;
873
- this.editForm.setValue({
874
- title: this.resourceData.title ?? "",
875
- external_url: this.resourceData.external_url ?? "",
876
- cta_text: this.resourceData.cta_text ?? "",
877
- when: when ?? "",
878
- showcase: !!this.resourceData.showcase,
879
- published_at: !!this.resourceData.published_at,
880
- accepted_at: !!this.resourceData.accepted_at,
881
- body: this.resourceData.body
882
- });
997
+ this.editForm.setValue(resourceFormValue(this.resourceData));
883
998
  this.image = this.resourceData.picture?.url ?? "";
884
999
  this.selectedTags = this.resourceData?.tags?.length ? [...this.resourceData.tags] : [];
885
1000
  this.rectangularImage = this.resourceData.rectangular_picture?.url ?? "";
@@ -891,12 +1006,7 @@ var ResourceEditCardComponent = class ResourceEditCardComponent extends AppBaseC
891
1006
  this.getPostTags();
892
1007
  }
893
1008
  search(event) {
894
- let values = [];
895
- if (event.query) values = this.allTags.filter((x) => x.name.toLowerCase().includes(event.query.toLowerCase()));
896
- else this.allTags.forEach((element) => {
897
- values.push(element);
898
- });
899
- this.tagsSuggestion = values;
1009
+ this.tagsSuggestion = filterTags(this.allTags, event.query);
900
1010
  }
901
1011
  getPostTags() {
902
1012
  this.tagService.getTagsByType("post_categories", {}, this.subscriptionId).subscribe((response) => {
@@ -904,112 +1014,37 @@ var ResourceEditCardComponent = class ResourceEditCardComponent extends AppBaseC
904
1014
  this.cdr.markForCheck();
905
1015
  });
906
1016
  }
907
- deleteRectangularImage() {
908
- this.rectangularImage = null;
909
- this.rectangularFile = null;
910
- }
911
- openImageModal(modalTemplate) {
912
- this.imageModalRef = this.modalService.open(modalTemplate, {
913
- centered: true,
914
- size: "md"
915
- });
916
- }
917
- onImageSelected(base64) {
918
- this.image = base64;
919
- this.file = HelperService.convertBase64ToFile(base64);
920
- this.imageModalRef?.close();
921
- }
922
- onRectangularImageSelection(base64) {
923
- this.rectangularImage = base64;
924
- this.rectangularFile = HelperService.convertBase64ToFile(base64);
925
- this.imageModalRef?.close();
926
- }
927
- removeImage() {
928
- this.image = null;
929
- this.file = null;
930
- }
931
1017
  saveResource() {
932
1018
  this.buttonBusy = true;
933
1019
  this.saveTags(this.id);
934
- const payload = {
935
- ...this.editForm.value,
936
- subscription_id: this.subscriptionId
937
- };
938
- this.handlePicture(payload);
939
- this.handlePublishedAt(payload);
940
- this.handleAcceptedAt(payload);
941
- this.handleAcceptedAt(payload);
942
- this.handleOptionalFields(payload);
943
- this.handleRectangularPicture(payload);
944
- this.handleRemovals(payload);
1020
+ const payload = buildResourcePayload(this.editForm, this.subscriptionId, this);
945
1021
  this.resourceService.updatePost(payload, this.id).subscribe({
946
- next: () => {
947
- setTimeout(() => {
948
- this.buttonBusy = false;
949
- this.cdr.markForCheck();
950
- setTimeout(() => {
951
- this.toast.success("Blog Post Updated");
952
- this.updated.emit();
953
- this.modalService.dismissAll();
954
- this.cdr.markForCheck();
955
- }, 0);
956
- }, 0);
957
- },
958
- error: () => {
959
- setTimeout(() => {
960
- this.buttonBusy = false;
961
- this.cdr.markForCheck();
962
- }, 0);
963
- }
1022
+ next: () => this.settleSave(() => {
1023
+ this.toast.success("Blog Post Updated");
1024
+ this.updated.emit();
1025
+ this.modalService.dismissAll();
1026
+ }),
1027
+ error: () => this.settleSave()
964
1028
  });
965
1029
  }
1030
+ settleSave(afterSuccess) {
1031
+ setTimeout(() => {
1032
+ this.buttonBusy = false;
1033
+ this.cdr.markForCheck();
1034
+ if (afterSuccess) setTimeout(() => {
1035
+ afterSuccess();
1036
+ this.cdr.markForCheck();
1037
+ }, 0);
1038
+ }, 0);
1039
+ }
966
1040
  saveTags(id) {
967
1041
  if (this.selectedTags.length) {
968
- const data = {
969
- entity_tags: this.selectedTags.map((tag) => ({ tag_id: tag.id })),
970
- slug: id,
971
- tag_entity: "Post"
972
- };
1042
+ const data = postTagsPayload(this.selectedTags, id);
973
1043
  this.tagService.addTags(data, this.subscriptionId).subscribe(() => {
974
1044
  this.cdr.markForCheck();
975
1045
  });
976
1046
  }
977
1047
  }
978
- handlePicture(data) {
979
- if (this.file) data.picture = this.file;
980
- else delete data.picture;
981
- }
982
- handlePublishedAt(data) {
983
- const control = this.editForm.get("published_at");
984
- if (control?.dirty) data.published_at = control.value ? moment().format("DD-MMM-YYYY") : "";
985
- else delete data.published_at;
986
- }
987
- handleAcceptedAt(data) {
988
- const control = this.editForm.get("accepted_at");
989
- if (control?.dirty) data.accepted_at = control.value ? moment().format("DD-MMM-YYYY") : "";
990
- else delete data.accepted_at;
991
- }
992
- handleOptionalFields(data) {
993
- if (!this.editForm.get("when")?.value) data.when = "";
994
- if (!this.editForm.get("showcase")?.value) data.showcase = "";
995
- }
996
- handleRectangularPicture(data) {
997
- if (this.rectangularFile) data.rectangular_picture = this.rectangularFile;
998
- else delete data.rectangular_picture;
999
- }
1000
- handleRemovals(data) {
1001
- if (!this.file && !this.image) data.remove_picture = true;
1002
- if (!this.rectangularFile && !this.rectangularImage) data.remove_rectangular_picture = true;
1003
- }
1004
- openRectModal(content) {
1005
- this.imageModalRef = this.modalService.open(content, {
1006
- centered: true,
1007
- windowClass: "modal-holder"
1008
- });
1009
- }
1010
- handleImageError(event, fallbackPath) {
1011
- HelperService.handleImageFallbackPath(event, fallbackPath);
1012
- }
1013
1048
  static {
1014
1049
  this.ɵfac = i0.ɵɵngDeclareFactory({
1015
1050
  minVersion: "12.0.0",
@@ -1 +1 @@
1
- {"version":3,"file":"posiwise-resource-module.mjs","names":["i1","i1","i1"],"sources":["../../../../libs/resource-module/src/lib/public/resource-public.routing.module.ts","../../../../libs/resource-module/src/lib/public/resource-public.module.ts","../../../../libs/resource-module/src/lib/resource.module.ts","../../../../libs/resource-module/src/lib/public/components/resource-company-card/resource-company-card.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-company-card/resource-company-card.component.html","../../../../libs/resource-module/src/lib/public/components/resource-top-banner-edit/resource-top-banner-edit.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-top-banner-edit/resource-top-banner-edit.component.html","../../../../libs/resource-module/src/lib/public/shared/resource-shared.module.ts","../../../../libs/resource-module/src/lib/public/components/resource-edit-card/resource-edit-card.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-edit-card/resource-edit-card.component.html","../../../../libs/resource-module/src/lib/public/shared/resource-edit.module.ts","../../../../libs/resource-module/src/lib/public/components/testimonial-card/testimonial-card.component.ts","../../../../libs/resource-module/src/lib/public/components/testimonial-card/testimonial-card.component.html"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\n// Lazy loaded routes - each route now loads its own module with only the components it needs\nconst routes: Routes = [\n {\n path: '',\n pathMatch: 'full',\n loadChildren: () =>\n import('./modules/root/resource-root.module').then(m => m.ResourceRootModule)\n },\n {\n path: 'hub',\n loadChildren: () =>\n import('./modules/hub/resource-hub.module').then(m => m.ResourceHubModule)\n },\n {\n path: 'blogs',\n loadChildren: () =>\n import('./modules/blogs/resource-blogs.module').then(m => m.ResourceBlogsModule)\n },\n {\n path: 'videos',\n loadChildren: () =>\n import('./modules/videos/resource-videos.module').then(m => m.ResourceVideosModule)\n },\n {\n path: 'integrations',\n loadChildren: () =>\n import('./modules/integrations/resource-integrations.module').then(\n m => m.ResourceIntegrationsModule\n )\n },\n {\n path: 'release-notes',\n loadChildren: () =>\n import('./modules/release-notes/resource-release-notes.module').then(\n m => m.ResourceReleaseNotesModule\n )\n },\n {\n path: 'events',\n loadChildren: () =>\n import('./modules/events/resource-events.module').then(m => m.ResourceEventsModule)\n },\n {\n path: 'white-papers',\n loadChildren: () =>\n import('./modules/white-papers/resource-white-papers.module').then(\n m => m.ResourceWhitePapersModule\n )\n },\n {\n path: 'case-studies',\n loadChildren: () =>\n import('./modules/case-studies/resource-case-studies.module').then(\n m => m.ResourceCaseStudiesModule\n )\n },\n {\n path: 'careers',\n loadChildren: () =>\n import('./modules/jobs/resource-jobs.module').then(m => m.ResourceJobsModule)\n },\n {\n path: 'view/:slug',\n loadChildren: () =>\n import('./modules/post/resource-post.module').then(m => m.ResourcePostModule)\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class BlogPublicRoutingModule {}\n","import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\n\nimport { ResourceService } from '../resource.service';\n\nimport { BlogPublicRoutingModule } from './resource-public.routing.module';\n\n@NgModule({\n imports: [BlogPublicRoutingModule],\n providers: [ResourceService],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourcePublicModule {}\n","import { NgModule } from '@angular/core';\n\nimport { ResourcePublicModule } from './public/resource-public.module';\n\n@NgModule({\n imports: [ResourcePublicModule]\n})\nexport class ResourceModule {}\n","import { NgClass, NgTemplateOutlet, SlicePipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n EventEmitter,\n inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ResourcePost, User } from '@posiwise/common-utilities';\nimport { LazyImgDirective } from '@posiwise/directives';\nimport { HelperService } from '@posiwise/helper-service';\nimport { NoDataComponent } from '@posiwise/shared-components';\n\nimport { Bind } from 'primeng/bind';\nimport { Paginator } from 'primeng/paginator';\nimport { Subject } from 'rxjs';\n\nimport { TranslocoPipe } from '@jsverse/transloco';\n\nimport { ResourceEditCardLazyComponent } from '../resource-edit-card-lazy/resource-edit-card-lazy.component';\n\ninterface PageEvent {\n first: number;\n rows: number;\n page: number;\n pageCount: number;\n}\n@Component({\n selector: 'pw-resource-company-card',\n templateUrl: './resource-company-card.component.html',\n styleUrl: './resource-company-card.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgClass,\n NoDataComponent,\n LazyImgDirective,\n ResourceEditCardLazyComponent,\n NgTemplateOutlet,\n Bind,\n Paginator,\n SlicePipe,\n TranslocoPipe\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceCompanyCardComponent\n extends AppBaseComponent\n implements OnChanges, OnInit, OnDestroy\n{\n private readonly cdr = inject(ChangeDetectorRef);\n\n @Output() getPosts = new EventEmitter<ResourcePost[]>();\n private readonly destroy$ = new Subject<void>();\n\n canEditResourcesValue = false;\n @Input() header = '';\n @Input() data = [];\n @Input() integrationCountDisplay;\n @Input() vendor = false;\n @Input() user: User;\n @Input() userLoggedIn: boolean;\n\n postData = false;\n filteredData = [];\n first = 0;\n rows = 12;\n subscriptionId: string;\n\n ngOnChanges(): void {\n this.search();\n }\n ngOnInit() {\n if (this.userLoggedIn) {\n this.updateCanEditResourcesValue();\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 }\n }\n search(keywords?) {\n if (keywords) {\n this.filteredData = this.data.filter(x =>\n x.title.toLowerCase().includes(keywords.toLowerCase())\n );\n if (this.filteredData.length === 0) {\n this.postData = true;\n } else {\n this.postData = false;\n }\n } else {\n this.filteredData = [...this.data];\n this.postData = false;\n }\n }\n onPageChange(event: PageEvent) {\n this.first = event.first;\n this.rows = event.rows;\n }\n\n override ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\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 /** Show no-data when there is integration count but no posts (postData is false, filteredData empty). */\n get showNoPostsMessage(): boolean {\n return (\n this.integrationCountDisplay > 0 &&\n !this.postData &&\n (!this.filteredData || this.filteredData.length === 0)\n );\n }\n}\n","<div [ngClass]=\"{ 'vendors-distributor-wrapper': !vendor }\">\n <div class=\"d-flex justify-content-between align-items-center mb-3 search-container\">\n <div>\n <span class=\"int-span\">{{header}}</span>\n </div>\n @if (integrationCountDisplay > 0) {\n <div class=\"search-wrapper position-relative\">\n <i class=\"fa fa-search search-icon\"></i>\n <input type=\"text\"\n (keyup)=\"search($event.target.value)\"\n placeholder=\"Search eg security\"\n class=\"search-input top-search-input\" id=\"input_search_eg_security_9712\" name=\"input_search_eg_security_9712\"\n aria-label=\"Search eg security\" />\n </div>\n }\n\n </div>\n\n @if (postData) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\"> </pw-no-data>\n </div>\n }\n\n @if (showNoPostsMessage) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"></pw-no-data>\n </div>\n }\n\n @if (!postData && integrationCountDisplay > 0 && filteredData.length > 0) {\n <div class=\"row\">\n @for (img of filteredData | slice:first:(first + rows); track img) {\n <div class=\"col-md-3 mt-4\"\n >\n <div class=\"boxes d-flex align-items-center justify-content-center\">\n @if (img?.companyImg) {\n <img [src]=\"img.companyImg\" alt=\"Vendor Company Icon\" class=\"vendor-icon\" />\n } @else {\n @if (img?.rectangular_picture?.url) {\n @if (!img.rectangular_picture.url.includes('default-photo')) {\n @if (img?.showcase) {\n <a class=\"vendor-link\" [href]=\"img.external_url || ('/resources/view/' + img.slug)\">\n <img [src]=\"img.rectangular_picture.url\" alt=\"Vendor Rectangular Company Icon\" class=\"vendor-icon\" />\n </a>\n } @else {\n <img [src]=\"img.rectangular_picture.url\" alt=\"Vendor Rectangular Company Icon\" class=\"vendor-icon\" />\n }\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"img?.id\"\n [resourceData]=\"img\"\n (updated)=\"getPosts.emit()\">\n </pw-resource-edit-card-lazy>\n } @else {\n @if (img?.showcase) {\n <a class=\"vendor-link\" [href]=\"img.external_url || ('/resources/view/' + img.slug)\">\n <span class=\"vendor-name text-center mt-2\">{{ img?.title }}</span>\n </a>\n } @else {\n <span class=\"vendor-name text-center\">{{ img?.title }}</span>\n }\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"img?.id\"\n [resourceData]=\"img\"\n (updated)=\"getPosts.emit()\">\n </pw-resource-edit-card-lazy>\n }\n } @else {\n <ng-template [ngTemplateOutlet]=\"noImage\"></ng-template>\n }\n }\n </div>\n </div>\n }\n @if (filteredData.length > 0) {\n <div class=\"customPaginator d-flex align-items-center mt-5 justify-content-center\"\n >\n <p-paginator\n [first]=\"first\"\n [rows]=\"rows\"\n [totalRecords]=\"filteredData.length\"\n (onPageChange)=\"onPageChange($event)\"></p-paginator>\n </div>\n }\n </div>\n }\n</div>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n EventEmitter,\n inject,\n Input,\n OnInit,\n Output,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { FormBuilder, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { TagService } from '@posiwise/common-services';\nimport { User } from '@posiwise/common-utilities';\nimport { ButtonBusyDirective, LazyImgDirective } from '@posiwise/directives';\nimport { HelperService } from '@posiwise/helper-service';\nimport { InputContainerComponent } from '@posiwise/shared-components';\nimport { CustomUploaderComponent, ProfileImageCropperComponent } from '@posiwise/utils';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\n@Component({\n selector: 'pw-resource-top-banner-edit',\n templateUrl: './resource-top-banner-edit.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n FormsModule,\n ReactiveFormsModule,\n InputContainerComponent,\n LazyImgDirective,\n ButtonBusyDirective,\n ProfileImageCropperComponent\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceTopBannerEditComponent extends AppBaseComponent implements OnInit {\n private readonly fb = inject(FormBuilder);\n private readonly modalService = inject(NgbModal);\n private readonly tagService = inject(TagService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n @Input() blogPostTag;\n @Input() user: User;\n @Input() userLoggedIn: boolean;\n @Output() getUpdatedTag = new EventEmitter();\n @ViewChild('editModal') editModal: TemplateRef<CustomUploaderComponent>;\n @ViewChild('imageCropContent') imageCropContent: TemplateRef<CustomUploaderComponent>;\n\n form: FormGroup;\n image: string | null = null;\n defaultImage = 'assets/img/resource/blog.png';\n file: File;\n subscriptionId: string;\n imageModalRef;\n buttonBusy: boolean;\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 }\n this.form = this.fb.group({\n title: [this.blogPostTag?.title ?? ''],\n description: [this.blogPostTag?.description ?? ''],\n meta_title: [this.blogPostTag?.meta_title ?? ''],\n meta_description: [this.blogPostTag?.meta_description ?? '']\n });\n\n this.image = this.blogPostTag?.image?.url ?? null;\n }\n\n openEditModal() {\n this.modalService.open(this.editModal, { centered: true, size: 'lg' });\n }\n\n openImageModal(modalRef) {\n this.imageModalRef = this.modalService.open(modalRef, { centered: true });\n }\n\n onImageSelected(base64: string): void {\n this.image = base64;\n this.file = HelperService.convertBase64ToFile(base64);\n this.imageModalRef?.close();\n }\n\n onClose() {\n this.imageModalRef?.close();\n }\n\n removeImage() {\n this.image = null;\n }\n\n handleImageError(event: Event) {\n (event.target as HTMLImageElement).src = this.defaultImage;\n }\n\n save() {\n this.buttonBusy = true;\n const payload = {\n title: this.form.value.title ?? this.blogPostTag?.title,\n description: this.form.value.description ?? this.blogPostTag?.description,\n meta_title: this.form.value.meta_title ?? this.blogPostTag?.meta_title,\n meta_description:\n this.form.value.meta_description ?? this.blogPostTag?.meta_description,\n tag_category_id: this.blogPostTag?.tag_category_id,\n tag_type: this.blogPostTag?.tag_type,\n subscription_id: this.subscriptionId,\n name: this.blogPostTag?.name\n };\n\n if (this.file) {\n payload['image'] = this.file;\n } else if (!this.image) {\n payload['remove_image'] = true;\n }\n\n this.tagService.updateTagById(this.blogPostTag?.id, payload).subscribe(() => {\n this.buttonBusy = false;\n this.toast.success('Tag Updated');\n this.getUpdatedTag.emit();\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n });\n }\n}\n","<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-black in-page-edit-icon mb-1 ms-3\"\n (click)=\"openEditModal()\"\n (keydown.enter)=\"openEditModal()\"\n (keydown.space)=\"openEditModal()\"\n title=\"Edit Blog Tag\"></i>\n</div>\n\n<ng-template #editModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Blog Post Tag</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row\">\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"\n aria-label=\"Title\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Description\" name=\"description\" controlId=\"resource-top-banner-description\">\n <textarea id=\"resource-top-banner-description\" name=\"description\" class=\"form-control\" rows=\"4\" formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Title\" name=\"meta_title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"meta_title\" placeholder=\"Meta Title for SEO\" id=\"input_meta_title_2\" name=\"input_meta_title_2\"\n aria-label=\"Meta Title for SEO\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Description\" name=\"meta_description\" controlId=\"resource-top-banner-meta_description\">\n <textarea id=\"resource-top-banner-meta_description\" name=\"meta_description\" class=\"form-control\" rows=\"3\" formControlName=\"meta_description\" placeholder=\"Meta Description for SEO\"\n aria-label=\"Meta Description for SEO\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 my-4\">\n <span id=\"resource-top-banner-tag-image-label\" class=\"pw-label-style\">Blog Tag Image</span>\n <div class=\"text-center d-flex flex-column align-items-center col-6\">\n <img [src]=\"image || defaultImage\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n (keydown.space)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Blog\"\n (error)=\"handleImageError($event)\"\n />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <button type=\"button\" class=\"btn btn-link p-0 d-inline-block mt-2\"\n (click)=\"openImageModal(imageCropContent)\">\n {{ image ? 'Update' : 'Add' }} Image\n </button>\n @if (image) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (keydown.enter)=\"removeImage()\"\n (keydown.space)=\"removeImage()\"\n (click)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n\n </div>\n </form>\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\" [buttonBusy]=\"buttonBusy\" (click)=\"save()\">Save</button>\n </div>\n</ng-template>\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Image</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. Avoid artwork, celebrities, or copyrighted images.</small>\n <pw-image-cropper\n #cropper\n aspectRatio=\"dynamic\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n","import { CommonModule } from '@angular/common';\nimport { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\n\nimport { HubSpotMeetingsSharedModule } from '@posiwise/alpha-module';\nimport { CoreTranslocoModule } from '@posiwise/core-transloco';\nimport { DirectivesModule } from '@posiwise/directives';\nimport { PipesModule } from '@posiwise/pipes';\nimport { ResourceSharedComponentsModule } from '@posiwise/shared-components';\n\nimport { IconFieldModule } from 'primeng/iconfield';\nimport { InputIconModule } from 'primeng/inputicon';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { TextareaModule } from 'primeng/textarea';\n\nimport { TranslocoModule } from '@jsverse/transloco';\n\nimport { ResourceCompanyCardComponent } from '../components/resource-company-card/resource-company-card.component';\nimport { ResourceTopBannerEditComponent } from '../components/resource-top-banner-edit/resource-top-banner-edit.component';\n\nimport { ResourceCardsModule } from './resource-cards.module';\n\n// Shared components used across multiple resource routes\n// Note: Most heavy modules (Quill, Calendar, UiSwitch, etc.) are now in ResourceCardsModule\n@NgModule({\n imports: [\n CommonModule,\n RouterModule,\n FormsModule,\n ReactiveFormsModule,\n PipesModule,\n ResourceSharedComponentsModule,\n CoreTranslocoModule,\n TranslocoModule,\n DirectivesModule,\n InputTextModule,\n IconFieldModule,\n InputIconModule,\n TextareaModule,\n ResourceCardsModule,\n HubSpotMeetingsSharedModule, // For pw-book-a-demo component (HubSpotMeetingsComponent)\n ResourceCompanyCardComponent,\n ResourceTopBannerEditComponent\n ],\n exports: [\n // Export the 2 components specific to this module\n ResourceCompanyCardComponent,\n ResourceTopBannerEditComponent,\n // Export card components module (includes all heavy modules + card components)\n ResourceCardsModule,\n // Export HubSpotMeetingsSharedModule to make pw-book-a-demo component available\n HubSpotMeetingsSharedModule,\n // Export common lightweight modules\n CommonModule,\n RouterModule,\n FormsModule,\n ReactiveFormsModule,\n PipesModule,\n ResourceSharedComponentsModule,\n CoreTranslocoModule,\n TranslocoModule,\n DirectivesModule,\n InputTextModule,\n IconFieldModule,\n InputIconModule,\n TextareaModule\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceSharedModule {}\n","import { NgClass } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n EventEmitter,\n inject,\n Input,\n OnInit,\n Output\n} from '@angular/core';\nimport { FormBuilder, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { AuthService, TagService } from '@posiwise/common-services';\nimport { ButtonBusyDirective, LazyImgDirective } from '@posiwise/directives';\nimport { HelperService } from '@posiwise/helper-service';\nimport { InputContainerComponent } from '@posiwise/shared-components';\nimport { ProfileImageCropperComponent } from '@posiwise/utils';\n\nimport moment from 'moment';\nimport { QuillEditorComponent } from 'ngx-quill';\nimport { UiSwitchModule } from 'ngx-ui-switch';\nimport { AutoComplete } from 'primeng/autocomplete';\nimport { Bind } from 'primeng/bind';\nimport { DatePicker } from 'primeng/datepicker';\n\nimport { TranslocoPipe } from '@jsverse/transloco';\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\nimport { ResourceService } from '../../../resource.service';\n\n@Component({\n selector: 'pw-resource-edit-card',\n templateUrl: './resource-edit-card.component.html',\n styleUrl: './resource-edit-card.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n FormsModule,\n ReactiveFormsModule,\n InputContainerComponent,\n QuillEditorComponent,\n NgClass,\n Bind,\n DatePicker,\n AutoComplete,\n UiSwitchModule,\n LazyImgDirective,\n ButtonBusyDirective,\n ProfileImageCropperComponent,\n TranslocoPipe\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceEditCardComponent extends AppBaseComponent implements OnInit {\n private readonly fb = inject(FormBuilder);\n private readonly modalService = inject(NgbModal);\n private readonly resourceService = inject(ResourceService);\n private readonly authService = inject(AuthService);\n private readonly tagService = inject(TagService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n @Input() id!: number;\n @Input() resourceData;\n @Output() updated = new EventEmitter<void>();\n\n editForm: FormGroup;\n image = '';\n rectangularImage = '';\n file: File | null = null;\n rectangularFile: File | null = null;\n\n imageModalRef;\n selectedTags = [];\n allTags = [];\n tagsSuggestion = [];\n subscriptionId: number;\n userLoggedIn: boolean;\n buttonBusy = false;\n\n constructor() {\n super();\n this.editForm = this.fb.group({\n title: [''],\n external_url: [''],\n cta_text: [''],\n when: [''],\n showcase: [false],\n published_at: [false],\n accepted_at: [false],\n body: ['']\n });\n }\n\n ngOnInit(): void {\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 }\n this.cdr.markForCheck();\n });\n }\n\n navigateToResourceEdit() {\n const basePath = `/admin/resources/${this.resourceData?.slug}`;\n const fullUrl = `${location.origin}${basePath}`;\n window.open(fullUrl, '_blank');\n }\n\n openModal(modalTemplate): void {\n if (this.resourceData) {\n const when = this.resourceData.when ? new Date(this.resourceData.when) : null;\n this.editForm.setValue({\n title: this.resourceData.title ?? '',\n external_url: this.resourceData.external_url ?? '',\n cta_text: this.resourceData.cta_text ?? '',\n when: when ?? '',\n showcase: !!this.resourceData.showcase,\n published_at: !!this.resourceData.published_at,\n accepted_at: !!this.resourceData.accepted_at,\n body: this.resourceData.body\n });\n this.image = this.resourceData.picture?.url ?? '';\n this.selectedTags = this.resourceData?.tags?.length ? [...this.resourceData.tags] : [];\n this.rectangularImage = this.resourceData.rectangular_picture?.url ?? '';\n }\n this.modalService.open(modalTemplate, { centered: true, size: 'lg' });\n this.getPostTags();\n }\n\n search(event) {\n let values = [];\n if (event.query) {\n values = this.allTags.filter(x =>\n x.name.toLowerCase().includes(event.query.toLowerCase())\n );\n } else {\n this.allTags.forEach(element => {\n values.push(element);\n });\n }\n this.tagsSuggestion = values;\n }\n\n private getPostTags() {\n this.tagService\n .getTagsByType('post_categories', {}, this.subscriptionId)\n .subscribe(response => {\n this.allTags = response.tags;\n this.cdr.markForCheck();\n });\n }\n\n deleteRectangularImage() {\n this.rectangularImage = null;\n this.rectangularFile = null;\n }\n openImageModal(modalTemplate): void {\n this.imageModalRef = this.modalService.open(modalTemplate, { centered: true, size: 'md' });\n }\n\n onImageSelected(base64: string): void {\n this.image = base64;\n this.file = HelperService.convertBase64ToFile(base64);\n this.imageModalRef?.close();\n }\n\n onRectangularImageSelection(base64: string) {\n this.rectangularImage = base64;\n this.rectangularFile = HelperService.convertBase64ToFile(base64);\n this.imageModalRef?.close();\n }\n\n removeImage(): void {\n this.image = null;\n this.file = null;\n }\n\n saveResource(): void {\n this.buttonBusy = true;\n this.saveTags(this.id);\n const payload = {\n ...this.editForm.value,\n subscription_id: this.subscriptionId\n };\n\n this.handlePicture(payload);\n this.handlePublishedAt(payload);\n this.handleAcceptedAt(payload);\n this.handleAcceptedAt(payload);\n this.handleOptionalFields(payload);\n this.handleRectangularPicture(payload);\n this.handleRemovals(payload);\n\n this.resourceService.updatePost(payload, this.id).subscribe({\n next: () => {\n // NG0100: Toastr + dismissAll can run CD in the same macrotask as clearing [buttonBusy].\n // Clear busy in one task; toast/emit/modal in the next so dev-mode \"verify\" sees a stable binding.\n setTimeout(() => {\n this.buttonBusy = false;\n this.cdr.markForCheck();\n setTimeout(() => {\n this.toast.success('Blog Post Updated');\n this.updated.emit();\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n }, 0);\n }, 0);\n },\n error: () => {\n setTimeout(() => {\n this.buttonBusy = false;\n this.cdr.markForCheck();\n }, 0);\n }\n });\n }\n\n private saveTags(id: number | string): void {\n if (this.selectedTags.length) {\n const data = {\n entity_tags: this.selectedTags.map(tag => ({ tag_id: tag.id })),\n slug: id,\n tag_entity: 'Post' // or use TAG_ENTITY.POST if you imported it\n };\n\n this.tagService.addTags(data, this.subscriptionId).subscribe(() => {\n this.cdr.markForCheck();\n });\n }\n }\n\n private handlePicture(data) {\n if (this.file) {\n data.picture = this.file;\n } else {\n delete data.picture;\n }\n }\n\n private handlePublishedAt(data) {\n const control = this.editForm.get('published_at');\n if (control?.dirty) {\n data.published_at = control.value ? moment().format('DD-MMM-YYYY') : '';\n } else {\n delete data.published_at;\n }\n }\n\n private handleAcceptedAt(data) {\n const control = this.editForm.get('accepted_at');\n if (control?.dirty) {\n data.accepted_at = control.value ? moment().format('DD-MMM-YYYY') : '';\n } else {\n delete data.accepted_at;\n }\n }\n\n private handleOptionalFields(data) {\n if (!this.editForm.get('when')?.value) {\n data.when = '';\n }\n if (!this.editForm.get('showcase')?.value) {\n data.showcase = '';\n }\n }\n\n private handleRectangularPicture(data) {\n if (this.rectangularFile) {\n data.rectangular_picture = this.rectangularFile;\n } else {\n delete data.rectangular_picture;\n }\n }\n\n private handleRemovals(data) {\n if (!this.file && !this.image) {\n data.remove_picture = true;\n }\n if (!this.rectangularFile && !this.rectangularImage) {\n data.remove_rectangular_picture = true;\n }\n }\n\n openRectModal(content) {\n this.imageModalRef = this.modalService.open(content, {\n centered: true,\n windowClass: 'modal-holder'\n });\n }\n\n handleImageError(event: Event, fallbackPath): void {\n HelperService.handleImageFallbackPath(event, fallbackPath);\n }\n}\n","<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-dark in-page-edit-icon d-flex justify-content-center mb-2\"\n (click)=\"openModal(editResourceModal)\"\n (keydown.enter)=\"openModal(editResourceModal)\"\n (keydown.space)=\"openModal(editResourceModal)\"\n title=\"Edit Resource\"></i>\n</div>\n\n<ng-template #editResourceModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Resource</h5>\n <i class=\"fa fa-edit cursor-pointer text-dark in-page-edit-icon d-flex justify-content-center ms-3\"\n (click)=\"navigateToResourceEdit()\"\n (keydown.enter)=\"navigateToResourceEdit()\"\n (keydown.space)=\"navigateToResourceEdit()\"\n title=\"Go to the main edit page\"></i>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"editForm\">\n <div class=\"row\">\n\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"\n aria-label=\"Title\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 row\">\n <pw-input-container label=\"CTA Text\" name=\"cta_text\" class=\"col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"cta_text\" id=\"input_cta_text_2\" name=\"input_cta_text_2\"\n aria-label=\"Cta Text\"/>\n </pw-input-container>\n\n <pw-input-container label=\"External URL\" name=\"external_url\" class=\"col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.ExternalUrl' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"external_url\" id=\"input_external_url_3\" name=\"input_external_url_3\"\n [attr.aria-label]=\"'Resource.Posts.Body' | transloco\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container\n [label]=\"'Resource.Posts.Body' | transloco\"\n name=\"body\"\n errorMsg=\"Resource.Posts.Validation.Body\">\n <quill-editor\n [styles]=\"{ height: '300px' }\"\n class=\"quillEditor\"\n [modules]=\"editorConfig\"\n formControlName=\"body\"\n [ngClass]=\"{\n 'w-100': true,\n 'quill-container': true,\n 'is-invalid': submitted && f['body'].errors\n }\">\n </quill-editor>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-3 col-sm-6\">\n <pw-input-container\n [label]=\"'Resource.Posts.When' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.When' | transloco\"\n name=\"when\">\n <p-datepicker inputId=\"resource-edit-card-when\" formControlName=\"when\"\n [ariaLabel]=\"'Resource.Posts.When' | transloco\"\n [showIcon]=\"true\"\n dateFormat=\"dd-M-yy\"\n [placeholder]=\"'Select Date'\"\n [ngClass]=\"{ 'is-invalid': submitted && f['when'].errors }\">\n </p-datepicker>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-8\">\n <pw-input-container\n [label]=\"'Resource.Posts.Tags' | transloco\"\n class=\"ui-fluid skills-modal tags\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\"\n name=\"cta_text\">\n <p-auto-complete appendTo=\"body\" [(ngModel)]=\"selectedTags\"\n [ariaLabel]=\"'Resource.Posts.Tags' | transloco\"\n class=\"body-bg w-100\"\n [suggestions]=\"tagsSuggestion\"\n dataKey=\"id\"\n optionLabel=\"name\"\n (completeMethod)=\"search($event)\"\n [minLength]=\"1\"\n [maxlength]=\"10\"\n [dropdown]=\"true\"\n [ngModelOptions]=\"{ standalone: true }\"\n placeholder=\"Tags\"\n [multiple]=\"true\">\n </p-auto-complete>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 row\">\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'SHOWCASE'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Mark as showcase post'\"\n name=\"showcase\">\n <ui-switch formControlName=\"showcase\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'PUBLISHED'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Set to publish the post'\"\n name=\"published_at\">\n <ui-switch formControlName=\"published_at\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'ACCEPTED BY ADMIN'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Indicates approval by admin'\"\n name=\"accepted_at\">\n <ui-switch formControlName=\"accepted_at\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4 col-sm-4 my-4 ms-3\">\n <div class=\"text-center mb-4\">\n <span id=\"resource-edit-cover-picture-label\" class=\"pw-label-style\">{{ 'Resource.Posts.CoverPicture' | transloco }}</span>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"(image && !image.includes('default-photo.jpg')) ? image : 'assets/img/resource/blog.png'\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Modal\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <button type=\"button\" class=\"btn btn-link p-0 d-inline-block\" (click)=\"openImageModal(imageCropContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </button>\n @if (image && !image.includes('default-photo.jpg')) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (click)=\"removeImage()\"\n (keydown.enter)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4 col-sm-4 my-4 ms-3\">\n <div class=\"text-center mb-4\">\n <span id=\"resource-edit-rectangular-picture-label\" class=\"pw-label-style\">Rectangular Picture</span>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"(rectangularImage && !rectangularImage.includes('default-photo.jpg')) ? rectangularImage : 'assets/img/resource/blog.png'\"\n (click)=\"openRectModal(rectContent)\"\n (keydown.enter)=\"openRectModal(rectContent)\"\n class=\"image w-100\"\n alt=\"Uploaded rectangular media preview\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <button type=\"button\" class=\"btn btn-link p-0 d-inline-block\" (click)=\"openRectModal(rectContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </button>\n @if (rectangularImage && !rectangularImage.includes('default-photo.jpg')) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (click)=\"deleteRectangularImage()\"\n (keydown.enter)=\"deleteRectangularImage()\"></i>\n }\n </div>\n </div>\n </div>\n </div>\n\n </div>\n </form>\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\" [buttonBusy]=\"buttonBusy\" (click)=\"saveResource()\">Save</button>\n </div>\n</ng-template>\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\" class=\"btn-close\" [attr.aria-label]=\"'Common.Close' | transloco\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)</small>\n <pw-image-cropper\n [aspectRatio]=\"'dynamic'\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"modal.close()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n\n<ng-template #rectContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)</small>\n <pw-image-cropper\n #profile\n [aspectRatio]=\"'dynamic'\"\n (imageSelectionEvent)=\"onRectangularImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n","import { CommonModule } from '@angular/common';\nimport { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { CoreTranslocoModule } from '@posiwise/core-transloco';\nimport { DirectivesModule } from '@posiwise/directives';\nimport { ResourceSharedComponentsModule } from '@posiwise/shared-components';\n\nimport { QuillModule } from 'ngx-quill';\nimport { UiSwitchModule } from 'ngx-ui-switch';\nimport { AutoCompleteModule } from 'primeng/autocomplete';\nimport { DatePickerModule } from 'primeng/datepicker';\n\nimport { TranslocoModule } from '@jsverse/transloco';\n\nimport { ResourceEditCardComponent } from '../components/resource-edit-card/resource-edit-card.component';\n\n/**\n * Lazy-loadable module for ResourceEditCard\n * Contains heavy dependencies (Quill, Calendar, etc.) that are only needed for admins\n * This module is dynamically imported when edit button is clicked\n */\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n DatePickerModule,\n AutoCompleteModule,\n ResourceSharedComponentsModule,\n CoreTranslocoModule,\n TranslocoModule,\n DirectivesModule,\n QuillModule.forRoot(),\n UiSwitchModule,\n ResourceEditCardComponent\n ],\n exports: [ResourceEditCardComponent],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceEditModule {}\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output\n} from '@angular/core';\n\nimport { Resource } from '@posiwise/common-utilities';\nimport { LazyImgDirective } from '@posiwise/directives';\nimport { NoDataComponent } from '@posiwise/shared-components';\n\nimport { TranslocoPipe } from '@jsverse/transloco';\n\nimport { ResourceEditCardLazyComponent } from '../resource-edit-card-lazy/resource-edit-card-lazy.component';\n\n@Component({\n selector: 'pw-testimonial-card',\n templateUrl: './testimonial-card.component.html',\n styleUrls: [\n './testimonial-card.component.scss',\n '../resource-post/related-resources/related-resources.component.scss'\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NoDataComponent, ResourceEditCardLazyComponent, LazyImgDirective, TranslocoPipe]\n})\nexport class TestimonialCardListComponent implements OnChanges {\n @Output() editPost: EventEmitter<object> = new EventEmitter();\n\n @Input() posts: Resource[] = [];\n @Input() postHeader = '';\n @Input() canEdit = false;\n swiper;\n\n ngOnChanges(changes): void {\n if (changes.posts && this.posts?.length) {\n setTimeout(() => this.initSwiper(), 0); // Wait for DOM to render\n }\n }\n\n private async initSwiper() {\n // Dynamically import Swiper only when needed (lazy-load ~150KB library)\n const { default: Swiper } = await import('swiper');\n const { Navigation, Pagination } = await import('swiper/modules');\n\n this.swiper = new Swiper('.swiper-container', {\n modules: [Navigation, Pagination],\n slidesPerView: 1,\n spaceBetween: 24,\n centeredSlides: true,\n touchRatio: 1,\n touchAngle: 45,\n grabCursor: true,\n navigation: {\n nextEl: '.swiper-button-next',\n prevEl: '.swiper-button-prev'\n },\n pagination: {\n el: '.swiper-pagination',\n clickable: true\n },\n breakpoints: {\n 425: {\n slidesPerView: 1.05,\n centeredSlides: true\n },\n 470: {\n slidesPerView: 1.25,\n centeredSlides: true\n },\n 564: {\n slidesPerView: 1.5,\n centeredSlides: true\n },\n 640: {\n slidesPerView: 1.5,\n centeredSlides: true\n },\n 768: {\n slidesPerView: 1.5,\n centeredSlides: true\n },\n 1024: {\n slidesPerView: 2, // Allow room between cards\n centeredSlides: false\n },\n 1200: {\n slidesPerView: 3,\n centeredSlides: false\n }\n }\n });\n }\n}\n","<section class=\"resource-section section-outer bg-white\">\n <div class=\"container\">\n @if (postHeader) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap mb-3\">\n <h2 class=\"section-heading\">{{postHeader}}</h2>\n </div>\n }\n @if (posts.length === 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n <div [hidden]=\"posts.length === 0\">\n <div class=\"swiper-container\">\n <div class=\"swiper-wrapper\">\n @for (post of posts; track post) {\n <div class=\"swiper-slide\">\n <div class=\"testimonial-box\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEdit\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"editPost.emit(1, 100)\">\n </pw-resource-edit-card-lazy>\n <div class=\"stars mb-5\">★★★★★</div>\n <div class=\"testimonial-content\">\n <div class=\"ql-container ql-snow ql-res\">\n <div class=\"ql-editor\"\n [innerHTML]=\"post?.body\">\n </div>\n </div>\n </div>\n <!-- THIS STAYS AT BOTTOM -->\n <div class=\"avatar-container\">\n @if (!post.rectangular_picture.url.includes('default-photo.jpg') ) {\n <img\n [src]=\"post.rectangular_picture.url\"\n alt=\"Logo\"\n class=\"testimonial-logo mt-4\"\n />\n }\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"swiper-pagination\"></div>\n <div class=\"swiper-button-prev\"></div>\n <div class=\"swiper-button-next\"></div>\n </div>\n </div>\n </div>\n</section>"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,SAAiB;CACnB;EACI,MAAM;EACN,WAAW;EACX,oBACI,OAAO,+DAAsC,CAAC,MAAK,MAAK,EAAE,kBAAkB;CACnF;CACD;EACI,MAAM;EACN,oBACI,OAAO,8DAAoC,CAAC,MAAK,MAAK,EAAE,iBAAiB;CAChF;CACD;EACI,MAAM;EACN,oBACI,OAAO,gEAAwC,CAAC,MAAK,MAAK,EAAE,mBAAmB;CACtF;CACD;EACI,MAAM;EACN,oBACI,OAAO,iEAA0C,CAAC,MAAK,MAAK,EAAE,oBAAoB;CACzF;CACD;EACI,MAAM;EACN,oBACI,OAAO,uEAAsD,CAAC,MAC1D,MAAK,EAAE,0BAA0B;CAE5C;CACD;EACI,MAAM;EACN,oBACI,OAAO,wEAAwD,CAAC,MAC5D,MAAK,EAAE,0BAA0B;CAE5C;CACD;EACI,MAAM;EACN,oBACI,OAAO,iEAA0C,CAAC,MAAK,MAAK,EAAE,oBAAoB;CACzF;CACD;EACI,MAAM;EACN,oBACI,OAAO,uEAAsD,CAAC,MAC1D,MAAK,EAAE,yBAAyB;CAE3C;CACD;EACI,MAAM;EACN,oBACI,OAAO,uEAAsD,CAAC,MAC1D,MAAK,EAAE,yBAAyB;CAE3C;CACD;EACI,MAAM;EACN,oBACI,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AAA;CAAA,UAAA;CAAA,MAAA;CAA4B,YAAA,CAAA;EAVxC,MAAA;EACa,MAAA,CAAA;GAAA,UAAA;GAAqB,iBAMd,wBAAwB;GAAM,SACtC;IAAC;IAAiB;IAA+B;IAAkB;GAAa;GAAC,UAAA;GAAA,QAAA,CAAA,+jEAAA,sjFAAA;EAAA,CAAA;;;EAGzF,UAAA,CAAA,EAAA,MAAA,OAAA,CAAA;EAEA,OAAA,CAAA,EAAA,MAAA,MAAA,CAAA;EACA,YAAA,CAAA,EAAA,MAAA,MAAA,CAAA;EACA,SAAA,CAAA,EAAA,MAAA,MAAA,CAAA"}
1
+ {"version":3,"file":"posiwise-resource-module.mjs","names":["i1","i1","i1"],"sources":["../../../../libs/resource-module/src/lib/public/resource-public.routing.module.ts","../../../../libs/resource-module/src/lib/public/resource-public.module.ts","../../../../libs/resource-module/src/lib/resource.module.ts","../../../../libs/resource-module/src/lib/public/components/resource-company-card/resource-company-card.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-company-card/resource-company-card.component.html","../../../../libs/resource-module/src/lib/public/components/resource-top-banner-edit/resource-top-banner-edit.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-top-banner-edit/resource-top-banner-edit.component.html","../../../../libs/resource-module/src/lib/public/shared/resource-shared.module.ts","../../../../libs/resource-module/src/lib/public/components/resource-edit-card/resource-edit-card-images.ts","../../../../libs/resource-module/src/lib/public/components/resource-edit-card/resource-edit-payload.ts","../../../../libs/resource-module/src/lib/public/components/resource-edit-card/resource-edit-card.component.ts","../../../../libs/resource-module/src/lib/public/components/resource-edit-card/resource-edit-card.component.html","../../../../libs/resource-module/src/lib/public/shared/resource-edit.module.ts","../../../../libs/resource-module/src/lib/public/components/testimonial-card/testimonial-card.component.ts","../../../../libs/resource-module/src/lib/public/components/testimonial-card/testimonial-card.component.html"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\n// Lazy loaded routes - each route now loads its own module with only the components it needs\nconst routes: Routes = [\n {\n path: '',\n pathMatch: 'full',\n loadChildren: () =>\n import('./modules/root/resource-root.module').then(m => m.ResourceRootModule)\n },\n {\n path: 'hub',\n loadChildren: () =>\n import('./modules/hub/resource-hub.module').then(m => m.ResourceHubModule)\n },\n {\n path: 'blogs',\n loadChildren: () =>\n import('./modules/blogs/resource-blogs.module').then(m => m.ResourceBlogsModule)\n },\n {\n path: 'videos',\n loadChildren: () =>\n import('./modules/videos/resource-videos.module').then(m => m.ResourceVideosModule)\n },\n {\n path: 'integrations',\n loadChildren: () =>\n import('./modules/integrations/resource-integrations.module').then(\n m => m.ResourceIntegrationsModule\n )\n },\n {\n path: 'release-notes',\n loadChildren: () =>\n import('./modules/release-notes/resource-release-notes.module').then(\n m => m.ResourceReleaseNotesModule\n )\n },\n {\n path: 'events',\n loadChildren: () =>\n import('./modules/events/resource-events.module').then(m => m.ResourceEventsModule)\n },\n {\n path: 'white-papers',\n loadChildren: () =>\n import('./modules/white-papers/resource-white-papers.module').then(\n m => m.ResourceWhitePapersModule\n )\n },\n {\n path: 'case-studies',\n loadChildren: () =>\n import('./modules/case-studies/resource-case-studies.module').then(\n m => m.ResourceCaseStudiesModule\n )\n },\n {\n path: 'careers',\n loadChildren: () =>\n import('./modules/jobs/resource-jobs.module').then(m => m.ResourceJobsModule)\n },\n {\n path: 'view/:slug',\n loadChildren: () =>\n import('./modules/post/resource-post.module').then(m => m.ResourcePostModule)\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class BlogPublicRoutingModule {}\n","import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\n\nimport { ResourceService } from '../resource.service';\n\nimport { BlogPublicRoutingModule } from './resource-public.routing.module';\n\n@NgModule({\n imports: [BlogPublicRoutingModule],\n providers: [ResourceService],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourcePublicModule {}\n","import { NgModule } from '@angular/core';\n\nimport { ResourcePublicModule } from './public/resource-public.module';\n\n@NgModule({\n imports: [ResourcePublicModule]\n})\nexport class ResourceModule {}\n","import { NgClass, NgTemplateOutlet, SlicePipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n EventEmitter,\n inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output\n} from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { ResourcePost, User } from '@posiwise/common-utilities';\nimport { LazyImgDirective } from '@posiwise/directives';\nimport { HelperService } from '@posiwise/helper-service';\nimport { NoDataComponent } from '@posiwise/shared-components';\n\nimport { Bind } from 'primeng/bind';\nimport { Paginator } from 'primeng/paginator';\nimport { Subject } from 'rxjs';\n\nimport { TranslocoPipe } from '@jsverse/transloco';\n\nimport { ResourceEditCardLazyComponent } from '../resource-edit-card-lazy/resource-edit-card-lazy.component';\n\ninterface PageEvent {\n first: number;\n rows: number;\n page: number;\n pageCount: number;\n}\n@Component({\n selector: 'pw-resource-company-card',\n templateUrl: './resource-company-card.component.html',\n styleUrl: './resource-company-card.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgClass,\n NoDataComponent,\n LazyImgDirective,\n ResourceEditCardLazyComponent,\n NgTemplateOutlet,\n Bind,\n Paginator,\n SlicePipe,\n TranslocoPipe\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceCompanyCardComponent\n extends AppBaseComponent\n implements OnChanges, OnInit, OnDestroy\n{\n private readonly cdr = inject(ChangeDetectorRef);\n\n @Output() getPosts = new EventEmitter<ResourcePost[]>();\n private readonly destroy$ = new Subject<void>();\n\n canEditResourcesValue = false;\n @Input() header = '';\n @Input() data = [];\n @Input() integrationCountDisplay;\n @Input() vendor = false;\n @Input() user: User;\n @Input() userLoggedIn: boolean;\n\n postData = false;\n filteredData = [];\n first = 0;\n rows = 12;\n subscriptionId: string;\n\n ngOnChanges(): void {\n this.search();\n }\n ngOnInit() {\n if (this.userLoggedIn) {\n this.updateCanEditResourcesValue();\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 }\n }\n search(keywords?) {\n if (keywords) {\n this.filteredData = this.data.filter(x =>\n x.title.toLowerCase().includes(keywords.toLowerCase())\n );\n if (this.filteredData.length === 0) {\n this.postData = true;\n } else {\n this.postData = false;\n }\n } else {\n this.filteredData = [...this.data];\n this.postData = false;\n }\n }\n onPageChange(event: PageEvent) {\n this.first = event.first;\n this.rows = event.rows;\n }\n\n override ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\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 /** Show no-data when there is integration count but no posts (postData is false, filteredData empty). */\n get showNoPostsMessage(): boolean {\n return (\n this.integrationCountDisplay > 0 &&\n !this.postData &&\n (!this.filteredData || this.filteredData.length === 0)\n );\n }\n}\n","<div [ngClass]=\"{ 'vendors-distributor-wrapper': !vendor }\">\n <div class=\"d-flex justify-content-between align-items-center mb-3 search-container\">\n <div>\n <span class=\"int-span\">{{header}}</span>\n </div>\n @if (integrationCountDisplay > 0) {\n <div class=\"search-wrapper position-relative\">\n <i class=\"fa fa-search search-icon\"></i>\n <input type=\"text\"\n (keyup)=\"search($event.target.value)\"\n placeholder=\"Search eg security\"\n class=\"search-input top-search-input\" id=\"input_search_eg_security_9712\" name=\"input_search_eg_security_9712\"\n aria-label=\"Search eg security\" />\n </div>\n }\n\n </div>\n\n @if (postData) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\"> </pw-no-data>\n </div>\n }\n\n @if (showNoPostsMessage) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"></pw-no-data>\n </div>\n }\n\n @if (!postData && integrationCountDisplay > 0 && filteredData.length > 0) {\n <div class=\"row\">\n @for (img of filteredData | slice:first:(first + rows); track img) {\n <div class=\"col-md-3 mt-4\"\n >\n <div class=\"boxes d-flex align-items-center justify-content-center\">\n @if (img?.companyImg) {\n <img [src]=\"img.companyImg\" alt=\"Vendor Company Icon\" class=\"vendor-icon\" />\n } @else {\n @if (img?.rectangular_picture?.url) {\n @if (!img.rectangular_picture.url.includes('default-photo')) {\n @if (img?.showcase) {\n <a class=\"vendor-link\" [href]=\"img.external_url || ('/resources/view/' + img.slug)\">\n <img [src]=\"img.rectangular_picture.url\" alt=\"Vendor Rectangular Company Icon\" class=\"vendor-icon\" />\n </a>\n } @else {\n <img [src]=\"img.rectangular_picture.url\" alt=\"Vendor Rectangular Company Icon\" class=\"vendor-icon\" />\n }\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"img?.id\"\n [resourceData]=\"img\"\n (updated)=\"getPosts.emit()\">\n </pw-resource-edit-card-lazy>\n } @else {\n @if (img?.showcase) {\n <a class=\"vendor-link\" [href]=\"img.external_url || ('/resources/view/' + img.slug)\">\n <span class=\"vendor-name text-center mt-2\">{{ img?.title }}</span>\n </a>\n } @else {\n <span class=\"vendor-name text-center\">{{ img?.title }}</span>\n }\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"img?.id\"\n [resourceData]=\"img\"\n (updated)=\"getPosts.emit()\">\n </pw-resource-edit-card-lazy>\n }\n } @else {\n <ng-template [ngTemplateOutlet]=\"noImage\"></ng-template>\n }\n }\n </div>\n </div>\n }\n @if (filteredData.length > 0) {\n <div class=\"customPaginator d-flex align-items-center mt-5 justify-content-center\"\n >\n <p-paginator\n [first]=\"first\"\n [rows]=\"rows\"\n [totalRecords]=\"filteredData.length\"\n (onPageChange)=\"onPageChange($event)\"></p-paginator>\n </div>\n }\n </div>\n }\n</div>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n EventEmitter,\n inject,\n Input,\n OnInit,\n Output,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { FormBuilder, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { TagService } from '@posiwise/common-services';\nimport { User } from '@posiwise/common-utilities';\nimport { ButtonBusyDirective, LazyImgDirective } from '@posiwise/directives';\nimport { HelperService } from '@posiwise/helper-service';\nimport { InputContainerComponent } from '@posiwise/shared-components';\nimport { CustomUploaderComponent, ProfileImageCropperComponent } from '@posiwise/utils';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\n@Component({\n selector: 'pw-resource-top-banner-edit',\n templateUrl: './resource-top-banner-edit.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n FormsModule,\n ReactiveFormsModule,\n InputContainerComponent,\n LazyImgDirective,\n ButtonBusyDirective,\n ProfileImageCropperComponent\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceTopBannerEditComponent extends AppBaseComponent implements OnInit {\n private readonly fb = inject(FormBuilder);\n private readonly modalService = inject(NgbModal);\n private readonly tagService = inject(TagService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n @Input() blogPostTag;\n @Input() user: User;\n @Input() userLoggedIn: boolean;\n @Output() getUpdatedTag = new EventEmitter();\n @ViewChild('editModal') editModal: TemplateRef<CustomUploaderComponent>;\n @ViewChild('imageCropContent') imageCropContent: TemplateRef<CustomUploaderComponent>;\n\n form: FormGroup;\n image: string | null = null;\n defaultImage = 'assets/img/resource/blog.png';\n file: File;\n subscriptionId: string;\n imageModalRef;\n buttonBusy: boolean;\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 }\n this.form = this.fb.group({\n title: [this.blogPostTag?.title ?? ''],\n description: [this.blogPostTag?.description ?? ''],\n meta_title: [this.blogPostTag?.meta_title ?? ''],\n meta_description: [this.blogPostTag?.meta_description ?? '']\n });\n\n this.image = this.blogPostTag?.image?.url ?? null;\n }\n\n openEditModal() {\n this.modalService.open(this.editModal, { centered: true, size: 'lg' });\n }\n\n openImageModal(modalRef) {\n this.imageModalRef = this.modalService.open(modalRef, { centered: true });\n }\n\n onImageSelected(base64: string): void {\n this.image = base64;\n this.file = HelperService.convertBase64ToFile(base64);\n this.imageModalRef?.close();\n }\n\n onClose() {\n this.imageModalRef?.close();\n }\n\n removeImage() {\n this.image = null;\n }\n\n handleImageError(event: Event) {\n (event.target as HTMLImageElement).src = this.defaultImage;\n }\n\n save() {\n this.buttonBusy = true;\n const payload = {\n title: this.form.value.title ?? this.blogPostTag?.title,\n description: this.form.value.description ?? this.blogPostTag?.description,\n meta_title: this.form.value.meta_title ?? this.blogPostTag?.meta_title,\n meta_description:\n this.form.value.meta_description ?? this.blogPostTag?.meta_description,\n tag_category_id: this.blogPostTag?.tag_category_id,\n tag_type: this.blogPostTag?.tag_type,\n subscription_id: this.subscriptionId,\n name: this.blogPostTag?.name\n };\n\n if (this.file) {\n payload['image'] = this.file;\n } else if (!this.image) {\n payload['remove_image'] = true;\n }\n\n this.tagService.updateTagById(this.blogPostTag?.id, payload).subscribe(() => {\n this.buttonBusy = false;\n this.toast.success('Tag Updated');\n this.getUpdatedTag.emit();\n this.modalService.dismissAll();\n this.cdr.markForCheck();\n });\n }\n}\n","<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-black in-page-edit-icon mb-1 ms-3\"\n (click)=\"openEditModal()\"\n (keydown.enter)=\"openEditModal()\"\n (keydown.space)=\"openEditModal()\"\n title=\"Edit Blog Tag\"></i>\n</div>\n\n<ng-template #editModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Blog Post Tag</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row\">\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"\n aria-label=\"Title\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Description\" name=\"description\" controlId=\"resource-top-banner-description\">\n <textarea id=\"resource-top-banner-description\" name=\"description\" class=\"form-control\" rows=\"4\" formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Title\" name=\"meta_title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"meta_title\" placeholder=\"Meta Title for SEO\" id=\"input_meta_title_2\" name=\"input_meta_title_2\"\n aria-label=\"Meta Title for SEO\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Description\" name=\"meta_description\" controlId=\"resource-top-banner-meta_description\">\n <textarea id=\"resource-top-banner-meta_description\" name=\"meta_description\" class=\"form-control\" rows=\"3\" formControlName=\"meta_description\" placeholder=\"Meta Description for SEO\"\n aria-label=\"Meta Description for SEO\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 my-4\">\n <span id=\"resource-top-banner-tag-image-label\" class=\"pw-label-style\">Blog Tag Image</span>\n <div class=\"text-center d-flex flex-column align-items-center col-6\">\n <img [src]=\"image || defaultImage\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n (keydown.space)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Blog\"\n (error)=\"handleImageError($event)\"\n />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <button type=\"button\" class=\"btn btn-link p-0 d-inline-block mt-2\"\n (click)=\"openImageModal(imageCropContent)\">\n {{ image ? 'Update' : 'Add' }} Image\n </button>\n @if (image) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (keydown.enter)=\"removeImage()\"\n (keydown.space)=\"removeImage()\"\n (click)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n\n </div>\n </form>\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\" [buttonBusy]=\"buttonBusy\" (click)=\"save()\">Save</button>\n </div>\n</ng-template>\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Image</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. Avoid artwork, celebrities, or copyrighted images.</small>\n <pw-image-cropper\n #cropper\n aspectRatio=\"dynamic\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n","import { CommonModule } from '@angular/common';\nimport { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\n\nimport { HubSpotMeetingsSharedModule } from '@posiwise/alpha-module';\nimport { CoreTranslocoModule } from '@posiwise/core-transloco';\nimport { DirectivesModule } from '@posiwise/directives';\nimport { PipesModule } from '@posiwise/pipes';\nimport { ResourceSharedComponentsModule } from '@posiwise/shared-components';\n\nimport { IconFieldModule } from 'primeng/iconfield';\nimport { InputIconModule } from 'primeng/inputicon';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { TextareaModule } from 'primeng/textarea';\n\nimport { TranslocoModule } from '@jsverse/transloco';\n\nimport { ResourceCompanyCardComponent } from '../components/resource-company-card/resource-company-card.component';\nimport { ResourceTopBannerEditComponent } from '../components/resource-top-banner-edit/resource-top-banner-edit.component';\n\nimport { ResourceCardsModule } from './resource-cards.module';\n\n// Shared components used across multiple resource routes\n// Note: Most heavy modules (Quill, Calendar, UiSwitch, etc.) are now in ResourceCardsModule\n@NgModule({\n imports: [\n CommonModule,\n RouterModule,\n FormsModule,\n ReactiveFormsModule,\n PipesModule,\n ResourceSharedComponentsModule,\n CoreTranslocoModule,\n TranslocoModule,\n DirectivesModule,\n InputTextModule,\n IconFieldModule,\n InputIconModule,\n TextareaModule,\n ResourceCardsModule,\n HubSpotMeetingsSharedModule, // For pw-book-a-demo component (HubSpotMeetingsComponent)\n ResourceCompanyCardComponent,\n ResourceTopBannerEditComponent\n ],\n exports: [\n // Export the 2 components specific to this module\n ResourceCompanyCardComponent,\n ResourceTopBannerEditComponent,\n // Export card components module (includes all heavy modules + card components)\n ResourceCardsModule,\n // Export HubSpotMeetingsSharedModule to make pw-book-a-demo component available\n HubSpotMeetingsSharedModule,\n // Export common lightweight modules\n CommonModule,\n RouterModule,\n FormsModule,\n ReactiveFormsModule,\n PipesModule,\n ResourceSharedComponentsModule,\n CoreTranslocoModule,\n TranslocoModule,\n DirectivesModule,\n InputTextModule,\n IconFieldModule,\n InputIconModule,\n TextareaModule\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceSharedModule {}\n","import { Component, inject } from '@angular/core';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\nimport { HelperService } from '@posiwise/helper-service';\n\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n\n/** The two cover pictures of the resource edit card: square and rectangular. */\n@Component({\n template: ''\n})\nexport abstract class ResourceEditCardImages extends AppBaseComponent {\n protected readonly modalService = inject(NgbModal);\n\n image = '';\n rectangularImage = '';\n file: File | null = null;\n rectangularFile: File | null = null;\n imageModalRef;\n\n openImageModal(modalTemplate): void {\n this.imageModalRef = this.modalService.open(modalTemplate, { centered: true, size: 'md' });\n }\n\n openRectModal(content) {\n this.imageModalRef = this.modalService.open(content, {\n centered: true,\n windowClass: 'modal-holder'\n });\n }\n\n onImageSelected(base64: string): void {\n this.image = base64;\n this.file = HelperService.convertBase64ToFile(base64);\n this.imageModalRef?.close();\n }\n\n onRectangularImageSelection(base64: string) {\n this.rectangularImage = base64;\n this.rectangularFile = HelperService.convertBase64ToFile(base64);\n this.imageModalRef?.close();\n }\n\n removeImage(): void {\n this.image = null;\n this.file = null;\n }\n\n deleteRectangularImage() {\n this.rectangularImage = null;\n this.rectangularFile = null;\n }\n\n handleImageError(event: Event, fallbackPath): void {\n HelperService.handleImageFallbackPath(event, fallbackPath);\n }\n}\n","import { FormBuilder, FormGroup } from '@angular/forms';\n\nimport moment from 'moment';\n\n/** The cover images as the edit card holds them: a new file, or the current URL, or nothing. */\nexport interface ResourceEditImages {\n file: File | null;\n image: string | null;\n rectangularFile: File | null;\n rectangularImage: string | null;\n}\n\nexport function resourceEditForm(fb: FormBuilder): FormGroup {\n return fb.group({\n title: [''],\n external_url: [''],\n cta_text: [''],\n when: [''],\n showcase: [false],\n published_at: [false],\n accepted_at: [false],\n body: ['']\n });\n}\n\n/** The form's values for a post, with blanks where the post has no value yet. */\nexport function resourceFormValue(resource) {\n return {\n title: resource.title ?? '',\n external_url: resource.external_url ?? '',\n cta_text: resource.cta_text ?? '',\n when: resource.when ? new Date(resource.when) : '',\n showcase: !!resource.showcase,\n published_at: !!resource.published_at,\n accepted_at: !!resource.accepted_at,\n body: resource.body\n };\n}\n\n/** The update payload: the form's values plus the cover-image changes and the toggled dates. */\nexport function buildResourcePayload(\n form: FormGroup,\n subscriptionId: number,\n images: ResourceEditImages\n) {\n const data = { ...form.value, subscription_id: subscriptionId };\n setFile(data, 'picture', images.file);\n setFile(data, 'rectangular_picture', images.rectangularFile);\n setToggledDate(form, data, 'published_at');\n setToggledDate(form, data, 'accepted_at');\n if (!form.get('when')?.value) {\n data.when = '';\n }\n if (!form.get('showcase')?.value) {\n data.showcase = '';\n }\n if (!images.file && !images.image) {\n data.remove_picture = true;\n }\n if (!images.rectangularFile && !images.rectangularImage) {\n data.remove_rectangular_picture = true;\n }\n return data;\n}\n\nfunction setFile(data, key: string, file: File | null): void {\n if (file) {\n data[key] = file;\n } else {\n delete data[key];\n }\n}\n\n/** A date sent only when its switch was touched: today when on, blank when off. */\nfunction setToggledDate(form: FormGroup, data, key: string): void {\n const control = form.get(key);\n if (control?.dirty) {\n data[key] = control.value ? moment().format('DD-MMM-YYYY') : '';\n } else {\n delete data[key];\n }\n}\n\n/** Tags whose name contains the query; all tags when the query is empty. */\nexport function filterTags<T extends { name: string }>(tags: T[], query: string): T[] {\n if (!query) {\n return [...tags];\n }\n const needle = query.toLowerCase();\n return tags.filter(tag => tag.name.toLowerCase().includes(needle));\n}\n\n/** The request that links the selected tags to the post. */\nexport function postTagsPayload(tags: { id: number }[], postId: number | string) {\n return {\n entity_tags: tags.map(tag => ({ tag_id: tag.id })),\n slug: postId,\n tag_entity: 'Post'\n };\n}\n","import { NgClass } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n EventEmitter,\n inject,\n Input,\n OnInit,\n Output\n} from '@angular/core';\nimport { FormBuilder, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { AuthService, TagService } from '@posiwise/common-services';\nimport { ButtonBusyDirective, LazyImgDirective } from '@posiwise/directives';\nimport { InputContainerComponent } from '@posiwise/shared-components';\nimport { ProfileImageCropperComponent } from '@posiwise/utils';\nimport { editorImageUpload, QuillHelper } from '@posiwise/utils/quill';\n\nimport { QuillEditorComponent } from 'ngx-quill';\nimport { UiSwitchModule } from 'ngx-ui-switch';\nimport { AutoComplete } from 'primeng/autocomplete';\nimport { Bind } from 'primeng/bind';\nimport { DatePicker } from 'primeng/datepicker';\n\nimport { TranslocoPipe } from '@jsverse/transloco';\n\nimport { ResourceService } from '../../../resource.service';\n\nimport { ResourceEditCardImages } from './resource-edit-card-images';\nimport {\n buildResourcePayload,\n filterTags,\n postTagsPayload,\n resourceEditForm,\n resourceFormValue\n} from './resource-edit-payload';\n\n@Component({\n selector: 'pw-resource-edit-card',\n templateUrl: './resource-edit-card.component.html',\n styleUrl: './resource-edit-card.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n FormsModule,\n ReactiveFormsModule,\n InputContainerComponent,\n QuillEditorComponent,\n NgClass,\n Bind,\n DatePicker,\n AutoComplete,\n UiSwitchModule,\n LazyImgDirective,\n ButtonBusyDirective,\n ProfileImageCropperComponent,\n TranslocoPipe\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceEditCardComponent extends ResourceEditCardImages implements OnInit {\n private readonly fb = inject(FormBuilder);\n private readonly resourceService = inject(ResourceService);\n private readonly authService = inject(AuthService);\n private readonly tagService = inject(TagService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n @Input() id!: number;\n @Input() resourceData;\n @Output() updated = new EventEmitter<void>();\n\n editForm: FormGroup;\n selectedTags = [];\n allTags = [];\n tagsSuggestion = [];\n subscriptionId: number;\n userLoggedIn: boolean;\n buttonBusy = false;\n // Uploads go to the subscription the post is saved under (#4272).\n editorConfig = QuillHelper.getEditorConfig(\n [],\n editorImageUpload(() => this.subscriptionId)\n );\n\n constructor() {\n super();\n QuillHelper.init();\n this.editForm = resourceEditForm(this.fb);\n }\n\n ngOnInit(): void {\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 }\n this.cdr.markForCheck();\n });\n }\n\n navigateToResourceEdit() {\n const basePath = `/admin/resources/${this.resourceData?.slug}`;\n const fullUrl = `${location.origin}${basePath}`;\n window.open(fullUrl, '_blank');\n }\n\n openModal(modalTemplate): void {\n if (this.resourceData) {\n this.editForm.setValue(resourceFormValue(this.resourceData));\n this.image = this.resourceData.picture?.url ?? '';\n this.selectedTags = this.resourceData?.tags?.length ? [...this.resourceData.tags] : [];\n this.rectangularImage = this.resourceData.rectangular_picture?.url ?? '';\n }\n this.modalService.open(modalTemplate, { centered: true, size: 'lg' });\n this.getPostTags();\n }\n\n search(event) {\n this.tagsSuggestion = filterTags(this.allTags, event.query);\n }\n\n private getPostTags() {\n this.tagService\n .getTagsByType('post_categories', {}, this.subscriptionId)\n .subscribe(response => {\n this.allTags = response.tags;\n this.cdr.markForCheck();\n });\n }\n\n saveResource(): void {\n this.buttonBusy = true;\n this.saveTags(this.id);\n const payload = buildResourcePayload(this.editForm, this.subscriptionId, this);\n\n this.resourceService.updatePost(payload, this.id).subscribe({\n next: () =>\n this.settleSave(() => {\n this.toast.success('Blog Post Updated');\n this.updated.emit();\n this.modalService.dismissAll();\n }),\n error: () => this.settleSave()\n });\n }\n\n // NG0100: Toastr + dismissAll can run CD in the same macrotask as clearing [buttonBusy].\n // Clear busy in one task; toast/emit/modal in the next so dev-mode \"verify\" sees a stable binding.\n private settleSave(afterSuccess?: () => void): void {\n setTimeout(() => {\n this.buttonBusy = false;\n this.cdr.markForCheck();\n if (afterSuccess) {\n setTimeout(() => {\n afterSuccess();\n this.cdr.markForCheck();\n }, 0);\n }\n }, 0);\n }\n\n private saveTags(id: number | string): void {\n if (this.selectedTags.length) {\n const data = postTagsPayload(this.selectedTags, id);\n this.tagService.addTags(data, this.subscriptionId).subscribe(() => {\n this.cdr.markForCheck();\n });\n }\n }\n}\n","<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-dark in-page-edit-icon d-flex justify-content-center mb-2\"\n (click)=\"openModal(editResourceModal)\"\n (keydown.enter)=\"openModal(editResourceModal)\"\n (keydown.space)=\"openModal(editResourceModal)\"\n title=\"Edit Resource\"></i>\n</div>\n\n<ng-template #editResourceModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Resource</h5>\n <i class=\"fa fa-edit cursor-pointer text-dark in-page-edit-icon d-flex justify-content-center ms-3\"\n (click)=\"navigateToResourceEdit()\"\n (keydown.enter)=\"navigateToResourceEdit()\"\n (keydown.space)=\"navigateToResourceEdit()\"\n title=\"Go to the main edit page\"></i>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"editForm\">\n <div class=\"row\">\n\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"\n aria-label=\"Title\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 row\">\n <pw-input-container label=\"CTA Text\" name=\"cta_text\" class=\"col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"cta_text\" id=\"input_cta_text_2\" name=\"input_cta_text_2\"\n aria-label=\"Cta Text\"/>\n </pw-input-container>\n\n <pw-input-container label=\"External URL\" name=\"external_url\" class=\"col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.ExternalUrl' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"external_url\" id=\"input_external_url_3\" name=\"input_external_url_3\"\n [attr.aria-label]=\"'Resource.Posts.Body' | transloco\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container\n [label]=\"'Resource.Posts.Body' | transloco\"\n name=\"body\"\n errorMsg=\"Resource.Posts.Validation.Body\">\n <quill-editor\n [styles]=\"{ height: '300px' }\"\n class=\"quillEditor\"\n [modules]=\"editorConfig\"\n formControlName=\"body\"\n [ngClass]=\"{\n 'w-100': true,\n 'quill-container': true,\n 'is-invalid': submitted && f['body'].errors\n }\">\n </quill-editor>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-3 col-sm-6\">\n <pw-input-container\n [label]=\"'Resource.Posts.When' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.When' | transloco\"\n name=\"when\">\n <p-datepicker inputId=\"resource-edit-card-when\" formControlName=\"when\"\n [ariaLabel]=\"'Resource.Posts.When' | transloco\"\n [showIcon]=\"true\"\n dateFormat=\"dd-M-yy\"\n [placeholder]=\"'Select Date'\"\n [ngClass]=\"{ 'is-invalid': submitted && f['when'].errors }\">\n </p-datepicker>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-8\">\n <pw-input-container\n [label]=\"'Resource.Posts.Tags' | transloco\"\n class=\"ui-fluid skills-modal tags\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\"\n name=\"cta_text\">\n <p-auto-complete appendTo=\"body\" [(ngModel)]=\"selectedTags\"\n [ariaLabel]=\"'Resource.Posts.Tags' | transloco\"\n class=\"body-bg w-100\"\n [suggestions]=\"tagsSuggestion\"\n dataKey=\"id\"\n optionLabel=\"name\"\n (completeMethod)=\"search($event)\"\n [minLength]=\"1\"\n [maxlength]=\"10\"\n [dropdown]=\"true\"\n [ngModelOptions]=\"{ standalone: true }\"\n placeholder=\"Tags\"\n [multiple]=\"true\">\n </p-auto-complete>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 row\">\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'SHOWCASE'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Mark as showcase post'\"\n name=\"showcase\">\n <ui-switch formControlName=\"showcase\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'PUBLISHED'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Set to publish the post'\"\n name=\"published_at\">\n <ui-switch formControlName=\"published_at\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'ACCEPTED BY ADMIN'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Indicates approval by admin'\"\n name=\"accepted_at\">\n <ui-switch formControlName=\"accepted_at\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4 col-sm-4 my-4 ms-3\">\n <div class=\"text-center mb-4\">\n <span id=\"resource-edit-cover-picture-label\" class=\"pw-label-style\">{{ 'Resource.Posts.CoverPicture' | transloco }}</span>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"(image && !image.includes('default-photo.jpg')) ? image : 'assets/img/resource/blog.png'\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Modal\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <button type=\"button\" class=\"btn btn-link p-0 d-inline-block\" (click)=\"openImageModal(imageCropContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </button>\n @if (image && !image.includes('default-photo.jpg')) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (click)=\"removeImage()\"\n (keydown.enter)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4 col-sm-4 my-4 ms-3\">\n <div class=\"text-center mb-4\">\n <span id=\"resource-edit-rectangular-picture-label\" class=\"pw-label-style\">Rectangular Picture</span>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"(rectangularImage && !rectangularImage.includes('default-photo.jpg')) ? rectangularImage : 'assets/img/resource/blog.png'\"\n (click)=\"openRectModal(rectContent)\"\n (keydown.enter)=\"openRectModal(rectContent)\"\n class=\"image w-100\"\n alt=\"Uploaded rectangular media preview\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <button type=\"button\" class=\"btn btn-link p-0 d-inline-block\" (click)=\"openRectModal(rectContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </button>\n @if (rectangularImage && !rectangularImage.includes('default-photo.jpg')) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (click)=\"deleteRectangularImage()\"\n (keydown.enter)=\"deleteRectangularImage()\"></i>\n }\n </div>\n </div>\n </div>\n </div>\n\n </div>\n </form>\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\" [buttonBusy]=\"buttonBusy\" (click)=\"saveResource()\">Save</button>\n </div>\n</ng-template>\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\" class=\"btn-close\" [attr.aria-label]=\"'Common.Close' | transloco\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)</small>\n <pw-image-cropper\n [aspectRatio]=\"'dynamic'\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"modal.close()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n\n<ng-template #rectContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)</small>\n <pw-image-cropper\n #profile\n [aspectRatio]=\"'dynamic'\"\n (imageSelectionEvent)=\"onRectangularImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n","import { CommonModule } from '@angular/common';\nimport { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { CoreTranslocoModule } from '@posiwise/core-transloco';\nimport { DirectivesModule } from '@posiwise/directives';\nimport { ResourceSharedComponentsModule } from '@posiwise/shared-components';\n\nimport { QuillModule } from 'ngx-quill';\nimport { UiSwitchModule } from 'ngx-ui-switch';\nimport { AutoCompleteModule } from 'primeng/autocomplete';\nimport { DatePickerModule } from 'primeng/datepicker';\n\nimport { TranslocoModule } from '@jsverse/transloco';\n\nimport { ResourceEditCardComponent } from '../components/resource-edit-card/resource-edit-card.component';\n\n/**\n * Lazy-loadable module for ResourceEditCard\n * Contains heavy dependencies (Quill, Calendar, etc.) that are only needed for admins\n * This module is dynamically imported when edit button is clicked\n */\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n DatePickerModule,\n AutoCompleteModule,\n ResourceSharedComponentsModule,\n CoreTranslocoModule,\n TranslocoModule,\n DirectivesModule,\n QuillModule.forRoot(),\n UiSwitchModule,\n ResourceEditCardComponent\n ],\n exports: [ResourceEditCardComponent],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class ResourceEditModule {}\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output\n} from '@angular/core';\n\nimport { Resource } from '@posiwise/common-utilities';\nimport { LazyImgDirective } from '@posiwise/directives';\nimport { NoDataComponent } from '@posiwise/shared-components';\n\nimport { TranslocoPipe } from '@jsverse/transloco';\n\nimport { ResourceEditCardLazyComponent } from '../resource-edit-card-lazy/resource-edit-card-lazy.component';\n\n@Component({\n selector: 'pw-testimonial-card',\n templateUrl: './testimonial-card.component.html',\n styleUrls: [\n './testimonial-card.component.scss',\n '../resource-post/related-resources/related-resources.component.scss'\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NoDataComponent, ResourceEditCardLazyComponent, LazyImgDirective, TranslocoPipe]\n})\nexport class TestimonialCardListComponent implements OnChanges {\n @Output() editPost: EventEmitter<object> = new EventEmitter();\n\n @Input() posts: Resource[] = [];\n @Input() postHeader = '';\n @Input() canEdit = false;\n swiper;\n\n ngOnChanges(changes): void {\n if (changes.posts && this.posts?.length) {\n setTimeout(() => this.initSwiper(), 0); // Wait for DOM to render\n }\n }\n\n private async initSwiper() {\n // Dynamically import Swiper only when needed (lazy-load ~150KB library)\n const { default: Swiper } = await import('swiper');\n const { Navigation, Pagination } = await import('swiper/modules');\n\n this.swiper = new Swiper('.swiper-container', {\n modules: [Navigation, Pagination],\n slidesPerView: 1,\n spaceBetween: 24,\n centeredSlides: true,\n touchRatio: 1,\n touchAngle: 45,\n grabCursor: true,\n navigation: {\n nextEl: '.swiper-button-next',\n prevEl: '.swiper-button-prev'\n },\n pagination: {\n el: '.swiper-pagination',\n clickable: true\n },\n breakpoints: {\n 425: {\n slidesPerView: 1.05,\n centeredSlides: true\n },\n 470: {\n slidesPerView: 1.25,\n centeredSlides: true\n },\n 564: {\n slidesPerView: 1.5,\n centeredSlides: true\n },\n 640: {\n slidesPerView: 1.5,\n centeredSlides: true\n },\n 768: {\n slidesPerView: 1.5,\n centeredSlides: true\n },\n 1024: {\n slidesPerView: 2, // Allow room between cards\n centeredSlides: false\n },\n 1200: {\n slidesPerView: 3,\n centeredSlides: false\n }\n }\n });\n }\n}\n","<section class=\"resource-section section-outer bg-white\">\n <div class=\"container\">\n @if (postHeader) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap mb-3\">\n <h2 class=\"section-heading\">{{postHeader}}</h2>\n </div>\n }\n @if (posts.length === 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n <div [hidden]=\"posts.length === 0\">\n <div class=\"swiper-container\">\n <div class=\"swiper-wrapper\">\n @for (post of posts; track post) {\n <div class=\"swiper-slide\">\n <div class=\"testimonial-box\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEdit\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"editPost.emit(1, 100)\">\n </pw-resource-edit-card-lazy>\n <div class=\"stars mb-5\">★★★★★</div>\n <div class=\"testimonial-content\">\n <div class=\"ql-container ql-snow ql-res\">\n <div class=\"ql-editor\"\n [innerHTML]=\"post?.body\">\n </div>\n </div>\n </div>\n <!-- THIS STAYS AT BOTTOM -->\n <div class=\"avatar-container\">\n @if (!post.rectangular_picture.url.includes('default-photo.jpg') ) {\n <img\n [src]=\"post.rectangular_picture.url\"\n alt=\"Logo\"\n class=\"testimonial-logo mt-4\"\n />\n }\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"swiper-pagination\"></div>\n <div class=\"swiper-button-prev\"></div>\n <div class=\"swiper-button-next\"></div>\n </div>\n </div>\n </div>\n</section>"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,SAAiB;CACnB;EACI,MAAM;EACN,WAAW;EACX,oBACI,OAAO,+DAAsC,CAAC,MAAK,MAAK,EAAE,kBAAkB;CACnF;CACD;EACI,MAAM;EACN,oBACI,OAAO,8DAAoC,CAAC,MAAK,MAAK,EAAE,iBAAiB;CAChF;CACD;EACI,MAAM;EACN,oBACI,OAAO,gEAAwC,CAAC,MAAK,MAAK,EAAE,mBAAmB;CACtF;CACD;EACI,MAAM;EACN,oBACI,OAAO,iEAA0C,CAAC,MAAK,MAAK,EAAE,oBAAoB;CACzF;CACD;EACI,MAAM;EACN,oBACI,OAAO,uEAAsD,CAAC,MAC1D,MAAK,EAAE,0BAA0B;CAE5C;CACD;EACI,MAAM;EACN,oBACI,OAAO,wEAAwD,CAAC,MAC5D,MAAK,EAAE,0BAA0B;CAE5C;CACD;EACI,MAAM;EACN,oBACI,OAAO,iEAA0C,CAAC,MAAK,MAAK,EAAE,oBAAoB;CACzF;CACD;EACI,MAAM;EACN,oBACI,OAAO,uEAAsD,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AA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAA4B,cAAA;GAAA,UAAA;GAAA,QAAA;IAAA,OAAA;IAAA,YAAA;IAAA,SAAA;GAAA;GAAA,SAAA,EAAA,UAAA,WAAA;GAAA,eAAA;GAAA,UAAA;GAAA,UC3BzC;GAoDU,QAAA,CAAA,+jEAAA,sjFAAA;GAAA,cAAA;IAAA;KAAA,MAAA;KAAA,MD3BI;KAAe,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;KAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAA6B,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;KAAA;KAAA,SAAA,CAAA,SAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAgB,UAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAa,MAAA;IAAA;GAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAEhF,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA4B,YAAA,CAAA;EAVxC,MAAA;EACa,MAAA,CAAA;GAAA,UAAA;GAAqB,iBAMd,wBAAwB;GAAM,SACtC;IAAC;IAAiB;IAA+B;IAAkB;GAAa;GAAC,UAAA;GAAA,QAAA,CAAA,+jEAAA,sjFAAA;EAAA,CAAA;;;EAGzF,UAAA,CAAA,EAAA,MAAA,OAAA,CAAA;EAEA,OAAA,CAAA,EAAA,MAAA,MAAA,CAAA;EACA,YAAA,CAAA,EAAA,MAAA,MAAA,CAAA;EACA,SAAA,CAAA,EAAA,MAAA,MAAA,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posiwise/resource-module",
3
- "version": "0.0.204",
3
+ "version": "0.0.205",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.2.0",
6
6
  "@angular/core": "^22.2.0",
@@ -29,6 +29,7 @@ import * as i3 from "primeng/datepicker";
29
29
  import * as i4 from "primeng/autocomplete";
30
30
  import * as i9 from "ngx-quill";
31
31
  import * as i10 from "ngx-ui-switch";
32
+ import { NgbModal } from "@ng-bootstrap/ng-bootstrap";
32
33
  declare namespace resource_public_routing_module_d_exports {
33
34
  export { BlogPublicRoutingModule };
34
35
  }
@@ -840,12 +841,29 @@ export declare class ResourceSharedModule {
840
841
  static ɵmod: i0.ɵɵNgModuleDeclaration<ResourceSharedModule, never, [typeof i1.CommonModule, typeof i1$2.RouterModule, typeof i3$1.FormsModule, typeof i3$1.ReactiveFormsModule, typeof i4$1.PipesModule, typeof i7.ResourceSharedComponentsModule, typeof i8.CoreTranslocoModule, typeof i9$2.TranslocoModule, typeof i10$2.DirectivesModule, typeof i9$1.InputTextModule, typeof i10$1.IconFieldModule, typeof i11.InputIconModule, typeof i12.TextareaModule, typeof ResourceCardsModule, typeof i14.HubSpotMeetingsSharedModule, typeof ResourceCompanyCardComponent, typeof ResourceTopBannerEditComponent], [typeof ResourceCompanyCardComponent, typeof ResourceTopBannerEditComponent, typeof ResourceCardsModule, typeof i14.HubSpotMeetingsSharedModule, typeof i1.CommonModule, typeof i1$2.RouterModule, typeof i3$1.FormsModule, typeof i3$1.ReactiveFormsModule, typeof i4$1.PipesModule, typeof i7.ResourceSharedComponentsModule, typeof i8.CoreTranslocoModule, typeof i9$2.TranslocoModule, typeof i10$2.DirectivesModule, typeof i9$1.InputTextModule, typeof i10$1.IconFieldModule, typeof i11.InputIconModule, typeof i12.TextareaModule]>;
841
842
  static ɵinj: i0.ɵɵInjectorDeclaration<ResourceSharedModule>;
842
843
  }
844
+ /** The two cover pictures of the resource edit card: square and rectangular. */
845
+ declare abstract class ResourceEditCardImages extends AppBaseComponent {
846
+ protected readonly modalService: NgbModal;
847
+ image: string;
848
+ rectangularImage: string;
849
+ file: File | null;
850
+ rectangularFile: File | null;
851
+ imageModalRef: any;
852
+ openImageModal(modalTemplate: any): void;
853
+ openRectModal(content: any): void;
854
+ onImageSelected(base64: string): void;
855
+ onRectangularImageSelection(base64: string): void;
856
+ removeImage(): void;
857
+ deleteRectangularImage(): void;
858
+ handleImageError(event: Event, fallbackPath: any): void;
859
+ static ɵfac: i0.ɵɵFactoryDeclaration<ResourceEditCardImages, never>;
860
+ static ɵcmp: i0.ɵɵComponentDeclaration<ResourceEditCardImages, "ng-component", never, {}, {}, never, never, true, never>;
861
+ }
843
862
  declare namespace resource_edit_card_component_d_exports {
844
863
  export { ResourceEditCardComponent };
845
864
  }
846
- export declare class ResourceEditCardComponent extends AppBaseComponent implements OnInit {
865
+ export declare class ResourceEditCardComponent extends ResourceEditCardImages implements OnInit {
847
866
  private readonly fb;
848
- private readonly modalService;
849
867
  private readonly resourceService;
850
868
  private readonly authService;
851
869
  private readonly tagService;
@@ -854,38 +872,66 @@ export declare class ResourceEditCardComponent extends AppBaseComponent implemen
854
872
  resourceData: any;
855
873
  updated: EventEmitter<void>;
856
874
  editForm: FormGroup;
857
- image: string;
858
- rectangularImage: string;
859
- file: File | null;
860
- rectangularFile: File | null;
861
- imageModalRef: any;
862
875
  selectedTags: any[];
863
876
  allTags: any[];
864
877
  tagsSuggestion: any[];
865
878
  subscriptionId: number;
866
879
  userLoggedIn: boolean;
867
880
  buttonBusy: boolean;
881
+ editorConfig: {
882
+ uploader: {
883
+ mimetypes: string[];
884
+ handler(this: {
885
+ quill: Pick<import("quill").default, "insertEmbed" | "insertText" | "deleteText" | "getContents" | "setSelection" | "getSelection"> & import("@posiwise/utils/quill").IndicatorQuill & {
886
+ getModule?: (name: string) => unknown;
887
+ };
888
+ }, range: {
889
+ index: number;
890
+ }, files: File[]): void;
891
+ };
892
+ imageDropHint: {
893
+ label: () => string;
894
+ };
895
+ imageLinkImport: {
896
+ importUrl: (url: string) => Promise<string>;
897
+ busyLabel: () => string;
898
+ };
899
+ pasteGuard: {
900
+ allowImageFiles: boolean;
901
+ };
902
+ toolbar: {
903
+ container: any[];
904
+ handlers: {
905
+ image: () => void;
906
+ video: () => void;
907
+ };
908
+ };
909
+ imageResize: {
910
+ displaySize: boolean;
911
+ };
912
+ } | {
913
+ noDragDrop: boolean;
914
+ pasteGuard: boolean;
915
+ toolbar: {
916
+ container: any[];
917
+ handlers: {
918
+ image: () => void;
919
+ video: () => void;
920
+ };
921
+ };
922
+ imageResize: {
923
+ displaySize: boolean;
924
+ };
925
+ };
868
926
  constructor();
869
927
  ngOnInit(): void;
870
928
  navigateToResourceEdit(): void;
871
929
  openModal(modalTemplate: any): void;
872
930
  search(event: any): void;
873
931
  private getPostTags;
874
- deleteRectangularImage(): void;
875
- openImageModal(modalTemplate: any): void;
876
- onImageSelected(base64: string): void;
877
- onRectangularImageSelection(base64: string): void;
878
- removeImage(): void;
879
932
  saveResource(): void;
933
+ private settleSave;
880
934
  private saveTags;
881
- private handlePicture;
882
- private handlePublishedAt;
883
- private handleAcceptedAt;
884
- private handleOptionalFields;
885
- private handleRectangularPicture;
886
- private handleRemovals;
887
- openRectModal(content: any): void;
888
- handleImageError(event: Event, fallbackPath: any): void;
889
935
  static ɵfac: i0.ɵɵFactoryDeclaration<ResourceEditCardComponent, never>;
890
936
  static ɵcmp: i0.ɵɵComponentDeclaration<ResourceEditCardComponent, "pw-resource-edit-card", never, {
891
937
  "id": {