@ai-matrx/design-system 0.49.54 → 0.49.55
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/CHANGELOG.md +8 -0
- package/dist/data-table/copy-helpers.d.cts +2 -2
- package/dist/data-table/copy-helpers.d.ts +2 -2
- package/dist/data-table/drill-chart.cjs +44 -6
- package/dist/data-table/drill-chart.cjs.map +1 -1
- package/dist/data-table/drill-chart.d.cts +8 -3
- package/dist/data-table/drill-chart.d.ts +8 -3
- package/dist/data-table/drill-chart.js +44 -6
- package/dist/data-table/drill-chart.js.map +1 -1
- package/dist/data-table/filter-engine.d.cts +2 -2
- package/dist/data-table/filter-engine.d.ts +2 -2
- package/dist/data-table/host.d.cts +2 -2
- package/dist/data-table/host.d.ts +2 -2
- package/dist/data-table/index.cjs +116 -40
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +28 -6
- package/dist/data-table/index.d.ts +28 -6
- package/dist/data-table/index.js +116 -40
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/infer-filter.d.cts +2 -2
- package/dist/data-table/infer-filter.d.ts +2 -2
- package/dist/data-table/layered-filters.d.cts +2 -2
- package/dist/data-table/layered-filters.d.ts +2 -2
- package/dist/data-table/query-control.d.cts +2 -2
- package/dist/data-table/query-control.d.ts +2 -2
- package/dist/data-table/types.d.cts +2 -2
- package/dist/data-table/types.d.ts +2 -2
- package/dist/data-table/url-state.d.cts +2 -2
- package/dist/data-table/url-state.d.ts +2 -2
- package/dist/data-table/xlsx.d.cts +2 -2
- package/dist/data-table/xlsx.d.ts +2 -2
- package/dist/{drill-cISpem5b.d.cts → drill-qJ5gHL2F.d.cts} +11 -0
- package/dist/{drill-cISpem5b.d.ts → drill-qJ5gHL2F.d.ts} +11 -0
- package/dist/{layered-filters-ma_P0GDG.d.ts → layered-filters-CTdPPgxf.d.ts} +1 -1
- package/dist/{layered-filters-RHe2Kzrs.d.cts → layered-filters-HFquDviC.d.cts} +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { h as MatrxDataTableProps, i as MatrxDataTableAppearance, j as TableViewSnapshot, d as MatrxDataTableRecordControls, k as MatrxDataTableRead, l as ColumnMarker, M as MatrxColumnDef } from '../layered-filters-
|
|
4
|
-
export { A as AnyOfColumnSearch, m as CellEditType, n as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, o as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, p as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, q as MatrxDataTableDetailConfig, r as MatrxDataTableDrillConfig, s as MatrxDataTableEditConfig, t as MatrxDataTableEmptyState, u as MatrxDataTableExpandedDetailConfig, v as MatrxDataTableFacetsConfig, w as MatrxDataTableFilterUi, x as MatrxDataTableGroupingConfig, y as MatrxDataTableHierarchyConfig, z as MatrxDataTableHierarchyMove, B as MatrxDataTableMobileCardControls, D as MatrxDataTableMultiExpandedDetailConfig, E as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, F as MatrxDataTableReadStatus, G as MatrxDataTableSelectionConfig, H as MatrxDataTableSingleExpandedDetailConfig, I as MatrxDataTableSourceProcessing, J as MatrxDataTableSpreadsheetConfig, K as MatrxDataTableStyleConfig, N as MatrxDataTableSummaryConfig, O as MatrxDataTableSummaryContext, P as MatrxDataTableSummaryMetric, Q as MatrxDataTableToolbar, R as MatrxDataTableUrlStateConfig, U as MatrxDataTableVirtualizeConfig, V as MatrxDataTableWindowConfig, W as MatrxTablePagination, X as NumberFilterOp, Y as SavedTableViewTab, Z as SortDirection, S as SortState, _ as SpreadsheetSelection, $ as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, a0 as TableSearchRole, a1 as TableSearchScope, a2 as TableViewQuery, a3 as TableViewTab, a4 as TableViewTabs, a5 as TableViewTabsProps, a6 as TableViewTabsStore, a7 as TextFilterMode, a8 as ToolbarFacet, a9 as inferTableSearchRole, aa as rankTableSearchRows, ab as resolveTableSearchScopes } from '../layered-filters-
|
|
3
|
+
import { h as MatrxDataTableProps, i as MatrxDataTableAppearance, j as TableViewSnapshot, d as MatrxDataTableRecordControls, k as MatrxDataTableRead, l as ColumnMarker, M as MatrxColumnDef } from '../layered-filters-HFquDviC.cjs';
|
|
4
|
+
export { A as AnyOfColumnSearch, m as CellEditType, n as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, o as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, p as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, q as MatrxDataTableDetailConfig, r as MatrxDataTableDrillConfig, s as MatrxDataTableEditConfig, t as MatrxDataTableEmptyState, u as MatrxDataTableExpandedDetailConfig, v as MatrxDataTableFacetsConfig, w as MatrxDataTableFilterUi, x as MatrxDataTableGroupingConfig, y as MatrxDataTableHierarchyConfig, z as MatrxDataTableHierarchyMove, B as MatrxDataTableMobileCardControls, D as MatrxDataTableMultiExpandedDetailConfig, E as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, F as MatrxDataTableReadStatus, G as MatrxDataTableSelectionConfig, H as MatrxDataTableSingleExpandedDetailConfig, I as MatrxDataTableSourceProcessing, J as MatrxDataTableSpreadsheetConfig, K as MatrxDataTableStyleConfig, N as MatrxDataTableSummaryConfig, O as MatrxDataTableSummaryContext, P as MatrxDataTableSummaryMetric, Q as MatrxDataTableToolbar, R as MatrxDataTableUrlStateConfig, U as MatrxDataTableVirtualizeConfig, V as MatrxDataTableWindowConfig, W as MatrxTablePagination, X as NumberFilterOp, Y as SavedTableViewTab, Z as SortDirection, S as SortState, _ as SpreadsheetSelection, $ as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, a0 as TableSearchRole, a1 as TableSearchScope, a2 as TableViewQuery, a3 as TableViewTab, a4 as TableViewTabs, a5 as TableViewTabsProps, a6 as TableViewTabsStore, a7 as TextFilterMode, a8 as ToolbarFacet, a9 as inferTableSearchRole, aa as rankTableSearchRows, ab as resolveTableSearchScopes } from '../layered-filters-HFquDviC.cjs';
|
|
5
5
|
import { TableReadFailureProps, TableStaleNoticeProps } from './host.cjs';
|
|
6
6
|
export { MatrxDataTableHost, MatrxDataTableProvider, MatrxTableRowAlchemy, TableContextMenuBoundaryProps, TableDoors, TableEntityRefProps, TableLinkProps, TableMenuIconProps, TablePeekProps, TableSidePanelProps, TableToolbarActionProps, TableWindowPanelProps, useMatrxDataTableHost, useMatrxTableRowAlchemy } from './host.cjs';
|
|
7
7
|
import { CopyControlProps, AgentPayloadInput } from './copy-types.cjs';
|
|
@@ -26,8 +26,8 @@ export { DEFAULT_UNDO_DEPTH, UndoEntry, UndoStack, canRedo, canUndo, createUndoS
|
|
|
26
26
|
export { CELL_EDITOR_ATTR, GRID_COMPANION_ATTR, SpreadsheetCellProps, SpreadsheetController, SpreadsheetEditExit, SpreadsheetGrid, SpreadsheetGridOptions, SpreadsheetIntent, SpreadsheetPastePlan, useSpreadsheetGrid } from './spreadsheet.cjs';
|
|
27
27
|
export { PasteCell, PastePlan, cellClipboardText, gridToTsv, isSingleCell, parseClipboardGrid, planPaste, storedValuesEqual } from './grid-clipboard.cjs';
|
|
28
28
|
export { CellAddress, CellRange, GridKeyAction, GridMove, RangeBounds, allRange, boundsContain, cellDomKey, cellsInRange, classifyGridKey, columnRange, directClickKinds, isDirectClickEditor, isSingleCellRange, moveSelection, rangeBounds, rangeRows, rangeSize, rowRange, sameCell } from './grid-selection.cjs';
|
|
29
|
-
import { v as MatrxDrillNode, b as MatrxDrillQuestion, M as MatrxDrillDimension, a as MatrxDrillMeasure, w as MatrxDrillAnswerRow, u as MatrxDrillAnswers, x as MatrxDrillWindowPreset } from '../drill-
|
|
30
|
-
export { y as MATRX_DRILL_CALENDAR_WINDOWS, d as MATRX_DRILL_CHART_CEILING, e as MATRX_DRILL_CHART_OTHER, f as MATRX_DRILL_CHART_SERIES_LIMIT, z as MATRX_DRILL_DEFAULT_GRAINS, A as MATRX_DRILL_GRAINS, B as MATRX_DRILL_MAX_LEVELS, C as MATRX_DRILL_NONE, D as MATRX_DRILL_OTHER_COLUMN, E as MATRX_DRILL_PIVOT_COLUMNS, F as MATRX_DRILL_WINDOWS, G as MATRX_DRILL_WINDOW_PRESETS, c as MatrxDrillChartAnswers, g as MatrxDrillChartContext, h as MatrxDrillChartData, i as MatrxDrillChartPeriod, j as MatrxDrillChartPlan, k as MatrxDrillChartRequest, l as MatrxDrillChartRequestKey, m as MatrxDrillChartRow, n as MatrxDrillChartSeries, H as MatrxDrillCompare, I as MatrxDrillCrumb, J as MatrxDrillDimensionKind, K as MatrxDrillFilter, L as MatrxDrillGrain, N as MatrxDrillGridLine, O as MatrxDrillOther, P as MatrxDrillPivotColumn, Q as MatrxDrillRequest, R as addressHasDrill, S as bucketLabel, T as bucketWindow, U as buildDrillTree, V as dimensionFor, W as dimensionRefLabel, X as dimensionRefs, Y as drillAnswerCsv, Z as drillAnswerGrid, _ as drillAnswerText, $ as drillAutoGrain, o as drillChartCellsQuestion, p as drillChartData, q as drillChartDrill, r as drillChartNarrowToPeriod, s as drillChartQuestions, t as drillChartSeriesKey, a0 as drillCoverage, a1 as drillCrumbs, a2 as drillDelta, a3 as drillInto, a4 as drillIsGrouped, a5 as drillPath, a6 as drillQuestionFromParams, a7 as drillQuestionToParams, a8 as drillRequestKey, a9 as drillRequests, aa as drillShare, ab as drillToRecords, ac as drillTokenColor, ad as drillValueColor, ae as drillValueLabel, af as drillWindowLabel, ag as drillWindowMoment, ah as drillWindowRange, ai as emptyDrillQuestion, aj as nextDrillLevel, ak as otherOf, al as parseDimensionRef, am as pivotCell, an as pivotColumns, ao as sameDrillQuestion, ap as zoomOutTo } from '../drill-
|
|
29
|
+
import { v as MatrxDrillNode, b as MatrxDrillQuestion, M as MatrxDrillDimension, a as MatrxDrillMeasure, w as MatrxDrillAnswerRow, u as MatrxDrillAnswers, x as MatrxDrillWindowPreset } from '../drill-qJ5gHL2F.cjs';
|
|
30
|
+
export { y as MATRX_DRILL_CALENDAR_WINDOWS, d as MATRX_DRILL_CHART_CEILING, e as MATRX_DRILL_CHART_OTHER, f as MATRX_DRILL_CHART_SERIES_LIMIT, z as MATRX_DRILL_DEFAULT_GRAINS, A as MATRX_DRILL_GRAINS, B as MATRX_DRILL_MAX_LEVELS, C as MATRX_DRILL_NONE, D as MATRX_DRILL_OTHER_COLUMN, E as MATRX_DRILL_PIVOT_COLUMNS, F as MATRX_DRILL_WINDOWS, G as MATRX_DRILL_WINDOW_PRESETS, c as MatrxDrillChartAnswers, g as MatrxDrillChartContext, h as MatrxDrillChartData, i as MatrxDrillChartPeriod, j as MatrxDrillChartPlan, k as MatrxDrillChartRequest, l as MatrxDrillChartRequestKey, m as MatrxDrillChartRow, n as MatrxDrillChartSeries, H as MatrxDrillCompare, I as MatrxDrillCrumb, J as MatrxDrillDimensionKind, K as MatrxDrillFilter, L as MatrxDrillGrain, N as MatrxDrillGridLine, O as MatrxDrillOther, P as MatrxDrillPivotColumn, Q as MatrxDrillRequest, R as addressHasDrill, S as bucketLabel, T as bucketWindow, U as buildDrillTree, V as dimensionFor, W as dimensionRefLabel, X as dimensionRefs, Y as drillAnswerCsv, Z as drillAnswerGrid, _ as drillAnswerText, $ as drillAutoGrain, o as drillChartCellsQuestion, p as drillChartData, q as drillChartDrill, r as drillChartNarrowToPeriod, s as drillChartQuestions, t as drillChartSeriesKey, a0 as drillCoverage, a1 as drillCrumbs, a2 as drillDelta, a3 as drillInto, a4 as drillIsGrouped, a5 as drillPath, a6 as drillQuestionFromParams, a7 as drillQuestionToParams, a8 as drillRequestKey, a9 as drillRequests, aa as drillShare, ab as drillToRecords, ac as drillTokenColor, ad as drillValueColor, ae as drillValueLabel, af as drillWindowLabel, ag as drillWindowMoment, ah as drillWindowRange, ai as emptyDrillQuestion, aj as nextDrillLevel, ak as otherOf, al as parseDimensionRef, am as pivotCell, an as pivotColumns, ao as sameDrillQuestion, ap as zoomOutTo } from '../drill-qJ5gHL2F.cjs';
|
|
31
31
|
import '../content-transfer.cjs';
|
|
32
32
|
import '@ai-matrx/kit/content-transfer';
|
|
33
33
|
import '../content-transfer/icon.cjs';
|
|
@@ -561,8 +561,30 @@ interface MatrxDrillAnswerTableProps {
|
|
|
561
561
|
search?: boolean | {
|
|
562
562
|
placeholder?: string | undefined;
|
|
563
563
|
} | undefined;
|
|
564
|
+
/**
|
|
565
|
+
* AT A GLANCE (adopted from the Spend Explorer's costliest requests, lane DRILL-FLIP-FIXES): text
|
|
566
|
+
* columns beside the numbers, each the one value an outermost group holds of another Dimension (a
|
|
567
|
+
* request's person, agent, model). The host reads them; `read` returns undefined while reading.
|
|
568
|
+
* Not drawn on a pivot.
|
|
569
|
+
*/
|
|
570
|
+
attributes?: readonly MatrxDrillAttribute[] | undefined;
|
|
571
|
+
}
|
|
572
|
+
/** One at-a-glance column of the grouped answer (see `attributes`). */
|
|
573
|
+
interface MatrxDrillAttribute {
|
|
574
|
+
key: string;
|
|
575
|
+
label: string;
|
|
576
|
+
/** What it says, at most 140 characters: the header's tooltip. */
|
|
577
|
+
description?: string | undefined;
|
|
578
|
+
/** The value an outermost group holds, in words; null = none; undefined = still being read. */
|
|
579
|
+
read: (groups: Record<string, string | null>) => string | null | undefined;
|
|
564
580
|
}
|
|
565
|
-
|
|
581
|
+
/**
|
|
582
|
+
* THE SORT KEY OF ONE PIVOT COLUMN (lane DRILL-FLIP-FIXES L5, the old users page's sortable "Top
|
|
583
|
+
* origin"): `across:<measure>:<value>` ranks the groups by their cell in that column ("(none)" = the
|
|
584
|
+
* no-value column).
|
|
585
|
+
*/
|
|
586
|
+
declare function drillPivotSortKey(measure: string, value: string | null): string;
|
|
587
|
+
declare function MatrxDrillAnswerTable({ dimensions, measures, question, onQuestionChange, answers, paths, error, rowNoun, emptyLabel, className, coverage, exportTitle, note, pareto, rowActions, pivotColumnCap, search, attributes, }: MatrxDrillAnswerTableProps): React.JSX.Element;
|
|
566
588
|
|
|
567
589
|
declare function MatrxDrillGroupByMenu({ dimensions, question, onQuestionChange, }: {
|
|
568
590
|
dimensions: readonly MatrxDrillDimension[];
|
|
@@ -619,4 +641,4 @@ declare function useDrillUrlState({ fallback, prefix, }: {
|
|
|
619
641
|
prefix?: string | undefined;
|
|
620
642
|
}): DrillUrlState;
|
|
621
643
|
|
|
622
|
-
export { AgentPayloadInput, ColumnMarker, DefaultTableReadFailure, DefaultTableStaleNotice, type DrillUrlState, FORMAT_MISMATCH_CLASS, FormattedCell, type FrozenColumns, MATRX_DRILL_PARETO_SHARE, MatrxColumnDef, MatrxDataTable, MatrxDataTableAppearance, MatrxDataTableProps, MatrxDataTableRead, MatrxDataTableRecordControls, MatrxDrillAnswerRow, MatrxDrillAnswerTable, type MatrxDrillAnswerTableProps, MatrxDrillAnswers, MatrxDrillDimension, MatrxDrillGroupByMenu, MatrxDrillMeasure, MatrxDrillMeasurePicker, MatrxDrillNode, type MatrxDrillPareto, MatrxDrillQuestion, type MatrxDrillRowActions, MatrxDrillTrail, MatrxDrillWindowMenu, MatrxDrillWindowPreset, MatrxTableCard, MatrxTableCardContext, type MatrxTableCardContextValue, MatrxTableCardEmpty, type MatrxTableCardEmptyProps, type MatrxTableCardNoun, type MatrxTableCardProps, MatrxTableCardShowMore, type MatrxTableCardShowMoreProps, type MatrxTableGroupHeaderCell, MatrxTableGroupHeaderRow, type MatrxTableGroupHeaderRowProps, MatrxTableRowAlchemyProvider, NO_FROZEN_COLUMNS, type ResolvedColumnMarker, SavedViewsControl, type SavedViewsControlProps, TABLE_CARD_DEFAULT_INITIAL_ROWS, TOOLBAR_CONTROL_HEIGHT, TableReadFailureProps, type TableReadView, TableStaleNoticeProps, TableTitleRow, type TableTitleRowProps, TableViewSnapshot, type ToggleSelectionArgs, type ToggleSelectionResult, ToolbarListedLabel, ToolbarOverflowMenu, type ToolbarOverflowMode, ToolbarOverflowSheet, alignForFormat, drillGroupText, drillGroupsAgentInput, drillPareto, drillParetoSentence, formatColumnValue, parseTableViewSnapshot, pixelWidth, resolveColumnMarker, resolveFrozenColumns, tableReadView, toggleSelection, useDrillUrlState, useMatrxTableCard, useToolbarListed };
|
|
644
|
+
export { AgentPayloadInput, ColumnMarker, DefaultTableReadFailure, DefaultTableStaleNotice, type DrillUrlState, FORMAT_MISMATCH_CLASS, FormattedCell, type FrozenColumns, MATRX_DRILL_PARETO_SHARE, MatrxColumnDef, MatrxDataTable, MatrxDataTableAppearance, MatrxDataTableProps, MatrxDataTableRead, MatrxDataTableRecordControls, MatrxDrillAnswerRow, MatrxDrillAnswerTable, type MatrxDrillAnswerTableProps, MatrxDrillAnswers, type MatrxDrillAttribute, MatrxDrillDimension, MatrxDrillGroupByMenu, MatrxDrillMeasure, MatrxDrillMeasurePicker, MatrxDrillNode, type MatrxDrillPareto, MatrxDrillQuestion, type MatrxDrillRowActions, MatrxDrillTrail, MatrxDrillWindowMenu, MatrxDrillWindowPreset, MatrxTableCard, MatrxTableCardContext, type MatrxTableCardContextValue, MatrxTableCardEmpty, type MatrxTableCardEmptyProps, type MatrxTableCardNoun, type MatrxTableCardProps, MatrxTableCardShowMore, type MatrxTableCardShowMoreProps, type MatrxTableGroupHeaderCell, MatrxTableGroupHeaderRow, type MatrxTableGroupHeaderRowProps, MatrxTableRowAlchemyProvider, NO_FROZEN_COLUMNS, type ResolvedColumnMarker, SavedViewsControl, type SavedViewsControlProps, TABLE_CARD_DEFAULT_INITIAL_ROWS, TOOLBAR_CONTROL_HEIGHT, TableReadFailureProps, type TableReadView, TableStaleNoticeProps, TableTitleRow, type TableTitleRowProps, TableViewSnapshot, type ToggleSelectionArgs, type ToggleSelectionResult, ToolbarListedLabel, ToolbarOverflowMenu, type ToolbarOverflowMode, ToolbarOverflowSheet, alignForFormat, drillGroupText, drillGroupsAgentInput, drillPareto, drillParetoSentence, drillPivotSortKey, formatColumnValue, parseTableViewSnapshot, pixelWidth, resolveColumnMarker, resolveFrozenColumns, tableReadView, toggleSelection, useDrillUrlState, useMatrxTableCard, useToolbarListed };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { h as MatrxDataTableProps, i as MatrxDataTableAppearance, j as TableViewSnapshot, d as MatrxDataTableRecordControls, k as MatrxDataTableRead, l as ColumnMarker, M as MatrxColumnDef } from '../layered-filters-
|
|
4
|
-
export { A as AnyOfColumnSearch, m as CellEditType, n as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, o as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, p as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, q as MatrxDataTableDetailConfig, r as MatrxDataTableDrillConfig, s as MatrxDataTableEditConfig, t as MatrxDataTableEmptyState, u as MatrxDataTableExpandedDetailConfig, v as MatrxDataTableFacetsConfig, w as MatrxDataTableFilterUi, x as MatrxDataTableGroupingConfig, y as MatrxDataTableHierarchyConfig, z as MatrxDataTableHierarchyMove, B as MatrxDataTableMobileCardControls, D as MatrxDataTableMultiExpandedDetailConfig, E as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, F as MatrxDataTableReadStatus, G as MatrxDataTableSelectionConfig, H as MatrxDataTableSingleExpandedDetailConfig, I as MatrxDataTableSourceProcessing, J as MatrxDataTableSpreadsheetConfig, K as MatrxDataTableStyleConfig, N as MatrxDataTableSummaryConfig, O as MatrxDataTableSummaryContext, P as MatrxDataTableSummaryMetric, Q as MatrxDataTableToolbar, R as MatrxDataTableUrlStateConfig, U as MatrxDataTableVirtualizeConfig, V as MatrxDataTableWindowConfig, W as MatrxTablePagination, X as NumberFilterOp, Y as SavedTableViewTab, Z as SortDirection, S as SortState, _ as SpreadsheetSelection, $ as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, a0 as TableSearchRole, a1 as TableSearchScope, a2 as TableViewQuery, a3 as TableViewTab, a4 as TableViewTabs, a5 as TableViewTabsProps, a6 as TableViewTabsStore, a7 as TextFilterMode, a8 as ToolbarFacet, a9 as inferTableSearchRole, aa as rankTableSearchRows, ab as resolveTableSearchScopes } from '../layered-filters-
|
|
3
|
+
import { h as MatrxDataTableProps, i as MatrxDataTableAppearance, j as TableViewSnapshot, d as MatrxDataTableRecordControls, k as MatrxDataTableRead, l as ColumnMarker, M as MatrxColumnDef } from '../layered-filters-CTdPPgxf.js';
|
|
4
|
+
export { A as AnyOfColumnSearch, m as CellEditType, n as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, o as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, p as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, q as MatrxDataTableDetailConfig, r as MatrxDataTableDrillConfig, s as MatrxDataTableEditConfig, t as MatrxDataTableEmptyState, u as MatrxDataTableExpandedDetailConfig, v as MatrxDataTableFacetsConfig, w as MatrxDataTableFilterUi, x as MatrxDataTableGroupingConfig, y as MatrxDataTableHierarchyConfig, z as MatrxDataTableHierarchyMove, B as MatrxDataTableMobileCardControls, D as MatrxDataTableMultiExpandedDetailConfig, E as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, F as MatrxDataTableReadStatus, G as MatrxDataTableSelectionConfig, H as MatrxDataTableSingleExpandedDetailConfig, I as MatrxDataTableSourceProcessing, J as MatrxDataTableSpreadsheetConfig, K as MatrxDataTableStyleConfig, N as MatrxDataTableSummaryConfig, O as MatrxDataTableSummaryContext, P as MatrxDataTableSummaryMetric, Q as MatrxDataTableToolbar, R as MatrxDataTableUrlStateConfig, U as MatrxDataTableVirtualizeConfig, V as MatrxDataTableWindowConfig, W as MatrxTablePagination, X as NumberFilterOp, Y as SavedTableViewTab, Z as SortDirection, S as SortState, _ as SpreadsheetSelection, $ as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, a0 as TableSearchRole, a1 as TableSearchScope, a2 as TableViewQuery, a3 as TableViewTab, a4 as TableViewTabs, a5 as TableViewTabsProps, a6 as TableViewTabsStore, a7 as TextFilterMode, a8 as ToolbarFacet, a9 as inferTableSearchRole, aa as rankTableSearchRows, ab as resolveTableSearchScopes } from '../layered-filters-CTdPPgxf.js';
|
|
5
5
|
import { TableReadFailureProps, TableStaleNoticeProps } from './host.js';
|
|
6
6
|
export { MatrxDataTableHost, MatrxDataTableProvider, MatrxTableRowAlchemy, TableContextMenuBoundaryProps, TableDoors, TableEntityRefProps, TableLinkProps, TableMenuIconProps, TablePeekProps, TableSidePanelProps, TableToolbarActionProps, TableWindowPanelProps, useMatrxDataTableHost, useMatrxTableRowAlchemy } from './host.js';
|
|
7
7
|
import { CopyControlProps, AgentPayloadInput } from './copy-types.js';
|
|
@@ -26,8 +26,8 @@ export { DEFAULT_UNDO_DEPTH, UndoEntry, UndoStack, canRedo, canUndo, createUndoS
|
|
|
26
26
|
export { CELL_EDITOR_ATTR, GRID_COMPANION_ATTR, SpreadsheetCellProps, SpreadsheetController, SpreadsheetEditExit, SpreadsheetGrid, SpreadsheetGridOptions, SpreadsheetIntent, SpreadsheetPastePlan, useSpreadsheetGrid } from './spreadsheet.js';
|
|
27
27
|
export { PasteCell, PastePlan, cellClipboardText, gridToTsv, isSingleCell, parseClipboardGrid, planPaste, storedValuesEqual } from './grid-clipboard.js';
|
|
28
28
|
export { CellAddress, CellRange, GridKeyAction, GridMove, RangeBounds, allRange, boundsContain, cellDomKey, cellsInRange, classifyGridKey, columnRange, directClickKinds, isDirectClickEditor, isSingleCellRange, moveSelection, rangeBounds, rangeRows, rangeSize, rowRange, sameCell } from './grid-selection.js';
|
|
29
|
-
import { v as MatrxDrillNode, b as MatrxDrillQuestion, M as MatrxDrillDimension, a as MatrxDrillMeasure, w as MatrxDrillAnswerRow, u as MatrxDrillAnswers, x as MatrxDrillWindowPreset } from '../drill-
|
|
30
|
-
export { y as MATRX_DRILL_CALENDAR_WINDOWS, d as MATRX_DRILL_CHART_CEILING, e as MATRX_DRILL_CHART_OTHER, f as MATRX_DRILL_CHART_SERIES_LIMIT, z as MATRX_DRILL_DEFAULT_GRAINS, A as MATRX_DRILL_GRAINS, B as MATRX_DRILL_MAX_LEVELS, C as MATRX_DRILL_NONE, D as MATRX_DRILL_OTHER_COLUMN, E as MATRX_DRILL_PIVOT_COLUMNS, F as MATRX_DRILL_WINDOWS, G as MATRX_DRILL_WINDOW_PRESETS, c as MatrxDrillChartAnswers, g as MatrxDrillChartContext, h as MatrxDrillChartData, i as MatrxDrillChartPeriod, j as MatrxDrillChartPlan, k as MatrxDrillChartRequest, l as MatrxDrillChartRequestKey, m as MatrxDrillChartRow, n as MatrxDrillChartSeries, H as MatrxDrillCompare, I as MatrxDrillCrumb, J as MatrxDrillDimensionKind, K as MatrxDrillFilter, L as MatrxDrillGrain, N as MatrxDrillGridLine, O as MatrxDrillOther, P as MatrxDrillPivotColumn, Q as MatrxDrillRequest, R as addressHasDrill, S as bucketLabel, T as bucketWindow, U as buildDrillTree, V as dimensionFor, W as dimensionRefLabel, X as dimensionRefs, Y as drillAnswerCsv, Z as drillAnswerGrid, _ as drillAnswerText, $ as drillAutoGrain, o as drillChartCellsQuestion, p as drillChartData, q as drillChartDrill, r as drillChartNarrowToPeriod, s as drillChartQuestions, t as drillChartSeriesKey, a0 as drillCoverage, a1 as drillCrumbs, a2 as drillDelta, a3 as drillInto, a4 as drillIsGrouped, a5 as drillPath, a6 as drillQuestionFromParams, a7 as drillQuestionToParams, a8 as drillRequestKey, a9 as drillRequests, aa as drillShare, ab as drillToRecords, ac as drillTokenColor, ad as drillValueColor, ae as drillValueLabel, af as drillWindowLabel, ag as drillWindowMoment, ah as drillWindowRange, ai as emptyDrillQuestion, aj as nextDrillLevel, ak as otherOf, al as parseDimensionRef, am as pivotCell, an as pivotColumns, ao as sameDrillQuestion, ap as zoomOutTo } from '../drill-
|
|
29
|
+
import { v as MatrxDrillNode, b as MatrxDrillQuestion, M as MatrxDrillDimension, a as MatrxDrillMeasure, w as MatrxDrillAnswerRow, u as MatrxDrillAnswers, x as MatrxDrillWindowPreset } from '../drill-qJ5gHL2F.js';
|
|
30
|
+
export { y as MATRX_DRILL_CALENDAR_WINDOWS, d as MATRX_DRILL_CHART_CEILING, e as MATRX_DRILL_CHART_OTHER, f as MATRX_DRILL_CHART_SERIES_LIMIT, z as MATRX_DRILL_DEFAULT_GRAINS, A as MATRX_DRILL_GRAINS, B as MATRX_DRILL_MAX_LEVELS, C as MATRX_DRILL_NONE, D as MATRX_DRILL_OTHER_COLUMN, E as MATRX_DRILL_PIVOT_COLUMNS, F as MATRX_DRILL_WINDOWS, G as MATRX_DRILL_WINDOW_PRESETS, c as MatrxDrillChartAnswers, g as MatrxDrillChartContext, h as MatrxDrillChartData, i as MatrxDrillChartPeriod, j as MatrxDrillChartPlan, k as MatrxDrillChartRequest, l as MatrxDrillChartRequestKey, m as MatrxDrillChartRow, n as MatrxDrillChartSeries, H as MatrxDrillCompare, I as MatrxDrillCrumb, J as MatrxDrillDimensionKind, K as MatrxDrillFilter, L as MatrxDrillGrain, N as MatrxDrillGridLine, O as MatrxDrillOther, P as MatrxDrillPivotColumn, Q as MatrxDrillRequest, R as addressHasDrill, S as bucketLabel, T as bucketWindow, U as buildDrillTree, V as dimensionFor, W as dimensionRefLabel, X as dimensionRefs, Y as drillAnswerCsv, Z as drillAnswerGrid, _ as drillAnswerText, $ as drillAutoGrain, o as drillChartCellsQuestion, p as drillChartData, q as drillChartDrill, r as drillChartNarrowToPeriod, s as drillChartQuestions, t as drillChartSeriesKey, a0 as drillCoverage, a1 as drillCrumbs, a2 as drillDelta, a3 as drillInto, a4 as drillIsGrouped, a5 as drillPath, a6 as drillQuestionFromParams, a7 as drillQuestionToParams, a8 as drillRequestKey, a9 as drillRequests, aa as drillShare, ab as drillToRecords, ac as drillTokenColor, ad as drillValueColor, ae as drillValueLabel, af as drillWindowLabel, ag as drillWindowMoment, ah as drillWindowRange, ai as emptyDrillQuestion, aj as nextDrillLevel, ak as otherOf, al as parseDimensionRef, am as pivotCell, an as pivotColumns, ao as sameDrillQuestion, ap as zoomOutTo } from '../drill-qJ5gHL2F.js';
|
|
31
31
|
import '../content-transfer.js';
|
|
32
32
|
import '@ai-matrx/kit/content-transfer';
|
|
33
33
|
import '../content-transfer/icon.js';
|
|
@@ -561,8 +561,30 @@ interface MatrxDrillAnswerTableProps {
|
|
|
561
561
|
search?: boolean | {
|
|
562
562
|
placeholder?: string | undefined;
|
|
563
563
|
} | undefined;
|
|
564
|
+
/**
|
|
565
|
+
* AT A GLANCE (adopted from the Spend Explorer's costliest requests, lane DRILL-FLIP-FIXES): text
|
|
566
|
+
* columns beside the numbers, each the one value an outermost group holds of another Dimension (a
|
|
567
|
+
* request's person, agent, model). The host reads them; `read` returns undefined while reading.
|
|
568
|
+
* Not drawn on a pivot.
|
|
569
|
+
*/
|
|
570
|
+
attributes?: readonly MatrxDrillAttribute[] | undefined;
|
|
571
|
+
}
|
|
572
|
+
/** One at-a-glance column of the grouped answer (see `attributes`). */
|
|
573
|
+
interface MatrxDrillAttribute {
|
|
574
|
+
key: string;
|
|
575
|
+
label: string;
|
|
576
|
+
/** What it says, at most 140 characters: the header's tooltip. */
|
|
577
|
+
description?: string | undefined;
|
|
578
|
+
/** The value an outermost group holds, in words; null = none; undefined = still being read. */
|
|
579
|
+
read: (groups: Record<string, string | null>) => string | null | undefined;
|
|
564
580
|
}
|
|
565
|
-
|
|
581
|
+
/**
|
|
582
|
+
* THE SORT KEY OF ONE PIVOT COLUMN (lane DRILL-FLIP-FIXES L5, the old users page's sortable "Top
|
|
583
|
+
* origin"): `across:<measure>:<value>` ranks the groups by their cell in that column ("(none)" = the
|
|
584
|
+
* no-value column).
|
|
585
|
+
*/
|
|
586
|
+
declare function drillPivotSortKey(measure: string, value: string | null): string;
|
|
587
|
+
declare function MatrxDrillAnswerTable({ dimensions, measures, question, onQuestionChange, answers, paths, error, rowNoun, emptyLabel, className, coverage, exportTitle, note, pareto, rowActions, pivotColumnCap, search, attributes, }: MatrxDrillAnswerTableProps): React.JSX.Element;
|
|
566
588
|
|
|
567
589
|
declare function MatrxDrillGroupByMenu({ dimensions, question, onQuestionChange, }: {
|
|
568
590
|
dimensions: readonly MatrxDrillDimension[];
|
|
@@ -619,4 +641,4 @@ declare function useDrillUrlState({ fallback, prefix, }: {
|
|
|
619
641
|
prefix?: string | undefined;
|
|
620
642
|
}): DrillUrlState;
|
|
621
643
|
|
|
622
|
-
export { AgentPayloadInput, ColumnMarker, DefaultTableReadFailure, DefaultTableStaleNotice, type DrillUrlState, FORMAT_MISMATCH_CLASS, FormattedCell, type FrozenColumns, MATRX_DRILL_PARETO_SHARE, MatrxColumnDef, MatrxDataTable, MatrxDataTableAppearance, MatrxDataTableProps, MatrxDataTableRead, MatrxDataTableRecordControls, MatrxDrillAnswerRow, MatrxDrillAnswerTable, type MatrxDrillAnswerTableProps, MatrxDrillAnswers, MatrxDrillDimension, MatrxDrillGroupByMenu, MatrxDrillMeasure, MatrxDrillMeasurePicker, MatrxDrillNode, type MatrxDrillPareto, MatrxDrillQuestion, type MatrxDrillRowActions, MatrxDrillTrail, MatrxDrillWindowMenu, MatrxDrillWindowPreset, MatrxTableCard, MatrxTableCardContext, type MatrxTableCardContextValue, MatrxTableCardEmpty, type MatrxTableCardEmptyProps, type MatrxTableCardNoun, type MatrxTableCardProps, MatrxTableCardShowMore, type MatrxTableCardShowMoreProps, type MatrxTableGroupHeaderCell, MatrxTableGroupHeaderRow, type MatrxTableGroupHeaderRowProps, MatrxTableRowAlchemyProvider, NO_FROZEN_COLUMNS, type ResolvedColumnMarker, SavedViewsControl, type SavedViewsControlProps, TABLE_CARD_DEFAULT_INITIAL_ROWS, TOOLBAR_CONTROL_HEIGHT, TableReadFailureProps, type TableReadView, TableStaleNoticeProps, TableTitleRow, type TableTitleRowProps, TableViewSnapshot, type ToggleSelectionArgs, type ToggleSelectionResult, ToolbarListedLabel, ToolbarOverflowMenu, type ToolbarOverflowMode, ToolbarOverflowSheet, alignForFormat, drillGroupText, drillGroupsAgentInput, drillPareto, drillParetoSentence, formatColumnValue, parseTableViewSnapshot, pixelWidth, resolveColumnMarker, resolveFrozenColumns, tableReadView, toggleSelection, useDrillUrlState, useMatrxTableCard, useToolbarListed };
|
|
644
|
+
export { AgentPayloadInput, ColumnMarker, DefaultTableReadFailure, DefaultTableStaleNotice, type DrillUrlState, FORMAT_MISMATCH_CLASS, FormattedCell, type FrozenColumns, MATRX_DRILL_PARETO_SHARE, MatrxColumnDef, MatrxDataTable, MatrxDataTableAppearance, MatrxDataTableProps, MatrxDataTableRead, MatrxDataTableRecordControls, MatrxDrillAnswerRow, MatrxDrillAnswerTable, type MatrxDrillAnswerTableProps, MatrxDrillAnswers, type MatrxDrillAttribute, MatrxDrillDimension, MatrxDrillGroupByMenu, MatrxDrillMeasure, MatrxDrillMeasurePicker, MatrxDrillNode, type MatrxDrillPareto, MatrxDrillQuestion, type MatrxDrillRowActions, MatrxDrillTrail, MatrxDrillWindowMenu, MatrxDrillWindowPreset, MatrxTableCard, MatrxTableCardContext, type MatrxTableCardContextValue, MatrxTableCardEmpty, type MatrxTableCardEmptyProps, type MatrxTableCardNoun, type MatrxTableCardProps, MatrxTableCardShowMore, type MatrxTableCardShowMoreProps, type MatrxTableGroupHeaderCell, MatrxTableGroupHeaderRow, type MatrxTableGroupHeaderRowProps, MatrxTableRowAlchemyProvider, NO_FROZEN_COLUMNS, type ResolvedColumnMarker, SavedViewsControl, type SavedViewsControlProps, TABLE_CARD_DEFAULT_INITIAL_ROWS, TOOLBAR_CONTROL_HEIGHT, TableReadFailureProps, type TableReadView, TableStaleNoticeProps, TableTitleRow, type TableTitleRowProps, TableViewSnapshot, type ToggleSelectionArgs, type ToggleSelectionResult, ToolbarListedLabel, ToolbarOverflowMenu, type ToolbarOverflowMode, ToolbarOverflowSheet, alignForFormat, drillGroupText, drillGroupsAgentInput, drillPareto, drillParetoSentence, drillPivotSortKey, formatColumnValue, parseTableViewSnapshot, pixelWidth, resolveColumnMarker, resolveFrozenColumns, tableReadView, toggleSelection, useDrillUrlState, useMatrxTableCard, useToolbarListed };
|
package/dist/data-table/index.js
CHANGED
|
@@ -44222,7 +44222,7 @@ function otherOf(parent, children, measures) {
|
|
|
44222
44222
|
}
|
|
44223
44223
|
return { row_count: rest, measures: out };
|
|
44224
44224
|
}
|
|
44225
|
-
function sortRows(rows, ref, sort) {
|
|
44225
|
+
function sortRows(rows, ref, sort, cellOf) {
|
|
44226
44226
|
if (!sort) return rows;
|
|
44227
44227
|
const dir = sort.direction === "asc" ? 1 : -1;
|
|
44228
44228
|
return [...rows].sort((a, b) => {
|
|
@@ -44235,6 +44235,13 @@ function sortRows(rows, ref, sort) {
|
|
|
44235
44235
|
return av2.localeCompare(bv2, void 0, { numeric: true }) * dir;
|
|
44236
44236
|
}
|
|
44237
44237
|
const read = (row) => {
|
|
44238
|
+
if (sort.key.startsWith("across:")) {
|
|
44239
|
+
const rest = sort.key.slice(7);
|
|
44240
|
+
const at2 = rest.indexOf(":");
|
|
44241
|
+
if (at2 < 0 || !cellOf) return null;
|
|
44242
|
+
const value = rest.slice(at2 + 1);
|
|
44243
|
+
return cellOf(row, rest.slice(0, at2), value === "(none)" ? null : value);
|
|
44244
|
+
}
|
|
44238
44245
|
if (sort.key.startsWith("delta:")) {
|
|
44239
44246
|
const key = sort.key.slice(6);
|
|
44240
44247
|
return drillDelta(row.measures[key], row.prior_measures?.[key]).change;
|
|
@@ -44264,10 +44271,17 @@ function buildDrillTree(question, answers, measures) {
|
|
|
44264
44271
|
const build = (level, parentGroups, parentKey) => {
|
|
44265
44272
|
const ref = by[level];
|
|
44266
44273
|
const sort = question.sort ?? (parseDimensionRef(ref).grain ? { key: "label", direction: "asc" } : null);
|
|
44274
|
+
const across = question.across ?? null;
|
|
44275
|
+
const crossed = across ? answers[drillRequestKey([...by.slice(0, level + 1), across])] : void 0;
|
|
44267
44276
|
const rows = sortRows(
|
|
44268
44277
|
(levels[level] ?? []).filter((row) => matches(row, parentGroups)),
|
|
44269
44278
|
ref,
|
|
44270
|
-
sort
|
|
44279
|
+
sort,
|
|
44280
|
+
across && crossed ? (row, measure, value) => {
|
|
44281
|
+
const groups = { ...parentGroups, [ref]: row.groups[ref] ?? null };
|
|
44282
|
+
const hit = crossed.find((r) => matches(r, groups) && (r.groups[across] ?? null) === value);
|
|
44283
|
+
return hit ? hit.measures[measure] ?? null : null;
|
|
44284
|
+
} : void 0
|
|
44271
44285
|
);
|
|
44272
44286
|
return rows.map((row) => {
|
|
44273
44287
|
const groups = { ...parentGroups, [ref]: row.groups[ref] ?? null };
|
|
@@ -44547,9 +44561,16 @@ function drillChartQuestions(question, seriesLimit = MATRX_DRILL_CHART_SERIES_LI
|
|
|
44547
44561
|
const timeInBy = question.by.find((ref) => parseDimensionRef(ref).grain !== null);
|
|
44548
44562
|
const firstTime = context.dimensions.find((d) => d.kind === "time");
|
|
44549
44563
|
const time = timeInBy ?? context.time ?? (firstTime ? `${firstTime.key}:${drillAutoGrain(question.window ?? null, context.now, firstTime.grains ?? MATRX_DRILL_DEFAULT_GRAINS)}` : null);
|
|
44550
|
-
const
|
|
44564
|
+
const stack = context.stack && context.stack.length >= 2 ? [...context.stack] : null;
|
|
44565
|
+
const split = stack ? null : question.by.find((ref) => parseDimensionRef(ref).grain === null && dimensionFor(context.dimensions, ref)?.kind !== "time") ?? null;
|
|
44551
44566
|
const refuse = (sentence) => ({ ...base, time, split, refused: sentence, first: [], periodsHint: null });
|
|
44552
44567
|
if (!time) return refuse("This answer has no time to chart it over.");
|
|
44568
|
+
if (stack) {
|
|
44569
|
+
const missing = stack.find((k) => !context.measures.some((m) => m.key === k));
|
|
44570
|
+
if (missing) return refuse(`There is no Measure "${missing}" to chart.`);
|
|
44571
|
+
const loose = stack.map((k) => context.measures.find((m) => m.key === k)).find((m) => !m.additive || m.moment);
|
|
44572
|
+
if (loose) return refuse(`${loose.label} does not add up, so it cannot be stacked.`);
|
|
44573
|
+
}
|
|
44553
44574
|
if (!measure) return refuse(`There is no Measure "${measureKey}" to chart.`);
|
|
44554
44575
|
if (split && !measure.additive) {
|
|
44555
44576
|
return refuse(
|
|
@@ -44562,13 +44583,13 @@ function drillChartQuestions(question, seriesLimit = MATRX_DRILL_CHART_SERIES_LI
|
|
|
44562
44583
|
const periodsHint = Number.isFinite(days2) && days2 > 0 ? Math.ceil(days2 / GRAIN_DAYS[grain]) + 1 : null;
|
|
44563
44584
|
const where = trailWhere(question);
|
|
44564
44585
|
const window2 = question.window ?? null;
|
|
44565
|
-
const show = [measureKey];
|
|
44586
|
+
const show = stack ?? [measureKey];
|
|
44566
44587
|
const first = [];
|
|
44567
44588
|
if (split) {
|
|
44568
44589
|
first.push({ key: "series", by: [split], where, show, sort: { key: measureKey, direction: "desc" }, limit, window: window2 });
|
|
44569
44590
|
}
|
|
44570
44591
|
first.push({ key: "periods", by: [time], where, show, sort: null, limit: periodsHint ? clampLimit(periodsHint, ceiling) : null, window: window2 });
|
|
44571
|
-
return { ...base, time, split, refused: null, first, periodsHint };
|
|
44592
|
+
return { ...base, ...stack ? { measure: stack[0], stack } : {}, time, split, refused: null, first, periodsHint };
|
|
44572
44593
|
}
|
|
44573
44594
|
function drillChartCellsQuestion(plan, question, series) {
|
|
44574
44595
|
if (plan.refused || !plan.split || !plan.time) return null;
|
|
@@ -44642,6 +44663,35 @@ function drillChartData(plan, answers, dimensions, measures, emptyLabel = "No va
|
|
|
44642
44663
|
values: {}
|
|
44643
44664
|
};
|
|
44644
44665
|
});
|
|
44666
|
+
if (plan.stack) {
|
|
44667
|
+
const keys2 = plan.stack;
|
|
44668
|
+
const readOf = (row, k) => {
|
|
44669
|
+
const v = row?.measures[k];
|
|
44670
|
+
return v === null || v === void 0 ? null : v;
|
|
44671
|
+
};
|
|
44672
|
+
const totalRow = periodRows.find((r) => rowKind(r) === "total");
|
|
44673
|
+
for (const [i, p] of periodBase.entries()) {
|
|
44674
|
+
const row = groups[i];
|
|
44675
|
+
let sum = null;
|
|
44676
|
+
for (const k of keys2) {
|
|
44677
|
+
const v = readOf(row, k);
|
|
44678
|
+
p.values[`m:${k}`] = v;
|
|
44679
|
+
if (v !== null) sum = (sum ?? 0) + v;
|
|
44680
|
+
}
|
|
44681
|
+
p.total = sum;
|
|
44682
|
+
}
|
|
44683
|
+
const totals = keys2.map((k) => readOf(totalRow, k));
|
|
44684
|
+
const total = totals.every((t) => t === null) ? null : totals.reduce((a, t) => a + (t ?? 0), 0);
|
|
44685
|
+
return {
|
|
44686
|
+
time,
|
|
44687
|
+
split: null,
|
|
44688
|
+
measure: m,
|
|
44689
|
+
series: keys2.map((k, i) => ({ key: `m:${k}`, value: null, label: measures.find((x) => x.key === k)?.label ?? k, other: false, total: totals[i] ?? null })),
|
|
44690
|
+
periods: periodBase,
|
|
44691
|
+
total,
|
|
44692
|
+
says
|
|
44693
|
+
};
|
|
44694
|
+
}
|
|
44645
44695
|
if (!split) {
|
|
44646
44696
|
const key = "all";
|
|
44647
44697
|
for (const p of periodBase) p.values[key] = p.total;
|
|
@@ -44842,6 +44892,9 @@ function drillGroupsAgentInput(nodes, question, dimensions, measures, actions, r
|
|
|
44842
44892
|
|
|
44843
44893
|
// src/data-table/DrillAnswerTable.tsx
|
|
44844
44894
|
import { Fragment as Fragment11, jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
44895
|
+
function drillPivotSortKey(measure, value) {
|
|
44896
|
+
return `across:${measure}:${value === null ? "(none)" : value}`;
|
|
44897
|
+
}
|
|
44845
44898
|
var NO_PATHS = [];
|
|
44846
44899
|
function plural(n, noun) {
|
|
44847
44900
|
return `${n.toLocaleString()} ${n === 1 ? noun : `${noun}s`}`;
|
|
@@ -44985,7 +45038,8 @@ function MatrxDrillAnswerTable({
|
|
|
44985
45038
|
pareto,
|
|
44986
45039
|
rowActions,
|
|
44987
45040
|
pivotColumnCap,
|
|
44988
|
-
search
|
|
45041
|
+
search,
|
|
45042
|
+
attributes
|
|
44989
45043
|
}) {
|
|
44990
45044
|
const host = useMatrxDataTableHost();
|
|
44991
45045
|
const tableId = `drill-answer-${useId3()}`;
|
|
@@ -45097,8 +45151,18 @@ function MatrxDrillAnswerTable({
|
|
|
45097
45151
|
}
|
|
45098
45152
|
const ref = node.level >= 0 ? question.by[node.level] : void 0;
|
|
45099
45153
|
const color = ref ? drillValueColor(dimensions, ref, node.groups[ref] ?? null) : null;
|
|
45100
|
-
|
|
45154
|
+
const glance = (attributes ?? []).map((a) => {
|
|
45155
|
+
const said = node.level === 0 ? a.read(node.groups) : null;
|
|
45156
|
+
return {
|
|
45157
|
+
id: `attr::${a.key}`,
|
|
45158
|
+
align: "left",
|
|
45159
|
+
aggregate: false,
|
|
45160
|
+
content: node.level !== 0 ? "" : said === void 0 ? /* @__PURE__ */ jsx42("span", { className: "text-muted-foreground", children: "\u2026" }) : said === null ? /* @__PURE__ */ jsx42("span", { className: "text-muted-foreground", children: "\u2014" }) : /* @__PURE__ */ jsx42("span", { "data-matrx-drill-attribute": a.key, className: "block max-w-[14rem] truncate text-xs", title: said, children: said })
|
|
45161
|
+
};
|
|
45162
|
+
});
|
|
45163
|
+
return [...glance, ...shown.map((m) => ({ id: m.key, align: "right", aggregate: true, content: valueCell(m, row, parent, color) }))];
|
|
45101
45164
|
};
|
|
45165
|
+
const glanceShown = !pivot && (attributes?.length ?? 0) > 0 ? attributes : [];
|
|
45102
45166
|
const toggleSort = (key) => {
|
|
45103
45167
|
const current = question.sort;
|
|
45104
45168
|
const direction = current?.key === key && current.direction === "desc" ? "asc" : "desc";
|
|
@@ -45108,39 +45172,43 @@ function MatrxDrillAnswerTable({
|
|
|
45108
45172
|
if (question.sort?.key !== key) return null;
|
|
45109
45173
|
return question.sort.direction === "desc" ? /* @__PURE__ */ jsx42(ArrowDown, { "aria-hidden": "true", className: "h-3 w-3" }) : /* @__PURE__ */ jsx42(ArrowUp, { "aria-hidden": "true", className: "h-3 w-3" });
|
|
45110
45174
|
};
|
|
45111
|
-
const measureHeader = (m, id) =>
|
|
45112
|
-
|
|
45113
|
-
|
|
45114
|
-
|
|
45115
|
-
|
|
45116
|
-
|
|
45117
|
-
|
|
45118
|
-
|
|
45119
|
-
|
|
45120
|
-
|
|
45121
|
-
|
|
45122
|
-
|
|
45123
|
-
|
|
45124
|
-
|
|
45125
|
-
|
|
45126
|
-
|
|
45127
|
-
|
|
45128
|
-
|
|
45129
|
-
|
|
45130
|
-
"
|
|
45131
|
-
|
|
45132
|
-
|
|
45133
|
-
|
|
45134
|
-
|
|
45135
|
-
|
|
45136
|
-
|
|
45137
|
-
|
|
45138
|
-
|
|
45139
|
-
|
|
45140
|
-
|
|
45141
|
-
|
|
45175
|
+
const measureHeader = (m, id, column) => {
|
|
45176
|
+
const key = column ? drillPivotSortKey(m.key, column.value) : m.key;
|
|
45177
|
+
return /* @__PURE__ */ jsxs32("th", { scope: "col", className: "whitespace-nowrap px-2 py-2 text-right text-xs font-medium text-muted-foreground", children: [
|
|
45178
|
+
/* @__PURE__ */ jsxs32(
|
|
45179
|
+
"button",
|
|
45180
|
+
{
|
|
45181
|
+
type: "button",
|
|
45182
|
+
"data-matrx-drill-sort": key,
|
|
45183
|
+
"aria-label": `Sort groups by ${m.label}`,
|
|
45184
|
+
title: m.description,
|
|
45185
|
+
onClick: () => toggleSort(key),
|
|
45186
|
+
className: "inline-flex items-center gap-1 hover:text-foreground",
|
|
45187
|
+
children: [
|
|
45188
|
+
m.label,
|
|
45189
|
+
sortMark(key)
|
|
45190
|
+
]
|
|
45191
|
+
}
|
|
45192
|
+
),
|
|
45193
|
+
comparing ? /* @__PURE__ */ jsxs32(
|
|
45194
|
+
"button",
|
|
45195
|
+
{
|
|
45196
|
+
type: "button",
|
|
45197
|
+
"data-matrx-drill-sort": `delta:${m.key}`,
|
|
45198
|
+
"aria-label": `Sort groups by the change in ${m.label}`,
|
|
45199
|
+
title: "Sort by the change against the prior window",
|
|
45200
|
+
onClick: () => toggleSort(`delta:${m.key}`),
|
|
45201
|
+
className: "ml-1.5 inline-flex items-center gap-0.5 hover:text-foreground",
|
|
45202
|
+
children: [
|
|
45203
|
+
"\u0394",
|
|
45204
|
+
sortMark(`delta:${m.key}`)
|
|
45205
|
+
]
|
|
45206
|
+
}
|
|
45207
|
+
) : null
|
|
45208
|
+
] }, id);
|
|
45209
|
+
};
|
|
45142
45210
|
const labelHeader = question.by.map((ref) => dimensionRefLabel(dimensions, ref)).join(" \u203A ");
|
|
45143
|
-
const colCount = 1 + (pivot && columns ? (columns.length + 1) * shown.length : shown.length) + 1;
|
|
45211
|
+
const colCount = 1 + glanceShown.length + (pivot && columns ? (columns.length + 1) * shown.length : shown.length) + 1;
|
|
45144
45212
|
const renderOther = (other, depth, key, siblings = []) => {
|
|
45145
45213
|
if (!other) return null;
|
|
45146
45214
|
const distinct = siblings.reduce((m, n) => {
|
|
@@ -45297,6 +45365,7 @@ function MatrxDrillAnswerTable({
|
|
|
45297
45365
|
type: "button",
|
|
45298
45366
|
"data-matrx-drill-sort": "label",
|
|
45299
45367
|
"aria-label": `Sort groups by ${labelHeader}`,
|
|
45368
|
+
title: question.by.length === 1 ? dimensionFor(dimensions, question.by[0])?.description : void 0,
|
|
45300
45369
|
onClick: () => toggleSort("label"),
|
|
45301
45370
|
className: "inline-flex items-center gap-1 hover:text-foreground",
|
|
45302
45371
|
children: [
|
|
@@ -45305,7 +45374,12 @@ function MatrxDrillAnswerTable({
|
|
|
45305
45374
|
]
|
|
45306
45375
|
}
|
|
45307
45376
|
) }),
|
|
45308
|
-
|
|
45377
|
+
glanceShown.map((a) => /* @__PURE__ */ jsx42("th", { scope: "col", "data-matrx-drill-attribute-header": a.key, title: a.description, className: "whitespace-nowrap px-2 py-2 text-left text-xs font-medium text-muted-foreground", children: a.label }, `attr-${a.key}`)),
|
|
45378
|
+
pivot && columns ? [
|
|
45379
|
+
// a named pivot column sorts by its own cell (L5); the rest column and the total by the row's number
|
|
45380
|
+
...columns.flatMap((c) => shown.map((m) => measureHeader(m, `${c.value ?? "\u2205"}::${m.key}`, c.other ? void 0 : { value: c.value }))),
|
|
45381
|
+
...shown.map((m) => measureHeader(m, `total::${m.key}`))
|
|
45382
|
+
] : shown.map((m) => measureHeader(m, m.key)),
|
|
45309
45383
|
pivot ? null : /* @__PURE__ */ jsx42("th", { className: "w-8", "aria-label": "Drill options" })
|
|
45310
45384
|
] })
|
|
45311
45385
|
] }),
|
|
@@ -45326,6 +45400,7 @@ function MatrxDrillAnswerTable({
|
|
|
45326
45400
|
/* @__PURE__ */ jsx42("span", { className: "pl-[1.625rem]", children: "Total" }),
|
|
45327
45401
|
/* @__PURE__ */ jsx42("span", { className: "ml-1.5 text-xs font-normal text-muted-foreground", children: plural(tree.total.row_count, rowNoun) })
|
|
45328
45402
|
] }),
|
|
45403
|
+
glanceShown.map((a) => /* @__PURE__ */ jsx42("td", {}, `t-attr-${a.key}`)),
|
|
45329
45404
|
pivot && columns ? [
|
|
45330
45405
|
...columns.flatMap(
|
|
45331
45406
|
(column) => shown.map((m) => /* @__PURE__ */ jsx42("td", { className: "px-2 py-2 text-right text-xs", children: formatMeasure(m, column.total.measures[m.key]) }, `t-${column.value ?? "\u2205"}-${m.key}`))
|
|
@@ -57035,6 +57110,7 @@ export {
|
|
|
57035
57110
|
drillPareto,
|
|
57036
57111
|
drillParetoSentence,
|
|
57037
57112
|
drillPath,
|
|
57113
|
+
drillPivotSortKey,
|
|
57038
57114
|
drillQuestionFromParams,
|
|
57039
57115
|
drillQuestionToParams,
|
|
57040
57116
|
drillRequestKey,
|