buzzcasting-utils 1.9.0 → 1.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,8 +1,3 @@
1
- declare interface Animation_2 {
2
- duration: number;
3
- }
4
- export { Animation_2 as Animation }
5
-
6
1
  export declare function anonymize(name: string): string;
7
2
 
8
3
  export declare enum API {
@@ -35,22 +30,8 @@ export declare function attrs(attributes: NamedNodeMap): any;
35
30
 
36
31
  export declare const awaitElement: (selector: string) => Promise<unknown>;
37
32
 
38
- export declare interface Border {
39
- stroke: number;
40
- line: string;
41
- }
42
-
43
33
  export declare function brandLogo(channel: string, size: string): string;
44
34
 
45
- export declare interface Bubbles {
46
- label: string;
47
- size: string;
48
- classlist: string;
49
- force: number;
50
- color: string;
51
- multiplier: number;
52
- }
53
-
54
35
  /**
55
36
  * Convert string containing hyphens to camelCase
56
37
  * @param str
@@ -71,32 +52,6 @@ export declare const camelToHyphen: (str: string) => string;
71
52
 
72
53
  export declare const capitalizeFirstLetter: (prop: string) => string;
73
54
 
74
- export declare interface CardCss {
75
- avatar?: string;
76
- backdrop?: string;
77
- body?: string;
78
- bodylayout?: string;
79
- brand?: string;
80
- canvas?: string;
81
- card?: string;
82
- container?: string;
83
- dark?: boolean;
84
- date?: string;
85
- dynamics?: string;
86
- globe?: string;
87
- handle?: string;
88
- host?: string;
89
- image?: string;
90
- kpi?: string;
91
- label?: string;
92
- name?: string;
93
- play?: string;
94
- sender?: string;
95
- title?: string;
96
- video?: string;
97
- widget?: string;
98
- }
99
-
100
55
  /**
101
56
  * Clear Container range contents of template code when the web component is connected to the DOM
102
57
  * @param myNode
@@ -115,30 +70,6 @@ export declare interface CloudAttr {
115
70
  class?: string | string[];
116
71
  }
117
72
 
118
- export declare interface CloudCss {
119
- up: string;
120
- down: string;
121
- new: string;
122
- arrowup: string;
123
- arrowdown: string;
124
- chart: string;
125
- body: string;
126
- brand: string;
127
- count: string;
128
- change: string;
129
- highlight: string;
130
- highlighted: string;
131
- key: string;
132
- host: string;
133
- label: string;
134
- legend: string;
135
- row: string;
136
- separator: string;
137
- title: string;
138
- widget: string;
139
- words: string;
140
- }
141
-
142
73
  export declare interface Component {
143
74
  path: string;
144
75
  query: string;
@@ -156,10 +87,6 @@ export declare interface Content {
156
87
  attr: MessagesAttr;
157
88
  }
158
89
 
159
- export declare interface Count {
160
- width: string;
161
- }
162
-
163
90
  export declare interface CountriesGeometry {
164
91
  type: GeoType;
165
92
  arcs: Array<Array<number[] | number>>;
@@ -201,6 +128,9 @@ declare enum CSS_2 {
201
128
  }
202
129
  export { CSS_2 as CSS }
203
130
 
131
+ /**
132
+ * Cloud
133
+ */
204
134
  export declare interface Data {
205
135
  dashboard: string;
206
136
  type: string;
@@ -209,11 +139,6 @@ export declare interface Data {
209
139
 
210
140
  export declare function deepMerge(objs: any): void;
211
141
 
212
- export declare interface Dimensions {
213
- width: number;
214
- height: number;
215
- }
216
-
217
142
  declare const escape_2: (htmlStr: string) => string;
218
143
  export { escape_2 as escape }
219
144
 
@@ -301,11 +226,6 @@ export declare const flatten: (obj: any, res?: {}, parentKey?: string) => {};
301
226
 
302
227
  export declare function formatContent(message: IMessage, titleCss?: string): string;
303
228
 
304
- export declare interface Gap {
305
- column: string;
306
- row: string;
307
- }
308
-
309
229
  export declare interface GeoCountries {
310
230
  type: string;
311
231
  geometries: CountriesGeometry[];
@@ -329,21 +249,10 @@ export declare function getParameterByName(key: string): string | null;
329
249
 
330
250
  export declare const getQueryParam: (param: string) => any;
331
251
 
332
- export declare interface Globe {
333
- border: Border;
334
- land: Land;
335
- }
336
-
337
252
  export declare function hashSum(o: any): string | any[];
338
253
 
339
254
  export declare const hasHWA: () => boolean;
340
255
 
341
- declare interface Highlight_2 {
342
- label: string;
343
- color: string;
344
- }
345
- export { Highlight_2 as Highlight }
346
-
347
256
  export declare const html2json: (html: string) => {
348
257
  node: string;
349
258
  child: never[];
@@ -355,7 +264,7 @@ export declare const HTMLtoDOM: (html: string, doc: any) => any;
355
264
 
356
265
  export declare const HTMLtoXML: (html: string) => string;
357
266
 
358
- export declare interface IAnimation {
267
+ declare interface IAnimation {
359
268
  items?: number;
360
269
  interval: number;
361
270
  animation: number;
@@ -397,11 +306,23 @@ export declare interface IBorders {
397
306
  lineWidth: number;
398
307
  }
399
308
 
309
+ /**
310
+ * Card
311
+ */
400
312
  export declare interface IBrand {
401
313
  show?: boolean;
402
314
  size?: string;
403
315
  }
404
316
 
317
+ declare interface IBubbles {
318
+ label: string;
319
+ size: string;
320
+ classlist: string;
321
+ force: number;
322
+ color: string;
323
+ multiplier: number;
324
+ }
325
+
405
326
  export declare interface ICardAttributes {
406
327
  layout?: "" | "none" | "base" | "globe" | "carousel";
407
328
  component: string;
@@ -453,13 +374,13 @@ export declare interface ICardAttributes {
453
374
  export declare interface ICardOptions {
454
375
  animation?: IAnimation;
455
376
  brand?: IBrand;
456
- css?: CardCss;
377
+ css?: ICssCard;
457
378
  dateformat?: IDateFormat;
458
379
  debug?: boolean;
459
380
  delay?: number;
460
381
  globe?: IGlobe;
461
382
  locale?: string;
462
- show?: IShow;
383
+ show?: IShowCard;
463
384
  }
464
385
 
465
386
  export declare interface ICategory {
@@ -522,26 +443,24 @@ export declare interface ICloudInfluencersData {
522
443
  }
523
444
 
524
445
  export declare interface ICloudOptions {
525
- animation?: number;
526
- interval?: number;
527
- speed?: string;
446
+ animation?: IAnimation;
528
447
  component?: string;
529
- css?: CloudCss;
530
- bubbles?: Bubbles;
448
+ css?: ICssCloud;
449
+ bubbles?: IBubbles;
531
450
  config?: IConfig;
532
451
  colors?: string;
533
452
  data?: Data;
534
453
  time?: ITime;
535
454
  date?: IDate;
536
455
  debug?: boolean;
537
- dimensions?: Dimensions;
538
- globe?: Globe;
539
- highlight?: Highlight_2;
456
+ dimensions?: IDimensions;
457
+ globe?: IGlobe;
458
+ highlight?: Highlight;
540
459
  kpi?: Kpi;
541
- legend?: Legend;
542
- pie?: Pie;
543
- show?: ShowOptions;
544
- words?: Words;
460
+ legend?: ILegend;
461
+ pie?: IPie;
462
+ show?: IShowCloud;
463
+ words?: IWords;
545
464
  }
546
465
 
547
466
  declare interface IConfig {
@@ -552,6 +471,16 @@ declare interface IConfig {
552
471
  label?: string;
553
472
  }
554
473
 
474
+ export declare interface IContentsOptions {
475
+ css?: ICssContents;
476
+ date?: IDate;
477
+ globe?: IGlobe;
478
+ locale: string;
479
+ qr?: Qr;
480
+ time?: ITime;
481
+ youtube?: Youtube;
482
+ }
483
+
555
484
  export declare interface ICountries {
556
485
  type: string;
557
486
  objects: CountryObjects;
@@ -564,6 +493,79 @@ export declare interface ICountry {
564
493
  fillStyle: string;
565
494
  }
566
495
 
496
+ declare interface ICssCard {
497
+ avatar?: string;
498
+ backdrop?: string;
499
+ body?: string;
500
+ bodylayout?: string;
501
+ brand?: string;
502
+ canvas?: string;
503
+ card?: string;
504
+ container?: string;
505
+ dark?: boolean;
506
+ date?: string;
507
+ dynamics?: string;
508
+ globe?: string;
509
+ handle?: string;
510
+ host?: string;
511
+ image?: string;
512
+ kpi?: string;
513
+ label?: string;
514
+ name?: string;
515
+ play?: string;
516
+ sender?: string;
517
+ title?: string;
518
+ video?: string;
519
+ widget?: string;
520
+ }
521
+
522
+ declare interface ICssCloud {
523
+ up: string;
524
+ down: string;
525
+ new: string;
526
+ arrowup: string;
527
+ arrowdown: string;
528
+ chart: string;
529
+ body: string;
530
+ brand: string;
531
+ count: string;
532
+ change: string;
533
+ highlight: string;
534
+ highlighted: string;
535
+ key: string;
536
+ host: string;
537
+ label: string;
538
+ legend: string;
539
+ row: string;
540
+ separator: string;
541
+ title: string;
542
+ widget: string;
543
+ words: string;
544
+ }
545
+
546
+ declare interface ICssContents {
547
+ body: string;
548
+ card: string;
549
+ globe?: string;
550
+ label: string;
551
+ widget: string;
552
+ }
553
+
554
+ declare interface ICssSeries {
555
+ arrowdown: string;
556
+ arrowup: string;
557
+ body: string;
558
+ brand: string;
559
+ change: string;
560
+ count: string;
561
+ down: string;
562
+ host: string;
563
+ label: string;
564
+ title: string;
565
+ up: string;
566
+ widget: string;
567
+ }
568
+
567
569
  export declare interface ID3Bubbles {
568
570
  size: number;
569
571
  force: number;
@@ -644,7 +646,7 @@ declare interface IDate {
644
646
  format: string;
645
647
  }
646
648
 
647
- export declare interface IDateFormat {
649
+ declare interface IDateFormat {
648
650
  time?: string;
649
651
  date?: string;
650
652
  locale?: string;
@@ -708,14 +710,38 @@ export declare interface IGeo {
708
710
  country: string;
709
711
  }
710
712
 
711
- export declare interface IGlobe {
712
- arc: string;
713
- border: string;
714
- country: string;
715
- land: string;
716
- sphere: string;
717
- width?: number;
718
- height?: number;
713
+ declare interface IGlobe {
714
+ width: number;
715
+ height: number;
716
+ arc: IGlobeArc;
717
+ border: IGlobeBorder;
718
+ country: IGlobeCountry;
719
+ land: IGlobeLand;
720
+ sphere: IGlobeSphere;
721
+ }
722
+
723
+ declare interface IGlobeArc {
724
+ stroke: string;
725
+ line: number;
726
+ }
727
+
728
+ declare interface IGlobeBorder {
729
+ stroke: string;
730
+ line: number;
731
+ }
732
+
733
+ declare interface IGlobeCountry {
734
+ fill: string;
735
+ }
736
+
737
+ declare interface IGlobeLand {
738
+ fill: string;
739
+ }
740
+
741
+ declare interface IGlobeSphere {
742
+ stroke: string;
743
+ line: number;
744
+ fill: string;
719
745
  }
720
746
 
721
747
  export declare interface IImage {
@@ -890,6 +916,33 @@ export declare interface ILayoutZones {
890
916
  ["x:string"]: ILayoutZone[];
891
917
  }
892
918
 
919
+ declare interface ILegend {
920
+ key: ILegendKey;
921
+ label: ILegendLabel;
922
+ count: ILegendCount;
923
+ width: string;
924
+ position: string;
925
+ show: IShowLegend;
926
+ gap: ILegendGap;
927
+ }
928
+
929
+ declare interface ILegendCount {
930
+ width: string;
931
+ }
932
+
933
+ declare interface ILegendGap {
934
+ column: string;
935
+ row: string;
936
+ }
937
+
938
+ declare interface ILegendKey {
939
+ width: string;
940
+ }
941
+
942
+ declare interface ILegendLabel {
943
+ width: string;
944
+ }
945
+
893
946
  export declare interface IMedium {
894
947
  type: string;
895
948
  url: string;
@@ -959,6 +1012,26 @@ export declare interface InfluencerLabel {
959
1012
 
960
1013
  export declare const intToString: (num: any, digits?: number, abbreviate?: boolean, locale?: string) => string;
961
1014
 
1015
+ declare interface IPie {
1016
+ radius: IPieRadius;
1017
+ animation: IPieAnimation;
1018
+ }
1019
+
1020
+ /**
1021
+ * Animation Duration
1022
+ */
1023
+ declare interface IPieAnimation {
1024
+ duration: number;
1025
+ }
1026
+
1027
+ /**
1028
+ * inner and outer radius in px
1029
+ */
1030
+ declare interface IPieRadius {
1031
+ inner: number;
1032
+ outer: number;
1033
+ }
1034
+
962
1035
  export declare interface IPreference {
963
1036
  id: string;
964
1037
  value?: string;
@@ -1078,15 +1151,15 @@ export declare interface ISeriesData {
1078
1151
 
1079
1152
  export declare interface ISeriesOptions {
1080
1153
  colors?: string;
1081
- css?: SeriesCss;
1154
+ css?: ICssSeries;
1082
1155
  time?: ITime;
1083
1156
  date?: IDate;
1084
1157
  dimensions?: IDimensions;
1085
- show?: Show;
1158
+ show?: IShowSeries;
1086
1159
  config?: IConfig;
1087
1160
  }
1088
1161
 
1089
- export declare interface IShow {
1162
+ declare interface IShowCard {
1090
1163
  approve?: boolean;
1091
1164
  avatar?: boolean;
1092
1165
  brand?: boolean;
@@ -1103,6 +1176,26 @@ export declare interface IShow {
1103
1176
  debug?: boolean;
1104
1177
  }
1105
1178
 
1179
+ declare interface IShowCloud {
1180
+ emojis: boolean;
1181
+ brand: boolean;
1182
+ date: boolean;
1183
+ gradient: boolean;
1184
+ hashtags: boolean;
1185
+ trend: boolean;
1186
+ }
1187
+
1188
+ declare interface IShowLegend {
1189
+ percentage: boolean;
1190
+ }
1191
+
1192
+ declare interface IShowSeries {
1193
+ brand: boolean;
1194
+ percentage: boolean;
1195
+ date: boolean;
1196
+ kpi: boolean;
1197
+ }
1198
+
1106
1199
  export declare interface ISlides {
1107
1200
  presentation: string;
1108
1201
  slides: any;
@@ -1221,6 +1314,13 @@ export declare interface IWidgetSettings {
1221
1314
  component: IWidgetComponent;
1222
1315
  }
1223
1316
 
1317
+ declare interface IWords {
1318
+ duration: number;
1319
+ multiplier: number;
1320
+ padding: number;
1321
+ range: string;
1322
+ }
1323
+
1224
1324
  export declare const json2html: (json: any) => any;
1225
1325
 
1226
1326
  export declare interface JsonChild {
@@ -1230,41 +1330,15 @@ export declare interface JsonChild {
1230
1330
  child: JsonChild[];
1231
1331
  }
1232
1332
 
1233
- export declare interface Key {
1234
- width: string;
1235
- }
1236
-
1237
1333
  export declare interface Kpi {
1238
1334
  name: string;
1239
1335
  }
1240
1336
 
1241
- export declare interface Label {
1242
- width: string;
1243
- }
1244
-
1245
- export declare interface Land {
1246
- fill: string;
1247
- }
1248
-
1249
1337
  export declare interface LandGeometry {
1250
1338
  type: GeoType;
1251
1339
  arcs: Array<Array<number[]>>;
1252
1340
  }
1253
1341
 
1254
- export declare interface Legend {
1255
- key: Key;
1256
- label: Label;
1257
- count: Count;
1258
- width: string;
1259
- position: string;
1260
- show: LegendShow;
1261
- gap: Gap;
1262
- }
1263
-
1264
- export declare interface LegendShow {
1265
- percentage: boolean;
1266
- }
1267
-
1268
1342
  /**
1269
1343
  * Send Message to worker, don't block the main thread
1270
1344
  *
@@ -1325,19 +1399,25 @@ export declare function moderation(options: IStorageOptions, query: IQuery): IQu
1325
1399
 
1326
1400
  export declare function numberFormatter(num: number, digits: number): string;
1327
1401
 
1402
+ /**
1403
+ * Series
1404
+ */
1328
1405
  export declare interface Percentage {
1329
1406
  count: boolean;
1330
1407
  change: boolean;
1331
1408
  }
1332
1409
 
1333
- export declare interface Pie {
1334
- radius: Radius;
1335
- animation: Animation_2;
1336
- }
1337
-
1338
- export declare interface Radius {
1339
- inner: number;
1340
- outer: number;
1410
+ /**
1411
+ * Contents
1412
+ */
1413
+ export declare interface Qr {
1414
+ text: string;
1415
+ correction: string;
1416
+ margin: number;
1417
+ scale: number;
1418
+ colorDark: string;
1419
+ colorLight: string;
1420
+ outputMode: string;
1341
1421
  }
1342
1422
 
1343
1423
  export declare const randomColor: () => string;
@@ -1384,21 +1464,6 @@ export declare interface SeriesAttr {
1384
1464
  class?: string | string[];
1385
1465
  }
1386
1466
 
1387
- export declare interface SeriesCss {
1388
- arrowdown: string;
1389
- arrowup: string;
1390
- body: string;
1391
- brand: string;
1392
- change: string;
1393
- count: string;
1394
- down: string;
1395
- host: string;
1396
- label: string;
1397
- title: string;
1398
- up: string;
1399
- widget: string;
1400
- }
1401
-
1402
1467
  export declare interface Settings {
1403
1468
  contents: Content[];
1404
1469
  component: Component;
@@ -1409,24 +1474,8 @@ export declare enum ShapeType {
1409
1474
  Polygon = "Polygon"
1410
1475
  }
1411
1476
 
1412
- export declare interface Show {
1413
- brand: boolean;
1414
- percentage: Percentage;
1415
- date: boolean;
1416
- kpi: boolean;
1417
- }
1418
-
1419
1477
  export declare function showModal(e: MouseEvent, widget: any, message: IMessage, options: any): void;
1420
1478
 
1421
- export declare interface ShowOptions {
1422
- emojis: boolean;
1423
- brand: boolean;
1424
- date: boolean;
1425
- gradient: boolean;
1426
- hashtags: boolean;
1427
- trend: boolean;
1428
- }
1429
-
1430
1479
  export declare function shuffleMessages(messages: IMessage[]): IMessage[];
1431
1480
 
1432
1481
  export declare enum STORAGE {
@@ -1458,13 +1507,6 @@ export declare const upDownColor: (change: number) => "text-down text-xs" | "tex
1458
1507
 
1459
1508
  export declare function widgetParams(query: IQuery): IQuery;
1460
1509
 
1461
- export declare interface Words {
1462
- duration: number;
1463
- multiplier: number;
1464
- padding: number;
1465
- range: string;
1466
- }
1467
-
1468
1510
  export declare const wrapPromise: (promise: any, delay: number, reason: string) => Promise<any>;
1469
1511
 
1470
1512
  export declare interface XAxis {
@@ -1477,4 +1519,9 @@ export declare interface YAxis {
1477
1519
  type: string;
1478
1520
  }
1479
1521
 
1522
+ export declare interface Youtube {
1523
+ list: string;
1524
+ title: string;
1525
+ }
1526
+
1480
1527
  export { }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzcasting-utils",
3
3
  "type": "module",
4
- "version": "1.9.0",
4
+ "version": "1.9.1",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "Mark Tamis, TouchFlows SAS",