@flanksource/clicky-ui 0.3.42 → 0.3.44
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/dist/data/CodeLine.cjs +22 -0
- package/dist/data/CodeLine.cjs.map +1 -0
- package/dist/data/CodeLine.d.ts +8 -0
- package/dist/data/CodeLine.d.ts.map +1 -0
- package/dist/data/CodeLine.js +22 -0
- package/dist/data/CodeLine.js.map +1 -0
- package/dist/data/diagnostics/RenderedStackTrace.cjs +2 -1
- package/dist/data/diagnostics/RenderedStackTrace.cjs.map +1 -1
- package/dist/data/diagnostics/RenderedStackTrace.d.ts +3 -1
- package/dist/data/diagnostics/RenderedStackTrace.d.ts.map +1 -1
- package/dist/data/diagnostics/RenderedStackTrace.js +2 -1
- package/dist/data/diagnostics/RenderedStackTrace.js.map +1 -1
- package/dist/data/version-info.cjs +2 -2
- package/dist/data/version-info.js +2 -2
- package/dist/data.cjs +2 -0
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.ts +1 -0
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +2 -0
- package/dist/data.js.map +1 -1
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/profiles/fields/profileFieldFilterEditor.cjs +5 -2
- package/dist/profiles/fields/profileFieldFilterEditor.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldFilterEditor.js +5 -2
- package/dist/profiles/fields/profileFieldFilterEditor.js.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.cjs +2 -0
- package/dist/profiles/fields/profileFieldIcons.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.js +2 -0
- package/dist/profiles/fields/profileFieldIcons.js.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.cjs +1 -0
- package/dist/profiles/wizard/profileWizardModel.cjs.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.d.ts +3 -0
- package/dist/profiles/wizard/profileWizardModel.d.ts.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.js +1 -0
- package/dist/profiles/wizard/profileWizardModel.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const react = require("react");
|
|
5
|
+
const codeHighlight = require("./code-highlight.cjs");
|
|
6
|
+
const HighlightedTokens = require("./HighlightedTokens.cjs");
|
|
7
|
+
function CodeLine({ code, language, className }) {
|
|
8
|
+
const [tokens, setTokens] = react.useState(void 0);
|
|
9
|
+
react.useEffect(() => {
|
|
10
|
+
let cancelled = false;
|
|
11
|
+
setTokens(void 0);
|
|
12
|
+
codeHighlight.highlightToLines(code, { lang: language }).then((out) => {
|
|
13
|
+
if (!cancelled) setTokens(out == null ? void 0 : out[0]);
|
|
14
|
+
});
|
|
15
|
+
return () => {
|
|
16
|
+
cancelled = true;
|
|
17
|
+
};
|
|
18
|
+
}, [code, language]);
|
|
19
|
+
return /* @__PURE__ */ jsxRuntime.jsx("code", { className: ["whitespace-pre font-mono", className].filter(Boolean).join(" "), children: /* @__PURE__ */ jsxRuntime.jsx(HighlightedTokens.HighlightedTokens, { tokens, content: code }) });
|
|
20
|
+
}
|
|
21
|
+
exports.CodeLine = CodeLine;
|
|
22
|
+
//# sourceMappingURL=CodeLine.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeLine.cjs","sources":["../../src/data/CodeLine.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { highlightToLines, type HighlightedLine } from \"./code-highlight\";\nimport { HighlightedTokens } from \"./HighlightedTokens\";\n\nexport interface CodeLineProps {\n code: string;\n /** Shiki language id; without one the line renders as plain text. */\n language?: string;\n className?: string;\n}\n\n// CodeLine paints a single source line, syntax-highlighted, inline — the line a\n// stack frame or trace node ran, shown without the gutter and frame of a block.\nexport function CodeLine({ code, language, className }: CodeLineProps) {\n const [tokens, setTokens] = useState<HighlightedLine | undefined>(undefined);\n\n useEffect(() => {\n let cancelled = false;\n setTokens(undefined);\n highlightToLines(code, { lang: language }).then((out) => {\n if (!cancelled) setTokens(out?.[0]);\n });\n return () => {\n cancelled = true;\n };\n }, [code, language]);\n\n return (\n <code className={[\"whitespace-pre font-mono\", className].filter(Boolean).join(\" \")}>\n <HighlightedTokens tokens={tokens} content={code} />\n </code>\n );\n}\n"],"names":["useState","useEffect","highlightToLines","jsx","HighlightedTokens"],"mappings":";;;;;;AAaO,SAAS,SAAS,EAAE,MAAM,UAAU,aAA4B;AACrE,QAAM,CAAC,QAAQ,SAAS,IAAIA,MAAAA,SAAsC,MAAS;AAE3EC,QAAAA,UAAU,MAAM;AACd,QAAI,YAAY;AAChB,cAAU,MAAS;AACnBC,kBAAAA,iBAAiB,MAAM,EAAE,MAAM,SAAA,CAAU,EAAE,KAAK,CAAC,QAAQ;AACvD,UAAI,CAAC,UAAW,WAAU,2BAAM,EAAE;AAAA,IACpC,CAAC;AACD,WAAO,MAAM;AACX,kBAAY;AAAA,IACd;AAAA,EACF,GAAG,CAAC,MAAM,QAAQ,CAAC;AAEnB,wCACG,QAAA,EAAK,WAAW,CAAC,4BAA4B,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,GAC/E,UAAAC,2BAAAA,IAACC,kBAAAA,qBAAkB,QAAgB,SAAS,MAAM,GACpD;AAEJ;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface CodeLineProps {
|
|
2
|
+
code: string;
|
|
3
|
+
/** Shiki language id; without one the line renders as plain text. */
|
|
4
|
+
language?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function CodeLine({ code, language, className }: CodeLineProps): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=CodeLine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeLine.d.ts","sourceRoot":"","sources":["../../src/data/CodeLine.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,aAAa,+BAmBpE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import { highlightToLines } from "./code-highlight.js";
|
|
4
|
+
import { HighlightedTokens } from "./HighlightedTokens.js";
|
|
5
|
+
function CodeLine({ code, language, className }) {
|
|
6
|
+
const [tokens, setTokens] = useState(void 0);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
let cancelled = false;
|
|
9
|
+
setTokens(void 0);
|
|
10
|
+
highlightToLines(code, { lang: language }).then((out) => {
|
|
11
|
+
if (!cancelled) setTokens(out == null ? void 0 : out[0]);
|
|
12
|
+
});
|
|
13
|
+
return () => {
|
|
14
|
+
cancelled = true;
|
|
15
|
+
};
|
|
16
|
+
}, [code, language]);
|
|
17
|
+
return /* @__PURE__ */ jsx("code", { className: ["whitespace-pre font-mono", className].filter(Boolean).join(" "), children: /* @__PURE__ */ jsx(HighlightedTokens, { tokens, content: code }) });
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
CodeLine
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=CodeLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeLine.js","sources":["../../src/data/CodeLine.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { highlightToLines, type HighlightedLine } from \"./code-highlight\";\nimport { HighlightedTokens } from \"./HighlightedTokens\";\n\nexport interface CodeLineProps {\n code: string;\n /** Shiki language id; without one the line renders as plain text. */\n language?: string;\n className?: string;\n}\n\n// CodeLine paints a single source line, syntax-highlighted, inline — the line a\n// stack frame or trace node ran, shown without the gutter and frame of a block.\nexport function CodeLine({ code, language, className }: CodeLineProps) {\n const [tokens, setTokens] = useState<HighlightedLine | undefined>(undefined);\n\n useEffect(() => {\n let cancelled = false;\n setTokens(undefined);\n highlightToLines(code, { lang: language }).then((out) => {\n if (!cancelled) setTokens(out?.[0]);\n });\n return () => {\n cancelled = true;\n };\n }, [code, language]);\n\n return (\n <code className={[\"whitespace-pre font-mono\", className].filter(Boolean).join(\" \")}>\n <HighlightedTokens tokens={tokens} content={code} />\n </code>\n );\n}\n"],"names":[],"mappings":";;;;AAaO,SAAS,SAAS,EAAE,MAAM,UAAU,aAA4B;AACrE,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAsC,MAAS;AAE3E,YAAU,MAAM;AACd,QAAI,YAAY;AAChB,cAAU,MAAS;AACnB,qBAAiB,MAAM,EAAE,MAAM,SAAA,CAAU,EAAE,KAAK,CAAC,QAAQ;AACvD,UAAI,CAAC,UAAW,WAAU,2BAAM,EAAE;AAAA,IACpC,CAAC;AACD,WAAO,MAAM;AACX,kBAAY;AAAA,IACd;AAAA,EACF,GAAG,CAAC,MAAM,QAAQ,CAAC;AAEnB,6BACG,QAAA,EAAK,WAAW,CAAC,4BAA4B,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,GAC/E,UAAA,oBAAC,qBAAkB,QAAgB,SAAS,MAAM,GACpD;AAEJ;"}
|
|
@@ -19,6 +19,7 @@ function StackTrace({
|
|
|
19
19
|
renderFramePart,
|
|
20
20
|
renderFrameDetail,
|
|
21
21
|
frameActionsVisibility = "hover",
|
|
22
|
+
showFrameIndex = true,
|
|
22
23
|
frameFilter,
|
|
23
24
|
renderCauseDetail,
|
|
24
25
|
className
|
|
@@ -95,7 +96,7 @@ function StackTrace({
|
|
|
95
96
|
{
|
|
96
97
|
frame,
|
|
97
98
|
index: idx,
|
|
98
|
-
showIndex:
|
|
99
|
+
showIndex: showFrameIndex,
|
|
99
100
|
...frameActions ? { frameActions } : {},
|
|
100
101
|
...renderFramePart ? { renderFramePart } : {},
|
|
101
102
|
...renderFrameDetail ? { renderFrameDetail } : {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderedStackTrace.cjs","sources":["../../../src/data/diagnostics/RenderedStackTrace.tsx"],"sourcesContent":["import { useMemo, type ReactNode } from \"react\";\nimport {\n parseJavaStackTrace,\n type ParsedStackFrame,\n type ParsedStackTrace,\n} from \"./stacktrace-parse\";\nimport { Icon } from \"../Icon\";\nimport { UiStackFrameDot, UiError } from \"../../icons\";\nimport {\n StackFrameRow,\n type StackFrameActions,\n type StackFrameActionsVisibility,\n type StackFrameDetailRenderer,\n type StackFramePartRenderer,\n} from \"./StackFrameRow\";\nimport type { FrameSource } from \"./FrameSourceWindow.utils\";\n\n// SourceResolver matches the Go clicky.SourceResolver interface: given a\n// frame, return surrounding source lines so the renderer can display inline\n// context. Failures must be silent (return undefined) so a missing class\n// never blocks the rest of the trace.\n//\n// The return shape is `FrameSource` — the same shape the source window\n// consumes and the same one the JVM thread-dump resolver returns, so a caller\n// that can resolve source for one surface can resolve it for both.\nexport type StackTraceSourceResolver = (\n frame: ParsedStackFrame,\n contextLines: number,\n) => FrameSource | undefined;\n\nexport interface StackTraceProps {\n /**\n * Raw Java stack-trace string or a pre-parsed ParsedStackTrace\n * from a backend/parser.\n */\n input: string | ParsedStackTrace;\n /** Parser language. Currently Java stack traces are supported. */\n language?: \"java\";\n /** Optional source-line resolver for inline context under frames. */\n resolver?: StackTraceSourceResolver;\n /** Number of source lines to request around each frame. */\n contextLines?: number;\n /** Hide frames known to be runtime/library-only. */\n hideRuntimeOnly?: boolean;\n /** Only show frames whose class starts with one of these prefixes. */\n include?: string[];\n /** Hide frames whose class starts with one of these prefixes. */\n exclude?: string[];\n /** Trailing per-frame actions, revealed on hover/focus. */\n frameActions?: StackFrameActions;\n /** Replace method, class, and location labels with application-owned renderers. */\n renderFramePart?: StackFramePartRenderer;\n /** Render application-owned detail below each visible frame. */\n renderFrameDetail?: StackFrameDetailRenderer;\n /** Control whether per-frame actions are hover-only or always visible. */\n frameActionsVisibility?: StackFrameActionsVisibility;\n /** Additional application-owned frame predicate. */\n frameFilter?: (frame: ParsedStackFrame) => boolean;\n /** Render application-owned detail below a parsed cause. */\n renderCauseDetail?: (cause: string, index: number) => ReactNode;\n /** Classes applied to the stack-trace shell. */\n className?: string;\n}\n\n// StackTrace is the React counterpart to Go's clicky.StackTrace builder. Pass\n// a raw exception dump and it parses + renders frames; pass a SourceResolver\n// to get inline source context (±N lines) under each frame, with the focal\n// line highlighted. Frames themselves are rendered by the shared StackFrameRow.\nexport function StackTrace({\n input,\n language = \"java\",\n resolver,\n contextLines = 3,\n hideRuntimeOnly = false,\n include,\n exclude,\n frameActions,\n renderFramePart,\n renderFrameDetail,\n frameActionsVisibility = \"hover\",\n frameFilter,\n renderCauseDetail,\n className,\n}: StackTraceProps) {\n const parsed = useMemo<ParsedStackTrace>(() => {\n if (typeof input === \"string\") {\n return parseJavaStackTrace(input);\n }\n return input;\n }, [input, language]);\n\n const enrichedFrames = useMemo<ParsedStackFrame[]>(() => {\n if (!resolver) return parsed.frames;\n return parsed.frames.map((frame): ParsedStackFrame => {\n if (frame.sourceLines && frame.sourceLines.length > 0) return frame;\n const resolved = resolver(frame, contextLines);\n if (!resolved) return frame;\n // `line` stays the frame's own — it is what the window highlights, and a\n // resolver returning one would silently move the focal line off the throw.\n const { line: _ignored, ...source } = resolved;\n return { ...frame, ...source };\n });\n }, [parsed.frames, resolver, contextLines]);\n\n const visibleFrames = useMemo(() => {\n return enrichedFrames.filter((frame) => {\n if (hideRuntimeOnly && frame.runtime) return false;\n if (frameFilter && !frameFilter(frame)) return false;\n if (exclude && exclude.some((p) => frame.class?.startsWith(p))) return false;\n if (include && include.length > 0) {\n return include.some((p) => frame.class?.startsWith(p));\n }\n return true;\n });\n }, [enrichedFrames, hideRuntimeOnly, include, exclude, frameFilter]);\n\n if (visibleFrames.length === 0 && !parsed.exceptionClass) return null;\n\n const hasFilteredFrames = visibleFrames.length !== enrichedFrames.length;\n\n return (\n <div\n className={[\n \"overflow-hidden rounded-md border border-border bg-background text-foreground\",\n className,\n ]\n .filter(Boolean)\n .join(\" \")}\n >\n {(parsed.exceptionClass || parsed.message) && (\n <div className=\"border-b border-border bg-red-500/5 px-3 py-2\">\n <div className=\"flex min-w-0 items-start gap-2\">\n <Icon\n icon={UiError}\n className=\"mt-0.5 shrink-0 text-sm text-red-600 dark:text-red-400\"\n />\n <div className=\"min-w-0 flex-1\">\n {parsed.exceptionClass && (\n <div className=\"break-all font-mono text-xs font-semibold text-red-700 dark:text-red-300\">\n {parsed.exceptionClass}\n </div>\n )}\n {parsed.message && (\n <div className=\"mt-0.5 whitespace-pre-wrap break-words text-xs text-foreground\">\n {parsed.message}\n </div>\n )}\n </div>\n </div>\n </div>\n )}\n {parsed.causedBy.length > 0 && (\n <div className=\"space-y-1 border-b border-border bg-orange-500/5 px-3 py-2\">\n {parsed.causedBy.map((cause, i) => {\n const detail = renderCauseDetail?.(cause, i);\n return (\n <div key={i} data-cause-index={i} className=\"min-w-0\">\n <div className=\"flex min-w-0 items-start gap-2 font-mono text-[11px] text-orange-700 dark:text-orange-300\">\n <Icon icon={UiStackFrameDot} className=\"mt-0.5 shrink-0 text-xs\" />\n <span className=\"shrink-0 opacity-75\">Caused by</span>\n <span className=\"min-w-0 break-all\">{cause}</span>\n </div>\n {detail ? <div className=\"mt-1 pl-5\">{detail}</div> : null}\n </div>\n );\n })}\n </div>\n )}\n <div className=\"divide-y divide-border/60\">\n {visibleFrames.map((frame, idx) => (\n <StackFrameRow\n key={`${frame.functionName}-${idx}`}\n frame={frame}\n index={idx}\n showIndex\n {...(frameActions ? { frameActions } : {})}\n {...(renderFramePart ? { renderFramePart } : {})}\n {...(renderFrameDetail ? { renderFrameDetail } : {})}\n frameActionsVisibility={frameActionsVisibility}\n />\n ))}\n </div>\n {hasFilteredFrames && (\n <div className=\"border-t border-border bg-muted/30 px-3 py-1.5 text-[11px] text-muted-foreground\">\n Showing {visibleFrames.length} of {enrichedFrames.length} frames\n </div>\n )}\n </div>\n );\n}\n"],"names":["useMemo","parseJavaStackTrace","jsxs","jsx","Icon","UiError","UiStackFrameDot","StackFrameRow"],"mappings":";;;;;;;;;AAoEO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,yBAAyB;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AACF,GAAoB;AAClB,QAAM,SAASA,MAAAA,QAA0B,MAAM;AAC7C,QAAI,OAAO,UAAU,UAAU;AAC7B,aAAOC,gBAAAA,oBAAoB,KAAK;AAAA,IAClC;AACA,WAAO;AAAA,EACT,GAAG,CAAC,OAAO,QAAQ,CAAC;AAEpB,QAAM,iBAAiBD,MAAAA,QAA4B,MAAM;AACvD,QAAI,CAAC,SAAU,QAAO,OAAO;AAC7B,WAAO,OAAO,OAAO,IAAI,CAAC,UAA4B;AACpD,UAAI,MAAM,eAAe,MAAM,YAAY,SAAS,EAAG,QAAO;AAC9D,YAAM,WAAW,SAAS,OAAO,YAAY;AAC7C,UAAI,CAAC,SAAU,QAAO;AAGtB,YAAM,EAAE,MAAM,UAAU,GAAG,WAAW;AACtC,aAAO,EAAE,GAAG,OAAO,GAAG,OAAA;AAAA,IACxB,CAAC;AAAA,EACH,GAAG,CAAC,OAAO,QAAQ,UAAU,YAAY,CAAC;AAE1C,QAAM,gBAAgBA,MAAAA,QAAQ,MAAM;AAClC,WAAO,eAAe,OAAO,CAAC,UAAU;AACtC,UAAI,mBAAmB,MAAM,QAAS,QAAO;AAC7C,UAAI,e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ics/RenderedStackTrace.tsx"],"sourcesContent":["import { useMemo, type ReactNode } from \"react\";\nimport {\n parseJavaStackTrace,\n type ParsedStackFrame,\n type ParsedStackTrace,\n} from \"./stacktrace-parse\";\nimport { Icon } from \"../Icon\";\nimport { UiStackFrameDot, UiError } from \"../../icons\";\nimport {\n StackFrameRow,\n type StackFrameActions,\n type StackFrameActionsVisibility,\n type StackFrameDetailRenderer,\n type StackFramePartRenderer,\n} from \"./StackFrameRow\";\nimport type { FrameSource } from \"./FrameSourceWindow.utils\";\n\n// SourceResolver matches the Go clicky.SourceResolver interface: given a\n// frame, return surrounding source lines so the renderer can display inline\n// context. Failures must be silent (return undefined) so a missing class\n// never blocks the rest of the trace.\n//\n// The return shape is `FrameSource` — the same shape the source window\n// consumes and the same one the JVM thread-dump resolver returns, so a caller\n// that can resolve source for one surface can resolve it for both.\nexport type StackTraceSourceResolver = (\n frame: ParsedStackFrame,\n contextLines: number,\n) => FrameSource | undefined;\n\nexport interface StackTraceProps {\n /**\n * Raw Java stack-trace string or a pre-parsed ParsedStackTrace\n * from a backend/parser.\n */\n input: string | ParsedStackTrace;\n /** Parser language. Currently Java stack traces are supported. */\n language?: \"java\";\n /** Optional source-line resolver for inline context under frames. */\n resolver?: StackTraceSourceResolver;\n /** Number of source lines to request around each frame. */\n contextLines?: number;\n /** Hide frames known to be runtime/library-only. */\n hideRuntimeOnly?: boolean;\n /** Only show frames whose class starts with one of these prefixes. */\n include?: string[];\n /** Hide frames whose class starts with one of these prefixes. */\n exclude?: string[];\n /** Trailing per-frame actions, revealed on hover/focus. */\n frameActions?: StackFrameActions;\n /** Replace method, class, and location labels with application-owned renderers. */\n renderFramePart?: StackFramePartRenderer;\n /** Render application-owned detail below each visible frame. */\n renderFrameDetail?: StackFrameDetailRenderer;\n /** Control whether per-frame actions are hover-only or always visible. */\n frameActionsVisibility?: StackFrameActionsVisibility;\n /** Show each frame's 1-based ordinal in the gutter. Defaults to true. */\n showFrameIndex?: boolean;\n /** Additional application-owned frame predicate. */\n frameFilter?: (frame: ParsedStackFrame) => boolean;\n /** Render application-owned detail below a parsed cause. */\n renderCauseDetail?: (cause: string, index: number) => ReactNode;\n /** Classes applied to the stack-trace shell. */\n className?: string;\n}\n\n// StackTrace is the React counterpart to Go's clicky.StackTrace builder. Pass\n// a raw exception dump and it parses + renders frames; pass a SourceResolver\n// to get inline source context (±N lines) under each frame, with the focal\n// line highlighted. Frames themselves are rendered by the shared StackFrameRow.\nexport function StackTrace({\n input,\n language = \"java\",\n resolver,\n contextLines = 3,\n hideRuntimeOnly = false,\n include,\n exclude,\n frameActions,\n renderFramePart,\n renderFrameDetail,\n frameActionsVisibility = \"hover\",\n showFrameIndex = true,\n frameFilter,\n renderCauseDetail,\n className,\n}: StackTraceProps) {\n const parsed = useMemo<ParsedStackTrace>(() => {\n if (typeof input === \"string\") {\n return parseJavaStackTrace(input);\n }\n return input;\n }, [input, language]);\n\n const enrichedFrames = useMemo<ParsedStackFrame[]>(() => {\n if (!resolver) return parsed.frames;\n return parsed.frames.map((frame): ParsedStackFrame => {\n if (frame.sourceLines && frame.sourceLines.length > 0) return frame;\n const resolved = resolver(frame, contextLines);\n if (!resolved) return frame;\n // `line` stays the frame's own — it is what the window highlights, and a\n // resolver returning one would silently move the focal line off the throw.\n const { line: _ignored, ...source } = resolved;\n return { ...frame, ...source };\n });\n }, [parsed.frames, resolver, contextLines]);\n\n const visibleFrames = useMemo(() => {\n return enrichedFrames.filter((frame) => {\n if (hideRuntimeOnly && frame.runtime) return false;\n if (frameFilter && !frameFilter(frame)) return false;\n if (exclude && exclude.some((p) => frame.class?.startsWith(p))) return false;\n if (include && include.length > 0) {\n return include.some((p) => frame.class?.startsWith(p));\n }\n return true;\n });\n }, [enrichedFrames, hideRuntimeOnly, include, exclude, frameFilter]);\n\n if (visibleFrames.length === 0 && !parsed.exceptionClass) return null;\n\n const hasFilteredFrames = visibleFrames.length !== enrichedFrames.length;\n\n return (\n <div\n className={[\n \"overflow-hidden rounded-md border border-border bg-background text-foreground\",\n className,\n ]\n .filter(Boolean)\n .join(\" \")}\n >\n {(parsed.exceptionClass || parsed.message) && (\n <div className=\"border-b border-border bg-red-500/5 px-3 py-2\">\n <div className=\"flex min-w-0 items-start gap-2\">\n <Icon\n icon={UiError}\n className=\"mt-0.5 shrink-0 text-sm text-red-600 dark:text-red-400\"\n />\n <div className=\"min-w-0 flex-1\">\n {parsed.exceptionClass && (\n <div className=\"break-all font-mono text-xs font-semibold text-red-700 dark:text-red-300\">\n {parsed.exceptionClass}\n </div>\n )}\n {parsed.message && (\n <div className=\"mt-0.5 whitespace-pre-wrap break-words text-xs text-foreground\">\n {parsed.message}\n </div>\n )}\n </div>\n </div>\n </div>\n )}\n {parsed.causedBy.length > 0 && (\n <div className=\"space-y-1 border-b border-border bg-orange-500/5 px-3 py-2\">\n {parsed.causedBy.map((cause, i) => {\n const detail = renderCauseDetail?.(cause, i);\n return (\n <div key={i} data-cause-index={i} className=\"min-w-0\">\n <div className=\"flex min-w-0 items-start gap-2 font-mono text-[11px] text-orange-700 dark:text-orange-300\">\n <Icon icon={UiStackFrameDot} className=\"mt-0.5 shrink-0 text-xs\" />\n <span className=\"shrink-0 opacity-75\">Caused by</span>\n <span className=\"min-w-0 break-all\">{cause}</span>\n </div>\n {detail ? <div className=\"mt-1 pl-5\">{detail}</div> : null}\n </div>\n );\n })}\n </div>\n )}\n <div className=\"divide-y divide-border/60\">\n {visibleFrames.map((frame, idx) => (\n <StackFrameRow\n key={`${frame.functionName}-${idx}`}\n frame={frame}\n index={idx}\n showIndex={showFrameIndex}\n {...(frameActions ? { frameActions } : {})}\n {...(renderFramePart ? { renderFramePart } : {})}\n {...(renderFrameDetail ? { renderFrameDetail } : {})}\n frameActionsVisibility={frameActionsVisibility}\n />\n ))}\n </div>\n {hasFilteredFrames && (\n <div className=\"border-t border-border bg-muted/30 px-3 py-1.5 text-[11px] text-muted-foreground\">\n Showing {visibleFrames.length} of {enrichedFrames.length} frames\n </div>\n )}\n </div>\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2BAAAA,IAACC,KAAAA,MAAA,EAAK,MAAME,gBAAAA,iBAAiB,WAAU,2BAA0B;AAAA,cACjEH,2BAAAA,IAAC,QAAA,EAAK,WAAU,uBAAsB,UAAA,aAAS;AAAA,cAC/CA,2BAAAA,IAAC,QAAA,EAAK,WAAU,qBAAqB,UAAA,MAAA,CAAM;AAAA,YAAA,GAC7C;AAAA,YACC,SAASA,2BAAAA,IAAC,OAAA,EAAI,WAAU,aAAa,kBAAO,IAAS;AAAA,UAAA,EAAA,GAN9C,CAOV;AAAA,QAEJ,CAAC,EAAA,CACH;AAAA,QAEFA,2BAAAA,IAAC,SAAI,WAAU,6BACZ,wBAAc,IAAI,CAAC,OAAO,QACzBA,2BAAAA;AAAAA,UAACI,cAAAA;AAAAA,UAAA;AAAA,YAEC;AAAA,YACA,OAAO;AAAA,YACP,WAAW;AAAA,YACV,GAAI,eAAe,EAAE,aAAA,IAAiB,CAAA;AAAA,YACtC,GAAI,kBAAkB,EAAE,gBAAA,IAAoB,CAAA;AAAA,YAC5C,GAAI,oBAAoB,EAAE,kBAAA,IAAsB,CAAA;AAAA,YACjD;AAAA,UAAA;AAAA,UAPK,GAAG,MAAM,YAAY,IAAI,GAAG;AAAA,QAAA,CASpC,GACH;AAAA,QACC,qBACCL,2BAAAA,KAAC,OAAA,EAAI,WAAU,oFAAmF,UAAA;AAAA,UAAA;AAAA,UACvF,cAAc;AAAA,UAAO;AAAA,UAAK,eAAe;AAAA,UAAO;AAAA,QAAA,EAAA,CAC3D;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;;"}
|
|
@@ -29,6 +29,8 @@ export interface StackTraceProps {
|
|
|
29
29
|
renderFrameDetail?: StackFrameDetailRenderer;
|
|
30
30
|
/** Control whether per-frame actions are hover-only or always visible. */
|
|
31
31
|
frameActionsVisibility?: StackFrameActionsVisibility;
|
|
32
|
+
/** Show each frame's 1-based ordinal in the gutter. Defaults to true. */
|
|
33
|
+
showFrameIndex?: boolean;
|
|
32
34
|
/** Additional application-owned frame predicate. */
|
|
33
35
|
frameFilter?: (frame: ParsedStackFrame) => boolean;
|
|
34
36
|
/** Render application-owned detail below a parsed cause. */
|
|
@@ -36,5 +38,5 @@ export interface StackTraceProps {
|
|
|
36
38
|
/** Classes applied to the stack-trace shell. */
|
|
37
39
|
className?: string;
|
|
38
40
|
}
|
|
39
|
-
export declare function StackTrace({ input, language, resolver, contextLines, hideRuntimeOnly, include, exclude, frameActions, renderFramePart, renderFrameDetail, frameActionsVisibility, frameFilter, renderCauseDetail, className, }: StackTraceProps): import("react").JSX.Element | null;
|
|
41
|
+
export declare function StackTrace({ input, language, resolver, contextLines, hideRuntimeOnly, include, exclude, frameActions, renderFramePart, renderFrameDetail, frameActionsVisibility, showFrameIndex, frameFilter, renderCauseDetail, className, }: StackTraceProps): import("react").JSX.Element | null;
|
|
40
42
|
//# sourceMappingURL=RenderedStackTrace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderedStackTrace.d.ts","sourceRoot":"","sources":["../../../src/data/diagnostics/RenderedStackTrace.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAU7D,MAAM,MAAM,wBAAwB,GAAG,CACrC,KAAK,EAAE,gBAAgB,EACvB,YAAY,EAAE,MAAM,KACjB,WAAW,GAAG,SAAS,CAAC;AAE7B,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAAC;IACjC,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,wBAAwB,CAAC;IACpC,2DAA2D;IAC3D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,mFAAmF;IACnF,eAAe,CAAC,EAAE,sBAAsB,CAAC;IACzC,gEAAgE;IAChE,iBAAiB,CAAC,EAAE,wBAAwB,CAAC;IAC7C,0EAA0E;IAC1E,sBAAsB,CAAC,EAAE,2BAA2B,CAAC;IACrD,oDAAoD;IACpD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,OAAO,CAAC;IACnD,4DAA4D;IAC5D,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAChE,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,QAAiB,EACjB,QAAQ,EACR,YAAgB,EAChB,eAAuB,EACvB,OAAO,EACP,OAAO,EACP,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,sBAAgC,EAChC,WAAW,EACX,iBAAiB,EACjB,SAAS,GACV,EAAE,eAAe,sCA0GjB"}
|
|
1
|
+
{"version":3,"file":"RenderedStackTrace.d.ts","sourceRoot":"","sources":["../../../src/data/diagnostics/RenderedStackTrace.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AA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UAAU,CAAC,EACzB,KAAK,EACL,QAAiB,EACjB,QAAQ,EACR,YAAgB,EAChB,eAAuB,EACvB,OAAO,EACP,OAAO,EACP,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,sBAAgC,EAChC,cAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,SAAS,GACV,EAAE,eAAe,sCA0GjB"}
|
|
@@ -17,6 +17,7 @@ function StackTrace({
|
|
|
17
17
|
renderFramePart,
|
|
18
18
|
renderFrameDetail,
|
|
19
19
|
frameActionsVisibility = "hover",
|
|
20
|
+
showFrameIndex = true,
|
|
20
21
|
frameFilter,
|
|
21
22
|
renderCauseDetail,
|
|
22
23
|
className
|
|
@@ -93,7 +94,7 @@ function StackTrace({
|
|
|
93
94
|
{
|
|
94
95
|
frame,
|
|
95
96
|
index: idx,
|
|
96
|
-
showIndex:
|
|
97
|
+
showIndex: showFrameIndex,
|
|
97
98
|
...frameActions ? { frameActions } : {},
|
|
98
99
|
...renderFramePart ? { renderFramePart } : {},
|
|
99
100
|
...renderFrameDetail ? { renderFrameDetail } : {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderedStackTrace.js","sources":["../../../src/data/diagnostics/RenderedStackTrace.tsx"],"sourcesContent":["import { useMemo, type ReactNode } from \"react\";\nimport {\n parseJavaStackTrace,\n type ParsedStackFrame,\n type ParsedStackTrace,\n} from \"./stacktrace-parse\";\nimport { Icon } from \"../Icon\";\nimport { UiStackFrameDot, UiError } from \"../../icons\";\nimport {\n StackFrameRow,\n type StackFrameActions,\n type StackFrameActionsVisibility,\n type StackFrameDetailRenderer,\n type StackFramePartRenderer,\n} from \"./StackFrameRow\";\nimport type { FrameSource } from \"./FrameSourceWindow.utils\";\n\n// SourceResolver matches the Go clicky.SourceResolver interface: given a\n// frame, return surrounding source lines so the renderer can display inline\n// context. Failures must be silent (return undefined) so a missing class\n// never blocks the rest of the trace.\n//\n// The return shape is `FrameSource` — the same shape the source window\n// consumes and the same one the JVM thread-dump resolver returns, so a caller\n// that can resolve source for one surface can resolve it for both.\nexport type StackTraceSourceResolver = (\n frame: ParsedStackFrame,\n contextLines: number,\n) => FrameSource | undefined;\n\nexport interface StackTraceProps {\n /**\n * Raw Java stack-trace string or a pre-parsed ParsedStackTrace\n * from a backend/parser.\n */\n input: string | ParsedStackTrace;\n /** Parser language. Currently Java stack traces are supported. */\n language?: \"java\";\n /** Optional source-line resolver for inline context under frames. */\n resolver?: StackTraceSourceResolver;\n /** Number of source lines to request around each frame. */\n contextLines?: number;\n /** Hide frames known to be runtime/library-only. */\n hideRuntimeOnly?: boolean;\n /** Only show frames whose class starts with one of these prefixes. */\n include?: string[];\n /** Hide frames whose class starts with one of these prefixes. */\n exclude?: string[];\n /** Trailing per-frame actions, revealed on hover/focus. */\n frameActions?: StackFrameActions;\n /** Replace method, class, and location labels with application-owned renderers. */\n renderFramePart?: StackFramePartRenderer;\n /** Render application-owned detail below each visible frame. */\n renderFrameDetail?: StackFrameDetailRenderer;\n /** Control whether per-frame actions are hover-only or always visible. */\n frameActionsVisibility?: StackFrameActionsVisibility;\n /** Additional application-owned frame predicate. */\n frameFilter?: (frame: ParsedStackFrame) => boolean;\n /** Render application-owned detail below a parsed cause. */\n renderCauseDetail?: (cause: string, index: number) => ReactNode;\n /** Classes applied to the stack-trace shell. */\n className?: string;\n}\n\n// StackTrace is the React counterpart to Go's clicky.StackTrace builder. Pass\n// a raw exception dump and it parses + renders frames; pass a SourceResolver\n// to get inline source context (±N lines) under each frame, with the focal\n// line highlighted. Frames themselves are rendered by the shared StackFrameRow.\nexport function StackTrace({\n input,\n language = \"java\",\n resolver,\n contextLines = 3,\n hideRuntimeOnly = false,\n include,\n exclude,\n frameActions,\n renderFramePart,\n renderFrameDetail,\n frameActionsVisibility = \"hover\",\n frameFilter,\n renderCauseDetail,\n className,\n}: StackTraceProps) {\n const parsed = useMemo<ParsedStackTrace>(() => {\n if (typeof input === \"string\") {\n return parseJavaStackTrace(input);\n }\n return input;\n }, [input, language]);\n\n const enrichedFrames = useMemo<ParsedStackFrame[]>(() => {\n if (!resolver) return parsed.frames;\n return parsed.frames.map((frame): ParsedStackFrame => {\n if (frame.sourceLines && frame.sourceLines.length > 0) return frame;\n const resolved = resolver(frame, contextLines);\n if (!resolved) return frame;\n // `line` stays the frame's own — it is what the window highlights, and a\n // resolver returning one would silently move the focal line off the throw.\n const { line: _ignored, ...source } = resolved;\n return { ...frame, ...source };\n });\n }, [parsed.frames, resolver, contextLines]);\n\n const visibleFrames = useMemo(() => {\n return enrichedFrames.filter((frame) => {\n if (hideRuntimeOnly && frame.runtime) return false;\n if (frameFilter && !frameFilter(frame)) return false;\n if (exclude && exclude.some((p) => frame.class?.startsWith(p))) return false;\n if (include && include.length > 0) {\n return include.some((p) => frame.class?.startsWith(p));\n }\n return true;\n });\n }, [enrichedFrames, hideRuntimeOnly, include, exclude, frameFilter]);\n\n if (visibleFrames.length === 0 && !parsed.exceptionClass) return null;\n\n const hasFilteredFrames = visibleFrames.length !== enrichedFrames.length;\n\n return (\n <div\n className={[\n \"overflow-hidden rounded-md border border-border bg-background text-foreground\",\n className,\n ]\n .filter(Boolean)\n .join(\" \")}\n >\n {(parsed.exceptionClass || parsed.message) && (\n <div className=\"border-b border-border bg-red-500/5 px-3 py-2\">\n <div className=\"flex min-w-0 items-start gap-2\">\n <Icon\n icon={UiError}\n className=\"mt-0.5 shrink-0 text-sm text-red-600 dark:text-red-400\"\n />\n <div className=\"min-w-0 flex-1\">\n {parsed.exceptionClass && (\n <div className=\"break-all font-mono text-xs font-semibold text-red-700 dark:text-red-300\">\n {parsed.exceptionClass}\n </div>\n )}\n {parsed.message && (\n <div className=\"mt-0.5 whitespace-pre-wrap break-words text-xs text-foreground\">\n {parsed.message}\n </div>\n )}\n </div>\n </div>\n </div>\n )}\n {parsed.causedBy.length > 0 && (\n <div className=\"space-y-1 border-b border-border bg-orange-500/5 px-3 py-2\">\n {parsed.causedBy.map((cause, i) => {\n const detail = renderCauseDetail?.(cause, i);\n return (\n <div key={i} data-cause-index={i} className=\"min-w-0\">\n <div className=\"flex min-w-0 items-start gap-2 font-mono text-[11px] text-orange-700 dark:text-orange-300\">\n <Icon icon={UiStackFrameDot} className=\"mt-0.5 shrink-0 text-xs\" />\n <span className=\"shrink-0 opacity-75\">Caused by</span>\n <span className=\"min-w-0 break-all\">{cause}</span>\n </div>\n {detail ? <div className=\"mt-1 pl-5\">{detail}</div> : null}\n </div>\n );\n })}\n </div>\n )}\n <div className=\"divide-y divide-border/60\">\n {visibleFrames.map((frame, idx) => (\n <StackFrameRow\n key={`${frame.functionName}-${idx}`}\n frame={frame}\n index={idx}\n showIndex\n {...(frameActions ? { frameActions } : {})}\n {...(renderFramePart ? { renderFramePart } : {})}\n {...(renderFrameDetail ? { renderFrameDetail } : {})}\n frameActionsVisibility={frameActionsVisibility}\n />\n ))}\n </div>\n {hasFilteredFrames && (\n <div className=\"border-t border-border bg-muted/30 px-3 py-1.5 text-[11px] text-muted-foreground\">\n Showing {visibleFrames.length} of {enrichedFrames.length} frames\n </div>\n )}\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;AAoEO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,yBAAyB;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AACF,GAAoB;AAClB,QAAM,SAAS,QAA0B,MAAM;AAC7C,QAAI,OAAO,UAAU,UAAU;AAC7B,aAAO,oBAAoB,KAAK;AAAA,IAClC;AACA,WAAO;AAAA,EACT,GAAG,CAAC,OAAO,QAAQ,CAAC;AAEpB,QAAM,iBAAiB,QAA4B,MAAM;AACvD,QAAI,CAAC,SAAU,QAAO,OAAO;AAC7B,WAAO,OAAO,OAAO,IAAI,CAAC,UAA4B;AACpD,UAAI,MAAM,eAAe,MAAM,YAAY,SAAS,EAAG,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UAAO;AAAA,UAAK,eAAe;AAAA,UAAO;AAAA,QAAA,EAAA,CAC3D;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
|
1
|
+
{"version":3,"file":"RenderedStackTrace.js","sources":["../../../src/data/diagnostics/RenderedStackTrace.tsx"],"sourcesContent":["import { useMemo, type ReactNode } from \"react\";\nimport {\n parseJavaStackTrace,\n type ParsedStackFrame,\n type ParsedStackTrace,\n} from \"./stacktrace-parse\";\nimport { Icon } from \"../Icon\";\nimport { UiStackFrameDot, UiError } from \"../../icons\";\nimport {\n StackFrameRow,\n type StackFrameActions,\n type StackFrameActionsVisibility,\n type StackFrameDetailRenderer,\n type StackFramePartRenderer,\n} from \"./StackFrameRow\";\nimport type { FrameSource } from \"./FrameSourceWindow.utils\";\n\n// SourceResolver matches the Go clicky.SourceResolver interface: given a\n// frame, return surrounding source lines so the renderer can display inline\n// context. Failures must be silent (return undefined) so a missing class\n// never blocks the rest of the trace.\n//\n// The return shape is `FrameSource` — the same shape the source window\n// consumes and the same one the JVM thread-dump resolver returns, so a caller\n// that can resolve source for one surface can resolve it for both.\nexport type StackTraceSourceResolver = (\n frame: ParsedStackFrame,\n contextLines: number,\n) => FrameSource | undefined;\n\nexport interface StackTraceProps {\n /**\n * Raw Java stack-trace string or a pre-parsed ParsedStackTrace\n * from a backend/parser.\n */\n input: string | ParsedStackTrace;\n /** Parser language. Currently Java stack traces are supported. */\n language?: \"java\";\n /** Optional source-line resolver for inline context under frames. */\n resolver?: StackTraceSourceResolver;\n /** Number of source lines to request around each frame. */\n contextLines?: number;\n /** Hide frames known to be runtime/library-only. */\n hideRuntimeOnly?: boolean;\n /** Only show frames whose class starts with one of these prefixes. */\n include?: string[];\n /** Hide frames whose class starts with one of these prefixes. */\n exclude?: string[];\n /** Trailing per-frame actions, revealed on hover/focus. */\n frameActions?: StackFrameActions;\n /** Replace method, class, and location labels with application-owned renderers. */\n renderFramePart?: StackFramePartRenderer;\n /** Render application-owned detail below each visible frame. */\n renderFrameDetail?: StackFrameDetailRenderer;\n /** Control whether per-frame actions are hover-only or always visible. */\n frameActionsVisibility?: StackFrameActionsVisibility;\n /** Show each frame's 1-based ordinal in the gutter. Defaults to true. */\n showFrameIndex?: boolean;\n /** Additional application-owned frame predicate. */\n frameFilter?: (frame: ParsedStackFrame) => boolean;\n /** Render application-owned detail below a parsed cause. */\n renderCauseDetail?: (cause: string, index: number) => ReactNode;\n /** Classes applied to the stack-trace shell. */\n className?: string;\n}\n\n// StackTrace is the React counterpart to Go's clicky.StackTrace builder. Pass\n// a raw exception dump and it parses + renders frames; pass a SourceResolver\n// to get inline source context (±N lines) under each frame, with the focal\n// line highlighted. Frames themselves are rendered by the shared StackFrameRow.\nexport function StackTrace({\n input,\n language = \"java\",\n resolver,\n contextLines = 3,\n hideRuntimeOnly = false,\n include,\n exclude,\n frameActions,\n renderFramePart,\n renderFrameDetail,\n frameActionsVisibility = \"hover\",\n showFrameIndex = true,\n frameFilter,\n renderCauseDetail,\n className,\n}: StackTraceProps) {\n const parsed = useMemo<ParsedStackTrace>(() => {\n if (typeof input === \"string\") {\n return parseJavaStackTrace(input);\n }\n return input;\n }, [input, language]);\n\n const enrichedFrames = useMemo<ParsedStackFrame[]>(() => {\n if (!resolver) return parsed.frames;\n return parsed.frames.map((frame): ParsedStackFrame => {\n if (frame.sourceLines && frame.sourceLines.length > 0) return frame;\n const resolved = resolver(frame, contextLines);\n if (!resolved) return frame;\n // `line` stays the frame's own — it is what the window highlights, and a\n // resolver returning one would silently move the focal line off the throw.\n const { line: _ignored, ...source } = resolved;\n return { ...frame, ...source };\n });\n }, [parsed.frames, resolver, contextLines]);\n\n const visibleFrames = useMemo(() => {\n return enrichedFrames.filter((frame) => {\n if (hideRuntimeOnly && frame.runtime) return false;\n if (frameFilter && !frameFilter(frame)) return false;\n if (exclude && exclude.some((p) => frame.class?.startsWith(p))) return false;\n if (include && include.length > 0) {\n return include.some((p) => frame.class?.startsWith(p));\n }\n return true;\n });\n }, [enrichedFrames, hideRuntimeOnly, include, exclude, frameFilter]);\n\n if (visibleFrames.length === 0 && !parsed.exceptionClass) return null;\n\n const hasFilteredFrames = visibleFrames.length !== enrichedFrames.length;\n\n return (\n <div\n className={[\n \"overflow-hidden rounded-md border border-border bg-background text-foreground\",\n className,\n ]\n .filter(Boolean)\n .join(\" \")}\n >\n {(parsed.exceptionClass || parsed.message) && (\n <div className=\"border-b border-border bg-red-500/5 px-3 py-2\">\n <div className=\"flex min-w-0 items-start gap-2\">\n <Icon\n icon={UiError}\n className=\"mt-0.5 shrink-0 text-sm text-red-600 dark:text-red-400\"\n />\n <div className=\"min-w-0 flex-1\">\n {parsed.exceptionClass && (\n <div className=\"break-all font-mono text-xs font-semibold text-red-700 dark:text-red-300\">\n {parsed.exceptionClass}\n </div>\n )}\n {parsed.message && (\n <div className=\"mt-0.5 whitespace-pre-wrap break-words text-xs text-foreground\">\n {parsed.message}\n </div>\n )}\n </div>\n </div>\n </div>\n )}\n {parsed.causedBy.length > 0 && (\n <div className=\"space-y-1 border-b border-border bg-orange-500/5 px-3 py-2\">\n {parsed.causedBy.map((cause, i) => {\n const detail = renderCauseDetail?.(cause, i);\n return (\n <div key={i} data-cause-index={i} className=\"min-w-0\">\n <div className=\"flex min-w-0 items-start gap-2 font-mono text-[11px] text-orange-700 dark:text-orange-300\">\n <Icon icon={UiStackFrameDot} className=\"mt-0.5 shrink-0 text-xs\" />\n <span className=\"shrink-0 opacity-75\">Caused by</span>\n <span className=\"min-w-0 break-all\">{cause}</span>\n </div>\n {detail ? <div className=\"mt-1 pl-5\">{detail}</div> : null}\n </div>\n );\n })}\n </div>\n )}\n <div className=\"divide-y divide-border/60\">\n {visibleFrames.map((frame, idx) => (\n <StackFrameRow\n key={`${frame.functionName}-${idx}`}\n frame={frame}\n index={idx}\n showIndex={showFrameIndex}\n {...(frameActions ? { frameActions } : {})}\n {...(renderFramePart ? { renderFramePart } : {})}\n {...(renderFrameDetail ? { renderFrameDetail } : {})}\n frameActionsVisibility={frameActionsVisibility}\n />\n ))}\n </div>\n {hasFilteredFrames && (\n <div className=\"border-t border-border bg-muted/30 px-3 py-1.5 text-[11px] text-muted-foreground\">\n Showing {visibleFrames.length} of {enrichedFrames.length} frames\n </div>\n )}\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;AAsEO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,yBAAyB;AAAA,EACzB,iBAAiB;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AACF,GAAoB;AAClB,QAAM,SAAS,QAA0B,MAAM;AAC7C,QAAI,OAAO,UAAU,UAAU;AAC7B,aAAO,oBAAoB,KAAK;AAAA,IAClC;AACA,WAAO;AAAA,EACT,GAAG,CAAC,OAAO,QAAQ,CAAC;AAEpB,QAAM,iBAAiB,QAA4B,MAAM;AACvD,QAAI,CAAC,SAAU,QAAO,OAAO;AAC7B,WAAO,OAAO,OAAO,IAAI,CAAC,UAA4B;AACpD,UAAI,MAAM,eAAe,MAAM,YAAY,SAAS,EAAG,QAAO;AAC9D,YAAM,WAAW,SAAS,OAAO,YAAY;AAC7C,UAAI,CAAC,SAAU,QAAO;AAGtB,YAAM,EAAE,MAAM,UAAU,GAAG,WAAW;AACtC,aAAO,EAAE,GAAG,OAAO,GAAG,OAAA;AAAA,IACxB,CAAC;AAAA,EACH,GAAG,CAAC,OAAO,QAAQ,UAAU,YAAY,CAAC;AAE1C,QAAM,gBAAgB,QAAQ,MAAM;AAClC,WAAO,eAAe,OAAO,CAAC,UAAU;AACtC,UAAI,mBAAmB,MAAM,QAAS,QAAO;AAC7C,UAAI,eAAe,CAAC,YAAY,KAAK,EAAG,QAAO;AAC/C,UAAI,WAAW,QAAQ,KAAK,CAAC,MAAA;;AAAM,2BAAM,UAAN,mBAAa,WAAW;AAAA,OAAE,E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2BAA0B;AAAA,cACjE,oBAAC,QAAA,EAAK,WAAU,uBAAsB,UAAA,aAAS;AAAA,cAC/C,oBAAC,QAAA,EAAK,WAAU,qBAAqB,UAAA,MAAA,CAAM;AAAA,YAAA,GAC7C;AAAA,YACC,SAAS,oBAAC,OAAA,EAAI,WAAU,aAAa,kBAAO,IAAS;AAAA,UAAA,EAAA,GAN9C,CAOV;AAAA,QAEJ,CAAC,EAAA,CACH;AAAA,QAEF,oBAAC,SAAI,WAAU,6BACZ,wBAAc,IAAI,CAAC,OAAO,QACzB;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC;AAAA,YACA,OAAO;AAAA,YACP,WAAW;AAAA,YACV,GAAI,eAAe,EAAE,aAAA,IAAiB,CAAA;AAAA,YACtC,GAAI,kBAAkB,EAAE,gBAAA,IAAoB,CAAA;AAAA,YAC5C,GAAI,oBAAoB,EAAE,kBAAA,IAAsB,CAAA;AAAA,YACjD;AAAA,UAAA;AAAA,UAPK,GAAG,MAAM,YAAY,IAAI,GAAG;AAAA,QAAA,CASpC,GACH;AAAA,QACC,qBACC,qBAAC,OAAA,EAAI,WAAU,oFAAmF,UAAA;AAAA,UAAA;AAAA,UACvF,cAAc;AAAA,UAAO;AAAA,UAAK,eAAe;AAAA,UAAO;AAAA,QAAA,EAAA,CAC3D;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
|
@@ -15,9 +15,9 @@ function detectMode() {
|
|
|
15
15
|
}
|
|
16
16
|
function getVersionInfo() {
|
|
17
17
|
return {
|
|
18
|
-
commit: read(() => "
|
|
18
|
+
commit: read(() => "658d27b7", ""),
|
|
19
19
|
tag: read(() => "clicky-ui@0.3.41", ""),
|
|
20
|
-
date: read(() => "2026-10-
|
|
20
|
+
date: read(() => "2026-10-02T06:49:21.517Z", ""),
|
|
21
21
|
dirty: read(() => true, false),
|
|
22
22
|
mode: detectMode()
|
|
23
23
|
};
|
|
@@ -13,9 +13,9 @@ function detectMode() {
|
|
|
13
13
|
}
|
|
14
14
|
function getVersionInfo() {
|
|
15
15
|
return {
|
|
16
|
-
commit: read(() => "
|
|
16
|
+
commit: read(() => "658d27b7", ""),
|
|
17
17
|
tag: read(() => "clicky-ui@0.3.41", ""),
|
|
18
|
-
date: read(() => "2026-10-
|
|
18
|
+
date: read(() => "2026-10-02T06:48:40.790Z", ""),
|
|
19
19
|
dirty: read(() => true, false),
|
|
20
20
|
mode: detectMode()
|
|
21
21
|
};
|
package/dist/data.cjs
CHANGED
|
@@ -7,6 +7,7 @@ const badgeVariants = require("./data/badge-variants.cjs");
|
|
|
7
7
|
const Badge = require("./data/Badge.cjs");
|
|
8
8
|
const CodeBlock = require("./data/CodeBlock.cjs");
|
|
9
9
|
const CodeDiff = require("./data/CodeDiff.cjs");
|
|
10
|
+
const CodeLine = require("./data/CodeLine.cjs");
|
|
10
11
|
const codeDiff = require("./data/code-diff.cjs");
|
|
11
12
|
const dataTableUtils = require("./data/data-table-utils.cjs");
|
|
12
13
|
const dataTableFilterValues = require("./data/data-table-filter-values.cjs");
|
|
@@ -725,6 +726,7 @@ exports.badgeVariants = badgeVariants.badgeVariants;
|
|
|
725
726
|
exports.Badge = Badge.Badge;
|
|
726
727
|
exports.CodeBlock = CodeBlock.CodeBlock;
|
|
727
728
|
exports.CodeDiff = CodeDiff.CodeDiff;
|
|
729
|
+
exports.CodeLine = CodeLine.CodeLine;
|
|
728
730
|
exports.computeLineDiff = codeDiff.computeLineDiff;
|
|
729
731
|
exports.parseUnifiedDiff = codeDiff.parseUnifiedDiff;
|
|
730
732
|
exports.inferColumns = dataTableUtils.inferColumns;
|
package/dist/data.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"data.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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-5,6 +5,7 @@ export { badgeVariants } from './data/badge-variants.js';
|
|
|
5
5
|
export { Badge, type BadgeProps, type BadgeShape, type BadgeSize, type BadgeStatus, type BadgeTone, type BadgeTruncate, type BadgeVariant, } from './data/Badge.js';
|
|
6
6
|
export { CodeBlock, type CodeBlockProps } from './data/CodeBlock.js';
|
|
7
7
|
export { CodeDiff, type CodeDiffProps, type CodeDiffView } from './data/CodeDiff.js';
|
|
8
|
+
export { CodeLine, type CodeLineProps } from './data/CodeLine.js';
|
|
8
9
|
export { computeLineDiff, parseUnifiedDiff, type DiffHunk, type DiffLine, type DiffLineType, } from './data/code-diff.js';
|
|
9
10
|
export { inferColumns } from './data/data-table-utils.js';
|
|
10
11
|
export { parseBoundsValue, parseDurationBoundsValue, parseMultiFilterValue, serializeBoundsValue, serializeDurationBoundsValue, serializeMultiFilterValue, splitCommaValues, updateFilterSelection, type DataTableFilterSelection, type FilterDefaultOperator, } from './data/data-table-filter-values.js';
|
package/dist/data.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../src/data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EACL,KAAK,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,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AAa,EACb,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,GACxB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,aAAa,GACd,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,iBAAiB,GAClB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,cAAc,EACd,KAAK,WAAW,GACjB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,wBAAwB,GAC9B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,mBAAmB,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,KAAK,iBAAiB,GACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,gBAAgB,EAChB,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,qBAAqB,GAC3B,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,KAAK,aAAa,EAAE,KAAK,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACxI,YAAY,EACV,QAAQ,EACR,UAAU,EACV,WAAW,EACX,UAAU,EACV,UAAU,EACV,OAAO,EACP,SAAS,EACT,MAAM,EACN,WAAW,GACZ,MAAM,kBAAkB,CAAC"}
|
package/dist/data.js
CHANGED
|
@@ -5,6 +5,7 @@ import { badgeVariants } from "./data/badge-variants.js";
|
|
|
5
5
|
import { Badge } from "./data/Badge.js";
|
|
6
6
|
import { CodeBlock } from "./data/CodeBlock.js";
|
|
7
7
|
import { CodeDiff } from "./data/CodeDiff.js";
|
|
8
|
+
import { CodeLine } from "./data/CodeLine.js";
|
|
8
9
|
import { computeLineDiff, parseUnifiedDiff } from "./data/code-diff.js";
|
|
9
10
|
import { inferColumns } from "./data/data-table-utils.js";
|
|
10
11
|
import { parseBoundsValue, parseDurationBoundsValue, parseMultiFilterValue, serializeBoundsValue, serializeDurationBoundsValue, serializeMultiFilterValue, splitCommaValues, updateFilterSelection } from "./data/data-table-filter-values.js";
|
|
@@ -736,6 +737,7 @@ export {
|
|
|
736
737
|
ClickyExportDialog,
|
|
737
738
|
CodeBlock,
|
|
738
739
|
CodeDiff,
|
|
740
|
+
CodeLine,
|
|
739
741
|
CopyBadge,
|
|
740
742
|
DATA_TABLE_FILTER_LOOKUP_LIMIT,
|
|
741
743
|
DEBUG_CAPTURE_HEADER,
|
package/dist/data.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"data.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.cjs
CHANGED
|
@@ -130,6 +130,7 @@ const badgeVariants = require("./data/badge-variants.cjs");
|
|
|
130
130
|
const Badge = require("./data/Badge.cjs");
|
|
131
131
|
const CodeBlock = require("./data/CodeBlock.cjs");
|
|
132
132
|
const CodeDiff = require("./data/CodeDiff.cjs");
|
|
133
|
+
const CodeLine = require("./data/CodeLine.cjs");
|
|
133
134
|
const codeDiff = require("./data/code-diff.cjs");
|
|
134
135
|
const dataTableUtils = require("./data/data-table-utils.cjs");
|
|
135
136
|
const dataTableFilterValues = require("./data/data-table-filter-values.cjs");
|
|
@@ -1142,6 +1143,7 @@ exports.badgeVariants = badgeVariants.badgeVariants;
|
|
|
1142
1143
|
exports.Badge = Badge.Badge;
|
|
1143
1144
|
exports.CodeBlock = CodeBlock.CodeBlock;
|
|
1144
1145
|
exports.CodeDiff = CodeDiff.CodeDiff;
|
|
1146
|
+
exports.CodeLine = CodeLine.CodeLine;
|
|
1145
1147
|
exports.computeLineDiff = codeDiff.computeLineDiff;
|
|
1146
1148
|
exports.parseUnifiedDiff = codeDiff.parseUnifiedDiff;
|
|
1147
1149
|
exports.inferColumns = dataTableUtils.inferColumns;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -128,6 +128,7 @@ import { badgeVariants } from "./data/badge-variants.js";
|
|
|
128
128
|
import { Badge } from "./data/Badge.js";
|
|
129
129
|
import { CodeBlock } from "./data/CodeBlock.js";
|
|
130
130
|
import { CodeDiff } from "./data/CodeDiff.js";
|
|
131
|
+
import { CodeLine } from "./data/CodeLine.js";
|
|
131
132
|
import { computeLineDiff, parseUnifiedDiff } from "./data/code-diff.js";
|
|
132
133
|
import { inferColumns } from "./data/data-table-utils.js";
|
|
133
134
|
import { parseBoundsValue, parseDurationBoundsValue, parseMultiFilterValue, serializeBoundsValue, serializeDurationBoundsValue, serializeMultiFilterValue, splitCommaValues, updateFilterSelection } from "./data/data-table-filter-values.js";
|
|
@@ -935,6 +936,7 @@ export {
|
|
|
935
936
|
ClickyTable,
|
|
936
937
|
CodeBlock,
|
|
937
938
|
CodeDiff,
|
|
939
|
+
CodeLine,
|
|
938
940
|
Combobox,
|
|
939
941
|
CommandForm,
|
|
940
942
|
CommandOutput,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -30,7 +30,7 @@ function ProfileFieldFilterEditor({
|
|
|
30
30
|
const state = filter.disabled || filter.kind === "none" ? "off" : filter.kind || "auto";
|
|
31
31
|
const effectiveKind = state === "auto" ? profileWizardModel.inferredFilterKind(field) : state;
|
|
32
32
|
const enabled = state !== "off" && effectiveKind !== "none";
|
|
33
|
-
const picksFromAList = effectiveKind
|
|
33
|
+
const picksFromAList = selectsValues(effectiveKind);
|
|
34
34
|
const supportsMultiple = picksFromAList || effectiveKind === "exact";
|
|
35
35
|
const enumerated = (((_a = filter.options) == null ? void 0 : _a.length) ?? 0) > 0;
|
|
36
36
|
const looksUp = picksFromAList && !enumerated && (filter.lookup ?? true);
|
|
@@ -187,8 +187,11 @@ function ProfileFieldFilterEditor({
|
|
|
187
187
|
] }) : null
|
|
188
188
|
] });
|
|
189
189
|
}
|
|
190
|
+
function selectsValues(kind) {
|
|
191
|
+
return kind === "terms" || kind === "match";
|
|
192
|
+
}
|
|
190
193
|
function filterForKind(filter, kind) {
|
|
191
|
-
if (kind
|
|
194
|
+
if (selectsValues(kind)) return filter;
|
|
192
195
|
if (kind === "exact") {
|
|
193
196
|
return profileWizardModel.patchColumnFilter(filter, {
|
|
194
197
|
options: void 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileFieldFilterEditor.cjs","sources":["../../../src/profiles/fields/profileFieldFilterEditor.tsx"],"sourcesContent":["import {\n UiDatabase,\n UiListChecks,\n UiListDashes,\n UiListOrdered,\n UiMagicWand,\n UiProhibit,\n} from \"../../icons\";\nimport { EditorField, inputClassName } from \"./profileFieldControls\";\nimport { profileFilterKindIcon } from \"./profileFieldIcons\";\nimport {\n inferredFilterKind,\n patchColumnFilter,\n PROFILE_FILTER_DEFAULT_LIMIT,\n PROFILE_FILTER_KIND_OPTIONS,\n PROFILE_FILTER_MAX_LIMIT,\n type Patch,\n type ProfileColumn,\n type ProfileColumnFilter,\n} from \"../wizard/profileWizardModel\";\n\ntype FilterState = \"auto\" | \"off\" | string;\n\nconst FILTER_SEGMENTS = [\n { value: \"auto\", label: \"Auto\", icon: <UiMagicWand /> },\n { value: \"off\", label: \"Off\", icon: <UiProhibit /> },\n ...PROFILE_FILTER_KIND_OPTIONS.filter(\n (option) => option.value !== \"none\",\n ).map((option) => ({\n ...option,\n icon: profileFilterKindIcon(option.value),\n })),\n] as const;\n\nexport function ProfileFieldFilterEditor({\n field,\n columns,\n onChange,\n}: {\n field: ProfileColumn;\n columns: 1 | 2;\n onChange: (patch: Patch<ProfileColumn>) => void;\n}) {\n const filter = field.filter ?? {};\n const state: FilterState =\n filter.disabled || filter.kind === \"none\" ? \"off\" : filter.kind || \"auto\";\n const effectiveKind = state === \"auto\" ? inferredFilterKind(field) : state;\n const enabled = state !== \"off\" && effectiveKind !== \"none\";\n const picksFromAList = effectiveKind === \"terms\";\n const supportsMultiple = picksFromAList || effectiveKind === \"exact\";\n const enumerated = (filter.options?.length ?? 0) > 0;\n const looksUp = picksFromAList && !enumerated && (filter.lookup ?? true);\n const wide = columns === 2 ? \"sm:col-span-2\" : \"\";\n\n const set = (patch: Patch<ProfileColumnFilter>) =>\n onChange({ filter: patchColumnFilter(field.filter, patch) });\n const selectState = (next: FilterState) => {\n if (next === \"off\") {\n set({\n disabled: true,\n kind: filter.kind === \"none\" ? undefined : filter.kind,\n });\n return;\n }\n const kind = next === \"auto\" ? inferredFilterKind(field) : next;\n const selected = patchColumnFilter(filter, {\n disabled: undefined,\n kind: next === \"auto\" ? undefined : next,\n });\n onChange({ filter: filterForKind(selected, kind) });\n };\n\n return (\n <section className={`grid gap-4 ${wide}`} aria-label=\"Filtering\">\n <div className=\"grid gap-1.5\">\n <span className=\"text-sm font-medium\">Filter type</span>\n <div\n role=\"radiogroup\"\n aria-label=\"Filter type\"\n className=\"flex flex-wrap gap-1 rounded-md border bg-muted/30 p-1\"\n >\n {FILTER_SEGMENTS.map((segment) => {\n const selected = state === segment.value;\n return (\n <label\n key={segment.value}\n title={segment.label}\n className={`flex h-9 cursor-pointer items-center gap-1.5 rounded px-2 text-xs transition-colors focus-within:ring-2 focus-within:ring-primary/30 ${\n selected\n ? \"bg-background font-medium text-foreground shadow-sm\"\n : \"text-muted-foreground hover:bg-background/70 hover:text-foreground\"\n }`}\n >\n <input\n type=\"radio\"\n name={`filter-type-${field.name}`}\n value={segment.value}\n checked={selected}\n aria-label={segment.label}\n className=\"sr-only\"\n onChange={() => selectState(segment.value)}\n />\n <span className=\"text-[15px]\">{segment.icon}</span>\n <span>{segment.label}</span>\n </label>\n );\n })}\n </div>\n <span className=\"text-xs text-muted-foreground\">\n Auto derives the control from the data type; choose a type to override it.\n </span>\n </div>\n\n {enabled ? (\n <div className={`grid gap-4 ${columns === 2 ? \"sm:grid-cols-2\" : \"\"}`}>\n <EditorField\n label=\"Backend field\"\n icon={<UiDatabase />}\n help=\"The indexed field for a document store, or the result column for SQL; blank infers it from the column.\"\n >\n <input\n aria-label=\"Backend field\"\n value={filter.field ?? \"\"}\n className={inputClassName}\n placeholder={field.source || field.name}\n onChange={(event) =>\n set({ field: event.target.value || undefined })\n }\n />\n </EditorField>\n {picksFromAList ? (\n <>\n <div className={wide}>\n <EditorField\n label=\"Values\"\n icon={<UiListDashes />}\n help=\"Comma-separated values to offer instead of asking the backend; leave blank to enumerate from the data.\"\n >\n <input\n aria-label=\"Values\"\n value={(filter.options ?? []).join(\", \")}\n className={inputClassName}\n placeholder=\"Ask the backend\"\n onChange={(event) =>\n set({ options: parseFilterOptions(event.target.value) })\n }\n />\n </EditorField>\n </div>\n <label className=\"flex items-center gap-2 text-sm font-medium\">\n <input\n type=\"checkbox\"\n checked={looksUp}\n disabled={enumerated}\n onChange={(event) => set({ lookup: event.target.checked })}\n />\n <span\n className={enumerated ? \"text-muted-foreground\" : undefined}\n >\n {enumerated\n ? \"Values are listed above\"\n : \"Look values up from the data\"}\n </span>\n </label>\n <EditorField\n label=\"Values offered\"\n icon={<UiListOrdered />}\n help={`How many distinct values the control lists before the rest have to be typed. Blank uses ${PROFILE_FILTER_DEFAULT_LIMIT}.`}\n >\n <input\n aria-label=\"Values offered\"\n type=\"number\"\n min={1}\n max={PROFILE_FILTER_MAX_LIMIT}\n value={filter.limit ?? \"\"}\n disabled={!looksUp}\n className={inputClassName}\n placeholder={String(PROFILE_FILTER_DEFAULT_LIMIT)}\n onChange={(event) =>\n set({\n limit: event.target.value\n ? Number(event.target.value)\n : undefined,\n })\n }\n />\n </EditorField>\n </>\n ) : null}\n {supportsMultiple ? (\n <label className=\"flex items-center gap-2 text-sm font-medium\">\n <input\n type=\"checkbox\"\n checked={filter.multi ?? true}\n onChange={(event) => set({ multi: event.target.checked })}\n />\n <UiListChecks className=\"text-[15px] text-muted-foreground\" />\n Allow several values at once\n </label>\n ) : null}\n </div>\n ) : null}\n </section>\n );\n}\n\nfunction filterForKind(\n filter: ProfileColumnFilter | undefined,\n kind: string,\n): ProfileColumnFilter | undefined {\n if (kind === \"terms\") return filter;\n if (kind === \"exact\") {\n return patchColumnFilter(filter, {\n options: undefined,\n lookup: undefined,\n limit: undefined,\n });\n }\n return patchColumnFilter(filter, {\n options: undefined,\n lookup: undefined,\n limit: undefined,\n multi: undefined,\n });\n}\n\nfunction parseFilterOptions(raw: string): string[] | undefined {\n const values = raw\n .split(\",\")\n .map((value) => value.trim())\n .filter(Boolean);\n return values.length ? values : undefined;\n}\n"],"names":["jsx","UiMagicWand","UiProhibit","PROFILE_FILTER_KIND_OPTIONS","profileFilterKindIcon","inferredFilterKind","patchColumnFilter","jsxs","EditorField","UiDatabase","inputClassName","Fragment","UiListDashes","UiListOrdered","PROFILE_FILTER_DEFAULT_LIMIT","PROFILE_FILTER_MAX_LIMIT","UiListChecks"],"mappings":";;;;;;;;;;;;AAuBA,MAAM,kBAAkB;AAAA,EACtB,EAAE,OAAO,QAAQ,OAAO,QAAQ,MAAMA,2BAAAA,IAACC,2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AAQ;AAAA,MAC/B,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,OAAO;AAAA,IAAA,CACR;AAAA,EACH;AACA,SAAOA,mBAAAA,kBAAkB,QAAQ;AAAA,IAC/B,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,OAAO;AAAA,EAAA,CACR;AACH;AAEA,SAAS,mBAAmB,KAAmC;AAC7D,QAAM,SAAS,IACZ,MAAM,GAAG,EACT,IAAI,CAAC,UAAU,MAAM,KAAA,CAAM,EAC3B,OAAO,OAAO;AACjB,SAAO,OAAO,SAAS,SAAS;AAClC;;"}
|
|
1
|
+
{"version":3,"file":"profileFieldFilterEditor.cjs","sources":["../../../src/profiles/fields/profileFieldFilterEditor.tsx"],"sourcesContent":["import {\n UiDatabase,\n UiListChecks,\n UiListDashes,\n UiListOrdered,\n UiMagicWand,\n UiProhibit,\n} from \"../../icons\";\nimport { EditorField, inputClassName } from \"./profileFieldControls\";\nimport { profileFilterKindIcon } from \"./profileFieldIcons\";\nimport {\n inferredFilterKind,\n patchColumnFilter,\n PROFILE_FILTER_DEFAULT_LIMIT,\n PROFILE_FILTER_KIND_OPTIONS,\n PROFILE_FILTER_MAX_LIMIT,\n type Patch,\n type ProfileColumn,\n type ProfileColumnFilter,\n} from \"../wizard/profileWizardModel\";\n\ntype FilterState = \"auto\" | \"off\" | string;\n\nconst FILTER_SEGMENTS = [\n { value: \"auto\", label: \"Auto\", icon: <UiMagicWand /> },\n { value: \"off\", label: \"Off\", icon: <UiProhibit /> },\n ...PROFILE_FILTER_KIND_OPTIONS.filter(\n (option) => option.value !== \"none\",\n ).map((option) => ({\n ...option,\n icon: profileFilterKindIcon(option.value),\n })),\n] as const;\n\nexport function ProfileFieldFilterEditor({\n field,\n columns,\n onChange,\n}: {\n field: ProfileColumn;\n columns: 1 | 2;\n onChange: (patch: Patch<ProfileColumn>) => void;\n}) {\n const filter = field.filter ?? {};\n const state: FilterState =\n filter.disabled || filter.kind === \"none\" ? \"off\" : filter.kind || \"auto\";\n const effectiveKind = state === \"auto\" ? inferredFilterKind(field) : state;\n const enabled = state !== \"off\" && effectiveKind !== \"none\";\n const picksFromAList = selectsValues(effectiveKind);\n const supportsMultiple = picksFromAList || effectiveKind === \"exact\";\n const enumerated = (filter.options?.length ?? 0) > 0;\n const looksUp = picksFromAList && !enumerated && (filter.lookup ?? true);\n const wide = columns === 2 ? \"sm:col-span-2\" : \"\";\n\n const set = (patch: Patch<ProfileColumnFilter>) =>\n onChange({ filter: patchColumnFilter(field.filter, patch) });\n const selectState = (next: FilterState) => {\n if (next === \"off\") {\n set({\n disabled: true,\n kind: filter.kind === \"none\" ? undefined : filter.kind,\n });\n return;\n }\n const kind = next === \"auto\" ? inferredFilterKind(field) : next;\n const selected = patchColumnFilter(filter, {\n disabled: undefined,\n kind: next === \"auto\" ? undefined : next,\n });\n onChange({ filter: filterForKind(selected, kind) });\n };\n\n return (\n <section className={`grid gap-4 ${wide}`} aria-label=\"Filtering\">\n <div className=\"grid gap-1.5\">\n <span className=\"text-sm font-medium\">Filter type</span>\n <div\n role=\"radiogroup\"\n aria-label=\"Filter type\"\n className=\"flex flex-wrap gap-1 rounded-md border bg-muted/30 p-1\"\n >\n {FILTER_SEGMENTS.map((segment) => {\n const selected = state === segment.value;\n return (\n <label\n key={segment.value}\n title={segment.label}\n className={`flex h-9 cursor-pointer items-center gap-1.5 rounded px-2 text-xs transition-colors focus-within:ring-2 focus-within:ring-primary/30 ${\n selected\n ? \"bg-background font-medium text-foreground shadow-sm\"\n : \"text-muted-foreground hover:bg-background/70 hover:text-foreground\"\n }`}\n >\n <input\n type=\"radio\"\n name={`filter-type-${field.name}`}\n value={segment.value}\n checked={selected}\n aria-label={segment.label}\n className=\"sr-only\"\n onChange={() => selectState(segment.value)}\n />\n <span className=\"text-[15px]\">{segment.icon}</span>\n <span>{segment.label}</span>\n </label>\n );\n })}\n </div>\n <span className=\"text-xs text-muted-foreground\">\n Auto derives the control from the data type; choose a type to override it.\n </span>\n </div>\n\n {enabled ? (\n <div className={`grid gap-4 ${columns === 2 ? \"sm:grid-cols-2\" : \"\"}`}>\n <EditorField\n label=\"Backend field\"\n icon={<UiDatabase />}\n help=\"The indexed field for a document store, or the result column for SQL; blank infers it from the column.\"\n >\n <input\n aria-label=\"Backend field\"\n value={filter.field ?? \"\"}\n className={inputClassName}\n placeholder={field.source || field.name}\n onChange={(event) =>\n set({ field: event.target.value || undefined })\n }\n />\n </EditorField>\n {picksFromAList ? (\n <>\n <div className={wide}>\n <EditorField\n label=\"Values\"\n icon={<UiListDashes />}\n help=\"Comma-separated values to offer instead of asking the backend; leave blank to enumerate from the data.\"\n >\n <input\n aria-label=\"Values\"\n value={(filter.options ?? []).join(\", \")}\n className={inputClassName}\n placeholder=\"Ask the backend\"\n onChange={(event) =>\n set({ options: parseFilterOptions(event.target.value) })\n }\n />\n </EditorField>\n </div>\n <label className=\"flex items-center gap-2 text-sm font-medium\">\n <input\n type=\"checkbox\"\n checked={looksUp}\n disabled={enumerated}\n onChange={(event) => set({ lookup: event.target.checked })}\n />\n <span\n className={enumerated ? \"text-muted-foreground\" : undefined}\n >\n {enumerated\n ? \"Values are listed above\"\n : \"Look values up from the data\"}\n </span>\n </label>\n <EditorField\n label=\"Values offered\"\n icon={<UiListOrdered />}\n help={`How many distinct values the control lists before the rest have to be typed. Blank uses ${PROFILE_FILTER_DEFAULT_LIMIT}.`}\n >\n <input\n aria-label=\"Values offered\"\n type=\"number\"\n min={1}\n max={PROFILE_FILTER_MAX_LIMIT}\n value={filter.limit ?? \"\"}\n disabled={!looksUp}\n className={inputClassName}\n placeholder={String(PROFILE_FILTER_DEFAULT_LIMIT)}\n onChange={(event) =>\n set({\n limit: event.target.value\n ? Number(event.target.value)\n : undefined,\n })\n }\n />\n </EditorField>\n </>\n ) : null}\n {supportsMultiple ? (\n <label className=\"flex items-center gap-2 text-sm font-medium\">\n <input\n type=\"checkbox\"\n checked={filter.multi ?? true}\n onChange={(event) => set({ multi: event.target.checked })}\n />\n <UiListChecks className=\"text-[15px] text-muted-foreground\" />\n Allow several values at once\n </label>\n ) : null}\n </div>\n ) : null}\n </section>\n );\n}\n\n/** Whether kind picks values from a list — values, or the patterns a value\n * matches — and so takes options, a lookup and several values at once.\n * Mirrors query.ColumnFilterKind.selectsValues. */\nfunction selectsValues(kind: string): boolean {\n return kind === \"terms\" || kind === \"match\";\n}\n\nfunction filterForKind(\n filter: ProfileColumnFilter | undefined,\n kind: string,\n): ProfileColumnFilter | undefined {\n if (selectsValues(kind)) return filter;\n if (kind === \"exact\") {\n return patchColumnFilter(filter, {\n options: undefined,\n lookup: undefined,\n limit: undefined,\n });\n }\n return patchColumnFilter(filter, {\n options: undefined,\n lookup: undefined,\n limit: undefined,\n multi: undefined,\n });\n}\n\nfunction parseFilterOptions(raw: string): string[] | undefined {\n const values = raw\n .split(\",\")\n .map((value) => value.trim())\n .filter(Boolean);\n return values.length ? values : undefined;\n}\n"],"names":["jsx","UiMagicWand","UiProhibit","PROFILE_FILTER_KIND_OPTIONS","profileFilterKindIcon","inferredFilterKind","patchColumnFilter","jsxs","EditorField","UiDatabase","inputClassName","Fragment","UiListDashes","UiListOrdered","PROFILE_FILTER_DEFAULT_LIMIT","PROFILE_FILTER_MAX_LIMIT","UiListChecks"],"mappings":";;;;;;;;;;;;AAuBA,MAAM,kBAAkB;AAAA,EACtB,EAAE,OAAO,QAAQ,OAAO,QAAQ,MAAMA,2BAAAA,IAACC,2BAAY,EAAA;AAAA,EACnD,EAAE,OAAO,OAAO,OAAO,OAAO,MAAMD,2BAAAA,IAACE,yBAAW,EAAA;AAAA,EAChD,GAAGC,mBAAAA,4BAA4B;AAAA,IAC7B,CAAC,WAAW,OAAO,UAAU;AAAA,EAAA,EAC7B,IAAI,CAAC,YAAY;AAAA,IACjB,GAAG;AAAA,IACH,MAAMC,kBAAAA,sBAAsB,OAAO,KAAK;AAAA,EAAA,EACxC;AACJ;AAEO,SAAS,yBAAyB;AAAA,EACvC;AAAA,EACA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AS,IACZ,MAAM,GAAG,EACT,IAAI,CAAC,UAAU,MAAM,KAAA,CAAM,EAC3B,OAAO,OAAO;AACjB,SAAO,OAAO,SAAS,SAAS;AAClC;;"}
|
|
@@ -28,7 +28,7 @@ function ProfileFieldFilterEditor({
|
|
|
28
28
|
const state = filter.disabled || filter.kind === "none" ? "off" : filter.kind || "auto";
|
|
29
29
|
const effectiveKind = state === "auto" ? inferredFilterKind(field) : state;
|
|
30
30
|
const enabled = state !== "off" && effectiveKind !== "none";
|
|
31
|
-
const picksFromAList = effectiveKind
|
|
31
|
+
const picksFromAList = selectsValues(effectiveKind);
|
|
32
32
|
const supportsMultiple = picksFromAList || effectiveKind === "exact";
|
|
33
33
|
const enumerated = (((_a = filter.options) == null ? void 0 : _a.length) ?? 0) > 0;
|
|
34
34
|
const looksUp = picksFromAList && !enumerated && (filter.lookup ?? true);
|
|
@@ -185,8 +185,11 @@ function ProfileFieldFilterEditor({
|
|
|
185
185
|
] }) : null
|
|
186
186
|
] });
|
|
187
187
|
}
|
|
188
|
+
function selectsValues(kind) {
|
|
189
|
+
return kind === "terms" || kind === "match";
|
|
190
|
+
}
|
|
188
191
|
function filterForKind(filter, kind) {
|
|
189
|
-
if (kind
|
|
192
|
+
if (selectsValues(kind)) return filter;
|
|
190
193
|
if (kind === "exact") {
|
|
191
194
|
return patchColumnFilter(filter, {
|
|
192
195
|
options: void 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileFieldFilterEditor.js","sources":["../../../src/profiles/fields/profileFieldFilterEditor.tsx"],"sourcesContent":["import {\n UiDatabase,\n UiListChecks,\n UiListDashes,\n UiListOrdered,\n UiMagicWand,\n UiProhibit,\n} from \"../../icons\";\nimport { EditorField, inputClassName } from \"./profileFieldControls\";\nimport { profileFilterKindIcon } from \"./profileFieldIcons\";\nimport {\n inferredFilterKind,\n patchColumnFilter,\n PROFILE_FILTER_DEFAULT_LIMIT,\n PROFILE_FILTER_KIND_OPTIONS,\n PROFILE_FILTER_MAX_LIMIT,\n type Patch,\n type ProfileColumn,\n type ProfileColumnFilter,\n} from \"../wizard/profileWizardModel\";\n\ntype FilterState = \"auto\" | \"off\" | string;\n\nconst FILTER_SEGMENTS = [\n { value: \"auto\", label: \"Auto\", icon: <UiMagicWand /> },\n { value: \"off\", label: \"Off\", icon: <UiProhibit /> },\n ...PROFILE_FILTER_KIND_OPTIONS.filter(\n (option) => option.value !== \"none\",\n ).map((option) => ({\n ...option,\n icon: profileFilterKindIcon(option.value),\n })),\n] as const;\n\nexport function ProfileFieldFilterEditor({\n field,\n columns,\n onChange,\n}: {\n field: ProfileColumn;\n columns: 1 | 2;\n onChange: (patch: Patch<ProfileColumn>) => void;\n}) {\n const filter = field.filter ?? {};\n const state: FilterState =\n filter.disabled || filter.kind === \"none\" ? \"off\" : filter.kind || \"auto\";\n const effectiveKind = state === \"auto\" ? inferredFilterKind(field) : state;\n const enabled = state !== \"off\" && effectiveKind !== \"none\";\n const picksFromAList = effectiveKind === \"terms\";\n const supportsMultiple = picksFromAList || effectiveKind === \"exact\";\n const enumerated = (filter.options?.length ?? 0) > 0;\n const looksUp = picksFromAList && !enumerated && (filter.lookup ?? true);\n const wide = columns === 2 ? \"sm:col-span-2\" : \"\";\n\n const set = (patch: Patch<ProfileColumnFilter>) =>\n onChange({ filter: patchColumnFilter(field.filter, patch) });\n const selectState = (next: FilterState) => {\n if (next === \"off\") {\n set({\n disabled: true,\n kind: filter.kind === \"none\" ? undefined : filter.kind,\n });\n return;\n }\n const kind = next === \"auto\" ? inferredFilterKind(field) : next;\n const selected = patchColumnFilter(filter, {\n disabled: undefined,\n kind: next === \"auto\" ? undefined : next,\n });\n onChange({ filter: filterForKind(selected, kind) });\n };\n\n return (\n <section className={`grid gap-4 ${wide}`} aria-label=\"Filtering\">\n <div className=\"grid gap-1.5\">\n <span className=\"text-sm font-medium\">Filter type</span>\n <div\n role=\"radiogroup\"\n aria-label=\"Filter type\"\n className=\"flex flex-wrap gap-1 rounded-md border bg-muted/30 p-1\"\n >\n {FILTER_SEGMENTS.map((segment) => {\n const selected = state === segment.value;\n return (\n <label\n key={segment.value}\n title={segment.label}\n className={`flex h-9 cursor-pointer items-center gap-1.5 rounded px-2 text-xs transition-colors focus-within:ring-2 focus-within:ring-primary/30 ${\n selected\n ? \"bg-background font-medium text-foreground shadow-sm\"\n : \"text-muted-foreground hover:bg-background/70 hover:text-foreground\"\n }`}\n >\n <input\n type=\"radio\"\n name={`filter-type-${field.name}`}\n value={segment.value}\n checked={selected}\n aria-label={segment.label}\n className=\"sr-only\"\n onChange={() => selectState(segment.value)}\n />\n <span className=\"text-[15px]\">{segment.icon}</span>\n <span>{segment.label}</span>\n </label>\n );\n })}\n </div>\n <span className=\"text-xs text-muted-foreground\">\n Auto derives the control from the data type; choose a type to override it.\n </span>\n </div>\n\n {enabled ? (\n <div className={`grid gap-4 ${columns === 2 ? \"sm:grid-cols-2\" : \"\"}`}>\n <EditorField\n label=\"Backend field\"\n icon={<UiDatabase />}\n help=\"The indexed field for a document store, or the result column for SQL; blank infers it from the column.\"\n >\n <input\n aria-label=\"Backend field\"\n value={filter.field ?? \"\"}\n className={inputClassName}\n placeholder={field.source || field.name}\n onChange={(event) =>\n set({ field: event.target.value || undefined })\n }\n />\n </EditorField>\n {picksFromAList ? (\n <>\n <div className={wide}>\n <EditorField\n label=\"Values\"\n icon={<UiListDashes />}\n help=\"Comma-separated values to offer instead of asking the backend; leave blank to enumerate from the data.\"\n >\n <input\n aria-label=\"Values\"\n value={(filter.options ?? []).join(\", \")}\n className={inputClassName}\n placeholder=\"Ask the backend\"\n onChange={(event) =>\n set({ options: parseFilterOptions(event.target.value) })\n }\n />\n </EditorField>\n </div>\n <label className=\"flex items-center gap-2 text-sm font-medium\">\n <input\n type=\"checkbox\"\n checked={looksUp}\n disabled={enumerated}\n onChange={(event) => set({ lookup: event.target.checked })}\n />\n <span\n className={enumerated ? \"text-muted-foreground\" : undefined}\n >\n {enumerated\n ? \"Values are listed above\"\n : \"Look values up from the data\"}\n </span>\n </label>\n <EditorField\n label=\"Values offered\"\n icon={<UiListOrdered />}\n help={`How many distinct values the control lists before the rest have to be typed. Blank uses ${PROFILE_FILTER_DEFAULT_LIMIT}.`}\n >\n <input\n aria-label=\"Values offered\"\n type=\"number\"\n min={1}\n max={PROFILE_FILTER_MAX_LIMIT}\n value={filter.limit ?? \"\"}\n disabled={!looksUp}\n className={inputClassName}\n placeholder={String(PROFILE_FILTER_DEFAULT_LIMIT)}\n onChange={(event) =>\n set({\n limit: event.target.value\n ? Number(event.target.value)\n : undefined,\n })\n }\n />\n </EditorField>\n </>\n ) : null}\n {supportsMultiple ? (\n <label className=\"flex items-center gap-2 text-sm font-medium\">\n <input\n type=\"checkbox\"\n checked={filter.multi ?? true}\n onChange={(event) => set({ multi: event.target.checked })}\n />\n <UiListChecks className=\"text-[15px] text-muted-foreground\" />\n Allow several values at once\n </label>\n ) : null}\n </div>\n ) : null}\n </section>\n );\n}\n\nfunction filterForKind(\n filter: ProfileColumnFilter | undefined,\n kind: string,\n): ProfileColumnFilter | undefined {\n if (kind === \"terms\") return filter;\n if (kind === \"exact\") {\n return patchColumnFilter(filter, {\n options: undefined,\n lookup: undefined,\n limit: undefined,\n });\n }\n return patchColumnFilter(filter, {\n options: undefined,\n lookup: undefined,\n limit: undefined,\n multi: undefined,\n });\n}\n\nfunction parseFilterOptions(raw: string): string[] | undefined {\n const values = raw\n .split(\",\")\n .map((value) => value.trim())\n .filter(Boolean);\n return values.length ? values : undefined;\n}\n"],"names":[],"mappings":";;;;;;;;;;AAuBA,MAAM,kBAAkB;AAAA,EACtB,EAAE,OAAO,QAAQ,OAAO,QAAQ,MAAM,oBAAC,eAAY,EAAA;AAAA,EACnD,EAAE,OAAO,OAAO,OAAO,OAAO,MAAM,oBAAC,cAAW,EAAA;AAAA,EAChD,GAAG,4BAA4B;AAAA,IAC7B,CAAC,WAAW,OAAO,UAAU;AAAA,EAAA,EAC7B,IAAI,CAAC,YAAY;AAAA,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ACF,OAAO,MAAM,OAAO,QAChB,OAAO,MAAM,OAAO,KAAK,IACzB;AAAA,gBAAA,CACL;AAAA,cAAA;AAAA,YAAA;AAAA,UAEL;AAAA,QAAA;AAAA,MACF,EAAA,CACF,IACE;AAAA,MACH,mBACC,qBAAC,SAAA,EAAM,WAAU,+CACf,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,SAAS,OAAO,SAAS;AAAA,YACzB,UAAU,CAAC,UAAU,IAAI,EAAE,OAAO,MAAM,OAAO,QAAA,CAAS;AAAA,UAAA;AAAA,QAAA;AAAA,QAE1D,oBAAC,cAAA,EAAa,WAAU,oCAAA,CAAoC;AAAA,QAAE;AAAA,MAAA,EAAA,CAEhE,IACE;AAAA,IAAA,EAAA,CACN,IACE;AAAA,EAAA,GACN;AAEJ;AAEA,SAAS,cACP,QACA,MACiC;AACjC,MAAI,SAAS,QAAS,QAAO;AAC7B,MAAI,SAAS,SAAS;AACpB,WAAO,kBAAkB,QAAQ;AAAA,MAC/B,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,OAAO;AAAA,IAAA,CACR;AAAA,EACH;AACA,SAAO,kBAAkB,QAAQ;AAAA,IAC/B,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,OAAO;AAAA,EAAA,CACR;AACH;AAEA,SAAS,mBAAmB,KAAmC;AAC7D,QAAM,SAAS,IACZ,MAAM,GAAG,EACT,IAAI,CAAC,UAAU,MAAM,KAAA,CAAM,EAC3B,OAAO,OAAO;AACjB,SAAO,OAAO,SAAS,SAAS;AAClC;"}
|
|
1
|
+
{"version":3,"file":"profileFieldFilterEditor.js","sources":["../../../src/profiles/fields/profileFieldFilterEditor.tsx"],"sourcesContent":["import {\n UiDatabase,\n UiListChecks,\n UiListDashes,\n UiListOrdered,\n UiMagicWand,\n UiProhibit,\n} from \"../../icons\";\nimport { EditorField, inputClassName } from \"./profileFieldControls\";\nimport { profileFilterKindIcon } from \"./profileFieldIcons\";\nimport {\n inferredFilterKind,\n patchColumnFilter,\n PROFILE_FILTER_DEFAULT_LIMIT,\n PROFILE_FILTER_KIND_OPTIONS,\n PROFILE_FILTER_MAX_LIMIT,\n type Patch,\n type ProfileColumn,\n type ProfileColumnFilter,\n} from \"../wizard/profileWizardModel\";\n\ntype FilterState = \"auto\" | \"off\" | string;\n\nconst FILTER_SEGMENTS = [\n { value: \"auto\", label: \"Auto\", icon: <UiMagicWand /> },\n { value: \"off\", label: \"Off\", icon: <UiProhibit /> },\n ...PROFILE_FILTER_KIND_OPTIONS.filter(\n (option) => option.value !== \"none\",\n ).map((option) => ({\n ...option,\n icon: profileFilterKindIcon(option.value),\n })),\n] as const;\n\nexport function ProfileFieldFilterEditor({\n field,\n columns,\n onChange,\n}: {\n field: ProfileColumn;\n columns: 1 | 2;\n onChange: (patch: Patch<ProfileColumn>) => void;\n}) {\n const filter = field.filter ?? {};\n const state: FilterState =\n filter.disabled || filter.kind === \"none\" ? \"off\" : filter.kind || \"auto\";\n const effectiveKind = state === \"auto\" ? inferredFilterKind(field) : state;\n const enabled = state !== \"off\" && effectiveKind !== \"none\";\n const picksFromAList = selectsValues(effectiveKind);\n const supportsMultiple = picksFromAList || effectiveKind === \"exact\";\n const enumerated = (filter.options?.length ?? 0) > 0;\n const looksUp = picksFromAList && !enumerated && (filter.lookup ?? true);\n const wide = columns === 2 ? \"sm:col-span-2\" : \"\";\n\n const set = (patch: Patch<ProfileColumnFilter>) =>\n onChange({ filter: patchColumnFilter(field.filter, patch) });\n const selectState = (next: FilterState) => {\n if (next === \"off\") {\n set({\n disabled: true,\n kind: filter.kind === \"none\" ? undefined : filter.kind,\n });\n return;\n }\n const kind = next === \"auto\" ? inferredFilterKind(field) : next;\n const selected = patchColumnFilter(filter, {\n disabled: undefined,\n kind: next === \"auto\" ? undefined : next,\n });\n onChange({ filter: filterForKind(selected, kind) });\n };\n\n return (\n <section className={`grid gap-4 ${wide}`} aria-label=\"Filtering\">\n <div className=\"grid gap-1.5\">\n <span className=\"text-sm font-medium\">Filter type</span>\n <div\n role=\"radiogroup\"\n aria-label=\"Filter type\"\n className=\"flex flex-wrap gap-1 rounded-md border bg-muted/30 p-1\"\n >\n {FILTER_SEGMENTS.map((segment) => {\n const selected = state === segment.value;\n return (\n <label\n key={segment.value}\n title={segment.label}\n className={`flex h-9 cursor-pointer items-center gap-1.5 rounded px-2 text-xs transition-colors focus-within:ring-2 focus-within:ring-primary/30 ${\n selected\n ? \"bg-background font-medium text-foreground shadow-sm\"\n : \"text-muted-foreground hover:bg-background/70 hover:text-foreground\"\n }`}\n >\n <input\n type=\"radio\"\n name={`filter-type-${field.name}`}\n value={segment.value}\n checked={selected}\n aria-label={segment.label}\n className=\"sr-only\"\n onChange={() => selectState(segment.value)}\n />\n <span className=\"text-[15px]\">{segment.icon}</span>\n <span>{segment.label}</span>\n </label>\n );\n })}\n </div>\n <span className=\"text-xs text-muted-foreground\">\n Auto derives the control from the data type; choose a type to override it.\n </span>\n </div>\n\n {enabled ? (\n <div className={`grid gap-4 ${columns === 2 ? \"sm:grid-cols-2\" : \"\"}`}>\n <EditorField\n label=\"Backend field\"\n icon={<UiDatabase />}\n help=\"The indexed field for a document store, or the result column for SQL; blank infers it from the column.\"\n >\n <input\n aria-label=\"Backend field\"\n value={filter.field ?? \"\"}\n className={inputClassName}\n placeholder={field.source || field.name}\n onChange={(event) =>\n set({ field: event.target.value || undefined })\n }\n />\n </EditorField>\n {picksFromAList ? (\n <>\n <div className={wide}>\n <EditorField\n label=\"Values\"\n icon={<UiListDashes />}\n help=\"Comma-separated values to offer instead of asking the backend; leave blank to enumerate from the data.\"\n >\n <input\n aria-label=\"Values\"\n value={(filter.options ?? []).join(\", \")}\n className={inputClassName}\n placeholder=\"Ask the backend\"\n onChange={(event) =>\n set({ options: parseFilterOptions(event.target.value) })\n }\n />\n </EditorField>\n </div>\n <label className=\"flex items-center gap-2 text-sm font-medium\">\n <input\n type=\"checkbox\"\n checked={looksUp}\n disabled={enumerated}\n onChange={(event) => set({ lookup: event.target.checked })}\n />\n <span\n className={enumerated ? \"text-muted-foreground\" : undefined}\n >\n {enumerated\n ? \"Values are listed above\"\n : \"Look values up from the data\"}\n </span>\n </label>\n <EditorField\n label=\"Values offered\"\n icon={<UiListOrdered />}\n help={`How many distinct values the control lists before the rest have to be typed. Blank uses ${PROFILE_FILTER_DEFAULT_LIMIT}.`}\n >\n <input\n aria-label=\"Values offered\"\n type=\"number\"\n min={1}\n max={PROFILE_FILTER_MAX_LIMIT}\n value={filter.limit ?? \"\"}\n disabled={!looksUp}\n className={inputClassName}\n placeholder={String(PROFILE_FILTER_DEFAULT_LIMIT)}\n onChange={(event) =>\n set({\n limit: event.target.value\n ? Number(event.target.value)\n : undefined,\n })\n }\n />\n </EditorField>\n </>\n ) : null}\n {supportsMultiple ? (\n <label className=\"flex items-center gap-2 text-sm font-medium\">\n <input\n type=\"checkbox\"\n checked={filter.multi ?? true}\n onChange={(event) => set({ multi: event.target.checked })}\n />\n <UiListChecks className=\"text-[15px] text-muted-foreground\" />\n Allow several values at once\n </label>\n ) : null}\n </div>\n ) : null}\n </section>\n );\n}\n\n/** Whether kind picks values from a list — values, or the patterns a value\n * matches — and so takes options, a lookup and several values at once.\n * Mirrors query.ColumnFilterKind.selectsValues. */\nfunction selectsValues(kind: string): boolean {\n return kind === \"terms\" || kind === \"match\";\n}\n\nfunction filterForKind(\n filter: ProfileColumnFilter | undefined,\n kind: string,\n): ProfileColumnFilter | undefined {\n if (selectsValues(kind)) return filter;\n if (kind === \"exact\") {\n return patchColumnFilter(filter, {\n options: undefined,\n lookup: undefined,\n limit: undefined,\n });\n }\n return patchColumnFilter(filter, {\n options: undefined,\n lookup: undefined,\n limit: undefined,\n multi: undefined,\n });\n}\n\nfunction parseFilterOptions(raw: string): string[] | undefined {\n const values = raw\n .split(\",\")\n .map((value) => value.trim())\n .filter(Boolean);\n return values.length ? values : undefined;\n}\n"],"names":[],"mappings":";;;;;;;;;;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AAM,GAAG,EACT,IAAI,CAAC,UAAU,MAAM,KAAA,CAAM,EAC3B,OAAO,OAAO;AACjB,SAAO,OAAO,SAAS,SAAS;AAClC;"}
|
|
@@ -23,6 +23,7 @@ const UiListChecks = require("../../icons/components/UiListChecks.cjs");
|
|
|
23
23
|
const UiProhibit = require("../../icons/components/UiProhibit.cjs");
|
|
24
24
|
const UiSliders = require("../../icons/components/UiSliders.cjs");
|
|
25
25
|
const UiFingerprint = require("../../icons/components/UiFingerprint.cjs");
|
|
26
|
+
const UiAsterisk = require("../../icons/components/UiAsterisk.cjs");
|
|
26
27
|
const TYPE_ICONS = {
|
|
27
28
|
string: /* @__PURE__ */ jsxRuntime.jsx(UiCursorText.UiCursorText, {}),
|
|
28
29
|
number: /* @__PURE__ */ jsxRuntime.jsx(UiSigma.UiSigma, {}),
|
|
@@ -38,6 +39,7 @@ const TYPE_ICONS = {
|
|
|
38
39
|
};
|
|
39
40
|
const FILTER_KIND_ICONS = {
|
|
40
41
|
terms: /* @__PURE__ */ jsxRuntime.jsx(UiListChecks.UiListChecks, {}),
|
|
42
|
+
match: /* @__PURE__ */ jsxRuntime.jsx(UiAsterisk.UiAsterisk, {}),
|
|
41
43
|
exact: /* @__PURE__ */ jsxRuntime.jsx(UiFingerprint.UiFingerprint, {}),
|
|
42
44
|
range: /* @__PURE__ */ jsxRuntime.jsx(UiSliders.UiSliders, {}),
|
|
43
45
|
duration: /* @__PURE__ */ jsxRuntime.jsx(UiTimer.UiTimer, {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileFieldIcons.cjs","sources":["../../../src/profiles/fields/profileFieldIcons.tsx"],"sourcesContent":["/**\n * The glyphs a profile column's enums render with, and the Combobox options\n * built from them.\n *\n * The params editor gets these from the schema (`x-enum-icons`); the column\n * editor is hand-rolled, so its vocabulary lives here instead — one place both\n * the grid and the inspector read, rather than an icon picked twice.\n */\n\nimport type { ReactNode } from \"react\";\nimport type { ComboboxOption } from \"../../components/combobox-types\";\n// Monochrome UI glyphs only: the symbol icons (UiString, UiJson, UiField, …)\n// carry hardcoded IDE colours, which read as stray dots beside a form label.\nimport {\n UiActivity,\n UiBraces,\n UiCalendar,\n UiChartPie,\n UiClock,\n UiColumns,\n UiCurrencyDollar,\n UiCursorText,\n UiFingerprint,\n UiHardDrive,\n UiListChecks,\n UiListDashes,\n UiProhibit,\n UiPulse,\n UiShieldCheck,\n UiSigma,\n UiSliders,\n UiTag,\n UiTimer,\n UiToggleOn,\n} from \"../../icons\";\nimport { PROFILE_FIELD_TYPES } from \"./profileFieldTypes\";\nimport {\n PROFILE_COLUMN_FORMAT_OPTIONS,\n PROFILE_COLUMN_UNIT_OPTIONS,\n PROFILE_FILTER_KIND_OPTIONS,\n} from \"../wizard/profileWizardModel\";\n\nconst TYPE_ICONS: Record<string, ReactNode> = {\n string: <UiCursorText />,\n number: <UiSigma />,\n boolean: <UiToggleOn />,\n datetime: <UiCalendar />,\n duration: <UiTimer />,\n bytes: <UiHardDrive />,\n status: <UiPulse />,\n health: <UiShieldCheck />,\n key_value: <UiTag />,\n key_values: <UiListDashes />,\n json: <UiBraces />,\n};\n\n// A filter borrows the glyph of the type that infers it — duration from\n// UiTimer, date from UiCalendar — so the Type and the control it implies read\n// as one thing. Time keeps the clock, which is what makes the date/date-and-\n// time split legible at a glance.\nconst FILTER_KIND_ICONS: Record<string, ReactNode> = {\n terms: <UiListChecks />,\n exact: <UiFingerprint />,\n range: <UiSliders />,\n duration: <UiTimer />,\n date: <UiCalendar />,\n time: <UiClock />,\n boolean: <UiToggleOn />,\n text: <UiCursorText />,\n none: <UiProhibit />,\n};\n\nconst ROLE_ICONS: Record<string, ReactNode> = {\n timestamp: <UiClock />,\n tags: <UiTag />,\n status: <UiPulse />,\n};\n\nconst FORMAT_ICONS: Record<string, ReactNode> = {\n date: <UiCalendar />,\n float: <UiSigma />,\n duration: <UiTimer />,\n bytes: <UiHardDrive />,\n currency: <UiCurrencyDollar />,\n};\n\nconst UNIT_ICONS: Record<string, ReactNode> = {\n none: <UiSigma />,\n short: <UiSigma />,\n percent: <UiChartPie />,\n percentunit: <UiChartPie />,\n bytes: <UiHardDrive />,\n decbytes: <UiHardDrive />,\n Bps: <UiActivity />,\n binBps: <UiActivity />,\n ms: <UiTimer />,\n s: <UiTimer />,\n};\n\nexport function profileTypeIcon(type?: string): ReactNode {\n return (type && TYPE_ICONS[type]) ?? <UiColumns />;\n}\n\nexport function profileFilterKindIcon(kind: string): ReactNode {\n return FILTER_KIND_ICONS[kind] ?? <UiListChecks />;\n}\n\nexport const profileTypeOptions: ComboboxOption[] = PROFILE_FIELD_TYPES.map((type) => ({\n value: type,\n label: type,\n icon: TYPE_ICONS[type],\n}));\n\nexport const profileRoleOptions: ComboboxOption[] = [\n { value: \"timestamp\", label: \"Timestamp\", icon: ROLE_ICONS[\"timestamp\"] },\n { value: \"tags\", label: \"Tags\", icon: ROLE_ICONS[\"tags\"] },\n { value: \"status\", label: \"Status\", icon: ROLE_ICONS[\"status\"] },\n];\n\nexport const profileFormatOptions: ComboboxOption[] = PROFILE_COLUMN_FORMAT_OPTIONS.map(\n (option) => ({ ...option, icon: FORMAT_ICONS[option.value] }),\n);\n\nexport const profileUnitOptions: ComboboxOption[] = PROFILE_COLUMN_UNIT_OPTIONS.map(\n (option) => ({ ...option, icon: UNIT_ICONS[option.value] }),\n);\n\nexport const profileFilterKindOptions: ComboboxOption[] = PROFILE_FILTER_KIND_OPTIONS.map(\n (option) => ({ ...option, icon: FILTER_KIND_ICONS[option.value] }),\n);\n"],"names":["UiCursorText","UiSigma","UiToggleOn","UiCalendar","UiTimer","UiHardDrive","UiPulse","UiShieldCheck","UiTag","UiListDashes","UiBraces","UiListChecks","UiFingerprint","UiSliders","UiClock","UiProhibit","UiCurrencyDollar","UiChartPie","UiActivity","UiColumns","jsx","PROFILE_FIELD_TYPES","PROFILE_COLUMN_FORMAT_OPTIONS","PROFILE_COLUMN_UNIT_OPTIONS","PROFILE_FILTER_KIND_OPTIONS"],"mappings":"
|
|
1
|
+
{"version":3,"file":"profileFieldIcons.cjs","sources":["../../../src/profiles/fields/profileFieldIcons.tsx"],"sourcesContent":["/**\n * The glyphs a profile column's enums render with, and the Combobox options\n * built from them.\n *\n * The params editor gets these from the schema (`x-enum-icons`); the column\n * editor is hand-rolled, so its vocabulary lives here instead — one place both\n * the grid and the inspector read, rather than an icon picked twice.\n */\n\nimport type { ReactNode } from \"react\";\nimport type { ComboboxOption } from \"../../components/combobox-types\";\n// Monochrome UI glyphs only: the symbol icons (UiString, UiJson, UiField, …)\n// carry hardcoded IDE colours, which read as stray dots beside a form label.\nimport {\n UiActivity,\n UiAsterisk,\n UiBraces,\n UiCalendar,\n UiChartPie,\n UiClock,\n UiColumns,\n UiCurrencyDollar,\n UiCursorText,\n UiFingerprint,\n UiHardDrive,\n UiListChecks,\n UiListDashes,\n UiProhibit,\n UiPulse,\n UiShieldCheck,\n UiSigma,\n UiSliders,\n UiTag,\n UiTimer,\n UiToggleOn,\n} from \"../../icons\";\nimport { PROFILE_FIELD_TYPES } from \"./profileFieldTypes\";\nimport {\n PROFILE_COLUMN_FORMAT_OPTIONS,\n PROFILE_COLUMN_UNIT_OPTIONS,\n PROFILE_FILTER_KIND_OPTIONS,\n} from \"../wizard/profileWizardModel\";\n\nconst TYPE_ICONS: Record<string, ReactNode> = {\n string: <UiCursorText />,\n number: <UiSigma />,\n boolean: <UiToggleOn />,\n datetime: <UiCalendar />,\n duration: <UiTimer />,\n bytes: <UiHardDrive />,\n status: <UiPulse />,\n health: <UiShieldCheck />,\n key_value: <UiTag />,\n key_values: <UiListDashes />,\n json: <UiBraces />,\n};\n\n// A filter borrows the glyph of the type that infers it — duration from\n// UiTimer, date from UiCalendar — so the Type and the control it implies read\n// as one thing. Time keeps the clock, which is what makes the date/date-and-\n// time split legible at a glance.\nconst FILTER_KIND_ICONS: Record<string, ReactNode> = {\n terms: <UiListChecks />,\n match: <UiAsterisk />,\n exact: <UiFingerprint />,\n range: <UiSliders />,\n duration: <UiTimer />,\n date: <UiCalendar />,\n time: <UiClock />,\n boolean: <UiToggleOn />,\n text: <UiCursorText />,\n none: <UiProhibit />,\n};\n\nconst ROLE_ICONS: Record<string, ReactNode> = {\n timestamp: <UiClock />,\n tags: <UiTag />,\n status: <UiPulse />,\n};\n\nconst FORMAT_ICONS: Record<string, ReactNode> = {\n date: <UiCalendar />,\n float: <UiSigma />,\n duration: <UiTimer />,\n bytes: <UiHardDrive />,\n currency: <UiCurrencyDollar />,\n};\n\nconst UNIT_ICONS: Record<string, ReactNode> = {\n none: <UiSigma />,\n short: <UiSigma />,\n percent: <UiChartPie />,\n percentunit: <UiChartPie />,\n bytes: <UiHardDrive />,\n decbytes: <UiHardDrive />,\n Bps: <UiActivity />,\n binBps: <UiActivity />,\n ms: <UiTimer />,\n s: <UiTimer />,\n};\n\nexport function profileTypeIcon(type?: string): ReactNode {\n return (type && TYPE_ICONS[type]) ?? <UiColumns />;\n}\n\nexport function profileFilterKindIcon(kind: string): ReactNode {\n return FILTER_KIND_ICONS[kind] ?? <UiListChecks />;\n}\n\nexport const profileTypeOptions: ComboboxOption[] = PROFILE_FIELD_TYPES.map((type) => ({\n value: type,\n label: type,\n icon: TYPE_ICONS[type],\n}));\n\nexport const profileRoleOptions: ComboboxOption[] = [\n { value: \"timestamp\", label: \"Timestamp\", icon: ROLE_ICONS[\"timestamp\"] },\n { value: \"tags\", label: \"Tags\", icon: ROLE_ICONS[\"tags\"] },\n { value: \"status\", label: \"Status\", icon: ROLE_ICONS[\"status\"] },\n];\n\nexport const profileFormatOptions: ComboboxOption[] = PROFILE_COLUMN_FORMAT_OPTIONS.map(\n (option) => ({ ...option, icon: FORMAT_ICONS[option.value] }),\n);\n\nexport const profileUnitOptions: ComboboxOption[] = PROFILE_COLUMN_UNIT_OPTIONS.map(\n (option) => ({ ...option, icon: UNIT_ICONS[option.value] }),\n);\n\nexport const profileFilterKindOptions: ComboboxOption[] = PROFILE_FILTER_KIND_OPTIONS.map(\n (option) => ({ ...option, icon: FILTER_KIND_ICONS[option.value] }),\n);\n"],"names":["UiCursorText","UiSigma","UiToggleOn","UiCalendar","UiTimer","UiHardDrive","UiPulse","UiShieldCheck","UiTag","UiListDashes","UiBraces","UiListChecks","UiAsterisk","UiFingerprint","UiSliders","UiClock","UiProhibit","UiCurrencyDollar","UiChartPie","UiActivity","UiColumns","jsx","PROFILE_FIELD_TYPES","PROFILE_COLUMN_FORMAT_OPTIONS","PROFILE_COLUMN_UNIT_OPTIONS","PROFILE_FILTER_KIND_OPTIONS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAM,aAAwC;AAAA,EAC5C,uCAASA,aAAAA,cAAA,EAAa;AAAA,EACtB,uCAASC,QAAAA,SAAA,EAAQ;AAAA,EACjB,wCAAUC,WAAAA,YAAA,EAAW;AAAA,EACrB,yCAAWC,WAAAA,YAAA,EAAW;AAAA,EACtB,yCAAWC,QAAAA,SAAA,EAAQ;AAAA,EACnB,sCAAQC,YAAAA,aAAA,EAAY;AAAA,EACpB,uCAASC,QAAAA,SAAA,EAAQ;AAAA,EACjB,uCAASC,SAAAA,eAAA,EAAc;AAAA,EACvB,0CAAYC,MAAAA,OAAA,EAAM;AAAA,EAClB,2CAAaC,aAAAA,cAAA,EAAa;AAAA,EAC1B,qCAAOC,SAAAA,UAAA,CAAA,CAAS;AAClB;AAMA,MAAM,oBAA+C;AAAA,EACnD,sCAAQC,aAAAA,cAAA,EAAa;AAAA,EACrB,sCAAQC,WAAAA,YAAA,EAAW;AAAA,EACnB,sCAAQC,cAAAA,eAAA,EAAc;AAAA,EACtB,sCAAQC,UAAAA,WAAA,EAAU;AAAA,EAClB,yCAAWV,QAAAA,SAAA,EAAQ;AAAA,EACnB,qCAAOD,WAAAA,YAAA,EAAW;AAAA,EAClB,qCAAOY,QAAAA,SAAA,EAAQ;AAAA,EACf,wCAAUb,WAAAA,YAAA,EAAW;AAAA,EACrB,qCAAOF,aAAAA,cAAA,EAAa;AAAA,E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ClD,EAAE,OAAO,aAAa,OAAO,aAAa,MAAM,WAAW,WAAW,EAAA;AAAA,EACtE,EAAE,OAAO,QAAQ,OAAO,QAAQ,MAAM,WAAW,MAAM,EAAA;AAAA,EACvD,EAAE,OAAO,UAAU,OAAO,UAAU,MAAM,WAAW,QAAQ,EAAA;AAC/D;AAEO,MAAM,uBAAyCC,mBAAAA,8BAA8B;AAAA,EAClF,CAAC,YAAY,EAAE,GAAG,QAAQ,MAAM,aAAa,OAAO,KAAK,EAAA;AAC3D;AAEO,MAAM,qBAAuCC,mBAAAA,4BAA4B;AAAA,EAC9E,CAAC,YAAY,EAAE,GAAG,QAAQ,MAAM,WAAW,OAAO,KAAK,EAAA;AACzD;AAE0DC,mBAAAA,4BAA4B;AAAA,EACpF,CAAC,YAAY,EAAE,GAAG,QAAQ,MAAM,kBAAkB,OAAO,KAAK,EAAA;AAChE;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileFieldIcons.d.ts","sourceRoot":"","sources":["../../../src/profiles/fields/profileFieldIcons.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"profileFieldIcons.d.ts","sourceRoot":"","sources":["../../../src/profiles/fields/profileFieldIcons.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AA2FtE,wBAAgB,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAExD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAE7D;AAED,eAAO,MAAM,kBAAkB,EAAE,cAAc,EAI5C,CAAC;AAEJ,eAAO,MAAM,kBAAkB,EAAE,cAAc,EAI9C,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,cAAc,EAEhD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAAc,EAE9C,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,cAAc,EAEpD,CAAC"}
|
|
@@ -21,6 +21,7 @@ import { UiListChecks } from "../../icons/components/UiListChecks.js";
|
|
|
21
21
|
import { UiProhibit } from "../../icons/components/UiProhibit.js";
|
|
22
22
|
import { UiSliders } from "../../icons/components/UiSliders.js";
|
|
23
23
|
import { UiFingerprint } from "../../icons/components/UiFingerprint.js";
|
|
24
|
+
import { UiAsterisk } from "../../icons/components/UiAsterisk.js";
|
|
24
25
|
const TYPE_ICONS = {
|
|
25
26
|
string: /* @__PURE__ */ jsx(UiCursorText, {}),
|
|
26
27
|
number: /* @__PURE__ */ jsx(UiSigma, {}),
|
|
@@ -36,6 +37,7 @@ const TYPE_ICONS = {
|
|
|
36
37
|
};
|
|
37
38
|
const FILTER_KIND_ICONS = {
|
|
38
39
|
terms: /* @__PURE__ */ jsx(UiListChecks, {}),
|
|
40
|
+
match: /* @__PURE__ */ jsx(UiAsterisk, {}),
|
|
39
41
|
exact: /* @__PURE__ */ jsx(UiFingerprint, {}),
|
|
40
42
|
range: /* @__PURE__ */ jsx(UiSliders, {}),
|
|
41
43
|
duration: /* @__PURE__ */ jsx(UiTimer, {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileFieldIcons.js","sources":["../../../src/profiles/fields/profileFieldIcons.tsx"],"sourcesContent":["/**\n * The glyphs a profile column's enums render with, and the Combobox options\n * built from them.\n *\n * The params editor gets these from the schema (`x-enum-icons`); the column\n * editor is hand-rolled, so its vocabulary lives here instead — one place both\n * the grid and the inspector read, rather than an icon picked twice.\n */\n\nimport type { ReactNode } from \"react\";\nimport type { ComboboxOption } from \"../../components/combobox-types\";\n// Monochrome UI glyphs only: the symbol icons (UiString, UiJson, UiField, …)\n// carry hardcoded IDE colours, which read as stray dots beside a form label.\nimport {\n UiActivity,\n UiBraces,\n UiCalendar,\n UiChartPie,\n UiClock,\n UiColumns,\n UiCurrencyDollar,\n UiCursorText,\n UiFingerprint,\n UiHardDrive,\n UiListChecks,\n UiListDashes,\n UiProhibit,\n UiPulse,\n UiShieldCheck,\n UiSigma,\n UiSliders,\n UiTag,\n UiTimer,\n UiToggleOn,\n} from \"../../icons\";\nimport { PROFILE_FIELD_TYPES } from \"./profileFieldTypes\";\nimport {\n PROFILE_COLUMN_FORMAT_OPTIONS,\n PROFILE_COLUMN_UNIT_OPTIONS,\n PROFILE_FILTER_KIND_OPTIONS,\n} from \"../wizard/profileWizardModel\";\n\nconst TYPE_ICONS: Record<string, ReactNode> = {\n string: <UiCursorText />,\n number: <UiSigma />,\n boolean: <UiToggleOn />,\n datetime: <UiCalendar />,\n duration: <UiTimer />,\n bytes: <UiHardDrive />,\n status: <UiPulse />,\n health: <UiShieldCheck />,\n key_value: <UiTag />,\n key_values: <UiListDashes />,\n json: <UiBraces />,\n};\n\n// A filter borrows the glyph of the type that infers it — duration from\n// UiTimer, date from UiCalendar — so the Type and the control it implies read\n// as one thing. Time keeps the clock, which is what makes the date/date-and-\n// time split legible at a glance.\nconst FILTER_KIND_ICONS: Record<string, ReactNode> = {\n terms: <UiListChecks />,\n exact: <UiFingerprint />,\n range: <UiSliders />,\n duration: <UiTimer />,\n date: <UiCalendar />,\n time: <UiClock />,\n boolean: <UiToggleOn />,\n text: <UiCursorText />,\n none: <UiProhibit />,\n};\n\nconst ROLE_ICONS: Record<string, ReactNode> = {\n timestamp: <UiClock />,\n tags: <UiTag />,\n status: <UiPulse />,\n};\n\nconst FORMAT_ICONS: Record<string, ReactNode> = {\n date: <UiCalendar />,\n float: <UiSigma />,\n duration: <UiTimer />,\n bytes: <UiHardDrive />,\n currency: <UiCurrencyDollar />,\n};\n\nconst UNIT_ICONS: Record<string, ReactNode> = {\n none: <UiSigma />,\n short: <UiSigma />,\n percent: <UiChartPie />,\n percentunit: <UiChartPie />,\n bytes: <UiHardDrive />,\n decbytes: <UiHardDrive />,\n Bps: <UiActivity />,\n binBps: <UiActivity />,\n ms: <UiTimer />,\n s: <UiTimer />,\n};\n\nexport function profileTypeIcon(type?: string): ReactNode {\n return (type && TYPE_ICONS[type]) ?? <UiColumns />;\n}\n\nexport function profileFilterKindIcon(kind: string): ReactNode {\n return FILTER_KIND_ICONS[kind] ?? <UiListChecks />;\n}\n\nexport const profileTypeOptions: ComboboxOption[] = PROFILE_FIELD_TYPES.map((type) => ({\n value: type,\n label: type,\n icon: TYPE_ICONS[type],\n}));\n\nexport const profileRoleOptions: ComboboxOption[] = [\n { value: \"timestamp\", label: \"Timestamp\", icon: ROLE_ICONS[\"timestamp\"] },\n { value: \"tags\", label: \"Tags\", icon: ROLE_ICONS[\"tags\"] },\n { value: \"status\", label: \"Status\", icon: ROLE_ICONS[\"status\"] },\n];\n\nexport const profileFormatOptions: ComboboxOption[] = PROFILE_COLUMN_FORMAT_OPTIONS.map(\n (option) => ({ ...option, icon: FORMAT_ICONS[option.value] }),\n);\n\nexport const profileUnitOptions: ComboboxOption[] = PROFILE_COLUMN_UNIT_OPTIONS.map(\n (option) => ({ ...option, icon: UNIT_ICONS[option.value] }),\n);\n\nexport const profileFilterKindOptions: ComboboxOption[] = PROFILE_FILTER_KIND_OPTIONS.map(\n (option) => ({ ...option, icon: FILTER_KIND_ICONS[option.value] }),\n);\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"profileFieldIcons.js","sources":["../../../src/profiles/fields/profileFieldIcons.tsx"],"sourcesContent":["/**\n * The glyphs a profile column's enums render with, and the Combobox options\n * built from them.\n *\n * The params editor gets these from the schema (`x-enum-icons`); the column\n * editor is hand-rolled, so its vocabulary lives here instead — one place both\n * the grid and the inspector read, rather than an icon picked twice.\n */\n\nimport type { ReactNode } from \"react\";\nimport type { ComboboxOption } from \"../../components/combobox-types\";\n// Monochrome UI glyphs only: the symbol icons (UiString, UiJson, UiField, …)\n// carry hardcoded IDE colours, which read as stray dots beside a form label.\nimport {\n UiActivity,\n UiAsterisk,\n UiBraces,\n UiCalendar,\n UiChartPie,\n UiClock,\n UiColumns,\n UiCurrencyDollar,\n UiCursorText,\n UiFingerprint,\n UiHardDrive,\n UiListChecks,\n UiListDashes,\n UiProhibit,\n UiPulse,\n UiShieldCheck,\n UiSigma,\n UiSliders,\n UiTag,\n UiTimer,\n UiToggleOn,\n} from \"../../icons\";\nimport { PROFILE_FIELD_TYPES } from \"./profileFieldTypes\";\nimport {\n PROFILE_COLUMN_FORMAT_OPTIONS,\n PROFILE_COLUMN_UNIT_OPTIONS,\n PROFILE_FILTER_KIND_OPTIONS,\n} from \"../wizard/profileWizardModel\";\n\nconst TYPE_ICONS: Record<string, ReactNode> = {\n string: <UiCursorText />,\n number: <UiSigma />,\n boolean: <UiToggleOn />,\n datetime: <UiCalendar />,\n duration: <UiTimer />,\n bytes: <UiHardDrive />,\n status: <UiPulse />,\n health: <UiShieldCheck />,\n key_value: <UiTag />,\n key_values: <UiListDashes />,\n json: <UiBraces />,\n};\n\n// A filter borrows the glyph of the type that infers it — duration from\n// UiTimer, date from UiCalendar — so the Type and the control it implies read\n// as one thing. Time keeps the clock, which is what makes the date/date-and-\n// time split legible at a glance.\nconst FILTER_KIND_ICONS: Record<string, ReactNode> = {\n terms: <UiListChecks />,\n match: <UiAsterisk />,\n exact: <UiFingerprint />,\n range: <UiSliders />,\n duration: <UiTimer />,\n date: <UiCalendar />,\n time: <UiClock />,\n boolean: <UiToggleOn />,\n text: <UiCursorText />,\n none: <UiProhibit />,\n};\n\nconst ROLE_ICONS: Record<string, ReactNode> = {\n timestamp: <UiClock />,\n tags: <UiTag />,\n status: <UiPulse />,\n};\n\nconst FORMAT_ICONS: Record<string, ReactNode> = {\n date: <UiCalendar />,\n float: <UiSigma />,\n duration: <UiTimer />,\n bytes: <UiHardDrive />,\n currency: <UiCurrencyDollar />,\n};\n\nconst UNIT_ICONS: Record<string, ReactNode> = {\n none: <UiSigma />,\n short: <UiSigma />,\n percent: <UiChartPie />,\n percentunit: <UiChartPie />,\n bytes: <UiHardDrive />,\n decbytes: <UiHardDrive />,\n Bps: <UiActivity />,\n binBps: <UiActivity />,\n ms: <UiTimer />,\n s: <UiTimer />,\n};\n\nexport function profileTypeIcon(type?: string): ReactNode {\n return (type && TYPE_ICONS[type]) ?? <UiColumns />;\n}\n\nexport function profileFilterKindIcon(kind: string): ReactNode {\n return FILTER_KIND_ICONS[kind] ?? <UiListChecks />;\n}\n\nexport const profileTypeOptions: ComboboxOption[] = PROFILE_FIELD_TYPES.map((type) => ({\n value: type,\n label: type,\n icon: TYPE_ICONS[type],\n}));\n\nexport const profileRoleOptions: ComboboxOption[] = [\n { value: \"timestamp\", label: \"Timestamp\", icon: ROLE_ICONS[\"timestamp\"] },\n { value: \"tags\", label: \"Tags\", icon: ROLE_ICONS[\"tags\"] },\n { value: \"status\", label: \"Status\", icon: ROLE_ICONS[\"status\"] },\n];\n\nexport const profileFormatOptions: ComboboxOption[] = PROFILE_COLUMN_FORMAT_OPTIONS.map(\n (option) => ({ ...option, icon: FORMAT_ICONS[option.value] }),\n);\n\nexport const profileUnitOptions: ComboboxOption[] = PROFILE_COLUMN_UNIT_OPTIONS.map(\n (option) => ({ ...option, icon: UNIT_ICONS[option.value] }),\n);\n\nexport const profileFilterKindOptions: ComboboxOption[] = PROFILE_FILTER_KIND_OPTIONS.map(\n (option) => ({ ...option, icon: FILTER_KIND_ICONS[option.value] }),\n);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAM,aAAwC;AAAA,EAC5C,4BAAS,cAAA,EAAa;AAAA,EACtB,4BAAS,SAAA,EAAQ;AAAA,EACjB,6BAAU,YAAA,EAAW;AAAA,EACrB,8BAAW,YAAA,EAAW;AAAA,EACtB,8BAAW,SAAA,EAAQ;AAAA,EACnB,2BAAQ,aAAA,EAAY;AAAA,EACpB,4B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AW,IAAI,0BAAO,WAAA,EAAU;AAClD;AAEO,SAAS,sBAAsB,MAAyB;AAC7D,SAAO,kBAAkB,IAAI,KAAK,oBAAC,cAAA,CAAA,CAAa;AAClD;AAEO,MAAM,qBAAuC,oBAAoB,IAAI,CAAC,UAAU;AAAA,EACrF,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM,WAAW,IAAI;AACvB,EAAE;AAEK,MAAM,qBAAuC;AAAA,EAClD,EAAE,OAAO,aAAa,OAAO,aAAa,MAAM,WAAW,WAAW,EAAA;AAAA,EACtE,EAAE,OAAO,QAAQ,OAAO,QAAQ,MAAM,WAAW,MAAM,EAAA;AAAA,EACvD,EAAE,OAAO,UAAU,OAAO,UAAU,MAAM,WAAW,QAAQ,EAAA;AAC/D;AAEO,MAAM,uBAAyC,8BAA8B;AAAA,EAClF,CAAC,YAAY,EAAE,GAAG,QAAQ,MAAM,aAAa,OAAO,KAAK,EAAA;AAC3D;AAEO,MAAM,qBAAuC,4BAA4B;AAAA,EAC9E,CAAC,YAAY,EAAE,GAAG,QAAQ,MAAM,WAAW,OAAO,KAAK,EAAA;AACzD;AAE0D,4BAA4B;AAAA,EACpF,CAAC,YAAY,EAAE,GAAG,QAAQ,MAAM,kBAAkB,OAAO,KAAK,EAAA;AAChE;"}
|
|
@@ -95,6 +95,7 @@ function applyVisibleFieldSelection(discovered, configured, visibleNames, select
|
|
|
95
95
|
}
|
|
96
96
|
const PROFILE_FILTER_KIND_OPTIONS = [
|
|
97
97
|
{ value: "terms", label: "Value list" },
|
|
98
|
+
{ value: "match", label: "Pattern list" },
|
|
98
99
|
{ value: "exact", label: "Exact match" },
|
|
99
100
|
{ value: "text", label: "Text search" },
|
|
100
101
|
{ value: "range", label: "Numeric range" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileWizardModel.cjs","sources":["../../../src/profiles/wizard/profileWizardModel.ts"],"sourcesContent":["import type { JsonSchemaObject } from \"../../components/json-schema-form-types\";\nimport { profileSchema } from \"../profileApi\";\nimport type { ProfileRowLimits } from \"../connections/connectionBrowserModel\";\n\n/** How a column is filtered at the backend; every field overrides an inference\n * the server would otherwise make from the column itself. */\nexport type ProfileColumnFilter = {\n /** Backend field the selection applies to; blank infers it from the column. */\n field?: string;\n /** Nested mapping containing the backend field. */\n nested?: string;\n /** Constants that pin the matching nested entry. */\n where?: Record<string, string>;\n /** terms, range, time, boolean, text or none; blank infers it from the type. */\n kind?: string;\n /** Enumerated values, replacing the backend lookup. */\n options?: string[];\n /** Ask the backend for this field's distinct values. */\n lookup?: boolean;\n /** How many of those values the control offers before the rest are typed for. */\n limit?: number;\n /** Allow several values at once. */\n multi?: boolean;\n /** Offer no filter while keeping the column rendered. */\n disabled?: boolean;\n};\n\n/**\n * A patch of T: every key optional, and explicitly settable to `undefined` to\n * clear it.\n *\n * Not Partial<T>. Under `exactOptionalPropertyTypes` an optional key may be\n * absent but not present-and-undefined, and \"clear this field\" — which is what\n * every editor control sends when its input goes empty — is precisely a present\n * `undefined`. The patch appliers drop those keys; the type has to permit them.\n */\nexport type Patch<T> = { [K in keyof T]?: T[K] | undefined };\n\n/**\n * Applies a patch, removing the keys it clears instead of leaving them present\n * and undefined.\n *\n * Spreading a patch would keep them, and these objects are serialized to the\n * server, where a present `field: undefined` is a key to interpret rather than\n * an absent one.\n */\nexport function applyPatch<T extends object>(value: T, patch: Patch<T>): T {\n const next = { ...value };\n for (const [key, entry] of Object.entries(patch)) {\n if (entry === undefined) delete next[key as keyof T];\n else next[key as keyof T] = entry as T[keyof T];\n }\n return next;\n}\n\nexport type ProfileColumn = {\n name: string;\n source?: string;\n label?: string;\n type?: string;\n kind?: string;\n format?: string;\n unit?: string;\n width?: number;\n cel?: string;\n /** Path computing the value, rooted at the row or at `source` when set. */\n jsonpath?: string;\n hidden?: boolean;\n filter?: ProfileColumnFilter;\n [key: string]: unknown;\n};\n\nexport type ProfileProvider = {\n type?: string;\n connection?: string;\n options?: Record<string, unknown>;\n [key: string]: unknown;\n};\n\n/** The parameter types the profile schema accepts. */\nexport type ParamDraftType =\n | \"string\"\n | \"number\"\n | \"boolean\"\n | \"date\"\n | \"datetime\"\n | \"duration\"\n | \"enum\"\n | \"list\";\n\n/** filter, limit, offset, time-from or time-to; empty behaves as filter. */\nexport type ParamDraftRole =\n | \"filter\"\n | \"limit\"\n | \"offset\"\n | \"time-from\"\n | \"time-to\";\n\nexport type ParamDraft = {\n name?: string | undefined;\n label?: string | undefined;\n type?: ParamDraftType | undefined;\n role?: ParamDraftRole | undefined;\n default?: unknown | undefined;\n options?: string[] | undefined;\n required?: boolean | undefined;\n description?: string | undefined;\n /** Value rewrite; {value} is the supplied value. */\n template?: string | undefined;\n /** Backend field a list parameter filters on. Setting it lets a value be\n * excluded as well as included; it requires an OpenSearch-backed provider. */\n field?: string | undefined;\n};\n\n/** PARAM_TYPES_WITH_OPTIONS are the types whose values come from a fixed set, so\n * the editor offers an options picker for them. */\nexport const PARAM_TYPES_WITH_OPTIONS: ParamDraftType[] = [\"enum\", \"list\"];\n\nexport function paramHasOptions(param: ParamDraft): boolean {\n return (\n param.type !== undefined && PARAM_TYPES_WITH_OPTIONS.includes(param.type)\n );\n}\n\nexport type ProfileWizardDraft = Record<string, unknown> & {\n namespace?: string | undefined;\n profile?: string | undefined;\n /** Overrides the sidebar/picker glyph the provider type would otherwise give. */\n icon?: string | undefined;\n provider?: ProfileProvider | undefined;\n query?: string | undefined;\n columns?: ProfileColumn[] | undefined;\n /** The inputs a run binds — by name in the query, the provider options or the\n * connection. The query workspace previews against their defaults. */\n params?: ParamDraft[] | undefined;\n /** The row caps this profile sets for itself; unset ones take their default. */\n limits?: ProfileRowLimits | undefined;\n};\n\n/**\n * A profile that caps nothing carries no block at all, so the defaults are what\n * it inherits rather than what it froze at the moment it was edited. Both draft\n * hosts write the caps through this, so neither can leave an empty map behind.\n */\nexport function withProfileLimits<T extends ProfileWizardDraft>(\n draft: T,\n limits: ProfileRowLimits | undefined,\n): T {\n const next = { ...draft };\n if (limits) next.limits = limits;\n else delete next.limits;\n return next;\n}\n\nexport type ProfileFieldFilter = {\n query: string;\n type: string;\n selection: \"all\" | \"selected\" | \"unselected\";\n};\n\nexport const PROFILE_COLUMN_FORMAT_OPTIONS = [\n { value: \"date\", label: \"Date/time\" },\n { value: \"float\", label: \"Number\" },\n { value: \"duration\", label: \"Duration\" },\n { value: \"bytes\", label: \"Bytes\" },\n { value: \"currency\", label: \"Currency\" },\n] as const;\n\nexport const PROFILE_COLUMN_UNIT_OPTIONS = [\n { value: \"none\", label: \"Compact count\" },\n { value: \"short\", label: \"Short number\" },\n { value: \"percent\", label: \"Percent (0-100)\" },\n { value: \"percentunit\", label: \"Percent (0-1)\" },\n { value: \"bytes\", label: \"Bytes (IEC)\" },\n { value: \"decbytes\", label: \"Bytes (SI)\" },\n { value: \"Bps\", label: \"Bytes/sec\" },\n { value: \"binBps\", label: \"Binary bytes/sec\" },\n { value: \"ms\", label: \"Milliseconds\" },\n { value: \"s\", label: \"Seconds\" },\n] as const;\n\nexport const profileWizardSteps = [\n { id: \"source\", label: \"Choose source\", description: \"Connection\" },\n { id: \"query\", label: \"Explore & sample\", description: \"Query\" },\n { id: \"fields\", label: \"Name & shape\", description: \"Fields\" },\n { id: \"review\", label: \"Review\", description: \"Save\" },\n] as const;\n\nexport function filterProfileFields(\n fields: ProfileColumn[],\n selectedNames: Set<string>,\n filter: ProfileFieldFilter,\n): ProfileColumn[] {\n const query = filter.query.trim().toLowerCase();\n return fields.filter((field) => {\n const selected = selectedNames.has(field.name);\n if (filter.selection === \"selected\" && !selected) return false;\n if (filter.selection === \"unselected\" && selected) return false;\n if (filter.type && field.type !== filter.type) return false;\n if (!query) return true;\n return `${field.name} ${field.label ?? \"\"}`.toLowerCase().includes(query);\n });\n}\n\n/**\n * Every field the editors can show, each in its configured form. A discovered\n * field is a snapshot of what the source reported — the configured one carries\n * the user's edits, so it is the only version safe to render into a control or\n * to patch on top of.\n *\n * The configuration owns the order, because it is the order the profile renders\n * its columns in and the one the user drags rows into. A discovered field that\n * was never configured (not selected, or dropped from the profile) has no place\n * of its own, so it keeps the one it had: it is anchored just after whichever\n * configured field preceded it in the sample.\n */\nexport function availableProfileFields(\n discovered: ProfileColumn[],\n configured: ProfileColumn[],\n): ProfileColumn[] {\n const configuredByName = new Map(\n configured.map((field) => [field.name, field]),\n );\n const configuredBySource = new Map(\n configured\n .filter((field) => field.source)\n .map((field) => [field.source as string, field]),\n );\n const ordered = [...configured];\n let anchor = 0;\n for (const field of discovered) {\n const match =\n configuredByName.get(field.name) ?? configuredBySource.get(field.name);\n if (match) {\n anchor = ordered.indexOf(match) + 1;\n continue;\n }\n ordered.splice(anchor, 0, field);\n anchor += 1;\n }\n return ordered;\n}\n\n/**\n * Moves the named column onto the target's position, shifting the columns\n * between them — the drop semantics the field grid's row drag needs. Columns\n * are addressed by name because a drag only ever carries the row's identity.\n * A name that is not configured has no position, so the order is returned\n * unchanged rather than guessed at.\n */\nexport function reorderProfileColumns(\n columns: ProfileColumn[],\n sourceName: string,\n targetName: string,\n): ProfileColumn[] {\n const from = columns.findIndex((column) => column.name === sourceName);\n const to = columns.findIndex((column) => column.name === targetName);\n if (from < 0 || to < 0 || from === to) return columns;\n const next = [...columns];\n next.splice(to, 0, ...next.splice(from, 1));\n return next;\n}\n\n/**\n * Selects or deselects the named fields, keeping the configured order intact —\n * a re-selected field returns to where the grid already showed it rather than\n * to the back of the list or to its position in the sample.\n */\nexport function applyVisibleFieldSelection(\n discovered: ProfileColumn[],\n configured: ProfileColumn[],\n visibleNames: Set<string>,\n selected: boolean,\n): ProfileColumn[] {\n const selectedNames = new Set(configured.map((field) => field.name));\n for (const name of visibleNames) {\n if (selected) selectedNames.add(name);\n else selectedNames.delete(name);\n }\n return availableProfileFields(discovered, configured).filter((field) =>\n selectedNames.has(field.name),\n );\n}\n\n/** The control kinds a column filter can render as, with the server's own\n * wording. Mirrors query.ColumnFilterKindValues() and the x-enum-labels the\n * profile schema carries for them. */\nexport const PROFILE_FILTER_KIND_OPTIONS = [\n { value: \"terms\", label: \"Value list\" },\n { value: \"exact\", label: \"Exact match\" },\n { value: \"text\", label: \"Text search\" },\n { value: \"range\", label: \"Numeric range\" },\n { value: \"duration\", label: \"Duration range\" },\n { value: \"date\", label: \"Date range\" },\n { value: \"time\", label: \"Date & time range\" },\n { value: \"boolean\", label: \"Boolean\" },\n { value: \"none\", label: \"Not filterable\" },\n] as const;\n\n/** The server's own default, so an unset limit can be shown for what it does.\n * Mirrors query.DefaultFilterLookupLimit. */\nexport const PROFILE_FILTER_DEFAULT_LIMIT = 50;\n\n/** Mirrors query.MaxFilterLookupLimit — the largest head a lookup will serve. */\nexport const PROFILE_FILTER_MAX_LIMIT = 200;\n\n/**\n * Merges one filter knob into a column's filter block, dropping the block once\n * nothing is left in it.\n *\n * The distinction matters on save: `filter: {}` is a declaration that declares\n * nothing, and the server reads a present-but-empty block differently from an\n * absent one — unchecking the last box has to mean \"infer this again\", not\n * \"override it with silence\".\n */\nexport function patchColumnFilter(\n filter: ProfileColumnFilter | undefined,\n patch: Patch<ProfileColumnFilter>,\n): ProfileColumnFilter | undefined {\n const merged = Object.fromEntries(\n Object.entries({ ...filter, ...patch }).filter(\n ([, value]) => value !== undefined,\n ),\n ) as ProfileColumnFilter;\n return Object.keys(merged).length ? merged : undefined;\n}\n\n/** What the server picks for a column that declares no filter kind. Mirrors\n * columnFilterKindFor; text and date are absent there on purpose, so they are\n * here too. Bytes stays a plain range: a size literal has two bases, so \"5MB\"\n * would mean two different numbers. */\nexport function inferredFilterKind(column: ProfileColumn): string {\n switch (column.type) {\n case \"number\":\n case \"bytes\":\n return \"range\";\n case \"duration\":\n return \"duration\";\n case \"datetime\":\n return \"time\";\n case \"boolean\":\n return \"boolean\";\n case \"uuid\":\n return \"exact\";\n case \"key_value\":\n case \"key_values\":\n case \"json\":\n return \"none\";\n default:\n return \"terms\";\n }\n}\n\nexport function patchProfileField(\n field: ProfileColumn,\n patch: Patch<ProfileColumn>,\n): ProfileColumn {\n return Object.fromEntries(\n Object.entries({ ...field, ...patch }).filter(\n ([, value]) => value !== undefined,\n ),\n ) as ProfileColumn;\n}\n\nexport function renameProfileField(\n field: ProfileColumn,\n name: string,\n): ProfileColumn {\n const source = field.source ?? (field.cel ? undefined : field.name);\n return patchProfileField(field, {\n name,\n source: source === name ? undefined : source,\n });\n}\n\n/**\n * The connection type carried in a lookup option's label.\n *\n * The server renders each option as `\"<name> (<type>)\"`, so the parenthesised\n * suffix is the **connection** type — not the query provider that reads it. The\n * two coincide often enough (`opensearch`, `loki`, `postgres`) that using one as\n * the other looks correct, and they diverge for exactly the cloud and cluster\n * log backends: an `aws` connection is read by `cloudwatch`, `kubernetes` by\n * `k8s`, `azure` by `azureloganalytics`. Resolving one to the other is\n * providerTypesForConnectionType's job, and it uses the schema rather than a\n * second copy of that mapping.\n */\nexport function connectionTypeFromLabel(label: string): string | null {\n const match = label.match(/\\(([^()]+)\\)\\s*$/);\n return match?.[1]?.trim() || null;\n}\n\n/**\n * The query providers the profile schema says can read this connection type,\n * most specific first, or empty when nothing can read it.\n *\n * The authority is the schema the server already ships: the connection field's\n * lookup scope carries provider → connection types, so inverting it here keeps\n * one mapping rather than a client-side duplicate that can drift.\n */\nexport function providerTypesForConnectionType(\n connectionType: string,\n): string[] {\n const scope = providerConnectionScope();\n const candidates = Object.keys(scope)\n .filter((provider) => scope[provider]?.includes(connectionType))\n .sort();\n if (candidates.length <= 1) return candidates;\n // A provider keyed exactly as the connection type is the one named for it.\n const exact = candidates.find((provider) => provider === connectionType);\n if (exact) return [exact];\n // Otherwise drop the dialect-agnostic umbrella, so `sql_server` resolves to\n // `sqlserver` instead of tying with the generic `sql`. A genuine tie —\n // `google_cloud`, read by both `gcpcloudlogging` and `bigquery` — survives as\n // a list for the caller to disambiguate.\n const specific = candidates.filter((provider) => provider !== \"sql\");\n return specific.length === 1 ? specific : candidates;\n}\n\nfunction providerConnectionScope(): Record<string, string[]> {\n const provider = profileSchema().properties?.provider as\n | JsonSchemaObject\n | undefined;\n const connection = provider?.properties?.connection as\n | JsonSchemaObject\n | undefined;\n const lookup = connection?.[\"x-clicky-lookup\"] as\n | { scope?: { map?: unknown } }\n | undefined;\n const map = lookup?.scope?.map;\n if (!map || typeof map !== \"object\") {\n throw new Error(\n \"profile schema is missing provider.connection x-clicky-lookup.scope.map — the wizard cannot resolve a provider for a connection without it\",\n );\n }\n return map as Record<string, string[]>;\n}\n\nexport function profileConnectionID(value: string): string | null {\n const prefix = \"connection://\";\n if (!value.startsWith(prefix)) return null;\n return value.slice(prefix.length).trim() || null;\n}\n\nexport function profileWizardErrorMessage(\n error: unknown,\n fallback: string,\n): string {\n return error instanceof Error && error.message.trim()\n ? error.message.trim()\n : fallback;\n}\n\n/**\n * A profile says what to fetch either as a raw query or as a structured search\n * specification — never both, which is why this is an either/or rather than a\n * check on `query` alone.\n */\nexport function profileWizardHasQuery(draft: ProfileWizardDraft): boolean {\n return Boolean(\n draft.query?.trim() || draft.provider?.options?.search !== undefined,\n );\n}\n\nexport function profileWizardStepReady(\n step: (typeof profileWizardSteps)[number][\"id\"],\n draft: ProfileWizardDraft,\n discovered: ProfileColumn[],\n): boolean {\n if (step === \"source\") {\n return Boolean(draft.provider?.connection && draft.provider.type);\n }\n if (step === \"query\") {\n return Boolean(profileWizardHasQuery(draft) && discovered.length > 0);\n }\n if (step === \"fields\") {\n return Boolean(draft.profile?.trim() && draft.columns?.length);\n }\n return (\n Boolean(draft.profile?.trim() && draft.provider?.connection) &&\n discovered.length > 0\n );\n}\n"],"names":["profileSchema"],"mappings":";;;AA8CO,SAAS,WAA6B,OAAU,OAAoB;AACzE,QAAM,OAAO,EAAE,GAAG,MAAA;AAClB,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,KAAK,GAAG;AAChD,QAAI,UAAU,OAAW,QAAO,KAAK,GAAc;AAAA,QAC9C,MAAK,GAAc,IAAI;AAAA,EAC9B;AACA,SAAO;AACT;AA+DO,MAAM,2BAA6C,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AG5B,QAAM,OAAM,sCAAQ,UAAR,mBAAe;AAC3B,MAAI,CAAC,OAAO,OAAO,QAAQ,UAAU;AACnC,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AACA,SAAO;AACT;AAEO,SAAS,oBAAoB,OAA8B;AAChE,QAAM,SAAS;AACf,MAAI,CAAC,MAAM,WAAW,MAAM,EAAG,QAAO;AACtC,SAAO,MAAM,MAAM,OAAO,MAAM,EAAE,UAAU;AAC9C;AAEO,SAAS,0BACd,OACA,UACQ;AACR,SAAO,iBAAiB,SAAS,MAAM,QAAQ,SAC3C,MAAM,QAAQ,KAAA,IACd;AACN;AAOO,SAAS,sBAAsB,OAAoC;;AACxE,SAAO;AAAA,MACL,WAAM,UAAN,mBAAa,aAAU,iBAAM,aAAN,mBAAgB,YAAhB,mBAAyB,YAAW;AAAA,EAAA;AAE/D;AAEO,SAAS,uBACd,MACA,OACA,YACS;;AACT,MAAI,SAAS,UAAU;AACrB,WAAO,UAAQ,WAAM,aAAN,mBAAgB,eAAc,MAAM,SAAS,IAAI;AAAA,EAClE;AACA,MAAI,SAAS,SAAS;AACpB,WAAO,QAAQ,sBAAsB,KAAK,KAAK,WAAW,SAAS,CAAC;AAAA,EACtE;AACA,MAAI,SAAS,UAAU;AACrB,WAAO,UAAQ,WAAM,YAAN,mBAAe,aAAU,WAAM,YAAN,mBAAe,OAAM;AAAA,EAC/D;AACA,SACE,UAAQ,WAAM,YAAN,mBAAe,aAAU,WAAM,aAAN,mBAAgB,WAAU,KAC3D,WAAW,SAAS;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"profileWizardModel.cjs","sources":["../../../src/profiles/wizard/profileWizardModel.ts"],"sourcesContent":["import type { JsonSchemaObject } from \"../../components/json-schema-form-types\";\nimport { profileSchema } from \"../profileApi\";\nimport type { ProfileRowLimits } from \"../connections/connectionBrowserModel\";\n\n/** How a column is filtered at the backend; every field overrides an inference\n * the server would otherwise make from the column itself. */\nexport type ProfileColumnFilter = {\n /** Backend field the selection applies to; blank infers it from the column. */\n field?: string;\n /** Nested mapping containing the backend field. */\n nested?: string;\n /** Constants that pin the matching nested entry. */\n where?: Record<string, string>;\n /** terms, range, time, boolean, text or none; blank infers it from the type. */\n kind?: string;\n /** Enumerated values, replacing the backend lookup. */\n options?: string[];\n /** Ask the backend for this field's distinct values. */\n lookup?: boolean;\n /** How many of those values the control offers before the rest are typed for. */\n limit?: number;\n /** Allow several values at once. */\n multi?: boolean;\n /** Offer no filter while keeping the column rendered. */\n disabled?: boolean;\n};\n\n/**\n * A patch of T: every key optional, and explicitly settable to `undefined` to\n * clear it.\n *\n * Not Partial<T>. Under `exactOptionalPropertyTypes` an optional key may be\n * absent but not present-and-undefined, and \"clear this field\" — which is what\n * every editor control sends when its input goes empty — is precisely a present\n * `undefined`. The patch appliers drop those keys; the type has to permit them.\n */\nexport type Patch<T> = { [K in keyof T]?: T[K] | undefined };\n\n/**\n * Applies a patch, removing the keys it clears instead of leaving them present\n * and undefined.\n *\n * Spreading a patch would keep them, and these objects are serialized to the\n * server, where a present `field: undefined` is a key to interpret rather than\n * an absent one.\n */\nexport function applyPatch<T extends object>(value: T, patch: Patch<T>): T {\n const next = { ...value };\n for (const [key, entry] of Object.entries(patch)) {\n if (entry === undefined) delete next[key as keyof T];\n else next[key as keyof T] = entry as T[keyof T];\n }\n return next;\n}\n\nexport type ProfileColumn = {\n name: string;\n source?: string;\n label?: string;\n type?: string;\n kind?: string;\n format?: string;\n unit?: string;\n width?: number;\n cel?: string;\n /** Path computing the value, rooted at the row or at `source` when set. */\n jsonpath?: string;\n hidden?: boolean;\n filter?: ProfileColumnFilter;\n [key: string]: unknown;\n};\n\nexport type ProfileProvider = {\n type?: string;\n connection?: string;\n options?: Record<string, unknown>;\n [key: string]: unknown;\n};\n\n/** The parameter types the profile schema accepts. */\nexport type ParamDraftType =\n | \"string\"\n | \"number\"\n | \"boolean\"\n | \"date\"\n | \"datetime\"\n | \"duration\"\n | \"enum\"\n | \"list\";\n\n/** filter, limit, offset, time-from or time-to; empty behaves as filter. */\nexport type ParamDraftRole =\n | \"filter\"\n | \"limit\"\n | \"offset\"\n | \"time-from\"\n | \"time-to\";\n\nexport type ParamDraft = {\n name?: string | undefined;\n label?: string | undefined;\n type?: ParamDraftType | undefined;\n role?: ParamDraftRole | undefined;\n default?: unknown | undefined;\n options?: string[] | undefined;\n required?: boolean | undefined;\n description?: string | undefined;\n /** Value rewrite; {value} is the supplied value. */\n template?: string | undefined;\n /** Backend field a list parameter filters on. Setting it lets a value be\n * excluded as well as included; it requires an OpenSearch-backed provider. */\n field?: string | undefined;\n};\n\n/** PARAM_TYPES_WITH_OPTIONS are the types whose values come from a fixed set, so\n * the editor offers an options picker for them. */\nexport const PARAM_TYPES_WITH_OPTIONS: ParamDraftType[] = [\"enum\", \"list\"];\n\nexport function paramHasOptions(param: ParamDraft): boolean {\n return (\n param.type !== undefined && PARAM_TYPES_WITH_OPTIONS.includes(param.type)\n );\n}\n\nexport type ProfileWizardDraft = Record<string, unknown> & {\n namespace?: string | undefined;\n profile?: string | undefined;\n /** Overrides the sidebar/picker glyph the provider type would otherwise give. */\n icon?: string | undefined;\n provider?: ProfileProvider | undefined;\n query?: string | undefined;\n columns?: ProfileColumn[] | undefined;\n /** The inputs a run binds — by name in the query, the provider options or the\n * connection. The query workspace previews against their defaults. */\n params?: ParamDraft[] | undefined;\n /** The row caps this profile sets for itself; unset ones take their default. */\n limits?: ProfileRowLimits | undefined;\n};\n\n/**\n * A profile that caps nothing carries no block at all, so the defaults are what\n * it inherits rather than what it froze at the moment it was edited. Both draft\n * hosts write the caps through this, so neither can leave an empty map behind.\n */\nexport function withProfileLimits<T extends ProfileWizardDraft>(\n draft: T,\n limits: ProfileRowLimits | undefined,\n): T {\n const next = { ...draft };\n if (limits) next.limits = limits;\n else delete next.limits;\n return next;\n}\n\nexport type ProfileFieldFilter = {\n query: string;\n type: string;\n selection: \"all\" | \"selected\" | \"unselected\";\n};\n\nexport const PROFILE_COLUMN_FORMAT_OPTIONS = [\n { value: \"date\", label: \"Date/time\" },\n { value: \"float\", label: \"Number\" },\n { value: \"duration\", label: \"Duration\" },\n { value: \"bytes\", label: \"Bytes\" },\n { value: \"currency\", label: \"Currency\" },\n] as const;\n\nexport const PROFILE_COLUMN_UNIT_OPTIONS = [\n { value: \"none\", label: \"Compact count\" },\n { value: \"short\", label: \"Short number\" },\n { value: \"percent\", label: \"Percent (0-100)\" },\n { value: \"percentunit\", label: \"Percent (0-1)\" },\n { value: \"bytes\", label: \"Bytes (IEC)\" },\n { value: \"decbytes\", label: \"Bytes (SI)\" },\n { value: \"Bps\", label: \"Bytes/sec\" },\n { value: \"binBps\", label: \"Binary bytes/sec\" },\n { value: \"ms\", label: \"Milliseconds\" },\n { value: \"s\", label: \"Seconds\" },\n] as const;\n\nexport const profileWizardSteps = [\n { id: \"source\", label: \"Choose source\", description: \"Connection\" },\n { id: \"query\", label: \"Explore & sample\", description: \"Query\" },\n { id: \"fields\", label: \"Name & shape\", description: \"Fields\" },\n { id: \"review\", label: \"Review\", description: \"Save\" },\n] as const;\n\nexport function filterProfileFields(\n fields: ProfileColumn[],\n selectedNames: Set<string>,\n filter: ProfileFieldFilter,\n): ProfileColumn[] {\n const query = filter.query.trim().toLowerCase();\n return fields.filter((field) => {\n const selected = selectedNames.has(field.name);\n if (filter.selection === \"selected\" && !selected) return false;\n if (filter.selection === \"unselected\" && selected) return false;\n if (filter.type && field.type !== filter.type) return false;\n if (!query) return true;\n return `${field.name} ${field.label ?? \"\"}`.toLowerCase().includes(query);\n });\n}\n\n/**\n * Every field the editors can show, each in its configured form. A discovered\n * field is a snapshot of what the source reported — the configured one carries\n * the user's edits, so it is the only version safe to render into a control or\n * to patch on top of.\n *\n * The configuration owns the order, because it is the order the profile renders\n * its columns in and the one the user drags rows into. A discovered field that\n * was never configured (not selected, or dropped from the profile) has no place\n * of its own, so it keeps the one it had: it is anchored just after whichever\n * configured field preceded it in the sample.\n */\nexport function availableProfileFields(\n discovered: ProfileColumn[],\n configured: ProfileColumn[],\n): ProfileColumn[] {\n const configuredByName = new Map(\n configured.map((field) => [field.name, field]),\n );\n const configuredBySource = new Map(\n configured\n .filter((field) => field.source)\n .map((field) => [field.source as string, field]),\n );\n const ordered = [...configured];\n let anchor = 0;\n for (const field of discovered) {\n const match =\n configuredByName.get(field.name) ?? configuredBySource.get(field.name);\n if (match) {\n anchor = ordered.indexOf(match) + 1;\n continue;\n }\n ordered.splice(anchor, 0, field);\n anchor += 1;\n }\n return ordered;\n}\n\n/**\n * Moves the named column onto the target's position, shifting the columns\n * between them — the drop semantics the field grid's row drag needs. Columns\n * are addressed by name because a drag only ever carries the row's identity.\n * A name that is not configured has no position, so the order is returned\n * unchanged rather than guessed at.\n */\nexport function reorderProfileColumns(\n columns: ProfileColumn[],\n sourceName: string,\n targetName: string,\n): ProfileColumn[] {\n const from = columns.findIndex((column) => column.name === sourceName);\n const to = columns.findIndex((column) => column.name === targetName);\n if (from < 0 || to < 0 || from === to) return columns;\n const next = [...columns];\n next.splice(to, 0, ...next.splice(from, 1));\n return next;\n}\n\n/**\n * Selects or deselects the named fields, keeping the configured order intact —\n * a re-selected field returns to where the grid already showed it rather than\n * to the back of the list or to its position in the sample.\n */\nexport function applyVisibleFieldSelection(\n discovered: ProfileColumn[],\n configured: ProfileColumn[],\n visibleNames: Set<string>,\n selected: boolean,\n): ProfileColumn[] {\n const selectedNames = new Set(configured.map((field) => field.name));\n for (const name of visibleNames) {\n if (selected) selectedNames.add(name);\n else selectedNames.delete(name);\n }\n return availableProfileFields(discovered, configured).filter((field) =>\n selectedNames.has(field.name),\n );\n}\n\n/** The control kinds a column filter can render as, with the server's own\n * wording. Mirrors query.ColumnFilterKindValues() and the x-enum-labels the\n * profile schema carries for them. */\nexport const PROFILE_FILTER_KIND_OPTIONS = [\n { value: \"terms\", label: \"Value list\" },\n { value: \"match\", label: \"Pattern list\" },\n { value: \"exact\", label: \"Exact match\" },\n { value: \"text\", label: \"Text search\" },\n { value: \"range\", label: \"Numeric range\" },\n { value: \"duration\", label: \"Duration range\" },\n { value: \"date\", label: \"Date range\" },\n { value: \"time\", label: \"Date & time range\" },\n { value: \"boolean\", label: \"Boolean\" },\n { value: \"none\", label: \"Not filterable\" },\n] as const;\n\n/** The server's own default, so an unset limit can be shown for what it does.\n * Mirrors query.DefaultFilterLookupLimit. */\nexport const PROFILE_FILTER_DEFAULT_LIMIT = 50;\n\n/** Mirrors query.MaxFilterLookupLimit — the largest head a lookup will serve. */\nexport const PROFILE_FILTER_MAX_LIMIT = 200;\n\n/**\n * Merges one filter knob into a column's filter block, dropping the block once\n * nothing is left in it.\n *\n * The distinction matters on save: `filter: {}` is a declaration that declares\n * nothing, and the server reads a present-but-empty block differently from an\n * absent one — unchecking the last box has to mean \"infer this again\", not\n * \"override it with silence\".\n */\nexport function patchColumnFilter(\n filter: ProfileColumnFilter | undefined,\n patch: Patch<ProfileColumnFilter>,\n): ProfileColumnFilter | undefined {\n const merged = Object.fromEntries(\n Object.entries({ ...filter, ...patch }).filter(\n ([, value]) => value !== undefined,\n ),\n ) as ProfileColumnFilter;\n return Object.keys(merged).length ? merged : undefined;\n}\n\n/** What the server picks for a column that declares no filter kind. Mirrors\n * columnFilterKindFor; text and date are absent there on purpose, so they are\n * here too. Bytes stays a plain range: a size literal has two bases, so \"5MB\"\n * would mean two different numbers. */\nexport function inferredFilterKind(column: ProfileColumn): string {\n switch (column.type) {\n case \"number\":\n case \"bytes\":\n return \"range\";\n case \"duration\":\n return \"duration\";\n case \"datetime\":\n return \"time\";\n case \"boolean\":\n return \"boolean\";\n case \"uuid\":\n return \"exact\";\n case \"key_value\":\n case \"key_values\":\n case \"json\":\n return \"none\";\n default:\n return \"terms\";\n }\n}\n\nexport function patchProfileField(\n field: ProfileColumn,\n patch: Patch<ProfileColumn>,\n): ProfileColumn {\n return Object.fromEntries(\n Object.entries({ ...field, ...patch }).filter(\n ([, value]) => value !== undefined,\n ),\n ) as ProfileColumn;\n}\n\nexport function renameProfileField(\n field: ProfileColumn,\n name: string,\n): ProfileColumn {\n const source = field.source ?? (field.cel ? undefined : field.name);\n return patchProfileField(field, {\n name,\n source: source === name ? undefined : source,\n });\n}\n\n/**\n * The connection type carried in a lookup option's label.\n *\n * The server renders each option as `\"<name> (<type>)\"`, so the parenthesised\n * suffix is the **connection** type — not the query provider that reads it. The\n * two coincide often enough (`opensearch`, `loki`, `postgres`) that using one as\n * the other looks correct, and they diverge for exactly the cloud and cluster\n * log backends: an `aws` connection is read by `cloudwatch`, `kubernetes` by\n * `k8s`, `azure` by `azureloganalytics`. Resolving one to the other is\n * providerTypesForConnectionType's job, and it uses the schema rather than a\n * second copy of that mapping.\n */\nexport function connectionTypeFromLabel(label: string): string | null {\n const match = label.match(/\\(([^()]+)\\)\\s*$/);\n return match?.[1]?.trim() || null;\n}\n\n/**\n * The query providers the profile schema says can read this connection type,\n * most specific first, or empty when nothing can read it.\n *\n * The authority is the schema the server already ships: the connection field's\n * lookup scope carries provider → connection types, so inverting it here keeps\n * one mapping rather than a client-side duplicate that can drift.\n */\nexport function providerTypesForConnectionType(\n connectionType: string,\n): string[] {\n const scope = providerConnectionScope();\n const candidates = Object.keys(scope)\n .filter((provider) => scope[provider]?.includes(connectionType))\n .sort();\n if (candidates.length <= 1) return candidates;\n // A provider keyed exactly as the connection type is the one named for it.\n const exact = candidates.find((provider) => provider === connectionType);\n if (exact) return [exact];\n // Otherwise drop the dialect-agnostic umbrella, so `sql_server` resolves to\n // `sqlserver` instead of tying with the generic `sql`. A genuine tie —\n // `google_cloud`, read by both `gcpcloudlogging` and `bigquery` — survives as\n // a list for the caller to disambiguate.\n const specific = candidates.filter((provider) => provider !== \"sql\");\n return specific.length === 1 ? specific : candidates;\n}\n\nfunction providerConnectionScope(): Record<string, string[]> {\n const provider = profileSchema().properties?.provider as\n | JsonSchemaObject\n | undefined;\n const connection = provider?.properties?.connection as\n | JsonSchemaObject\n | undefined;\n const lookup = connection?.[\"x-clicky-lookup\"] as\n | { scope?: { map?: unknown } }\n | undefined;\n const map = lookup?.scope?.map;\n if (!map || typeof map !== \"object\") {\n throw new Error(\n \"profile schema is missing provider.connection x-clicky-lookup.scope.map — the wizard cannot resolve a provider for a connection without it\",\n );\n }\n return map as Record<string, string[]>;\n}\n\nexport function profileConnectionID(value: string): string | null {\n const prefix = \"connection://\";\n if (!value.startsWith(prefix)) return null;\n return value.slice(prefix.length).trim() || null;\n}\n\nexport function profileWizardErrorMessage(\n error: unknown,\n fallback: string,\n): string {\n return error instanceof Error && error.message.trim()\n ? error.message.trim()\n : fallback;\n}\n\n/**\n * A profile says what to fetch either as a raw query or as a structured search\n * specification — never both, which is why this is an either/or rather than a\n * check on `query` alone.\n */\nexport function profileWizardHasQuery(draft: ProfileWizardDraft): boolean {\n return Boolean(\n draft.query?.trim() || draft.provider?.options?.search !== undefined,\n );\n}\n\nexport function profileWizardStepReady(\n step: (typeof profileWizardSteps)[number][\"id\"],\n draft: ProfileWizardDraft,\n discovered: ProfileColumn[],\n): boolean {\n if (step === \"source\") {\n return Boolean(draft.provider?.connection && draft.provider.type);\n }\n if (step === \"query\") {\n return Boolean(profileWizardHasQuery(draft) && discovered.length > 0);\n }\n if (step === \"fields\") {\n return Boolean(draft.profile?.trim() && draft.columns?.length);\n }\n return (\n Boolean(draft.profile?.trim() && draft.provider?.connection) &&\n discovered.length > 0\n );\n}\n"],"names":["profileSchema"],"mappings":";;;AA8CO,SAAS,WAA6B,OAAU,OAAoB;AACzE,QAAM,OAAO,EAAE,GAAG,MAAA;AAClB,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,KAAK,GAAG;AAChD,QAAI,UAAU,OAAW,QAAO,KAAK,GAAc;AAAA,QAC9C,MAAK,GAAc,IAAI;AAAA,EAC9B;AACA,SAAO;AACT;AA+DO,MAAM,2BAA6C,CAAC,QAAQ,MAAM;AAElE,SAAS,gBAAgB,OAA4B;AAC1D,SACE,MAAM,SAAS,UAAa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BAAe;AAC3B,MAAI,CAAC,OAAO,OAAO,QAAQ,UAAU;AACnC,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AACA,SAAO;AACT;AAEO,SAAS,oBAAoB,OAA8B;AAChE,QAAM,SAAS;AACf,MAAI,CAAC,MAAM,WAAW,MAAM,EAAG,QAAO;AACtC,SAAO,MAAM,MAAM,OAAO,MAAM,EAAE,UAAU;AAC9C;AAEO,SAAS,0BACd,OACA,UACQ;AACR,SAAO,iBAAiB,SAAS,MAAM,QAAQ,SAC3C,MAAM,QAAQ,KAAA,IACd;AACN;AAOO,SAAS,sBAAsB,OAAoC;;AACxE,SAAO;AAAA,MACL,WAAM,UAAN,mBAAa,aAAU,iBAAM,aAAN,mBAAgB,YAAhB,mBAAyB,YAAW;AAAA,EAAA;AAE/D;AAEO,SAAS,uBACd,MACA,OACA,YACS;;AACT,MAAI,SAAS,UAAU;AACrB,WAAO,UAAQ,WAAM,aAAN,mBAAgB,eAAc,MAAM,SAAS,IAAI;AAAA,EAClE;AACA,MAAI,SAAS,SAAS;AACpB,WAAO,QAAQ,sBAAsB,KAAK,KAAK,WAAW,SAAS,CAAC;AAAA,EACtE;AACA,MAAI,SAAS,UAAU;AACrB,WAAO,UAAQ,WAAM,YAAN,mBAAe,aAAU,WAAM,YAAN,mBAAe,OAAM;AAAA,EAC/D;AACA,SACE,UAAQ,WAAM,YAAN,mBAAe,aAAU,WAAM,aAAN,mBAAgB,WAAU,KAC3D,WAAW,SAAS;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -210,6 +210,9 @@ export declare function applyVisibleFieldSelection(discovered: ProfileColumn[],
|
|
|
210
210
|
export declare const PROFILE_FILTER_KIND_OPTIONS: readonly [{
|
|
211
211
|
readonly value: "terms";
|
|
212
212
|
readonly label: "Value list";
|
|
213
|
+
}, {
|
|
214
|
+
readonly value: "match";
|
|
215
|
+
readonly label: "Pattern list";
|
|
213
216
|
}, {
|
|
214
217
|
readonly value: "exact";
|
|
215
218
|
readonly label: "Exact match";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileWizardModel.d.ts","sourceRoot":"","sources":["../../../src/profiles/wizard/profileWizardModel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAE9E;8DAC8D;AAC9D,MAAM,MAAM,mBAAmB,GAAG;IAChC,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,gFAAgF;IAChF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,wDAAwD;IACxD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS;CAAE,CAAC;AAE7D;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAOzE;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM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;;;;;;;;;;;;;;;;;;;;;;EAW9B,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;EAKrB,CAAC;AAEX,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,aAAa,EAAE,EACvB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,EAC1B,MAAM,EAAE,kBAAkB,GACzB,aAAa,EAAE,CAUjB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,aAAa,EAAE,EAC3B,UAAU,EAAE,aAAa,EAAE,GAC1B,aAAa,EAAE,CAsBjB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,aAAa,EAAE,EACxB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,aAAa,EAAE,CAOjB;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,aAAa,EAAE,EAC3B,UAAU,EAAE,aAAa,EAAE,EAC3B,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,EACzB,QAAQ,EAAE,OAAO,GAChB,aAAa,EAAE,CASjB;AAED;;uCAEuC;AACvC,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"profileWizardModel.d.ts","sourceRoot":"","sources":["../../../src/profiles/wizard/profileWizardModel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAE9E;8DAC8D;AAC9D,MAAM,MAAM,mBAAmB,GAAG;IAChC,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,gFAAgF;IAChF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,OAAO,CAAC,EAAE,MA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G,OAAO,CAIxE;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAC/C,KAAK,EAAE,kBAAkB,EACzB,UAAU,EAAE,aAAa,EAAE,GAC1B,OAAO,CAcT"}
|
|
@@ -93,6 +93,7 @@ function applyVisibleFieldSelection(discovered, configured, visibleNames, select
|
|
|
93
93
|
}
|
|
94
94
|
const PROFILE_FILTER_KIND_OPTIONS = [
|
|
95
95
|
{ value: "terms", label: "Value list" },
|
|
96
|
+
{ value: "match", label: "Pattern list" },
|
|
96
97
|
{ value: "exact", label: "Exact match" },
|
|
97
98
|
{ value: "text", label: "Text search" },
|
|
98
99
|
{ value: "range", label: "Numeric range" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileWizardModel.js","sources":["../../../src/profiles/wizard/profileWizardModel.ts"],"sourcesContent":["import type { JsonSchemaObject } from \"../../components/json-schema-form-types\";\nimport { profileSchema } from \"../profileApi\";\nimport type { ProfileRowLimits } from \"../connections/connectionBrowserModel\";\n\n/** How a column is filtered at the backend; every field overrides an inference\n * the server would otherwise make from the column itself. */\nexport type ProfileColumnFilter = {\n /** Backend field the selection applies to; blank infers it from the column. */\n field?: string;\n /** Nested mapping containing the backend field. */\n nested?: string;\n /** Constants that pin the matching nested entry. */\n where?: Record<string, string>;\n /** terms, range, time, boolean, text or none; blank infers it from the type. */\n kind?: string;\n /** Enumerated values, replacing the backend lookup. */\n options?: string[];\n /** Ask the backend for this field's distinct values. */\n lookup?: boolean;\n /** How many of those values the control offers before the rest are typed for. */\n limit?: number;\n /** Allow several values at once. */\n multi?: boolean;\n /** Offer no filter while keeping the column rendered. */\n disabled?: boolean;\n};\n\n/**\n * A patch of T: every key optional, and explicitly settable to `undefined` to\n * clear it.\n *\n * Not Partial<T>. Under `exactOptionalPropertyTypes` an optional key may be\n * absent but not present-and-undefined, and \"clear this field\" — which is what\n * every editor control sends when its input goes empty — is precisely a present\n * `undefined`. The patch appliers drop those keys; the type has to permit them.\n */\nexport type Patch<T> = { [K in keyof T]?: T[K] | undefined };\n\n/**\n * Applies a patch, removing the keys it clears instead of leaving them present\n * and undefined.\n *\n * Spreading a patch would keep them, and these objects are serialized to the\n * server, where a present `field: undefined` is a key to interpret rather than\n * an absent one.\n */\nexport function applyPatch<T extends object>(value: T, patch: Patch<T>): T {\n const next = { ...value };\n for (const [key, entry] of Object.entries(patch)) {\n if (entry === undefined) delete next[key as keyof T];\n else next[key as keyof T] = entry as T[keyof T];\n }\n return next;\n}\n\nexport type ProfileColumn = {\n name: string;\n source?: string;\n label?: string;\n type?: string;\n kind?: string;\n format?: string;\n unit?: string;\n width?: number;\n cel?: string;\n /** Path computing the value, rooted at the row or at `source` when set. */\n jsonpath?: string;\n hidden?: boolean;\n filter?: ProfileColumnFilter;\n [key: string]: unknown;\n};\n\nexport type ProfileProvider = {\n type?: string;\n connection?: string;\n options?: Record<string, unknown>;\n [key: string]: unknown;\n};\n\n/** The parameter types the profile schema accepts. */\nexport type ParamDraftType =\n | \"string\"\n | \"number\"\n | \"boolean\"\n | \"date\"\n | \"datetime\"\n | \"duration\"\n | \"enum\"\n | \"list\";\n\n/** filter, limit, offset, time-from or time-to; empty behaves as filter. */\nexport type ParamDraftRole =\n | \"filter\"\n | \"limit\"\n | \"offset\"\n | \"time-from\"\n | \"time-to\";\n\nexport type ParamDraft = {\n name?: string | undefined;\n label?: string | undefined;\n type?: ParamDraftType | undefined;\n role?: ParamDraftRole | undefined;\n default?: unknown | undefined;\n options?: string[] | undefined;\n required?: boolean | undefined;\n description?: string | undefined;\n /** Value rewrite; {value} is the supplied value. */\n template?: string | undefined;\n /** Backend field a list parameter filters on. Setting it lets a value be\n * excluded as well as included; it requires an OpenSearch-backed provider. */\n field?: string | undefined;\n};\n\n/** PARAM_TYPES_WITH_OPTIONS are the types whose values come from a fixed set, so\n * the editor offers an options picker for them. */\nexport const PARAM_TYPES_WITH_OPTIONS: ParamDraftType[] = [\"enum\", \"list\"];\n\nexport function paramHasOptions(param: ParamDraft): boolean {\n return (\n param.type !== undefined && PARAM_TYPES_WITH_OPTIONS.includes(param.type)\n );\n}\n\nexport type ProfileWizardDraft = Record<string, unknown> & {\n namespace?: string | undefined;\n profile?: string | undefined;\n /** Overrides the sidebar/picker glyph the provider type would otherwise give. */\n icon?: string | undefined;\n provider?: ProfileProvider | undefined;\n query?: string | undefined;\n columns?: ProfileColumn[] | undefined;\n /** The inputs a run binds — by name in the query, the provider options or the\n * connection. The query workspace previews against their defaults. */\n params?: ParamDraft[] | undefined;\n /** The row caps this profile sets for itself; unset ones take their default. */\n limits?: ProfileRowLimits | undefined;\n};\n\n/**\n * A profile that caps nothing carries no block at all, so the defaults are what\n * it inherits rather than what it froze at the moment it was edited. Both draft\n * hosts write the caps through this, so neither can leave an empty map behind.\n */\nexport function withProfileLimits<T extends ProfileWizardDraft>(\n draft: T,\n limits: ProfileRowLimits | undefined,\n): T {\n const next = { ...draft };\n if (limits) next.limits = limits;\n else delete next.limits;\n return next;\n}\n\nexport type ProfileFieldFilter = {\n query: string;\n type: string;\n selection: \"all\" | \"selected\" | \"unselected\";\n};\n\nexport const PROFILE_COLUMN_FORMAT_OPTIONS = [\n { value: \"date\", label: \"Date/time\" },\n { value: \"float\", label: \"Number\" },\n { value: \"duration\", label: \"Duration\" },\n { value: \"bytes\", label: \"Bytes\" },\n { value: \"currency\", label: \"Currency\" },\n] as const;\n\nexport const PROFILE_COLUMN_UNIT_OPTIONS = [\n { value: \"none\", label: \"Compact count\" },\n { value: \"short\", label: \"Short number\" },\n { value: \"percent\", label: \"Percent (0-100)\" },\n { value: \"percentunit\", label: \"Percent (0-1)\" },\n { value: \"bytes\", label: \"Bytes (IEC)\" },\n { value: \"decbytes\", label: \"Bytes (SI)\" },\n { value: \"Bps\", label: \"Bytes/sec\" },\n { value: \"binBps\", label: \"Binary bytes/sec\" },\n { value: \"ms\", label: \"Milliseconds\" },\n { value: \"s\", label: \"Seconds\" },\n] as const;\n\nexport const profileWizardSteps = [\n { id: \"source\", label: \"Choose source\", description: \"Connection\" },\n { id: \"query\", label: \"Explore & sample\", description: \"Query\" },\n { id: \"fields\", label: \"Name & shape\", description: \"Fields\" },\n { id: \"review\", label: \"Review\", description: \"Save\" },\n] as const;\n\nexport function filterProfileFields(\n fields: ProfileColumn[],\n selectedNames: Set<string>,\n filter: ProfileFieldFilter,\n): ProfileColumn[] {\n const query = filter.query.trim().toLowerCase();\n return fields.filter((field) => {\n const selected = selectedNames.has(field.name);\n if (filter.selection === \"selected\" && !selected) return false;\n if (filter.selection === \"unselected\" && selected) return false;\n if (filter.type && field.type !== filter.type) return false;\n if (!query) return true;\n return `${field.name} ${field.label ?? \"\"}`.toLowerCase().includes(query);\n });\n}\n\n/**\n * Every field the editors can show, each in its configured form. A discovered\n * field is a snapshot of what the source reported — the configured one carries\n * the user's edits, so it is the only version safe to render into a control or\n * to patch on top of.\n *\n * The configuration owns the order, because it is the order the profile renders\n * its columns in and the one the user drags rows into. A discovered field that\n * was never configured (not selected, or dropped from the profile) has no place\n * of its own, so it keeps the one it had: it is anchored just after whichever\n * configured field preceded it in the sample.\n */\nexport function availableProfileFields(\n discovered: ProfileColumn[],\n configured: ProfileColumn[],\n): ProfileColumn[] {\n const configuredByName = new Map(\n configured.map((field) => [field.name, field]),\n );\n const configuredBySource = new Map(\n configured\n .filter((field) => field.source)\n .map((field) => [field.source as string, field]),\n );\n const ordered = [...configured];\n let anchor = 0;\n for (const field of discovered) {\n const match =\n configuredByName.get(field.name) ?? configuredBySource.get(field.name);\n if (match) {\n anchor = ordered.indexOf(match) + 1;\n continue;\n }\n ordered.splice(anchor, 0, field);\n anchor += 1;\n }\n return ordered;\n}\n\n/**\n * Moves the named column onto the target's position, shifting the columns\n * between them — the drop semantics the field grid's row drag needs. Columns\n * are addressed by name because a drag only ever carries the row's identity.\n * A name that is not configured has no position, so the order is returned\n * unchanged rather than guessed at.\n */\nexport function reorderProfileColumns(\n columns: ProfileColumn[],\n sourceName: string,\n targetName: string,\n): ProfileColumn[] {\n const from = columns.findIndex((column) => column.name === sourceName);\n const to = columns.findIndex((column) => column.name === targetName);\n if (from < 0 || to < 0 || from === to) return columns;\n const next = [...columns];\n next.splice(to, 0, ...next.splice(from, 1));\n return next;\n}\n\n/**\n * Selects or deselects the named fields, keeping the configured order intact —\n * a re-selected field returns to where the grid already showed it rather than\n * to the back of the list or to its position in the sample.\n */\nexport function applyVisibleFieldSelection(\n discovered: ProfileColumn[],\n configured: ProfileColumn[],\n visibleNames: Set<string>,\n selected: boolean,\n): ProfileColumn[] {\n const selectedNames = new Set(configured.map((field) => field.name));\n for (const name of visibleNames) {\n if (selected) selectedNames.add(name);\n else selectedNames.delete(name);\n }\n return availableProfileFields(discovered, configured).filter((field) =>\n selectedNames.has(field.name),\n );\n}\n\n/** The control kinds a column filter can render as, with the server's own\n * wording. Mirrors query.ColumnFilterKindValues() and the x-enum-labels the\n * profile schema carries for them. */\nexport const PROFILE_FILTER_KIND_OPTIONS = [\n { value: \"terms\", label: \"Value list\" },\n { value: \"exact\", label: \"Exact match\" },\n { value: \"text\", label: \"Text search\" },\n { value: \"range\", label: \"Numeric range\" },\n { value: \"duration\", label: \"Duration range\" },\n { value: \"date\", label: \"Date range\" },\n { value: \"time\", label: \"Date & time range\" },\n { value: \"boolean\", label: \"Boolean\" },\n { value: \"none\", label: \"Not filterable\" },\n] as const;\n\n/** The server's own default, so an unset limit can be shown for what it does.\n * Mirrors query.DefaultFilterLookupLimit. */\nexport const PROFILE_FILTER_DEFAULT_LIMIT = 50;\n\n/** Mirrors query.MaxFilterLookupLimit — the largest head a lookup will serve. */\nexport const PROFILE_FILTER_MAX_LIMIT = 200;\n\n/**\n * Merges one filter knob into a column's filter block, dropping the block once\n * nothing is left in it.\n *\n * The distinction matters on save: `filter: {}` is a declaration that declares\n * nothing, and the server reads a present-but-empty block differently from an\n * absent one — unchecking the last box has to mean \"infer this again\", not\n * \"override it with silence\".\n */\nexport function patchColumnFilter(\n filter: ProfileColumnFilter | undefined,\n patch: Patch<ProfileColumnFilter>,\n): ProfileColumnFilter | undefined {\n const merged = Object.fromEntries(\n Object.entries({ ...filter, ...patch }).filter(\n ([, value]) => value !== undefined,\n ),\n ) as ProfileColumnFilter;\n return Object.keys(merged).length ? merged : undefined;\n}\n\n/** What the server picks for a column that declares no filter kind. Mirrors\n * columnFilterKindFor; text and date are absent there on purpose, so they are\n * here too. Bytes stays a plain range: a size literal has two bases, so \"5MB\"\n * would mean two different numbers. */\nexport function inferredFilterKind(column: ProfileColumn): string {\n switch (column.type) {\n case \"number\":\n case \"bytes\":\n return \"range\";\n case \"duration\":\n return \"duration\";\n case \"datetime\":\n return \"time\";\n case \"boolean\":\n return \"boolean\";\n case \"uuid\":\n return \"exact\";\n case \"key_value\":\n case \"key_values\":\n case \"json\":\n return \"none\";\n default:\n return \"terms\";\n }\n}\n\nexport function patchProfileField(\n field: ProfileColumn,\n patch: Patch<ProfileColumn>,\n): ProfileColumn {\n return Object.fromEntries(\n Object.entries({ ...field, ...patch }).filter(\n ([, value]) => value !== undefined,\n ),\n ) as ProfileColumn;\n}\n\nexport function renameProfileField(\n field: ProfileColumn,\n name: string,\n): ProfileColumn {\n const source = field.source ?? (field.cel ? undefined : field.name);\n return patchProfileField(field, {\n name,\n source: source === name ? undefined : source,\n });\n}\n\n/**\n * The connection type carried in a lookup option's label.\n *\n * The server renders each option as `\"<name> (<type>)\"`, so the parenthesised\n * suffix is the **connection** type — not the query provider that reads it. The\n * two coincide often enough (`opensearch`, `loki`, `postgres`) that using one as\n * the other looks correct, and they diverge for exactly the cloud and cluster\n * log backends: an `aws` connection is read by `cloudwatch`, `kubernetes` by\n * `k8s`, `azure` by `azureloganalytics`. Resolving one to the other is\n * providerTypesForConnectionType's job, and it uses the schema rather than a\n * second copy of that mapping.\n */\nexport function connectionTypeFromLabel(label: string): string | null {\n const match = label.match(/\\(([^()]+)\\)\\s*$/);\n return match?.[1]?.trim() || null;\n}\n\n/**\n * The query providers the profile schema says can read this connection type,\n * most specific first, or empty when nothing can read it.\n *\n * The authority is the schema the server already ships: the connection field's\n * lookup scope carries provider → connection types, so inverting it here keeps\n * one mapping rather than a client-side duplicate that can drift.\n */\nexport function providerTypesForConnectionType(\n connectionType: string,\n): string[] {\n const scope = providerConnectionScope();\n const candidates = Object.keys(scope)\n .filter((provider) => scope[provider]?.includes(connectionType))\n .sort();\n if (candidates.length <= 1) return candidates;\n // A provider keyed exactly as the connection type is the one named for it.\n const exact = candidates.find((provider) => provider === connectionType);\n if (exact) return [exact];\n // Otherwise drop the dialect-agnostic umbrella, so `sql_server` resolves to\n // `sqlserver` instead of tying with the generic `sql`. A genuine tie —\n // `google_cloud`, read by both `gcpcloudlogging` and `bigquery` — survives as\n // a list for the caller to disambiguate.\n const specific = candidates.filter((provider) => provider !== \"sql\");\n return specific.length === 1 ? specific : candidates;\n}\n\nfunction providerConnectionScope(): Record<string, string[]> {\n const provider = profileSchema().properties?.provider as\n | JsonSchemaObject\n | undefined;\n const connection = provider?.properties?.connection as\n | JsonSchemaObject\n | undefined;\n const lookup = connection?.[\"x-clicky-lookup\"] as\n | { scope?: { map?: unknown } }\n | undefined;\n const map = lookup?.scope?.map;\n if (!map || typeof map !== \"object\") {\n throw new Error(\n \"profile schema is missing provider.connection x-clicky-lookup.scope.map — the wizard cannot resolve a provider for a connection without it\",\n );\n }\n return map as Record<string, string[]>;\n}\n\nexport function profileConnectionID(value: string): string | null {\n const prefix = \"connection://\";\n if (!value.startsWith(prefix)) return null;\n return value.slice(prefix.length).trim() || null;\n}\n\nexport function profileWizardErrorMessage(\n error: unknown,\n fallback: string,\n): string {\n return error instanceof Error && error.message.trim()\n ? error.message.trim()\n : fallback;\n}\n\n/**\n * A profile says what to fetch either as a raw query or as a structured search\n * specification — never both, which is why this is an either/or rather than a\n * check on `query` alone.\n */\nexport function profileWizardHasQuery(draft: ProfileWizardDraft): boolean {\n return Boolean(\n draft.query?.trim() || draft.provider?.options?.search !== undefined,\n );\n}\n\nexport function profileWizardStepReady(\n step: (typeof profileWizardSteps)[number][\"id\"],\n draft: ProfileWizardDraft,\n discovered: ProfileColumn[],\n): boolean {\n if (step === \"source\") {\n return Boolean(draft.provider?.connection && draft.provider.type);\n }\n if (step === \"query\") {\n return Boolean(profileWizardHasQuery(draft) && discovered.length > 0);\n }\n if (step === \"fields\") {\n return Boolean(draft.profile?.trim() && draft.columns?.length);\n }\n return (\n Boolean(draft.profile?.trim() && draft.provider?.connection) &&\n discovered.length > 0\n );\n}\n"],"names":[],"mappings":";AA8CO,SAAS,WAA6B,OAAU,OAAoB;AACzE,QAAM,OAAO,EAAE,GAAG,MAAA;AAClB,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,KAAK,GAAG;AAChD,QAAI,UAAU,OAAW,QAAO,KAAK,GAAc;AAAA,QAC9C,MAAK,GAAc,IAAI;AAAA,EAC9B;AACA,SAAO;AACT;AA+DO,MAAM,2BAA6C,CAAC,QAAQ,MAAM;AAElE,SAAS,gBAAgB,OAA4B;AAC1D,SACE,MAAM,SAAS,UAAa,yBAAyB,SAAS,MAAM,IAAI;AAE5E;AAsBO,SAAS,kBACd,OACA,QACG;AACH,QAAM,OAAO,EAAE,GAAG,MAAA;AAClB,MAAI,aAAa,SAAS;AAAA,cACd,KAAK;AACjB,SAAO;AACT;AAQO,MAAM,gCAAgC;AAAA,EAC3C,EAAE,OAAO,QAAQ,OAAO,YAAA;AAAA,EACxB,EAAE,OAAO,SAAS,OAAO,SAAA;AAAA,EACzB,EAAE,OAAO,YAAY,OAAO,WAAA;AAAA,EAC5B,EAAE,OAAO,SAAS,OAAO,QAAA;AAAA,EACzB,EAAE,OAAO,YAAY,OAAO,WAAA;AAC9B;AAEO,MAAM,8BAA8B;AAAA,EACzC,EAAE,OAAO,QAAQ,OAAO,gBAAA;AAAA,EACxB,EAAE,OAAO,SAAS,OAAO,eAAA;AAAA,EACzB,EAAE,OAAO,WAAW,OAA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,aAAN,mBAAgB,eAAc,MAAM,SAAS,IAAI;AAAA,EAClE;AACA,MAAI,SAAS,SAAS;AACpB,WAAO,QAAQ,sBAAsB,KAAK,KAAK,WAAW,SAAS,CAAC;AAAA,EACtE;AACA,MAAI,SAAS,UAAU;AACrB,WAAO,UAAQ,WAAM,YAAN,mBAAe,aAAU,WAAM,YAAN,mBAAe,OAAM;AAAA,EAC/D;AACA,SACE,UAAQ,WAAM,YAAN,mBAAe,aAAU,WAAM,aAAN,mBAAgB,WAAU,KAC3D,WAAW,SAAS;AAExB;"}
|
|
1
|
+
{"version":3,"file":"profileWizardModel.js","sources":["../../../src/profiles/wizard/profileWizardModel.ts"],"sourcesContent":["import type { JsonSchemaObject } from \"../../components/json-schema-form-types\";\nimport { profileSchema } from \"../profileApi\";\nimport type { ProfileRowLimits } from \"../connections/connectionBrowserModel\";\n\n/** How a column is filtered at the backend; every field overrides an inference\n * the server would otherwise make from the column itself. */\nexport type ProfileColumnFilter = {\n /** Backend field the selection applies to; blank infers it from the column. */\n field?: string;\n /** Nested mapping containing the backend field. */\n nested?: string;\n /** Constants that pin the matching nested entry. */\n where?: Record<string, string>;\n /** terms, range, time, boolean, text or none; blank infers it from the type. */\n kind?: string;\n /** Enumerated values, replacing the backend lookup. */\n options?: string[];\n /** Ask the backend for this field's distinct values. */\n lookup?: boolean;\n /** How many of those values the control offers before the rest are typed for. */\n limit?: number;\n /** Allow several values at once. */\n multi?: boolean;\n /** Offer no filter while keeping the column rendered. */\n disabled?: boolean;\n};\n\n/**\n * A patch of T: every key optional, and explicitly settable to `undefined` to\n * clear it.\n *\n * Not Partial<T>. Under `exactOptionalPropertyTypes` an optional key may be\n * absent but not present-and-undefined, and \"clear this field\" — which is what\n * every editor control sends when its input goes empty — is precisely a present\n * `undefined`. The patch appliers drop those keys; the type has to permit them.\n */\nexport type Patch<T> = { [K in keyof T]?: T[K] | undefined };\n\n/**\n * Applies a patch, removing the keys it clears instead of leaving them present\n * and undefined.\n *\n * Spreading a patch would keep them, and these objects are serialized to the\n * server, where a present `field: undefined` is a key to interpret rather than\n * an absent one.\n */\nexport function applyPatch<T extends object>(value: T, patch: Patch<T>): T {\n const next = { ...value };\n for (const [key, entry] of Object.entries(patch)) {\n if (entry === undefined) delete next[key as keyof T];\n else next[key as keyof T] = entry as T[keyof T];\n }\n return next;\n}\n\nexport type ProfileColumn = {\n name: string;\n source?: string;\n label?: string;\n type?: string;\n kind?: string;\n format?: string;\n unit?: string;\n width?: number;\n cel?: string;\n /** Path computing the value, rooted at the row or at `source` when set. */\n jsonpath?: string;\n hidden?: boolean;\n filter?: ProfileColumnFilter;\n [key: string]: unknown;\n};\n\nexport type ProfileProvider = {\n type?: string;\n connection?: string;\n options?: Record<string, unknown>;\n [key: string]: unknown;\n};\n\n/** The parameter types the profile schema accepts. */\nexport type ParamDraftType =\n | \"string\"\n | \"number\"\n | \"boolean\"\n | \"date\"\n | \"datetime\"\n | \"duration\"\n | \"enum\"\n | \"list\";\n\n/** filter, limit, offset, time-from or time-to; empty behaves as filter. */\nexport type ParamDraftRole =\n | \"filter\"\n | \"limit\"\n | \"offset\"\n | \"time-from\"\n | \"time-to\";\n\nexport type ParamDraft = {\n name?: string | undefined;\n label?: string | undefined;\n type?: ParamDraftType | undefined;\n role?: ParamDraftRole | undefined;\n default?: unknown | undefined;\n options?: string[] | undefined;\n required?: boolean | undefined;\n description?: string | undefined;\n /** Value rewrite; {value} is the supplied value. */\n template?: string | undefined;\n /** Backend field a list parameter filters on. Setting it lets a value be\n * excluded as well as included; it requires an OpenSearch-backed provider. */\n field?: string | undefined;\n};\n\n/** PARAM_TYPES_WITH_OPTIONS are the types whose values come from a fixed set, so\n * the editor offers an options picker for them. */\nexport const PARAM_TYPES_WITH_OPTIONS: ParamDraftType[] = [\"enum\", \"list\"];\n\nexport function paramHasOptions(param: ParamDraft): boolean {\n return (\n param.type !== undefined && PARAM_TYPES_WITH_OPTIONS.includes(param.type)\n );\n}\n\nexport type ProfileWizardDraft = Record<string, unknown> & {\n namespace?: string | undefined;\n profile?: string | undefined;\n /** Overrides the sidebar/picker glyph the provider type would otherwise give. */\n icon?: string | undefined;\n provider?: ProfileProvider | undefined;\n query?: string | undefined;\n columns?: ProfileColumn[] | undefined;\n /** The inputs a run binds — by name in the query, the provider options or the\n * connection. The query workspace previews against their defaults. */\n params?: ParamDraft[] | undefined;\n /** The row caps this profile sets for itself; unset ones take their default. */\n limits?: ProfileRowLimits | undefined;\n};\n\n/**\n * A profile that caps nothing carries no block at all, so the defaults are what\n * it inherits rather than what it froze at the moment it was edited. Both draft\n * hosts write the caps through this, so neither can leave an empty map behind.\n */\nexport function withProfileLimits<T extends ProfileWizardDraft>(\n draft: T,\n limits: ProfileRowLimits | undefined,\n): T {\n const next = { ...draft };\n if (limits) next.limits = limits;\n else delete next.limits;\n return next;\n}\n\nexport type ProfileFieldFilter = {\n query: string;\n type: string;\n selection: \"all\" | \"selected\" | \"unselected\";\n};\n\nexport const PROFILE_COLUMN_FORMAT_OPTIONS = [\n { value: \"date\", label: \"Date/time\" },\n { value: \"float\", label: \"Number\" },\n { value: \"duration\", label: \"Duration\" },\n { value: \"bytes\", label: \"Bytes\" },\n { value: \"currency\", label: \"Currency\" },\n] as const;\n\nexport const PROFILE_COLUMN_UNIT_OPTIONS = [\n { value: \"none\", label: \"Compact count\" },\n { value: \"short\", label: \"Short number\" },\n { value: \"percent\", label: \"Percent (0-100)\" },\n { value: \"percentunit\", label: \"Percent (0-1)\" },\n { value: \"bytes\", label: \"Bytes (IEC)\" },\n { value: \"decbytes\", label: \"Bytes (SI)\" },\n { value: \"Bps\", label: \"Bytes/sec\" },\n { value: \"binBps\", label: \"Binary bytes/sec\" },\n { value: \"ms\", label: \"Milliseconds\" },\n { value: \"s\", label: \"Seconds\" },\n] as const;\n\nexport const profileWizardSteps = [\n { id: \"source\", label: \"Choose source\", description: \"Connection\" },\n { id: \"query\", label: \"Explore & sample\", description: \"Query\" },\n { id: \"fields\", label: \"Name & shape\", description: \"Fields\" },\n { id: \"review\", label: \"Review\", description: \"Save\" },\n] as const;\n\nexport function filterProfileFields(\n fields: ProfileColumn[],\n selectedNames: Set<string>,\n filter: ProfileFieldFilter,\n): ProfileColumn[] {\n const query = filter.query.trim().toLowerCase();\n return fields.filter((field) => {\n const selected = selectedNames.has(field.name);\n if (filter.selection === \"selected\" && !selected) return false;\n if (filter.selection === \"unselected\" && selected) return false;\n if (filter.type && field.type !== filter.type) return false;\n if (!query) return true;\n return `${field.name} ${field.label ?? \"\"}`.toLowerCase().includes(query);\n });\n}\n\n/**\n * Every field the editors can show, each in its configured form. A discovered\n * field is a snapshot of what the source reported — the configured one carries\n * the user's edits, so it is the only version safe to render into a control or\n * to patch on top of.\n *\n * The configuration owns the order, because it is the order the profile renders\n * its columns in and the one the user drags rows into. A discovered field that\n * was never configured (not selected, or dropped from the profile) has no place\n * of its own, so it keeps the one it had: it is anchored just after whichever\n * configured field preceded it in the sample.\n */\nexport function availableProfileFields(\n discovered: ProfileColumn[],\n configured: ProfileColumn[],\n): ProfileColumn[] {\n const configuredByName = new Map(\n configured.map((field) => [field.name, field]),\n );\n const configuredBySource = new Map(\n configured\n .filter((field) => field.source)\n .map((field) => [field.source as string, field]),\n );\n const ordered = [...configured];\n let anchor = 0;\n for (const field of discovered) {\n const match =\n configuredByName.get(field.name) ?? configuredBySource.get(field.name);\n if (match) {\n anchor = ordered.indexOf(match) + 1;\n continue;\n }\n ordered.splice(anchor, 0, field);\n anchor += 1;\n }\n return ordered;\n}\n\n/**\n * Moves the named column onto the target's position, shifting the columns\n * between them — the drop semantics the field grid's row drag needs. Columns\n * are addressed by name because a drag only ever carries the row's identity.\n * A name that is not configured has no position, so the order is returned\n * unchanged rather than guessed at.\n */\nexport function reorderProfileColumns(\n columns: ProfileColumn[],\n sourceName: string,\n targetName: string,\n): ProfileColumn[] {\n const from = columns.findIndex((column) => column.name === sourceName);\n const to = columns.findIndex((column) => column.name === targetName);\n if (from < 0 || to < 0 || from === to) return columns;\n const next = [...columns];\n next.splice(to, 0, ...next.splice(from, 1));\n return next;\n}\n\n/**\n * Selects or deselects the named fields, keeping the configured order intact —\n * a re-selected field returns to where the grid already showed it rather than\n * to the back of the list or to its position in the sample.\n */\nexport function applyVisibleFieldSelection(\n discovered: ProfileColumn[],\n configured: ProfileColumn[],\n visibleNames: Set<string>,\n selected: boolean,\n): ProfileColumn[] {\n const selectedNames = new Set(configured.map((field) => field.name));\n for (const name of visibleNames) {\n if (selected) selectedNames.add(name);\n else selectedNames.delete(name);\n }\n return availableProfileFields(discovered, configured).filter((field) =>\n selectedNames.has(field.name),\n );\n}\n\n/** The control kinds a column filter can render as, with the server's own\n * wording. Mirrors query.ColumnFilterKindValues() and the x-enum-labels the\n * profile schema carries for them. */\nexport const PROFILE_FILTER_KIND_OPTIONS = [\n { value: \"terms\", label: \"Value list\" },\n { value: \"match\", label: \"Pattern list\" },\n { value: \"exact\", label: \"Exact match\" },\n { value: \"text\", label: \"Text search\" },\n { value: \"range\", label: \"Numeric range\" },\n { value: \"duration\", label: \"Duration range\" },\n { value: \"date\", label: \"Date range\" },\n { value: \"time\", label: \"Date & time range\" },\n { value: \"boolean\", label: \"Boolean\" },\n { value: \"none\", label: \"Not filterable\" },\n] as const;\n\n/** The server's own default, so an unset limit can be shown for what it does.\n * Mirrors query.DefaultFilterLookupLimit. */\nexport const PROFILE_FILTER_DEFAULT_LIMIT = 50;\n\n/** Mirrors query.MaxFilterLookupLimit — the largest head a lookup will serve. */\nexport const PROFILE_FILTER_MAX_LIMIT = 200;\n\n/**\n * Merges one filter knob into a column's filter block, dropping the block once\n * nothing is left in it.\n *\n * The distinction matters on save: `filter: {}` is a declaration that declares\n * nothing, and the server reads a present-but-empty block differently from an\n * absent one — unchecking the last box has to mean \"infer this again\", not\n * \"override it with silence\".\n */\nexport function patchColumnFilter(\n filter: ProfileColumnFilter | undefined,\n patch: Patch<ProfileColumnFilter>,\n): ProfileColumnFilter | undefined {\n const merged = Object.fromEntries(\n Object.entries({ ...filter, ...patch }).filter(\n ([, value]) => value !== undefined,\n ),\n ) as ProfileColumnFilter;\n return Object.keys(merged).length ? merged : undefined;\n}\n\n/** What the server picks for a column that declares no filter kind. Mirrors\n * columnFilterKindFor; text and date are absent there on purpose, so they are\n * here too. Bytes stays a plain range: a size literal has two bases, so \"5MB\"\n * would mean two different numbers. */\nexport function inferredFilterKind(column: ProfileColumn): string {\n switch (column.type) {\n case \"number\":\n case \"bytes\":\n return \"range\";\n case \"duration\":\n return \"duration\";\n case \"datetime\":\n return \"time\";\n case \"boolean\":\n return \"boolean\";\n case \"uuid\":\n return \"exact\";\n case \"key_value\":\n case \"key_values\":\n case \"json\":\n return \"none\";\n default:\n return \"terms\";\n }\n}\n\nexport function patchProfileField(\n field: ProfileColumn,\n patch: Patch<ProfileColumn>,\n): ProfileColumn {\n return Object.fromEntries(\n Object.entries({ ...field, ...patch }).filter(\n ([, value]) => value !== undefined,\n ),\n ) as ProfileColumn;\n}\n\nexport function renameProfileField(\n field: ProfileColumn,\n name: string,\n): ProfileColumn {\n const source = field.source ?? (field.cel ? undefined : field.name);\n return patchProfileField(field, {\n name,\n source: source === name ? undefined : source,\n });\n}\n\n/**\n * The connection type carried in a lookup option's label.\n *\n * The server renders each option as `\"<name> (<type>)\"`, so the parenthesised\n * suffix is the **connection** type — not the query provider that reads it. The\n * two coincide often enough (`opensearch`, `loki`, `postgres`) that using one as\n * the other looks correct, and they diverge for exactly the cloud and cluster\n * log backends: an `aws` connection is read by `cloudwatch`, `kubernetes` by\n * `k8s`, `azure` by `azureloganalytics`. Resolving one to the other is\n * providerTypesForConnectionType's job, and it uses the schema rather than a\n * second copy of that mapping.\n */\nexport function connectionTypeFromLabel(label: string): string | null {\n const match = label.match(/\\(([^()]+)\\)\\s*$/);\n return match?.[1]?.trim() || null;\n}\n\n/**\n * The query providers the profile schema says can read this connection type,\n * most specific first, or empty when nothing can read it.\n *\n * The authority is the schema the server already ships: the connection field's\n * lookup scope carries provider → connection types, so inverting it here keeps\n * one mapping rather than a client-side duplicate that can drift.\n */\nexport function providerTypesForConnectionType(\n connectionType: string,\n): string[] {\n const scope = providerConnectionScope();\n const candidates = Object.keys(scope)\n .filter((provider) => scope[provider]?.includes(connectionType))\n .sort();\n if (candidates.length <= 1) return candidates;\n // A provider keyed exactly as the connection type is the one named for it.\n const exact = candidates.find((provider) => provider === connectionType);\n if (exact) return [exact];\n // Otherwise drop the dialect-agnostic umbrella, so `sql_server` resolves to\n // `sqlserver` instead of tying with the generic `sql`. A genuine tie —\n // `google_cloud`, read by both `gcpcloudlogging` and `bigquery` — survives as\n // a list for the caller to disambiguate.\n const specific = candidates.filter((provider) => provider !== \"sql\");\n return specific.length === 1 ? specific : candidates;\n}\n\nfunction providerConnectionScope(): Record<string, string[]> {\n const provider = profileSchema().properties?.provider as\n | JsonSchemaObject\n | undefined;\n const connection = provider?.properties?.connection as\n | JsonSchemaObject\n | undefined;\n const lookup = connection?.[\"x-clicky-lookup\"] as\n | { scope?: { map?: unknown } }\n | undefined;\n const map = lookup?.scope?.map;\n if (!map || typeof map !== \"object\") {\n throw new Error(\n \"profile schema is missing provider.connection x-clicky-lookup.scope.map — the wizard cannot resolve a provider for a connection without it\",\n );\n }\n return map as Record<string, string[]>;\n}\n\nexport function profileConnectionID(value: string): string | null {\n const prefix = \"connection://\";\n if (!value.startsWith(prefix)) return null;\n return value.slice(prefix.length).trim() || null;\n}\n\nexport function profileWizardErrorMessage(\n error: unknown,\n fallback: string,\n): string {\n return error instanceof Error && error.message.trim()\n ? error.message.trim()\n : fallback;\n}\n\n/**\n * A profile says what to fetch either as a raw query or as a structured search\n * specification — never both, which is why this is an either/or rather than a\n * check on `query` alone.\n */\nexport function profileWizardHasQuery(draft: ProfileWizardDraft): boolean {\n return Boolean(\n draft.query?.trim() || draft.provider?.options?.search !== undefined,\n );\n}\n\nexport function profileWizardStepReady(\n step: (typeof profileWizardSteps)[number][\"id\"],\n draft: ProfileWizardDraft,\n discovered: ProfileColumn[],\n): boolean {\n if (step === \"source\") {\n return Boolean(draft.provider?.connection && draft.provider.type);\n }\n if (step === \"query\") {\n return Boolean(profileWizardHasQuery(draft) && discovered.length > 0);\n }\n if (step === \"fields\") {\n return Boolean(draft.profile?.trim() && draft.columns?.length);\n }\n return (\n Boolean(draft.profile?.trim() && draft.provider?.connection) &&\n discovered.length > 0\n );\n}\n"],"names":[],"mappings":";AA8CO,SAAS,WAA6B,OAAU,OAAoB;AACzE,QAAM,OAAO,EAAE,GAAG,MAAA;AAClB,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,KAAK,GAAG;AAChD,QAAI,UAAU,OAAW,QAAO,KAAK,GAAc;AAAA,QAC9C,MAAK,GAAc,IAAI;AAAA,EAC9B;AACA,SAAO;AACT;AA+DO,MAAM,2BAA6C,CAAC,QAAQ,MAAM;AAElE,SAAS,gBAAgB,OAA4B;AAC1D,SACE,MAAM,SAAS,UAAa,yBAAyB,SAAS,MAAM,IAAI;AAE5E;AAsBO,SAAS,kBACd,OACA,QACG;AACH,QAAM,OAAO,EAAE,GAAG,MAAA;AAClB,MAAI,aAAa,SAAS;AAAA,cACd,KAAK;AACjB,SAAO;AACT;AAQO,MAAM,gCAAgC;AAAA,EAC3C,EAAE,OAAO,QAAQ,OAAO,YAAA;AAAA,EACxB,EAAE,OAAO,SAAS,OAAO,SAAA;AAAA,EACzB,EAAE,OAAO,YAAY,OAAO,WAAA;AAAA,EAC5B,EAAE,OAAO,SAAS,OAAO,QAAA;AAAA,EACzB,EAAE,OAAO,YAAY,OAAO,WAAA;AAC9B;AAEO,MAAM,8BAA8B;AAAA,EACzC,EAAE,OAAO,QAAQ,OAAO,gBAAA;AAAA,EACxB,EAAE,OAAO,SAAS,OAAO,eAAA;AAAA,EACzB,EAAE,OAAO,WAAW,OAAO,kBAAA;AAAA,EAC3B,EAAE,OAAO,eAAe,OAAO,gBAAA;AAAA,EAC/B,EAAE,OAAO,SAAS,OAAO,cAAA;AAAA,EACzB,EAAE,OAAO,YAAY,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,QAAQ,sBAAsB,KAAK,KAAK,WAAW,SAAS,CAAC;AAAA,EACtE;AACA,MAAI,SAAS,UAAU;AACrB,WAAO,UAAQ,WAAM,YAAN,mBAAe,aAAU,WAAM,YAAN,mBAAe,OAAM;AAAA,EAC/D;AACA,SACE,UAAQ,WAAM,YAAN,mBAAe,aAAU,WAAM,aAAN,mBAAgB,WAAU,KAC3D,WAAW,SAAS;AAExB;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flanksource/clicky-ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.44",
|
|
4
4
|
"description": "Flanksource Clicky UI — React component library built on shadcn/ui with light/dark and density theming.",
|
|
5
5
|
"homepage": "https://github.com/flanksource/clicky-ui#readme",
|
|
6
6
|
"bugs": "https://github.com/flanksource/clicky-ui/issues",
|