@posiwise/resource-module 0.0.205 → 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.
- package/fesm2022/{posiwise-resource-module-resource-blogs.module-C_sTQ0w2.mjs → posiwise-resource-module-resource-blogs.module-DEXimOOY.mjs} +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
- package/fesm2022/{posiwise-resource-module-resource-cards.module-BSJpkk9V.mjs → posiwise-resource-module-resource-cards.module-DWV2LWdy.mjs} +2 -2
- package/fesm2022/{posiwise-resource-module-resource-cards.module-BSJpkk9V.mjs.map → posiwise-resource-module-resource-cards.module-DWV2LWdy.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-case-studies.module-D1hCU5_H.mjs → posiwise-resource-module-resource-case-studies.module-CQHAhbsv.mjs} +2 -2
- 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
- package/fesm2022/posiwise-resource-module-resource-edit-card.component-2VvTki2u.mjs +632 -0
- package/fesm2022/posiwise-resource-module-resource-edit-card.component-2VvTki2u.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-events.module-D7yC0Sqt.mjs → posiwise-resource-module-resource-events.module-D8mxidoP.mjs} +2 -2
- package/fesm2022/{posiwise-resource-module-resource-events.module-D7yC0Sqt.mjs.map → posiwise-resource-module-resource-events.module-D8mxidoP.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-hub.module-alVvQLvR.mjs → posiwise-resource-module-resource-hub.module-DklN3KeA.mjs} +2 -2
- package/fesm2022/{posiwise-resource-module-resource-hub.module-alVvQLvR.mjs.map → posiwise-resource-module-resource-hub.module-DklN3KeA.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-integrations.module-G4XvMMYf.mjs → posiwise-resource-module-resource-integrations.module-iTlhrAYt.mjs} +7 -4
- package/fesm2022/{posiwise-resource-module-resource-integrations.module-G4XvMMYf.mjs.map → posiwise-resource-module-resource-integrations.module-iTlhrAYt.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-jobs.module-DOdaBrZi.mjs → posiwise-resource-module-resource-jobs.module-DpTqKqS9.mjs} +2 -2
- package/fesm2022/{posiwise-resource-module-resource-jobs.module-DOdaBrZi.mjs.map → posiwise-resource-module-resource-jobs.module-DpTqKqS9.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-post.module-CGxj27dN.mjs → posiwise-resource-module-resource-post.module-PU-KBg_G.mjs} +2 -2
- package/fesm2022/{posiwise-resource-module-resource-post.module-CGxj27dN.mjs.map → posiwise-resource-module-resource-post.module-PU-KBg_G.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-release-notes.module-CLry1QNC.mjs → posiwise-resource-module-resource-release-notes.module-WESwTVu8.mjs} +7 -4
- package/fesm2022/{posiwise-resource-module-resource-release-notes.module-CLry1QNC.mjs.map → posiwise-resource-module-resource-release-notes.module-WESwTVu8.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-root.module-x4TYntdq.mjs → posiwise-resource-module-resource-root.module-TMvR1c1H.mjs} +11 -8
- package/fesm2022/{posiwise-resource-module-resource-root.module-x4TYntdq.mjs.map → posiwise-resource-module-resource-root.module-TMvR1c1H.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-videos.module-2ugtK7wA.mjs → posiwise-resource-module-resource-videos.module-BCDet6S9.mjs} +2 -2
- package/fesm2022/{posiwise-resource-module-resource-videos.module-2ugtK7wA.mjs.map → posiwise-resource-module-resource-videos.module-BCDet6S9.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-white-papers.module-pn6rtDc3.mjs → posiwise-resource-module-resource-white-papers.module-DtxUgC_Z.mjs} +2 -2
- 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
- package/fesm2022/posiwise-resource-module.mjs +23 -733
- package/fesm2022/posiwise-resource-module.mjs.map +1 -1
- package/package.json +1 -1
- package/types/posiwise-resource-module.d.ts +8 -128
|
@@ -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-
|
|
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 {
|
|
5
|
+
import { TagService } from "@posiwise/common-services";
|
|
6
6
|
import { HelperService } from "@posiwise/helper-service";
|
|
7
|
-
import * as i1$
|
|
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
|
|
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,69 +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 { QuillHelper, editorImageUpload } from "@posiwise/utils/quill";
|
|
35
|
-
import moment from "moment";
|
|
36
|
-
var __defProp = Object.defineProperty;
|
|
37
|
-
var __exportAll = (all, no_symbols) => {
|
|
38
|
-
let target = {};
|
|
39
|
-
for (var name in all) __defProp(target, name, {
|
|
40
|
-
get: all[name],
|
|
41
|
-
enumerable: true
|
|
42
|
-
});
|
|
43
|
-
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
44
|
-
return target;
|
|
45
|
-
};
|
|
46
28
|
const routes = [
|
|
47
29
|
{
|
|
48
30
|
path: "",
|
|
49
31
|
pathMatch: "full",
|
|
50
|
-
loadChildren: () => import("./posiwise-resource-module-resource-root.module-
|
|
32
|
+
loadChildren: () => import("./posiwise-resource-module-resource-root.module-TMvR1c1H.mjs").then((m) => m.ResourceRootModule)
|
|
51
33
|
},
|
|
52
34
|
{
|
|
53
35
|
path: "hub",
|
|
54
|
-
loadChildren: () => import("./posiwise-resource-module-resource-hub.module-
|
|
36
|
+
loadChildren: () => import("./posiwise-resource-module-resource-hub.module-DklN3KeA.mjs").then((m) => m.ResourceHubModule)
|
|
55
37
|
},
|
|
56
38
|
{
|
|
57
39
|
path: "blogs",
|
|
58
|
-
loadChildren: () => import("./posiwise-resource-module-resource-blogs.module-
|
|
40
|
+
loadChildren: () => import("./posiwise-resource-module-resource-blogs.module-DEXimOOY.mjs").then((m) => m.ResourceBlogsModule)
|
|
59
41
|
},
|
|
60
42
|
{
|
|
61
43
|
path: "videos",
|
|
62
|
-
loadChildren: () => import("./posiwise-resource-module-resource-videos.module-
|
|
44
|
+
loadChildren: () => import("./posiwise-resource-module-resource-videos.module-BCDet6S9.mjs").then((m) => m.ResourceVideosModule)
|
|
63
45
|
},
|
|
64
46
|
{
|
|
65
47
|
path: "integrations",
|
|
66
|
-
loadChildren: () => import("./posiwise-resource-module-resource-integrations.module-
|
|
48
|
+
loadChildren: () => import("./posiwise-resource-module-resource-integrations.module-iTlhrAYt.mjs").then((m) => m.ResourceIntegrationsModule)
|
|
67
49
|
},
|
|
68
50
|
{
|
|
69
51
|
path: "release-notes",
|
|
70
|
-
loadChildren: () => import("./posiwise-resource-module-resource-release-notes.module-
|
|
52
|
+
loadChildren: () => import("./posiwise-resource-module-resource-release-notes.module-WESwTVu8.mjs").then((m) => m.ResourceReleaseNotesModule)
|
|
71
53
|
},
|
|
72
54
|
{
|
|
73
55
|
path: "events",
|
|
74
|
-
loadChildren: () => import("./posiwise-resource-module-resource-events.module-
|
|
56
|
+
loadChildren: () => import("./posiwise-resource-module-resource-events.module-D8mxidoP.mjs").then((m) => m.ResourceEventsModule)
|
|
75
57
|
},
|
|
76
58
|
{
|
|
77
59
|
path: "white-papers",
|
|
78
|
-
loadChildren: () => import("./posiwise-resource-module-resource-white-papers.module-
|
|
60
|
+
loadChildren: () => import("./posiwise-resource-module-resource-white-papers.module-DtxUgC_Z.mjs").then((m) => m.ResourceWhitePapersModule)
|
|
79
61
|
},
|
|
80
62
|
{
|
|
81
63
|
path: "case-studies",
|
|
82
|
-
loadChildren: () => import("./posiwise-resource-module-resource-case-studies.module-
|
|
64
|
+
loadChildren: () => import("./posiwise-resource-module-resource-case-studies.module-CQHAhbsv.mjs").then((m) => m.ResourceCaseStudiesModule)
|
|
83
65
|
},
|
|
84
66
|
{
|
|
85
67
|
path: "careers",
|
|
86
|
-
loadChildren: () => import("./posiwise-resource-module-resource-jobs.module-
|
|
68
|
+
loadChildren: () => import("./posiwise-resource-module-resource-jobs.module-DpTqKqS9.mjs").then((m) => m.ResourceJobsModule)
|
|
87
69
|
},
|
|
88
70
|
{
|
|
89
71
|
path: "view/:slug",
|
|
90
|
-
loadChildren: () => import("./posiwise-resource-module-resource-post.module-
|
|
72
|
+
loadChildren: () => import("./posiwise-resource-module-resource-post.module-PU-KBg_G.mjs").then((m) => m.ResourcePostModule)
|
|
91
73
|
}
|
|
92
74
|
];
|
|
93
75
|
var BlogPublicRoutingModule = class BlogPublicRoutingModule {
|
|
@@ -107,7 +89,7 @@ var BlogPublicRoutingModule = class BlogPublicRoutingModule {
|
|
|
107
89
|
version: "22.2.3",
|
|
108
90
|
ngImport: i0,
|
|
109
91
|
type: BlogPublicRoutingModule,
|
|
110
|
-
imports: [i1$
|
|
92
|
+
imports: [i1$1.RouterModule],
|
|
111
93
|
exports: [RouterModule]
|
|
112
94
|
});
|
|
113
95
|
}
|
|
@@ -544,22 +526,22 @@ var ResourceTopBannerEditComponent = class ResourceTopBannerEditComponent extend
|
|
|
544
526
|
},
|
|
545
527
|
{
|
|
546
528
|
kind: "directive",
|
|
547
|
-
type: i1
|
|
529
|
+
type: i1.ɵNgNoValidate,
|
|
548
530
|
selector: "form:not([ngNoForm]):not([ngNativeValidate])"
|
|
549
531
|
},
|
|
550
532
|
{
|
|
551
533
|
kind: "directive",
|
|
552
|
-
type: i1
|
|
534
|
+
type: i1.DefaultValueAccessor,
|
|
553
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]"
|
|
554
536
|
},
|
|
555
537
|
{
|
|
556
538
|
kind: "directive",
|
|
557
|
-
type: i1
|
|
539
|
+
type: i1.NgControlStatus,
|
|
558
540
|
selector: "[formControlName],[ngModel],[formControl]"
|
|
559
541
|
},
|
|
560
542
|
{
|
|
561
543
|
kind: "directive",
|
|
562
|
-
type: i1
|
|
544
|
+
type: i1.NgControlStatusGroup,
|
|
563
545
|
selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
|
|
564
546
|
},
|
|
565
547
|
{
|
|
@@ -568,7 +550,7 @@ var ResourceTopBannerEditComponent = class ResourceTopBannerEditComponent extend
|
|
|
568
550
|
},
|
|
569
551
|
{
|
|
570
552
|
kind: "directive",
|
|
571
|
-
type: i1
|
|
553
|
+
type: i1.FormGroupDirective,
|
|
572
554
|
selector: "[formGroup]",
|
|
573
555
|
inputs: ["formGroup"],
|
|
574
556
|
outputs: ["ngSubmit"],
|
|
@@ -576,7 +558,7 @@ var ResourceTopBannerEditComponent = class ResourceTopBannerEditComponent extend
|
|
|
576
558
|
},
|
|
577
559
|
{
|
|
578
560
|
kind: "directive",
|
|
579
|
-
type: i1
|
|
561
|
+
type: i1.FormControlName,
|
|
580
562
|
selector: "[formControlName]",
|
|
581
563
|
inputs: [
|
|
582
564
|
"formControlName",
|
|
@@ -822,698 +804,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
822
804
|
}]
|
|
823
805
|
}]
|
|
824
806
|
});
|
|
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
|
-
}
|
|
961
|
-
var resource_edit_card_component_exports = /* @__PURE__ */ __exportAll({ ResourceEditCardComponent: () => ResourceEditCardComponent });
|
|
962
|
-
var ResourceEditCardComponent = class ResourceEditCardComponent extends ResourceEditCardImages {
|
|
963
|
-
constructor() {
|
|
964
|
-
super();
|
|
965
|
-
this.fb = inject(FormBuilder);
|
|
966
|
-
this.resourceService = inject(ResourceService);
|
|
967
|
-
this.authService = inject(AuthService);
|
|
968
|
-
this.tagService = inject(TagService);
|
|
969
|
-
this.cdr = inject(ChangeDetectorRef);
|
|
970
|
-
this.updated = new EventEmitter();
|
|
971
|
-
this.selectedTags = [];
|
|
972
|
-
this.allTags = [];
|
|
973
|
-
this.tagsSuggestion = [];
|
|
974
|
-
this.buttonBusy = false;
|
|
975
|
-
this.editorConfig = QuillHelper.getEditorConfig([], editorImageUpload(() => this.subscriptionId));
|
|
976
|
-
QuillHelper.init();
|
|
977
|
-
this.editForm = resourceEditForm(this.fb);
|
|
978
|
-
}
|
|
979
|
-
ngOnInit() {
|
|
980
|
-
this.authService.getToken$().subscribe((res) => {
|
|
981
|
-
this.userLoggedIn = !!res;
|
|
982
|
-
if (this.userLoggedIn) this.localStorage.getItem$("product").subscribe((res) => {
|
|
983
|
-
const data = res ? JSON.parse(res) : null;
|
|
984
|
-
this.subscriptionId = data?.subscriptionId;
|
|
985
|
-
this.cdr.markForCheck();
|
|
986
|
-
});
|
|
987
|
-
this.cdr.markForCheck();
|
|
988
|
-
});
|
|
989
|
-
}
|
|
990
|
-
navigateToResourceEdit() {
|
|
991
|
-
const basePath = `/admin/resources/${this.resourceData?.slug}`;
|
|
992
|
-
const fullUrl = `${location.origin}${basePath}`;
|
|
993
|
-
window.open(fullUrl, "_blank");
|
|
994
|
-
}
|
|
995
|
-
openModal(modalTemplate) {
|
|
996
|
-
if (this.resourceData) {
|
|
997
|
-
this.editForm.setValue(resourceFormValue(this.resourceData));
|
|
998
|
-
this.image = this.resourceData.picture?.url ?? "";
|
|
999
|
-
this.selectedTags = this.resourceData?.tags?.length ? [...this.resourceData.tags] : [];
|
|
1000
|
-
this.rectangularImage = this.resourceData.rectangular_picture?.url ?? "";
|
|
1001
|
-
}
|
|
1002
|
-
this.modalService.open(modalTemplate, {
|
|
1003
|
-
centered: true,
|
|
1004
|
-
size: "lg"
|
|
1005
|
-
});
|
|
1006
|
-
this.getPostTags();
|
|
1007
|
-
}
|
|
1008
|
-
search(event) {
|
|
1009
|
-
this.tagsSuggestion = filterTags(this.allTags, event.query);
|
|
1010
|
-
}
|
|
1011
|
-
getPostTags() {
|
|
1012
|
-
this.tagService.getTagsByType("post_categories", {}, this.subscriptionId).subscribe((response) => {
|
|
1013
|
-
this.allTags = response.tags;
|
|
1014
|
-
this.cdr.markForCheck();
|
|
1015
|
-
});
|
|
1016
|
-
}
|
|
1017
|
-
saveResource() {
|
|
1018
|
-
this.buttonBusy = true;
|
|
1019
|
-
this.saveTags(this.id);
|
|
1020
|
-
const payload = buildResourcePayload(this.editForm, this.subscriptionId, this);
|
|
1021
|
-
this.resourceService.updatePost(payload, this.id).subscribe({
|
|
1022
|
-
next: () => this.settleSave(() => {
|
|
1023
|
-
this.toast.success("Blog Post Updated");
|
|
1024
|
-
this.updated.emit();
|
|
1025
|
-
this.modalService.dismissAll();
|
|
1026
|
-
}),
|
|
1027
|
-
error: () => this.settleSave()
|
|
1028
|
-
});
|
|
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
|
-
}
|
|
1040
|
-
saveTags(id) {
|
|
1041
|
-
if (this.selectedTags.length) {
|
|
1042
|
-
const data = postTagsPayload(this.selectedTags, id);
|
|
1043
|
-
this.tagService.addTags(data, this.subscriptionId).subscribe(() => {
|
|
1044
|
-
this.cdr.markForCheck();
|
|
1045
|
-
});
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
static {
|
|
1049
|
-
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1050
|
-
minVersion: "12.0.0",
|
|
1051
|
-
version: "22.2.3",
|
|
1052
|
-
ngImport: i0,
|
|
1053
|
-
type: ResourceEditCardComponent,
|
|
1054
|
-
deps: [],
|
|
1055
|
-
target: i0.ɵɵFactoryTarget.Component
|
|
1056
|
-
});
|
|
1057
|
-
}
|
|
1058
|
-
static {
|
|
1059
|
-
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1060
|
-
minVersion: "17.0.0",
|
|
1061
|
-
version: "22.2.3",
|
|
1062
|
-
type: ResourceEditCardComponent,
|
|
1063
|
-
isStandalone: true,
|
|
1064
|
-
selector: "pw-resource-edit-card",
|
|
1065
|
-
inputs: {
|
|
1066
|
-
id: "id",
|
|
1067
|
-
resourceData: "resourceData"
|
|
1068
|
-
},
|
|
1069
|
-
outputs: { updated: "updated" },
|
|
1070
|
-
usesInheritance: true,
|
|
1071
|
-
ngImport: i0,
|
|
1072
|
-
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",
|
|
1073
|
-
styles: ["::ng-deep .modal-content{margin-top:5rem!important}\n"],
|
|
1074
|
-
dependencies: [
|
|
1075
|
-
{
|
|
1076
|
-
kind: "ngmodule",
|
|
1077
|
-
type: FormsModule
|
|
1078
|
-
},
|
|
1079
|
-
{
|
|
1080
|
-
kind: "directive",
|
|
1081
|
-
type: i1$1.ɵNgNoValidate,
|
|
1082
|
-
selector: "form:not([ngNoForm]):not([ngNativeValidate])"
|
|
1083
|
-
},
|
|
1084
|
-
{
|
|
1085
|
-
kind: "directive",
|
|
1086
|
-
type: i1$1.DefaultValueAccessor,
|
|
1087
|
-
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]"
|
|
1088
|
-
},
|
|
1089
|
-
{
|
|
1090
|
-
kind: "directive",
|
|
1091
|
-
type: i1$1.NgControlStatus,
|
|
1092
|
-
selector: "[formControlName],[ngModel],[formControl]"
|
|
1093
|
-
},
|
|
1094
|
-
{
|
|
1095
|
-
kind: "directive",
|
|
1096
|
-
type: i1$1.NgControlStatusGroup,
|
|
1097
|
-
selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
|
|
1098
|
-
},
|
|
1099
|
-
{
|
|
1100
|
-
kind: "directive",
|
|
1101
|
-
type: i1$1.MaxLengthValidator,
|
|
1102
|
-
selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",
|
|
1103
|
-
inputs: ["maxlength"]
|
|
1104
|
-
},
|
|
1105
|
-
{
|
|
1106
|
-
kind: "directive",
|
|
1107
|
-
type: i1$1.NgModel,
|
|
1108
|
-
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
1109
|
-
inputs: [
|
|
1110
|
-
"name",
|
|
1111
|
-
"disabled",
|
|
1112
|
-
"ngModel",
|
|
1113
|
-
"ngModelOptions"
|
|
1114
|
-
],
|
|
1115
|
-
outputs: ["ngModelChange"],
|
|
1116
|
-
exportAs: ["ngModel"]
|
|
1117
|
-
},
|
|
1118
|
-
{
|
|
1119
|
-
kind: "ngmodule",
|
|
1120
|
-
type: ReactiveFormsModule
|
|
1121
|
-
},
|
|
1122
|
-
{
|
|
1123
|
-
kind: "directive",
|
|
1124
|
-
type: i1$1.FormGroupDirective,
|
|
1125
|
-
selector: "[formGroup]",
|
|
1126
|
-
inputs: ["formGroup"],
|
|
1127
|
-
outputs: ["ngSubmit"],
|
|
1128
|
-
exportAs: ["ngForm"]
|
|
1129
|
-
},
|
|
1130
|
-
{
|
|
1131
|
-
kind: "directive",
|
|
1132
|
-
type: i1$1.FormControlName,
|
|
1133
|
-
selector: "[formControlName]",
|
|
1134
|
-
inputs: [
|
|
1135
|
-
"formControlName",
|
|
1136
|
-
"disabled",
|
|
1137
|
-
"ngModel"
|
|
1138
|
-
],
|
|
1139
|
-
outputs: ["ngModelChange"]
|
|
1140
|
-
},
|
|
1141
|
-
{
|
|
1142
|
-
kind: "component",
|
|
1143
|
-
type: InputContainerComponent,
|
|
1144
|
-
selector: "pw-input-container",
|
|
1145
|
-
inputs: [
|
|
1146
|
-
"name",
|
|
1147
|
-
"controlId",
|
|
1148
|
-
"useAriaLabelledbyOnly",
|
|
1149
|
-
"label",
|
|
1150
|
-
"labelClass",
|
|
1151
|
-
"tooltipPosition",
|
|
1152
|
-
"required",
|
|
1153
|
-
"errorMsg",
|
|
1154
|
-
"isReadOnly",
|
|
1155
|
-
"showTooltip",
|
|
1156
|
-
"tooltipText",
|
|
1157
|
-
"showTriangle",
|
|
1158
|
-
"afterLabel",
|
|
1159
|
-
"showAfterLabel",
|
|
1160
|
-
"showTriangleText",
|
|
1161
|
-
"isLeftTooltip"
|
|
1162
|
-
]
|
|
1163
|
-
},
|
|
1164
|
-
{
|
|
1165
|
-
kind: "component",
|
|
1166
|
-
type: QuillEditorComponent,
|
|
1167
|
-
selector: "quill-editor"
|
|
1168
|
-
},
|
|
1169
|
-
{
|
|
1170
|
-
kind: "directive",
|
|
1171
|
-
type: NgClass,
|
|
1172
|
-
selector: "[ngClass]",
|
|
1173
|
-
inputs: ["class", "ngClass"]
|
|
1174
|
-
},
|
|
1175
|
-
{
|
|
1176
|
-
kind: "component",
|
|
1177
|
-
type: DatePicker,
|
|
1178
|
-
selector: "p-datepicker, p-date-picker",
|
|
1179
|
-
inputs: [
|
|
1180
|
-
"iconDisplay",
|
|
1181
|
-
"inputStyle",
|
|
1182
|
-
"inputId",
|
|
1183
|
-
"inputStyleClass",
|
|
1184
|
-
"placeholder",
|
|
1185
|
-
"ariaLabelledBy",
|
|
1186
|
-
"ariaLabel",
|
|
1187
|
-
"iconAriaLabel",
|
|
1188
|
-
"dateFormat",
|
|
1189
|
-
"multipleSeparator",
|
|
1190
|
-
"rangeSeparator",
|
|
1191
|
-
"inline",
|
|
1192
|
-
"showOtherMonths",
|
|
1193
|
-
"selectOtherMonths",
|
|
1194
|
-
"showIcon",
|
|
1195
|
-
"icon",
|
|
1196
|
-
"readonlyInput",
|
|
1197
|
-
"shortYearCutoff",
|
|
1198
|
-
"hourFormat",
|
|
1199
|
-
"timeOnly",
|
|
1200
|
-
"stepHour",
|
|
1201
|
-
"stepMinute",
|
|
1202
|
-
"stepSecond",
|
|
1203
|
-
"showSeconds",
|
|
1204
|
-
"showOnFocus",
|
|
1205
|
-
"showWeek",
|
|
1206
|
-
"startWeekFromFirstDayOfYear",
|
|
1207
|
-
"showClear",
|
|
1208
|
-
"dataType",
|
|
1209
|
-
"selectionMode",
|
|
1210
|
-
"maxDateCount",
|
|
1211
|
-
"showButtonBar",
|
|
1212
|
-
"todayButtonStyleClass",
|
|
1213
|
-
"clearButtonStyleClass",
|
|
1214
|
-
"autofocus",
|
|
1215
|
-
"autoZIndex",
|
|
1216
|
-
"baseZIndex",
|
|
1217
|
-
"panelStyleClass",
|
|
1218
|
-
"panelStyle",
|
|
1219
|
-
"keepInvalid",
|
|
1220
|
-
"hideOnDateTimeSelect",
|
|
1221
|
-
"touchUI",
|
|
1222
|
-
"timeSeparator",
|
|
1223
|
-
"focusTrap",
|
|
1224
|
-
"tabindex",
|
|
1225
|
-
"minDate",
|
|
1226
|
-
"maxDate",
|
|
1227
|
-
"disabledDates",
|
|
1228
|
-
"disabledDays",
|
|
1229
|
-
"showTime",
|
|
1230
|
-
"responsiveOptions",
|
|
1231
|
-
"numberOfMonths",
|
|
1232
|
-
"firstDayOfWeek",
|
|
1233
|
-
"view",
|
|
1234
|
-
"defaultDate",
|
|
1235
|
-
"appendTo",
|
|
1236
|
-
"motionOptions"
|
|
1237
|
-
],
|
|
1238
|
-
outputs: [
|
|
1239
|
-
"onFocus",
|
|
1240
|
-
"onBlur",
|
|
1241
|
-
"onClose",
|
|
1242
|
-
"onSelect",
|
|
1243
|
-
"onClear",
|
|
1244
|
-
"onInput",
|
|
1245
|
-
"onTodayClick",
|
|
1246
|
-
"onClearClick",
|
|
1247
|
-
"onMonthChange",
|
|
1248
|
-
"onYearChange",
|
|
1249
|
-
"onClickOutside",
|
|
1250
|
-
"onShow"
|
|
1251
|
-
]
|
|
1252
|
-
},
|
|
1253
|
-
{
|
|
1254
|
-
kind: "component",
|
|
1255
|
-
type: AutoComplete,
|
|
1256
|
-
selector: "p-autocomplete, p-auto-complete",
|
|
1257
|
-
inputs: [
|
|
1258
|
-
"minQueryLength",
|
|
1259
|
-
"delay",
|
|
1260
|
-
"panelStyle",
|
|
1261
|
-
"panelStyleClass",
|
|
1262
|
-
"inputStyle",
|
|
1263
|
-
"inputId",
|
|
1264
|
-
"inputStyleClass",
|
|
1265
|
-
"placeholder",
|
|
1266
|
-
"readonly",
|
|
1267
|
-
"scrollHeight",
|
|
1268
|
-
"lazy",
|
|
1269
|
-
"virtualScroll",
|
|
1270
|
-
"virtualScrollItemSize",
|
|
1271
|
-
"virtualScrollOptions",
|
|
1272
|
-
"autoHighlight",
|
|
1273
|
-
"forceSelection",
|
|
1274
|
-
"type",
|
|
1275
|
-
"autoZIndex",
|
|
1276
|
-
"baseZIndex",
|
|
1277
|
-
"ariaLabel",
|
|
1278
|
-
"dropdownAriaLabel",
|
|
1279
|
-
"ariaLabelledBy",
|
|
1280
|
-
"dropdownIcon",
|
|
1281
|
-
"unique",
|
|
1282
|
-
"group",
|
|
1283
|
-
"completeOnFocus",
|
|
1284
|
-
"showClear",
|
|
1285
|
-
"dropdown",
|
|
1286
|
-
"showEmptyMessage",
|
|
1287
|
-
"dropdownMode",
|
|
1288
|
-
"multiple",
|
|
1289
|
-
"addOnTab",
|
|
1290
|
-
"tabindex",
|
|
1291
|
-
"dataKey",
|
|
1292
|
-
"emptyMessage",
|
|
1293
|
-
"autofocus",
|
|
1294
|
-
"autocomplete",
|
|
1295
|
-
"optionGroupChildren",
|
|
1296
|
-
"optionGroupLabel",
|
|
1297
|
-
"overlayOptions",
|
|
1298
|
-
"suggestions",
|
|
1299
|
-
"optionLabel",
|
|
1300
|
-
"optionValue",
|
|
1301
|
-
"id",
|
|
1302
|
-
"searchMessage",
|
|
1303
|
-
"emptySelectionMessage",
|
|
1304
|
-
"selectionMessage",
|
|
1305
|
-
"autoOptionFocus",
|
|
1306
|
-
"selectOnFocus",
|
|
1307
|
-
"searchLocale",
|
|
1308
|
-
"optionDisabled",
|
|
1309
|
-
"focusOnHover",
|
|
1310
|
-
"typeahead",
|
|
1311
|
-
"addOnBlur",
|
|
1312
|
-
"separator",
|
|
1313
|
-
"appendTo",
|
|
1314
|
-
"motionOptions"
|
|
1315
|
-
],
|
|
1316
|
-
outputs: [
|
|
1317
|
-
"completeMethod",
|
|
1318
|
-
"onSelect",
|
|
1319
|
-
"onUnselect",
|
|
1320
|
-
"onAdd",
|
|
1321
|
-
"onFocus",
|
|
1322
|
-
"onBlur",
|
|
1323
|
-
"onDropdownClick",
|
|
1324
|
-
"onClear",
|
|
1325
|
-
"onInputKeydown",
|
|
1326
|
-
"onKeyUp",
|
|
1327
|
-
"onShow",
|
|
1328
|
-
"onHide",
|
|
1329
|
-
"onLazyLoad"
|
|
1330
|
-
]
|
|
1331
|
-
},
|
|
1332
|
-
{
|
|
1333
|
-
kind: "ngmodule",
|
|
1334
|
-
type: UiSwitchModule
|
|
1335
|
-
},
|
|
1336
|
-
{
|
|
1337
|
-
kind: "component",
|
|
1338
|
-
type: i2.UiSwitchComponent,
|
|
1339
|
-
selector: "ui-switch",
|
|
1340
|
-
inputs: [
|
|
1341
|
-
"size",
|
|
1342
|
-
"color",
|
|
1343
|
-
"switchOffColor",
|
|
1344
|
-
"switchColor",
|
|
1345
|
-
"defaultBgColor",
|
|
1346
|
-
"defaultBoColor",
|
|
1347
|
-
"checkedLabel",
|
|
1348
|
-
"uncheckedLabel",
|
|
1349
|
-
"checkedTextColor",
|
|
1350
|
-
"uncheckedTextColor",
|
|
1351
|
-
"beforeChange",
|
|
1352
|
-
"ariaLabel",
|
|
1353
|
-
"checked",
|
|
1354
|
-
"disabled",
|
|
1355
|
-
"reverse",
|
|
1356
|
-
"loading"
|
|
1357
|
-
],
|
|
1358
|
-
outputs: [
|
|
1359
|
-
"change",
|
|
1360
|
-
"changeEvent",
|
|
1361
|
-
"valueChange"
|
|
1362
|
-
]
|
|
1363
|
-
},
|
|
1364
|
-
{
|
|
1365
|
-
kind: "directive",
|
|
1366
|
-
type: LazyImgDirective,
|
|
1367
|
-
selector: "img"
|
|
1368
|
-
},
|
|
1369
|
-
{
|
|
1370
|
-
kind: "directive",
|
|
1371
|
-
type: ButtonBusyDirective,
|
|
1372
|
-
selector: "[buttonBusy]",
|
|
1373
|
-
inputs: ["buttonBusy", "busyText"]
|
|
1374
|
-
},
|
|
1375
|
-
{
|
|
1376
|
-
kind: "component",
|
|
1377
|
-
type: ProfileImageCropperComponent,
|
|
1378
|
-
selector: "pw-image-cropper",
|
|
1379
|
-
inputs: ["aspectRatio", "dynamicData"],
|
|
1380
|
-
outputs: [
|
|
1381
|
-
"imageSelectionEvent",
|
|
1382
|
-
"closeEvent",
|
|
1383
|
-
"fileChangeEvent"
|
|
1384
|
-
]
|
|
1385
|
-
},
|
|
1386
|
-
{
|
|
1387
|
-
kind: "pipe",
|
|
1388
|
-
type: TranslocoPipe,
|
|
1389
|
-
name: "transloco"
|
|
1390
|
-
}
|
|
1391
|
-
],
|
|
1392
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1393
|
-
});
|
|
1394
|
-
}
|
|
1395
|
-
};
|
|
1396
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
1397
|
-
minVersion: "12.0.0",
|
|
1398
|
-
version: "22.2.3",
|
|
1399
|
-
ngImport: i0,
|
|
1400
|
-
type: ResourceEditCardComponent,
|
|
1401
|
-
decorators: [{
|
|
1402
|
-
type: Component,
|
|
1403
|
-
args: [{
|
|
1404
|
-
selector: "pw-resource-edit-card",
|
|
1405
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1406
|
-
imports: [
|
|
1407
|
-
FormsModule,
|
|
1408
|
-
ReactiveFormsModule,
|
|
1409
|
-
InputContainerComponent,
|
|
1410
|
-
QuillEditorComponent,
|
|
1411
|
-
NgClass,
|
|
1412
|
-
Bind,
|
|
1413
|
-
DatePicker,
|
|
1414
|
-
AutoComplete,
|
|
1415
|
-
UiSwitchModule,
|
|
1416
|
-
LazyImgDirective,
|
|
1417
|
-
ButtonBusyDirective,
|
|
1418
|
-
ProfileImageCropperComponent,
|
|
1419
|
-
TranslocoPipe
|
|
1420
|
-
],
|
|
1421
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
1422
|
-
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",
|
|
1423
|
-
styles: ["::ng-deep .modal-content{margin-top:5rem!important}\n"]
|
|
1424
|
-
}]
|
|
1425
|
-
}],
|
|
1426
|
-
ctorParameters: () => [],
|
|
1427
|
-
propDecorators: {
|
|
1428
|
-
id: [{ type: Input }],
|
|
1429
|
-
resourceData: [{ type: Input }],
|
|
1430
|
-
updated: [{ type: Output }]
|
|
1431
|
-
}
|
|
1432
|
-
});
|
|
1433
|
-
var ResourceEditModule = class ResourceEditModule {
|
|
1434
|
-
static {
|
|
1435
|
-
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1436
|
-
minVersion: "12.0.0",
|
|
1437
|
-
version: "22.2.3",
|
|
1438
|
-
ngImport: i0,
|
|
1439
|
-
type: ResourceEditModule,
|
|
1440
|
-
deps: [],
|
|
1441
|
-
target: i0.ɵɵFactoryTarget.NgModule
|
|
1442
|
-
});
|
|
1443
|
-
}
|
|
1444
|
-
static {
|
|
1445
|
-
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
1446
|
-
minVersion: "14.0.0",
|
|
1447
|
-
version: "22.2.3",
|
|
1448
|
-
ngImport: i0,
|
|
1449
|
-
type: ResourceEditModule,
|
|
1450
|
-
imports: [
|
|
1451
|
-
CommonModule,
|
|
1452
|
-
FormsModule,
|
|
1453
|
-
ReactiveFormsModule,
|
|
1454
|
-
DatePickerModule,
|
|
1455
|
-
AutoCompleteModule,
|
|
1456
|
-
ResourceSharedComponentsModule,
|
|
1457
|
-
CoreTranslocoModule,
|
|
1458
|
-
TranslocoModule,
|
|
1459
|
-
DirectivesModule,
|
|
1460
|
-
i1.QuillModule,
|
|
1461
|
-
UiSwitchModule,
|
|
1462
|
-
ResourceEditCardComponent
|
|
1463
|
-
],
|
|
1464
|
-
exports: [ResourceEditCardComponent]
|
|
1465
|
-
});
|
|
1466
|
-
}
|
|
1467
|
-
static {
|
|
1468
|
-
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
1469
|
-
minVersion: "12.0.0",
|
|
1470
|
-
version: "22.2.3",
|
|
1471
|
-
ngImport: i0,
|
|
1472
|
-
type: ResourceEditModule,
|
|
1473
|
-
imports: [
|
|
1474
|
-
CommonModule,
|
|
1475
|
-
FormsModule,
|
|
1476
|
-
ReactiveFormsModule,
|
|
1477
|
-
DatePickerModule,
|
|
1478
|
-
AutoCompleteModule,
|
|
1479
|
-
ResourceSharedComponentsModule,
|
|
1480
|
-
CoreTranslocoModule,
|
|
1481
|
-
TranslocoModule,
|
|
1482
|
-
DirectivesModule,
|
|
1483
|
-
QuillModule.forRoot(),
|
|
1484
|
-
UiSwitchModule,
|
|
1485
|
-
ResourceEditCardComponent
|
|
1486
|
-
]
|
|
1487
|
-
});
|
|
1488
|
-
}
|
|
1489
|
-
};
|
|
1490
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
1491
|
-
minVersion: "12.0.0",
|
|
1492
|
-
version: "22.2.3",
|
|
1493
|
-
ngImport: i0,
|
|
1494
|
-
type: ResourceEditModule,
|
|
1495
|
-
decorators: [{
|
|
1496
|
-
type: NgModule,
|
|
1497
|
-
args: [{
|
|
1498
|
-
imports: [
|
|
1499
|
-
CommonModule,
|
|
1500
|
-
FormsModule,
|
|
1501
|
-
ReactiveFormsModule,
|
|
1502
|
-
DatePickerModule,
|
|
1503
|
-
AutoCompleteModule,
|
|
1504
|
-
ResourceSharedComponentsModule,
|
|
1505
|
-
CoreTranslocoModule,
|
|
1506
|
-
TranslocoModule,
|
|
1507
|
-
DirectivesModule,
|
|
1508
|
-
QuillModule.forRoot(),
|
|
1509
|
-
UiSwitchModule,
|
|
1510
|
-
ResourceEditCardComponent
|
|
1511
|
-
],
|
|
1512
|
-
exports: [ResourceEditCardComponent],
|
|
1513
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
1514
|
-
}]
|
|
1515
|
-
}]
|
|
1516
|
-
});
|
|
1517
807
|
var TestimonialCardListComponent = class TestimonialCardListComponent {
|
|
1518
808
|
constructor() {
|
|
1519
809
|
this.editPost = new EventEmitter();
|
|
@@ -1666,6 +956,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1666
956
|
canEdit: [{ type: Input }]
|
|
1667
957
|
}
|
|
1668
958
|
});
|
|
1669
|
-
export { CaseStudyCardComponent, ResourceCardComponent, ResourceCardsModule, ResourceCompanyCardComponent,
|
|
959
|
+
export { CaseStudyCardComponent, ResourceCardComponent, ResourceCardsModule, ResourceCompanyCardComponent, ResourceEditCardLazyComponent, ResourceModule, ResourceNoteCardComponent, ResourcePublicModule, ResourceService, ResourceSharedModule, ResourceTopBannerEditComponent, ResourceVaultComponent, ResourceVideoCardComponent, TestimonialCardListComponent, Trial4ContactUsModule, UpcomingEventCardComponent };
|
|
1670
960
|
|
|
1671
961
|
//# sourceMappingURL=posiwise-resource-module.mjs.map
|