buzzcasting-storage 3.8.0 → 3.9.1

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.
@@ -1,29 +1,8 @@
1
- export declare function anonymize(name: string): string;
2
-
3
- export declare enum API {
4
- MESSAGES = "messages",
5
- CLOUD = "cloud",
6
- SERIES = "series",
7
- TOPICS = "topics",
8
- WIDGET = "widget",
9
- WIDGETS = "widgets",
10
- DASHBOARD = "dashboard",
11
- DASHBOARDS = "dashboards",
12
- SLIDE = "slide",
13
- SLIDES = "slides",
14
- PRESENTATION = "presentation",
15
- PRESENTATIONS = "presentations",
16
- PREFERENCE = "preference",
17
- PREFERENCES = "preferences"
18
- }
19
-
20
- export declare type ApiData = ISeries & IMessages & ICloud;
21
-
22
- export declare function attachedMedia(message: IMessage): IAttachedMedia;
23
-
24
- export declare function attrs(attributes: NamedNodeMap): any;
25
-
26
- export declare function brandLogo(channel: string, size: string): string;
1
+ import { IModal } from 'buzzcasting-utils';
2
+ import { IPreference } from 'buzzcasting-utils';
3
+ import { IQuery } from 'buzzcasting-utils';
4
+ import { IResponse } from 'buzzcasting-utils';
5
+ import { IStorageOptions } from 'buzzcasting-utils';
27
6
 
28
7
  export declare class BuzzcastingStorageManager {
29
8
  private sm;
@@ -89,484 +68,6 @@ export declare class BuzzcastingStorageReader {
89
68
  getSeries: (query: IQuery) => Promise<IResponse>;
90
69
  }
91
70
 
92
- /**
93
- * Convert string containing hyphens to camelCase
94
- * @param str
95
- * @returns string
96
- */
97
- export declare function camelCase(str: string): string;
98
-
99
- /**
100
- * Convert string containing hyphens to camelCase
101
- * @param str
102
- * @returns camilized string
103
- */
104
- export declare function camelize(str: string): string;
105
-
106
- export declare const capitalizeFirstLetter: (prop: string) => string;
107
-
108
- /**
109
- * Clear Container range contents of template code when the web component is connected to the DOM
110
- * @param myNode
111
- */
112
- export declare function clearContents(myNode: HTMLElement): void;
113
-
114
- declare enum CSS_2 {
115
- API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;",
116
- APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;",
117
- BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;",
118
- CLOUD = "color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;",
119
- DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;",
120
- ERROR = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;",
121
- GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;",
122
- HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;",
123
- KO = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;",
124
- MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;",
125
- NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;",
126
- NONE = "color:transparent;background-color:transparent;",
127
- OK = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;",
128
- PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;",
129
- SERIES = "color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;",
130
- SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;",
131
- STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;",
132
- SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;",
133
- WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;",
134
- WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;"
135
- }
136
- export { CSS_2 as CSS }
137
-
138
- export declare function deepMerge(objs: any): void;
139
-
140
- export declare enum EVENTS {
141
- ADD_SLIDE = "addSlide",
142
- APP_READY = "appReady",
143
- API_UPDATE = "apiUpdate",
144
- WS_API_REQUEST = "wsApiRequest",
145
- WS_API_RESPONSE = "wsApiResponse",
146
- WS_API_UPDATE = "wsApiRUpdate",
147
- APPROVE_MESSAGE = "approveMessage",
148
- CHANNEL = "channel",
149
- CLEAN_MESSAGES = "cleanMessages",
150
- CLOSE_MODAL = "closeModal",
151
- CLOSE_BUILDER_MODAL = "closeBuilderModal",
152
- DASHBOARD_LOAD = "loadDashboard",
153
- DASHBOARD_STORE = "storeDashboard",
154
- ERROR = "error",
155
- HIDE_MESSAGE = "hideMessage",
156
- HIDE_LABELS = "hideLabels",
157
- MAUPPUT_UPDATE = "layoutUpdate",
158
- PREV_SLIDE = "prevSlide",
159
- RELOAD_PRESENTATION = "reloadPresentation",
160
- SHOW_MODAL = "showModal",
161
- STAR_MESSAGE = "starMessage",
162
- GOTO_SLIDE = "gotoSlide",
163
- NEXT_SLIDE = "nextSlide",
164
- PREFERENCE_LOAD = "loadPreference",
165
- PREFERENCE_STORE = "storePreference",
166
- PAUSE_PRESENTATION = "pausePresentation",
167
- PRESENTATION_READY = "presentationReady",
168
- PRESENTATION_LOAD = "loadPresentation",
169
- PRESENTATION_STORE = "storePresentation",
170
- SHOW_BUILDER_MODAL = "showBuilderModal",
171
- SLIDE_DID_LOAD = "slideDidLoad",
172
- SLIDE_GOTO = "slideGoto",
173
- SLIDE_READY = "slideReady",
174
- SLIDE_LOAD = "loadSlide",
175
- SLIDE_STORE = "storeSlide",
176
- SLIDE_TRANSITIONER = "slideTransitioner",
177
- START_TRANSITIONER = "startTransitioner",
178
- STORAGE_INIT = "storageInit",
179
- SUBSCRIBE = "subscribe",
180
- SUSPEND_ACCOUNT = "suspendAccount",
181
- SWITCH_PRESENTATION = "switchPresentation",
182
- REMOVE_CLOUD = "removeCloud",
183
- UPDATE = "update",
184
- VERSION = "version",
185
- WIDGETS_CLEAR = "widgetsClear",
186
- WIDGET_LOAD = "widgetLoad",
187
- WIDGET_STORE = "widgetStore",
188
- WIDGET_UPDATE = "widgetUpdate"
189
- }
190
-
191
- export declare function filterAttributes(attributes: NamedNodeMap): IFilteredAttributes;
192
-
193
- export declare function formatContent(message: IMessage, titleCss?: string): string;
194
-
195
- export declare function hashSum(o: any): string | any[];
196
-
197
- declare interface IAttachedMedia {
198
- image?: string;
199
- background: {
200
- backgroundimage?: string;
201
- } | null;
202
- video?: string;
203
- }
204
-
205
- export declare interface ICategory {
206
- type: string;
207
- data: string[];
208
- }
209
-
210
- /**
211
- * Cloud
212
- */
213
- export declare interface ICloud {
214
- labels: ILabel[];
215
- current: any[];
216
- previous: any[];
217
- type: string;
218
- total: number;
219
- current_total: number;
220
- previous_total: number;
221
- }
222
-
223
- declare interface ICloudIndicators {
224
- total: number;
225
- positive: number;
226
- negative: number;
227
- neutral: number;
228
- engagement: number;
229
- reach: number;
230
- velocity: number;
231
- }
232
-
233
- export declare interface IDashboard {
234
- id: string;
235
- title: string;
236
- project: {
237
- id: string;
238
- title: string;
239
- };
240
- commandcenter: any;
241
- widgets?: IWidget[];
242
- }
243
-
244
- export declare interface IDashboards {
245
- dashboards: IDashboard[];
246
- }
247
-
248
- export declare interface IDynamics {
249
- engagement?: number;
250
- semrush_visits?: number;
251
- potential_reach?: number;
252
- facebook_engagement?: number;
253
- facebook_insights_reach?: number;
254
- facebook_insights_impressions?: number;
255
- facebook_insights_link_clicks?: number;
256
- facebook_reactions?: number;
257
- facebook_shares?: number;
258
- instagram_followers?: number;
259
- instagram_likes?: number;
260
- retweets?: number;
261
- twitter_shares?: number;
262
- twitter_bookmarks?: number;
263
- twitter_followers?: number;
264
- twitter_impressions?: number;
265
- twitter_insights_retweets?: number;
266
- twitter_likes?: number;
267
- twitter_replies?: number;
268
- twitter_video_views?: number;
269
- total_comments?: number;
270
- trending_score?: number;
271
- }
272
-
273
- declare interface IFilteredAttributes {
274
- [key: string]: string | object;
275
- }
276
-
277
- export declare interface IGeo {
278
- latitude?: number;
279
- longitude?: number;
280
- zip?: string;
281
- street: string;
282
- city?: string;
283
- country: string;
284
- }
285
-
286
- export declare interface IIndicators {
287
- value: number;
288
- }
289
-
290
- export declare interface ILabel {
291
- label: string;
292
- count: number;
293
- info?: string;
294
- current: ICloudIndicators;
295
- previous?: ICloudIndicators;
296
- percentage?: number;
297
- }
298
-
299
- export declare interface IMedium {
300
- type: string;
301
- url: string;
302
- width: number;
303
- height: number;
304
- }
305
-
306
- export declare interface IMessage {
307
- id: string;
308
- published: string;
309
- harvested: string;
310
- utc: number;
311
- expires: number;
312
- channel: string;
313
- type: string;
314
- sender: ISender;
315
- reply: string;
316
- replyto: string;
317
- page: string;
318
- conversation: string;
319
- title: string;
320
- content: string;
321
- sentiment: number;
322
- link: string;
323
- language?: string;
324
- region?: string;
325
- topics: ITopic[];
326
- dynamics?: IDynamics;
327
- geo?: IGeo;
328
- media?: IMedium[];
329
- }
330
-
331
- export declare interface IMessages {
332
- messages: IMessage[];
333
- presentation?: string;
334
- slide?: string;
335
- title?: string;
336
- dashboard?: string;
337
- widget?: string;
338
- topics?: string;
339
- }
340
-
341
- export declare interface IMetrics {
342
- doc?: number;
343
- previous?: number;
344
- change?: number;
345
- }
346
-
347
- /**
348
- * IModal
349
- */
350
- export declare interface IModal {
351
- showComponent: string;
352
- props?: any;
353
- timeout?: number;
354
- }
355
-
356
- export declare function intToString(num: any, digits: number): string;
357
-
358
- export declare interface IPreference {
359
- id: string;
360
- value?: string;
361
- update?: number;
362
- }
363
-
364
- export declare interface IPreferences {
365
- preferences: IPreference[];
366
- }
367
-
368
- export declare interface IPresentation {
369
- id: string;
370
- name: string;
371
- link: string;
372
- delay: number;
373
- canModerate: boolean;
374
- period: number;
375
- slide_interval: number;
376
- update: number;
377
- }
378
-
379
- export declare interface IPresentations {
380
- presentations: IPresentation[];
381
- }
382
-
383
- /**
384
- * Query
385
- */
386
- export declare interface IQuery {
387
- [x: string]: any;
388
- topics?: string;
389
- presentation?: string;
390
- dashboard: string;
391
- widget: string;
392
- labels?: string[];
393
- compare?: string;
394
- period?: number;
395
- type?: "cloud" | "messages" | "series" | "preference" | "proxy" | "slide" | "dashboard" | "widget";
396
- order?: "utc" | "reach" | "engagement" | "impressions";
397
- media?: number;
398
- dynamics?: number;
399
- geo?: number;
400
- delay?: string;
401
- approved?: string;
402
- moderation?: "realtime" | "delayed" | "approved" | "none";
403
- hrm?: string;
404
- before?: number;
405
- since?: number;
406
- hash?: string;
407
- name?: string;
408
- data?: any;
409
- }
410
-
411
- /**
412
- * API Response
413
- */
414
- export declare interface IResponse {
415
- data: IDashboards | IMessages | ISeries | ICloud | ISlides | IPresentations | IPreferences | IWidgets | null;
416
- message: string;
417
- success: boolean;
418
- query?: IQuery;
419
- }
420
-
421
- /**
422
- * Messages
423
- */
424
- export declare interface ISender {
425
- id?: string;
426
- channel?: string;
427
- title?: string;
428
- name?: string;
429
- avatar?: string;
430
- bio?: string;
431
- location?: string;
432
- verified?: number;
433
- following?: number;
434
- followers?: number;
435
- listed?: number;
436
- favourites?: number;
437
- messages?: number;
438
- influence?: number;
439
- }
440
-
441
- /**
442
- * Series Data
443
- */
444
- export declare interface ISeries {
445
- topic: string;
446
- title: string;
447
- series: ISeriesData[];
448
- category: ICategory;
449
- metrics?: IMetrics;
450
- indicators?: IIndicators;
451
- timestamp?: number;
452
- }
453
-
454
- export declare interface ISeriesData {
455
- name?: string;
456
- label?: string;
457
- current?: number[];
458
- current_total?: number;
459
- previous_total?: number;
460
- previous?: number[];
461
- current_category?: number;
462
- previous_category?: number;
463
- }
464
-
465
- export declare interface ISlides {
466
- presentation: string;
467
- slides: any;
468
- }
469
-
470
- /**
471
- * Storage Options
472
- */
473
- export declare interface IStorageOptions {
474
- app: string;
475
- builder?: boolean;
476
- domain?: string;
477
- cdn?: string;
478
- channel?: string;
479
- presentation: string;
480
- slide?: string;
481
- slides?: string[];
482
- display?: string;
483
- monitor?: string;
484
- version: string;
485
- storage: string;
486
- token?: string;
487
- bearer?: string;
488
- csrf?: string;
489
- moderation?: string;
490
- beforeTime?: string;
491
- delay?: number;
492
- period?: number;
493
- retention?: number;
494
- suspended?: boolean;
495
- loglevel?: number;
496
- }
497
-
498
- export declare interface ITopic {
499
- message_id: string;
500
- dashboard_id?: string;
501
- widget_id?: string;
502
- topic?: string;
503
- engagement: number;
504
- impressions: number;
505
- reach: number;
506
- sentiment: number;
507
- title?: string;
508
- utc?: number;
509
- expires?: number;
510
- visible?: number;
511
- }
512
-
513
- export declare interface IWidget {
514
- id: string;
515
- title: string;
516
- type: string;
517
- filters?: any;
518
- custom_filters?: any;
519
- creation_date?: string;
520
- period?: string;
521
- }
522
-
523
- export declare interface IWidgets {
524
- widgets: IWidget[];
525
- }
526
-
527
- export declare enum MODERATION {
528
- APPROVED = "approved",
529
- BEFORE = "before",
530
- DELAYED = "delayed",
531
- NONE = "none",
532
- REALTIME = "realtime"
533
- }
534
-
535
- export declare function numberFormatter(num: number, digits: number): string;
536
-
537
- /**
538
- * Get a random item from an array
539
- * @param array
540
- * @returns
541
- */
542
- export declare function randomValue(array: string | any[]): number;
543
-
544
- export declare function rtl(message: IMessage): {
545
- [key: string]: string;
546
- };
547
-
548
- export declare function sanitize(messages: IMessage[]): IMessage[];
549
-
550
- export declare function showModal(e: MouseEvent, widget: Widget, message: IMessage, options: any): void;
551
-
552
- export declare function shuffleMessages(messages: IMessage[]): IMessage[];
553
-
554
- export declare enum STORAGE {
555
- KEYVAL = "keyval",
556
- LOCAL = "local",
557
- SESSION = "session",
558
- DEXIE = "dexie",
559
- WINDOW = "window"
560
- }
561
-
562
- /**
563
- * Generate a unique identifier
564
- * @returns uid
565
- */
566
- export declare function stringGen(): string;
567
-
568
- export declare const upDownColor: (change: number) => "text-down text-xs" | "text-up text-xs" | "text-white text-xs";
569
-
570
71
  /**
571
72
  * Main class for managing widgets and data updates
572
73
  */
@@ -629,6 +130,4 @@ export declare class Widget {
629
130
  destroy(): void;
630
131
  }
631
132
 
632
- export declare function widgetParams(query: IQuery): IQuery;
633
-
634
133
  export { }