@koredev/kore-web-sdk 11.19.0-rc.71a5d9b → 11.19.0-rc.9dc0256

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.
@@ -39,6 +39,10 @@ declare class Korei18nPlugin {
39
39
  today: string;
40
40
  yesterday: string;
41
41
  clickToCall: string;
42
+ read: string;
43
+ delivered: string;
44
+ sent: string;
45
+ you: string;
42
46
  };
43
47
  ja: {
44
48
  message: string;
@@ -75,6 +79,10 @@ declare class Korei18nPlugin {
75
79
  today: string;
76
80
  yesterday: string;
77
81
  clickToCall: string;
82
+ read: string;
83
+ delivered: string;
84
+ sent: string;
85
+ you: string;
78
86
  };
79
87
  ko: {
80
88
  message: string;
@@ -111,6 +119,10 @@ declare class Korei18nPlugin {
111
119
  today: string;
112
120
  yesterday: string;
113
121
  clickToCall: string;
122
+ read: string;
123
+ delivered: string;
124
+ sent: string;
125
+ you: string;
114
126
  };
115
127
  zh: {
116
128
  message: string;
@@ -147,6 +159,10 @@ declare class Korei18nPlugin {
147
159
  today: string;
148
160
  yesterday: string;
149
161
  clickToCall: string;
162
+ read: string;
163
+ delivered: string;
164
+ sent: string;
165
+ you: string;
150
166
  };
151
167
  de: {
152
168
  message: string;
@@ -183,6 +199,10 @@ declare class Korei18nPlugin {
183
199
  today: string;
184
200
  yesterday: string;
185
201
  clickToCall: string;
202
+ read: string;
203
+ delivered: string;
204
+ sent: string;
205
+ you: string;
186
206
  };
187
207
  };
188
208
  };
@@ -26,7 +26,10 @@ declare class ProactiveWebCampaignPlugin {
26
26
  private static readonly CHAT_CONTAINER_SELECTOR;
27
27
  private static readonly MAX_API_RETRIES;
28
28
  private static readonly RETRY_DELAY_MS;
29
+ private static readonly TEMPLATE_PERSIST_DURATION;
29
30
  isPendingSendAPIEvent: boolean;
31
+ private currentPersistedTemplate;
32
+ private isTemplateRestored;
30
33
  coolDownTime: number;
31
34
  cooldownState: {
32
35
  isActive: boolean;
@@ -41,6 +44,11 @@ declare class ProactiveWebCampaignPlugin {
41
44
  generateBrowserSessionId(): string;
42
45
  onHostCreate(): void;
43
46
  onInit(): void;
47
+ /**
48
+ * Called when view is initialized (DOM ready)
49
+ * Attempts template restoration for chat templates that need DOM access
50
+ */
51
+ onViewInit(): void;
44
52
  onUrlChange(callback: () => void): void;
45
53
  onTitleChange(callback: (newTitle: string) => void): void;
46
54
  /**
@@ -322,6 +330,32 @@ declare class ProactiveWebCampaignPlugin {
322
330
  * @param responseData - API response data
323
331
  */
324
332
  handlePweEventResponse(responseData: any): void;
333
+ /**
334
+ * Persists template data to sessionStorage for multi-page persistence
335
+ * @param templateData - Template data to persist
336
+ */
337
+ private persistTemplate;
338
+ /**
339
+ * Public method for templates to call when closing
340
+ * Clears persisted template from both memory and sessionStorage
341
+ */
342
+ clearPersistedTemplateFromStorage(): void;
343
+ /**
344
+ * Checks if a persisted template has expired
345
+ * @param template - Persisted template to check
346
+ * @returns Boolean indicating if template has expired
347
+ */
348
+ private isTemplateExpired;
349
+ /**
350
+ * Restores persisted template from sessionStorage if valid
351
+ * Called during onInit after PWC state restoration
352
+ */
353
+ private restorePersistedTemplate;
354
+ /**
355
+ * Re-renders a persisted template in the DOM
356
+ * @param template - Persisted template to render
357
+ */
358
+ private renderPersistedTemplate;
325
359
  /**
326
360
  * Constructs the pwe_data object based on the new campaign structure
327
361
  * Extracts custom column configurations and initializes custom data