@kosdev-code/kos-ui-sdk 0.1.0-dev.5634 → 0.1.0-dev.5638

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.
package/index.js CHANGED
@@ -565,7 +565,7 @@ const ud = [
565
565
  const e = String(t).replace(/\n/g, "\\n");
566
566
  Tr.info(`%c⬇ ${e}`, dd);
567
567
  }
568
- }, ce = Symbol("SubscriptionHandlers"), U = Symbol("DependencyModels"), ur = Symbol("FutureService"), yt = Symbol("ChildModels"), dr = Symbol("ParentModel"), hr = Symbol("LogConfig"), bn = Symbol("ReferenceConfig"), Fa = Symbol("KosModelSymbol"), et = Symbol("ModelEffects"), vt = Symbol("CompanionParentModel"), Na = Symbol("FutureContainerSetup"), Ua = Symbol(
568
+ }, ae = Symbol("SubscriptionHandlers"), U = Symbol("DependencyModels"), ur = Symbol("FutureService"), yt = Symbol("ChildModels"), dr = Symbol("ParentModel"), hr = Symbol("LogConfig"), bn = Symbol("ReferenceConfig"), Fa = Symbol("KosModelSymbol"), et = Symbol("ModelEffects"), vt = Symbol("CompanionParentModel"), Na = Symbol("FutureContainerSetup"), Ua = Symbol(
569
569
  "MultipleFutureContainerSetup"
570
570
  ), fr = Symbol("FutureAliases"), ja = Symbol("TroubleAwareSetup"), Ba = Symbol("LoggerSetup"), Ha = Symbol("ContainerAwareSetup"), Bs = Symbol("StateMachineSetup"), Es = Symbol("StateEntryHandlers"), pr = Symbol("StateExitHandlers"), fM = Symbol("StateActionHandlers"), en = Symbol("OptionsRequired"), hd = Symbol("KosViewModelSymbol"), qa = Symbol("ViewModelConfig"), fd = Symbol("ReloadAwareSetup"), pd = m.createLogger({ group: "decorators", name: "fsm-injection" });
571
571
  function za(t) {
@@ -2490,7 +2490,7 @@ function mh(t, e) {
2490
2490
  "getCompanionParent"
2491
2491
  // Don't override our own getCompanionParent
2492
2492
  ], u = (p) => {
2493
- const g = i.constructor.prototype[ce] || {};
2493
+ const g = i.constructor.prototype[ae] || {};
2494
2494
  return Object.values(g).some((b) => {
2495
2495
  const v = b == null ? void 0 : b.handler;
2496
2496
  return v === i[p] || v === i.constructor.prototype[p];
@@ -2565,7 +2565,7 @@ function R(t) {
2565
2565
  return (e) => {
2566
2566
  var o, i;
2567
2567
  const s = e, r = typeof t == "string" ? { modelTypeId: t, autoRegister: !1 } : { autoRegister: !1, ...t };
2568
- s.prototype.modelTypeId = r.modelTypeId, s.prototype[Fa] = !0, (o = s.prototype)[ce] ?? (o[ce] = {}), (i = s.prototype)[U] ?? (i[U] = {}), r.optionsRequired && (s.prototype[en] = !0), m.ifDebug(() => {
2568
+ s.prototype.modelTypeId = r.modelTypeId, s.prototype[Fa] = !0, (o = s.prototype)[ae] ?? (o[ae] = {}), (i = s.prototype)[U] ?? (i[U] = {}), r.optionsRequired && (s.prototype[en] = !0), m.ifDebug(() => {
2569
2569
  m.debug(`Registering model with id ${r.modelTypeId}`);
2570
2570
  });
2571
2571
  const n = new Proxy(s, vh);
@@ -2601,13 +2601,13 @@ const jM = ({
2601
2601
  websocket: s = !1,
2602
2602
  condition: r = () => !0
2603
2603
  }) => (n) => {
2604
- n[ce] = n[ce] || {}, Array.isArray(t) ? t.forEach((o) => {
2605
- n[ce][o] = {
2604
+ n[ae] = n[ae] || {}, Array.isArray(t) ? t.forEach((o) => {
2605
+ n[ae][o] = {
2606
2606
  websocket: s,
2607
2607
  handler: e,
2608
2608
  condition: r
2609
2609
  };
2610
- }) : n[ce][t] = {
2610
+ }) : n[ae][t] = {
2611
2611
  websocket: s,
2612
2612
  handler: wh(n, lo(e), 200),
2613
2613
  condition: r
@@ -2694,9 +2694,9 @@ function $h(t, e) {
2694
2694
  return t ? (s, r, n) => t(n) ? e(s, r, n) : !1 : e;
2695
2695
  }
2696
2696
  function Oh(t, e, s) {
2697
- t[ce] = t[ce] || {}, Array.isArray(e) ? e.forEach((r) => {
2698
- t[ce][r] = s;
2699
- }) : t[ce][e] = s;
2697
+ t[ae] = t[ae] || {}, Array.isArray(e) ? e.forEach((r) => {
2698
+ t[ae][r] = s;
2699
+ }) : t[ae][e] = s;
2700
2700
  }
2701
2701
  function Sh(t, e) {
2702
2702
  kh(t, e);
@@ -3492,7 +3492,7 @@ function uf(t) {
3492
3492
  companions: (n = (r = t.companionManager) == null ? void 0 : r.all()) == null ? void 0 : n.map((i) => i.modelTypeName),
3493
3493
  children: (o = t.getChildren) == null ? void 0 : o.call(t).map((i) => i.modelId),
3494
3494
  effects: !!t.effectManager,
3495
- subs: !!t.subscriptionManager
3495
+ subscriptions: !!t.subscriptionManager
3496
3496
  };
3497
3497
  }
3498
3498
  }), df(
@@ -3542,7 +3542,30 @@ function df(t, e, s, r) {
3542
3542
  data: n.map((d) => ({ id: d.modelId, type: d.modelTypeName }))
3543
3543
  },
3544
3544
  data: ((u = t.toJSON) == null ? void 0 : u.call(t)) || {},
3545
- subs: !!r.subscriptionManager
3545
+ subscriptions: (() => {
3546
+ const d = t[ae] || {}, h = Object.keys(d);
3547
+ return h.length === 0 ? { count: 0, data: [] } : {
3548
+ count: h.length,
3549
+ data: h.map((f) => {
3550
+ const p = d[f];
3551
+ return {
3552
+ topic: f,
3553
+ websocket: !!p.websocket,
3554
+ ...p.lifecycle && { lifecycle: p.lifecycle },
3555
+ ...p.fos && { fos: !0 },
3556
+ ...p.bridge && { bridge: !0 },
3557
+ ...p.destinationAddress && {
3558
+ destinationAddress: p.destinationAddress
3559
+ },
3560
+ ...p.wildcardName && {
3561
+ wildcardName: p.wildcardName
3562
+ },
3563
+ ...p.flow && { flow: !0 },
3564
+ ...p.requiresBaseline && { requiresBaseline: !0 }
3565
+ };
3566
+ })
3567
+ };
3568
+ })()
3546
3569
  };
3547
3570
  }
3548
3571
  }), Object.defineProperty(t, "toJSON", {
@@ -5839,7 +5862,7 @@ class mp {
5839
5862
  }
5840
5863
  registerAll(e) {
5841
5864
  var n;
5842
- const s = ((n = this.modelData) == null ? void 0 : n[ce]) || {}, r = Object.keys(s);
5865
+ const s = ((n = this.modelData) == null ? void 0 : n[ae]) || {}, r = Object.keys(s);
5843
5866
  this.log.debug(
5844
5867
  `Found ${r.length} subscriptions in ${this.modelId} (lifecycle: ${e ?? "any"})`
5845
5868
  ), r.forEach((o) => {
@@ -6182,7 +6205,7 @@ function yp(t) {
6182
6205
  return !!(t != null && t[et]) && Object.keys(t[et]).length > 0;
6183
6206
  }
6184
6207
  function bp(t) {
6185
- return !!(t != null && t[ce]) && Object.keys(t[ce]).length > 0;
6208
+ return !!(t != null && t[ae]) && Object.keys(t[ae]).length > 0;
6186
6209
  }
6187
6210
  function vp(t) {
6188
6211
  return !!(t != null && t[tt]) && t[tt].length > 0;
@@ -18458,37 +18481,37 @@ function GT({
18458
18481
  setMonth: b,
18459
18482
  setDay: E,
18460
18483
  nextMonth: () => {
18461
- const ae = g < 11 ? Pe(d) : Pe(d + 1), ge = g < 11 ? g + 1 : 0;
18462
- if (!cr(ae, ge, v)) {
18463
- const it = lr(ae, ge);
18484
+ const ce = g < 11 ? Pe(d) : Pe(d + 1), ge = g < 11 ? g + 1 : 0;
18485
+ if (!cr(ce, ge, v)) {
18486
+ const it = lr(ce, ge);
18464
18487
  E(it);
18465
18488
  }
18466
- ge === 0 && h(ae), b(ge);
18489
+ ge === 0 && h(ce), b(ge);
18467
18490
  },
18468
18491
  previousMonth: () => {
18469
- const ae = Pe(g === 0 ? d - 1 : d), ge = g === 0 ? 11 : g - 1;
18470
- if (!cr(ae, ge, v)) {
18471
- const it = lr(ae, ge);
18492
+ const ce = Pe(g === 0 ? d - 1 : d), ge = g === 0 ? 11 : g - 1;
18493
+ if (!cr(ce, ge, v)) {
18494
+ const it = lr(ce, ge);
18472
18495
  E(it);
18473
18496
  }
18474
- ge === 11 && h(ae), b(ge);
18497
+ ge === 11 && h(ce), b(ge);
18475
18498
  },
18476
18499
  nextYear: () => {
18477
- const ae = d < f[1] ? d + 1 : f[0], ge = Pe(ae);
18500
+ const ce = d < f[1] ? d + 1 : f[0], ge = Pe(ce);
18478
18501
  if (cr(ge, g, v))
18479
- h(ae);
18502
+ h(ce);
18480
18503
  else {
18481
18504
  const it = lr(Pe(d + 1), g);
18482
- E(it), h(ae);
18505
+ E(it), h(ce);
18483
18506
  }
18484
18507
  },
18485
18508
  previousYear: () => {
18486
- const ae = d > f[0] ? d - 1 : f[0], ge = Pe(ae);
18509
+ const ce = d > f[0] ? d - 1 : f[0], ge = Pe(ce);
18487
18510
  if (cr(ge, g, v))
18488
- h(ae);
18511
+ h(ce);
18489
18512
  else {
18490
18513
  const it = lr(Pe(d - 1), g);
18491
- E(it), h(ae);
18514
+ E(it), h(ce);
18492
18515
  }
18493
18516
  }
18494
18517
  },
@@ -19292,7 +19315,7 @@ export {
19292
19315
  Y_ as StorageDeviceServices,
19293
19316
  i$ as StudioProperties,
19294
19317
  o$ as StudioPropertiesServices,
19295
- ce as SubscriptionHandlers,
19318
+ ae as SubscriptionHandlers,
19296
19319
  au as TIMER_END,
19297
19320
  ou as TIMER_EVENT,
19298
19321
  iu as TOPIC_TIMER_TICK_EVENT,