@bitcobblers/wod-wiki-ui 0.6.36 → 0.7.38
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/{chunk-OFXIDA6Z.mjs → chunk-3ANAQJ6S.mjs} +6 -5
- package/dist/{chunk-OFXIDA6Z.mjs.map → chunk-3ANAQJ6S.mjs.map} +1 -1
- package/dist/extensions/index.cjs +3 -2
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.d.cts +1 -1
- package/dist/extensions/index.d.ts +1 -1
- package/dist/extensions/index.mjs +1 -1
- package/dist/{index-B8_9uGBX.d.cts → index-CTQ7Hrsa.d.cts} +2 -2
- package/dist/{index-B8_9uGBX.d.ts → index-CTQ7Hrsa.d.ts} +2 -2
- package/dist/index.cjs +9 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -12
- package/dist/index.d.ts +11 -12
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -4,7 +4,7 @@ import { tags, styleTags, Tag } from '@lezer/highlight';
|
|
|
4
4
|
import { RangeSetBuilder, Facet, StateEffect, StateField, Prec, EditorState, EditorSelection, countColumn } from '@codemirror/state';
|
|
5
5
|
import { linter, forEachDiagnostic } from '@codemirror/lint';
|
|
6
6
|
import { whiteboardScriptLanguage, createParser, getAnalyticsFromLogs, whiteboardScript } from '@bitcobblers/wod-wiki-lang';
|
|
7
|
-
import { WQL_SOURCES, WQL_AGGREGATORS, WQL_ROLLUP_PERIODS, WQL_VIRTUAL_DIMS, WQL_TAG_KEYS, WQL_METRIC_AGGREGATES, WQL_METRIC_FAMILIES, WQL_CALC_TARGETS, WQL_DISPLAY_UNITS, WQL_INTENSITY_TIERS, parseQueryWidgetSuffix, WQL_COMPARISON_OPS, parseQuery, isRowsQuery, isDashboardWidgetType, unknownWidgetTypeMessage, resolveWidgetType, PLANNED_WIDGET_TYPES, parseWqlSuffixes, isFindQuery, splitWidgetBody, substituteTokens, unknownTokensMessage, wql, wqlLanguage } from '@bitcobblers/wod-wiki-wql';
|
|
7
|
+
import { WQL_SOURCES, WQL_AGGREGATORS, WQL_ROLLUP_PERIODS, WQL_VIRTUAL_DIMS, WQL_TAG_KEYS, WQL_METRIC_AGGREGATES, WQL_METRIC_FAMILIES, WQL_CALC_TARGETS, WQL_DISPLAY_UNITS, WQL_INTENSITY_TIERS, parseQueryWidgetSuffix, WQL_COMPARISON_OPS, parseQuery, isRowsQuery, isDashboardWidgetType, unknownWidgetTypeMessage, resolveWidgetType, PLANNED_WIDGET_TYPES, parseWqlSuffixes, isFindQuery, isAggregateQuery, splitWidgetBody, substituteTokens, unknownTokensMessage, wql, wqlLanguage } from '@bitcobblers/wod-wiki-wql';
|
|
8
8
|
import { clsx } from 'clsx';
|
|
9
9
|
import { twMerge } from 'tailwind-merge';
|
|
10
10
|
import { snippet, autocompletion, closeBrackets, closeBracketsKeymap, CompletionContext, ifNotIn, completeFromList, snippetCompletion } from '@codemirror/autocomplete';
|
|
@@ -3110,6 +3110,7 @@ function restoreFilters(rest) {
|
|
|
3110
3110
|
}
|
|
3111
3111
|
function wqlToClauses(wql2) {
|
|
3112
3112
|
const suffixes = parseWqlSuffixes(wql2.trim());
|
|
3113
|
+
if (suffixes.conflicts?.length) return null;
|
|
3113
3114
|
const { where, displayUnit, groupBy, rollup, last, scope, primaryText } = suffixes;
|
|
3114
3115
|
const rowsMatch = /^rows(?:\:([a-zA-Z0-9_-]+))?\:?/.exec(primaryText);
|
|
3115
3116
|
if (rowsMatch) {
|
|
@@ -3684,7 +3685,7 @@ function diagnoseClauses(clauses) {
|
|
|
3684
3685
|
return {
|
|
3685
3686
|
valid: false,
|
|
3686
3687
|
wql: clausesToWql(clauses),
|
|
3687
|
-
ast: { raw: "", error },
|
|
3688
|
+
ast: { family: "aggregate", raw: "", agg: "sum", metric: "", filters: [], groupBy: [], error },
|
|
3688
3689
|
error,
|
|
3689
3690
|
offendingClauseId: clause.id
|
|
3690
3691
|
};
|
|
@@ -3754,7 +3755,7 @@ function WqlDiagnosticsStrip({
|
|
|
3754
3755
|
summary.hasJoin && /* @__PURE__ */ jsx("span", { "data-testid": "diag-summary-join", className: "text-primary font-semibold", children: "+join" })
|
|
3755
3756
|
] });
|
|
3756
3757
|
})() }),
|
|
3757
|
-
valid &&
|
|
3758
|
+
valid && isAggregateQuery(ast) && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-x-3 text-[11px] opacity-80 border-l border-border/50 pl-3", children: (() => {
|
|
3758
3759
|
const summary = summarizeAggregate(ast);
|
|
3759
3760
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3760
3761
|
/* @__PURE__ */ jsx(SummaryChip, { label: "agg", value: summary.agg, testId: "diag-summary-agg" }),
|
|
@@ -10368,5 +10369,5 @@ function editorPreset(optionsOrDialect = "markdown") {
|
|
|
10368
10369
|
}
|
|
10369
10370
|
|
|
10370
10371
|
export { AGG_OPTIONS, AddCalcDropdown, AddFilterDropdown, CLAUSE_META, CONTENT_SOURCES, ClausePopover, ComposerRegistry, CustomSlotPopover, DEFAULT_DIAGNOSTICS_DEBOUNCE_MS, DefaultFrontmatterWidget, GROUPBY_OPTIONS, GoalRings, METRIC_OPTIONS, MULTI_VALUE_TYPES, ProposedMetricBadge, QueryBlockView, QueryValue, ROLLUP_OPTIONS, RowsResultsChrome, RowsTable, SERIES_COLORS, SOURCE_OPTIONS, SUGGESTION_BINDINGS, StackedBar, TIME_OPTIONS, TokenSlotPill, TopList, UNIT_OPTIONS, WHERE_AGGREGATORS, WHERE_METRICS, WHERE_OPERATORS, WidgetChart, WidgetProblemBadge, WqlBars, WqlComposer, WqlDiagnosticsStrip, WqlEmptyState, WqlQueryInspectorModal, WqlTable, WqlTimeseries, ZoneDistribution, activeCursorSection, addRuntimePanel, blockContentId, blockTypesFromBlocks, catalogIdsFromBlocks, clauseToWql, clauseValue, clausesToWql, cn, compactNumber, composerRegistry, configureOverlayActions, cursorFocusExtension, dateRangeSlot, defaultClauses, defaultMetricsClauses, diagnoseClauses, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editingWidgetsField, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, extractBlockQueries, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, formatTimestamp, frontmatterPreview, frontmatterPreviewField, getClauseMeta, getCursorFocusState, getOverlayActions, getSuggestionBinding, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, hashCode, inlineButtonDecoration, invalidateSuggestions, lineIdsExtension, linkOpen, loadSuggestions, markdownSyntaxHiding, markdownTablePreview, mergeSeries, mergeTagSuggestions, navigationFacet, patchBlockQuery, pivotClauses, previewDecorations, queryBlockPreview, readSessionRpe, removeRuntimePanel, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sessionQueryInsert, sessionQueryWql, setGutterHighlights, setMetricClause, setSuggestionBinding, smartIncrement, sourcePlane, summarizeAggregate, summarizeFind, tagsFromStaticBlocks, toggleWidgetEdit, tooltipTimestamp, urlAtPos, useChartShape, useComposerSlots, useSuggestions, useWqlStageCounts, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wqlToClauses, wrapInTimeFence };
|
|
10371
|
-
//# sourceMappingURL=chunk-
|
|
10372
|
-
//# sourceMappingURL=chunk-
|
|
10372
|
+
//# sourceMappingURL=chunk-3ANAQJ6S.mjs.map
|
|
10373
|
+
//# sourceMappingURL=chunk-3ANAQJ6S.mjs.map
|