@posiwise/user-module 0.0.177 → 0.0.179
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i7$2 from "@angular/common";
|
|
2
2
|
import { CommonModule } from "@angular/common";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
import { Component, Directive, EventEmitter, HostListener, Input, NgModule, Optional, Output, Pipe, Self, ViewChild } from "@angular/core";
|
|
4
|
+
import { Component, Directive, EventEmitter, HostListener, Injectable, Input, NgModule, Optional, Output, Pipe, Self, ViewChild } from "@angular/core";
|
|
5
5
|
import * as i1$1 from "@angular/forms";
|
|
6
6
|
import { FormsModule, ReactiveFormsModule, Validators } from "@angular/forms";
|
|
7
7
|
import * as i1$2 from "@angular/router";
|
|
@@ -9,7 +9,7 @@ import { RouterModule } from "@angular/router";
|
|
|
9
9
|
import * as i9$1 from "@angular-magic/ngx-gp-autocomplete";
|
|
10
10
|
import { NgxGpAutocompleteModule } from "@angular-magic/ngx-gp-autocomplete";
|
|
11
11
|
import { AppConfigService } from "@posiwise/app-config-service";
|
|
12
|
-
import * as i5$
|
|
12
|
+
import * as i5$1 from "@posiwise/app-loader";
|
|
13
13
|
import { AppLoaderModule } from "@posiwise/app-loader";
|
|
14
14
|
import * as i8$1 from "@posiwise/core-guards";
|
|
15
15
|
import { TrackDirtyFormDirective } from "@posiwise/core-guards";
|
|
@@ -53,20 +53,20 @@ import { HelperService } from "@posiwise/helper-service";
|
|
|
53
53
|
import * as i13$1 from "@posiwise/utils";
|
|
54
54
|
import { ValidateForm, appendQueryParam, clearQueryParams } from "@posiwise/utils";
|
|
55
55
|
import { StatusCodes } from "http-status-codes";
|
|
56
|
-
import { firstValueFrom, forkJoin,
|
|
56
|
+
import { EMPTY, firstValueFrom, forkJoin, interval, map, of, throwError, timer } from "rxjs";
|
|
57
57
|
import { getDomain } from "tldts";
|
|
58
|
-
import * as i3 from "@posiwise/common-services";
|
|
58
|
+
import * as i3$2 from "@posiwise/common-services";
|
|
59
59
|
import { FormHelperService, PermissionService, ValidationService, hasKnowledgeAlpha } from "@posiwise/common-services";
|
|
60
60
|
import * as i14 from "@jsverse/transloco";
|
|
61
61
|
import cloneDeep from "lodash/cloneDeep";
|
|
62
62
|
import sortBy from "lodash/sortBy";
|
|
63
|
-
import {
|
|
63
|
+
import { catchError, map as map$1, mergeMap, switchMap } from "rxjs/operators";
|
|
64
64
|
import { HttpErrorResponse, HttpParams } from "@angular/common/http";
|
|
65
65
|
import { GetUser, getUser } from "@posiwise/app-store";
|
|
66
|
-
import * as
|
|
66
|
+
import * as i3$1 from "@ngrx/store";
|
|
67
67
|
import * as i2$1 from "@posiwise/admin-module-utils";
|
|
68
68
|
import { AppAdmin } from "@posiwise/admin-module-utils";
|
|
69
|
-
import * as
|
|
69
|
+
import * as i3 from "@angular/cdk/clipboard";
|
|
70
70
|
import * as i5 from "primeng/table";
|
|
71
71
|
import moment from "moment";
|
|
72
72
|
import * as i4$1 from "primeng/autocomplete";
|
|
@@ -102,7 +102,7 @@ var AccountComponent = class AccountComponent {
|
|
|
102
102
|
static {
|
|
103
103
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
104
104
|
minVersion: "12.0.0",
|
|
105
|
-
version: "22.2.
|
|
105
|
+
version: "22.2.3",
|
|
106
106
|
ngImport: i0,
|
|
107
107
|
type: AccountComponent,
|
|
108
108
|
deps: [{ token: i1$2.Router }],
|
|
@@ -112,7 +112,7 @@ var AccountComponent = class AccountComponent {
|
|
|
112
112
|
static {
|
|
113
113
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
114
114
|
minVersion: "14.0.0",
|
|
115
|
-
version: "22.2.
|
|
115
|
+
version: "22.2.3",
|
|
116
116
|
type: AccountComponent,
|
|
117
117
|
isStandalone: false,
|
|
118
118
|
selector: "pw-user-account",
|
|
@@ -136,7 +136,7 @@ var AccountComponent = class AccountComponent {
|
|
|
136
136
|
};
|
|
137
137
|
i0.ɵɵngDeclareClassMetadata({
|
|
138
138
|
minVersion: "12.0.0",
|
|
139
|
-
version: "22.2.
|
|
139
|
+
version: "22.2.3",
|
|
140
140
|
ngImport: i0,
|
|
141
141
|
type: AccountComponent,
|
|
142
142
|
decorators: [{
|
|
@@ -518,15 +518,15 @@ var AccountDetailsComponent = class AccountDetailsComponent extends AppBaseCompo
|
|
|
518
518
|
static {
|
|
519
519
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
520
520
|
minVersion: "12.0.0",
|
|
521
|
-
version: "22.2.
|
|
521
|
+
version: "22.2.3",
|
|
522
522
|
ngImport: i0,
|
|
523
523
|
type: AccountDetailsComponent,
|
|
524
524
|
deps: [
|
|
525
525
|
{ token: i1$1.UntypedFormBuilder },
|
|
526
526
|
{ token: i2$2.NgbModal },
|
|
527
|
-
{ token: i3.AuthService },
|
|
528
|
-
{ token: i3.GeoService },
|
|
529
|
-
{ token: i3.ProfileService },
|
|
527
|
+
{ token: i3$2.AuthService },
|
|
528
|
+
{ token: i3$2.GeoService },
|
|
529
|
+
{ token: i3$2.ProfileService },
|
|
530
530
|
{ token: i0.Injector },
|
|
531
531
|
{ token: i0.ChangeDetectorRef },
|
|
532
532
|
{ token: i2$3.ConfirmDialogService }
|
|
@@ -537,7 +537,7 @@ var AccountDetailsComponent = class AccountDetailsComponent extends AppBaseCompo
|
|
|
537
537
|
static {
|
|
538
538
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
539
539
|
minVersion: "17.0.0",
|
|
540
|
-
version: "22.2.
|
|
540
|
+
version: "22.2.3",
|
|
541
541
|
type: AccountDetailsComponent,
|
|
542
542
|
isStandalone: false,
|
|
543
543
|
selector: "pw-account-details",
|
|
@@ -559,7 +559,7 @@ var AccountDetailsComponent = class AccountDetailsComponent extends AppBaseCompo
|
|
|
559
559
|
dependencies: [
|
|
560
560
|
{
|
|
561
561
|
kind: "component",
|
|
562
|
-
type: i5$
|
|
562
|
+
type: i5$1.AppLoaderComponent,
|
|
563
563
|
selector: "pw-loader",
|
|
564
564
|
inputs: [
|
|
565
565
|
"isVisible",
|
|
@@ -857,7 +857,7 @@ var AccountDetailsComponent = class AccountDetailsComponent extends AppBaseCompo
|
|
|
857
857
|
__decorate([ValidateForm("profileForm")], AccountDetailsComponent.prototype, "onProfileFormSubmit", null);
|
|
858
858
|
i0.ɵɵngDeclareClassMetadata({
|
|
859
859
|
minVersion: "12.0.0",
|
|
860
|
-
version: "22.2.
|
|
860
|
+
version: "22.2.3",
|
|
861
861
|
ngImport: i0,
|
|
862
862
|
type: AccountDetailsComponent,
|
|
863
863
|
decorators: [{
|
|
@@ -872,9 +872,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
872
872
|
ctorParameters: () => [
|
|
873
873
|
{ type: i1$1.UntypedFormBuilder },
|
|
874
874
|
{ type: i2$2.NgbModal },
|
|
875
|
-
{ type: i3.AuthService },
|
|
876
|
-
{ type: i3.GeoService },
|
|
877
|
-
{ type: i3.ProfileService },
|
|
875
|
+
{ type: i3$2.AuthService },
|
|
876
|
+
{ type: i3$2.GeoService },
|
|
877
|
+
{ type: i3$2.ProfileService },
|
|
878
878
|
{ type: i0.Injector },
|
|
879
879
|
{ type: i0.ChangeDetectorRef },
|
|
880
880
|
{ type: i2$3.ConfirmDialogService }
|
|
@@ -915,7 +915,8 @@ var AddSubscriptionComponent = class AddSubscriptionComponent extends AppBaseCom
|
|
|
915
915
|
this.userStore().subscribe((user) => {
|
|
916
916
|
this.user = user;
|
|
917
917
|
if (this.user) {
|
|
918
|
-
cloneDeep(this.user.subscriptions)
|
|
918
|
+
const subs = cloneDeep(this.user.subscriptions);
|
|
919
|
+
subs.forEach((subscription) => {
|
|
919
920
|
subscription.products.forEach((product) => {
|
|
920
921
|
const prod = this.products.find((x) => x.id === product.id);
|
|
921
922
|
if (prod) {
|
|
@@ -924,7 +925,7 @@ var AddSubscriptionComponent = class AddSubscriptionComponent extends AppBaseCom
|
|
|
924
925
|
}
|
|
925
926
|
});
|
|
926
927
|
});
|
|
927
|
-
this.subscribedPermissionKeys = Array.from(new Set(this.user.subscriptions.flatMap((x) => x.products).map((product) => product.permission_key)));
|
|
928
|
+
this.subscribedPermissionKeys = Array.from(/* @__PURE__ */ new Set([...this.user.subscriptions.flatMap((x) => x.products).map((product) => product.permission_key), ...this.addonPermissionKeys(subs)]));
|
|
928
929
|
const prodPermissionKeys = this.products.map((p) => p.permission_key);
|
|
929
930
|
this.subscribedPermissionKeys = this.subscribedPermissionKeys.filter((x) => prodPermissionKeys.includes(x));
|
|
930
931
|
this.availableProducts = sortBy(this.getSingleCategoryProducts(), "is_subscribed");
|
|
@@ -934,6 +935,14 @@ var AddSubscriptionComponent = class AddSubscriptionComponent extends AppBaseCom
|
|
|
934
935
|
this.cdr.markForCheck();
|
|
935
936
|
});
|
|
936
937
|
}
|
|
938
|
+
addonPermissionKeys(subscriptions) {
|
|
939
|
+
const current = subscriptions.find((x) => x.id === this.subscriptionId);
|
|
940
|
+
const heldKeys = (current?.products ?? []).map((p) => p.permission_key);
|
|
941
|
+
const heldIds = (current?.products ?? []).map((p) => p.id);
|
|
942
|
+
const addons = this.products.filter((p) => p.addon_for_permission_keys?.some((key) => heldKeys.includes(key)));
|
|
943
|
+
addons.forEach((p) => p["is_subscribed"] = heldIds.includes(p.id));
|
|
944
|
+
return addons.map((p) => p.permission_key);
|
|
945
|
+
}
|
|
937
946
|
getSingleCategoryProducts(category = this.subscribedPermissionKeys[0]) {
|
|
938
947
|
return this.products.filter((x) => category === x.permission_key);
|
|
939
948
|
}
|
|
@@ -953,11 +962,11 @@ var AddSubscriptionComponent = class AddSubscriptionComponent extends AppBaseCom
|
|
|
953
962
|
static {
|
|
954
963
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
955
964
|
minVersion: "12.0.0",
|
|
956
|
-
version: "22.2.
|
|
965
|
+
version: "22.2.3",
|
|
957
966
|
ngImport: i0,
|
|
958
967
|
type: AddSubscriptionComponent,
|
|
959
968
|
deps: [
|
|
960
|
-
{ token: i3.ProductService },
|
|
969
|
+
{ token: i3$2.ProductService },
|
|
961
970
|
{ token: i0.Injector },
|
|
962
971
|
{ token: i0.ChangeDetectorRef }
|
|
963
972
|
],
|
|
@@ -967,7 +976,7 @@ var AddSubscriptionComponent = class AddSubscriptionComponent extends AppBaseCom
|
|
|
967
976
|
static {
|
|
968
977
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
969
978
|
minVersion: "17.0.0",
|
|
970
|
-
version: "22.2.
|
|
979
|
+
version: "22.2.3",
|
|
971
980
|
type: AddSubscriptionComponent,
|
|
972
981
|
isStandalone: false,
|
|
973
982
|
selector: "pw-add-subscription",
|
|
@@ -1026,7 +1035,7 @@ var AddSubscriptionComponent = class AddSubscriptionComponent extends AppBaseCom
|
|
|
1026
1035
|
};
|
|
1027
1036
|
i0.ɵɵngDeclareClassMetadata({
|
|
1028
1037
|
minVersion: "12.0.0",
|
|
1029
|
-
version: "22.2.
|
|
1038
|
+
version: "22.2.3",
|
|
1030
1039
|
ngImport: i0,
|
|
1031
1040
|
type: AddSubscriptionComponent,
|
|
1032
1041
|
decorators: [{
|
|
@@ -1039,7 +1048,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1039
1048
|
}]
|
|
1040
1049
|
}],
|
|
1041
1050
|
ctorParameters: () => [
|
|
1042
|
-
{ type: i3.ProductService },
|
|
1051
|
+
{ type: i3$2.ProductService },
|
|
1043
1052
|
{ type: i0.Injector },
|
|
1044
1053
|
{ type: i0.ChangeDetectorRef }
|
|
1045
1054
|
]
|
|
@@ -1054,7 +1063,7 @@ var SavedCardDetailsComponent = class SavedCardDetailsComponent {
|
|
|
1054
1063
|
static {
|
|
1055
1064
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1056
1065
|
minVersion: "12.0.0",
|
|
1057
|
-
version: "22.2.
|
|
1066
|
+
version: "22.2.3",
|
|
1058
1067
|
ngImport: i0,
|
|
1059
1068
|
type: SavedCardDetailsComponent,
|
|
1060
1069
|
deps: [],
|
|
@@ -1064,7 +1073,7 @@ var SavedCardDetailsComponent = class SavedCardDetailsComponent {
|
|
|
1064
1073
|
static {
|
|
1065
1074
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1066
1075
|
minVersion: "17.0.0",
|
|
1067
|
-
version: "22.2.
|
|
1076
|
+
version: "22.2.3",
|
|
1068
1077
|
type: SavedCardDetailsComponent,
|
|
1069
1078
|
isStandalone: false,
|
|
1070
1079
|
selector: "pw-saved-card-details",
|
|
@@ -1082,7 +1091,7 @@ var SavedCardDetailsComponent = class SavedCardDetailsComponent {
|
|
|
1082
1091
|
};
|
|
1083
1092
|
i0.ɵɵngDeclareClassMetadata({
|
|
1084
1093
|
minVersion: "12.0.0",
|
|
1085
|
-
version: "22.2.
|
|
1094
|
+
version: "22.2.3",
|
|
1086
1095
|
ngImport: i0,
|
|
1087
1096
|
type: SavedCardDetailsComponent,
|
|
1088
1097
|
decorators: [{
|
|
@@ -1116,7 +1125,7 @@ var ClearMaskedOnFocusDirective = class ClearMaskedOnFocusDirective {
|
|
|
1116
1125
|
static {
|
|
1117
1126
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1118
1127
|
minVersion: "12.0.0",
|
|
1119
|
-
version: "22.2.
|
|
1128
|
+
version: "22.2.3",
|
|
1120
1129
|
ngImport: i0,
|
|
1121
1130
|
type: ClearMaskedOnFocusDirective,
|
|
1122
1131
|
deps: [{
|
|
@@ -1130,7 +1139,7 @@ var ClearMaskedOnFocusDirective = class ClearMaskedOnFocusDirective {
|
|
|
1130
1139
|
static {
|
|
1131
1140
|
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
1132
1141
|
minVersion: "14.0.0",
|
|
1133
|
-
version: "22.2.
|
|
1142
|
+
version: "22.2.3",
|
|
1134
1143
|
type: ClearMaskedOnFocusDirective,
|
|
1135
1144
|
isStandalone: false,
|
|
1136
1145
|
selector: "input[pwClearMaskedOnFocus]",
|
|
@@ -1141,7 +1150,7 @@ var ClearMaskedOnFocusDirective = class ClearMaskedOnFocusDirective {
|
|
|
1141
1150
|
};
|
|
1142
1151
|
i0.ɵɵngDeclareClassMetadata({
|
|
1143
1152
|
minVersion: "12.0.0",
|
|
1144
|
-
version: "22.2.
|
|
1153
|
+
version: "22.2.3",
|
|
1145
1154
|
ngImport: i0,
|
|
1146
1155
|
type: ClearMaskedOnFocusDirective,
|
|
1147
1156
|
decorators: [{
|
|
@@ -1183,7 +1192,7 @@ var SubscriptionNameByIdPipe = class SubscriptionNameByIdPipe {
|
|
|
1183
1192
|
static {
|
|
1184
1193
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1185
1194
|
minVersion: "12.0.0",
|
|
1186
|
-
version: "22.2.
|
|
1195
|
+
version: "22.2.3",
|
|
1187
1196
|
ngImport: i0,
|
|
1188
1197
|
type: SubscriptionNameByIdPipe,
|
|
1189
1198
|
deps: [],
|
|
@@ -1193,7 +1202,7 @@ var SubscriptionNameByIdPipe = class SubscriptionNameByIdPipe {
|
|
|
1193
1202
|
static {
|
|
1194
1203
|
this.ɵpipe = i0.ɵɵngDeclarePipe({
|
|
1195
1204
|
minVersion: "14.0.0",
|
|
1196
|
-
version: "22.2.
|
|
1205
|
+
version: "22.2.3",
|
|
1197
1206
|
ngImport: i0,
|
|
1198
1207
|
type: SubscriptionNameByIdPipe,
|
|
1199
1208
|
isStandalone: false,
|
|
@@ -1203,7 +1212,7 @@ var SubscriptionNameByIdPipe = class SubscriptionNameByIdPipe {
|
|
|
1203
1212
|
};
|
|
1204
1213
|
i0.ɵɵngDeclareClassMetadata({
|
|
1205
1214
|
minVersion: "12.0.0",
|
|
1206
|
-
version: "22.2.
|
|
1215
|
+
version: "22.2.3",
|
|
1207
1216
|
ngImport: i0,
|
|
1208
1217
|
type: SubscriptionNameByIdPipe,
|
|
1209
1218
|
decorators: [{
|
|
@@ -1224,7 +1233,7 @@ var CredentialAvatarHuePipe = class CredentialAvatarHuePipe {
|
|
|
1224
1233
|
static {
|
|
1225
1234
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1226
1235
|
minVersion: "12.0.0",
|
|
1227
|
-
version: "22.2.
|
|
1236
|
+
version: "22.2.3",
|
|
1228
1237
|
ngImport: i0,
|
|
1229
1238
|
type: CredentialAvatarHuePipe,
|
|
1230
1239
|
deps: [],
|
|
@@ -1234,7 +1243,7 @@ var CredentialAvatarHuePipe = class CredentialAvatarHuePipe {
|
|
|
1234
1243
|
static {
|
|
1235
1244
|
this.ɵpipe = i0.ɵɵngDeclarePipe({
|
|
1236
1245
|
minVersion: "14.0.0",
|
|
1237
|
-
version: "22.2.
|
|
1246
|
+
version: "22.2.3",
|
|
1238
1247
|
ngImport: i0,
|
|
1239
1248
|
type: CredentialAvatarHuePipe,
|
|
1240
1249
|
isStandalone: false,
|
|
@@ -1244,7 +1253,7 @@ var CredentialAvatarHuePipe = class CredentialAvatarHuePipe {
|
|
|
1244
1253
|
};
|
|
1245
1254
|
i0.ɵɵngDeclareClassMetadata({
|
|
1246
1255
|
minVersion: "12.0.0",
|
|
1247
|
-
version: "22.2.
|
|
1256
|
+
version: "22.2.3",
|
|
1248
1257
|
ngImport: i0,
|
|
1249
1258
|
type: CredentialAvatarHuePipe,
|
|
1250
1259
|
decorators: [{
|
|
@@ -1263,7 +1272,7 @@ var HumanizeCredentialNamePipe = class HumanizeCredentialNamePipe {
|
|
|
1263
1272
|
static {
|
|
1264
1273
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1265
1274
|
minVersion: "12.0.0",
|
|
1266
|
-
version: "22.2.
|
|
1275
|
+
version: "22.2.3",
|
|
1267
1276
|
ngImport: i0,
|
|
1268
1277
|
type: HumanizeCredentialNamePipe,
|
|
1269
1278
|
deps: [],
|
|
@@ -1273,7 +1282,7 @@ var HumanizeCredentialNamePipe = class HumanizeCredentialNamePipe {
|
|
|
1273
1282
|
static {
|
|
1274
1283
|
this.ɵpipe = i0.ɵɵngDeclarePipe({
|
|
1275
1284
|
minVersion: "14.0.0",
|
|
1276
|
-
version: "22.2.
|
|
1285
|
+
version: "22.2.3",
|
|
1277
1286
|
ngImport: i0,
|
|
1278
1287
|
type: HumanizeCredentialNamePipe,
|
|
1279
1288
|
isStandalone: false,
|
|
@@ -1283,7 +1292,7 @@ var HumanizeCredentialNamePipe = class HumanizeCredentialNamePipe {
|
|
|
1283
1292
|
};
|
|
1284
1293
|
i0.ɵɵngDeclareClassMetadata({
|
|
1285
1294
|
minVersion: "12.0.0",
|
|
1286
|
-
version: "22.2.
|
|
1295
|
+
version: "22.2.3",
|
|
1287
1296
|
ngImport: i0,
|
|
1288
1297
|
type: HumanizeCredentialNamePipe,
|
|
1289
1298
|
decorators: [{
|
|
@@ -1294,20 +1303,124 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1294
1303
|
}]
|
|
1295
1304
|
}]
|
|
1296
1305
|
});
|
|
1306
|
+
function uniqueByName(credentials) {
|
|
1307
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1308
|
+
return credentials.filter((credential) => {
|
|
1309
|
+
if (seen.has(credential.name)) return false;
|
|
1310
|
+
seen.add(credential.name);
|
|
1311
|
+
return true;
|
|
1312
|
+
});
|
|
1313
|
+
}
|
|
1314
|
+
function groupByCredentialName(credentialTypes, stored) {
|
|
1315
|
+
return credentialTypes.map(({ name }) => ({
|
|
1316
|
+
credential_name: name,
|
|
1317
|
+
credentials: stored.filter((credential) => credential.name === name)
|
|
1318
|
+
})).filter((group) => group.credentials.length > 0);
|
|
1319
|
+
}
|
|
1320
|
+
function credentialFormRow(credentialType, stored) {
|
|
1321
|
+
return {
|
|
1322
|
+
subscription_id: [0, [Validators.required]],
|
|
1323
|
+
credential_id: [credentialType?.id],
|
|
1324
|
+
field: [credentialType?.field],
|
|
1325
|
+
description: [credentialType?.description],
|
|
1326
|
+
value: [stored?.value, credentialType?.is_required ? [Validators.required] : []],
|
|
1327
|
+
id: [stored?.id]
|
|
1328
|
+
};
|
|
1329
|
+
}
|
|
1330
|
+
function changedCredentials(rows) {
|
|
1331
|
+
return rows.filter((row) => row?.value && !String(row.value).startsWith("***"));
|
|
1332
|
+
}
|
|
1333
|
+
function applyStoredIds(rows, stored) {
|
|
1334
|
+
rows.controls.forEach((row) => {
|
|
1335
|
+
const saved = stored.find((s) => s.credential_id === row.value.credential_id);
|
|
1336
|
+
if (saved && !row.value.id) row.patchValue({ id: saved.id });
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
1339
|
+
var SaveFailure = class {
|
|
1340
|
+
constructor(error) {
|
|
1341
|
+
this.error = error;
|
|
1342
|
+
}
|
|
1343
|
+
};
|
|
1344
|
+
var SubscriptionCredentialActionsService = class SubscriptionCredentialActionsService {
|
|
1345
|
+
constructor(confirmDialog, subscriptionService) {
|
|
1346
|
+
this.confirmDialog = confirmDialog;
|
|
1347
|
+
this.subscriptionService = subscriptionService;
|
|
1348
|
+
this.humanize = new HumanizeCredentialNamePipe();
|
|
1349
|
+
}
|
|
1350
|
+
load(subscriptionId) {
|
|
1351
|
+
return forkJoin({
|
|
1352
|
+
stored: this.storedCredentials(subscriptionId),
|
|
1353
|
+
types: this.subscriptionService.getAllCredentials().pipe(map$1((r) => r.credentials))
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1356
|
+
storedCredentials(subscriptionId) {
|
|
1357
|
+
return this.subscriptionService.getAllSubscriptionCredentials(subscriptionId).pipe(map$1((r) => r.subscription_credentials));
|
|
1358
|
+
}
|
|
1359
|
+
saveChanged(rows, subscriptionId) {
|
|
1360
|
+
const requests = changedCredentials(rows).map((row) => {
|
|
1361
|
+
const data = {
|
|
1362
|
+
subscription_id: subscriptionId,
|
|
1363
|
+
credential_id: row.credential_id,
|
|
1364
|
+
value: row.value
|
|
1365
|
+
};
|
|
1366
|
+
return (row.id ? this.subscriptionService.editSubscriptionCredential(row.id, data) : this.subscriptionService.postSubscriptionCredential(data)).pipe(catchError((error) => of(new SaveFailure(error))));
|
|
1367
|
+
});
|
|
1368
|
+
if (!requests.length) return of([]);
|
|
1369
|
+
return forkJoin(requests).pipe(switchMap((results) => {
|
|
1370
|
+
const failure = results.find((r) => r instanceof SaveFailure);
|
|
1371
|
+
return failure ? throwError(() => failure.error) : of(results);
|
|
1372
|
+
}));
|
|
1373
|
+
}
|
|
1374
|
+
confirmAndDelete(group, subscriptionId) {
|
|
1375
|
+
return timer(0).pipe(switchMap(() => this.confirmDialog.confirmDelete({
|
|
1376
|
+
textKey: "User.Subscriptions.SubscriptionCredentials.DeleteConfirmText",
|
|
1377
|
+
textParams: { name: this.humanize.transform(group.credential_name) }
|
|
1378
|
+
})), switchMap((ok) => ok ? this.deleteAll(group, subscriptionId) : EMPTY));
|
|
1379
|
+
}
|
|
1380
|
+
deleteAll(group, subscriptionId) {
|
|
1381
|
+
const requests = group.credentials.map((credential) => this.subscriptionService.deleteSubscriptionCredential(credential.id, subscriptionId));
|
|
1382
|
+
return forkJoin(requests).pipe(map$1(() => void 0));
|
|
1383
|
+
}
|
|
1384
|
+
static {
|
|
1385
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1386
|
+
minVersion: "12.0.0",
|
|
1387
|
+
version: "22.2.3",
|
|
1388
|
+
ngImport: i0,
|
|
1389
|
+
type: SubscriptionCredentialActionsService,
|
|
1390
|
+
deps: [{ token: i2$3.ConfirmDialogService }, { token: i3$2.SubscriptionService }],
|
|
1391
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1392
|
+
});
|
|
1393
|
+
}
|
|
1394
|
+
static {
|
|
1395
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1396
|
+
minVersion: "12.0.0",
|
|
1397
|
+
version: "22.2.3",
|
|
1398
|
+
ngImport: i0,
|
|
1399
|
+
type: SubscriptionCredentialActionsService
|
|
1400
|
+
});
|
|
1401
|
+
}
|
|
1402
|
+
};
|
|
1403
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1404
|
+
minVersion: "12.0.0",
|
|
1405
|
+
version: "22.2.3",
|
|
1406
|
+
ngImport: i0,
|
|
1407
|
+
type: SubscriptionCredentialActionsService,
|
|
1408
|
+
decorators: [{ type: Injectable }],
|
|
1409
|
+
ctorParameters: () => [{ type: i2$3.ConfirmDialogService }, { type: i3$2.SubscriptionService }]
|
|
1410
|
+
});
|
|
1297
1411
|
var SubscriptionCredentialComponent = class SubscriptionCredentialComponent extends AppBaseComponent {
|
|
1298
|
-
constructor(fb,
|
|
1412
|
+
constructor(fb, credentialActions, injector, cdr) {
|
|
1299
1413
|
super(injector);
|
|
1300
1414
|
this.fb = fb;
|
|
1301
|
-
this.
|
|
1415
|
+
this.credentialActions = credentialActions;
|
|
1302
1416
|
this.cdr = cdr;
|
|
1303
|
-
this.data = [];
|
|
1304
1417
|
this.availableCredentials = [];
|
|
1305
1418
|
this.uniqueCredential = [];
|
|
1419
|
+
this.credentials = [];
|
|
1306
1420
|
this.isEdit = false;
|
|
1307
1421
|
this.submitted = false;
|
|
1308
1422
|
this.buttonBusy = false;
|
|
1309
1423
|
this.isLoaded = false;
|
|
1310
|
-
this.credentials = [];
|
|
1311
1424
|
this.showForm = false;
|
|
1312
1425
|
this.form = this.fb.group({ credentials: this.fb.array([]) });
|
|
1313
1426
|
}
|
|
@@ -1322,101 +1435,40 @@ var SubscriptionCredentialComponent = class SubscriptionCredentialComponent exte
|
|
|
1322
1435
|
return this.form.get("credentials");
|
|
1323
1436
|
}
|
|
1324
1437
|
getAllCredentials() {
|
|
1325
|
-
this.
|
|
1326
|
-
|
|
1327
|
-
this.
|
|
1328
|
-
this.
|
|
1329
|
-
this.
|
|
1330
|
-
this.cdr.markForCheck();
|
|
1438
|
+
this.credentialActions.load(this.subscriptionId).subscribe(({ stored, types }) => {
|
|
1439
|
+
this.allSubscriptionCredentials = stored;
|
|
1440
|
+
this.availableCredentials = types;
|
|
1441
|
+
this.uniqueCredential = uniqueByName(types);
|
|
1442
|
+
this.credentials = groupByCredentialName(this.uniqueCredential, stored);
|
|
1331
1443
|
}).add(() => {
|
|
1332
1444
|
this.isLoaded = true;
|
|
1333
1445
|
this.cdr.markForCheck();
|
|
1334
1446
|
});
|
|
1335
1447
|
}
|
|
1336
|
-
getAllAvailableCredentials() {
|
|
1337
|
-
this.credentials = [];
|
|
1338
|
-
this.uniqueCredential = [];
|
|
1339
|
-
this.subscriptionService.getAllCredentials().subscribe((response) => {
|
|
1340
|
-
this.availableCredentials = response.credentials;
|
|
1341
|
-
from(this.availableCredentials).pipe(distinct((c) => c.name)).subscribe((res) => {
|
|
1342
|
-
this.uniqueCredential.push(res);
|
|
1343
|
-
});
|
|
1344
|
-
this.uniqueCredential.forEach((credential) => {
|
|
1345
|
-
const subscriptionCredentialGroup = {
|
|
1346
|
-
credential_name: "",
|
|
1347
|
-
credentials: []
|
|
1348
|
-
};
|
|
1349
|
-
this.allSubscriptionCredentials.forEach((subscriptionCredential) => {
|
|
1350
|
-
if (credential.name === subscriptionCredential.name) subscriptionCredentialGroup["credentials"].push(subscriptionCredential);
|
|
1351
|
-
});
|
|
1352
|
-
if (subscriptionCredentialGroup["credentials"].length > 0) {
|
|
1353
|
-
subscriptionCredentialGroup["credential_name"] = credential.name;
|
|
1354
|
-
this.credentials.push(subscriptionCredentialGroup);
|
|
1355
|
-
}
|
|
1356
|
-
});
|
|
1357
|
-
this.cdr.markForCheck();
|
|
1358
|
-
});
|
|
1359
|
-
}
|
|
1360
1448
|
selectedOption(event) {
|
|
1361
1449
|
this.credentialsGroup.clear();
|
|
1362
1450
|
const credentialName = this.isEdit ? event : event.value;
|
|
1363
1451
|
this.credentialsSelect = this.availableCredentials.filter((x) => x.name === credentialName);
|
|
1364
|
-
this.credentialsSelect.forEach((
|
|
1365
|
-
const
|
|
1366
|
-
|
|
1367
|
-
adminCredential.subscription_credential_id = subscriptionCredential?.id;
|
|
1368
|
-
adminCredential.credential_id = subscriptionCredential?.credential_id;
|
|
1369
|
-
this.credentialsGroup.push(this.fb.group({
|
|
1370
|
-
subscription_id: [0, [Validators.required]],
|
|
1371
|
-
credential_id: [adminCredential?.id],
|
|
1372
|
-
field: [adminCredential?.field],
|
|
1373
|
-
description: [adminCredential?.description],
|
|
1374
|
-
value: [adminCredential?.value, adminCredential?.is_required ? [Validators.required] : []],
|
|
1375
|
-
id: [subscriptionCredential?.id]
|
|
1376
|
-
}));
|
|
1452
|
+
this.credentialsSelect.forEach((credentialType) => {
|
|
1453
|
+
const stored = this.allSubscriptionCredentials.find((credential) => credential?.credential_id === credentialType?.id);
|
|
1454
|
+
this.credentialsGroup.push(this.fb.group(credentialFormRow(credentialType, stored)));
|
|
1377
1455
|
});
|
|
1378
1456
|
}
|
|
1379
1457
|
saveCredentials() {
|
|
1380
1458
|
this.submitted = true;
|
|
1459
|
+
if (!this.credentialsGroup.controls.every((control) => control.valid)) return;
|
|
1381
1460
|
this.buttonBusy = true;
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
}
|
|
1394
|
-
});
|
|
1395
|
-
forkJoin(subscription$).subscribe((response) => {
|
|
1396
|
-
if (response?.length) {
|
|
1397
|
-
this.form.markAsPristine();
|
|
1398
|
-
this.toast.success(this.translation.translate("User.Subscriptions.SubscriptionCredentials.UpdateMessage"));
|
|
1399
|
-
} else this.toast.error(`Something went wrong while saving credentials`);
|
|
1400
|
-
this.cdr.markForCheck();
|
|
1401
|
-
}).add(() => {
|
|
1402
|
-
this.submitted = false;
|
|
1403
|
-
this.buttonBusy = false;
|
|
1404
|
-
this.cdr.markForCheck();
|
|
1405
|
-
});
|
|
1406
|
-
} else this.buttonBusy = false;
|
|
1407
|
-
}
|
|
1408
|
-
revealCredentials(credential) {
|
|
1409
|
-
this.credentialToReveal = credential.credential_name;
|
|
1410
|
-
this.passwordValidationModalForRevealCredential.open();
|
|
1411
|
-
}
|
|
1412
|
-
hideCredentials() {
|
|
1413
|
-
this.credentialName = "";
|
|
1414
|
-
}
|
|
1415
|
-
showCredentials() {
|
|
1416
|
-
this.credentialName = this.credentialToReveal;
|
|
1417
|
-
}
|
|
1418
|
-
get f() {
|
|
1419
|
-
return this.form.controls;
|
|
1461
|
+
this.credentialActions.saveChanged(this.form.value.credentials, this.subscriptionId).subscribe({
|
|
1462
|
+
next: (saved) => {
|
|
1463
|
+
if (saved.length) this.notify("User.Subscriptions.SubscriptionCredentials.UpdateMessage");
|
|
1464
|
+
this.onCancel();
|
|
1465
|
+
},
|
|
1466
|
+
error: () => this.credentialActions.storedCredentials(this.subscriptionId).subscribe((stored) => applyStoredIds(this.credentialsGroup, stored))
|
|
1467
|
+
}).add(() => {
|
|
1468
|
+
this.submitted = false;
|
|
1469
|
+
this.buttonBusy = false;
|
|
1470
|
+
this.cdr.markForCheck();
|
|
1471
|
+
});
|
|
1420
1472
|
}
|
|
1421
1473
|
onCancel() {
|
|
1422
1474
|
this.getAllCredentials();
|
|
@@ -1425,35 +1477,49 @@ var SubscriptionCredentialComponent = class SubscriptionCredentialComponent exte
|
|
|
1425
1477
|
this.showForm = false;
|
|
1426
1478
|
this.isEdit = false;
|
|
1427
1479
|
this.credentialsSelect = [];
|
|
1428
|
-
this.data = [];
|
|
1429
|
-
this.credentialSaved = "";
|
|
1430
1480
|
}
|
|
1431
1481
|
openCredentialsForAdd() {
|
|
1432
1482
|
this.passwordValidationModalForAddCredential.open();
|
|
1433
1483
|
}
|
|
1434
|
-
openCredentialsForEdit(
|
|
1435
|
-
this.credentialToEdit =
|
|
1484
|
+
openCredentialsForEdit(credentialName) {
|
|
1485
|
+
this.credentialToEdit = credentialName;
|
|
1436
1486
|
this.passwordValidationModalForEditCredential.open();
|
|
1437
1487
|
}
|
|
1488
|
+
openCredentialsForDelete(credential) {
|
|
1489
|
+
this.credentialToDelete = credential;
|
|
1490
|
+
this.passwordValidationModalForDeleteCredential.open();
|
|
1491
|
+
}
|
|
1438
1492
|
editCredentials() {
|
|
1439
1493
|
this.showForm = true;
|
|
1440
1494
|
this.isEdit = true;
|
|
1441
1495
|
this.selectedOption(this.credentialToEdit);
|
|
1442
1496
|
}
|
|
1497
|
+
deleteCredentials() {
|
|
1498
|
+
this.credentialActions.confirmAndDelete(this.credentialToDelete, this.subscriptionId).subscribe({
|
|
1499
|
+
next: () => {
|
|
1500
|
+
this.notify("User.Subscriptions.SubscriptionCredentials.DeletedMessage");
|
|
1501
|
+
this.getAllCredentials();
|
|
1502
|
+
},
|
|
1503
|
+
error: () => this.getAllCredentials()
|
|
1504
|
+
});
|
|
1505
|
+
}
|
|
1443
1506
|
showEditForm() {
|
|
1444
|
-
this.data = [];
|
|
1445
1507
|
this.isEdit = false;
|
|
1446
1508
|
this.showForm = true;
|
|
1447
1509
|
}
|
|
1510
|
+
notify(messageKey) {
|
|
1511
|
+
this.toast.success(this.translation.translate(messageKey));
|
|
1512
|
+
this.cdr.markForCheck();
|
|
1513
|
+
}
|
|
1448
1514
|
static {
|
|
1449
1515
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1450
1516
|
minVersion: "12.0.0",
|
|
1451
|
-
version: "22.2.
|
|
1517
|
+
version: "22.2.3",
|
|
1452
1518
|
ngImport: i0,
|
|
1453
1519
|
type: SubscriptionCredentialComponent,
|
|
1454
1520
|
deps: [
|
|
1455
1521
|
{ token: i1$1.UntypedFormBuilder },
|
|
1456
|
-
{ token:
|
|
1522
|
+
{ token: SubscriptionCredentialActionsService },
|
|
1457
1523
|
{ token: i0.Injector },
|
|
1458
1524
|
{ token: i0.ChangeDetectorRef }
|
|
1459
1525
|
],
|
|
@@ -1463,17 +1529,12 @@ var SubscriptionCredentialComponent = class SubscriptionCredentialComponent exte
|
|
|
1463
1529
|
static {
|
|
1464
1530
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1465
1531
|
minVersion: "17.0.0",
|
|
1466
|
-
version: "22.2.
|
|
1532
|
+
version: "22.2.3",
|
|
1467
1533
|
type: SubscriptionCredentialComponent,
|
|
1468
1534
|
isStandalone: false,
|
|
1469
1535
|
selector: "pw-subscription-credential",
|
|
1536
|
+
providers: [SubscriptionCredentialActionsService],
|
|
1470
1537
|
viewQueries: [
|
|
1471
|
-
{
|
|
1472
|
-
propertyName: "passwordValidationModalForRevealCredential",
|
|
1473
|
-
first: true,
|
|
1474
|
-
predicate: ["passwordValidationModalForRevealCredential"],
|
|
1475
|
-
descendants: true
|
|
1476
|
-
},
|
|
1477
1538
|
{
|
|
1478
1539
|
propertyName: "passwordValidationModalForEditCredential",
|
|
1479
1540
|
first: true,
|
|
@@ -1485,16 +1546,22 @@ var SubscriptionCredentialComponent = class SubscriptionCredentialComponent exte
|
|
|
1485
1546
|
first: true,
|
|
1486
1547
|
predicate: ["passwordValidationModalForAddCredential"],
|
|
1487
1548
|
descendants: true
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
propertyName: "passwordValidationModalForDeleteCredential",
|
|
1552
|
+
first: true,
|
|
1553
|
+
predicate: ["passwordValidationModalForDeleteCredential"],
|
|
1554
|
+
descendants: true
|
|
1488
1555
|
}
|
|
1489
1556
|
],
|
|
1490
1557
|
usesInheritance: true,
|
|
1491
1558
|
ngImport: i0,
|
|
1492
|
-
template: "@let subName = ((userService.getUserState() | async)?.currentUser?.subscriptions | subscriptionNameById: subscriptionId);\n\n@if (showForm) {\n <div class=\"row\">\n <div class=\"col-12 d-flex\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"onCancel()\"\n (keydown.enter)=\"onCancel()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <h3 class=\"m-subheader__title m-subheader__title--separator\">\n <span>\n @if (subName) {\n {{ (isEdit ? 'User.Subscriptions.SubscriptionCredentials.EditTitle' : 'User.Subscriptions.SubscriptionCredentials.CreateTitle') | transloco: { name: subName } }}\n } @else {\n {{ (isEdit ? 'User.Subscriptions.SubscriptionCredentials.EditTitleFallback' : 'User.Subscriptions.SubscriptionCredentials.CreateTitleFallback') | transloco }}\n }\n </span>\n </h3>\n </div>\n </div>\n <p class=\"credential-page-subtitle text-muted mb-4\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.FormSubtitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.FormSubtitleFallback' | transloco }}\n }\n </p>\n\n <section class=\"credential-form-shell\">\n @if (credentialsSelect?.length) {\n <div class=\"credential-form-band\"\n [style.--avatar-hue]=\"credentialsSelect[0].name | credentialAvatarHue\">\n <span class=\"credential-avatar\" aria-hidden=\"true\"\n [style.--avatar-hue]=\"credentialsSelect[0].name | credentialAvatarHue\">\n {{ (credentialsSelect[0].name | humanizeCredentialName).charAt(0) }}\n </span>\n <span class=\"credential-form-band-name\">\n {{ credentialsSelect[0].name | humanizeCredentialName }}\n </span>\n </div>\n }\n\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"saveCredentials()\" class=\"credential-form\">\n @if (!isEdit) {\n <div class=\"credential-form-row\">\n <pw-input-container\n [label]=\"'User.Subscriptions.SubscriptionCredentials.CredentialLabel' | transloco\"\n name=\"credentialType\">\n <p-select\n [options]=\"uniqueCredential\"\n [placeholder]=\"'User.Subscriptions.SubscriptionCredentials.CredentialPlaceholder' | transloco\"\n optionLabel=\"name\" optionValue=\"name\" appendTo=\"body\"\n (onChange)=\"selectedOption($event)\">\n </p-select>\n </pw-input-container>\n </div>\n }\n\n @if (credentialsSelect?.length) {\n <div formArrayName=\"credentials\" class=\"credential-form-fields\">\n @for (credential of credentialsGroup.controls; track credential; let i = $index) {\n <div [formGroupName]=\"i\" class=\"credential-form-row\">\n <pw-input-container\n [label]=\"credential.get('field').value | humanizeCredentialName\"\n [showTooltip]=\"!!credential.get('description').value\"\n [tooltipText]=\"credential.get('description').value\"\n tooltipPosition=\"top\"\n name=\"value\"\n [errorMsg]=\"'User.Subscriptions.SubscriptionCredentials.ValueError' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"value\" pwClearMaskedOnFocus\n [ngClass]=\"{ 'is-invalid': submitted && credential.get('value').invalid }\"\n [id]=\"'credential-value-' + i\" [name]=\"'credential-value-' + i\"\n [attr.aria-label]=\"credential.get('field').value | humanizeCredentialName\" />\n </pw-input-container>\n </div>\n }\n </div>\n }\n\n <div class=\"credential-form-actions\">\n <button type=\"button\" class=\"btn btn-outline-default\" (click)=\"onCancel()\" (keydown.enter)=\"onCancel()\">\n {{ 'Button.Back' | transloco }}\n </button>\n @if (credentialsSelect?.length) {\n <button type=\"submit\" [buttonBusy]=\"buttonBusy\" class=\"btn btn-primary\">\n {{ 'Button.Submit' | transloco }}\n </button>\n }\n </div>\n </form>\n </section>\n}\n\n@if (!showForm) {\n <div class=\"row\">\n <div class=\"col-12 d-flex\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n (keydown.enter)=\"back()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <h2 class=\"mt-3\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.PageTitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.PageTitleFallback' | transloco }}\n }\n </h2>\n </div>\n <div class=\"col-12 col-md-12 text-end\">\n <button class=\"btn btn-sm btn-outline-primary\" (click)=\"openCredentialsForAdd()\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'User.Subscriptions.SubscriptionCredentials.AddButton' | transloco }}\n </button>\n </div>\n </div>\n <p class=\"credential-page-subtitle text-muted mb-4\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.ListSubtitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.ListSubtitleFallback' | transloco }}\n }\n </p>\n\n <pw-loader [isVisible]=\"!isLoaded\"></pw-loader>\n\n @if (isLoaded) {\n @if (allSubscriptionCredentials?.length === 0) {\n <div class=\"credential-empty\">\n <pw-no-data [withImage]=\"true\"\n [message]=\"'User.Subscriptions.SubscriptionCredentials.NoDataMessage' | transloco\"></pw-no-data>\n </div>\n } @else {\n <ul class=\"credential-grid\">\n @for (credential of credentials; track credential.credential_name) {\n <li class=\"credential-card\">\n <header class=\"credential-card-header\"\n [style.--avatar-hue]=\"credential.credential_name | credentialAvatarHue\">\n <span class=\"credential-avatar\" aria-hidden=\"true\">\n {{ (credential.credential_name | humanizeCredentialName).charAt(0) }}\n </span>\n <h3 class=\"credential-card-title\">\n {{ credential.credential_name | humanizeCredentialName }}\n </h3>\n <button type=\"button\" class=\"credential-icon-btn\"\n
|
|
1493
|
-
styles: [".credential-page-subtitle{margin-bottom:24px}.credential-grid{list-style:none;padding:0;margin:16px 0 0;width:100%;display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(360px,1fr))}.credential-card{background:#fff;border:1px solid #e2e5ea;border-radius:10px;display:flex;flex-direction:column;overflow:hidden;transition:border-color .15s ease-out}.credential-card:hover{border-color:#cfd4dc}.credential-card-header{display:flex;align-items:center;gap:12px;padding:14px 16px;background:hsl(var(--avatar-hue, 215),60%,97%);border-bottom:1px solid hsl(var(--avatar-hue, 215),40%,90%)}.credential-avatar{width:36px;height:36px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;font-size:15px;font-weight:700;line-height:1;color:hsl(var(--avatar-hue, 215),60%,28%);background:hsl(var(--avatar-hue, 215),70%,92%);border:1px solid hsl(var(--avatar-hue, 215),50%,82%);flex-shrink:0;text-transform:uppercase}.credential-card-header h3.credential-card-title{font-size:15px;font-weight:600;line-height:1;height:36px;color:#1a1d21;margin:0!important;padding:0!important;flex:1 1 auto;min-width:0;display:flex;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.credential-icon-btn{appearance:none;background:transparent;border:1px solid transparent;border-radius:6px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;color:#5a6473;cursor:pointer;transition:background-color .12s ease-out,color .12s ease-out,border-color .12s ease-out}.credential-icon-btn .fa{font-size:13px}.credential-icon-btn:hover,.credential-icon-btn:focus-visible{background-color:#fff;color:#1a1d21;border-color:#e2e5ea;outline:none}.credential-card-fields{margin:0;padding:4px 16px 12px;display:flex;flex-direction:column}.credential-card-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(0,2fr);align-items:center;gap:12px;padding:10px 0;border-bottom:1px dashed #eef0f3}.credential-card-row:last-child{border-bottom:0}.credential-card-row dt{font-size:11px;font-weight:500;color:#5a6473;letter-spacing:.05em;text-transform:uppercase;margin:0}.credential-card-row dd{margin:0;min-width:0;text-align:right}.credential-card-value{font-size:12.5px;font-weight:500;color:#5a6473;background:#f7f8fa;border:1px solid #e2e5ea;border-radius:4px;padding:3px 8px;display:inline-block;max-width:100%;word-break:break-all;line-height:1.5;-webkit-user-select:all;user-select:all}.credential-empty{padding:48px 0;text-align:center}.credential-form-shell{background:#fff;border:1px solid #e2e5ea;border-radius:10px;max-width:640px;overflow:hidden;margin-top:16px}.credential-form-band{display:flex;align-items:center;gap:12px;padding:14px 20px;background:hsl(var(--avatar-hue, 215),60%,97%);border-bottom:1px solid hsl(var(--avatar-hue, 215),40%,90%)}.credential-form-band .credential-form-band-name{font-size:15px;font-weight:600;line-height:1;color:hsl(var(--avatar-hue, 215),60%,22%);display:inline-flex;align-items:center;height:36px}.credential-form{padding:20px 24px 24px}.credential-form-fields{display:flex;flex-direction:column;gap:16px}.credential-form-row+.credential-form-fields{margin-top:16px;padding-top:16px;border-top:1px solid #e2e5ea}.credential-form-actions{margin-top:24px;padding-top:16px;border-top:1px solid #e2e5ea;display:flex;justify-content:flex-end;gap:8px}@media(max-width:575px){.credential-form{padding:16px}
|
|
1559
|
+
template: "@let subName = ((userService.getUserState() | async)?.currentUser?.subscriptions | subscriptionNameById: subscriptionId);\n\n@if (showForm) {\n <div class=\"row\">\n <div class=\"col-12 d-flex\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"onCancel()\"\n (keydown.enter)=\"onCancel()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <h3 class=\"m-subheader__title m-subheader__title--separator\">\n <span>\n @if (subName) {\n {{ (isEdit ? 'User.Subscriptions.SubscriptionCredentials.EditTitle' : 'User.Subscriptions.SubscriptionCredentials.CreateTitle') | transloco: { name: subName } }}\n } @else {\n {{ (isEdit ? 'User.Subscriptions.SubscriptionCredentials.EditTitleFallback' : 'User.Subscriptions.SubscriptionCredentials.CreateTitleFallback') | transloco }}\n }\n </span>\n </h3>\n </div>\n </div>\n <p class=\"credential-page-subtitle text-muted mb-4\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.FormSubtitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.FormSubtitleFallback' | transloco }}\n }\n </p>\n\n <section class=\"credential-form-shell\">\n @if (credentialsSelect?.length) {\n <div class=\"credential-form-band\"\n [style.--avatar-hue]=\"credentialsSelect[0].name | credentialAvatarHue\">\n <span class=\"credential-avatar\" aria-hidden=\"true\"\n [style.--avatar-hue]=\"credentialsSelect[0].name | credentialAvatarHue\">\n {{ (credentialsSelect[0].name | humanizeCredentialName).charAt(0) }}\n </span>\n <span class=\"credential-form-band-name\">\n {{ credentialsSelect[0].name | humanizeCredentialName }}\n </span>\n </div>\n }\n\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"saveCredentials()\" class=\"credential-form\">\n @if (!isEdit) {\n <div class=\"credential-form-row\">\n <pw-input-container\n [label]=\"'User.Subscriptions.SubscriptionCredentials.CredentialLabel' | transloco\"\n name=\"credentialType\">\n <p-select\n [options]=\"uniqueCredential\"\n [placeholder]=\"'User.Subscriptions.SubscriptionCredentials.CredentialPlaceholder' | transloco\"\n optionLabel=\"name\" optionValue=\"name\" appendTo=\"body\"\n (onChange)=\"selectedOption($event)\">\n </p-select>\n </pw-input-container>\n </div>\n }\n\n @if (credentialsSelect?.length) {\n <div formArrayName=\"credentials\" class=\"credential-form-fields\">\n @for (credential of credentialsGroup.controls; track credential; let i = $index) {\n <div [formGroupName]=\"i\" class=\"credential-form-row\">\n <pw-input-container\n [label]=\"credential.get('field').value | humanizeCredentialName\"\n [showTooltip]=\"!!credential.get('description').value\"\n [tooltipText]=\"credential.get('description').value\"\n tooltipPosition=\"top\"\n name=\"value\"\n [errorMsg]=\"'User.Subscriptions.SubscriptionCredentials.ValueError' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"value\" pwClearMaskedOnFocus\n [ngClass]=\"{ 'is-invalid': submitted && credential.get('value').invalid }\"\n [id]=\"'credential-value-' + i\" [name]=\"'credential-value-' + i\"\n [attr.aria-label]=\"credential.get('field').value | humanizeCredentialName\" />\n </pw-input-container>\n </div>\n }\n </div>\n }\n\n <div class=\"credential-form-actions\">\n <button type=\"button\" class=\"btn btn-outline-default\" (click)=\"onCancel()\" (keydown.enter)=\"onCancel()\">\n {{ 'Button.Back' | transloco }}\n </button>\n @if (credentialsSelect?.length) {\n <button type=\"submit\" [buttonBusy]=\"buttonBusy\" class=\"btn btn-primary\">\n {{ 'Button.Submit' | transloco }}\n </button>\n }\n </div>\n </form>\n </section>\n}\n\n@if (!showForm) {\n <div class=\"row\">\n <div class=\"col-12 d-flex\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n (keydown.enter)=\"back()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <h2 class=\"mt-3\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.PageTitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.PageTitleFallback' | transloco }}\n }\n </h2>\n </div>\n <div class=\"col-12 col-md-12 text-end\">\n <button class=\"btn btn-sm btn-outline-primary\" (click)=\"openCredentialsForAdd()\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'User.Subscriptions.SubscriptionCredentials.AddButton' | transloco }}\n </button>\n </div>\n </div>\n <p class=\"credential-page-subtitle text-muted mb-4\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.ListSubtitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.ListSubtitleFallback' | transloco }}\n }\n </p>\n\n <pw-loader [isVisible]=\"!isLoaded\"></pw-loader>\n\n @if (isLoaded) {\n @if (allSubscriptionCredentials?.length === 0) {\n <div class=\"credential-empty\">\n <pw-no-data [withImage]=\"true\"\n [message]=\"'User.Subscriptions.SubscriptionCredentials.NoDataMessage' | transloco\"></pw-no-data>\n </div>\n } @else {\n <ul class=\"credential-grid\">\n @for (credential of credentials; track credential.credential_name) {\n <li class=\"credential-card\">\n <header class=\"credential-card-header\"\n [style.--avatar-hue]=\"credential.credential_name | credentialAvatarHue\">\n <span class=\"credential-avatar\" aria-hidden=\"true\">\n {{ (credential.credential_name | humanizeCredentialName).charAt(0) }}\n </span>\n <h3 class=\"credential-card-title\">\n {{ credential.credential_name | humanizeCredentialName }}\n </h3>\n <div class=\"credential-card-actions\">\n <button type=\"button\" class=\"credential-icon-btn\"\n [attr.aria-label]=\"'User.Subscriptions.SubscriptionCredentials.EditAriaLabel' | transloco\"\n (click)=\"openCredentialsForEdit(credential.credential_name)\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n <button type=\"button\" class=\"credential-icon-btn credential-icon-btn--danger\"\n [attr.aria-label]=\"'User.Subscriptions.SubscriptionCredentials.DeleteAriaLabel' | transloco\"\n (click)=\"openCredentialsForDelete(credential)\">\n <i class=\"fa fa-trash\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </header>\n <dl class=\"credential-card-fields\">\n @for (entry of credential.credentials; track entry.id) {\n <div class=\"credential-card-row\">\n <dt>{{ entry.field | humanizeCredentialName }}</dt>\n <dd><code class=\"credential-card-value\">{{ entry?.value }}</code></dd>\n </div>\n }\n </dl>\n </li>\n }\n </ul>\n }\n }\n}\n\n<pw-password-validation #passwordValidationModalForEditCredential (successEvent)=\"editCredentials()\"></pw-password-validation>\n<pw-password-validation #passwordValidationModalForAddCredential (successEvent)=\"showEditForm()\"></pw-password-validation>\n<pw-password-validation #passwordValidationModalForDeleteCredential (successEvent)=\"deleteCredentials()\"></pw-password-validation>\n",
|
|
1560
|
+
styles: [".credential-page-subtitle{margin-bottom:24px}.credential-grid{list-style:none;padding:0;margin:16px 0 0;width:100%;display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(360px,1fr))}.credential-card{background:#fff;border:1px solid #e2e5ea;border-radius:10px;display:flex;flex-direction:column;overflow:hidden;transition:border-color .15s ease-out}.credential-card:hover{border-color:#cfd4dc}.credential-card-header{display:flex;align-items:center;gap:12px;padding:14px 16px;background:hsl(var(--avatar-hue, 215),60%,97%);border-bottom:1px solid hsl(var(--avatar-hue, 215),40%,90%)}.credential-avatar{width:36px;height:36px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;font-size:15px;font-weight:700;line-height:1;color:hsl(var(--avatar-hue, 215),60%,28%);background:hsl(var(--avatar-hue, 215),70%,92%);border:1px solid hsl(var(--avatar-hue, 215),50%,82%);flex-shrink:0;text-transform:uppercase}.credential-card-header h3.credential-card-title{font-size:15px;font-weight:600;line-height:1;height:36px;color:#1a1d21;margin:0!important;padding:0!important;flex:1 1 auto;min-width:0;display:flex;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.credential-icon-btn{appearance:none;background:transparent;border:1px solid transparent;border-radius:6px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;color:#5a6473;cursor:pointer;transition:background-color .12s ease-out,color .12s ease-out,border-color .12s ease-out}.credential-icon-btn .fa{font-size:13px}.credential-icon-btn:hover,.credential-icon-btn:focus-visible{background-color:#fff;color:#1a1d21;border-color:#e2e5ea;outline:none}.credential-icon-btn--danger:hover,.credential-icon-btn--danger:focus-visible{color:var(--bs-danger, #dc3545)}.credential-card-actions{display:inline-flex;gap:4px}.credential-card-fields{margin:0;padding:4px 16px 12px;display:flex;flex-direction:column}.credential-card-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(0,2fr);align-items:center;gap:12px;padding:10px 0;border-bottom:1px dashed #eef0f3}.credential-card-row:last-child{border-bottom:0}.credential-card-row dt{font-size:11px;font-weight:500;color:#5a6473;letter-spacing:.05em;text-transform:uppercase;margin:0}.credential-card-row dd{margin:0;min-width:0;text-align:right}.credential-card-value{font-size:12.5px;font-weight:500;color:#5a6473;background:#f7f8fa;border:1px solid #e2e5ea;border-radius:4px;padding:3px 8px;display:inline-block;max-width:100%;word-break:break-all;line-height:1.5;-webkit-user-select:all;user-select:all}.credential-empty{padding:48px 0;text-align:center}@media(max-width:575px){.credential-card-row{grid-template-columns:1fr;gap:4px}.credential-card-row dd{text-align:left}}\n", ".credential-form-shell{background:#fff;border:1px solid #e2e5ea;border-radius:10px;max-width:640px;overflow:hidden;margin-top:16px}.credential-form-band{display:flex;align-items:center;gap:12px;padding:14px 20px;background:hsl(var(--avatar-hue, 215),60%,97%);border-bottom:1px solid hsl(var(--avatar-hue, 215),40%,90%)}.credential-form-band .credential-form-band-name{font-size:15px;font-weight:600;line-height:1;color:hsl(var(--avatar-hue, 215),60%,22%);display:inline-flex;align-items:center;height:36px}.credential-form{padding:20px 24px 24px}.credential-form-fields{display:flex;flex-direction:column;gap:16px}.credential-form-row+.credential-form-fields{margin-top:16px;padding-top:16px;border-top:1px solid #e2e5ea}.credential-form-actions{margin-top:24px;padding-top:16px;border-top:1px solid #e2e5ea;display:flex;justify-content:flex-end;gap:8px}@media(max-width:575px){.credential-form{padding:16px}}\n"],
|
|
1494
1561
|
dependencies: [
|
|
1495
1562
|
{
|
|
1496
1563
|
kind: "component",
|
|
1497
|
-
type: i5$
|
|
1564
|
+
type: i5$1.AppLoaderComponent,
|
|
1498
1565
|
selector: "pw-loader",
|
|
1499
1566
|
inputs: [
|
|
1500
1567
|
"isVisible",
|
|
@@ -1716,29 +1783,26 @@ var SubscriptionCredentialComponent = class SubscriptionCredentialComponent exte
|
|
|
1716
1783
|
};
|
|
1717
1784
|
i0.ɵɵngDeclareClassMetadata({
|
|
1718
1785
|
minVersion: "12.0.0",
|
|
1719
|
-
version: "22.2.
|
|
1786
|
+
version: "22.2.3",
|
|
1720
1787
|
ngImport: i0,
|
|
1721
1788
|
type: SubscriptionCredentialComponent,
|
|
1722
1789
|
decorators: [{
|
|
1723
1790
|
type: Component,
|
|
1724
1791
|
args: [{
|
|
1725
1792
|
selector: "pw-subscription-credential",
|
|
1793
|
+
providers: [SubscriptionCredentialActionsService],
|
|
1726
1794
|
standalone: false,
|
|
1727
|
-
template: "@let subName = ((userService.getUserState() | async)?.currentUser?.subscriptions | subscriptionNameById: subscriptionId);\n\n@if (showForm) {\n <div class=\"row\">\n <div class=\"col-12 d-flex\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"onCancel()\"\n (keydown.enter)=\"onCancel()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <h3 class=\"m-subheader__title m-subheader__title--separator\">\n <span>\n @if (subName) {\n {{ (isEdit ? 'User.Subscriptions.SubscriptionCredentials.EditTitle' : 'User.Subscriptions.SubscriptionCredentials.CreateTitle') | transloco: { name: subName } }}\n } @else {\n {{ (isEdit ? 'User.Subscriptions.SubscriptionCredentials.EditTitleFallback' : 'User.Subscriptions.SubscriptionCredentials.CreateTitleFallback') | transloco }}\n }\n </span>\n </h3>\n </div>\n </div>\n <p class=\"credential-page-subtitle text-muted mb-4\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.FormSubtitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.FormSubtitleFallback' | transloco }}\n }\n </p>\n\n <section class=\"credential-form-shell\">\n @if (credentialsSelect?.length) {\n <div class=\"credential-form-band\"\n [style.--avatar-hue]=\"credentialsSelect[0].name | credentialAvatarHue\">\n <span class=\"credential-avatar\" aria-hidden=\"true\"\n [style.--avatar-hue]=\"credentialsSelect[0].name | credentialAvatarHue\">\n {{ (credentialsSelect[0].name | humanizeCredentialName).charAt(0) }}\n </span>\n <span class=\"credential-form-band-name\">\n {{ credentialsSelect[0].name | humanizeCredentialName }}\n </span>\n </div>\n }\n\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"saveCredentials()\" class=\"credential-form\">\n @if (!isEdit) {\n <div class=\"credential-form-row\">\n <pw-input-container\n [label]=\"'User.Subscriptions.SubscriptionCredentials.CredentialLabel' | transloco\"\n name=\"credentialType\">\n <p-select\n [options]=\"uniqueCredential\"\n [placeholder]=\"'User.Subscriptions.SubscriptionCredentials.CredentialPlaceholder' | transloco\"\n optionLabel=\"name\" optionValue=\"name\" appendTo=\"body\"\n (onChange)=\"selectedOption($event)\">\n </p-select>\n </pw-input-container>\n </div>\n }\n\n @if (credentialsSelect?.length) {\n <div formArrayName=\"credentials\" class=\"credential-form-fields\">\n @for (credential of credentialsGroup.controls; track credential; let i = $index) {\n <div [formGroupName]=\"i\" class=\"credential-form-row\">\n <pw-input-container\n [label]=\"credential.get('field').value | humanizeCredentialName\"\n [showTooltip]=\"!!credential.get('description').value\"\n [tooltipText]=\"credential.get('description').value\"\n tooltipPosition=\"top\"\n name=\"value\"\n [errorMsg]=\"'User.Subscriptions.SubscriptionCredentials.ValueError' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"value\" pwClearMaskedOnFocus\n [ngClass]=\"{ 'is-invalid': submitted && credential.get('value').invalid }\"\n [id]=\"'credential-value-' + i\" [name]=\"'credential-value-' + i\"\n [attr.aria-label]=\"credential.get('field').value | humanizeCredentialName\" />\n </pw-input-container>\n </div>\n }\n </div>\n }\n\n <div class=\"credential-form-actions\">\n <button type=\"button\" class=\"btn btn-outline-default\" (click)=\"onCancel()\" (keydown.enter)=\"onCancel()\">\n {{ 'Button.Back' | transloco }}\n </button>\n @if (credentialsSelect?.length) {\n <button type=\"submit\" [buttonBusy]=\"buttonBusy\" class=\"btn btn-primary\">\n {{ 'Button.Submit' | transloco }}\n </button>\n }\n </div>\n </form>\n </section>\n}\n\n@if (!showForm) {\n <div class=\"row\">\n <div class=\"col-12 d-flex\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n (keydown.enter)=\"back()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <h2 class=\"mt-3\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.PageTitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.PageTitleFallback' | transloco }}\n }\n </h2>\n </div>\n <div class=\"col-12 col-md-12 text-end\">\n <button class=\"btn btn-sm btn-outline-primary\" (click)=\"openCredentialsForAdd()\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'User.Subscriptions.SubscriptionCredentials.AddButton' | transloco }}\n </button>\n </div>\n </div>\n <p class=\"credential-page-subtitle text-muted mb-4\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.ListSubtitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.ListSubtitleFallback' | transloco }}\n }\n </p>\n\n <pw-loader [isVisible]=\"!isLoaded\"></pw-loader>\n\n @if (isLoaded) {\n @if (allSubscriptionCredentials?.length === 0) {\n <div class=\"credential-empty\">\n <pw-no-data [withImage]=\"true\"\n [message]=\"'User.Subscriptions.SubscriptionCredentials.NoDataMessage' | transloco\"></pw-no-data>\n </div>\n } @else {\n <ul class=\"credential-grid\">\n @for (credential of credentials; track credential.credential_name) {\n <li class=\"credential-card\">\n <header class=\"credential-card-header\"\n [style.--avatar-hue]=\"credential.credential_name | credentialAvatarHue\">\n <span class=\"credential-avatar\" aria-hidden=\"true\">\n {{ (credential.credential_name | humanizeCredentialName).charAt(0) }}\n </span>\n <h3 class=\"credential-card-title\">\n {{ credential.credential_name | humanizeCredentialName }}\n </h3>\n <button type=\"button\" class=\"credential-icon-btn\"\n
|
|
1728
|
-
styles: [".credential-page-subtitle{margin-bottom:24px}.credential-grid{list-style:none;padding:0;margin:16px 0 0;width:100%;display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(360px,1fr))}.credential-card{background:#fff;border:1px solid #e2e5ea;border-radius:10px;display:flex;flex-direction:column;overflow:hidden;transition:border-color .15s ease-out}.credential-card:hover{border-color:#cfd4dc}.credential-card-header{display:flex;align-items:center;gap:12px;padding:14px 16px;background:hsl(var(--avatar-hue, 215),60%,97%);border-bottom:1px solid hsl(var(--avatar-hue, 215),40%,90%)}.credential-avatar{width:36px;height:36px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;font-size:15px;font-weight:700;line-height:1;color:hsl(var(--avatar-hue, 215),60%,28%);background:hsl(var(--avatar-hue, 215),70%,92%);border:1px solid hsl(var(--avatar-hue, 215),50%,82%);flex-shrink:0;text-transform:uppercase}.credential-card-header h3.credential-card-title{font-size:15px;font-weight:600;line-height:1;height:36px;color:#1a1d21;margin:0!important;padding:0!important;flex:1 1 auto;min-width:0;display:flex;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.credential-icon-btn{appearance:none;background:transparent;border:1px solid transparent;border-radius:6px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;color:#5a6473;cursor:pointer;transition:background-color .12s ease-out,color .12s ease-out,border-color .12s ease-out}.credential-icon-btn .fa{font-size:13px}.credential-icon-btn:hover,.credential-icon-btn:focus-visible{background-color:#fff;color:#1a1d21;border-color:#e2e5ea;outline:none}.credential-card-fields{margin:0;padding:4px 16px 12px;display:flex;flex-direction:column}.credential-card-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(0,2fr);align-items:center;gap:12px;padding:10px 0;border-bottom:1px dashed #eef0f3}.credential-card-row:last-child{border-bottom:0}.credential-card-row dt{font-size:11px;font-weight:500;color:#5a6473;letter-spacing:.05em;text-transform:uppercase;margin:0}.credential-card-row dd{margin:0;min-width:0;text-align:right}.credential-card-value{font-size:12.5px;font-weight:500;color:#5a6473;background:#f7f8fa;border:1px solid #e2e5ea;border-radius:4px;padding:3px 8px;display:inline-block;max-width:100%;word-break:break-all;line-height:1.5;-webkit-user-select:all;user-select:all}.credential-empty{padding:48px 0;text-align:center}.credential-form-shell{background:#fff;border:1px solid #e2e5ea;border-radius:10px;max-width:640px;overflow:hidden;margin-top:16px}.credential-form-band{display:flex;align-items:center;gap:12px;padding:14px 20px;background:hsl(var(--avatar-hue, 215),60%,97%);border-bottom:1px solid hsl(var(--avatar-hue, 215),40%,90%)}.credential-form-band .credential-form-band-name{font-size:15px;font-weight:600;line-height:1;color:hsl(var(--avatar-hue, 215),60%,22%);display:inline-flex;align-items:center;height:36px}.credential-form{padding:20px 24px 24px}.credential-form-fields{display:flex;flex-direction:column;gap:16px}.credential-form-row+.credential-form-fields{margin-top:16px;padding-top:16px;border-top:1px solid #e2e5ea}.credential-form-actions{margin-top:24px;padding-top:16px;border-top:1px solid #e2e5ea;display:flex;justify-content:flex-end;gap:8px}@media(max-width:575px){.credential-form{padding:16px}
|
|
1795
|
+
template: "@let subName = ((userService.getUserState() | async)?.currentUser?.subscriptions | subscriptionNameById: subscriptionId);\n\n@if (showForm) {\n <div class=\"row\">\n <div class=\"col-12 d-flex\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"onCancel()\"\n (keydown.enter)=\"onCancel()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <h3 class=\"m-subheader__title m-subheader__title--separator\">\n <span>\n @if (subName) {\n {{ (isEdit ? 'User.Subscriptions.SubscriptionCredentials.EditTitle' : 'User.Subscriptions.SubscriptionCredentials.CreateTitle') | transloco: { name: subName } }}\n } @else {\n {{ (isEdit ? 'User.Subscriptions.SubscriptionCredentials.EditTitleFallback' : 'User.Subscriptions.SubscriptionCredentials.CreateTitleFallback') | transloco }}\n }\n </span>\n </h3>\n </div>\n </div>\n <p class=\"credential-page-subtitle text-muted mb-4\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.FormSubtitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.FormSubtitleFallback' | transloco }}\n }\n </p>\n\n <section class=\"credential-form-shell\">\n @if (credentialsSelect?.length) {\n <div class=\"credential-form-band\"\n [style.--avatar-hue]=\"credentialsSelect[0].name | credentialAvatarHue\">\n <span class=\"credential-avatar\" aria-hidden=\"true\"\n [style.--avatar-hue]=\"credentialsSelect[0].name | credentialAvatarHue\">\n {{ (credentialsSelect[0].name | humanizeCredentialName).charAt(0) }}\n </span>\n <span class=\"credential-form-band-name\">\n {{ credentialsSelect[0].name | humanizeCredentialName }}\n </span>\n </div>\n }\n\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"saveCredentials()\" class=\"credential-form\">\n @if (!isEdit) {\n <div class=\"credential-form-row\">\n <pw-input-container\n [label]=\"'User.Subscriptions.SubscriptionCredentials.CredentialLabel' | transloco\"\n name=\"credentialType\">\n <p-select\n [options]=\"uniqueCredential\"\n [placeholder]=\"'User.Subscriptions.SubscriptionCredentials.CredentialPlaceholder' | transloco\"\n optionLabel=\"name\" optionValue=\"name\" appendTo=\"body\"\n (onChange)=\"selectedOption($event)\">\n </p-select>\n </pw-input-container>\n </div>\n }\n\n @if (credentialsSelect?.length) {\n <div formArrayName=\"credentials\" class=\"credential-form-fields\">\n @for (credential of credentialsGroup.controls; track credential; let i = $index) {\n <div [formGroupName]=\"i\" class=\"credential-form-row\">\n <pw-input-container\n [label]=\"credential.get('field').value | humanizeCredentialName\"\n [showTooltip]=\"!!credential.get('description').value\"\n [tooltipText]=\"credential.get('description').value\"\n tooltipPosition=\"top\"\n name=\"value\"\n [errorMsg]=\"'User.Subscriptions.SubscriptionCredentials.ValueError' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"value\" pwClearMaskedOnFocus\n [ngClass]=\"{ 'is-invalid': submitted && credential.get('value').invalid }\"\n [id]=\"'credential-value-' + i\" [name]=\"'credential-value-' + i\"\n [attr.aria-label]=\"credential.get('field').value | humanizeCredentialName\" />\n </pw-input-container>\n </div>\n }\n </div>\n }\n\n <div class=\"credential-form-actions\">\n <button type=\"button\" class=\"btn btn-outline-default\" (click)=\"onCancel()\" (keydown.enter)=\"onCancel()\">\n {{ 'Button.Back' | transloco }}\n </button>\n @if (credentialsSelect?.length) {\n <button type=\"submit\" [buttonBusy]=\"buttonBusy\" class=\"btn btn-primary\">\n {{ 'Button.Submit' | transloco }}\n </button>\n }\n </div>\n </form>\n </section>\n}\n\n@if (!showForm) {\n <div class=\"row\">\n <div class=\"col-12 d-flex\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n (keydown.enter)=\"back()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <h2 class=\"mt-3\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.PageTitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.PageTitleFallback' | transloco }}\n }\n </h2>\n </div>\n <div class=\"col-12 col-md-12 text-end\">\n <button class=\"btn btn-sm btn-outline-primary\" (click)=\"openCredentialsForAdd()\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'User.Subscriptions.SubscriptionCredentials.AddButton' | transloco }}\n </button>\n </div>\n </div>\n <p class=\"credential-page-subtitle text-muted mb-4\">\n @if (subName) {\n {{ 'User.Subscriptions.SubscriptionCredentials.ListSubtitle' | transloco: { name: subName } }}\n } @else {\n {{ 'User.Subscriptions.SubscriptionCredentials.ListSubtitleFallback' | transloco }}\n }\n </p>\n\n <pw-loader [isVisible]=\"!isLoaded\"></pw-loader>\n\n @if (isLoaded) {\n @if (allSubscriptionCredentials?.length === 0) {\n <div class=\"credential-empty\">\n <pw-no-data [withImage]=\"true\"\n [message]=\"'User.Subscriptions.SubscriptionCredentials.NoDataMessage' | transloco\"></pw-no-data>\n </div>\n } @else {\n <ul class=\"credential-grid\">\n @for (credential of credentials; track credential.credential_name) {\n <li class=\"credential-card\">\n <header class=\"credential-card-header\"\n [style.--avatar-hue]=\"credential.credential_name | credentialAvatarHue\">\n <span class=\"credential-avatar\" aria-hidden=\"true\">\n {{ (credential.credential_name | humanizeCredentialName).charAt(0) }}\n </span>\n <h3 class=\"credential-card-title\">\n {{ credential.credential_name | humanizeCredentialName }}\n </h3>\n <div class=\"credential-card-actions\">\n <button type=\"button\" class=\"credential-icon-btn\"\n [attr.aria-label]=\"'User.Subscriptions.SubscriptionCredentials.EditAriaLabel' | transloco\"\n (click)=\"openCredentialsForEdit(credential.credential_name)\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n <button type=\"button\" class=\"credential-icon-btn credential-icon-btn--danger\"\n [attr.aria-label]=\"'User.Subscriptions.SubscriptionCredentials.DeleteAriaLabel' | transloco\"\n (click)=\"openCredentialsForDelete(credential)\">\n <i class=\"fa fa-trash\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </header>\n <dl class=\"credential-card-fields\">\n @for (entry of credential.credentials; track entry.id) {\n <div class=\"credential-card-row\">\n <dt>{{ entry.field | humanizeCredentialName }}</dt>\n <dd><code class=\"credential-card-value\">{{ entry?.value }}</code></dd>\n </div>\n }\n </dl>\n </li>\n }\n </ul>\n }\n }\n}\n\n<pw-password-validation #passwordValidationModalForEditCredential (successEvent)=\"editCredentials()\"></pw-password-validation>\n<pw-password-validation #passwordValidationModalForAddCredential (successEvent)=\"showEditForm()\"></pw-password-validation>\n<pw-password-validation #passwordValidationModalForDeleteCredential (successEvent)=\"deleteCredentials()\"></pw-password-validation>\n",
|
|
1796
|
+
styles: [".credential-page-subtitle{margin-bottom:24px}.credential-grid{list-style:none;padding:0;margin:16px 0 0;width:100%;display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(360px,1fr))}.credential-card{background:#fff;border:1px solid #e2e5ea;border-radius:10px;display:flex;flex-direction:column;overflow:hidden;transition:border-color .15s ease-out}.credential-card:hover{border-color:#cfd4dc}.credential-card-header{display:flex;align-items:center;gap:12px;padding:14px 16px;background:hsl(var(--avatar-hue, 215),60%,97%);border-bottom:1px solid hsl(var(--avatar-hue, 215),40%,90%)}.credential-avatar{width:36px;height:36px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;font-size:15px;font-weight:700;line-height:1;color:hsl(var(--avatar-hue, 215),60%,28%);background:hsl(var(--avatar-hue, 215),70%,92%);border:1px solid hsl(var(--avatar-hue, 215),50%,82%);flex-shrink:0;text-transform:uppercase}.credential-card-header h3.credential-card-title{font-size:15px;font-weight:600;line-height:1;height:36px;color:#1a1d21;margin:0!important;padding:0!important;flex:1 1 auto;min-width:0;display:flex;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.credential-icon-btn{appearance:none;background:transparent;border:1px solid transparent;border-radius:6px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;color:#5a6473;cursor:pointer;transition:background-color .12s ease-out,color .12s ease-out,border-color .12s ease-out}.credential-icon-btn .fa{font-size:13px}.credential-icon-btn:hover,.credential-icon-btn:focus-visible{background-color:#fff;color:#1a1d21;border-color:#e2e5ea;outline:none}.credential-icon-btn--danger:hover,.credential-icon-btn--danger:focus-visible{color:var(--bs-danger, #dc3545)}.credential-card-actions{display:inline-flex;gap:4px}.credential-card-fields{margin:0;padding:4px 16px 12px;display:flex;flex-direction:column}.credential-card-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(0,2fr);align-items:center;gap:12px;padding:10px 0;border-bottom:1px dashed #eef0f3}.credential-card-row:last-child{border-bottom:0}.credential-card-row dt{font-size:11px;font-weight:500;color:#5a6473;letter-spacing:.05em;text-transform:uppercase;margin:0}.credential-card-row dd{margin:0;min-width:0;text-align:right}.credential-card-value{font-size:12.5px;font-weight:500;color:#5a6473;background:#f7f8fa;border:1px solid #e2e5ea;border-radius:4px;padding:3px 8px;display:inline-block;max-width:100%;word-break:break-all;line-height:1.5;-webkit-user-select:all;user-select:all}.credential-empty{padding:48px 0;text-align:center}@media(max-width:575px){.credential-card-row{grid-template-columns:1fr;gap:4px}.credential-card-row dd{text-align:left}}\n", ".credential-form-shell{background:#fff;border:1px solid #e2e5ea;border-radius:10px;max-width:640px;overflow:hidden;margin-top:16px}.credential-form-band{display:flex;align-items:center;gap:12px;padding:14px 20px;background:hsl(var(--avatar-hue, 215),60%,97%);border-bottom:1px solid hsl(var(--avatar-hue, 215),40%,90%)}.credential-form-band .credential-form-band-name{font-size:15px;font-weight:600;line-height:1;color:hsl(var(--avatar-hue, 215),60%,22%);display:inline-flex;align-items:center;height:36px}.credential-form{padding:20px 24px 24px}.credential-form-fields{display:flex;flex-direction:column;gap:16px}.credential-form-row+.credential-form-fields{margin-top:16px;padding-top:16px;border-top:1px solid #e2e5ea}.credential-form-actions{margin-top:24px;padding-top:16px;border-top:1px solid #e2e5ea;display:flex;justify-content:flex-end;gap:8px}@media(max-width:575px){.credential-form{padding:16px}}\n"]
|
|
1729
1797
|
}]
|
|
1730
1798
|
}],
|
|
1731
1799
|
ctorParameters: () => [
|
|
1732
1800
|
{ type: i1$1.UntypedFormBuilder },
|
|
1733
|
-
{ type:
|
|
1801
|
+
{ type: SubscriptionCredentialActionsService },
|
|
1734
1802
|
{ type: i0.Injector },
|
|
1735
1803
|
{ type: i0.ChangeDetectorRef }
|
|
1736
1804
|
],
|
|
1737
1805
|
propDecorators: {
|
|
1738
|
-
passwordValidationModalForRevealCredential: [{
|
|
1739
|
-
type: ViewChild,
|
|
1740
|
-
args: ["passwordValidationModalForRevealCredential", { static: false }]
|
|
1741
|
-
}],
|
|
1742
1806
|
passwordValidationModalForEditCredential: [{
|
|
1743
1807
|
type: ViewChild,
|
|
1744
1808
|
args: ["passwordValidationModalForEditCredential", { static: false }]
|
|
@@ -1746,6 +1810,189 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1746
1810
|
passwordValidationModalForAddCredential: [{
|
|
1747
1811
|
type: ViewChild,
|
|
1748
1812
|
args: ["passwordValidationModalForAddCredential", { static: false }]
|
|
1813
|
+
}],
|
|
1814
|
+
passwordValidationModalForDeleteCredential: [{
|
|
1815
|
+
type: ViewChild,
|
|
1816
|
+
args: ["passwordValidationModalForDeleteCredential", { static: false }]
|
|
1817
|
+
}]
|
|
1818
|
+
}
|
|
1819
|
+
});
|
|
1820
|
+
var SubscriptionRemovalComponent = class SubscriptionRemovalComponent {
|
|
1821
|
+
constructor(subscriptionService, modalService, store, toast, translation, confirmDialog, cdr) {
|
|
1822
|
+
this.subscriptionService = subscriptionService;
|
|
1823
|
+
this.modalService = modalService;
|
|
1824
|
+
this.store = store;
|
|
1825
|
+
this.toast = toast;
|
|
1826
|
+
this.translation = translation;
|
|
1827
|
+
this.confirmDialog = confirmDialog;
|
|
1828
|
+
this.cdr = cdr;
|
|
1829
|
+
this.removed = new EventEmitter();
|
|
1830
|
+
this.reasonToCancel = "";
|
|
1831
|
+
}
|
|
1832
|
+
get isWholeSubscription() {
|
|
1833
|
+
return !this.target?.productId;
|
|
1834
|
+
}
|
|
1835
|
+
start(target) {
|
|
1836
|
+
this.target = target;
|
|
1837
|
+
if (this.user?.has_password) {
|
|
1838
|
+
this.passwordValidation.open();
|
|
1839
|
+
return;
|
|
1840
|
+
}
|
|
1841
|
+
this.confirmDialog.open({
|
|
1842
|
+
titleKey: "User.Subscriptions.SetPassword.Title",
|
|
1843
|
+
textKey: "User.Subscriptions.SetPassword.Text",
|
|
1844
|
+
confirmOnly: true
|
|
1845
|
+
});
|
|
1846
|
+
}
|
|
1847
|
+
onPasswordValidated(isSuccess) {
|
|
1848
|
+
if (!isSuccess) return;
|
|
1849
|
+
setTimeout(() => {
|
|
1850
|
+
this.modalService.open(this.reasonModal, {
|
|
1851
|
+
centered: true,
|
|
1852
|
+
windowClass: "modal-holder"
|
|
1853
|
+
});
|
|
1854
|
+
}, 100);
|
|
1855
|
+
}
|
|
1856
|
+
onConfirm() {
|
|
1857
|
+
const reason = this.reasonToCancel?.trim();
|
|
1858
|
+
if (!reason) {
|
|
1859
|
+
this.toast.error(this.translation.translate("User.Subscriptions.Validation.ReasonRequired"));
|
|
1860
|
+
return;
|
|
1861
|
+
}
|
|
1862
|
+
this.request(reason).subscribe(() => {
|
|
1863
|
+
this.store.dispatch(new GetUser());
|
|
1864
|
+
this.modalService.dismissAll();
|
|
1865
|
+
this.reset();
|
|
1866
|
+
this.removed.emit();
|
|
1867
|
+
});
|
|
1868
|
+
}
|
|
1869
|
+
reset() {
|
|
1870
|
+
this.target = null;
|
|
1871
|
+
this.reasonToCancel = "";
|
|
1872
|
+
this.cdr.markForCheck();
|
|
1873
|
+
}
|
|
1874
|
+
request(reason) {
|
|
1875
|
+
const body = { reason_to_cancel: reason };
|
|
1876
|
+
const { subscriptionId, productId } = this.target;
|
|
1877
|
+
if (this.isWholeSubscription) return this.subscriptionService.deleteWholeSubscription(subscriptionId, { body });
|
|
1878
|
+
const params = new HttpParams().set("product_id", productId);
|
|
1879
|
+
return this.subscriptionService.deleteSubscription(subscriptionId, {
|
|
1880
|
+
params,
|
|
1881
|
+
body
|
|
1882
|
+
});
|
|
1883
|
+
}
|
|
1884
|
+
static {
|
|
1885
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1886
|
+
minVersion: "12.0.0",
|
|
1887
|
+
version: "22.2.3",
|
|
1888
|
+
ngImport: i0,
|
|
1889
|
+
type: SubscriptionRemovalComponent,
|
|
1890
|
+
deps: [
|
|
1891
|
+
{ token: i3$2.SubscriptionService },
|
|
1892
|
+
{ token: i2$2.NgbModal },
|
|
1893
|
+
{ token: i3$1.Store },
|
|
1894
|
+
{ token: i3$2.CustomToastService },
|
|
1895
|
+
{ token: i14.TranslocoService },
|
|
1896
|
+
{ token: i2$3.ConfirmDialogService },
|
|
1897
|
+
{ token: i0.ChangeDetectorRef }
|
|
1898
|
+
],
|
|
1899
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1900
|
+
});
|
|
1901
|
+
}
|
|
1902
|
+
static {
|
|
1903
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1904
|
+
minVersion: "14.0.0",
|
|
1905
|
+
version: "22.2.3",
|
|
1906
|
+
type: SubscriptionRemovalComponent,
|
|
1907
|
+
isStandalone: false,
|
|
1908
|
+
selector: "pw-subscription-removal",
|
|
1909
|
+
inputs: { user: "user" },
|
|
1910
|
+
outputs: { removed: "removed" },
|
|
1911
|
+
viewQueries: [{
|
|
1912
|
+
propertyName: "passwordValidation",
|
|
1913
|
+
first: true,
|
|
1914
|
+
predicate: ["passwordValidation"],
|
|
1915
|
+
descendants: true
|
|
1916
|
+
}, {
|
|
1917
|
+
propertyName: "reasonModal",
|
|
1918
|
+
first: true,
|
|
1919
|
+
predicate: ["reasonModal"],
|
|
1920
|
+
descendants: true
|
|
1921
|
+
}],
|
|
1922
|
+
ngImport: i0,
|
|
1923
|
+
template: "<pw-password-validation #passwordValidation\n [destructive]=\"true\"\n (successEvent)=\"onPasswordValidated($event)\">\n</pw-password-validation>\n\n<ng-template #reasonModal let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\">\n {{ (isWholeSubscription ? 'User.Subscriptions.DeleteSubscription.Title' : 'User.Subscriptions.DeleteProduct.Title') | transloco }}\n </h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n [attr.aria-label]=\"'Common.Confirm.Close.Title' | transloco\"\n (click)=\"modal.dismiss(); reset()\">\n </button>\n </div>\n <div class=\"modal-body\">\n <p>\n {{ (isWholeSubscription ? 'User.Subscriptions.DeleteSubscription.Message' : 'User.Subscriptions.DeleteProduct.Message') | transloco }}\n </p>\n <div class=\"mb-3\">\n <label for=\"reasonToCancel\" class=\"form-label\">\n {{ 'User.Subscriptions.CancelSubscription.ReasonLabel' | transloco }} <span class=\"text-danger\">*</span>\n </label>\n <textarea\n id=\"reasonToCancel\"\n class=\"form-control\"\n rows=\"4\"\n [(ngModel)]=\"reasonToCancel\"\n [placeholder]=\"'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco\"\n [attr.aria-label]=\"'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco\"></textarea>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.dismiss(); reset()\">\n {{ 'User.Subscriptions.CancelSubscription.KeepItForNow' | transloco }}\n </button>\n <button type=\"button\"\n class=\"btn btn-danger\"\n [disabled]=\"!reasonToCancel || !reasonToCancel.trim()\"\n (click)=\"onConfirm()\">\n {{ (isWholeSubscription ? 'User.Subscriptions.DeleteSubscription' : 'User.Subscriptions.DeleteProduct') | transloco }}\n </button>\n </div>\n</ng-template>\n",
|
|
1924
|
+
dependencies: [
|
|
1925
|
+
{
|
|
1926
|
+
kind: "directive",
|
|
1927
|
+
type: i1$1.DefaultValueAccessor,
|
|
1928
|
+
selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
|
|
1929
|
+
},
|
|
1930
|
+
{
|
|
1931
|
+
kind: "directive",
|
|
1932
|
+
type: i1$1.NgControlStatus,
|
|
1933
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
1934
|
+
},
|
|
1935
|
+
{
|
|
1936
|
+
kind: "component",
|
|
1937
|
+
type: i2$3.PasswordValidationComponent,
|
|
1938
|
+
selector: "pw-password-validation",
|
|
1939
|
+
inputs: ["confirmMessage", "destructive"],
|
|
1940
|
+
outputs: ["successEvent"]
|
|
1941
|
+
},
|
|
1942
|
+
{
|
|
1943
|
+
kind: "directive",
|
|
1944
|
+
type: i1$1.NgModel,
|
|
1945
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
1946
|
+
inputs: [
|
|
1947
|
+
"name",
|
|
1948
|
+
"disabled",
|
|
1949
|
+
"ngModel",
|
|
1950
|
+
"ngModelOptions"
|
|
1951
|
+
],
|
|
1952
|
+
outputs: ["ngModelChange"],
|
|
1953
|
+
exportAs: ["ngModel"]
|
|
1954
|
+
},
|
|
1955
|
+
{
|
|
1956
|
+
kind: "pipe",
|
|
1957
|
+
type: i14.TranslocoPipe,
|
|
1958
|
+
name: "transloco"
|
|
1959
|
+
}
|
|
1960
|
+
]
|
|
1961
|
+
});
|
|
1962
|
+
}
|
|
1963
|
+
};
|
|
1964
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1965
|
+
minVersion: "12.0.0",
|
|
1966
|
+
version: "22.2.3",
|
|
1967
|
+
ngImport: i0,
|
|
1968
|
+
type: SubscriptionRemovalComponent,
|
|
1969
|
+
decorators: [{
|
|
1970
|
+
type: Component,
|
|
1971
|
+
args: [{
|
|
1972
|
+
selector: "pw-subscription-removal",
|
|
1973
|
+
standalone: false,
|
|
1974
|
+
template: "<pw-password-validation #passwordValidation\n [destructive]=\"true\"\n (successEvent)=\"onPasswordValidated($event)\">\n</pw-password-validation>\n\n<ng-template #reasonModal let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\">\n {{ (isWholeSubscription ? 'User.Subscriptions.DeleteSubscription.Title' : 'User.Subscriptions.DeleteProduct.Title') | transloco }}\n </h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n [attr.aria-label]=\"'Common.Confirm.Close.Title' | transloco\"\n (click)=\"modal.dismiss(); reset()\">\n </button>\n </div>\n <div class=\"modal-body\">\n <p>\n {{ (isWholeSubscription ? 'User.Subscriptions.DeleteSubscription.Message' : 'User.Subscriptions.DeleteProduct.Message') | transloco }}\n </p>\n <div class=\"mb-3\">\n <label for=\"reasonToCancel\" class=\"form-label\">\n {{ 'User.Subscriptions.CancelSubscription.ReasonLabel' | transloco }} <span class=\"text-danger\">*</span>\n </label>\n <textarea\n id=\"reasonToCancel\"\n class=\"form-control\"\n rows=\"4\"\n [(ngModel)]=\"reasonToCancel\"\n [placeholder]=\"'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco\"\n [attr.aria-label]=\"'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco\"></textarea>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.dismiss(); reset()\">\n {{ 'User.Subscriptions.CancelSubscription.KeepItForNow' | transloco }}\n </button>\n <button type=\"button\"\n class=\"btn btn-danger\"\n [disabled]=\"!reasonToCancel || !reasonToCancel.trim()\"\n (click)=\"onConfirm()\">\n {{ (isWholeSubscription ? 'User.Subscriptions.DeleteSubscription' : 'User.Subscriptions.DeleteProduct') | transloco }}\n </button>\n </div>\n</ng-template>\n"
|
|
1975
|
+
}]
|
|
1976
|
+
}],
|
|
1977
|
+
ctorParameters: () => [
|
|
1978
|
+
{ type: i3$2.SubscriptionService },
|
|
1979
|
+
{ type: i2$2.NgbModal },
|
|
1980
|
+
{ type: i3$1.Store },
|
|
1981
|
+
{ type: i3$2.CustomToastService },
|
|
1982
|
+
{ type: i14.TranslocoService },
|
|
1983
|
+
{ type: i2$3.ConfirmDialogService },
|
|
1984
|
+
{ type: i0.ChangeDetectorRef }
|
|
1985
|
+
],
|
|
1986
|
+
propDecorators: {
|
|
1987
|
+
user: [{ type: Input }],
|
|
1988
|
+
removed: [{ type: Output }],
|
|
1989
|
+
passwordValidation: [{
|
|
1990
|
+
type: ViewChild,
|
|
1991
|
+
args: ["passwordValidation", { static: false }]
|
|
1992
|
+
}],
|
|
1993
|
+
reasonModal: [{
|
|
1994
|
+
type: ViewChild,
|
|
1995
|
+
args: ["reasonModal", { static: false }]
|
|
1749
1996
|
}]
|
|
1750
1997
|
}
|
|
1751
1998
|
});
|
|
@@ -1941,13 +2188,13 @@ var SecondaryPaymentMethodComponent = class SecondaryPaymentMethodComponent {
|
|
|
1941
2188
|
static {
|
|
1942
2189
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1943
2190
|
minVersion: "12.0.0",
|
|
1944
|
-
version: "22.2.
|
|
2191
|
+
version: "22.2.3",
|
|
1945
2192
|
ngImport: i0,
|
|
1946
2193
|
type: SecondaryPaymentMethodComponent,
|
|
1947
2194
|
deps: [
|
|
1948
|
-
{ token: i3.SubscriptionService },
|
|
1949
|
-
{ token: i3.UserService },
|
|
1950
|
-
{ token: i3.CustomToastService },
|
|
2195
|
+
{ token: i3$2.SubscriptionService },
|
|
2196
|
+
{ token: i3$2.UserService },
|
|
2197
|
+
{ token: i3$2.CustomToastService },
|
|
1951
2198
|
{ token: i14.TranslocoService },
|
|
1952
2199
|
{ token: i0.ChangeDetectorRef }
|
|
1953
2200
|
],
|
|
@@ -1957,7 +2204,7 @@ var SecondaryPaymentMethodComponent = class SecondaryPaymentMethodComponent {
|
|
|
1957
2204
|
static {
|
|
1958
2205
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1959
2206
|
minVersion: "17.0.0",
|
|
1960
|
-
version: "22.2.
|
|
2207
|
+
version: "22.2.3",
|
|
1961
2208
|
type: SecondaryPaymentMethodComponent,
|
|
1962
2209
|
isStandalone: false,
|
|
1963
2210
|
selector: "pw-secondary-payment-method",
|
|
@@ -2048,7 +2295,7 @@ var SecondaryPaymentMethodComponent = class SecondaryPaymentMethodComponent {
|
|
|
2048
2295
|
};
|
|
2049
2296
|
i0.ɵɵngDeclareClassMetadata({
|
|
2050
2297
|
minVersion: "12.0.0",
|
|
2051
|
-
version: "22.2.
|
|
2298
|
+
version: "22.2.3",
|
|
2052
2299
|
ngImport: i0,
|
|
2053
2300
|
type: SecondaryPaymentMethodComponent,
|
|
2054
2301
|
decorators: [{
|
|
@@ -2061,9 +2308,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2061
2308
|
}]
|
|
2062
2309
|
}],
|
|
2063
2310
|
ctorParameters: () => [
|
|
2064
|
-
{ type: i3.SubscriptionService },
|
|
2065
|
-
{ type: i3.UserService },
|
|
2066
|
-
{ type: i3.CustomToastService },
|
|
2311
|
+
{ type: i3$2.SubscriptionService },
|
|
2312
|
+
{ type: i3$2.UserService },
|
|
2313
|
+
{ type: i3$2.CustomToastService },
|
|
2067
2314
|
{ type: i14.TranslocoService },
|
|
2068
2315
|
{ type: i0.ChangeDetectorRef }
|
|
2069
2316
|
],
|
|
@@ -2170,14 +2417,14 @@ var UpdatePaymentDetailsComponent = class UpdatePaymentDetailsComponent extends
|
|
|
2170
2417
|
static {
|
|
2171
2418
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
2172
2419
|
minVersion: "12.0.0",
|
|
2173
|
-
version: "22.2.
|
|
2420
|
+
version: "22.2.3",
|
|
2174
2421
|
ngImport: i0,
|
|
2175
2422
|
type: UpdatePaymentDetailsComponent,
|
|
2176
2423
|
deps: [
|
|
2177
2424
|
{ token: i1$1.UntypedFormBuilder },
|
|
2178
|
-
{ token: i3.ScriptLoaderService },
|
|
2179
|
-
{ token: i3.ProductService },
|
|
2180
|
-
{ token: i3.SubscriptionService },
|
|
2425
|
+
{ token: i3$2.ScriptLoaderService },
|
|
2426
|
+
{ token: i3$2.ProductService },
|
|
2427
|
+
{ token: i3$2.SubscriptionService },
|
|
2181
2428
|
{ token: i0.Injector },
|
|
2182
2429
|
{ token: i0.ChangeDetectorRef }
|
|
2183
2430
|
],
|
|
@@ -2187,7 +2434,7 @@ var UpdatePaymentDetailsComponent = class UpdatePaymentDetailsComponent extends
|
|
|
2187
2434
|
static {
|
|
2188
2435
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2189
2436
|
minVersion: "17.0.0",
|
|
2190
|
-
version: "22.2.
|
|
2437
|
+
version: "22.2.3",
|
|
2191
2438
|
type: UpdatePaymentDetailsComponent,
|
|
2192
2439
|
isStandalone: false,
|
|
2193
2440
|
selector: "pw-update-payment-details",
|
|
@@ -2370,7 +2617,7 @@ var UpdatePaymentDetailsComponent = class UpdatePaymentDetailsComponent extends
|
|
|
2370
2617
|
__decorate([ValidateForm("form")], UpdatePaymentDetailsComponent.prototype, "onSave", null);
|
|
2371
2618
|
i0.ɵɵngDeclareClassMetadata({
|
|
2372
2619
|
minVersion: "12.0.0",
|
|
2373
|
-
version: "22.2.
|
|
2620
|
+
version: "22.2.3",
|
|
2374
2621
|
ngImport: i0,
|
|
2375
2622
|
type: UpdatePaymentDetailsComponent,
|
|
2376
2623
|
decorators: [{
|
|
@@ -2384,15 +2631,18 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2384
2631
|
}],
|
|
2385
2632
|
ctorParameters: () => [
|
|
2386
2633
|
{ type: i1$1.UntypedFormBuilder },
|
|
2387
|
-
{ type: i3.ScriptLoaderService },
|
|
2388
|
-
{ type: i3.ProductService },
|
|
2389
|
-
{ type: i3.SubscriptionService },
|
|
2634
|
+
{ type: i3$2.ScriptLoaderService },
|
|
2635
|
+
{ type: i3$2.ProductService },
|
|
2636
|
+
{ type: i3$2.SubscriptionService },
|
|
2390
2637
|
{ type: i0.Injector },
|
|
2391
2638
|
{ type: i0.ChangeDetectorRef }
|
|
2392
2639
|
],
|
|
2393
2640
|
propDecorators: { onSave: [] }
|
|
2394
2641
|
});
|
|
2395
2642
|
var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends AppBaseComponent {
|
|
2643
|
+
get isFree() {
|
|
2644
|
+
return !this.product?.stripe_plan_id && !Number(this.product?.price_per_unit);
|
|
2645
|
+
}
|
|
2396
2646
|
get totalAmount() {
|
|
2397
2647
|
if (this.product) {
|
|
2398
2648
|
const units = Number(this.form.get("units").value);
|
|
@@ -2507,7 +2757,8 @@ var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends Ap
|
|
|
2507
2757
|
onPurchaseSubmit() {
|
|
2508
2758
|
this.busy = true;
|
|
2509
2759
|
this.passwordModalVisible = true;
|
|
2510
|
-
if (this.
|
|
2760
|
+
if (this.isFree) this.enrollUserToSubscription();
|
|
2761
|
+
else if (this.subscription.stripe_customer_id) {
|
|
2511
2762
|
if (this.showNewCard) this.updateCardDetails();
|
|
2512
2763
|
else this.enrollUserToSubscription();
|
|
2513
2764
|
} else if (this.form.valid) {
|
|
@@ -2625,17 +2876,17 @@ var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends Ap
|
|
|
2625
2876
|
static {
|
|
2626
2877
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
2627
2878
|
minVersion: "12.0.0",
|
|
2628
|
-
version: "22.2.
|
|
2879
|
+
version: "22.2.3",
|
|
2629
2880
|
ngImport: i0,
|
|
2630
2881
|
type: UpgradeSubscriptionComponent,
|
|
2631
2882
|
deps: [
|
|
2632
2883
|
{ token: i0.Injector },
|
|
2633
|
-
{ token: i3.ProductService },
|
|
2884
|
+
{ token: i3$2.ProductService },
|
|
2634
2885
|
{ token: i1$1.UntypedFormBuilder },
|
|
2635
2886
|
{ token: i2$2.NgbModal },
|
|
2636
|
-
{ token: i3.SubscriptionService },
|
|
2637
|
-
{ token:
|
|
2638
|
-
{ token: i3.ScriptLoaderService },
|
|
2887
|
+
{ token: i3$2.SubscriptionService },
|
|
2888
|
+
{ token: i3$1.Store },
|
|
2889
|
+
{ token: i3$2.ScriptLoaderService },
|
|
2639
2890
|
{ token: i0.ChangeDetectorRef },
|
|
2640
2891
|
{ token: i2$3.ConfirmDialogService }
|
|
2641
2892
|
],
|
|
@@ -2645,7 +2896,7 @@ var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends Ap
|
|
|
2645
2896
|
static {
|
|
2646
2897
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2647
2898
|
minVersion: "17.0.0",
|
|
2648
|
-
version: "22.2.
|
|
2899
|
+
version: "22.2.3",
|
|
2649
2900
|
type: UpgradeSubscriptionComponent,
|
|
2650
2901
|
isStandalone: false,
|
|
2651
2902
|
selector: "pw-upgrade-subscription",
|
|
@@ -2658,7 +2909,7 @@ var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends Ap
|
|
|
2658
2909
|
}],
|
|
2659
2910
|
usesInheritance: true,
|
|
2660
2911
|
ngImport: i0,
|
|
2661
|
-
template: "<h4 class=\"form-section m-3\">\n <i class=\"ft-check-circle\" aria-hidden=\"true\"></i> {{ 'Button.Payment' | transloco }}\n</h4>\n<div class=\"card-block\">\n <!-- Show Payment Page when there is user.has_stripe_account===false -->\n <ng-container>\n <form class=\"form\"\n (ngSubmit)=\"attemptPurchase()\"\n [formGroup]=\"form\">\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"form-body p-3 payment-left card pb-0\">\n <div class=\"card-body\">\n @if (product?.max_units > 1) {\n <div class=\"row\"\n >\n <div class=\"col-12\">\n <div class=\"mb-3\">\n <h4 class=\"title\">\n {{ 'User.Subscriptions.LicensesRequired' | transloco }}\n </h4>\n <div class=\"row btns-row\">\n <div class=\"col-md-4 col-8\">\n <pw-number-picker name=\"number-picker\"\n [(value)]=\"units\"\n [min]=\"subscription.min_units || product.min_units\"\n [max]=\"product.max_units\"\n step=\"1\"\n postfix=\"Units\"\n placeholder=\"Total Licenses\"\n [inputReadOnly]=\"false\"\n size=\"small\"\n pickStartAfter=\"500\"\n pickTimer=\"100\"\n [arrowKeys]=\"true\"\n (minReached)=\"onMinReached($event)\"\n (maxReached)=\"onMaxReached($event)\"\n (valueChange)=\"onUnitChange($event)\">\n </pw-number-picker>\n </div>\n </div>\n <div class=\"text-center\">\n <small class=\"form-text text-muted danger\">\n {{ unitError }}\n </small>\n </div>\n </div>\n <p>\n If you proceed, your credit card will be charged\n <strong>{{ product.currency }}\n {{ totalAmount | number:'1.2-2' }}</strong>\n </p>\n </div>\n </div>\n }\n <!-- Shows Saved Card: Shows when user has card details and not trying to update the card details -->\n @if (cardDetails) {\n <pw-saved-card-details [data]=\"cardDetails\"\n (changeEvent)=\"showNewCard = $event\"\n [showNewCard]=\"showNewCard\">\n </pw-saved-card-details>\n }\n <!-- Add New Payment Starts, opens up when user doesn't have stripe account or tries to change the\n card details -->\n @if ((user && !cardDetails) || (cardDetails && showNewCard)) {\n <h4 class=\"title\">\n {{ 'User.Subscriptions.NewCard' | transloco }}?\n </h4>\n <div class=\"row\">\n <div class=\"col-md-9\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-card_number\">{{\n 'User.Subscriptions.CardNumber' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-card_number\"\n class=\"form-control\"\n formControlName=\"card_number\"\n placeholder=\"Card Number\"\n name=\"card_number\"\n aria-label=\"Card Number\" />\n @if (\n form.get('card_number').touched &&\n form.get('card_number').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter card number. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-cvc\">{{\n 'User.Subscriptions.CVC' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-cvc\"\n class=\"form-control\"\n formControlName=\"cvc\"\n placeholder=\"CVC\"\n name=\"cvc\"\n aria-label=\"CVC\" />\n @if (\n form.get('cvc').touched &&\n form.get('cvc').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter cvc. </span>\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only pw-label-style\" id=\"upgrade-subscription-exp_month-label\">Exp. Month</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_month-label'\"\n [options]=\"months\"\n formControlName=\"exp_month\"\n [placeholder]=\"'Exp. Month'\"\n optionValue=\"value\"\n [appendTo]=\"'body'\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_month').touched &&\n form.get('exp_month').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry month. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only\" id=\"upgrade-subscription-exp_year-label\">Exp. Year</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_year-label'\"\n [options]=\"years\"\n formControlName=\"exp_year\"\n [placeholder]=\"'Exp. Year'\"\n [appendTo]=\"'body'\"\n optionValue=\"value\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_year').touched &&\n form.get('exp_year').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry year. </span>\n </div>\n }\n </div>\n </div>\n @if (cardDetails) {\n <div class=\"col-12 mt-2\"\n >\n <a aria-label=\"Navigate to Target\"\n (click)=\"showNewCard = false; onDiscardToggle()\">Disregard and pay with current registered card</a>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n <!-- Purchase Summary -->\n @if (product) {\n <div class=\"col-md-6\"\n >\n <div class=\"purchase-summary card p-3 payment-right\">\n <div class=\"card-body\">\n <h4 class=\"title\">{{ 'Label.PurchaseSummary' | transloco }}</h4>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Plan' | transloco }}:</div>\n <div class=\"summary-right\">{{ product.name }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Price' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }}\n {{ (product.price_per_unit / 100) | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Seats' | transloco }}:</div>\n <div class=\"summary-right\">{{ form.get('units').value }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Total' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }} {{ totalAmount | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">\n {{ 'Label.Recurrency' | transloco }}:\n </div>\n <div class=\"summary-right\">{{ product.billing_frequency }}</div>\n </div>\n </div>\n <div class=\"text-center\">\n <hr />\n <p>\n By subscribing you acknowledge and accept our terms of service and\n privacy policy\n </p>\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"row\">\n <div class=\"col-12 text-center mt-3\">\n <img src=\"/assets/img/icons/powered_by_stripe_v2.png\"\n class=\"payment-provider\"\n alt=\"\" />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"form-actions text-end\">\n <button type=\"button\"\n class=\"btn btn-raised btn-outline-default me-1\"\n [disabled]=\"isPurchaseAttempted\"\n routerLink=\"/account/subscriptions\">\n <i class=\"ft-x\" aria-hidden=\"true\"></i>{{ 'Button.Back' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-raised btn-primary\"\n [disabled]=\"isPurchaseAttempted\"\n [buttonBusy]=\"busy\">\n <i class=\"ft-check\" aria-hidden=\"true\"></i>\n {{ 'Button.Purchase' | transloco }}\n </button>\n </div>\n </div>\n </div>\n </form>\n </ng-container>\n</div>\n\n<pw-password-validation #passwordValidationModal\n (successEvent)=\"onValidatePassword($event)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <p>\n If you proceed, your credit card will be charged\n @if (totalAmount) {\n <strong>{{ product.currency }} {{ totalAmount | number:'1.2-2' }}</strong>\n }\n </p>\n </div>\n </div>\n</pw-password-validation>\n",
|
|
2912
|
+
template: "<h4 class=\"form-section m-3\">\n <i class=\"ft-check-circle\" aria-hidden=\"true\"></i> {{ 'Button.Payment' | transloco }}\n</h4>\n<div class=\"card-block\">\n <!-- Show Payment Page when there is user.has_stripe_account===false -->\n <ng-container>\n <form class=\"form\"\n (ngSubmit)=\"attemptPurchase()\"\n [formGroup]=\"form\">\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"form-body p-3 payment-left card pb-0\">\n <div class=\"card-body\">\n @if (product?.max_units > 1) {\n <div class=\"row\"\n >\n <div class=\"col-12\">\n <div class=\"mb-3\">\n <h4 class=\"title\">\n {{ 'User.Subscriptions.LicensesRequired' | transloco }}\n </h4>\n <div class=\"row btns-row\">\n <div class=\"col-md-4 col-8\">\n <pw-number-picker name=\"number-picker\"\n [(value)]=\"units\"\n [min]=\"subscription.min_units || product.min_units\"\n [max]=\"product.max_units\"\n step=\"1\"\n postfix=\"Units\"\n placeholder=\"Total Licenses\"\n [inputReadOnly]=\"false\"\n size=\"small\"\n pickStartAfter=\"500\"\n pickTimer=\"100\"\n [arrowKeys]=\"true\"\n (minReached)=\"onMinReached($event)\"\n (maxReached)=\"onMaxReached($event)\"\n (valueChange)=\"onUnitChange($event)\">\n </pw-number-picker>\n </div>\n </div>\n <div class=\"text-center\">\n <small class=\"form-text text-muted danger\">\n {{ unitError }}\n </small>\n </div>\n </div>\n @if (!isFree) {\n <p>\n If you proceed, your credit card will be charged\n <strong>{{ product.currency }}\n {{ totalAmount | number:'1.2-2' }}</strong>\n </p>\n }\n </div>\n </div>\n }\n <!-- Shows Saved Card: Shows when user has card details and not trying to update the card details -->\n @if (cardDetails && !isFree) {\n <pw-saved-card-details [data]=\"cardDetails\"\n (changeEvent)=\"showNewCard = $event\"\n [showNewCard]=\"showNewCard\">\n </pw-saved-card-details>\n }\n <!-- Add New Payment Starts, opens up when user doesn't have stripe account or tries to change the\n card details -->\n @if (!isFree && ((user && !cardDetails) || (cardDetails && showNewCard))) {\n <h4 class=\"title\">\n {{ 'User.Subscriptions.NewCard' | transloco }}?\n </h4>\n <div class=\"row\">\n <div class=\"col-md-9\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-card_number\">{{\n 'User.Subscriptions.CardNumber' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-card_number\"\n class=\"form-control\"\n formControlName=\"card_number\"\n placeholder=\"Card Number\"\n name=\"card_number\"\n aria-label=\"Card Number\" />\n @if (\n form.get('card_number').touched &&\n form.get('card_number').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter card number. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-cvc\">{{\n 'User.Subscriptions.CVC' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-cvc\"\n class=\"form-control\"\n formControlName=\"cvc\"\n placeholder=\"CVC\"\n name=\"cvc\"\n aria-label=\"CVC\" />\n @if (\n form.get('cvc').touched &&\n form.get('cvc').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter cvc. </span>\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only pw-label-style\" id=\"upgrade-subscription-exp_month-label\">Exp. Month</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_month-label'\"\n [options]=\"months\"\n formControlName=\"exp_month\"\n [placeholder]=\"'Exp. Month'\"\n optionValue=\"value\"\n [appendTo]=\"'body'\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_month').touched &&\n form.get('exp_month').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry month. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only\" id=\"upgrade-subscription-exp_year-label\">Exp. Year</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_year-label'\"\n [options]=\"years\"\n formControlName=\"exp_year\"\n [placeholder]=\"'Exp. Year'\"\n [appendTo]=\"'body'\"\n optionValue=\"value\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_year').touched &&\n form.get('exp_year').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry year. </span>\n </div>\n }\n </div>\n </div>\n @if (cardDetails) {\n <div class=\"col-12 mt-2\"\n >\n <a aria-label=\"Navigate to Target\"\n (click)=\"showNewCard = false; onDiscardToggle()\">Disregard and pay with current registered card</a>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n <!-- Purchase Summary -->\n @if (product) {\n <div class=\"col-md-6\"\n >\n <div class=\"purchase-summary card p-3 payment-right\">\n <div class=\"card-body\">\n <h4 class=\"title\">{{ 'Label.PurchaseSummary' | transloco }}</h4>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Plan' | transloco }}:</div>\n <div class=\"summary-right\">{{ product.name }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Price' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }}\n {{ (product.price_per_unit / 100) | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Seats' | transloco }}:</div>\n <div class=\"summary-right\">{{ form.get('units').value }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Total' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }} {{ totalAmount | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">\n {{ 'Label.Recurrency' | transloco }}:\n </div>\n <div class=\"summary-right\">{{ product.billing_frequency }}</div>\n </div>\n </div>\n <div class=\"text-center\">\n <hr />\n <p>\n By subscribing you acknowledge and accept our terms of service and\n privacy policy\n </p>\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"row\">\n <div class=\"col-12 text-center mt-3\">\n <img src=\"/assets/img/icons/powered_by_stripe_v2.png\"\n class=\"payment-provider\"\n alt=\"\" />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"form-actions text-end\">\n <button type=\"button\"\n class=\"btn btn-raised btn-outline-default me-1\"\n [disabled]=\"isPurchaseAttempted\"\n routerLink=\"/account/subscriptions\">\n <i class=\"ft-x\" aria-hidden=\"true\"></i>{{ 'Button.Back' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-raised btn-primary\"\n [disabled]=\"isPurchaseAttempted\"\n [buttonBusy]=\"busy\">\n <i class=\"ft-check\" aria-hidden=\"true\"></i>\n {{ 'Button.Purchase' | transloco }}\n </button>\n </div>\n </div>\n </div>\n </form>\n </ng-container>\n</div>\n\n<pw-password-validation #passwordValidationModal\n (successEvent)=\"onValidatePassword($event)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <p>\n @if (!isFree) {\n If you proceed, your credit card will be charged\n }\n @if (totalAmount) {\n <strong>{{ product.currency }} {{ totalAmount | number:'1.2-2' }}</strong>\n }\n </p>\n </div>\n </div>\n</pw-password-validation>\n",
|
|
2662
2913
|
styles: [".payment-left,.payment-right{border:1px solid rgb(204,204,204);height:100%}.payment-left h4,.payment-right h4{border-bottom:1px solid rgb(0,0,0);font-size:1rem;font-weight:600;margin:0 0 20px;padding:0 0 5px;text-transform:uppercase}.payment-left .summary-row.total,.payment-right .summary-row.total{padding:10px 0 0 10px}.payment-left .summary-row .summary-left,.payment-right .summary-row .summary-left{font-weight:600}.payment-provider{width:20%}@media(max-width:800px){.payment-provider{width:60%}}.summary-left{-webkit-box-flex:1;color:#555;flex-grow:1;-ms-flex-positive:1;font-weight:200;text-align:left}.summary-left.plan{color:#c93f00;font-size:14px;margin:5px 0}.summary-right{-webkit-box-flex:1;-webkit-box-pack:end;color:#000;flex-grow:1;-ms-flex-pack:end;-ms-flex-positive:1;justify-content:flex-end;text-align:right}\n"],
|
|
2663
2914
|
dependencies: [
|
|
2664
2915
|
{
|
|
@@ -2878,7 +3129,7 @@ var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends Ap
|
|
|
2878
3129
|
__decorate([ValidateForm("form")], UpgradeSubscriptionComponent.prototype, "updateCardDetails", null);
|
|
2879
3130
|
i0.ɵɵngDeclareClassMetadata({
|
|
2880
3131
|
minVersion: "12.0.0",
|
|
2881
|
-
version: "22.2.
|
|
3132
|
+
version: "22.2.3",
|
|
2882
3133
|
ngImport: i0,
|
|
2883
3134
|
type: UpgradeSubscriptionComponent,
|
|
2884
3135
|
decorators: [{
|
|
@@ -2886,18 +3137,18 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2886
3137
|
args: [{
|
|
2887
3138
|
selector: "pw-upgrade-subscription",
|
|
2888
3139
|
standalone: false,
|
|
2889
|
-
template: "<h4 class=\"form-section m-3\">\n <i class=\"ft-check-circle\" aria-hidden=\"true\"></i> {{ 'Button.Payment' | transloco }}\n</h4>\n<div class=\"card-block\">\n <!-- Show Payment Page when there is user.has_stripe_account===false -->\n <ng-container>\n <form class=\"form\"\n (ngSubmit)=\"attemptPurchase()\"\n [formGroup]=\"form\">\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"form-body p-3 payment-left card pb-0\">\n <div class=\"card-body\">\n @if (product?.max_units > 1) {\n <div class=\"row\"\n >\n <div class=\"col-12\">\n <div class=\"mb-3\">\n <h4 class=\"title\">\n {{ 'User.Subscriptions.LicensesRequired' | transloco }}\n </h4>\n <div class=\"row btns-row\">\n <div class=\"col-md-4 col-8\">\n <pw-number-picker name=\"number-picker\"\n [(value)]=\"units\"\n [min]=\"subscription.min_units || product.min_units\"\n [max]=\"product.max_units\"\n step=\"1\"\n postfix=\"Units\"\n placeholder=\"Total Licenses\"\n [inputReadOnly]=\"false\"\n size=\"small\"\n pickStartAfter=\"500\"\n pickTimer=\"100\"\n [arrowKeys]=\"true\"\n (minReached)=\"onMinReached($event)\"\n (maxReached)=\"onMaxReached($event)\"\n (valueChange)=\"onUnitChange($event)\">\n </pw-number-picker>\n </div>\n </div>\n <div class=\"text-center\">\n <small class=\"form-text text-muted danger\">\n {{ unitError }}\n </small>\n </div>\n </div>\n <p>\n If you proceed, your credit card will be charged\n <strong>{{ product.currency }}\n {{ totalAmount | number:'1.2-2' }}</strong>\n </p>\n </div>\n </div>\n }\n <!-- Shows Saved Card: Shows when user has card details and not trying to update the card details -->\n @if (cardDetails) {\n <pw-saved-card-details [data]=\"cardDetails\"\n (changeEvent)=\"showNewCard = $event\"\n [showNewCard]=\"showNewCard\">\n </pw-saved-card-details>\n }\n <!-- Add New Payment Starts, opens up when user doesn't have stripe account or tries to change the\n card details -->\n @if ((user && !cardDetails) || (cardDetails && showNewCard)) {\n <h4 class=\"title\">\n {{ 'User.Subscriptions.NewCard' | transloco }}?\n </h4>\n <div class=\"row\">\n <div class=\"col-md-9\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-card_number\">{{\n 'User.Subscriptions.CardNumber' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-card_number\"\n class=\"form-control\"\n formControlName=\"card_number\"\n placeholder=\"Card Number\"\n name=\"card_number\"\n aria-label=\"Card Number\" />\n @if (\n form.get('card_number').touched &&\n form.get('card_number').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter card number. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-cvc\">{{\n 'User.Subscriptions.CVC' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-cvc\"\n class=\"form-control\"\n formControlName=\"cvc\"\n placeholder=\"CVC\"\n name=\"cvc\"\n aria-label=\"CVC\" />\n @if (\n form.get('cvc').touched &&\n form.get('cvc').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter cvc. </span>\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only pw-label-style\" id=\"upgrade-subscription-exp_month-label\">Exp. Month</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_month-label'\"\n [options]=\"months\"\n formControlName=\"exp_month\"\n [placeholder]=\"'Exp. Month'\"\n optionValue=\"value\"\n [appendTo]=\"'body'\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_month').touched &&\n form.get('exp_month').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry month. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only\" id=\"upgrade-subscription-exp_year-label\">Exp. Year</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_year-label'\"\n [options]=\"years\"\n formControlName=\"exp_year\"\n [placeholder]=\"'Exp. Year'\"\n [appendTo]=\"'body'\"\n optionValue=\"value\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_year').touched &&\n form.get('exp_year').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry year. </span>\n </div>\n }\n </div>\n </div>\n @if (cardDetails) {\n <div class=\"col-12 mt-2\"\n >\n <a aria-label=\"Navigate to Target\"\n (click)=\"showNewCard = false; onDiscardToggle()\">Disregard and pay with current registered card</a>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n <!-- Purchase Summary -->\n @if (product) {\n <div class=\"col-md-6\"\n >\n <div class=\"purchase-summary card p-3 payment-right\">\n <div class=\"card-body\">\n <h4 class=\"title\">{{ 'Label.PurchaseSummary' | transloco }}</h4>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Plan' | transloco }}:</div>\n <div class=\"summary-right\">{{ product.name }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Price' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }}\n {{ (product.price_per_unit / 100) | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Seats' | transloco }}:</div>\n <div class=\"summary-right\">{{ form.get('units').value }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Total' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }} {{ totalAmount | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">\n {{ 'Label.Recurrency' | transloco }}:\n </div>\n <div class=\"summary-right\">{{ product.billing_frequency }}</div>\n </div>\n </div>\n <div class=\"text-center\">\n <hr />\n <p>\n By subscribing you acknowledge and accept our terms of service and\n privacy policy\n </p>\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"row\">\n <div class=\"col-12 text-center mt-3\">\n <img src=\"/assets/img/icons/powered_by_stripe_v2.png\"\n class=\"payment-provider\"\n alt=\"\" />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"form-actions text-end\">\n <button type=\"button\"\n class=\"btn btn-raised btn-outline-default me-1\"\n [disabled]=\"isPurchaseAttempted\"\n routerLink=\"/account/subscriptions\">\n <i class=\"ft-x\" aria-hidden=\"true\"></i>{{ 'Button.Back' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-raised btn-primary\"\n [disabled]=\"isPurchaseAttempted\"\n [buttonBusy]=\"busy\">\n <i class=\"ft-check\" aria-hidden=\"true\"></i>\n {{ 'Button.Purchase' | transloco }}\n </button>\n </div>\n </div>\n </div>\n </form>\n </ng-container>\n</div>\n\n<pw-password-validation #passwordValidationModal\n (successEvent)=\"onValidatePassword($event)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <p>\n If you proceed, your credit card will be charged\n @if (totalAmount) {\n <strong>{{ product.currency }} {{ totalAmount | number:'1.2-2' }}</strong>\n }\n </p>\n </div>\n </div>\n</pw-password-validation>\n",
|
|
3140
|
+
template: "<h4 class=\"form-section m-3\">\n <i class=\"ft-check-circle\" aria-hidden=\"true\"></i> {{ 'Button.Payment' | transloco }}\n</h4>\n<div class=\"card-block\">\n <!-- Show Payment Page when there is user.has_stripe_account===false -->\n <ng-container>\n <form class=\"form\"\n (ngSubmit)=\"attemptPurchase()\"\n [formGroup]=\"form\">\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"form-body p-3 payment-left card pb-0\">\n <div class=\"card-body\">\n @if (product?.max_units > 1) {\n <div class=\"row\"\n >\n <div class=\"col-12\">\n <div class=\"mb-3\">\n <h4 class=\"title\">\n {{ 'User.Subscriptions.LicensesRequired' | transloco }}\n </h4>\n <div class=\"row btns-row\">\n <div class=\"col-md-4 col-8\">\n <pw-number-picker name=\"number-picker\"\n [(value)]=\"units\"\n [min]=\"subscription.min_units || product.min_units\"\n [max]=\"product.max_units\"\n step=\"1\"\n postfix=\"Units\"\n placeholder=\"Total Licenses\"\n [inputReadOnly]=\"false\"\n size=\"small\"\n pickStartAfter=\"500\"\n pickTimer=\"100\"\n [arrowKeys]=\"true\"\n (minReached)=\"onMinReached($event)\"\n (maxReached)=\"onMaxReached($event)\"\n (valueChange)=\"onUnitChange($event)\">\n </pw-number-picker>\n </div>\n </div>\n <div class=\"text-center\">\n <small class=\"form-text text-muted danger\">\n {{ unitError }}\n </small>\n </div>\n </div>\n @if (!isFree) {\n <p>\n If you proceed, your credit card will be charged\n <strong>{{ product.currency }}\n {{ totalAmount | number:'1.2-2' }}</strong>\n </p>\n }\n </div>\n </div>\n }\n <!-- Shows Saved Card: Shows when user has card details and not trying to update the card details -->\n @if (cardDetails && !isFree) {\n <pw-saved-card-details [data]=\"cardDetails\"\n (changeEvent)=\"showNewCard = $event\"\n [showNewCard]=\"showNewCard\">\n </pw-saved-card-details>\n }\n <!-- Add New Payment Starts, opens up when user doesn't have stripe account or tries to change the\n card details -->\n @if (!isFree && ((user && !cardDetails) || (cardDetails && showNewCard))) {\n <h4 class=\"title\">\n {{ 'User.Subscriptions.NewCard' | transloco }}?\n </h4>\n <div class=\"row\">\n <div class=\"col-md-9\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-card_number\">{{\n 'User.Subscriptions.CardNumber' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-card_number\"\n class=\"form-control\"\n formControlName=\"card_number\"\n placeholder=\"Card Number\"\n name=\"card_number\"\n aria-label=\"Card Number\" />\n @if (\n form.get('card_number').touched &&\n form.get('card_number').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter card number. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-cvc\">{{\n 'User.Subscriptions.CVC' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-cvc\"\n class=\"form-control\"\n formControlName=\"cvc\"\n placeholder=\"CVC\"\n name=\"cvc\"\n aria-label=\"CVC\" />\n @if (\n form.get('cvc').touched &&\n form.get('cvc').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter cvc. </span>\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only pw-label-style\" id=\"upgrade-subscription-exp_month-label\">Exp. Month</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_month-label'\"\n [options]=\"months\"\n formControlName=\"exp_month\"\n [placeholder]=\"'Exp. Month'\"\n optionValue=\"value\"\n [appendTo]=\"'body'\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_month').touched &&\n form.get('exp_month').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry month. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only\" id=\"upgrade-subscription-exp_year-label\">Exp. Year</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_year-label'\"\n [options]=\"years\"\n formControlName=\"exp_year\"\n [placeholder]=\"'Exp. Year'\"\n [appendTo]=\"'body'\"\n optionValue=\"value\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_year').touched &&\n form.get('exp_year').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry year. </span>\n </div>\n }\n </div>\n </div>\n @if (cardDetails) {\n <div class=\"col-12 mt-2\"\n >\n <a aria-label=\"Navigate to Target\"\n (click)=\"showNewCard = false; onDiscardToggle()\">Disregard and pay with current registered card</a>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n <!-- Purchase Summary -->\n @if (product) {\n <div class=\"col-md-6\"\n >\n <div class=\"purchase-summary card p-3 payment-right\">\n <div class=\"card-body\">\n <h4 class=\"title\">{{ 'Label.PurchaseSummary' | transloco }}</h4>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Plan' | transloco }}:</div>\n <div class=\"summary-right\">{{ product.name }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Price' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }}\n {{ (product.price_per_unit / 100) | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Seats' | transloco }}:</div>\n <div class=\"summary-right\">{{ form.get('units').value }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Total' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }} {{ totalAmount | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">\n {{ 'Label.Recurrency' | transloco }}:\n </div>\n <div class=\"summary-right\">{{ product.billing_frequency }}</div>\n </div>\n </div>\n <div class=\"text-center\">\n <hr />\n <p>\n By subscribing you acknowledge and accept our terms of service and\n privacy policy\n </p>\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"row\">\n <div class=\"col-12 text-center mt-3\">\n <img src=\"/assets/img/icons/powered_by_stripe_v2.png\"\n class=\"payment-provider\"\n alt=\"\" />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"form-actions text-end\">\n <button type=\"button\"\n class=\"btn btn-raised btn-outline-default me-1\"\n [disabled]=\"isPurchaseAttempted\"\n routerLink=\"/account/subscriptions\">\n <i class=\"ft-x\" aria-hidden=\"true\"></i>{{ 'Button.Back' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-raised btn-primary\"\n [disabled]=\"isPurchaseAttempted\"\n [buttonBusy]=\"busy\">\n <i class=\"ft-check\" aria-hidden=\"true\"></i>\n {{ 'Button.Purchase' | transloco }}\n </button>\n </div>\n </div>\n </div>\n </form>\n </ng-container>\n</div>\n\n<pw-password-validation #passwordValidationModal\n (successEvent)=\"onValidatePassword($event)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <p>\n @if (!isFree) {\n If you proceed, your credit card will be charged\n }\n @if (totalAmount) {\n <strong>{{ product.currency }} {{ totalAmount | number:'1.2-2' }}</strong>\n }\n </p>\n </div>\n </div>\n</pw-password-validation>\n",
|
|
2890
3141
|
styles: [".payment-left,.payment-right{border:1px solid rgb(204,204,204);height:100%}.payment-left h4,.payment-right h4{border-bottom:1px solid rgb(0,0,0);font-size:1rem;font-weight:600;margin:0 0 20px;padding:0 0 5px;text-transform:uppercase}.payment-left .summary-row.total,.payment-right .summary-row.total{padding:10px 0 0 10px}.payment-left .summary-row .summary-left,.payment-right .summary-row .summary-left{font-weight:600}.payment-provider{width:20%}@media(max-width:800px){.payment-provider{width:60%}}.summary-left{-webkit-box-flex:1;color:#555;flex-grow:1;-ms-flex-positive:1;font-weight:200;text-align:left}.summary-left.plan{color:#c93f00;font-size:14px;margin:5px 0}.summary-right{-webkit-box-flex:1;-webkit-box-pack:end;color:#000;flex-grow:1;-ms-flex-pack:end;-ms-flex-positive:1;justify-content:flex-end;text-align:right}\n"]
|
|
2891
3142
|
}]
|
|
2892
3143
|
}],
|
|
2893
3144
|
ctorParameters: () => [
|
|
2894
3145
|
{ type: i0.Injector },
|
|
2895
|
-
{ type: i3.ProductService },
|
|
3146
|
+
{ type: i3$2.ProductService },
|
|
2896
3147
|
{ type: i1$1.UntypedFormBuilder },
|
|
2897
3148
|
{ type: i2$2.NgbModal },
|
|
2898
|
-
{ type: i3.SubscriptionService },
|
|
2899
|
-
{ type:
|
|
2900
|
-
{ type: i3.ScriptLoaderService },
|
|
3149
|
+
{ type: i3$2.SubscriptionService },
|
|
3150
|
+
{ type: i3$1.Store },
|
|
3151
|
+
{ type: i3$2.ScriptLoaderService },
|
|
2901
3152
|
{ type: i0.ChangeDetectorRef },
|
|
2902
3153
|
{ type: i2$3.ConfirmDialogService }
|
|
2903
3154
|
],
|
|
@@ -3122,15 +3373,15 @@ var UserSubscriptionDetailsComponent = class UserSubscriptionDetailsComponent ex
|
|
|
3122
3373
|
static {
|
|
3123
3374
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
3124
3375
|
minVersion: "12.0.0",
|
|
3125
|
-
version: "22.2.
|
|
3376
|
+
version: "22.2.3",
|
|
3126
3377
|
ngImport: i0,
|
|
3127
3378
|
type: UserSubscriptionDetailsComponent,
|
|
3128
3379
|
deps: [
|
|
3129
3380
|
{ token: i1$1.UntypedFormBuilder },
|
|
3130
|
-
{ token: i3.GeoService },
|
|
3381
|
+
{ token: i3$2.GeoService },
|
|
3131
3382
|
{ token: i2$2.NgbModal },
|
|
3132
|
-
{ token: i3.SubscriptionService },
|
|
3133
|
-
{ token:
|
|
3383
|
+
{ token: i3$2.SubscriptionService },
|
|
3384
|
+
{ token: i3$1.Store },
|
|
3134
3385
|
{ token: i0.Injector },
|
|
3135
3386
|
{ token: i0.ChangeDetectorRef },
|
|
3136
3387
|
{ token: i2$3.ConfirmDialogService }
|
|
@@ -3141,7 +3392,7 @@ var UserSubscriptionDetailsComponent = class UserSubscriptionDetailsComponent ex
|
|
|
3141
3392
|
static {
|
|
3142
3393
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
3143
3394
|
minVersion: "17.0.0",
|
|
3144
|
-
version: "22.2.
|
|
3395
|
+
version: "22.2.3",
|
|
3145
3396
|
type: UserSubscriptionDetailsComponent,
|
|
3146
3397
|
isStandalone: false,
|
|
3147
3398
|
selector: "ng-component",
|
|
@@ -3488,7 +3739,7 @@ var UserSubscriptionDetailsComponent = class UserSubscriptionDetailsComponent ex
|
|
|
3488
3739
|
__decorate([ValidateForm("form")], UserSubscriptionDetailsComponent.prototype, "onSaveDetails", null);
|
|
3489
3740
|
i0.ɵɵngDeclareClassMetadata({
|
|
3490
3741
|
minVersion: "12.0.0",
|
|
3491
|
-
version: "22.2.
|
|
3742
|
+
version: "22.2.3",
|
|
3492
3743
|
ngImport: i0,
|
|
3493
3744
|
type: UserSubscriptionDetailsComponent,
|
|
3494
3745
|
decorators: [{
|
|
@@ -3501,10 +3752,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3501
3752
|
}],
|
|
3502
3753
|
ctorParameters: () => [
|
|
3503
3754
|
{ type: i1$1.UntypedFormBuilder },
|
|
3504
|
-
{ type: i3.GeoService },
|
|
3755
|
+
{ type: i3$2.GeoService },
|
|
3505
3756
|
{ type: i2$2.NgbModal },
|
|
3506
|
-
{ type: i3.SubscriptionService },
|
|
3507
|
-
{ type:
|
|
3757
|
+
{ type: i3$2.SubscriptionService },
|
|
3758
|
+
{ type: i3$1.Store },
|
|
3508
3759
|
{ type: i0.Injector },
|
|
3509
3760
|
{ type: i0.ChangeDetectorRef },
|
|
3510
3761
|
{ type: i2$3.ConfirmDialogService }
|
|
@@ -3518,19 +3769,16 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3518
3769
|
}
|
|
3519
3770
|
});
|
|
3520
3771
|
var UserSubscriptionListComponent = class UserSubscriptionListComponent extends AppBaseComponent {
|
|
3521
|
-
constructor(subscriptionService, adminService,
|
|
3772
|
+
constructor(subscriptionService, adminService, clipboard, injector, cdr, confirmDialog) {
|
|
3522
3773
|
super(injector);
|
|
3523
3774
|
this.subscriptionService = subscriptionService;
|
|
3524
3775
|
this.adminService = adminService;
|
|
3525
|
-
this.modalService = modalService;
|
|
3526
|
-
this.store = store;
|
|
3527
3776
|
this.clipboard = clipboard;
|
|
3528
3777
|
this.cdr = cdr;
|
|
3529
3778
|
this.confirmDialog = confirmDialog;
|
|
3530
3779
|
this.showApiKey = true;
|
|
3531
3780
|
this.subscribedSubscriptions = [];
|
|
3532
3781
|
this.isLoaded = false;
|
|
3533
|
-
this.reasonToCancel = "";
|
|
3534
3782
|
this.showTos = false;
|
|
3535
3783
|
this.objectKeys = Object.keys;
|
|
3536
3784
|
this.items = [
|
|
@@ -3565,18 +3813,18 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
|
|
|
3565
3813
|
this.clipboard.copy(accessCode);
|
|
3566
3814
|
this.toast.success("Access Key copied to the clipboard");
|
|
3567
3815
|
}
|
|
3568
|
-
|
|
3569
|
-
this.
|
|
3570
|
-
this.selectedSubscription.productId = productId;
|
|
3571
|
-
if (this.user.has_password) this.passwordValidationForUnsubscribe.open();
|
|
3572
|
-
else this.noPasswordModal();
|
|
3816
|
+
deleteSubscription(subscription) {
|
|
3817
|
+
this.removal.start({ subscriptionId: subscription.id });
|
|
3573
3818
|
}
|
|
3574
|
-
|
|
3575
|
-
this.
|
|
3576
|
-
|
|
3577
|
-
|
|
3819
|
+
deleteProduct(subscription, product) {
|
|
3820
|
+
this.removal.start({
|
|
3821
|
+
subscriptionId: subscription.id,
|
|
3822
|
+
productId: product.id
|
|
3578
3823
|
});
|
|
3579
3824
|
}
|
|
3825
|
+
onRemoved() {
|
|
3826
|
+
this.getSubscribedProduct();
|
|
3827
|
+
}
|
|
3580
3828
|
getSubscribedProduct() {
|
|
3581
3829
|
this.userStore().subscribe((user) => {
|
|
3582
3830
|
this.user = user;
|
|
@@ -3617,32 +3865,6 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
|
|
|
3617
3865
|
this.activeItem = this.menu["activeItem"];
|
|
3618
3866
|
if (this.activeItem.id === "subscription") this.getSubscribedProduct();
|
|
3619
3867
|
}
|
|
3620
|
-
onUnsubscribe(item, reasonToCancel) {
|
|
3621
|
-
const requestOptions = {
|
|
3622
|
-
params: new HttpParams().set("product_id", item.productId),
|
|
3623
|
-
body: { reason_to_cancel: reasonToCancel }
|
|
3624
|
-
};
|
|
3625
|
-
this.subscriptionService.deleteSubscription(item.id, requestOptions).subscribe(() => {
|
|
3626
|
-
this.store.dispatch(new GetUser());
|
|
3627
|
-
this.modalService.dismissAll();
|
|
3628
|
-
this.getSubscribedProduct();
|
|
3629
|
-
this.selectedSubscription = null;
|
|
3630
|
-
this.reasonToCancel = "";
|
|
3631
|
-
this.cdr.markForCheck();
|
|
3632
|
-
});
|
|
3633
|
-
}
|
|
3634
|
-
onValidatePassword(isSuccess) {
|
|
3635
|
-
if (isSuccess) setTimeout(() => {
|
|
3636
|
-
this.openCancelSubscriptionModal();
|
|
3637
|
-
}, 100);
|
|
3638
|
-
}
|
|
3639
|
-
onConfirmCancel() {
|
|
3640
|
-
if (!this.reasonToCancel || this.reasonToCancel.trim() === "") {
|
|
3641
|
-
this.toast.error(this.translation.translate("User.Subscriptions.Validation.ReasonRequired"));
|
|
3642
|
-
return;
|
|
3643
|
-
}
|
|
3644
|
-
this.onUnsubscribe(this.selectedSubscription, this.reasonToCancel);
|
|
3645
|
-
}
|
|
3646
3868
|
discardEdit() {
|
|
3647
3869
|
this.editing = false;
|
|
3648
3870
|
this.selectedSubscription = null;
|
|
@@ -3703,15 +3925,13 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
|
|
|
3703
3925
|
static {
|
|
3704
3926
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
3705
3927
|
minVersion: "12.0.0",
|
|
3706
|
-
version: "22.2.
|
|
3928
|
+
version: "22.2.3",
|
|
3707
3929
|
ngImport: i0,
|
|
3708
3930
|
type: UserSubscriptionListComponent,
|
|
3709
3931
|
deps: [
|
|
3710
|
-
{ token: i3.SubscriptionService },
|
|
3932
|
+
{ token: i3$2.SubscriptionService },
|
|
3711
3933
|
{ token: i2$1.AdminService },
|
|
3712
|
-
{ token:
|
|
3713
|
-
{ token: i4$2.Store },
|
|
3714
|
-
{ token: i5$1.Clipboard },
|
|
3934
|
+
{ token: i3.Clipboard },
|
|
3715
3935
|
{ token: i0.Injector },
|
|
3716
3936
|
{ token: i0.ChangeDetectorRef },
|
|
3717
3937
|
{ token: i2$3.ConfirmDialogService }
|
|
@@ -3722,7 +3942,7 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
|
|
|
3722
3942
|
static {
|
|
3723
3943
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
3724
3944
|
minVersion: "17.0.0",
|
|
3725
|
-
version: "22.2.
|
|
3945
|
+
version: "22.2.3",
|
|
3726
3946
|
type: UserSubscriptionListComponent,
|
|
3727
3947
|
isStandalone: false,
|
|
3728
3948
|
selector: "pw-user-subscriptions-list",
|
|
@@ -3752,21 +3972,15 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
|
|
|
3752
3972
|
descendants: true
|
|
3753
3973
|
},
|
|
3754
3974
|
{
|
|
3755
|
-
propertyName: "
|
|
3975
|
+
propertyName: "removal",
|
|
3756
3976
|
first: true,
|
|
3757
|
-
predicate:
|
|
3758
|
-
descendants: true
|
|
3759
|
-
},
|
|
3760
|
-
{
|
|
3761
|
-
propertyName: "cancelSubscriptionModal",
|
|
3762
|
-
first: true,
|
|
3763
|
-
predicate: ["cancelSubscriptionModal"],
|
|
3977
|
+
predicate: SubscriptionRemovalComponent,
|
|
3764
3978
|
descendants: true
|
|
3765
3979
|
}
|
|
3766
3980
|
],
|
|
3767
3981
|
usesInheritance: true,
|
|
3768
3982
|
ngImport: i0,
|
|
3769
|
-
template: "@if (!showTos) {\n <!-- Subscriptions Tab Content -->\n @if (!editing && !isAddNew) {\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>Your Subscriptions</h2>\n <p>You'll find in this section the summary of your subscriptions.</p>\n </div>\n </div>\n }\n <!-- Subscribed Product Cards -->\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (\n !editing && !isAddNew && !isUpdatePayment && isLoaded && subscribedSubscriptions.length\n ) {\n <div class=\"row\"\n >\n @for (subscription of subscribedSubscriptions; track trackBySubscription($index, subscription)) {\n <div class=\"col-12 col-md-6 my-3\"\n >\n <div class=\"subscription-details mb-4\">\n <div class=\"subscription-summary d-flex flex-wrap justify-content-between align-items-start gap-2 mb-3\">\n <div class=\"subscription-summary__info\">\n <div>\n <strong>Organisation:</strong>\n {{ subscription.organisation ? subscription.organisation : subscription.contact_name }}\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.TotalPriceExclTax' | transloco }}:</strong>\n @if (subscription.calculated_price) {\n {{ subscription.products[0]?.currency }} {{ subscription.calculated_price / 100 | number:'1.2-2' }}\n {{ subscription.products[0].trial_subscription ? '(After Trial)' : '' }}\n } @else {\n Free\n }\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.SeatsInUse' | transloco }}:</strong>\n {{ subscription.units_in_use || 1 }} / {{ subscription.purchased_units }}\n @if (subscription.purchased_units) {\n <span class=\"seats-usage\"\n [style.--seats-pct]=\"(subscription.units_in_use || 1) / subscription.purchased_units\"></span>\n }\n </div>\n </div>\n <!-- Subscription-level actions (a subscription may hold multiple products) -->\n @if (\n (subscription.is_subscription_owner || subscription.is_subscription_admin) &&\n subscription.products?.length &&\n !subscription.products[0].deleted &&\n !subscription.products[0].dependency_products?.length\n ) {\n <div class=\"subscription-summary__actions d-flex flex-wrap align-items-center gap-2\">\n <a class=\"btn btn-outline-primary btn-sm\"\n aria-label=\"Navigate to Target\"\n [routerLink]=\"['../subscriptions', subscription.id]\">\n {{ 'Button.Edit' | transloco }}\n </a>\n @if (!subscription.products[0].expired && !subscription.products[0].trial_subscription) {\n <button [routerLink]=\"['../subscriptions', subscription.id, 'credential']\"\n class=\"btn btn-outline-secondary btn-sm\">\n {{ 'User.Subscriptions.Credentials' | transloco }}\n </button>\n }\n @if (!isUpdatePayment && subscription.stripe_customer_id) {\n <a class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['../subscriptions', subscription.id, 'product', subscription.products[0].id, 'update-payment']\">\n <i class=\"fa fa-edit me-1\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.UpdateCardDetails' | transloco }}</a>\n }\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"'/account/subscriptions/add-new'\"\n [queryParams]=\"{ subscription_id: subscription.id }\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.ManageAllProducts' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <i class=\"fa fa-plus me-1\"></i>{{ 'User.Subscriptions.SeeAllProducts' | transloco }}\n </button>\n </div>\n }\n </div>\n <!-- Products list -->\n @for (\n product of subscription.products; track trackByProduct($index,\n product); let first = $first) {\n <div class=\"mb-3\">\n <div class=\"card subscription-products-cards\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <div>\n <h4 class=\"mb-3 text-bold-500 primary\">{{ product?.name }}</h4>\n <!-- Frequency -->\n <div>\n <div>\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.Frequency' | transloco\n }}:</strong>\n {{ product?.billing_frequency | uppercase }}\n </div>\n </div>\n <!-- Expiration -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n product.expired ? 'Expired' : 'Expiry Date'\n }}:</strong>\n {{ product.expires_at | dateFormat }}\n </div>\n <!-- Estimated Price -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.PriceExclTax' | transloco\n }}:</strong>\n {{ product.currency }}\n {{ (product.calculated_price / 100) | number:'1.2-2' }}\n </div>\n <!-- Product API Key (Alpha-only) -->\n <ng-container *rbacAllow=\"'Pages.Alpha'\">\n @if (\n (product.stripe_plan_id && product.max_hits > 0) ||\n product.max_hits_trial > 0\n ) {\n <div class=\"d-flex align-items-center\">\n <strong class=\"d-inline-block w-50\">\n {{ 'User.Subscriptions.ApiKey' | transloco }}:\n <i class=\"far fa-info-circle ms-1 text-muted\"\n aria-hidden=\"true\"\n [pTooltip]=\"'User.Subscriptions.ApiKey.NotUsedHint' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"></i>\n </strong>\n <code class=\"text-truncate me-2\">{{ product.masked }}</code>\n <span class=\"ms-auto d-flex align-items-center flex-shrink-0\">\n <!-- Show Access Key -->\n <button class=\"btn\"\n pTooltip=\"Show Access Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"showKey(product)\">\n <i class=\"fas fa-eye\" aria-hidden=\"true\"></i>\n </button>\n <!-- Copy To Clipboard -->\n <button class=\"btn\"\n pTooltip=\"Copy Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <i class=\"fal fa-copy\"\n aria-hidden=\"true\"\n (click)=\"onClipboardCopy(product.api_access_token)\"\n (keydown.enter)=\"onClipboardCopy(product.api_access_token)\"></i>\n </button>\n <!-- Update API Key -->\n @if (!product.expired && !product.deleted) {\n <button class=\"btn\"\n pTooltip=\"Change Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"updateApiKey(subscription, product)\">\n <i class=\"fal fa-sync-alt\" aria-hidden=\"true\"></i>\n </button>\n }\n </span>\n </div>\n }\n </ng-container>\n </div>\n </div>\n <div class=\"card-footer px-3 d-flex flex-column gap-2\">\n <div class=\"footer-status d-flex flex-wrap align-items-center gap-2\">\n @if (product.deleted && !product.expired) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.OutdatedMessage' | transloco }}\n </span>\n }\n @if (product.deleted) {\n <span class=\"badge bg-danger\">Deleted</span>\n }\n @if (\n product.trial_subscription &&\n product.calculated_price\n ) {\n <span class=\"badge bg-warning\">Trial</span>\n }\n @if (product?.pause_collection && objectKeys(product?.pause_collection)?.length) {\n <span class=\"badge bg-grey\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.PausedCollection'|transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n Paused collection\n </span>\n }\n @if (!product.calculated_price) {\n <span class=\"badge bg-success\">Free</span>\n }\n @if (!product?.deleted && !subscription.is_subscription_owner) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>Invited to use this product\n @if (subscription.is_subscription_admin) {\n <span class=\"badge bg-role-admin ms-1\">as an admin</span>\n }\n </span>\n }\n </div>\n @if (\n subscription.is_subscription_owner ||\n subscription.is_subscription_admin\n ) {\n <div class=\"footer-actions d-flex flex-wrap align-items-center justify-content-end gap-2\">\n <!-- Unsubscribe -->\n @if (\n subscription?.stripe_customer_id &&\n !product?.deleted &&\n !product?.trial_subscription\n ) {\n <button class=\"btn btn-outline-danger btn-sm\"\n (click)=\"attemptUnsubscribe(subscription, product.id)\">\n {{ 'User.Subscriptions.Unsubscribe' | transloco }}\n </button>\n }\n @if (product.stripe_plan_id && product.active) {\n <!-- Upgrade (single primary CTA) -->\n @if (product.trial_subscription && !product.deleted) {\n <button class=\"btn btn-primary btn-sm\"\n (click)=\"attemptUpgrade(subscription, product)\">\n {{ 'Button.Upgrade' | transloco }}\n </button>\n }\n <!-- Subscribe -->\n @if (subscription.expired && product.stripe_plan_id) {\n <button class=\"btn btn-primary btn-sm\"\n [routerLink]=\"'/account/subscriptions/add-new'\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </button>\n }\n }\n <!-- Privacy & Terms of Service (quiet link, not a button) -->\n @if (product?.product_privacy_service_id) {\n <button class=\"btn btn-link btn-sm p-0 footer-tos-link\"\n (click)=\"showPrivacyAndTos(product)\">\n {{\n 'User.Subscriptions.PrivacyAndTermsOfService'\n | transloco\n }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if (subscription.products.length === 0) {\n <div>\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <p class=\"text-center\">\n No product available for this subscription\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n @if (!editing && !isAddNew && !isUpdatePayment) {\n <div class=\"col-12\"\n >\n @if (subscribedSubscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any subscription.\"\n >\n </pw-no-data>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n <!-- Danger zone (demoted account deletion) -->\n @if (!editing && !isAddNew && !isUpdatePayment && isLoaded) {\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"danger-zone mt-4\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger danger-zone__action\"\n (click)=\"showModalForAccountDeletion()\"\n [pTooltip]=\"'User.Account.Tooltip.DeleteAccount' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Account.DeleteAccount' | transloco }}\n </button>\n </div>\n </div>\n </div>\n }\n <!--\n Add New Subscription\n -->\n <!-- <ng-template [ngIf]=\"isAddNew && !isUpdatePayment\">\n <pw-subscription-details></pw-subscription-details>\n</ng-template> -->\n<!--\nValidate Password For Account Delete\n-->\n<pw-password-validation #passwordValidationModalForAccountDelete\n [destructive]=\"true\"\n (successEvent)=\"deleteUser($event)\">\n</pw-password-validation>\n<!--\nValidate Password For Display Key\n-->\n<pw-password-validation #passwordValidationModalForKey\n (successEvent)=\"displayApiKey()\">\n</pw-password-validation>\n<!--\nValidate Password For Unsubscribe\n-->\n<pw-password-validation #passwordValidationForUnsubscribe\n [destructive]=\"true\"\n (successEvent)=\"onValidatePassword($event)\">\n</pw-password-validation>\n<!--\nCancel Subscription Modal\n-->\n<ng-template #cancelSubscriptionModal let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\">{{ 'User.Subscriptions.CancelSubscription.Title' | transloco }}</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss(); reasonToCancel = '';\">\n </button>\n </div>\n <div class=\"modal-body\">\n <p>{{ 'User.Subscriptions.CancelSubscription.Message' | transloco }}</p>\n <div class=\"mb-3\">\n <label for=\"reasonToCancel\" class=\"form-label\">\n {{ 'User.Subscriptions.CancelSubscription.ReasonLabel' | transloco }} <span class=\"text-danger\">*</span>\n </label>\n <textarea\n id=\"reasonToCancel\"\n class=\"form-control\"\n rows=\"4\"\n [(ngModel)]=\"reasonToCancel\"\n [ngClass]=\"{'is-invalid': reasonToCancel && reasonToCancel.trim() === ''}\"\n placeholder=\"{{ 'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco }}\"\n aria-label=\"{{ 'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco }}\"></textarea>\n @if (reasonToCancel && reasonToCancel.trim() === '') {\n <div class=\"invalid-feedback\">\n {{ 'User.Subscriptions.Validation.ReasonRequired' | transloco }}\n </div>\n }\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.dismiss(); reasonToCancel = '';\">\n {{ 'User.Subscriptions.CancelSubscription.KeepItForNow' | transloco }}\n </button>\n <button type=\"button\"\n class=\"btn btn-danger\"\n [disabled]=\"!reasonToCancel || reasonToCancel.trim() === ''\"\n (click)=\"onConfirmCancel(); modal.close()\">\n {{ 'User.Subscriptions.CancelSubscription.ConfirmButton' | transloco }}\n </button>\n </div>\n</ng-template>\n}\n\n@if (showTos) {\n <pw-privacy-and-tos [productId]=\"productId\"></pw-privacy-and-tos>\n}\n\n<router-outlet></router-outlet>\n",
|
|
3983
|
+
template: "@if (!showTos) {\n <!-- Subscriptions Tab Content -->\n @if (!editing && !isAddNew) {\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>Your Subscriptions</h2>\n <p>You'll find in this section the summary of your subscriptions.</p>\n </div>\n </div>\n }\n <!-- Subscribed Product Cards -->\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (\n !editing && !isAddNew && !isUpdatePayment && isLoaded && subscribedSubscriptions.length\n ) {\n <div class=\"row\"\n >\n @for (subscription of subscribedSubscriptions; track trackBySubscription($index, subscription)) {\n <div class=\"col-12 col-md-6 my-3\"\n >\n <div class=\"subscription-details mb-4\">\n <div class=\"subscription-summary d-flex flex-wrap justify-content-between align-items-start gap-2 mb-3\">\n <div class=\"subscription-summary__info\">\n <div>\n <strong>Organisation:</strong>\n {{ subscription.organisation ? subscription.organisation : subscription.contact_name }}\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.TotalPriceExclTax' | transloco }}:</strong>\n @if (subscription.calculated_price) {\n {{ subscription.products[0]?.currency }} {{ subscription.calculated_price / 100 | number:'1.2-2' }}\n {{ subscription.products[0].trial_subscription ? '(After Trial)' : '' }}\n } @else {\n Free\n }\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.SeatsInUse' | transloco }}:</strong>\n {{ subscription.units_in_use || 1 }} / {{ subscription.purchased_units }}\n @if (subscription.purchased_units) {\n <span class=\"seats-usage\"\n [style.--seats-pct]=\"(subscription.units_in_use || 1) / subscription.purchased_units\"></span>\n }\n </div>\n </div>\n <!-- Subscription-level actions (a subscription may hold multiple products) -->\n @if (\n (subscription.is_subscription_owner || subscription.is_subscription_admin) &&\n subscription.products?.length &&\n !subscription.products[0].deleted &&\n !subscription.products[0].dependency_products?.length\n ) {\n <div class=\"subscription-summary__actions d-flex flex-wrap align-items-center gap-2\">\n <a class=\"btn btn-outline-primary btn-sm\"\n aria-label=\"Navigate to Target\"\n [routerLink]=\"['../subscriptions', subscription.id]\">\n {{ 'Button.Edit' | transloco }}\n </a>\n @if (!subscription.products[0].expired && !subscription.products[0].trial_subscription) {\n <button [routerLink]=\"['../subscriptions', subscription.id, 'credential']\"\n class=\"btn btn-outline-secondary btn-sm\">\n {{ 'User.Subscriptions.Credentials' | transloco }}\n </button>\n }\n @if (!isUpdatePayment && subscription.stripe_customer_id) {\n <a class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['../subscriptions', subscription.id, 'product', subscription.products[0].id, 'update-payment']\">\n <i class=\"fa fa-edit me-1\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.UpdateCardDetails' | transloco }}</a>\n }\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"'/account/subscriptions/add-new'\"\n [queryParams]=\"{ subscription_id: subscription.id }\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.ManageAllProducts' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <i class=\"fa fa-plus me-1\"></i>{{ 'User.Subscriptions.SeeAllProducts' | transloco }}\n </button>\n @if (!subscription.has_child_subscriptions) {\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger\"\n (click)=\"deleteSubscription(subscription)\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.DeleteSubscription' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n {{ 'User.Subscriptions.DeleteSubscription' | transloco }}\n </button>\n }\n </div>\n }\n </div>\n <!-- Products list -->\n @for (\n product of subscription.products; track trackByProduct($index,\n product); let first = $first) {\n <div class=\"mb-3\">\n <div class=\"card subscription-products-cards\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <div>\n <h4 class=\"mb-3 text-bold-500 primary\">{{ product?.name }}</h4>\n <!-- Frequency -->\n <div>\n <div>\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.Frequency' | transloco\n }}:</strong>\n {{ product?.billing_frequency | uppercase }}\n </div>\n </div>\n <!-- Expiration -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n product.expired ? 'Expired' : 'Expiry Date'\n }}:</strong>\n {{ product.expires_at | dateFormat }}\n </div>\n <!-- Estimated Price -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.PriceExclTax' | transloco\n }}:</strong>\n {{ product.currency }}\n {{ (product.calculated_price / 100) | number:'1.2-2' }}\n </div>\n <!-- Product API Key (Alpha-only) -->\n <ng-container *rbacAllow=\"'Pages.Alpha'\">\n @if (\n (product.stripe_plan_id && product.max_hits > 0) ||\n product.max_hits_trial > 0\n ) {\n <div class=\"d-flex align-items-center\">\n <strong class=\"d-inline-block w-50\">\n {{ 'User.Subscriptions.ApiKey' | transloco }}:\n <i class=\"far fa-info-circle ms-1 text-muted\"\n aria-hidden=\"true\"\n [pTooltip]=\"'User.Subscriptions.ApiKey.NotUsedHint' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"></i>\n </strong>\n <code class=\"text-truncate me-2\">{{ product.masked }}</code>\n <span class=\"ms-auto d-flex align-items-center flex-shrink-0\">\n <!-- Show Access Key -->\n <button class=\"btn\"\n pTooltip=\"Show Access Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"showKey(product)\">\n <i class=\"fas fa-eye\" aria-hidden=\"true\"></i>\n </button>\n <!-- Copy To Clipboard -->\n <button class=\"btn\"\n pTooltip=\"Copy Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <i class=\"fal fa-copy\"\n aria-hidden=\"true\"\n (click)=\"onClipboardCopy(product.api_access_token)\"\n (keydown.enter)=\"onClipboardCopy(product.api_access_token)\"></i>\n </button>\n <!-- Update API Key -->\n @if (!product.expired && !product.deleted) {\n <button class=\"btn\"\n pTooltip=\"Change Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"updateApiKey(subscription, product)\">\n <i class=\"fal fa-sync-alt\" aria-hidden=\"true\"></i>\n </button>\n }\n </span>\n </div>\n }\n </ng-container>\n </div>\n </div>\n <div class=\"card-footer px-3 d-flex flex-column gap-2\">\n <div class=\"footer-status d-flex flex-wrap align-items-center gap-2\">\n @if (product.deleted && !product.expired) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.OutdatedMessage' | transloco }}\n </span>\n }\n @if (product.deleted) {\n <span class=\"badge bg-danger\">Deleted</span>\n }\n @if (\n product.trial_subscription &&\n product.calculated_price\n ) {\n <span class=\"badge bg-warning\">Trial</span>\n }\n @if (product?.pause_collection && objectKeys(product?.pause_collection)?.length) {\n <span class=\"badge bg-grey\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.PausedCollection'|transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n Paused collection\n </span>\n }\n @if (!product.calculated_price) {\n <span class=\"badge bg-success\">Free</span>\n }\n @if (!product?.deleted && !subscription.is_subscription_owner) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>Invited to use this product\n @if (subscription.is_subscription_admin) {\n <span class=\"badge bg-role-admin ms-1\">as an admin</span>\n }\n </span>\n }\n </div>\n @if (\n subscription.is_subscription_owner ||\n subscription.is_subscription_admin\n ) {\n <div class=\"footer-actions d-flex flex-wrap align-items-center justify-content-end gap-2\">\n <!-- Secondary products only: the primary goes with the whole subscription -->\n @if (\n subscription.products.length > 1 &&\n !product.is_primary_product &&\n !product?.deleted\n ) {\n <span [pTooltip]=\"product.required_by_product_ids?.length ? ('User.Subscriptions.Tooltip.ProductRequired' | transloco) : ''\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <button type=\"button\"\n class=\"btn btn-outline-danger btn-sm\"\n [disabled]=\"product.required_by_product_ids?.length\"\n (click)=\"deleteProduct(subscription, product)\">\n {{ 'User.Subscriptions.DeleteProduct' | transloco }}\n </button>\n </span>\n }\n @if (product.stripe_plan_id && product.active) {\n <!-- Upgrade (single primary CTA) -->\n @if (product.trial_subscription && !product.deleted) {\n <button class=\"btn btn-primary btn-sm\"\n (click)=\"attemptUpgrade(subscription, product)\">\n {{ 'Button.Upgrade' | transloco }}\n </button>\n }\n <!-- Subscribe -->\n @if (subscription.expired && product.stripe_plan_id) {\n <button class=\"btn btn-primary btn-sm\"\n [routerLink]=\"'/account/subscriptions/add-new'\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </button>\n }\n }\n <!-- Privacy & Terms of Service (quiet link, not a button) -->\n @if (product?.product_privacy_service_id) {\n <button class=\"btn btn-link btn-sm p-0 footer-tos-link\"\n (click)=\"showPrivacyAndTos(product)\">\n {{\n 'User.Subscriptions.PrivacyAndTermsOfService'\n | transloco\n }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if (subscription.products.length === 0) {\n <div>\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <p class=\"text-center\">\n No product available for this subscription\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n @if (!editing && !isAddNew && !isUpdatePayment) {\n <div class=\"col-12\"\n >\n @if (subscribedSubscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any subscription.\"\n >\n </pw-no-data>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n <!-- Danger zone (demoted account deletion) -->\n @if (!editing && !isAddNew && !isUpdatePayment && isLoaded) {\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"danger-zone mt-4\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger danger-zone__action\"\n (click)=\"showModalForAccountDeletion()\"\n [pTooltip]=\"'User.Account.Tooltip.DeleteAccount' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Account.DeleteAccount' | transloco }}\n </button>\n </div>\n </div>\n </div>\n }\n <!--\n Add New Subscription\n -->\n <!-- <ng-template [ngIf]=\"isAddNew && !isUpdatePayment\">\n <pw-subscription-details></pw-subscription-details>\n</ng-template> -->\n<!--\nValidate Password For Account Delete\n-->\n<pw-password-validation #passwordValidationModalForAccountDelete\n [destructive]=\"true\"\n (successEvent)=\"deleteUser($event)\">\n</pw-password-validation>\n<!--\nValidate Password For Display Key\n-->\n<pw-password-validation #passwordValidationModalForKey\n (successEvent)=\"displayApiKey()\">\n</pw-password-validation>\n<pw-subscription-removal [user]=\"user\" (removed)=\"onRemoved()\"></pw-subscription-removal>\n}\n\n@if (showTos) {\n <pw-privacy-and-tos [productId]=\"productId\"></pw-privacy-and-tos>\n}\n\n<router-outlet></router-outlet>\n",
|
|
3770
3984
|
styles: [".btn-list{bottom:24px;left:0;padding:0 38px;right:0}.shadow-md{padding-bottom:70px!important}.bg-dark{border:0}.subscription-details{background:#fff;border:1px solid #e2e5ea;border-radius:12px;padding:16px 16px 6px;font-size:14px;font-variant-numeric:tabular-nums}.subscription-summary{border-bottom:1px solid #eef0f3;padding-bottom:12px}.seats-usage{display:inline-block;width:120px;height:6px;margin-left:8px;border-radius:999px;vertical-align:middle;overflow:hidden;background:linear-gradient(#5a6473,#5a6473) left/calc(var(--seats-pct, 0) * 100%) 100% no-repeat,#e2e5ea}.subscription-products-cards{padding-bottom:0!important}.subscription-products-cards .card-footer{position:static!important}.subscription-products-cards.card{background:#f7f8fa;border:1px solid #eef0f3;border-radius:8px;box-shadow:none!important;font-size:14px}.card-footer{background:transparent;border-top:1px solid #eef0f3}.card-footer .footer-note{color:#5a6473;font-size:.875rem}.card-footer .footer-tos-link{color:#5a6473;font-weight:500;text-decoration:underline}.card-footer .footer-tos-link:hover{color:var(--first)}.badge{font-weight:600;border-radius:4px}.badge.bg-success{background-color:#e6f4ec!important;color:#0f6b3a!important}.badge.bg-danger{background-color:#fbeae8!important;color:#c0392b!important}.badge.bg-warning{background-color:#fbf1e3!important;color:#8a5a00!important}.badge.bg-grey,.badge.bg-role-admin{background-color:#eef0f3!important;color:#5a6473!important}code{color:var(--text);min-width:0}.danger-zone{border-top:1px solid #e2e5ea;padding-top:16px;text-align:right}\n"],
|
|
3771
3985
|
dependencies: [
|
|
3772
3986
|
{
|
|
@@ -3813,16 +4027,6 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
|
|
|
3813
4027
|
"routerLink"
|
|
3814
4028
|
]
|
|
3815
4029
|
},
|
|
3816
|
-
{
|
|
3817
|
-
kind: "directive",
|
|
3818
|
-
type: i1$1.DefaultValueAccessor,
|
|
3819
|
-
selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
|
|
3820
|
-
},
|
|
3821
|
-
{
|
|
3822
|
-
kind: "directive",
|
|
3823
|
-
type: i1$1.NgControlStatus,
|
|
3824
|
-
selector: "[formControlName],[ngModel],[formControl]"
|
|
3825
|
-
},
|
|
3826
4030
|
{
|
|
3827
4031
|
kind: "component",
|
|
3828
4032
|
type: i2$3.PasswordValidationComponent,
|
|
@@ -3872,19 +4076,6 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
|
|
|
3872
4076
|
"fill"
|
|
3873
4077
|
]
|
|
3874
4078
|
},
|
|
3875
|
-
{
|
|
3876
|
-
kind: "directive",
|
|
3877
|
-
type: i1$1.NgModel,
|
|
3878
|
-
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
3879
|
-
inputs: [
|
|
3880
|
-
"name",
|
|
3881
|
-
"disabled",
|
|
3882
|
-
"ngModel",
|
|
3883
|
-
"ngModelOptions"
|
|
3884
|
-
],
|
|
3885
|
-
outputs: ["ngModelChange"],
|
|
3886
|
-
exportAs: ["ngModel"]
|
|
3887
|
-
},
|
|
3888
4079
|
{
|
|
3889
4080
|
kind: "component",
|
|
3890
4081
|
type: i2$3.PrivacyAndTosComponent,
|
|
@@ -3901,6 +4092,13 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
|
|
|
3901
4092
|
"withImage"
|
|
3902
4093
|
]
|
|
3903
4094
|
},
|
|
4095
|
+
{
|
|
4096
|
+
kind: "component",
|
|
4097
|
+
type: SubscriptionRemovalComponent,
|
|
4098
|
+
selector: "pw-subscription-removal",
|
|
4099
|
+
inputs: ["user"],
|
|
4100
|
+
outputs: ["removed"]
|
|
4101
|
+
},
|
|
3904
4102
|
{
|
|
3905
4103
|
kind: "pipe",
|
|
3906
4104
|
type: i7$2.UpperCasePipe,
|
|
@@ -3927,7 +4125,7 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
|
|
|
3927
4125
|
};
|
|
3928
4126
|
i0.ɵɵngDeclareClassMetadata({
|
|
3929
4127
|
minVersion: "12.0.0",
|
|
3930
|
-
version: "22.2.
|
|
4128
|
+
version: "22.2.3",
|
|
3931
4129
|
ngImport: i0,
|
|
3932
4130
|
type: UserSubscriptionListComponent,
|
|
3933
4131
|
decorators: [{
|
|
@@ -3935,16 +4133,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3935
4133
|
args: [{
|
|
3936
4134
|
selector: "pw-user-subscriptions-list",
|
|
3937
4135
|
standalone: false,
|
|
3938
|
-
template: "@if (!showTos) {\n <!-- Subscriptions Tab Content -->\n @if (!editing && !isAddNew) {\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>Your Subscriptions</h2>\n <p>You'll find in this section the summary of your subscriptions.</p>\n </div>\n </div>\n }\n <!-- Subscribed Product Cards -->\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (\n !editing && !isAddNew && !isUpdatePayment && isLoaded && subscribedSubscriptions.length\n ) {\n <div class=\"row\"\n >\n @for (subscription of subscribedSubscriptions; track trackBySubscription($index, subscription)) {\n <div class=\"col-12 col-md-6 my-3\"\n >\n <div class=\"subscription-details mb-4\">\n <div class=\"subscription-summary d-flex flex-wrap justify-content-between align-items-start gap-2 mb-3\">\n <div class=\"subscription-summary__info\">\n <div>\n <strong>Organisation:</strong>\n {{ subscription.organisation ? subscription.organisation : subscription.contact_name }}\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.TotalPriceExclTax' | transloco }}:</strong>\n @if (subscription.calculated_price) {\n {{ subscription.products[0]?.currency }} {{ subscription.calculated_price / 100 | number:'1.2-2' }}\n {{ subscription.products[0].trial_subscription ? '(After Trial)' : '' }}\n } @else {\n Free\n }\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.SeatsInUse' | transloco }}:</strong>\n {{ subscription.units_in_use || 1 }} / {{ subscription.purchased_units }}\n @if (subscription.purchased_units) {\n <span class=\"seats-usage\"\n [style.--seats-pct]=\"(subscription.units_in_use || 1) / subscription.purchased_units\"></span>\n }\n </div>\n </div>\n <!-- Subscription-level actions (a subscription may hold multiple products) -->\n @if (\n (subscription.is_subscription_owner || subscription.is_subscription_admin) &&\n subscription.products?.length &&\n !subscription.products[0].deleted &&\n !subscription.products[0].dependency_products?.length\n ) {\n <div class=\"subscription-summary__actions d-flex flex-wrap align-items-center gap-2\">\n <a class=\"btn btn-outline-primary btn-sm\"\n aria-label=\"Navigate to Target\"\n [routerLink]=\"['../subscriptions', subscription.id]\">\n {{ 'Button.Edit' | transloco }}\n </a>\n @if (!subscription.products[0].expired && !subscription.products[0].trial_subscription) {\n <button [routerLink]=\"['../subscriptions', subscription.id, 'credential']\"\n class=\"btn btn-outline-secondary btn-sm\">\n {{ 'User.Subscriptions.Credentials' | transloco }}\n </button>\n }\n @if (!isUpdatePayment && subscription.stripe_customer_id) {\n <a class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['../subscriptions', subscription.id, 'product', subscription.products[0].id, 'update-payment']\">\n <i class=\"fa fa-edit me-1\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.UpdateCardDetails' | transloco }}</a>\n }\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"'/account/subscriptions/add-new'\"\n [queryParams]=\"{ subscription_id: subscription.id }\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.ManageAllProducts' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <i class=\"fa fa-plus me-1\"></i>{{ 'User.Subscriptions.SeeAllProducts' | transloco }}\n </button>\n </div>\n }\n </div>\n <!-- Products list -->\n @for (\n product of subscription.products; track trackByProduct($index,\n product); let first = $first) {\n <div class=\"mb-3\">\n <div class=\"card subscription-products-cards\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <div>\n <h4 class=\"mb-3 text-bold-500 primary\">{{ product?.name }}</h4>\n <!-- Frequency -->\n <div>\n <div>\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.Frequency' | transloco\n }}:</strong>\n {{ product?.billing_frequency | uppercase }}\n </div>\n </div>\n <!-- Expiration -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n product.expired ? 'Expired' : 'Expiry Date'\n }}:</strong>\n {{ product.expires_at | dateFormat }}\n </div>\n <!-- Estimated Price -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.PriceExclTax' | transloco\n }}:</strong>\n {{ product.currency }}\n {{ (product.calculated_price / 100) | number:'1.2-2' }}\n </div>\n <!-- Product API Key (Alpha-only) -->\n <ng-container *rbacAllow=\"'Pages.Alpha'\">\n @if (\n (product.stripe_plan_id && product.max_hits > 0) ||\n product.max_hits_trial > 0\n ) {\n <div class=\"d-flex align-items-center\">\n <strong class=\"d-inline-block w-50\">\n {{ 'User.Subscriptions.ApiKey' | transloco }}:\n <i class=\"far fa-info-circle ms-1 text-muted\"\n aria-hidden=\"true\"\n [pTooltip]=\"'User.Subscriptions.ApiKey.NotUsedHint' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"></i>\n </strong>\n <code class=\"text-truncate me-2\">{{ product.masked }}</code>\n <span class=\"ms-auto d-flex align-items-center flex-shrink-0\">\n <!-- Show Access Key -->\n <button class=\"btn\"\n pTooltip=\"Show Access Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"showKey(product)\">\n <i class=\"fas fa-eye\" aria-hidden=\"true\"></i>\n </button>\n <!-- Copy To Clipboard -->\n <button class=\"btn\"\n pTooltip=\"Copy Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <i class=\"fal fa-copy\"\n aria-hidden=\"true\"\n (click)=\"onClipboardCopy(product.api_access_token)\"\n (keydown.enter)=\"onClipboardCopy(product.api_access_token)\"></i>\n </button>\n <!-- Update API Key -->\n @if (!product.expired && !product.deleted) {\n <button class=\"btn\"\n pTooltip=\"Change Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"updateApiKey(subscription, product)\">\n <i class=\"fal fa-sync-alt\" aria-hidden=\"true\"></i>\n </button>\n }\n </span>\n </div>\n }\n </ng-container>\n </div>\n </div>\n <div class=\"card-footer px-3 d-flex flex-column gap-2\">\n <div class=\"footer-status d-flex flex-wrap align-items-center gap-2\">\n @if (product.deleted && !product.expired) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.OutdatedMessage' | transloco }}\n </span>\n }\n @if (product.deleted) {\n <span class=\"badge bg-danger\">Deleted</span>\n }\n @if (\n product.trial_subscription &&\n product.calculated_price\n ) {\n <span class=\"badge bg-warning\">Trial</span>\n }\n @if (product?.pause_collection && objectKeys(product?.pause_collection)?.length) {\n <span class=\"badge bg-grey\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.PausedCollection'|transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n Paused collection\n </span>\n }\n @if (!product.calculated_price) {\n <span class=\"badge bg-success\">Free</span>\n }\n @if (!product?.deleted && !subscription.is_subscription_owner) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>Invited to use this product\n @if (subscription.is_subscription_admin) {\n <span class=\"badge bg-role-admin ms-1\">as an admin</span>\n }\n </span>\n }\n </div>\n @if (\n subscription.is_subscription_owner ||\n subscription.is_subscription_admin\n ) {\n <div class=\"footer-actions d-flex flex-wrap align-items-center justify-content-end gap-2\">\n <!-- Unsubscribe -->\n @if (\n subscription?.stripe_customer_id &&\n !product?.deleted &&\n !product?.trial_subscription\n ) {\n <button class=\"btn btn-outline-danger btn-sm\"\n (click)=\"attemptUnsubscribe(subscription, product.id)\">\n {{ 'User.Subscriptions.Unsubscribe' | transloco }}\n </button>\n }\n @if (product.stripe_plan_id && product.active) {\n <!-- Upgrade (single primary CTA) -->\n @if (product.trial_subscription && !product.deleted) {\n <button class=\"btn btn-primary btn-sm\"\n (click)=\"attemptUpgrade(subscription, product)\">\n {{ 'Button.Upgrade' | transloco }}\n </button>\n }\n <!-- Subscribe -->\n @if (subscription.expired && product.stripe_plan_id) {\n <button class=\"btn btn-primary btn-sm\"\n [routerLink]=\"'/account/subscriptions/add-new'\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </button>\n }\n }\n <!-- Privacy & Terms of Service (quiet link, not a button) -->\n @if (product?.product_privacy_service_id) {\n <button class=\"btn btn-link btn-sm p-0 footer-tos-link\"\n (click)=\"showPrivacyAndTos(product)\">\n {{\n 'User.Subscriptions.PrivacyAndTermsOfService'\n | transloco\n }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if (subscription.products.length === 0) {\n <div>\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <p class=\"text-center\">\n No product available for this subscription\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n @if (!editing && !isAddNew && !isUpdatePayment) {\n <div class=\"col-12\"\n >\n @if (subscribedSubscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any subscription.\"\n >\n </pw-no-data>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n <!-- Danger zone (demoted account deletion) -->\n @if (!editing && !isAddNew && !isUpdatePayment && isLoaded) {\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"danger-zone mt-4\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger danger-zone__action\"\n (click)=\"showModalForAccountDeletion()\"\n [pTooltip]=\"'User.Account.Tooltip.DeleteAccount' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Account.DeleteAccount' | transloco }}\n </button>\n </div>\n </div>\n </div>\n }\n <!--\n Add New Subscription\n -->\n <!-- <ng-template [ngIf]=\"isAddNew && !isUpdatePayment\">\n <pw-subscription-details></pw-subscription-details>\n</ng-template> -->\n<!--\nValidate Password For Account Delete\n-->\n<pw-password-validation #passwordValidationModalForAccountDelete\n [destructive]=\"true\"\n (successEvent)=\"deleteUser($event)\">\n</pw-password-validation>\n<!--\nValidate Password For Display Key\n-->\n<pw-password-validation #passwordValidationModalForKey\n (successEvent)=\"displayApiKey()\">\n</pw-password-validation>\n<!--\nValidate Password For Unsubscribe\n-->\n<pw-password-validation #passwordValidationForUnsubscribe\n [destructive]=\"true\"\n (successEvent)=\"onValidatePassword($event)\">\n</pw-password-validation>\n<!--\nCancel Subscription Modal\n-->\n<ng-template #cancelSubscriptionModal let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\">{{ 'User.Subscriptions.CancelSubscription.Title' | transloco }}</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss(); reasonToCancel = '';\">\n </button>\n </div>\n <div class=\"modal-body\">\n <p>{{ 'User.Subscriptions.CancelSubscription.Message' | transloco }}</p>\n <div class=\"mb-3\">\n <label for=\"reasonToCancel\" class=\"form-label\">\n {{ 'User.Subscriptions.CancelSubscription.ReasonLabel' | transloco }} <span class=\"text-danger\">*</span>\n </label>\n <textarea\n id=\"reasonToCancel\"\n class=\"form-control\"\n rows=\"4\"\n [(ngModel)]=\"reasonToCancel\"\n [ngClass]=\"{'is-invalid': reasonToCancel && reasonToCancel.trim() === ''}\"\n placeholder=\"{{ 'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco }}\"\n aria-label=\"{{ 'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco }}\"></textarea>\n @if (reasonToCancel && reasonToCancel.trim() === '') {\n <div class=\"invalid-feedback\">\n {{ 'User.Subscriptions.Validation.ReasonRequired' | transloco }}\n </div>\n }\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.dismiss(); reasonToCancel = '';\">\n {{ 'User.Subscriptions.CancelSubscription.KeepItForNow' | transloco }}\n </button>\n <button type=\"button\"\n class=\"btn btn-danger\"\n [disabled]=\"!reasonToCancel || reasonToCancel.trim() === ''\"\n (click)=\"onConfirmCancel(); modal.close()\">\n {{ 'User.Subscriptions.CancelSubscription.ConfirmButton' | transloco }}\n </button>\n </div>\n</ng-template>\n}\n\n@if (showTos) {\n <pw-privacy-and-tos [productId]=\"productId\"></pw-privacy-and-tos>\n}\n\n<router-outlet></router-outlet>\n",
|
|
4136
|
+
template: "@if (!showTos) {\n <!-- Subscriptions Tab Content -->\n @if (!editing && !isAddNew) {\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>Your Subscriptions</h2>\n <p>You'll find in this section the summary of your subscriptions.</p>\n </div>\n </div>\n }\n <!-- Subscribed Product Cards -->\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (\n !editing && !isAddNew && !isUpdatePayment && isLoaded && subscribedSubscriptions.length\n ) {\n <div class=\"row\"\n >\n @for (subscription of subscribedSubscriptions; track trackBySubscription($index, subscription)) {\n <div class=\"col-12 col-md-6 my-3\"\n >\n <div class=\"subscription-details mb-4\">\n <div class=\"subscription-summary d-flex flex-wrap justify-content-between align-items-start gap-2 mb-3\">\n <div class=\"subscription-summary__info\">\n <div>\n <strong>Organisation:</strong>\n {{ subscription.organisation ? subscription.organisation : subscription.contact_name }}\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.TotalPriceExclTax' | transloco }}:</strong>\n @if (subscription.calculated_price) {\n {{ subscription.products[0]?.currency }} {{ subscription.calculated_price / 100 | number:'1.2-2' }}\n {{ subscription.products[0].trial_subscription ? '(After Trial)' : '' }}\n } @else {\n Free\n }\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.SeatsInUse' | transloco }}:</strong>\n {{ subscription.units_in_use || 1 }} / {{ subscription.purchased_units }}\n @if (subscription.purchased_units) {\n <span class=\"seats-usage\"\n [style.--seats-pct]=\"(subscription.units_in_use || 1) / subscription.purchased_units\"></span>\n }\n </div>\n </div>\n <!-- Subscription-level actions (a subscription may hold multiple products) -->\n @if (\n (subscription.is_subscription_owner || subscription.is_subscription_admin) &&\n subscription.products?.length &&\n !subscription.products[0].deleted &&\n !subscription.products[0].dependency_products?.length\n ) {\n <div class=\"subscription-summary__actions d-flex flex-wrap align-items-center gap-2\">\n <a class=\"btn btn-outline-primary btn-sm\"\n aria-label=\"Navigate to Target\"\n [routerLink]=\"['../subscriptions', subscription.id]\">\n {{ 'Button.Edit' | transloco }}\n </a>\n @if (!subscription.products[0].expired && !subscription.products[0].trial_subscription) {\n <button [routerLink]=\"['../subscriptions', subscription.id, 'credential']\"\n class=\"btn btn-outline-secondary btn-sm\">\n {{ 'User.Subscriptions.Credentials' | transloco }}\n </button>\n }\n @if (!isUpdatePayment && subscription.stripe_customer_id) {\n <a class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['../subscriptions', subscription.id, 'product', subscription.products[0].id, 'update-payment']\">\n <i class=\"fa fa-edit me-1\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.UpdateCardDetails' | transloco }}</a>\n }\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"'/account/subscriptions/add-new'\"\n [queryParams]=\"{ subscription_id: subscription.id }\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.ManageAllProducts' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <i class=\"fa fa-plus me-1\"></i>{{ 'User.Subscriptions.SeeAllProducts' | transloco }}\n </button>\n @if (!subscription.has_child_subscriptions) {\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger\"\n (click)=\"deleteSubscription(subscription)\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.DeleteSubscription' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n {{ 'User.Subscriptions.DeleteSubscription' | transloco }}\n </button>\n }\n </div>\n }\n </div>\n <!-- Products list -->\n @for (\n product of subscription.products; track trackByProduct($index,\n product); let first = $first) {\n <div class=\"mb-3\">\n <div class=\"card subscription-products-cards\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <div>\n <h4 class=\"mb-3 text-bold-500 primary\">{{ product?.name }}</h4>\n <!-- Frequency -->\n <div>\n <div>\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.Frequency' | transloco\n }}:</strong>\n {{ product?.billing_frequency | uppercase }}\n </div>\n </div>\n <!-- Expiration -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n product.expired ? 'Expired' : 'Expiry Date'\n }}:</strong>\n {{ product.expires_at | dateFormat }}\n </div>\n <!-- Estimated Price -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.PriceExclTax' | transloco\n }}:</strong>\n {{ product.currency }}\n {{ (product.calculated_price / 100) | number:'1.2-2' }}\n </div>\n <!-- Product API Key (Alpha-only) -->\n <ng-container *rbacAllow=\"'Pages.Alpha'\">\n @if (\n (product.stripe_plan_id && product.max_hits > 0) ||\n product.max_hits_trial > 0\n ) {\n <div class=\"d-flex align-items-center\">\n <strong class=\"d-inline-block w-50\">\n {{ 'User.Subscriptions.ApiKey' | transloco }}:\n <i class=\"far fa-info-circle ms-1 text-muted\"\n aria-hidden=\"true\"\n [pTooltip]=\"'User.Subscriptions.ApiKey.NotUsedHint' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"></i>\n </strong>\n <code class=\"text-truncate me-2\">{{ product.masked }}</code>\n <span class=\"ms-auto d-flex align-items-center flex-shrink-0\">\n <!-- Show Access Key -->\n <button class=\"btn\"\n pTooltip=\"Show Access Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"showKey(product)\">\n <i class=\"fas fa-eye\" aria-hidden=\"true\"></i>\n </button>\n <!-- Copy To Clipboard -->\n <button class=\"btn\"\n pTooltip=\"Copy Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <i class=\"fal fa-copy\"\n aria-hidden=\"true\"\n (click)=\"onClipboardCopy(product.api_access_token)\"\n (keydown.enter)=\"onClipboardCopy(product.api_access_token)\"></i>\n </button>\n <!-- Update API Key -->\n @if (!product.expired && !product.deleted) {\n <button class=\"btn\"\n pTooltip=\"Change Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"updateApiKey(subscription, product)\">\n <i class=\"fal fa-sync-alt\" aria-hidden=\"true\"></i>\n </button>\n }\n </span>\n </div>\n }\n </ng-container>\n </div>\n </div>\n <div class=\"card-footer px-3 d-flex flex-column gap-2\">\n <div class=\"footer-status d-flex flex-wrap align-items-center gap-2\">\n @if (product.deleted && !product.expired) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.OutdatedMessage' | transloco }}\n </span>\n }\n @if (product.deleted) {\n <span class=\"badge bg-danger\">Deleted</span>\n }\n @if (\n product.trial_subscription &&\n product.calculated_price\n ) {\n <span class=\"badge bg-warning\">Trial</span>\n }\n @if (product?.pause_collection && objectKeys(product?.pause_collection)?.length) {\n <span class=\"badge bg-grey\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.PausedCollection'|transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n Paused collection\n </span>\n }\n @if (!product.calculated_price) {\n <span class=\"badge bg-success\">Free</span>\n }\n @if (!product?.deleted && !subscription.is_subscription_owner) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>Invited to use this product\n @if (subscription.is_subscription_admin) {\n <span class=\"badge bg-role-admin ms-1\">as an admin</span>\n }\n </span>\n }\n </div>\n @if (\n subscription.is_subscription_owner ||\n subscription.is_subscription_admin\n ) {\n <div class=\"footer-actions d-flex flex-wrap align-items-center justify-content-end gap-2\">\n <!-- Secondary products only: the primary goes with the whole subscription -->\n @if (\n subscription.products.length > 1 &&\n !product.is_primary_product &&\n !product?.deleted\n ) {\n <span [pTooltip]=\"product.required_by_product_ids?.length ? ('User.Subscriptions.Tooltip.ProductRequired' | transloco) : ''\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <button type=\"button\"\n class=\"btn btn-outline-danger btn-sm\"\n [disabled]=\"product.required_by_product_ids?.length\"\n (click)=\"deleteProduct(subscription, product)\">\n {{ 'User.Subscriptions.DeleteProduct' | transloco }}\n </button>\n </span>\n }\n @if (product.stripe_plan_id && product.active) {\n <!-- Upgrade (single primary CTA) -->\n @if (product.trial_subscription && !product.deleted) {\n <button class=\"btn btn-primary btn-sm\"\n (click)=\"attemptUpgrade(subscription, product)\">\n {{ 'Button.Upgrade' | transloco }}\n </button>\n }\n <!-- Subscribe -->\n @if (subscription.expired && product.stripe_plan_id) {\n <button class=\"btn btn-primary btn-sm\"\n [routerLink]=\"'/account/subscriptions/add-new'\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </button>\n }\n }\n <!-- Privacy & Terms of Service (quiet link, not a button) -->\n @if (product?.product_privacy_service_id) {\n <button class=\"btn btn-link btn-sm p-0 footer-tos-link\"\n (click)=\"showPrivacyAndTos(product)\">\n {{\n 'User.Subscriptions.PrivacyAndTermsOfService'\n | transloco\n }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if (subscription.products.length === 0) {\n <div>\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <p class=\"text-center\">\n No product available for this subscription\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n @if (!editing && !isAddNew && !isUpdatePayment) {\n <div class=\"col-12\"\n >\n @if (subscribedSubscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any subscription.\"\n >\n </pw-no-data>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n <!-- Danger zone (demoted account deletion) -->\n @if (!editing && !isAddNew && !isUpdatePayment && isLoaded) {\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"danger-zone mt-4\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger danger-zone__action\"\n (click)=\"showModalForAccountDeletion()\"\n [pTooltip]=\"'User.Account.Tooltip.DeleteAccount' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Account.DeleteAccount' | transloco }}\n </button>\n </div>\n </div>\n </div>\n }\n <!--\n Add New Subscription\n -->\n <!-- <ng-template [ngIf]=\"isAddNew && !isUpdatePayment\">\n <pw-subscription-details></pw-subscription-details>\n</ng-template> -->\n<!--\nValidate Password For Account Delete\n-->\n<pw-password-validation #passwordValidationModalForAccountDelete\n [destructive]=\"true\"\n (successEvent)=\"deleteUser($event)\">\n</pw-password-validation>\n<!--\nValidate Password For Display Key\n-->\n<pw-password-validation #passwordValidationModalForKey\n (successEvent)=\"displayApiKey()\">\n</pw-password-validation>\n<pw-subscription-removal [user]=\"user\" (removed)=\"onRemoved()\"></pw-subscription-removal>\n}\n\n@if (showTos) {\n <pw-privacy-and-tos [productId]=\"productId\"></pw-privacy-and-tos>\n}\n\n<router-outlet></router-outlet>\n",
|
|
3939
4137
|
styles: [".btn-list{bottom:24px;left:0;padding:0 38px;right:0}.shadow-md{padding-bottom:70px!important}.bg-dark{border:0}.subscription-details{background:#fff;border:1px solid #e2e5ea;border-radius:12px;padding:16px 16px 6px;font-size:14px;font-variant-numeric:tabular-nums}.subscription-summary{border-bottom:1px solid #eef0f3;padding-bottom:12px}.seats-usage{display:inline-block;width:120px;height:6px;margin-left:8px;border-radius:999px;vertical-align:middle;overflow:hidden;background:linear-gradient(#5a6473,#5a6473) left/calc(var(--seats-pct, 0) * 100%) 100% no-repeat,#e2e5ea}.subscription-products-cards{padding-bottom:0!important}.subscription-products-cards .card-footer{position:static!important}.subscription-products-cards.card{background:#f7f8fa;border:1px solid #eef0f3;border-radius:8px;box-shadow:none!important;font-size:14px}.card-footer{background:transparent;border-top:1px solid #eef0f3}.card-footer .footer-note{color:#5a6473;font-size:.875rem}.card-footer .footer-tos-link{color:#5a6473;font-weight:500;text-decoration:underline}.card-footer .footer-tos-link:hover{color:var(--first)}.badge{font-weight:600;border-radius:4px}.badge.bg-success{background-color:#e6f4ec!important;color:#0f6b3a!important}.badge.bg-danger{background-color:#fbeae8!important;color:#c0392b!important}.badge.bg-warning{background-color:#fbf1e3!important;color:#8a5a00!important}.badge.bg-grey,.badge.bg-role-admin{background-color:#eef0f3!important;color:#5a6473!important}code{color:var(--text);min-width:0}.danger-zone{border-top:1px solid #e2e5ea;padding-top:16px;text-align:right}\n"]
|
|
3940
4138
|
}]
|
|
3941
4139
|
}],
|
|
3942
4140
|
ctorParameters: () => [
|
|
3943
|
-
{ type: i3.SubscriptionService },
|
|
4141
|
+
{ type: i3$2.SubscriptionService },
|
|
3944
4142
|
{ type: i2$1.AdminService },
|
|
3945
|
-
{ type:
|
|
3946
|
-
{ type: i4$2.Store },
|
|
3947
|
-
{ type: i5$1.Clipboard },
|
|
4143
|
+
{ type: i3.Clipboard },
|
|
3948
4144
|
{ type: i0.Injector },
|
|
3949
4145
|
{ type: i0.ChangeDetectorRef },
|
|
3950
4146
|
{ type: i2$3.ConfirmDialogService }
|
|
@@ -3966,13 +4162,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3966
4162
|
type: ViewChild,
|
|
3967
4163
|
args: ["passwordValidationModalForKey", { static: false }]
|
|
3968
4164
|
}],
|
|
3969
|
-
|
|
3970
|
-
type: ViewChild,
|
|
3971
|
-
args: ["passwordValidationForUnsubscribe", { static: false }]
|
|
3972
|
-
}],
|
|
3973
|
-
cancelSubscriptionModal: [{
|
|
4165
|
+
removal: [{
|
|
3974
4166
|
type: ViewChild,
|
|
3975
|
-
args: [
|
|
4167
|
+
args: [SubscriptionRemovalComponent, { static: false }]
|
|
3976
4168
|
}]
|
|
3977
4169
|
}
|
|
3978
4170
|
});
|
|
@@ -4035,7 +4227,7 @@ var UserInvoiceComponent = class UserInvoiceComponent extends AppBaseComponent {
|
|
|
4035
4227
|
static {
|
|
4036
4228
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
4037
4229
|
minVersion: "12.0.0",
|
|
4038
|
-
version: "22.2.
|
|
4230
|
+
version: "22.2.3",
|
|
4039
4231
|
ngImport: i0,
|
|
4040
4232
|
type: UserInvoiceComponent,
|
|
4041
4233
|
deps: [{ token: i0.Injector }, { token: i0.ChangeDetectorRef }],
|
|
@@ -4045,7 +4237,7 @@ var UserInvoiceComponent = class UserInvoiceComponent extends AppBaseComponent {
|
|
|
4045
4237
|
static {
|
|
4046
4238
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
4047
4239
|
minVersion: "17.0.0",
|
|
4048
|
-
version: "22.2.
|
|
4240
|
+
version: "22.2.3",
|
|
4049
4241
|
type: UserInvoiceComponent,
|
|
4050
4242
|
isStandalone: false,
|
|
4051
4243
|
selector: "pw-user-invoice",
|
|
@@ -4070,7 +4262,7 @@ var UserInvoiceComponent = class UserInvoiceComponent extends AppBaseComponent {
|
|
|
4070
4262
|
},
|
|
4071
4263
|
{
|
|
4072
4264
|
kind: "component",
|
|
4073
|
-
type: i5$
|
|
4265
|
+
type: i5$1.SkeletonTableComponent,
|
|
4074
4266
|
selector: "pw-skeleton-table",
|
|
4075
4267
|
inputs: [
|
|
4076
4268
|
"rows",
|
|
@@ -4283,7 +4475,7 @@ var UserInvoiceComponent = class UserInvoiceComponent extends AppBaseComponent {
|
|
|
4283
4475
|
};
|
|
4284
4476
|
i0.ɵɵngDeclareClassMetadata({
|
|
4285
4477
|
minVersion: "12.0.0",
|
|
4286
|
-
version: "22.2.
|
|
4478
|
+
version: "22.2.3",
|
|
4287
4479
|
ngImport: i0,
|
|
4288
4480
|
type: UserInvoiceComponent,
|
|
4289
4481
|
decorators: [{
|
|
@@ -4316,17 +4508,17 @@ var AiKnowledgeTabComponent = class AiKnowledgeTabComponent {
|
|
|
4316
4508
|
static {
|
|
4317
4509
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
4318
4510
|
minVersion: "12.0.0",
|
|
4319
|
-
version: "22.2.
|
|
4511
|
+
version: "22.2.3",
|
|
4320
4512
|
ngImport: i0,
|
|
4321
4513
|
type: AiKnowledgeTabComponent,
|
|
4322
|
-
deps: [{ token: i3.PermissionService }],
|
|
4514
|
+
deps: [{ token: i3$2.PermissionService }],
|
|
4323
4515
|
target: i0.ɵɵFactoryTarget.Component
|
|
4324
4516
|
});
|
|
4325
4517
|
}
|
|
4326
4518
|
static {
|
|
4327
4519
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
4328
4520
|
minVersion: "17.0.0",
|
|
4329
|
-
version: "22.2.
|
|
4521
|
+
version: "22.2.3",
|
|
4330
4522
|
type: AiKnowledgeTabComponent,
|
|
4331
4523
|
isStandalone: false,
|
|
4332
4524
|
selector: "pw-ai-knowledge-tab",
|
|
@@ -4335,7 +4527,7 @@ var AiKnowledgeTabComponent = class AiKnowledgeTabComponent {
|
|
|
4335
4527
|
dependencies: [
|
|
4336
4528
|
{
|
|
4337
4529
|
kind: "component",
|
|
4338
|
-
type: i5$
|
|
4530
|
+
type: i5$1.AppLoaderComponent,
|
|
4339
4531
|
selector: "pw-loader",
|
|
4340
4532
|
inputs: [
|
|
4341
4533
|
"isVisible",
|
|
@@ -4375,7 +4567,7 @@ var AiKnowledgeTabComponent = class AiKnowledgeTabComponent {
|
|
|
4375
4567
|
};
|
|
4376
4568
|
i0.ɵɵngDeclareClassMetadata({
|
|
4377
4569
|
minVersion: "12.0.0",
|
|
4378
|
-
version: "22.2.
|
|
4570
|
+
version: "22.2.3",
|
|
4379
4571
|
ngImport: i0,
|
|
4380
4572
|
type: AiKnowledgeTabComponent,
|
|
4381
4573
|
decorators: [{
|
|
@@ -4386,7 +4578,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4386
4578
|
template: "@if (!ready) {\n <pw-loader [isVisible]=\"true\"></pw-loader>\n} @else if (!isAlpha) {\n <pw-no-data [withImage]=\"true\" [message]=\"'AiKnowledge.NotAvailable' | transloco\"></pw-no-data>\n} @else if (subscription) {\n <pw-ai-knowledge scope=\"personal\"\n [subscriptionId]=\"subscription.id\"\n [subscriptionName]=\"subscription.organisation\"\n [useOwnData]=\"useOwnData\"></pw-ai-knowledge>\n} @else {\n <pw-no-data [withImage]=\"true\" [message]=\"'AiKnowledge.NoSubscription' | transloco\"></pw-no-data>\n}\n"
|
|
4387
4579
|
}]
|
|
4388
4580
|
}],
|
|
4389
|
-
ctorParameters: () => [{ type: i3.PermissionService }]
|
|
4581
|
+
ctorParameters: () => [{ type: i3$2.PermissionService }]
|
|
4390
4582
|
});
|
|
4391
4583
|
var CommunicationTabComponent = class CommunicationTabComponent extends AppBaseComponent {
|
|
4392
4584
|
constructor(commonService, profileService, store, injector, cdr) {
|
|
@@ -4447,13 +4639,13 @@ var CommunicationTabComponent = class CommunicationTabComponent extends AppBaseC
|
|
|
4447
4639
|
static {
|
|
4448
4640
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
4449
4641
|
minVersion: "12.0.0",
|
|
4450
|
-
version: "22.2.
|
|
4642
|
+
version: "22.2.3",
|
|
4451
4643
|
ngImport: i0,
|
|
4452
4644
|
type: CommunicationTabComponent,
|
|
4453
4645
|
deps: [
|
|
4454
|
-
{ token: i3.CommonService },
|
|
4455
|
-
{ token: i3.ProfileService },
|
|
4456
|
-
{ token:
|
|
4646
|
+
{ token: i3$2.CommonService },
|
|
4647
|
+
{ token: i3$2.ProfileService },
|
|
4648
|
+
{ token: i3$1.Store },
|
|
4457
4649
|
{ token: i0.Injector },
|
|
4458
4650
|
{ token: i0.ChangeDetectorRef }
|
|
4459
4651
|
],
|
|
@@ -4463,7 +4655,7 @@ var CommunicationTabComponent = class CommunicationTabComponent extends AppBaseC
|
|
|
4463
4655
|
static {
|
|
4464
4656
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
4465
4657
|
minVersion: "17.0.0",
|
|
4466
|
-
version: "22.2.
|
|
4658
|
+
version: "22.2.3",
|
|
4467
4659
|
type: CommunicationTabComponent,
|
|
4468
4660
|
isStandalone: false,
|
|
4469
4661
|
selector: "pw-communication-tab",
|
|
@@ -4535,7 +4727,7 @@ var CommunicationTabComponent = class CommunicationTabComponent extends AppBaseC
|
|
|
4535
4727
|
};
|
|
4536
4728
|
i0.ɵɵngDeclareClassMetadata({
|
|
4537
4729
|
minVersion: "12.0.0",
|
|
4538
|
-
version: "22.2.
|
|
4730
|
+
version: "22.2.3",
|
|
4539
4731
|
ngImport: i0,
|
|
4540
4732
|
type: CommunicationTabComponent,
|
|
4541
4733
|
decorators: [{
|
|
@@ -4548,9 +4740,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4548
4740
|
}]
|
|
4549
4741
|
}],
|
|
4550
4742
|
ctorParameters: () => [
|
|
4551
|
-
{ type: i3.CommonService },
|
|
4552
|
-
{ type: i3.ProfileService },
|
|
4553
|
-
{ type:
|
|
4743
|
+
{ type: i3$2.CommonService },
|
|
4744
|
+
{ type: i3$2.ProfileService },
|
|
4745
|
+
{ type: i3$1.Store },
|
|
4554
4746
|
{ type: i0.Injector },
|
|
4555
4747
|
{ type: i0.ChangeDetectorRef }
|
|
4556
4748
|
]
|
|
@@ -4611,11 +4803,11 @@ var OthersTabComponent = class OthersTabComponent extends AppBaseComponent {
|
|
|
4611
4803
|
static {
|
|
4612
4804
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
4613
4805
|
minVersion: "12.0.0",
|
|
4614
|
-
version: "22.2.
|
|
4806
|
+
version: "22.2.3",
|
|
4615
4807
|
ngImport: i0,
|
|
4616
4808
|
type: OthersTabComponent,
|
|
4617
4809
|
deps: [
|
|
4618
|
-
{ token: i3.CommonService },
|
|
4810
|
+
{ token: i3$2.CommonService },
|
|
4619
4811
|
{ token: i0.Injector },
|
|
4620
4812
|
{ token: i0.ChangeDetectorRef }
|
|
4621
4813
|
],
|
|
@@ -4625,7 +4817,7 @@ var OthersTabComponent = class OthersTabComponent extends AppBaseComponent {
|
|
|
4625
4817
|
static {
|
|
4626
4818
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
4627
4819
|
minVersion: "17.0.0",
|
|
4628
|
-
version: "22.2.
|
|
4820
|
+
version: "22.2.3",
|
|
4629
4821
|
type: OthersTabComponent,
|
|
4630
4822
|
isStandalone: false,
|
|
4631
4823
|
selector: "pw-others-tab",
|
|
@@ -4696,7 +4888,7 @@ var OthersTabComponent = class OthersTabComponent extends AppBaseComponent {
|
|
|
4696
4888
|
};
|
|
4697
4889
|
i0.ɵɵngDeclareClassMetadata({
|
|
4698
4890
|
minVersion: "12.0.0",
|
|
4699
|
-
version: "22.2.
|
|
4891
|
+
version: "22.2.3",
|
|
4700
4892
|
ngImport: i0,
|
|
4701
4893
|
type: OthersTabComponent,
|
|
4702
4894
|
decorators: [{
|
|
@@ -4708,7 +4900,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4708
4900
|
}]
|
|
4709
4901
|
}],
|
|
4710
4902
|
ctorParameters: () => [
|
|
4711
|
-
{ type: i3.CommonService },
|
|
4903
|
+
{ type: i3$2.CommonService },
|
|
4712
4904
|
{ type: i0.Injector },
|
|
4713
4905
|
{ type: i0.ChangeDetectorRef }
|
|
4714
4906
|
]
|
|
@@ -4824,7 +5016,7 @@ var SecurityTabComponent = class SecurityTabComponent extends AppBaseComponent {
|
|
|
4824
5016
|
static {
|
|
4825
5017
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
4826
5018
|
minVersion: "12.0.0",
|
|
4827
|
-
version: "22.2.
|
|
5019
|
+
version: "22.2.3",
|
|
4828
5020
|
ngImport: i0,
|
|
4829
5021
|
type: SecurityTabComponent,
|
|
4830
5022
|
deps: [{ token: i0.Injector }, { token: i0.ChangeDetectorRef }],
|
|
@@ -4834,7 +5026,7 @@ var SecurityTabComponent = class SecurityTabComponent extends AppBaseComponent {
|
|
|
4834
5026
|
static {
|
|
4835
5027
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
4836
5028
|
minVersion: "17.0.0",
|
|
4837
|
-
version: "22.2.
|
|
5029
|
+
version: "22.2.3",
|
|
4838
5030
|
type: SecurityTabComponent,
|
|
4839
5031
|
isStandalone: false,
|
|
4840
5032
|
selector: "pw-security-tab",
|
|
@@ -4909,7 +5101,7 @@ var SecurityTabComponent = class SecurityTabComponent extends AppBaseComponent {
|
|
|
4909
5101
|
};
|
|
4910
5102
|
i0.ɵɵngDeclareClassMetadata({
|
|
4911
5103
|
minVersion: "12.0.0",
|
|
4912
|
-
version: "22.2.
|
|
5104
|
+
version: "22.2.3",
|
|
4913
5105
|
ngImport: i0,
|
|
4914
5106
|
type: SecurityTabComponent,
|
|
4915
5107
|
decorators: [{
|
|
@@ -4976,17 +5168,17 @@ var SettingsComponent = class SettingsComponent {
|
|
|
4976
5168
|
static {
|
|
4977
5169
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
4978
5170
|
minVersion: "12.0.0",
|
|
4979
|
-
version: "22.2.
|
|
5171
|
+
version: "22.2.3",
|
|
4980
5172
|
ngImport: i0,
|
|
4981
5173
|
type: SettingsComponent,
|
|
4982
|
-
deps: [{ token: i1$2.Router }, { token: i3.PermissionService }],
|
|
5174
|
+
deps: [{ token: i1$2.Router }, { token: i3$2.PermissionService }],
|
|
4983
5175
|
target: i0.ɵɵFactoryTarget.Component
|
|
4984
5176
|
});
|
|
4985
5177
|
}
|
|
4986
5178
|
static {
|
|
4987
5179
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
4988
5180
|
minVersion: "14.0.0",
|
|
4989
|
-
version: "22.2.
|
|
5181
|
+
version: "22.2.3",
|
|
4990
5182
|
type: SettingsComponent,
|
|
4991
5183
|
isStandalone: false,
|
|
4992
5184
|
selector: "pw-settings",
|
|
@@ -5010,7 +5202,7 @@ var SettingsComponent = class SettingsComponent {
|
|
|
5010
5202
|
};
|
|
5011
5203
|
i0.ɵɵngDeclareClassMetadata({
|
|
5012
5204
|
minVersion: "12.0.0",
|
|
5013
|
-
version: "22.2.
|
|
5205
|
+
version: "22.2.3",
|
|
5014
5206
|
ngImport: i0,
|
|
5015
5207
|
type: SettingsComponent,
|
|
5016
5208
|
decorators: [{
|
|
@@ -5021,7 +5213,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5021
5213
|
template: "<pw-tabs [items]=\"items\"></pw-tabs>\n"
|
|
5022
5214
|
}]
|
|
5023
5215
|
}],
|
|
5024
|
-
ctorParameters: () => [{ type: i1$2.Router }, { type: i3.PermissionService }],
|
|
5216
|
+
ctorParameters: () => [{ type: i1$2.Router }, { type: i3$2.PermissionService }],
|
|
5025
5217
|
propDecorators: { menu: [{
|
|
5026
5218
|
type: ViewChild,
|
|
5027
5219
|
args: ["menuItems", { static: true }]
|
|
@@ -5053,12 +5245,12 @@ var SupportComponent = class SupportComponent extends AppBaseComponent {
|
|
|
5053
5245
|
static {
|
|
5054
5246
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
5055
5247
|
minVersion: "12.0.0",
|
|
5056
|
-
version: "22.2.
|
|
5248
|
+
version: "22.2.3",
|
|
5057
5249
|
ngImport: i0,
|
|
5058
5250
|
type: SupportComponent,
|
|
5059
5251
|
deps: [
|
|
5060
5252
|
{ token: i0.Injector },
|
|
5061
|
-
{ token: i3.CommonService },
|
|
5253
|
+
{ token: i3$2.CommonService },
|
|
5062
5254
|
{ token: i0.ChangeDetectorRef }
|
|
5063
5255
|
],
|
|
5064
5256
|
target: i0.ɵɵFactoryTarget.Component
|
|
@@ -5067,7 +5259,7 @@ var SupportComponent = class SupportComponent extends AppBaseComponent {
|
|
|
5067
5259
|
static {
|
|
5068
5260
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
5069
5261
|
minVersion: "17.0.0",
|
|
5070
|
-
version: "22.2.
|
|
5262
|
+
version: "22.2.3",
|
|
5071
5263
|
type: SupportComponent,
|
|
5072
5264
|
isStandalone: false,
|
|
5073
5265
|
selector: "pw-support",
|
|
@@ -5170,7 +5362,7 @@ var SupportComponent = class SupportComponent extends AppBaseComponent {
|
|
|
5170
5362
|
};
|
|
5171
5363
|
i0.ɵɵngDeclareClassMetadata({
|
|
5172
5364
|
minVersion: "12.0.0",
|
|
5173
|
-
version: "22.2.
|
|
5365
|
+
version: "22.2.3",
|
|
5174
5366
|
ngImport: i0,
|
|
5175
5367
|
type: SupportComponent,
|
|
5176
5368
|
decorators: [{
|
|
@@ -5184,7 +5376,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5184
5376
|
}],
|
|
5185
5377
|
ctorParameters: () => [
|
|
5186
5378
|
{ type: i0.Injector },
|
|
5187
|
-
{ type: i3.CommonService },
|
|
5379
|
+
{ type: i3$2.CommonService },
|
|
5188
5380
|
{ type: i0.ChangeDetectorRef }
|
|
5189
5381
|
]
|
|
5190
5382
|
});
|
|
@@ -5263,13 +5455,13 @@ var SupportDetailsComponent = class SupportDetailsComponent extends AppBaseCompo
|
|
|
5263
5455
|
static {
|
|
5264
5456
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
5265
5457
|
minVersion: "12.0.0",
|
|
5266
|
-
version: "22.2.
|
|
5458
|
+
version: "22.2.3",
|
|
5267
5459
|
ngImport: i0,
|
|
5268
5460
|
type: SupportDetailsComponent,
|
|
5269
5461
|
deps: [
|
|
5270
5462
|
{ token: i0.Injector },
|
|
5271
|
-
{ token: i3.CommonService },
|
|
5272
|
-
{ token: i3.AuthService },
|
|
5463
|
+
{ token: i3$2.CommonService },
|
|
5464
|
+
{ token: i3$2.AuthService },
|
|
5273
5465
|
{ token: i0.Renderer2 },
|
|
5274
5466
|
{ token: i0.ElementRef },
|
|
5275
5467
|
{ token: i0.ChangeDetectorRef }
|
|
@@ -5280,7 +5472,7 @@ var SupportDetailsComponent = class SupportDetailsComponent extends AppBaseCompo
|
|
|
5280
5472
|
static {
|
|
5281
5473
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
5282
5474
|
minVersion: "17.0.0",
|
|
5283
|
-
version: "22.2.
|
|
5475
|
+
version: "22.2.3",
|
|
5284
5476
|
type: SupportDetailsComponent,
|
|
5285
5477
|
isStandalone: false,
|
|
5286
5478
|
selector: "pw-support-details",
|
|
@@ -5459,7 +5651,7 @@ var SupportDetailsComponent = class SupportDetailsComponent extends AppBaseCompo
|
|
|
5459
5651
|
__decorate([ValidateForm("form")], SupportDetailsComponent.prototype, "onSave", null);
|
|
5460
5652
|
i0.ɵɵngDeclareClassMetadata({
|
|
5461
5653
|
minVersion: "12.0.0",
|
|
5462
|
-
version: "22.2.
|
|
5654
|
+
version: "22.2.3",
|
|
5463
5655
|
ngImport: i0,
|
|
5464
5656
|
type: SupportDetailsComponent,
|
|
5465
5657
|
decorators: [{
|
|
@@ -5473,8 +5665,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5473
5665
|
}],
|
|
5474
5666
|
ctorParameters: () => [
|
|
5475
5667
|
{ type: i0.Injector },
|
|
5476
|
-
{ type: i3.CommonService },
|
|
5477
|
-
{ type: i3.AuthService },
|
|
5668
|
+
{ type: i3$2.CommonService },
|
|
5669
|
+
{ type: i3$2.AuthService },
|
|
5478
5670
|
{ type: i0.Renderer2 },
|
|
5479
5671
|
{ type: i0.ElementRef },
|
|
5480
5672
|
{ type: i0.ChangeDetectorRef }
|
|
@@ -5557,12 +5749,12 @@ var EditPortfoliosComponent = class EditPortfoliosComponent {
|
|
|
5557
5749
|
static {
|
|
5558
5750
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
5559
5751
|
minVersion: "12.0.0",
|
|
5560
|
-
version: "22.2.
|
|
5752
|
+
version: "22.2.3",
|
|
5561
5753
|
ngImport: i0,
|
|
5562
5754
|
type: EditPortfoliosComponent,
|
|
5563
5755
|
deps: [
|
|
5564
5756
|
{ token: i2$2.NgbModal },
|
|
5565
|
-
{ token: i3.ProfileService },
|
|
5757
|
+
{ token: i3$2.ProfileService },
|
|
5566
5758
|
{ token: i0.ChangeDetectorRef }
|
|
5567
5759
|
],
|
|
5568
5760
|
target: i0.ɵɵFactoryTarget.Component
|
|
@@ -5571,7 +5763,7 @@ var EditPortfoliosComponent = class EditPortfoliosComponent {
|
|
|
5571
5763
|
static {
|
|
5572
5764
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
5573
5765
|
minVersion: "17.0.0",
|
|
5574
|
-
version: "22.2.
|
|
5766
|
+
version: "22.2.3",
|
|
5575
5767
|
type: EditPortfoliosComponent,
|
|
5576
5768
|
isStandalone: false,
|
|
5577
5769
|
selector: "pw-edit-portfolios",
|
|
@@ -5671,7 +5863,7 @@ var EditPortfoliosComponent = class EditPortfoliosComponent {
|
|
|
5671
5863
|
};
|
|
5672
5864
|
i0.ɵɵngDeclareClassMetadata({
|
|
5673
5865
|
minVersion: "12.0.0",
|
|
5674
|
-
version: "22.2.
|
|
5866
|
+
version: "22.2.3",
|
|
5675
5867
|
ngImport: i0,
|
|
5676
5868
|
type: EditPortfoliosComponent,
|
|
5677
5869
|
decorators: [{
|
|
@@ -5685,7 +5877,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5685
5877
|
}],
|
|
5686
5878
|
ctorParameters: () => [
|
|
5687
5879
|
{ type: i2$2.NgbModal },
|
|
5688
|
-
{ type: i3.ProfileService },
|
|
5880
|
+
{ type: i3$2.ProfileService },
|
|
5689
5881
|
{ type: i0.ChangeDetectorRef }
|
|
5690
5882
|
],
|
|
5691
5883
|
propDecorators: {
|
|
@@ -5799,13 +5991,13 @@ var EditProjectModalComponent = class EditProjectModalComponent extends AppBaseC
|
|
|
5799
5991
|
static {
|
|
5800
5992
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
5801
5993
|
minVersion: "12.0.0",
|
|
5802
|
-
version: "22.2.
|
|
5994
|
+
version: "22.2.3",
|
|
5803
5995
|
ngImport: i0,
|
|
5804
5996
|
type: EditProjectModalComponent,
|
|
5805
5997
|
deps: [
|
|
5806
5998
|
{ token: i2$2.NgbModal },
|
|
5807
5999
|
{ token: i1$1.UntypedFormBuilder },
|
|
5808
|
-
{ token: i3.ProfileService },
|
|
6000
|
+
{ token: i3$2.ProfileService },
|
|
5809
6001
|
{ token: i0.Injector },
|
|
5810
6002
|
{ token: i0.ChangeDetectorRef }
|
|
5811
6003
|
],
|
|
@@ -5815,7 +6007,7 @@ var EditProjectModalComponent = class EditProjectModalComponent extends AppBaseC
|
|
|
5815
6007
|
static {
|
|
5816
6008
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
5817
6009
|
minVersion: "14.0.0",
|
|
5818
|
-
version: "22.2.
|
|
6010
|
+
version: "22.2.3",
|
|
5819
6011
|
type: EditProjectModalComponent,
|
|
5820
6012
|
isStandalone: false,
|
|
5821
6013
|
selector: "pw-edit-project-modal",
|
|
@@ -6007,7 +6199,7 @@ var EditProjectModalComponent = class EditProjectModalComponent extends AppBaseC
|
|
|
6007
6199
|
__decorate([ValidateForm("form")], EditProjectModalComponent.prototype, "onSaveDetail", null);
|
|
6008
6200
|
i0.ɵɵngDeclareClassMetadata({
|
|
6009
6201
|
minVersion: "12.0.0",
|
|
6010
|
-
version: "22.2.
|
|
6202
|
+
version: "22.2.3",
|
|
6011
6203
|
ngImport: i0,
|
|
6012
6204
|
type: EditProjectModalComponent,
|
|
6013
6205
|
decorators: [{
|
|
@@ -6022,7 +6214,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6022
6214
|
ctorParameters: () => [
|
|
6023
6215
|
{ type: i2$2.NgbModal },
|
|
6024
6216
|
{ type: i1$1.UntypedFormBuilder },
|
|
6025
|
-
{ type: i3.ProfileService },
|
|
6217
|
+
{ type: i3$2.ProfileService },
|
|
6026
6218
|
{ type: i0.Injector },
|
|
6027
6219
|
{ type: i0.ChangeDetectorRef }
|
|
6028
6220
|
],
|
|
@@ -6142,13 +6334,13 @@ var EditQualificationsModalComponent = class EditQualificationsModalComponent ex
|
|
|
6142
6334
|
static {
|
|
6143
6335
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
6144
6336
|
minVersion: "12.0.0",
|
|
6145
|
-
version: "22.2.
|
|
6337
|
+
version: "22.2.3",
|
|
6146
6338
|
ngImport: i0,
|
|
6147
6339
|
type: EditQualificationsModalComponent,
|
|
6148
6340
|
deps: [
|
|
6149
6341
|
{ token: i2$2.NgbModal },
|
|
6150
6342
|
{ token: i1$1.UntypedFormBuilder },
|
|
6151
|
-
{ token: i3.QualificationService },
|
|
6343
|
+
{ token: i3$2.QualificationService },
|
|
6152
6344
|
{ token: i0.Injector },
|
|
6153
6345
|
{ token: i0.ChangeDetectorRef }
|
|
6154
6346
|
],
|
|
@@ -6158,7 +6350,7 @@ var EditQualificationsModalComponent = class EditQualificationsModalComponent ex
|
|
|
6158
6350
|
static {
|
|
6159
6351
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
6160
6352
|
minVersion: "14.0.0",
|
|
6161
|
-
version: "22.2.
|
|
6353
|
+
version: "22.2.3",
|
|
6162
6354
|
type: EditQualificationsModalComponent,
|
|
6163
6355
|
isStandalone: false,
|
|
6164
6356
|
selector: "pw-edit-qualifications-modal",
|
|
@@ -6408,7 +6600,7 @@ var EditQualificationsModalComponent = class EditQualificationsModalComponent ex
|
|
|
6408
6600
|
__decorate([ValidateForm("form")], EditQualificationsModalComponent.prototype, "onSaveDetail", null);
|
|
6409
6601
|
i0.ɵɵngDeclareClassMetadata({
|
|
6410
6602
|
minVersion: "12.0.0",
|
|
6411
|
-
version: "22.2.
|
|
6603
|
+
version: "22.2.3",
|
|
6412
6604
|
ngImport: i0,
|
|
6413
6605
|
type: EditQualificationsModalComponent,
|
|
6414
6606
|
decorators: [{
|
|
@@ -6423,7 +6615,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6423
6615
|
ctorParameters: () => [
|
|
6424
6616
|
{ type: i2$2.NgbModal },
|
|
6425
6617
|
{ type: i1$1.UntypedFormBuilder },
|
|
6426
|
-
{ type: i3.QualificationService },
|
|
6618
|
+
{ type: i3$2.QualificationService },
|
|
6427
6619
|
{ type: i0.Injector },
|
|
6428
6620
|
{ type: i0.ChangeDetectorRef }
|
|
6429
6621
|
],
|
|
@@ -6483,13 +6675,13 @@ var EditRecommendationModalComponent = class EditRecommendationModalComponent {
|
|
|
6483
6675
|
static {
|
|
6484
6676
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
6485
6677
|
minVersion: "12.0.0",
|
|
6486
|
-
version: "22.2.
|
|
6678
|
+
version: "22.2.3",
|
|
6487
6679
|
ngImport: i0,
|
|
6488
6680
|
type: EditRecommendationModalComponent,
|
|
6489
6681
|
deps: [
|
|
6490
6682
|
{ token: i2$2.NgbModal },
|
|
6491
6683
|
{ token: i1$1.UntypedFormBuilder },
|
|
6492
|
-
{ token: i3.ProfileService },
|
|
6684
|
+
{ token: i3$2.ProfileService },
|
|
6493
6685
|
{ token: i0.ChangeDetectorRef }
|
|
6494
6686
|
],
|
|
6495
6687
|
target: i0.ɵɵFactoryTarget.Component
|
|
@@ -6498,7 +6690,7 @@ var EditRecommendationModalComponent = class EditRecommendationModalComponent {
|
|
|
6498
6690
|
static {
|
|
6499
6691
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
6500
6692
|
minVersion: "14.0.0",
|
|
6501
|
-
version: "22.2.
|
|
6693
|
+
version: "22.2.3",
|
|
6502
6694
|
type: EditRecommendationModalComponent,
|
|
6503
6695
|
isStandalone: false,
|
|
6504
6696
|
selector: "pw-edit-recommendation-modal",
|
|
@@ -6614,7 +6806,7 @@ var EditRecommendationModalComponent = class EditRecommendationModalComponent {
|
|
|
6614
6806
|
__decorate([ValidateForm("form")], EditRecommendationModalComponent.prototype, "onSaveDetail", null);
|
|
6615
6807
|
i0.ɵɵngDeclareClassMetadata({
|
|
6616
6808
|
minVersion: "12.0.0",
|
|
6617
|
-
version: "22.2.
|
|
6809
|
+
version: "22.2.3",
|
|
6618
6810
|
ngImport: i0,
|
|
6619
6811
|
type: EditRecommendationModalComponent,
|
|
6620
6812
|
decorators: [{
|
|
@@ -6628,7 +6820,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6628
6820
|
ctorParameters: () => [
|
|
6629
6821
|
{ type: i2$2.NgbModal },
|
|
6630
6822
|
{ type: i1$1.UntypedFormBuilder },
|
|
6631
|
-
{ type: i3.ProfileService },
|
|
6823
|
+
{ type: i3$2.ProfileService },
|
|
6632
6824
|
{ type: i0.ChangeDetectorRef }
|
|
6633
6825
|
],
|
|
6634
6826
|
propDecorators: {
|
|
@@ -6715,12 +6907,12 @@ var EditSkillsModalComponent = class EditSkillsModalComponent extends AppBaseCom
|
|
|
6715
6907
|
static {
|
|
6716
6908
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
6717
6909
|
minVersion: "12.0.0",
|
|
6718
|
-
version: "22.2.
|
|
6910
|
+
version: "22.2.3",
|
|
6719
6911
|
ngImport: i0,
|
|
6720
6912
|
type: EditSkillsModalComponent,
|
|
6721
6913
|
deps: [
|
|
6722
6914
|
{ token: i2$2.NgbModal },
|
|
6723
|
-
{ token: i3.TagService },
|
|
6915
|
+
{ token: i3$2.TagService },
|
|
6724
6916
|
{ token: i0.Injector },
|
|
6725
6917
|
{ token: i0.ChangeDetectorRef }
|
|
6726
6918
|
],
|
|
@@ -6730,7 +6922,7 @@ var EditSkillsModalComponent = class EditSkillsModalComponent extends AppBaseCom
|
|
|
6730
6922
|
static {
|
|
6731
6923
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
6732
6924
|
minVersion: "14.0.0",
|
|
6733
|
-
version: "22.2.
|
|
6925
|
+
version: "22.2.3",
|
|
6734
6926
|
type: EditSkillsModalComponent,
|
|
6735
6927
|
isStandalone: false,
|
|
6736
6928
|
selector: "pw-edit-skills-modal",
|
|
@@ -6861,7 +7053,7 @@ var EditSkillsModalComponent = class EditSkillsModalComponent extends AppBaseCom
|
|
|
6861
7053
|
};
|
|
6862
7054
|
i0.ɵɵngDeclareClassMetadata({
|
|
6863
7055
|
minVersion: "12.0.0",
|
|
6864
|
-
version: "22.2.
|
|
7056
|
+
version: "22.2.3",
|
|
6865
7057
|
ngImport: i0,
|
|
6866
7058
|
type: EditSkillsModalComponent,
|
|
6867
7059
|
decorators: [{
|
|
@@ -6874,7 +7066,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6874
7066
|
}],
|
|
6875
7067
|
ctorParameters: () => [
|
|
6876
7068
|
{ type: i2$2.NgbModal },
|
|
6877
|
-
{ type: i3.TagService },
|
|
7069
|
+
{ type: i3$2.TagService },
|
|
6878
7070
|
{ type: i0.Injector },
|
|
6879
7071
|
{ type: i0.ChangeDetectorRef }
|
|
6880
7072
|
],
|
|
@@ -6998,14 +7190,14 @@ var EditSocialLinksComponent = class EditSocialLinksComponent extends AppBaseCom
|
|
|
6998
7190
|
static {
|
|
6999
7191
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
7000
7192
|
minVersion: "12.0.0",
|
|
7001
|
-
version: "22.2.
|
|
7193
|
+
version: "22.2.3",
|
|
7002
7194
|
ngImport: i0,
|
|
7003
7195
|
type: EditSocialLinksComponent,
|
|
7004
7196
|
deps: [
|
|
7005
7197
|
{ token: i0.Injector },
|
|
7006
7198
|
{ token: i2$2.NgbModal },
|
|
7007
7199
|
{ token: i1$1.UntypedFormBuilder },
|
|
7008
|
-
{ token: i3.ProfileService },
|
|
7200
|
+
{ token: i3$2.ProfileService },
|
|
7009
7201
|
{ token: i0.ChangeDetectorRef }
|
|
7010
7202
|
],
|
|
7011
7203
|
target: i0.ɵɵFactoryTarget.Component
|
|
@@ -7014,7 +7206,7 @@ var EditSocialLinksComponent = class EditSocialLinksComponent extends AppBaseCom
|
|
|
7014
7206
|
static {
|
|
7015
7207
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
7016
7208
|
minVersion: "17.0.0",
|
|
7017
|
-
version: "22.2.
|
|
7209
|
+
version: "22.2.3",
|
|
7018
7210
|
type: EditSocialLinksComponent,
|
|
7019
7211
|
isStandalone: false,
|
|
7020
7212
|
selector: "pw-edit-social-links",
|
|
@@ -7102,7 +7294,7 @@ var EditSocialLinksComponent = class EditSocialLinksComponent extends AppBaseCom
|
|
|
7102
7294
|
__decorate([ValidateForm("form")], EditSocialLinksComponent.prototype, "onSaveDetail", null);
|
|
7103
7295
|
i0.ɵɵngDeclareClassMetadata({
|
|
7104
7296
|
minVersion: "12.0.0",
|
|
7105
|
-
version: "22.2.
|
|
7297
|
+
version: "22.2.3",
|
|
7106
7298
|
ngImport: i0,
|
|
7107
7299
|
type: EditSocialLinksComponent,
|
|
7108
7300
|
decorators: [{
|
|
@@ -7118,7 +7310,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7118
7310
|
{ type: i0.Injector },
|
|
7119
7311
|
{ type: i2$2.NgbModal },
|
|
7120
7312
|
{ type: i1$1.UntypedFormBuilder },
|
|
7121
|
-
{ type: i3.ProfileService },
|
|
7313
|
+
{ type: i3$2.ProfileService },
|
|
7122
7314
|
{ type: i0.ChangeDetectorRef }
|
|
7123
7315
|
],
|
|
7124
7316
|
propDecorators: {
|
|
@@ -7230,14 +7422,14 @@ var EditUserProfileModalComponent = class EditUserProfileModalComponent extends
|
|
|
7230
7422
|
static {
|
|
7231
7423
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
7232
7424
|
minVersion: "12.0.0",
|
|
7233
|
-
version: "22.2.
|
|
7425
|
+
version: "22.2.3",
|
|
7234
7426
|
ngImport: i0,
|
|
7235
7427
|
type: EditUserProfileModalComponent,
|
|
7236
7428
|
deps: [
|
|
7237
7429
|
{ token: i2$2.NgbModal },
|
|
7238
7430
|
{ token: i1$1.UntypedFormBuilder },
|
|
7239
|
-
{ token: i3.ProfileService },
|
|
7240
|
-
{ token: i3.GeoService },
|
|
7431
|
+
{ token: i3$2.ProfileService },
|
|
7432
|
+
{ token: i3$2.GeoService },
|
|
7241
7433
|
{ token: i0.Injector },
|
|
7242
7434
|
{ token: i0.ChangeDetectorRef }
|
|
7243
7435
|
],
|
|
@@ -7247,7 +7439,7 @@ var EditUserProfileModalComponent = class EditUserProfileModalComponent extends
|
|
|
7247
7439
|
static {
|
|
7248
7440
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
7249
7441
|
minVersion: "17.0.0",
|
|
7250
|
-
version: "22.2.
|
|
7442
|
+
version: "22.2.3",
|
|
7251
7443
|
type: EditUserProfileModalComponent,
|
|
7252
7444
|
isStandalone: false,
|
|
7253
7445
|
selector: "pw-edit-user-profile-modal",
|
|
@@ -7498,7 +7690,7 @@ var EditUserProfileModalComponent = class EditUserProfileModalComponent extends
|
|
|
7498
7690
|
__decorate([ValidateForm("form")], EditUserProfileModalComponent.prototype, "save", null);
|
|
7499
7691
|
i0.ɵɵngDeclareClassMetadata({
|
|
7500
7692
|
minVersion: "12.0.0",
|
|
7501
|
-
version: "22.2.
|
|
7693
|
+
version: "22.2.3",
|
|
7502
7694
|
ngImport: i0,
|
|
7503
7695
|
type: EditUserProfileModalComponent,
|
|
7504
7696
|
decorators: [{
|
|
@@ -7513,8 +7705,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7513
7705
|
ctorParameters: () => [
|
|
7514
7706
|
{ type: i2$2.NgbModal },
|
|
7515
7707
|
{ type: i1$1.UntypedFormBuilder },
|
|
7516
|
-
{ type: i3.ProfileService },
|
|
7517
|
-
{ type: i3.GeoService },
|
|
7708
|
+
{ type: i3$2.ProfileService },
|
|
7709
|
+
{ type: i3$2.GeoService },
|
|
7518
7710
|
{ type: i0.Injector },
|
|
7519
7711
|
{ type: i0.ChangeDetectorRef }
|
|
7520
7712
|
],
|
|
@@ -7631,13 +7823,13 @@ var UserAboutComponent = class UserAboutComponent extends AppBaseComponent {
|
|
|
7631
7823
|
static {
|
|
7632
7824
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
7633
7825
|
minVersion: "12.0.0",
|
|
7634
|
-
version: "22.2.
|
|
7826
|
+
version: "22.2.3",
|
|
7635
7827
|
ngImport: i0,
|
|
7636
7828
|
type: UserAboutComponent,
|
|
7637
7829
|
deps: [
|
|
7638
|
-
{ token: i3.ProfileService },
|
|
7639
|
-
{ token: i3.QualificationService },
|
|
7640
|
-
{ token: i3.TagService },
|
|
7830
|
+
{ token: i3$2.ProfileService },
|
|
7831
|
+
{ token: i3$2.QualificationService },
|
|
7832
|
+
{ token: i3$2.TagService },
|
|
7641
7833
|
{ token: i0.Injector },
|
|
7642
7834
|
{ token: i0.ChangeDetectorRef },
|
|
7643
7835
|
{ token: i2$3.ConfirmDialogService }
|
|
@@ -7648,7 +7840,7 @@ var UserAboutComponent = class UserAboutComponent extends AppBaseComponent {
|
|
|
7648
7840
|
static {
|
|
7649
7841
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
7650
7842
|
minVersion: "17.0.0",
|
|
7651
|
-
version: "22.2.
|
|
7843
|
+
version: "22.2.3",
|
|
7652
7844
|
type: UserAboutComponent,
|
|
7653
7845
|
isStandalone: false,
|
|
7654
7846
|
selector: "pw-user-about",
|
|
@@ -7755,7 +7947,7 @@ var UserAboutComponent = class UserAboutComponent extends AppBaseComponent {
|
|
|
7755
7947
|
};
|
|
7756
7948
|
i0.ɵɵngDeclareClassMetadata({
|
|
7757
7949
|
minVersion: "12.0.0",
|
|
7758
|
-
version: "22.2.
|
|
7950
|
+
version: "22.2.3",
|
|
7759
7951
|
ngImport: i0,
|
|
7760
7952
|
type: UserAboutComponent,
|
|
7761
7953
|
decorators: [{
|
|
@@ -7768,9 +7960,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7768
7960
|
}]
|
|
7769
7961
|
}],
|
|
7770
7962
|
ctorParameters: () => [
|
|
7771
|
-
{ type: i3.ProfileService },
|
|
7772
|
-
{ type: i3.QualificationService },
|
|
7773
|
-
{ type: i3.TagService },
|
|
7963
|
+
{ type: i3$2.ProfileService },
|
|
7964
|
+
{ type: i3$2.QualificationService },
|
|
7965
|
+
{ type: i3$2.TagService },
|
|
7774
7966
|
{ type: i0.Injector },
|
|
7775
7967
|
{ type: i0.ChangeDetectorRef },
|
|
7776
7968
|
{ type: i2$3.ConfirmDialogService }
|
|
@@ -7840,11 +8032,11 @@ var PortfoliosComponent = class PortfoliosComponent {
|
|
|
7840
8032
|
static {
|
|
7841
8033
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
7842
8034
|
minVersion: "12.0.0",
|
|
7843
|
-
version: "22.2.
|
|
8035
|
+
version: "22.2.3",
|
|
7844
8036
|
ngImport: i0,
|
|
7845
8037
|
type: PortfoliosComponent,
|
|
7846
8038
|
deps: [
|
|
7847
|
-
{ token: i3.ProfileService },
|
|
8039
|
+
{ token: i3$2.ProfileService },
|
|
7848
8040
|
{ token: i2$2.NgbModal },
|
|
7849
8041
|
{ token: i0.ChangeDetectorRef }
|
|
7850
8042
|
],
|
|
@@ -7854,7 +8046,7 @@ var PortfoliosComponent = class PortfoliosComponent {
|
|
|
7854
8046
|
static {
|
|
7855
8047
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
7856
8048
|
minVersion: "17.0.0",
|
|
7857
|
-
version: "22.2.
|
|
8049
|
+
version: "22.2.3",
|
|
7858
8050
|
type: PortfoliosComponent,
|
|
7859
8051
|
isStandalone: false,
|
|
7860
8052
|
selector: "pw-portfolios",
|
|
@@ -7901,7 +8093,7 @@ var PortfoliosComponent = class PortfoliosComponent {
|
|
|
7901
8093
|
};
|
|
7902
8094
|
i0.ɵɵngDeclareClassMetadata({
|
|
7903
8095
|
minVersion: "12.0.0",
|
|
7904
|
-
version: "22.2.
|
|
8096
|
+
version: "22.2.3",
|
|
7905
8097
|
ngImport: i0,
|
|
7906
8098
|
type: PortfoliosComponent,
|
|
7907
8099
|
decorators: [{
|
|
@@ -7914,7 +8106,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7914
8106
|
}]
|
|
7915
8107
|
}],
|
|
7916
8108
|
ctorParameters: () => [
|
|
7917
|
-
{ type: i3.ProfileService },
|
|
8109
|
+
{ type: i3$2.ProfileService },
|
|
7918
8110
|
{ type: i2$2.NgbModal },
|
|
7919
8111
|
{ type: i0.ChangeDetectorRef }
|
|
7920
8112
|
],
|
|
@@ -7989,11 +8181,11 @@ var UserProjectsComponent = class UserProjectsComponent extends AppBaseComponent
|
|
|
7989
8181
|
static {
|
|
7990
8182
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
7991
8183
|
minVersion: "12.0.0",
|
|
7992
|
-
version: "22.2.
|
|
8184
|
+
version: "22.2.3",
|
|
7993
8185
|
ngImport: i0,
|
|
7994
8186
|
type: UserProjectsComponent,
|
|
7995
8187
|
deps: [
|
|
7996
|
-
{ token: i3.ProfileService },
|
|
8188
|
+
{ token: i3$2.ProfileService },
|
|
7997
8189
|
{ token: i0.Injector },
|
|
7998
8190
|
{ token: i0.ChangeDetectorRef },
|
|
7999
8191
|
{ token: i2$3.ConfirmDialogService }
|
|
@@ -8004,7 +8196,7 @@ var UserProjectsComponent = class UserProjectsComponent extends AppBaseComponent
|
|
|
8004
8196
|
static {
|
|
8005
8197
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
8006
8198
|
minVersion: "17.0.0",
|
|
8007
|
-
version: "22.2.
|
|
8199
|
+
version: "22.2.3",
|
|
8008
8200
|
type: UserProjectsComponent,
|
|
8009
8201
|
isStandalone: false,
|
|
8010
8202
|
selector: "pw-user-projects",
|
|
@@ -8162,7 +8354,7 @@ var UserProjectsComponent = class UserProjectsComponent extends AppBaseComponent
|
|
|
8162
8354
|
};
|
|
8163
8355
|
i0.ɵɵngDeclareClassMetadata({
|
|
8164
8356
|
minVersion: "12.0.0",
|
|
8165
|
-
version: "22.2.
|
|
8357
|
+
version: "22.2.3",
|
|
8166
8358
|
ngImport: i0,
|
|
8167
8359
|
type: UserProjectsComponent,
|
|
8168
8360
|
decorators: [{
|
|
@@ -8175,7 +8367,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8175
8367
|
}]
|
|
8176
8368
|
}],
|
|
8177
8369
|
ctorParameters: () => [
|
|
8178
|
-
{ type: i3.ProfileService },
|
|
8370
|
+
{ type: i3$2.ProfileService },
|
|
8179
8371
|
{ type: i0.Injector },
|
|
8180
8372
|
{ type: i0.ChangeDetectorRef },
|
|
8181
8373
|
{ type: i2$3.ConfirmDialogService }
|
|
@@ -8373,14 +8565,14 @@ var UserProfilePageComponent = class UserProfilePageComponent extends AppBaseCom
|
|
|
8373
8565
|
static {
|
|
8374
8566
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
8375
8567
|
minVersion: "12.0.0",
|
|
8376
|
-
version: "22.2.
|
|
8568
|
+
version: "22.2.3",
|
|
8377
8569
|
ngImport: i0,
|
|
8378
8570
|
type: UserProfilePageComponent,
|
|
8379
8571
|
deps: [
|
|
8380
8572
|
{ token: i0.Injector },
|
|
8381
|
-
{ token: i3.ProfileService },
|
|
8573
|
+
{ token: i3$2.ProfileService },
|
|
8382
8574
|
{ token: i2$2.NgbModal },
|
|
8383
|
-
{ token: i3.ScriptLoaderService },
|
|
8575
|
+
{ token: i3$2.ScriptLoaderService },
|
|
8384
8576
|
{ token: i0.ChangeDetectorRef }
|
|
8385
8577
|
],
|
|
8386
8578
|
target: i0.ɵɵFactoryTarget.Component
|
|
@@ -8389,7 +8581,7 @@ var UserProfilePageComponent = class UserProfilePageComponent extends AppBaseCom
|
|
|
8389
8581
|
static {
|
|
8390
8582
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
8391
8583
|
minVersion: "17.0.0",
|
|
8392
|
-
version: "22.2.
|
|
8584
|
+
version: "22.2.3",
|
|
8393
8585
|
type: UserProfilePageComponent,
|
|
8394
8586
|
isStandalone: false,
|
|
8395
8587
|
selector: "pw-user-profile-page",
|
|
@@ -8489,7 +8681,7 @@ var UserProfilePageComponent = class UserProfilePageComponent extends AppBaseCom
|
|
|
8489
8681
|
};
|
|
8490
8682
|
i0.ɵɵngDeclareClassMetadata({
|
|
8491
8683
|
minVersion: "12.0.0",
|
|
8492
|
-
version: "22.2.
|
|
8684
|
+
version: "22.2.3",
|
|
8493
8685
|
ngImport: i0,
|
|
8494
8686
|
type: UserProfilePageComponent,
|
|
8495
8687
|
decorators: [{
|
|
@@ -8503,9 +8695,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8503
8695
|
}],
|
|
8504
8696
|
ctorParameters: () => [
|
|
8505
8697
|
{ type: i0.Injector },
|
|
8506
|
-
{ type: i3.ProfileService },
|
|
8698
|
+
{ type: i3$2.ProfileService },
|
|
8507
8699
|
{ type: i2$2.NgbModal },
|
|
8508
|
-
{ type: i3.ScriptLoaderService },
|
|
8700
|
+
{ type: i3$2.ScriptLoaderService },
|
|
8509
8701
|
{ type: i0.ChangeDetectorRef }
|
|
8510
8702
|
]
|
|
8511
8703
|
});
|
|
@@ -8525,7 +8717,7 @@ var UserModuleModule = class UserModuleModule {
|
|
|
8525
8717
|
static {
|
|
8526
8718
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
8527
8719
|
minVersion: "12.0.0",
|
|
8528
|
-
version: "22.2.
|
|
8720
|
+
version: "22.2.3",
|
|
8529
8721
|
ngImport: i0,
|
|
8530
8722
|
type: UserModuleModule,
|
|
8531
8723
|
deps: [],
|
|
@@ -8535,7 +8727,7 @@ var UserModuleModule = class UserModuleModule {
|
|
|
8535
8727
|
static {
|
|
8536
8728
|
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
8537
8729
|
minVersion: "14.0.0",
|
|
8538
|
-
version: "22.2.
|
|
8730
|
+
version: "22.2.3",
|
|
8539
8731
|
ngImport: i0,
|
|
8540
8732
|
type: UserModuleModule,
|
|
8541
8733
|
declarations: [
|
|
@@ -8553,6 +8745,7 @@ var UserModuleModule = class UserModuleModule {
|
|
|
8553
8745
|
UpgradeSubscriptionComponent,
|
|
8554
8746
|
UserSubscriptionDetailsComponent,
|
|
8555
8747
|
UserSubscriptionListComponent,
|
|
8748
|
+
SubscriptionRemovalComponent,
|
|
8556
8749
|
UserInvoiceComponent,
|
|
8557
8750
|
AiKnowledgeTabComponent,
|
|
8558
8751
|
CommunicationTabComponent,
|
|
@@ -8639,7 +8832,7 @@ var UserModuleModule = class UserModuleModule {
|
|
|
8639
8832
|
static {
|
|
8640
8833
|
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
8641
8834
|
minVersion: "12.0.0",
|
|
8642
|
-
version: "22.2.
|
|
8835
|
+
version: "22.2.3",
|
|
8643
8836
|
ngImport: i0,
|
|
8644
8837
|
type: UserModuleModule,
|
|
8645
8838
|
providers: [{
|
|
@@ -8674,7 +8867,7 @@ var UserModuleModule = class UserModuleModule {
|
|
|
8674
8867
|
};
|
|
8675
8868
|
i0.ɵɵngDeclareClassMetadata({
|
|
8676
8869
|
minVersion: "12.0.0",
|
|
8677
|
-
version: "22.2.
|
|
8870
|
+
version: "22.2.3",
|
|
8678
8871
|
ngImport: i0,
|
|
8679
8872
|
type: UserModuleModule,
|
|
8680
8873
|
decorators: [{
|
|
@@ -8695,6 +8888,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8695
8888
|
UpgradeSubscriptionComponent,
|
|
8696
8889
|
UserSubscriptionDetailsComponent,
|
|
8697
8890
|
UserSubscriptionListComponent,
|
|
8891
|
+
SubscriptionRemovalComponent,
|
|
8698
8892
|
UserInvoiceComponent,
|
|
8699
8893
|
AiKnowledgeTabComponent,
|
|
8700
8894
|
CommunicationTabComponent,
|