@posiwise/resource-module 0.0.203 → 0.0.205
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{posiwise-resource-module-resource-blogs.module-mSKg7oDE.mjs → posiwise-resource-module-resource-blogs.module-C_sTQ0w2.mjs} +3 -3
- package/fesm2022/{posiwise-resource-module-resource-blogs.module-mSKg7oDE.mjs.map → posiwise-resource-module-resource-blogs.module-C_sTQ0w2.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-case-studies.module-rCEpwQ4J.mjs → posiwise-resource-module-resource-case-studies.module-D1hCU5_H.mjs} +3 -3
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-D1hCU5_H.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-events.module-Djau8zuG.mjs → posiwise-resource-module-resource-events.module-D7yC0Sqt.mjs} +3 -3
- package/fesm2022/posiwise-resource-module-resource-events.module-D7yC0Sqt.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-hub.module-CQtyBld2.mjs → posiwise-resource-module-resource-hub.module-alVvQLvR.mjs} +5 -5
- package/fesm2022/posiwise-resource-module-resource-hub.module-alVvQLvR.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-integrations.module-BXyPZf3W.mjs → posiwise-resource-module-resource-integrations.module-G4XvMMYf.mjs} +5 -5
- package/fesm2022/posiwise-resource-module-resource-integrations.module-G4XvMMYf.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-jobs.module-B53AOs8y.mjs → posiwise-resource-module-resource-jobs.module-DOdaBrZi.mjs} +3 -3
- package/fesm2022/{posiwise-resource-module-resource-jobs.module-B53AOs8y.mjs.map → posiwise-resource-module-resource-jobs.module-DOdaBrZi.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-post.module-DIaB5kyW.mjs → posiwise-resource-module-resource-post.module-CGxj27dN.mjs} +3 -3
- package/fesm2022/{posiwise-resource-module-resource-post.module-DIaB5kyW.mjs.map → posiwise-resource-module-resource-post.module-CGxj27dN.mjs.map} +1 -1
- package/fesm2022/{posiwise-resource-module-resource-release-notes.module-Btxs8la7.mjs → posiwise-resource-module-resource-release-notes.module-CLry1QNC.mjs} +5 -5
- package/fesm2022/posiwise-resource-module-resource-release-notes.module-CLry1QNC.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-root.module-BukwL-wp.mjs → posiwise-resource-module-resource-root.module-x4TYntdq.mjs} +7 -7
- package/fesm2022/posiwise-resource-module-resource-root.module-x4TYntdq.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-videos.module-CFkPbXn3.mjs → posiwise-resource-module-resource-videos.module-2ugtK7wA.mjs} +5 -5
- package/fesm2022/posiwise-resource-module-resource-videos.module-2ugtK7wA.mjs.map +1 -0
- package/fesm2022/{posiwise-resource-module-resource-white-papers.module-DBjSfwx4.mjs → posiwise-resource-module-resource-white-papers.module-pn6rtDc3.mjs} +5 -5
- package/fesm2022/posiwise-resource-module-resource-white-papers.module-pn6rtDc3.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module.mjs +176 -141
- package/fesm2022/posiwise-resource-module.mjs.map +1 -1
- package/package.json +1 -1
- package/types/posiwise-resource-module.d.ts +66 -20
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-rCEpwQ4J.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-events.module-Djau8zuG.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-hub.module-CQtyBld2.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-integrations.module-BXyPZf3W.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-release-notes.module-Btxs8la7.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-root.module-BukwL-wp.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-videos.module-CFkPbXn3.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-white-papers.module-DBjSfwx4.mjs.map +0 -1
|
@@ -31,6 +31,7 @@ import * as i2 from "ngx-ui-switch";
|
|
|
31
31
|
import { UiSwitchModule } from "ngx-ui-switch";
|
|
32
32
|
import { AutoComplete, AutoCompleteModule } from "primeng/autocomplete";
|
|
33
33
|
import { DatePicker, DatePickerModule } from "primeng/datepicker";
|
|
34
|
+
import { QuillHelper, editorImageUpload } from "@posiwise/utils/quill";
|
|
34
35
|
import moment from "moment";
|
|
35
36
|
var __defProp = Object.defineProperty;
|
|
36
37
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -46,47 +47,47 @@ const routes = [
|
|
|
46
47
|
{
|
|
47
48
|
path: "",
|
|
48
49
|
pathMatch: "full",
|
|
49
|
-
loadChildren: () => import("./posiwise-resource-module-resource-root.module-
|
|
50
|
+
loadChildren: () => import("./posiwise-resource-module-resource-root.module-x4TYntdq.mjs").then((m) => m.ResourceRootModule)
|
|
50
51
|
},
|
|
51
52
|
{
|
|
52
53
|
path: "hub",
|
|
53
|
-
loadChildren: () => import("./posiwise-resource-module-resource-hub.module-
|
|
54
|
+
loadChildren: () => import("./posiwise-resource-module-resource-hub.module-alVvQLvR.mjs").then((m) => m.ResourceHubModule)
|
|
54
55
|
},
|
|
55
56
|
{
|
|
56
57
|
path: "blogs",
|
|
57
|
-
loadChildren: () => import("./posiwise-resource-module-resource-blogs.module-
|
|
58
|
+
loadChildren: () => import("./posiwise-resource-module-resource-blogs.module-C_sTQ0w2.mjs").then((m) => m.ResourceBlogsModule)
|
|
58
59
|
},
|
|
59
60
|
{
|
|
60
61
|
path: "videos",
|
|
61
|
-
loadChildren: () => import("./posiwise-resource-module-resource-videos.module-
|
|
62
|
+
loadChildren: () => import("./posiwise-resource-module-resource-videos.module-2ugtK7wA.mjs").then((m) => m.ResourceVideosModule)
|
|
62
63
|
},
|
|
63
64
|
{
|
|
64
65
|
path: "integrations",
|
|
65
|
-
loadChildren: () => import("./posiwise-resource-module-resource-integrations.module-
|
|
66
|
+
loadChildren: () => import("./posiwise-resource-module-resource-integrations.module-G4XvMMYf.mjs").then((m) => m.ResourceIntegrationsModule)
|
|
66
67
|
},
|
|
67
68
|
{
|
|
68
69
|
path: "release-notes",
|
|
69
|
-
loadChildren: () => import("./posiwise-resource-module-resource-release-notes.module-
|
|
70
|
+
loadChildren: () => import("./posiwise-resource-module-resource-release-notes.module-CLry1QNC.mjs").then((m) => m.ResourceReleaseNotesModule)
|
|
70
71
|
},
|
|
71
72
|
{
|
|
72
73
|
path: "events",
|
|
73
|
-
loadChildren: () => import("./posiwise-resource-module-resource-events.module-
|
|
74
|
+
loadChildren: () => import("./posiwise-resource-module-resource-events.module-D7yC0Sqt.mjs").then((m) => m.ResourceEventsModule)
|
|
74
75
|
},
|
|
75
76
|
{
|
|
76
77
|
path: "white-papers",
|
|
77
|
-
loadChildren: () => import("./posiwise-resource-module-resource-white-papers.module-
|
|
78
|
+
loadChildren: () => import("./posiwise-resource-module-resource-white-papers.module-pn6rtDc3.mjs").then((m) => m.ResourceWhitePapersModule)
|
|
78
79
|
},
|
|
79
80
|
{
|
|
80
81
|
path: "case-studies",
|
|
81
|
-
loadChildren: () => import("./posiwise-resource-module-resource-case-studies.module-
|
|
82
|
+
loadChildren: () => import("./posiwise-resource-module-resource-case-studies.module-D1hCU5_H.mjs").then((m) => m.ResourceCaseStudiesModule)
|
|
82
83
|
},
|
|
83
84
|
{
|
|
84
85
|
path: "careers",
|
|
85
|
-
loadChildren: () => import("./posiwise-resource-module-resource-jobs.module-
|
|
86
|
+
loadChildren: () => import("./posiwise-resource-module-resource-jobs.module-DOdaBrZi.mjs").then((m) => m.ResourceJobsModule)
|
|
86
87
|
},
|
|
87
88
|
{
|
|
88
89
|
path: "view/:slug",
|
|
89
|
-
loadChildren: () => import("./posiwise-resource-module-resource-post.module-
|
|
90
|
+
loadChildren: () => import("./posiwise-resource-module-resource-post.module-CGxj27dN.mjs").then((m) => m.ResourcePostModule)
|
|
90
91
|
}
|
|
91
92
|
];
|
|
92
93
|
var BlogPublicRoutingModule = class BlogPublicRoutingModule {
|
|
@@ -535,7 +536,7 @@ var ResourceTopBannerEditComponent = class ResourceTopBannerEditComponent extend
|
|
|
535
536
|
}],
|
|
536
537
|
usesInheritance: true,
|
|
537
538
|
ngImport: i0,
|
|
538
|
-
template: "<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-black in-page-edit-icon mb-1 ms-3\"\n (click)=\"openEditModal()\"\n (keydown.enter)=\"openEditModal()\"\n (keydown.space)=\"openEditModal()\"\n title=\"Edit Blog Tag\"></i>\n</div>\n\n<ng-template #editModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Blog Post Tag</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row\">\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"\n aria-label=\"Title\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Description\" name=\"description\" controlId=\"resource-top-banner-description\">\n <textarea id=\"resource-top-banner-description\" name=\"description\" class=\"form-control\" rows=\"4\" formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Title\" name=\"meta_title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"meta_title\" placeholder=\"Meta Title for SEO\" id=\"input_meta_title_2\" name=\"input_meta_title_2\"\n aria-label=\"Meta Title for SEO\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Description\" name=\"meta_description\" controlId=\"resource-top-banner-meta_description\">\n <textarea id=\"resource-top-banner-meta_description\" name=\"meta_description\" class=\"form-control\" rows=\"3\" formControlName=\"meta_description\" placeholder=\"Meta Description for SEO\"\n aria-label=\"Meta Description for SEO\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 my-4\">\n <span id=\"resource-top-banner-tag-image-label\" class=\"pw-label-style\">Blog Tag Image</span>\n <div class=\"text-center d-flex flex-column align-items-center col-6\">\n <img [src]=\"image || defaultImage\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n (keydown.space)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Blog\"\n (error)=\"handleImageError($event)\"\n />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <
|
|
539
|
+
template: "<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-black in-page-edit-icon mb-1 ms-3\"\n (click)=\"openEditModal()\"\n (keydown.enter)=\"openEditModal()\"\n (keydown.space)=\"openEditModal()\"\n title=\"Edit Blog Tag\"></i>\n</div>\n\n<ng-template #editModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Blog Post Tag</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row\">\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"\n aria-label=\"Title\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Description\" name=\"description\" controlId=\"resource-top-banner-description\">\n <textarea id=\"resource-top-banner-description\" name=\"description\" class=\"form-control\" rows=\"4\" formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Title\" name=\"meta_title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"meta_title\" placeholder=\"Meta Title for SEO\" id=\"input_meta_title_2\" name=\"input_meta_title_2\"\n aria-label=\"Meta Title for SEO\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Description\" name=\"meta_description\" controlId=\"resource-top-banner-meta_description\">\n <textarea id=\"resource-top-banner-meta_description\" name=\"meta_description\" class=\"form-control\" rows=\"3\" formControlName=\"meta_description\" placeholder=\"Meta Description for SEO\"\n aria-label=\"Meta Description for SEO\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 my-4\">\n <span id=\"resource-top-banner-tag-image-label\" class=\"pw-label-style\">Blog Tag Image</span>\n <div class=\"text-center d-flex flex-column align-items-center col-6\">\n <img [src]=\"image || defaultImage\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n (keydown.space)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Blog\"\n (error)=\"handleImageError($event)\"\n />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <button type=\"button\" class=\"btn btn-link p-0 d-inline-block mt-2\"\n (click)=\"openImageModal(imageCropContent)\">\n {{ image ? 'Update' : 'Add' }} Image\n </button>\n @if (image) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (keydown.enter)=\"removeImage()\"\n (keydown.space)=\"removeImage()\"\n (click)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n\n </div>\n </form>\n </div>\n\n <div class=\"modal-footer\">\n <button class=\"btn btn-secondary\" (click)=\"modal.dismiss()\">Cancel</button>\n <button class=\"btn btn-primary\" [buttonBusy]=\"buttonBusy\" (click)=\"save()\">Save</button>\n </div>\n</ng-template>\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Image</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. Avoid artwork, celebrities, or copyrighted images.</small>\n <pw-image-cropper\n #cropper\n aspectRatio=\"dynamic\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n",
|
|
539
540
|
dependencies: [
|
|
540
541
|
{
|
|
541
542
|
kind: "ngmodule",
|
|
@@ -653,7 +654,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
653
654
|
ProfileImageCropperComponent
|
|
654
655
|
],
|
|
655
656
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
656
|
-
template: "<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-black in-page-edit-icon mb-1 ms-3\"\n (click)=\"openEditModal()\"\n (keydown.enter)=\"openEditModal()\"\n (keydown.space)=\"openEditModal()\"\n title=\"Edit Blog Tag\"></i>\n</div>\n\n<ng-template #editModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Blog Post Tag</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row\">\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"\n aria-label=\"Title\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Description\" name=\"description\" controlId=\"resource-top-banner-description\">\n <textarea id=\"resource-top-banner-description\" name=\"description\" class=\"form-control\" rows=\"4\" formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Title\" name=\"meta_title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"meta_title\" placeholder=\"Meta Title for SEO\" id=\"input_meta_title_2\" name=\"input_meta_title_2\"\n aria-label=\"Meta Title for SEO\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Description\" name=\"meta_description\" controlId=\"resource-top-banner-meta_description\">\n <textarea id=\"resource-top-banner-meta_description\" name=\"meta_description\" class=\"form-control\" rows=\"3\" formControlName=\"meta_description\" placeholder=\"Meta Description for SEO\"\n aria-label=\"Meta Description for SEO\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 my-4\">\n <span id=\"resource-top-banner-tag-image-label\" class=\"pw-label-style\">Blog Tag Image</span>\n <div class=\"text-center d-flex flex-column align-items-center col-6\">\n <img [src]=\"image || defaultImage\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n (keydown.space)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Blog\"\n (error)=\"handleImageError($event)\"\n />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <
|
|
657
|
+
template: "<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-black in-page-edit-icon mb-1 ms-3\"\n (click)=\"openEditModal()\"\n (keydown.enter)=\"openEditModal()\"\n (keydown.space)=\"openEditModal()\"\n title=\"Edit Blog Tag\"></i>\n</div>\n\n<ng-template #editModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Blog Post Tag</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row\">\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"\n aria-label=\"Title\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Description\" name=\"description\" controlId=\"resource-top-banner-description\">\n <textarea id=\"resource-top-banner-description\" name=\"description\" class=\"form-control\" rows=\"4\" formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Title\" name=\"meta_title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"meta_title\" placeholder=\"Meta Title for SEO\" id=\"input_meta_title_2\" name=\"input_meta_title_2\"\n aria-label=\"Meta Title for SEO\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Description\" name=\"meta_description\" controlId=\"resource-top-banner-meta_description\">\n <textarea id=\"resource-top-banner-meta_description\" name=\"meta_description\" class=\"form-control\" rows=\"3\" formControlName=\"meta_description\" placeholder=\"Meta Description for SEO\"\n aria-label=\"Meta Description for SEO\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 my-4\">\n <span id=\"resource-top-banner-tag-image-label\" class=\"pw-label-style\">Blog Tag Image</span>\n <div class=\"text-center d-flex flex-column align-items-center col-6\">\n <img [src]=\"image || defaultImage\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n (keydown.space)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Blog\"\n (error)=\"handleImageError($event)\"\n />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <button type=\"button\" class=\"btn btn-link p-0 d-inline-block mt-2\"\n (click)=\"openImageModal(imageCropContent)\">\n {{ image ? 'Update' : 'Add' }} Image\n </button>\n @if (image) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (keydown.enter)=\"removeImage()\"\n (keydown.space)=\"removeImage()\"\n (click)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n\n </div>\n </form>\n </div>\n\n <div class=\"modal-footer\">\n <button class=\"btn btn-secondary\" (click)=\"modal.dismiss()\">Cancel</button>\n <button class=\"btn btn-primary\" [buttonBusy]=\"buttonBusy\" (click)=\"save()\">Save</button>\n </div>\n</ng-template>\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Image</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. Avoid artwork, celebrities, or copyrighted images.</small>\n <pw-image-cropper\n #cropper\n aspectRatio=\"dynamic\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n"
|
|
657
658
|
}]
|
|
658
659
|
}],
|
|
659
660
|
propDecorators: {
|
|
@@ -821,35 +822,159 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
821
822
|
}]
|
|
822
823
|
}]
|
|
823
824
|
});
|
|
825
|
+
var ResourceEditCardImages = class ResourceEditCardImages extends AppBaseComponent {
|
|
826
|
+
constructor() {
|
|
827
|
+
super(...arguments);
|
|
828
|
+
this.modalService = inject(NgbModal);
|
|
829
|
+
this.image = "";
|
|
830
|
+
this.rectangularImage = "";
|
|
831
|
+
this.file = null;
|
|
832
|
+
this.rectangularFile = null;
|
|
833
|
+
}
|
|
834
|
+
openImageModal(modalTemplate) {
|
|
835
|
+
this.imageModalRef = this.modalService.open(modalTemplate, {
|
|
836
|
+
centered: true,
|
|
837
|
+
size: "md"
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
openRectModal(content) {
|
|
841
|
+
this.imageModalRef = this.modalService.open(content, {
|
|
842
|
+
centered: true,
|
|
843
|
+
windowClass: "modal-holder"
|
|
844
|
+
});
|
|
845
|
+
}
|
|
846
|
+
onImageSelected(base64) {
|
|
847
|
+
this.image = base64;
|
|
848
|
+
this.file = HelperService.convertBase64ToFile(base64);
|
|
849
|
+
this.imageModalRef?.close();
|
|
850
|
+
}
|
|
851
|
+
onRectangularImageSelection(base64) {
|
|
852
|
+
this.rectangularImage = base64;
|
|
853
|
+
this.rectangularFile = HelperService.convertBase64ToFile(base64);
|
|
854
|
+
this.imageModalRef?.close();
|
|
855
|
+
}
|
|
856
|
+
removeImage() {
|
|
857
|
+
this.image = null;
|
|
858
|
+
this.file = null;
|
|
859
|
+
}
|
|
860
|
+
deleteRectangularImage() {
|
|
861
|
+
this.rectangularImage = null;
|
|
862
|
+
this.rectangularFile = null;
|
|
863
|
+
}
|
|
864
|
+
handleImageError(event, fallbackPath) {
|
|
865
|
+
HelperService.handleImageFallbackPath(event, fallbackPath);
|
|
866
|
+
}
|
|
867
|
+
static {
|
|
868
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
869
|
+
minVersion: "12.0.0",
|
|
870
|
+
version: "22.2.3",
|
|
871
|
+
ngImport: i0,
|
|
872
|
+
type: ResourceEditCardImages,
|
|
873
|
+
deps: null,
|
|
874
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
static {
|
|
878
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
879
|
+
minVersion: "14.0.0",
|
|
880
|
+
version: "22.2.3",
|
|
881
|
+
type: ResourceEditCardImages,
|
|
882
|
+
isStandalone: true,
|
|
883
|
+
selector: "ng-component",
|
|
884
|
+
usesInheritance: true,
|
|
885
|
+
ngImport: i0,
|
|
886
|
+
template: "",
|
|
887
|
+
isInline: true
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
};
|
|
891
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
892
|
+
minVersion: "12.0.0",
|
|
893
|
+
version: "22.2.3",
|
|
894
|
+
ngImport: i0,
|
|
895
|
+
type: ResourceEditCardImages,
|
|
896
|
+
decorators: [{
|
|
897
|
+
type: Component,
|
|
898
|
+
args: [{ template: "" }]
|
|
899
|
+
}]
|
|
900
|
+
});
|
|
901
|
+
function resourceEditForm(fb) {
|
|
902
|
+
return fb.group({
|
|
903
|
+
title: [""],
|
|
904
|
+
external_url: [""],
|
|
905
|
+
cta_text: [""],
|
|
906
|
+
when: [""],
|
|
907
|
+
showcase: [false],
|
|
908
|
+
published_at: [false],
|
|
909
|
+
accepted_at: [false],
|
|
910
|
+
body: [""]
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
function resourceFormValue(resource) {
|
|
914
|
+
return {
|
|
915
|
+
title: resource.title ?? "",
|
|
916
|
+
external_url: resource.external_url ?? "",
|
|
917
|
+
cta_text: resource.cta_text ?? "",
|
|
918
|
+
when: resource.when ? new Date(resource.when) : "",
|
|
919
|
+
showcase: !!resource.showcase,
|
|
920
|
+
published_at: !!resource.published_at,
|
|
921
|
+
accepted_at: !!resource.accepted_at,
|
|
922
|
+
body: resource.body
|
|
923
|
+
};
|
|
924
|
+
}
|
|
925
|
+
function buildResourcePayload(form, subscriptionId, images) {
|
|
926
|
+
const data = {
|
|
927
|
+
...form.value,
|
|
928
|
+
subscription_id: subscriptionId
|
|
929
|
+
};
|
|
930
|
+
setFile(data, "picture", images.file);
|
|
931
|
+
setFile(data, "rectangular_picture", images.rectangularFile);
|
|
932
|
+
setToggledDate(form, data, "published_at");
|
|
933
|
+
setToggledDate(form, data, "accepted_at");
|
|
934
|
+
if (!form.get("when")?.value) data.when = "";
|
|
935
|
+
if (!form.get("showcase")?.value) data.showcase = "";
|
|
936
|
+
if (!images.file && !images.image) data.remove_picture = true;
|
|
937
|
+
if (!images.rectangularFile && !images.rectangularImage) data.remove_rectangular_picture = true;
|
|
938
|
+
return data;
|
|
939
|
+
}
|
|
940
|
+
function setFile(data, key, file) {
|
|
941
|
+
if (file) data[key] = file;
|
|
942
|
+
else delete data[key];
|
|
943
|
+
}
|
|
944
|
+
function setToggledDate(form, data, key) {
|
|
945
|
+
const control = form.get(key);
|
|
946
|
+
if (control?.dirty) data[key] = control.value ? moment().format("DD-MMM-YYYY") : "";
|
|
947
|
+
else delete data[key];
|
|
948
|
+
}
|
|
949
|
+
function filterTags(tags, query) {
|
|
950
|
+
if (!query) return [...tags];
|
|
951
|
+
const needle = query.toLowerCase();
|
|
952
|
+
return tags.filter((tag) => tag.name.toLowerCase().includes(needle));
|
|
953
|
+
}
|
|
954
|
+
function postTagsPayload(tags, postId) {
|
|
955
|
+
return {
|
|
956
|
+
entity_tags: tags.map((tag) => ({ tag_id: tag.id })),
|
|
957
|
+
slug: postId,
|
|
958
|
+
tag_entity: "Post"
|
|
959
|
+
};
|
|
960
|
+
}
|
|
824
961
|
var resource_edit_card_component_exports = /* @__PURE__ */ __exportAll({ ResourceEditCardComponent: () => ResourceEditCardComponent });
|
|
825
|
-
var ResourceEditCardComponent = class ResourceEditCardComponent extends
|
|
962
|
+
var ResourceEditCardComponent = class ResourceEditCardComponent extends ResourceEditCardImages {
|
|
826
963
|
constructor() {
|
|
827
964
|
super();
|
|
828
965
|
this.fb = inject(FormBuilder);
|
|
829
|
-
this.modalService = inject(NgbModal);
|
|
830
966
|
this.resourceService = inject(ResourceService);
|
|
831
967
|
this.authService = inject(AuthService);
|
|
832
968
|
this.tagService = inject(TagService);
|
|
833
969
|
this.cdr = inject(ChangeDetectorRef);
|
|
834
970
|
this.updated = new EventEmitter();
|
|
835
|
-
this.image = "";
|
|
836
|
-
this.rectangularImage = "";
|
|
837
|
-
this.file = null;
|
|
838
|
-
this.rectangularFile = null;
|
|
839
971
|
this.selectedTags = [];
|
|
840
972
|
this.allTags = [];
|
|
841
973
|
this.tagsSuggestion = [];
|
|
842
974
|
this.buttonBusy = false;
|
|
843
|
-
this.
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
cta_text: [""],
|
|
847
|
-
when: [""],
|
|
848
|
-
showcase: [false],
|
|
849
|
-
published_at: [false],
|
|
850
|
-
accepted_at: [false],
|
|
851
|
-
body: [""]
|
|
852
|
-
});
|
|
975
|
+
this.editorConfig = QuillHelper.getEditorConfig([], editorImageUpload(() => this.subscriptionId));
|
|
976
|
+
QuillHelper.init();
|
|
977
|
+
this.editForm = resourceEditForm(this.fb);
|
|
853
978
|
}
|
|
854
979
|
ngOnInit() {
|
|
855
980
|
this.authService.getToken$().subscribe((res) => {
|
|
@@ -869,17 +994,7 @@ var ResourceEditCardComponent = class ResourceEditCardComponent extends AppBaseC
|
|
|
869
994
|
}
|
|
870
995
|
openModal(modalTemplate) {
|
|
871
996
|
if (this.resourceData) {
|
|
872
|
-
|
|
873
|
-
this.editForm.setValue({
|
|
874
|
-
title: this.resourceData.title ?? "",
|
|
875
|
-
external_url: this.resourceData.external_url ?? "",
|
|
876
|
-
cta_text: this.resourceData.cta_text ?? "",
|
|
877
|
-
when: when ?? "",
|
|
878
|
-
showcase: !!this.resourceData.showcase,
|
|
879
|
-
published_at: !!this.resourceData.published_at,
|
|
880
|
-
accepted_at: !!this.resourceData.accepted_at,
|
|
881
|
-
body: this.resourceData.body
|
|
882
|
-
});
|
|
997
|
+
this.editForm.setValue(resourceFormValue(this.resourceData));
|
|
883
998
|
this.image = this.resourceData.picture?.url ?? "";
|
|
884
999
|
this.selectedTags = this.resourceData?.tags?.length ? [...this.resourceData.tags] : [];
|
|
885
1000
|
this.rectangularImage = this.resourceData.rectangular_picture?.url ?? "";
|
|
@@ -891,12 +1006,7 @@ var ResourceEditCardComponent = class ResourceEditCardComponent extends AppBaseC
|
|
|
891
1006
|
this.getPostTags();
|
|
892
1007
|
}
|
|
893
1008
|
search(event) {
|
|
894
|
-
|
|
895
|
-
if (event.query) values = this.allTags.filter((x) => x.name.toLowerCase().includes(event.query.toLowerCase()));
|
|
896
|
-
else this.allTags.forEach((element) => {
|
|
897
|
-
values.push(element);
|
|
898
|
-
});
|
|
899
|
-
this.tagsSuggestion = values;
|
|
1009
|
+
this.tagsSuggestion = filterTags(this.allTags, event.query);
|
|
900
1010
|
}
|
|
901
1011
|
getPostTags() {
|
|
902
1012
|
this.tagService.getTagsByType("post_categories", {}, this.subscriptionId).subscribe((response) => {
|
|
@@ -904,112 +1014,37 @@ var ResourceEditCardComponent = class ResourceEditCardComponent extends AppBaseC
|
|
|
904
1014
|
this.cdr.markForCheck();
|
|
905
1015
|
});
|
|
906
1016
|
}
|
|
907
|
-
deleteRectangularImage() {
|
|
908
|
-
this.rectangularImage = null;
|
|
909
|
-
this.rectangularFile = null;
|
|
910
|
-
}
|
|
911
|
-
openImageModal(modalTemplate) {
|
|
912
|
-
this.imageModalRef = this.modalService.open(modalTemplate, {
|
|
913
|
-
centered: true,
|
|
914
|
-
size: "md"
|
|
915
|
-
});
|
|
916
|
-
}
|
|
917
|
-
onImageSelected(base64) {
|
|
918
|
-
this.image = base64;
|
|
919
|
-
this.file = HelperService.convertBase64ToFile(base64);
|
|
920
|
-
this.imageModalRef?.close();
|
|
921
|
-
}
|
|
922
|
-
onRectangularImageSelection(base64) {
|
|
923
|
-
this.rectangularImage = base64;
|
|
924
|
-
this.rectangularFile = HelperService.convertBase64ToFile(base64);
|
|
925
|
-
this.imageModalRef?.close();
|
|
926
|
-
}
|
|
927
|
-
removeImage() {
|
|
928
|
-
this.image = null;
|
|
929
|
-
this.file = null;
|
|
930
|
-
}
|
|
931
1017
|
saveResource() {
|
|
932
1018
|
this.buttonBusy = true;
|
|
933
1019
|
this.saveTags(this.id);
|
|
934
|
-
const payload =
|
|
935
|
-
...this.editForm.value,
|
|
936
|
-
subscription_id: this.subscriptionId
|
|
937
|
-
};
|
|
938
|
-
this.handlePicture(payload);
|
|
939
|
-
this.handlePublishedAt(payload);
|
|
940
|
-
this.handleAcceptedAt(payload);
|
|
941
|
-
this.handleAcceptedAt(payload);
|
|
942
|
-
this.handleOptionalFields(payload);
|
|
943
|
-
this.handleRectangularPicture(payload);
|
|
944
|
-
this.handleRemovals(payload);
|
|
1020
|
+
const payload = buildResourcePayload(this.editForm, this.subscriptionId, this);
|
|
945
1021
|
this.resourceService.updatePost(payload, this.id).subscribe({
|
|
946
|
-
next: () => {
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
this.updated.emit();
|
|
953
|
-
this.modalService.dismissAll();
|
|
954
|
-
this.cdr.markForCheck();
|
|
955
|
-
}, 0);
|
|
956
|
-
}, 0);
|
|
957
|
-
},
|
|
958
|
-
error: () => {
|
|
959
|
-
setTimeout(() => {
|
|
960
|
-
this.buttonBusy = false;
|
|
961
|
-
this.cdr.markForCheck();
|
|
962
|
-
}, 0);
|
|
963
|
-
}
|
|
1022
|
+
next: () => this.settleSave(() => {
|
|
1023
|
+
this.toast.success("Blog Post Updated");
|
|
1024
|
+
this.updated.emit();
|
|
1025
|
+
this.modalService.dismissAll();
|
|
1026
|
+
}),
|
|
1027
|
+
error: () => this.settleSave()
|
|
964
1028
|
});
|
|
965
1029
|
}
|
|
1030
|
+
settleSave(afterSuccess) {
|
|
1031
|
+
setTimeout(() => {
|
|
1032
|
+
this.buttonBusy = false;
|
|
1033
|
+
this.cdr.markForCheck();
|
|
1034
|
+
if (afterSuccess) setTimeout(() => {
|
|
1035
|
+
afterSuccess();
|
|
1036
|
+
this.cdr.markForCheck();
|
|
1037
|
+
}, 0);
|
|
1038
|
+
}, 0);
|
|
1039
|
+
}
|
|
966
1040
|
saveTags(id) {
|
|
967
1041
|
if (this.selectedTags.length) {
|
|
968
|
-
const data =
|
|
969
|
-
entity_tags: this.selectedTags.map((tag) => ({ tag_id: tag.id })),
|
|
970
|
-
slug: id,
|
|
971
|
-
tag_entity: "Post"
|
|
972
|
-
};
|
|
1042
|
+
const data = postTagsPayload(this.selectedTags, id);
|
|
973
1043
|
this.tagService.addTags(data, this.subscriptionId).subscribe(() => {
|
|
974
1044
|
this.cdr.markForCheck();
|
|
975
1045
|
});
|
|
976
1046
|
}
|
|
977
1047
|
}
|
|
978
|
-
handlePicture(data) {
|
|
979
|
-
if (this.file) data.picture = this.file;
|
|
980
|
-
else delete data.picture;
|
|
981
|
-
}
|
|
982
|
-
handlePublishedAt(data) {
|
|
983
|
-
const control = this.editForm.get("published_at");
|
|
984
|
-
if (control?.dirty) data.published_at = control.value ? moment().format("DD-MMM-YYYY") : "";
|
|
985
|
-
else delete data.published_at;
|
|
986
|
-
}
|
|
987
|
-
handleAcceptedAt(data) {
|
|
988
|
-
const control = this.editForm.get("accepted_at");
|
|
989
|
-
if (control?.dirty) data.accepted_at = control.value ? moment().format("DD-MMM-YYYY") : "";
|
|
990
|
-
else delete data.accepted_at;
|
|
991
|
-
}
|
|
992
|
-
handleOptionalFields(data) {
|
|
993
|
-
if (!this.editForm.get("when")?.value) data.when = "";
|
|
994
|
-
if (!this.editForm.get("showcase")?.value) data.showcase = "";
|
|
995
|
-
}
|
|
996
|
-
handleRectangularPicture(data) {
|
|
997
|
-
if (this.rectangularFile) data.rectangular_picture = this.rectangularFile;
|
|
998
|
-
else delete data.rectangular_picture;
|
|
999
|
-
}
|
|
1000
|
-
handleRemovals(data) {
|
|
1001
|
-
if (!this.file && !this.image) data.remove_picture = true;
|
|
1002
|
-
if (!this.rectangularFile && !this.rectangularImage) data.remove_rectangular_picture = true;
|
|
1003
|
-
}
|
|
1004
|
-
openRectModal(content) {
|
|
1005
|
-
this.imageModalRef = this.modalService.open(content, {
|
|
1006
|
-
centered: true,
|
|
1007
|
-
windowClass: "modal-holder"
|
|
1008
|
-
});
|
|
1009
|
-
}
|
|
1010
|
-
handleImageError(event, fallbackPath) {
|
|
1011
|
-
HelperService.handleImageFallbackPath(event, fallbackPath);
|
|
1012
|
-
}
|
|
1013
1048
|
static {
|
|
1014
1049
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1015
1050
|
minVersion: "12.0.0",
|
|
@@ -1034,7 +1069,7 @@ var ResourceEditCardComponent = class ResourceEditCardComponent extends AppBaseC
|
|
|
1034
1069
|
outputs: { updated: "updated" },
|
|
1035
1070
|
usesInheritance: true,
|
|
1036
1071
|
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 [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 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 <a class=\"d-inline-block\" (click)=\"openImageModal(imageCropContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\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 <a class=\"d-inline-block\" (click)=\"openRectModal(rectContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\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\" (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",
|
|
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",
|
|
1038
1073
|
styles: ["::ng-deep .modal-content{margin-top:5rem!important}\n"],
|
|
1039
1074
|
dependencies: [
|
|
1040
1075
|
{
|
|
@@ -1384,7 +1419,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1384
1419
|
TranslocoPipe
|
|
1385
1420
|
],
|
|
1386
1421
|
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 [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 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 <a class=\"d-inline-block\" (click)=\"openImageModal(imageCropContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\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 <a class=\"d-inline-block\" (click)=\"openRectModal(rectContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\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\" (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",
|
|
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",
|
|
1388
1423
|
styles: ["::ng-deep .modal-content{margin-top:5rem!important}\n"]
|
|
1389
1424
|
}]
|
|
1390
1425
|
}],
|