@ai-matrx/design-system 0.49.32 → 0.49.33
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 +9 -0
- package/dist/data-table/copy-helpers.d.cts +1 -1
- package/dist/data-table/copy-helpers.d.ts +1 -1
- package/dist/data-table/filter-engine.d.cts +1 -1
- package/dist/data-table/filter-engine.d.ts +1 -1
- package/dist/data-table/host.d.cts +1 -1
- package/dist/data-table/host.d.ts +1 -1
- package/dist/data-table/index.cjs +18 -6
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +5 -3
- package/dist/data-table/index.d.ts +5 -3
- package/dist/data-table/index.js +18 -6
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/infer-filter.d.cts +1 -1
- package/dist/data-table/infer-filter.d.ts +1 -1
- package/dist/data-table/layered-filters.d.cts +1 -1
- package/dist/data-table/layered-filters.d.ts +1 -1
- package/dist/data-table/query-control.d.cts +1 -1
- package/dist/data-table/query-control.d.ts +1 -1
- package/dist/data-table/types.cjs.map +1 -1
- package/dist/data-table/types.d.cts +1 -1
- package/dist/data-table/types.d.ts +1 -1
- package/dist/data-table/url-state.d.cts +1 -1
- package/dist/data-table/url-state.d.ts +1 -1
- package/dist/data-table/xlsx.d.cts +1 -1
- package/dist/data-table/xlsx.d.ts +1 -1
- package/dist/{layered-filters-DmI_v_ku.d.cts → layered-filters-Bxc5mB6_.d.cts} +7 -2
- package/dist/{layered-filters-QG3LUn_h.d.ts → layered-filters-rDTFmgfK.d.ts} +7 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.49.33
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/design-system/v0.49.32..npm/design-system/v0.49.33 -- apps/shared/design-system`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
3
9
|
## 0.49.32
|
|
4
10
|
|
|
5
11
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
@@ -25,6 +31,9 @@ No source changes intended and no consumer action required.
|
|
|
25
31
|
`drillRequests(question)`; `useDrillUrlState` keeps the question in the address
|
|
26
32
|
(`by`, `across`, `show`, `f.<dim>`, `sort`, `path`). The group header row is now exported as
|
|
27
33
|
`MatrxTableGroupHeaderRow`; page-scoped grouping draws through it unchanged.
|
|
34
|
+
- `data-table`: drill paths — `drill.paths` (declared levels, e.g. a date by year → quarter → month);
|
|
35
|
+
a click on a group follows the path its level sits on, so a period drills into the next finer period
|
|
36
|
+
of the same date. `nextDrillLevel` / `drillInto` take the paths.
|
|
28
37
|
|
|
29
38
|
## 0.49.29
|
|
30
39
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentPayloadInput } from './copy-types.cjs';
|
|
2
|
-
import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../layered-filters-
|
|
2
|
+
import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../layered-filters-Bxc5mB6_.cjs';
|
|
3
3
|
import '../content-transfer.cjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@ai-matrx/kit/content-transfer';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentPayloadInput } from './copy-types.js';
|
|
2
|
-
import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../layered-filters-
|
|
2
|
+
import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../layered-filters-rDTFmgfK.js';
|
|
3
3
|
import '../content-transfer.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@ai-matrx/kit/content-transfer';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../layered-filters-
|
|
1
|
+
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../layered-filters-Bxc5mB6_.cjs';
|
|
2
2
|
import '../content-transfer.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@ai-matrx/kit/content-transfer';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../layered-filters-
|
|
1
|
+
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../layered-filters-rDTFmgfK.js';
|
|
2
2
|
import '../content-transfer.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@ai-matrx/kit/content-transfer';
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { ComponentType, ReactNode, MouseEventHandler } from 'react';
|
|
3
3
|
import { CopyControlProps } from './copy-types.cjs';
|
|
4
4
|
export { AgentPayloadInput, AiCustomSource, AiVariant, CopyExportConfig } from './copy-types.cjs';
|
|
5
|
-
import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../layered-filters-
|
|
5
|
+
import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../layered-filters-Bxc5mB6_.cjs';
|
|
6
6
|
import { MatrxTableMenuTarget, MatrxTableMenuPayload, MatrxTableMenuSectionsResolver, MatrxTableMenuIconName } from './menu-targets.cjs';
|
|
7
7
|
export { MatrxTableMenuItem, MatrxTableMenuSection } from './menu-targets.cjs';
|
|
8
8
|
import '../content-transfer.cjs';
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { ComponentType, ReactNode, MouseEventHandler } from 'react';
|
|
3
3
|
import { CopyControlProps } from './copy-types.js';
|
|
4
4
|
export { AgentPayloadInput, AiCustomSource, AiVariant, CopyExportConfig } from './copy-types.js';
|
|
5
|
-
import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../layered-filters-
|
|
5
|
+
import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../layered-filters-rDTFmgfK.js';
|
|
6
6
|
import { MatrxTableMenuTarget, MatrxTableMenuPayload, MatrxTableMenuSectionsResolver, MatrxTableMenuIconName } from './menu-targets.js';
|
|
7
7
|
export { MatrxTableMenuItem, MatrxTableMenuSection } from './menu-targets.js';
|
|
8
8
|
import '../content-transfer.js';
|
|
@@ -43923,14 +43923,23 @@ function drillPath(question, dimensions) {
|
|
|
43923
43923
|
if (question.path && question.path.length > 0) return question.path;
|
|
43924
43924
|
return dimensions.map((d) => d.kind === "time" ? `${d.key}:month` : d.key);
|
|
43925
43925
|
}
|
|
43926
|
-
function nextDrillLevel(question, dimensions) {
|
|
43926
|
+
function nextDrillLevel(question, dimensions, paths = []) {
|
|
43927
|
+
const deepest = question.by[question.by.length - 1];
|
|
43928
|
+
const usedRefs = /* @__PURE__ */ new Set([...question.where.map((w) => w.dim), ...question.by]);
|
|
43929
|
+
if (deepest) {
|
|
43930
|
+
for (const levels of paths) {
|
|
43931
|
+
const at2 = levels.indexOf(deepest);
|
|
43932
|
+
if (at2 < 0) continue;
|
|
43933
|
+
const next = levels.slice(at2 + 1).find((ref) => !usedRefs.has(ref) && dimensionFor(dimensions, ref));
|
|
43934
|
+
if (next) return next;
|
|
43935
|
+
}
|
|
43936
|
+
}
|
|
43927
43937
|
const path2 = drillPath(question, dimensions);
|
|
43928
43938
|
const used = /* @__PURE__ */ new Set([
|
|
43929
43939
|
...question.where.map((w) => parseDimensionRef(w.dim).key),
|
|
43930
43940
|
...question.by.map((b) => parseDimensionRef(b).key),
|
|
43931
43941
|
...question.across ? [parseDimensionRef(question.across).key] : []
|
|
43932
43942
|
]);
|
|
43933
|
-
const deepest = question.by[question.by.length - 1];
|
|
43934
43943
|
const from = deepest ? path2.indexOf(deepest) : -1;
|
|
43935
43944
|
const ordered = from >= 0 ? [...path2.slice(from + 1), ...path2.slice(0, from)] : path2;
|
|
43936
43945
|
for (const ref of ordered) {
|
|
@@ -43938,10 +43947,10 @@ function nextDrillLevel(question, dimensions) {
|
|
|
43938
43947
|
}
|
|
43939
43948
|
return null;
|
|
43940
43949
|
}
|
|
43941
|
-
function drillInto(question, groups, dimensions, into) {
|
|
43950
|
+
function drillInto(question, groups, dimensions, into, paths = []) {
|
|
43942
43951
|
const added = question.by.filter((ref) => ref in groups).map((ref) => ({ dim: ref, value: groups[ref] ?? null }));
|
|
43943
43952
|
const narrowed = { ...question, where: [...question.where, ...added] };
|
|
43944
|
-
const next = into === void 0 ? nextDrillLevel(question, dimensions) : into;
|
|
43953
|
+
const next = into === void 0 ? nextDrillLevel(question, dimensions, paths) : into;
|
|
43945
43954
|
return { ...narrowed, by: next ? [next] : [], across: next && question.across === next ? null : question.across ?? null };
|
|
43946
43955
|
}
|
|
43947
43956
|
function drillToRecords(question, groups) {
|
|
@@ -44182,6 +44191,7 @@ function normalize(q) {
|
|
|
44182
44191
|
|
|
44183
44192
|
// src/data-table/DrillAnswerTable.tsx
|
|
44184
44193
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
44194
|
+
var NO_PATHS = [];
|
|
44185
44195
|
function plural(n2, noun) {
|
|
44186
44196
|
return `${n2.toLocaleString()} ${n2 === 1 ? noun : `${noun}s`}`;
|
|
44187
44197
|
}
|
|
@@ -44238,6 +44248,7 @@ function MatrxDrillAnswerTable({
|
|
|
44238
44248
|
question,
|
|
44239
44249
|
onQuestionChange,
|
|
44240
44250
|
answers,
|
|
44251
|
+
paths = NO_PATHS,
|
|
44241
44252
|
error,
|
|
44242
44253
|
rowNoun = "record",
|
|
44243
44254
|
emptyLabel = "No value",
|
|
@@ -44254,7 +44265,7 @@ function MatrxDrillAnswerTable({
|
|
|
44254
44265
|
[question, answers, dimensions, measures]
|
|
44255
44266
|
);
|
|
44256
44267
|
const pivot = Boolean(question.across) && columns !== null && columns.length > 0;
|
|
44257
|
-
const next = nextDrillLevel(question, dimensions);
|
|
44268
|
+
const next = nextDrillLevel(question, dimensions, paths);
|
|
44258
44269
|
const nextLabel = next ? dimensionRefLabel(dimensions, next) : null;
|
|
44259
44270
|
const byKeys = new Set(question.by.map((ref) => parseDimensionRef(ref).key));
|
|
44260
44271
|
const filteredKeys = new Set(question.where.map((w) => parseDimensionRef(w.dim).key));
|
|
@@ -44331,7 +44342,7 @@ function MatrxDrillAnswerTable({
|
|
|
44331
44342
|
const scope = { ...question, by: question.by.slice(0, node.level + 1) };
|
|
44332
44343
|
const intoRef = deepest ? next : question.by[node.level + 1] ?? null;
|
|
44333
44344
|
const intoLabel = intoRef ? dimensionRefLabel(dimensions, intoRef) : null;
|
|
44334
|
-
const drill = () => onQuestionChange(drillInto(scope, node.groups, dimensions, intoRef));
|
|
44345
|
+
const drill = () => onQuestionChange(drillInto(scope, node.groups, dimensions, intoRef, paths));
|
|
44335
44346
|
const records = () => onQuestionChange(drillToRecords(scope, node.groups));
|
|
44336
44347
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_react14.Fragment, { children: [
|
|
44337
44348
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
@@ -53949,6 +53960,7 @@ function MatrxDataTableCore(coreProps) {
|
|
|
53949
53960
|
question: drill.question,
|
|
53950
53961
|
onQuestionChange: drill.onQuestionChange,
|
|
53951
53962
|
answers: drill.answers,
|
|
53963
|
+
...drill.paths ? { paths: drill.paths } : {},
|
|
53952
53964
|
error: drill.error,
|
|
53953
53965
|
rowNoun: drill.rowNoun ?? grouping?.rowNoun ?? "record",
|
|
53954
53966
|
emptyLabel: drill.emptyLabel
|