buzzcasting-storage 2.9.0 → 2.9.2

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.
@@ -208,6 +208,15 @@ export declare interface IMetrics {
208
208
  change?: number;
209
209
  }
210
210
 
211
+ /**
212
+ * IModal
213
+ */
214
+ export declare interface IModal {
215
+ showComponent: string;
216
+ dataset?: any;
217
+ attributes?: any;
218
+ }
219
+
211
220
  /**
212
221
  * Query
213
222
  */
@@ -317,8 +326,6 @@ export declare interface ITopic {
317
326
  sentiment: number;
318
327
  }
319
328
 
320
- export declare function messageId(e: MouseEvent, selector?: string): string | undefined;
321
-
322
329
  export declare enum MODERATION {
323
330
  APPROVED = "approved",
324
331
  BEFORE = "before",
@@ -335,6 +342,9 @@ export declare enum STORAGE {
335
342
  WINDOW = "window"
336
343
  }
337
344
 
345
+ /**
346
+ * Main class for managing widgets and data updates
347
+ */
338
348
  export declare class Widget {
339
349
  private storageReader;
340
350
  private broadcastChannel;
@@ -342,9 +352,11 @@ export declare class Widget {
342
352
  private attributes;
343
353
  private listeners;
344
354
  /**
355
+ * Main container for managing widgets and data updates
345
356
  *
357
+ * @param element widget web component
346
358
  * @param callbacks functions in the widget that will receive the update
347
- * @param query
359
+ * @param selector container for the element - by default buzzcasting-slide (optional)
348
360
  */
349
361
  constructor(element: HTMLElement, callbacks: Array<(arg: IResponse) => void>, selector?: string);
350
362
  addListener(cb: (arg: IResponse) => void): void;
@@ -352,15 +364,42 @@ export declare class Widget {
352
364
  * Data received from BroadcastChannel
353
365
  */
354
366
  startListener(): void;
367
+ /**
368
+ * This is used to register the component on the container's broadcast channel
369
+ * This takes place when the container indicates it has finished loading (ready)
370
+ */
355
371
  subscribe(): void;
372
+ /**
373
+ * Generic call to any query type
374
+ *
375
+ * @returns IResponse
376
+ */
377
+ getData: () => Promise<IResponse>;
378
+ /**
379
+ * Get Widget Coud Data
380
+ *
381
+ * @returns IResponse
382
+ */
356
383
  getCloud: () => Promise<IResponse>;
384
+ /**
385
+ * Get Widget Messages Data
386
+ *
387
+ * @returns IResponse
388
+ */
357
389
  getMessages: () => Promise<IResponse>;
390
+ /**
391
+ * Get Widget Series Data
392
+ *
393
+ * @returns IResponse
394
+ */
358
395
  getSeries: () => Promise<IResponse>;
359
- showModal: (modal: {
360
- showComponent: string;
361
- dataset?: any;
362
- attributes?: any;
363
- }) => void;
396
+ /**
397
+ * Emit a show modal event using the element's attributes
398
+ * the component is the web component name to show
399
+ *
400
+ * @param modal IModal
401
+ */
402
+ showModal: (modal: IModal) => void;
364
403
  destroy(): void;
365
404
  }
366
405