@dineug/erd-editor 4.0.0 → 4.2.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/README.md +106 -280
- package/dist/components/dictionary/Dictionary.d.ts +12 -0
- package/dist/components/dictionary/Dictionary.styles.d.ts +33 -0
- package/dist/components/dictionary/checkCount.d.ts +28 -0
- package/dist/components/dictionary/checkSheet.d.ts +41 -0
- package/dist/components/dictionary/dictionary-context-menu/DictionaryContextMenu.d.ts +30 -0
- package/dist/components/dictionary/dictionaryCommit.d.ts +83 -0
- package/dist/components/dictionary/dictionaryFile.d.ts +23 -0
- package/dist/components/dictionary/dictionaryKeys.d.ts +48 -0
- package/dist/components/dictionary/dictionaryView.d.ts +65 -0
- package/dist/components/dictionary/domain-cell-editor/DomainCellEditor.d.ts +22 -0
- package/dist/components/dictionary/domain-cell-editor/DomainCellEditor.styles.d.ts +7 -0
- package/dist/components/dictionary/domain-cell-editor/openDomainCellEditor.d.ts +9 -0
- package/dist/components/dictionary/gridTheme.d.ts +18 -0
- package/dist/components/dictionary/sheets.d.ts +65 -0
- package/dist/components/erd/automatic-table-placement/flowPlacement.d.ts +4 -4
- package/dist/components/erd/canvas/DiffOutline.template.d.ts +14 -0
- package/dist/components/erd/canvas/EditOverlay.styles.d.ts +6 -0
- package/dist/components/erd/canvas/sceneHit.d.ts +5 -0
- package/dist/components/erd/canvas/sceneTokens.d.ts +8 -0
- package/dist/components/erd/canvas/table/Table.d.ts +6 -0
- package/dist/components/erd/canvas/table/blankLogicalName.d.ts +19 -0
- package/dist/components/erd/canvas/table/cellLayout.d.ts +4 -4
- package/dist/components/erd/canvas/table/column/Column.d.ts +32 -5
- package/dist/components/erd/canvas/table/dictionaryMarks.d.ts +29 -0
- package/dist/components/erd/canvas/table/useFocusTable.d.ts +1 -0
- package/dist/components/erd/diff-viewer/diff-tree/DiffTree.d.ts +19 -0
- package/dist/components/erd/diff-viewer/diff-tree/DiffTree.styles.d.ts +13 -0
- package/dist/components/erd/diff-viewer/diff-tree/diffTreeModel.d.ts +52 -0
- package/dist/components/erd/diff-viewer/diff.d.ts +21 -19
- package/dist/components/erd/draw-target/placePill.d.ts +1 -3
- package/dist/components/erd/erd-context-menu/menus/nameViewMenus.d.ts +22 -0
- package/dist/components/erd/floating-toolbar/FloatingToolbar.d.ts +7 -4
- package/dist/components/erd/floating-toolbar/nameViewDropdown.d.ts +16 -0
- package/dist/components/erd/floating-toolbar/nameViewDropdown.styles.d.ts +5 -0
- package/dist/components/erd/goToErdTarget.d.ts +40 -16
- package/dist/components/erd/readerNameView.d.ts +15 -0
- package/dist/components/erd/relationshipHighlight.d.ts +18 -0
- package/dist/components/erd/welcome-screen/welcome-hints/WelcomeHints.styles.d.ts +5 -0
- package/dist/components/erd/welcome-screen/welcomeLayout.d.ts +7 -3
- package/dist/components/erd-editor/ErdEditor.styles.d.ts +4 -0
- package/dist/components/erd-editor/viewportLayout.d.ts +52 -0
- package/dist/components/explorer/Explorer.d.ts +12 -0
- package/dist/components/explorer/explorer-controller/ExplorerController.d.ts +11 -0
- package/dist/components/explorer/explorer-panel/ExplorerPanel.d.ts +14 -0
- package/dist/components/explorer/explorer-panel/ExplorerPanel.styles.d.ts +13 -0
- package/dist/components/explorer/explorer-search/ExplorerSearch.d.ts +12 -0
- package/dist/components/explorer/explorer-search/ExplorerSearch.styles.d.ts +13 -0
- package/dist/components/explorer/explorerCommands.d.ts +28 -0
- package/dist/components/explorer/explorerNavigation.d.ts +14 -0
- package/dist/components/explorer/explorerSearch.d.ts +71 -0
- package/dist/components/explorer/explorerTree.d.ts +93 -0
- package/dist/components/explorer/explorerView.d.ts +54 -0
- package/dist/components/{find-replace → explorer}/fieldIcon.d.ts +4 -1
- package/dist/components/{find-replace → explorer}/matchTarget.d.ts +7 -9
- package/dist/components/export-image/ExportImage.d.ts +10 -0
- package/dist/components/export-image/exportImageActions.d.ts +2 -2
- package/dist/components/flowCenters.d.ts +9 -0
- package/dist/components/map-columns/nameOf.d.ts +11 -3
- package/dist/components/primitives/icon/icons.d.ts +13 -4
- package/dist/components/primitives/sash/Sash.d.ts +1 -0
- package/dist/components/primitives/tree/Tree.d.ts +30 -0
- package/dist/components/primitives/tree/Tree.styles.d.ts +5 -0
- package/dist/components/primitives/tree/treeModel.d.ts +42 -0
- package/dist/components/quick-search/QuickSearch.styles.d.ts +1 -0
- package/dist/components/quick-search/actions.d.ts +3 -4
- package/dist/components/quick-search/paletteList.d.ts +7 -0
- package/dist/components/quick-search/scopedActions.d.ts +5 -11
- package/dist/components/schema-sql/schema-sql-options/SchemaSQLOptions.d.ts +2 -2
- package/dist/components/schema-sql/schema-sql-options/SchemaSQLOptions.styles.d.ts +2 -0
- package/dist/components/schema-sql/schemaSQLView.d.ts +2 -0
- package/dist/components/settings/lockSettingRows.d.ts +2 -1
- package/dist/components/table-view/column/column-domain/ColumnDomain.d.ts +19 -0
- package/dist/components/table-view/column/column-domain/domainOptions.d.ts +13 -0
- package/dist/components/table-view/column/column-logical-name/ColumnLogicalName.d.ts +22 -0
- package/dist/components/table-view/column/column-logical-name/ColumnLogicalName.styles.d.ts +4 -0
- package/dist/components/table-view/column/columnViewText.d.ts +33 -0
- package/dist/components/table-view/column/useHintList.d.ts +24 -0
- package/dist/components/theme-builder/ThemeBuilder.styles.d.ts +3 -3
- package/dist/components/toolbar/Toolbar.styles.d.ts +0 -1
- package/dist/components/visualization/createVisualization.d.ts +2 -0
- package/dist/components/visualization/flowLayout.d.ts +2 -1
- package/dist/components/visualization/table/column/Column.d.ts +4 -0
- package/dist/components/visualization/visualization-toolbar/VisualizationToolbar.d.ts +2 -2
- package/dist/components/visualization/visualizationView.d.ts +15 -4
- package/dist/constants/layout.d.ts +18 -1
- package/dist/constants/open.d.ts +0 -1
- package/dist/constants/schema.d.ts +15 -2
- package/dist/engine/actions.d.ts +5 -2
- package/dist/engine/history.actions.d.ts +8 -0
- package/dist/engine/history.d.ts +11 -3
- package/dist/engine/index.js +17 -17
- package/dist/engine/modules/dictionary/actions.d.ts +74 -0
- package/dist/engine/modules/dictionary/atom.actions.d.ts +74 -0
- package/dist/engine/modules/dictionary/checks.d.ts +76 -0
- package/dist/engine/modules/dictionary/derive.d.ts +54 -0
- package/dist/engine/modules/dictionary/derivedNames.d.ts +23 -0
- package/dist/engine/modules/dictionary/dictionaryIndex.d.ts +73 -0
- package/dist/engine/modules/dictionary/domainLinks.d.ts +9 -0
- package/dist/engine/modules/dictionary/domainTypes.d.ts +27 -0
- package/dist/engine/modules/dictionary/entryWrites.d.ts +63 -0
- package/dist/engine/modules/dictionary/generator.actions.d.ts +126 -0
- package/dist/engine/modules/dictionary/history.d.ts +14 -0
- package/dist/engine/modules/dictionary/membership.d.ts +28 -0
- package/dist/engine/modules/dictionary/orderKeys.d.ts +13 -0
- package/dist/engine/modules/dictionary/termIndex.d.ts +24 -0
- package/dist/engine/modules/editor/actions.d.ts +18 -3
- package/dist/engine/modules/editor/atom.actions.d.ts +24 -6
- package/dist/engine/modules/editor/generator.actions.d.ts +22 -8
- package/dist/engine/modules/editor/state.d.ts +24 -0
- package/dist/engine/modules/editor/utils/nameView.d.ts +103 -0
- package/dist/engine/modules/editor/view.actions.d.ts +24 -1
- package/dist/engine/modules/editor/view.d.ts +8 -0
- package/dist/engine/modules/relationship/fkColumns.d.ts +10 -4
- package/dist/engine/modules/settings/actions.d.ts +13 -3
- package/dist/engine/modules/settings/atom.actions.d.ts +49 -5
- package/dist/engine/modules/settings/generator.actions.d.ts +2 -2
- package/dist/engine/modules/table/actions.d.ts +7 -0
- package/dist/engine/modules/table/atom.actions.d.ts +46 -0
- package/dist/engine/modules/table/generator.actions.d.ts +7 -0
- package/dist/engine/modules/table/history.d.ts +2 -0
- package/dist/engine/modules/table-column/actions.d.ts +7 -0
- package/dist/engine/modules/table-column/atom.actions.d.ts +49 -0
- package/dist/engine/modules/table-column/generator.actions.d.ts +5 -0
- package/dist/engine/modules/table-column/history.d.ts +3 -0
- package/dist/engine/modules/table-column/utils/dataType.d.ts +3 -1
- package/dist/engine/rx-store.d.ts +6 -0
- package/dist/engine/tag.d.ts +8 -0
- package/dist/erd-editor.umd.js +1586 -1018
- package/dist/i18n/messages/ar-SA.d.ts +166 -15
- package/dist/i18n/messages/de-DE.d.ts +134 -11
- package/dist/i18n/messages/en/code.d.ts +0 -1
- package/dist/i18n/messages/en/common.d.ts +11 -1
- package/dist/i18n/messages/en/contextMenu.d.ts +1 -0
- package/dist/i18n/messages/en/dictionary.d.ts +79 -0
- package/dist/i18n/messages/en/explorer.d.ts +37 -0
- package/dist/i18n/messages/en/findReplace.d.ts +7 -1
- package/dist/i18n/messages/en/index.d.ts +135 -12
- package/dist/i18n/messages/en/palette.d.ts +5 -7
- package/dist/i18n/messages/en/schemaSql.d.ts +1 -0
- package/dist/i18n/messages/en/settings.d.ts +1 -0
- package/dist/i18n/messages/en/shortcuts.d.ts +3 -1
- package/dist/i18n/messages/en/toolbar.d.ts +0 -1
- package/dist/i18n/messages/en/visualization.d.ts +2 -0
- package/dist/i18n/messages/es-ES.d.ts +142 -12
- package/dist/i18n/messages/eu-ES.d.ts +134 -11
- package/dist/i18n/messages/fa-IR.d.ts +134 -11
- package/dist/i18n/messages/fr-FR.d.ts +142 -12
- package/dist/i18n/messages/he-IL.d.ts +142 -12
- package/dist/i18n/messages/id-ID.d.ts +126 -10
- package/dist/i18n/messages/it-IT.d.ts +142 -12
- package/dist/i18n/messages/ja-JP.d.ts +126 -10
- package/dist/i18n/messages/ko-KR.d.ts +126 -10
- package/dist/i18n/messages/nl-NL.d.ts +134 -11
- package/dist/i18n/messages/pl-PL.d.ts +150 -13
- package/dist/i18n/messages/pt-BR.d.ts +142 -12
- package/dist/i18n/messages/pt-PT.d.ts +142 -12
- package/dist/i18n/messages/ro-RO.d.ts +142 -12
- package/dist/i18n/messages/ru-RU.d.ts +150 -13
- package/dist/i18n/messages/sk-SK.d.ts +150 -13
- package/dist/i18n/messages/sl-SI.d.ts +150 -13
- package/dist/i18n/messages/sv-SE.d.ts +134 -11
- package/dist/i18n/messages/tr-TR.d.ts +134 -11
- package/dist/i18n/messages/uk-UA.d.ts +150 -13
- package/dist/i18n/messages/zh-CN.d.ts +126 -10
- package/dist/i18n/messages/zh-TW.d.ts +126 -10
- package/dist/index.d.ts +1 -0
- package/dist/index.js +34929 -25093
- package/dist/internal-types/index.d.ts +6 -0
- package/dist/konva/scene/columnDropTarget.d.ts +2 -2
- package/dist/loadValue-B5ojYrZ-.js +14682 -0
- package/dist/peer/index.d.ts +4 -0
- package/dist/peer/index.js +60 -59
- package/dist/services/export-png/ExportScene.d.ts +1 -1
- package/dist/services/export-png/documentScene.d.ts +7 -1
- package/dist/services/export-png/index.d.ts +11 -5
- package/dist/services/export-png/renderPng.d.ts +4 -1
- package/dist/services/export-png/renderSvg.d.ts +4 -1
- package/dist/shared-store-S7YWEz3E.js +1656 -0
- package/dist/styles/scrollbar.styles.d.ts +1 -1
- package/dist/themes/tokens.d.ts +21 -4
- package/dist/utils/calcTable.d.ts +20 -4
- package/dist/utils/collection/domain.entity.d.ts +3 -0
- package/dist/utils/collection/term.entity.d.ts +3 -0
- package/dist/utils/collection/word.entity.d.ts +3 -0
- package/dist/utils/dictionary-csv/csv.d.ts +13 -0
- package/dist/utils/dictionary-csv/decode.d.ts +7 -0
- package/dist/utils/dictionary-csv/dictionaryCsv.d.ts +55 -0
- package/dist/utils/dictionary-csv/index.d.ts +4 -0
- package/dist/utils/diff/compareEntities.d.ts +39 -0
- package/dist/utils/diff/diffDocuments.d.ts +12 -0
- package/dist/utils/diff/index.d.ts +5 -0
- package/dist/utils/diff/pairEntities.d.ts +41 -0
- package/dist/utils/diff/types.d.ts +81 -0
- package/dist/utils/emitter.d.ts +2 -8
- package/dist/utils/file/exportFile.d.ts +10 -0
- package/dist/utils/find-replace/findMatches.d.ts +31 -12
- package/dist/utils/find-replace/matcher.d.ts +2 -0
- package/dist/utils/find-replace/present.d.ts +4 -3
- package/dist/utils/find-replace/preserveCase.d.ts +10 -0
- package/dist/utils/find-replace/replaceActions.d.ts +9 -5
- package/dist/utils/focus.d.ts +2 -0
- package/dist/utils/formatCount.d.ts +10 -0
- package/dist/utils/keyboard-shortcut/index.d.ts +11 -3
- package/dist/utils/map-columns/alignTypes.d.ts +3 -3
- package/dist/utils/schema-sql/Databricks.d.ts +2 -2
- package/dist/utils/schema-sql/MSSQL.d.ts +1 -1
- package/dist/utils/schema-sql/MariaDB.d.ts +2 -2
- package/dist/utils/schema-sql/MySQL.d.ts +2 -2
- package/dist/utils/schema-sql/Oracle.d.ts +1 -1
- package/dist/utils/schema-sql/PostgreSQL.d.ts +1 -1
- package/dist/utils/schema-sql/SQLite.d.ts +2 -2
- package/dist/utils/schema-sql/Snowflake.d.ts +2 -2
- package/dist/utils/schema-sql/options.d.ts +2 -0
- package/dist/utils/schema-sql/utils.d.ts +14 -0
- package/dist/utils/table-clipboard/copy.d.ts +2 -3
- package/dist/utils/table-clipboard/index.d.ts +9 -1
- package/dist/utils/table-clipboard/paste.d.ts +2 -2
- package/dist/utils/table-clipboard/payload.d.ts +12 -0
- package/dist/utils/takeover.d.ts +6 -0
- package/dist/utils/validation.d.ts +1 -0
- package/dist/utils/virtualRange.d.ts +15 -0
- package/dist/workers/exportPng.shared-worker.js +30 -29
- package/package.json +8 -6
- package/dist/components/erd/diff-viewer/tree-viewer/TreeViewer.d.ts +0 -12
- package/dist/components/erd/diff-viewer/tree-viewer/TreeViewer.styles.d.ts +0 -6
- package/dist/components/find-replace/FindReplace.d.ts +0 -13
- package/dist/components/find-replace/FindReplace.styles.d.ts +0 -27
- package/dist/components/find-replace/panelLayout.d.ts +0 -20
- package/dist/konva/batchDraw.d.ts +0 -42
- package/dist/konva/host.d.ts +0 -30
- package/dist/konva/jsx-types.test-d.d.ts +0 -2
- package/dist/loadValue-B3EFSe9k.js +0 -12925
- package/dist/shared-store-fUggY7sI.js +0 -1341
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { GridColumn } from '@dineug/grid';
|
|
2
|
+
import { ErdTarget } from '../erd/goToErdTarget';
|
|
3
|
+
import { DictionaryKind } from '../../engine/modules/dictionary/actions';
|
|
4
|
+
import { DictionaryCheck } from '../../engine/modules/dictionary/checks';
|
|
5
|
+
import { RootState } from '../../engine/state';
|
|
6
|
+
import { I18n } from '../../i18n/translate';
|
|
7
|
+
/** The check sheet's columns: what kind of check, what it is about, and what it found. */
|
|
8
|
+
export declare const CheckColumn: {
|
|
9
|
+
readonly type: "type";
|
|
10
|
+
readonly target: "target";
|
|
11
|
+
readonly detail: "detail";
|
|
12
|
+
};
|
|
13
|
+
type Translator = Pick<I18n, 't' | 'locale'>;
|
|
14
|
+
/**
|
|
15
|
+
* The check sheet's three columns, labelled in the reader's language and
|
|
16
|
+
* read-only in every document, since a check is read off the other sheets
|
|
17
|
+
* and the tables, never written.
|
|
18
|
+
*/
|
|
19
|
+
export declare function checkSheetColumns(widths?: Readonly<Record<string, number>>, i18n?: Pick<I18n, 't'>): GridColumn[];
|
|
20
|
+
/** What a cell of the check sheet shows, nothing for a column the sheet lacks. */
|
|
21
|
+
export declare function checkCellText(state: RootState, check: DictionaryCheck, columnId: string, i18n?: Translator): string;
|
|
22
|
+
/** Where a check leads: a dictionary row's cell on its own sheet, or a table's or a column's cell on the ERD tab. */
|
|
23
|
+
export type CheckDestination = {
|
|
24
|
+
kind: 'entry';
|
|
25
|
+
sheet: DictionaryKind;
|
|
26
|
+
id: string;
|
|
27
|
+
columnId: string;
|
|
28
|
+
} | {
|
|
29
|
+
kind: 'erd';
|
|
30
|
+
target: ErdTarget;
|
|
31
|
+
};
|
|
32
|
+
/** The cell a check names: a dictionary row's by its field, a table's or a column's on the canvas, the name view left to the jump. */
|
|
33
|
+
export declare function checkDestination({ target, field, }: DictionaryCheck): CheckDestination;
|
|
34
|
+
/**
|
|
35
|
+
* The checks the sheet lists, in the order the document gives them, those
|
|
36
|
+
* whose three cells hold the search's text while it holds any. It walks the
|
|
37
|
+
* whole document unless handed the checks a caller already listed.
|
|
38
|
+
*/
|
|
39
|
+
export declare function checkRows(state: RootState, search?: string, i18n?: Translator, checks?: ReadonlyArray<DictionaryCheck>): ReadonlyArray<DictionaryCheck>;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=checkSheet.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FC } from '@dineug/r-html';
|
|
2
|
+
export type DictionaryContextMenuProps = {
|
|
3
|
+
/** The rows the selection covers, which Insert adds beside it and Delete removes. */
|
|
4
|
+
count: number;
|
|
5
|
+
/** The header of the column right clicked, which the sorts order by; null shows no sort. */
|
|
6
|
+
column: string | null;
|
|
7
|
+
/** The grid shows no row, so only Insert below and the file rows show. */
|
|
8
|
+
empty?: boolean;
|
|
9
|
+
/** The chord that inserts above in the grid, shown beside its row. */
|
|
10
|
+
insertAboveShortcut?: string;
|
|
11
|
+
/** The chord that inserts below in the grid, shown beside its row. */
|
|
12
|
+
insertShortcut?: string;
|
|
13
|
+
/** The chord that deletes in the grid, shown beside its row. */
|
|
14
|
+
deleteShortcut?: string;
|
|
15
|
+
onInsertAbove: () => void;
|
|
16
|
+
onInsertBelow: () => void;
|
|
17
|
+
onDeleteRows: () => void;
|
|
18
|
+
onSortAscending: () => void;
|
|
19
|
+
onSortDescending: () => void;
|
|
20
|
+
onImport: () => void;
|
|
21
|
+
onExport: () => void;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* The menu a right click on an entry sheet's grid opens: as many rows as the
|
|
25
|
+
* selection covers inserted above or below it or removed, the sheet sorted by
|
|
26
|
+
* the column, and a CSV file in and out, as the bar's buttons do.
|
|
27
|
+
*/
|
|
28
|
+
declare const DictionaryContextMenu: FC<DictionaryContextMenuProps>;
|
|
29
|
+
export default DictionaryContextMenu;
|
|
30
|
+
//# sourceMappingURL=DictionaryContextMenu.d.ts.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { CommitEvent, GridSelection, RejectEvent } from '@dineug/grid';
|
|
2
|
+
import { AppContext } from '../appContext';
|
|
3
|
+
import { DomainOption } from '../table-view/column/column-domain/domainOptions';
|
|
4
|
+
import { DictionaryKind } from '../../engine/modules/dictionary/actions';
|
|
5
|
+
import { RxStore } from '../../engine/rx-store';
|
|
6
|
+
import { RootState } from '../../engine/state';
|
|
7
|
+
import { I18n } from '../../i18n/translate';
|
|
8
|
+
/** One row a commit writes: a listed row by its id, or null for one past the end. */
|
|
9
|
+
export type ResolvedRow = {
|
|
10
|
+
id: string | null;
|
|
11
|
+
/** The text each column of the commit gives, by column id. */
|
|
12
|
+
cells: Readonly<Record<string, string>>;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The rows one grid shows, a list per version the tab hands it. An edit is read
|
|
16
|
+
* by the id of the row it opened on, which a peer's removal above cannot move,
|
|
17
|
+
* a paste or a clear by the rows of the version the grid last received.
|
|
18
|
+
*/
|
|
19
|
+
export type SheetRows = {
|
|
20
|
+
/** The newest version, the one the tab hands the grid next. */
|
|
21
|
+
readonly version: number;
|
|
22
|
+
/** The rows of the newest version. */
|
|
23
|
+
readonly ids: ReadonlyArray<string>;
|
|
24
|
+
/** The rows of the version the grid last received. */
|
|
25
|
+
readonly receivedIds: ReadonlyArray<string>;
|
|
26
|
+
/** The id of the active cell's row, null while that row shows none. */
|
|
27
|
+
readonly activeId: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Takes the rows a batch or a search left under the next version. With no
|
|
30
|
+
* edit open the active id becomes the row the grid's active cell will show;
|
|
31
|
+
* an open edit keeps the row it opened on.
|
|
32
|
+
*/
|
|
33
|
+
bump(ids: ReadonlyArray<string>, editing?: boolean): number;
|
|
34
|
+
/** Notes the version the tab hands the grid as it renders; older rows are let go. */
|
|
35
|
+
receive(version: number): void;
|
|
36
|
+
/** Notes the active cell's row: the one onReady selects, and every one onSelectionChange reports. */
|
|
37
|
+
activate(row: number): void;
|
|
38
|
+
/**
|
|
39
|
+
* Reads the active id again from the rows the grid shows, unless an edit is
|
|
40
|
+
* open. The tab calls it as a key, a double click, a composition or an input
|
|
41
|
+
* reaches the grid, in the capture phase, before any of them opens an edit.
|
|
42
|
+
*/
|
|
43
|
+
settle(editing: boolean): void;
|
|
44
|
+
/** The rows a commit writes, in row order, or none for an edit on no row. */
|
|
45
|
+
resolve(event: CommitEvent): ResolvedRow[];
|
|
46
|
+
};
|
|
47
|
+
export declare function createSheetRows(ids?: ReadonlyArray<string>): SheetRows;
|
|
48
|
+
/** How many names a toast shows before it counts the rest in its number alone. */
|
|
49
|
+
export declare const NAMES_SHOWN = 3;
|
|
50
|
+
/**
|
|
51
|
+
* Says what the grid refused, under one key per reason so a press repeated
|
|
52
|
+
* shows one toast: a copy or a clear that did nothing is an error, while a
|
|
53
|
+
* paste whose columns ran past the last wrote the rest.
|
|
54
|
+
*/
|
|
55
|
+
export declare function reportGridRefusal({ emitter }: Pick<AppContext, 'emitter'>, { reason }: RejectEvent): void;
|
|
56
|
+
/**
|
|
57
|
+
* The names a toast shows in the reader's language, each in its own direction
|
|
58
|
+
* under a right-to-left one, in a list that says no more than its items do,
|
|
59
|
+
* since the number before it counts the rows it leaves out.
|
|
60
|
+
*/
|
|
61
|
+
export declare function formatNames(i18n: Pick<I18n, 'locale' | 'dir'>, names: ReadonlyArray<string>): string;
|
|
62
|
+
/**
|
|
63
|
+
* Sends a grid's commit as one dispatch and one undo, a term's domain read from
|
|
64
|
+
* its name, or nothing, with a toast saying why, when a row it names was
|
|
65
|
+
* removed meanwhile or any of its rows is refused.
|
|
66
|
+
*/
|
|
67
|
+
export declare function commitDictionaryCells({ store, emitter }: Pick<AppContext, 'store' | 'emitter'>, kind: DictionaryKind, rows: SheetRows, event: CommitEvent, i18n?: Pick<I18n, 'locale' | 'dir'>): boolean;
|
|
68
|
+
/** The domain the active row's term links, '' for none or a removed one: the row a term's domain picker opens on. */
|
|
69
|
+
export declare function activeTermDomain(state: RootState, rows: Pick<SheetRows, 'activeId'>): string;
|
|
70
|
+
/**
|
|
71
|
+
* Links the term the picker's edit opened on to the domain picked, by its id,
|
|
72
|
+
* None unlinking whatever it linked, a removed domain too, in one dispatch and
|
|
73
|
+
* one undo; nothing for the link it holds, or with a toast for a peer's removal.
|
|
74
|
+
*/
|
|
75
|
+
export declare function commitTermDomain({ store, emitter }: Pick<AppContext, 'store' | 'emitter'>, rows: Pick<SheetRows, 'activeId'>, { id: domainId, name }: DomainOption, i18n?: Pick<I18n, 'locale' | 'dir'>): boolean;
|
|
76
|
+
/** The ids of the rows a selection covers, among the rows the grid drew it over, each once in sheet order. */
|
|
77
|
+
export declare function selectedRowIds(rows: Pick<SheetRows, 'receivedIds'>, selection: GridSelection): string[];
|
|
78
|
+
/**
|
|
79
|
+
* Removes the rows a selection covers in one dispatch, so one undo lists them
|
|
80
|
+
* all again; the generator sends the removals from the end of the list back.
|
|
81
|
+
*/
|
|
82
|
+
export declare function removeSelectedRows(store: Pick<RxStore, 'dispatch'>, kind: DictionaryKind, rows: Pick<SheetRows, 'receivedIds'>, selection: GridSelection): boolean;
|
|
83
|
+
//# sourceMappingURL=dictionaryCommit.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AppContext } from '../appContext';
|
|
2
|
+
import { DictionaryKind } from '../../engine/modules/dictionary/actions';
|
|
3
|
+
import { RootState } from '../../engine/state';
|
|
4
|
+
import { I18n } from '../../i18n/translate';
|
|
5
|
+
/** What the tab's file input takes: a dictionary comes in one format, whichever layout its header names. */
|
|
6
|
+
export declare const DICTIONARY_FILE_ACCEPT = ".csv";
|
|
7
|
+
/** The file format the buttons, the menu and the empty sheet's hint name, which no language translates. */
|
|
8
|
+
export declare const DICTIONARY_FILE_FORMAT = "CSV";
|
|
9
|
+
/**
|
|
10
|
+
* Imports a file into the dictionary its header names in one dispatch, reports
|
|
11
|
+
* the counts and answers that dictionary; null for a read-only document or a
|
|
12
|
+
* file no layout reads, which sends nothing and says so.
|
|
13
|
+
*/
|
|
14
|
+
export declare function importDictionaryFile({ store, emitter }: Pick<AppContext, 'store' | 'emitter'>, file: Blob, i18n?: Pick<I18n, 'locale' | 'dir'>): Promise<DictionaryKind | null>;
|
|
15
|
+
/**
|
|
16
|
+
* A dictionary's listed rows in the editor's own CSV format, in the order its
|
|
17
|
+
* sheet shows them, whatever a search shows. A term names its domain by the
|
|
18
|
+
* domain's name, and nothing for one the document does not list.
|
|
19
|
+
*/
|
|
20
|
+
export declare function toDictionaryCsv(state: RootState, kind: DictionaryKind): string;
|
|
21
|
+
/** Saves a dictionary as its own CSV file, named after the database and the sheet. */
|
|
22
|
+
export declare function exportDictionarySheet(state: RootState, kind: DictionaryKind): void;
|
|
23
|
+
//# sourceMappingURL=dictionaryFile.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ValuesType } from '../../internal-types';
|
|
2
|
+
import { KeyBindingMap, KeyBindingName, ShortcutOption } from '../../utils/keyboard-shortcut';
|
|
3
|
+
/**
|
|
4
|
+
* The editor's chords a press in the Dictionary tab still hands on: the
|
|
5
|
+
* palette, undo and redo, which the tab runs on the sheet's own history, and
|
|
6
|
+
* find, whose chord works on every tab.
|
|
7
|
+
*/
|
|
8
|
+
export declare const DICTIONARY_PASSING_BINDINGS: ReadonlyArray<KeyBindingName>;
|
|
9
|
+
/** What a press does to a sheet's rows in the grid. */
|
|
10
|
+
export declare const RowCommand: {
|
|
11
|
+
readonly insertBelow: "insertBelow";
|
|
12
|
+
readonly insertAbove: "insertAbove";
|
|
13
|
+
readonly deleteRows: "deleteRows";
|
|
14
|
+
};
|
|
15
|
+
export type RowCommand = ValuesType<typeof RowCommand>;
|
|
16
|
+
/** The chord a menu row shows for a row command, if one is bound. */
|
|
17
|
+
export declare const rowChordOf: (keyBindingMap: KeyBindingMap, command: RowCommand) => string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Every chord the grid runs a row command by under the bindings given, Insert
|
|
20
|
+
* above's among them, which no binding names: what a host that keeps its own
|
|
21
|
+
* hotkeys off the editor's keys registers beside the binding map's.
|
|
22
|
+
*/
|
|
23
|
+
export declare const dictionaryRowChords: (keyBindingMap: KeyBindingMap) => ShortcutOption[];
|
|
24
|
+
export type DictionaryKeyContext = {
|
|
25
|
+
keyBindingMap: KeyBindingMap;
|
|
26
|
+
/** Undoes the last edit of the sheet shown, from its own history. */
|
|
27
|
+
undo: () => void;
|
|
28
|
+
redo: () => void;
|
|
29
|
+
/** Whether the press came from inside the tab's grid. */
|
|
30
|
+
inGrid: boolean;
|
|
31
|
+
/** Whether the grid holds an open edit, whose own undo takes the press and which keeps the palette and find. */
|
|
32
|
+
isEditing: () => boolean;
|
|
33
|
+
/** Inserts as many rows below the selection as it covers. */
|
|
34
|
+
insertRows: () => void;
|
|
35
|
+
/** Inserts as many rows above the selection as it covers. */
|
|
36
|
+
insertRowsAbove: () => void;
|
|
37
|
+
/** Deletes the rows the selection covers. */
|
|
38
|
+
deleteRows: () => void;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Reads a press at the tab's root: undo and redo undo the sheet shown unless an
|
|
42
|
+
* edit or a field takes them, the row chords insert and delete rows in a grid
|
|
43
|
+
* with no edit open, which keeps find and the palette, and the rest stops.
|
|
44
|
+
*/
|
|
45
|
+
export declare function handleDictionaryKeydown(event: KeyboardEvent, { keyBindingMap, undo: undoSheet, redo: redoSheet, inGrid, isEditing, insertRows, insertRowsAbove, deleteRows, }: DictionaryKeyContext): void;
|
|
46
|
+
/** Keeps a copy, a cut or a paste in the tab, which the editor root would read as a diagram's. */
|
|
47
|
+
export declare const keepClipboard: (event: ClipboardEvent) => void;
|
|
48
|
+
//# sourceMappingURL=dictionaryKeys.d.ts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { GridHandle, GridSelection } from '@dineug/grid';
|
|
2
|
+
import { AppContext } from '../appContext';
|
|
3
|
+
import { DictionarySheet } from './sheets';
|
|
4
|
+
/** The first cell a sheet showed, the one a grid mounted again scrolls back to. */
|
|
5
|
+
export type SheetScroll = {
|
|
6
|
+
row: number;
|
|
7
|
+
col: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* What the tab keeps of one sheet across its mounts. The selection and the
|
|
11
|
+
* scroll count rows of the sheet as its search shows them. Each is frozen and
|
|
12
|
+
* replaced whole, so a watcher hears one change and a grid is handed no proxy.
|
|
13
|
+
*/
|
|
14
|
+
export type DictionarySheetView = {
|
|
15
|
+
search: string;
|
|
16
|
+
selection: Readonly<GridSelection> | null;
|
|
17
|
+
scroll: Readonly<SheetScroll> | null;
|
|
18
|
+
/** The widths a resize left, by column id. */
|
|
19
|
+
widths: Readonly<Record<string, number>>;
|
|
20
|
+
};
|
|
21
|
+
export type DictionaryView = {
|
|
22
|
+
sheet: DictionarySheet;
|
|
23
|
+
sheets: Record<DictionarySheet, DictionarySheetView>;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The window's own place in the Dictionary tab: never in the store, the file
|
|
27
|
+
* or a change event, kept until the element goes, one per editor. The tab
|
|
28
|
+
* mounts again on every visit and reads it back.
|
|
29
|
+
*/
|
|
30
|
+
export declare function dictionaryViewOf({ store, }: Pick<AppContext, 'store'>): DictionaryView;
|
|
31
|
+
/**
|
|
32
|
+
* Writes a sheet's search. The rows it shows change with it, so the selection
|
|
33
|
+
* and the scroll it kept, which count those rows, are dropped.
|
|
34
|
+
*/
|
|
35
|
+
export declare function changeSearch(view: DictionaryView, sheet: DictionarySheet, search: string): void;
|
|
36
|
+
/** Keeps the selection a grid reported or was handed, as a frozen copy. */
|
|
37
|
+
export declare function rememberSelection(view: DictionaryView, sheet: DictionarySheet, selection: GridSelection): void;
|
|
38
|
+
/**
|
|
39
|
+
* A selection held inside the rows and columns a grid has, every index cut to
|
|
40
|
+
* the last one and a range kept start before end; a grid with no rows keeps
|
|
41
|
+
* its first cell, where a row added comes up active.
|
|
42
|
+
*/
|
|
43
|
+
export declare function clampSelection(selection: Readonly<GridSelection>, rowCount: number, colCount: number): GridSelection;
|
|
44
|
+
/** The first cell alone, what a sheet opens on before it has a selection of its own. */
|
|
45
|
+
export declare const FIRST_CELL_SELECTION: Readonly<GridSelection>;
|
|
46
|
+
/**
|
|
47
|
+
* The selection a grid mounted on the sheet is handed: the one it kept, held
|
|
48
|
+
* inside the rows it shows now, or the first cell. A fresh copy, since a grid
|
|
49
|
+
* holds what it is handed.
|
|
50
|
+
*/
|
|
51
|
+
export declare function storedSelection(view: DictionaryView, sheet: DictionarySheet, rowCount: number, colCount: number): GridSelection;
|
|
52
|
+
/** Keeps the first cell a grid showed, from its viewport report, when it moved. */
|
|
53
|
+
export declare function rememberScroll(view: DictionaryView, sheet: DictionarySheet, { rowStart, colStart }: {
|
|
54
|
+
rowStart: number;
|
|
55
|
+
colStart: number;
|
|
56
|
+
}): void;
|
|
57
|
+
/**
|
|
58
|
+
* Scrolls a grid back to the first cell its sheet showed. A grid scrolls the
|
|
59
|
+
* least distance that shows a cell, so it goes to the last cell first, and the
|
|
60
|
+
* way back up then stops with the kept cell first in view.
|
|
61
|
+
*/
|
|
62
|
+
export declare function restoreScroll(handle: Pick<GridHandle, 'scrollTo'>, view: DictionaryView, sheet: DictionarySheet, rowCount: number, colCount: number): void;
|
|
63
|
+
/** Keeps the width a resize left a column at, which the grid draws only while the host holds it. */
|
|
64
|
+
export declare function rememberWidth(view: DictionaryView, sheet: DictionarySheet, columnId: string, width: number): void;
|
|
65
|
+
//# sourceMappingURL=dictionaryView.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EditorContext } from '@dineug/grid';
|
|
2
|
+
import { FC } from '@dineug/r-html';
|
|
3
|
+
import { DomainOption } from '../../table-view/column/column-domain/domainOptions';
|
|
4
|
+
export type DomainCellEditorProps = {
|
|
5
|
+
editor: EditorContext;
|
|
6
|
+
/** The column's header, which names the search field. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** The id of the domain the cell's row links, '' for none, which the list opens on. */
|
|
9
|
+
linkedId: string;
|
|
10
|
+
/** Links the row to the domain picked, by its id, '' for None. */
|
|
11
|
+
onPick: (option: DomainOption) => void;
|
|
12
|
+
/** Runs once its edit has closed, after onPick for a pick. */
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A term's domain cell editor: a search over the domain sheet by name that only
|
|
17
|
+
* picks, as the ERD tab's domain cell does. The grid's edit writes no text: a
|
|
18
|
+
* pick cancels it and hands the tab the domain picked by its id, None as ''.
|
|
19
|
+
*/
|
|
20
|
+
declare const DomainCellEditor: FC<DomainCellEditorProps>;
|
|
21
|
+
export default DomainCellEditor;
|
|
22
|
+
//# sourceMappingURL=DomainCellEditor.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** The height of one domain in the list. */
|
|
2
|
+
export declare const OPTION_HEIGHT = 26;
|
|
3
|
+
export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
|
|
4
|
+
export declare const input: import('@dineug/r-html').CSSTemplateLiterals;
|
|
5
|
+
export declare const list: import('@dineug/r-html').CSSTemplateLiterals;
|
|
6
|
+
export declare const option: import('@dineug/r-html').CSSTemplateLiterals;
|
|
7
|
+
//# sourceMappingURL=DomainCellEditor.styles.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EditorContext } from '@dineug/grid';
|
|
2
|
+
import { DomainCellEditorProps } from './DomainCellEditor';
|
|
3
|
+
/**
|
|
4
|
+
* Opens the domain picker of a term's domain cell in the grid's editor slot,
|
|
5
|
+
* and takes it out again once its edit has closed, by a pick or a cancel,
|
|
6
|
+
* before onClose runs.
|
|
7
|
+
*/
|
|
8
|
+
export declare function openDomainCellEditor(editor: EditorContext, { label, linkedId, onPick, onClose }: Omit<DomainCellEditorProps, 'editor'>): void;
|
|
9
|
+
//# sourceMappingURL=openDomainCellEditor.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CellStyle, GridTheme } from '@dineug/grid';
|
|
2
|
+
import { DictionaryCheckLevel } from '../../engine/modules/dictionary/checks';
|
|
3
|
+
import { Theme } from '../../themes/tokens';
|
|
4
|
+
/**
|
|
5
|
+
* The theme the tab hands its grid. The grid redraws on a new object, so the
|
|
6
|
+
* one handed before comes back while every colour still matches, and only a
|
|
7
|
+
* theme change, light to dark or a new accent, makes another.
|
|
8
|
+
*/
|
|
9
|
+
export declare function toGridTheme(theme: Theme, previous?: Readonly<GridTheme>): Readonly<GridTheme>;
|
|
10
|
+
/** The style a sheet gives a cell the checks mark, by the loudest level they find. */
|
|
11
|
+
export type CellMarks = Readonly<Record<DictionaryCheckLevel, Readonly<CellStyle>>>;
|
|
12
|
+
/**
|
|
13
|
+
* Each level's text on its own fill, from the tab's four mark tokens: the
|
|
14
|
+
* error pair and the warning pair. The marks handed before come back while
|
|
15
|
+
* both pairs match, so the tab hands the grid a new style getter only then.
|
|
16
|
+
*/
|
|
17
|
+
export declare function toCellMarks(theme: Theme, previous?: CellMarks): CellMarks;
|
|
18
|
+
//# sourceMappingURL=gridTheme.d.ts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { GridColumn } from '@dineug/grid';
|
|
2
|
+
import { AnyAction } from '@dineug/r-html';
|
|
3
|
+
import { DictionaryFields, DictionaryKind } from '../../engine/modules/dictionary/actions';
|
|
4
|
+
import { DictionaryCheckLevel } from '../../engine/modules/dictionary/checks';
|
|
5
|
+
import { RootState } from '../../engine/state';
|
|
6
|
+
import { I18n, PlainMessageKey } from '../../i18n/translate';
|
|
7
|
+
import { ValuesType } from '../../internal-types';
|
|
8
|
+
/**
|
|
9
|
+
* The tab's sheets in the order its bar lists them: the domains, the words
|
|
10
|
+
* and the terms, as a standard is built up, then their checks.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DictionarySheet: {
|
|
13
|
+
readonly domain: "domain";
|
|
14
|
+
readonly word: "word";
|
|
15
|
+
readonly term: "term";
|
|
16
|
+
readonly check: "check";
|
|
17
|
+
};
|
|
18
|
+
export type DictionarySheet = ValuesType<typeof DictionarySheet>;
|
|
19
|
+
export declare const DictionarySheetList: ReadonlyArray<DictionarySheet>;
|
|
20
|
+
/** Whether the sheet lists a dictionary's own rows, which it edits, rather than the checks over them. */
|
|
21
|
+
export declare const isEntrySheet: (sheet: DictionarySheet) => sheet is DictionaryKind;
|
|
22
|
+
export declare const DictionarySheetLabelKey: Readonly<Record<DictionarySheet, PlainMessageKey>>;
|
|
23
|
+
/** A field of a dictionary's rows, which is the id of its column on the sheet. */
|
|
24
|
+
export type SheetField<K extends DictionaryKind = DictionaryKind> = (typeof DictionaryFields)[K][number];
|
|
25
|
+
export type SheetColumnOptions = {
|
|
26
|
+
/** A read-only document makes every column read-only. */
|
|
27
|
+
readonly: boolean;
|
|
28
|
+
/** The widths a resize left, by column id, in place of each column's own. */
|
|
29
|
+
widths?: Readonly<Record<string, number>>;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* A dictionary's columns, one per field in the order its rows hold them, each
|
|
33
|
+
* labelled in the reader's language. A term's domain column shows and takes
|
|
34
|
+
* the domain's name, which the commit reads back to the domain's id.
|
|
35
|
+
*/
|
|
36
|
+
export declare function sheetColumns(kind: DictionaryKind, { readonly, widths }: SheetColumnOptions, i18n?: Pick<I18n, 't'>): GridColumn[];
|
|
37
|
+
/** The field a column of the sheet writes, or undefined for an id the sheet has no column of. */
|
|
38
|
+
export declare function sheetField<K extends DictionaryKind>(kind: K, columnId: string): SheetField<K> | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* What a row's cell shows: the field as the row holds it, and for a term's
|
|
41
|
+
* domain the name of the domain it links while the document lists that one,
|
|
42
|
+
* else nothing; nothing too for an id with no row or a column the sheet lacks.
|
|
43
|
+
*/
|
|
44
|
+
export declare function sheetCellText(state: RootState, kind: DictionaryKind, id: string, columnId: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* How loud a row's cell shows what the checks find in it: an error, a warning,
|
|
47
|
+
* or null for nothing found, a column no check reads or an id with no row. It
|
|
48
|
+
* reads the dictionaries' indexes, so a draw marks only the cells it paints.
|
|
49
|
+
*/
|
|
50
|
+
export declare function sheetCellMark(state: RootState, kind: DictionaryKind, id: string, columnId: string): DictionaryCheckLevel | null;
|
|
51
|
+
/** A text as a search compares it, composed and in lower case, so a match ignores both. */
|
|
52
|
+
export declare const toSearchText: (text: string) => string;
|
|
53
|
+
/**
|
|
54
|
+
* The ids of a sheet's rows, its listed rows in key order, those whose
|
|
55
|
+
* searched fields hold the search's text while it holds any; with no search
|
|
56
|
+
* the same frozen array comes back until the sheet is written.
|
|
57
|
+
*/
|
|
58
|
+
export declare function sheetRowIds(state: RootState, kind: DictionaryKind, search?: string): ReadonlyArray<string>;
|
|
59
|
+
/**
|
|
60
|
+
* The sheets a batch raises: all four for a dictionary's write or a load,
|
|
61
|
+
* since a term shows its domain's name and the checks read every dictionary;
|
|
62
|
+
* the checks alone for a table's or a column's write or a name view switch.
|
|
63
|
+
*/
|
|
64
|
+
export declare function bumpedSheets(actions: ReadonlyArray<AnyAction>): ReadonlyArray<DictionarySheet>;
|
|
65
|
+
//# sourceMappingURL=sheets.d.ts.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { AppContext } from '../../appContext';
|
|
2
2
|
import { ElkLayoutPoint, ElkLayoutRequest } from '../../../services/elk-layout';
|
|
3
3
|
/**
|
|
4
|
-
* What a Flow placement of a document asks ELK, measured
|
|
5
|
-
* its own with the editor's text measure, so nothing
|
|
6
|
-
* store. Null under two tables or with no relationship, the grid's cases.
|
|
4
|
+
* What a Flow placement of a document asks ELK, measured in the reader's name
|
|
5
|
+
* view on a plain store of its own with the editor's text measure, so nothing
|
|
6
|
+
* reaches the editor's store. Null under two tables or with no relationship, the grid's cases.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* const request = createFlowRequest(app, json);
|
|
10
10
|
*/
|
|
11
|
-
export declare function createFlowRequest({ toWidth }: AppContext, json: string): ElkLayoutRequest | null;
|
|
11
|
+
export declare function createFlowRequest({ toWidth, store }: AppContext, json: string): ElkLayoutRequest | null;
|
|
12
12
|
/**
|
|
13
13
|
* Where each table of a document not loaded yet goes by Flow, measured from
|
|
14
14
|
* the corner of the block the tables make, so the caller decides where that
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @jsxHost konva */
|
|
2
|
+
export type DiffOutlineOptions = {
|
|
3
|
+
name: string;
|
|
4
|
+
stroke: string | null;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
cornerRadius: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* The outline a diff pane draws round a box standing at its group's origin,
|
|
11
|
+
* centred on the box's edge and taking no press; none while stroke is null.
|
|
12
|
+
*/
|
|
13
|
+
export declare const diffOutlineRect: ({ name, stroke, width, height, cornerRadius, }: DiffOutlineOptions) => import("@dineug/r-html/jsx-runtime").JSX.Element | null;
|
|
14
|
+
//# sourceMappingURL=DiffOutline.template.d.ts.map
|
|
@@ -4,4 +4,10 @@
|
|
|
4
4
|
* paints no underline of its own: the scene's rect keeps running under it.
|
|
5
5
|
*/
|
|
6
6
|
export declare const cell: import('@dineug/r-html').CSSTemplateLiterals;
|
|
7
|
+
/**
|
|
8
|
+
* A tinted header's text color, on the input alone: the term list a logical
|
|
9
|
+
* name opens under it paints the table's background, so its text and keys
|
|
10
|
+
* keep the theme's colors, which read there.
|
|
11
|
+
*/
|
|
12
|
+
export declare const tinted: import('@dineug/r-html').CSSTemplateLiterals;
|
|
7
13
|
//# sourceMappingURL=EditOverlay.styles.d.ts.map
|
|
@@ -11,6 +11,11 @@ export type HitFunc = (context: Context, shape: Shape) => void;
|
|
|
11
11
|
export declare const columnCellHit: Record<GeometrySource, HitFunc>;
|
|
12
12
|
/** One of those per source, built once, for the reason columnCellHit is. */
|
|
13
13
|
export declare const headerCellHit: Record<GeometrySource, HitFunc>;
|
|
14
|
+
/**
|
|
15
|
+
* The column drag handle's box: a row high, from a little left of its button
|
|
16
|
+
* to the table's edge, so a press beside the button still takes the handle.
|
|
17
|
+
*/
|
|
18
|
+
export declare const columnDragHandleHit: HitFunc;
|
|
14
19
|
/**
|
|
15
20
|
* The whole 24 unit box of a lucide icon, answered by the first shape it draws.
|
|
16
21
|
* A circle's origin is its centre, so its own position is what puts the box
|
|
@@ -55,10 +55,16 @@ export declare const HIGH_LEVEL_FONT_SIZES: readonly [20, 24, 28, 35, 60];
|
|
|
55
55
|
export declare const TABLE_INSET: number;
|
|
56
56
|
/** The radius Table.styles rounds a table box with. */
|
|
57
57
|
export declare const TABLE_CORNER_RADIUS = 6;
|
|
58
|
+
/** How much of the column drag handle shows while the pointer is off it. */
|
|
59
|
+
export declare const COLUMN_DRAG_HANDLE_REST_OPACITY = 0.5;
|
|
60
|
+
/** The corner the column drag handle's button is rounded by. */
|
|
61
|
+
export declare const COLUMN_DRAG_HANDLE_RADIUS = 4;
|
|
58
62
|
/** The 1.5px underline EditInput draws for a focused, edited or shared cell. */
|
|
59
63
|
export declare const FOCUS_BORDER_HEIGHT = 1.5;
|
|
60
64
|
/** What the ring outside a table box costs, as outline and box-shadow both do. */
|
|
61
65
|
export declare const RING_WIDTH = 1;
|
|
66
|
+
/** The outline a diff pane draws round an entity added, removed or only moved. */
|
|
67
|
+
export declare const DIFF_OUTLINE_WIDTH = 2;
|
|
62
68
|
/**
|
|
63
69
|
* The drop shadow a view card sits on, deeper than any a document box casts.
|
|
64
70
|
* The alpha is the shadow's own, since the minimap shadow token it borrows is
|
|
@@ -120,6 +126,8 @@ export declare const HIT_FILL = "transparent";
|
|
|
120
126
|
export declare function documentCardShadow(color: string | undefined): CardShadow | null;
|
|
121
127
|
/** The hand a clickable scene node asks for, as the dom scene spelt it in css. */
|
|
122
128
|
export declare const CURSOR_POINTER = "pointer";
|
|
129
|
+
/** The open hand the column drag handle asks for under the pointer. */
|
|
130
|
+
export declare const CURSOR_GRAB = "grab";
|
|
123
131
|
/** The beam a textarea carried on its own, which a drawn body has to ask for. */
|
|
124
132
|
export declare const CURSOR_TEXT = "text";
|
|
125
133
|
/** What a node hands back on the way out, leaving the container its own cursor. */
|
|
@@ -25,6 +25,12 @@ export type TableProps = {
|
|
|
25
25
|
* reads the group list once for every table; a table drawn alone reads its own.
|
|
26
26
|
*/
|
|
27
27
|
tableGroupId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the cells write what the dictionaries' checks find in their colours,
|
|
30
|
+
* on unless the scene says otherwise. Only the document scene outside a diff
|
|
31
|
+
* pane draws them, and an export turns them off.
|
|
32
|
+
*/
|
|
33
|
+
checkMarks?: boolean;
|
|
28
34
|
};
|
|
29
35
|
declare const Table: FC<TableProps>;
|
|
30
36
|
export default Table;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RootState } from '../../../../engine/state';
|
|
2
|
+
import { PlainMessageKey } from '../../../../i18n/translate';
|
|
3
|
+
/** What a logical name cell shows, dimmed, while its logical name is blank. */
|
|
4
|
+
export type BlankLogicalName = {
|
|
5
|
+
/** The name drawn in the logical name's place, '' while there is none to draw. */
|
|
6
|
+
standIn: string;
|
|
7
|
+
/** The placeholder shown while there is no stand-in. */
|
|
8
|
+
key: PlainMessageKey;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* The logical view sets the logical name cell in the name's place, so a blank
|
|
12
|
+
* one shows the name, or the name's own placeholder while that is blank too.
|
|
13
|
+
* The view of both shows the logical name's placeholder beside the name.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const { standIn, key } = blankLogicalName(settings, table.name, 'common.placeholder.table');
|
|
17
|
+
*/
|
|
18
|
+
export declare function blankLogicalName(settings: Pick<RootState['settings'], 'nameViewMode'>, name: string, nameKey: PlainMessageKey): BlankLogicalName;
|
|
19
|
+
//# sourceMappingURL=blankLogicalName.d.ts.map
|
|
@@ -4,8 +4,8 @@ import { Table } from '../../../../internal-types';
|
|
|
4
4
|
import { Theme } from '../../../../themes/tokens';
|
|
5
5
|
import { ColumnWidth } from '../../../../utils/calcTable';
|
|
6
6
|
import { GeometrySource } from '../../../../utils/draw-relationship/geometrySource';
|
|
7
|
-
/** The
|
|
8
|
-
export type ColumnCellWidths = Pick<ColumnWidth, 'comment' | 'dataType' | 'default' | 'name'>;
|
|
7
|
+
/** The six widths a column row measures from its table; the rest are fixed. */
|
|
8
|
+
export type ColumnCellWidths = Pick<ColumnWidth, 'comment' | 'dataType' | 'default' | 'domain' | 'logicalName' | 'name'>;
|
|
9
9
|
/** One editable box on a table, positioned inside the table's own group. */
|
|
10
10
|
export type CellSlot = {
|
|
11
11
|
focusType: FocusType;
|
|
@@ -93,13 +93,13 @@ export declare function getWidthComment(state: RootState, table: Table): number;
|
|
|
93
93
|
/**
|
|
94
94
|
* The name and comment boxes past a header's table icon. One list feeds the
|
|
95
95
|
* scene that draws them and the overlay that edits them, so an editor never
|
|
96
|
-
* sits anywhere but on the text it replaces. A view draws the
|
|
96
|
+
* sits anywhere but on the text it replaces. A view draws the names alone.
|
|
97
97
|
*/
|
|
98
98
|
export declare function getHeaderCellSlots(state: RootState, table: Table, source?: GeometrySource): CellSlot[];
|
|
99
99
|
/**
|
|
100
100
|
* The cells of one column row, in the order the settings put them and at the x
|
|
101
101
|
* each lands on once the ones before it have taken their width. A view lays
|
|
102
|
-
* out the name
|
|
102
|
+
* out the cells its name view names and reads neither the show bits nor the order.
|
|
103
103
|
*/
|
|
104
104
|
export declare function getColumnCellSlots(state: RootState, widths: ColumnCellWidths, source?: GeometrySource): ColumnCellSlot[];
|
|
105
105
|
//# sourceMappingURL=cellLayout.d.ts.map
|