@posiwise/resource-module 0.0.204 → 0.0.206

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/fesm2022/{posiwise-resource-module-resource-blogs.module-C_sTQ0w2.mjs → posiwise-resource-module-resource-blogs.module-DEXimOOY.mjs} +2 -2
  2. package/fesm2022/{posiwise-resource-module-resource-blogs.module-C_sTQ0w2.mjs.map → posiwise-resource-module-resource-blogs.module-DEXimOOY.mjs.map} +1 -1
  3. package/fesm2022/{posiwise-resource-module-resource-cards.module-BSJpkk9V.mjs → posiwise-resource-module-resource-cards.module-DWV2LWdy.mjs} +2 -2
  4. package/fesm2022/{posiwise-resource-module-resource-cards.module-BSJpkk9V.mjs.map → posiwise-resource-module-resource-cards.module-DWV2LWdy.mjs.map} +1 -1
  5. package/fesm2022/{posiwise-resource-module-resource-case-studies.module-D1hCU5_H.mjs → posiwise-resource-module-resource-case-studies.module-CQHAhbsv.mjs} +2 -2
  6. package/fesm2022/{posiwise-resource-module-resource-case-studies.module-D1hCU5_H.mjs.map → posiwise-resource-module-resource-case-studies.module-CQHAhbsv.mjs.map} +1 -1
  7. package/fesm2022/posiwise-resource-module-resource-edit-card.component-2VvTki2u.mjs +632 -0
  8. package/fesm2022/posiwise-resource-module-resource-edit-card.component-2VvTki2u.mjs.map +1 -0
  9. package/fesm2022/{posiwise-resource-module-resource-events.module-D7yC0Sqt.mjs → posiwise-resource-module-resource-events.module-D8mxidoP.mjs} +2 -2
  10. package/fesm2022/{posiwise-resource-module-resource-events.module-D7yC0Sqt.mjs.map → posiwise-resource-module-resource-events.module-D8mxidoP.mjs.map} +1 -1
  11. package/fesm2022/{posiwise-resource-module-resource-hub.module-alVvQLvR.mjs → posiwise-resource-module-resource-hub.module-DklN3KeA.mjs} +2 -2
  12. package/fesm2022/{posiwise-resource-module-resource-hub.module-alVvQLvR.mjs.map → posiwise-resource-module-resource-hub.module-DklN3KeA.mjs.map} +1 -1
  13. package/fesm2022/{posiwise-resource-module-resource-integrations.module-G4XvMMYf.mjs → posiwise-resource-module-resource-integrations.module-iTlhrAYt.mjs} +7 -4
  14. package/fesm2022/{posiwise-resource-module-resource-integrations.module-G4XvMMYf.mjs.map → posiwise-resource-module-resource-integrations.module-iTlhrAYt.mjs.map} +1 -1
  15. package/fesm2022/{posiwise-resource-module-resource-jobs.module-DOdaBrZi.mjs → posiwise-resource-module-resource-jobs.module-DpTqKqS9.mjs} +2 -2
  16. package/fesm2022/{posiwise-resource-module-resource-jobs.module-DOdaBrZi.mjs.map → posiwise-resource-module-resource-jobs.module-DpTqKqS9.mjs.map} +1 -1
  17. package/fesm2022/{posiwise-resource-module-resource-post.module-CGxj27dN.mjs → posiwise-resource-module-resource-post.module-PU-KBg_G.mjs} +2 -2
  18. package/fesm2022/{posiwise-resource-module-resource-post.module-CGxj27dN.mjs.map → posiwise-resource-module-resource-post.module-PU-KBg_G.mjs.map} +1 -1
  19. package/fesm2022/{posiwise-resource-module-resource-release-notes.module-CLry1QNC.mjs → posiwise-resource-module-resource-release-notes.module-WESwTVu8.mjs} +7 -4
  20. package/fesm2022/{posiwise-resource-module-resource-release-notes.module-CLry1QNC.mjs.map → posiwise-resource-module-resource-release-notes.module-WESwTVu8.mjs.map} +1 -1
  21. package/fesm2022/{posiwise-resource-module-resource-root.module-x4TYntdq.mjs → posiwise-resource-module-resource-root.module-TMvR1c1H.mjs} +11 -8
  22. package/fesm2022/{posiwise-resource-module-resource-root.module-x4TYntdq.mjs.map → posiwise-resource-module-resource-root.module-TMvR1c1H.mjs.map} +1 -1
  23. package/fesm2022/{posiwise-resource-module-resource-videos.module-2ugtK7wA.mjs → posiwise-resource-module-resource-videos.module-BCDet6S9.mjs} +2 -2
  24. package/fesm2022/{posiwise-resource-module-resource-videos.module-2ugtK7wA.mjs.map → posiwise-resource-module-resource-videos.module-BCDet6S9.mjs.map} +1 -1
  25. package/fesm2022/{posiwise-resource-module-resource-white-papers.module-pn6rtDc3.mjs → posiwise-resource-module-resource-white-papers.module-DtxUgC_Z.mjs} +2 -2
  26. package/fesm2022/{posiwise-resource-module-resource-white-papers.module-pn6rtDc3.mjs.map → posiwise-resource-module-resource-white-papers.module-DtxUgC_Z.mjs.map} +1 -1
  27. package/fesm2022/posiwise-resource-module.mjs +23 -698
  28. package/fesm2022/posiwise-resource-module.mjs.map +1 -1
  29. package/package.json +1 -1
  30. package/types/posiwise-resource-module.d.ts +8 -82
@@ -1,13 +1,13 @@
1
1
  import { t as ResourceService } from "./posiwise-resource-module-resource.service-DAXsq-WG.mjs";
2
- import { a as ResourceCardComponent, c as ResourceNoteCardComponent, d as Trial4ContactUsModule, n as UpcomingEventCardComponent, o as CaseStudyCardComponent, r as ResourceVaultComponent, s as ResourceVideoCardComponent, t as ResourceCardsModule, u as ResourceEditCardLazyComponent } from "./posiwise-resource-module-resource-cards.module-BSJpkk9V.mjs";
2
+ import { a as ResourceCardComponent, c as ResourceNoteCardComponent, d as Trial4ContactUsModule, n as UpcomingEventCardComponent, o as CaseStudyCardComponent, r as ResourceVaultComponent, s as ResourceVideoCardComponent, t as ResourceCardsModule, u as ResourceEditCardLazyComponent } from "./posiwise-resource-module-resource-cards.module-DWV2LWdy.mjs";
3
3
  import * as i0 from "@angular/core";
4
4
  import { CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, NgModule, Output, ViewChild, inject } from "@angular/core";
5
- import { AuthService, TagService } from "@posiwise/common-services";
5
+ import { TagService } from "@posiwise/common-services";
6
6
  import { HelperService } from "@posiwise/helper-service";
7
- import * as i1$2 from "@angular/router";
7
+ import * as i1$1 from "@angular/router";
8
8
  import { RouterModule } from "@angular/router";
9
9
  import { CommonModule, NgClass, NgTemplateOutlet, SlicePipe } from "@angular/common";
10
- import * as i1$1 from "@angular/forms";
10
+ import * as i1 from "@angular/forms";
11
11
  import { FormBuilder, FormsModule, ReactiveFormsModule } from "@angular/forms";
12
12
  import { HubSpotMeetingsSharedModule } from "@posiwise/alpha-module";
13
13
  import { CoreTranslocoModule } from "@posiwise/core-transloco";
@@ -25,68 +25,51 @@ import { Paginator } from "primeng/paginator";
25
25
  import { Subject } from "rxjs";
26
26
  import { ProfileImageCropperComponent } from "@posiwise/utils";
27
27
  import { NgbModal } from "@ng-bootstrap/ng-bootstrap";
28
- import * as i1 from "ngx-quill";
29
- import { QuillEditorComponent, QuillModule } from "ngx-quill";
30
- import * as i2 from "ngx-ui-switch";
31
- import { UiSwitchModule } from "ngx-ui-switch";
32
- import { AutoComplete, AutoCompleteModule } from "primeng/autocomplete";
33
- import { DatePicker, DatePickerModule } from "primeng/datepicker";
34
- import moment from "moment";
35
- var __defProp = Object.defineProperty;
36
- var __exportAll = (all, no_symbols) => {
37
- let target = {};
38
- for (var name in all) __defProp(target, name, {
39
- get: all[name],
40
- enumerable: true
41
- });
42
- if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
43
- return target;
44
- };
45
28
  const routes = [
46
29
  {
47
30
  path: "",
48
31
  pathMatch: "full",
49
- loadChildren: () => import("./posiwise-resource-module-resource-root.module-x4TYntdq.mjs").then((m) => m.ResourceRootModule)
32
+ loadChildren: () => import("./posiwise-resource-module-resource-root.module-TMvR1c1H.mjs").then((m) => m.ResourceRootModule)
50
33
  },
51
34
  {
52
35
  path: "hub",
53
- loadChildren: () => import("./posiwise-resource-module-resource-hub.module-alVvQLvR.mjs").then((m) => m.ResourceHubModule)
36
+ loadChildren: () => import("./posiwise-resource-module-resource-hub.module-DklN3KeA.mjs").then((m) => m.ResourceHubModule)
54
37
  },
55
38
  {
56
39
  path: "blogs",
57
- loadChildren: () => import("./posiwise-resource-module-resource-blogs.module-C_sTQ0w2.mjs").then((m) => m.ResourceBlogsModule)
40
+ loadChildren: () => import("./posiwise-resource-module-resource-blogs.module-DEXimOOY.mjs").then((m) => m.ResourceBlogsModule)
58
41
  },
59
42
  {
60
43
  path: "videos",
61
- loadChildren: () => import("./posiwise-resource-module-resource-videos.module-2ugtK7wA.mjs").then((m) => m.ResourceVideosModule)
44
+ loadChildren: () => import("./posiwise-resource-module-resource-videos.module-BCDet6S9.mjs").then((m) => m.ResourceVideosModule)
62
45
  },
63
46
  {
64
47
  path: "integrations",
65
- loadChildren: () => import("./posiwise-resource-module-resource-integrations.module-G4XvMMYf.mjs").then((m) => m.ResourceIntegrationsModule)
48
+ loadChildren: () => import("./posiwise-resource-module-resource-integrations.module-iTlhrAYt.mjs").then((m) => m.ResourceIntegrationsModule)
66
49
  },
67
50
  {
68
51
  path: "release-notes",
69
- loadChildren: () => import("./posiwise-resource-module-resource-release-notes.module-CLry1QNC.mjs").then((m) => m.ResourceReleaseNotesModule)
52
+ loadChildren: () => import("./posiwise-resource-module-resource-release-notes.module-WESwTVu8.mjs").then((m) => m.ResourceReleaseNotesModule)
70
53
  },
71
54
  {
72
55
  path: "events",
73
- loadChildren: () => import("./posiwise-resource-module-resource-events.module-D7yC0Sqt.mjs").then((m) => m.ResourceEventsModule)
56
+ loadChildren: () => import("./posiwise-resource-module-resource-events.module-D8mxidoP.mjs").then((m) => m.ResourceEventsModule)
74
57
  },
75
58
  {
76
59
  path: "white-papers",
77
- loadChildren: () => import("./posiwise-resource-module-resource-white-papers.module-pn6rtDc3.mjs").then((m) => m.ResourceWhitePapersModule)
60
+ loadChildren: () => import("./posiwise-resource-module-resource-white-papers.module-DtxUgC_Z.mjs").then((m) => m.ResourceWhitePapersModule)
78
61
  },
79
62
  {
80
63
  path: "case-studies",
81
- loadChildren: () => import("./posiwise-resource-module-resource-case-studies.module-D1hCU5_H.mjs").then((m) => m.ResourceCaseStudiesModule)
64
+ loadChildren: () => import("./posiwise-resource-module-resource-case-studies.module-CQHAhbsv.mjs").then((m) => m.ResourceCaseStudiesModule)
82
65
  },
83
66
  {
84
67
  path: "careers",
85
- loadChildren: () => import("./posiwise-resource-module-resource-jobs.module-DOdaBrZi.mjs").then((m) => m.ResourceJobsModule)
68
+ loadChildren: () => import("./posiwise-resource-module-resource-jobs.module-DpTqKqS9.mjs").then((m) => m.ResourceJobsModule)
86
69
  },
87
70
  {
88
71
  path: "view/:slug",
89
- loadChildren: () => import("./posiwise-resource-module-resource-post.module-CGxj27dN.mjs").then((m) => m.ResourcePostModule)
72
+ loadChildren: () => import("./posiwise-resource-module-resource-post.module-PU-KBg_G.mjs").then((m) => m.ResourcePostModule)
90
73
  }
91
74
  ];
92
75
  var BlogPublicRoutingModule = class BlogPublicRoutingModule {
@@ -106,7 +89,7 @@ var BlogPublicRoutingModule = class BlogPublicRoutingModule {
106
89
  version: "22.2.3",
107
90
  ngImport: i0,
108
91
  type: BlogPublicRoutingModule,
109
- imports: [i1$2.RouterModule],
92
+ imports: [i1$1.RouterModule],
110
93
  exports: [RouterModule]
111
94
  });
112
95
  }
@@ -543,22 +526,22 @@ var ResourceTopBannerEditComponent = class ResourceTopBannerEditComponent extend
543
526
  },
544
527
  {
545
528
  kind: "directive",
546
- type: i1$1.ɵNgNoValidate,
529
+ type: i1.ɵNgNoValidate,
547
530
  selector: "form:not([ngNoForm]):not([ngNativeValidate])"
548
531
  },
549
532
  {
550
533
  kind: "directive",
551
- type: i1$1.DefaultValueAccessor,
534
+ type: i1.DefaultValueAccessor,
552
535
  selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
553
536
  },
554
537
  {
555
538
  kind: "directive",
556
- type: i1$1.NgControlStatus,
539
+ type: i1.NgControlStatus,
557
540
  selector: "[formControlName],[ngModel],[formControl]"
558
541
  },
559
542
  {
560
543
  kind: "directive",
561
- type: i1$1.NgControlStatusGroup,
544
+ type: i1.NgControlStatusGroup,
562
545
  selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
563
546
  },
564
547
  {
@@ -567,7 +550,7 @@ var ResourceTopBannerEditComponent = class ResourceTopBannerEditComponent extend
567
550
  },
568
551
  {
569
552
  kind: "directive",
570
- type: i1$1.FormGroupDirective,
553
+ type: i1.FormGroupDirective,
571
554
  selector: "[formGroup]",
572
555
  inputs: ["formGroup"],
573
556
  outputs: ["ngSubmit"],
@@ -575,7 +558,7 @@ var ResourceTopBannerEditComponent = class ResourceTopBannerEditComponent extend
575
558
  },
576
559
  {
577
560
  kind: "directive",
578
- type: i1$1.FormControlName,
561
+ type: i1.FormControlName,
579
562
  selector: "[formControlName]",
580
563
  inputs: [
581
564
  "formControlName",
@@ -821,664 +804,6 @@ i0.ɵɵngDeclareClassMetadata({
821
804
  }]
822
805
  }]
823
806
  });
824
- var resource_edit_card_component_exports = /* @__PURE__ */ __exportAll({ ResourceEditCardComponent: () => ResourceEditCardComponent });
825
- var ResourceEditCardComponent = class ResourceEditCardComponent extends AppBaseComponent {
826
- constructor() {
827
- super();
828
- this.fb = inject(FormBuilder);
829
- this.modalService = inject(NgbModal);
830
- this.resourceService = inject(ResourceService);
831
- this.authService = inject(AuthService);
832
- this.tagService = inject(TagService);
833
- this.cdr = inject(ChangeDetectorRef);
834
- this.updated = new EventEmitter();
835
- this.image = "";
836
- this.rectangularImage = "";
837
- this.file = null;
838
- this.rectangularFile = null;
839
- this.selectedTags = [];
840
- this.allTags = [];
841
- this.tagsSuggestion = [];
842
- 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
- });
853
- }
854
- ngOnInit() {
855
- this.authService.getToken$().subscribe((res) => {
856
- this.userLoggedIn = !!res;
857
- if (this.userLoggedIn) this.localStorage.getItem$("product").subscribe((res) => {
858
- const data = res ? JSON.parse(res) : null;
859
- this.subscriptionId = data?.subscriptionId;
860
- this.cdr.markForCheck();
861
- });
862
- this.cdr.markForCheck();
863
- });
864
- }
865
- navigateToResourceEdit() {
866
- const basePath = `/admin/resources/${this.resourceData?.slug}`;
867
- const fullUrl = `${location.origin}${basePath}`;
868
- window.open(fullUrl, "_blank");
869
- }
870
- openModal(modalTemplate) {
871
- 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
- });
883
- this.image = this.resourceData.picture?.url ?? "";
884
- this.selectedTags = this.resourceData?.tags?.length ? [...this.resourceData.tags] : [];
885
- this.rectangularImage = this.resourceData.rectangular_picture?.url ?? "";
886
- }
887
- this.modalService.open(modalTemplate, {
888
- centered: true,
889
- size: "lg"
890
- });
891
- this.getPostTags();
892
- }
893
- 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;
900
- }
901
- getPostTags() {
902
- this.tagService.getTagsByType("post_categories", {}, this.subscriptionId).subscribe((response) => {
903
- this.allTags = response.tags;
904
- this.cdr.markForCheck();
905
- });
906
- }
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
- saveResource() {
932
- this.buttonBusy = true;
933
- 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);
945
- 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
- }
964
- });
965
- }
966
- saveTags(id) {
967
- 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
- };
973
- this.tagService.addTags(data, this.subscriptionId).subscribe(() => {
974
- this.cdr.markForCheck();
975
- });
976
- }
977
- }
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
- static {
1014
- this.ɵfac = i0.ɵɵngDeclareFactory({
1015
- minVersion: "12.0.0",
1016
- version: "22.2.3",
1017
- ngImport: i0,
1018
- type: ResourceEditCardComponent,
1019
- deps: [],
1020
- target: i0.ɵɵFactoryTarget.Component
1021
- });
1022
- }
1023
- static {
1024
- this.ɵcmp = i0.ɵɵngDeclareComponent({
1025
- minVersion: "17.0.0",
1026
- version: "22.2.3",
1027
- type: ResourceEditCardComponent,
1028
- isStandalone: true,
1029
- selector: "pw-resource-edit-card",
1030
- inputs: {
1031
- id: "id",
1032
- resourceData: "resourceData"
1033
- },
1034
- outputs: { updated: "updated" },
1035
- usesInheritance: true,
1036
- ngImport: i0,
1037
- template: "<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",
1038
- styles: ["::ng-deep .modal-content{margin-top:5rem!important}\n"],
1039
- dependencies: [
1040
- {
1041
- kind: "ngmodule",
1042
- type: FormsModule
1043
- },
1044
- {
1045
- kind: "directive",
1046
- type: i1$1.ɵNgNoValidate,
1047
- selector: "form:not([ngNoForm]):not([ngNativeValidate])"
1048
- },
1049
- {
1050
- kind: "directive",
1051
- type: i1$1.DefaultValueAccessor,
1052
- selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
1053
- },
1054
- {
1055
- kind: "directive",
1056
- type: i1$1.NgControlStatus,
1057
- selector: "[formControlName],[ngModel],[formControl]"
1058
- },
1059
- {
1060
- kind: "directive",
1061
- type: i1$1.NgControlStatusGroup,
1062
- selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
1063
- },
1064
- {
1065
- kind: "directive",
1066
- type: i1$1.MaxLengthValidator,
1067
- selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",
1068
- inputs: ["maxlength"]
1069
- },
1070
- {
1071
- kind: "directive",
1072
- type: i1$1.NgModel,
1073
- selector: "[ngModel]:not([formControlName]):not([formControl])",
1074
- inputs: [
1075
- "name",
1076
- "disabled",
1077
- "ngModel",
1078
- "ngModelOptions"
1079
- ],
1080
- outputs: ["ngModelChange"],
1081
- exportAs: ["ngModel"]
1082
- },
1083
- {
1084
- kind: "ngmodule",
1085
- type: ReactiveFormsModule
1086
- },
1087
- {
1088
- kind: "directive",
1089
- type: i1$1.FormGroupDirective,
1090
- selector: "[formGroup]",
1091
- inputs: ["formGroup"],
1092
- outputs: ["ngSubmit"],
1093
- exportAs: ["ngForm"]
1094
- },
1095
- {
1096
- kind: "directive",
1097
- type: i1$1.FormControlName,
1098
- selector: "[formControlName]",
1099
- inputs: [
1100
- "formControlName",
1101
- "disabled",
1102
- "ngModel"
1103
- ],
1104
- outputs: ["ngModelChange"]
1105
- },
1106
- {
1107
- kind: "component",
1108
- type: InputContainerComponent,
1109
- selector: "pw-input-container",
1110
- inputs: [
1111
- "name",
1112
- "controlId",
1113
- "useAriaLabelledbyOnly",
1114
- "label",
1115
- "labelClass",
1116
- "tooltipPosition",
1117
- "required",
1118
- "errorMsg",
1119
- "isReadOnly",
1120
- "showTooltip",
1121
- "tooltipText",
1122
- "showTriangle",
1123
- "afterLabel",
1124
- "showAfterLabel",
1125
- "showTriangleText",
1126
- "isLeftTooltip"
1127
- ]
1128
- },
1129
- {
1130
- kind: "component",
1131
- type: QuillEditorComponent,
1132
- selector: "quill-editor"
1133
- },
1134
- {
1135
- kind: "directive",
1136
- type: NgClass,
1137
- selector: "[ngClass]",
1138
- inputs: ["class", "ngClass"]
1139
- },
1140
- {
1141
- kind: "component",
1142
- type: DatePicker,
1143
- selector: "p-datepicker, p-date-picker",
1144
- inputs: [
1145
- "iconDisplay",
1146
- "inputStyle",
1147
- "inputId",
1148
- "inputStyleClass",
1149
- "placeholder",
1150
- "ariaLabelledBy",
1151
- "ariaLabel",
1152
- "iconAriaLabel",
1153
- "dateFormat",
1154
- "multipleSeparator",
1155
- "rangeSeparator",
1156
- "inline",
1157
- "showOtherMonths",
1158
- "selectOtherMonths",
1159
- "showIcon",
1160
- "icon",
1161
- "readonlyInput",
1162
- "shortYearCutoff",
1163
- "hourFormat",
1164
- "timeOnly",
1165
- "stepHour",
1166
- "stepMinute",
1167
- "stepSecond",
1168
- "showSeconds",
1169
- "showOnFocus",
1170
- "showWeek",
1171
- "startWeekFromFirstDayOfYear",
1172
- "showClear",
1173
- "dataType",
1174
- "selectionMode",
1175
- "maxDateCount",
1176
- "showButtonBar",
1177
- "todayButtonStyleClass",
1178
- "clearButtonStyleClass",
1179
- "autofocus",
1180
- "autoZIndex",
1181
- "baseZIndex",
1182
- "panelStyleClass",
1183
- "panelStyle",
1184
- "keepInvalid",
1185
- "hideOnDateTimeSelect",
1186
- "touchUI",
1187
- "timeSeparator",
1188
- "focusTrap",
1189
- "tabindex",
1190
- "minDate",
1191
- "maxDate",
1192
- "disabledDates",
1193
- "disabledDays",
1194
- "showTime",
1195
- "responsiveOptions",
1196
- "numberOfMonths",
1197
- "firstDayOfWeek",
1198
- "view",
1199
- "defaultDate",
1200
- "appendTo",
1201
- "motionOptions"
1202
- ],
1203
- outputs: [
1204
- "onFocus",
1205
- "onBlur",
1206
- "onClose",
1207
- "onSelect",
1208
- "onClear",
1209
- "onInput",
1210
- "onTodayClick",
1211
- "onClearClick",
1212
- "onMonthChange",
1213
- "onYearChange",
1214
- "onClickOutside",
1215
- "onShow"
1216
- ]
1217
- },
1218
- {
1219
- kind: "component",
1220
- type: AutoComplete,
1221
- selector: "p-autocomplete, p-auto-complete",
1222
- inputs: [
1223
- "minQueryLength",
1224
- "delay",
1225
- "panelStyle",
1226
- "panelStyleClass",
1227
- "inputStyle",
1228
- "inputId",
1229
- "inputStyleClass",
1230
- "placeholder",
1231
- "readonly",
1232
- "scrollHeight",
1233
- "lazy",
1234
- "virtualScroll",
1235
- "virtualScrollItemSize",
1236
- "virtualScrollOptions",
1237
- "autoHighlight",
1238
- "forceSelection",
1239
- "type",
1240
- "autoZIndex",
1241
- "baseZIndex",
1242
- "ariaLabel",
1243
- "dropdownAriaLabel",
1244
- "ariaLabelledBy",
1245
- "dropdownIcon",
1246
- "unique",
1247
- "group",
1248
- "completeOnFocus",
1249
- "showClear",
1250
- "dropdown",
1251
- "showEmptyMessage",
1252
- "dropdownMode",
1253
- "multiple",
1254
- "addOnTab",
1255
- "tabindex",
1256
- "dataKey",
1257
- "emptyMessage",
1258
- "autofocus",
1259
- "autocomplete",
1260
- "optionGroupChildren",
1261
- "optionGroupLabel",
1262
- "overlayOptions",
1263
- "suggestions",
1264
- "optionLabel",
1265
- "optionValue",
1266
- "id",
1267
- "searchMessage",
1268
- "emptySelectionMessage",
1269
- "selectionMessage",
1270
- "autoOptionFocus",
1271
- "selectOnFocus",
1272
- "searchLocale",
1273
- "optionDisabled",
1274
- "focusOnHover",
1275
- "typeahead",
1276
- "addOnBlur",
1277
- "separator",
1278
- "appendTo",
1279
- "motionOptions"
1280
- ],
1281
- outputs: [
1282
- "completeMethod",
1283
- "onSelect",
1284
- "onUnselect",
1285
- "onAdd",
1286
- "onFocus",
1287
- "onBlur",
1288
- "onDropdownClick",
1289
- "onClear",
1290
- "onInputKeydown",
1291
- "onKeyUp",
1292
- "onShow",
1293
- "onHide",
1294
- "onLazyLoad"
1295
- ]
1296
- },
1297
- {
1298
- kind: "ngmodule",
1299
- type: UiSwitchModule
1300
- },
1301
- {
1302
- kind: "component",
1303
- type: i2.UiSwitchComponent,
1304
- selector: "ui-switch",
1305
- inputs: [
1306
- "size",
1307
- "color",
1308
- "switchOffColor",
1309
- "switchColor",
1310
- "defaultBgColor",
1311
- "defaultBoColor",
1312
- "checkedLabel",
1313
- "uncheckedLabel",
1314
- "checkedTextColor",
1315
- "uncheckedTextColor",
1316
- "beforeChange",
1317
- "ariaLabel",
1318
- "checked",
1319
- "disabled",
1320
- "reverse",
1321
- "loading"
1322
- ],
1323
- outputs: [
1324
- "change",
1325
- "changeEvent",
1326
- "valueChange"
1327
- ]
1328
- },
1329
- {
1330
- kind: "directive",
1331
- type: LazyImgDirective,
1332
- selector: "img"
1333
- },
1334
- {
1335
- kind: "directive",
1336
- type: ButtonBusyDirective,
1337
- selector: "[buttonBusy]",
1338
- inputs: ["buttonBusy", "busyText"]
1339
- },
1340
- {
1341
- kind: "component",
1342
- type: ProfileImageCropperComponent,
1343
- selector: "pw-image-cropper",
1344
- inputs: ["aspectRatio", "dynamicData"],
1345
- outputs: [
1346
- "imageSelectionEvent",
1347
- "closeEvent",
1348
- "fileChangeEvent"
1349
- ]
1350
- },
1351
- {
1352
- kind: "pipe",
1353
- type: TranslocoPipe,
1354
- name: "transloco"
1355
- }
1356
- ],
1357
- changeDetection: i0.ChangeDetectionStrategy.OnPush
1358
- });
1359
- }
1360
- };
1361
- i0.ɵɵngDeclareClassMetadata({
1362
- minVersion: "12.0.0",
1363
- version: "22.2.3",
1364
- ngImport: i0,
1365
- type: ResourceEditCardComponent,
1366
- decorators: [{
1367
- type: Component,
1368
- args: [{
1369
- selector: "pw-resource-edit-card",
1370
- changeDetection: ChangeDetectionStrategy.OnPush,
1371
- imports: [
1372
- FormsModule,
1373
- ReactiveFormsModule,
1374
- InputContainerComponent,
1375
- QuillEditorComponent,
1376
- NgClass,
1377
- Bind,
1378
- DatePicker,
1379
- AutoComplete,
1380
- UiSwitchModule,
1381
- LazyImgDirective,
1382
- ButtonBusyDirective,
1383
- ProfileImageCropperComponent,
1384
- TranslocoPipe
1385
- ],
1386
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
1387
- template: "<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",
1388
- styles: ["::ng-deep .modal-content{margin-top:5rem!important}\n"]
1389
- }]
1390
- }],
1391
- ctorParameters: () => [],
1392
- propDecorators: {
1393
- id: [{ type: Input }],
1394
- resourceData: [{ type: Input }],
1395
- updated: [{ type: Output }]
1396
- }
1397
- });
1398
- var ResourceEditModule = class ResourceEditModule {
1399
- static {
1400
- this.ɵfac = i0.ɵɵngDeclareFactory({
1401
- minVersion: "12.0.0",
1402
- version: "22.2.3",
1403
- ngImport: i0,
1404
- type: ResourceEditModule,
1405
- deps: [],
1406
- target: i0.ɵɵFactoryTarget.NgModule
1407
- });
1408
- }
1409
- static {
1410
- this.ɵmod = i0.ɵɵngDeclareNgModule({
1411
- minVersion: "14.0.0",
1412
- version: "22.2.3",
1413
- ngImport: i0,
1414
- type: ResourceEditModule,
1415
- imports: [
1416
- CommonModule,
1417
- FormsModule,
1418
- ReactiveFormsModule,
1419
- DatePickerModule,
1420
- AutoCompleteModule,
1421
- ResourceSharedComponentsModule,
1422
- CoreTranslocoModule,
1423
- TranslocoModule,
1424
- DirectivesModule,
1425
- i1.QuillModule,
1426
- UiSwitchModule,
1427
- ResourceEditCardComponent
1428
- ],
1429
- exports: [ResourceEditCardComponent]
1430
- });
1431
- }
1432
- static {
1433
- this.ɵinj = i0.ɵɵngDeclareInjector({
1434
- minVersion: "12.0.0",
1435
- version: "22.2.3",
1436
- ngImport: i0,
1437
- type: ResourceEditModule,
1438
- imports: [
1439
- CommonModule,
1440
- FormsModule,
1441
- ReactiveFormsModule,
1442
- DatePickerModule,
1443
- AutoCompleteModule,
1444
- ResourceSharedComponentsModule,
1445
- CoreTranslocoModule,
1446
- TranslocoModule,
1447
- DirectivesModule,
1448
- QuillModule.forRoot(),
1449
- UiSwitchModule,
1450
- ResourceEditCardComponent
1451
- ]
1452
- });
1453
- }
1454
- };
1455
- i0.ɵɵngDeclareClassMetadata({
1456
- minVersion: "12.0.0",
1457
- version: "22.2.3",
1458
- ngImport: i0,
1459
- type: ResourceEditModule,
1460
- decorators: [{
1461
- type: NgModule,
1462
- args: [{
1463
- imports: [
1464
- CommonModule,
1465
- FormsModule,
1466
- ReactiveFormsModule,
1467
- DatePickerModule,
1468
- AutoCompleteModule,
1469
- ResourceSharedComponentsModule,
1470
- CoreTranslocoModule,
1471
- TranslocoModule,
1472
- DirectivesModule,
1473
- QuillModule.forRoot(),
1474
- UiSwitchModule,
1475
- ResourceEditCardComponent
1476
- ],
1477
- exports: [ResourceEditCardComponent],
1478
- schemas: [CUSTOM_ELEMENTS_SCHEMA]
1479
- }]
1480
- }]
1481
- });
1482
807
  var TestimonialCardListComponent = class TestimonialCardListComponent {
1483
808
  constructor() {
1484
809
  this.editPost = new EventEmitter();
@@ -1631,6 +956,6 @@ i0.ɵɵngDeclareClassMetadata({
1631
956
  canEdit: [{ type: Input }]
1632
957
  }
1633
958
  });
1634
- export { CaseStudyCardComponent, ResourceCardComponent, ResourceCardsModule, ResourceCompanyCardComponent, ResourceEditCardComponent, ResourceEditCardLazyComponent, ResourceEditModule, ResourceModule, ResourceNoteCardComponent, ResourcePublicModule, ResourceService, ResourceSharedModule, ResourceTopBannerEditComponent, ResourceVaultComponent, ResourceVideoCardComponent, TestimonialCardListComponent, Trial4ContactUsModule, UpcomingEventCardComponent, resource_edit_card_component_exports as t };
959
+ export { CaseStudyCardComponent, ResourceCardComponent, ResourceCardsModule, ResourceCompanyCardComponent, ResourceEditCardLazyComponent, ResourceModule, ResourceNoteCardComponent, ResourcePublicModule, ResourceService, ResourceSharedModule, ResourceTopBannerEditComponent, ResourceVaultComponent, ResourceVideoCardComponent, TestimonialCardListComponent, Trial4ContactUsModule, UpcomingEventCardComponent };
1635
960
 
1636
961
  //# sourceMappingURL=posiwise-resource-module.mjs.map