minerva-design 1.17.2 → 1.19.0
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 +23 -0
- package/custom-elements.json +10 -6
- package/dist/angular/fesm2022/minerva-angular.mjs +173 -70
- package/dist/angular/fesm2022/minerva-angular.mjs.map +1 -1
- package/dist/angular/types/minerva-angular.d.ts +33 -21
- package/dist/charts/core.cjs +1 -1
- package/dist/charts/core.d.cts +1 -0
- package/dist/charts/core.d.ts +1 -0
- package/dist/charts/core.js +22 -21
- package/dist/charts/engine/chart.cjs +1 -1
- package/dist/charts/engine/chart.cjs.map +1 -1
- package/dist/charts/engine/chart.js +414 -376
- package/dist/charts/engine/chart.js.map +1 -1
- package/dist/charts/engine/overlay.cjs +1 -1
- package/dist/charts/engine/overlay.cjs.map +1 -1
- package/dist/charts/engine/overlay.d.cts +5 -0
- package/dist/charts/engine/overlay.d.ts +5 -0
- package/dist/charts/engine/overlay.js +94 -69
- package/dist/charts/engine/overlay.js.map +1 -1
- package/dist/charts/engine/quadrant-card.cjs +2 -0
- package/dist/charts/engine/quadrant-card.cjs.map +1 -0
- package/dist/charts/engine/quadrant-card.d.cts +83 -0
- package/dist/charts/engine/quadrant-card.d.ts +83 -0
- package/dist/charts/engine/quadrant-card.js +154 -0
- package/dist/charts/engine/quadrant-card.js.map +1 -0
- package/dist/charts/engine/scene.cjs +1 -1
- package/dist/charts/engine/scene.cjs.map +1 -1
- package/dist/charts/engine/scene.d.cts +5 -0
- package/dist/charts/engine/scene.d.ts +5 -0
- package/dist/charts/engine/scene.js +32 -32
- package/dist/charts/engine/scene.js.map +1 -1
- package/dist/charts/engine/types.d.cts +14 -0
- package/dist/charts/engine/types.d.ts +14 -0
- package/dist/charts/index.cjs +1 -1
- package/dist/charts/index.js +28 -27
- package/dist/charts/react/Chart.cjs +1 -1
- package/dist/charts/react/Chart.cjs.map +1 -1
- package/dist/charts/react/Chart.d.cts +4 -2
- package/dist/charts/react/Chart.d.ts +4 -2
- package/dist/charts/react/Chart.js +42 -42
- package/dist/charts/react/Chart.js.map +1 -1
- package/dist/charts/react/charts.cjs +1 -1
- package/dist/charts/react/charts.cjs.map +1 -1
- package/dist/charts/react/charts.js +395 -391
- package/dist/charts/react/charts.js.map +1 -1
- package/dist/charts/react/types.d.cts +8 -2
- package/dist/charts/react/types.d.ts +8 -2
- package/dist/core/contracts.cjs +1 -1
- package/dist/core/contracts.cjs.map +1 -1
- package/dist/core/contracts.js +1 -1
- package/dist/core/contracts.js.map +1 -1
- package/dist/native/charts/src/engine/overlay.cjs +1 -1
- package/dist/native/charts/src/engine/overlay.cjs.map +1 -1
- package/dist/native/charts/src/engine/overlay.js +89 -65
- package/dist/native/charts/src/engine/overlay.js.map +1 -1
- package/dist/native/charts/src/engine/scene.cjs +1 -1
- package/dist/native/charts/src/engine/scene.cjs.map +1 -1
- package/dist/native/charts/src/engine/scene.js +32 -32
- package/dist/native/charts/src/engine/scene.js.map +1 -1
- package/dist/react/components/QuadrantTaskBoard/QuadrantTaskBoard.cjs +1 -1
- package/dist/react/components/QuadrantTaskBoard/QuadrantTaskBoard.cjs.map +1 -1
- package/dist/react/components/QuadrantTaskBoard/QuadrantTaskBoard.js +14 -8
- package/dist/react/components/QuadrantTaskBoard/QuadrantTaskBoard.js.map +1 -1
- package/dist/react/components/QuadrantTaskBoard/quadrantTaskBoard.module.scss.cjs +1 -1
- package/dist/react/components/QuadrantTaskBoard/quadrantTaskBoard.module.scss.cjs.map +1 -1
- package/dist/react/components/QuadrantTaskBoard/quadrantTaskBoard.module.scss.js +16 -15
- package/dist/react/components/QuadrantTaskBoard/quadrantTaskBoard.module.scss.js.map +1 -1
- package/dist/react/style.css +1 -1
- package/dist/react/styles/quadrant-task-board.css +1 -1
- package/dist/taro/index.js +1521 -1496
- package/dist/taro/style.css +22 -0
- package/dist/uni/manifest.d.ts +34 -34
- package/dist/uni/manifest.js +34 -39
- package/dist/uni/style.css +22 -0
- package/dist/vue/components/Chart/QuadrantChart.vue.d.ts +4 -3
- package/dist/vue/components/Chart/QuadrantChart.vue.js.map +1 -1
- package/dist/vue/components/Chart/QuadrantChart.vue_vue_type_script_setup_true_lang.js +186 -142
- package/dist/vue/components/Chart/QuadrantChart.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/vue/components/Chart/cartesian.d.ts +5 -1
- package/dist/vue/components/Chart/cartesian.js +2 -0
- package/dist/vue/components/Chart/cartesian.js.map +1 -1
- package/dist/vue/components/QuadrantTaskBoard/QuadrantTaskBoard.vue.js.map +1 -1
- package/dist/vue/components/QuadrantTaskBoard/QuadrantTaskBoard.vue_vue_type_script_setup_true_lang.js +18 -12
- package/dist/vue/components/QuadrantTaskBoard/QuadrantTaskBoard.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/weapp/charts/canvas.js +48 -11
- package/dist/weapp/controls.wxss +22 -0
- package/dist/web-components/components/chart/chart.d.ts +4 -1
- package/dist/web-components/components/chart/chart.js +3 -1
- package/dist/web-components/components/chart/chart.js.map +1 -1
- package/dist/web-components/components/chart/charts.d.ts +34 -14
- package/dist/web-components/components/chart/charts.js +145 -98
- package/dist/web-components/components/chart/charts.js.map +1 -1
- package/dist/web-components/components/quadrant-task-board/quadrant-task-board.d.ts +8 -8
- package/dist/web-components/components/quadrant-task-board/quadrant-task-board.js +16 -12
- package/dist/web-components/components/quadrant-task-board/quadrant-task-board.js.map +1 -1
- package/dist/web-components/styles/QuadrantTaskBoard/quadrantTaskBoard.css.js +1 -1
- package/dist/web-components/styles/QuadrantTaskBoard/quadrantTaskBoard.css.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charts.js","names":["_decorate","__decorate","SeriesChartElement","MinervaCartesianChartElement","series","property","MinervaLineChart","_args","withSeriesType","MinervaAreaChart","_args2","MinervaBarChart","_args3","s","MinervaScatterChart","MinervaCandlestickChart","MinervaHeatmapChart","_args4","heatmapChartOptions","MinervaSparkline","_args5","sparklineOptions","DOUBLE_CLICK_MS","QUADRANT_HEADER_SLOTS","px","value","fraction","v","a","b","MinervaQuadrantChart","_args6","MinervaEngineElement","index","point","names","child","headers","options","quadrantChartOptions","i","chart","event","rect","next","actions","plot","nothing","x0","x1","y0","y1","visual","fx","x","y","split","sx","sy","quadrant","left","corner","top","styleMap","at","QUADRANT_CORNERS","keyed","changed","root","hover","target","createQuadrantPointLayer","now","last","double","quadrantOf","detail"],"sources":["../../../../../web-components/src/components/chart/charts.ts"],"sourcesContent":["import { css, html, nothing, type PropertyValues } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { keyed } from \"lit/directives/keyed.js\";\nimport { styleMap } from \"lit/directives/style-map.js\";\nimport {\n QUADRANT_CORNERS,\n createQuadrantPointLayer,\n heatmapChartOptions,\n quadrantChartOptions,\n quadrantOf,\n sparklineOptions,\n type ChartDragEvent,\n type ChartHoverEvent,\n type ChartInstance,\n type ChartOptions,\n type ChartPlotClickEvent,\n type ChartRect,\n type ChartSeries,\n type HeatmapCell,\n type QuadrantAxisLabels,\n type QuadrantConfig,\n type QuadrantCorner,\n type QuadrantPoint,\n type QuadrantPointLayer,\n type QuadrantRegions,\n} from \"minerva-design/charts/core\";\nimport { MinervaCartesianChartElement } from \"./chart\";\nimport { MinervaEngineElement } from \"./engine-element\";\nimport { withSeriesType } from \"./series\";\n\n/** Engine options other than the series (axes, legend, tooltip, annotations...) */\nexport type ChartBaseOptions = Partial<ChartOptions>;\n\n/** Base of the elements drawing `series` with a default series type */\nexport abstract class SeriesChartElement extends MinervaCartesianChartElement {\n /** Data series (`ChartSeries[]`); each may set its own `type`. Replace the array (or a `data` array) to update the chart; property only */\n @property({ attribute: false })\n series?: readonly ChartSeries[];\n\n /** Other engine options (`ChartOptions` of minerva-design/charts/core: axes, legend, tooltip, annotations...); property only */\n @property({ attribute: false })\n options?: ChartBaseOptions;\n\n protected abstract typed(series: readonly ChartSeries[]): ChartSeries[];\n\n protected stackMode(): ChartOptions[\"stackMode\"] {\n return this.options?.stackMode;\n }\n\n protected engineOptions(): ChartOptions | null {\n const series = this.series ?? this.options?.series;\n if (!series) return null;\n return {\n ...this.options,\n series: this.typed(series),\n stackMode: this.stackMode(),\n };\n }\n}\n\n/**\n * Line chart (or area chart with `area`) of `minerva-design/charts/core`,\n * handling millions of points on the GPU: the `<LineChart>` of React. The\n * series without a `type` are drawn as lines.\n *\n * Published as the optional entry `minerva-design/web-components/chart`.\n *\n * @summary GPU line chart: straight, smooth or stepped, stacked or 100%.\n * @tag minerva-line-chart\n * @csspart root - The sized box of the chart\n * @csspart surface - The element the engine renders into\n */\nexport class MinervaLineChart extends SeriesChartElement {\n static override tagName = \"minerva-line-chart\";\n\n /** Fills the area under the lines */\n @property({ type: Boolean })\n area = false;\n\n /** Shape of the lines: straight, smooth (monotone) or steps */\n @property()\n curve: \"linear\" | \"smooth\" | \"step\" = \"linear\";\n\n /** Stacks the series on top of each other */\n @property({ type: Boolean })\n stacked = false;\n\n /** Scales the stacks to 100% (implies `stacked`) */\n @property({ type: Boolean })\n percent = false;\n\n protected typed(series: readonly ChartSeries[]): ChartSeries[] {\n return withSeriesType(\n series,\n this.area ? \"area\" : \"line\",\n this.stacked || this.percent ? \"stack\" : undefined,\n this.curve,\n );\n }\n\n protected override stackMode(): ChartOptions[\"stackMode\"] {\n return this.percent ? \"percent\" : super.stackMode();\n }\n}\n\n/**\n * Area chart of `minerva-design/charts/core`: smooth by default, stacked or\n * 100% stacked (the `<AreaChart>` of React). The series without a `type`\n * are drawn as areas.\n *\n * Published as the optional entry `minerva-design/web-components/chart`.\n *\n * @summary GPU area chart: smooth, stacked or 100% stacked.\n * @tag minerva-area-chart\n * @csspart root - The sized box of the chart\n * @csspart surface - The element the engine renders into\n */\nexport class MinervaAreaChart extends SeriesChartElement {\n static override tagName = \"minerva-area-chart\";\n\n /** Shape of the edges: straight, smooth (monotone) or steps */\n @property()\n curve: \"linear\" | \"smooth\" | \"step\" = \"smooth\";\n\n /** Stacks the areas on top of each other */\n @property({ type: Boolean })\n stacked = false;\n\n /** Scales the stacks to 100% (implies `stacked`) */\n @property({ type: Boolean })\n percent = false;\n\n protected typed(series: readonly ChartSeries[]): ChartSeries[] {\n return withSeriesType(\n series,\n \"area\",\n this.stacked || this.percent ? \"stack\" : undefined,\n this.curve,\n );\n }\n\n protected override stackMode(): ChartOptions[\"stackMode\"] {\n return this.percent ? \"percent\" : super.stackMode();\n }\n}\n\n/**\n * Bar chart of `minerva-design/charts/core`: grouped side by side, stacked\n * or 100% stacked, with optional value labels (the `<BarChart>` of React).\n * The series without a `type` are drawn as bars (set `type: \"line\"` on a\n * series for an overlay).\n *\n * Published as the optional entry `minerva-design/web-components/chart`.\n *\n * @summary GPU bar chart: grouped, stacked or 100%, with value labels.\n * @tag minerva-bar-chart\n * @csspart root - The sized box of the chart\n * @csspart surface - The element the engine renders into\n */\nexport class MinervaBarChart extends SeriesChartElement {\n static override tagName = \"minerva-bar-chart\";\n\n /** Stacks the bars of every series (otherwise they are grouped side by side) */\n @property({ type: Boolean })\n stacked = false;\n\n /** Scales the stacks to 100% (implies `stacked`) */\n @property({ type: Boolean })\n percent = false;\n\n /** Writes the value above every bar */\n @property({ type: Boolean })\n labels = false;\n\n protected typed(series: readonly ChartSeries[]): ChartSeries[] {\n return withSeriesType(\n series,\n \"bar\",\n this.stacked || this.percent ? \"stack\" : undefined,\n ).map((s) =>\n this.labels && s.type === \"bar\"\n ? { ...s, showLabels: s.showLabels ?? true }\n : s,\n );\n }\n\n protected override stackMode(): ChartOptions[\"stackMode\"] {\n return this.percent ? \"percent\" : super.stackMode();\n }\n}\n\n/**\n * Scatter chart of `minerva-design/charts/core`: zooms on both axes, hit\n * testing through a spatial index (the `<ScatterChart>` of React). The\n * series without a `type` are drawn as dots.\n *\n * Published as the optional entry `minerva-design/web-components/chart`.\n *\n * @summary GPU scatter chart zooming on both axes.\n * @tag minerva-scatter-chart\n * @csspart root - The sized box of the chart\n * @csspart surface - The element the engine renders into\n */\nexport class MinervaScatterChart extends SeriesChartElement {\n static override tagName = \"minerva-scatter-chart\";\n\n protected typed(series: readonly ChartSeries[]): ChartSeries[] {\n return withSeriesType(series, \"scatter\");\n }\n}\n\n/**\n * Candlestick (OHLC) chart of `minerva-design/charts/core` (the\n * `<CandlestickChart>` of React): data points carry `open`, `high`, `low`\n * and `y` (the close). The series without a `type` are drawn as candles\n * (e.g. add a moving average with `type: \"line\"`).\n *\n * Published as the optional entry `minerva-design/web-components/chart`.\n *\n * @summary GPU candlestick chart of rising and falling candles.\n * @tag minerva-candlestick-chart\n * @csspart root - The sized box of the chart\n * @csspart surface - The element the engine renders into\n */\nexport class MinervaCandlestickChart extends SeriesChartElement {\n static override tagName = \"minerva-candlestick-chart\";\n\n protected typed(series: readonly ChartSeries[]): ChartSeries[] {\n return withSeriesType(series, \"candlestick\");\n }\n}\n\n/**\n * Heatmap of `minerva-design/charts/core` (the `<HeatmapChart>` of React):\n * a grid of cells colored by value, categories (or numbers) on both axes.\n *\n * Published as the optional entry `minerva-design/web-components/chart`.\n *\n * @summary GPU heatmap: a grid of cells colored by value.\n * @tag minerva-heatmap-chart\n * @csspart root - The sized box of the chart\n * @csspart surface - The element the engine renders into\n */\nexport class MinervaHeatmapChart extends MinervaCartesianChartElement {\n static override tagName = \"minerva-heatmap-chart\";\n\n /** Cells `{ x, y, value }`; property only */\n @property({ attribute: false })\n data?: readonly HeatmapCell[];\n\n /** Column names in order (collected from the data when omitted); property only */\n @property({ attribute: false })\n xCategories?: readonly string[];\n\n /** Row names from bottom to top (collected from the data when omitted); property only */\n @property({ attribute: false })\n yCategories?: readonly string[];\n\n /** Colors from the lowest to the highest value (interpolated in OKLab), or a built-in theme-aware ramp of the first palette color (`sequential` by default, or `diverging`); an array is property only */\n @property({ attribute: \"color-scale\" })\n colorScale: readonly string[] | \"sequential\" | \"diverging\" = \"sequential\";\n\n /** Values at the ends of the color scale (the data range by default); property only */\n @property({ attribute: false })\n valueRange?: readonly [number, number];\n\n /** Value at the middle of the color scale (diverging data; 0 for `diverging` ramps spanning it, else the middle of the range, by default) */\n @property({ type: Number, attribute: \"color-midpoint\" })\n colorMidpoint?: number;\n\n /** Name of the value in the tooltip */\n @property({ attribute: \"value-name\" })\n valueName?: string;\n\n /** Corner radius of the cells, in pixels */\n @property({ type: Number })\n radius?: number;\n\n /** Formats the values in the tooltip; property only */\n @property({ attribute: false })\n format?: (value: number) => string;\n\n /** Other engine options (axes, legend, tooltip, padding...); property only */\n @property({ attribute: false })\n options?: ChartBaseOptions;\n\n protected engineOptions(): ChartOptions | null {\n if (!this.data) return null;\n return heatmapChartOptions(\n {\n data: this.data,\n xCategories: this.xCategories,\n yCategories: this.yCategories,\n colorScale: this.colorScale,\n valueRange: this.valueRange,\n colorMidpoint: this.colorMidpoint,\n name: this.valueName,\n radius: this.radius,\n format: this.format,\n },\n this.options,\n );\n }\n}\n\n/**\n * Word-sized chart without axes (a trend in a table cell, a KPI card...) of\n * `minerva-design/charts/core`: the `<Sparkline>` of React.\n *\n * Published as the optional entry `minerva-design/web-components/chart`.\n *\n * @summary Small line, area or bar trend without axes.\n * @tag minerva-sparkline\n * @csspart root - The sized box of the chart\n * @csspart surface - The element the engine renders into\n */\nexport class MinervaSparkline extends MinervaCartesianChartElement {\n static override tagName = \"minerva-sparkline\";\n\n /** Height of the sparkline: pixels or any CSS length */\n @property()\n override height?: string | number = 48;\n\n /** Values (or `[x, y]` pairs, typed arrays...); property only */\n @property({ attribute: false })\n data?: ChartSeries[\"data\"];\n\n /** How the values are drawn */\n @property()\n type: \"line\" | \"area\" | \"bar\" = \"line\";\n\n /** Color (any CSS color); the first palette color by default */\n @property()\n color?: string;\n\n /** Shape of the line */\n @property()\n curve: \"linear\" | \"smooth\" | \"step\" = \"smooth\";\n\n /** Draws a dashed reference line at this value (a target, the average...) */\n @property({ type: Number })\n reference?: number;\n\n /** Name of the value in the tooltip */\n @property({ attribute: \"value-name\" })\n valueName?: string;\n\n /** Formats the value in the tooltip; property only */\n @property({ attribute: false })\n format?: (value: number) => string;\n\n /** Other engine options (tooltip, palette, renderer...); property only */\n @property({ attribute: false })\n options?: ChartBaseOptions;\n\n protected engineOptions(): ChartOptions | null {\n if (!this.data) return null;\n return sparklineOptions(\n {\n data: this.data,\n type: this.type,\n color: this.color,\n curve: this.curve,\n name: this.valueName,\n reference: this.reference,\n format: this.format,\n },\n this.options,\n );\n }\n}\n\n/** Two clicks on the same dot within this delay count as a double click */\nconst DOUBLE_CLICK_MS = 400;\n\n/** Slot of the header of each quadrant of `<minerva-quadrant-chart>` */\nexport const QUADRANT_HEADER_SLOTS: Readonly<Record<QuadrantCorner, string>> = {\n topLeft: \"quadrant-header-top-left\",\n topRight: \"quadrant-header-top-right\",\n bottomLeft: \"quadrant-header-bottom-left\",\n bottomRight: \"quadrant-header-bottom-right\",\n};\n\nconst px = (value: number) => `${value}px`;\nconst fraction = (v: number, a: number, b: number) => (v - a) / (b - a || 1);\n\n/**\n * Four-quadrant matrix (priority matrix, Eisenhower, BCG...) of\n * `minerva-design/charts/core` (the `<QuadrantChart>` of React): tinted\n * quadrants with titles, dividers and labelled dots placed without\n * overlapping labels. With `drag-points`, dots can be dragged to another\n * quadrant (`minerva-point-drop`; update `points` to move them).\n *\n * A visually hidden list of the dots per quadrant lets screen readers and\n * keyboards reach every dot: arrows move between them, Enter clicks\n * (`minerva-point-click`) and, with `drag-points`, Shift + arrows move the\n * focused dot to the neighbouring quadrant (`minerva-point-drop`, announced\n * in a live region). The focused dot is drawn with a focus ring and\n * reported by `minerva-hover`.\n *\n * Slotted content is placed over the plot: a header per quadrant (in its\n * outer corner, replacing the drawn title, badge, description and count)\n * and actions next to the active dot (hovered, keyboard-focused, else\n * `selected-index`; read it from `activeIndex`). Both receive pointer\n * events; the rest of the plot stays interactive.\n *\n * Published as the optional entry `minerva-design/web-components/chart`.\n *\n * @summary Four-quadrant matrix of labelled, draggable dots.\n * @tag minerva-quadrant-chart\n * @slot quadrant-header-top-left - Header of the top left quadrant (replaces its drawn title and count)\n * @slot quadrant-header-top-right - Header of the top right quadrant\n * @slot quadrant-header-bottom-left - Header of the bottom left quadrant\n * @slot quadrant-header-bottom-right - Header of the bottom right quadrant\n * @slot point-actions - Content shown at the active dot (e.g. edit / delete buttons), positioned by the slotted element\n * @csspart root - The sized box of the chart\n * @csspart surface - The element the engine renders into\n * @csspart overlay - The box over the plot holding the slotted headers and actions\n * @csspart quadrant-header - The box of a quadrant header slot (in the outer corner of its quadrant)\n * @csspart point-actions - The zero-size box at the active dot holding the `point-actions` slot\n * @fires minerva-point-click - A dot was clicked; detail: { point, index }\n * @fires minerva-point-double-click - The same dot was clicked twice in quick succession; detail: { point, index }\n * @fires minerva-quadrant-click - The empty area of a quadrant was clicked; detail: { quadrant, x, y }\n * @fires minerva-point-drag - A dot is being dragged (on every move); detail: { point, index, x, y, quadrant }\n * @fires minerva-point-drop - A dragged dot was released, or the focused dot was moved with Shift + an arrow key; detail: { point, index, x, y, quadrant }\n * @fires minerva-hover - The hovered (or keyboard-focused) dot changed; detail: { x, xLabel, items }, `null` when nothing is hovered\n */\nexport class MinervaQuadrantChart extends MinervaCartesianChartElement {\n static override tagName = \"minerva-quadrant-chart\";\n static override styles = [\n MinervaEngineElement.styles,\n css`\n.overlay,\n.quadrant,\n.point{\nposition: absolute;\npointer-events: none;\n}\n.point{\nwidth: 0;\nheight: 0;\n}\n.quadrant-header{\nposition: absolute;\ndisplay: flex;\nbox-sizing: border-box;\nmax-width: 100%;\npadding: 8px;\npointer-events: none;\n}\n.quadrant-header.top{\ntop: 0;\n}\n.quadrant-header.bottom{\nbottom: 0;\n}\n.quadrant-header.left{\nleft: 0;\njustify-content: flex-start;\n}\n.quadrant-header.right{\nright: 0;\njustify-content: flex-end;\n}\n.quadrant-header ::slotted(*),\n.point ::slotted(*){\npointer-events: auto;\n}\n`,\n ];\n\n /** Points `{ x, y, label, color, size }` to place; property only */\n @property({ attribute: false })\n points?: readonly QuadrantPoint[];\n\n /** Titles and colors of the quadrants (`topLeft`, `topRight`, `bottomLeft`, `bottomRight`); property only */\n @property({ attribute: false })\n quadrants?: QuadrantRegions;\n\n /** Title of the horizontal axis */\n @property({ attribute: \"x-label\" })\n xLabel?: string;\n\n /** Title of the vertical axis */\n @property({ attribute: \"y-label\" })\n yLabel?: string;\n\n /** Texts at the ends of the dividers, drawn inside the plot; property only */\n @property({ attribute: false })\n axisLabels?: QuadrantAxisLabels;\n\n /** Range of the horizontal axis (default [0, 10]); property only */\n @property({ attribute: false })\n xDomain?: [number, number];\n\n /** Range of the vertical axis (default [0, 10]); property only */\n @property({ attribute: false })\n yDomain?: [number, number];\n\n /** X value of the vertical divider (the middle of the x domain by default) */\n @property({ type: Number, attribute: \"x-split\" })\n xSplit?: number;\n\n /** Y value of the horizontal divider (the middle of the y domain by default) */\n @property({ type: Number, attribute: \"y-split\" })\n ySplit?: number;\n\n /** Reverses the horizontal axis (e.g. \"urgent\" on the left) */\n @property({ type: Boolean, attribute: \"reverse-x\" })\n reverseX = false;\n\n /** Hides the numeric ticks of the axes (only the matrix remains) */\n @property({ type: Boolean, attribute: \"hide-ticks\" })\n hideTicks = false;\n\n /** Hides the labels next to the dots */\n @property({ type: Boolean, attribute: \"hide-labels\" })\n hideLabels = false;\n\n /** Dot diameter in pixels */\n @property({ type: Number, attribute: \"point-size\" })\n pointSize = 12;\n\n /** Lets the user drag the dots (`minerva-point-drag`, `minerva-point-drop`) */\n @property({ type: Boolean, attribute: \"drag-points\" })\n dragPoints = false;\n\n /** Shows the number of points of each quadrant after its title; as a property, a function `(count, points) => text` returns the text */\n @property({ type: Boolean, attribute: \"show-counts\" })\n showCounts: QuadrantConfig[\"showCounts\"] = false;\n\n /** Index of the selected dot, drawn with a ring (`null`: none) */\n @property({ type: Number, attribute: \"selected-index\" })\n selectedIndex?: number | null;\n\n /** Indices of the selected dots; property only */\n @property({ attribute: false })\n selectedIndices?: readonly number[];\n\n /** Other engine options (legend, tooltip, padding, palette...); property only */\n @property({ attribute: false })\n options?: Omit<ChartOptions, \"series\">;\n\n /** Leaves out the visually hidden list of the dots (keyboard and screen reader access) */\n @property({ type: Boolean, attribute: \"no-accessible-points\" })\n noAccessiblePoints = false;\n\n private lastClick: { index: number; time: number } | null = null;\n private pointLayer: QuadrantPointLayer | null = null;\n private focusedPoint: number | null = null;\n /** Plot area (where the slots are placed), known once the engine drew */\n private plot: ChartRect | null = null;\n /** Dot under the pointer */\n private hoveredPoint: number | null = null;\n private slotObserver: MutationObserver | null = null;\n /** Slots having content at the last check (header slots, point actions) */\n private slotted = \"\";\n\n /**\n * Index of the active dot, the one showing the `point-actions` slot: the\n * hovered dot, else the keyboard-focused one, else `selectedIndex`\n * (`null`: none)\n */\n get activeIndex(): number | null {\n const index =\n this.hoveredPoint ?? this.focusedPoint ?? this.selectedIndex ?? null;\n const point = index === null ? undefined : this.points?.[index];\n return point && Number.isFinite(point.x) && Number.isFinite(point.y)\n ? index\n : null;\n }\n\n /** Whether a quadrant header slot has content */\n private hasHeaders(): boolean {\n const names = Object.values(QUADRANT_HEADER_SLOTS);\n return Array.from(this.children).some((child) =>\n names.includes(child.getAttribute(\"slot\") ?? \"\"),\n );\n }\n\n private hasPointActions(): boolean {\n return Array.from(this.children).some(\n (child) => child.getAttribute(\"slot\") === \"point-actions\",\n );\n }\n\n private geometry(): Pick<\n QuadrantConfig,\n \"xDomain\" | \"yDomain\" | \"xSplit\" | \"ySplit\" | \"reverseX\"\n > {\n return {\n xDomain: this.xDomain,\n yDomain: this.yDomain,\n xSplit: this.xSplit,\n ySplit: this.ySplit,\n reverseX: this.reverseX,\n };\n }\n\n protected engineOptions(): ChartOptions | null {\n if (!this.points) return null;\n const headers = this.hasHeaders();\n const options = quadrantChartOptions(\n {\n ...this.geometry(),\n points: this.points,\n quadrants: this.quadrants,\n xLabel: this.xLabel,\n yLabel: this.yLabel,\n axisLabels: this.axisLabels,\n showTicks: !this.hideTicks,\n showLabels: !this.hideLabels,\n pointSize: this.pointSize,\n draggable: this.dragPoints,\n showCounts: headers ? undefined : this.showCounts,\n selectedIndex: this.selectedIndex,\n selectedIndices: this.selectedIndices,\n },\n this.options,\n { focusedIndex: this.noAccessiblePoints ? null : this.focusedPoint },\n );\n if (headers)\n // the slotted headers replace the drawn titles (the first four areas)\n options.annotations = options.annotations?.map((a, i) =>\n i < 4 && a.type === \"rect\"\n ? {\n ...a,\n label: undefined,\n badge: undefined,\n description: undefined,\n detail: undefined,\n }\n : a,\n );\n return options;\n }\n\n protected override bindEngine(chart: ChartInstance): Array<() => void> {\n return [\n ...super.bindEngine(chart),\n chart.on(\"hover\", (event) => {\n const index = event?.items?.[0]?.index ?? null;\n if (index === this.hoveredPoint) return;\n this.hoveredPoint = index;\n if (this.hasPointActions()) this.requestUpdate();\n }),\n chart.on(\"layout\", (rect) => {\n this.plot = rect;\n if (this.slotted) this.requestUpdate();\n }),\n ];\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (this.hasUpdated) this.syncPointLayer();\n this.slotted = this.slotState();\n if (typeof MutationObserver === \"undefined\") return;\n // slotted headers / actions added or removed: redraw without the titles\n this.slotObserver = new MutationObserver(() => {\n const next = this.slotState();\n if (next === this.slotted) return;\n this.slotted = next;\n this.requestUpdate();\n const options = this.engineOptions();\n if (options) this.instance?.setOptions(options);\n });\n this.slotObserver.observe(this, {\n childList: true,\n attributes: true,\n attributeFilter: [\"slot\"],\n subtree: true,\n });\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.pointLayer?.destroy();\n this.pointLayer = null;\n this.focusedPoint = null;\n this.hoveredPoint = null;\n this.plot = null;\n this.slotObserver?.disconnect();\n this.slotObserver = null;\n }\n\n private slotState(): string {\n return `${this.hasHeaders() ? \"h\" : \"\"}${this.hasPointActions() ? \"a\" : \"\"}`;\n }\n\n /** The slots over the plot (only when they have content) */\n protected override renderOverlay() {\n const headers = this.hasHeaders();\n const actions = this.hasPointActions();\n const plot = this.plot;\n if ((!headers && !actions) || !plot) return nothing;\n const [x0, x1] = this.xDomain ?? [0, 10];\n const [y0, y1] = this.yDomain ?? [0, 10];\n const visual = (x: number, y: number) => {\n const fx = fraction(x, x0, x1);\n return { x: this.reverseX ? 1 - fx : fx, y: 1 - fraction(y, y0, y1) };\n };\n const split = visual(\n this.xSplit ?? (x0 + x1) / 2,\n this.ySplit ?? (y0 + y1) / 2,\n );\n const sx = plot.width * split.x;\n const sy = plot.height * split.y;\n const quadrant = (corner: QuadrantCorner) => {\n const left = corner.endsWith(\"Left\");\n const top = corner.startsWith(\"top\");\n return html`<div\nclass=\"quadrant\"\nstyle=${styleMap({\n left: px(left ? 0 : sx),\n top: px(top ? 0 : sy),\n width: px(left ? sx : plot.width - sx),\n height: px(top ? sy : plot.height - sy),\n })}\n>\n<div\npart=\"quadrant-header\"\nclass=\"quadrant-header ${top ? \"top\" : \"bottom\"} ${\n left ? \"left\" : \"right\"\n }\"\ndata-corner=${corner}\n>\n<slot name=${QUADRANT_HEADER_SLOTS[corner]}></slot>\n</div>\n</div>`;\n };\n const index = actions ? this.activeIndex : null;\n const point = index === null ? undefined : this.points?.[index];\n const at = point ? visual(point.x, point.y) : null;\n return html`<div\npart=\"overlay\"\nclass=\"overlay\"\nstyle=${styleMap({\n left: px(plot.x),\n top: px(plot.y),\n width: px(plot.width),\n height: px(plot.height),\n })}\n>\n${headers ? QUADRANT_CORNERS.map(quadrant) : nothing}\n${\n at && point\n ? keyed(\n index,\n html`<div\npart=\"point-actions\"\nclass=\"point\"\ndata-point-index=${index}\ndata-label=${point.label ?? nothing}\nstyle=${styleMap({\n left: `${100 * at.x}%`,\n top: `${100 * at.y}%`,\n })}\n>\n<slot name=\"point-actions\"></slot>\n</div>`,\n )\n : nothing\n }\n</div>`;\n }\n\n protected override updated(changed: PropertyValues): void {\n super.updated(changed);\n this.syncPointLayer();\n }\n\n /** Mounts, updates or removes the accessible list of the dots */\n private syncPointLayer(): void {\n const root = this.renderRoot.querySelector<HTMLElement>(\"[part=root]\");\n if (this.noAccessiblePoints || !this.points || !root || !this.isConnected) {\n this.pointLayer?.destroy();\n this.pointLayer = null;\n if (this.focusedPoint !== null) this.focusPoint(null);\n return;\n }\n const options = {\n config: {\n ...this.geometry(),\n points: this.points,\n quadrants: this.quadrants,\n xLabel: this.xLabel,\n yLabel: this.yLabel,\n },\n locale: this.options?.locale,\n movable: this.dragPoints,\n selected: [\n ...(this.selectedIndices ?? []),\n ...(this.selectedIndex !== undefined && this.selectedIndex !== null\n ? [this.selectedIndex]\n : []),\n ],\n onFocusChange: (index: number | null, hover: ChartHoverEvent | null) => {\n this.focusPoint(index);\n this.emit(\"minerva-hover\", hover);\n },\n onClick: (index: number) => {\n const point = this.points?.[index];\n if (point) this.emit(\"minerva-point-click\", { point, index });\n },\n onMove: (\n index: number,\n target: { x: number; y: number; quadrant: string },\n ) => {\n const point = this.points?.[index];\n if (point) this.emit(\"minerva-point-drop\", { point, index, ...target });\n },\n };\n if (this.pointLayer) this.pointLayer.update(options);\n else this.pointLayer = createQuadrantPointLayer(root, options);\n }\n\n /** Draws (or removes) the focus ring of the keyboard-focused dot */\n private focusPoint(index: number | null): void {\n this.focusedPoint = index;\n const options = this.engineOptions();\n if (options) this.instance?.setOptions(options);\n if (this.hasPointActions()) this.requestUpdate();\n }\n\n protected override pointClicked(event: ChartHoverEvent): void {\n const index = event.items[0]?.index;\n const point = index === undefined ? undefined : this.points?.[index];\n if (!point || index === undefined) return;\n const now = Date.now();\n const last = this.lastClick;\n const double = last?.index === index && now - last.time < DOUBLE_CLICK_MS;\n this.lastClick = double ? null : { index, time: now };\n this.emit(\"minerva-point-click\", { point, index });\n if (double) this.emit(\"minerva-point-double-click\", { point, index });\n }\n\n protected override plotClicked(event: ChartPlotClickEvent): void {\n this.emit(\"minerva-quadrant-click\", {\n quadrant: quadrantOf(this.geometry(), event.x, event.y),\n x: event.x,\n y: event.y,\n });\n }\n\n private dropDetail(event: ChartDragEvent) {\n const index = event.item.index;\n const point = this.points?.[index];\n if (!point) return null;\n return {\n point,\n index,\n x: event.x,\n y: event.y,\n quadrant: quadrantOf(this.geometry(), event.x, event.y),\n };\n }\n\n protected override pointDragged(event: ChartDragEvent): void {\n const detail = this.dropDetail(event);\n if (detail) this.emit(\"minerva-point-drag\", detail);\n }\n\n protected override pointDropped(event: ChartDragEvent): void {\n const detail = this.dropDetail(event);\n if (detail) this.emit(\"minerva-point-drop\", detail);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"minerva-line-chart\": MinervaLineChart;\n \"minerva-area-chart\": MinervaAreaChart;\n \"minerva-bar-chart\": MinervaBarChart;\n \"minerva-scatter-chart\": MinervaScatterChart;\n \"minerva-candlestick-chart\": MinervaCandlestickChart;\n \"minerva-heatmap-chart\": MinervaHeatmapChart;\n \"minerva-sparkline\": MinervaSparkline;\n \"minerva-quadrant-chart\": MinervaQuadrantChart;\n }\n}\n"],"mappings":";;;;;;;;;;AAkCA,IAAsBE,IAAtB,cAAiDC,EAA6B;CAW5E,YAAiD;EAC/C,OAAO,KAAK,SAAS;CACvB;CAEA,gBAA+C;EAC7C,IAAMC,IAAS,KAAK,UAAU,KAAK,SAAS;EAE5C,OADKA,IACE;GACL,GAAG,KAAK;GACR,QAAQ,KAAK,MAAMA,CAAM;GACzB,WAAW,KAAK,UAAU;EAC5B,IALoB;CAMtB;AACF;AAtBGJ,EAAA,CAAAK,EAAS,EAAE,WAAW,GAAM,CAAC,CAAA,GAAAH,EAAA,WAAA,UAAA,KAAA,CAAA,GAI7BF,EAAA,CAAAK,EAAS,EAAE,WAAW,GAAM,CAAC,CAAA,GAAAH,EAAA,WAAA,WAAA,KAAA,CAAA;AAgChC,IAAaI,IAAb,cAAsCJ,EAAmB;;EAiB7C,aAZH,KAAA,OAAA,IAI+B,KAAA,QAAA,UAI5B,KAAA,UAAA,IAIA,KAAA,UAAA;;;EAhBgB,KAAA,UAAA;;CAkB1B,MAAgB,GAA+C;EAC7D,OAAOM,EACLJ,GACA,KAAK,OAAO,SAAS,QACrB,KAAK,WAAW,KAAK,UAA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AAC,CAAA,GAAAyB,EAAA,WAAA,YAAA,KAAA,CAAA,GAIlD9B,EAAA,CAAAK,EAAS;CAAE,MAAM;CAAS,WAAW;AAAa,CAAC,CAAA,GAAAyB,EAAA,WAAA,aAAA,KAAA,CAAA,GAInD9B,EAAA,CAAAK,EAAS;CAAE,MAAM;CAAS,WAAW;AAAc,CAAC,CAAA,GAAAyB,EAAA,WAAA,cAAA,KAAA,CAAA,GAIpD9B,EAAA,CAAAK,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAa,CAAC,CAAA,GAAAyB,EAAA,WAAA,aAAA,KAAA,CAAA,GAIlD9B,EAAA,CAAAK,EAAS;CAAE,MAAM;CAAS,WAAW;AAAc,CAAC,CAAA,GAAAyB,EAAA,WAAA,cAAA,KAAA,CAAA,GAIpD9B,EAAA,CAAAK,EAAS;CAAE,MAAM;CAAS,WAAW;AAAc,CAAC,CAAA,GAAAyB,EAAA,WAAA,cAAA,KAAA,CAAA,GAIpD9B,EAAA,CAAAK,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAiB,CAAC,CAAA,GAAAyB,EAAA,WAAA,iBAAA,KAAA,CAAA,GAItD9B,EAAA,CAAAK,EAAS,EAAE,WAAW,GAAM,CAAC,CAAA,GAAAyB,EAAA,WAAA,mBAAA,KAAA,CAAA,GAI7B9B,EAAA,CAAAK,EAAS,EAAE,WAAW,GAAM,CAAC,CAAA,GAAAyB,EAAA,WAAA,WAAA,KAAA,CAAA,GAI7B9B,EAAA,CAAAK,EAAS;CAAE,MAAM;CAAS,WAAW;AAAuB,CAAC,CAAA,GAAAyB,EAAA,WAAA,sBAAA,KAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"charts.js","names":["_decorate","__decorate","SeriesChartElement","MinervaCartesianChartElement","series","property","MinervaLineChart","_args","withSeriesType","MinervaAreaChart","_args2","MinervaBarChart","_args3","s","MinervaScatterChart","MinervaCandlestickChart","MinervaHeatmapChart","_args4","heatmapChartOptions","MinervaSparkline","_args5","sparklineOptions","DOUBLE_CLICK_MS","QUADRANT_HEADER_SLOTS","px","value","fraction","v","a","b","MinervaQuadrantChart","_args6","MinervaEngineElement","names","child","headers","options","withQuadrantCard","quadrantChartOptions","i","chart","event","rect","next","plot","nothing","x0","x1","y0","y1","split","fx","x","y","sx","sy","styleMap","QUADRANT_CORNERS","left","corner","top","changed","actions","index","host","card","createQuadrantPointCard","slot","root","hover","point","target","createQuadrantPointLayer","now","last","double","quadrantOf","detail"],"sources":["../../../../../web-components/src/components/chart/charts.ts"],"sourcesContent":["import { css, html, nothing, type PropertyValues } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { styleMap } from \"lit/directives/style-map.js\";\nimport {\n QUADRANT_CORNERS,\n createQuadrantPointCard,\n createQuadrantPointLayer,\n heatmapChartOptions,\n quadrantChartOptions,\n quadrantOf,\n sparklineOptions,\n withQuadrantCard,\n type ChartDragEvent,\n type ChartHoverEvent,\n type ChartInstance,\n type ChartOptions,\n type ChartPlotClickEvent,\n type ChartRect,\n type ChartSeries,\n type HeatmapCell,\n type QuadrantAxisLabels,\n type QuadrantConfig,\n type QuadrantCorner,\n type QuadrantPoint,\n type QuadrantPointCard,\n type QuadrantPointCardOptions,\n type QuadrantPointLayer,\n type QuadrantRegions,\n} from \"minerva-design/charts/core\";\nimport { MinervaCartesianChartElement } from \"./chart\";\nimport { MinervaEngineElement } from \"./engine-element\";\nimport { withSeriesType } from \"./series\";\n\n/** Engine options other than the series (axes, legend, tooltip, annotations...) */\nexport type ChartBaseOptions = Partial<ChartOptions>;\n\n/** Base of the elements drawing `series` with a default series type */\nexport abstract class SeriesChartElement extends MinervaCartesianChartElement {\n /** Data series (`ChartSeries[]`); each may set its own `type`. Replace the array (or a `data` array) to update the chart; property only */\n @property({ attribute: false })\n series?: readonly ChartSeries[];\n\n /** Other engine options (`ChartOptions` of minerva-design/charts/core: axes, legend, tooltip, annotations...); property only */\n @property({ attribute: false })\n options?: ChartBaseOptions;\n\n protected abstract typed(series: readonly ChartSeries[]): ChartSeries[];\n\n protected stackMode(): ChartOptions[\"stackMode\"] {\n return this.options?.stackMode;\n }\n\n protected engineOptions(): ChartOptions | null {\n const series = this.series ?? this.options?.series;\n if (!series) return null;\n return {\n ...this.options,\n series: this.typed(series),\n stackMode: this.stackMode(),\n };\n }\n}\n\n/**\n * Line chart (or area chart with `area`) of `minerva-design/charts/core`,\n * handling millions of points on the GPU: the `<LineChart>` of React. The\n * series without a `type` are drawn as lines.\n *\n * Published as the optional entry `minerva-design/web-components/chart`.\n *\n * @summary GPU line chart: straight, smooth or stepped, stacked or 100%.\n * @tag minerva-line-chart\n * @csspart root - The sized box of the chart\n * @csspart surface - The element the engine renders into\n */\nexport class MinervaLineChart extends SeriesChartElement {\n static override tagName = \"minerva-line-chart\";\n\n /** Fills the area under the lines */\n @property({ type: Boolean })\n area = false;\n\n /** Shape of the lines: straight, smooth (monotone) or steps */\n @property()\n curve: \"linear\" | \"smooth\" | \"step\" = \"linear\";\n\n /** Stacks the series on top of each other */\n @property({ type: Boolean })\n stacked = false;\n\n /** Scales the stacks to 100% (implies `stacked`) */\n @property({ type: Boolean })\n percent = false;\n\n protected typed(series: readonly ChartSeries[]): ChartSeries[] {\n return withSeriesType(\n series,\n this.area ? \"area\" : \"line\",\n this.stacked || this.percent ? \"stack\" : undefined,\n this.curve,\n );\n }\n\n protected override stackMode(): ChartOptions[\"stackMode\"] {\n return this.percent ? \"percent\" : super.stackMode();\n }\n}\n\n/**\n * Area chart of `minerva-design/charts/core`: smooth by default, stacked or\n * 100% stacked (the `<AreaChart>` of React). The series without a `type`\n * are drawn as areas.\n *\n * Published as the optional entry `minerva-design/web-components/chart`.\n *\n * @summary GPU area chart: smooth, stacked or 100% stacked.\n * @tag minerva-area-chart\n * @csspart root - The sized box of the chart\n * @csspart surface - The element the engine renders into\n */\nexport class MinervaAreaChart extends SeriesChartElement {\n static override tagName = \"minerva-area-chart\";\n\n /** Shape of the edges: straight, smooth (monotone) or steps */\n @property()\n curve: \"linear\" | \"smooth\" | \"step\" = \"smooth\";\n\n /** Stacks the areas on top of each other */\n @property({ type: Boolean })\n stacked = false;\n\n /** Scales the stacks to 100% (implies `stacked`) */\n @property({ type: Boolean })\n percent = false;\n\n protected typed(series: readonly ChartSeries[]): ChartSeries[] {\n return withSeriesType(\n series,\n \"area\",\n this.stacked || this.percent ? \"stack\" : undefined,\n this.curve,\n );\n }\n\n protected override stackMode(): ChartOptions[\"stackMode\"] {\n return this.percent ? \"percent\" : super.stackMode();\n }\n}\n\n/**\n * Bar chart of `minerva-design/charts/core`: grouped side by side, stacked\n * or 100% stacked, with optional value labels (the `<BarChart>` of React).\n * The series without a `type` are drawn as bars (set `type: \"line\"` on a\n * series for an overlay).\n *\n * Published as the optional entry `minerva-design/web-components/chart`.\n *\n * @summary GPU bar chart: grouped, stacked or 100%, with value labels.\n * @tag minerva-bar-chart\n * @csspart root - The sized box of the chart\n * @csspart surface - The element the engine renders into\n */\nexport class MinervaBarChart extends SeriesChartElement {\n static override tagName = \"minerva-bar-chart\";\n\n /** Stacks the bars of every series (otherwise they are grouped side by side) */\n @property({ type: Boolean })\n stacked = false;\n\n /** Scales the stacks to 100% (implies `stacked`) */\n @property({ type: Boolean })\n percent = false;\n\n /** Writes the value above every bar */\n @property({ type: Boolean })\n labels = false;\n\n protected typed(series: readonly ChartSeries[]): ChartSeries[] {\n return withSeriesType(\n series,\n \"bar\",\n this.stacked || this.percent ? \"stack\" : undefined,\n ).map((s) =>\n this.labels && s.type === \"bar\"\n ? { ...s, showLabels: s.showLabels ?? true }\n : s,\n );\n }\n\n protected override stackMode(): ChartOptions[\"stackMode\"] {\n return this.percent ? \"percent\" : super.stackMode();\n }\n}\n\n/**\n * Scatter chart of `minerva-design/charts/core`: zooms on both axes, hit\n * testing through a spatial index (the `<ScatterChart>` of React). The\n * series without a `type` are drawn as dots.\n *\n * Published as the optional entry `minerva-design/web-components/chart`.\n *\n * @summary GPU scatter chart zooming on both axes.\n * @tag minerva-scatter-chart\n * @csspart root - The sized box of the chart\n * @csspart surface - The element the engine renders into\n */\nexport class MinervaScatterChart extends SeriesChartElement {\n static override tagName = \"minerva-scatter-chart\";\n\n protected typed(series: readonly ChartSeries[]): ChartSeries[] {\n return withSeriesType(series, \"scatter\");\n }\n}\n\n/**\n * Candlestick (OHLC) chart of `minerva-design/charts/core` (the\n * `<CandlestickChart>` of React): data points carry `open`, `high`, `low`\n * and `y` (the close). The series without a `type` are drawn as candles\n * (e.g. add a moving average with `type: \"line\"`).\n *\n * Published as the optional entry `minerva-design/web-components/chart`.\n *\n * @summary GPU candlestick chart of rising and falling candles.\n * @tag minerva-candlestick-chart\n * @csspart root - The sized box of the chart\n * @csspart surface - The element the engine renders into\n */\nexport class MinervaCandlestickChart extends SeriesChartElement {\n static override tagName = \"minerva-candlestick-chart\";\n\n protected typed(series: readonly ChartSeries[]): ChartSeries[] {\n return withSeriesType(series, \"candlestick\");\n }\n}\n\n/**\n * Heatmap of `minerva-design/charts/core` (the `<HeatmapChart>` of React):\n * a grid of cells colored by value, categories (or numbers) on both axes.\n *\n * Published as the optional entry `minerva-design/web-components/chart`.\n *\n * @summary GPU heatmap: a grid of cells colored by value.\n * @tag minerva-heatmap-chart\n * @csspart root - The sized box of the chart\n * @csspart surface - The element the engine renders into\n */\nexport class MinervaHeatmapChart extends MinervaCartesianChartElement {\n static override tagName = \"minerva-heatmap-chart\";\n\n /** Cells `{ x, y, value }`; property only */\n @property({ attribute: false })\n data?: readonly HeatmapCell[];\n\n /** Column names in order (collected from the data when omitted); property only */\n @property({ attribute: false })\n xCategories?: readonly string[];\n\n /** Row names from bottom to top (collected from the data when omitted); property only */\n @property({ attribute: false })\n yCategories?: readonly string[];\n\n /** Colors from the lowest to the highest value (interpolated in OKLab), or a built-in theme-aware ramp of the first palette color (`sequential` by default, or `diverging`); an array is property only */\n @property({ attribute: \"color-scale\" })\n colorScale: readonly string[] | \"sequential\" | \"diverging\" = \"sequential\";\n\n /** Values at the ends of the color scale (the data range by default); property only */\n @property({ attribute: false })\n valueRange?: readonly [number, number];\n\n /** Value at the middle of the color scale (diverging data; 0 for `diverging` ramps spanning it, else the middle of the range, by default) */\n @property({ type: Number, attribute: \"color-midpoint\" })\n colorMidpoint?: number;\n\n /** Name of the value in the tooltip */\n @property({ attribute: \"value-name\" })\n valueName?: string;\n\n /** Corner radius of the cells, in pixels */\n @property({ type: Number })\n radius?: number;\n\n /** Formats the values in the tooltip; property only */\n @property({ attribute: false })\n format?: (value: number) => string;\n\n /** Other engine options (axes, legend, tooltip, padding...); property only */\n @property({ attribute: false })\n options?: ChartBaseOptions;\n\n protected engineOptions(): ChartOptions | null {\n if (!this.data) return null;\n return heatmapChartOptions(\n {\n data: this.data,\n xCategories: this.xCategories,\n yCategories: this.yCategories,\n colorScale: this.colorScale,\n valueRange: this.valueRange,\n colorMidpoint: this.colorMidpoint,\n name: this.valueName,\n radius: this.radius,\n format: this.format,\n },\n this.options,\n );\n }\n}\n\n/**\n * Word-sized chart without axes (a trend in a table cell, a KPI card...) of\n * `minerva-design/charts/core`: the `<Sparkline>` of React.\n *\n * Published as the optional entry `minerva-design/web-components/chart`.\n *\n * @summary Small line, area or bar trend without axes.\n * @tag minerva-sparkline\n * @csspart root - The sized box of the chart\n * @csspart surface - The element the engine renders into\n */\nexport class MinervaSparkline extends MinervaCartesianChartElement {\n static override tagName = \"minerva-sparkline\";\n\n /** Height of the sparkline: pixels or any CSS length */\n @property()\n override height?: string | number = 48;\n\n /** Values (or `[x, y]` pairs, typed arrays...); property only */\n @property({ attribute: false })\n data?: ChartSeries[\"data\"];\n\n /** How the values are drawn */\n @property()\n type: \"line\" | \"area\" | \"bar\" = \"line\";\n\n /** Color (any CSS color); the first palette color by default */\n @property()\n color?: string;\n\n /** Shape of the line */\n @property()\n curve: \"linear\" | \"smooth\" | \"step\" = \"smooth\";\n\n /** Draws a dashed reference line at this value (a target, the average...) */\n @property({ type: Number })\n reference?: number;\n\n /** Name of the value in the tooltip */\n @property({ attribute: \"value-name\" })\n valueName?: string;\n\n /** Formats the value in the tooltip; property only */\n @property({ attribute: false })\n format?: (value: number) => string;\n\n /** Other engine options (tooltip, palette, renderer...); property only */\n @property({ attribute: false })\n options?: ChartBaseOptions;\n\n protected engineOptions(): ChartOptions | null {\n if (!this.data) return null;\n return sparklineOptions(\n {\n data: this.data,\n type: this.type,\n color: this.color,\n curve: this.curve,\n name: this.valueName,\n reference: this.reference,\n format: this.format,\n },\n this.options,\n );\n }\n}\n\n/** Two clicks on the same dot within this delay count as a double click */\nconst DOUBLE_CLICK_MS = 400;\n\n/** Slot of the header of each quadrant of `<minerva-quadrant-chart>` */\nexport const QUADRANT_HEADER_SLOTS: Readonly<Record<QuadrantCorner, string>> = {\n topLeft: \"quadrant-header-top-left\",\n topRight: \"quadrant-header-top-right\",\n bottomLeft: \"quadrant-header-bottom-left\",\n bottomRight: \"quadrant-header-bottom-right\",\n};\n\nconst px = (value: number) => `${value}px`;\nconst fraction = (v: number, a: number, b: number) => (v - a) / (b - a || 1);\n\n/**\n * Four-quadrant matrix (priority matrix, Eisenhower, BCG...) of\n * `minerva-design/charts/core` (the `<QuadrantChart>` of React): tinted\n * quadrants with titles, dividers and labelled dots placed without\n * overlapping labels. With `drag-points`, dots can be dragged to another\n * quadrant (`minerva-point-drop`; update `points` to move them).\n *\n * A visually hidden list of the dots per quadrant lets screen readers and\n * keyboards reach every dot: arrows move between them, Enter clicks\n * (`minerva-point-click`) and, with `drag-points`, Shift + arrows move the\n * focused dot to the neighbouring quadrant (`minerva-point-drop`, announced\n * in a live region). The focused dot is drawn with a focus ring and\n * reported by `minerva-hover`.\n *\n * One glass point card names the hovered, keyboard-focused or dragged dot\n * (its name and quadrant) in place of the engine tooltip; with slotted\n * `point-actions`, the card also shows them and stays on the\n * `selected-index` dot (read the dot they act on from `activeIndex`).\n *\n * Slotted content is placed over the plot: a header per quadrant (in its\n * outer corner, replacing the drawn title, badge, description and count)\n * and the actions in the point card. Both receive pointer events; the rest\n * of the plot stays interactive.\n *\n * Published as the optional entry `minerva-design/web-components/chart`.\n *\n * @summary Four-quadrant matrix of labelled, draggable dots.\n * @tag minerva-quadrant-chart\n * @slot quadrant-header-top-left - Header of the top left quadrant (replaces its drawn title and count)\n * @slot quadrant-header-top-right - Header of the top right quadrant\n * @slot quadrant-header-bottom-left - Header of the bottom left quadrant\n * @slot quadrant-header-bottom-right - Header of the bottom right quadrant\n * @slot point-actions - Actions shown in the point card of the active dot, beside its name (e.g. compact edit / delete buttons); the card then also stays on the selected dot\n * @csspart root - The sized box of the chart\n * @csspart surface - The element the engine renders into\n * @csspart overlay - The box over the plot holding the slotted headers and the point card\n * @csspart quadrant-header - The box of a quadrant header slot (in the outer corner of its quadrant)\n * @csspart point-card - The glass card of the hovered, focused, dragged (or, with actions, selected) dot\n * @csspart point-actions - The actions box in the point card, holding the `point-actions` slot\n * @fires minerva-point-click - A dot was clicked; detail: { point, index }\n * @fires minerva-point-double-click - The same dot was clicked twice in quick succession; detail: { point, index }\n * @fires minerva-quadrant-click - The empty area of a quadrant was clicked; detail: { quadrant, x, y }\n * @fires minerva-point-drag - A dot is being dragged (on every move); detail: { point, index, x, y, quadrant }\n * @fires minerva-point-drop - A dragged dot was released, or the focused dot was moved with Shift + an arrow key; detail: { point, index, x, y, quadrant }\n * @fires minerva-hover - The hovered (or keyboard-focused) dot changed; detail: { x, xLabel, items }, `null` when nothing is hovered\n */\nexport class MinervaQuadrantChart extends MinervaCartesianChartElement {\n static override tagName = \"minerva-quadrant-chart\";\n static override styles = [\n MinervaEngineElement.styles,\n css`\n.overlay,\n.quadrant,\n.card-host{\nposition: absolute;\npointer-events: none;\n}\n.card-host{\nleft: 0;\ntop: 0;\n}\n.quadrant-header{\nposition: absolute;\ndisplay: flex;\nbox-sizing: border-box;\nmax-width: 100%;\npadding: 8px;\npointer-events: none;\n}\n.quadrant-header.top{\ntop: 0;\n}\n.quadrant-header.bottom{\nbottom: 0;\n}\n.quadrant-header.left{\nleft: 0;\njustify-content: flex-start;\n}\n.quadrant-header.right{\nright: 0;\njustify-content: flex-end;\n}\n.quadrant-header ::slotted(*){\npointer-events: auto;\n}\n`,\n ];\n\n /** Points `{ x, y, label, color, size }` to place; property only */\n @property({ attribute: false })\n points?: readonly QuadrantPoint[];\n\n /** Titles and colors of the quadrants (`topLeft`, `topRight`, `bottomLeft`, `bottomRight`); property only */\n @property({ attribute: false })\n quadrants?: QuadrantRegions;\n\n /** Title of the horizontal axis */\n @property({ attribute: \"x-label\" })\n xLabel?: string;\n\n /** Title of the vertical axis */\n @property({ attribute: \"y-label\" })\n yLabel?: string;\n\n /** Texts at the ends of the dividers, drawn inside the plot; property only */\n @property({ attribute: false })\n axisLabels?: QuadrantAxisLabels;\n\n /** Range of the horizontal axis (default [0, 10]); property only */\n @property({ attribute: false })\n xDomain?: [number, number];\n\n /** Range of the vertical axis (default [0, 10]); property only */\n @property({ attribute: false })\n yDomain?: [number, number];\n\n /** X value of the vertical divider (the middle of the x domain by default) */\n @property({ type: Number, attribute: \"x-split\" })\n xSplit?: number;\n\n /** Y value of the horizontal divider (the middle of the y domain by default) */\n @property({ type: Number, attribute: \"y-split\" })\n ySplit?: number;\n\n /** Reverses the horizontal axis (e.g. \"urgent\" on the left) */\n @property({ type: Boolean, attribute: \"reverse-x\" })\n reverseX = false;\n\n /** Hides the numeric ticks of the axes (only the matrix remains) */\n @property({ type: Boolean, attribute: \"hide-ticks\" })\n hideTicks = false;\n\n /** Hides the labels next to the dots */\n @property({ type: Boolean, attribute: \"hide-labels\" })\n hideLabels = false;\n\n /** Dot diameter in pixels */\n @property({ type: Number, attribute: \"point-size\" })\n pointSize = 12;\n\n /** Lets the user drag the dots (`minerva-point-drag`, `minerva-point-drop`) */\n @property({ type: Boolean, attribute: \"drag-points\" })\n dragPoints = false;\n\n /** Shows the number of points of each quadrant after its title; as a property, a function `(count, points) => text` returns the text */\n @property({ type: Boolean, attribute: \"show-counts\" })\n showCounts: QuadrantConfig[\"showCounts\"] = false;\n\n /** Index of the selected dot, drawn with a ring (`null`: none) */\n @property({ type: Number, attribute: \"selected-index\" })\n selectedIndex?: number | null;\n\n /** Indices of the selected dots; property only */\n @property({ attribute: false })\n selectedIndices?: readonly number[];\n\n /** Other engine options (legend, tooltip, padding, palette...); property only */\n @property({ attribute: false })\n options?: Omit<ChartOptions, \"series\">;\n\n /** Leaves out the visually hidden list of the dots (keyboard and screen reader access) */\n @property({ type: Boolean, attribute: \"no-accessible-points\" })\n noAccessiblePoints = false;\n\n private lastClick: { index: number; time: number } | null = null;\n private pointLayer: QuadrantPointLayer | null = null;\n private focusedPoint: number | null = null;\n /** Plot area (where the slots and the card are placed), known once the engine drew */\n private plot: ChartRect | null = null;\n private slotObserver: MutationObserver | null = null;\n /** Slots having content at the last check (header slots, point actions) */\n private slotted = \"\";\n private card: QuadrantPointCard | null = null;\n /** The box over the plot the card was mounted in */\n private cardHost: HTMLElement | null = null;\n /** The dot of the card, as last reported by it */\n private cardIndex: number | null = null;\n\n /**\n * Index of the active dot, the one whose point card shows the\n * `point-actions` slot (hovered, keyboard-focused, else `selectedIndex`\n * when actions are slotted); `null` while no card is shown or during a\n * drag\n */\n get activeIndex(): number | null {\n return this.cardIndex;\n }\n\n /** Whether a quadrant header slot has content */\n private hasHeaders(): boolean {\n const names = Object.values(QUADRANT_HEADER_SLOTS);\n return Array.from(this.children).some((child) =>\n names.includes(child.getAttribute(\"slot\") ?? \"\"),\n );\n }\n\n private hasPointActions(): boolean {\n return Array.from(this.children).some(\n (child) => child.getAttribute(\"slot\") === \"point-actions\",\n );\n }\n\n private geometry(): Pick<\n QuadrantConfig,\n \"xDomain\" | \"yDomain\" | \"xSplit\" | \"ySplit\" | \"reverseX\"\n > {\n return {\n xDomain: this.xDomain,\n yDomain: this.yDomain,\n xSplit: this.xSplit,\n ySplit: this.ySplit,\n reverseX: this.reverseX,\n };\n }\n\n protected engineOptions(): ChartOptions | null {\n if (!this.points) return null;\n const headers = this.hasHeaders();\n // the point card names the hovered, focused or dragged dot: no engine\n // tooltip, label chip or drag pill beside it\n const options = withQuadrantCard(\n quadrantChartOptions(\n {\n ...this.geometry(),\n points: this.points,\n quadrants: this.quadrants,\n xLabel: this.xLabel,\n yLabel: this.yLabel,\n axisLabels: this.axisLabels,\n showTicks: !this.hideTicks,\n showLabels: !this.hideLabels,\n pointSize: this.pointSize,\n draggable: this.dragPoints,\n showCounts: headers ? undefined : this.showCounts,\n selectedIndex: this.selectedIndex,\n selectedIndices: this.selectedIndices,\n },\n this.options,\n { focusedIndex: this.noAccessiblePoints ? null : this.focusedPoint },\n ),\n );\n if (headers)\n // the slotted headers replace the drawn titles (the first four areas)\n options.annotations = options.annotations?.map((a, i) =>\n i < 4 && a.type === \"rect\"\n ? {\n ...a,\n label: undefined,\n badge: undefined,\n description: undefined,\n detail: undefined,\n }\n : a,\n );\n return options;\n }\n\n protected override bindEngine(chart: ChartInstance): Array<() => void> {\n return [\n ...super.bindEngine(chart),\n chart.on(\"hover\", (event) =>\n this.card?.hover(event?.items?.[0]?.index ?? null),\n ),\n chart.on(\"layout\", (rect) => {\n this.plot = rect;\n this.requestUpdate();\n }),\n ];\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (this.hasUpdated) this.syncPointLayer();\n this.slotted = this.slotState();\n if (typeof MutationObserver === \"undefined\") return;\n // slotted headers / actions added or removed: redraw without the titles\n this.slotObserver = new MutationObserver(() => {\n const next = this.slotState();\n if (next === this.slotted) return;\n this.slotted = next;\n this.requestUpdate();\n const options = this.engineOptions();\n if (options) this.instance?.setOptions(options);\n });\n this.slotObserver.observe(this, {\n childList: true,\n attributes: true,\n attributeFilter: [\"slot\"],\n subtree: true,\n });\n }\n\n override disconnectedCallback(): void {\n // before the engine goes: the card gives the drawn label back\n this.destroyCard();\n super.disconnectedCallback();\n this.pointLayer?.destroy();\n this.pointLayer = null;\n this.focusedPoint = null;\n this.plot = null;\n this.slotObserver?.disconnect();\n this.slotObserver = null;\n }\n\n private slotState(): string {\n return `${this.hasHeaders() ? \"h\" : \"\"}${this.hasPointActions() ? \"a\" : \"\"}`;\n }\n\n /** The slotted headers and the box of the point card, over the plot */\n protected override renderOverlay() {\n const headers = this.hasHeaders();\n const plot = this.plot;\n if (!plot) return nothing;\n const [x0, x1] = this.xDomain ?? [0, 10];\n const [y0, y1] = this.yDomain ?? [0, 10];\n const visual = (x: number, y: number) => {\n const fx = fraction(x, x0, x1);\n return { x: this.reverseX ? 1 - fx : fx, y: 1 - fraction(y, y0, y1) };\n };\n const split = visual(\n this.xSplit ?? (x0 + x1) / 2,\n this.ySplit ?? (y0 + y1) / 2,\n );\n const sx = plot.width * split.x;\n const sy = plot.height * split.y;\n const quadrant = (corner: QuadrantCorner) => {\n const left = corner.endsWith(\"Left\");\n const top = corner.startsWith(\"top\");\n return html`<div\nclass=\"quadrant\"\nstyle=${styleMap({\n left: px(left ? 0 : sx),\n top: px(top ? 0 : sy),\n width: px(left ? sx : plot.width - sx),\n height: px(top ? sy : plot.height - sy),\n })}\n>\n<div\npart=\"quadrant-header\"\nclass=\"quadrant-header ${top ? \"top\" : \"bottom\"} ${\n left ? \"left\" : \"right\"\n }\"\ndata-corner=${corner}\n>\n<slot name=${QUADRANT_HEADER_SLOTS[corner]}></slot>\n</div>\n</div>`;\n };\n return html`<div\npart=\"overlay\"\nclass=\"overlay\"\nstyle=${styleMap({\n left: px(plot.x),\n top: px(plot.y),\n width: px(plot.width),\n height: px(plot.height),\n })}\n>\n${headers ? QUADRANT_CORNERS.map(quadrant) : nothing}\n<div\nclass=\"card-host\"\ndata-card-host\nstyle=${styleMap({ width: px(plot.width), height: px(plot.height) })}\n></div>\n</div>`;\n }\n\n protected override updated(changed: PropertyValues): void {\n super.updated(changed);\n this.syncPointLayer();\n this.syncCard();\n }\n\n private cardOptions(): QuadrantPointCardOptions {\n const actions = this.hasPointActions();\n return {\n config: {\n ...this.geometry(),\n points: this.points ?? [],\n quadrants: this.quadrants,\n xLabel: this.xLabel,\n yLabel: this.yLabel,\n },\n locale: this.options?.locale,\n pointSize: this.pointSize,\n // the hovered dot shows its card unless the tooltip is off\n hover: this.options?.tooltip !== false,\n selectedIndex: this.selectedIndex,\n // with actions (a board), the selected dot keeps its card: its\n // actions stay at hand; otherwise a selection is only a ring\n showSelected: actions,\n hasActions: () => actions,\n chart: this.instance,\n onClick: (index) => this.clickPoint(index),\n onChange: (index) => {\n this.cardIndex = index;\n },\n };\n }\n\n /** Mounts the point card once the engine and its box exist, else updates it */\n private syncCard(): void {\n const host = this.isConnected\n ? this.renderRoot.querySelector<HTMLElement>(\"[data-card-host]\")\n : null;\n const chart = this.instance;\n if (this.card && (host !== this.cardHost || !chart)) this.destroyCard();\n if (!host || !chart) return;\n if (this.card) {\n this.card.update(this.cardOptions());\n return;\n }\n const card = createQuadrantPointCard(host, this.cardOptions());\n this.card = card;\n this.cardHost = host;\n card.element.setAttribute(\"part\", \"point-card\");\n card.actions.setAttribute(\"part\", \"point-actions\");\n const slot = this.ownerDocument.createElement(\"slot\");\n slot.name = \"point-actions\";\n card.actions.append(slot);\n if (this.focusedPoint !== null) card.focus(this.focusedPoint);\n }\n\n private destroyCard(): void {\n this.card?.destroy();\n this.card = null;\n this.cardHost = null;\n this.cardIndex = null;\n }\n\n /** Mounts, updates or removes the accessible list of the dots */\n private syncPointLayer(): void {\n const root = this.renderRoot.querySelector<HTMLElement>(\"[part=root]\");\n if (this.noAccessiblePoints || !this.points || !root || !this.isConnected) {\n this.pointLayer?.destroy();\n this.pointLayer = null;\n if (this.focusedPoint !== null) this.focusPoint(null);\n return;\n }\n const options = {\n config: {\n ...this.geometry(),\n points: this.points,\n quadrants: this.quadrants,\n xLabel: this.xLabel,\n yLabel: this.yLabel,\n },\n locale: this.options?.locale,\n movable: this.dragPoints,\n selected: [\n ...(this.selectedIndices ?? []),\n ...(this.selectedIndex !== undefined && this.selectedIndex !== null\n ? [this.selectedIndex]\n : []),\n ],\n onFocusChange: (index: number | null, hover: ChartHoverEvent | null) => {\n this.focusPoint(index);\n this.emit(\"minerva-hover\", hover);\n },\n onClick: (index: number) => {\n const point = this.points?.[index];\n if (point) this.emit(\"minerva-point-click\", { point, index });\n },\n onMove: (\n index: number,\n target: { x: number; y: number; quadrant: string },\n ) => {\n const point = this.points?.[index];\n if (point) this.emit(\"minerva-point-drop\", { point, index, ...target });\n },\n };\n if (this.pointLayer) this.pointLayer.update(options);\n else this.pointLayer = createQuadrantPointLayer(root, options);\n }\n\n /** Draws (or removes) the focus ring of the keyboard-focused dot, shows its card */\n private focusPoint(index: number | null): void {\n this.focusedPoint = index;\n const options = this.engineOptions();\n if (options) this.instance?.setOptions(options);\n if (index !== null) this.card?.focus(index);\n // the focus may be on its way from the dot to the actions of its card:\n // the card holds itself once they have it (their focusin comes next)\n else\n setTimeout(() => {\n if (this.focusedPoint === null) this.card?.focus(null);\n });\n }\n\n protected override pointClicked(event: ChartHoverEvent): void {\n const index = event.items[0]?.index;\n if (index !== undefined) this.clickPoint(index);\n }\n\n /**\n * A click on a dot or on the name in its card; two quick ones on the same\n * dot count as a double click\n */\n private clickPoint(index: number): void {\n const point = this.points?.[index];\n if (!point) return;\n const now = Date.now();\n const last = this.lastClick;\n const double = last?.index === index && now - last.time < DOUBLE_CLICK_MS;\n this.lastClick = double ? null : { index, time: now };\n this.emit(\"minerva-point-click\", { point, index });\n if (double) this.emit(\"minerva-point-double-click\", { point, index });\n }\n\n protected override plotClicked(event: ChartPlotClickEvent): void {\n this.emit(\"minerva-quadrant-click\", {\n quadrant: quadrantOf(this.geometry(), event.x, event.y),\n x: event.x,\n y: event.y,\n });\n }\n\n private dropDetail(event: ChartDragEvent) {\n const index = event.item.index;\n const point = this.points?.[index];\n if (!point) return null;\n return {\n point,\n index,\n x: event.x,\n y: event.y,\n quadrant: quadrantOf(this.geometry(), event.x, event.y),\n };\n }\n\n protected override pointDragStarted(event: ChartDragEvent): void {\n this.card?.drag(event.item.index, { x: event.x, y: event.y });\n }\n\n protected override pointDragged(event: ChartDragEvent): void {\n this.card?.move({ x: event.x, y: event.y });\n const detail = this.dropDetail(event);\n if (detail) this.emit(\"minerva-point-drag\", detail);\n }\n\n protected override pointDropped(event: ChartDragEvent): void {\n const detail = this.dropDetail(event);\n if (detail) this.emit(\"minerva-point-drop\", detail);\n }\n\n protected override pointDragEnded(): void {\n this.card?.drag(null);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"minerva-line-chart\": MinervaLineChart;\n \"minerva-area-chart\": MinervaAreaChart;\n \"minerva-bar-chart\": MinervaBarChart;\n \"minerva-scatter-chart\": MinervaScatterChart;\n \"minerva-candlestick-chart\": MinervaCandlestickChart;\n \"minerva-heatmap-chart\": MinervaHeatmapChart;\n \"minerva-sparkline\": MinervaSparkline;\n \"minerva-quadrant-chart\": MinervaQuadrantChart;\n }\n}\n"],"mappings":";;;;;;;;;AAqCA,IAAsBE,IAAtB,cAAiDC,EAA6B;CAW5E,YAAiD;EAC/C,OAAO,KAAK,SAAS;CACvB;CAEA,gBAA+C;EAC7C,IAAMC,IAAS,KAAK,UAAU,KAAK,SAAS;EAE5C,OADKA,IACE;GACL,GAAG,KAAK;GACR,QAAQ,KAAK,MAAMA,CAAM;GACzB,WAAW,KAAK,UAAU;EAC5B,IALoB;CAMtB;AACF;AAtBGJ,EAAA,CAAAK,EAAS,EAAE,WAAW,GAAM,CAAC,CAAA,GAAAH,EAAA,WAAA,UAAA,KAAA,CAAA,GAI7BF,EAAA,CAAAK,EAAS,EAAE,WAAW,GAAM,CAAC,CAAA,GAAAH,EAAA,WAAA,WAAA,KAAA,CAAA;AAgChC,IAAaI,IAAb,cAAsCJ,EAAmB;;EAiB7C,aAZH,KAAA,OAAA,IAI+B,KAAA,QAAA,UAI5B,KAAA,UAAA,IAIA,KAAA,UAAA;;;EAhBgB,KAAA,UAAA;;CAkB1B,MAAgB,GAA+C;EAC7D,OAAOM,EACLJ,GACA,KAAK,OAAO,SAAS,QACrB,KAAK,WAAW,KAAK,UAAU,UAAU,KAAA,GACzC,KAAK,KACP;CACF;CAEA,YAA0D;EACxD,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;AAAa,CAAC,CAAA,GAAAyB,EAAA,WAAA,aAAA,KAAA,CAAA,GAIlD9B,EAAA,CAAAK,EAAS;CAAE,MAAM;CAAS,WAAW;AAAc,CAAC,CAAA,GAAAyB,EAAA,WAAA,cAAA,KAAA,CAAA,GAIpD9B,EAAA,CAAAK,EAAS;CAAE,MAAM;CAAS,WAAW;AAAc,CAAC,CAAA,GAAAyB,EAAA,WAAA,cAAA,KAAA,CAAA,GAIpD9B,EAAA,CAAAK,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAiB,CAAC,CAAA,GAAAyB,EAAA,WAAA,iBAAA,KAAA,CAAA,GAItD9B,EAAA,CAAAK,EAAS,EAAE,WAAW,GAAM,CAAC,CAAA,GAAAyB,EAAA,WAAA,mBAAA,KAAA,CAAA,GAI7B9B,EAAA,CAAAK,EAAS,EAAE,WAAW,GAAM,CAAC,CAAA,GAAAyB,EAAA,WAAA,WAAA,KAAA,CAAA,GAI7B9B,EAAA,CAAAK,EAAS;CAAE,MAAM;CAAS,WAAW;AAAuB,CAAC,CAAA,GAAAyB,EAAA,WAAA,sBAAA,KAAA,CAAA"}
|
|
@@ -14,13 +14,13 @@ export interface QuadrantTaskBoardChangeDetail {
|
|
|
14
14
|
/**
|
|
15
15
|
* Task board on a four-quadrant matrix (`<QuadrantTaskBoard>` of React),
|
|
16
16
|
* built on `<minerva-quadrant-chart>`: each quadrant header shows its
|
|
17
|
-
* title, the number of tasks and an add button; the
|
|
18
|
-
* keyboard-focused or selected) shows edit and delete
|
|
19
|
-
* panel, anchored inside the board at
|
|
20
|
-
*
|
|
21
|
-
* closes it). Tasks can be dragged to
|
|
22
|
-
* Shift + arrows once focused; a double
|
|
23
|
-
* empty area adds one there.
|
|
17
|
+
* title, the number of tasks and an add button; the point card of the
|
|
18
|
+
* active task (hovered, keyboard-focused or selected) shows edit and delete
|
|
19
|
+
* buttons beside its name; an inline panel, anchored inside the board at
|
|
20
|
+
* the button or the task, names a task and picks its quadrant, or confirms
|
|
21
|
+
* a delete (Escape or a press outside closes it). Tasks can be dragged to
|
|
22
|
+
* another quadrant, or moved with Shift + arrows once focused; a double
|
|
23
|
+
* click edits a task, a click on an empty area adds one there.
|
|
24
24
|
*
|
|
25
25
|
* Controlled, like `<minerva-dashboard-columns>`: the board never changes its
|
|
26
26
|
* own `points`. It fires `minerva-points-change` with the next list after
|
|
@@ -119,7 +119,7 @@ export declare class MinervaQuadrantTaskBoard extends MinervaElement {
|
|
|
119
119
|
private engineOptions;
|
|
120
120
|
/** Box of an element, relative to the board */
|
|
121
121
|
private boxOf;
|
|
122
|
-
/** Box around a task (
|
|
122
|
+
/** Box around a task (its dot in the chart), else the last pointer */
|
|
123
123
|
private pointBox;
|
|
124
124
|
private change;
|
|
125
125
|
private open;
|
|
@@ -33,9 +33,9 @@ function R() {
|
|
|
33
33
|
for (; e?.shadowRoot?.activeElement;) e = e.shadowRoot.activeElement;
|
|
34
34
|
return e instanceof HTMLElement ? e : null;
|
|
35
35
|
}
|
|
36
|
-
var z = (e) => p`<svg
|
|
37
|
-
width
|
|
38
|
-
height
|
|
36
|
+
var z = (e, t = 16) => p`<svg
|
|
37
|
+
width=${t}
|
|
38
|
+
height=${t}
|
|
39
39
|
viewBox="0 0 24 24"
|
|
40
40
|
fill="none"
|
|
41
41
|
stroke="currentColor"
|
|
@@ -113,6 +113,10 @@ display: block;
|
|
|
113
113
|
width: 100%;
|
|
114
114
|
min-inline-size: 0;
|
|
115
115
|
}
|
|
116
|
+
|
|
117
|
+
.board[data-panel] minerva-quadrant-chart::part(point-card){
|
|
118
|
+
display: none;
|
|
119
|
+
}
|
|
116
120
|
`,
|
|
117
121
|
i(d)
|
|
118
122
|
];
|
|
@@ -185,10 +189,10 @@ min-inline-size: 0;
|
|
|
185
189
|
};
|
|
186
190
|
}
|
|
187
191
|
pointBox(e) {
|
|
188
|
-
let t = this.
|
|
189
|
-
return
|
|
190
|
-
x:
|
|
191
|
-
y:
|
|
192
|
+
let t = this.chart, n = this.tasks[e], r = n ? t?.instance?.toPixel(n.x, n.y) : null, i = r ? this.boxOf(t?.shadowRoot?.querySelector("[part=surface]")) : null;
|
|
193
|
+
return r && i ? {
|
|
194
|
+
x: i.x + r.x - I,
|
|
195
|
+
y: i.y + r.y - I,
|
|
192
196
|
width: 20,
|
|
193
197
|
height: 20
|
|
194
198
|
} : this.lastPointer ? { ...this.lastPointer } : L();
|
|
@@ -425,26 +429,26 @@ ${v.map((e) => this.renderHeader(e, this.hideCounts ? void 0 : E(!0, r[e].points
|
|
|
425
429
|
<div
|
|
426
430
|
slot="point-actions"
|
|
427
431
|
role="toolbar"
|
|
428
|
-
class="
|
|
432
|
+
class="cardActions"
|
|
429
433
|
aria-label=${n.actions}
|
|
430
434
|
@pointerdown=${F}
|
|
431
435
|
>
|
|
432
436
|
<minerva-icon-button
|
|
433
|
-
size="
|
|
437
|
+
size="xsmall"
|
|
434
438
|
variant="ghost"
|
|
435
439
|
label=${n.edit}
|
|
436
440
|
data-action="edit"
|
|
437
441
|
@click=${() => this.edit(this.chart?.activeIndex ?? null)}
|
|
438
|
-
>${z("edit")}</minerva-icon-button
|
|
442
|
+
>${z("edit", 14)}</minerva-icon-button
|
|
439
443
|
>
|
|
440
444
|
<minerva-icon-button
|
|
441
|
-
size="
|
|
445
|
+
size="xsmall"
|
|
442
446
|
variant="ghost"
|
|
443
447
|
color="danger"
|
|
444
448
|
label=${n.delete}
|
|
445
449
|
data-action="delete"
|
|
446
450
|
@click=${() => this.confirmRemove(this.chart?.activeIndex ?? null)}
|
|
447
|
-
>${z("delete")}</minerva-icon-button
|
|
451
|
+
>${z("delete", 14)}</minerva-icon-button
|
|
448
452
|
>
|
|
449
453
|
</div>
|
|
450
454
|
</minerva-quadrant-chart>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quadrant-task-board.js","names":["styles","_decorate","__decorate","quadrantTaskBoard_module_default","INTERNAL_EVENTS","stop","event","DOT","emptyBox","deepActiveElement","active","icon","QUADRANT_TASK_ICONS","kind","MinervaQuadrantTaskBoard","MinervaElement","_args","LocaleController","AriaController","target","panel","removeQuadrantTask","selectionAfterRemove","board","b","quadrant","moveQuadrantTask","index","MinervaQuadrantChart","MinervaIconButton","MinervaInput","MinervaButton","hostStyles","sharedStyles","root","type","points","corner","quadrantLabels","cached","locale","ariaLabel","value","el","box","next","newQuadrantTaskDraft","at","draft","editQuadrantTaskDraft","change","saved","applyQuadrantTaskDraft","changed","placed","child","anchor","place","placeQuadrantTaskPanel","on","badge","QUADRANT_HEADER_SLOTS","nothing","count","addLabel","expanded","texts","QUADRANT_CORNERS","styleMap","quadrantTaskColor","canSaveQuadrantTask","quadrantTaskDeleteText","quadrantTaskLabels","groups","quadrantGroups","adding","selected","quadrantCountText","property","state"],"sources":["../../../../../web-components/src/components/quadrant-task-board/quadrant-task-board.ts"],"sourcesContent":["import { css, html, nothing, type PropertyValues } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { styleMap } from \"lit/directives/style-map.js\";\nimport styles from \"@react-styles/components/QuadrantTaskBoard/quadrantTaskBoard.module.scss?inline\";\nimport {\n QUADRANT_CORNERS,\n QUADRANT_TASK_ICONS,\n applyQuadrantTaskDraft,\n canSaveQuadrantTask,\n editQuadrantTaskDraft,\n moveQuadrantTask,\n newQuadrantTaskDraft,\n placeQuadrantTaskPanel,\n quadrantCountText,\n quadrantGroups,\n quadrantLabels,\n quadrantTaskColor,\n quadrantTaskDeleteText,\n quadrantTaskLabels,\n removeQuadrantTask,\n selectionAfterRemove,\n type ChartOptions,\n type QuadrantAxisLabels,\n type QuadrantCorner,\n type QuadrantPoint,\n type QuadrantRegions,\n type QuadrantTaskBox,\n type QuadrantTaskDraft,\n type QuadrantTaskGeometry,\n type QuadrantTaskLabels,\n} from \"minerva-design/charts/core\";\nimport { MinervaButton } from \"../button/button\";\nimport { MinervaQuadrantChart, QUADRANT_HEADER_SLOTS } from \"../chart/charts\";\nimport { MinervaIconButton } from \"../icon-button/icon-button\";\nimport { MinervaInput } from \"../input/input\";\nimport { AriaController } from \"../../internal/aria\";\nimport { LocaleController } from \"../../internal/locale\";\nimport { MinervaElement, hostStyles } from \"../../internal/minerva-element\";\nimport { sharedStyles } from \"../../internal/styles\";\n\nexport type { QuadrantTaskLabels };\n\n/** Detail of `minerva-points-change` */\nexport interface QuadrantTaskBoardChangeDetail {\n /** The next list of tasks (pass it back as `points`) */\n points: QuadrantPoint[];\n}\n\n/**\n * Events of the inner chart and of the fields of the panel that the board\n * consumes: they stop at its shadow root (the board fires\n * `minerva-points-change`). `minerva-hover`, `minerva-point-click`,\n * `minerva-point-drag`, `minerva-zoom` and `minerva-renderer-change` of the\n * chart go through.\n */\nconst INTERNAL_EVENTS = [\n \"minerva-input\",\n \"minerva-change\",\n \"minerva-clear\",\n \"minerva-point-drop\",\n \"minerva-quadrant-click\",\n \"minerva-point-double-click\",\n \"input\",\n \"change\",\n];\n\nconst stop = (event: Event) => event.stopPropagation();\n\n/** The inline panel: the add / edit form, or the delete confirmation */\ntype Panel =\n | { kind: \"draft\"; draft: QuadrantTaskDraft; anchor: QuadrantTaskBox }\n | { kind: \"delete\"; index: number; anchor: QuadrantTaskBox };\n\n/** A panel whose position and focus were set: its anchor and kind */\ninterface Placed {\n anchor: QuadrantTaskBox;\n kind: Panel[\"kind\"];\n}\n\n/** Half the size of the box around a task the panel keeps clear */\nconst DOT = 10;\n\nconst emptyBox = (): QuadrantTaskBox => ({ x: 0, y: 0, width: 0, height: 0 });\n\n/** The focused element, looking into open shadow roots */\nfunction deepActiveElement(): HTMLElement | null {\n let active = document.activeElement;\n while (active?.shadowRoot?.activeElement)\n active = active.shadowRoot.activeElement;\n return active instanceof HTMLElement ? active : null;\n}\n\nconst icon = (kind: keyof typeof QUADRANT_TASK_ICONS) =>\n html`<svg\nwidth=\"16\"\nheight=\"16\"\nviewBox=\"0 0 24 24\"\nfill=\"none\"\nstroke=\"currentColor\"\nstroke-width=\"1.8\"\nstroke-linecap=\"round\"\nstroke-linejoin=\"round\"\naria-hidden=\"true\"\n>\n<path d=${QUADRANT_TASK_ICONS[kind]}></path>\n</svg>`;\n\n/**\n * Task board on a four-quadrant matrix (`<QuadrantTaskBoard>` of React),\n * built on `<minerva-quadrant-chart>`: each quadrant header shows its\n * title, the number of tasks and an add button; the active task (hovered,\n * keyboard-focused or selected) shows edit and delete buttons; an inline\n * panel, anchored inside the board at the button or the task, names a task\n * and picks its quadrant, or confirms a delete (Escape or a press outside\n * closes it). Tasks can be dragged to another quadrant, or moved with\n * Shift + arrows once focused; a double click edits a task, a click on an\n * empty area adds one there.\n *\n * Controlled, like `<minerva-dashboard-columns>`: the board never changes its\n * own `points`. It fires `minerva-points-change` with the next list after\n * an add, an edit, a delete, a drag and drop or a keyboard move; set it\n * back as `points` to apply it (or keep the old list to refuse it).\n *\n * Texts are localized (the `locale` attribute, else the library language)\n * and can be overridden with `labels`. The host's `aria-label` names the\n * chart.\n *\n * Published as the optional entry\n * `minerva-design/web-components/quadrant-task-board` (it loads the chart\n * engine, minerva-design/charts/core).\n *\n * @summary Four-quadrant task board: add, edit, delete and drag tasks between quadrants.\n * @tag minerva-quadrant-task-board\n * @csspart root - The box around the chart and the inline panel\n * @csspart chart - The inner `<minerva-quadrant-chart>`\n * @csspart panel - The inline add / edit / delete panel, positioned next to its anchor\n * @fires minerva-points-change - The tasks changed (add, edit, delete, drag and drop, keyboard move); `detail: { points }`, the next list to set back as `points`\n * @fires minerva-point-click - A task was clicked (it becomes the selected one); `detail: { point, index }`\n * @fires minerva-point-drag - A task is being dragged (on every move); `detail: { point, index, x, y, quadrant }`\n * @fires minerva-hover - The hovered (or keyboard-focused) task changed; `detail: { x, xLabel, items }`, `null` when nothing is hovered\n * @fires minerva-zoom - The user zoomed or panned the chart; `detail`: the view\n * @fires minerva-renderer-change - The chart backend is ready (or fell back after a GPU loss); `detail`: the renderer\n */\nexport class MinervaQuadrantTaskBoard extends MinervaElement {\n static override tagName = \"minerva-quadrant-task-board\";\n static override dependencies = [\n MinervaQuadrantChart,\n MinervaIconButton,\n MinervaInput,\n MinervaButton,\n ];\n static override styles = [\n hostStyles,\n css`\n:host{\ndisplay: block;\n\nwidth: 100%;\nmin-inline-size: 0;\n}\n`,\n sharedStyles(styles),\n ];\n\n /** Tasks `{ x, y, label, color, size }`; replace the array to update the board (controlled); property only */\n @property({ attribute: false })\n points?: readonly QuadrantPoint[];\n\n /** Texts of the buttons and panels (`add`, `edit`, `delete`, `deleteConfirm`, `confirmDelete`, `name`, `quadrant`, `save`, `cancel`, `actions`), localized by default; property only */\n @property({ attribute: false })\n labels?: Partial<QuadrantTaskLabels>;\n\n /** Titles, badges and colors of the quadrants (`topLeft`, `topRight`, `bottomLeft`, `bottomRight`); property only */\n @property({ attribute: false })\n quadrants?: QuadrantRegions;\n\n /** Title of the horizontal axis */\n @property({ attribute: \"x-label\" })\n xLabel?: string;\n\n /** Title of the vertical axis */\n @property({ attribute: \"y-label\" })\n yLabel?: string;\n\n /** Texts at the ends of the dividers, drawn inside the plot (`top`, `bottom`, `left`, `right`); property only */\n @property({ attribute: false })\n axisLabels?: QuadrantAxisLabels;\n\n /** Range of the horizontal axis (default [0, 10]); property only */\n @property({ attribute: false })\n xDomain?: [number, number];\n\n /** Range of the vertical axis (default [0, 10]); property only */\n @property({ attribute: false })\n yDomain?: [number, number];\n\n /** X value of the vertical divider (the middle of the x domain by default) */\n @property({ type: Number, attribute: \"x-split\" })\n xSplit?: number;\n\n /** Y value of the horizontal divider (the middle of the y domain by default) */\n @property({ type: Number, attribute: \"y-split\" })\n ySplit?: number;\n\n /** Reverses the horizontal axis (e.g. \"urgent\" on the left) */\n @property({ type: Boolean, attribute: \"reverse-x\" })\n reverseX = false;\n\n /** Hides the numeric ticks of the axes (only the matrix remains) */\n @property({ type: Boolean, attribute: \"hide-ticks\" })\n hideTicks = false;\n\n /** Hides the labels next to the tasks */\n @property({ type: Boolean, attribute: \"hide-labels\" })\n hideLabels = false;\n\n /** Hides the number of tasks in the quadrant headers */\n @property({ type: Boolean, attribute: \"hide-counts\" })\n hideCounts = false;\n\n /** Dot diameter in pixels */\n @property({ type: Number, attribute: \"point-size\" })\n pointSize = 12;\n\n /** Index of the selected task, drawn with a ring (`null`: none); by default the board selects the last clicked, moved or saved task */\n @property({ type: Number, attribute: \"selected-index\" })\n selectedIndex?: number | null;\n\n /** Height of the chart: pixels or any CSS length (default 320) */\n @property()\n height?: string | number;\n\n /** Language of the built-in texts, quadrant titles and numbers (e.g. \"fr\"); the library language by default */\n @property()\n locale?: string;\n\n /** Leaves out the visually hidden list of the tasks (keyboard and screen reader access, keyboard moves) */\n @property({ type: Boolean, attribute: \"no-accessible-points\" })\n noAccessiblePoints = false;\n\n /** Other engine options of the chart (legend, tooltip, padding, palette...); property only */\n @property({ attribute: false })\n options?: Omit<ChartOptions, \"series\">;\n\n @state() private panel: Panel | null = null;\n @state() private selection: number | null = null;\n\n /** Last pointer press in the board (anchor of a click on an empty area) */\n private lastPointer: QuadrantTaskBox | null = null;\n /** Focused element before the panel opened (focused again on Escape / Cancel) */\n private returnFocus: HTMLElement | null = null;\n /** Panel whose position and focus were set */\n private placed: Placed | null = null;\n /** Whether the press-outside listener is on the document */\n private listening = false;\n\n private readonly i18n = new LocaleController(this);\n private readonly aria = new AriaController(this);\n /** Options of the chart, kept while their sources do not change (no redraw on unrelated updates) */\n private chartOptions: {\n options: unknown;\n locale: string;\n ariaLabel: string | undefined;\n value: Omit<ChartOptions, \"series\">;\n } | null = null;\n\n protected override createRenderRoot() {\n const root = super.createRenderRoot();\n for (const type of INTERNAL_EVENTS) root.addEventListener(type, stop);\n return root;\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.listenOutside(false);\n }\n\n private get language(): string {\n return this.locale ?? this.i18n.language;\n }\n\n private get tasks(): readonly QuadrantPoint[] {\n return this.points ?? [];\n }\n\n private get chart(): MinervaQuadrantChart | null {\n return this.renderRoot.querySelector<MinervaQuadrantChart>(\n MinervaQuadrantChart.tagName,\n );\n }\n\n private get boardElement(): HTMLElement | null {\n return this.renderRoot.querySelector<HTMLElement>(\"[part=root]\");\n }\n\n private get panelElement(): HTMLElement | null {\n return this.renderRoot.querySelector<HTMLElement>(\"[part=panel]\");\n }\n\n /** The open panel, unless the task it is about is gone */\n private get shownPanel(): Panel | null {\n const panel = this.panel;\n if (!panel) return null;\n const points = this.tasks;\n const shown =\n panel.kind === \"draft\"\n ? panel.draft.index === null || !!points[panel.draft.index]\n : !!points[panel.index];\n return shown ? panel : null;\n }\n\n private geometry(): QuadrantTaskGeometry {\n return {\n xDomain: this.xDomain,\n yDomain: this.yDomain,\n xSplit: this.xSplit,\n ySplit: this.ySplit,\n reverseX: this.reverseX,\n };\n }\n\n private quadrantTitle(corner: QuadrantCorner): string {\n return (\n this.quadrants?.[corner]?.label || quadrantLabels(this.language)[corner]\n );\n }\n\n private engineOptions(\n locale: string,\n ariaLabel: string | undefined,\n ): Omit<ChartOptions, \"series\"> {\n const cached = this.chartOptions;\n if (\n cached &&\n cached.options === this.options &&\n cached.locale === locale &&\n cached.ariaLabel === ariaLabel\n )\n return cached.value;\n const value = {\n ...this.options,\n locale,\n ...(ariaLabel ? { ariaLabel } : {}),\n };\n this.chartOptions = { options: this.options, locale, ariaLabel, value };\n return value;\n }\n\n /** Box of an element, relative to the board */\n private boxOf(el: Element | null | undefined): QuadrantTaskBox | null {\n const board = this.boardElement;\n if (!el || !board) return null;\n const b = board.getBoundingClientRect();\n const r = el.getBoundingClientRect();\n return {\n x: r.left - b.left,\n y: r.top - b.top,\n width: r.width,\n height: r.height,\n };\n }\n\n /** Box around a task (the anchor of its actions in the chart), else the last pointer */\n private pointBox(index: number): QuadrantTaskBox {\n const box = this.boxOf(\n this.chart?.shadowRoot?.querySelector(\n `[part=point-actions][data-point-index=\"${index}\"]`,\n ),\n );\n if (box)\n return {\n x: box.x - DOT,\n y: box.y - DOT,\n width: 2 * DOT,\n height: 2 * DOT,\n };\n return this.lastPointer ? { ...this.lastPointer } : emptyBox();\n }\n\n private change(points: QuadrantPoint[]): void {\n this.emit<QuadrantTaskBoardChangeDetail>(\"minerva-points-change\", {\n points,\n });\n }\n\n private open(next: Panel): void {\n if (!this.panel) this.returnFocus = deepActiveElement();\n this.panel = next;\n }\n\n private readonly close = () => {\n this.panel = null;\n const target = this.returnFocus;\n this.returnFocus = null;\n if (target?.isConnected) target.focus();\n };\n\n private add(\n corner: QuadrantCorner,\n anchor: QuadrantTaskBox,\n at?: { x: number; y: number },\n ): void {\n this.open({\n kind: \"draft\",\n draft: newQuadrantTaskDraft(this.geometry(), corner, at),\n anchor,\n });\n }\n\n private edit(index: number | null): void {\n if (index === null) return;\n const draft = editQuadrantTaskDraft(this.geometry(), this.tasks, index);\n if (draft)\n this.open({ kind: \"draft\", draft, anchor: this.pointBox(index) });\n }\n\n private confirmRemove(index: number | null): void {\n if (index === null) return;\n this.open({ kind: \"delete\", index, anchor: this.pointBox(index) });\n }\n\n private setDraft(change: Partial<QuadrantTaskDraft>): void {\n const panel = this.panel;\n if (panel?.kind === \"draft\")\n this.panel = { ...panel, draft: { ...panel.draft, ...change } };\n }\n\n private save(): void {\n const panel = this.shownPanel;\n const saved = applyQuadrantTaskDraft(\n this.geometry(),\n this.tasks,\n panel?.kind === \"draft\" ? panel.draft : null,\n );\n if (!saved) return;\n this.change(saved.points);\n this.selection = saved.index;\n this.close();\n }\n\n private readonly removeTask = () => {\n const panel = this.shownPanel;\n if (panel?.kind === \"delete\" && this.tasks[panel.index]) {\n this.change(removeQuadrantTask(this.tasks, panel.index));\n this.selection = selectionAfterRemove(this.selection, panel.index);\n }\n this.close();\n };\n\n protected override updated(changed: PropertyValues<this>): void {\n super.updated(changed);\n const panel = this.shownPanel;\n this.listenOutside(panel !== null);\n if (!panel) {\n this.placed = null;\n return;\n }\n const placed = this.placed;\n if (placed?.anchor === panel.anchor && placed.kind === panel.kind) return;\n const next: Placed = { anchor: panel.anchor, kind: panel.kind };\n this.placed = next;\n // next to its anchor, inside the board, before the panel is painted\n this.placePanel();\n void this.settlePanel(next);\n }\n\n /** Places the panel again once its fields rendered, then focuses the first one (or Cancel) */\n private async settlePanel(placed: Placed): Promise<void> {\n const el = this.panelElement;\n if (!el) return;\n await Promise.all(\n Array.from(\n el.querySelectorAll(\"*\"),\n (child) => (child as Partial<MinervaElement>).updateComplete,\n ),\n );\n if (this.placed !== placed || this.panelElement !== el) return;\n this.placePanel();\n el.querySelector<HTMLElement>(\"[data-autofocus]\")?.focus({\n preventScroll: true,\n });\n }\n\n private placePanel(): void {\n const el = this.panelElement;\n const board = this.boardElement;\n const anchor = this.shownPanel?.anchor;\n if (!el || !board || !anchor) return;\n const place = placeQuadrantTaskPanel(\n anchor,\n { width: el.offsetWidth, height: el.offsetHeight },\n { width: board.clientWidth, height: board.clientHeight },\n );\n el.style.left = `${place.x}px`;\n el.style.top = `${place.y}px`;\n el.style.transformOrigin = `${place.origin.x}px ${place.origin.y}px`;\n el.dataset.placement = place.placement;\n }\n\n /** A press outside the panel closes it, like a popover */\n private listenOutside(on: boolean): void {\n if (on === this.listening) return;\n this.listening = on;\n if (on)\n document.addEventListener(\"pointerdown\", this.onOutsidePointerDown, true);\n else\n document.removeEventListener(\n \"pointerdown\",\n this.onOutsidePointerDown,\n true,\n );\n }\n\n private readonly onOutsidePointerDown = (event: PointerEvent) => {\n const panel = this.panelElement;\n if (panel && event.composedPath().includes(panel)) return;\n this.returnFocus = null;\n this.panel = null;\n };\n\n private readonly onPanelKeydown = (event: KeyboardEvent) => {\n if (event.key !== \"Escape\") return;\n event.preventDefault();\n event.stopPropagation();\n this.close();\n };\n\n /** Where the last press in the board was (the anchor of a click on an empty area) */\n private readonly trackPointer = {\n capture: true,\n handleEvent: (event: PointerEvent) => {\n const board = this.boardElement;\n if (!board) return;\n const b = board.getBoundingClientRect();\n this.lastPointer = {\n x: event.clientX - b.left,\n y: event.clientY - b.top,\n width: 0,\n height: 0,\n };\n },\n };\n\n private readonly onPointClick = (event: CustomEvent<{ index: number }>) => {\n this.selection = event.detail.index;\n };\n\n private readonly onPointDoubleClick = (\n event: CustomEvent<{ index: number }>,\n ) => this.edit(event.detail.index);\n\n private readonly onQuadrantClick = (\n event: CustomEvent<{ quadrant: QuadrantCorner; x: number; y: number }>,\n ) => {\n const { quadrant, x, y } = event.detail;\n this.add(\n quadrant,\n this.lastPointer ? { ...this.lastPointer } : emptyBox(),\n { x, y },\n );\n };\n\n private readonly onPointDrop = (\n event: CustomEvent<{ index: number; x: number; y: number }>,\n ) => {\n const { index, x, y } = event.detail;\n this.change(moveQuadrantTask(this.tasks, index, { x, y }));\n this.selection = index;\n };\n\n private readonly onSubmit = (event: Event) => {\n event.preventDefault();\n this.save();\n };\n\n private readonly onNameKeydown = (event: KeyboardEvent) => {\n if (event.key !== \"Enter\" || event.isComposing) return;\n event.preventDefault();\n this.save();\n };\n\n private renderHeader(\n corner: QuadrantCorner,\n count: string | undefined,\n addLabel: string,\n expanded: boolean,\n ) {\n const badge = this.quadrants?.[corner]?.badge;\n return html`<div\nslot=${QUADRANT_HEADER_SLOTS[corner]}\nclass=\"header\"\ndata-corner=${corner}\n>\n${badge ? html`<span class=\"badge\">${badge}</span>` : nothing}\n<span class=\"title\">${this.quadrantTitle(corner)}</span>\n${\n count === undefined\n ? nothing\n : html`<span class=\"count\">${count}</span>`\n }\n<minerva-icon-button\nclass=\"add\"\nsize=\"xsmall\"\nvariant=\"ghost\"\nlabel=${`${addLabel} · ${this.quadrantTitle(corner)}`}\naria-expanded=${expanded ? \"true\" : \"false\"}\n@click=${(event: MouseEvent) =>\n this.add(\n corner,\n this.boxOf(event.currentTarget as Element) ?? emptyBox(),\n )}\n>${icon(\"add\")}</minerva-icon-button\n>\n</div>`;\n }\n\n private renderDraftPanel(\n draft: QuadrantTaskDraft,\n texts: QuadrantTaskLabels,\n points: readonly QuadrantPoint[],\n ) {\n return html`<div\npart=\"panel\"\nclass=\"panel\"\nrole=\"dialog\"\naria-labelledby=\"panel-title\"\ndata-quadrant-task-panel=${draft.index === null ? \"add\" : \"edit\"}\n@keydown=${this.onPanelKeydown}\n>\n<form class=\"form\" @submit=${this.onSubmit}>\n<h3 id=\"panel-title\" class=\"panelTitle\">\n${draft.index === null ? texts.add : texts.edit}\n</h3>\n<label class=\"field\">\n<span>${texts.name}</span>\n<minerva-input\nrequired\nsize=\"small\"\ndata-autofocus\naria-label=${texts.name}\n.value=${draft.label}\n@minerva-input=${(event: CustomEvent<{ value: string }>) =>\n this.setDraft({ label: event.detail.value })}\n@keydown=${this.onNameKeydown}\n></minerva-input>\n</label>\n<fieldset class=\"quadrants\">\n<legend>${texts.quadrant}</legend>\n<div class=\"quadrantGrid\">\n${QUADRANT_CORNERS.map(\n (corner) =>\n html`<label class=\"quadrant\" data-corner=${corner}>\n<input\ntype=\"radio\"\nname=\"quadrant\"\nvalue=${corner}\n.checked=${draft.quadrant === corner}\n@change=${() => this.setDraft({ quadrant: corner })}\n/>\n<span\nclass=\"swatch\"\nstyle=${styleMap({\n background: quadrantTaskColor(this.quadrants, corner),\n })}\naria-hidden=\"true\"\n></span>\n<span class=\"quadrantName\"\n>${this.quadrantTitle(corner)}</span\n>\n</label>`,\n )}\n</div>\n</fieldset>\n<div class=\"footer\">\n<minerva-button\nsize=\"small\"\ncolor=\"neutral\"\nvariant=\"ghost\"\n@click=${this.close}\n>${texts.cancel}</minerva-button\n>\n<minerva-button\nsize=\"small\"\ntype=\"submit\"\n?disabled=${!canSaveQuadrantTask(draft, points)}\n>${texts.save}</minerva-button\n>\n</div>\n</form>\n</div>`;\n }\n\n private renderDeletePanel(\n index: number,\n texts: QuadrantTaskLabels,\n points: readonly QuadrantPoint[],\n ) {\n return html`<div\npart=\"panel\"\nclass=\"panel\"\nrole=\"alertdialog\"\naria-labelledby=\"panel-title\"\naria-describedby=\"panel-text\"\ndata-quadrant-task-panel=\"delete\"\n@keydown=${this.onPanelKeydown}\n>\n<h3 id=\"panel-title\" class=\"panelTitle\">${texts.delete}</h3>\n<p id=\"panel-text\" class=\"panelText\">\n${quadrantTaskDeleteText(texts, points[index])}\n</p>\n<div class=\"footer\">\n<minerva-button\nsize=\"small\"\ncolor=\"neutral\"\nvariant=\"ghost\"\ndata-autofocus\n@click=${this.close}\n>${texts.cancel}</minerva-button\n>\n<minerva-button size=\"small\" color=\"danger\" @click=${this.removeTask}\n>${texts.confirmDelete}</minerva-button\n>\n</div>\n</div>`;\n }\n\n protected override render() {\n const points = this.tasks;\n const locale = this.language;\n const texts = quadrantTaskLabels(locale, this.labels);\n const groups = quadrantGroups({ ...this.geometry(), points });\n const panel = this.shownPanel;\n const adding =\n panel?.kind === \"draft\" && panel.draft.index === null\n ? panel.draft.quadrant\n : null;\n const selected =\n this.selectedIndex !== undefined ? this.selectedIndex : this.selection;\n const ariaLabel = this.aria.label;\n return html`<div\npart=\"root\"\nclass=\"board\"\ndata-panel=${panel?.kind ?? nothing}\n@pointerdown=${this.trackPointer}\n>\n<minerva-quadrant-chart\npart=\"chart\"\ndrag-points\n.points=${points}\n.quadrants=${this.quadrants}\n.xLabel=${this.xLabel}\n.yLabel=${this.yLabel}\n.axisLabels=${this.axisLabels}\n.xDomain=${this.xDomain}\n.yDomain=${this.yDomain}\n.xSplit=${this.xSplit}\n.ySplit=${this.ySplit}\n.reverseX=${this.reverseX}\n.hideTicks=${this.hideTicks}\n.hideLabels=${this.hideLabels}\n.pointSize=${this.pointSize}\n.selectedIndex=${selected}\n.noAccessiblePoints=${this.noAccessiblePoints}\n.height=${this.height}\n.options=${this.engineOptions(locale, ariaLabel)}\n@minerva-point-click=${this.onPointClick}\n@minerva-point-double-click=${this.onPointDoubleClick}\n@minerva-quadrant-click=${this.onQuadrantClick}\n@minerva-point-drop=${this.onPointDrop}\n>\n${QUADRANT_CORNERS.map((corner) =>\n this.renderHeader(\n corner,\n this.hideCounts\n ? undefined\n : quadrantCountText(true, groups[corner].points, locale),\n texts.add,\n adding === corner,\n ),\n )}\n<div\nslot=\"point-actions\"\nrole=\"toolbar\"\nclass=\"actions\"\naria-label=${texts.actions}\n@pointerdown=${stop}\n>\n<minerva-icon-button\nsize=\"small\"\nvariant=\"ghost\"\nlabel=${texts.edit}\ndata-action=\"edit\"\n@click=${() => this.edit(this.chart?.activeIndex ?? null)}\n>${icon(\"edit\")}</minerva-icon-button\n>\n<minerva-icon-button\nsize=\"small\"\nvariant=\"ghost\"\ncolor=\"danger\"\nlabel=${texts.delete}\ndata-action=\"delete\"\n@click=${() => this.confirmRemove(this.chart?.activeIndex ?? null)}\n>${icon(\"delete\")}</minerva-icon-button\n>\n</div>\n</minerva-quadrant-chart>\n${\n panel?.kind === \"draft\"\n ? this.renderDraftPanel(panel.draft, texts, points)\n : panel?.kind === \"delete\"\n ? this.renderDeletePanel(panel.index, texts, points)\n : nothing\n }\n</div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"minerva-quadrant-task-board\": MinervaQuadrantTaskBoard;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAuDA,IAAMI,IAAkB;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAEMC,KAAQ,MAAiBC,EAAM,gBAAgB,GAc/CC,IAAM,IAENC,WAAmC;CAAE,GAAG;CAAG,GAAG;CAAG,OAAO;CAAG,QAAQ;AAAE;AAG3E,SAASC,IAAwC;CAC/C,IAAIC,IAAS,SAAS;CACtB,OAAOA,GAAQ,YAAY,gBACzB,IAASA,EAAO,WAAW;CAC7B,OAAOA,aAAkB,cAAcA,IAAS;AAClD;AAEA,IAAMC,KAAQ,MACZ,CAAI;;;;;;;;;;;UAWIC,EAAoBC,GAAM;SAuCvBC,IAAb,cAA8CC,EAAe;;EAgbzB,aAjXvB,KAAA,WAAA,IAIC,KAAA,YAAA,IAIC,KAAA,aAAA,IAIA,KAAA,aAAA,IAID,KAAA,YAAA,IAgBS,KAAA,qBAAA,IAMkB,KAAA,QAAA,MACK,KAAA,YAAA,MAGE,KAAA,cAAA,MAEJ,KAAA,cAAA,MAEV,KAAA,SAAA,MAEZ,KAAA,YAAA,IAEI,KAAA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_default","INTERNAL_EVENTS","stop","event","DOT","emptyBox","deepActiveElement","active","icon","size","QUADRANT_TASK_ICONS","kind","MinervaQuadrantTaskBoard","MinervaElement","_args","LocaleController","AriaController","target","panel","removeQuadrantTask","selectionAfterRemove","board","b","quadrant","moveQuadrantTask","index","MinervaQuadrantChart","MinervaIconButton","MinervaInput","MinervaButton","hostStyles","sharedStyles","root","type","points","corner","quadrantLabels","cached","locale","ariaLabel","value","el","chart","point","at","surface","next","newQuadrantTaskDraft","draft","editQuadrantTaskDraft","change","saved","applyQuadrantTaskDraft","changed","placed","child","anchor","place","placeQuadrantTaskPanel","on","badge","QUADRANT_HEADER_SLOTS","nothing","count","addLabel","expanded","texts","QUADRANT_CORNERS","styleMap","quadrantTaskColor","canSaveQuadrantTask","quadrantTaskDeleteText","quadrantTaskLabels","groups","quadrantGroups","adding","selected","quadrantCountText","property","state"],"sources":["../../../../../web-components/src/components/quadrant-task-board/quadrant-task-board.ts"],"sourcesContent":["import { css, html, nothing, type PropertyValues } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { styleMap } from \"lit/directives/style-map.js\";\nimport styles from \"@react-styles/components/QuadrantTaskBoard/quadrantTaskBoard.module.scss?inline\";\nimport {\n QUADRANT_CORNERS,\n QUADRANT_TASK_ICONS,\n applyQuadrantTaskDraft,\n canSaveQuadrantTask,\n editQuadrantTaskDraft,\n moveQuadrantTask,\n newQuadrantTaskDraft,\n placeQuadrantTaskPanel,\n quadrantCountText,\n quadrantGroups,\n quadrantLabels,\n quadrantTaskColor,\n quadrantTaskDeleteText,\n quadrantTaskLabels,\n removeQuadrantTask,\n selectionAfterRemove,\n type ChartOptions,\n type QuadrantAxisLabels,\n type QuadrantCorner,\n type QuadrantPoint,\n type QuadrantRegions,\n type QuadrantTaskBox,\n type QuadrantTaskDraft,\n type QuadrantTaskGeometry,\n type QuadrantTaskLabels,\n} from \"minerva-design/charts/core\";\nimport { MinervaButton } from \"../button/button\";\nimport { MinervaQuadrantChart, QUADRANT_HEADER_SLOTS } from \"../chart/charts\";\nimport { MinervaIconButton } from \"../icon-button/icon-button\";\nimport { MinervaInput } from \"../input/input\";\nimport { AriaController } from \"../../internal/aria\";\nimport { LocaleController } from \"../../internal/locale\";\nimport { MinervaElement, hostStyles } from \"../../internal/minerva-element\";\nimport { sharedStyles } from \"../../internal/styles\";\n\nexport type { QuadrantTaskLabels };\n\n/** Detail of `minerva-points-change` */\nexport interface QuadrantTaskBoardChangeDetail {\n /** The next list of tasks (pass it back as `points`) */\n points: QuadrantPoint[];\n}\n\n/**\n * Events of the inner chart and of the fields of the panel that the board\n * consumes: they stop at its shadow root (the board fires\n * `minerva-points-change`). `minerva-hover`, `minerva-point-click`,\n * `minerva-point-drag`, `minerva-zoom` and `minerva-renderer-change` of the\n * chart go through.\n */\nconst INTERNAL_EVENTS = [\n \"minerva-input\",\n \"minerva-change\",\n \"minerva-clear\",\n \"minerva-point-drop\",\n \"minerva-quadrant-click\",\n \"minerva-point-double-click\",\n \"input\",\n \"change\",\n];\n\nconst stop = (event: Event) => event.stopPropagation();\n\n/** The inline panel: the add / edit form, or the delete confirmation */\ntype Panel =\n | { kind: \"draft\"; draft: QuadrantTaskDraft; anchor: QuadrantTaskBox }\n | { kind: \"delete\"; index: number; anchor: QuadrantTaskBox };\n\n/** A panel whose position and focus were set: its anchor and kind */\ninterface Placed {\n anchor: QuadrantTaskBox;\n kind: Panel[\"kind\"];\n}\n\n/** Half the size of the box around a task the panel keeps clear */\nconst DOT = 10;\n\nconst emptyBox = (): QuadrantTaskBox => ({ x: 0, y: 0, width: 0, height: 0 });\n\n/** The focused element, looking into open shadow roots */\nfunction deepActiveElement(): HTMLElement | null {\n let active = document.activeElement;\n while (active?.shadowRoot?.activeElement)\n active = active.shadowRoot.activeElement;\n return active instanceof HTMLElement ? active : null;\n}\n\nconst icon = (kind: keyof typeof QUADRANT_TASK_ICONS, size = 16) =>\n html`<svg\nwidth=${size}\nheight=${size}\nviewBox=\"0 0 24 24\"\nfill=\"none\"\nstroke=\"currentColor\"\nstroke-width=\"1.8\"\nstroke-linecap=\"round\"\nstroke-linejoin=\"round\"\naria-hidden=\"true\"\n>\n<path d=${QUADRANT_TASK_ICONS[kind]}></path>\n</svg>`;\n\n/**\n * Task board on a four-quadrant matrix (`<QuadrantTaskBoard>` of React),\n * built on `<minerva-quadrant-chart>`: each quadrant header shows its\n * title, the number of tasks and an add button; the point card of the\n * active task (hovered, keyboard-focused or selected) shows edit and delete\n * buttons beside its name; an inline panel, anchored inside the board at\n * the button or the task, names a task and picks its quadrant, or confirms\n * a delete (Escape or a press outside closes it). Tasks can be dragged to\n * another quadrant, or moved with Shift + arrows once focused; a double\n * click edits a task, a click on an empty area adds one there.\n *\n * Controlled, like `<minerva-dashboard-columns>`: the board never changes its\n * own `points`. It fires `minerva-points-change` with the next list after\n * an add, an edit, a delete, a drag and drop or a keyboard move; set it\n * back as `points` to apply it (or keep the old list to refuse it).\n *\n * Texts are localized (the `locale` attribute, else the library language)\n * and can be overridden with `labels`. The host's `aria-label` names the\n * chart.\n *\n * Published as the optional entry\n * `minerva-design/web-components/quadrant-task-board` (it loads the chart\n * engine, minerva-design/charts/core).\n *\n * @summary Four-quadrant task board: add, edit, delete and drag tasks between quadrants.\n * @tag minerva-quadrant-task-board\n * @csspart root - The box around the chart and the inline panel\n * @csspart chart - The inner `<minerva-quadrant-chart>`\n * @csspart panel - The inline add / edit / delete panel, positioned next to its anchor\n * @fires minerva-points-change - The tasks changed (add, edit, delete, drag and drop, keyboard move); `detail: { points }`, the next list to set back as `points`\n * @fires minerva-point-click - A task was clicked (it becomes the selected one); `detail: { point, index }`\n * @fires minerva-point-drag - A task is being dragged (on every move); `detail: { point, index, x, y, quadrant }`\n * @fires minerva-hover - The hovered (or keyboard-focused) task changed; `detail: { x, xLabel, items }`, `null` when nothing is hovered\n * @fires minerva-zoom - The user zoomed or panned the chart; `detail`: the view\n * @fires minerva-renderer-change - The chart backend is ready (or fell back after a GPU loss); `detail`: the renderer\n */\nexport class MinervaQuadrantTaskBoard extends MinervaElement {\n static override tagName = \"minerva-quadrant-task-board\";\n static override dependencies = [\n MinervaQuadrantChart,\n MinervaIconButton,\n MinervaInput,\n MinervaButton,\n ];\n static override styles = [\n hostStyles,\n css`\n:host{\ndisplay: block;\n\nwidth: 100%;\nmin-inline-size: 0;\n}\n\n.board[data-panel] minerva-quadrant-chart::part(point-card){\ndisplay: none;\n}\n`,\n sharedStyles(styles),\n ];\n\n /** Tasks `{ x, y, label, color, size }`; replace the array to update the board (controlled); property only */\n @property({ attribute: false })\n points?: readonly QuadrantPoint[];\n\n /** Texts of the buttons and panels (`add`, `edit`, `delete`, `deleteConfirm`, `confirmDelete`, `name`, `quadrant`, `save`, `cancel`, `actions`), localized by default; property only */\n @property({ attribute: false })\n labels?: Partial<QuadrantTaskLabels>;\n\n /** Titles, badges and colors of the quadrants (`topLeft`, `topRight`, `bottomLeft`, `bottomRight`); property only */\n @property({ attribute: false })\n quadrants?: QuadrantRegions;\n\n /** Title of the horizontal axis */\n @property({ attribute: \"x-label\" })\n xLabel?: string;\n\n /** Title of the vertical axis */\n @property({ attribute: \"y-label\" })\n yLabel?: string;\n\n /** Texts at the ends of the dividers, drawn inside the plot (`top`, `bottom`, `left`, `right`); property only */\n @property({ attribute: false })\n axisLabels?: QuadrantAxisLabels;\n\n /** Range of the horizontal axis (default [0, 10]); property only */\n @property({ attribute: false })\n xDomain?: [number, number];\n\n /** Range of the vertical axis (default [0, 10]); property only */\n @property({ attribute: false })\n yDomain?: [number, number];\n\n /** X value of the vertical divider (the middle of the x domain by default) */\n @property({ type: Number, attribute: \"x-split\" })\n xSplit?: number;\n\n /** Y value of the horizontal divider (the middle of the y domain by default) */\n @property({ type: Number, attribute: \"y-split\" })\n ySplit?: number;\n\n /** Reverses the horizontal axis (e.g. \"urgent\" on the left) */\n @property({ type: Boolean, attribute: \"reverse-x\" })\n reverseX = false;\n\n /** Hides the numeric ticks of the axes (only the matrix remains) */\n @property({ type: Boolean, attribute: \"hide-ticks\" })\n hideTicks = false;\n\n /** Hides the labels next to the tasks */\n @property({ type: Boolean, attribute: \"hide-labels\" })\n hideLabels = false;\n\n /** Hides the number of tasks in the quadrant headers */\n @property({ type: Boolean, attribute: \"hide-counts\" })\n hideCounts = false;\n\n /** Dot diameter in pixels */\n @property({ type: Number, attribute: \"point-size\" })\n pointSize = 12;\n\n /** Index of the selected task, drawn with a ring (`null`: none); by default the board selects the last clicked, moved or saved task */\n @property({ type: Number, attribute: \"selected-index\" })\n selectedIndex?: number | null;\n\n /** Height of the chart: pixels or any CSS length (default 320) */\n @property()\n height?: string | number;\n\n /** Language of the built-in texts, quadrant titles and numbers (e.g. \"fr\"); the library language by default */\n @property()\n locale?: string;\n\n /** Leaves out the visually hidden list of the tasks (keyboard and screen reader access, keyboard moves) */\n @property({ type: Boolean, attribute: \"no-accessible-points\" })\n noAccessiblePoints = false;\n\n /** Other engine options of the chart (legend, tooltip, padding, palette...); property only */\n @property({ attribute: false })\n options?: Omit<ChartOptions, \"series\">;\n\n @state() private panel: Panel | null = null;\n @state() private selection: number | null = null;\n\n /** Last pointer press in the board (anchor of a click on an empty area) */\n private lastPointer: QuadrantTaskBox | null = null;\n /** Focused element before the panel opened (focused again on Escape / Cancel) */\n private returnFocus: HTMLElement | null = null;\n /** Panel whose position and focus were set */\n private placed: Placed | null = null;\n /** Whether the press-outside listener is on the document */\n private listening = false;\n\n private readonly i18n = new LocaleController(this);\n private readonly aria = new AriaController(this);\n /** Options of the chart, kept while their sources do not change (no redraw on unrelated updates) */\n private chartOptions: {\n options: unknown;\n locale: string;\n ariaLabel: string | undefined;\n value: Omit<ChartOptions, \"series\">;\n } | null = null;\n\n protected override createRenderRoot() {\n const root = super.createRenderRoot();\n for (const type of INTERNAL_EVENTS) root.addEventListener(type, stop);\n return root;\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.listenOutside(false);\n }\n\n private get language(): string {\n return this.locale ?? this.i18n.language;\n }\n\n private get tasks(): readonly QuadrantPoint[] {\n return this.points ?? [];\n }\n\n private get chart(): MinervaQuadrantChart | null {\n return this.renderRoot.querySelector<MinervaQuadrantChart>(\n MinervaQuadrantChart.tagName,\n );\n }\n\n private get boardElement(): HTMLElement | null {\n return this.renderRoot.querySelector<HTMLElement>(\"[part=root]\");\n }\n\n private get panelElement(): HTMLElement | null {\n return this.renderRoot.querySelector<HTMLElement>(\"[part=panel]\");\n }\n\n /** The open panel, unless the task it is about is gone */\n private get shownPanel(): Panel | null {\n const panel = this.panel;\n if (!panel) return null;\n const points = this.tasks;\n const shown =\n panel.kind === \"draft\"\n ? panel.draft.index === null || !!points[panel.draft.index]\n : !!points[panel.index];\n return shown ? panel : null;\n }\n\n private geometry(): QuadrantTaskGeometry {\n return {\n xDomain: this.xDomain,\n yDomain: this.yDomain,\n xSplit: this.xSplit,\n ySplit: this.ySplit,\n reverseX: this.reverseX,\n };\n }\n\n private quadrantTitle(corner: QuadrantCorner): string {\n return (\n this.quadrants?.[corner]?.label || quadrantLabels(this.language)[corner]\n );\n }\n\n private engineOptions(\n locale: string,\n ariaLabel: string | undefined,\n ): Omit<ChartOptions, \"series\"> {\n const cached = this.chartOptions;\n if (\n cached &&\n cached.options === this.options &&\n cached.locale === locale &&\n cached.ariaLabel === ariaLabel\n )\n return cached.value;\n const value = {\n ...this.options,\n locale,\n ...(ariaLabel ? { ariaLabel } : {}),\n };\n this.chartOptions = { options: this.options, locale, ariaLabel, value };\n return value;\n }\n\n /** Box of an element, relative to the board */\n private boxOf(el: Element | null | undefined): QuadrantTaskBox | null {\n const board = this.boardElement;\n if (!el || !board) return null;\n const b = board.getBoundingClientRect();\n const r = el.getBoundingClientRect();\n return {\n x: r.left - b.left,\n y: r.top - b.top,\n width: r.width,\n height: r.height,\n };\n }\n\n /** Box around a task (its dot in the chart), else the last pointer */\n private pointBox(index: number): QuadrantTaskBox {\n const chart = this.chart;\n const point = this.tasks[index];\n const at = point ? chart?.instance?.toPixel(point.x, point.y) : null;\n const surface = at\n ? this.boxOf(chart?.shadowRoot?.querySelector(\"[part=surface]\"))\n : null;\n if (at && surface)\n return {\n x: surface.x + at.x - DOT,\n y: surface.y + at.y - DOT,\n width: 2 * DOT,\n height: 2 * DOT,\n };\n return this.lastPointer ? { ...this.lastPointer } : emptyBox();\n }\n\n private change(points: QuadrantPoint[]): void {\n this.emit<QuadrantTaskBoardChangeDetail>(\"minerva-points-change\", {\n points,\n });\n }\n\n private open(next: Panel): void {\n if (!this.panel) this.returnFocus = deepActiveElement();\n this.panel = next;\n }\n\n private readonly close = () => {\n this.panel = null;\n const target = this.returnFocus;\n this.returnFocus = null;\n if (target?.isConnected) target.focus();\n };\n\n private add(\n corner: QuadrantCorner,\n anchor: QuadrantTaskBox,\n at?: { x: number; y: number },\n ): void {\n this.open({\n kind: \"draft\",\n draft: newQuadrantTaskDraft(this.geometry(), corner, at),\n anchor,\n });\n }\n\n private edit(index: number | null): void {\n if (index === null) return;\n const draft = editQuadrantTaskDraft(this.geometry(), this.tasks, index);\n if (draft)\n this.open({ kind: \"draft\", draft, anchor: this.pointBox(index) });\n }\n\n private confirmRemove(index: number | null): void {\n if (index === null) return;\n this.open({ kind: \"delete\", index, anchor: this.pointBox(index) });\n }\n\n private setDraft(change: Partial<QuadrantTaskDraft>): void {\n const panel = this.panel;\n if (panel?.kind === \"draft\")\n this.panel = { ...panel, draft: { ...panel.draft, ...change } };\n }\n\n private save(): void {\n const panel = this.shownPanel;\n const saved = applyQuadrantTaskDraft(\n this.geometry(),\n this.tasks,\n panel?.kind === \"draft\" ? panel.draft : null,\n );\n if (!saved) return;\n this.change(saved.points);\n this.selection = saved.index;\n this.close();\n }\n\n private readonly removeTask = () => {\n const panel = this.shownPanel;\n if (panel?.kind === \"delete\" && this.tasks[panel.index]) {\n this.change(removeQuadrantTask(this.tasks, panel.index));\n this.selection = selectionAfterRemove(this.selection, panel.index);\n }\n this.close();\n };\n\n protected override updated(changed: PropertyValues<this>): void {\n super.updated(changed);\n const panel = this.shownPanel;\n this.listenOutside(panel !== null);\n if (!panel) {\n this.placed = null;\n return;\n }\n const placed = this.placed;\n if (placed?.anchor === panel.anchor && placed.kind === panel.kind) return;\n const next: Placed = { anchor: panel.anchor, kind: panel.kind };\n this.placed = next;\n // next to its anchor, inside the board, before the panel is painted\n this.placePanel();\n void this.settlePanel(next);\n }\n\n /** Places the panel again once its fields rendered, then focuses the first one (or Cancel) */\n private async settlePanel(placed: Placed): Promise<void> {\n const el = this.panelElement;\n if (!el) return;\n await Promise.all(\n Array.from(\n el.querySelectorAll(\"*\"),\n (child) => (child as Partial<MinervaElement>).updateComplete,\n ),\n );\n if (this.placed !== placed || this.panelElement !== el) return;\n this.placePanel();\n el.querySelector<HTMLElement>(\"[data-autofocus]\")?.focus({\n preventScroll: true,\n });\n }\n\n private placePanel(): void {\n const el = this.panelElement;\n const board = this.boardElement;\n const anchor = this.shownPanel?.anchor;\n if (!el || !board || !anchor) return;\n const place = placeQuadrantTaskPanel(\n anchor,\n { width: el.offsetWidth, height: el.offsetHeight },\n { width: board.clientWidth, height: board.clientHeight },\n );\n el.style.left = `${place.x}px`;\n el.style.top = `${place.y}px`;\n el.style.transformOrigin = `${place.origin.x}px ${place.origin.y}px`;\n el.dataset.placement = place.placement;\n }\n\n /** A press outside the panel closes it, like a popover */\n private listenOutside(on: boolean): void {\n if (on === this.listening) return;\n this.listening = on;\n if (on)\n document.addEventListener(\"pointerdown\", this.onOutsidePointerDown, true);\n else\n document.removeEventListener(\n \"pointerdown\",\n this.onOutsidePointerDown,\n true,\n );\n }\n\n private readonly onOutsidePointerDown = (event: PointerEvent) => {\n const panel = this.panelElement;\n if (panel && event.composedPath().includes(panel)) return;\n this.returnFocus = null;\n this.panel = null;\n };\n\n private readonly onPanelKeydown = (event: KeyboardEvent) => {\n if (event.key !== \"Escape\") return;\n event.preventDefault();\n event.stopPropagation();\n this.close();\n };\n\n /** Where the last press in the board was (the anchor of a click on an empty area) */\n private readonly trackPointer = {\n capture: true,\n handleEvent: (event: PointerEvent) => {\n const board = this.boardElement;\n if (!board) return;\n const b = board.getBoundingClientRect();\n this.lastPointer = {\n x: event.clientX - b.left,\n y: event.clientY - b.top,\n width: 0,\n height: 0,\n };\n },\n };\n\n private readonly onPointClick = (event: CustomEvent<{ index: number }>) => {\n this.selection = event.detail.index;\n };\n\n private readonly onPointDoubleClick = (\n event: CustomEvent<{ index: number }>,\n ) => this.edit(event.detail.index);\n\n private readonly onQuadrantClick = (\n event: CustomEvent<{ quadrant: QuadrantCorner; x: number; y: number }>,\n ) => {\n const { quadrant, x, y } = event.detail;\n this.add(\n quadrant,\n this.lastPointer ? { ...this.lastPointer } : emptyBox(),\n { x, y },\n );\n };\n\n private readonly onPointDrop = (\n event: CustomEvent<{ index: number; x: number; y: number }>,\n ) => {\n const { index, x, y } = event.detail;\n this.change(moveQuadrantTask(this.tasks, index, { x, y }));\n this.selection = index;\n };\n\n private readonly onSubmit = (event: Event) => {\n event.preventDefault();\n this.save();\n };\n\n private readonly onNameKeydown = (event: KeyboardEvent) => {\n if (event.key !== \"Enter\" || event.isComposing) return;\n event.preventDefault();\n this.save();\n };\n\n private renderHeader(\n corner: QuadrantCorner,\n count: string | undefined,\n addLabel: string,\n expanded: boolean,\n ) {\n const badge = this.quadrants?.[corner]?.badge;\n return html`<div\nslot=${QUADRANT_HEADER_SLOTS[corner]}\nclass=\"header\"\ndata-corner=${corner}\n>\n${badge ? html`<span class=\"badge\">${badge}</span>` : nothing}\n<span class=\"title\">${this.quadrantTitle(corner)}</span>\n${\n count === undefined\n ? nothing\n : html`<span class=\"count\">${count}</span>`\n }\n<minerva-icon-button\nclass=\"add\"\nsize=\"xsmall\"\nvariant=\"ghost\"\nlabel=${`${addLabel} · ${this.quadrantTitle(corner)}`}\naria-expanded=${expanded ? \"true\" : \"false\"}\n@click=${(event: MouseEvent) =>\n this.add(\n corner,\n this.boxOf(event.currentTarget as Element) ?? emptyBox(),\n )}\n>${icon(\"add\")}</minerva-icon-button\n>\n</div>`;\n }\n\n private renderDraftPanel(\n draft: QuadrantTaskDraft,\n texts: QuadrantTaskLabels,\n points: readonly QuadrantPoint[],\n ) {\n return html`<div\npart=\"panel\"\nclass=\"panel\"\nrole=\"dialog\"\naria-labelledby=\"panel-title\"\ndata-quadrant-task-panel=${draft.index === null ? \"add\" : \"edit\"}\n@keydown=${this.onPanelKeydown}\n>\n<form class=\"form\" @submit=${this.onSubmit}>\n<h3 id=\"panel-title\" class=\"panelTitle\">\n${draft.index === null ? texts.add : texts.edit}\n</h3>\n<label class=\"field\">\n<span>${texts.name}</span>\n<minerva-input\nrequired\nsize=\"small\"\ndata-autofocus\naria-label=${texts.name}\n.value=${draft.label}\n@minerva-input=${(event: CustomEvent<{ value: string }>) =>\n this.setDraft({ label: event.detail.value })}\n@keydown=${this.onNameKeydown}\n></minerva-input>\n</label>\n<fieldset class=\"quadrants\">\n<legend>${texts.quadrant}</legend>\n<div class=\"quadrantGrid\">\n${QUADRANT_CORNERS.map(\n (corner) =>\n html`<label class=\"quadrant\" data-corner=${corner}>\n<input\ntype=\"radio\"\nname=\"quadrant\"\nvalue=${corner}\n.checked=${draft.quadrant === corner}\n@change=${() => this.setDraft({ quadrant: corner })}\n/>\n<span\nclass=\"swatch\"\nstyle=${styleMap({\n background: quadrantTaskColor(this.quadrants, corner),\n })}\naria-hidden=\"true\"\n></span>\n<span class=\"quadrantName\"\n>${this.quadrantTitle(corner)}</span\n>\n</label>`,\n )}\n</div>\n</fieldset>\n<div class=\"footer\">\n<minerva-button\nsize=\"small\"\ncolor=\"neutral\"\nvariant=\"ghost\"\n@click=${this.close}\n>${texts.cancel}</minerva-button\n>\n<minerva-button\nsize=\"small\"\ntype=\"submit\"\n?disabled=${!canSaveQuadrantTask(draft, points)}\n>${texts.save}</minerva-button\n>\n</div>\n</form>\n</div>`;\n }\n\n private renderDeletePanel(\n index: number,\n texts: QuadrantTaskLabels,\n points: readonly QuadrantPoint[],\n ) {\n return html`<div\npart=\"panel\"\nclass=\"panel\"\nrole=\"alertdialog\"\naria-labelledby=\"panel-title\"\naria-describedby=\"panel-text\"\ndata-quadrant-task-panel=\"delete\"\n@keydown=${this.onPanelKeydown}\n>\n<h3 id=\"panel-title\" class=\"panelTitle\">${texts.delete}</h3>\n<p id=\"panel-text\" class=\"panelText\">\n${quadrantTaskDeleteText(texts, points[index])}\n</p>\n<div class=\"footer\">\n<minerva-button\nsize=\"small\"\ncolor=\"neutral\"\nvariant=\"ghost\"\ndata-autofocus\n@click=${this.close}\n>${texts.cancel}</minerva-button\n>\n<minerva-button size=\"small\" color=\"danger\" @click=${this.removeTask}\n>${texts.confirmDelete}</minerva-button\n>\n</div>\n</div>`;\n }\n\n protected override render() {\n const points = this.tasks;\n const locale = this.language;\n const texts = quadrantTaskLabels(locale, this.labels);\n const groups = quadrantGroups({ ...this.geometry(), points });\n const panel = this.shownPanel;\n const adding =\n panel?.kind === \"draft\" && panel.draft.index === null\n ? panel.draft.quadrant\n : null;\n const selected =\n this.selectedIndex !== undefined ? this.selectedIndex : this.selection;\n const ariaLabel = this.aria.label;\n return html`<div\npart=\"root\"\nclass=\"board\"\ndata-panel=${panel?.kind ?? nothing}\n@pointerdown=${this.trackPointer}\n>\n<minerva-quadrant-chart\npart=\"chart\"\ndrag-points\n.points=${points}\n.quadrants=${this.quadrants}\n.xLabel=${this.xLabel}\n.yLabel=${this.yLabel}\n.axisLabels=${this.axisLabels}\n.xDomain=${this.xDomain}\n.yDomain=${this.yDomain}\n.xSplit=${this.xSplit}\n.ySplit=${this.ySplit}\n.reverseX=${this.reverseX}\n.hideTicks=${this.hideTicks}\n.hideLabels=${this.hideLabels}\n.pointSize=${this.pointSize}\n.selectedIndex=${selected}\n.noAccessiblePoints=${this.noAccessiblePoints}\n.height=${this.height}\n.options=${this.engineOptions(locale, ariaLabel)}\n@minerva-point-click=${this.onPointClick}\n@minerva-point-double-click=${this.onPointDoubleClick}\n@minerva-quadrant-click=${this.onQuadrantClick}\n@minerva-point-drop=${this.onPointDrop}\n>\n${QUADRANT_CORNERS.map((corner) =>\n this.renderHeader(\n corner,\n this.hideCounts\n ? undefined\n : quadrantCountText(true, groups[corner].points, locale),\n texts.add,\n adding === corner,\n ),\n )}\n<div\nslot=\"point-actions\"\nrole=\"toolbar\"\nclass=\"cardActions\"\naria-label=${texts.actions}\n@pointerdown=${stop}\n>\n<minerva-icon-button\nsize=\"xsmall\"\nvariant=\"ghost\"\nlabel=${texts.edit}\ndata-action=\"edit\"\n@click=${() => this.edit(this.chart?.activeIndex ?? null)}\n>${icon(\"edit\", 14)}</minerva-icon-button\n>\n<minerva-icon-button\nsize=\"xsmall\"\nvariant=\"ghost\"\ncolor=\"danger\"\nlabel=${texts.delete}\ndata-action=\"delete\"\n@click=${() => this.confirmRemove(this.chart?.activeIndex ?? null)}\n>${icon(\"delete\", 14)}</minerva-icon-button\n>\n</div>\n</minerva-quadrant-chart>\n${\n panel?.kind === \"draft\"\n ? this.renderDraftPanel(panel.draft, texts, points)\n : panel?.kind === \"delete\"\n ? this.renderDeletePanel(panel.index, texts, points)\n : nothing\n }\n</div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"minerva-quadrant-task-board\": MinervaQuadrantTaskBoard;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAuDA,IAAMI,IAAkB;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAEMC,KAAQ,MAAiBC,EAAM,gBAAgB,GAc/CC,IAAM,IAENC,WAAmC;CAAE,GAAG;CAAG,GAAG;CAAG,OAAO;CAAG,QAAQ;AAAE;AAG3E,SAASC,IAAwC;CAC/C,IAAIC,IAAS,SAAS;CACtB,OAAOA,GAAQ,YAAY,gBACzB,IAASA,EAAO,WAAW;CAC7B,OAAOA,aAAkB,cAAcA,IAAS;AAClD;AAEA,IAAMC,KAAQ,GAAwC,IAAO,OAC3D,CAAI;QACEC,EAAK;SACJA,EAAK;;;;;;;;;UASJC,EAAoBC,GAAM;SAuCvBC,IAAb,cAA8CC,E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,CAAAgF,EAAS;CAAE,MAAM;CAAS,WAAW;AAAuB,CAAC,CAAA,GAAAlE,EAAA,WAAA,sBAAA,KAAA,CAAA,GAI7Dd,EAAA,CAAAgF,EAAS,EAAE,WAAW,GAAM,CAAC,CAAA,GAAAlE,EAAA,WAAA,WAAA,KAAA,CAAA,GAG7Bd,EAAA,CAAAiF,EAAM,CAAA,GAAAnE,EAAA,WAAA,SAAA,KAAA,CAAA,GACNd,EAAA,CAAAiF,EAAM,CAAA,GAAAnE,EAAA,WAAA,aAAA,KAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../react/src/components/QuadrantTaskBoard/quadrantTaskBoard.module.scss?inline
|
|
2
|
-
var e = ".board{box-sizing:border-box;width:100%;min-width:0;position:relative}.board[data-panel] .minerva-chart-quadrant-card{display:none}.header{align-items:center;gap:var(--space-1,4px);min-width:0;max-width:100%;padding:2px 2px 2px var(--space-2,8px);background:var(--quadrant-task-board-header-background,color-mix(in srgb, var(--surface-color,#fff) 72%, transparent));-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);color:var(--quadrant-task-board-header-color,var(--text-color));font-size:var(--font-size-xs,12px);white-space:nowrap;pointer-events:auto;border-radius:999px;font-weight:600;line-height:20px;display:inline-flex}.title{text-overflow:ellipsis;min-width:0;overflow:hidden}.badge{color:var(--text-secondary-color);font-weight:500}.count{background:var(--quadrant-task-board-count-background,var(--surface-muted-color,#0000000f));min-width:20px;color:var(--quadrant-task-board-count-color,var(--text-secondary-color));font-variant-numeric:tabular-nums;text-align:center;border-radius:999px;flex:none;padding:0 6px;font-size:11px;font-weight:500;line-height:18px}.add{flex:none}.actions{border:1px solid var(--border-color);border-radius:var(--quadrant-task-board-actions-radius,var(--radius-md,8px));background:var(--quadrant-task-board-actions-background,var(--surface-elevated-color,var(--surface-color,#fff)));pointer-events:auto;gap:
|
|
2
|
+
var e = ".board{box-sizing:border-box;width:100%;min-width:0;position:relative}.board[data-panel] .minerva-chart-quadrant-card{display:none}.header{align-items:center;gap:var(--space-1,4px);min-width:0;max-width:100%;padding:2px 2px 2px var(--space-2,8px);background:var(--quadrant-task-board-header-background,color-mix(in srgb, var(--surface-color,#fff) 72%, transparent));-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);color:var(--quadrant-task-board-header-color,var(--text-color));font-size:var(--font-size-xs,12px);white-space:nowrap;pointer-events:auto;border-radius:999px;font-weight:600;line-height:20px;display:inline-flex}.title{text-overflow:ellipsis;min-width:0;overflow:hidden}.badge{color:var(--text-secondary-color);font-weight:500}.count{background:var(--quadrant-task-board-count-background,var(--surface-muted-color,#0000000f));min-width:20px;color:var(--quadrant-task-board-count-color,var(--text-secondary-color));font-variant-numeric:tabular-nums;text-align:center;border-radius:999px;flex:none;padding:0 6px;font-size:11px;font-weight:500;line-height:18px}.add{flex:none}.actions{border:1px solid var(--border-color);border-radius:var(--quadrant-task-board-actions-radius,var(--radius-md,8px));background:var(--quadrant-task-board-actions-background,var(--surface-elevated-color,var(--surface-color,#fff)));pointer-events:auto;gap:0;padding:2px;animation:.14s cubic-bezier(.2,0,0,1) actions-in;display:flex;position:absolute;transform:translate(-50%,calc(-100% - 12px));box-shadow:0 4px 14px #0f172a24}@media (prefers-reduced-motion:reduce){.actions{animation:none}}@keyframes actions-in{0%{opacity:0;transform:translate(-50%,calc(-100% - 8px))scale(.96)}}.cardActions{align-items:center;gap:0;display:flex}.form{gap:var(--space-3,12px);margin:0;display:grid}.field{gap:var(--space-1,4px);font-size:var(--font-size-xs,12px);color:var(--text-secondary-color);font-weight:500;display:grid}.panel{z-index:20;box-sizing:border-box;width:min(var(--quadrant-task-board-panel-width,288px), 100%);padding:var(--space-3,12px) var(--space-4,16px);border:1px solid var(--quadrant-task-board-panel-border,color-mix(in srgb, var(--border-color,#e5e7eb) 70%, transparent));border-radius:var(--quadrant-task-board-panel-radius,var(--radius-lg,12px));background:var(--quadrant-task-board-panel-background,color-mix(in srgb, var(--surface-elevated-color,var(--surface-color,#fff)) 80%, transparent));-webkit-backdrop-filter:blur(12px)saturate(160%);backdrop-filter:blur(12px)saturate(160%);color:var(--text-color);text-align:start;animation:.14s cubic-bezier(.2,0,0,1) panel-in;position:absolute;top:0;left:0;box-shadow:0 12px 32px -8px #0f172a33,0 4px 10px -4px #0f172a1a}@media (prefers-reduced-motion:reduce){.panel{animation:none}}@keyframes panel-in{0%{opacity:0;transform:scale(.96)}}.panelTitle{font-size:var(--font-size-sm,14px);margin:0;font-weight:600;line-height:20px}.panelText{margin:var(--space-1,4px) 0 var(--space-3,12px);color:var(--text-secondary-color);font-size:var(--font-size-sm,14px);overflow-wrap:anywhere;line-height:20px}.quadrants{border:0;min-width:0;margin:0;padding:0}.quadrants legend{margin-bottom:var(--space-1,4px);color:var(--text-secondary-color);font-size:var(--font-size-xs,12px);padding:0;font-weight:500}.quadrantGrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;display:grid}.quadrant{border:1px solid color-mix(in srgb, var(--border-color,#e5e7eb) 80%, transparent);border-radius:var(--radius-md,8px);background:color-mix(in srgb, var(--surface-color,#fff) 40%, transparent);min-width:0;color:var(--text-color);font-size:var(--font-size-xs,12px);cursor:pointer;align-items:center;gap:6px;padding:5px 8px;line-height:18px;transition:background-color .12s ease-out,border-color .12s ease-out;display:flex;position:relative}.quadrant input{opacity:0;cursor:pointer;width:100%;height:100%;margin:0;position:absolute;inset:0}.quadrant:hover{background:color-mix(in srgb, var(--text-color) 6%, transparent)}.quadrant:has(input:checked){border-color:color-mix(in srgb, var(--primary-color) 70%, transparent);background:color-mix(in srgb, var(--primary-color) 12%, transparent);font-weight:600}.quadrant:has(input:focus-visible){box-shadow:0 0 0 3px var(--focus-ring-color)}.swatch{border-radius:50%;flex:none;width:8px;height:8px}.quadrantName{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.footer{justify-content:flex-end;gap:var(--space-2,8px);display:flex}";
|
|
3
3
|
//#endregion
|
|
4
4
|
export { e as default };
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quadrantTaskBoard.css.js","names":["quadrantTaskBoard_module_default"],"sources":["../../../../../react/src/components/QuadrantTaskBoard/quadrantTaskBoard.module.scss?inline"],"sourcesContent":["// Public CSS variables (set them on the board or any ancestor):\n// @css-var --quadrant-task-board-header-color Text color of the quadrant titles (defaults to --text-color)\n// @css-var --quadrant-task-board-header-background Background of the quadrant headers (defaults to a translucent surface)\n// @css-var --quadrant-task-board-count-background Background of the task count chips (defaults to --surface-muted-color)\n// @css-var --quadrant-task-board-count-color Text color of the task count chips (defaults to --text-secondary-color)\n// @css-var --quadrant-task-board-actions-background Background of the toolbar of the active task (defaults to --surface-elevated-color)\n// @css-var --quadrant-task-board-actions-radius Corner radius of the toolbar of the active task (defaults to --radius-md)\n// @css-var --quadrant-task-board-panel-background Background of the inline add / edit / delete panel (defaults to a translucent elevated surface)\n// @css-var --quadrant-task-board-panel-border Border color of the inline panel (defaults to a translucent --border-color)\n// @css-var --quadrant-task-board-panel-radius Corner radius of the inline panel (defaults to --radius-lg)\n// @css-var --quadrant-task-board-panel-width Width of the inline panel (defaults to 288px)\n\n.board {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n\n // the panel names the task: no info card of the chart beside it\n &[data-panel] :global(.minerva-chart-quadrant-card) {\n display: none;\n }\n}\n\n// title, count and add button in the outer corner of a quadrant\n.header {\n display: inline-flex;\n align-items: center;\n gap: var(--space-1, 4px);\n max-width: 100%;\n min-width: 0;\n padding: 2px 2px 2px var(--space-2, 8px);\n border-radius: 999px;\n background: var(--quadrant-task-board-header-background, color-mix(in srgb, var(--surface-color, #fff) 72%, transparent));\n backdrop-filter: blur(6px);\n color: var(--quadrant-task-board-header-color, var(--text-color));\n font-size: var(--font-size-xs, 12px);\n font-weight: 600;\n line-height: 20px;\n white-space: nowrap;\n pointer-events: auto;\n}\n\n.title {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.badge {\n color: var(--text-secondary-color);\n font-weight: 500;\n}\n\n.count {\n flex: none;\n min-width: 20px;\n padding: 0 6px;\n border-radius: 999px;\n background: var(--quadrant-task-board-count-background, var(--surface-muted-color, rgb(0 0 0 / 6%)));\n color: var(--quadrant-task-board-count-color, var(--text-secondary-color));\n font-size: 11px;\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n line-height: 18px;\n text-align: center;\n}\n\n.add {\n flex: none;\n}\n\n// edit / delete above the active task\n.actions {\n position: absolute;\n display: flex;\n gap:
|
|
1
|
+
{"version":3,"file":"quadrantTaskBoard.css.js","names":["quadrantTaskBoard_module_default"],"sources":["../../../../../react/src/components/QuadrantTaskBoard/quadrantTaskBoard.module.scss?inline"],"sourcesContent":["// Public CSS variables (set them on the board or any ancestor):\n// @css-var --quadrant-task-board-header-color Text color of the quadrant titles (defaults to --text-color)\n// @css-var --quadrant-task-board-header-background Background of the quadrant headers (defaults to a translucent surface)\n// @css-var --quadrant-task-board-count-background Background of the task count chips (defaults to --surface-muted-color)\n// @css-var --quadrant-task-board-count-color Text color of the task count chips (defaults to --text-secondary-color)\n// @css-var --quadrant-task-board-actions-background Background of the toolbar of the active task (defaults to --surface-elevated-color)\n// @css-var --quadrant-task-board-actions-radius Corner radius of the toolbar of the active task (defaults to --radius-md)\n// @css-var --quadrant-task-board-panel-background Background of the inline add / edit / delete panel (defaults to a translucent elevated surface)\n// @css-var --quadrant-task-board-panel-border Border color of the inline panel (defaults to a translucent --border-color)\n// @css-var --quadrant-task-board-panel-radius Corner radius of the inline panel (defaults to --radius-lg)\n// @css-var --quadrant-task-board-panel-width Width of the inline panel (defaults to 288px)\n\n.board {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n\n // the panel names the task: no info card of the chart beside it\n &[data-panel] :global(.minerva-chart-quadrant-card) {\n display: none;\n }\n}\n\n// title, count and add button in the outer corner of a quadrant\n.header {\n display: inline-flex;\n align-items: center;\n gap: var(--space-1, 4px);\n max-width: 100%;\n min-width: 0;\n padding: 2px 2px 2px var(--space-2, 8px);\n border-radius: 999px;\n background: var(--quadrant-task-board-header-background, color-mix(in srgb, var(--surface-color, #fff) 72%, transparent));\n backdrop-filter: blur(6px);\n color: var(--quadrant-task-board-header-color, var(--text-color));\n font-size: var(--font-size-xs, 12px);\n font-weight: 600;\n line-height: 20px;\n white-space: nowrap;\n pointer-events: auto;\n}\n\n.title {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.badge {\n color: var(--text-secondary-color);\n font-weight: 500;\n}\n\n.count {\n flex: none;\n min-width: 20px;\n padding: 0 6px;\n border-radius: 999px;\n background: var(--quadrant-task-board-count-background, var(--surface-muted-color, rgb(0 0 0 / 6%)));\n color: var(--quadrant-task-board-count-color, var(--text-secondary-color));\n font-size: 11px;\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n line-height: 18px;\n text-align: center;\n}\n\n.add {\n flex: none;\n}\n\n// edit / delete above the active task (renderers without the point card):\n// compact, close to the dot\n.actions {\n position: absolute;\n display: flex;\n gap: 0;\n padding: 2px;\n border: 1px solid var(--border-color);\n border-radius: var(--quadrant-task-board-actions-radius, var(--radius-md, 8px));\n background: var(--quadrant-task-board-actions-background, var(--surface-elevated-color, var(--surface-color, #fff)));\n box-shadow: 0 4px 14px rgb(15 23 42 / 14%);\n transform: translate(-50%, calc(-100% - 12px));\n pointer-events: auto;\n animation: actions-in 140ms cubic-bezier(0.2, 0, 0, 1);\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n}\n\n@keyframes actions-in {\n from {\n opacity: 0;\n transform: translate(-50%, calc(-100% - 8px)) scale(0.96);\n }\n}\n\n// edit / delete in the card of the active task, beside its name\n.cardActions {\n display: flex;\n align-items: center;\n gap: 0;\n}\n\n.form {\n display: grid;\n gap: var(--space-3, 12px);\n margin: 0;\n}\n\n.field {\n display: grid;\n gap: var(--space-1, 4px);\n font-size: var(--font-size-xs, 12px);\n font-weight: 500;\n color: var(--text-secondary-color);\n}\n\n// add / edit form and delete confirmation, anchored at the + button or the\n// task inside the board: a frosted surface after the theme, like the chart\n// tooltips\n.panel {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 20;\n box-sizing: border-box;\n width: min(var(--quadrant-task-board-panel-width, 288px), 100%);\n padding: var(--space-3, 12px) var(--space-4, 16px);\n border: 1px solid var(--quadrant-task-board-panel-border, color-mix(in srgb, var(--border-color, #e5e7eb) 70%, transparent));\n border-radius: var(--quadrant-task-board-panel-radius, var(--radius-lg, 12px));\n background: var(--quadrant-task-board-panel-background, color-mix(in srgb, var(--surface-elevated-color, var(--surface-color, #fff)) 80%, transparent));\n -webkit-backdrop-filter: blur(12px) saturate(160%);\n backdrop-filter: blur(12px) saturate(160%);\n color: var(--text-color);\n box-shadow:\n 0 12px 32px -8px rgb(15 23 42 / 20%),\n 0 4px 10px -4px rgb(15 23 42 / 10%);\n text-align: start;\n animation: panel-in 140ms cubic-bezier(0.2, 0, 0, 1);\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n}\n\n@keyframes panel-in {\n from {\n opacity: 0;\n transform: scale(0.96);\n }\n}\n\n.panelTitle {\n margin: 0;\n font-size: var(--font-size-sm, 14px);\n font-weight: 600;\n line-height: 20px;\n}\n\n.panelText {\n margin: var(--space-1, 4px) 0 var(--space-3, 12px);\n color: var(--text-secondary-color);\n font-size: var(--font-size-sm, 14px);\n line-height: 20px;\n overflow-wrap: anywhere;\n}\n\n// the quadrant picker: the four quadrants laid out like the matrix\n.quadrants {\n min-width: 0;\n margin: 0;\n padding: 0;\n border: 0;\n\n legend {\n padding: 0;\n margin-bottom: var(--space-1, 4px);\n color: var(--text-secondary-color);\n font-size: var(--font-size-xs, 12px);\n font-weight: 500;\n }\n}\n\n.quadrantGrid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 6px;\n}\n\n.quadrant {\n position: relative;\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n padding: 5px 8px;\n border: 1px solid color-mix(in srgb, var(--border-color, #e5e7eb) 80%, transparent);\n border-radius: var(--radius-md, 8px);\n background: color-mix(in srgb, var(--surface-color, #fff) 40%, transparent);\n color: var(--text-color);\n font-size: var(--font-size-xs, 12px);\n line-height: 18px;\n cursor: pointer;\n transition:\n background-color 120ms ease-out,\n border-color 120ms ease-out;\n\n input {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n opacity: 0;\n cursor: pointer;\n }\n\n &:hover {\n background: color-mix(in srgb, var(--text-color) 6%, transparent);\n }\n\n &:has(input:checked) {\n border-color: color-mix(in srgb, var(--primary-color) 70%, transparent);\n background: color-mix(in srgb, var(--primary-color) 12%, transparent);\n font-weight: 600;\n }\n\n &:has(input:focus-visible) {\n box-shadow: 0 0 0 3px var(--focus-ring-color);\n }\n}\n\n.swatch {\n flex: none;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n}\n\n.quadrantName {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.footer {\n display: flex;\n justify-content: flex-end;\n gap: var(--space-2, 8px);\n}\n"],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "minerva-design",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.0",
|
|
4
4
|
"description": "Minerva Design: React, Vue, Angular, Web Components and native platform components with shared design tokens and contracts",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "fwx5618177 <fwx5618177@gmail.com>",
|