Add planner-aware memos and unified tool configuration panels
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
This commit is contained in:
parent
acd9b2fe11
commit
808610dcf2
53 changed files with 842 additions and 329 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// Rôle : fournit l'outil tableau avec cellules libres, formules simples et échange TSV.
|
||||
import { useMemo } from "react";
|
||||
import { TextExchangeActions } from "./TextExchangeActions.jsx";
|
||||
import { ModuleTextExchangeConfiguration } from "./ModuleConfiguration.jsx";
|
||||
import { columnIndexToName, evaluateTable } from "./tableFormulaEngine.js";
|
||||
import { TableGrid } from "./TableGrid.jsx";
|
||||
import { TableToolbar } from "./TableToolbar.jsx";
|
||||
|
|
@ -14,7 +14,7 @@ import {
|
|||
} from "./tableUtils.js";
|
||||
import { useTableInteractions } from "./useTableInteractions.js";
|
||||
|
||||
export function TableModule({ toolboxId, moduleId, context, textExchangeOpen }) {
|
||||
export function TableModule({ toolboxId, moduleId, context, configurationTarget }) {
|
||||
const rawData = context.getModuleData(toolboxId, moduleId, { rows: DEFAULT_ROWS, columns: DEFAULT_COLUMNS, cells: {} });
|
||||
const data = useMemo(() => context.normalizeTableData(rawData), [context, rawData]);
|
||||
const textContent = context.moduleText?.table || {};
|
||||
|
|
@ -61,11 +61,7 @@ export function TableModule({ toolboxId, moduleId, context, textExchangeOpen })
|
|||
|
||||
return (
|
||||
<div className="table-module">
|
||||
{textExchangeOpen && (
|
||||
<div className="module-text-exchange-panel">
|
||||
<TextExchangeActions type="table" data={data} context={context} textContent={textContent} exportLabel="Exporter TSV" onImport={(nextData) => context.setModuleData(toolboxId, moduleId, nextData, "table")} />
|
||||
</div>
|
||||
)}
|
||||
<ModuleTextExchangeConfiguration target={configurationTarget} title={context.moduleConfigurationText?.dataTitle} type="table" data={data} context={context} textContent={textContent} exportLabel="Exporter TSV" onImport={(nextData) => context.setModuleData(toolboxId, moduleId, nextData, "table")} />
|
||||
<TableToolbar rows={data.rows} columns={data.columns} textContent={textContent} onResize={resize} onCopy={tableInteractions.copyTsv} />
|
||||
<TableGrid
|
||||
data={data}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue