@arsedizioni/ars-utils 19.1.51 → 19.1.53
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/common/definitions.d.ts +4 -3
- package/clipper.common/common/services/clipper.service.d.ts +1 -1
- package/clipper.ui/ui/document-menu/document-menu.component.d.ts +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +21 -5
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/package.json +12 -12
|
@@ -86,7 +86,7 @@ export declare const ClipperSectorTypes: NameValueItem<string>[];
|
|
|
86
86
|
export declare const ClipperAuthors: SectorInfo[];
|
|
87
87
|
export declare const ClipperSources: NameValueItem<string>[];
|
|
88
88
|
export declare class ClipperUpdateChannelsStateParams {
|
|
89
|
-
activeChannels:
|
|
89
|
+
activeChannels: ClipperChannel[];
|
|
90
90
|
}
|
|
91
91
|
export interface ClipperChannelSettingsItem<T> {
|
|
92
92
|
name: string;
|
|
@@ -152,8 +152,8 @@ export interface ClipperLoginResult extends LoginResult<ClipperUserInfo> {
|
|
|
152
152
|
export interface ClipperLoginInfo {
|
|
153
153
|
context: ClipperUserInfo;
|
|
154
154
|
complianceContext?: any | null;
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
channels?: ClipperChannelSettings[] | null;
|
|
156
|
+
credentials?: string | null;
|
|
157
157
|
OAUTH?: LoginOAuthType | null;
|
|
158
158
|
}
|
|
159
159
|
export declare class ClipperSearchParams {
|
|
@@ -533,6 +533,7 @@ export interface ClipperDashboardResult {
|
|
|
533
533
|
expiredDeadlines?: number | null;
|
|
534
534
|
expiringDeadlines?: number | null;
|
|
535
535
|
documentUpdates?: number | null;
|
|
536
|
+
channels?: ClipperChannelSettings[] | null;
|
|
536
537
|
}
|
|
537
538
|
export declare class ClipperDashboard {
|
|
538
539
|
items: import("@angular/core").WritableSignal<ClipperDashboardItem[]>;
|
|
@@ -13,7 +13,7 @@ export declare class ClipperDocumentMenuComponent implements OnInit, OnDestroy {
|
|
|
13
13
|
private changeDetector;
|
|
14
14
|
private clipperService;
|
|
15
15
|
readonly useSelections: import("@angular/core").InputSignal<boolean>;
|
|
16
|
-
readonly selectionSource: import("@angular/core").InputSignal<"
|
|
16
|
+
readonly selectionSource: import("@angular/core").InputSignal<"selection" | "bag" | "none">;
|
|
17
17
|
protected selection: () => ClipperDocumentInfo[];
|
|
18
18
|
readonly parent: import("@angular/core").InputSignal<ClipperSearchResultManager>;
|
|
19
19
|
readonly item: import("@angular/core").InputSignal<ClipperDocumentInfo>;
|
|
@@ -2387,11 +2387,11 @@ class ClipperService {
|
|
|
2387
2387
|
this.setToken(r.value);
|
|
2388
2388
|
const loginInfo = {
|
|
2389
2389
|
context: r.value.context,
|
|
2390
|
-
|
|
2390
|
+
channels: r.value.settings,
|
|
2391
2391
|
OAUTH: oauth
|
|
2392
2392
|
};
|
|
2393
2393
|
if (!oauth) {
|
|
2394
|
-
loginInfo.
|
|
2394
|
+
loginInfo.credentials =
|
|
2395
2395
|
SystemUtils.cipher(JSON.stringify({
|
|
2396
2396
|
email: email,
|
|
2397
2397
|
password: password,
|
|
@@ -2468,7 +2468,7 @@ class ClipperService {
|
|
|
2468
2468
|
initializeChannels() {
|
|
2469
2469
|
if (this.loggedIn()) {
|
|
2470
2470
|
let channels = [];
|
|
2471
|
-
this.loginInfo?.
|
|
2471
|
+
this.loginInfo?.channels?.forEach(n => {
|
|
2472
2472
|
if (n.isActive) {
|
|
2473
2473
|
const channel = ClipperChannels.find(x => x.value === n.channelId);
|
|
2474
2474
|
if (channel) {
|
|
@@ -2861,14 +2861,30 @@ class ClipperService {
|
|
|
2861
2861
|
* @param params parameters
|
|
2862
2862
|
*/
|
|
2863
2863
|
updateSettings(params) {
|
|
2864
|
-
return this.httpClient.post(this._serviceUri + '/account/settings/update', params)
|
|
2864
|
+
return this.httpClient.post(this._serviceUri + '/account/settings/update', params).pipe(map(r => {
|
|
2865
|
+
if (r.success) {
|
|
2866
|
+
if (params.channels) {
|
|
2867
|
+
// Update channels
|
|
2868
|
+
this._loginInfo.channels = params.channels;
|
|
2869
|
+
this.initializeChannels();
|
|
2870
|
+
}
|
|
2871
|
+
}
|
|
2872
|
+
return r;
|
|
2873
|
+
}));
|
|
2865
2874
|
}
|
|
2866
2875
|
/**
|
|
2867
2876
|
* Update channel state
|
|
2868
2877
|
* @param id: the channel id (1, 2, 3, 4)
|
|
2869
2878
|
*/
|
|
2870
2879
|
updateChannelsState(params) {
|
|
2871
|
-
return this.httpClient.post(this._serviceUri + '/account/settings/channels/update', params)
|
|
2880
|
+
return this.httpClient.post(this._serviceUri + '/account/settings/channels/update', params).pipe(map(r => {
|
|
2881
|
+
if (r.success) {
|
|
2882
|
+
// Update channels
|
|
2883
|
+
this._loginInfo.channels = r.value.channels ?? [];
|
|
2884
|
+
this.initializeChannels();
|
|
2885
|
+
}
|
|
2886
|
+
return r;
|
|
2887
|
+
}));
|
|
2872
2888
|
}
|
|
2873
2889
|
/**
|
|
2874
2890
|
* Get trial info
|