@burdenoff/fe-libs 2026.601.14 → 2026.602.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.
@@ -12,6 +12,8 @@ export interface Product {
12
12
  url: string;
13
13
  icon: string;
14
14
  color: string;
15
+ /** When true, render as disabled with a "Coming soon" badge (non-GA product). */
16
+ comingSoon?: boolean;
15
17
  }
16
18
  export interface UseProductsReturn {
17
19
  products: Product[];
@@ -1 +1 @@
1
- {"version":3,"file":"useProducts.d.ts","sourceRoot":"","sources":["../../../../src/shared/hooks/shell/useProducts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA0CH,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAgDD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,iBAAiB,CAsD3E"}
1
+ {"version":3,"file":"useProducts.d.ts","sourceRoot":"","sources":["../../../../src/shared/hooks/shell/useProducts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA8DH,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,iFAAiF;IACjF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAiDD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,iBAAiB,CAyD3E"}
@@ -4,7 +4,11 @@ import "../../../shared-graphql.js";
4
4
  import { useCallback as r, useEffect as i, useState as a } from "react";
5
5
  import { gql as o } from "@apollo/client/core";
6
6
  //#region src/shared/hooks/shell/useProducts.ts
7
- var s = new Set(e.map((e) => e.id)), c = o`
7
+ var s = new Set(e.map((e) => e.id)), c = new Map(e.map((e) => [e.id, e.comingSoon === !0]));
8
+ function l(e, t, n) {
9
+ return c.get(e) ? !0 : t !== "ACTIVE" || !n;
10
+ }
11
+ var u = o`
8
12
  query GetAccessibleProducts($limit: Int, $offset: Int) {
9
13
  myAccessibleProducts(limit: $limit, offset: $offset) {
10
14
  items {
@@ -21,17 +25,17 @@ var s = new Set(e.map((e) => e.id)), c = o`
21
25
  }
22
26
  }
23
27
  `;
24
- function l(e) {
28
+ function d(e) {
25
29
  return s.has(e);
26
30
  }
27
- var u = {
31
+ var f = {
28
32
  fluidgrids: "#3b82f6",
29
33
  bigconsole: "#8b5cf6",
30
34
  workspaces: "#06b6d4",
31
35
  vibecontrols: "#10b981",
32
36
  botlit: "#f59e0b"
33
- }, d = "#6b7280";
34
- function f(e, t) {
37
+ }, p = "#6b7280";
38
+ function m(e, t) {
35
39
  let n = {
36
40
  fluidgrids: "FG",
37
41
  bigconsole: "BC",
@@ -43,55 +47,57 @@ function f(e, t) {
43
47
  let r = e.split(/\s+/);
44
48
  return r.length >= 2 ? (r[0][0] + r[1][0]).toUpperCase() : e.substring(0, 2).toUpperCase();
45
49
  }
46
- function p(e, t) {
47
- return t?.color && typeof t.color == "string" ? t.color : u[e] || d;
50
+ function h(e, t) {
51
+ return t?.color && typeof t.color == "string" ? t.color : f[e] || p;
48
52
  }
49
- function m() {
53
+ function g() {
50
54
  return e.map((e) => ({
51
55
  id: e.id,
52
56
  name: e.name,
53
57
  url: t(e.id),
54
58
  icon: e.icon,
55
- color: e.color
59
+ color: e.color,
60
+ comingSoon: e.comingSoon
56
61
  }));
57
62
  }
58
- function h(e) {
59
- let t = n("global"), [o, s] = a(m()), [u, d] = a(e?.autoFetch !== !1), [h, g] = a(null), _ = r(async () => {
60
- d(!0), g(null);
63
+ function _(e) {
64
+ let o = n("global"), [s, c] = a(g()), [f, p] = a(e?.autoFetch !== !1), [_, v] = a(null), y = r(async () => {
65
+ p(!0), v(null);
61
66
  try {
62
- let e = ((await t.query({
63
- query: c,
67
+ let e = ((await o.query({
68
+ query: u,
64
69
  variables: {
65
70
  limit: 50,
66
71
  offset: 0
67
72
  },
68
73
  fetchPolicy: "cache-first"
69
- })).data?.myAccessibleProducts?.items || []).filter((e) => e.appUrl && l(e.slug)).map((e) => ({
74
+ })).data?.myAccessibleProducts?.items || []).filter((e) => d(e.slug)).map((e) => ({
70
75
  id: e.slug,
71
76
  name: e.name,
72
- url: e.appUrl,
73
- icon: f(e.name, e.slug),
74
- color: p(e.slug, e.metadata)
77
+ url: e.appUrl || t(e.slug),
78
+ icon: m(e.name, e.slug),
79
+ color: h(e.slug, e.metadata),
80
+ comingSoon: l(e.slug, e.status, e.appUrl)
75
81
  }));
76
- e.sort((e, t) => e.name.localeCompare(t.name)), s(e.length > 0 ? e : m());
82
+ e.sort((e, t) => e.name.localeCompare(t.name)), c(e.length > 0 ? e : g());
77
83
  } catch (e) {
78
- g(e instanceof Error ? e.message : "Failed to fetch products"), s(m());
84
+ v(e instanceof Error ? e.message : "Failed to fetch products"), c(g());
79
85
  } finally {
80
- d(!1);
86
+ p(!1);
81
87
  }
82
- }, [t]);
88
+ }, [o]);
83
89
  return i(() => {
84
90
  if (e?.autoFetch === !1) {
85
- d(!1);
91
+ p(!1);
86
92
  return;
87
93
  }
88
- _();
94
+ y();
89
95
  }, []), {
90
- products: o,
91
- isLoading: u,
92
- error: h,
93
- refetch: _
96
+ products: s,
97
+ isLoading: f,
98
+ error: _,
99
+ refetch: y
94
100
  };
95
101
  }
96
102
  //#endregion
97
- export { h as useProducts };
103
+ export { _ as useProducts };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.601.14",
3
+ "version": "2026.602.1",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "type": "module",
6
6
  "imports": {