@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Global, not scoped. The ::-webkit-scrollbar* pseudo elements have no element of their own to
|
|
3
|
-
* hang a component class on, and .scrollbar is a hook class
|
|
3
|
+
* hang a component class on, and .scrollbar is a hook class the scrolling panels opt into by
|
|
4
4
|
* literal name (class=${['scrollbar', ...]}) — scoping it would rename it out from under them.
|
|
5
5
|
*/
|
|
6
6
|
export declare const scrollbarStyle: import('@dineug/r-html').CSSTemplateLiterals;
|
package/dist/themes/tokens.d.ts
CHANGED
|
@@ -40,6 +40,10 @@ export type Theme = {
|
|
|
40
40
|
columnSelect: string;
|
|
41
41
|
columnSelectHover: string;
|
|
42
42
|
columnHover: string;
|
|
43
|
+
columnHandleBackground: string;
|
|
44
|
+
columnHandleBorder: string;
|
|
45
|
+
columnHandleHoverBackground: string;
|
|
46
|
+
columnHandleHoverBorder: string;
|
|
43
47
|
relationshipHover: string;
|
|
44
48
|
visualizationLink: string;
|
|
45
49
|
visualizationColumn: string;
|
|
@@ -74,12 +78,25 @@ export type Theme = {
|
|
|
74
78
|
keyPK: string;
|
|
75
79
|
keyFK: string;
|
|
76
80
|
keyPFK: string;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
treeBackground: string;
|
|
82
|
+
treeRowHover: string;
|
|
83
|
+
treeRowCurrent: string;
|
|
84
|
+
treeMuted: string;
|
|
85
|
+
treeMatch: string;
|
|
86
|
+
explorerBackground: string;
|
|
87
|
+
explorerBorder: string;
|
|
88
|
+
dictionaryErrorForeground: string;
|
|
89
|
+
dictionaryErrorBackground: string;
|
|
90
|
+
dictionaryWarningForeground: string;
|
|
91
|
+
dictionaryWarningBackground: string;
|
|
92
|
+
dictionaryBackground: string;
|
|
93
|
+
dictionaryHeaderBackground: string;
|
|
94
|
+
dictionaryGridLine: string;
|
|
95
|
+
dictionaryHeaderSelect: string;
|
|
80
96
|
diffInsertForeground: string;
|
|
81
97
|
diffDeleteForeground: string;
|
|
82
|
-
|
|
98
|
+
diffModifyForeground: string;
|
|
99
|
+
diffRenameForeground: string;
|
|
83
100
|
};
|
|
84
101
|
export declare const ThemeTokens: ReadonlyArray<keyof Theme>;
|
|
85
102
|
/** The custom property one token is published under on :host. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EngineContext } from '../engine/context';
|
|
2
|
+
import { FocusType } from '../engine/modules/editor/state';
|
|
2
3
|
import { RootState } from '../engine/state';
|
|
3
4
|
import { Table } from '../internal-types';
|
|
4
5
|
import { GeometrySource } from './draw-relationship/geometrySource';
|
|
@@ -24,23 +25,38 @@ export declare function invalidateTableWidths(): void;
|
|
|
24
25
|
* none, so only a table that shows one widens.
|
|
25
26
|
*/
|
|
26
27
|
export declare function calcAlternateKeyWidth(table: Table, state: RootState): number;
|
|
28
|
+
/**
|
|
29
|
+
* The width a document header gives the cell of a focus type: the comment at
|
|
30
|
+
* its clamp, and the logical name at its own width in the view of both names
|
|
31
|
+
* or, in the logical view, at the name's while it holds none, which that view draws.
|
|
32
|
+
*/
|
|
33
|
+
export declare function headerCellWidth(state: RootState, table: Table, focusType: FocusType): number;
|
|
27
34
|
export declare function calcTableWidths(table: Table, state: RootState): ColumnWidth;
|
|
35
|
+
/**
|
|
36
|
+
* The width of each cell a document row lays out in the view the settings
|
|
37
|
+
* show, at the widest row, 0 for a cell it leaves out. The name and the type
|
|
38
|
+
* are the cells in their places, which the logical view fills its own way.
|
|
39
|
+
*/
|
|
28
40
|
export type ColumnWidth = {
|
|
29
41
|
width: number;
|
|
30
42
|
/** The alternate key marks' room after a row's last cell, 0 while none is drawn. */
|
|
31
43
|
alternateKey: number;
|
|
32
44
|
name: number;
|
|
45
|
+
/** The logical name's own cell, which the view of both names alone lays out. */
|
|
46
|
+
logicalName: number;
|
|
33
47
|
comment: number;
|
|
34
48
|
dataType: number;
|
|
49
|
+
/** The domain's own cell, laid out while its show bit is set. */
|
|
50
|
+
domain: number;
|
|
35
51
|
default: number;
|
|
36
52
|
notNull: number;
|
|
37
53
|
autoIncrement: number;
|
|
38
54
|
unique: number;
|
|
39
55
|
};
|
|
40
56
|
/**
|
|
41
|
-
* The width a view draws a table at: the header
|
|
42
|
-
* the widest name
|
|
43
|
-
* are the caller's to name, and the show bits
|
|
57
|
+
* The width a view draws a table at: the header names, or the key badge with
|
|
58
|
+
* the widest of each cell its name view lays out among the rows given, whichever is wider.
|
|
59
|
+
* The rows are the caller's to name, and no view reads the show bits or the column order.
|
|
44
60
|
*/
|
|
45
61
|
export declare function calcViewTableWidths(table: Table, state: RootState, columnIds: string[]): ColumnWidth;
|
|
46
62
|
/**
|
|
@@ -59,7 +75,7 @@ export declare function tableHeaderHeight(source?: GeometrySource): number;
|
|
|
59
75
|
export declare function tableRowHeight(source?: GeometrySource): number;
|
|
60
76
|
/** The box height for the rows given, every row of the table unless a view shows fewer. */
|
|
61
77
|
export declare function calcTableHeight(table: Table, rowCount?: number, source?: GeometrySource): number;
|
|
62
|
-
export declare function recalculateTableWidth(
|
|
78
|
+
export declare function recalculateTableWidth(state: RootState, { toWidth }: EngineContext): void;
|
|
63
79
|
/**
|
|
64
80
|
* The box a table takes on the ERD canvas once toWidth has measured its text,
|
|
65
81
|
* the size recalculateTableWidth would leave it at. It works on copies, so it
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads CSV text as RFC 4180 writes it: a quoted field holds commas, line
|
|
3
|
+
* breaks and doubled quotes. A record ends at CRLF, LF or CR, a blank line is
|
|
4
|
+
* no record, and a stray quote stays as text, so no input throws.
|
|
5
|
+
*/
|
|
6
|
+
export declare function parseCsv(text: string): string[][];
|
|
7
|
+
/**
|
|
8
|
+
* Writes records as CSV text a spreadsheet opens as UTF-8: a byte order mark
|
|
9
|
+
* first and CRLF after every record. Only a field holding a quote, a comma or
|
|
10
|
+
* a line break is quoted, its quotes doubled.
|
|
11
|
+
*/
|
|
12
|
+
export declare function serializeCsv(records: ReadonlyArray<ReadonlyArray<string>>): string;
|
|
13
|
+
//# sourceMappingURL=csv.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads a file's bytes as UTF-8 with its byte order mark dropped, or as EUC-KR
|
|
3
|
+
* when they are no valid UTF-8, as an older public-standard file is. Bytes
|
|
4
|
+
* neither reads come out as replacement characters, which no header matches.
|
|
5
|
+
*/
|
|
6
|
+
export declare function decodeCsvBytes(bytes: ArrayBuffer | Uint8Array): string;
|
|
7
|
+
//# sourceMappingURL=decode.d.ts.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { DictionaryKind } from '../../engine/modules/dictionary/actions';
|
|
2
|
+
import { Domain, Term, ValuesType, Word } from '../../internal-types';
|
|
3
|
+
/** The two layouts a dictionary file comes in: the editor's own and the public standard's. */
|
|
4
|
+
export declare const DictionaryCsvFormat: {
|
|
5
|
+
readonly own: "own";
|
|
6
|
+
readonly publicStandard: "publicStandard";
|
|
7
|
+
};
|
|
8
|
+
export type DictionaryCsvFormat = ValuesType<typeof DictionaryCsvFormat>;
|
|
9
|
+
/** What a file's row of each dictionary holds; a term names its domain by the domain's name. */
|
|
10
|
+
export type DictionaryCsvValues = {
|
|
11
|
+
[DictionaryKind.word]: Omit<Word, 'id' | 'order'>;
|
|
12
|
+
[DictionaryKind.term]: Omit<Term, 'id' | 'domainId' | 'order'> & {
|
|
13
|
+
domain: string;
|
|
14
|
+
};
|
|
15
|
+
[DictionaryKind.domain]: Omit<Domain, 'id' | 'order'>;
|
|
16
|
+
};
|
|
17
|
+
export type DictionaryCsvField<K extends DictionaryKind> = Extract<keyof DictionaryCsvValues[K], string>;
|
|
18
|
+
/**
|
|
19
|
+
* The columns of the editor's own format, in the order an export writes them,
|
|
20
|
+
* each headed by its field's name. No id rides, since every document mints its
|
|
21
|
+
* own, so a file carries into another document whole.
|
|
22
|
+
*/
|
|
23
|
+
export declare const DictionaryCsvColumns: {
|
|
24
|
+
readonly [K in DictionaryKind]: ReadonlyArray<DictionaryCsvField<K>>;
|
|
25
|
+
};
|
|
26
|
+
/** A row a file brings: its name, and each other field the file has a column for. */
|
|
27
|
+
export type DictionaryCsvRow<K extends DictionaryKind> = {
|
|
28
|
+
name: string;
|
|
29
|
+
} & Partial<DictionaryCsvValues[K]>;
|
|
30
|
+
/** A dictionary file as read: its kind and format, told by its header, and its rows in file order. */
|
|
31
|
+
export type DictionaryCsvRead = {
|
|
32
|
+
[K in DictionaryKind]: {
|
|
33
|
+
kind: K;
|
|
34
|
+
format: DictionaryCsvFormat;
|
|
35
|
+
/** The fields the file has columns for, the name first, in the own format's order. */
|
|
36
|
+
fields: Array<DictionaryCsvField<K>>;
|
|
37
|
+
/** Every row with a name, each holding exactly the fields above. */
|
|
38
|
+
rows: Array<DictionaryCsvRow<K>>;
|
|
39
|
+
/** The rows left out for an empty name; a record of empty cells is no row at all. */
|
|
40
|
+
skipped: number;
|
|
41
|
+
};
|
|
42
|
+
}[DictionaryKind];
|
|
43
|
+
/**
|
|
44
|
+
* Reads a dictionary file's text by the one layout its header names, else null.
|
|
45
|
+
* The own format's cells stay as written, so an export reads back to its rows;
|
|
46
|
+
* the public standard's are trimmed, and a domain's type columns join in one.
|
|
47
|
+
*/
|
|
48
|
+
export declare function readDictionaryCsv(text: string): DictionaryCsvRead | null;
|
|
49
|
+
/**
|
|
50
|
+
* Writes one dictionary's rows in the editor's own format: the field names as
|
|
51
|
+
* the header over one record per row, in the order given. A term's row names
|
|
52
|
+
* its domain, which the caller looks up by the term's domain id.
|
|
53
|
+
*/
|
|
54
|
+
export declare function writeDictionaryCsv<K extends DictionaryKind>(kind: K, rows: ReadonlyArray<DictionaryCsvValues[K]>): string;
|
|
55
|
+
//# sourceMappingURL=dictionaryCsv.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Column, Index, Memo, Relationship, Table, TableGroup } from '../../internal-types';
|
|
3
|
+
import { Pairing } from './pairEntities';
|
|
4
|
+
import { DiffChange } from './types';
|
|
5
|
+
/** Both documents and what pairs across them, which every comparison reads. */
|
|
6
|
+
export type DiffContext = {
|
|
7
|
+
prev: RootState;
|
|
8
|
+
next: RootState;
|
|
9
|
+
tables: Pairing;
|
|
10
|
+
columns: Pairing;
|
|
11
|
+
tableGroups: Pairing;
|
|
12
|
+
};
|
|
13
|
+
/** Name, comment, the group it is in, where it stands and its colour; never its z-index or the widths its text gives it. */
|
|
14
|
+
export declare function compareTables(ctx: DiffContext, prev: Table, next: Table): DiffChange[];
|
|
15
|
+
/**
|
|
16
|
+
* Name, comment, type, default and the four options, and its place among the
|
|
17
|
+
* columns once it moved, given as where it stood and stands, counted from one.
|
|
18
|
+
*/
|
|
19
|
+
export declare function compareColumns(prev: Column, next: Column, moved: {
|
|
20
|
+
before: number;
|
|
21
|
+
after: number;
|
|
22
|
+
} | null): DiffChange[];
|
|
23
|
+
/** The columns of an index in key order, each as the current column it pairs with and its direction. */
|
|
24
|
+
export declare function indexKeyOf(ctx: DiffContext, index: Index, side: 'prev' | 'next'): string;
|
|
25
|
+
/** Name, UNIQUE, and the columns in their order and direction, each column by the one it pairs with. */
|
|
26
|
+
export declare function compareIndexes(ctx: DiffContext, prev: Index, next: Index): DiffChange[];
|
|
27
|
+
/** A foreign key as it reads: its columns, the parent and the parent's columns. */
|
|
28
|
+
export declare function foreignKeyText(state: RootState, relationship: Relationship): string;
|
|
29
|
+
/** The column pairs of a foreign key, child to parent, as the current columns they pair with. */
|
|
30
|
+
export declare function foreignKeyPairsOf(ctx: DiffContext, relationship: Relationship, side: 'prev' | 'next'): string;
|
|
31
|
+
/** Its column pairs, its kind and what ON DELETE and ON UPDATE do; never where its ends are anchored. */
|
|
32
|
+
export declare function compareForeignKeys(ctx: DiffContext, prev: Relationship, next: Relationship): DiffChange[];
|
|
33
|
+
/** What it says, where it stands, its size and its colour; never its z-index. */
|
|
34
|
+
export declare function compareMemos(prev: Memo, next: Memo): DiffChange[];
|
|
35
|
+
/** The tables a group holds, each as the current table it pairs with. */
|
|
36
|
+
export declare function groupMembersOf(ctx: DiffContext, group: TableGroup, side: 'prev' | 'next'): string[];
|
|
37
|
+
/** Name, the tables it holds, its colour and the box it keeps; never its z-index. */
|
|
38
|
+
export declare function compareTableGroups(ctx: DiffContext, prev: TableGroup, next: TableGroup): DiffChange[];
|
|
39
|
+
//# sourceMappingURL=compareEntities.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { DocumentDiff } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* What changed from a saved document to the current one: the entries the diff
|
|
5
|
+
* tree lists and the marks each pane draws, which say the same thing. An entity
|
|
6
|
+
* pairs by id, then one to one by a name it keeps (src/components/erd/AGENTS.md).
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const { entries, prev, next } = diffDocuments(savedStore.state, store.state);
|
|
10
|
+
*/
|
|
11
|
+
export declare function diffDocuments(prev: RootState, next: RootState): DocumentDiff;
|
|
12
|
+
//# sourceMappingURL=diffDocuments.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Which entity of the saved document stands for which of the current one, both ways. */
|
|
2
|
+
export type Pairing = {
|
|
3
|
+
/** A saved id to the current id it pairs with. */
|
|
4
|
+
toNext: Map<string, string>;
|
|
5
|
+
/** A current id to the saved id it pairs with. */
|
|
6
|
+
toPrev: Map<string, string>;
|
|
7
|
+
};
|
|
8
|
+
export declare const emptyPairing: () => Pairing;
|
|
9
|
+
/** An id as the current one it stands for: a saved id as the one it pairs with, or one no current id can equal. */
|
|
10
|
+
export declare function asNextId(pairing: Pairing, id: string, side: 'prev' | 'next'): string;
|
|
11
|
+
/**
|
|
12
|
+
* A key two entities pair on, read on either side: a saved entity spells the
|
|
13
|
+
* ids it refers to as the current ones they pair with, so equal keys mean the
|
|
14
|
+
* same thing. Null for an entity the key cannot pair, an unnamed one say.
|
|
15
|
+
*/
|
|
16
|
+
export type PairKey<T> = (item: T, side: 'prev' | 'next') => string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Pairs two lists one to one: by id first, then by each key in turn, the
|
|
19
|
+
* saved entities taken in document order each pairing with the first current
|
|
20
|
+
* one left that has its key, so a rerun pairs the same way.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* pairEntities(prevTables, nextTables, [table => table.name.trim() ? table.name : null]);
|
|
24
|
+
*/
|
|
25
|
+
export declare function pairEntities<T extends {
|
|
26
|
+
id: string;
|
|
27
|
+
}>(prev: ReadonlyArray<T>, next: ReadonlyArray<T>, keys?: ReadonlyArray<PairKey<T>>): Pairing;
|
|
28
|
+
/**
|
|
29
|
+
* Pairs what is left by the most members two entities share, for those a key
|
|
30
|
+
* cannot name, such as table groups with no name: the saved ones in document
|
|
31
|
+
* order, each taking the current one it shares the most with, ties the first.
|
|
32
|
+
*/
|
|
33
|
+
export declare function pairByOverlap<T extends {
|
|
34
|
+
id: string;
|
|
35
|
+
}>(pairing: Pairing, prev: ReadonlyArray<T>, next: ReadonlyArray<T>, membersOf: (item: T, side: 'prev' | 'next') => ReadonlyArray<string>): void;
|
|
36
|
+
/**
|
|
37
|
+
* The positions of the longest run two sequences share in order, as the
|
|
38
|
+
* indexes of the second one, so an entry outside it is one that moved.
|
|
39
|
+
*/
|
|
40
|
+
export declare function longestCommonIndexes(a: ReadonlyArray<string>, b: ReadonlyArray<string>): Set<number>;
|
|
41
|
+
//# sourceMappingURL=pairEntities.d.ts.map
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { DiffMap } from '../../components/erd/diff-viewer/diff';
|
|
2
|
+
import { ValuesType } from '../../internal-types';
|
|
3
|
+
export declare const DiffKind: {
|
|
4
|
+
readonly table: "table";
|
|
5
|
+
readonly column: "column";
|
|
6
|
+
readonly index: "index";
|
|
7
|
+
readonly foreignKey: "foreignKey";
|
|
8
|
+
readonly memo: "memo";
|
|
9
|
+
readonly tableGroup: "tableGroup";
|
|
10
|
+
};
|
|
11
|
+
export type DiffKind = ValuesType<typeof DiffKind>;
|
|
12
|
+
export declare const DiffStatus: {
|
|
13
|
+
readonly added: "added";
|
|
14
|
+
readonly modified: "modified";
|
|
15
|
+
readonly deleted: "deleted";
|
|
16
|
+
readonly renamed: "renamed";
|
|
17
|
+
};
|
|
18
|
+
export type DiffStatus = ValuesType<typeof DiffStatus>;
|
|
19
|
+
/** What of an entity changed, each the name of a tooltip line. */
|
|
20
|
+
export declare const DiffField: {
|
|
21
|
+
readonly name: "name";
|
|
22
|
+
readonly comment: "comment";
|
|
23
|
+
readonly dataType: "dataType";
|
|
24
|
+
readonly default: "default";
|
|
25
|
+
readonly autoIncrement: "autoIncrement";
|
|
26
|
+
readonly primaryKey: "primaryKey";
|
|
27
|
+
readonly unique: "unique";
|
|
28
|
+
readonly notNull: "notNull";
|
|
29
|
+
readonly order: "order";
|
|
30
|
+
readonly tableGroup: "tableGroup";
|
|
31
|
+
readonly position: "position";
|
|
32
|
+
readonly size: "size";
|
|
33
|
+
readonly color: "color";
|
|
34
|
+
readonly members: "members";
|
|
35
|
+
readonly columns: "columns";
|
|
36
|
+
readonly relationshipType: "relationshipType";
|
|
37
|
+
readonly onDelete: "onDelete";
|
|
38
|
+
readonly onUpdate: "onUpdate";
|
|
39
|
+
readonly value: "value";
|
|
40
|
+
};
|
|
41
|
+
export type DiffField = ValuesType<typeof DiffField>;
|
|
42
|
+
/** A value as the saved or the current document holds it, before any wording. */
|
|
43
|
+
export type DiffValue = string | number | boolean;
|
|
44
|
+
export type DiffChange = {
|
|
45
|
+
field: DiffField;
|
|
46
|
+
before: DiffValue;
|
|
47
|
+
after: DiffValue;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* One entity the two documents differ on, or that holds one that does. Its
|
|
51
|
+
* status is null for a table listed only for what changed inside it.
|
|
52
|
+
*/
|
|
53
|
+
export type DiffEntry = {
|
|
54
|
+
kind: DiffKind;
|
|
55
|
+
status: DiffStatus | null;
|
|
56
|
+
prevId: string | null;
|
|
57
|
+
nextId: string | null;
|
|
58
|
+
/** What the current document calls it, or the saved one where it is gone. */
|
|
59
|
+
name: string;
|
|
60
|
+
/** What the saved document calls it, the same as name unless renamed or added. */
|
|
61
|
+
prevName: string;
|
|
62
|
+
/** A table's or column's logical name, as name is taken, which a label shows and no change counts; '' for any other. */
|
|
63
|
+
logicalName: string;
|
|
64
|
+
/** The saved document's logical name, as prevName is taken. */
|
|
65
|
+
prevLogicalName: string;
|
|
66
|
+
changes: DiffChange[];
|
|
67
|
+
/** A table's columns, indexes and foreign keys, in that order. */
|
|
68
|
+
children: DiffEntry[];
|
|
69
|
+
};
|
|
70
|
+
export type DiffEntries = {
|
|
71
|
+
tables: DiffEntry[];
|
|
72
|
+
tableGroups: DiffEntry[];
|
|
73
|
+
memos: DiffEntry[];
|
|
74
|
+
};
|
|
75
|
+
/** The entries for the tree and what each pane marks, which say the same thing. */
|
|
76
|
+
export type DocumentDiff = {
|
|
77
|
+
entries: DiffEntries;
|
|
78
|
+
prev: DiffMap;
|
|
79
|
+
next: DiffMap;
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=types.d.ts.map
|
package/dist/utils/emitter.d.ts
CHANGED
|
@@ -4,12 +4,6 @@ import { LocaleOption } from '../i18n/locales';
|
|
|
4
4
|
import { ValuesType } from '../internal-types';
|
|
5
5
|
import { ThemeOptions } from '../themes/radix-ui-theme';
|
|
6
6
|
import { GeometrySource } from './draw-relationship/geometrySource';
|
|
7
|
-
import { FindField } from './find-replace/findMatches';
|
|
8
|
-
/** A search the palette hands Find and Replace: the query, and the kinds of text it searches in. */
|
|
9
|
-
export type FindReplaceQuery = {
|
|
10
|
-
query: string;
|
|
11
|
-
fields: FindField[];
|
|
12
|
-
};
|
|
13
7
|
/**
|
|
14
8
|
* What Map Columns opens on: a relationship drawn between two tables and not
|
|
15
9
|
* made yet, or one the document holds whose columns it changes.
|
|
@@ -71,7 +65,7 @@ type InternalActionMap = {
|
|
|
71
65
|
event: ClipboardEvent;
|
|
72
66
|
};
|
|
73
67
|
[InternalActionType.toggleSearch]: void;
|
|
74
|
-
[InternalActionType.openFindReplace]:
|
|
68
|
+
[InternalActionType.openFindReplace]: void;
|
|
75
69
|
[InternalActionType.openExportImage]: void;
|
|
76
70
|
[InternalActionType.openMapColumns]: MapColumnsOpening;
|
|
77
71
|
[InternalActionType.openThemeBuilder]: void;
|
|
@@ -178,7 +172,7 @@ export declare const toggleSearchAction: {
|
|
|
178
172
|
type: string;
|
|
179
173
|
};
|
|
180
174
|
export declare const openFindReplaceAction: {
|
|
181
|
-
(payload: void
|
|
175
|
+
(payload: void): AnyAction<void>;
|
|
182
176
|
toString(): string;
|
|
183
177
|
type: string;
|
|
184
178
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DictionaryKind } from '../../engine/modules/dictionary/actions';
|
|
1
2
|
import { DocumentPngOptions, DocumentSvgOptions } from '../../services/export-png';
|
|
2
3
|
type ExportOptions = {
|
|
3
4
|
fileName: string;
|
|
@@ -6,6 +7,15 @@ type ExportFileCallback = (blob: Blob, options: ExportOptions) => void;
|
|
|
6
7
|
export declare function setExportFileCallback(callback: ExportFileCallback | null): void;
|
|
7
8
|
export declare function exportJSON(json: string, name?: string): void;
|
|
8
9
|
export declare function exportSchemaSQL(sql: string, name?: string): void;
|
|
10
|
+
/**
|
|
11
|
+
* One dictionary's sheet as a CSV file, named as the other exports are with
|
|
12
|
+
* the sheet after the time. The text is written as given, so the byte order
|
|
13
|
+
* mark and the CRLF line ends the dictionary codec writes reach the file.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* exportCSV(writeDictionaryCsv('word', words), 'word', databaseName);
|
|
17
|
+
*/
|
|
18
|
+
export declare function exportCSV(csv: string, sheet: DictionaryKind, name?: string): void;
|
|
9
19
|
/** The Code Generator's text, named as the other exports are, with its language's extension. */
|
|
10
20
|
export declare function exportCode(code: string, extension: string, name?: string): void;
|
|
11
21
|
/**
|
|
@@ -8,20 +8,23 @@ export declare const FindField: {
|
|
|
8
8
|
readonly columnName: "columnName";
|
|
9
9
|
readonly columnComment: "columnComment";
|
|
10
10
|
readonly memo: "memo";
|
|
11
|
+
readonly indexName: "indexName";
|
|
12
|
+
readonly tableGroupName: "tableGroupName";
|
|
13
|
+
readonly logicalName: "logicalName";
|
|
11
14
|
};
|
|
12
15
|
export type FindField = ValuesType<typeof FindField>;
|
|
13
16
|
export declare const FindFieldList: ReadonlyArray<FindField>;
|
|
14
17
|
/**
|
|
15
|
-
* The kinds of text Find and Replace first opens on, the names of
|
|
16
|
-
* columns
|
|
17
|
-
*
|
|
18
|
+
* The kinds of text Find and Replace first opens on, the names alone of
|
|
19
|
+
* tables, columns, indexes and table groups and the logical names (owner
|
|
20
|
+
* decisions): a comment or memo is prose a rename should not reach unasked.
|
|
18
21
|
*/
|
|
19
22
|
export declare const DEFAULT_FIND_FIELDS: ReadonlyArray<FindField>;
|
|
20
23
|
export type FindMatch = {
|
|
21
24
|
field: FindField;
|
|
22
|
-
/** The entity holding the text: a table, a column or a memo. */
|
|
25
|
+
/** The entity holding the text: a table, a column, an index, a table group or a memo. */
|
|
23
26
|
id: string;
|
|
24
|
-
/** The table of a table or
|
|
27
|
+
/** The table of a table, column or index field; empty for a memo or a table group. */
|
|
25
28
|
tableId: string;
|
|
26
29
|
/** Where the field stands in the walk, so a match keeps its place when its text changes. */
|
|
27
30
|
slot: number;
|
|
@@ -30,6 +33,11 @@ export type FindMatch = {
|
|
|
30
33
|
end: number;
|
|
31
34
|
};
|
|
32
35
|
type Field = Omit<FindMatch, 'start' | 'end'>;
|
|
36
|
+
/**
|
|
37
|
+
* Whether a logical name field is a table's, which bears its table's id as
|
|
38
|
+
* its own, rather than a column's: the one field kind both of them hold.
|
|
39
|
+
*/
|
|
40
|
+
export declare const isTableLogicalName: ({ field, id, tableId, }: Pick<FindMatch, "field" | "id" | "tableId">) => boolean;
|
|
33
41
|
/**
|
|
34
42
|
* What changes a text the search reads, or which fields it walks: the actions
|
|
35
43
|
* a search on screen runs again on. A hover, a selection or a scroll changes
|
|
@@ -37,19 +45,30 @@ type Field = Omit<FindMatch, 'start' | 'end'>;
|
|
|
37
45
|
*/
|
|
38
46
|
export declare const FindTextActionTypes: ReadonlyArray<ActionType>;
|
|
39
47
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
48
|
+
* The order a walk takes the tables and the table groups in. A search on the
|
|
49
|
+
* tree reads them by name; a run of Replace presses keeps the order it began
|
|
50
|
+
* with, so a rename that moves a table in the name order is not met again.
|
|
51
|
+
*/
|
|
52
|
+
export type FieldOrder = {
|
|
53
|
+
tableIds: ReadonlyArray<string>;
|
|
54
|
+
tableGroupIds: ReadonlyArray<string>;
|
|
55
|
+
};
|
|
56
|
+
/** The tables and the table groups by name, as the tree lists them, ties in document order. */
|
|
57
|
+
export declare function treeOrderOf({ doc, collections }: RootState): FieldOrder;
|
|
58
|
+
/**
|
|
59
|
+
* Every text field the fields given cover: each table's logical name, name
|
|
60
|
+
* and comment, its columns' alike and its index names, then the table groups'
|
|
61
|
+
* names and the memos, in document order or in the order given.
|
|
43
62
|
*/
|
|
44
|
-
export declare function walkFields(state: RootState, fields: ReadonlyArray<FindField
|
|
63
|
+
export declare function walkFields(state: RootState, fields: ReadonlyArray<FindField>, order?: FieldOrder): Field[];
|
|
45
64
|
/**
|
|
46
65
|
* Every occurrence the matcher finds in the fields given, one entry each, in
|
|
47
|
-
* document order.
|
|
66
|
+
* document order or in the order given.
|
|
48
67
|
*
|
|
49
68
|
* @example
|
|
50
69
|
* findMatches(store.state, matcher, [FindField.columnName]);
|
|
51
70
|
*/
|
|
52
|
-
export declare function findMatches(state: RootState, matcher: Matcher, fields?: ReadonlyArray<FindField
|
|
71
|
+
export declare function findMatches(state: RootState, matcher: Matcher, fields?: ReadonlyArray<FindField>, order?: FieldOrder): FindMatch[];
|
|
53
72
|
/**
|
|
54
73
|
* The matches as they will stand once the field a match was found in holds a
|
|
55
74
|
* new value, before the store has it: that field searched again in the value,
|
|
@@ -76,7 +95,7 @@ export type ReplaceRun = Pick<FindMatch, 'field' | 'id' | 'slot' | 'start'> & {
|
|
|
76
95
|
* table added or removed before it moves that, or null once the field is gone
|
|
77
96
|
* or holds a text the run did not leave, after an undo or a peer's edit say.
|
|
78
97
|
*/
|
|
79
|
-
export declare function resumeRun(state: RootState, fields: ReadonlyArray<FindField>, run: ReplaceRun | null): ReplaceRun | null;
|
|
98
|
+
export declare function resumeRun(state: RootState, fields: ReadonlyArray<FindField>, run: ReplaceRun | null, order?: FieldOrder): ReplaceRun | null;
|
|
80
99
|
/**
|
|
81
100
|
* Where a Replace goes on to once it has written value in place of a match:
|
|
82
101
|
* the first match past what it wrote, wrapping to the first, or minus one once
|
|
@@ -4,10 +4,11 @@ import { FindField, FindMatch } from './findMatches';
|
|
|
4
4
|
/** The kind of text a match was found in, as its result row names it. */
|
|
5
5
|
export declare const FindFieldLabel: Record<FindField, PlainMessageKey>;
|
|
6
6
|
/**
|
|
7
|
-
* Where a match sits, as a reader finds it on the canvas: the table,
|
|
8
|
-
* table and column, and nothing for a memo
|
|
7
|
+
* Where a match sits, as a reader finds it on the canvas: the table, the
|
|
8
|
+
* table and column, the table an index belongs to, and nothing for a memo or
|
|
9
|
+
* a table group, which stand on their own.
|
|
9
10
|
*/
|
|
10
|
-
export declare function locationOf({ collections }: RootState,
|
|
11
|
+
export declare function locationOf({ collections }: RootState, match: FindMatch, i18n?: Pick<I18n, 't'>): string;
|
|
11
12
|
/** A result row's second line: where the match sits, then the kind of text it was found in. */
|
|
12
13
|
export declare function describeMatch(state: RootState, match: FindMatch, i18n?: Pick<I18n, 't'>): string;
|
|
13
14
|
export type Snippet = {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The replacement cased the way the text it replaces is, as VS Code's Preserve
|
|
3
|
+
* Case does: all upper, all lower or by the first letter, and piece by piece
|
|
4
|
+
* across the hyphens or the underscores both split into as many pieces by.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* preserveCase('USER_ID', 'account_key'); // 'ACCOUNT_KEY'
|
|
8
|
+
*/
|
|
9
|
+
export declare function preserveCase(matched: string, replacement: string): string;
|
|
10
|
+
//# sourceMappingURL=preserveCase.d.ts.map
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CompositionAction } from '@dineug/r-html';
|
|
2
2
|
import { FindMatch } from './findMatches';
|
|
3
3
|
import { Matcher } from './matcher';
|
|
4
|
-
/**
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* What writes a new value into the field a match was found in, as an edit by
|
|
6
|
+
* hand does: a name through the generator that turns its derived flag off, a
|
|
7
|
+
* logical name through the one that derives its name, the rest by atom action.
|
|
8
|
+
*/
|
|
9
|
+
export declare function toFieldAction(match: Pick<FindMatch, 'field' | 'id' | 'tableId'>, value: string): CompositionAction;
|
|
6
10
|
export type ReplaceActions = {
|
|
7
|
-
actions:
|
|
11
|
+
actions: CompositionAction[];
|
|
8
12
|
/** The matches the replacement changed, leaving out one it wrote back as it was. */
|
|
9
13
|
replaced: number;
|
|
10
14
|
};
|
|
11
15
|
/**
|
|
12
|
-
* One
|
|
16
|
+
* One field action per field whose text the replacement changes, for a single
|
|
13
17
|
* dispatch: one undo entry, and the same LWW writes a peer receives from an
|
|
14
18
|
* edit by hand. Given one match, only that occurrence is replaced.
|
|
15
19
|
*
|
package/dist/utils/focus.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { FocusTable, FocusType, SharedFocus } from '../engine/modules/editor/state';
|
|
2
2
|
export declare function isFocus(focusTable: Pick<FocusTable, 'tableId' | 'columnId' | 'focusType'> | null, focusType: FocusType, tableId: string, columnId?: string | null): boolean;
|
|
3
3
|
export declare const isSelectColumn: (focusTable: FocusTable | null, tableId: string, columnId: string) => boolean;
|
|
4
|
+
/** Whether the focus stands on any cell of this column. */
|
|
5
|
+
export declare const isFocusColumn: (focusTable: Pick<FocusTable, "tableId" | "columnId"> | null, tableId: string, columnId: string) => boolean;
|
|
4
6
|
export declare function isEdit(focusTable: FocusTable | null, focusType: FocusType, tableId: string, columnId?: string | null): boolean;
|
|
5
7
|
export declare function lastCursorFocus(input: HTMLInputElement | HTMLTextAreaElement): void;
|
|
6
8
|
export declare const toSharedFocus: (focusTable: FocusTable | null) => SharedFocus | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A count shown beside a name, a Dictionary sheet's or an Explorer folder's, its
|
|
3
|
+
* thousands grouped as the language groups them, in the digits 0 to 9 every
|
|
4
|
+
* other number in the editor is written in.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* formatCount('de-DE', 13176); // '13.176'
|
|
8
|
+
*/
|
|
9
|
+
export declare function formatCount(locale: string, count: number): string;
|
|
10
|
+
//# sourceMappingURL=formatCount.d.ts.map
|