synapse-react-client 4.0.25 → 4.0.26

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.
Files changed (51) hide show
  1. package/dist/SWC.index.js +1 -1
  2. package/dist/components/DataExplorer/DataExplorer.css +1 -1
  3. package/dist/components/DataExplorer/DataExplorer.d.ts +16 -2
  4. package/dist/components/DataExplorer/DataExplorer.d.ts.map +1 -1
  5. package/dist/components/DataExplorer/DataExplorer.js +82 -75
  6. package/dist/components/DataExplorer/DataExplorer.js.map +1 -1
  7. package/dist/components/DataExplorer/DataExplorer.module.js +16 -16
  8. package/dist/components/DataExplorer/DataExplorer.module.js.map +1 -1
  9. package/dist/components/DataExplorer/DataExplorer.module.scss +1 -1
  10. package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.d.ts.map +1 -1
  11. package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.js +14 -1
  12. package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.js.map +1 -1
  13. package/dist/components/DataGrid/utils/columnFactory.d.ts.map +1 -1
  14. package/dist/components/DataGrid/utils/columnFactory.js +15 -19
  15. package/dist/components/DataGrid/utils/columnFactory.js.map +1 -1
  16. package/dist/components/GenericCard/TableRowGenericCard.d.ts +2 -1
  17. package/dist/components/GenericCard/TableRowGenericCard.d.ts.map +1 -1
  18. package/dist/components/GenericCard/TableRowGenericCard.js +3 -2
  19. package/dist/components/GenericCard/TableRowGenericCard.js.map +1 -1
  20. package/dist/components/HeaderCard.d.ts.map +1 -1
  21. package/dist/components/HeaderCard.js +4 -0
  22. package/dist/components/HeaderCard.js.map +1 -1
  23. package/dist/components/HexGrid/HexGrid.d.ts +2 -1
  24. package/dist/components/HexGrid/HexGrid.d.ts.map +1 -1
  25. package/dist/components/HexGrid/HexGrid.js +13 -13
  26. package/dist/components/HexGrid/HexGrid.js.map +1 -1
  27. package/dist/components/ProvenanceGraph/ProvenanceGraph.d.ts +3 -0
  28. package/dist/components/ProvenanceGraph/ProvenanceGraph.d.ts.map +1 -1
  29. package/dist/components/ProvenanceGraph/ProvenanceGraph.js +140 -85
  30. package/dist/components/ProvenanceGraph/ProvenanceGraph.js.map +1 -1
  31. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts.map +1 -1
  32. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js +3 -3
  33. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -1
  34. package/dist/components/SynapseHomepageV2/HotdropsAndNews.css +1 -1
  35. package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.js +9 -8
  36. package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.js.map +1 -1
  37. package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.scss +4 -1
  38. package/dist/components/SynapseHomepageV2/WordPressNews.d.ts +2 -1
  39. package/dist/components/SynapseHomepageV2/WordPressNews.d.ts.map +1 -1
  40. package/dist/components/SynapseHomepageV2/WordPressNews.js +8 -7
  41. package/dist/components/SynapseHomepageV2/WordPressNews.js.map +1 -1
  42. package/dist/components/SynapseHomepageV2/WordPressNewsItem.d.ts +5 -1
  43. package/dist/components/SynapseHomepageV2/WordPressNewsItem.d.ts.map +1 -1
  44. package/dist/components/SynapseHomepageV2/WordPressNewsItem.js +19 -11
  45. package/dist/components/SynapseHomepageV2/WordPressNewsItem.js.map +1 -1
  46. package/dist/components/WordPress/useWordPressPosts.js +1 -1
  47. package/dist/components/WordPress/useWordPressPosts.js.map +1 -1
  48. package/dist/style/components/_data-grid-extra.css +1 -1
  49. package/dist/style/components/_data-grid-extra.scss +0 -6
  50. package/dist/tsconfig.build.tsbuildinfo +1 -1
  51. package/package.json +3 -3
package/dist/SWC.index.js CHANGED
@@ -114,7 +114,7 @@ var x = { BackendDestinationEnum: r }, S = {
114
114
  sendSearchResultsReturnedEvent: y,
115
115
  sendSearchResultReturnedEvent: v,
116
116
  sendSearchResultClickedEvent: _
117
- }, T = "4.0.25";
117
+ }, T = "4.0.26";
118
118
  //#endregion
119
119
  export { w as Analytics, a as HttpClient, d as Palettes, o as SynapseClient, C as SynapseComponents, n as SynapseConstants, S as SynapseContext, x as SynapseEnums, m as SynapseQueries, T as SynapseReactClientVersion, p as SynapseSessionManager, i as xssOptions };
120
120
 
@@ -1 +1 @@
1
- ._dataExplorerTitle_pjkyv_1.MuiTypography-root{color:var(--data-explorer-title-color,var(--synapse-primary-action-color));font-size:36px;line-height:40px}._dataExplorerSubtitle_pjkyv_7.MuiTypography-root{line-height:140%}@media (width>=1024px){._dataExplorerButton_pjkyv_12{width:fit-content}}._dataExplorerTextContainer_pjkyv_17{gap:16px}@media (width>=1024px){._dataExplorerTextContainer_pjkyv_17{flex:0 0 30%;max-width:30%}}._dataExplorerContainer_pjkyv_27{flex-direction:column;flex:1 0 0;align-items:flex-start;gap:60px;padding:40px 0;display:flex}@media (width>=1024px){._dataExplorerContainer_pjkyv_27{flex-direction:row}}._dataContainer_pjkyv_41{flex:60%;grid-template-rows:repeat(9,fit-content(100%));grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0;display:inline-grid}._dataRowTitle_pjkyv_51{color:var(--synapse-primary-action-color,#4d558d);overflow-wrap:break-word;word-break:break-word;flex:0 auto;min-width:0;font-size:16px;font-weight:400;line-height:26.4px}@media (width>=1024px){._dataRowTitle_pjkyv_51{font-size:19.8px}}._dataRowInner_pjkyv_67{flex:1;justify-content:space-between;align-items:center;min-width:0;display:flex}._dataRow_pjkyv_51{border:1px solid #0000;border-radius:3.3px;justify-content:space-between;justify-self:stretch;align-items:center;gap:17.6px;min-height:66.6px;padding:8.8px 26.4px;transition:background-color .2s,border-color .2s,box-shadow .2s,transform .2s;display:flex;position:relative;text-decoration:none!important}._dataRow_pjkyv_51:hover{z-index:1;background-color:#fff;border-color:#e1e1e1;transform:scale(1.1);box-shadow:0 4px 8px #0000001a}._dataRow_pjkyv_51:hover ._viewCta_pjkyv_96{opacity:1;pointer-events:auto}._dataRowLeft_pjkyv_101{flex:1;align-items:center;gap:16px;min-width:0;display:inline-flex}._iconContainer_pjkyv_109{border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:49px;height:49px;display:flex}._dataRowNamePill_pjkyv_119{flex:1 1 0;align-items:center;gap:8px;min-width:0;display:flex}._fileCount_pjkyv_127{color:#787090;border:1px solid #d8d5e0;border-radius:80px;flex-shrink:0;justify-content:center;align-items:center;gap:10px;padding:4px 8px;font-size:14px;font-weight:400;line-height:24px;display:flex}._viewCta_pjkyv_96{opacity:0;white-space:nowrap;color:var(--synapse-primary-action-color,#4d558d);background:linear-gradient(90deg,#0000,#fff 25% 100%);border-radius:0 2px 2px 0;align-items:center;gap:4px;padding-left:40px;padding-right:26.4px;transition:opacity .2s;display:inline-flex;position:absolute;top:0;bottom:0;right:0}._viewCtaText_pjkyv_160{color:var(--synapse-primary-action-color,#4d558d);font-size:16px;font-weight:400;line-height:26.4px}._viewCtaIcon_pjkyv_167.MuiSvgIcon-root{color:var(--synapse-primary-action-color,#5a488f);font-size:24px}
1
+ ._dataExplorerTitle_1ezpn_1.MuiTypography-root{color:var(--data-explorer-title-color,var(--synapse-primary-action-color));font-size:36px;line-height:40px}._dataExplorerSubtitle_1ezpn_7.MuiTypography-root{line-height:140%}@media (width>=1024px){._dataExplorerButton_1ezpn_12{width:fit-content}}._dataExplorerTextContainer_1ezpn_17{gap:16px}@media (width>=1024px){._dataExplorerTextContainer_1ezpn_17{flex:0 0 30%;max-width:30%}}._dataExplorerContainer_1ezpn_27{flex-direction:column;flex:1 0 0;align-items:flex-start;gap:60px;padding:40px 0;display:flex}@media (width>=1024px){._dataExplorerContainer_1ezpn_27{flex-direction:row}}._dataContainer_1ezpn_41{flex:60%;grid-template-rows:repeat(9,fit-content(100%));grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0;display:inline-grid}._dataRowTitle_1ezpn_51{color:var(--synapse-primary-action-color,#4d558d);overflow-wrap:break-word;word-break:break-word;flex:0 auto;min-width:0;font-size:16px;font-weight:400;line-height:26.4px}@media (width>=1024px){._dataRowTitle_1ezpn_51{font-size:19.8px}}._dataRowInner_1ezpn_67{flex:1;justify-content:space-between;align-items:center;min-width:0;display:flex}._dataRow_1ezpn_51{border:1px solid #0000;border-radius:3.3px;justify-content:space-between;justify-self:stretch;align-items:center;gap:17.6px;min-height:66.6px;padding:8.8px 26.4px;transition:background-color .2s,border-color .2s,box-shadow .2s,transform .2s;display:flex;position:relative;text-decoration:none!important}._dataRow_1ezpn_51:hover{z-index:1;background-color:#fff;border-color:#e1e1e1;transform:scale(1.1);box-shadow:0 4px 8px #0000001a}._dataRow_1ezpn_51:hover ._viewCta_1ezpn_96{opacity:1;pointer-events:auto}._dataRowLeft_1ezpn_101{flex:1;align-items:center;gap:16px;min-width:0;display:inline-flex}._iconContainer_1ezpn_109{border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:49px;height:49px;display:flex}._dataRowNamePill_1ezpn_119{flex:1 1 0;align-items:center;gap:8px;min-width:0;display:flex}._facetCount_1ezpn_127{color:#787090;border:1px solid #d8d5e0;border-radius:80px;flex-shrink:0;justify-content:center;align-items:center;gap:10px;padding:4px 8px;font-size:14px;font-weight:400;line-height:24px;display:flex}._viewCta_1ezpn_96{opacity:0;white-space:nowrap;color:var(--synapse-primary-action-color,#4d558d);background:linear-gradient(90deg,#0000,#fff 25% 100%);border-radius:0 2px 2px 0;align-items:center;gap:4px;padding-left:40px;padding-right:26.4px;transition:opacity .2s;display:inline-flex;position:absolute;top:0;bottom:0;right:0}._viewCtaText_1ezpn_160{color:var(--synapse-primary-action-color,#4d558d);font-size:16px;font-weight:400;line-height:26.4px}._viewCtaIcon_1ezpn_167.MuiSvgIcon-root{color:var(--synapse-primary-action-color,#5a488f);font-size:24px}
@@ -6,8 +6,22 @@ type DataExplorerProps = {
6
6
  sql: string;
7
7
  explorePath?: string;
8
8
  exploreQuerySql?: string;
9
- filterColumnName?: string;
9
+ facetSql?: string;
10
10
  };
11
- export default function DataExplorer({ sql, title, subtitle, buttonText, buttonLink, explorePath, exploreQuerySql, filterColumnName, }: DataExplorerProps): import("react/jsx-runtime").JSX.Element;
11
+ /**
12
+ * DataExplorer
13
+ *
14
+ * A reusable component that renders a list of data types/categories with associated icons.
15
+ * It drives navigation by linking each row to a pre-filtered exploration view.
16
+ *
17
+ * How it works:
18
+ * 1. `sql`: Fetches a configuration table defining the display categories,
19
+ * their display order, hex colors, and icons.
20
+ * 2. `facetSql`: Fetches real-time counts for these categories from the actual
21
+ * underlying data table.
22
+ * 3. Links are dynamically built to point to a target path (`explorePath`) pre-filtered to the
23
+ * clicked category.
24
+ */
25
+ export default function DataExplorer({ sql, title, subtitle, buttonText, buttonLink, explorePath, exploreQuerySql, facetSql, }: DataExplorerProps): import("react/jsx-runtime").JSX.Element;
12
26
  export {};
13
27
  //# sourceMappingURL=DataExplorer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataExplorer.d.ts","sourceRoot":"","sources":["../../../src/components/DataExplorer/DataExplorer.tsx"],"names":[],"mappings":"AAaA,KAAK,iBAAiB,GAAG;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AASD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,GAAG,EACH,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,EACV,WAAW,EACX,eAAe,EACf,gBAAgB,GACjB,EAAE,iBAAiB,2CA8InB"}
1
+ {"version":3,"file":"DataExplorer.d.ts","sourceRoot":"","sources":["../../../src/components/DataExplorer/DataExplorer.tsx"],"names":[],"mappings":"AAkBA,KAAK,iBAAiB,GAAG;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAUD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,GAAG,EACH,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,EACV,WAAW,EACX,eAAe,EACf,QAAQ,GACT,EAAE,iBAAiB,2CAyMnB"}
@@ -7,110 +7,117 @@ import n from "../../synapse-queries/entity/useGetQueryResultBundle.js";
7
7
  import { useSmartLink as r } from "../SmartLink/useSmartLink.js";
8
8
  import { generateEncodedPathAndQueryForSelectedFacetURL as i } from "../QueryWrapper/generateEncodedPathAndQueryForSelectedFacetURL.js";
9
9
  import "../QueryWrapper/index.js";
10
- import a from "../ImageFromSynapseTable.js";
11
- import o from "./DataExplorer.module.js";
12
- import { useEffect as s, useMemo as c, useState as l } from "react";
13
- import { Button as u, Stack as d, Typography as f } from "@mui/material";
14
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
15
- import h from "@mui/icons-material/ArrowForward";
10
+ import { getFacets as a } from "../widgets/facet-nav/useFacetPlots.js";
11
+ import o from "../ImageFromSynapseTable.js";
12
+ import s from "./DataExplorer.module.js";
13
+ import { useEffect as c, useMemo as l, useState as u } from "react";
14
+ import { orderBy as d } from "lodash-es";
15
+ import { Button as f, Stack as p, Typography as m } from "@mui/material";
16
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
17
+ import _ from "@mui/icons-material/ArrowForward";
16
18
  //#region src/components/DataExplorer/DataExplorer.tsx
17
- function g({ sql: g, title: _, subtitle: v, buttonText: y, buttonLink: b, explorePath: x, exploreQuerySql: S, filterColumnName: C }) {
18
- let w = _ || v || y, T = r(b), E = e(g), { data: D } = n({
19
+ function v({ sql: v, title: y, subtitle: b, buttonText: x, buttonLink: S, explorePath: C, exploreQuerySql: w, facetSql: T }) {
20
+ let E = y || b || x, D = r(S), O = e(v), k = e(T ?? ""), A = {
19
21
  partMask: 5,
20
22
  concreteType: "org.sagebionetworks.repo.model.table.QueryBundleRequest",
21
- entityId: E,
22
- query: {
23
- sql: g,
24
- sort: [{
25
- column: "order",
26
- direction: "ASC"
27
- }]
28
- }
29
- }), O = c(() => D?.queryResult?.queryResults.rows ?? [], [D]), k = t("datatype", D), A = t("icon", D), j = t("hexColor", D), M = t("fileCount", D), [N, P] = l([]);
30
- return s(() => {
31
- !x || !C || !S || Promise.all(O.map((e) => {
32
- let t = e.values[k]?.trim();
33
- return t ? i(x, S, [{
34
- facet: C,
23
+ entityId: O,
24
+ query: { sql: v }
25
+ }, j = {
26
+ partMask: 32,
27
+ concreteType: "org.sagebionetworks.repo.model.table.QueryBundleRequest",
28
+ entityId: k,
29
+ query: { sql: T ?? "" }
30
+ }, { data: M } = n(A), N = l(() => M?.queryResult?.queryResults.rows ?? [], [M]), { data: P } = n(j, { enabled: !!T }), F = t("datatype", M), I = t("icon", M), L = t("hexColor", M), R = t("order", M), z = t("columnName", M), B = (e, t) => t ? `${t}::${e}` : e, [V, H] = u({});
31
+ c(() => {
32
+ !C || !w || Promise.all(N.map((e) => {
33
+ let t = e.values[F]?.trim() ?? "", n = e.values[z]?.trim() ?? "", r = B(t, n);
34
+ return !t || !n ? Promise.resolve([r, C]) : i(C, w, [{
35
+ facet: n,
35
36
  facetValue: t
36
- }]) : Promise.resolve(x);
37
- })).then(P);
37
+ }]).then((e) => [r, e]);
38
+ })).then((e) => H(Object.fromEntries(e)));
38
39
  }, [
39
- O,
40
- k,
41
- x,
42
- S,
43
- C
44
- ]), /* @__PURE__ */ m("div", {
45
- className: o.dataExplorerContainer,
46
- children: [w && /* @__PURE__ */ m(d, {
47
- className: o.dataExplorerTextContainer,
40
+ N,
41
+ F,
42
+ z,
43
+ C,
44
+ w
45
+ ]);
46
+ let U = l(() => {
47
+ let e = a(P), t = /* @__PURE__ */ new Map();
48
+ for (let n of e) t.set(n.columnName, new Map(n.facetValues.map((e) => [e.value, e.count])));
49
+ return t;
50
+ }, [P]), W = (e, t) => t ? U.get(t)?.get(e) : void 0, G = d(N, [(e) => Number(e.values[R] ?? 2 ** 53 - 1), (e) => W(e.values[F]?.trim() ?? "", e.values[z]?.trim() ?? "") ?? 0], ["asc", "desc"]);
51
+ return /* @__PURE__ */ g("div", {
52
+ className: s.dataExplorerContainer,
53
+ children: [E && /* @__PURE__ */ g(p, {
54
+ className: s.dataExplorerTextContainer,
48
55
  children: [
49
- _ && /* @__PURE__ */ p(f, {
56
+ y && /* @__PURE__ */ h(m, {
50
57
  variant: "headline1",
51
- className: o.dataExplorerTitle,
52
- children: _
58
+ className: s.dataExplorerTitle,
59
+ children: y
53
60
  }),
54
- v && /* @__PURE__ */ p(f, {
61
+ b && /* @__PURE__ */ h(m, {
55
62
  variant: "body1",
56
63
  component: "div",
57
- className: o.dataExplorerSubtitle,
58
- children: v
64
+ className: s.dataExplorerSubtitle,
65
+ children: b
59
66
  }),
60
- y && /* @__PURE__ */ p(u, {
67
+ x && /* @__PURE__ */ h(f, {
61
68
  variant: "contained",
62
- className: o.dataExplorerButton,
63
- ...T,
64
- children: y
69
+ className: s.dataExplorerButton,
70
+ ...D,
71
+ children: x
65
72
  })
66
73
  ]
67
- }), /* @__PURE__ */ p("div", {
68
- className: o.dataContainer,
69
- children: O.map((e, t) => {
70
- let n = e.values[k] ?? "", r = e.values[j] ?? void 0, i = N[t], s = e.values[M] ?? "";
71
- return /* @__PURE__ */ p("a", {
72
- className: o.dataRow,
74
+ }), /* @__PURE__ */ h("div", {
75
+ className: s.dataContainer,
76
+ children: G.map((e) => {
77
+ let t = e.values[F]?.trim() ?? "", n = e.values[L] ?? void 0, r = e.values[z]?.trim() ?? "", i = V[B(t, r)], a = W(t, r);
78
+ return /* @__PURE__ */ h("a", {
79
+ className: s.dataRow,
73
80
  href: i,
74
- children: /* @__PURE__ */ m("div", {
75
- className: o.dataRowInner,
76
- children: [/* @__PURE__ */ m("div", {
77
- className: o.dataRowLeft,
78
- children: [/* @__PURE__ */ p("div", {
79
- className: o.iconContainer,
80
- style: r ? { backgroundColor: r } : void 0,
81
- children: /* @__PURE__ */ p(a, {
82
- tableId: E,
83
- fileHandleId: e.values[A],
84
- alt: e.values[k] ?? "",
81
+ children: /* @__PURE__ */ g("div", {
82
+ className: s.dataRowInner,
83
+ children: [/* @__PURE__ */ g("div", {
84
+ className: s.dataRowLeft,
85
+ children: [/* @__PURE__ */ h("div", {
86
+ className: s.iconContainer,
87
+ style: n ? { backgroundColor: n } : void 0,
88
+ children: /* @__PURE__ */ h(o, {
89
+ tableId: O,
90
+ fileHandleId: e.values[I],
91
+ alt: t,
85
92
  style: {
86
93
  width: 49,
87
94
  height: 49
88
95
  }
89
96
  })
90
- }), /* @__PURE__ */ m("div", {
91
- className: o.dataRowNamePill,
92
- children: [/* @__PURE__ */ p(f, {
93
- className: o.dataRowTitle,
94
- children: n
95
- }), s && /* @__PURE__ */ p("div", {
96
- className: o.fileCount,
97
- children: s
97
+ }), /* @__PURE__ */ g("div", {
98
+ className: s.dataRowNamePill,
99
+ children: [/* @__PURE__ */ h(m, {
100
+ className: s.dataRowTitle,
101
+ children: t
102
+ }), a && /* @__PURE__ */ h("div", {
103
+ className: s.facetCount,
104
+ children: a
98
105
  })]
99
106
  })]
100
- }), i && /* @__PURE__ */ m("div", {
101
- className: o.viewCta,
102
- children: [/* @__PURE__ */ p("span", {
103
- className: o.viewCtaText,
107
+ }), i && /* @__PURE__ */ g("div", {
108
+ className: s.viewCta,
109
+ children: [/* @__PURE__ */ h("span", {
110
+ className: s.viewCtaText,
104
111
  children: "View"
105
- }), /* @__PURE__ */ p(h, { className: o.viewCtaIcon })]
112
+ }), /* @__PURE__ */ h(_, { className: s.viewCtaIcon })]
106
113
  })]
107
114
  })
108
- }, e.rowId);
115
+ }, B(t, r));
109
116
  })
110
117
  })]
111
118
  });
112
119
  }
113
120
  //#endregion
114
- export { g as default };
121
+ export { v as default };
115
122
 
116
123
  //# sourceMappingURL=DataExplorer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataExplorer.js","names":[],"sources":["../../../src/components/DataExplorer/DataExplorer.tsx"],"sourcesContent":["import { Button, Typography, Stack } from '@mui/material'\nimport { useEffect, useMemo, useState } from 'react'\nimport styles from './DataExplorer.module.scss'\nimport { useSmartLink } from '../SmartLink/useSmartLink'\nimport { parseEntityIdFromSqlStatement } from '@/utils/functions'\nimport { QueryBundleRequest } from '@sage-bionetworks/synapse-types'\nimport { SynapseConstants } from '@/utils'\nimport useGetQueryResultBundle from '@/synapse-queries/entity/useGetQueryResultBundle'\nimport { getFieldIndex } from '@/utils/functions/queryUtils'\nimport { generateEncodedPathAndQueryForSelectedFacetURL } from '../QueryWrapper'\nimport ImageFromSynapseTable from '../ImageFromSynapseTable'\nimport ArrowForwardIcon from '@mui/icons-material/ArrowForward'\n\ntype DataExplorerProps = {\n title?: React.ReactNode\n subtitle?: React.ReactNode\n buttonText?: string\n buttonLink?: string\n sql: string\n explorePath?: string\n exploreQuerySql?: string\n filterColumnName?: string\n}\n\nenum ExpectedColumns {\n DATATYPE = 'datatype',\n ICON = 'icon',\n HEX_COLOR = 'hexColor',\n FILE_COUNT = 'fileCount',\n}\n\nexport default function DataExplorer({\n sql,\n title,\n subtitle,\n buttonText,\n buttonLink,\n explorePath,\n exploreQuerySql,\n filterColumnName,\n}: DataExplorerProps) {\n const hasTextSection = title || subtitle || buttonText\n const smartLinkProps = useSmartLink(buttonLink)\n\n const entityId = parseEntityIdFromSqlStatement(sql)\n\n const queryBundleRequest: QueryBundleRequest = {\n partMask:\n SynapseConstants.BUNDLE_MASK_QUERY_SELECT_COLUMNS |\n SynapseConstants.BUNDLE_MASK_QUERY_RESULTS,\n concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n entityId,\n query: {\n sql,\n sort: [{ column: 'order', direction: 'ASC' }],\n },\n }\n\n const { data: queryResultBundle } =\n useGetQueryResultBundle(queryBundleRequest)\n\n const dataRows = useMemo(\n () => queryResultBundle?.queryResult?.queryResults.rows ?? [],\n [queryResultBundle],\n )\n\n const datatypeColIndex = getFieldIndex(\n ExpectedColumns.DATATYPE,\n queryResultBundle,\n )\n\n const iconColIndex = getFieldIndex(ExpectedColumns.ICON, queryResultBundle)\n\n const hexColorColIndex = getFieldIndex(\n ExpectedColumns.HEX_COLOR,\n queryResultBundle,\n )\n\n const fileCountColIndex = getFieldIndex(\n ExpectedColumns.FILE_COUNT,\n queryResultBundle,\n )\n\n const [rowUrls, setRowUrls] = useState<string[]>([])\n\n useEffect(() => {\n if (!explorePath || !filterColumnName || !exploreQuerySql) return\n\n Promise.all(\n dataRows.map(row => {\n const dataType = row.values[datatypeColIndex]?.trim()\n if (!dataType) return Promise.resolve(explorePath)\n return generateEncodedPathAndQueryForSelectedFacetURL(\n explorePath,\n exploreQuerySql,\n [{ facet: filterColumnName, facetValue: dataType }],\n )\n }),\n ).then(setRowUrls)\n }, [\n dataRows,\n datatypeColIndex,\n explorePath,\n exploreQuerySql,\n filterColumnName,\n ])\n\n return (\n <div className={styles.dataExplorerContainer}>\n {hasTextSection && (\n <Stack className={styles.dataExplorerTextContainer}>\n {title && (\n <Typography\n variant=\"headline1\"\n className={styles.dataExplorerTitle}\n >\n {title}\n </Typography>\n )}\n {subtitle && (\n <Typography\n variant=\"body1\"\n component=\"div\"\n className={styles.dataExplorerSubtitle}\n >\n {subtitle}\n </Typography>\n )}\n {buttonText && (\n <Button\n variant=\"contained\"\n className={styles.dataExplorerButton}\n {...smartLinkProps}\n >\n {buttonText}\n </Button>\n )}\n </Stack>\n )}\n <div className={styles.dataContainer}>\n {dataRows.map((row, index) => {\n const dataType = row.values[datatypeColIndex] ?? ''\n const hexColor = row.values[hexColorColIndex] ?? undefined\n const rowUrl = rowUrls[index]\n const fileCount = row.values[fileCountColIndex] ?? ''\n return (\n <a key={row.rowId} className={styles.dataRow} href={rowUrl}>\n <div className={styles.dataRowInner}>\n <div className={styles.dataRowLeft}>\n <div\n className={styles.iconContainer}\n style={hexColor ? { backgroundColor: hexColor } : undefined}\n >\n <ImageFromSynapseTable\n tableId={entityId}\n fileHandleId={row.values[iconColIndex]}\n alt={row.values[datatypeColIndex] ?? ''}\n style={{ width: 49, height: 49 }}\n />\n </div>\n <div className={styles.dataRowNamePill}>\n <Typography className={styles.dataRowTitle}>\n {dataType}\n </Typography>\n {fileCount && (\n <div className={styles.fileCount}>{fileCount}</div>\n )}\n </div>\n </div>\n {rowUrl && (\n <div className={styles.viewCta}>\n <span className={styles.viewCtaText}>View</span>\n <ArrowForwardIcon className={styles.viewCtaIcon} />\n </div>\n )}\n </div>\n </a>\n )\n })}\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA+BA,SAAwB,EAAa,EACnC,QACA,UACA,aACA,eACA,eACA,gBACA,oBACA,uBACoB;CACpB,IAAM,IAAiB,KAAS,KAAY,GACtC,IAAiB,EAAa,CAAU,GAExC,IAAW,EAA8B,CAAG,GAc5C,EAAE,MAAM,MACZ,EAAwB;EAZxB,UACE;EAEF,cAAc;EACd;EACA,OAAO;GACL;GACA,MAAM,CAAC;IAAE,QAAQ;IAAS,WAAW;GAAM,CAAC;EAC9C;CAIwB,CAAkB,GAEtC,IAAW,QACT,GAAmB,aAAa,aAAa,QAAQ,CAAC,GAC5D,CAAC,CAAiB,CACpB,GAEM,IAAmB,EAAA,YAEvB,CACF,GAEM,IAAe,EAAA,QAAoC,CAAiB,GAEpE,IAAmB,EAAA,YAEvB,CACF,GAEM,IAAoB,EAAA,aAExB,CACF,GAEM,CAAC,GAAS,KAAc,EA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;QAChC,CAAA;OACE,CAAA,GACL,kBAAC,OAAD;QAAK,WAAW,EAAO;kBAAvB,CACE,kBAAC,GAAD;SAAY,WAAW,EAAO;mBAC3B;QACS,CAAA,GACX,KACC,kBAAC,OAAD;SAAK,WAAW,EAAO;mBAAY;QAAe,CAAA,CAEjD;SACF;UACJ,KACC,kBAAC,OAAD;OAAK,WAAW,EAAO;iBAAvB,CACE,kBAAC,QAAD;QAAM,WAAW,EAAO;kBAAa;OAAU,CAAA,GAC/C,kBAAC,GAAD,EAAkB,WAAW,EAAO,YAAc,CAAA,CAC/C;QAEJ;;IACJ,GA9BK,EAAI,KA8BT;GAEP,CAAC;EACE,CAAA,CACF;;AAET"}
1
+ {"version":3,"file":"DataExplorer.js","names":[],"sources":["../../../src/components/DataExplorer/DataExplorer.tsx"],"sourcesContent":["import { Button, Typography, Stack } from '@mui/material'\nimport { useEffect, useMemo, useState } from 'react'\nimport styles from './DataExplorer.module.scss'\nimport { useSmartLink } from '../SmartLink/useSmartLink'\nimport { parseEntityIdFromSqlStatement } from '@/utils/functions'\nimport {\n QueryBundleRequest,\n FacetColumnResultValues,\n} from '@sage-bionetworks/synapse-types'\nimport { SynapseConstants } from '@/utils'\nimport useGetQueryResultBundle from '@/synapse-queries/entity/useGetQueryResultBundle'\nimport { getFieldIndex } from '@/utils/functions/queryUtils'\nimport { generateEncodedPathAndQueryForSelectedFacetURL } from '../QueryWrapper'\nimport ImageFromSynapseTable from '../ImageFromSynapseTable'\nimport ArrowForwardIcon from '@mui/icons-material/ArrowForward'\nimport { getFacets } from '../widgets/facet-nav/useFacetPlots'\nimport { orderBy } from 'lodash-es'\n\ntype DataExplorerProps = {\n title?: React.ReactNode\n subtitle?: React.ReactNode\n buttonText?: string\n buttonLink?: string\n sql: string\n explorePath?: string\n exploreQuerySql?: string\n facetSql?: string\n}\n\nenum ExpectedColumns {\n DATATYPE = 'datatype',\n ICON = 'icon',\n HEX_COLOR = 'hexColor',\n ORDER = 'order',\n COLUMN_NAME = 'columnName',\n}\n\n/**\n * DataExplorer\n *\n * A reusable component that renders a list of data types/categories with associated icons.\n * It drives navigation by linking each row to a pre-filtered exploration view.\n *\n * How it works:\n * 1. `sql`: Fetches a configuration table defining the display categories,\n * their display order, hex colors, and icons.\n * 2. `facetSql`: Fetches real-time counts for these categories from the actual\n * underlying data table.\n * 3. Links are dynamically built to point to a target path (`explorePath`) pre-filtered to the\n * clicked category.\n */\nexport default function DataExplorer({\n sql,\n title,\n subtitle,\n buttonText,\n buttonLink,\n explorePath,\n exploreQuerySql,\n facetSql,\n}: DataExplorerProps) {\n const hasTextSection = title || subtitle || buttonText\n const smartLinkProps = useSmartLink(buttonLink)\n\n const entityId = parseEntityIdFromSqlStatement(sql)\n const facetEntityId = parseEntityIdFromSqlStatement(facetSql ?? '')\n\n const queryBundleRequest: QueryBundleRequest = {\n partMask:\n SynapseConstants.BUNDLE_MASK_QUERY_SELECT_COLUMNS |\n SynapseConstants.BUNDLE_MASK_QUERY_RESULTS,\n concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n entityId,\n query: {\n sql,\n },\n }\n\n const facetQueryRequest: QueryBundleRequest = {\n partMask: SynapseConstants.BUNDLE_MASK_QUERY_FACETS,\n concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n entityId: facetEntityId,\n query: {\n sql: facetSql ?? '',\n },\n }\n\n const { data: queryResultBundle } =\n useGetQueryResultBundle(queryBundleRequest)\n\n const dataRows = useMemo(\n () => queryResultBundle?.queryResult?.queryResults.rows ?? [],\n [queryResultBundle],\n )\n\n const { data: facetQueryResultBundle } = useGetQueryResultBundle(\n facetQueryRequest,\n { enabled: Boolean(facetSql) },\n )\n\n const datatypeColIndex = getFieldIndex(\n ExpectedColumns.DATATYPE,\n queryResultBundle,\n )\n\n const iconColIndex = getFieldIndex(ExpectedColumns.ICON, queryResultBundle)\n\n const hexColorColIndex = getFieldIndex(\n ExpectedColumns.HEX_COLOR,\n queryResultBundle,\n )\n\n const orderColIndex = getFieldIndex(ExpectedColumns.ORDER, queryResultBundle)\n\n const columnNameColIndex = getFieldIndex(\n ExpectedColumns.COLUMN_NAME,\n queryResultBundle,\n )\n\n // Key rows by columnName + dataType to prevent collisions when the same dataType appears in multiple columns.\n const getRowKey = (dataType: string, columnName: string) =>\n columnName ? `${columnName}::${dataType}` : dataType\n\n const [rowUrls, setRowUrls] = useState<Record<string, string>>({})\n\n useEffect(() => {\n if (!explorePath || !exploreQuerySql) return\n Promise.all(\n dataRows.map(row => {\n const dataType = row.values[datatypeColIndex]?.trim() ?? ''\n const columnName = row.values[columnNameColIndex]?.trim() ?? ''\n const rowKey = getRowKey(dataType, columnName)\n if (!dataType || !columnName)\n return Promise.resolve([rowKey, explorePath] as const)\n return generateEncodedPathAndQueryForSelectedFacetURL(\n explorePath,\n exploreQuerySql,\n [{ facet: columnName, facetValue: dataType }],\n ).then(url => [rowKey, url] as const)\n }),\n ).then(entries => setRowUrls(Object.fromEntries(entries)))\n }, [\n dataRows,\n datatypeColIndex,\n columnNameColIndex,\n explorePath,\n exploreQuerySql,\n ])\n\n // Create a map of facet counts by column name and data type for quick lookup\n const facetCountsByColumn = useMemo(() => {\n const facets = getFacets(\n facetQueryResultBundle,\n ) as FacetColumnResultValues[]\n const map = new Map<string, Map<string, number>>()\n for (const facet of facets) {\n map.set(\n facet.columnName,\n new Map(facet.facetValues.map(fv => [fv.value, fv.count])),\n )\n }\n return map\n }, [facetQueryResultBundle])\n\n const getFacetCount = (dataType: string, columnName?: string) =>\n columnName ? facetCountsByColumn.get(columnName)?.get(dataType) : undefined\n\n // Sort by order column ascending, then by facet count descending\n const sortedRows = orderBy(\n dataRows,\n [\n row => Number(row.values[orderColIndex] ?? Number.MAX_SAFE_INTEGER),\n row =>\n getFacetCount(\n row.values[datatypeColIndex]?.trim() ?? '',\n row.values[columnNameColIndex]?.trim() ?? '',\n ) ?? 0,\n ],\n ['asc', 'desc'],\n )\n\n return (\n <div className={styles.dataExplorerContainer}>\n {hasTextSection && (\n <Stack className={styles.dataExplorerTextContainer}>\n {title && (\n <Typography\n variant=\"headline1\"\n className={styles.dataExplorerTitle}\n >\n {title}\n </Typography>\n )}\n {subtitle && (\n <Typography\n variant=\"body1\"\n component=\"div\"\n className={styles.dataExplorerSubtitle}\n >\n {subtitle}\n </Typography>\n )}\n {buttonText && (\n <Button\n variant=\"contained\"\n className={styles.dataExplorerButton}\n {...smartLinkProps}\n >\n {buttonText}\n </Button>\n )}\n </Stack>\n )}\n <div className={styles.dataContainer}>\n {sortedRows.map(row => {\n const dataType = row.values[datatypeColIndex]?.trim() ?? ''\n const hexColor = row.values[hexColorColIndex] ?? undefined\n const columnName = row.values[columnNameColIndex]?.trim() ?? ''\n const rowUrl = rowUrls[getRowKey(dataType, columnName)]\n const facetCount = getFacetCount(dataType, columnName)\n return (\n <a\n key={getRowKey(dataType, columnName)}\n className={styles.dataRow}\n href={rowUrl}\n >\n <div className={styles.dataRowInner}>\n <div className={styles.dataRowLeft}>\n <div\n className={styles.iconContainer}\n style={hexColor ? { backgroundColor: hexColor } : undefined}\n >\n <ImageFromSynapseTable\n tableId={entityId}\n fileHandleId={row.values[iconColIndex]}\n alt={dataType}\n style={{ width: 49, height: 49 }}\n />\n </div>\n <div className={styles.dataRowNamePill}>\n <Typography className={styles.dataRowTitle}>\n {dataType}\n </Typography>\n {facetCount && (\n <div className={styles.facetCount}>{facetCount}</div>\n )}\n </div>\n </div>\n {rowUrl && (\n <div className={styles.viewCta}>\n <span className={styles.viewCtaText}>View</span>\n <ArrowForwardIcon className={styles.viewCtaIcon} />\n </div>\n )}\n </div>\n </a>\n )\n })}\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmDA,SAAwB,EAAa,EACnC,QACA,UACA,aACA,eACA,eACA,gBACA,oBACA,eACoB;CACpB,IAAM,IAAiB,KAAS,KAAY,GACtC,IAAiB,EAAa,CAAU,GAExC,IAAW,EAA8B,CAAG,GAC5C,IAAgB,EAA8B,KA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AI,KAAA;kBAElD,kBAAC,GAAD;SACE,SAAS;SACT,cAAc,EAAI,OAAO;SACzB,KAAK;SACL,OAAO;UAAE,OAAO;UAAI,QAAQ;SAAG;QAChC,CAAA;OACE,CAAA,GACL,kBAAC,OAAD;QAAK,WAAW,EAAO;kBAAvB,CACE,kBAAC,GAAD;SAAY,WAAW,EAAO;mBAC3B;QACS,CAAA,GACX,KACC,kBAAC,OAAD;SAAK,WAAW,EAAO;mBAAa;QAAgB,CAAA,CAEnD;SACF;UACJ,KACC,kBAAC,OAAD;OAAK,WAAW,EAAO;iBAAvB,CACE,kBAAC,QAAD;QAAM,WAAW,EAAO;kBAAa;OAAU,CAAA,GAC/C,kBAAC,GAAD,EAAkB,WAAW,EAAO,YAAc,CAAA,CAC/C;QAEJ;;IACJ,GAjCI,EAAU,GAAU,CAAU,CAiClC;GAEP,CAAC;EACE,CAAA,CACF;;AAET"}
@@ -1,20 +1,20 @@
1
1
  import './DataExplorer.css';var e = {
2
- dataExplorerTitle: "_dataExplorerTitle_pjkyv_1",
3
- dataExplorerSubtitle: "_dataExplorerSubtitle_pjkyv_7",
4
- dataExplorerButton: "_dataExplorerButton_pjkyv_12",
5
- dataExplorerTextContainer: "_dataExplorerTextContainer_pjkyv_17",
6
- dataExplorerContainer: "_dataExplorerContainer_pjkyv_27",
7
- dataContainer: "_dataContainer_pjkyv_41",
8
- dataRowTitle: "_dataRowTitle_pjkyv_51",
9
- dataRowInner: "_dataRowInner_pjkyv_67",
10
- dataRow: "_dataRow_pjkyv_51",
11
- viewCta: "_viewCta_pjkyv_96",
12
- dataRowLeft: "_dataRowLeft_pjkyv_101",
13
- iconContainer: "_iconContainer_pjkyv_109",
14
- dataRowNamePill: "_dataRowNamePill_pjkyv_119",
15
- fileCount: "_fileCount_pjkyv_127",
16
- viewCtaText: "_viewCtaText_pjkyv_160",
17
- viewCtaIcon: "_viewCtaIcon_pjkyv_167"
2
+ dataExplorerTitle: "_dataExplorerTitle_1ezpn_1",
3
+ dataExplorerSubtitle: "_dataExplorerSubtitle_1ezpn_7",
4
+ dataExplorerButton: "_dataExplorerButton_1ezpn_12",
5
+ dataExplorerTextContainer: "_dataExplorerTextContainer_1ezpn_17",
6
+ dataExplorerContainer: "_dataExplorerContainer_1ezpn_27",
7
+ dataContainer: "_dataContainer_1ezpn_41",
8
+ dataRowTitle: "_dataRowTitle_1ezpn_51",
9
+ dataRowInner: "_dataRowInner_1ezpn_67",
10
+ dataRow: "_dataRow_1ezpn_51",
11
+ viewCta: "_viewCta_1ezpn_96",
12
+ dataRowLeft: "_dataRowLeft_1ezpn_101",
13
+ iconContainer: "_iconContainer_1ezpn_109",
14
+ dataRowNamePill: "_dataRowNamePill_1ezpn_119",
15
+ facetCount: "_facetCount_1ezpn_127",
16
+ viewCtaText: "_viewCtaText_1ezpn_160",
17
+ viewCtaIcon: "_viewCtaIcon_1ezpn_167"
18
18
  };
19
19
  //#endregion
20
20
  export { e as default };
@@ -1 +1 @@
1
- {"version":3,"file":"DataExplorer.module.js","names":[],"sources":["../../../src/components/DataExplorer/DataExplorer.module.scss"],"sourcesContent":["@use 'sass:map';\n@use '../../style/abstracts/variables' as SrcVariables;\n\n.dataExplorerTitle:global(.MuiTypography-root) {\n color: var(--data-explorer-title-color, var(--synapse-primary-action-color));\n font-size: 36px;\n line-height: 40px; /* 111.111% */\n}\n\n.dataExplorerSubtitle:global(.MuiTypography-root) {\n line-height: 140%;\n}\n\n.dataExplorerButton {\n @media (min-width: map.get(SrcVariables.$breakpoints, 'large')) {\n width: fit-content;\n }\n}\n\n.dataExplorerTextContainer {\n gap: 16px;\n\n @media (min-width: map.get(SrcVariables.$breakpoints, 'large')) {\n flex: 0 0 30%;\n max-width: 30%;\n }\n}\n\n.dataExplorerContainer {\n display: flex;\n padding: 40px 0;\n align-items: flex-start;\n gap: 60px;\n flex: 1 0 0;\n flex-direction: column;\n\n @media (min-width: map.get(SrcVariables.$breakpoints, 'large')) {\n flex-direction: row;\n }\n}\n\n.dataContainer {\n display: inline-grid;\n row-gap: 8px;\n column-gap: 8px;\n flex: 1 1 60%;\n min-width: 0;\n grid-template-rows: repeat(9, fit-content(100%));\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n\n.dataRowTitle {\n color: var(--synapse-primary-action-color, #4d558d);\n font-size: 16px;\n font-weight: 400;\n line-height: 26.4px;\n flex: 0 1 auto;\n min-width: 0;\n overflow-wrap: break-word;\n word-break: break-word;\n\n @media (min-width: map.get(SrcVariables.$breakpoints, 'large')) {\n font-size: 19.8px;\n }\n}\n\n.dataRowInner {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex: 1;\n min-width: 0;\n}\n\n.dataRow {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8.8px 26.4px;\n min-height: 66.6px;\n gap: 17.6px;\n justify-self: stretch;\n position: relative;\n border-radius: 3.3px;\n border: 1px solid transparent;\n text-decoration: none !important;\n transition:\n background-color 200ms ease,\n border-color 200ms ease,\n box-shadow 200ms ease,\n transform 200ms ease;\n\n &:hover {\n background-color: #fff;\n border-color: #e1e1e1;\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);\n transform: scale(1.1);\n z-index: 1;\n .viewCta {\n opacity: 1;\n pointer-events: auto;\n }\n }\n}\n\n.dataRowLeft {\n display: inline-flex;\n align-items: center;\n gap: 16px;\n min-width: 0;\n flex: 1;\n}\n\n.iconContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 49px;\n height: 49px;\n border-radius: 50%;\n flex-shrink: 0;\n}\n\n.dataRowNamePill {\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1 1 0;\n min-width: 0;\n}\n\n.fileCount {\n display: flex;\n padding: 4px 8px;\n justify-content: center;\n align-items: center;\n gap: 10px;\n border-radius: 80px;\n border: 1px solid #d8d5e0;\n color: #787090;\n font-size: 14px;\n font-weight: 400;\n line-height: 24px; /* 171.429% */\n flex-shrink: 0;\n}\n\n.viewCta {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n display: inline-flex;\n align-items: center;\n padding-right: 26.4px;\n padding-left: 40px;\n gap: 4px;\n opacity: 0;\n white-space: nowrap;\n color: var(--synapse-primary-action-color, #4d558d);\n background: linear-gradient(to right, transparent, #fff 25%, #fff 100%);\n border-radius: 0 2px 2px 0;\n transition: opacity 200ms ease;\n}\n\n.viewCtaText {\n color: var(--synapse-primary-action-color, #4d558d);\n font-size: 16px;\n font-weight: 400;\n line-height: 26.4px; /* 165% */\n}\n\n.viewCtaIcon:global(.MuiSvgIcon-root) {\n font-size: 24px;\n color: var(--synapse-primary-action-color, #5a488f);\n}\n"],"mappings":""}
1
+ {"version":3,"file":"DataExplorer.module.js","names":[],"sources":["../../../src/components/DataExplorer/DataExplorer.module.scss"],"sourcesContent":["@use 'sass:map';\n@use '../../style/abstracts/variables' as SrcVariables;\n\n.dataExplorerTitle:global(.MuiTypography-root) {\n color: var(--data-explorer-title-color, var(--synapse-primary-action-color));\n font-size: 36px;\n line-height: 40px; /* 111.111% */\n}\n\n.dataExplorerSubtitle:global(.MuiTypography-root) {\n line-height: 140%;\n}\n\n.dataExplorerButton {\n @media (min-width: map.get(SrcVariables.$breakpoints, 'large')) {\n width: fit-content;\n }\n}\n\n.dataExplorerTextContainer {\n gap: 16px;\n\n @media (min-width: map.get(SrcVariables.$breakpoints, 'large')) {\n flex: 0 0 30%;\n max-width: 30%;\n }\n}\n\n.dataExplorerContainer {\n display: flex;\n padding: 40px 0;\n align-items: flex-start;\n gap: 60px;\n flex: 1 0 0;\n flex-direction: column;\n\n @media (min-width: map.get(SrcVariables.$breakpoints, 'large')) {\n flex-direction: row;\n }\n}\n\n.dataContainer {\n display: inline-grid;\n row-gap: 8px;\n column-gap: 8px;\n flex: 1 1 60%;\n min-width: 0;\n grid-template-rows: repeat(9, fit-content(100%));\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n\n.dataRowTitle {\n color: var(--synapse-primary-action-color, #4d558d);\n font-size: 16px;\n font-weight: 400;\n line-height: 26.4px;\n flex: 0 1 auto;\n min-width: 0;\n overflow-wrap: break-word;\n word-break: break-word;\n\n @media (min-width: map.get(SrcVariables.$breakpoints, 'large')) {\n font-size: 19.8px;\n }\n}\n\n.dataRowInner {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex: 1;\n min-width: 0;\n}\n\n.dataRow {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8.8px 26.4px;\n min-height: 66.6px;\n gap: 17.6px;\n justify-self: stretch;\n position: relative;\n border-radius: 3.3px;\n border: 1px solid transparent;\n text-decoration: none !important;\n transition:\n background-color 200ms ease,\n border-color 200ms ease,\n box-shadow 200ms ease,\n transform 200ms ease;\n\n &:hover {\n background-color: #fff;\n border-color: #e1e1e1;\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);\n transform: scale(1.1);\n z-index: 1;\n .viewCta {\n opacity: 1;\n pointer-events: auto;\n }\n }\n}\n\n.dataRowLeft {\n display: inline-flex;\n align-items: center;\n gap: 16px;\n min-width: 0;\n flex: 1;\n}\n\n.iconContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 49px;\n height: 49px;\n border-radius: 50%;\n flex-shrink: 0;\n}\n\n.dataRowNamePill {\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1 1 0;\n min-width: 0;\n}\n\n.facetCount {\n display: flex;\n padding: 4px 8px;\n justify-content: center;\n align-items: center;\n gap: 10px;\n border-radius: 80px;\n border: 1px solid #d8d5e0;\n color: #787090;\n font-size: 14px;\n font-weight: 400;\n line-height: 24px; /* 171.429% */\n flex-shrink: 0;\n}\n\n.viewCta {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n display: inline-flex;\n align-items: center;\n padding-right: 26.4px;\n padding-left: 40px;\n gap: 4px;\n opacity: 0;\n white-space: nowrap;\n color: var(--synapse-primary-action-color, #4d558d);\n background: linear-gradient(to right, transparent, #fff 25%, #fff 100%);\n border-radius: 0 2px 2px 0;\n transition: opacity 200ms ease;\n}\n\n.viewCtaText {\n color: var(--synapse-primary-action-color, #4d558d);\n font-size: 16px;\n font-weight: 400;\n line-height: 26.4px; /* 165% */\n}\n\n.viewCtaIcon:global(.MuiSvgIcon-root) {\n font-size: 24px;\n color: var(--synapse-primary-action-color, #5a488f);\n}\n"],"mappings":""}
@@ -129,7 +129,7 @@
129
129
  min-width: 0;
130
130
  }
131
131
 
132
- .fileCount {
132
+ .facetCount {
133
133
  display: flex;
134
134
  padding: 4px 8px;
135
135
  justify-content: center;
@@ -1 +1 @@
1
- {"version":3,"file":"ColumnHeaderWithTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/components/ColumnHeaderWithTooltip.tsx"],"names":[],"mappings":"AAIA,KAAK,4BAA4B,GAAG;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;CACzB,CAAA;AAKD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,IAAI,EACJ,WAAW,EACX,UAAkB,EAClB,WAAmB,EACnB,WAAmB,EACnB,QAAgB,EAChB,WAAW,GACZ,EAAE,4BAA4B,2CAgF9B"}
1
+ {"version":3,"file":"ColumnHeaderWithTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/components/ColumnHeaderWithTooltip.tsx"],"names":[],"mappings":"AAIA,KAAK,4BAA4B,GAAG;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;CACzB,CAAA;AAKD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,IAAI,EACJ,WAAW,EACX,UAAkB,EAClB,WAAmB,EACnB,WAAmB,EACnB,QAAgB,EAChB,WAAW,GACZ,EAAE,4BAA4B,2CA8F9B"}
@@ -50,7 +50,20 @@ function u(u) {
50
50
  title: l,
51
51
  placement: "top",
52
52
  enterNextDelay: 500,
53
- children: /* @__PURE__ */ r(a, { sx: { fontSize: "1em" } })
53
+ children: /* @__PURE__ */ r(e, {
54
+ component: "span",
55
+ sx: {
56
+ display: "inline-flex",
57
+ alignItems: "center",
58
+ justifyContent: "center",
59
+ backgroundColor: "primary.main",
60
+ color: "primary.contrastText",
61
+ borderRadius: "50%",
62
+ width: "1.25em",
63
+ height: "1.25em"
64
+ },
65
+ children: /* @__PURE__ */ r(a, { sx: { fontSize: "1em" } })
66
+ })
54
67
  }), d[9] = b, d[10] = k);
55
68
  let A;
56
69
  d[11] !== S || d[12] !== v || d[13] !== x ? (A = x && v && /* @__PURE__ */ r(n, {
@@ -1 +1 @@
1
- {"version":3,"file":"ColumnHeaderWithTooltip.js","names":["Box","IconButton","Tooltip","Key","PushPin","PushPinOutlined","TOOLTIP_DELAY_SHOW","ColumnHeaderWithTooltipProps","name","description","isRequired","isUpsertKey","showPinIcon","isPinned","onTogglePin","UPSERT_KEY_TOOLTIP_TEXT","ColumnHeaderWithTooltip","t0","$","_c","t1","t2","t3","t4","undefined","t5","Symbol","for","display","gridTemplateColumns","gap","width","alignItems","minWidth","t6","overflow","textOverflow","whiteSpace","t7","t8","color","ml","t9","t10","flexShrink","t11","fontSize","t12","e","stopPropagation","opacity","t13","t14"],"sources":["../../../../src/components/DataGrid/components/ColumnHeaderWithTooltip.tsx"],"sourcesContent":["import { Box, IconButton, Tooltip } from '@mui/material'\nimport { Key, PushPin, PushPinOutlined } from '@mui/icons-material'\nimport { TOOLTIP_DELAY_SHOW } from '@/components/SynapseTable/SynapseTableConstants'\n\ntype ColumnHeaderWithTooltipProps = {\n name: string\n description?: string\n isRequired?: boolean\n isUpsertKey?: boolean\n showPinIcon?: boolean\n isPinned?: boolean\n onTogglePin?: () => void\n}\n\nconst UPSERT_KEY_TOOLTIP_TEXT =\n 'This property field is the primary key. It is used to match the existing rows when applying updates. If a value already exists the row is updated; if not, a new row is added. If multiple primary keys are defined, all primary key values must match for an existing row to be updated.'\n\n/**\n * Renders a column header. When a description is provided, hovering the column\n * name shows it as a native tooltip; otherwise the column name is shown (useful\n * for truncated headers). An optional pin icon is shown on the right.\n */\nexport function ColumnHeaderWithTooltip({\n name,\n description,\n isRequired = false,\n isUpsertKey = false,\n showPinIcon = false,\n isPinned = false,\n onTogglePin,\n}: ColumnHeaderWithTooltipProps) {\n return (\n <Box\n data-column-id={name}\n sx={{\n display: 'grid',\n gridTemplateColumns: 'minmax(0, 1fr) auto',\n gap: 0.5,\n width: '100%',\n alignItems: 'center',\n minWidth: 0,\n }}\n >\n {/* Text area - shrinks first */}\n <Box\n component=\"span\"\n sx={{\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n minWidth: 0,\n }}\n title={description || name}\n >\n {name}\n {isRequired && (\n <Box component=\"span\" sx={{ color: 'error.main', ml: 0.25 }}>\n *\n </Box>\n )}\n </Box>\n\n {/* Icons area - fixed size, never shrinks */}\n <Box\n sx={{ display: 'flex', gap: 0.5, flexShrink: 0, alignItems: 'center' }}\n >\n {isUpsertKey && (\n <Tooltip\n title={UPSERT_KEY_TOOLTIP_TEXT}\n placement=\"top\"\n enterNextDelay={TOOLTIP_DELAY_SHOW}\n >\n <Key sx={{ fontSize: '1em' }} />\n </Tooltip>\n )}\n {showPinIcon && onTogglePin && (\n <Tooltip\n title={isPinned ? 'Unpin column' : 'Pin column'}\n placement=\"top\"\n enterNextDelay={TOOLTIP_DELAY_SHOW}\n >\n <IconButton\n size=\"small\"\n color=\"inherit\"\n aria-label={isPinned ? 'Unpin column' : 'Pin column'}\n // Use onMouseDown instead of onClick to prevent column selection\n // when clicking the pin icon. stopPropagation prevents event bubbling.\n onMouseDown={e => {\n e.stopPropagation()\n onTogglePin()\n }}\n sx={{\n color: 'inherit',\n opacity: isPinned ? 1 : 0.7,\n '&:hover': {\n opacity: 1,\n },\n }}\n >\n {isPinned ? (\n <PushPin fontSize=\"inherit\" />\n ) : (\n <PushPinOutlined fontSize=\"inherit\" />\n )}\n </IconButton>\n </Tooltip>\n )}\n </Box>\n </Box>\n )\n}\n"],"mappings":";;;;;;AAcA,IAAMe,IACJ;AAOF,SAAOC,EAAAC,GAAA;CAAA,IAAAC,IAAAC,EAAA,EAAA,GAAiC,EAAAX,SAAAC,gBAAAC,YAAAU,GAAAT,aAAAU,GAAAT,aAAAU,GAAAT,UAAAU,GAAAT,mBAAAG,GAGtCP,IAAAU,MAAAI,KAAAA,IAAA,KAAAJ,GACAT,IAAAU,MAAAG,KAAAA,IAAA,KAAAH,GACAT,IAAAU,MAAAE,KAAAA,IAAA,KAAAF,GACAT,IAAAU,MAAAC,KAAAA,IAAA,KAAAD,GAAgBE;CAAA,AAAAP,EAAA,OAAAQ,OAAAC,IAAA,2BAAA,KAMRF,IAAA;EAAAG,SACO;EAAMC,qBACM;EAAqBC,KACrC;EAAGC,OACD;EAAMC,YACD;EAAQC,UACV;CACZ,GAACf,EAAA,KAAAO,KAAAA,IAAAP,EAAA;CAAA,IAAAgB;CAAA,AAAAhB,EAAA,OAAAQ,OAAAC,IAAA,2BAAA,KAKKO,IAAA;EAAAC,UACQ;EAAQC,cACJ;EAAUC,YACZ;EAAQJ,UACV;CACZ,GAACf,EAAA,KAAAgB,KAAAA,IAAAhB,EAAA;CACM,IAAAoB,IAAA7B,KAAAD,GAAmB+B;CAAA,AAAArB,EAAA,OAAAR,IAOzB6B,IAAArB,EAAA,MAJAqB,IAAA7B,KACC,kBAAC,GAAD;EAAe,WAAA;EAAW,IAAA;GAAA8B,OAAS;GA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B,UAAA,UAAS,CAEQ;EArB5B,CAAA;CALL,CAAA,GA8BTK,EAAA,MAAAL,GAAAK,EAAA,MAAAJ,GAAAI,EAAA,MAAAN,GAAAM,EAAA,MAAA6B,KAAAA,IAAA7B,EAAA;CAAA,IAAAiC;CAAA,AAAAjC,EAAA,QAAA2B,KAAA3B,EAAA,QAAA6B,KA3CHI,IAAA,kBAAC,GAAD;EACM,IAAAR;YADN,CAGGE,GASAE,CAZC;KA4CE7B,EAAA,MAAA2B,GAAA3B,EAAA,MAAA6B,GAAA7B,EAAA,MAAAiC,KAAAA,IAAAjC,EAAA;CAAA,IAAAkC;CACF,OADElC,EAAA,QAAAV,KAAAU,EAAA,QAAAiC,KAAAjC,EAAA,QAAAwB,KA3ERU,IAAA,kBAAC,GAAD;EACkB5C,kBAAAA;EACZ,IAAAiB;YAFN,CAYEiB,GAmBAS,CA/BE;KA4EEjC,EAAA,MAAAV,GAAAU,EAAA,MAAAiC,GAAAjC,EAAA,MAAAwB,GAAAxB,EAAA,MAAAkC,KAAAA,IAAAlC,EAAA,KA5ENkC;AA4EM"}
1
+ {"version":3,"file":"ColumnHeaderWithTooltip.js","names":["Box","IconButton","Tooltip","Key","PushPin","PushPinOutlined","TOOLTIP_DELAY_SHOW","ColumnHeaderWithTooltipProps","name","description","isRequired","isUpsertKey","showPinIcon","isPinned","onTogglePin","UPSERT_KEY_TOOLTIP_TEXT","ColumnHeaderWithTooltip","t0","$","_c","t1","t2","t3","t4","undefined","t5","Symbol","for","display","gridTemplateColumns","gap","width","alignItems","minWidth","t6","overflow","textOverflow","whiteSpace","t7","t8","color","ml","t9","t10","flexShrink","t11","justifyContent","backgroundColor","borderRadius","height","fontSize","t12","e","stopPropagation","opacity","t13","t14"],"sources":["../../../../src/components/DataGrid/components/ColumnHeaderWithTooltip.tsx"],"sourcesContent":["import { Box, IconButton, Tooltip } from '@mui/material'\nimport { Key, PushPin, PushPinOutlined } from '@mui/icons-material'\nimport { TOOLTIP_DELAY_SHOW } from '@/components/SynapseTable/SynapseTableConstants'\n\ntype ColumnHeaderWithTooltipProps = {\n name: string\n description?: string\n isRequired?: boolean\n isUpsertKey?: boolean\n showPinIcon?: boolean\n isPinned?: boolean\n onTogglePin?: () => void\n}\n\nconst UPSERT_KEY_TOOLTIP_TEXT =\n 'This property field is the primary key. It is used to match the existing rows when applying updates. If a value already exists the row is updated; if not, a new row is added. If multiple primary keys are defined, all primary key values must match for an existing row to be updated.'\n\n/**\n * Renders a column header. When a description is provided, hovering the column\n * name shows it as a native tooltip; otherwise the column name is shown (useful\n * for truncated headers). An optional pin icon is shown on the right.\n */\nexport function ColumnHeaderWithTooltip({\n name,\n description,\n isRequired = false,\n isUpsertKey = false,\n showPinIcon = false,\n isPinned = false,\n onTogglePin,\n}: ColumnHeaderWithTooltipProps) {\n return (\n <Box\n data-column-id={name}\n sx={{\n display: 'grid',\n gridTemplateColumns: 'minmax(0, 1fr) auto',\n gap: 0.5,\n width: '100%',\n alignItems: 'center',\n minWidth: 0,\n }}\n >\n {/* Text area - shrinks first */}\n <Box\n component=\"span\"\n sx={{\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n minWidth: 0,\n }}\n title={description || name}\n >\n {name}\n {isRequired && (\n <Box component=\"span\" sx={{ color: 'error.main', ml: 0.25 }}>\n *\n </Box>\n )}\n </Box>\n\n {/* Icons area - fixed size, never shrinks */}\n <Box\n sx={{ display: 'flex', gap: 0.5, flexShrink: 0, alignItems: 'center' }}\n >\n {isUpsertKey && (\n <Tooltip\n title={UPSERT_KEY_TOOLTIP_TEXT}\n placement=\"top\"\n enterNextDelay={TOOLTIP_DELAY_SHOW}\n >\n <Box\n component=\"span\"\n sx={{\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: 'primary.main',\n color: 'primary.contrastText',\n borderRadius: '50%',\n width: '1.25em',\n height: '1.25em',\n }}\n >\n <Key sx={{ fontSize: '1em' }} />\n </Box>\n </Tooltip>\n )}\n {showPinIcon && onTogglePin && (\n <Tooltip\n title={isPinned ? 'Unpin column' : 'Pin column'}\n placement=\"top\"\n enterNextDelay={TOOLTIP_DELAY_SHOW}\n >\n <IconButton\n size=\"small\"\n color=\"inherit\"\n aria-label={isPinned ? 'Unpin column' : 'Pin column'}\n // Use onMouseDown instead of onClick to prevent column selection\n // when clicking the pin icon. stopPropagation prevents event bubbling.\n onMouseDown={e => {\n e.stopPropagation()\n onTogglePin()\n }}\n sx={{\n color: 'inherit',\n opacity: isPinned ? 1 : 0.7,\n '&:hover': {\n opacity: 1,\n },\n }}\n >\n {isPinned ? (\n <PushPin fontSize=\"inherit\" />\n ) : (\n <PushPinOutlined fontSize=\"inherit\" />\n )}\n </IconButton>\n </Tooltip>\n )}\n </Box>\n </Box>\n )\n}\n"],"mappings":";;;;;;AAcA,IAAMe,IACJ;AAOF,SAAOC,EAAAC,GAAA;CAAA,IAAAC,IAAAC,EAAA,EAAA,GAAiC,EAAAX,SAAAC,gBAAAC,YAAAU,GAAAT,aAAAU,GAAAT,aAAAU,GAAAT,UAAAU,GAAAT,mBAAAG,GAGtCP,IAAAU,MAAAI,KAAAA,IAAA,KAAAJ,GACAT,IAAAU,MAAAG,KAAAA,IAAA,KAAAH,GACAT,IAAAU,MAAAE,KAAAA,IAAA,KAAAF,GACAT,IAAAU,MAAAC,KAAAA,IAAA,KAAAD,GAAgBE;CAAA,AAAAP,EAAA,OAAAQ,OAAAC,IAAA,2BAAA,KAMRF,IAAA;EAAAG,SACO;EAAMC,qBACM;EAAqBC,KACrC;EAAGC,OACD;EAAMC,YACD;EAAQC,UACV;CACZ,GAACf,EAAA,KAAAO,KAAAA,IAAAP,EAAA;CAAA,IAAAgB;CAAA,AAAAhB,EAAA,OAAAQ,OAAAC,IAAA,2BAAA,KAKKO,IAAA;EAAAC,UACQ;EAAQC,cACJ;EAAUC,YACZ;EAAQJ,UACV;CACZ,GAACf,EAAA,KAAAgB,KAAAA,IAAAhB,EAAA;CACM,IAAAoB,I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,GAAD;EACS,OAAAD,IAAA,iBAAA;EACG,WAAA;EACMP,gBAAAA;YAEhB,kBAAC,GAAD;GACO,MAAA;GACC,OAAA;GACM,cAAAO,IAAA,iBAAA;GAGC,cAAAuC,MAAA;IAEXtC,AADAsC,EAACC,gBAAiB,GAClBvC,EAAY;GAAC;GAEX,IAAA;IAAA0B,OACK;IAASc,SACPzC,IAAA,IAAA;IAAkB,WAChB,EAAAyC,SACA,EACX;GACF;aAGE,EADDzC,IACE,IAEA,GAFD,EAAkB,UAAA,UAAS,CAEQ;EArB5B,CAAA;CALL,CAAA,GA8BTK,EAAA,MAAAL,GAAAK,EAAA,MAAAJ,GAAAI,EAAA,MAAAN,GAAAM,EAAA,MAAAiC,KAAAA,IAAAjC,EAAA;CAAA,IAAAqC;CAAA,AAAArC,EAAA,QAAA2B,KAAA3B,EAAA,QAAAiC,KAzDHI,IAAA,kBAAC,GAAD;EACM,IAAAZ;YADN,CAGGE,GAuBAM,CA1BC;KA0DEjC,EAAA,MAAA2B,GAAA3B,EAAA,MAAAiC,GAAAjC,EAAA,MAAAqC,KAAAA,IAAArC,EAAA;CAAA,IAAAsC;CACF,OADEtC,EAAA,QAAAV,KAAAU,EAAA,QAAAqC,KAAArC,EAAA,QAAAwB,KAzFRc,IAAA,kBAAC,GAAD;EACkBhD,kBAAAA;EACZ,IAAAiB;YAFN,CAYEiB,GAmBAa,CA/BE;KA0FErC,EAAA,MAAAV,GAAAU,EAAA,MAAAqC,GAAArC,EAAA,MAAAwB,GAAAxB,EAAA,MAAAsC,KAAAA,IAAAtC,EAAA,KA1FNsC;AA0FM"}
@@ -1 +1 @@
1
- {"version":3,"file":"columnFactory.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/utils/columnFactory.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,kBAAkB,EAAE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O,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;CACxC,CAAA;AAoLD,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAGzD"}
@@ -54,21 +54,18 @@ function g(e, t) {
54
54
  return n.displayName = `CellWithTooltip(${t})`, n;
55
55
  }
56
56
  function _(e, t) {
57
- return t ? "header-upsert-key" : e ? "header-cell-required" : "header-cell";
58
- }
59
- function v(e, t) {
60
57
  return ({ rowData: n }) => ({
61
58
  ...n,
62
59
  [e]: a(t)
63
60
  });
64
61
  }
65
- function y(e) {
62
+ function v(e) {
66
63
  return (t) => {
67
64
  let n = t.trim();
68
65
  return n === "" ? a(e) : n;
69
66
  };
70
67
  }
71
- function b(e, t) {
68
+ function y(e, t) {
72
69
  let n = {
73
70
  showPinIcon: e.showPinIcon,
74
71
  hasDescription: !!e.description
@@ -85,31 +82,30 @@ function b(e, t) {
85
82
  isPinned: e.isPinned,
86
83
  onTogglePin: e.onTogglePin
87
84
  }),
88
- headerClassName: _(e.isRequired, !!e.isUpsertKey),
89
85
  minWidth: a,
90
86
  basis: a,
91
87
  grow: 0,
92
88
  shrink: 0,
93
89
  disabled: e.disabled,
94
- deleteValue: v(e.columnName, e.isRequired),
90
+ deleteValue: _(e.columnName, e.isRequired),
95
91
  pasteValue: o(s.pasteValue, e.columnName, e.schemaPropertyInfo),
96
92
  stickyLeft: e.isPinned
97
93
  };
98
94
  }
99
- var x = {
100
- multipleEnum: (e) => b(e, n({
95
+ var b = {
96
+ multipleEnum: (e) => y(e, n({
101
97
  choices: e.enumeratedValues ?? [],
102
98
  colType: e.typeInfo?.type || null,
103
99
  limitTags: 3,
104
100
  clearValue: a(e.isRequired)
105
101
  })),
106
- boolean: (e) => b(e, t({
102
+ boolean: (e) => y(e, t({
107
103
  choices: [!0, !1],
108
104
  colType: "boolean",
109
105
  clearValue: a(e.isRequired)
110
106
  })),
111
- number: (e) => b(e, m),
112
- enumerated: (e) => b(e, t({
107
+ number: (e) => y(e, m),
108
+ enumerated: (e) => y(e, t({
113
109
  choices: e.enumeratedValues ?? [],
114
110
  colType: e.typeInfo?.type || null,
115
111
  clearValue: a(e.isRequired)
@@ -124,27 +120,27 @@ var x = {
124
120
  enumeratedValues: null
125
121
  }, i);
126
122
  return {
127
- ...b(t, n),
123
+ ...y(t, n),
128
124
  minWidth: a,
129
125
  basis: a
130
126
  };
131
127
  },
132
128
  text: (e) => ({
133
- ...b(e, p({
129
+ ...y(e, p({
134
130
  continuousUpdates: !1,
135
131
  deletedValue: void 0,
136
- parseUserInput: y(e.isRequired)
132
+ parseUserInput: v(e.isRequired)
137
133
  })),
138
134
  cellClassName: "MuiInputBase-input"
139
135
  })
140
136
  };
141
- function S(e, t) {
137
+ function x(e, t) {
142
138
  return e ? e.format === "date-time" ? "date-time" : e.isArray ? "multipleEnum" : e.type === "boolean" ? "boolean" : e.type === "number" || e.type === "integer" ? "number" : t && t.length > 0 ? "enumerated" : "text" : t && t.length > 0 ? "enumerated" : "text";
143
139
  }
144
- function C(e) {
145
- return x[S(e.typeInfo, e.enumeratedValues)](e);
140
+ function S(e) {
141
+ return b[x(e.typeInfo, e.enumeratedValues)](e);
146
142
  }
147
143
  //#endregion
148
- export { C as createColumn };
144
+ export { S as createColumn };
149
145
 
150
146
  //# sourceMappingURL=columnFactory.js.map