@gen3/frontend 0.10.44 → 0.10.46

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 (183) hide show
  1. package/dist/cjs/index.js +435 -214
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/dts/api/auth/credentialsLogin.js +2 -2
  4. package/dist/dts/api/auth/credentialsLogout.js +2 -2
  5. package/dist/dts/api/auth/sessionLogout.js +2 -2
  6. package/dist/dts/api/auth/sessionToken.js +2 -2
  7. package/dist/dts/components/Buttons/DownloadButtons/DownloadButton.d.ts.map +1 -1
  8. package/dist/dts/components/Buttons/DownloadButtons/DownloadButton.js +6 -2
  9. package/dist/dts/components/Buttons/DownloadButtons/DownloadButton.js.map +1 -1
  10. package/dist/dts/components/Details/DetailsModal.d.ts +1 -1
  11. package/dist/dts/components/Details/DetailsModal.d.ts.map +1 -1
  12. package/dist/dts/components/Details/DetailsModal.js +5 -4
  13. package/dist/dts/components/Details/DetailsModal.js.map +1 -1
  14. package/dist/dts/components/Details/types.d.ts +3 -0
  15. package/dist/dts/components/Details/types.d.ts.map +1 -1
  16. package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.js +2 -1
  17. package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.js.map +1 -1
  18. package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.unit.test.js +2 -2
  19. package/dist/dts/components/Login/CredentialsLogin.js +2 -2
  20. package/dist/dts/components/Login/LoginAccountButton.js +2 -2
  21. package/dist/dts/components/Login/LoginButton.js +4 -3
  22. package/dist/dts/components/Login/LoginButton.js.map +1 -1
  23. package/dist/dts/components/Login/LoginPanel.js +2 -2
  24. package/dist/dts/components/Modals/FirstTimeModal.d.ts.map +1 -1
  25. package/dist/dts/components/Modals/FirstTimeModal.js +5 -3
  26. package/dist/dts/components/Modals/FirstTimeModal.js.map +1 -1
  27. package/dist/dts/components/Modals/Gen3ModalsProvider.js +2 -1
  28. package/dist/dts/components/Modals/Gen3ModalsProvider.js.map +1 -1
  29. package/dist/dts/components/Profile/Credentials.js +2 -2
  30. package/dist/dts/components/Profile/ExternalProviderCard.js +2 -2
  31. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/ExplorerTableDetailsPanelFactory.d.ts.map +1 -1
  32. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/ExplorerTableDetailsPanelFactory.js +4 -2
  33. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/ExplorerTableDetailsPanelFactory.js.map +1 -1
  34. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/QueryRowDetailsPanel.d.ts +4 -0
  35. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/QueryRowDetailsPanel.d.ts.map +1 -0
  36. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/{TableDetailsPanel.js → QueryRowDetailsPanel.js} +5 -5
  37. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/QueryRowDetailsPanel.js.map +1 -0
  38. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/RowTableDetailsPanel.d.ts +4 -0
  39. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/RowTableDetailsPanel.d.ts.map +1 -0
  40. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/RowTableDetailsPanel.js +14 -0
  41. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/RowTableDetailsPanel.js.map +1 -0
  42. package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTable.d.ts.map +1 -1
  43. package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTable.js +10 -8
  44. package/dist/dts/features/CohortBuilder/ExplorerTable/ExplorerTable.js.map +1 -1
  45. package/dist/dts/features/CohortBuilder/downloads/CohortDropdownActionButton.js +2 -1
  46. package/dist/dts/features/CohortBuilder/downloads/CohortDropdownActionButton.js.map +1 -1
  47. package/dist/dts/features/CohortBuilder/downloads/actions/downloadManifest.js +10 -6
  48. package/dist/dts/features/CohortBuilder/downloads/actions/downloadManifest.js.map +1 -1
  49. package/dist/dts/features/CohortBuilder/downloads/actions/downloadToFile.js +8 -5
  50. package/dist/dts/features/CohortBuilder/downloads/actions/downloadToFile.js.map +1 -1
  51. package/dist/dts/features/CohortBuilder/downloads/actions/registeredActions.js +2 -1
  52. package/dist/dts/features/CohortBuilder/downloads/actions/registeredActions.js.map +1 -1
  53. package/dist/dts/features/CohortBuilder/downloads/actions/tests/downloadManifest.unit.test.js +2 -2
  54. package/dist/dts/features/CohortBuilder/downloads/downloadActionHook.d.ts.map +1 -1
  55. package/dist/dts/features/CohortBuilder/downloads/downloadActionHook.js +11 -7
  56. package/dist/dts/features/CohortBuilder/downloads/downloadActionHook.js.map +1 -1
  57. package/dist/dts/features/Discovery/DiscoveryTable.d.ts +1 -2
  58. package/dist/dts/features/Discovery/DiscoveryTable.d.ts.map +1 -1
  59. package/dist/dts/features/Navigation/Banner.d.ts +9 -0
  60. package/dist/dts/features/Navigation/Banner.d.ts.map +1 -0
  61. package/dist/dts/features/Navigation/Banner.js +54 -0
  62. package/dist/dts/features/Navigation/Banner.js.map +1 -0
  63. package/dist/dts/features/Navigation/Footer/Footer.d.ts +4 -0
  64. package/dist/dts/features/Navigation/Footer/Footer.d.ts.map +1 -0
  65. package/dist/dts/features/Navigation/Footer/Footer.js +26 -0
  66. package/dist/dts/features/Navigation/Footer/Footer.js.map +1 -0
  67. package/dist/dts/features/Navigation/Footer/FooterColumn.d.ts +5 -0
  68. package/dist/dts/features/Navigation/Footer/FooterColumn.d.ts.map +1 -0
  69. package/dist/dts/features/Navigation/Footer/FooterColumn.js +72 -0
  70. package/dist/dts/features/Navigation/Footer/FooterColumn.js.map +1 -0
  71. package/dist/dts/features/Navigation/Footer/types.d.ts +63 -0
  72. package/dist/dts/features/Navigation/Footer/types.d.ts.map +1 -0
  73. package/dist/dts/features/Navigation/Footer/types.js +2 -0
  74. package/dist/dts/features/Navigation/Footer/types.js.map +1 -0
  75. package/dist/dts/features/Navigation/Header.d.ts +1 -1
  76. package/dist/dts/features/Navigation/Header.d.ts.map +1 -1
  77. package/dist/dts/features/Navigation/Header.js +4 -2
  78. package/dist/dts/features/Navigation/Header.js.map +1 -1
  79. package/dist/dts/features/Navigation/NavPageLayout.d.ts +4 -3
  80. package/dist/dts/features/Navigation/NavPageLayout.d.ts.map +1 -1
  81. package/dist/dts/features/Navigation/NavPageLayout.js +1 -1
  82. package/dist/dts/features/Navigation/NavPageLayout.js.map +1 -1
  83. package/dist/dts/features/Navigation/NavigationBar.d.ts +3 -2
  84. package/dist/dts/features/Navigation/NavigationBar.d.ts.map +1 -1
  85. package/dist/dts/features/Navigation/NavigationBar.js +8 -7
  86. package/dist/dts/features/Navigation/NavigationBar.js.map +1 -1
  87. package/dist/dts/features/Navigation/NavigationBarButton.js +1 -1
  88. package/dist/dts/features/Navigation/NavigationBarButton.js.map +1 -1
  89. package/dist/dts/features/Navigation/NavigationLogo.d.ts +1 -1
  90. package/dist/dts/features/Navigation/NavigationLogo.d.ts.map +1 -1
  91. package/dist/dts/features/Navigation/NavigationLogo.js +8 -6
  92. package/dist/dts/features/Navigation/NavigationLogo.js.map +1 -1
  93. package/dist/dts/features/Navigation/TopBar.d.ts +3 -2
  94. package/dist/dts/features/Navigation/TopBar.d.ts.map +1 -1
  95. package/dist/dts/features/Navigation/TopBar.js +1 -1
  96. package/dist/dts/features/Navigation/TopBar.js.map +1 -1
  97. package/dist/dts/features/Navigation/index.d.ts +5 -3
  98. package/dist/dts/features/Navigation/index.d.ts.map +1 -1
  99. package/dist/dts/features/Navigation/index.js +1 -1
  100. package/dist/dts/features/Navigation/index.js.map +1 -1
  101. package/dist/dts/features/Navigation/types.d.ts +10 -32
  102. package/dist/dts/features/Navigation/types.d.ts.map +1 -1
  103. package/dist/dts/features/Query/GqlQueryEditor.d.ts.map +1 -1
  104. package/dist/dts/features/Query/GqlQueryEditor.js +5 -4
  105. package/dist/dts/features/Query/GqlQueryEditor.js.map +1 -1
  106. package/dist/dts/lib/common/staticProps.d.ts +1 -1
  107. package/dist/dts/lib/common/staticProps.d.ts.map +1 -1
  108. package/dist/dts/lib/common/staticProps.js +18 -4
  109. package/dist/dts/lib/common/staticProps.js.map +1 -1
  110. package/dist/dts/lib/content/ContentDatabase.js +2 -2
  111. package/dist/dts/lib/content/filesystem.js +2 -2
  112. package/dist/dts/lib/session/hooks.js +2 -2
  113. package/dist/dts/lib/session/session.js +2 -2
  114. package/dist/dts/pages/AiSearch/data.js +2 -2
  115. package/dist/dts/pages/Crosswalk/data.js +2 -2
  116. package/dist/dts/pages/DataDictionary/data.js +2 -2
  117. package/dist/dts/pages/Discovery/data.js +2 -2
  118. package/dist/dts/pages/Explorer/Explorer.d.ts.map +1 -1
  119. package/dist/dts/pages/Explorer/Explorer.js +0 -3
  120. package/dist/dts/pages/Explorer/Explorer.js.map +1 -1
  121. package/dist/dts/pages/Explorer/data.js +2 -2
  122. package/dist/dts/pages/Landing/about-us.js +2 -2
  123. package/dist/dts/pages/Landing/contact.js +2 -2
  124. package/dist/dts/pages/Landing/data.js +2 -2
  125. package/dist/dts/pages/Landing/resource.js +2 -2
  126. package/dist/dts/pages/Login/data.js +2 -2
  127. package/dist/dts/pages/Profile/data.js +2 -2
  128. package/dist/dts/pages/Query/data.js +2 -2
  129. package/dist/dts/pages/Submission/data.js +2 -2
  130. package/dist/dts/pages/Theme/data.js +2 -2
  131. package/dist/dts/pages/Workspace/data.js +2 -2
  132. package/dist/dts/pages/_document.js +2 -2
  133. package/dist/dts/pages/admin/authz/data.d.ts +2 -2
  134. package/dist/dts/pages/admin/authz/data.js +2 -2
  135. package/dist/dts/pages/api/content/content.js +2 -2
  136. package/dist/dts/pages/external/footer.js +3 -3
  137. package/dist/dts/pages/external/footer.js.map +1 -1
  138. package/dist/dts/pages/index.js +2 -2
  139. package/dist/dts/pages/utils/serverSideProps.js +2 -2
  140. package/dist/dts/types/index.d.ts +2 -0
  141. package/dist/dts/types/index.d.ts.map +1 -0
  142. package/dist/dts/types/index.js +2 -0
  143. package/dist/dts/types/index.js.map +1 -0
  144. package/dist/dts/types/styling.d.ts +4 -0
  145. package/dist/dts/types/styling.d.ts.map +1 -1
  146. package/dist/dts/utils/RendererFactory.d.ts +0 -8
  147. package/dist/dts/utils/RendererFactory.d.ts.map +1 -1
  148. package/dist/dts/utils/RendererFactory.js.map +1 -1
  149. package/dist/dts/utils/download.js +2 -2
  150. package/dist/dts/utils/index.d.ts +1 -0
  151. package/dist/dts/utils/index.d.ts.map +1 -1
  152. package/dist/dts/utils/index.js +1 -0
  153. package/dist/dts/utils/index.js.map +1 -1
  154. package/dist/dts/utils/mergeDefaultTailwindClassnames.d.ts +3 -2
  155. package/dist/dts/utils/mergeDefaultTailwindClassnames.d.ts.map +1 -1
  156. package/dist/dts/utils/mergeDefaultTailwindClassnames.js +23 -5
  157. package/dist/dts/utils/mergeDefaultTailwindClassnames.js.map +1 -1
  158. package/dist/dts/utils/tailwindConfig.js +1 -1
  159. package/dist/dts/utils/tailwindConfig.js.map +1 -1
  160. package/dist/dts/utils/tests/mergeDefaultTailwindClassnames.test.d.ts +2 -0
  161. package/dist/dts/utils/tests/mergeDefaultTailwindClassnames.test.d.ts.map +1 -0
  162. package/dist/dts/utils/tests/mergeDefaultTailwindClassnames.test.js +40 -0
  163. package/dist/dts/utils/tests/mergeDefaultTailwindClassnames.test.js.map +1 -0
  164. package/dist/dts/utils/tests/values.test.d.ts +2 -0
  165. package/dist/dts/utils/tests/values.test.d.ts.map +1 -0
  166. package/dist/dts/utils/tests/values.test.js +24 -0
  167. package/dist/dts/utils/tests/values.test.js.map +1 -0
  168. package/dist/dts/utils/values.d.ts +1 -0
  169. package/dist/dts/utils/values.d.ts.map +1 -1
  170. package/dist/dts/utils/values.js +9 -1
  171. package/dist/dts/utils/values.js.map +1 -1
  172. package/dist/esm/index.js +435 -218
  173. package/dist/esm/index.js.map +1 -1
  174. package/dist/index.d.ts +112 -57
  175. package/dist/tsconfig.tsbuildinfo +1 -1
  176. package/package.json +9 -17
  177. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/TableDetailsPanel.d.ts +0 -4
  178. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/TableDetailsPanel.d.ts.map +0 -1
  179. package/dist/dts/features/CohortBuilder/ExplorerTable/ExploreTableDetails/TableDetailsPanel.js.map +0 -1
  180. package/dist/dts/features/Navigation/Footer.d.ts +0 -4
  181. package/dist/dts/features/Navigation/Footer.d.ts.map +0 -1
  182. package/dist/dts/features/Navigation/Footer.js +0 -48
  183. package/dist/dts/features/Navigation/Footer.js.map +0 -1
package/dist/cjs/index.js CHANGED
@@ -2,10 +2,11 @@
2
2
 
3
3
  var jsxRuntime = require('react/jsx-runtime');
4
4
  var React = require('react');
5
+ var tailwindMerge = require('tailwind-merge');
5
6
  var Image = require('next/image');
7
+ var lodash = require('lodash');
6
8
  var Link = require('next/link');
7
9
  var fa = require('react-icons/fa');
8
- var tailwindMerge = require('tailwind-merge');
9
10
  var react = require('@iconify/react');
10
11
  var core$1 = require('@mantine/core');
11
12
  var router = require('next/router');
@@ -17,12 +18,12 @@ require('swr');
17
18
  var cookiesNext = require('cookies-next');
18
19
  var jose = require('jose');
19
20
  var notifications = require('@mantine/notifications');
21
+ var Markdown = require('react-markdown');
20
22
  var ai = require('react-icons/ai');
21
23
  var pi = require('react-icons/pi');
22
24
  var Head = require('next/head');
23
25
  var mantineReactTable = require('mantine-react-table');
24
26
  var jsonpathPlus = require('jsonpath-plus');
25
- var lodash = require('lodash');
26
27
  var lu = require('react-icons/lu');
27
28
  var tinycolor = require('tinycolor2');
28
29
  var hooks = require('@mantine/hooks');
@@ -33,7 +34,6 @@ var reactMinisearch = require('react-minisearch');
33
34
  var MiniSearch = require('minisearch');
34
35
  var uniq = require('lodash/uniq');
35
36
  var sum = require('lodash/sum');
36
- var Markdown = require('react-markdown');
37
37
  var remarkGfm = require('remark-gfm');
38
38
  var reactCookie = require('react-cookie');
39
39
  var FileSaver = require('file-saver');
@@ -45,6 +45,7 @@ var tw = require('tailwind-styled-components');
45
45
  require('universal-cookie');
46
46
  var ri = require('react-icons/ri');
47
47
  var io = require('react-icons/io');
48
+ var GraphiQL = require('graphiql');
48
49
  var fs = require('fs');
49
50
  var path = require('path');
50
51
  var modals = require('@mantine/modals');
@@ -74,40 +75,6 @@ function _interopNamespaceDefault(e) {
74
75
 
75
76
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
76
77
 
77
- const Gen3Link = ({ className, href, linkType, text, showExternalIcon = false })=>{
78
- const portalBasename = process.env.NEXT_PUBLIC_PORTAL_BASENAME && process.env.NEXT_PUBLIC_PORTAL_BASENAME !== '/' ? process.env.NEXT_PUBLIC_PORTAL_BASENAME : '';
79
- if (linkType === 'gen3ff') {
80
- return /*#__PURE__*/ jsxRuntime.jsx("span", {
81
- className: className,
82
- children: /*#__PURE__*/ jsxRuntime.jsx(Link, {
83
- href: href,
84
- children: text
85
- })
86
- });
87
- } else if (linkType === 'portal') {
88
- return /*#__PURE__*/ jsxRuntime.jsx("a", {
89
- className: className,
90
- href: `${portalBasename}${href}`,
91
- target: "_parent",
92
- children: text
93
- });
94
- }
95
- // external link
96
- return /*#__PURE__*/ jsxRuntime.jsxs("a", {
97
- className: className,
98
- href: href,
99
- target: "_blank",
100
- rel: "noreferrer",
101
- children: [
102
- showExternalIcon ? /*#__PURE__*/ jsxRuntime.jsx(fa.FaExternalLinkAlt, {
103
- className: "pr-1",
104
- title: "External Link"
105
- }) : null,
106
- text
107
- ]
108
- });
109
- };
110
-
111
78
  const extractClassName = (key, classNames)=>{
112
79
  if (typeof classNames === 'object' && key in classNames) {
113
80
  return classNames[key];
@@ -120,119 +87,212 @@ const extractClassName = (key, classNames)=>{
120
87
  *
121
88
  * @param {RecordType} defaultValues - The default values for the classnames.
122
89
  * @param {RecordType} userValues - The user-defined values for the classnames.
123
- * @param {boolean} merge - Whether to merge the default and user values. Default is true.
90
+ * @param {StylingMergeMode} mode - Whether to merge or replace the default and user values. Default is merge.
124
91
  * @returns {RecordType} - The merged default and user values for the classnames.
125
- */ const mergeDefaultTailwindClassnames = (defaultValues, userValues, merge = true)=>{
92
+ */ const mergeDefaultTailwindClassnames = (defaultValues, { mode = 'merge', ...userValues })=>{
126
93
  const defaultKeys = Object.keys(defaultValues);
127
94
  const mergedValues = {
128
- ...defaultValues,
129
- ...userValues
95
+ ...defaultValues
130
96
  };
131
- if (merge) {
97
+ if (mode === 'merge') {
132
98
  defaultKeys.forEach((key)=>{
133
99
  if (userValues[key]) {
134
100
  mergedValues[key] = tailwindMerge.twMerge(defaultValues[key], userValues[key]);
135
101
  }
136
102
  });
137
103
  }
104
+ if (mode === 'replace') {
105
+ defaultKeys.forEach((key)=>{
106
+ if (userValues[key]) {
107
+ mergedValues[key] = userValues[key];
108
+ }
109
+ });
110
+ }
138
111
  return mergedValues;
139
112
  };
140
113
 
141
- const Footer = ({ bottomLinks, columnLinks, footerLogos, footerRightLogos, classNames = {} })=>{
114
+ const isPropertyKey = (value)=>{
115
+ return typeof value === 'string' || typeof value === 'number' || typeof value === 'symbol';
116
+ };
117
+ const hasOwnProperty = (obj, prop)=>{
118
+ if (obj === undefined) return false;
119
+ if (prop === undefined) return false;
120
+ return Object.hasOwnProperty.call(obj, prop);
121
+ };
122
+ const getParamsValueAsString = (params, key)=>{
123
+ return params && key && key !== '' && isPropertyKey(key) && hasOwnProperty(params, key) ? lodash.toString(params[key]) : undefined;
124
+ };
125
+ const extractObjectKey = (obj)=>{
126
+ const keys = Object.keys(obj);
127
+ return keys.length > 0 ? keys[0] : undefined;
128
+ };
129
+
130
+ // Component for rendering a single row in the column
131
+ // TODO: replace with a renderer factory
132
+ const FooterRowComponent = ({ item, rowClassname })=>{
133
+ const itemType = extractObjectKey(item);
134
+ if (!itemType) return null;
135
+ const className = item[itemType].className ?? rowClassname;
136
+ switch(itemType){
137
+ case 'Label':
138
+ {
139
+ const text = item[itemType];
140
+ return /*#__PURE__*/ jsxRuntime.jsxs("p", {
141
+ className: className,
142
+ children: [
143
+ " ",
144
+ text.text
145
+ ]
146
+ });
147
+ }
148
+ case 'Link':
149
+ {
150
+ const link = item[itemType];
151
+ return /*#__PURE__*/ jsxRuntime.jsx(React.Fragment, {
152
+ children: /*#__PURE__*/ jsxRuntime.jsx("a", {
153
+ href: link.href,
154
+ target: "_blank",
155
+ rel: "noopener noreferrer",
156
+ className: className,
157
+ children: link.text ? link.text : link.href
158
+ })
159
+ }, link.href);
160
+ }
161
+ case 'Links':
162
+ {
163
+ const links = item[itemType];
164
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
165
+ className: `flex flex-no-wrap space-x-4 ${className ?? ''}`,
166
+ children: links?.links.map((link, i)=>{
167
+ return /*#__PURE__*/ jsxRuntime.jsxs(React.Fragment, {
168
+ children: [
169
+ /*#__PURE__*/ jsxRuntime.jsx("a", {
170
+ href: link.href,
171
+ target: "_blank",
172
+ rel: "noopener noreferrer",
173
+ className: link?.className,
174
+ children: link.text ? link.text : link.href
175
+ }),
176
+ i !== links?.links.length - 1 && /*#__PURE__*/ jsxRuntime.jsx("span", {
177
+ className: "mx-1",
178
+ children: "|"
179
+ })
180
+ ]
181
+ }, link.href);
182
+ })
183
+ });
184
+ }
185
+ case 'Icon':
186
+ {
187
+ const logo = item[itemType];
188
+ return /*#__PURE__*/ jsxRuntime.jsx(Image, {
189
+ src: `${logo.logo}`,
190
+ width: logo.width,
191
+ height: logo.height,
192
+ alt: logo.description,
193
+ className: className
194
+ }, `icons-${logo.logo}`);
195
+ }
196
+ case 'Section':
197
+ {
198
+ const section = item[itemType];
199
+ return /*#__PURE__*/ jsxRuntime.jsx(FooterSection, {
200
+ columns: section.columns,
201
+ className: className
202
+ });
203
+ }
204
+ default:
205
+ return null;
206
+ }
207
+ };
208
+ const FooterColumnTwDefaultStyles = {
209
+ root: 'flex flex-col px-2 justify-start',
210
+ heading: 'font-bold text-xl text-white font-heading',
211
+ rowItem: ''
212
+ };
213
+ const FooterColumn = ({ heading, rows, classNames = {} })=>{
214
+ const mergedClassNames = mergeDefaultTailwindClassnames(FooterColumnTwDefaultStyles, classNames);
215
+ const rowClassname = extractClassName('rowItem', mergedClassNames);
216
+ return /*#__PURE__*/ jsxRuntime.jsxs("div", {
217
+ className: extractClassName('root', mergedClassNames),
218
+ children: [
219
+ heading && /*#__PURE__*/ jsxRuntime.jsx("h1", {
220
+ className: extractClassName('heading', mergedClassNames),
221
+ children: heading
222
+ }),
223
+ rows?.map((item, index)=>{
224
+ return /*#__PURE__*/ jsxRuntime.jsx(FooterRowComponent, {
225
+ item: item,
226
+ rowClassname: rowClassname
227
+ }, `footer-row-${index}`);
228
+ })
229
+ ]
230
+ });
231
+ };
232
+ const FooterSection = ({ columns, className = undefined })=>{
233
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
234
+ className: `${className ?? 'flex items-center justify-center'}`,
235
+ children: columns?.map((col, index)=>/*#__PURE__*/ jsxRuntime.jsx(FooterColumn, {
236
+ ...col
237
+ }, `column-${index}`))
238
+ });
239
+ };
240
+ var FooterSection$1 = /*#__PURE__*/ React.memo(FooterSection);
241
+
242
+ const Footer = ({ rightSection, leftSection, classNames = {} })=>{
142
243
  const classNamesDefaults = {
143
- root: 'bg-primary-lighter text-primary-contrast p-4 shadow-sm'
244
+ root: 'bg-primary-lighter text-primary-contrast p-4 shadow-sm',
245
+ layout: 'flex items-center justify-between'
144
246
  };
145
247
  const mergedClassNames = mergeDefaultTailwindClassnames(classNamesDefaults, classNames);
146
- return /*#__PURE__*/ jsxRuntime.jsxs("footer", {
147
- children: [
148
- /*#__PURE__*/ jsxRuntime.jsxs("div", {
149
- className: extractClassName('root', mergedClassNames),
248
+ return /*#__PURE__*/ jsxRuntime.jsx("footer", {
249
+ children: /*#__PURE__*/ jsxRuntime.jsx("div", {
250
+ className: extractClassName('root', mergedClassNames),
251
+ children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
252
+ className: extractClassName('layout', mergedClassNames),
150
253
  children: [
151
- /*#__PURE__*/ jsxRuntime.jsxs("div", {
152
- className: "flex justify-end",
153
- children: [
154
- (footerLogos || [
155
- []
156
- ]).map((col, index)=>{
157
- return /*#__PURE__*/ jsxRuntime.jsx("div", {
158
- className: `flex flex-row gap-x-3 mr-8 ${col.length > 1 ? 'justify-between' : ''}`,
159
- children: col.map((logo)=>/*#__PURE__*/ jsxRuntime.jsx(Image, {
160
- className: "object-none",
161
- src: `${logo.logo}`,
162
- width: logo.width,
163
- height: logo.height,
164
- alt: logo.description
165
- }, `icons-${logo.logo}`))
166
- }, `footer-col-${index}`);
167
- }),
168
- /*#__PURE__*/ jsxRuntime.jsx("div", {
169
- className: "flex w-[100%] pl-10 pt-3",
170
- children: (columnLinks || []).map(({ heading, items }, i)=>/*#__PURE__*/ jsxRuntime.jsxs("div", {
171
- className: "flex flex-col pl-10",
172
- children: [
173
- /*#__PURE__*/ jsxRuntime.jsx("h1", {
174
- className: "font-bold text-xl text-white font-heading",
175
- children: heading
176
- }),
177
- (items || []).map(({ text, href, linkType }, j)=>{
178
- const attrs = {
179
- className: `${href && 'heal-link-footer'} font-medium text-sm p-[2px] text-white font-content`,
180
- key: j
181
- };
182
- if (href) {
183
- return /*#__PURE__*/ React.createElement("div", {
184
- ...attrs,
185
- key: href
186
- }, /*#__PURE__*/ jsxRuntime.jsx(Gen3Link, {
187
- href: href,
188
- linkType: linkType,
189
- text: text
190
- }));
191
- } else {
192
- return /*#__PURE__*/ React.createElement("span", {
193
- ...attrs,
194
- key: href
195
- }, text);
196
- }
197
- })
198
- ]
199
- }, i))
200
- })
201
- ]
254
+ leftSection && /*#__PURE__*/ jsxRuntime.jsx(FooterSection$1, {
255
+ ...leftSection
202
256
  }),
203
- (footerRightLogos || [
204
- []
205
- ]).map((col, index)=>{
206
- return /*#__PURE__*/ jsxRuntime.jsx("div", {
207
- className: `flex gap-x-6 mr-8 ${col.length > 1 ? 'justify-end' : ''}`,
208
- children: col.map((logo)=>/*#__PURE__*/ jsxRuntime.jsx(Image, {
209
- src: `${logo.logo}`,
210
- width: logo.width,
211
- height: logo.height,
212
- alt: logo.description
213
- }, `icons-${logo.logo}`))
214
- }, `footer-col-${index}`);
257
+ rightSection && /*#__PURE__*/ jsxRuntime.jsx(FooterSection$1, {
258
+ ...rightSection
215
259
  })
216
260
  ]
217
- }),
218
- bottomLinks && bottomLinks.length > 0 ? /*#__PURE__*/ jsxRuntime.jsx("div", {
219
- className: "pt-[4px] m-1 text-right text-xs text-white font-content",
220
- children: bottomLinks.map((link, i)=>/*#__PURE__*/ jsxRuntime.jsxs(React.Fragment, {
221
- children: [
222
- /*#__PURE__*/ jsxRuntime.jsx("a", {
223
- href: link.href,
224
- target: "_blank",
225
- rel: "noopener noreferrer",
226
- className: "heal-link-footer",
227
- children: link.text ? link.text : link.href
228
- }),
229
- i !== bottomLinks.length - 1 && /*#__PURE__*/ jsxRuntime.jsx("span", {
230
- className: "mx-1",
231
- children: "|"
232
- })
233
- ]
234
- }, link.href))
235
- }) : null
261
+ })
262
+ })
263
+ });
264
+ };
265
+
266
+ const Gen3Link = ({ className, href, linkType, text, showExternalIcon = false })=>{
267
+ const portalBasename = process.env.NEXT_PUBLIC_PORTAL_BASENAME && process.env.NEXT_PUBLIC_PORTAL_BASENAME !== '/' ? process.env.NEXT_PUBLIC_PORTAL_BASENAME : '';
268
+ if (linkType === 'gen3ff') {
269
+ return /*#__PURE__*/ jsxRuntime.jsx("span", {
270
+ className: className,
271
+ children: /*#__PURE__*/ jsxRuntime.jsx(Link, {
272
+ href: href,
273
+ children: text
274
+ })
275
+ });
276
+ } else if (linkType === 'portal') {
277
+ return /*#__PURE__*/ jsxRuntime.jsx("a", {
278
+ className: className,
279
+ href: `${portalBasename}${href}`,
280
+ target: "_parent",
281
+ children: text
282
+ });
283
+ }
284
+ // external link
285
+ return /*#__PURE__*/ jsxRuntime.jsxs("a", {
286
+ className: className,
287
+ href: href,
288
+ target: "_blank",
289
+ rel: "noreferrer",
290
+ children: [
291
+ showExternalIcon ? /*#__PURE__*/ jsxRuntime.jsx(fa.FaExternalLinkAlt, {
292
+ className: "pr-1",
293
+ title: "External Link"
294
+ }) : null,
295
+ text
236
296
  ]
237
297
  });
238
298
  };
@@ -486,7 +546,7 @@ var LoginButtonVisibility;
486
546
  const handleSelected = async (isAuthenticated, router, referrer, endSession)=>{
487
547
  if (!isAuthenticated) await router.push(`Login?redirect=${referrer}`);
488
548
  else {
489
- endSession && endSession();
549
+ if (endSession) endSession();
490
550
  }
491
551
  };
492
552
  const LoginButton = ({ icon = /*#__PURE__*/ jsxRuntime.jsx(md.MdLogin, {
@@ -546,7 +606,7 @@ const TopIconButton = ({ name, leftIcon = undefined, rightIcon = undefined, clas
546
606
  const classNamesDefaults = {
547
607
  root: `flex items-center align-middle px-2 ${drawBorder && 'border-r-2 border-accent'} my-2`,
548
608
  button: 'flex flex-nowrap items-center align-middle border-b-2 hover:border-accent border-transparent',
549
- leftSection: 'text-secondary-contrast-lighter pr-1',
609
+ leftIcon: 'text-secondary-contrast-lighter pr-1',
550
610
  label: 'font-content text-secondary-contrast-lighter block',
551
611
  rightIcon: 'text-secondary-contrast-lighter pl-1'
552
612
  };
@@ -640,12 +700,14 @@ const TopBar = ({ items, loginButtonVisibility = LoginButtonVisibility.Hidden, c
640
700
  });
641
701
  };
642
702
 
643
- const NavigationLogo = ({ src, title, description, basePath = '', classNames = {} })=>{
703
+ const NavigationLogo = ({ src, title, description, width, height, divider = false, basePath = '', classNames = {} })=>{
644
704
  const classNamesDefaults = {
645
- root: 'relative flex h-full py-2 justify-start items-center align-middle font-heading font-bold tracking-wide text-xl ml-[5px] mr-[20px]',
646
- link: 'relative w-96 h-full',
647
- title: 'border-solid border-base-darker border-l-1 ml-1 mr-3 h-32 w-1',
648
- titleLink: 'font-heading h3-typo pt-2 text-ink-dark hover:text-ink-darkest hover:border-accent hover:border-b-3'
705
+ root: 'relative flex py-2 justify-start items-center align-middle font-heading font-bold tracking-wide text-xl ml-[5px] mr-[20px]',
706
+ link: 'relative object-contain',
707
+ logo: 'px-3',
708
+ title: 'border-solid border-base-darker ml-1 mr-3',
709
+ divider: 'border-solid border-gen3-smoke border-l-1 ml-[2px] mr-[7px] h-[64px] w-1',
710
+ titleLink: 'font-heading text-md pt-2 text-ink-dark hover:text-ink-darkest hover:border-accent hover:border-b-3'
649
711
  };
650
712
  const mergedClassnames = mergeDefaultTailwindClassnames(classNamesDefaults, classNames);
651
713
  return /*#__PURE__*/ jsxRuntime.jsxs("div", {
@@ -656,12 +718,17 @@ const NavigationLogo = ({ src, title, description, basePath = '', classNames = {
656
718
  className: extractClassName('link', mergedClassnames),
657
719
  href: "/",
658
720
  children: /*#__PURE__*/ jsxRuntime.jsx(Image, {
659
- className: "pr-3 object-contain",
660
- fill: true,
721
+ className: extractClassName('logo', mergedClassnames),
722
+ width: width ?? undefined,
723
+ height: height ?? undefined,
724
+ fill: !width && !height,
661
725
  src: `${basePath}${src}`,
662
726
  alt: description ?? title ?? 'link back to homepage'
663
727
  })
664
728
  }),
729
+ divider && /*#__PURE__*/ jsxRuntime.jsx("div", {
730
+ className: extractClassName('divider', mergedClassnames)
731
+ }),
665
732
  title && /*#__PURE__*/ jsxRuntime.jsx("div", {
666
733
  className: extractClassName('title', mergedClassnames),
667
734
  role: "navigation",
@@ -686,7 +753,7 @@ const NavigationLogo = ({ src, title, description, basePath = '', classNames = {
686
753
  */ const NavigationBarButton = ({ tooltip, icon, href, name, iconHeight = '27px', classNames = {} })=>{
687
754
  const classNamesDefaults = {
688
755
  root: `flex flex-col flex-nowrap px-3 py-2 pt-4 items-center align-center text-primary hover:text-accent opacity-80 hover:opacity-100`,
689
- label: 'pt-1.5 body-typo font-heading text-sm',
756
+ label: 'pt-1.5 body-typo font-heading text-sm text-nowrap',
690
757
  icon: 'mt-0.5 ml-1',
691
758
  ...TooltipStyle
692
759
  };
@@ -729,11 +796,12 @@ const NavigationLogo = ({ src, title, description, basePath = '', classNames = {
729
796
  * @param {Object} NavigationProps.logo - The logo object
730
797
  * @param {Array} NavigationProps.items - The array of navigation items
731
798
  * @param {Object} NavigationProps.classNames - The custom class names for different elements of the NavigationBar
732
- * @returns {JSX.Element} The rendered NavigationBar component
733
- */ const NavigationBar = ({ logo = undefined, items = [], classNames = {} })=>{
799
+ * @returns {ReactElement} The rendered NavigationBar component
800
+ */ const NavigationBar = ({ logo = undefined, title = undefined, items = [], classNames = {} })=>{
734
801
  const classNamesDefaults = {
735
- root: 'flex bg-base-max border-b-1 border-base-lighter',
736
- navigationPanel: 'font-heading font-bold tracking-wide text-xl',
802
+ root: 'flex bg-base-max border-b-1 border-base-dark',
803
+ navigationPanel: 'font-heading',
804
+ logoAndTitlePanel: 'flex justify-center items-center align-middle',
737
805
  login: 'pl-1 mr-6 bg-base-max text-base-contrast opacity-80 hover:opacity-100'
738
806
  };
739
807
  const mergedClassnames = mergeDefaultTailwindClassnames(classNamesDefaults, classNames);
@@ -748,7 +816,7 @@ const NavigationLogo = ({ src, title, description, basePath = '', classNames = {
748
816
  className: extractClassName('root', mergedClassnames),
749
817
  children: [
750
818
  /*#__PURE__*/ jsxRuntime.jsx("div", {
751
- className: `flex justify-center items-center align-middle ${extractClassName('logo', mergedClassnames)}`,
819
+ className: extractClassName('logoAndTitlePanel', mergedClassnames),
752
820
  children: logo && /*#__PURE__*/ jsxRuntime.jsx(NavigationLogo, {
753
821
  ...logo
754
822
  })
@@ -761,7 +829,7 @@ const NavigationLogo = ({ src, title, description, basePath = '', classNames = {
761
829
  children: items.map((x, index)=>{
762
830
  const selectedStyle = current === x.href ? 'border-accent border-b-4 border-b-accent' : '';
763
831
  return /*#__PURE__*/ jsxRuntime.jsx("div", {
764
- className: `first:border-l-1 border-r-1 border-base-lighter ${selectedStyle}`,
832
+ className: `first:border-l-1 border-r-1 border-base-dark ${selectedStyle}`,
765
833
  children: /*#__PURE__*/ jsxRuntime.jsx(NavigationBarButton, {
766
834
  tooltip: x.tooltip,
767
835
  icon: x.icon,
@@ -776,6 +844,67 @@ const NavigationLogo = ({ src, title, description, basePath = '', classNames = {
776
844
  });
777
845
  };
778
846
 
847
+ const backgroundColor = {
848
+ INFO: 'bg-utility-info',
849
+ WARNING: 'bg-utility-warning',
850
+ ERROR: 'bg-utility-error',
851
+ MESSAGE: 'bg-utility-warning'
852
+ };
853
+ const textColor = {
854
+ INFO: 'text-utility-contrast-info',
855
+ WARNING: 'text-utility-contrast-warning',
856
+ ERROR: 'text-utility-contrast-error',
857
+ MESSAGE: 'text-utility-contrast-warning'
858
+ };
859
+ const icon = {
860
+ INFO: /*#__PURE__*/ jsxRuntime.jsx(fa.FaQuestion, {
861
+ className: "text-utility-contrast-info",
862
+ title: "Info icon."
863
+ }),
864
+ WARNING: /*#__PURE__*/ jsxRuntime.jsx(fa.FaExclamation, {
865
+ className: "text-utility-contrast-warning",
866
+ title: "Warning icon."
867
+ }),
868
+ ERROR: /*#__PURE__*/ jsxRuntime.jsx(fa.FaExclamationTriangle, {
869
+ className: "text-utility-contrast-error",
870
+ title: "Error icon."
871
+ })
872
+ };
873
+ const Banner = ({ message, level, isExternalLink })=>{
874
+ const linkTarget = isExternalLink ? '_blank' : '_self';
875
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
876
+ className: `w-full p-1 flex justify-between ${backgroundColor[level]}`,
877
+ children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
878
+ className: "flex items-center m-auto",
879
+ children: [
880
+ icon[level],
881
+ /*#__PURE__*/ jsxRuntime.jsx("span", {
882
+ className: `pl-4 ${textColor[level]}`,
883
+ children: /*#__PURE__*/ jsxRuntime.jsx(Markdown, {
884
+ components: {
885
+ // eslint-disable-next-line react/prop-types
886
+ a: ({ children, ...props })=>/*#__PURE__*/ jsxRuntime.jsxs("a", {
887
+ className: "underline",
888
+ ...props,
889
+ target: linkTarget,
890
+ rel: "noreferrer",
891
+ children: [
892
+ children,
893
+ isExternalLink && /*#__PURE__*/ jsxRuntime.jsx(fa.FaExternalLinkAlt, {
894
+ className: "pl-1 inline-block",
895
+ title: "External Link"
896
+ })
897
+ ]
898
+ })
899
+ },
900
+ children: message
901
+ })
902
+ })
903
+ ]
904
+ })
905
+ });
906
+ };
907
+
779
908
  const ActionMenu = ({ items })=>{
780
909
  return /*#__PURE__*/ jsxRuntime.jsx(React.Fragment, {
781
910
  children: /*#__PURE__*/ jsxRuntime.jsxs(core$1.Menu, {
@@ -872,25 +1001,39 @@ const HorizontalNavigationBar = ({ actions, items, logo = undefined, loginIcon =
872
1001
  * @param {object} props.navigation - The navigation bar items and configuration.
873
1002
  * @param {string} props.type - The type of header to render. Default value is 'original'.
874
1003
  * @returns {JSX.Element} - The rendered Header component.
875
- */ const Header = ({ top, navigation, type = 'original' })=>{
876
- return type === 'horizontal' ? /*#__PURE__*/ jsxRuntime.jsx("div", {
1004
+ */ const Header = ({ top, navigation, banners, type = 'original' })=>{
1005
+ return type === 'horizontal' ? /*#__PURE__*/ jsxRuntime.jsxs("div", {
877
1006
  className: "w-full",
878
- children: /*#__PURE__*/ jsxRuntime.jsx(HorizontalNavigationBar, {
879
- logo: navigation.logo,
880
- title: navigation.title,
881
- items: navigation.items,
882
- classNames: {
883
- ...navigation.classNames
884
- },
885
- actions: top
886
- })
887
- }) : type === 'vertical' ? /*#__PURE__*/ jsxRuntime.jsx(HorizontalNavigationBar, {
888
- logo: navigation.logo,
889
- title: navigation.title,
890
- classNames: {
891
- ...navigation.classNames
892
- },
893
- actions: top
1007
+ children: [
1008
+ banners?.map((banner)=>/*#__PURE__*/ React.createElement(Banner, {
1009
+ ...banner,
1010
+ key: banner.id
1011
+ })),
1012
+ /*#__PURE__*/ jsxRuntime.jsx(HorizontalNavigationBar, {
1013
+ logo: navigation.logo,
1014
+ title: navigation.title,
1015
+ items: navigation.items,
1016
+ classNames: {
1017
+ ...navigation.classNames
1018
+ },
1019
+ actions: top
1020
+ })
1021
+ ]
1022
+ }) : type === 'vertical' ? /*#__PURE__*/ jsxRuntime.jsxs("div", {
1023
+ children: [
1024
+ banners?.map((banner)=>/*#__PURE__*/ React.createElement(Banner, {
1025
+ ...banner,
1026
+ key: banner.id
1027
+ })),
1028
+ /*#__PURE__*/ jsxRuntime.jsx(HorizontalNavigationBar, {
1029
+ logo: navigation.logo,
1030
+ title: navigation.title,
1031
+ classNames: {
1032
+ ...navigation.classNames
1033
+ },
1034
+ actions: top
1035
+ })
1036
+ ]
894
1037
  }) : /*#__PURE__*/ jsxRuntime.jsxs("div", {
895
1038
  className: "w-100",
896
1039
  children: [
@@ -901,10 +1044,15 @@ const HorizontalNavigationBar = ({ actions, items, logo = undefined, loginIcon =
901
1044
  ...top.classNames
902
1045
  }
903
1046
  }),
1047
+ banners?.map((banner)=>/*#__PURE__*/ React.createElement(Banner, {
1048
+ ...banner,
1049
+ key: banner.id
1050
+ })),
904
1051
  /*#__PURE__*/ jsxRuntime.jsx(NavigationBar, {
905
1052
  logo: navigation.logo,
906
1053
  title: navigation.title,
907
- items: navigation.items
1054
+ items: navigation.items,
1055
+ classNames: navigation?.classNames
908
1056
  })
909
1057
  ]
910
1058
  });
@@ -1396,18 +1544,6 @@ const TruncatedStringWithTooltip = ({ value, params })=>{
1396
1544
  });
1397
1545
  };
1398
1546
 
1399
- const isPropertyKey = (value)=>{
1400
- return typeof value === 'string' || typeof value === 'number' || typeof value === 'symbol';
1401
- };
1402
- const hasOwnProperty = (obj, prop)=>{
1403
- if (obj === undefined) return false;
1404
- if (prop === undefined) return false;
1405
- return Object.hasOwnProperty.call(obj, prop);
1406
- };
1407
- const getParamsValueAsString = (params, key)=>{
1408
- return params && key && key !== '' && isPropertyKey(key) && hasOwnProperty(params, key) ? lodash.toString(params[key]) : undefined;
1409
- };
1410
-
1411
1547
  const TruncatedStringWithTooltipCellRenderer = ({ value }, params)=>{
1412
1548
  return /*#__PURE__*/ jsxRuntime.jsx(TruncatedStringWithTooltip, {
1413
1549
  value: value,
@@ -4985,9 +5121,13 @@ const FirstTimeModal = ({ openModal, config })=>{
4985
5121
  'Gen3-first-time-use'
4986
5122
  ]);
4987
5123
  const handleAccept = ()=>{
4988
- cookie['Gen3-first-time-use'] || setCookie('Gen3-first-time-use', true, {
4989
- maxAge: 60 * 60 * 24 * (config?.expireDays ?? 365)
4990
- });
5124
+ const isFirstTimeUse = cookie['Gen3-first-time-use'];
5125
+ if (!isFirstTimeUse) {
5126
+ const maxAge = 60 * 60 * 24 * (config?.expireDays ?? 365);
5127
+ setCookie('Gen3-first-time-use', true, {
5128
+ maxAge
5129
+ });
5130
+ }
4991
5131
  };
4992
5132
  return /*#__PURE__*/ jsxRuntime.jsx(BaseModal, {
4993
5133
  title: /*#__PURE__*/ jsxRuntime.jsx(core$1.Text, {
@@ -5232,7 +5372,7 @@ const Gen3ModalsProvider = ({ config, children })=>{
5232
5372
  useDeepCompare.useDeepCompareEffect(()=>{
5233
5373
  if (!cookie['Gen3-first-time-use'] && modalsConfig.systemUseModal.enabled) {
5234
5374
  if (modalsConfig.systemUseModal.showOnlyOnLogin && !isAuthenticated) return;
5235
- dispatch && dispatch(core.showModal({
5375
+ if (dispatch) dispatch(core.showModal({
5236
5376
  modal: core.Modals.FirstTimeModal
5237
5377
  }));
5238
5378
  }
@@ -8020,7 +8160,7 @@ const ExtractData = (data, index)=>{
8020
8160
  if (data.data === undefined || data.data === null) return {};
8021
8161
  return Array.isArray(data.data[index]) && data.data[index].length > 0 ? data.data[index][0] : {};
8022
8162
  };
8023
- const TableDetailsPanel = ({ id, index, tableConfig })=>{
8163
+ const QueryRowDetailsPanel = ({ id, index, tableConfig })=>{
8024
8164
  //const [queryGuppy, { data, isLoading, isError }] = useLazyGeneralGQLQuery();
8025
8165
  const idField = tableConfig.detailsConfig?.idField;
8026
8166
  const { data, isLoading, isError } = core.useGeneralGQLQuery({
@@ -8043,7 +8183,7 @@ const TableDetailsPanel = ({ id, index, tableConfig })=>{
8043
8183
  }
8044
8184
  }
8045
8185
  });
8046
- if (!idField || idField === null) {
8186
+ if (!idField) {
8047
8187
  return /*#__PURE__*/ jsxRuntime.jsx(ErrorCard, {
8048
8188
  message: 'idField not configure in Tables Details Config'
8049
8189
  });
@@ -8075,7 +8215,7 @@ const TableDetailsPanel = ({ id, index, tableConfig })=>{
8075
8215
  visible: isLoading
8076
8216
  }),
8077
8217
  /*#__PURE__*/ jsxRuntime.jsxs(core$1.Text, {
8078
- color: "primary.4",
8218
+ c: "primary.4",
8079
8219
  children: [
8080
8220
  "Results for ",
8081
8221
  id
@@ -8106,10 +8246,53 @@ const TableDetailsPanel = ({ id, index, tableConfig })=>{
8106
8246
  });
8107
8247
  };
8108
8248
 
8249
+ const RowTableDetailsPanel = ({ row })=>{
8250
+ const rowData = row?.original ?? {};
8251
+ const rows = Object.entries(rowData).map(([field, value])=>/*#__PURE__*/ jsxRuntime.jsxs(core$1.Table.Tr, {
8252
+ children: [
8253
+ /*#__PURE__*/ jsxRuntime.jsx(core$1.Table.Td, {
8254
+ children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Text, {
8255
+ fw: "bold",
8256
+ children: field
8257
+ })
8258
+ }),
8259
+ /*#__PURE__*/ jsxRuntime.jsx(core$1.Table.Td, {
8260
+ children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Text, {
8261
+ children: value ? value : ''
8262
+ })
8263
+ })
8264
+ ]
8265
+ }, field));
8266
+ return /*#__PURE__*/ jsxRuntime.jsxs(core$1.Table, {
8267
+ striped: true,
8268
+ highlightOnHover: true,
8269
+ withTableBorder: true,
8270
+ withColumnBorders: true,
8271
+ children: [
8272
+ /*#__PURE__*/ jsxRuntime.jsx(core$1.Table.Thead, {
8273
+ children: /*#__PURE__*/ jsxRuntime.jsxs(core$1.Table.Tr, {
8274
+ children: [
8275
+ /*#__PURE__*/ jsxRuntime.jsx(core$1.Table.Th, {
8276
+ children: "Field"
8277
+ }),
8278
+ /*#__PURE__*/ jsxRuntime.jsx(core$1.Table.Th, {
8279
+ children: "Value"
8280
+ })
8281
+ ]
8282
+ })
8283
+ }),
8284
+ /*#__PURE__*/ jsxRuntime.jsx(core$1.Table.Tbody, {
8285
+ children: rows
8286
+ })
8287
+ ]
8288
+ });
8289
+ };
8290
+
8109
8291
  let instance;
8110
8292
  const DefaultRendererCatalog = {
8111
8293
  tableDetails: {
8112
- default: TableDetailsPanel
8294
+ default: RowTableDetailsPanel,
8295
+ queryRowDetails: QueryRowDetailsPanel
8113
8296
  }
8114
8297
  };
8115
8298
  const ExplorerTableDetailsPanelFactory = ()=>{
@@ -8128,9 +8311,9 @@ const DEFAULT_PROPS = {
8128
8311
  title: '!text-primary-contrast !font-bold',
8129
8312
  close: '!bg-base-darker'
8130
8313
  };
8131
- const DetailsModal = ({ title, id, classNames, panel, panelProps, onClose, withCloseButton = true, closeOnClickOutside = true, closeOnEscape = true, size = 'auto' })=>{
8314
+ const DetailsModal = ({ title, id, row, classNames, panel, panelProps, onClose, withCloseButton = true, closeOnClickOutside = true, closeOnEscape = true, size = 'auto' })=>{
8132
8315
  const [opened, { open, close }] = hooks.useDisclosure(id !== undefined);
8133
- const styling = React.useMemo(()=>mergeDefaultTailwindClassnames(DEFAULT_PROPS, classNames ?? {}, true), [
8316
+ const styling = React.useMemo(()=>mergeDefaultTailwindClassnames(DEFAULT_PROPS, classNames ?? {}), [
8134
8317
  classNames
8135
8318
  ]);
8136
8319
  React.useEffect(()=>{
@@ -8145,7 +8328,7 @@ const DetailsModal = ({ title, id, classNames, panel, panelProps, onClose, withC
8145
8328
  opened: opened,
8146
8329
  onClose: ()=>{
8147
8330
  close();
8148
- onClose && onClose(id);
8331
+ if (onClose) onClose(id);
8149
8332
  },
8150
8333
  title: title,
8151
8334
  withinPortal: true,
@@ -8157,8 +8340,9 @@ const DetailsModal = ({ title, id, classNames, panel, panelProps, onClose, withC
8157
8340
  classNames: styling,
8158
8341
  xOffset: 0,
8159
8342
  children: panel({
8160
- id: id,
8343
+ id,
8161
8344
  onClose,
8345
+ row,
8162
8346
  ...panelProps
8163
8347
  })
8164
8348
  });
@@ -8184,6 +8368,7 @@ const isRecordAny = (obj)=>{
8184
8368
  const DetailsComponent = DetailsModal;
8185
8369
  const [sorting, setSorting] = React.useState([]);
8186
8370
  const [rowSelection, setRowSelection] = React.useState({});
8371
+ const [selectedRow, setSelectedRow] = React.useState(undefined);
8187
8372
  const DetailsPanel = React.useMemo(()=>ExplorerTableDetailsPanelFactory().getRenderer('tableDetails', tableConfig?.detailsConfig?.panel ?? 'default'), []);
8188
8373
  const cols = useDeepCompare.useDeepCompareMemo(()=>{
8189
8374
  // setup table columns at the same time
@@ -8307,10 +8492,12 @@ const isRecordAny = (obj)=>{
8307
8492
  onClick: ()=>{
8308
8493
  if (Object.keys(rowSelection).includes(row.id)) {
8309
8494
  setRowSelection({});
8495
+ setSelectedRow(undefined);
8310
8496
  } else {
8311
8497
  setRowSelection({
8312
8498
  [row.id]: true
8313
8499
  });
8500
+ setSelectedRow(row); // TODO: fix this typecast
8314
8501
  }
8315
8502
  },
8316
8503
  sx: {
@@ -8323,6 +8510,7 @@ const isRecordAny = (obj)=>{
8323
8510
  Object.keys(rowSelection).length > 0 ? /*#__PURE__*/ jsxRuntime.jsx(DetailsComponent, {
8324
8511
  title: tableConfig?.detailsConfig?.title,
8325
8512
  id: Object.keys(rowSelection).length > 0 ? Object.keys(rowSelection).at(0) : undefined,
8513
+ row: selectedRow,
8326
8514
  onClose: ()=>setRowSelection({}),
8327
8515
  panel: DetailsPanel,
8328
8516
  classNames: tableConfig?.detailsConfig?.classNames,
@@ -8455,22 +8643,22 @@ const useGuppyActionButton = ({ Modal403 = core.Modals.NoAccessModal, Modal400 =
8455
8643
  const controller = new AbortController();
8456
8644
  showDownloadNotification(controller);
8457
8645
  setActive(true);
8458
- setIsActive && setIsActive(true);
8646
+ if (setIsActive) setIsActive(true);
8459
8647
  await actionFunction(actionArgs, ()=>{
8460
8648
  setActive(false);
8461
- setIsActive && setIsActive(false);
8649
+ if (setIsActive) setIsActive(false);
8462
8650
  // Clean up notifications...
8463
8651
  notifications.cleanNotifications();
8464
8652
  }, (error)=>{
8465
8653
  handleError(error);
8466
8654
  setActive(false);
8467
- setIsActive && setIsActive(false);
8655
+ if (setIsActive) setIsActive(false);
8468
8656
  // Clean up notifications...
8469
8657
  notifications.cleanNotifications();
8470
8658
  showErrorMessage(error);
8471
8659
  }, ()=>{
8472
8660
  setActive(false);
8473
- setIsActive && setIsActive(false);
8661
+ if (setIsActive) setIsActive(false);
8474
8662
  // Clean up notifications...
8475
8663
  notifications.cleanNotifications();
8476
8664
  }, controller.signal);
@@ -8536,13 +8724,13 @@ const downloadToFileAction = async (params, done, onError, onAbort, signal)=>{
8536
8724
  parameters: params,
8537
8725
  onDone: (data)=>{
8538
8726
  handleDownload(data, params.filename);
8539
- done && done();
8727
+ if (done) done();
8540
8728
  },
8541
8729
  onError: (error)=>{
8542
- onError && onError(error);
8730
+ if (onError) onError(error);
8543
8731
  },
8544
8732
  onAbort: ()=>{
8545
- onAbort && onAbort();
8733
+ if (onAbort) onAbort();
8546
8734
  },
8547
8735
  signal
8548
8736
  });
@@ -8606,13 +8794,13 @@ const downloadToManifestAction = async (params, done, onError, onAbort, signal,
8606
8794
  type: 'application/json;charset=utf-8'
8607
8795
  });
8608
8796
  handleDownload(blob, manifestFilename);
8609
- done && done();
8797
+ if (done) done();
8610
8798
  } catch (err) {
8611
8799
  let resultErr;
8612
8800
  if (typeof err === 'string') resultErr = new Error(err);
8613
8801
  if (err instanceof Error) resultErr = err;
8614
8802
  if (!resultErr) resultErr = new Error('unknown error in download manifest');
8615
- onError && onError(resultErr);
8803
+ if (onError) onError(resultErr);
8616
8804
  }
8617
8805
  return;
8618
8806
  }
@@ -8678,16 +8866,16 @@ const downloadToManifestAction = async (params, done, onError, onAbort, signal,
8678
8866
  type: 'application/json;charset=utf-8'
8679
8867
  });
8680
8868
  handleDownload(blob, manifestFilename);
8681
- done && done();
8869
+ if (done) done();
8682
8870
  } catch (err) {
8683
- onError && onError(err);
8871
+ if (onError) onError(err);
8684
8872
  }
8685
8873
  };
8686
8874
 
8687
8875
  const registeredButtonActions = {};
8688
8876
  const NullButtonAction = (_params, done)=>{
8689
8877
  return new Promise((done)=>{
8690
- done && done();
8878
+ if (done) done();
8691
8879
  });
8692
8880
  };
8693
8881
  const registerButtonAction = (buttonName, actionItem)=>{
@@ -8745,7 +8933,7 @@ const GuppyDropdownMenuItem = ({ title, idx, disabled = false, Modal403 = core.M
8745
8933
  });
8746
8934
  return /*#__PURE__*/ jsxRuntime.jsx(core$1.Menu.Item, {
8747
8935
  onClick: ()=>{
8748
- handleClick && handleClick();
8936
+ if (handleClick) handleClick();
8749
8937
  },
8750
8938
  "data-testid": `${title}-${idx}`,
8751
8939
  leftSection: icon,
@@ -9239,18 +9427,42 @@ const CohortBuilder = ({ explorerConfig })=>{
9239
9427
  * @param graphQLEndpoint - The location of the graphql endpoint.
9240
9428
  * @returns a component containing a GraphiQl editor
9241
9429
  */ const GqlQueryEditor$1 = ({ graphQLEndpoint })=>{
9242
- React.useState('');
9243
- core.useCoreSelector(core.selectHeadersWithCSRFToken);
9244
- return /*#__PURE__*/ jsxRuntime.jsx("div", {
9430
+ const [query, setQuery] = React.useState('');
9431
+ const headers = core.useCoreSelector(core.selectHeadersWithCSRFToken);
9432
+ // Typically we would put this in core but it's only used here
9433
+ const fetcher = async (graphQLParams)=>{
9434
+ const data = await fetch(graphQLEndpoint || `${core.GEN3_GUPPY_API}/graphql`, {
9435
+ method: 'POST',
9436
+ headers: headers,
9437
+ body: JSON.stringify(graphQLParams)
9438
+ });
9439
+ return data.json().catch(()=>data.text());
9440
+ };
9441
+ return /*#__PURE__*/ jsxRuntime.jsxs("div", {
9245
9442
  className: "flex flex-col h-full w-full",
9246
- children: /*#__PURE__*/ jsxRuntime.jsx("div", {
9247
- className: "flex justify-between items-center m-2",
9248
- children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Text, {
9249
- size: "xl",
9250
- fw: 500,
9251
- children: "Query Graph"
9443
+ children: [
9444
+ /*#__PURE__*/ jsxRuntime.jsx("div", {
9445
+ className: "flex justify-between items-center m-2",
9446
+ children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Text, {
9447
+ size: "xl",
9448
+ fw: 500,
9449
+ children: "Query Graph"
9450
+ })
9451
+ }),
9452
+ /*#__PURE__*/ jsxRuntime.jsx(GraphiQL, {
9453
+ editorTheme: "light",
9454
+ fetcher: fetcher,
9455
+ query: query,
9456
+ onEditQuery: setQuery,
9457
+ children: /*#__PURE__*/ jsxRuntime.jsxs(GraphiQL.Logo, {
9458
+ children: [
9459
+ " ",
9460
+ null,
9461
+ " "
9462
+ ]
9463
+ })
9252
9464
  })
9253
- })
9465
+ ]
9254
9466
  });
9255
9467
  };
9256
9468
 
@@ -9311,10 +9523,17 @@ const ContentSource = setup();
9311
9523
  * @returns A Promise resolving to an object containing header and footer props.
9312
9524
  */ const getNavPageLayoutPropsFromConfig = async ()=>{
9313
9525
  const navigationConfigJSON = await ContentSource.get(`config/${core.GEN3_COMMONS_NAME}/navigation.json`);
9526
+ let bannerConfigJSON = [];
9527
+ try {
9528
+ bannerConfigJSON = await ContentSource.get(`config/${core.GEN3_COMMONS_NAME}/banner.json`);
9529
+ } catch (e) {
9530
+ console.log('No banner config found at: ', `config/${core.GEN3_COMMONS_NAME}/banner.json`);
9531
+ }
9314
9532
  const { topBar, navigation, type = 'original' } = navigationConfigJSON;
9315
9533
  const headerProps = {
9316
9534
  top: topBar,
9317
9535
  navigation: navigation,
9536
+ banners: bannerConfigJSON,
9318
9537
  type
9319
9538
  };
9320
9539
  const footerProps = await ContentSource.get(`config/${core.GEN3_COMMONS_NAME}/footer.json`);
@@ -9779,8 +9998,6 @@ const LandingPageGetStaticProps = async ()=>{
9779
9998
  };
9780
9999
  };
9781
10000
 
9782
- registerExplorerDefaultCellRenderers();
9783
- registerCohortBuilderDefaultPreviewRenderers();
9784
10001
  const ExplorerPage = ({ headerProps, footerProps, explorerConfig })=>{
9785
10002
  if (explorerConfig === undefined) {
9786
10003
  return /*#__PURE__*/ jsxRuntime.jsx(core$1.Center, {
@@ -13547,11 +13764,15 @@ exports.create10ColorAccessibleContrast = create10ColorAccessibleContrast;
13547
13764
  exports.create10ColorPallet = create10ColorPallet;
13548
13765
  exports.credentialsLogin = credentialsLogin;
13549
13766
  exports.credentialsLogout = credentialsLogout;
13767
+ exports.extractObjectKey = extractObjectKey;
13550
13768
  exports.focusStyles = focusStyles;
13551
13769
  exports.getCurrentUnixTimestamp = getCurrentUnixTimestamp;
13552
13770
  exports.getNavPageLayoutPropsFromConfig = getNavPageLayoutPropsFromConfig;
13771
+ exports.getParamsValueAsString = getParamsValueAsString;
13553
13772
  exports.getTagInfo = getTagInfo;
13773
+ exports.hasOwnProperty = hasOwnProperty;
13554
13774
  exports.isArrayOfString = isArrayOfString;
13775
+ exports.isPropertyKey = isPropertyKey;
13555
13776
  exports.isTextTransform = isTextTransform$1;
13556
13777
  exports.processLabel = processLabel$1;
13557
13778
  exports.processRangeKeyLabel = processRangeKeyLabel;