@bitcobblers/wod-wiki-ui 0.8.39 → 0.9.40
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-5JJK5ONN.mjs → chunk-LEM2Y37Q.mjs} +16 -10
- package/dist/chunk-LEM2Y37Q.mjs.map +1 -0
- package/dist/extensions/index.cjs +14 -8
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.mjs +1 -1
- package/dist/index.cjs +20 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-5JJK5ONN.mjs.map +0 -1
|
@@ -3111,7 +3111,8 @@ function restoreFilters(rest) {
|
|
|
3111
3111
|
function wqlToClauses(wql2) {
|
|
3112
3112
|
const suffixes = parseWqlSuffixes(wql2.trim());
|
|
3113
3113
|
if (suffixes.conflicts?.length) return null;
|
|
3114
|
-
const { where, displayUnit, groupBy, rollup,
|
|
3114
|
+
const { where, displayUnit, groupBy, rollup, window: window2, legacyScope, primaryText } = suffixes;
|
|
3115
|
+
if (window2?.kind === "range") return null;
|
|
3115
3116
|
const rowsMatch = /^rows(?:\:([a-zA-Z0-9_-]+))?\:?/.exec(primaryText);
|
|
3116
3117
|
if (rowsMatch) {
|
|
3117
3118
|
if (where || groupBy || rollup) return null;
|
|
@@ -3120,7 +3121,7 @@ function wqlToClauses(wql2) {
|
|
|
3120
3121
|
if (!filterClauses2) return null;
|
|
3121
3122
|
const clauses2 = [
|
|
3122
3123
|
restoreClause("c-source", "source", "rows"),
|
|
3123
|
-
restoreClause("c-time", "time",
|
|
3124
|
+
restoreClause("c-time", "time", window2?.kind === "relative" ? `last ${window2.size}${window2.unit}` : "all"),
|
|
3124
3125
|
...rowsMatch[1] ? [restoreClause("c-output", "output", rowsMatch[1])] : [],
|
|
3125
3126
|
...filterClauses2
|
|
3126
3127
|
];
|
|
@@ -3134,17 +3135,20 @@ function wqlToClauses(wql2) {
|
|
|
3134
3135
|
const rest2 = primaryText.slice(headMatch2[0].length).trim();
|
|
3135
3136
|
const filterClauses2 = restoreFilters(rest2);
|
|
3136
3137
|
if (!filterClauses2) return null;
|
|
3137
|
-
const timeValue =
|
|
3138
|
-
const
|
|
3138
|
+
const timeValue = window2?.kind === "relative" ? `last ${window2.size}${window2.unit}` : "all";
|
|
3139
|
+
const sourceClauseIdx = filterClauses2.findIndex((c) => c.type === "source");
|
|
3140
|
+
const sourceFromFilter = sourceClauseIdx !== -1 ? filterClauses2[sourceClauseIdx].value : void 0;
|
|
3141
|
+
const scopeValue = legacyScope ?? sourceFromFilter;
|
|
3142
|
+
const remainingFilterClauses = sourceClauseIdx !== -1 ? filterClauses2.filter((_, idx) => idx !== sourceClauseIdx) : filterClauses2;
|
|
3139
3143
|
const sourceValue = targetValue === "block" ? "blocks" : targetValue === "effort" ? "efforts" : !scopeValue || scopeValue === "all" ? "notes" : scopeValue;
|
|
3140
3144
|
const clauses2 = [
|
|
3141
3145
|
restoreClause("c-source", "source", sourceValue),
|
|
3142
3146
|
restoreClause("c-time", "time", timeValue),
|
|
3143
|
-
...
|
|
3147
|
+
...remainingFilterClauses
|
|
3144
3148
|
];
|
|
3145
|
-
if (where) clauses2.push(restoreClause("c-where", "where", where));
|
|
3146
3149
|
return clauses2;
|
|
3147
3150
|
}
|
|
3151
|
+
if (window2) return null;
|
|
3148
3152
|
const headMatch = RESTORE_AGG_HEAD_RE.exec(primaryText);
|
|
3149
3153
|
if (!headMatch) return null;
|
|
3150
3154
|
const aggValue = headMatch[1];
|
|
@@ -3651,10 +3655,12 @@ function AddCalcDropdown({
|
|
|
3651
3655
|
] });
|
|
3652
3656
|
}
|
|
3653
3657
|
function summarizeFind(ast) {
|
|
3658
|
+
const sourceFilter = ast.filters.find((f) => f.key === "source");
|
|
3659
|
+
const scope = sourceFilter ? sourceFilter.values.map((v) => v.value).join(",") : "all";
|
|
3654
3660
|
return {
|
|
3655
3661
|
target: ast.target,
|
|
3656
|
-
scope
|
|
3657
|
-
timeWindow: ast.
|
|
3662
|
+
scope,
|
|
3663
|
+
timeWindow: ast.window ? ast.window.kind === "relative" ? `last ${ast.window.size}${ast.window.unit}` : `from ${ast.window.start}${ast.window.end ? ` to ${ast.window.end}` : ""}` : void 0,
|
|
3658
3664
|
hasJoin: Boolean(ast.join),
|
|
3659
3665
|
filterCount: ast.filters.length
|
|
3660
3666
|
};
|
|
@@ -10370,5 +10376,5 @@ function editorPreset(optionsOrDialect = "markdown") {
|
|
|
10370
10376
|
}
|
|
10371
10377
|
|
|
10372
10378
|
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 };
|
|
10373
|
-
//# sourceMappingURL=chunk-
|
|
10374
|
-
//# sourceMappingURL=chunk-
|
|
10379
|
+
//# sourceMappingURL=chunk-LEM2Y37Q.mjs.map
|
|
10380
|
+
//# sourceMappingURL=chunk-LEM2Y37Q.mjs.map
|