buzzcasting-utils 1.9.0 → 1.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.
@@ -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?: IHighlight;
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,80 @@ 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
+ backdrop: string;
530
+ body: string;
531
+ brand: string;
532
+ count: string;
533
+ change: string;
534
+ highlight: string;
535
+ highlighted: string;
536
+ key: string;
537
+ host: string;
538
+ label: string;
539
+ legend: string;
540
+ row: string;
541
+ separator: string;
542
+ title: string;
543
+ widget: string;
544
+ words: string;
545
+ }
546
+
547
+ declare interface ICssContents {
548
+ body: string;
549
+ card: string;
550
+ globe?: string;
551
+ label: string;
552
+ widget: string;
553
+ }
554
+
555
+ declare interface ICssSeries {
556
+ arrowdown: string;
557
+ arrowup: string;
558
+ body: string;
559
+ brand: string;
560
+ change: string;
561
+ count: string;
562
+ down: string;
563
+ host: string;
564
+ label: string;
565
+ title: string;
566
+ up: string;
567
+ widget: string;
568
+ }
569
+
567
570
  export declare interface ID3Bubbles {
568
571
  size: number;
569
572
  force: number;
@@ -644,7 +647,7 @@ declare interface IDate {
644
647
  format: string;
645
648
  }
646
649
 
647
- export declare interface IDateFormat {
650
+ declare interface IDateFormat {
648
651
  time?: string;
649
652
  date?: string;
650
653
  locale?: string;
@@ -708,14 +711,43 @@ export declare interface IGeo {
708
711
  country: string;
709
712
  }
710
713
 
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;
714
+ declare interface IGlobe {
715
+ width: number;
716
+ height: number;
717
+ arc: IGlobeArc;
718
+ border: IGlobeBorder;
719
+ country: IGlobeCountry;
720
+ land: IGlobeLand;
721
+ sphere: IGlobeSphere;
722
+ }
723
+
724
+ declare interface IGlobeArc {
725
+ stroke: string;
726
+ line: number;
727
+ }
728
+
729
+ declare interface IGlobeBorder {
730
+ stroke: string;
731
+ line: number;
732
+ }
733
+
734
+ declare interface IGlobeCountry {
735
+ fill: string;
736
+ }
737
+
738
+ declare interface IGlobeLand {
739
+ fill: string;
740
+ }
741
+
742
+ declare interface IGlobeSphere {
743
+ stroke: string;
744
+ line: number;
745
+ fill: string;
746
+ }
747
+
748
+ export declare interface IHighlight {
749
+ label?: string;
750
+ color?: string[];
719
751
  }
720
752
 
721
753
  export declare interface IImage {
@@ -890,6 +922,33 @@ export declare interface ILayoutZones {
890
922
  ["x:string"]: ILayoutZone[];
891
923
  }
892
924
 
925
+ declare interface ILegend {
926
+ key: ILegendKey;
927
+ label: ILegendLabel;
928
+ count: ILegendCount;
929
+ width: string;
930
+ position: string;
931
+ show: IShowLegend;
932
+ gap: ILegendGap;
933
+ }
934
+
935
+ declare interface ILegendCount {
936
+ width: string;
937
+ }
938
+
939
+ declare interface ILegendGap {
940
+ column: string;
941
+ row: string;
942
+ }
943
+
944
+ declare interface ILegendKey {
945
+ width: string;
946
+ }
947
+
948
+ declare interface ILegendLabel {
949
+ width: string;
950
+ }
951
+
893
952
  export declare interface IMedium {
894
953
  type: string;
895
954
  url: string;
@@ -959,6 +1018,26 @@ export declare interface InfluencerLabel {
959
1018
 
960
1019
  export declare const intToString: (num: any, digits?: number, abbreviate?: boolean, locale?: string) => string;
961
1020
 
1021
+ declare interface IPie {
1022
+ radius: IPieRadius;
1023
+ animation: IPieAnimation;
1024
+ }
1025
+
1026
+ /**
1027
+ * Animation Duration
1028
+ */
1029
+ declare interface IPieAnimation {
1030
+ duration: number;
1031
+ }
1032
+
1033
+ /**
1034
+ * inner and outer radius in px
1035
+ */
1036
+ declare interface IPieRadius {
1037
+ inner: number;
1038
+ outer: number;
1039
+ }
1040
+
962
1041
  export declare interface IPreference {
963
1042
  id: string;
964
1043
  value?: string;
@@ -1078,15 +1157,15 @@ export declare interface ISeriesData {
1078
1157
 
1079
1158
  export declare interface ISeriesOptions {
1080
1159
  colors?: string;
1081
- css?: SeriesCss;
1160
+ css?: ICssSeries;
1082
1161
  time?: ITime;
1083
1162
  date?: IDate;
1084
1163
  dimensions?: IDimensions;
1085
- show?: Show;
1164
+ show?: IShowSeries;
1086
1165
  config?: IConfig;
1087
1166
  }
1088
1167
 
1089
- export declare interface IShow {
1168
+ declare interface IShowCard {
1090
1169
  approve?: boolean;
1091
1170
  avatar?: boolean;
1092
1171
  brand?: boolean;
@@ -1103,6 +1182,29 @@ export declare interface IShow {
1103
1182
  debug?: boolean;
1104
1183
  }
1105
1184
 
1185
+ declare interface IShowCloud {
1186
+ emojis: boolean;
1187
+ brand: boolean;
1188
+ date: boolean;
1189
+ gradient: boolean;
1190
+ hashtags: boolean;
1191
+ trend: boolean;
1192
+ debug?: boolean;
1193
+ }
1194
+
1195
+ declare interface IShowLegend {
1196
+ percentage: boolean;
1197
+ debug?: boolean;
1198
+ }
1199
+
1200
+ declare interface IShowSeries {
1201
+ brand: boolean;
1202
+ percentage: boolean;
1203
+ date: boolean;
1204
+ kpi: boolean;
1205
+ debug?: boolean;
1206
+ }
1207
+
1106
1208
  export declare interface ISlides {
1107
1209
  presentation: string;
1108
1210
  slides: any;
@@ -1221,6 +1323,13 @@ export declare interface IWidgetSettings {
1221
1323
  component: IWidgetComponent;
1222
1324
  }
1223
1325
 
1326
+ declare interface IWords {
1327
+ duration: number;
1328
+ multiplier: number;
1329
+ padding: number;
1330
+ range: string;
1331
+ }
1332
+
1224
1333
  export declare const json2html: (json: any) => any;
1225
1334
 
1226
1335
  export declare interface JsonChild {
@@ -1230,41 +1339,15 @@ export declare interface JsonChild {
1230
1339
  child: JsonChild[];
1231
1340
  }
1232
1341
 
1233
- export declare interface Key {
1234
- width: string;
1235
- }
1236
-
1237
1342
  export declare interface Kpi {
1238
1343
  name: string;
1239
1344
  }
1240
1345
 
1241
- export declare interface Label {
1242
- width: string;
1243
- }
1244
-
1245
- export declare interface Land {
1246
- fill: string;
1247
- }
1248
-
1249
1346
  export declare interface LandGeometry {
1250
1347
  type: GeoType;
1251
1348
  arcs: Array<Array<number[]>>;
1252
1349
  }
1253
1350
 
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
1351
  /**
1269
1352
  * Send Message to worker, don't block the main thread
1270
1353
  *
@@ -1325,19 +1408,25 @@ export declare function moderation(options: IStorageOptions, query: IQuery): IQu
1325
1408
 
1326
1409
  export declare function numberFormatter(num: number, digits: number): string;
1327
1410
 
1411
+ /**
1412
+ * Series
1413
+ */
1328
1414
  export declare interface Percentage {
1329
1415
  count: boolean;
1330
1416
  change: boolean;
1331
1417
  }
1332
1418
 
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;
1419
+ /**
1420
+ * Contents
1421
+ */
1422
+ export declare interface Qr {
1423
+ text: string;
1424
+ correction: string;
1425
+ margin: number;
1426
+ scale: number;
1427
+ colorDark: string;
1428
+ colorLight: string;
1429
+ outputMode: string;
1341
1430
  }
1342
1431
 
1343
1432
  export declare const randomColor: () => string;
@@ -1384,21 +1473,6 @@ export declare interface SeriesAttr {
1384
1473
  class?: string | string[];
1385
1474
  }
1386
1475
 
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
1476
  export declare interface Settings {
1403
1477
  contents: Content[];
1404
1478
  component: Component;
@@ -1409,24 +1483,8 @@ export declare enum ShapeType {
1409
1483
  Polygon = "Polygon"
1410
1484
  }
1411
1485
 
1412
- export declare interface Show {
1413
- brand: boolean;
1414
- percentage: Percentage;
1415
- date: boolean;
1416
- kpi: boolean;
1417
- }
1418
-
1419
1486
  export declare function showModal(e: MouseEvent, widget: any, message: IMessage, options: any): void;
1420
1487
 
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
1488
  export declare function shuffleMessages(messages: IMessage[]): IMessage[];
1431
1489
 
1432
1490
  export declare enum STORAGE {
@@ -1458,13 +1516,6 @@ export declare const upDownColor: (change: number) => "text-down text-xs" | "tex
1458
1516
 
1459
1517
  export declare function widgetParams(query: IQuery): IQuery;
1460
1518
 
1461
- export declare interface Words {
1462
- duration: number;
1463
- multiplier: number;
1464
- padding: number;
1465
- range: string;
1466
- }
1467
-
1468
1519
  export declare const wrapPromise: (promise: any, delay: number, reason: string) => Promise<any>;
1469
1520
 
1470
1521
  export declare interface XAxis {
@@ -1477,4 +1528,9 @@ export declare interface YAxis {
1477
1528
  type: string;
1478
1529
  }
1479
1530
 
1531
+ export declare interface Youtube {
1532
+ list: string;
1533
+ title: string;
1534
+ }
1535
+
1480
1536
  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.2",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "Mark Tamis, TouchFlows SAS",