@posiwise/dashboard-module 0.0.144 → 0.0.146
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.
|
@@ -8,7 +8,7 @@ import * as i1 from '@posiwise/common-services';
|
|
|
8
8
|
import { PermissionService, SubscriptionService } from '@posiwise/common-services';
|
|
9
9
|
import { CoreTranslocoModule } from '@posiwise/core-transloco';
|
|
10
10
|
import { DirectivesModule } from '@posiwise/directives';
|
|
11
|
-
import * as i5 from '@posiwise/pipes';
|
|
11
|
+
import * as i5$1 from '@posiwise/pipes';
|
|
12
12
|
import { PipesModule } from '@posiwise/pipes';
|
|
13
13
|
import { UserModuleModule } from '@posiwise/user-module';
|
|
14
14
|
import * as i3 from 'primeng/progressspinner';
|
|
@@ -22,15 +22,18 @@ import * as i1$1 from '@angular/router';
|
|
|
22
22
|
import { RouterModule } from '@angular/router';
|
|
23
23
|
import * as i4 from '@posiwise/shared-components';
|
|
24
24
|
import { ResourceSharedComponentsModule } from '@posiwise/shared-components';
|
|
25
|
+
import * as i5 from 'primeng/tooltip';
|
|
26
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
25
27
|
import * as i2 from '@angular/platform-browser';
|
|
26
28
|
import { AppBaseComponent } from '@posiwise/app-base-component';
|
|
29
|
+
import { ADMIN_ROUTERS } from '@posiwise/common-utilities';
|
|
27
30
|
import { HelperService } from '@posiwise/helper-service';
|
|
28
|
-
import groupBy from 'lodash/groupBy';
|
|
29
|
-
import sortBy from 'lodash/sortBy';
|
|
30
31
|
import { Subject, forkJoin } from 'rxjs';
|
|
31
32
|
import { debounceTime, takeUntil, finalize } from 'rxjs/operators';
|
|
33
|
+
import groupBy from 'lodash/groupBy';
|
|
34
|
+
import sortBy from 'lodash/sortBy';
|
|
35
|
+
import * as i7 from '@jsverse/transloco';
|
|
32
36
|
import moment from 'moment';
|
|
33
|
-
import * as i4$1 from '@jsverse/transloco';
|
|
34
37
|
|
|
35
38
|
class DocumentationComponent {
|
|
36
39
|
constructor(sanitizer) {
|
|
@@ -64,6 +67,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
64
67
|
args: [{ selector: 'pw-documentation', standalone: false, template: "@if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"></p-progressSpinner>\n </div>\n}\n\n<div class=\"documentation-wrapper\" [hidden]=\"!isLoaded || !iframeUrl\">\n @if (iframeUrl) {\n <iframe\n [src]=\"iframeUrl\"\n width=\"100%\"\n height=\"100%\"\n allowfullscreen\n title=\"Documentation Frame\"\n (load)=\"onIframeLoad()\"\n ></iframe>\n }\n</div>\n", styles: [".documentation-wrapper{width:100%;height:100vh}.documentation-wrapper iframe{width:100%;height:100%;border:none}\n"] }]
|
|
65
68
|
}], ctorParameters: () => [{ type: i2.DomSanitizer }] });
|
|
66
69
|
|
|
70
|
+
/// The permission expression guarding the admin FAQ routes. Kept verbatim in
|
|
71
|
+
/// step with `libs/admin-module/src/lib/admin-module.routing.ts`, where the
|
|
72
|
+
/// `faq` parent and its `add` / `:id` children all carry this exact string.
|
|
73
|
+
/// Offering an edit affordance to anyone `PageAccessGuard` would then bounce
|
|
74
|
+
/// to `notfound` is the failure mode this mirroring exists to prevent.
|
|
75
|
+
///
|
|
76
|
+
/// Shared by the public FAQ list (`FaqComponent`) and the public FAQ detail
|
|
77
|
+
/// page (`FaqDetailsComponent`) so the two surfaces can never drift apart.
|
|
78
|
+
const FAQ_ADMIN_PERMISSION = 'Pages.Admin.FAQ || Pages.Role.MarketingManager || Pages.Role.CustomerSuccessManager';
|
|
79
|
+
|
|
80
|
+
/// Non-product FAQs first, then product-scoped ones, grouped by category and
|
|
81
|
+
/// ordered by `position` within each group.
|
|
82
|
+
function groupFaqsByCategory(nonProductFaqs, productFaqs) {
|
|
83
|
+
const grouped = groupBy([...nonProductFaqs, ...productFaqs], 'category');
|
|
84
|
+
Object.keys(grouped).forEach(category => {
|
|
85
|
+
grouped[category] = sortBy(grouped[category], 'position');
|
|
86
|
+
});
|
|
87
|
+
return grouped;
|
|
88
|
+
}
|
|
89
|
+
/// Sanitize every answer up front so the markup is present before the collapse
|
|
90
|
+
/// measures its target height — prevents the end-of-animation height snap that
|
|
91
|
+
/// made expand/collapse feel clunky. Keyed `{itemIndex}-{categoryIndex}` to
|
|
92
|
+
/// match the template's collapse ids.
|
|
93
|
+
function buildSanitizedAnswers(faqs, sanitize) {
|
|
94
|
+
const answers = {};
|
|
95
|
+
Object.keys(faqs).forEach((category, categoryIndex) => {
|
|
96
|
+
faqs[category].forEach((faq, itemIndex) => {
|
|
97
|
+
if (faq?.answer) {
|
|
98
|
+
answers[`${itemIndex}-${categoryIndex}`] = sanitize(faq.answer);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
return answers;
|
|
103
|
+
}
|
|
104
|
+
|
|
67
105
|
class FaqComponent extends AppBaseComponent {
|
|
68
106
|
constructor(commonService, injector, productService, sanitizer, cdr) {
|
|
69
107
|
super(injector);
|
|
@@ -79,6 +117,11 @@ class FaqComponent extends AppBaseComponent {
|
|
|
79
117
|
this.isLoaded = false;
|
|
80
118
|
this.faqsResponse = [];
|
|
81
119
|
this.faqHashMap = {};
|
|
120
|
+
this.routers = ADMIN_ROUTERS;
|
|
121
|
+
/// Whether to offer the inline link through to the admin edit form. Unlike
|
|
122
|
+
/// the detail page, the list endpoint returns each FAQ's `id`, so no
|
|
123
|
+
/// fallback is needed here.
|
|
124
|
+
this.canEditFaq = false;
|
|
82
125
|
}
|
|
83
126
|
ngOnInit() {
|
|
84
127
|
this.faqHashMap = {};
|
|
@@ -87,6 +130,7 @@ class FaqComponent extends AppBaseComponent {
|
|
|
87
130
|
this.slug = PermissionService.selectedSubscription?.slug;
|
|
88
131
|
this.subscriptionId = PermissionService?.selectedSubscription?.id;
|
|
89
132
|
this.masterProductId = this.appConfig.master_subscription.product_id;
|
|
133
|
+
this.canEditFaq = this.permissionService.evaluatePermissions(FAQ_ADMIN_PERMISSION);
|
|
90
134
|
this.getProducts();
|
|
91
135
|
this.searchSubject
|
|
92
136
|
.pipe(debounceTime(1000), takeUntil(this.destroy$))
|
|
@@ -129,27 +173,8 @@ class FaqComponent extends AppBaseComponent {
|
|
|
129
173
|
});
|
|
130
174
|
}
|
|
131
175
|
faqValidation() {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
Object.keys(groupedFaqs).forEach(category => {
|
|
135
|
-
groupedFaqs[category] = sortBy(groupedFaqs[category], 'position');
|
|
136
|
-
});
|
|
137
|
-
this.faqs = groupedFaqs; // Use a single collection for all FAQs
|
|
138
|
-
this.prepareSanitizedAnswers();
|
|
139
|
-
}
|
|
140
|
-
// Sanitize every answer up front so the markup is present before the
|
|
141
|
-
// collapse measures its target height — prevents the end-of-animation
|
|
142
|
-
// height snap that made expand/collapse feel clunky.
|
|
143
|
-
prepareSanitizedAnswers() {
|
|
144
|
-
this.sanitizedFaqAnswers = {};
|
|
145
|
-
Object.keys(this.faqs).forEach((category, categoryIndex) => {
|
|
146
|
-
this.faqs[category].forEach((faq, itemIndex) => {
|
|
147
|
-
if (faq?.answer) {
|
|
148
|
-
this.sanitizedFaqAnswers[`${itemIndex}-${categoryIndex}`] =
|
|
149
|
-
this.sanitizeFaqAnswer(faq.answer);
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
});
|
|
176
|
+
this.faqs = groupFaqsByCategory(this.nonProductFaqs, this.allProductFaqs);
|
|
177
|
+
this.sanitizedFaqAnswers = buildSanitizedAnswers(this.faqs, body => this.sanitizeFaqAnswer(body));
|
|
153
178
|
}
|
|
154
179
|
getProducts() {
|
|
155
180
|
this.subscriptions = [];
|
|
@@ -189,11 +214,11 @@ class FaqComponent extends AppBaseComponent {
|
|
|
189
214
|
super.ngOnDestroy();
|
|
190
215
|
}
|
|
191
216
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: FaqComponent, deps: [{ token: i1.CommonService }, { token: i0.Injector }, { token: i1.ProductService }, { token: i2.DomSanitizer }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
192
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: FaqComponent, isStandalone: false, selector: "pw-faq", usesInheritance: true, ngImport: i0, template: "<div class=\"mt-md-4 mt-4\">\n <div class=\"row mb-3\">\n <div class=\"col-12\">\n <div class=\"card gradient-custom-branding white text-center p-1 p-sm-2\">\n <div class=\"card-header p-1 p-sm-2\">\n <div class=\"d-flex justify-content-between align-items-start mb-3 mb-md-0\">\n <div>\n @if (showDocumentation) {\n <button\n class=\"btn btn-sm document-btn\"\n (click)=\"navigateToDocumentation()\">\n Documentation\n </button>\n }\n </div>\n <div>\n @if (showSupport) {\n <button\n class=\"btn btn-sm btn-primary\"\n (click)=\"navigateToSupport()\">\n Support\n </button>\n }\n </div>\n </div>\n\n <h1>You need help?</h1>\n <p><em>Please search through our frequently asked questions first.</em></p>\n </div>\n <div class=\"card-block p-2 p-sm-2\">\n <fieldset>\n <legend></legend>\n <label for=\"faq-search\" class=\"visually-hidden\">Search in FAQs</label>\n <input type=\"text\"\n id=\"faq-search\"\n name=\"faq-search\"\n class=\"form-control bg-white\"\n placeholder=\"Search FAQs...\"\n (input)=\"filter($event.target.value)\"\n #messageInput\n aria-label=\"Search FAQs...\" />\n </fieldset>\n </div>\n </div>\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (faqs) {\n @for (category of objectKeys(faqs); track category; let idx1 = $index) {\n <div>\n @if (faqs[category]?.length) {\n <h6 class=\"text-uppercase mt-3 p-1\">{{ faqHashMap[category]?.name }}</h6>\n <div class=\"dashboard\">\n @for (\n faq of faqs[category]; track trackByProductFaqId(idx,\n faq); let idx = $index) {\n <div class=\"faq-item\"\n >\n <div class=\"dashboard-header p-2\">\n <h5 class=\"accordion-title mt-2\">\n <a class=\"accordion-toggle collapsed\"\n data-bs-toggle=\"collapse\"\n (click)=\"onCollapseToggle(idx + '-' + idx1, faq?.answer)\"\n [href]=\"'#collapse' + idx + idx1\">\n {{ faq.question }}\n </a>\n </h5>\n </div>\n <div [id]=\"'collapse' + idx + idx1\"\n class=\"panel-collapse p-3 collapse in\">\n <div class=\"card-block\">\n @if (faq?.answer) {\n <div class=\"ql-container ql-snow no-border\">\n <div class=\"ql-editor\"\n [innerHTML]=\"sanitizedFaqAnswers[idx + '-' + idx1]\">\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n }\n @if (isLoaded && (totalRecords === 0 || allFaqFalse)) {\n <div>\n <pw-no-data [withImage]=\"true\" message=\"This is embarrassing - we couldn't find any FAQ.\"> </pw-no-data>\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--public-btn-radius: 24px}.card-header h1,.card-header p{color:#fff!important}.faq-item{border:1px solid rgb(224,224,224);background-color:#fff;border-radius:8px;margin:8px 0;overflow:hidden;transition:border-color .16s ease-out,box-shadow .16s ease-out}.faq-item:hover{border-color:#bdbdbd}.faq-item .dashboard-header{background:transparent;padding:0
|
|
217
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: FaqComponent, isStandalone: false, selector: "pw-faq", usesInheritance: true, ngImport: i0, template: "<div class=\"mt-md-4 mt-4\">\n <div class=\"row mb-3\">\n <div class=\"col-12\">\n <div class=\"card gradient-custom-branding white text-center p-1 p-sm-2\">\n <div class=\"card-header p-1 p-sm-2\">\n <div class=\"d-flex justify-content-between align-items-start mb-3 mb-md-0\">\n <div>\n @if (showDocumentation) {\n <button\n class=\"btn btn-sm document-btn\"\n (click)=\"navigateToDocumentation()\">\n Documentation\n </button>\n }\n </div>\n <div>\n @if (showSupport) {\n <button\n class=\"btn btn-sm btn-primary\"\n (click)=\"navigateToSupport()\">\n Support\n </button>\n }\n </div>\n </div>\n\n <h1>You need help?</h1>\n <p><em>Please search through our frequently asked questions first.</em></p>\n </div>\n <div class=\"card-block p-2 p-sm-2\">\n <fieldset>\n <legend></legend>\n <label for=\"faq-search\" class=\"visually-hidden\">Search in FAQs</label>\n <input type=\"text\"\n id=\"faq-search\"\n name=\"faq-search\"\n class=\"form-control bg-white\"\n placeholder=\"Search FAQs...\"\n (input)=\"filter($event.target.value)\"\n #messageInput\n aria-label=\"Search FAQs...\" />\n </fieldset>\n </div>\n </div>\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (faqs) {\n @for (category of objectKeys(faqs); track category; let idx1 = $index) {\n <div>\n @if (faqs[category]?.length) {\n <h6 class=\"text-uppercase mt-3 p-1\">{{ faqHashMap[category]?.name }}</h6>\n <div class=\"dashboard\">\n @for (\n faq of faqs[category]; track trackByProductFaqId(idx,\n faq); let idx = $index) {\n <div class=\"faq-item\"\n >\n <div class=\"dashboard-header p-2\">\n <h5 class=\"accordion-title mt-2\">\n <a class=\"accordion-toggle collapsed\"\n data-bs-toggle=\"collapse\"\n (click)=\"onCollapseToggle(idx + '-' + idx1, faq?.answer)\"\n [href]=\"'#collapse' + idx + idx1\">\n {{ faq.question }}\n </a>\n </h5>\n @if (canEditFaq && faq?.id) {\n <a class=\"faq-edit-link\"\n [pTooltip]=\"'Admin.Faq.EditTitle' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n [attr.aria-label]=\"'Admin.Faq.EditTitle' | transloco\"\n [routerLink]=\"[routers.faqDetails + faq.id]\"\n target=\"_blank\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </a>\n }\n </div>\n <div [id]=\"'collapse' + idx + idx1\"\n class=\"panel-collapse p-3 collapse in\">\n <div class=\"card-block\">\n @if (faq?.answer) {\n <div class=\"ql-container ql-snow no-border\">\n <div class=\"ql-editor\"\n [innerHTML]=\"sanitizedFaqAnswers[idx + '-' + idx1]\">\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n }\n @if (isLoaded && (totalRecords === 0 || allFaqFalse)) {\n <div>\n <pw-no-data [withImage]=\"true\" message=\"This is embarrassing - we couldn't find any FAQ.\"> </pw-no-data>\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--public-btn-radius: 24px}.card-header h1,.card-header p{color:#fff!important}.faq-item{border:1px solid rgb(224,224,224);background-color:#fff;border-radius:8px;margin:8px 0;overflow:hidden;transition:border-color .16s ease-out,box-shadow .16s ease-out}.faq-item:hover{border-color:#bdbdbd}.faq-item .dashboard-header{background:transparent;padding:0;display:flex;align-items:center;position:relative}.faq-item .dashboard-header:after{content:\"\\f078\";font-family:\"Font Awesome 5 Pro\",sans-serif;font-weight:600;font-size:13px;color:#9e9e9e;flex:0 0 auto;margin-left:auto;margin-right:18px;transition:transform .18s ease-out,color .18s ease-out}.faq-item .dashboard-header:hover:after{color:var(--titles)}.faq-item .dashboard-header:has(.accordion-toggle:not(.collapsed)):after{transform:rotate(180deg);color:var(--titles)}.faq-item .accordion-title{margin:0;flex:0 1 auto;min-width:0}.faq-item .faq-edit-link{position:relative;z-index:1;display:inline-flex;align-items:center;flex:0 0 auto;padding:14px 8px;text-decoration:none}.faq-item .faq-edit-link .edit-icon{font-size:14px}.faq-item .accordion-toggle{display:flex;align-items:center;padding:14px 4px 14px 18px;font-size:15px;font-weight:600;line-height:1.45;color:var(--titles);text-decoration:none;cursor:pointer}.faq-item .accordion-toggle:before{content:\"\"!important;position:absolute;inset:0;width:auto;padding:0}.faq-item .accordion-toggle:focus-visible{outline:2px solid var(--first);outline-offset:-2px}.faq-item .panel-collapse{padding:0!important}.faq-item .card-block{padding:4px 18px 16px;border-top:1px solid rgb(238,238,238)}.faq-item .ql-editor{font-size:14px;line-height:1.65;color:#616161;text-align:left}.document-btn{background-color:var(--second);border-color:var(--second)!important;color:#fff}.document-btn:hover{color:var(--second)!important;background-color:transparent!important}.card{background:var(--sidebar_bg)!important;color:var(--sidebar_text)!important;padding:.8rem!important}.card .accordion-toggle:before{content:\"\\f078\"}.card .accordion-toggle.collapsed{transition:all .3s ease-in-out}.card .accordion-toggle.collapsed:before{content:\"\\f054\"}h6{color:var(--titles)!important;font-size:17px;font-weight:700;letter-spacing:.04em;padding:0 0 10px!important;margin:32px 0 14px!important;border-bottom:1px solid rgb(224,224,224)}.accordion-title a{color:var(--titles)!important}.ql-container{resize:none!important;max-width:1000px;margin:0 auto}\n"], dependencies: [{ kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i3.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "directive", type: i5.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: i4.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "pipe", type: i7.TranslocoPipe, name: "transloco" }] }); }
|
|
193
218
|
}
|
|
194
219
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: FaqComponent, decorators: [{
|
|
195
220
|
type: Component,
|
|
196
|
-
args: [{ selector: 'pw-faq', standalone: false, template: "<div class=\"mt-md-4 mt-4\">\n <div class=\"row mb-3\">\n <div class=\"col-12\">\n <div class=\"card gradient-custom-branding white text-center p-1 p-sm-2\">\n <div class=\"card-header p-1 p-sm-2\">\n <div class=\"d-flex justify-content-between align-items-start mb-3 mb-md-0\">\n <div>\n @if (showDocumentation) {\n <button\n class=\"btn btn-sm document-btn\"\n (click)=\"navigateToDocumentation()\">\n Documentation\n </button>\n }\n </div>\n <div>\n @if (showSupport) {\n <button\n class=\"btn btn-sm btn-primary\"\n (click)=\"navigateToSupport()\">\n Support\n </button>\n }\n </div>\n </div>\n\n <h1>You need help?</h1>\n <p><em>Please search through our frequently asked questions first.</em></p>\n </div>\n <div class=\"card-block p-2 p-sm-2\">\n <fieldset>\n <legend></legend>\n <label for=\"faq-search\" class=\"visually-hidden\">Search in FAQs</label>\n <input type=\"text\"\n id=\"faq-search\"\n name=\"faq-search\"\n class=\"form-control bg-white\"\n placeholder=\"Search FAQs...\"\n (input)=\"filter($event.target.value)\"\n #messageInput\n aria-label=\"Search FAQs...\" />\n </fieldset>\n </div>\n </div>\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (faqs) {\n @for (category of objectKeys(faqs); track category; let idx1 = $index) {\n <div>\n @if (faqs[category]?.length) {\n <h6 class=\"text-uppercase mt-3 p-1\">{{ faqHashMap[category]?.name }}</h6>\n <div class=\"dashboard\">\n @for (\n faq of faqs[category]; track trackByProductFaqId(idx,\n faq); let idx = $index) {\n <div class=\"faq-item\"\n >\n <div class=\"dashboard-header p-2\">\n <h5 class=\"accordion-title mt-2\">\n <a class=\"accordion-toggle collapsed\"\n data-bs-toggle=\"collapse\"\n (click)=\"onCollapseToggle(idx + '-' + idx1, faq?.answer)\"\n [href]=\"'#collapse' + idx + idx1\">\n {{ faq.question }}\n </a>\n </h5>\n </div>\n <div [id]=\"'collapse' + idx + idx1\"\n class=\"panel-collapse p-3 collapse in\">\n <div class=\"card-block\">\n @if (faq?.answer) {\n <div class=\"ql-container ql-snow no-border\">\n <div class=\"ql-editor\"\n [innerHTML]=\"sanitizedFaqAnswers[idx + '-' + idx1]\">\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n }\n @if (isLoaded && (totalRecords === 0 || allFaqFalse)) {\n <div>\n <pw-no-data [withImage]=\"true\" message=\"This is embarrassing - we couldn't find any FAQ.\"> </pw-no-data>\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--public-btn-radius: 24px}.card-header h1,.card-header p{color:#fff!important}.faq-item{border:1px solid rgb(224,224,224);background-color:#fff;border-radius:8px;margin:8px 0;overflow:hidden;transition:border-color .16s ease-out,box-shadow .16s ease-out}.faq-item:hover{border-color:#bdbdbd}.faq-item .dashboard-header{background:transparent;padding:0
|
|
221
|
+
args: [{ selector: 'pw-faq', standalone: false, template: "<div class=\"mt-md-4 mt-4\">\n <div class=\"row mb-3\">\n <div class=\"col-12\">\n <div class=\"card gradient-custom-branding white text-center p-1 p-sm-2\">\n <div class=\"card-header p-1 p-sm-2\">\n <div class=\"d-flex justify-content-between align-items-start mb-3 mb-md-0\">\n <div>\n @if (showDocumentation) {\n <button\n class=\"btn btn-sm document-btn\"\n (click)=\"navigateToDocumentation()\">\n Documentation\n </button>\n }\n </div>\n <div>\n @if (showSupport) {\n <button\n class=\"btn btn-sm btn-primary\"\n (click)=\"navigateToSupport()\">\n Support\n </button>\n }\n </div>\n </div>\n\n <h1>You need help?</h1>\n <p><em>Please search through our frequently asked questions first.</em></p>\n </div>\n <div class=\"card-block p-2 p-sm-2\">\n <fieldset>\n <legend></legend>\n <label for=\"faq-search\" class=\"visually-hidden\">Search in FAQs</label>\n <input type=\"text\"\n id=\"faq-search\"\n name=\"faq-search\"\n class=\"form-control bg-white\"\n placeholder=\"Search FAQs...\"\n (input)=\"filter($event.target.value)\"\n #messageInput\n aria-label=\"Search FAQs...\" />\n </fieldset>\n </div>\n </div>\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (faqs) {\n @for (category of objectKeys(faqs); track category; let idx1 = $index) {\n <div>\n @if (faqs[category]?.length) {\n <h6 class=\"text-uppercase mt-3 p-1\">{{ faqHashMap[category]?.name }}</h6>\n <div class=\"dashboard\">\n @for (\n faq of faqs[category]; track trackByProductFaqId(idx,\n faq); let idx = $index) {\n <div class=\"faq-item\"\n >\n <div class=\"dashboard-header p-2\">\n <h5 class=\"accordion-title mt-2\">\n <a class=\"accordion-toggle collapsed\"\n data-bs-toggle=\"collapse\"\n (click)=\"onCollapseToggle(idx + '-' + idx1, faq?.answer)\"\n [href]=\"'#collapse' + idx + idx1\">\n {{ faq.question }}\n </a>\n </h5>\n @if (canEditFaq && faq?.id) {\n <a class=\"faq-edit-link\"\n [pTooltip]=\"'Admin.Faq.EditTitle' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n [attr.aria-label]=\"'Admin.Faq.EditTitle' | transloco\"\n [routerLink]=\"[routers.faqDetails + faq.id]\"\n target=\"_blank\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </a>\n }\n </div>\n <div [id]=\"'collapse' + idx + idx1\"\n class=\"panel-collapse p-3 collapse in\">\n <div class=\"card-block\">\n @if (faq?.answer) {\n <div class=\"ql-container ql-snow no-border\">\n <div class=\"ql-editor\"\n [innerHTML]=\"sanitizedFaqAnswers[idx + '-' + idx1]\">\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n }\n @if (isLoaded && (totalRecords === 0 || allFaqFalse)) {\n <div>\n <pw-no-data [withImage]=\"true\" message=\"This is embarrassing - we couldn't find any FAQ.\"> </pw-no-data>\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--public-btn-radius: 24px}.card-header h1,.card-header p{color:#fff!important}.faq-item{border:1px solid rgb(224,224,224);background-color:#fff;border-radius:8px;margin:8px 0;overflow:hidden;transition:border-color .16s ease-out,box-shadow .16s ease-out}.faq-item:hover{border-color:#bdbdbd}.faq-item .dashboard-header{background:transparent;padding:0;display:flex;align-items:center;position:relative}.faq-item .dashboard-header:after{content:\"\\f078\";font-family:\"Font Awesome 5 Pro\",sans-serif;font-weight:600;font-size:13px;color:#9e9e9e;flex:0 0 auto;margin-left:auto;margin-right:18px;transition:transform .18s ease-out,color .18s ease-out}.faq-item .dashboard-header:hover:after{color:var(--titles)}.faq-item .dashboard-header:has(.accordion-toggle:not(.collapsed)):after{transform:rotate(180deg);color:var(--titles)}.faq-item .accordion-title{margin:0;flex:0 1 auto;min-width:0}.faq-item .faq-edit-link{position:relative;z-index:1;display:inline-flex;align-items:center;flex:0 0 auto;padding:14px 8px;text-decoration:none}.faq-item .faq-edit-link .edit-icon{font-size:14px}.faq-item .accordion-toggle{display:flex;align-items:center;padding:14px 4px 14px 18px;font-size:15px;font-weight:600;line-height:1.45;color:var(--titles);text-decoration:none;cursor:pointer}.faq-item .accordion-toggle:before{content:\"\"!important;position:absolute;inset:0;width:auto;padding:0}.faq-item .accordion-toggle:focus-visible{outline:2px solid var(--first);outline-offset:-2px}.faq-item .panel-collapse{padding:0!important}.faq-item .card-block{padding:4px 18px 16px;border-top:1px solid rgb(238,238,238)}.faq-item .ql-editor{font-size:14px;line-height:1.65;color:#616161;text-align:left}.document-btn{background-color:var(--second);border-color:var(--second)!important;color:#fff}.document-btn:hover{color:var(--second)!important;background-color:transparent!important}.card{background:var(--sidebar_bg)!important;color:var(--sidebar_text)!important;padding:.8rem!important}.card .accordion-toggle:before{content:\"\\f078\"}.card .accordion-toggle.collapsed{transition:all .3s ease-in-out}.card .accordion-toggle.collapsed:before{content:\"\\f054\"}h6{color:var(--titles)!important;font-size:17px;font-weight:700;letter-spacing:.04em;padding:0 0 10px!important;margin:32px 0 14px!important;border-bottom:1px solid rgb(224,224,224)}.accordion-title a{color:var(--titles)!important}.ql-container{resize:none!important;max-width:1000px;margin:0 auto}\n"] }]
|
|
197
222
|
}], ctorParameters: () => [{ type: i1.CommonService }, { type: i0.Injector }, { type: i1.ProductService }, { type: i2.DomSanitizer }, { type: i0.ChangeDetectorRef }] });
|
|
198
223
|
|
|
199
224
|
class FaqDetailsComponent extends AppBaseComponent {
|
|
@@ -203,7 +228,12 @@ class FaqDetailsComponent extends AppBaseComponent {
|
|
|
203
228
|
this.sanitizer = sanitizer;
|
|
204
229
|
this.cdr = cdr;
|
|
205
230
|
this.isLoading = false;
|
|
206
|
-
this.
|
|
231
|
+
this.routers = ADMIN_ROUTERS;
|
|
232
|
+
/// Whether to offer the inline link through to the admin edit form.
|
|
233
|
+
this.canEditFaq = false;
|
|
234
|
+
/// Numeric id for the admin edit route, or null when none can be resolved.
|
|
235
|
+
this.editFaqId = null;
|
|
236
|
+
this.faqRef = this.route.snapshot.params['id'];
|
|
207
237
|
this.slug = PermissionService.selectedSubscription?.slug;
|
|
208
238
|
}
|
|
209
239
|
ngOnInit() {
|
|
@@ -212,7 +242,7 @@ class FaqDetailsComponent extends AppBaseComponent {
|
|
|
212
242
|
getFaq() {
|
|
213
243
|
this.isLoading = true;
|
|
214
244
|
this.commonService
|
|
215
|
-
.getPublicFaqById(this.
|
|
245
|
+
.getPublicFaqById(this.faqRef)
|
|
216
246
|
.subscribe(res => {
|
|
217
247
|
let faqAnswer;
|
|
218
248
|
if (res?.answer) {
|
|
@@ -226,6 +256,13 @@ class FaqDetailsComponent extends AppBaseComponent {
|
|
|
226
256
|
faqAnswer = this.sanitizer.bypassSecurityTrustHtml(doc.body.innerHTML); // NOSONAR
|
|
227
257
|
}
|
|
228
258
|
this.faq = { ...res, answer: faqAnswer };
|
|
259
|
+
// Only offer the edit affordance once a FAQ actually resolved —
|
|
260
|
+
// a miss still leaves `faq` truthy (spreading null yields
|
|
261
|
+
// `{answer: undefined}`), so key off the question itself.
|
|
262
|
+
const loaded = !!res?.question;
|
|
263
|
+
this.canEditFaq =
|
|
264
|
+
loaded && this.permissionService.evaluatePermissions(FAQ_ADMIN_PERMISSION);
|
|
265
|
+
this.editFaqId = loaded ? this.resolveEditFaqId(res) : null;
|
|
229
266
|
this.cdr.markForCheck();
|
|
230
267
|
})
|
|
231
268
|
.add(() => {
|
|
@@ -233,12 +270,27 @@ class FaqDetailsComponent extends AppBaseComponent {
|
|
|
233
270
|
this.cdr.markForCheck();
|
|
234
271
|
});
|
|
235
272
|
}
|
|
273
|
+
/// The admin edit route resolves a NUMERIC id (`+params['id'] || 0` in
|
|
274
|
+
/// `AddEditFaqComponent`), but this page is reachable by slug too and the
|
|
275
|
+
/// public endpoint does not return the id at all — main-api's
|
|
276
|
+
/// `FaqHelpers#faq_attributes_to_return` whitelists `slug`, not `id`. So
|
|
277
|
+
/// prefer a payload id if one ever appears, then fall back to the route
|
|
278
|
+
/// param only when it is already numeric. Returning null hides the link
|
|
279
|
+
/// rather than opening the admin form in "add a new FAQ" mode.
|
|
280
|
+
resolveEditFaqId(faq) {
|
|
281
|
+
const fromPayload = Number(faq?.id);
|
|
282
|
+
if (Number.isInteger(fromPayload) && fromPayload > 0) {
|
|
283
|
+
return fromPayload;
|
|
284
|
+
}
|
|
285
|
+
const fromRoute = Number(this.faqRef);
|
|
286
|
+
return Number.isInteger(fromRoute) && fromRoute > 0 ? fromRoute : null;
|
|
287
|
+
}
|
|
236
288
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: FaqDetailsComponent, deps: [{ token: i1.CommonService }, { token: i0.Injector }, { token: i2.DomSanitizer }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
237
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: FaqDetailsComponent, isStandalone: false, selector: "pw-faq-details", usesInheritance: true, ngImport: i0, template: "@if (!isLoading) {\n <div class=\"content-quill-wrapper overflow-hidden mt-5 p-3\">\n <div class=\"content-quill-box\">\n <h2 class=\"mb-3\"
|
|
289
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: FaqDetailsComponent, isStandalone: false, selector: "pw-faq-details", usesInheritance: true, ngImport: i0, template: "@if (!isLoading) {\n <div class=\"content-quill-wrapper overflow-hidden mt-5 p-3\">\n <div class=\"content-quill-box\">\n <h2 class=\"mb-3\">\n {{faq?.question}}\n @if (canEditFaq && editFaqId) {\n <a class=\"faq-edit-link ms-3\"\n [pTooltip]=\"'Admin.Faq.EditTitle' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n [attr.aria-label]=\"'Admin.Faq.EditTitle' | transloco\"\n [routerLink]=\"[routers.faqDetails + editFaqId]\"\n target=\"_blank\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </a>\n }\n </h2>\n <ng-container>\n <div class=\"ql-container ql-snow no-border\">\n <div class=\"ql-editor\"\n [innerHTML]=\"faq?.answer\">\n </div>\n </div>\n </ng-container>\n </div>\n @if (!faq && !isLoading) {\n <pw-no-data\n message=\"No Faq found\">\n </pw-no-data>\n }\n <div class=\"text-end mt-3\">\n <button class=\"btn btn-outline-primary\"\n [routerLink]=\"['/',slug,'faq']\">See all FAQs</button>\n </div>\n </div>\n}\n@if (isLoading) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n}\n", styles: [".ql-container{resize:none!important}.faq-edit-link{text-decoration:none;vertical-align:middle}.faq-edit-link .edit-icon{font-size:16px}\n"], dependencies: [{ kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i3.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "directive", type: i5.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: i4.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "pipe", type: i7.TranslocoPipe, name: "transloco" }] }); }
|
|
238
290
|
}
|
|
239
291
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: FaqDetailsComponent, decorators: [{
|
|
240
292
|
type: Component,
|
|
241
|
-
args: [{ selector: 'pw-faq-details', standalone: false, template: "@if (!isLoading) {\n <div class=\"content-quill-wrapper overflow-hidden mt-5 p-3\">\n <div class=\"content-quill-box\">\n <h2 class=\"mb-3\"
|
|
293
|
+
args: [{ selector: 'pw-faq-details', standalone: false, template: "@if (!isLoading) {\n <div class=\"content-quill-wrapper overflow-hidden mt-5 p-3\">\n <div class=\"content-quill-box\">\n <h2 class=\"mb-3\">\n {{faq?.question}}\n @if (canEditFaq && editFaqId) {\n <a class=\"faq-edit-link ms-3\"\n [pTooltip]=\"'Admin.Faq.EditTitle' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n [attr.aria-label]=\"'Admin.Faq.EditTitle' | transloco\"\n [routerLink]=\"[routers.faqDetails + editFaqId]\"\n target=\"_blank\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </a>\n }\n </h2>\n <ng-container>\n <div class=\"ql-container ql-snow no-border\">\n <div class=\"ql-editor\"\n [innerHTML]=\"faq?.answer\">\n </div>\n </div>\n </ng-container>\n </div>\n @if (!faq && !isLoading) {\n <pw-no-data\n message=\"No Faq found\">\n </pw-no-data>\n }\n <div class=\"text-end mt-3\">\n <button class=\"btn btn-outline-primary\"\n [routerLink]=\"['/',slug,'faq']\">See all FAQs</button>\n </div>\n </div>\n}\n@if (isLoading) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n}\n", styles: [".ql-container{resize:none!important}.faq-edit-link{text-decoration:none;vertical-align:middle}.faq-edit-link .edit-icon{font-size:16px}\n"] }]
|
|
242
294
|
}], ctorParameters: () => [{ type: i1.CommonService }, { type: i0.Injector }, { type: i2.DomSanitizer }, { type: i0.ChangeDetectorRef }] });
|
|
243
295
|
|
|
244
296
|
class UserFeedbackComponent extends AppBaseComponent {
|
|
@@ -367,7 +419,7 @@ class HomeComponent extends AppBaseComponent {
|
|
|
367
419
|
super.ngOnDestroy();
|
|
368
420
|
}
|
|
369
421
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: HomeComponent, deps: [{ token: i0.Injector }, { token: i1.HopscotchService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
370
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.19", type: HomeComponent, isStandalone: false, selector: "pw-home", usesInheritance: true, ngImport: i0, template: "<pw-user-feedback></pw-user-feedback>\n<div class=\"row mt-3\">\n <div class=\"col-12 col-lg-6 mt-2 mb-4\">\n <div class=\"card\">\n <div class=\"card-content p-0\">\n <div class=\"card-header d-flex mt-0\">\n <div class=\"w-100\">\n <div id=\"cards\"></div>\n <h3 class=\"mb-3\">{{'ManageYourAccount'|transloco}}</h3>\n <p>{{'ManageYourAccountDescription'|transloco}}</p>\n </div>\n <div class=\"ms-3 img-wrapper\">\n <img src=\"assets/img/products/hyper-dashboard/ManageYourAccount.png\"\n alt=\"img\"\n class=\"img-fluid\" />\n </div>\n </div>\n <div class=\"card-footer px-3\">\n <a routerLink=\"/account/details\"\n class=\"d-block\">{{'ManageYourAccount'|transloco}}</a>\n </div>\n <div id=\"tips-onboarding-step2\"></div>\n </div>\n </div>\n </div>\n <div class=\"col-12 col-lg-6 mt-2 mb-4\">\n <div class=\"card\">\n <div class=\"card-content p-0\">\n <div class=\"card-header d-flex mt-0\">\n <div class=\"w-100\">\n <h3 class=\"mb-3\">{{'UpdateYourProfile'|transloco}}</h3>\n <p>{{'UpdateYourProfileDescription'|transloco}}</p>\n </div>\n <div class=\"ms-3 img-wrapper\">\n <img src=\"assets/img/products/hyper-dashboard/UpdateYourProfile.png\"\n alt=\"img\"\n class=\"img-fluid\" />\n </div>\n </div>\n <div class=\"card-footer px-3\">\n <a [routerLink]=\"['/members', userSlug]\"\n class=\"d-block\">{{'UpdateYourProfile'|transloco}}</a>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-12 col-lg-6 mt-2 mb-4\">\n <div class=\"card\">\n <div class=\"card-content p-0\">\n <div class=\"card-header d-flex mt-0\">\n <div class=\"w-100\">\n <h3 class=\"mb-3\">{{'CommunicationSettings'|transloco}}</h3>\n <p>\n {{'CommunicationSettingsDescription'|transloco}}\n </p>\n </div>\n <div class=\"ms-3 img-wrapper\">\n <img src=\"assets/img/products/hyper-dashboard/CommunicationSettings.png\"\n alt=\"img\"\n class=\"img-fluid\" />\n </div>\n </div>\n <div class=\"card-footer px-3\">\n <a routerLink=\"/settings/communication\"\n class=\"d-block\">{{'GotoCommunicationSettings'|transloco}}</a>\n </div>\n <div id=\"tips-onboarding-step3\"></div>\n </div>\n </div>\n </div>\n <div class=\"col-12 col-lg-6 mt-2 mb-4\">\n <div class=\"card\">\n <div class=\"card-content p-0\">\n <div class=\"card-header d-flex mt-0\">\n <div class=\"w-100\">\n <h3 class=\"mb-3\">{{'NeedHelp'|transloco}}</h3>\n <p>{{'NeedHelpDescription'|transloco}}</p>\n </div>\n <div class=\"ms-3 img-wrapper\">\n <img src=\"assets/img/products/hyper-dashboard/NeedHelp.png\"\n alt=\"img\"\n class=\"img-fluid\" />\n </div>\n </div>\n <div class=\"card-footer px-3\">\n <a [routerLink]=\"'/' + selectedSubscriptionSlug + '/faq'\"\n class=\"d-block\">{{'SeeAllOurFaq'|transloco}}</a>\n </div>\n <div id=\"tips-onboarding-step4\"></div>\n </div>\n </div>\n </div>\n</div>\n", styles: ["::ng-deep .hopscotch-title{text-align:center!important;margin-bottom:20px!important}::ng-deep .hopscotch-title h2{margin:0}::ng-deep .hopscotch-content{text-align:center;padding:20px;margin:0!important}::ng-deep .hopscotch-content img{width:150px;margin:20px 0}::ng-deep .hopscotch-content p{font-size:16px;color:#555}::ng-deep .hopscotch-step-title{text-align:left;margin-bottom:15px}::ng-deep .hopscotch-step-content{padding:20px;text-align:left!important}::ng-deep .hopscotch-step-content p{font-size:14px;color:#555;margin-bottom:10px;text-align:left!important}\n"], dependencies: [{ kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: UserFeedbackComponent, selector: "pw-user-feedback" }, { kind: "pipe", type:
|
|
422
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.19", type: HomeComponent, isStandalone: false, selector: "pw-home", usesInheritance: true, ngImport: i0, template: "<pw-user-feedback></pw-user-feedback>\n<div class=\"row mt-3\">\n <div class=\"col-12 col-lg-6 mt-2 mb-4\">\n <div class=\"card\">\n <div class=\"card-content p-0\">\n <div class=\"card-header d-flex mt-0\">\n <div class=\"w-100\">\n <div id=\"cards\"></div>\n <h3 class=\"mb-3\">{{'ManageYourAccount'|transloco}}</h3>\n <p>{{'ManageYourAccountDescription'|transloco}}</p>\n </div>\n <div class=\"ms-3 img-wrapper\">\n <img src=\"assets/img/products/hyper-dashboard/ManageYourAccount.png\"\n alt=\"img\"\n class=\"img-fluid\" />\n </div>\n </div>\n <div class=\"card-footer px-3\">\n <a routerLink=\"/account/details\"\n class=\"d-block\">{{'ManageYourAccount'|transloco}}</a>\n </div>\n <div id=\"tips-onboarding-step2\"></div>\n </div>\n </div>\n </div>\n <div class=\"col-12 col-lg-6 mt-2 mb-4\">\n <div class=\"card\">\n <div class=\"card-content p-0\">\n <div class=\"card-header d-flex mt-0\">\n <div class=\"w-100\">\n <h3 class=\"mb-3\">{{'UpdateYourProfile'|transloco}}</h3>\n <p>{{'UpdateYourProfileDescription'|transloco}}</p>\n </div>\n <div class=\"ms-3 img-wrapper\">\n <img src=\"assets/img/products/hyper-dashboard/UpdateYourProfile.png\"\n alt=\"img\"\n class=\"img-fluid\" />\n </div>\n </div>\n <div class=\"card-footer px-3\">\n <a [routerLink]=\"['/members', userSlug]\"\n class=\"d-block\">{{'UpdateYourProfile'|transloco}}</a>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-12 col-lg-6 mt-2 mb-4\">\n <div class=\"card\">\n <div class=\"card-content p-0\">\n <div class=\"card-header d-flex mt-0\">\n <div class=\"w-100\">\n <h3 class=\"mb-3\">{{'CommunicationSettings'|transloco}}</h3>\n <p>\n {{'CommunicationSettingsDescription'|transloco}}\n </p>\n </div>\n <div class=\"ms-3 img-wrapper\">\n <img src=\"assets/img/products/hyper-dashboard/CommunicationSettings.png\"\n alt=\"img\"\n class=\"img-fluid\" />\n </div>\n </div>\n <div class=\"card-footer px-3\">\n <a routerLink=\"/settings/communication\"\n class=\"d-block\">{{'GotoCommunicationSettings'|transloco}}</a>\n </div>\n <div id=\"tips-onboarding-step3\"></div>\n </div>\n </div>\n </div>\n <div class=\"col-12 col-lg-6 mt-2 mb-4\">\n <div class=\"card\">\n <div class=\"card-content p-0\">\n <div class=\"card-header d-flex mt-0\">\n <div class=\"w-100\">\n <h3 class=\"mb-3\">{{'NeedHelp'|transloco}}</h3>\n <p>{{'NeedHelpDescription'|transloco}}</p>\n </div>\n <div class=\"ms-3 img-wrapper\">\n <img src=\"assets/img/products/hyper-dashboard/NeedHelp.png\"\n alt=\"img\"\n class=\"img-fluid\" />\n </div>\n </div>\n <div class=\"card-footer px-3\">\n <a [routerLink]=\"'/' + selectedSubscriptionSlug + '/faq'\"\n class=\"d-block\">{{'SeeAllOurFaq'|transloco}}</a>\n </div>\n <div id=\"tips-onboarding-step4\"></div>\n </div>\n </div>\n </div>\n</div>\n", styles: ["::ng-deep .hopscotch-title{text-align:center!important;margin-bottom:20px!important}::ng-deep .hopscotch-title h2{margin:0}::ng-deep .hopscotch-content{text-align:center;padding:20px;margin:0!important}::ng-deep .hopscotch-content img{width:150px;margin:20px 0}::ng-deep .hopscotch-content p{font-size:16px;color:#555}::ng-deep .hopscotch-step-title{text-align:left;margin-bottom:15px}::ng-deep .hopscotch-step-content{padding:20px;text-align:left!important}::ng-deep .hopscotch-step-content p{font-size:14px;color:#555;margin-bottom:10px;text-align:left!important}\n"], dependencies: [{ kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: UserFeedbackComponent, selector: "pw-user-feedback" }, { kind: "pipe", type: i7.TranslocoPipe, name: "transloco" }] }); }
|
|
371
423
|
}
|
|
372
424
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: HomeComponent, decorators: [{
|
|
373
425
|
type: Component,
|
|
@@ -440,7 +492,7 @@ class CurrentNotificationsComponent {
|
|
|
440
492
|
return item.id;
|
|
441
493
|
}
|
|
442
494
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: CurrentNotificationsComponent, deps: [{ token: i1.NotificationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
443
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: CurrentNotificationsComponent, isStandalone: false, selector: "pw-current-notifications", ngImport: i0, template: "<div class=\"row main-div\">\n <div class=\"w-100 text-center mt-3\">\n @if (!isLoaded) {\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n }\n </div>\n @if (notifications?.length && isLoaded) {\n <div class=\"col-12 col-sm-12 col-md-12 mb-5\"\n >\n <div class=\"card\">\n <div class=\"card-body\">\n <ul class=\"noti-list\">\n @for (item of notifications; track trackByNotification($index, item)) {\n <li\n class=\"p-3 border-bottom border-bottom-blue-grey border-bottom-lighten-4 d-flex align-items-center\">\n <span class=\"btn btn-circle me-2\"\n [ngClass]=\"{\n 'btn-danger': item.note_type === 'administrative',\n 'btn-secondary': item.note_type === 'object_event',\n 'btn-primary': item.note_type === 'user_generated'\n }\">\n <i\n class=\"fal float-start\"\n [ngClass]=\"{\n 'fa-bell': item.note_type === 'administrative',\n 'fa-share-alt': item.note_type === 'object_event',\n 'fa-bells': item.note_type === 'user_generated'\n }\"\n aria-hidden=\"true\"\n ></i>\n </span>\n <span class=\"d-inline-block noty-body\">\n <span class=\"noti-title line-height-1p5 d-block text-bold-400\">{{\n item.content\n }}</span>\n <span class=\"noti-text\"><span class=\"fal fa-clock\"></span>\n {{ item?.created_at | sinceAgo }}</span>\n </span>\n <span class=\"noti-buttons\">\n <button class=\"btn float-end\">\n <i\n class=\"far fa-trash-alt\"\n (click)=\"dismiss(item.id, item)\"\n (keydown.enter)=\"dismiss(item.id, item)\"\n aria-hidden=\"true\"\n ></i>\n </button>\n </span>\n </li>\n }\n </ul>\n </div>\n <div class=\"pagination-container d-flex justify-content-between align-items-center mt-3 mb-3\">\n <pw-records-summary [showing]=\"totalRecords\" [total]=\"totalRecords\" />\n <div class=\"d-flex align-items-center\">\n <button class=\"btn btn-outline-primary me-2\" (click)=\"previousPage()\" [disabled]=\"currentPage === 1\">\n <i class=\"fas fa-chevron-left\"></i>\n </button>\n <span>Page {{ currentPage }} of {{ totalPages }}</span>\n <button class=\"btn btn-outline-primary ms-2\" (click)=\"nextPage()\" [disabled]=\"currentPage === totalPages\">\n <i class=\"fas fa-chevron-right\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n}\n\n@if (noNoti && isLoaded) {\n <div class=\"col-12 col-sm-12 col-md-12\"\n >\n <pw-no-data [withImage]=\"true\" message=\"You are all caught up\" description=\"You currently do not have any notifications.\">\n </pw-no-data>\n </div>\n}\n</div>\n", styles: [".icon-dismiss{position:relative;right:15px;top:30px;z-index:9}.noti-list{overflow-x:hidden!important}.noti-buttons{flex:auto}.main-div{padding:0 20px}.card{padding-bottom:0}@media screen and (max-width:480px){.noty-body{width:240px}}.pagination-container{padding:0 1rem}\n"], dependencies: [{ kind: "directive", type: i2$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i4.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "component", type: i4.RecordsSummaryComponent, selector: "pw-records-summary", inputs: ["showing", "total"] }, { kind: "pipe", type: i5.SinceAgoPipe, name: "sinceAgo" }] }); }
|
|
495
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: CurrentNotificationsComponent, isStandalone: false, selector: "pw-current-notifications", ngImport: i0, template: "<div class=\"row main-div\">\n <div class=\"w-100 text-center mt-3\">\n @if (!isLoaded) {\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n }\n </div>\n @if (notifications?.length && isLoaded) {\n <div class=\"col-12 col-sm-12 col-md-12 mb-5\"\n >\n <div class=\"card\">\n <div class=\"card-body\">\n <ul class=\"noti-list\">\n @for (item of notifications; track trackByNotification($index, item)) {\n <li\n class=\"p-3 border-bottom border-bottom-blue-grey border-bottom-lighten-4 d-flex align-items-center\">\n <span class=\"btn btn-circle me-2\"\n [ngClass]=\"{\n 'btn-danger': item.note_type === 'administrative',\n 'btn-secondary': item.note_type === 'object_event',\n 'btn-primary': item.note_type === 'user_generated'\n }\">\n <i\n class=\"fal float-start\"\n [ngClass]=\"{\n 'fa-bell': item.note_type === 'administrative',\n 'fa-share-alt': item.note_type === 'object_event',\n 'fa-bells': item.note_type === 'user_generated'\n }\"\n aria-hidden=\"true\"\n ></i>\n </span>\n <span class=\"d-inline-block noty-body\">\n <span class=\"noti-title line-height-1p5 d-block text-bold-400\">{{\n item.content\n }}</span>\n <span class=\"noti-text\"><span class=\"fal fa-clock\"></span>\n {{ item?.created_at | sinceAgo }}</span>\n </span>\n <span class=\"noti-buttons\">\n <button class=\"btn float-end\">\n <i\n class=\"far fa-trash-alt\"\n (click)=\"dismiss(item.id, item)\"\n (keydown.enter)=\"dismiss(item.id, item)\"\n aria-hidden=\"true\"\n ></i>\n </button>\n </span>\n </li>\n }\n </ul>\n </div>\n <div class=\"pagination-container d-flex justify-content-between align-items-center mt-3 mb-3\">\n <pw-records-summary [showing]=\"totalRecords\" [total]=\"totalRecords\" />\n <div class=\"d-flex align-items-center\">\n <button class=\"btn btn-outline-primary me-2\" (click)=\"previousPage()\" [disabled]=\"currentPage === 1\">\n <i class=\"fas fa-chevron-left\"></i>\n </button>\n <span>Page {{ currentPage }} of {{ totalPages }}</span>\n <button class=\"btn btn-outline-primary ms-2\" (click)=\"nextPage()\" [disabled]=\"currentPage === totalPages\">\n <i class=\"fas fa-chevron-right\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n}\n\n@if (noNoti && isLoaded) {\n <div class=\"col-12 col-sm-12 col-md-12\"\n >\n <pw-no-data [withImage]=\"true\" message=\"You are all caught up\" description=\"You currently do not have any notifications.\">\n </pw-no-data>\n </div>\n}\n</div>\n", styles: [".icon-dismiss{position:relative;right:15px;top:30px;z-index:9}.noti-list{overflow-x:hidden!important}.noti-buttons{flex:auto}.main-div{padding:0 20px}.card{padding-bottom:0}@media screen and (max-width:480px){.noty-body{width:240px}}.pagination-container{padding:0 1rem}\n"], dependencies: [{ kind: "directive", type: i2$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i4.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "component", type: i4.RecordsSummaryComponent, selector: "pw-records-summary", inputs: ["showing", "total"] }, { kind: "pipe", type: i5$1.SinceAgoPipe, name: "sinceAgo" }] }); }
|
|
444
496
|
}
|
|
445
497
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: CurrentNotificationsComponent, decorators: [{
|
|
446
498
|
type: Component,
|
|
@@ -528,7 +580,7 @@ class DismissedNotificationsComponent {
|
|
|
528
580
|
return item.id;
|
|
529
581
|
}
|
|
530
582
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: DismissedNotificationsComponent, deps: [{ token: i1.NotificationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
531
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: DismissedNotificationsComponent, isStandalone: false, selector: "pw-dismissed-notifications", ngImport: i0, template: "<div class=\"row main-div\">\n <div class=\"w-100 text-center mt-3\">\n @if (!isLoaded) {\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n }\n </div>\n @if (dismissedNotifications?.length && isLoaded) {\n <div class=\"col-12 col-sm-12 col-md-12 mb-5\"\n >\n <div class=\"card\">\n <div class=\"card-body\">\n <ul class=\"noti-list\">\n @for (item of dismissedNotifications; track trackByNotification($index, item)) {\n <li\n class=\"p-3 border-bottom border-bottom-blue-grey border-bottom-lighten-4 d-flex align-items-center\">\n <span class=\"btn btn-circle me-2\"\n [ngClass]=\"{\n 'btn-danger': item.note_type === 'administrative',\n 'btn-secondary': item.note_type === 'object_event',\n 'btn-primary': item.note_type === 'user_generated'\n }\">\n <i\n class=\"fal float-start\"\n [ngClass]=\"{\n 'fa-bell': item.note_type === 'administrative',\n 'fa-share-alt': item.note_type === 'object_event',\n 'fa-bells': item.note_type === 'user_generated'\n }\"\n aria-hidden=\"true\"\n ></i>\n </span>\n <span class=\"d-inline-block noty-body\">\n <span class=\"noti-title line-height-1p5 d-block text-bold-400\">{{\n item.content\n }}</span>\n <span class=\"noti-text\"><span class=\"fal fa-clock\"></span>\n {{ item?.created_at | sinceAgo }}</span>\n </span>\n <span class=\"noti-buttons\">\n <button class=\"btn float-end\">\n <i\n class=\"far fa-trash-alt\"\n (click)=\"dismiss(item.id, item)\"\n (keydown.enter)=\"dismiss(item.id, item)\"\n aria-hidden=\"true\"\n ></i>\n </button>\n <button class=\"btn float-end\">\n <i\n class=\"fas fa-trash-restore-alt\"\n (click)=\"restoreNotification(item.id, item)\"\n (keydown.enter)=\"restoreNotification(item.id, item)\"\n aria-hidden=\"true\"\n ></i>\n </button>\n </span>\n </li>\n }\n </ul>\n </div>\n <div class=\"pagination-container d-flex justify-content-between align-items-center mt-3 mb-3\">\n <pw-records-summary [showing]=\"totalRecords\" [total]=\"totalRecords\" />\n <div class=\"d-flex align-items-center\">\n <button class=\"btn btn-outline-primary me-2\" (click)=\"previousPage()\" [disabled]=\"currentPage === 1\">\n <i class=\"fas fa-chevron-left\"></i>\n </button>\n <span>Page {{ currentPage }} of {{ totalPages }}</span>\n <button class=\"btn btn-outline-primary ms-2\" (click)=\"nextPage()\" [disabled]=\"currentPage === totalPages\">\n <i class=\"fas fa-chevron-right\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n}\n\n@if (noNoti && isLoaded) {\n <div class=\"col-12 col-sm-12 col-md-12\"\n >\n <pw-no-data [withImage]=\"true\" message=\"You currently do not have any dismissed notifications\">\n </pw-no-data>\n </div>\n}\n</div>\n", styles: [".icon-dismiss{position:relative;right:15px;top:30px;z-index:9}.noti-list{overflow-x:hidden!important}.noti-buttons{flex:auto}.main-div{padding:0 20px}.card{padding-bottom:0}@media screen and (max-width:480px){.noty-body{width:240px}}.pagination-container{padding:0 1rem}\n"], dependencies: [{ kind: "directive", type: i2$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i4.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "component", type: i4.RecordsSummaryComponent, selector: "pw-records-summary", inputs: ["showing", "total"] }, { kind: "pipe", type: i5.SinceAgoPipe, name: "sinceAgo" }] }); }
|
|
583
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: DismissedNotificationsComponent, isStandalone: false, selector: "pw-dismissed-notifications", ngImport: i0, template: "<div class=\"row main-div\">\n <div class=\"w-100 text-center mt-3\">\n @if (!isLoaded) {\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n }\n </div>\n @if (dismissedNotifications?.length && isLoaded) {\n <div class=\"col-12 col-sm-12 col-md-12 mb-5\"\n >\n <div class=\"card\">\n <div class=\"card-body\">\n <ul class=\"noti-list\">\n @for (item of dismissedNotifications; track trackByNotification($index, item)) {\n <li\n class=\"p-3 border-bottom border-bottom-blue-grey border-bottom-lighten-4 d-flex align-items-center\">\n <span class=\"btn btn-circle me-2\"\n [ngClass]=\"{\n 'btn-danger': item.note_type === 'administrative',\n 'btn-secondary': item.note_type === 'object_event',\n 'btn-primary': item.note_type === 'user_generated'\n }\">\n <i\n class=\"fal float-start\"\n [ngClass]=\"{\n 'fa-bell': item.note_type === 'administrative',\n 'fa-share-alt': item.note_type === 'object_event',\n 'fa-bells': item.note_type === 'user_generated'\n }\"\n aria-hidden=\"true\"\n ></i>\n </span>\n <span class=\"d-inline-block noty-body\">\n <span class=\"noti-title line-height-1p5 d-block text-bold-400\">{{\n item.content\n }}</span>\n <span class=\"noti-text\"><span class=\"fal fa-clock\"></span>\n {{ item?.created_at | sinceAgo }}</span>\n </span>\n <span class=\"noti-buttons\">\n <button class=\"btn float-end\">\n <i\n class=\"far fa-trash-alt\"\n (click)=\"dismiss(item.id, item)\"\n (keydown.enter)=\"dismiss(item.id, item)\"\n aria-hidden=\"true\"\n ></i>\n </button>\n <button class=\"btn float-end\">\n <i\n class=\"fas fa-trash-restore-alt\"\n (click)=\"restoreNotification(item.id, item)\"\n (keydown.enter)=\"restoreNotification(item.id, item)\"\n aria-hidden=\"true\"\n ></i>\n </button>\n </span>\n </li>\n }\n </ul>\n </div>\n <div class=\"pagination-container d-flex justify-content-between align-items-center mt-3 mb-3\">\n <pw-records-summary [showing]=\"totalRecords\" [total]=\"totalRecords\" />\n <div class=\"d-flex align-items-center\">\n <button class=\"btn btn-outline-primary me-2\" (click)=\"previousPage()\" [disabled]=\"currentPage === 1\">\n <i class=\"fas fa-chevron-left\"></i>\n </button>\n <span>Page {{ currentPage }} of {{ totalPages }}</span>\n <button class=\"btn btn-outline-primary ms-2\" (click)=\"nextPage()\" [disabled]=\"currentPage === totalPages\">\n <i class=\"fas fa-chevron-right\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n}\n\n@if (noNoti && isLoaded) {\n <div class=\"col-12 col-sm-12 col-md-12\"\n >\n <pw-no-data [withImage]=\"true\" message=\"You currently do not have any dismissed notifications\">\n </pw-no-data>\n </div>\n}\n</div>\n", styles: [".icon-dismiss{position:relative;right:15px;top:30px;z-index:9}.noti-list{overflow-x:hidden!important}.noti-buttons{flex:auto}.main-div{padding:0 20px}.card{padding-bottom:0}@media screen and (max-width:480px){.noty-body{width:240px}}.pagination-container{padding:0 1rem}\n"], dependencies: [{ kind: "directive", type: i2$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i4.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "component", type: i4.RecordsSummaryComponent, selector: "pw-records-summary", inputs: ["showing", "total"] }, { kind: "pipe", type: i5$1.SinceAgoPipe, name: "sinceAgo" }] }); }
|
|
532
584
|
}
|
|
533
585
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: DismissedNotificationsComponent, decorators: [{
|
|
534
586
|
type: Component,
|
|
@@ -629,7 +681,7 @@ class SearchComponent {
|
|
|
629
681
|
return item.id;
|
|
630
682
|
}
|
|
631
683
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SearchComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i1.DashboardService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
632
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: SearchComponent, isStandalone: false, selector: "pw-search", ngImport: i0, template: "<div class=\"container-fluid dashboard-card overflow-hidden\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n <div class=\"row\">\n <div class=\"col-12 my-3 mt-4\">\n <h2>Search Results</h2>\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (isLoaded) {\n <div class=\"row faqlist search-result\">\n <div class=\"col-12\">\n <div data-cy=\"faq-list\">\n @if (result) {\n @for (group of objectKeys(result); track group; let idx = $index) {\n <div>\n @switch (group) {\n @case ('users') {\n @if (getResultGroup(group).length) {\n <h6 class=\"text-uppercase mt-3 p-1\">{{ group }}</h6>\n <div class=\"dashboard\">\n @for (\n user of getResultGroup(group); track trackByUserId($index, user); let idx1 = $index) {\n <div class=\"faq-item\">\n <div class=\"dashboard-header p-2\">\n <h5 class=\"accordion-title mt-2\">\n <a\n class=\"accordion-toggle collapsed\"\n data-bs-toggle=\"collapse\"\n [href]=\"'#collapse' + idx1 + idx\"><span>{{\n user.first_name !== null\n ? user.first_name\n : user?.email\n }}</span></a>\n </h5>\n <p class=\"m-0 title-font\">\n @if (user.user_skills?.length > 0) {\n <strong>Skills :\n </strong>\n }\n @for (\n skill of (user.user_skills ?? []); track trackBySkill($index, skill); let isLast = $last) {\n <span class=\"badge bg-success m-1\">\n {{ skill.name\n }}{{ isLast ? '' : ', ' }}</span>\n }\n </p>\n @if (\n user?.user_profile?.headline\n ?.length > 0\n ) {\n <p class=\"m-0 title-font\">\n {{ user?.user_profile?.headline }}\n </p>\n }\n @if (\n user?.user_profile?.country\n ?.length > 0\n ) {\n <p class=\"m-0 title-font\">\n <strong>Location : </strong>{{ user?.user_profile?.country }}\n </p>\n }\n </div>\n <div [id]=\"'collapse' + idx1 + idx\"\n class=\"panel-collapse collapse in p-3\">\n <div class=\"display-block overflow-hidden\">\n <div class=\"row align-items-center\">\n <div class=\"col-sm-3\">\n @if (user?.user_avatar?.length > 0) {\n @for (\n profile_image of user.user_avatar; track profile_image) {\n @if (profile_image.width === 200) {\n <div class=\"text-center my-2\">\n <div class=\"avatar\">\n <img class=\"img-fluid\"\n [src]=\"profile_image.url\"\n alt=\"Male Icon\"\n (error)=\"handleImageError($event, 'assets/img/icons/male.png')\" />\n </div>\n </div>\n }\n }\n } @else {\n <div class=\"text-center my-2\">\n <div class=\"avatar\">\n <img src=\"/assets/img/icons/male.png\"\n alt=\"\"\n class=\"img-fluid\" />\n </div>\n </div>\n }\n </div>\n <div class=\"col-sm-9\">\n <ul class=\"name-fl\">\n <li>\n <strong>First Name:\n </strong>\n <span>{{\n user.first_name !== null\n ? user.first_name\n : 'N/A'\n }}</span>\n </li>\n <li>\n <strong>Last Name:\n </strong>\n <span>{{\n user.last_name !== null\n ? user.last_name\n : 'N/A'\n }}</span>\n </li>\n </ul>\n <p>\n <strong>Email: </strong>\n <span>{{\n user.email !== null\n ? user.email\n : 'N/A'\n }}</span>\n </p>\n <p>\n <strong>Description:\n </strong>\n <span>{{\n user?.user_profile\n ?.description !== null\n ? user?.user_profile\n ?.description\n : 'N/A'\n }}</span>\n </p>\n <div class=\"view-btn text-end\">\n <a class=\"btn btn-outline-primary inline-block\"\n [routerLink]=\"[\n '/members/' +\n user.slug\n ]\">View More</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n }\n @case ('faqs') {\n @if (getResultGroup(group).length) {\n <h6>\n {{ group | uppercase }}\n </h6>\n @for (\n faq of getResultGroup(group); track trackByFaqId($index, faq); let idx2 = $index) {\n <div class=\"faq-item\">\n <div class=\"dashboard-header p-2\">\n <h5 class=\"accordion-title mt-2\">\n <a\n class=\"accordion-toggle collapsed\"\n data-bs-toggle=\"collapse\"\n [href]=\"'#collapse' + idx2 + idx\">{{ faq.question }}</a>\n </h5>\n </div>\n <div [id]=\"'collapse' + idx2 + idx\"\n class=\"panel-collapse collapse in\">\n @if (faq?.answer) {\n <div class=\"ql-container ql-snow no-border\">\n <div class=\"ql-editor\"\n [innerHTML]=\"faq?.answer |safe:'html'\">\n </div>\n </div>\n }\n </div>\n </div>\n }\n }\n }\n }\n </div>\n }\n @if (!hasResults) {\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\">\n </pw-no-data>\n }\n }\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--public-btn-radius: 24px}h6{background:var(--sidebar_bg)!important;color:var(--sidebar_text)!important;padding:.8rem!important}.faq-search-answer a{color:#144086;display:inline-block;float:right;font-size:14px;margin-right:15px}::ng-deep .ql-snow *{font-size:16px!important}.faq-search-answer a:after{right:-10px}.faq-item{border:1px dashed rgba(0,0,0,.1);background-color:#fff;border-radius:3px;margin:10px 0;transition:all .2s ease-in-out}.faq-item .dashboard-header{background:#fff}.accord-title1 .faq-search-answer a{margin-right:0!important}a.accordion-toggle:after{display:none}.accord-title p.title-font{font-size:.8rem}.panel-collapse.show{border-top:1px dashed rgba(0,0,0,.1);padding-top:20px;padding-bottom:20px}.panel-collapse ul{margin-bottom:1rem}.panel-collapse ul.name-fl li{display:inline-block;padding-right:15px}.view-btn a{display:inline-block}.avatar{width:130px;margin:0 auto;display:block}.accordion-title a{color:var(--sidebar_bg)!important}.card-header h1,.card-header p{color:#fff!important}.card .accordion-toggle:before{content:\"\\f078\"}.card .accordion-toggle.collapsed{transition:all .3s ease-in-out}.card .accordion-toggle.collapsed:before{content:\"\\f054\"}.card-block p{font-size:16px}.card,h6{background:var(--sidebar_bg)!important;color:var(--sidebar_text)!important;padding:.8rem!important}.ql-container{resize:none!important;max-width:1000px;margin:0 auto}\n"], dependencies: [{ kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i3.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i4.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "pipe", type: i2$2.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i4$1.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i5.DOMSanitizerPipe, name: "safe" }] }); }
|
|
684
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: SearchComponent, isStandalone: false, selector: "pw-search", ngImport: i0, template: "<div class=\"container-fluid dashboard-card overflow-hidden\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n <div class=\"row\">\n <div class=\"col-12 my-3 mt-4\">\n <h2>Search Results</h2>\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (isLoaded) {\n <div class=\"row faqlist search-result\">\n <div class=\"col-12\">\n <div data-cy=\"faq-list\">\n @if (result) {\n @for (group of objectKeys(result); track group; let idx = $index) {\n <div>\n @switch (group) {\n @case ('users') {\n @if (getResultGroup(group).length) {\n <h6 class=\"text-uppercase mt-3 p-1\">{{ group }}</h6>\n <div class=\"dashboard\">\n @for (\n user of getResultGroup(group); track trackByUserId($index, user); let idx1 = $index) {\n <div class=\"faq-item\">\n <div class=\"dashboard-header p-2\">\n <h5 class=\"accordion-title mt-2\">\n <a\n class=\"accordion-toggle collapsed\"\n data-bs-toggle=\"collapse\"\n [href]=\"'#collapse' + idx1 + idx\"><span>{{\n user.first_name !== null\n ? user.first_name\n : user?.email\n }}</span></a>\n </h5>\n <p class=\"m-0 title-font\">\n @if (user.user_skills?.length > 0) {\n <strong>Skills :\n </strong>\n }\n @for (\n skill of (user.user_skills ?? []); track trackBySkill($index, skill); let isLast = $last) {\n <span class=\"badge bg-success m-1\">\n {{ skill.name\n }}{{ isLast ? '' : ', ' }}</span>\n }\n </p>\n @if (\n user?.user_profile?.headline\n ?.length > 0\n ) {\n <p class=\"m-0 title-font\">\n {{ user?.user_profile?.headline }}\n </p>\n }\n @if (\n user?.user_profile?.country\n ?.length > 0\n ) {\n <p class=\"m-0 title-font\">\n <strong>Location : </strong>{{ user?.user_profile?.country }}\n </p>\n }\n </div>\n <div [id]=\"'collapse' + idx1 + idx\"\n class=\"panel-collapse collapse in p-3\">\n <div class=\"display-block overflow-hidden\">\n <div class=\"row align-items-center\">\n <div class=\"col-sm-3\">\n @if (user?.user_avatar?.length > 0) {\n @for (\n profile_image of user.user_avatar; track profile_image) {\n @if (profile_image.width === 200) {\n <div class=\"text-center my-2\">\n <div class=\"avatar\">\n <img class=\"img-fluid\"\n [src]=\"profile_image.url\"\n alt=\"Male Icon\"\n (error)=\"handleImageError($event, 'assets/img/icons/male.png')\" />\n </div>\n </div>\n }\n }\n } @else {\n <div class=\"text-center my-2\">\n <div class=\"avatar\">\n <img src=\"/assets/img/icons/male.png\"\n alt=\"\"\n class=\"img-fluid\" />\n </div>\n </div>\n }\n </div>\n <div class=\"col-sm-9\">\n <ul class=\"name-fl\">\n <li>\n <strong>First Name:\n </strong>\n <span>{{\n user.first_name !== null\n ? user.first_name\n : 'N/A'\n }}</span>\n </li>\n <li>\n <strong>Last Name:\n </strong>\n <span>{{\n user.last_name !== null\n ? user.last_name\n : 'N/A'\n }}</span>\n </li>\n </ul>\n <p>\n <strong>Email: </strong>\n <span>{{\n user.email !== null\n ? user.email\n : 'N/A'\n }}</span>\n </p>\n <p>\n <strong>Description:\n </strong>\n <span>{{\n user?.user_profile\n ?.description !== null\n ? user?.user_profile\n ?.description\n : 'N/A'\n }}</span>\n </p>\n <div class=\"view-btn text-end\">\n <a class=\"btn btn-outline-primary inline-block\"\n [routerLink]=\"[\n '/members/' +\n user.slug\n ]\">View More</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n }\n @case ('faqs') {\n @if (getResultGroup(group).length) {\n <h6>\n {{ group | uppercase }}\n </h6>\n @for (\n faq of getResultGroup(group); track trackByFaqId($index, faq); let idx2 = $index) {\n <div class=\"faq-item\">\n <div class=\"dashboard-header p-2\">\n <h5 class=\"accordion-title mt-2\">\n <a\n class=\"accordion-toggle collapsed\"\n data-bs-toggle=\"collapse\"\n [href]=\"'#collapse' + idx2 + idx\">{{ faq.question }}</a>\n </h5>\n </div>\n <div [id]=\"'collapse' + idx2 + idx\"\n class=\"panel-collapse collapse in\">\n @if (faq?.answer) {\n <div class=\"ql-container ql-snow no-border\">\n <div class=\"ql-editor\"\n [innerHTML]=\"faq?.answer |safe:'html'\">\n </div>\n </div>\n }\n </div>\n </div>\n }\n }\n }\n }\n </div>\n }\n @if (!hasResults) {\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\">\n </pw-no-data>\n }\n }\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--public-btn-radius: 24px}h6{background:var(--sidebar_bg)!important;color:var(--sidebar_text)!important;padding:.8rem!important}.faq-search-answer a{color:#144086;display:inline-block;float:right;font-size:14px;margin-right:15px}::ng-deep .ql-snow *{font-size:16px!important}.faq-search-answer a:after{right:-10px}.faq-item{border:1px dashed rgba(0,0,0,.1);background-color:#fff;border-radius:3px;margin:10px 0;transition:all .2s ease-in-out}.faq-item .dashboard-header{background:#fff}.accord-title1 .faq-search-answer a{margin-right:0!important}a.accordion-toggle:after{display:none}.accord-title p.title-font{font-size:.8rem}.panel-collapse.show{border-top:1px dashed rgba(0,0,0,.1);padding-top:20px;padding-bottom:20px}.panel-collapse ul{margin-bottom:1rem}.panel-collapse ul.name-fl li{display:inline-block;padding-right:15px}.view-btn a{display:inline-block}.avatar{width:130px;margin:0 auto;display:block}.accordion-title a{color:var(--sidebar_bg)!important}.card-header h1,.card-header p{color:#fff!important}.card .accordion-toggle:before{content:\"\\f078\"}.card .accordion-toggle.collapsed{transition:all .3s ease-in-out}.card .accordion-toggle.collapsed:before{content:\"\\f054\"}.card-block p{font-size:16px}.card,h6{background:var(--sidebar_bg)!important;color:var(--sidebar_text)!important;padding:.8rem!important}.ql-container{resize:none!important;max-width:1000px;margin:0 auto}\n"], dependencies: [{ kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i3.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i4.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "pipe", type: i2$2.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i7.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i5$1.DOMSanitizerPipe, name: "safe" }] }); }
|
|
633
685
|
}
|
|
634
686
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SearchComponent, decorators: [{
|
|
635
687
|
type: Component,
|
|
@@ -658,6 +710,7 @@ class DashboardContentModule {
|
|
|
658
710
|
ProgressSpinnerModule,
|
|
659
711
|
NgbNavModule,
|
|
660
712
|
RadioButtonModule,
|
|
713
|
+
TooltipModule,
|
|
661
714
|
ResourceSharedComponentsModule], exports: [DocumentationComponent,
|
|
662
715
|
FaqComponent,
|
|
663
716
|
FaqDetailsComponent,
|
|
@@ -676,6 +729,7 @@ class DashboardContentModule {
|
|
|
676
729
|
ProgressSpinnerModule,
|
|
677
730
|
NgbNavModule,
|
|
678
731
|
RadioButtonModule,
|
|
732
|
+
TooltipModule,
|
|
679
733
|
ResourceSharedComponentsModule, RadioButtonModule] }); }
|
|
680
734
|
}
|
|
681
735
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: DashboardContentModule, decorators: [{
|
|
@@ -690,6 +744,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
690
744
|
ProgressSpinnerModule,
|
|
691
745
|
NgbNavModule,
|
|
692
746
|
RadioButtonModule,
|
|
747
|
+
TooltipModule,
|
|
693
748
|
ResourceSharedComponentsModule
|
|
694
749
|
],
|
|
695
750
|
declarations: [
|