@posiwise/admin-module 0.0.140 → 0.0.141
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/esm2022/lib/admin-module.routing.mjs +11 -11
- package/esm2022/lib/admin.module.mjs +12 -5
- package/esm2022/lib/components/config/global-config-details/global-config-details.component.mjs +1 -1
- package/esm2022/lib/components/credentials/credentials-details/credentials-details.component.mjs +1 -1
- package/esm2022/lib/components/credentials/subscription-credentials-details/subscription-credentials-details.component.mjs +1 -1
- package/esm2022/lib/components/domain-config/domain-config-details/domain-config-build/domain-config-build.component.mjs +3 -3
- package/esm2022/lib/components/domain-config/domain-config-details/domain-config-core/domain-config-core.component.mjs +3 -3
- package/esm2022/lib/components/domain-config/domain-config-details/domain-config-integrations/domain-config-integrations.component.mjs +3 -3
- package/esm2022/lib/components/domain-config/domain-config-details/domain-config-interface/domain-config-interface.component.mjs +3 -3
- package/esm2022/lib/components/domain-config/domain-config-details/domain-config-organization/domain-config-organization.component.mjs +3 -3
- package/esm2022/lib/components/domain-config/domain-config-details/domain-config-security/domain-config-security.component.mjs +3 -3
- package/esm2022/lib/components/domain-config/domain-config-details/domain-config-social/domain-config-social.component.mjs +3 -3
- package/esm2022/lib/components/domain-config/domain-config-list/domain-config-list.component.mjs +3 -3
- package/esm2022/lib/components/faqs/add-faq/add-faq.component.mjs +12 -13
- package/esm2022/lib/components/faqs/edit-faq/edit-faq.component.mjs +13 -14
- package/esm2022/lib/components/feedback-questions/feedback-questions-details/feedback-questions-details.component.mjs +1 -1
- package/esm2022/lib/components/incidents/add-edit-incident/add-edit-incident.component.mjs +1 -1
- package/esm2022/lib/components/login-notifications/login-notification-details/login-notification-details.component.mjs +3 -3
- package/esm2022/lib/components/login-notifications/login-notifications-list/login-notifications-list.component.mjs +7 -3
- package/esm2022/lib/components/mailer/mailer-details/mailer-details.component.mjs +3 -3
- package/esm2022/lib/components/newsletters/newsletter-details/newsletter-details.component.mjs +3 -3
- package/esm2022/lib/components/newsletters/newsletter-item-details/newsletter-item-details.component.mjs +3 -3
- package/esm2022/lib/components/newsletters/newsletters-insight/newsletters-insight.component.mjs +26 -4
- package/esm2022/lib/components/products/product-details/product-details.component.mjs +5 -6
- package/esm2022/lib/components/products/products-insight/products-insight.component.mjs +15 -10
- package/esm2022/lib/components/subscriptions/subscription-agents-list/subscription-agents-list.component.mjs +3 -3
- package/esm2022/lib/components/subscriptions/subscription-details/subscription-details.component.mjs +1 -1
- package/esm2022/lib/components/subscriptions/subscription-product-details/subscription-product-details.component.mjs +1 -1
- package/esm2022/lib/components/subscriptions/subscriptions-insight/subscription-insight-average-price/subscription-insight-average-price.component.mjs +15 -10
- package/esm2022/lib/components/subscriptions/subscriptions-insight/subscription-insight-average-user/subscription-insight-average-user.component.mjs +15 -10
- package/esm2022/lib/components/subscriptions/subscriptions-insight/subscription-insight-churn/subscription-insight-churn.component.mjs +55 -0
- package/esm2022/lib/components/subscriptions/subscriptions-insight/subscription-insight-nps/subscription-insight-nps.component.mjs +17 -12
- package/esm2022/lib/components/subscriptions/subscriptions-insight/subscription-insight-product-session/subscription-insight-product-session.component.mjs +15 -10
- package/esm2022/lib/components/subscriptions/subscriptions-insight/subscription-insight-revenue/subscription-insight-revenue.component.mjs +15 -10
- package/esm2022/lib/components/subscriptions/subscriptions-insight/subscription-insight-tabs/subscription-insight-tabs.component.mjs +4 -3
- package/esm2022/lib/components/subscriptions/subscriptions-insight/subscriptions-insight.component.mjs +15 -10
- package/esm2022/lib/components/subscriptions/subscriptions-list/invite-users/invite-users.component.mjs +1 -1
- package/esm2022/lib/components/tips/tip-detail/tip-detail.component.mjs +1 -1
- package/esm2022/lib/components/users/user-details/user-details.component.mjs +1 -1
- package/esm2022/lib/components/users/users-insight/users-insight.component.mjs +18 -5
- package/esm2022/lib/shared/routers/routers.mjs +2 -2
- package/fesm2022/posiwise-admin-module.mjs +276 -163
- package/fesm2022/posiwise-admin-module.mjs.map +1 -1
- package/lib/admin.module.d.ts +71 -69
- package/lib/components/newsletters/newsletters-insight/newsletters-insight.component.d.ts +8 -0
- package/lib/components/products/products-insight/products-insight.component.d.ts +7 -4
- package/lib/components/subscriptions/subscriptions-insight/subscription-insight-average-price/subscription-insight-average-price.component.d.ts +6 -4
- package/lib/components/subscriptions/subscriptions-insight/subscription-insight-average-user/subscription-insight-average-user.component.d.ts +6 -4
- package/lib/components/subscriptions/subscriptions-insight/subscription-insight-churn/subscription-insight-churn.component.d.ts +24 -0
- package/lib/components/subscriptions/subscriptions-insight/subscription-insight-nps/subscription-insight-nps.component.d.ts +7 -4
- package/lib/components/subscriptions/subscriptions-insight/subscription-insight-product-session/subscription-insight-product-session.component.d.ts +6 -4
- package/lib/components/subscriptions/subscriptions-insight/subscription-insight-revenue/subscription-insight-revenue.component.d.ts +6 -4
- package/lib/components/subscriptions/subscriptions-insight/subscriptions-insight.component.d.ts +6 -4
- package/lib/components/users/users-insight/users-insight.component.d.ts +6 -0
- package/package.json +1 -1
|
@@ -4,13 +4,13 @@ import { SUBSCRIPTION_ANALYTICS_TYPES } from '@posiwise/common-utilities';
|
|
|
4
4
|
import { AppBaseComponent } from '@posiwise/app-base-component';
|
|
5
5
|
import { HelperService } from '@posiwise/helper-service';
|
|
6
6
|
import { PermissionService } from '@posiwise/common-services';
|
|
7
|
+
import { handleDateRangeSelection } from '@posiwise/utils';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
import * as i1 from "@posiwise/admin-module-utils";
|
|
9
10
|
import * as i2 from "angular-plotly.js";
|
|
10
11
|
import * as i3 from "@angular/common";
|
|
11
|
-
import * as i4 from "@
|
|
12
|
+
import * as i4 from "@posiwise/shared-components";
|
|
12
13
|
import * as i5 from "primeng/progressspinner";
|
|
13
|
-
import * as i6 from "@ng-bootstrap/ng-bootstrap";
|
|
14
14
|
export class SubscriptionInsightProcuctSessionComponent extends AppBaseComponent {
|
|
15
15
|
constructor(adminService, injector, cdr) {
|
|
16
16
|
super(injector);
|
|
@@ -26,6 +26,8 @@ export class SubscriptionInsightProcuctSessionComponent extends AppBaseComponent
|
|
|
26
26
|
}
|
|
27
27
|
ngOnInit() {
|
|
28
28
|
this.subscriptionId = PermissionService.selectedSubscription?.id;
|
|
29
|
+
this.dateRanges = HelperService.initializeDateRanges();
|
|
30
|
+
this.selectedDateRange = '';
|
|
29
31
|
this.getChartData();
|
|
30
32
|
this.userStore().subscribe(response => {
|
|
31
33
|
this.currentUser = response;
|
|
@@ -35,7 +37,11 @@ export class SubscriptionInsightProcuctSessionComponent extends AppBaseComponent
|
|
|
35
37
|
getChartData() {
|
|
36
38
|
this.graphLoading = true;
|
|
37
39
|
this.adminService
|
|
38
|
-
.getSubscriptionAnalytics(SUBSCRIPTION_ANALYTICS_TYPES.SESSION_COUNT, this.subscriptionId, this.startDate
|
|
40
|
+
.getSubscriptionAnalytics(SUBSCRIPTION_ANALYTICS_TYPES.SESSION_COUNT, this.subscriptionId, this.selectedDateRange?.startDate
|
|
41
|
+
? this.selectedDateRange.startDate.format('YYYY-MM-DD')
|
|
42
|
+
: '', this.selectedDateRange?.endDate
|
|
43
|
+
? this.selectedDateRange.endDate.format('YYYY-MM-DD')
|
|
44
|
+
: '')
|
|
39
45
|
.subscribe(response => {
|
|
40
46
|
this.graph = response;
|
|
41
47
|
})
|
|
@@ -43,22 +49,21 @@ export class SubscriptionInsightProcuctSessionComponent extends AppBaseComponent
|
|
|
43
49
|
this.graphLoading = false;
|
|
44
50
|
});
|
|
45
51
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
52
|
+
onDateRangeSelect(event) {
|
|
53
|
+
this.selectedDateRange = handleDateRangeSelection(event, this.selectedDateRange);
|
|
54
|
+
this.getChartData();
|
|
50
55
|
}
|
|
51
56
|
ngOnDestroy() {
|
|
52
57
|
super.ngOnDestroy();
|
|
53
58
|
}
|
|
54
59
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SubscriptionInsightProcuctSessionComponent, deps: [{ token: i1.AdminService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
55
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SubscriptionInsightProcuctSessionComponent, selector: "pw-subscription-insight-product-session", viewQueries: [{ propertyName: "content", first: true, predicate: ["showComment"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "
|
|
60
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SubscriptionInsightProcuctSessionComponent, selector: "pw-subscription-insight-product-session", viewQueries: [{ propertyName: "content", first: true, predicate: ["showComment"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<app-date-picker\n [selectedDateRange]=\"selectedDateRange\"\n [dateRanges]=\"dateRanges\"\n (dateRangeChange)=\"onDateRangeSelect($event)\">\n</app-date-picker>\n<div class=\"w-100 text-center mt-3\" *ngIf=\"graphLoading\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n\n<ng-template [ngIf]=\"graph\">\n <plotly-plot [data]=\"graph?.data\"\n [config]=\"graph?.config\"\n [layout]=\"graph?.layout\" [useResizeHandler]=\"true\"></plotly-plot>\n</ng-template>\n", dependencies: [{ kind: "component", type: i2.PlotlyComponent, selector: "plotly-plot", inputs: ["data", "layout", "config", "frames", "style", "theme", "divId", "revision", "className", "debug", "useResizeHandler", "updateOnLayoutChange", "updateOnDataChange", "updateOnlyWithRevision"], outputs: ["initialized", "update", "purge", "error", "afterExport", "afterPlot", "animated", "animatingFrame", "animationInterrupted", "autoSize", "beforeExport", "beforeHover", "buttonClicked", "click", "plotlyClick", "clickAnnotation", "deselect", "doubleClick", "framework", "hover", "legendClick", "legendDoubleClick", "react", "relayout", "relayouting", "restyle", "redraw", "selected", "selecting", "sliderChange", "sliderEnd", "sliderStart", "sunburstclick", "transitioning", "transitionInterrupted", "unhover", "treemapclick", "webglcontextlost"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.DateRangePickerComponent, selector: "app-date-picker", inputs: ["selectedDateRange", "dateRanges"], outputs: ["dateRangeChange"] }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }] }); }
|
|
56
61
|
}
|
|
57
62
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SubscriptionInsightProcuctSessionComponent, decorators: [{
|
|
58
63
|
type: Component,
|
|
59
|
-
args: [{ selector: 'pw-subscription-insight-product-session', template: "
|
|
64
|
+
args: [{ selector: 'pw-subscription-insight-product-session', template: "<app-date-picker\n [selectedDateRange]=\"selectedDateRange\"\n [dateRanges]=\"dateRanges\"\n (dateRangeChange)=\"onDateRangeSelect($event)\">\n</app-date-picker>\n<div class=\"w-100 text-center mt-3\" *ngIf=\"graphLoading\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n\n<ng-template [ngIf]=\"graph\">\n <plotly-plot [data]=\"graph?.data\"\n [config]=\"graph?.config\"\n [layout]=\"graph?.layout\" [useResizeHandler]=\"true\"></plotly-plot>\n</ng-template>\n" }]
|
|
60
65
|
}], ctorParameters: () => [{ type: i1.AdminService }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }], propDecorators: { content: [{
|
|
61
66
|
type: ViewChild,
|
|
62
67
|
args: ['showComment', { static: true }]
|
|
63
68
|
}] } });
|
|
64
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
69
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vic2NyaXB0aW9uLWluc2lnaHQtcHJvZHVjdC1zZXNzaW9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJ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5lciBzdHJva2VXaWR0aD1cIjJcIj4gPC9wLXByb2dyZXNzU3Bpbm5lcj5cbjwvZGl2PlxuXG48bmctdGVtcGxhdGUgW25nSWZdPVwiZ3JhcGhcIj5cbiAgPHBsb3RseS1wbG90IFtkYXRhXT1cImdyYXBoPy5kYXRhXCJcbiAgICBbY29uZmlnXT1cImdyYXBoPy5jb25maWdcIlxuICAgIFtsYXlvdXRdPVwiZ3JhcGg/LmxheW91dFwiIFt1c2VSZXNpemVIYW5kbGVyXT1cInRydWVcIj48L3Bsb3RseS1wbG90PlxuPC9uZy10ZW1wbGF0ZT5cbiJdfQ==
|
|
@@ -4,13 +4,13 @@ import { AdminService } from '@posiwise/admin-module-utils';
|
|
|
4
4
|
import { AppBaseComponent } from '@posiwise/app-base-component';
|
|
5
5
|
import { HelperService } from '@posiwise/helper-service';
|
|
6
6
|
import { PermissionService } from '@posiwise/common-services';
|
|
7
|
+
import { handleDateRangeSelection } from '@posiwise/utils';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
import * as i1 from "@posiwise/admin-module-utils";
|
|
9
10
|
import * as i2 from "angular-plotly.js";
|
|
10
11
|
import * as i3 from "@angular/common";
|
|
11
|
-
import * as i4 from "@
|
|
12
|
+
import * as i4 from "@posiwise/shared-components";
|
|
12
13
|
import * as i5 from "primeng/progressspinner";
|
|
13
|
-
import * as i6 from "@ng-bootstrap/ng-bootstrap";
|
|
14
14
|
export class SubscriptionInsightRevenueComponent extends AppBaseComponent {
|
|
15
15
|
constructor(adminService, injector) {
|
|
16
16
|
super(injector);
|
|
@@ -18,13 +18,19 @@ export class SubscriptionInsightRevenueComponent extends AppBaseComponent {
|
|
|
18
18
|
}
|
|
19
19
|
ngOnInit() {
|
|
20
20
|
this.subscriptionId = PermissionService.selectedSubscription?.id;
|
|
21
|
+
this.dateRanges = HelperService.initializeDateRanges();
|
|
22
|
+
this.selectedDateRange = '';
|
|
21
23
|
this.getChartData();
|
|
22
24
|
}
|
|
23
25
|
/** Function to get the data for the graph */
|
|
24
26
|
getChartData() {
|
|
25
27
|
this.loading = true;
|
|
26
28
|
this.adminService
|
|
27
|
-
.getSubscriptionAnalytics(SUBSCRIPTION_ANALYTICS_TYPES.REVENUES, this.subscriptionId, this.startDate
|
|
29
|
+
.getSubscriptionAnalytics(SUBSCRIPTION_ANALYTICS_TYPES.REVENUES, this.subscriptionId, this.selectedDateRange?.startDate
|
|
30
|
+
? this.selectedDateRange.startDate.format('YYYY-MM-DD')
|
|
31
|
+
: '', this.selectedDateRange?.endDate
|
|
32
|
+
? this.selectedDateRange.endDate.format('YYYY-MM-DD')
|
|
33
|
+
: '')
|
|
28
34
|
.subscribe(response => {
|
|
29
35
|
this.graph = response;
|
|
30
36
|
})
|
|
@@ -32,19 +38,18 @@ export class SubscriptionInsightRevenueComponent extends AppBaseComponent {
|
|
|
32
38
|
this.loading = false;
|
|
33
39
|
});
|
|
34
40
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
41
|
+
onDateRangeSelect(event) {
|
|
42
|
+
this.selectedDateRange = handleDateRangeSelection(event, this.selectedDateRange);
|
|
43
|
+
this.getChartData();
|
|
39
44
|
}
|
|
40
45
|
ngOnDestroy() {
|
|
41
46
|
super.ngOnDestroy();
|
|
42
47
|
}
|
|
43
48
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SubscriptionInsightRevenueComponent, deps: [{ token: i1.AdminService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
44
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SubscriptionInsightRevenueComponent, selector: "pw-subscription-insight-revenue", usesInheritance: true, ngImport: i0, template: "
|
|
49
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SubscriptionInsightRevenueComponent, selector: "pw-subscription-insight-revenue", usesInheritance: true, ngImport: i0, template: "<app-date-picker\n [selectedDateRange]=\"selectedDateRange\"\n [dateRanges]=\"dateRanges\"\n (dateRangeChange)=\"onDateRangeSelect($event)\">\n</app-date-picker>\n<div class=\"w-100 text-center mt-3\" *ngIf=\"loading\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n<ng-template [ngIf]=\"graph\">\n <plotly-plot [data]=\"graph?.data\"\n [layout]=\"graph?.layout\"\n [config]=\"graph?.config\"\n [useResizeHandler]=\"true\"></plotly-plot>\n</ng-template>\n", dependencies: [{ kind: "component", type: i2.PlotlyComponent, selector: "plotly-plot", inputs: ["data", "layout", "config", "frames", "style", "theme", "divId", "revision", "className", "debug", "useResizeHandler", "updateOnLayoutChange", "updateOnDataChange", "updateOnlyWithRevision"], outputs: ["initialized", "update", "purge", "error", "afterExport", "afterPlot", "animated", "animatingFrame", "animationInterrupted", "autoSize", "beforeExport", "beforeHover", "buttonClicked", "click", "plotlyClick", "clickAnnotation", "deselect", "doubleClick", "framework", "hover", "legendClick", "legendDoubleClick", "react", "relayout", "relayouting", "restyle", "redraw", "selected", "selecting", "sliderChange", "sliderEnd", "sliderStart", "sunburstclick", "transitioning", "transitionInterrupted", "unhover", "treemapclick", "webglcontextlost"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.DateRangePickerComponent, selector: "app-date-picker", inputs: ["selectedDateRange", "dateRanges"], outputs: ["dateRangeChange"] }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }] }); }
|
|
45
50
|
}
|
|
46
51
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SubscriptionInsightRevenueComponent, decorators: [{
|
|
47
52
|
type: Component,
|
|
48
|
-
args: [{ selector: 'pw-subscription-insight-revenue', template: "
|
|
53
|
+
args: [{ selector: 'pw-subscription-insight-revenue', template: "<app-date-picker\n [selectedDateRange]=\"selectedDateRange\"\n [dateRanges]=\"dateRanges\"\n (dateRangeChange)=\"onDateRangeSelect($event)\">\n</app-date-picker>\n<div class=\"w-100 text-center mt-3\" *ngIf=\"loading\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n<ng-template [ngIf]=\"graph\">\n <plotly-plot [data]=\"graph?.data\"\n [layout]=\"graph?.layout\"\n [config]=\"graph?.config\"\n [useResizeHandler]=\"true\"></plotly-plot>\n</ng-template>\n" }]
|
|
49
54
|
}], ctorParameters: () => [{ type: i1.AdminService }, { type: i0.Injector }] });
|
|
50
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
55
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vic2NyaXB0aW9uLWluc2lnaHQtcmV2ZW51ZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FkbWluLW1vZHVsZS9zcmMvbGliL2NvbXBvbmVudHMvc3Vic2NyaXB0aW9ucy9zdWJzY3JpcHRpb25zLWluc2lnaHQvc3Vic2NyaXB0aW9uLWluc2lnaHQtcmV2ZW51ZS9zdWJzY3JpcHRpb24taW5zaWdodC1yZXZlbnVlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYWRtaW4tbW9kdWxlL3NyYy9saWIvY29tcG9uZW50cy9zdWJzY3JpcHRpb25zL3N1YnNjcmlwdGlvbnMtaW5zaWdodC9zdWJzY3JpcHRpb24taW5zaWdodC1yZXZlbnVlL3N1YnNjcmlwdGlvbi1pbnNpZ2h0LXJldmVudWUuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQ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ncmVzc1NwaW5uZXIgc3Ryb2tlV2lkdGg9XCIyXCI+IDwvcC1wcm9ncmVzc1NwaW5uZXI+XG48L2Rpdj5cbjxuZy10ZW1wbGF0ZSBbbmdJZl09XCJncmFwaFwiPlxuICA8cGxvdGx5LXBsb3QgW2RhdGFdPVwiZ3JhcGg/LmRhdGFcIlxuICBbbGF5b3V0XT1cImdyYXBoPy5sYXlvdXRcIlxuICBbY29uZmlnXT1cImdyYXBoPy5jb25maWdcIlxuICBbdXNlUmVzaXplSGFuZGxlcl09XCJ0cnVlXCI+PC9wbG90bHktcGxvdD5cbjwvbmctdGVtcGxhdGU+XG4iXX0=
|
|
@@ -7,15 +7,16 @@ import * as i4 from "../subscription-insight-average-price/subscription-insight-
|
|
|
7
7
|
import * as i5 from "../subscription-insight-product-session/subscription-insight-product-session.component";
|
|
8
8
|
import * as i6 from "../subscription-insight-average-user/subscription-insight-average-user.component";
|
|
9
9
|
import * as i7 from "../subscription-insight-revenue/subscription-insight-revenue.component";
|
|
10
|
+
import * as i8 from "../subscription-insight-churn/subscription-insight-churn.component";
|
|
10
11
|
export class SubscriptionInsightTabsComponent {
|
|
11
12
|
constructor() {
|
|
12
13
|
this.activeTab = 'growth';
|
|
13
14
|
}
|
|
14
15
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SubscriptionInsightTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SubscriptionInsightTabsComponent, selector: "pw-admin-subscription-insight-tabs", ngImport: i0, template: "<div class=\"mb-3 title\">\n <h2 class=\"card-title p-0\">Subscriptions Insight</h2>\n</div>\n\n<ul ngbNav\n #nav=\"ngbNav\"\n [(activeId)]=\"activeTab\"\n [destroyOnHide]=\"true\"\n class=\"nav-tabs\">\n <li [ngbNavItem]=\"'growth'\">\n <a ngbNavLink>Growth</a>\n <ng-template ngbNavContent>\n <pw-admin-subscription-insight></pw-admin-subscription-insight>\n </ng-template>\n </li>\n <li [ngbNavItem]=\"'revenues'\">\n <a ngbNavLink>Revenues</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-revenue></pw-subscription-insight-revenue>\n </ng-template>\n </li>\n <li [ngbNavItem]=\"'nps'\">\n <a ngbNavLink>Net Promoter Score</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-nps></pw-subscription-insight-nps>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'ap'\">\n <a ngbNavLink>Average Price</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-average-price />\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'ps'\">\n <a ngbNavLink>Product Sessions</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-product-session />\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'aups'\">\n <a ngbNavLink>Subscription Sessions</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-average-user />\n </ng-template>\n </li>\n</ul>\n\n<div [ngbNavOutlet]=\"nav\"></div>\n", styles: [".title{height:30px}\n"], dependencies: [{ kind: "directive", type: i1.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i1.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i1.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i1.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i1.NgbNavLink, selector: "a[ngbNavLink]" }, { kind: "directive", type: i1.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i1.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "component", type: i2.InsightComponent, selector: "pw-admin-subscription-insight" }, { kind: "component", type: i3.SubscriptionInsightNpsComponent, selector: "pw-subscription-insight-nps" }, { kind: "component", type: i4.SubscriptionInsightAveragePriceComponent, selector: "pw-subscription-insight-average-price" }, { kind: "component", type: i5.SubscriptionInsightProcuctSessionComponent, selector: "pw-subscription-insight-product-session" }, { kind: "component", type: i6.SubscriptionInsightAverageUserComponent, selector: "pw-subscription-insight-average-user" }, { kind: "component", type: i7.SubscriptionInsightRevenueComponent, selector: "pw-subscription-insight-revenue" }] }); }
|
|
16
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SubscriptionInsightTabsComponent, selector: "pw-admin-subscription-insight-tabs", ngImport: i0, template: "<div class=\"mb-3 title\">\n <h2 class=\"card-title p-0\">Subscriptions Insight</h2>\n</div>\n\n<ul ngbNav\n #nav=\"ngbNav\"\n [(activeId)]=\"activeTab\"\n [destroyOnHide]=\"true\"\n class=\"nav-tabs\">\n <li [ngbNavItem]=\"'growth'\">\n <a ngbNavLink>Growth</a>\n <ng-template ngbNavContent>\n <pw-admin-subscription-insight></pw-admin-subscription-insight>\n </ng-template>\n </li>\n <li [ngbNavItem]=\"'revenues'\">\n <a ngbNavLink>Revenues</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-revenue></pw-subscription-insight-revenue>\n </ng-template>\n </li>\n <li [ngbNavItem]=\"'nps'\">\n <a ngbNavLink>Net Promoter Score</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-nps></pw-subscription-insight-nps>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'ap'\">\n <a ngbNavLink>Average Price</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-average-price />\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'ps'\">\n <a ngbNavLink>Product Sessions</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-product-session />\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'aups'\">\n <a ngbNavLink>Subscription Sessions</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-average-user />\n </ng-template>\n </li>\n <li [ngbNavItem]=\"'churn'\">\n <a ngbNavLink>Churn</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-churn />\n </ng-template>\n </li>\n</ul>\n\n<div [ngbNavOutlet]=\"nav\"></div>\n", styles: [".title{height:30px}\n"], dependencies: [{ kind: "directive", type: i1.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i1.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i1.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i1.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i1.NgbNavLink, selector: "a[ngbNavLink]" }, { kind: "directive", type: i1.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i1.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "component", type: i2.InsightComponent, selector: "pw-admin-subscription-insight" }, { kind: "component", type: i3.SubscriptionInsightNpsComponent, selector: "pw-subscription-insight-nps" }, { kind: "component", type: i4.SubscriptionInsightAveragePriceComponent, selector: "pw-subscription-insight-average-price" }, { kind: "component", type: i5.SubscriptionInsightProcuctSessionComponent, selector: "pw-subscription-insight-product-session" }, { kind: "component", type: i6.SubscriptionInsightAverageUserComponent, selector: "pw-subscription-insight-average-user" }, { kind: "component", type: i7.SubscriptionInsightRevenueComponent, selector: "pw-subscription-insight-revenue" }, { kind: "component", type: i8.SubscriptionInsightChurnComponent, selector: "pw-subscription-insight-churn" }] }); }
|
|
16
17
|
}
|
|
17
18
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SubscriptionInsightTabsComponent, decorators: [{
|
|
18
19
|
type: Component,
|
|
19
|
-
args: [{ selector: 'pw-admin-subscription-insight-tabs', template: "<div class=\"mb-3 title\">\n <h2 class=\"card-title p-0\">Subscriptions Insight</h2>\n</div>\n\n<ul ngbNav\n #nav=\"ngbNav\"\n [(activeId)]=\"activeTab\"\n [destroyOnHide]=\"true\"\n class=\"nav-tabs\">\n <li [ngbNavItem]=\"'growth'\">\n <a ngbNavLink>Growth</a>\n <ng-template ngbNavContent>\n <pw-admin-subscription-insight></pw-admin-subscription-insight>\n </ng-template>\n </li>\n <li [ngbNavItem]=\"'revenues'\">\n <a ngbNavLink>Revenues</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-revenue></pw-subscription-insight-revenue>\n </ng-template>\n </li>\n <li [ngbNavItem]=\"'nps'\">\n <a ngbNavLink>Net Promoter Score</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-nps></pw-subscription-insight-nps>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'ap'\">\n <a ngbNavLink>Average Price</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-average-price />\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'ps'\">\n <a ngbNavLink>Product Sessions</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-product-session />\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'aups'\">\n <a ngbNavLink>Subscription Sessions</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-average-user />\n </ng-template>\n </li>\n</ul>\n\n<div [ngbNavOutlet]=\"nav\"></div>\n", styles: [".title{height:30px}\n"] }]
|
|
20
|
+
args: [{ selector: 'pw-admin-subscription-insight-tabs', template: "<div class=\"mb-3 title\">\n <h2 class=\"card-title p-0\">Subscriptions Insight</h2>\n</div>\n\n<ul ngbNav\n #nav=\"ngbNav\"\n [(activeId)]=\"activeTab\"\n [destroyOnHide]=\"true\"\n class=\"nav-tabs\">\n <li [ngbNavItem]=\"'growth'\">\n <a ngbNavLink>Growth</a>\n <ng-template ngbNavContent>\n <pw-admin-subscription-insight></pw-admin-subscription-insight>\n </ng-template>\n </li>\n <li [ngbNavItem]=\"'revenues'\">\n <a ngbNavLink>Revenues</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-revenue></pw-subscription-insight-revenue>\n </ng-template>\n </li>\n <li [ngbNavItem]=\"'nps'\">\n <a ngbNavLink>Net Promoter Score</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-nps></pw-subscription-insight-nps>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'ap'\">\n <a ngbNavLink>Average Price</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-average-price />\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'ps'\">\n <a ngbNavLink>Product Sessions</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-product-session />\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'aups'\">\n <a ngbNavLink>Subscription Sessions</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-average-user />\n </ng-template>\n </li>\n <li [ngbNavItem]=\"'churn'\">\n <a ngbNavLink>Churn</a>\n <ng-template ngbNavContent>\n <pw-subscription-insight-churn />\n </ng-template>\n </li>\n</ul>\n\n<div [ngbNavOutlet]=\"nav\"></div>\n", styles: [".title{height:30px}\n"] }]
|
|
20
21
|
}] });
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vic2NyaXB0aW9uLWluc2lnaHQtdGFicy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FkbWluLW1vZHVsZS9zcmMvbGliL2NvbXBvbmVudHMvc3Vic2NyaXB0aW9uc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CRIPTION_ANALYTICS_TYPES } from '@posiwise/common-utilities';
|
|
|
4
4
|
import { AppBaseComponent } from '@posiwise/app-base-component';
|
|
5
5
|
import { HelperService } from '@posiwise/helper-service';
|
|
6
6
|
import { PermissionService } from '@posiwise/common-services';
|
|
7
|
+
import { handleDateRangeSelection } from '@posiwise/utils';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
import * as i1 from "@posiwise/admin-module-utils";
|
|
9
10
|
import * as i2 from "angular-plotly.js";
|
|
10
11
|
import * as i3 from "@angular/common";
|
|
11
|
-
import * as i4 from "@
|
|
12
|
+
import * as i4 from "@posiwise/shared-components";
|
|
12
13
|
import * as i5 from "primeng/progressspinner";
|
|
13
|
-
import * as i6 from "@ng-bootstrap/ng-bootstrap";
|
|
14
14
|
export class InsightComponent extends AppBaseComponent {
|
|
15
15
|
constructor(adminService, injector) {
|
|
16
16
|
super(injector);
|
|
@@ -18,13 +18,19 @@ export class InsightComponent extends AppBaseComponent {
|
|
|
18
18
|
}
|
|
19
19
|
ngOnInit() {
|
|
20
20
|
this.subscriptionId = PermissionService.selectedSubscription?.id;
|
|
21
|
+
this.dateRanges = HelperService.initializeDateRanges();
|
|
22
|
+
this.selectedDateRange = '';
|
|
21
23
|
this.getChartData();
|
|
22
24
|
}
|
|
23
25
|
/** Function to get the data for the graph */
|
|
24
26
|
getChartData() {
|
|
25
27
|
this.loading = true;
|
|
26
28
|
this.adminService
|
|
27
|
-
.getSubscriptionAnalytics(SUBSCRIPTION_ANALYTICS_TYPES.SUBSCRIPTIONS, this.subscriptionId, this.startDate
|
|
29
|
+
.getSubscriptionAnalytics(SUBSCRIPTION_ANALYTICS_TYPES.SUBSCRIPTIONS, this.subscriptionId, this.selectedDateRange?.startDate
|
|
30
|
+
? this.selectedDateRange.startDate.format('YYYY-MM-DD')
|
|
31
|
+
: '', this.selectedDateRange?.endDate
|
|
32
|
+
? this.selectedDateRange.endDate.format('YYYY-MM-DD')
|
|
33
|
+
: '')
|
|
28
34
|
.subscribe(response => {
|
|
29
35
|
this.graph = response;
|
|
30
36
|
})
|
|
@@ -32,19 +38,18 @@ export class InsightComponent extends AppBaseComponent {
|
|
|
32
38
|
this.loading = false;
|
|
33
39
|
});
|
|
34
40
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
41
|
+
onDateRangeSelect(event) {
|
|
42
|
+
this.selectedDateRange = handleDateRangeSelection(event, this.selectedDateRange);
|
|
43
|
+
this.getChartData();
|
|
39
44
|
}
|
|
40
45
|
ngOnDestroy() {
|
|
41
46
|
super.ngOnDestroy();
|
|
42
47
|
}
|
|
43
48
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: InsightComponent, deps: [{ token: i1.AdminService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
44
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: InsightComponent, selector: "pw-admin-subscription-insight", usesInheritance: true, ngImport: i0, template: "
|
|
49
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: InsightComponent, selector: "pw-admin-subscription-insight", usesInheritance: true, ngImport: i0, template: "<app-date-picker\n[selectedDateRange]=\"selectedDateRange\"\n[dateRanges]=\"dateRanges\"\n(dateRangeChange)=\"onDateRangeSelect($event)\">\n</app-date-picker>\n<div class=\"w-100 text-center mt-3\" *ngIf=\"loading\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n<ng-template [ngIf]=\"graph\">\n<plotly-plot [data]=\"graph?.data\"\n [layout]=\"graph?.layout\"\n [config]=\"graph?.config\"\n [useResizeHandler]=\"true\"></plotly-plot>\n</ng-template>\n", styles: [".title{height:30px}\n"], dependencies: [{ kind: "component", type: i2.PlotlyComponent, selector: "plotly-plot", inputs: ["data", "layout", "config", "frames", "style", "theme", "divId", "revision", "className", "debug", "useResizeHandler", "updateOnLayoutChange", "updateOnDataChange", "updateOnlyWithRevision"], outputs: ["initialized", "update", "purge", "error", "afterExport", "afterPlot", "animated", "animatingFrame", "animationInterrupted", "autoSize", "beforeExport", "beforeHover", "buttonClicked", "click", "plotlyClick", "clickAnnotation", "deselect", "doubleClick", "framework", "hover", "legendClick", "legendDoubleClick", "react", "relayout", "relayouting", "restyle", "redraw", "selected", "selecting", "sliderChange", "sliderEnd", "sliderStart", "sunburstclick", "transitioning", "transitionInterrupted", "unhover", "treemapclick", "webglcontextlost"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.DateRangePickerComponent, selector: "app-date-picker", inputs: ["selectedDateRange", "dateRanges"], outputs: ["dateRangeChange"] }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }] }); }
|
|
45
50
|
}
|
|
46
51
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: InsightComponent, decorators: [{
|
|
47
52
|
type: Component,
|
|
48
|
-
args: [{ selector: 'pw-admin-subscription-insight', template: "
|
|
53
|
+
args: [{ selector: 'pw-admin-subscription-insight', template: "<app-date-picker\n[selectedDateRange]=\"selectedDateRange\"\n[dateRanges]=\"dateRanges\"\n(dateRangeChange)=\"onDateRangeSelect($event)\">\n</app-date-picker>\n<div class=\"w-100 text-center mt-3\" *ngIf=\"loading\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n<ng-template [ngIf]=\"graph\">\n<plotly-plot [data]=\"graph?.data\"\n [layout]=\"graph?.layout\"\n [config]=\"graph?.config\"\n [useResizeHandler]=\"true\"></plotly-plot>\n</ng-template>\n", styles: [".title{height:30px}\n"] }]
|
|
49
54
|
}], ctorParameters: () => [{ type: i1.AdminService }, { type: i0.Injector }] });
|
|
50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RGF0YSgpO1xuICAgIH1cblxuICAgIC8qKiBGdW5jdGlvbiB0byBnZXQgdGhlIGRhdGEgZm9yIHRoZSBncmFwaCAqL1xuICAgIHByaXZhdGUgZ2V0Q2hhcnREYXRhKCkge1xuICAgICAgICB0aGlzLmxvYWRpbmcgPSB0cnVlO1xuICAgICAgICB0aGlzLmFkbWluU2VydmljZVxuICAgICAgICAgICAgLmdldFN1YnNjcmlwdGlvbkFuYWx5dGljcyhcbiAgICAgICAgICAgICAgICBTVUJTQ1JJUFRJT05fQU5BTFlUSUNTX1RZUEVTLlNVQlNDUklQVElPTlMsXG4gICAgICAgICAgICAgICAgdGhpcy5zdWJzY3JpcHRpb25JZCxcbiAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGVkRGF0ZVJhbmdlPy5zdGFydERhdGVcbiAgICAgICAgICAgICAgICAgICAgPyB0aGlzLnNlbGVjdGVkRGF0ZVJhbmdlLnN0YXJ0RGF0ZS5mb3JtYXQoJ1lZWVktTU0tREQnKVxuICAgICAgICAgICAgICAgICAgICA6ICcnLFxuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWREYXRlUmFuZ2U/LmVuZERhdGVcbiAgICAgICAgICAgICAgICAgICAgPyB0aGlzLnNlbGVjdGVkRGF0ZVJhbmdlLmVuZERhdGUuZm9ybWF0KCdZWVlZLU1NLUREJylcbiAgICAgICAgICAgICAgICAgICAgOiAnJ1xuICAgICAgICAgICAgKVxuICAgICAgICAgICAgLnN1YnNjcmliZShyZXNwb25zZSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5ncmFwaCA9IHJlc3BvbnNlO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5hZGQoKCkgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMubG9hZGluZyA9IGZhbHNlO1xuICAgICAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgb25EYXRlUmFuZ2VTZWxlY3QoZXZlbnQ6IHsgc3RhcnREYXRlOiBtb21lbnQuTW9tZW50OyBlbmREYXRlOiBtb21lbnQuTW9tZW50IH0pIHtcbiAgICAgICAgdGhpcy5zZWxlY3RlZERhdGVSYW5nZSA9IGhhbmRsZURhdGVSYW5nZVNlbGVjdGlvbihldmVudCwgdGhpcy5zZWxlY3RlZERhdGVSYW5nZSk7XG4gICAgICAgIHRoaXMuZ2V0Q2hhcnREYXRhKCk7XG4gICAgfVxuXG4gICAgb3ZlcnJpZGUgbmdPbkRlc3Ryb3koKSB7XG4gICAgICAgIHN1cGVyLm5nT25EZXN0cm95KCk7XG4gICAgfVxufVxuIiwiPGFwcC1kYXRlLXBpY2tlclxuW3NlbGVjdGVkRGF0ZVJhbmdlXT1cInNlbGVjdGVkRGF0ZVJhbmdlXCJcbltkYXRlUmFuZ2VzXT1cImRhdGVSYW5nZXNcIlxuKGRhdGVSYW5nZUNoYW5nZSk9XCJvbkRhdGVSYW5nZVNlbGVjdCgkZXZlbnQpXCI+XG48L2FwcC1kYXRlLXBpY2tlcj5cbjxkaXYgY2xhc3M9XCJ3LTEwMCB0ZXh0LWNlbnRlciBtdC0zXCIgKm5nSWY9XCJsb2FkaW5nXCI+XG4gIDxwLXByb2dyZXNzU3Bpbm5lciBzdHJva2VXaWR0aD1cIjJcIj4gPC9wLXByb2dyZXNzU3Bpbm5lcj5cbjwvZGl2PlxuPG5nLXRlbXBsYXRlIFtuZ0lmXT1cImdyYXBoXCI+XG48cGxvdGx5LXBsb3QgW2RhdGFdPVwiZ3JhcGg/LmRhdGFcIlxuICBbbGF5b3V0XT1cImdyYXBoPy5sYXlvdXRcIlxuICBbY29uZmlnXT1cImdyYXBoPy5jb25maWdcIlxuICBbdXNlUmVzaXplSGFuZGxlcl09XCJ0cnVlXCI+PC9wbG90bHktcGxvdD5cbjwvbmctdGVtcGxhdGU+XG4iXX0=
|
|
@@ -219,7 +219,7 @@ export class InviteUsersComponent extends AppBaseComponent {
|
|
|
219
219
|
super.ngOnDestroy();
|
|
220
220
|
}
|
|
221
221
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: InviteUsersComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2.AdminService }, { token: i3.ProductService }, { token: i0.Injector }, { token: i3.CommonService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
222
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: InviteUsersComponent, selector: "pw-invite-users", viewQueries: [{ propertyName: "refProduct", first: true, predicate: ["refProduct"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"dashboard user-details\">\n <div class=\"dashboard-body\">\n\n <div class=\"me-auto col-xs-6 mt-4\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h3 class=\"\">Invite New User</h3>\n <p>Here you can send an invitation to a new user to try any of our products</p>\n </div>\n\n <div class=\"p-2 mt-3\">\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSave()\">\n <div class=\"row\">\n <div class=\"mb-3 col-sm-4\">\n <pw-input-container [label]=\"'Label.FirstName' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.FirstName' | transloco\"\n class=\"col-md-6 p-0\"\n name=\"first_name\"\n [errorMsg]=\"'Admin.Subscriptions.Validation.FirstName' | transloco\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"first_name\"\n [ngClass]=\"{\n 'is-invalid':\n form.get('first_name').touched && form.get('first_name').invalid\n }\" />\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\">\n <pw-input-container [label]=\"'Label.LastName' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.LastName' | transloco\"\n class=\"col-md-6 p-0\"\n name=\"last_name\"\n [errorMsg]=\"'Admin.Subscriptions.Validation.LastName' | transloco\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"last_name\"\n [ngClass]=\"{\n 'is-invalid': form.get('last_name').touched && form.get('last_name').invalid\n }\" />\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\">\n <pw-input-container [label]=\"'Label.Email' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.Email' | transloco\"\n class=\"col-md-6 p-0\"\n name=\"email\"\n [errorMsg]=\"'Admin.Subscriptions.Validation.Email' | transloco\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"email\"\n [ngClass]=\"{\n 'is-invalid': form.get('email').touched && form.get('email').invalid\n }\" />\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\">\n <pw-input-container [label]=\"'Label.Product' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.SubscriptionProduct' | transloco\"\n name=\"product_id\"\n [errorMsg]=\"'Admin.Subscriptions.Validation.Product' | transloco\">\n <p-autoComplete #refProduct\n [suggestions]=\"filteredProducts\"\n formControlName=\"product_id\"\n dataKey=\"id\"\n field=\"label\"\n [dropdown]=\"true\"\n [delay]=\"1000\"\n [type]=\"'search'\"\n (completeMethod)=\"searchProduct($event)\"\n (onSelect)=\"onProductChange($event)\"\n (onClear)=\"onProductClear($event)\"\n styleClass=\"w-100\"\n placeholder=\"Search Product\"\n [inputStyle]=\"\n form.get('product_id').touched && form.get('product_id').invalid\n ? { border: '1px solid #ff586b' }\n : { border: '1px solid gray' }\n \"\n [multiple]=\"false\">\n </p-autoComplete>\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\">\n <pw-input-container label=\"{{'Label.Seats' | transloco}}{{unitsText}}\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.Units' | transloco\"\n class=\"col-md-6 p-0\"\n name=\"units\"\n [errorMsg]=\"'Admin.Subscriptions.Validation.Units' | transloco\">\n <input type=\"number\"\n class=\"form-control\"\n formControlName=\"units\"\n [ngClass]=\"{\n 'is-invalid': form.get('units').touched && form.get('units').invalid\n }\" />\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\">\n <pw-input-container [label]=\"'Admin.Subscriptions.MinUnits' | transloco\"\n [showTooltip]=\"true\"\n name=\"min_units\"\n [errorMsg]=\"'Admin.Subscriptions.Validation.MinUnits' | transloco\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.MinUnits' | transloco\">\n <input type=\"number\"\n min=\"0\"\n [max]=\"form.get('units').value\"\n class=\"form-control\"\n formControlName=\"min_units\" />\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\"\n *ngIf=\"organizationIndustries$ | async as industries\">\n <pw-input-container [label]=\"'Organization.OrganizationIndustry' | transloco\"\n name=\"organization_industry_id\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.OrganizationIndustry'| transloco\">\n <select formControlName=\"organization_industry_id\"\n class=\"form-control form-select\">\n <option *ngFor=\"let option of industries['organization_industries']\"\n [value]=\"option.id\">\n {{ option.name }}\n </option>\n </select>\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\">\n <pw-input-container [label]=\"'Organization.OrganizationName' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.OrganizationName'| transloco\"\n class=\"col-md-6 p-0\"\n name=\"name\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"name\"\n [ngClass]=\"{\n 'is-invalid': form.get('name').touched && form.get('name').invalid\n }\" />\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\"\n *ngIf=\"organizationTypes$ | async as types\">\n <pw-input-container [label]=\"'Organization.OrganizationType' | transloco\"\n name=\"organization_type_id\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.OrganizationType'| transloco\">\n <select formControlName=\"organization_type_id\"\n class=\"form-control form-select\">\n <option *ngFor=\"let option of types['organization_types']\"\n [value]=\"option.id\">\n {{ option.name }}\n </option>\n </select>\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\"\n *ngIf=\"organizationSizes$ | async as sizes\">\n <pw-input-container [label]=\"'Organization.OrganizationSize' | transloco\"\n name=\"organization_size_id\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.OrganizationSize'| transloco\">\n <select formControlName=\"organization_size_id\"\n class=\"form-control form-select\">\n <option *ngFor=\"let option of sizes['organization_sizes']\"\n [value]=\"option.id\">\n {{ option.name }}\n </option>\n </select>\n </pw-input-container>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 text-end\">\n <input type=\"button\"\n class=\"btn btn-outline-primary me-3\"\n value=\"Cancel\"\n (click)=\"form.reset(); totalRecordsUnFiltered = 0; back()\" />\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n [disabled]=\"buttonBusy\"\n class=\"btn btn-primary\">Invite</button>\n </div>\n </div>\n</form>\n </div>\n </div>\n </div>\n</div>", styles: [":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: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}\n"], dependencies: [{ kind: "component", type: i4.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "variant"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "component", type: i6.InputContainerComponent, selector: "pw-input-container", inputs: ["name", "label", "labelClass", "tooltipPosition", "required", "errorMsg", "isReadOnly", "showTooltip", "tooltipText", "showTriangle", "afterLabel", "showAfterLabel", "showTriangleText"] }, { kind: "directive", type: i7.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.TranslocoPipe, name: "transloco" }] }); }
|
|
222
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: InviteUsersComponent, selector: "pw-invite-users", viewQueries: [{ propertyName: "refProduct", first: true, predicate: ["refProduct"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"dashboard user-details\">\n <div class=\"dashboard-body\">\n\n <div class=\"me-auto col-xs-6 mt-4\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h3 class=\"\">Invite New User</h3>\n <p>Here you can send an invitation to a new user to try any of our products</p>\n </div>\n\n <div class=\"p-2 mt-3\">\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSave()\">\n <div class=\"row\">\n <div class=\"mb-3 col-sm-4\">\n <pw-input-container [label]=\"'Label.FirstName' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.FirstName' | transloco\"\n class=\"col-md-6 p-0\"\n name=\"first_name\"\n [errorMsg]=\"'Admin.Subscriptions.Validation.FirstName' | transloco\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"first_name\"\n [ngClass]=\"{\n 'is-invalid':\n form.get('first_name').touched && form.get('first_name').invalid\n }\" />\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\">\n <pw-input-container [label]=\"'Label.LastName' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.LastName' | transloco\"\n class=\"col-md-6 p-0\"\n name=\"last_name\"\n [errorMsg]=\"'Admin.Subscriptions.Validation.LastName' | transloco\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"last_name\"\n [ngClass]=\"{\n 'is-invalid': form.get('last_name').touched && form.get('last_name').invalid\n }\" />\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\">\n <pw-input-container [label]=\"'Label.Email' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.Email' | transloco\"\n class=\"col-md-6 p-0\"\n name=\"email\"\n [errorMsg]=\"'Admin.Subscriptions.Validation.Email' | transloco\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"email\"\n [ngClass]=\"{\n 'is-invalid': form.get('email').touched && form.get('email').invalid\n }\" />\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\">\n <pw-input-container [label]=\"'Label.Product' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.SubscriptionProduct' | transloco\"\n name=\"product_id\"\n [errorMsg]=\"'Admin.Subscriptions.Validation.Product' | transloco\">\n <p-autoComplete #refProduct\n [suggestions]=\"filteredProducts\"\n formControlName=\"product_id\"\n dataKey=\"id\"\n field=\"label\"\n [dropdown]=\"true\"\n [delay]=\"1000\"\n [type]=\"'search'\"\n (completeMethod)=\"searchProduct($event)\"\n (onSelect)=\"onProductChange($event)\"\n (onClear)=\"onProductClear($event)\"\n styleClass=\"w-100\"\n placeholder=\"Search Product\"\n [inputStyle]=\"\n form.get('product_id').touched && form.get('product_id').invalid\n ? { border: '1px solid #ff586b' }\n : { border: '1px solid gray' }\n \"\n [multiple]=\"false\">\n </p-autoComplete>\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\">\n <pw-input-container label=\"{{'Label.Seats' | transloco}}{{unitsText}}\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.Units' | transloco\"\n class=\"col-md-6 p-0\"\n name=\"units\"\n [errorMsg]=\"'Admin.Subscriptions.Validation.Units' | transloco\">\n <input type=\"number\"\n class=\"form-control\"\n formControlName=\"units\"\n [ngClass]=\"{\n 'is-invalid': form.get('units').touched && form.get('units').invalid\n }\" />\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\">\n <pw-input-container [label]=\"'Admin.Subscriptions.MinUnits' | transloco\"\n [showTooltip]=\"true\"\n name=\"min_units\"\n [errorMsg]=\"'Admin.Subscriptions.Validation.MinUnits' | transloco\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.MinUnits' | transloco\">\n <input type=\"number\"\n min=\"0\"\n [max]=\"form.get('units').value\"\n class=\"form-control\"\n formControlName=\"min_units\" />\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\"\n *ngIf=\"organizationIndustries$ | async as industries\">\n <pw-input-container [label]=\"'Organization.OrganizationIndustry' | transloco\"\n name=\"organization_industry_id\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.OrganizationIndustry'| transloco\">\n <select formControlName=\"organization_industry_id\"\n class=\"form-control form-select\">\n <option *ngFor=\"let option of industries['organization_industries']\"\n [value]=\"option.id\">\n {{ option.name }}\n </option>\n </select>\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\">\n <pw-input-container [label]=\"'Organization.OrganizationName' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.OrganizationName'| transloco\"\n class=\"col-md-6 p-0\"\n name=\"name\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"name\"\n [ngClass]=\"{\n 'is-invalid': form.get('name').touched && form.get('name').invalid\n }\" />\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\"\n *ngIf=\"organizationTypes$ | async as types\">\n <pw-input-container [label]=\"'Organization.OrganizationType' | transloco\"\n name=\"organization_type_id\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.OrganizationType'| transloco\">\n <select formControlName=\"organization_type_id\"\n class=\"form-control form-select\">\n <option *ngFor=\"let option of types['organization_types']\"\n [value]=\"option.id\">\n {{ option.name }}\n </option>\n </select>\n </pw-input-container>\n </div>\n <div class=\"mb-3 col-sm-4\"\n *ngIf=\"organizationSizes$ | async as sizes\">\n <pw-input-container [label]=\"'Organization.OrganizationSize' | transloco\"\n name=\"organization_size_id\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.OrganizationSize'| transloco\">\n <select formControlName=\"organization_size_id\"\n class=\"form-control form-select\">\n <option *ngFor=\"let option of sizes['organization_sizes']\"\n [value]=\"option.id\">\n {{ option.name }}\n </option>\n </select>\n </pw-input-container>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 text-end\">\n <input type=\"button\"\n class=\"btn btn-outline-primary me-3\"\n value=\"Cancel\"\n (click)=\"form.reset(); totalRecordsUnFiltered = 0; back()\" />\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n [disabled]=\"buttonBusy\"\n class=\"btn btn-primary\">Invite</button>\n </div>\n </div>\n</form>\n </div>\n </div>\n </div>\n</div>", styles: [":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: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}\n"], dependencies: [{ kind: "component", type: i4.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "variant"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "component", type: i6.InputContainerComponent, selector: "pw-input-container", inputs: ["name", "label", "labelClass", "tooltipPosition", "required", "errorMsg", "isReadOnly", "showTooltip", "tooltipText", "showTriangle", "afterLabel", "showAfterLabel", "showTriangleText", "isLeftTooltip"] }, { kind: "directive", type: i7.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.TranslocoPipe, name: "transloco" }] }); }
|
|
223
223
|
}
|
|
224
224
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: InviteUsersComponent, decorators: [{
|
|
225
225
|
type: Component,
|
|
@@ -73,7 +73,7 @@ export class TipComponent extends AppBaseComponent {
|
|
|
73
73
|
super.ngOnDestroy();
|
|
74
74
|
}
|
|
75
75
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: TipComponent, deps: [{ token: i1.TipsService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
76
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: TipComponent, selector: "pw-admin-tip", usesInheritance: true, ngImport: i0, template: "<div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n <div class=\"me-auto col-xs-6 mt-4\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h3 class=\"d-inline-block\">Tours</h3>\n </div>\n\n <div class=\"w-100 text-center mt-3\"\n *ngIf=\"isLoading\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n\n <div class=\"p-2 mt-3\" *ngIf=\"!isLoading\">\n <div class=\"mb-3\">\n <p>Example of \"instructions\":</p>\n <pre class=\"json-example\">\n{{\n '{\\n' +\n \" 'steps': [\\n\" +\n \" {\\n\" +\n \" 'title': 'Step 1',\\n\" +\n \" 'content': '<p><strong>PosiWise</strong> welcomes you on board!</p>',\\n\" +\n \" 'target': 'user-message',\\n\" +\n \" 'placement': 'bottom'\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" 'title': 'Step 2',\\n\" +\n \" 'content': 'We have great features to showcase',\\n\" +\n \" 'target': 'cards',\\n\" +\n \" 'placement': 'bottom',\\n\" +\n \" 'showPrevButton': true\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" 'title': 'Step 3',\\n\" +\n \" 'content': 'Get Help',\\n\" +\n \" 'target': 'step3',\\n\" +\n \" 'placement': 'left',\\n\" +\n \" 'showPrevButton': true\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n '}'\n}}</pre>\n </div>\n\n <div class=\"mt-3\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSave()\">\n <div class=\"row\">\n <div class=\"col-12 col-sm-12\">\n <pw-input-container label=\"Name\" name=\"name\" errorMsg=\"Please enter Name\">\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" id=\"name\" />\n </pw-input-container>\n\n <pw-input-container label=\"Instructions\" name=\"instructions\" errorMsg=\"Please enter steps\">\n <textarea type=\"text\" class=\"form-control bg-transparent\" formControlName=\"instructions\"\n [rows]=\"5\" [cols]=\"30\" pInputTextarea autoResize=\"autoResize\"></textarea>\n </pw-input-container>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col-12 col-sm-12\">\n <pw-input-container label=\"Is Active\" name=\"active\">\n <ui-switch class=\"d-block\" formControlName=\"active\" name=\"active\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <div class=\"float-end mb-3 mt-4\">\n <button type=\"button\" class=\"btn btn-outline-default me-2\" (click)=\"back()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\" [buttonBusy]=\"buttonBusy\" *rbacAllow=\"'Pages.Admin.Users.Edit'\"\n class=\"btn btn-primary\">\n {{ 'Button.Save' | transloco }}\n </button>\n </div>\n </form>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".json-example{background-color:#f4f4f4;padding:15px;border-radius:5px;font-family:Courier New,Courier,monospace;white-space:pre-wrap;overflow-x:auto;color:#333;border:1px solid #ccc;max-height:300px;font-size:14px;line-height:1.6}pre{margin:0}.container-fluid .dashboard-body{padding:20px}form .form-group{margin-bottom:1.5rem}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i4.UiSwitchComponent, selector: "ui-switch", inputs: ["size", "color", "switchOffColor", "switchColor", "defaultBgColor", "defaultBoColor", "checkedLabel", "uncheckedLabel", "checkedTextColor", "uncheckedTextColor", "beforeChange", "ariaLabel", "checked", "disabled", "reverse", "loading"], outputs: ["change", "changeEvent", "valueChange"] }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i6.InputContainerComponent, selector: "pw-input-container", inputs: ["name", "label", "labelClass", "tooltipPosition", "required", "errorMsg", "isReadOnly", "showTooltip", "tooltipText", "showTriangle", "afterLabel", "showAfterLabel", "showTriangleText"] }, { kind: "directive", type: i7.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "directive", type: i7.RbacAllowDirective, selector: "[rbacAllow]", inputs: ["rbacAllow"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i8.TranslocoPipe, name: "transloco" }] }); }
|
|
76
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: TipComponent, selector: "pw-admin-tip", usesInheritance: true, ngImport: i0, template: "<div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n <div class=\"me-auto col-xs-6 mt-4\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h3 class=\"d-inline-block\">Tours</h3>\n </div>\n\n <div class=\"w-100 text-center mt-3\"\n *ngIf=\"isLoading\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n\n <div class=\"p-2 mt-3\" *ngIf=\"!isLoading\">\n <div class=\"mb-3\">\n <p>Example of \"instructions\":</p>\n <pre class=\"json-example\">\n{{\n '{\\n' +\n \" 'steps': [\\n\" +\n \" {\\n\" +\n \" 'title': 'Step 1',\\n\" +\n \" 'content': '<p><strong>PosiWise</strong> welcomes you on board!</p>',\\n\" +\n \" 'target': 'user-message',\\n\" +\n \" 'placement': 'bottom'\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" 'title': 'Step 2',\\n\" +\n \" 'content': 'We have great features to showcase',\\n\" +\n \" 'target': 'cards',\\n\" +\n \" 'placement': 'bottom',\\n\" +\n \" 'showPrevButton': true\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" 'title': 'Step 3',\\n\" +\n \" 'content': 'Get Help',\\n\" +\n \" 'target': 'step3',\\n\" +\n \" 'placement': 'left',\\n\" +\n \" 'showPrevButton': true\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n '}'\n}}</pre>\n </div>\n\n <div class=\"mt-3\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSave()\">\n <div class=\"row\">\n <div class=\"col-12 col-sm-12\">\n <pw-input-container label=\"Name\" name=\"name\" errorMsg=\"Please enter Name\">\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" id=\"name\" />\n </pw-input-container>\n\n <pw-input-container label=\"Instructions\" name=\"instructions\" errorMsg=\"Please enter steps\">\n <textarea type=\"text\" class=\"form-control bg-transparent\" formControlName=\"instructions\"\n [rows]=\"5\" [cols]=\"30\" pInputTextarea autoResize=\"autoResize\"></textarea>\n </pw-input-container>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col-12 col-sm-12\">\n <pw-input-container label=\"Is Active\" name=\"active\">\n <ui-switch class=\"d-block\" formControlName=\"active\" name=\"active\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <div class=\"float-end mb-3 mt-4\">\n <button type=\"button\" class=\"btn btn-outline-default me-2\" (click)=\"back()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\" [buttonBusy]=\"buttonBusy\" *rbacAllow=\"'Pages.Admin.Users.Edit'\"\n class=\"btn btn-primary\">\n {{ 'Button.Save' | transloco }}\n </button>\n </div>\n </form>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".json-example{background-color:#f4f4f4;padding:15px;border-radius:5px;font-family:Courier New,Courier,monospace;white-space:pre-wrap;overflow-x:auto;color:#333;border:1px solid #ccc;max-height:300px;font-size:14px;line-height:1.6}pre{margin:0}.container-fluid .dashboard-body{padding:20px}form .form-group{margin-bottom:1.5rem}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i4.UiSwitchComponent, selector: "ui-switch", inputs: ["size", "color", "switchOffColor", "switchColor", "defaultBgColor", "defaultBoColor", "checkedLabel", "uncheckedLabel", "checkedTextColor", "uncheckedTextColor", "beforeChange", "ariaLabel", "checked", "disabled", "reverse", "loading"], outputs: ["change", "changeEvent", "valueChange"] }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i6.InputContainerComponent, selector: "pw-input-container", inputs: ["name", "label", "labelClass", "tooltipPosition", "required", "errorMsg", "isReadOnly", "showTooltip", "tooltipText", "showTriangle", "afterLabel", "showAfterLabel", "showTriangleText", "isLeftTooltip"] }, { kind: "directive", type: i7.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "directive", type: i7.RbacAllowDirective, selector: "[rbacAllow]", inputs: ["rbacAllow"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i8.TranslocoPipe, name: "transloco" }] }); }
|
|
77
77
|
}
|
|
78
78
|
__decorate([
|
|
79
79
|
ValidateForm('form'),
|