@tetrascience-npm/tetrascience-react-ui 0.4.0-beta.2.1 → 0.4.0-beta.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -1
- package/dist/cjs/index.js +167 -166
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +87 -86
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +137 -3
- package/dist/server.d.ts +12 -4
- package/package.json +2 -2
- package/src/styles/README.md +0 -56
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../node_modules/react-syntax-highlighter/dist/esm/styles/prism/nord.js"],"sourcesContent":["export default {\n \"code[class*=\\\"language-\\\"]\": {\n \"color\": \"#f8f8f2\",\n \"background\": \"none\",\n \"fontFamily\": \"\\\"Fira Code\\\", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace\",\n \"textAlign\": \"left\",\n \"whiteSpace\": \"pre\",\n \"wordSpacing\": \"normal\",\n \"wordBreak\": \"normal\",\n \"wordWrap\": \"normal\",\n \"lineHeight\": \"1.5\",\n \"MozTabSize\": \"4\",\n \"OTabSize\": \"4\",\n \"tabSize\": \"4\",\n \"WebkitHyphens\": \"none\",\n \"MozHyphens\": \"none\",\n \"msHyphens\": \"none\",\n \"hyphens\": \"none\"\n },\n \"pre[class*=\\\"language-\\\"]\": {\n \"color\": \"#f8f8f2\",\n \"background\": \"#2E3440\",\n \"fontFamily\": \"\\\"Fira Code\\\", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace\",\n \"textAlign\": \"left\",\n \"whiteSpace\": \"pre\",\n \"wordSpacing\": \"normal\",\n \"wordBreak\": \"normal\",\n \"wordWrap\": \"normal\",\n \"lineHeight\": \"1.5\",\n \"MozTabSize\": \"4\",\n \"OTabSize\": \"4\",\n \"tabSize\": \"4\",\n \"WebkitHyphens\": \"none\",\n \"MozHyphens\": \"none\",\n \"msHyphens\": \"none\",\n \"hyphens\": \"none\",\n \"padding\": \"1em\",\n \"margin\": \".5em 0\",\n \"overflow\": \"auto\",\n \"borderRadius\": \"0.3em\"\n },\n \":not(pre) > code[class*=\\\"language-\\\"]\": {\n \"background\": \"#2E3440\",\n \"padding\": \".1em\",\n \"borderRadius\": \".3em\",\n \"whiteSpace\": \"normal\"\n },\n \"comment\": {\n \"color\": \"#636f88\"\n },\n \"prolog\": {\n \"color\": \"#636f88\"\n },\n \"doctype\": {\n \"color\": \"#636f88\"\n },\n \"cdata\": {\n \"color\": \"#636f88\"\n },\n \"punctuation\": {\n \"color\": \"#81A1C1\"\n },\n \".namespace\": {\n \"Opacity\": \".7\"\n },\n \"property\": {\n \"color\": \"#81A1C1\"\n },\n \"tag\": {\n \"color\": \"#81A1C1\"\n },\n \"constant\": {\n \"color\": \"#81A1C1\"\n },\n \"symbol\": {\n \"color\": \"#81A1C1\"\n },\n \"deleted\": {\n \"color\": \"#81A1C1\"\n },\n \"number\": {\n \"color\": \"#B48EAD\"\n },\n \"boolean\": {\n \"color\": \"#81A1C1\"\n },\n \"selector\": {\n \"color\": \"#A3BE8C\"\n },\n \"attr-name\": {\n \"color\": \"#A3BE8C\"\n },\n \"string\": {\n \"color\": \"#A3BE8C\"\n },\n \"char\": {\n \"color\": \"#A3BE8C\"\n },\n \"builtin\": {\n \"color\": \"#A3BE8C\"\n },\n \"inserted\": {\n \"color\": \"#A3BE8C\"\n },\n \"operator\": {\n \"color\": \"#81A1C1\"\n },\n \"entity\": {\n \"color\": \"#81A1C1\",\n \"cursor\": \"help\"\n },\n \"url\": {\n \"color\": \"#81A1C1\"\n },\n \".language-css .token.string\": {\n \"color\": \"#81A1C1\"\n },\n \".style .token.string\": {\n \"color\": \"#81A1C1\"\n },\n \"variable\": {\n \"color\": \"#81A1C1\"\n },\n \"atrule\": {\n \"color\": \"#88C0D0\"\n },\n \"attr-value\": {\n \"color\": \"#88C0D0\"\n },\n \"function\": {\n \"color\": \"#88C0D0\"\n },\n \"class-name\": {\n \"color\": \"#88C0D0\"\n },\n \"keyword\": {\n \"color\": \"#81A1C1\"\n },\n \"regex\": {\n \"color\": \"#EBCB8B\"\n },\n \"important\": {\n \"color\": \"#EBCB8B\",\n \"fontWeight\": \"bold\"\n },\n \"bold\": {\n \"fontWeight\": \"bold\"\n },\n \"italic\": {\n \"fontStyle\": \"italic\"\n }\n};"],"names":["nord","color","background","fontFamily","textAlign","whiteSpace","wordSpacing","wordBreak","wordWrap","lineHeight","MozTabSize","OTabSize","tabSize","WebkitHyphens","MozHyphens","msHyphens","hyphens","padding","margin","overflow","borderRadius","comment","prolog","doctype","cdata","punctuation","Opacity","property","tag","constant","symbol","deleted","number","boolean","selector","string","char","builtin","inserted","operator","entity","cursor","url","variable","atrule","function","keyword","regex","important","fontWeight","bold","italic","fontStyle"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../node_modules/react-syntax-highlighter/dist/esm/styles/prism/nord.js"],"sourcesContent":["export default {\n \"code[class*=\\\"language-\\\"]\": {\n \"color\": \"#f8f8f2\",\n \"background\": \"none\",\n \"fontFamily\": \"\\\"Fira Code\\\", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace\",\n \"textAlign\": \"left\",\n \"whiteSpace\": \"pre\",\n \"wordSpacing\": \"normal\",\n \"wordBreak\": \"normal\",\n \"wordWrap\": \"normal\",\n \"lineHeight\": \"1.5\",\n \"MozTabSize\": \"4\",\n \"OTabSize\": \"4\",\n \"tabSize\": \"4\",\n \"WebkitHyphens\": \"none\",\n \"MozHyphens\": \"none\",\n \"msHyphens\": \"none\",\n \"hyphens\": \"none\"\n },\n \"pre[class*=\\\"language-\\\"]\": {\n \"color\": \"#f8f8f2\",\n \"background\": \"#2E3440\",\n \"fontFamily\": \"\\\"Fira Code\\\", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace\",\n \"textAlign\": \"left\",\n \"whiteSpace\": \"pre\",\n \"wordSpacing\": \"normal\",\n \"wordBreak\": \"normal\",\n \"wordWrap\": \"normal\",\n \"lineHeight\": \"1.5\",\n \"MozTabSize\": \"4\",\n \"OTabSize\": \"4\",\n \"tabSize\": \"4\",\n \"WebkitHyphens\": \"none\",\n \"MozHyphens\": \"none\",\n \"msHyphens\": \"none\",\n \"hyphens\": \"none\",\n \"padding\": \"1em\",\n \"margin\": \".5em 0\",\n \"overflow\": \"auto\",\n \"borderRadius\": \"0.3em\"\n },\n \":not(pre) > code[class*=\\\"language-\\\"]\": {\n \"background\": \"#2E3440\",\n \"padding\": \".1em\",\n \"borderRadius\": \".3em\",\n \"whiteSpace\": \"normal\"\n },\n \"comment\": {\n \"color\": \"#636f88\"\n },\n \"prolog\": {\n \"color\": \"#636f88\"\n },\n \"doctype\": {\n \"color\": \"#636f88\"\n },\n \"cdata\": {\n \"color\": \"#636f88\"\n },\n \"punctuation\": {\n \"color\": \"#81A1C1\"\n },\n \".namespace\": {\n \"Opacity\": \".7\"\n },\n \"property\": {\n \"color\": \"#81A1C1\"\n },\n \"tag\": {\n \"color\": \"#81A1C1\"\n },\n \"constant\": {\n \"color\": \"#81A1C1\"\n },\n \"symbol\": {\n \"color\": \"#81A1C1\"\n },\n \"deleted\": {\n \"color\": \"#81A1C1\"\n },\n \"number\": {\n \"color\": \"#B48EAD\"\n },\n \"boolean\": {\n \"color\": \"#81A1C1\"\n },\n \"selector\": {\n \"color\": \"#A3BE8C\"\n },\n \"attr-name\": {\n \"color\": \"#A3BE8C\"\n },\n \"string\": {\n \"color\": \"#A3BE8C\"\n },\n \"char\": {\n \"color\": \"#A3BE8C\"\n },\n \"builtin\": {\n \"color\": \"#A3BE8C\"\n },\n \"inserted\": {\n \"color\": \"#A3BE8C\"\n },\n \"operator\": {\n \"color\": \"#81A1C1\"\n },\n \"entity\": {\n \"color\": \"#81A1C1\",\n \"cursor\": \"help\"\n },\n \"url\": {\n \"color\": \"#81A1C1\"\n },\n \".language-css .token.string\": {\n \"color\": \"#81A1C1\"\n },\n \".style .token.string\": {\n \"color\": \"#81A1C1\"\n },\n \"variable\": {\n \"color\": \"#81A1C1\"\n },\n \"atrule\": {\n \"color\": \"#88C0D0\"\n },\n \"attr-value\": {\n \"color\": \"#88C0D0\"\n },\n \"function\": {\n \"color\": \"#88C0D0\"\n },\n \"class-name\": {\n \"color\": \"#88C0D0\"\n },\n \"keyword\": {\n \"color\": \"#81A1C1\"\n },\n \"regex\": {\n \"color\": \"#EBCB8B\"\n },\n \"important\": {\n \"color\": \"#EBCB8B\",\n \"fontWeight\": \"bold\"\n },\n \"bold\": {\n \"fontWeight\": \"bold\"\n },\n \"italic\": {\n \"fontStyle\": \"italic\"\n }\n};"],"names":["nord","color","background","fontFamily","textAlign","whiteSpace","wordSpacing","wordBreak","wordWrap","lineHeight","MozTabSize","OTabSize","tabSize","WebkitHyphens","MozHyphens","msHyphens","hyphens","padding","margin","overflow","borderRadius","comment","prolog","doctype","cdata","punctuation","Opacity","property","tag","constant","symbol","deleted","number","boolean","selector","string","char","builtin","inserted","operator","entity","cursor","url","variable","atrule","function","keyword","regex","important","fontWeight","bold","italic","fontStyle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import React$1, { ClassAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { OnChange } from '@monaco-editor/react';
|
|
4
4
|
import { ExtraProps } from 'react-markdown';
|
|
5
|
+
import { SearchEqlRequest } from '@tetrascience-npm/ts-connectors-sdk';
|
|
5
6
|
|
|
6
7
|
type BadgeSize = "small" | "medium";
|
|
7
8
|
type BadgeVariant = "default" | "primary";
|
|
@@ -502,10 +503,11 @@ interface TableProps<T = any> {
|
|
|
502
503
|
onSort?: (key: string, direction: "asc" | "desc") => void;
|
|
503
504
|
currentPage?: number;
|
|
504
505
|
onPageChange?: (page: number) => void;
|
|
506
|
+
totalItems?: number;
|
|
505
507
|
selectedRows?: T[];
|
|
506
508
|
className?: string;
|
|
507
509
|
}
|
|
508
|
-
declare function Table<T extends Record<string, any>>({ columns, data, pageSize, rowKey, selectable, onRowSelect, sortKey: controlledSortKey, sortDirection: controlledSortDirection, onSort: controlledOnSort, currentPage: controlledCurrentPage, onPageChange: controlledOnPageChange, selectedRows: controlledSelectedRows, className, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
510
|
+
declare function Table<T extends Record<string, any>>({ columns, data, pageSize, rowKey, selectable, onRowSelect, sortKey: controlledSortKey, sortDirection: controlledSortDirection, onSort: controlledOnSort, currentPage: controlledCurrentPage, onPageChange: controlledOnPageChange, totalItems, selectedRows: controlledSelectedRows, className, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
509
511
|
declare namespace Table {
|
|
510
512
|
var displayName: string;
|
|
511
513
|
}
|
|
@@ -1283,6 +1285,138 @@ interface ScatterGraphProps {
|
|
|
1283
1285
|
}
|
|
1284
1286
|
declare const ScatterGraph: React$1.FC<ScatterGraphProps>;
|
|
1285
1287
|
|
|
1288
|
+
/** Transformed search result (flattened from Elasticsearch hit format) */
|
|
1289
|
+
interface SearchResult {
|
|
1290
|
+
id: string;
|
|
1291
|
+
_score?: number | null;
|
|
1292
|
+
[key: string]: any;
|
|
1293
|
+
}
|
|
1294
|
+
/** Configuration for a search filter */
|
|
1295
|
+
interface TdpSearchFilter {
|
|
1296
|
+
key: string;
|
|
1297
|
+
label: string;
|
|
1298
|
+
options: DropdownOption[];
|
|
1299
|
+
}
|
|
1300
|
+
/** Configuration for column display */
|
|
1301
|
+
interface TdpSearchColumn {
|
|
1302
|
+
key: string;
|
|
1303
|
+
header: string;
|
|
1304
|
+
sortable?: boolean;
|
|
1305
|
+
width?: string;
|
|
1306
|
+
align?: "left" | "center" | "right";
|
|
1307
|
+
render?: (value: any, row: SearchResult, index: number) => React$1.ReactNode;
|
|
1308
|
+
}
|
|
1309
|
+
/** Sort configuration */
|
|
1310
|
+
interface TdpSearchSort {
|
|
1311
|
+
field: string;
|
|
1312
|
+
order: "asc" | "desc";
|
|
1313
|
+
}
|
|
1314
|
+
/** Props passed to the renderSearchBar render prop */
|
|
1315
|
+
interface TdpSearchBarRenderProps {
|
|
1316
|
+
query: string;
|
|
1317
|
+
setQuery: (query: string) => void;
|
|
1318
|
+
onSearch: () => void;
|
|
1319
|
+
isLoading: boolean;
|
|
1320
|
+
placeholder: string;
|
|
1321
|
+
}
|
|
1322
|
+
/** Props passed to the renderFilters render prop */
|
|
1323
|
+
interface TdpFiltersRenderProps {
|
|
1324
|
+
filters: TdpSearchFilter[];
|
|
1325
|
+
filterValues: Record<string, string>;
|
|
1326
|
+
onFilterChange: (key: string, value: string) => void;
|
|
1327
|
+
}
|
|
1328
|
+
/** Props passed to the renderResults render prop */
|
|
1329
|
+
interface TdpResultsRenderProps {
|
|
1330
|
+
results: SearchResult[];
|
|
1331
|
+
total: number;
|
|
1332
|
+
currentPage: number;
|
|
1333
|
+
pageSize: number;
|
|
1334
|
+
columns: TdpSearchColumn[];
|
|
1335
|
+
onPageChange: (page: number) => void;
|
|
1336
|
+
sortKey: string | null;
|
|
1337
|
+
sortDirection: "asc" | "desc";
|
|
1338
|
+
onSort: (key: string, direction: "asc" | "desc") => void;
|
|
1339
|
+
}
|
|
1340
|
+
/** Search connection configuration */
|
|
1341
|
+
interface TdpSearchConfig {
|
|
1342
|
+
/**
|
|
1343
|
+
* When true, calls the TDP API directly from the browser
|
|
1344
|
+
* When false/omitted, proxies the request through your backend `apiEndpoint`
|
|
1345
|
+
*/
|
|
1346
|
+
standalone?: boolean;
|
|
1347
|
+
/** TDP API base URL (required when standalone is true) */
|
|
1348
|
+
baseUrl?: string;
|
|
1349
|
+
/** Backend API endpoint for search (used when standalone is false). Defaults to '/api/search' */
|
|
1350
|
+
apiEndpoint?: string;
|
|
1351
|
+
/** Common | authentication token */
|
|
1352
|
+
authToken?: string;
|
|
1353
|
+
/** Common | organization slug */
|
|
1354
|
+
orgSlug?: string;
|
|
1355
|
+
}
|
|
1356
|
+
/** Common props shared by both search modes */
|
|
1357
|
+
interface CommonTdpSearchProps {
|
|
1358
|
+
/** Default search term (default query) */
|
|
1359
|
+
defaultQuery?: string;
|
|
1360
|
+
/** Display fields/columns for the results table */
|
|
1361
|
+
columns: TdpSearchColumn[];
|
|
1362
|
+
/** UI filters displayed as dropdowns (for user selection) */
|
|
1363
|
+
filters?: TdpSearchFilter[];
|
|
1364
|
+
/** Default sort configuration (sort options) */
|
|
1365
|
+
defaultSort?: TdpSearchSort;
|
|
1366
|
+
/**
|
|
1367
|
+
* Additional search parameters to pass to the SDK's searchEql method.
|
|
1368
|
+
* Allows customization of expression, selectedPipelineIds, selectedSourceTypes, etc.
|
|
1369
|
+
*/
|
|
1370
|
+
advancedSearchParams?: Partial<Omit<SearchEqlRequest, "searchTerm" | "from" | "size" | "sort" | "order">>;
|
|
1371
|
+
/** Results per page. Defaults to 10 */
|
|
1372
|
+
pageSize?: number;
|
|
1373
|
+
/** Search input placeholder text */
|
|
1374
|
+
searchPlaceholder?: string;
|
|
1375
|
+
/** Custom CSS class */
|
|
1376
|
+
className?: string;
|
|
1377
|
+
/** Callback fired when search is executed with the query and results */
|
|
1378
|
+
onSearch?: (query: SearchEqlRequest, results: SearchResult[]) => void;
|
|
1379
|
+
/** Replace the entire search bar (input + button) */
|
|
1380
|
+
renderSearchBar?: (props: TdpSearchBarRenderProps) => React$1.ReactNode;
|
|
1381
|
+
/** Replace the filters row */
|
|
1382
|
+
renderFilters?: (props: TdpFiltersRenderProps) => React$1.ReactNode;
|
|
1383
|
+
/** Replace the results table (and pagination) */
|
|
1384
|
+
renderResults?: (props: TdpResultsRenderProps) => React$1.ReactNode;
|
|
1385
|
+
}
|
|
1386
|
+
type TdpSearchProps = CommonTdpSearchProps & TdpSearchConfig;
|
|
1387
|
+
type UseSearchConfig = {
|
|
1388
|
+
pageSize: number;
|
|
1389
|
+
} & TdpSearchConfig;
|
|
1390
|
+
interface UseSearchResult {
|
|
1391
|
+
results: SearchResult[];
|
|
1392
|
+
total: number;
|
|
1393
|
+
currentPage: number;
|
|
1394
|
+
isLoading: boolean;
|
|
1395
|
+
error: string | null;
|
|
1396
|
+
executeSearch: (searchRequest: Omit<SearchEqlRequest, "from" | "size">, page?: number) => Promise<SearchResult[]>;
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
/**
|
|
1400
|
+
* TdpSearch Component
|
|
1401
|
+
*
|
|
1402
|
+
* A reusable search component for querying the TDP.
|
|
1403
|
+
*
|
|
1404
|
+
* @example
|
|
1405
|
+
* ```tsx
|
|
1406
|
+
* <TdpSearch
|
|
1407
|
+
* columns={[
|
|
1408
|
+
* { key: "id", header: "ID" },
|
|
1409
|
+
* { key: "filePath", header: "File Path", sortable: true }
|
|
1410
|
+
* ]}
|
|
1411
|
+
* defaultQuery="sample-data"
|
|
1412
|
+
* pageSize={20}
|
|
1413
|
+
* />
|
|
1414
|
+
* ```
|
|
1415
|
+
*/
|
|
1416
|
+
declare const TdpSearch: React$1.FC<TdpSearchProps>;
|
|
1417
|
+
|
|
1418
|
+
declare function useSearch(config: UseSearchConfig): UseSearchResult;
|
|
1419
|
+
|
|
1286
1420
|
/**
|
|
1287
1421
|
* Centralized color system for TetraScience UI
|
|
1288
1422
|
* This utility provides access to CSS variables defined in colors.css
|
|
@@ -1424,5 +1558,5 @@ interface ThemeProviderProps {
|
|
|
1424
1558
|
*/
|
|
1425
1559
|
declare const ThemeProvider: React$1.FC<ThemeProviderProps>;
|
|
1426
1560
|
|
|
1427
|
-
export { AppHeader, AppLayout, AreaGraph, AssistantModal, Badge, BarGraph, Boxplot, Button, ButtonControl, ButtonControlGroup, CHART_COLORS, COLORS, Card, CardSidebar, Checkbox, Chromatogram, ChromatogramChart, CodeEditor, CodeScriptEditorButton, DotPlot, Dropdown, ErrorAlert, FormField, Heatmap, Histogram, Icon, IconName, Input, Label, LaunchContent, LineGraph, Main, MarkdownDisplay, Menu, MenuItem, Modal, Navbar, PieChart, PlateMap, PopConfirm, ProtocolConfiguration, ProtocolYamlCard, PythonEditorModal, ScatterGraph, SelectField, Sidebar, SupportiveText, Tab, TabGroup, Table, TableCell, TableHeaderCell, Textarea, ThemeProvider, Toast, ToastManager, Toggle, Tooltip, defaultTheme };
|
|
1428
|
-
export type { AppHeaderProps, AppLayoutProps, AreaDataSeries, AreaGraphProps, AreaGraphVariant, AssistantModalProps, BadgeProps, BarDataSeries, BarGraphProps, BarGraphVariant, BaselineCorrectionMethod, BoundaryMarkerStyle, BoxDataSeries, BoxplotProps, ButtonControlGroupProps, ButtonControlProps, ButtonProps, CardProps, CardSidebarProps, CheckboxProps, ChromatogramChartProps, ChromatogramProps, ChromatogramSeries, CodeEditorProps, CodeScriptEditorButtonProps, ColorScale, ColorToken, DotPlotDataSeries, DotPlotProps, DotPlotVariant, DropdownOption, DropdownProps, ErrorAlertProps, FormFieldProps, HeatmapProps, HistogramDataSeries, HistogramProps, IconProps, IconsProps, InputProps, LabelProps, LaunchContentProps, LineDataSeries, LineGraphProps, LineGraphVariant, MainProps, MarkdownDisplayProps, MarkerSymbol, MenuItemProps, MenuProps, ModalProps, NavbarProps, PeakAnnotation, PeakData, PeakDetectionOptions, PieChartProps, PieDataSeries, PieTextInfo, PlateFormat, PlateMapProps, PopConfirmProps, ProtocolConfigurationProps, ProtocolYamlCardProps, PythonEditorModalProps, ScatterDataPoint, ScatterDataSeries, ScatterGraphProps, SelectFieldProps, SidebarProps, SupportiveTextProps, TabGroupProps, TabProps, TabSize, TableCellProps, TableColumn, TableHeaderCellProps, TableProps, TextareaProps, Theme, ThemeColors, ThemeProviderProps, ThemeRadius, ThemeSpacing, ToastContainerProps, ToastManagerProps, ToastProps, ToastType, ToggleProps, TooltipProps, WellData };
|
|
1561
|
+
export { AppHeader, AppLayout, AreaGraph, AssistantModal, Badge, BarGraph, Boxplot, Button, ButtonControl, ButtonControlGroup, CHART_COLORS, COLORS, Card, CardSidebar, Checkbox, Chromatogram, ChromatogramChart, CodeEditor, CodeScriptEditorButton, DotPlot, Dropdown, ErrorAlert, FormField, Heatmap, Histogram, Icon, IconName, Input, Label, LaunchContent, LineGraph, Main, MarkdownDisplay, Menu, MenuItem, Modal, Navbar, PieChart, PlateMap, PopConfirm, ProtocolConfiguration, ProtocolYamlCard, PythonEditorModal, ScatterGraph, SelectField, Sidebar, SupportiveText, Tab, TabGroup, Table, TableCell, TableHeaderCell, TdpSearch, Textarea, ThemeProvider, Toast, ToastManager, Toggle, Tooltip, defaultTheme, useSearch };
|
|
1562
|
+
export type { AppHeaderProps, AppLayoutProps, AreaDataSeries, AreaGraphProps, AreaGraphVariant, AssistantModalProps, BadgeProps, BarDataSeries, BarGraphProps, BarGraphVariant, BaselineCorrectionMethod, BoundaryMarkerStyle, BoxDataSeries, BoxplotProps, ButtonControlGroupProps, ButtonControlProps, ButtonProps, CardProps, CardSidebarProps, CheckboxProps, ChromatogramChartProps, ChromatogramProps, ChromatogramSeries, CodeEditorProps, CodeScriptEditorButtonProps, ColorScale, ColorToken, DotPlotDataSeries, DotPlotProps, DotPlotVariant, DropdownOption, DropdownProps, ErrorAlertProps, FormFieldProps, HeatmapProps, HistogramDataSeries, HistogramProps, IconProps, IconsProps, InputProps, LabelProps, LaunchContentProps, LineDataSeries, LineGraphProps, LineGraphVariant, MainProps, MarkdownDisplayProps, MarkerSymbol, MenuItemProps, MenuProps, ModalProps, NavbarProps, PeakAnnotation, PeakData, PeakDetectionOptions, PieChartProps, PieDataSeries, PieTextInfo, PlateFormat, PlateMapProps, PopConfirmProps, ProtocolConfigurationProps, ProtocolYamlCardProps, PythonEditorModalProps, ScatterDataPoint, ScatterDataSeries, ScatterGraphProps, SearchResult, SelectFieldProps, SidebarProps, SupportiveTextProps, TabGroupProps, TabProps, TabSize, TableCellProps, TableColumn, TableHeaderCellProps, TableProps, TdpFiltersRenderProps, TdpResultsRenderProps, TdpSearchBarRenderProps, TdpSearchColumn, TdpSearchConfig, TdpSearchFilter, TdpSearchProps, TdpSearchSort, TextareaProps, Theme, ThemeColors, ThemeProviderProps, ThemeRadius, ThemeSpacing, ToastContainerProps, ToastManagerProps, ToastProps, ToastType, ToggleProps, TooltipProps, UseSearchConfig, UseSearchResult, WellData };
|
package/dist/server.d.ts
CHANGED
|
@@ -245,7 +245,9 @@ interface GetProviderConfigurationsOptions {
|
|
|
245
245
|
* Display-friendly provider information for UI components.
|
|
246
246
|
*
|
|
247
247
|
* A simplified subset of ProviderConfiguration containing only the
|
|
248
|
-
* fields needed for displaying provider information in the UI
|
|
248
|
+
* fields needed for displaying provider information in the UI,
|
|
249
|
+
* including the names of available connection fields without their
|
|
250
|
+
* secret values.
|
|
249
251
|
*/
|
|
250
252
|
interface ProviderInfo {
|
|
251
253
|
/** Human-readable name of the provider */
|
|
@@ -254,6 +256,8 @@ interface ProviderInfo {
|
|
|
254
256
|
type: string;
|
|
255
257
|
/** Optional URL to the provider's icon */
|
|
256
258
|
iconUrl?: string | null;
|
|
259
|
+
/** Names of available connection fields (without secret values) */
|
|
260
|
+
availableFields: string[];
|
|
257
261
|
}
|
|
258
262
|
/**
|
|
259
263
|
* Standardized query result from data providers.
|
|
@@ -311,10 +315,10 @@ interface QueryResult {
|
|
|
311
315
|
* import { getProviderConfigurations } from '@tetrascience-npm/tetrascience-react-ui/server';
|
|
312
316
|
*
|
|
313
317
|
* // Initialize TDPClient with user's JWT token
|
|
318
|
+
* // Other fields (tdpEndpoint, connectorId, orgSlug) are read from environment variables
|
|
314
319
|
* const client = new TDPClient({
|
|
315
320
|
* authToken: userJwtToken, // from jwtManager.getTokenFromExpressRequest(req)
|
|
316
|
-
*
|
|
317
|
-
* tdpEndpoint: process.env.TDP_ENDPOINT,
|
|
321
|
+
* artifactType: "data-app",
|
|
318
322
|
* });
|
|
319
323
|
* await client.init();
|
|
320
324
|
*
|
|
@@ -500,7 +504,11 @@ type DataProvider = SnowflakeProvider | DatabricksProvider | AthenaProvider;
|
|
|
500
504
|
* import { TDPClient } from '@tetrascience-npm/ts-connectors-sdk';
|
|
501
505
|
* import { buildProvider, getProviderConfigurations } from '@tetrascience-npm/tetrascience-react-ui/server';
|
|
502
506
|
*
|
|
503
|
-
*
|
|
507
|
+
* // Other fields (tdpEndpoint, connectorId, orgSlug) are read from environment variables
|
|
508
|
+
* const client = new TDPClient({
|
|
509
|
+
* authToken: userJwt,
|
|
510
|
+
* artifactType: "data-app",
|
|
511
|
+
* });
|
|
504
512
|
* await client.init();
|
|
505
513
|
* const configs = await getProviderConfigurations(client);
|
|
506
514
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tetrascience-npm/tetrascience-react-ui",
|
|
3
|
-
"version": "0.4.0-beta.
|
|
3
|
+
"version": "0.4.0-beta.4.1",
|
|
4
4
|
"description": "TetraScience React UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "TetraScience",
|
|
@@ -219,4 +219,4 @@
|
|
|
219
219
|
"url": "https://github.com/tetrascience/ts-lib-ui-kit/issues"
|
|
220
220
|
},
|
|
221
221
|
"homepage": "https://github.com/tetrascience/ts-lib-ui-kit#readme"
|
|
222
|
-
}
|
|
222
|
+
}
|
package/src/styles/README.md
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# SCSS System Guide
|
|
2
|
-
|
|
3
|
-
This document explains how to use the centralized SCSS system in TetraScience UI components.
|
|
4
|
-
|
|
5
|
-
## Architecture Overview
|
|
6
|
-
|
|
7
|
-
Our SCSS system provides:
|
|
8
|
-
- **Centralized colors** via CSS custom properties + SCSS variables
|
|
9
|
-
- **Reusable mixins** for common patterns
|
|
10
|
-
- **Design tokens** for consistent spacing, typography, etc.
|
|
11
|
-
- **Single source of truth** for all styling values
|
|
12
|
-
|
|
13
|
-
## File Structure
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
src/
|
|
17
|
-
├── colors.scss # Color definitions (CSS vars + SCSS vars)
|
|
18
|
-
├── index.scss # Main entry point
|
|
19
|
-
├── styles/
|
|
20
|
-
│ ├── variables.scss # Shared SCSS utilities
|
|
21
|
-
│ └── README.md # This file
|
|
22
|
-
└── components/
|
|
23
|
-
└── atoms/
|
|
24
|
-
└── Button/
|
|
25
|
-
├── Button.tsx
|
|
26
|
-
└── Button.scss # Component-specific styles
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Available Design Tokens
|
|
30
|
-
|
|
31
|
-
### Spacing
|
|
32
|
-
```scss
|
|
33
|
-
$spacing-0: 0;
|
|
34
|
-
$spacing-1: 0.25rem; // 4px
|
|
35
|
-
$spacing-2: 0.5rem; // 8px
|
|
36
|
-
$spacing-3: 0.75rem; // 12px
|
|
37
|
-
$spacing-4: 1rem; // 16px
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Typography
|
|
41
|
-
```scss
|
|
42
|
-
$text-xs: 0.75rem; // 12px
|
|
43
|
-
$text-sm: 0.875rem; // 14px
|
|
44
|
-
$text-base: 1rem; // 16px
|
|
45
|
-
$text-lg: 1.125rem; // 18px
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### Colors
|
|
49
|
-
All CSS custom properties are available as SCSS variables:
|
|
50
|
-
```scss
|
|
51
|
-
$color-black-900, $color-white-900, $color-blue-500, etc.
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
For the complete color palette and usage examples, see the **Color System** section in the [main README](../../README.md#color-system).
|
|
55
|
-
|
|
56
|
-
See `src/components/atoms/Button/Button.scss` for implementation examples.
|