buzzcasting-utils 1.6.5 → 1.6.7

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.
@@ -632,6 +632,9 @@ export declare interface IDateFormat {
632
632
 
633
633
  export declare interface IDynamics {
634
634
  engagement?: number;
635
+ video_views?: number;
636
+ sentiment?: 0;
637
+ reach?: number;
635
638
  semrush_visits?: number;
636
639
  potential_reach?: number;
637
640
  facebook_engagement?: number;
@@ -640,6 +643,10 @@ export declare interface IDynamics {
640
643
  facebook_insights_link_clicks?: number;
641
644
  facebook_reactions?: number;
642
645
  facebook_shares?: number;
646
+ linkedin_impressions?: number;
647
+ linkedin_likes?: number;
648
+ linkedin_shares?: number;
649
+ linkedin_clicks?: number;
643
650
  instagram_followers?: number;
644
651
  instagram_likes?: number;
645
652
  retweets?: number;
@@ -23,7 +23,7 @@ function q(e) {
23
23
  const t = {};
24
24
  for (let r = 0; r < e.length; r++) {
25
25
  const n = e.item(r);
26
- n != null && n.name && (t[n.name] = n.value);
26
+ n?.name && (t[n.name] = n.value);
27
27
  }
28
28
  return t;
29
29
  }
@@ -134,7 +134,7 @@ function P(e) {
134
134
  }
135
135
  const de = (e) => [...new Set(e)], ue = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
136
136
  function fe(e, t = "font-bold") {
137
- return `${(e == null ? void 0 : e.title) !== null ? `<div class="${t}">${e.title}</div>` : ""}${e != null && e.content ? e.content.replace(/\n\n/g, `
137
+ return `${e?.title !== null ? `<div class="${t}">${e.title}</div>` : ""}${e?.content ? e.content.replace(/\n\n/g, `
138
138
  `).replace(/\n/g, "<br/>") : ""}`;
139
139
  }
140
140
  const pe = () => [b(2), b(1), b(1), b(1), b(3)].join("-"), b = (e) => {
@@ -156,14 +156,14 @@ function f(e, t) {
156
156
  n = t.charCodeAt(r), e = (e << 5) - e + n, e |= 0;
157
157
  return e < 0 ? e * -2 : e;
158
158
  }
159
- function S(e, t, r) {
159
+ function y(e, t, r) {
160
160
  return Object.keys(t).sort().reduce(n, e);
161
161
  function n(o, a) {
162
162
  return L(o, t[a], a, r);
163
163
  }
164
164
  }
165
165
  function L(e, t, r, n) {
166
- const o = f(f(f(e, r), y(t)), typeof t);
166
+ const o = f(f(f(e, r), S(t)), typeof t);
167
167
  if (t === null)
168
168
  return f(o, "null");
169
169
  if (t === void 0)
@@ -172,7 +172,7 @@ function L(e, t, r, n) {
172
172
  if (n.includes(t))
173
173
  return f(o, `[Circular]${r}`);
174
174
  n.push(t);
175
- const a = S(o, t, n);
175
+ const a = y(o, t, n);
176
176
  if (!("valueOf" in t) || typeof t.valueOf != "function")
177
177
  return a;
178
178
  try {
@@ -183,7 +183,7 @@ function L(e, t, r, n) {
183
183
  }
184
184
  return f(o, t.toString());
185
185
  }
186
- function y(e) {
186
+ function S(e) {
187
187
  return Object.prototype.toString.call(e);
188
188
  }
189
189
  function ge(e) {
@@ -480,14 +480,13 @@ function ke(e) {
480
480
  return {};
481
481
  }
482
482
  }
483
- function Se(e) {
483
+ function ye(e) {
484
484
  const t = window.BuzzCasting.getOptions().suspended ?? !1;
485
485
  return e.forEach((r) => {
486
- var n;
487
- if (t ? r.content = "License suspended, please contact your Sales Representative to restore service" : r.content = ((n = r.content) == null ? void 0 : n.replace(
486
+ if (t ? r.content = "License suspended, please contact your Sales Representative to restore service" : r.content = r.content?.replace(
488
487
  /(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g,
489
488
  ""
490
- )) || "", r.sender !== null)
489
+ ) || "", r.sender !== null)
491
490
  switch (!0) {
492
491
  case r.sender.title === "Unknown author":
493
492
  r.sender.title = "", r.sender.name = "";
@@ -516,12 +515,12 @@ function Se(e) {
516
515
  influence: 0
517
516
  };
518
517
  if (r.sender.title === "" && r.link !== "") {
519
- const o = new URL(r.link);
520
- r.sender.title = o.hostname.replace("www.", "");
518
+ const n = new URL(r.link);
519
+ r.sender.title = n.hostname.replace("www.", "");
521
520
  }
522
521
  }), e;
523
522
  }
524
- function ye(e, t, r, n) {
523
+ function Se(e, t, r, n) {
525
524
  e.stopPropagation(), t.showModal({
526
525
  showComponent: "card-modal",
527
526
  props: { data: r, options: n }
@@ -542,7 +541,7 @@ function $e() {
542
541
  return e;
543
542
  }
544
543
  const Ce = (e) => {
545
- switch (e == null ? void 0 : e.type) {
544
+ switch (e?.type) {
546
545
  case h.MESSAGES:
547
546
  return m.MESSAGES;
548
547
  case h.SERIES:
@@ -574,19 +573,17 @@ function Te(e) {
574
573
  return e.order && (t += `.${e.order}`), e.period && (t += `.${e.period}`), t;
575
574
  }
576
575
  function He(e) {
577
- var t;
578
576
  if (e.widget === void 0) {
579
- const r = (t = e.topics) == null ? void 0 : t.split("-");
580
- r && r.length > 1 ? (e.dashboard = r ? r[0] : "", e.widget = r ? r[1] : "") : (e.widget = e.topics, e.dashboard = e.slide);
577
+ const t = e.topics?.split("-");
578
+ t && t.length > 1 ? (e.dashboard = t ? t[0] : "", e.widget = t ? t[1] : "") : (e.widget = e.topics, e.dashboard = e.slide);
581
579
  }
582
580
  return e;
583
581
  }
584
582
  function We(e, t) {
585
- var i;
586
583
  let r, n, o, a, l;
587
584
  switch (e.moderation) {
588
585
  case x.BEFORE:
589
- r = /* @__PURE__ */ new Date(), n = (i = e.beforeTime) == null ? void 0 : i.split(":"), o = Number.parseInt(n ? n[0] : "00"), a = Number.parseInt(n ? n[1] : "00"), l = Number.parseInt(n ? n[2] : "00"), t.before = r.setHours(o, a, l, 0) / 1e3, t.period || (t.period = r.getDay() === 1 ? 72 : 24);
586
+ r = /* @__PURE__ */ new Date(), n = e.beforeTime?.split(":"), o = Number.parseInt(n ? n[0] : "00"), a = Number.parseInt(n ? n[1] : "00"), l = Number.parseInt(n ? n[2] : "00"), t.before = r.setHours(o, a, l, 0) / 1e3, t.period || (t.period = r.getDay() === 1 ? 72 : 24);
590
587
  break;
591
588
  case x.DELAYED:
592
589
  e.delay && e.delay > 0 && (t.delay = `${e.delay}`);
@@ -649,8 +646,8 @@ export {
649
646
  ie as randomRGBAfull,
650
647
  Pe as randomValue,
651
648
  ke as rtl,
652
- Se as sanitize,
653
- ye as showModal,
649
+ ye as sanitize,
650
+ Se as showModal,
654
651
  Me as shuffleMessages,
655
652
  $e as stringGen,
656
653
  Ce as typeCss,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzcasting-utils",
3
3
  "type": "module",
4
- "version": "1.6.5",
4
+ "version": "1.6.7",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "Mark Tamis, TouchFlows SAS",
@@ -29,21 +29,21 @@
29
29
  },
30
30
  "dependencies": {},
31
31
  "devDependencies": {
32
- "@antfu/eslint-config": "^4.13.2",
32
+ "@antfu/eslint-config": "^4.16.1",
33
33
  "@commitlint/cli": "^19.8.1",
34
34
  "@commitlint/config-conventional": "^19.8.1",
35
- "@types/node": "^22.15.29",
36
- "@typescript-eslint/eslint-plugin": "^8.33.0",
37
- "@typescript-eslint/parser": "^8.33.0",
38
- "@vitest/coverage-v8": "^3.2.0",
35
+ "@types/node": "^22.15.32",
36
+ "@typescript-eslint/eslint-plugin": "^8.35.0",
37
+ "@typescript-eslint/parser": "^8.35.0",
38
+ "@vitest/coverage-v8": "^3.2.4",
39
39
  "camelcase": "^8.0.0",
40
40
  "changelogen": "^0.6.1",
41
- "eslint": "^9.28.0",
42
- "lint-staged": "^16.0.0",
41
+ "eslint": "^9.29.0",
42
+ "lint-staged": "^16.1.2",
43
43
  "typescript": "^5.8.3",
44
- "vite": "^6.3.5",
44
+ "vite": "^7.0.0",
45
45
  "vite-plugin-dts": "^4.5.4",
46
- "vitest": "^3.2.0"
46
+ "vitest": "^3.2.4"
47
47
  },
48
48
  "lint-staged": {
49
49
  "*.ts": "npm run lint"