@arsedizioni/ars-utils 20.4.5 → 20.4.6

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.
@@ -1033,7 +1033,7 @@ declare class ClipperDocumentMenuComponent implements OnInit, OnDestroy {
1033
1033
  private changeDetector;
1034
1034
  private clipperService;
1035
1035
  readonly useSelections: _angular_core.InputSignal<boolean>;
1036
- readonly selectionSource: _angular_core.InputSignal<"selection" | "bag" | "none">;
1036
+ readonly selectionSource: _angular_core.InputSignal<"selection" | "none" | "bag">;
1037
1037
  protected selection: () => ClipperDocumentInfo[];
1038
1038
  readonly parent: _angular_core.InputSignal<ClipperSearchResultManager>;
1039
1039
  readonly item: _angular_core.InputSignal<ClipperDocumentInfo>;
package/core/index.d.ts CHANGED
@@ -408,6 +408,39 @@ declare class SystemUtils {
408
408
  * @returns true if the color is light
409
409
  */
410
410
  static isColorLight(color: string, minimumLuminance?: number): boolean;
411
+ /**
412
+ * Get a unique machine id
413
+ * @returns : the machine id
414
+ */
415
+ static getMachineId(): string;
416
+ /**
417
+ * Browser fingerprint
418
+ */
419
+ private static collectFingerprint;
420
+ /**
421
+ * Canvas fingerprinting
422
+ */
423
+ private static getCanvasFingerprint;
424
+ /**
425
+ * WebGL fingerprinting
426
+ */
427
+ private static getWebGLFingerprint;
428
+ /**
429
+ * Audio context fingerprinting
430
+ */
431
+ private static getAudioFingerprint;
432
+ /**
433
+ * Rileva font disponibili
434
+ */
435
+ private static detectFonts;
436
+ /**
437
+ * Ottiene lista plugins
438
+ */
439
+ private static getPlugins;
440
+ /**
441
+ * Genera hash SHA-256-like da stringa (semplificato)
442
+ */
443
+ private static generateHash;
411
444
  }
412
445
 
413
446
  interface DoneResult<T> {
@@ -2057,10 +2057,13 @@ class ClipperService {
2057
2057
  * @param flags: the service flags. Default is none.
2058
2058
  */
2059
2059
  initialize(serviceUri, appUri, flags = ClipperServiceFlags.None) {
2060
- // Create unique client id
2060
+ // Create unique client id and machine id
2061
2061
  if (!sessionStorage.getItem('clipper_client_id')) {
2062
2062
  sessionStorage.setItem('clipper_client_id', SystemUtils.generateUUID());
2063
2063
  }
2064
+ if (!sessionStorage.getItem('clipper_machine_id')) {
2065
+ sessionStorage.setItem('clipper_machine_id', SystemUtils.getMachineId());
2066
+ }
2064
2067
  // Initialize
2065
2068
  this._serviceUri = serviceUri;
2066
2069
  this._appUri = appUri;
@@ -3059,7 +3062,8 @@ class ClipperAuthInterceptor {
3059
3062
  withCredentials: true,
3060
3063
  setHeaders: {
3061
3064
  'ngsw-bypass': 'ngsw-bypass',
3062
- 'X-Client-Id': sessionStorage.getItem('clipper_client_id') ?? ''
3065
+ 'X-Client-Id': sessionStorage.getItem('clipper_client_id') ?? '',
3066
+ 'X-Machine-Id': sessionStorage.getItem('clipper_machine_id') ?? ''
3063
3067
  }
3064
3068
  });
3065
3069
  return next.handle(request)