buzzcasting-storage 3.5.0 → 3.5.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.
@@ -346,7 +346,7 @@ export declare interface IQuery {
346
346
  labels?: string[];
347
347
  compare?: string;
348
348
  period?: number;
349
- type?: 'cloud' | 'messages' | 'series' | 'preference' | 'proxy' | 'slide';
349
+ type?: 'cloud' | 'messages' | 'series' | 'preference' | 'proxy' | 'slide' | 'dashboard' | 'widget';
350
350
  order?: 'utc' | 'reach' | 'engagement' | 'impressions';
351
351
  media?: number;
352
352
  dynamics?: number;
@@ -426,6 +426,7 @@ export declare interface IStorageOptions {
426
426
  channel?: string;
427
427
  presentation?: string;
428
428
  slide?: string;
429
+ slides?: string[];
429
430
  display?: string;
430
431
  monitor?: string;
431
432
  version: string;
@@ -2,7 +2,7 @@ var Aa = Object.defineProperty;
2
2
  var Pa = (l, n, s) => n in l ? Aa(l, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : l[n] = s;
3
3
  var _ = (l, n, s) => Pa(l, typeof n != "symbol" ? n + "" : n, s);
4
4
  var D = /* @__PURE__ */ ((l) => (l.MESSAGES = "messages", l.CLOUD = "cloud", l.SERIES = "series", l.TOPICS = "topics", l.WIDGET = "widget", l.WIDGETS = "widgets", l.DASHBOARD = "dashboard", l.DASHBOARDS = "dashboards", l.SLIDE = "slide", l.SLIDES = "slides", l.PRESENTATION = "presentation", l.PRESENTATIONS = "presentations", l.PREFERENCE = "preference", l.PREFERENCES = "preferences", l))(D || {}), f = /* @__PURE__ */ ((l) => (l.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", l.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", l.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", l.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", l.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", l.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", l.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", l.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", l.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", l.NONE = "color:transparent;background-color:transparent;", l.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", l.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", l.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", l.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", l.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", l.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", l.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", l))(f || {}), q = /* @__PURE__ */ ((l) => (l.ADD_SLIDE = "addSlide", l.APP_READY = "appReady", l.API_UPDATE = "apiUpdate", l.WS_API_REQUEST = "wsApiRequest", l.WS_API_RESPONSE = "wsApiResponse", l.WS_API_UPDATE = "wsApiRUpdate", l.APPROVE_MESSAGE = "approveMessage", l.CHANNEL = "channel", l.CLEAN_MESSAGES = "cleanMessages", l.CLOSE_MODAL = "closeModal", l.CLOSE_BUILDER_MODAL = "closeBuilderModal", l.DASHBOARD_LOAD = "loadDashboard", l.DASHBOARD_STORE = "storeDashboard", l.ERROR = "error", l.HIDE_MESSAGE = "hideMessage", l.HIDE_LABELS = "hideLabels", l.MAUPPUT_UPDATE = "layoutUpdate", l.PAUSE_PRESENTATION = "pausePresentation", l.PRESENTATION_READY = "presentationReady", l.PREV_SLIDE = "prevSlide", l.RELOAD_PRESENTATION = "reloadPresentation", l.SHOW_MODAL = "showModal", l.STAR_MESSAGE = "starMessage", l.GOTO_SLIDE = "gotoSlide", l.NEXT_SLIDE = "nextSlide", l.PREFERENCE_LOAD = "loadPreference", l.PREFERENCE_STORE = "storePreference", l.PRESENTATION_LOAD = "loadPresentation", l.PRESENTATION_STORE = "storePresentation", l.SHOW_BUILDER_MODAL = "showBuilderModal", l.SLIDE_DID_LOAD = "slideDidLoad", l.SLIDE_GOTO = "slideGoto", l.SLIDE_READY = "slideReady", l.SLIDE_LOAD = "loadSlide", l.SLIDE_STORE = "storeSlide", l.SLIDE_TRANSITIONER = "slideTransitioner", l.START_TRANSITIONER = "startTransitioner", l.STORAGE_INIT = "storageInit", l.SUBSCRIBE = "subscribe", l.SUSPEND_ACCOUNT = "suspendAccount", l.SWITCH_PRESENTATION = "switch_presentation", l.REMOVE_CLOUD = "removeCloud", l.UPDATE = "update", l.VERSION = "version", l.WIDGET_LOAD = "widgetLoad", l.WIDGET_STORE = "widgetStore", l.WIDGET_UPDATE = "widgetUpdate", l))(q || {}), Vt = /* @__PURE__ */ ((l) => (l.APPROVED = "approved", l.BEFORE = "before", l.DELAYED = "delayed", l.NONE = "none", l.REALTIME = "realtime", l))(Vt || {}), me = /* @__PURE__ */ ((l) => (l.KEYVAL = "keyval", l.LOCAL = "local", l.SESSION = "session", l.DEXIE = "dexie", l.WINDOW = "window", l))(me || {});
5
- const Da = "3.4.1";
5
+ const Da = "3.5.1";
6
6
  class xa {
7
7
  constructor(n) {
8
8
  _(this, "options");
@@ -216,7 +216,7 @@ class xa {
216
216
  f.SLIDE,
217
217
  n.id
218
218
  ), await fetch(
219
- [this.url, "api", s, D.WIDGET, n.id].join("/"),
219
+ [this.url, "api", s, D.WIDGETS, n.id].join("/"),
220
220
  { ...u, method: "get" }
221
221
  ).then(async (S) => {
222
222
  if (!S.ok)
@@ -3510,7 +3510,7 @@ class Nr {
3510
3510
  })));
3511
3511
  _(this, "getWidget", async (n) => {
3512
3512
  const s = await this.db.table(D.WIDGET).where({ id: n.id }).last().catch(() => {
3513
- console.warn("%cstorage", f.STORAGE, q.SLIDE_LOAD, n.id);
3513
+ console.warn("%cstorage", f.STORAGE, q.WIDGET_LOAD, n.id);
3514
3514
  });
3515
3515
  return s === void 0 ? {
3516
3516
  data: null,
@@ -3518,6 +3518,26 @@ class Nr {
3518
3518
  success: !1
3519
3519
  } : (s.message = `Slide ${n.id} retrieved from storage`, s.success = !0, s);
3520
3520
  });
3521
+ // getWidgets = async (query: IQuery): Promise<IResponse> => {
3522
+ // const data = await this.db
3523
+ // .table(API.WIDGET)
3524
+ // .where('dashboard_id')
3525
+ // .equals(query.dashboard)
3526
+ // .modify({type: query.type})
3527
+ // .catch(() => {
3528
+ // console.warn("%cstorage", CSS.STORAGE, EVENTS.WIDGET_LOAD, query.id);
3529
+ // });
3530
+ // if (data === undefined) {
3531
+ // return {
3532
+ // data: null,
3533
+ // message: `Widget ${query.id} Load error`,
3534
+ // success: false,
3535
+ // };
3536
+ // }
3537
+ // data.message = `Slide ${query.id} retrieved from storage`;
3538
+ // data.success = true;
3539
+ // return data;
3540
+ // };
3521
3541
  /**
3522
3542
  * Update Cloud
3523
3543
  * @param query IQuery
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzcasting-storage",
3
3
  "type": "module",
4
- "version": "3.5.0",
4
+ "version": "3.5.2",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "Mark Tamis, TouchFlows SAS",