@weldsuite/helpdesk-widget-sdk 1.0.15 → 1.0.17

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/dist/react.d.ts CHANGED
@@ -29,41 +29,6 @@ interface PositionConfig {
29
29
  left?: string;
30
30
  top?: string;
31
31
  }
32
- /**
33
- * Customization configuration
34
- */
35
- interface CustomizationConfig {
36
- primaryColor?: string;
37
- accentColor?: string;
38
- backgroundColor?: string;
39
- textColor?: string;
40
- fontFamily?: string;
41
- fontSize?: string;
42
- borderRadius?: string;
43
- }
44
- /**
45
- * Feature flags
46
- */
47
- interface FeatureConfig {
48
- attachments?: boolean;
49
- reactions?: boolean;
50
- typing?: boolean;
51
- readReceipts?: boolean;
52
- offlineMode?: boolean;
53
- fileUpload?: boolean;
54
- imageUpload?: boolean;
55
- voiceMessages?: boolean;
56
- videoMessages?: boolean;
57
- }
58
- /**
59
- * Mobile configuration
60
- */
61
- interface MobileConfig {
62
- fullScreen?: boolean;
63
- scrollLock?: boolean;
64
- keyboardHandling?: 'auto' | 'manual';
65
- safeAreaInsets?: boolean;
66
- }
67
32
  /**
68
33
  * Iframe configuration
69
34
  */
@@ -156,15 +121,13 @@ interface SecurityConfig {
156
121
  */
157
122
  interface WeldConfig {
158
123
  widgetId: string;
124
+ testMode?: boolean;
159
125
  api?: Partial<ApiConfig>;
160
126
  iframes?: Partial<IframeConfig>;
161
127
  position?: {
162
128
  launcher?: PositionConfig;
163
129
  widget?: PositionConfig;
164
130
  };
165
- customization?: CustomizationConfig;
166
- features?: FeatureConfig;
167
- mobile?: MobileConfig;
168
131
  auth?: AuthConfig;
169
132
  locale?: LocaleConfig;
170
133
  logging?: LogConfig;
@@ -184,11 +147,9 @@ interface WeldConfig {
184
147
  */
185
148
  interface ResolvedConfig {
186
149
  widgetId: string;
150
+ testMode?: boolean;
187
151
  api: ApiConfig;
188
152
  iframes: IframeConfig;
189
- customization: CustomizationConfig;
190
- features: FeatureConfig;
191
- mobile: MobileConfig;
192
153
  auth: AuthConfig;
193
154
  locale: LocaleConfig;
194
155
  logging: LogConfig;
@@ -458,11 +419,16 @@ declare class WeldSDK {
458
419
  private readyResolve;
459
420
  private boundHandleLauncherClick;
460
421
  private subscriptionIds;
422
+ private pageTrackingCleanup;
461
423
  constructor(config: WeldConfig);
462
424
  /**
463
425
  * Handle launcher click messages from iframe
464
426
  */
465
427
  private handleLauncherClickMessage;
428
+ /**
429
+ * Show fullscreen image lightbox on the parent page
430
+ */
431
+ private showImageLightbox;
466
432
  /**
467
433
  * Initialize the SDK and render widget
468
434
  */
@@ -487,6 +453,22 @@ declare class WeldSDK {
487
453
  * Check if SDK is ready
488
454
  */
489
455
  isReady(): boolean;
456
+ /**
457
+ * Update callbacks on an existing instance (used by singleton reuse)
458
+ */
459
+ updateCallbacks(config: Partial<WeldConfig>): void;
460
+ /**
461
+ * Persist open/closed state to sessionStorage
462
+ */
463
+ private persistOpenState;
464
+ /**
465
+ * Clear persisted state from sessionStorage
466
+ */
467
+ private clearPersistedState;
468
+ /**
469
+ * Check if widget was previously open (from sessionStorage)
470
+ */
471
+ private wasOpen;
490
472
  /**
491
473
  * Open the widget
492
474
  */
@@ -642,10 +624,23 @@ declare class WeldSDK {
642
624
  * Disable debug mode
643
625
  */
644
626
  disableDebug(): void;
627
+ /**
628
+ * Send a page change message to the widget iframe
629
+ */
630
+ private sendPageChange;
631
+ /**
632
+ * Start tracking page URL changes (SPA navigations + popstate)
633
+ */
634
+ private startPageTracking;
645
635
  /**
646
636
  * Ensure SDK is ready before operation
647
637
  */
648
638
  private ensureReady;
639
+ /**
640
+ * Detach from the current component lifecycle without destroying the widget.
641
+ * Use this as a React useEffect cleanup — the widget stays alive across navigations.
642
+ */
643
+ detach(): void;
649
644
  /**
650
645
  * Destroy SDK and cleanup
651
646
  */