@arsedizioni/ars-utils 20.2.17 → 20.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/clipper.common/index.d.ts +34 -25
- package/clipper.ui/index.d.ts +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +114 -87
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +40 -39
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.mjs +109 -109
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +10 -10
- package/fesm2022/arsedizioni-ars-utils-help.mjs +13 -13
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +10 -10
- package/fesm2022/arsedizioni-ars-utils-support.ui.mjs +6 -6
- package/fesm2022/arsedizioni-ars-utils-tinymce.mjs +7 -7
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +58 -58
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +40 -40
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +7 -7
- package/package.json +9 -9
- package/ui.application/index.d.ts +1 -1
|
@@ -1010,133 +1010,133 @@ const ClipperSectorTypes = [
|
|
|
1010
1010
|
const ClipperAuthors = [
|
|
1011
1011
|
{
|
|
1012
1012
|
sectorId: 'LR',
|
|
1013
|
-
channels:
|
|
1013
|
+
channels: undefined,
|
|
1014
1014
|
value: '4RAB',
|
|
1015
1015
|
name: 'Abruzzo',
|
|
1016
1016
|
},
|
|
1017
1017
|
{
|
|
1018
1018
|
sectorId: 'LR',
|
|
1019
|
-
channels:
|
|
1019
|
+
channels: undefined,
|
|
1020
1020
|
value: '4RBA',
|
|
1021
1021
|
name: 'Basilicata',
|
|
1022
1022
|
},
|
|
1023
1023
|
{
|
|
1024
1024
|
sectorId: 'LR',
|
|
1025
|
-
channels:
|
|
1025
|
+
channels: undefined,
|
|
1026
1026
|
value: '4RCAL',
|
|
1027
1027
|
name: 'Calabria',
|
|
1028
1028
|
},
|
|
1029
1029
|
{
|
|
1030
1030
|
sectorId: 'LR',
|
|
1031
|
-
channels:
|
|
1031
|
+
channels: undefined,
|
|
1032
1032
|
value: '4RCAM',
|
|
1033
1033
|
name: 'Campania',
|
|
1034
1034
|
},
|
|
1035
1035
|
{
|
|
1036
1036
|
sectorId: 'LR',
|
|
1037
|
-
channels:
|
|
1037
|
+
channels: undefined,
|
|
1038
1038
|
value: '4REM',
|
|
1039
1039
|
name: 'Emilia Romagna',
|
|
1040
1040
|
},
|
|
1041
1041
|
{
|
|
1042
1042
|
sectorId: 'LR',
|
|
1043
|
-
channels:
|
|
1043
|
+
channels: undefined,
|
|
1044
1044
|
value: '4RFVG',
|
|
1045
1045
|
name: 'Friuli Venezia Giulia',
|
|
1046
1046
|
},
|
|
1047
1047
|
{
|
|
1048
1048
|
sectorId: 'LR',
|
|
1049
|
-
channels:
|
|
1049
|
+
channels: undefined,
|
|
1050
1050
|
value: '4RLA',
|
|
1051
1051
|
name: 'Lazio',
|
|
1052
1052
|
},
|
|
1053
1053
|
{
|
|
1054
1054
|
sectorId: 'LR',
|
|
1055
|
-
channels:
|
|
1055
|
+
channels: undefined,
|
|
1056
1056
|
value: '4RLI',
|
|
1057
1057
|
name: 'Liguria',
|
|
1058
1058
|
},
|
|
1059
1059
|
{
|
|
1060
1060
|
sectorId: 'LR',
|
|
1061
|
-
channels:
|
|
1061
|
+
channels: undefined,
|
|
1062
1062
|
value: '4RLO',
|
|
1063
1063
|
name: 'Lombardia',
|
|
1064
1064
|
},
|
|
1065
1065
|
{
|
|
1066
1066
|
sectorId: 'LR',
|
|
1067
|
-
channels:
|
|
1067
|
+
channels: undefined,
|
|
1068
1068
|
value: '4RMA',
|
|
1069
1069
|
name: 'Marche',
|
|
1070
1070
|
},
|
|
1071
1071
|
{
|
|
1072
1072
|
sectorId: 'LR',
|
|
1073
|
-
channels:
|
|
1073
|
+
channels: undefined,
|
|
1074
1074
|
value: '4RMO',
|
|
1075
1075
|
name: 'Molise',
|
|
1076
1076
|
},
|
|
1077
1077
|
{
|
|
1078
1078
|
sectorId: 'LR',
|
|
1079
|
-
channels:
|
|
1079
|
+
channels: undefined,
|
|
1080
1080
|
value: '4RPI',
|
|
1081
1081
|
name: 'Piemonte',
|
|
1082
1082
|
},
|
|
1083
1083
|
{
|
|
1084
1084
|
sectorId: 'LR',
|
|
1085
|
-
channels:
|
|
1085
|
+
channels: undefined,
|
|
1086
1086
|
value: '4RPU',
|
|
1087
1087
|
name: 'Puglia',
|
|
1088
1088
|
},
|
|
1089
1089
|
{
|
|
1090
1090
|
sectorId: 'LR',
|
|
1091
|
-
channels:
|
|
1091
|
+
channels: undefined,
|
|
1092
1092
|
value: '4RSA',
|
|
1093
1093
|
name: 'Sardegna',
|
|
1094
1094
|
},
|
|
1095
1095
|
{
|
|
1096
1096
|
sectorId: 'LR',
|
|
1097
|
-
channels:
|
|
1097
|
+
channels: undefined,
|
|
1098
1098
|
value: '4RSI',
|
|
1099
1099
|
name: 'Sicilia',
|
|
1100
1100
|
},
|
|
1101
1101
|
{
|
|
1102
1102
|
sectorId: 'LR',
|
|
1103
|
-
channels:
|
|
1103
|
+
channels: undefined,
|
|
1104
1104
|
value: '4RTO',
|
|
1105
1105
|
name: 'Toscana',
|
|
1106
1106
|
},
|
|
1107
1107
|
{
|
|
1108
1108
|
sectorId: 'LR',
|
|
1109
|
-
channels:
|
|
1109
|
+
channels: undefined,
|
|
1110
1110
|
value: '4RTAA',
|
|
1111
1111
|
name: 'Trentino Trentino Alto Adige',
|
|
1112
1112
|
},
|
|
1113
1113
|
{
|
|
1114
1114
|
sectorId: 'LR',
|
|
1115
|
-
channels:
|
|
1115
|
+
channels: undefined,
|
|
1116
1116
|
value: '4RUM',
|
|
1117
1117
|
name: 'Umbria',
|
|
1118
1118
|
},
|
|
1119
1119
|
{
|
|
1120
1120
|
sectorId: 'LR',
|
|
1121
|
-
channels:
|
|
1121
|
+
channels: undefined,
|
|
1122
1122
|
value: '4RVA',
|
|
1123
1123
|
name: "Valle D'Aosta",
|
|
1124
1124
|
},
|
|
1125
1125
|
{
|
|
1126
1126
|
sectorId: 'LR',
|
|
1127
|
-
channels:
|
|
1127
|
+
channels: undefined,
|
|
1128
1128
|
value: '4RVE',
|
|
1129
1129
|
name: 'Veneto',
|
|
1130
1130
|
},
|
|
1131
1131
|
{
|
|
1132
1132
|
sectorId: 'LR',
|
|
1133
|
-
channels:
|
|
1133
|
+
channels: undefined,
|
|
1134
1134
|
value: '4PAB',
|
|
1135
1135
|
name: 'Prov. Autonoma di Bolzano',
|
|
1136
1136
|
},
|
|
1137
1137
|
{
|
|
1138
1138
|
sectorId: 'LR',
|
|
1139
|
-
channels:
|
|
1139
|
+
channels: undefined,
|
|
1140
1140
|
value: '4PAT',
|
|
1141
1141
|
name: 'Prov. Autonoma di Trento',
|
|
1142
1142
|
},
|
|
@@ -1190,139 +1190,139 @@ const ClipperAuthors = [
|
|
|
1190
1190
|
},
|
|
1191
1191
|
{
|
|
1192
1192
|
sectorId: 'GN',
|
|
1193
|
-
channels:
|
|
1193
|
+
channels: undefined,
|
|
1194
1194
|
value: '5CC',
|
|
1195
1195
|
name: 'Corte Costituzionale',
|
|
1196
1196
|
},
|
|
1197
1197
|
{
|
|
1198
1198
|
sectorId: 'GN',
|
|
1199
|
-
channels:
|
|
1199
|
+
channels: undefined,
|
|
1200
1200
|
value: '5CCC',
|
|
1201
1201
|
name: 'Corte di Cassazione Civile',
|
|
1202
1202
|
},
|
|
1203
1203
|
{
|
|
1204
1204
|
sectorId: 'GN',
|
|
1205
|
-
channels:
|
|
1205
|
+
channels: undefined,
|
|
1206
1206
|
value: '5CCP',
|
|
1207
1207
|
name: 'Corte di Cassazione Penale',
|
|
1208
1208
|
},
|
|
1209
1209
|
{
|
|
1210
1210
|
sectorId: 'GN',
|
|
1211
|
-
channels:
|
|
1211
|
+
channels: undefined,
|
|
1212
1212
|
value: '5CASA',
|
|
1213
1213
|
name: "Corte d'Assise d'Appello",
|
|
1214
1214
|
},
|
|
1215
1215
|
{
|
|
1216
1216
|
sectorId: 'GN',
|
|
1217
|
-
channels:
|
|
1217
|
+
channels: undefined,
|
|
1218
1218
|
value: '5CAS',
|
|
1219
1219
|
name: "Corte d'Assise",
|
|
1220
1220
|
},
|
|
1221
1221
|
{
|
|
1222
1222
|
sectorId: 'GN',
|
|
1223
|
-
channels:
|
|
1223
|
+
channels: undefined,
|
|
1224
1224
|
value: '5CA',
|
|
1225
1225
|
name: "Corte d'Appello",
|
|
1226
1226
|
},
|
|
1227
1227
|
{
|
|
1228
1228
|
sectorId: 'GN',
|
|
1229
|
-
channels:
|
|
1229
|
+
channels: undefined,
|
|
1230
1230
|
value: '5PCA',
|
|
1231
1231
|
name: "Procura Generale Corte d'Appello",
|
|
1232
1232
|
},
|
|
1233
1233
|
{
|
|
1234
1234
|
sectorId: 'GN',
|
|
1235
|
-
channels:
|
|
1235
|
+
channels: undefined,
|
|
1236
1236
|
value: '5GDP',
|
|
1237
1237
|
name: 'Giudice di Pace',
|
|
1238
1238
|
},
|
|
1239
1239
|
{
|
|
1240
1240
|
sectorId: 'GN',
|
|
1241
|
-
channels:
|
|
1241
|
+
channels: undefined,
|
|
1242
1242
|
value: '5PR',
|
|
1243
1243
|
name: 'Procura della Repubblica',
|
|
1244
1244
|
},
|
|
1245
1245
|
{
|
|
1246
1246
|
sectorId: 'GN',
|
|
1247
|
-
channels:
|
|
1247
|
+
channels: undefined,
|
|
1248
1248
|
value: '5T',
|
|
1249
1249
|
name: 'Tribunale',
|
|
1250
1250
|
},
|
|
1251
1251
|
{
|
|
1252
1252
|
sectorId: 'GN',
|
|
1253
|
-
channels:
|
|
1253
|
+
channels: undefined,
|
|
1254
1254
|
value: '5P',
|
|
1255
1255
|
name: 'Pretura',
|
|
1256
1256
|
},
|
|
1257
1257
|
{
|
|
1258
1258
|
sectorId: 'GN',
|
|
1259
|
-
channels:
|
|
1259
|
+
channels: undefined,
|
|
1260
1260
|
value: '5CDS',
|
|
1261
1261
|
name: 'Consiglio di Stato',
|
|
1262
1262
|
},
|
|
1263
1263
|
{
|
|
1264
1264
|
sectorId: 'GN',
|
|
1265
|
-
channels:
|
|
1265
|
+
channels: undefined,
|
|
1266
1266
|
value: '5TAR',
|
|
1267
1267
|
name: 'Tribunale Amministrativo Regionale',
|
|
1268
1268
|
},
|
|
1269
1269
|
{
|
|
1270
1270
|
sectorId: 'GN',
|
|
1271
|
-
channels:
|
|
1271
|
+
channels: undefined,
|
|
1272
1272
|
value: '5TSA',
|
|
1273
1273
|
name: 'Tribunale Superiore delle Acque',
|
|
1274
1274
|
},
|
|
1275
1275
|
{
|
|
1276
1276
|
sectorId: 'GN',
|
|
1277
|
-
channels:
|
|
1277
|
+
channels: undefined,
|
|
1278
1278
|
value: '5TGA',
|
|
1279
1279
|
name: 'Tribunale Regionale acque',
|
|
1280
1280
|
},
|
|
1281
1281
|
{
|
|
1282
1282
|
sectorId: 'GN',
|
|
1283
|
-
channels:
|
|
1283
|
+
channels: undefined,
|
|
1284
1284
|
value: '5CTP',
|
|
1285
1285
|
name: 'Commissione Tributaria Provinciale',
|
|
1286
1286
|
},
|
|
1287
1287
|
{
|
|
1288
1288
|
sectorId: 'GN',
|
|
1289
|
-
channels:
|
|
1289
|
+
channels: undefined,
|
|
1290
1290
|
value: '5CTR',
|
|
1291
1291
|
name: 'Commissione Tributaria Regionale',
|
|
1292
1292
|
},
|
|
1293
1293
|
{
|
|
1294
1294
|
sectorId: 'GN',
|
|
1295
|
-
channels:
|
|
1295
|
+
channels: undefined,
|
|
1296
1296
|
value: '5CGAS',
|
|
1297
1297
|
name: 'Cons. di Giustizia Amm.va della Sicilia',
|
|
1298
1298
|
},
|
|
1299
1299
|
{
|
|
1300
1300
|
sectorId: 'GN',
|
|
1301
|
-
channels:
|
|
1301
|
+
channels: undefined,
|
|
1302
1302
|
value: '5CDC',
|
|
1303
1303
|
name: 'Corte dei Conti',
|
|
1304
1304
|
},
|
|
1305
1305
|
{
|
|
1306
1306
|
sectorId: 'GC',
|
|
1307
|
-
channels:
|
|
1307
|
+
channels: undefined,
|
|
1308
1308
|
value: '3CJCE',
|
|
1309
1309
|
name: 'Corte di Giustizia CEE/CE',
|
|
1310
1310
|
},
|
|
1311
1311
|
{
|
|
1312
1312
|
sectorId: 'GC',
|
|
1313
|
-
channels:
|
|
1313
|
+
channels: undefined,
|
|
1314
1314
|
value: '3CEDM',
|
|
1315
1315
|
name: "Corte Europea per i Diritti dell'Uomo",
|
|
1316
1316
|
},
|
|
1317
1317
|
{
|
|
1318
1318
|
sectorId: 'GC',
|
|
1319
|
-
channels:
|
|
1319
|
+
channels: undefined,
|
|
1320
1320
|
value: '3CWJ',
|
|
1321
1321
|
name: 'Corte Internazionale di Giustizia',
|
|
1322
1322
|
},
|
|
1323
1323
|
{
|
|
1324
1324
|
sectorId: 'GC',
|
|
1325
|
-
channels:
|
|
1325
|
+
channels: undefined,
|
|
1326
1326
|
value: '3T1CE',
|
|
1327
1327
|
name: 'Tribunale di Primo Grado CEE/CE',
|
|
1328
1328
|
}
|
|
@@ -1406,6 +1406,9 @@ const ClipperSources = [
|
|
|
1406
1406
|
}
|
|
1407
1407
|
];
|
|
1408
1408
|
class ClipperUpdateChannelsStateParams {
|
|
1409
|
+
constructor() {
|
|
1410
|
+
this.activeChannels = [];
|
|
1411
|
+
}
|
|
1409
1412
|
}
|
|
1410
1413
|
class ClipperChannelSettings {
|
|
1411
1414
|
constructor() {
|
|
@@ -1445,6 +1448,14 @@ class ClipperChannelSettings {
|
|
|
1445
1448
|
return false;
|
|
1446
1449
|
}
|
|
1447
1450
|
}
|
|
1451
|
+
var ClipperLoginFlags;
|
|
1452
|
+
(function (ClipperLoginFlags) {
|
|
1453
|
+
ClipperLoginFlags[ClipperLoginFlags["None"] = 0] = "None";
|
|
1454
|
+
ClipperLoginFlags[ClipperLoginFlags["RememberCredentials"] = 1] = "RememberCredentials";
|
|
1455
|
+
ClipperLoginFlags[ClipperLoginFlags["DisableMfa"] = 2] = "DisableMfa";
|
|
1456
|
+
ClipperLoginFlags[ClipperLoginFlags["ExtendMfaValidity"] = 4] = "ExtendMfaValidity";
|
|
1457
|
+
ClipperLoginFlags[ClipperLoginFlags["ExtendRememberCredentialsValidity"] = 8] = "ExtendRememberCredentialsValidity";
|
|
1458
|
+
})(ClipperLoginFlags || (ClipperLoginFlags = {}));
|
|
1448
1459
|
class ClipperSearchParams {
|
|
1449
1460
|
constructor() {
|
|
1450
1461
|
this.version = 6;
|
|
@@ -1617,9 +1628,9 @@ class ClipperDashboard {
|
|
|
1617
1628
|
*/
|
|
1618
1629
|
getUnreadItems(module, model) {
|
|
1619
1630
|
if (model) {
|
|
1620
|
-
return this.unreadItemsByModel()?.find((x) => x[0] === model)?.[1];
|
|
1631
|
+
return this.unreadItemsByModel()?.find((x) => x[0] === model)?.[1] ?? 0;
|
|
1621
1632
|
}
|
|
1622
|
-
return this.unreadItems()?.find((x) => x[0] === module)?.[1];
|
|
1633
|
+
return this.unreadItems()?.find((x) => x[0] === module)?.[1] ?? 0;
|
|
1623
1634
|
}
|
|
1624
1635
|
/**
|
|
1625
1636
|
* Return total unread items
|
|
@@ -1818,7 +1829,7 @@ class ClipperUtils {
|
|
|
1818
1829
|
if (params && ClipperSearchUtils.isTextQuery(params)) {
|
|
1819
1830
|
sortOptions.push(options[4]);
|
|
1820
1831
|
}
|
|
1821
|
-
if (modules
|
|
1832
|
+
if (modules && modules.length > 0) {
|
|
1822
1833
|
if (this.checkModules([ClipperModule.GazzetteBollettiniEFontiDiverse], modules, 1)) {
|
|
1823
1834
|
sortOptions.push(options[2]);
|
|
1824
1835
|
sortOptions.push(options[3]);
|
|
@@ -2070,11 +2081,11 @@ class ClipperService {
|
|
|
2070
2081
|
this.broadcastServiceSubscription = this.broadcastService.getMessage()
|
|
2071
2082
|
.subscribe(message => {
|
|
2072
2083
|
if (message.id === ClipperMessages.LOGIN_CHANGED) {
|
|
2073
|
-
this.login(message.data.email, message.data.password, true, message.data.oauth, message.data.oauthAccessToken).subscribe({
|
|
2084
|
+
this.login(message.data.email, message.data.password, true, message.data.oauth, message.data.oauthAccessToken, ClipperLoginFlags.RememberCredentials).subscribe({
|
|
2074
2085
|
next: r => {
|
|
2075
2086
|
if (!r.success) {
|
|
2076
2087
|
if (r.message) {
|
|
2077
|
-
this.dialogService.error(r.message,
|
|
2088
|
+
this.dialogService.error(r.message, undefined, "Errore di Clipper");
|
|
2078
2089
|
}
|
|
2079
2090
|
}
|
|
2080
2091
|
else {
|
|
@@ -2093,7 +2104,7 @@ class ClipperService {
|
|
|
2093
2104
|
this.logout().subscribe(r => {
|
|
2094
2105
|
if (!r.success) {
|
|
2095
2106
|
if (r.message) {
|
|
2096
|
-
this.dialogService.error("<p>" + r.message + "</p><br><br><hr><p class='small'><i>Per eliminare la configurazione di Clipper accedere a:<br><b>menu > personalizza > collegamenti</b></i></p>",
|
|
2107
|
+
this.dialogService.error("<p>" + r.message + "</p><br><br><hr><p class='small'><i>Per eliminare la configurazione di Clipper accedere a:<br><b>menu > personalizza > collegamenti</b></i></p>", undefined, "Errore di Clipper");
|
|
2097
2108
|
}
|
|
2098
2109
|
}
|
|
2099
2110
|
else {
|
|
@@ -2234,20 +2245,24 @@ class ClipperService {
|
|
|
2234
2245
|
this.storeContext();
|
|
2235
2246
|
}
|
|
2236
2247
|
/**
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2248
|
+
* Perform auto login using current link data
|
|
2249
|
+
* @param email: the optional email if using OAuth2
|
|
2250
|
+
* @parma password: the optional password if using OAuth2
|
|
2251
|
+
* @param remember: remember credentials
|
|
2252
|
+
* @param oauth: the optional open authentication supported
|
|
2253
|
+
* @param oauthAccessToken: the optional OAuth2 access token
|
|
2254
|
+
* @param onSucces: function to execute on seccess
|
|
2255
|
+
* @param flags: the optional login flags
|
|
2256
|
+
*/
|
|
2257
|
+
autoLogin(email, password, remember, oauth, oauthAccessToken = sessionStorage.getItem("clipper_oauth_token") ?? undefined, onSucces, flags) {
|
|
2258
|
+
if (remember) {
|
|
2259
|
+
flags |= ClipperLoginFlags.RememberCredentials;
|
|
2260
|
+
}
|
|
2261
|
+
this.login(email, password, remember, oauth, oauthAccessToken, flags)
|
|
2247
2262
|
.subscribe({
|
|
2248
2263
|
next: r => {
|
|
2249
2264
|
if (!r.success) {
|
|
2250
|
-
this.dialogService.error(r.message,
|
|
2265
|
+
this.dialogService.error(r.message, undefined, "Errore in Clipper");
|
|
2251
2266
|
}
|
|
2252
2267
|
else {
|
|
2253
2268
|
this.dialogService.toast('Connesso a Clipper', 1500, 'power');
|
|
@@ -2270,7 +2285,7 @@ class ClipperService {
|
|
|
2270
2285
|
this.logout().subscribe({
|
|
2271
2286
|
next: r => {
|
|
2272
2287
|
if (!r.success) {
|
|
2273
|
-
this.dialogService.error(r.message,
|
|
2288
|
+
this.dialogService.error(r.message, undefined, "Errore in Clipper");
|
|
2274
2289
|
}
|
|
2275
2290
|
else {
|
|
2276
2291
|
this.dialogService.toast('Disconnesso da Clipper', 1500, 'power_off');
|
|
@@ -2291,16 +2306,21 @@ class ClipperService {
|
|
|
2291
2306
|
* @param remember: remember credentials
|
|
2292
2307
|
* @param oauth: the optional open authentication supported
|
|
2293
2308
|
* @param oauthAccessToken: the optional OAuth2 access token
|
|
2309
|
+
* @param flags: the optional login flags
|
|
2294
2310
|
* @returns: the login result
|
|
2295
2311
|
*/
|
|
2296
|
-
login(email, password, remember, oauth, oauthAccessToken = sessionStorage.getItem("clipper_oauth_token")) {
|
|
2312
|
+
login(email, password, remember, oauth, oauthAccessToken = sessionStorage.getItem("clipper_oauth_token") ?? undefined, flags) {
|
|
2313
|
+
if (remember) {
|
|
2314
|
+
flags |= ClipperLoginFlags.RememberCredentials;
|
|
2315
|
+
}
|
|
2297
2316
|
return this.httpClient
|
|
2298
2317
|
.post(this._serviceUri + '/login2', {
|
|
2318
|
+
clientId: localStorage.getItem("clipper_client_id"),
|
|
2299
2319
|
user: oauth ? null : email,
|
|
2300
2320
|
password: oauth ? null : password,
|
|
2301
2321
|
remember: remember,
|
|
2302
|
-
|
|
2303
|
-
|
|
2322
|
+
oauth: oauth,
|
|
2323
|
+
flags: flags
|
|
2304
2324
|
}, {
|
|
2305
2325
|
headers: !oauth || !oauthAccessToken
|
|
2306
2326
|
? new HttpHeaders()
|
|
@@ -2322,7 +2342,7 @@ class ClipperService {
|
|
|
2322
2342
|
this._loginInfo.oauth = oauth;
|
|
2323
2343
|
if (!oauth && r.value.requiresMfa) {
|
|
2324
2344
|
// Notify login is pending
|
|
2325
|
-
this.broadcastService.sendMessage(ClipperMessages.LOGIN_PENDING, {
|
|
2345
|
+
this.broadcastService.sendMessage(ClipperMessages.LOGIN_PENDING, { flags: flags });
|
|
2326
2346
|
}
|
|
2327
2347
|
else {
|
|
2328
2348
|
// Complete login
|
|
@@ -2353,9 +2373,9 @@ class ClipperService {
|
|
|
2353
2373
|
* @param code: the confirm code
|
|
2354
2374
|
* @param remember: true to remember credentials. Default is false.
|
|
2355
2375
|
*/
|
|
2356
|
-
confirmIdentity(code,
|
|
2376
|
+
confirmIdentity(code, flags = ClipperLoginFlags.None) {
|
|
2357
2377
|
return this.httpClient
|
|
2358
|
-
.post(this._serviceUri + '/login/confirm/' + code + '/?
|
|
2378
|
+
.post(this._serviceUri + '/login/confirm/' + code + '/?flags=' + flags, {})
|
|
2359
2379
|
.pipe(catchError((err) => {
|
|
2360
2380
|
localStorage.removeItem('clipper_context');
|
|
2361
2381
|
localStorage.removeItem('clipper_mfa');
|
|
@@ -2645,7 +2665,10 @@ class ClipperService {
|
|
|
2645
2665
|
* @param increment : the increment (can be negative)
|
|
2646
2666
|
*/
|
|
2647
2667
|
updateUnreadItems(module, model, increment) {
|
|
2648
|
-
|
|
2668
|
+
increment ??= 0;
|
|
2669
|
+
if (increment !== 0) {
|
|
2670
|
+
this.dashboard.updateUnreadItems(module, model, increment);
|
|
2671
|
+
}
|
|
2649
2672
|
this.broadcastService.sendMessage(ClipperMessages.COMMAND_DASHBOARD_UPDATED);
|
|
2650
2673
|
}
|
|
2651
2674
|
///
|
|
@@ -2824,9 +2847,11 @@ class ClipperService {
|
|
|
2824
2847
|
if (r.success) {
|
|
2825
2848
|
if (params.channels) {
|
|
2826
2849
|
// Update channels
|
|
2827
|
-
this._loginInfo
|
|
2828
|
-
|
|
2829
|
-
|
|
2850
|
+
if (this._loginInfo) {
|
|
2851
|
+
this._loginInfo.channels = params.channels;
|
|
2852
|
+
this.storeContext();
|
|
2853
|
+
this.initializeChannels();
|
|
2854
|
+
}
|
|
2830
2855
|
}
|
|
2831
2856
|
}
|
|
2832
2857
|
return r;
|
|
@@ -2840,7 +2865,9 @@ class ClipperService {
|
|
|
2840
2865
|
return this.httpClient.post(this._serviceUri + '/account/settings/channels/update', params).pipe(map(r => {
|
|
2841
2866
|
if (r.success) {
|
|
2842
2867
|
// Update channels
|
|
2843
|
-
this._loginInfo
|
|
2868
|
+
if (this._loginInfo) {
|
|
2869
|
+
this._loginInfo.channels = r.value.channels ?? [];
|
|
2870
|
+
}
|
|
2844
2871
|
// Update dashboard
|
|
2845
2872
|
this.dashboard.documentUpdates = r.value.documentUpdates;
|
|
2846
2873
|
this.dashboard.expiredDeadlines = r.value.expiredDeadlines;
|
|
@@ -2864,11 +2891,11 @@ class ClipperService {
|
|
|
2864
2891
|
* Update trial info
|
|
2865
2892
|
*/
|
|
2866
2893
|
updateTrialInfo() {
|
|
2867
|
-
if (!this._loginInfo || this._loginInfo?.context
|
|
2894
|
+
if (!this._loginInfo || this._loginInfo?.context?.hasTrial === false)
|
|
2868
2895
|
return; // Not supported
|
|
2869
2896
|
this.getTrialInfo().subscribe((r) => {
|
|
2870
2897
|
if (r.success) {
|
|
2871
|
-
if (this._loginInfo) {
|
|
2898
|
+
if (this._loginInfo?.context) {
|
|
2872
2899
|
if (r.value) {
|
|
2873
2900
|
this._loginInfo.context.hasTrial = true;
|
|
2874
2901
|
this._loginInfo.context.trialInfo = r.value;
|
|
@@ -3142,10 +3169,10 @@ class ClipperService {
|
|
|
3142
3169
|
downloadArchiveFile(id, otp) {
|
|
3143
3170
|
return this.httpClient.get(this._serviceUri + '/archive/files/download/?id=' + id + '&otp=' + (otp ?? ''), { responseType: 'blob' });
|
|
3144
3171
|
}
|
|
3145
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.
|
|
3146
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.
|
|
3172
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: ClipperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3173
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: ClipperService, providedIn: 'root' }); }
|
|
3147
3174
|
}
|
|
3148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.
|
|
3175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: ClipperService, decorators: [{
|
|
3149
3176
|
type: Injectable,
|
|
3150
3177
|
args: [{
|
|
3151
3178
|
providedIn: 'root',
|
|
@@ -3238,19 +3265,19 @@ class ClipperAuthInterceptor {
|
|
|
3238
3265
|
}
|
|
3239
3266
|
return request;
|
|
3240
3267
|
}
|
|
3241
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.
|
|
3242
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.
|
|
3268
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: ClipperAuthInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3269
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: ClipperAuthInterceptor }); }
|
|
3243
3270
|
}
|
|
3244
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.
|
|
3271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: ClipperAuthInterceptor, decorators: [{
|
|
3245
3272
|
type: Injectable
|
|
3246
3273
|
}] });
|
|
3247
3274
|
|
|
3248
3275
|
class ArsClipperCommonModule {
|
|
3249
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.
|
|
3250
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.
|
|
3251
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.
|
|
3276
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: ArsClipperCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3277
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: ArsClipperCommonModule }); }
|
|
3278
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: ArsClipperCommonModule }); }
|
|
3252
3279
|
}
|
|
3253
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.
|
|
3280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: ArsClipperCommonModule, decorators: [{
|
|
3254
3281
|
type: NgModule
|
|
3255
3282
|
}] });
|
|
3256
3283
|
|
|
@@ -3262,5 +3289,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImpor
|
|
|
3262
3289
|
* Generated bundle index. Do not edit.
|
|
3263
3290
|
*/
|
|
3264
3291
|
|
|
3265
|
-
export { ArsClipperCommonModule, ClipperArchiveCopyMode, ClipperArchiveFileStorageType, ClipperArchiveFileStorageTypes, ClipperArchiveFileType, ClipperArchiveFileTypes, ClipperArchiveFilesSearchParams, ClipperArchiveFoldersSearchParams, ClipperAuthInterceptor, ClipperAuthors, ClipperCalendarCopyMode, ClipperCalendarSearchParams, ClipperCalendarState, ClipperCalendarStates, ClipperChannel, ClipperChannelSettings, ClipperChannels, ClipperDashboard, ClipperDocumentChangeReasons, ClipperDocumentContainer, ClipperExportDocumentsFormat, ClipperFacet, ClipperMessages, ClipperModel, ClipperModels, ClipperModule, ClipperModuleGroup, ClipperModuleGroups, ClipperModules, ClipperQueryReferencesMode, ClipperRecurrenceType, ClipperRecurrenceTypes, ClipperRegions, ClipperSearchCalendarSnapshotResult, ClipperSearchFacetsSnapshot, ClipperSearchParams, ClipperSearchResult, ClipperSearchUtils, ClipperSectorTypes, ClipperSectors, ClipperSelectionMode, ClipperService, ClipperServiceFlags, ClipperSort, ClipperSources, ClipperTeamInfo, ClipperTeamMemberInfo, ClipperTeamProduct, ClipperTeamProductPermission, ClipperUpdateChannelsStateParams, ClipperUtils };
|
|
3292
|
+
export { ArsClipperCommonModule, ClipperArchiveCopyMode, ClipperArchiveFileStorageType, ClipperArchiveFileStorageTypes, ClipperArchiveFileType, ClipperArchiveFileTypes, ClipperArchiveFilesSearchParams, ClipperArchiveFoldersSearchParams, ClipperAuthInterceptor, ClipperAuthors, ClipperCalendarCopyMode, ClipperCalendarSearchParams, ClipperCalendarState, ClipperCalendarStates, ClipperChannel, ClipperChannelSettings, ClipperChannels, ClipperDashboard, ClipperDocumentChangeReasons, ClipperDocumentContainer, ClipperExportDocumentsFormat, ClipperFacet, ClipperLoginFlags, ClipperMessages, ClipperModel, ClipperModels, ClipperModule, ClipperModuleGroup, ClipperModuleGroups, ClipperModules, ClipperQueryReferencesMode, ClipperRecurrenceType, ClipperRecurrenceTypes, ClipperRegions, ClipperSearchCalendarSnapshotResult, ClipperSearchFacetsSnapshot, ClipperSearchParams, ClipperSearchResult, ClipperSearchUtils, ClipperSectorTypes, ClipperSectors, ClipperSelectionMode, ClipperService, ClipperServiceFlags, ClipperSort, ClipperSources, ClipperTeamInfo, ClipperTeamMemberInfo, ClipperTeamProduct, ClipperTeamProductPermission, ClipperUpdateChannelsStateParams, ClipperUtils };
|
|
3266
3293
|
//# sourceMappingURL=arsedizioni-ars-utils-clipper.common.mjs.map
|