@dineug/erd-editor 4.1.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 +17 -4
- 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/EditOverlay.styles.d.ts +6 -0
- package/dist/components/erd/canvas/sceneHit.d.ts +5 -0
- package/dist/components/erd/canvas/sceneTokens.d.ts +6 -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.styles.d.ts +1 -0
- package/dist/components/erd/diff-viewer/diff-tree/diffTreeModel.d.ts +4 -1
- package/dist/components/erd/erd-context-menu/menus/nameViewMenus.d.ts +22 -0
- package/dist/components/erd/floating-toolbar/FloatingToolbar.d.ts +1 -1
- 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/readerNameView.d.ts +15 -0
- package/dist/components/explorer/explorerTree.d.ts +4 -1
- package/dist/components/explorer/fieldIcon.d.ts +4 -1
- package/dist/components/explorer/matchTarget.d.ts +6 -6
- 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 +5 -0
- package/dist/components/quick-search/actions.d.ts +3 -1
- package/dist/components/quick-search/scopedActions.d.ts +2 -2
- 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/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 +11 -0
- 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 +1163 -817
- package/dist/i18n/messages/ar-SA.d.ts +125 -0
- package/dist/i18n/messages/de-DE.d.ts +93 -0
- package/dist/i18n/messages/en/common.d.ts +11 -0
- 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/findReplace.d.ts +2 -0
- package/dist/i18n/messages/en/index.d.ts +93 -0
- package/dist/i18n/messages/en/palette.d.ts +4 -0
- 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/visualization.d.ts +2 -0
- package/dist/i18n/messages/es-ES.d.ts +101 -0
- package/dist/i18n/messages/eu-ES.d.ts +93 -0
- package/dist/i18n/messages/fa-IR.d.ts +93 -0
- package/dist/i18n/messages/fr-FR.d.ts +101 -0
- package/dist/i18n/messages/he-IL.d.ts +101 -0
- package/dist/i18n/messages/id-ID.d.ts +85 -0
- package/dist/i18n/messages/it-IT.d.ts +101 -0
- package/dist/i18n/messages/ja-JP.d.ts +85 -0
- package/dist/i18n/messages/ko-KR.d.ts +85 -0
- package/dist/i18n/messages/nl-NL.d.ts +93 -0
- package/dist/i18n/messages/pl-PL.d.ts +109 -0
- package/dist/i18n/messages/pt-BR.d.ts +101 -0
- package/dist/i18n/messages/pt-PT.d.ts +101 -0
- package/dist/i18n/messages/ro-RO.d.ts +101 -0
- package/dist/i18n/messages/ru-RU.d.ts +109 -0
- package/dist/i18n/messages/sk-SK.d.ts +109 -0
- package/dist/i18n/messages/sl-SI.d.ts +109 -0
- package/dist/i18n/messages/sv-SE.d.ts +93 -0
- package/dist/i18n/messages/tr-TR.d.ts +93 -0
- package/dist/i18n/messages/uk-UA.d.ts +109 -0
- package/dist/i18n/messages/zh-CN.d.ts +85 -0
- package/dist/i18n/messages/zh-TW.d.ts +85 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +25195 -18014
- 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 +61 -60
- 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/themes/tokens.d.ts +12 -0
- 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/types.d.ts +4 -0
- package/dist/utils/file/exportFile.d.ts +10 -0
- package/dist/utils/find-replace/findMatches.d.ts +10 -4
- package/dist/utils/find-replace/present.d.ts +1 -1
- 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 +1 -1
- 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/validation.d.ts +1 -0
- package/dist/workers/exportPng.shared-worker.js +30 -29
- package/package.json +7 -5
- 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-BKvXDYoC.js +0 -12925
- package/dist/shared-store-2IUOt99m.js +0 -1341
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { RootState } from '../../state';
|
|
2
|
+
import { Domain, Term, Word } from '../../../internal-types';
|
|
3
|
+
import { DictionaryKind } from './actions';
|
|
4
|
+
/** The row each dictionary holds. */
|
|
5
|
+
export type DictionaryRowOf = {
|
|
6
|
+
[DictionaryKind.word]: Word;
|
|
7
|
+
[DictionaryKind.term]: Term;
|
|
8
|
+
[DictionaryKind.domain]: Domain;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* A name as every dictionary lookup compares it: trimmed and composed, its
|
|
12
|
+
* case kept, so a term matches a logical name typed in either Unicode form.
|
|
13
|
+
*/
|
|
14
|
+
export declare const normalizeDictionaryName: (name: string) => string;
|
|
15
|
+
/** The names a comma separated field lists, each normalized, none empty. */
|
|
16
|
+
export declare const splitDictionaryList: (text: string) => string[];
|
|
17
|
+
/**
|
|
18
|
+
* Marks a dictionary as written, so each index built over it is built again
|
|
19
|
+
* on its next read. The add, update and remove reducers call it; a load
|
|
20
|
+
* brings new collections, which no index was built over yet.
|
|
21
|
+
*/
|
|
22
|
+
export declare function raiseDictionaryGeneration(state: RootState, kind: DictionaryKind): void;
|
|
23
|
+
/**
|
|
24
|
+
* A dictionary's listed rows in the order its sheet, its file and every reader
|
|
25
|
+
* show them: by order key. Built once per write of the sheet; never mutate it.
|
|
26
|
+
*/
|
|
27
|
+
export declare const orderedDictionaryRows: <K extends DictionaryKind>(state: RootState, kind: K) => ReadonlyArray<DictionaryRowOf[K]>;
|
|
28
|
+
/**
|
|
29
|
+
* A reader of what the build makes of a dictionary's listed rows in sheet
|
|
30
|
+
* order, kept until the sheet is written again (heldPerSheet).
|
|
31
|
+
*/
|
|
32
|
+
export declare function dictionaryCache<K extends DictionaryKind, T>(kind: K, build: (rows: ReadonlyArray<DictionaryRowOf[K]>) => T): (state: RootState) => T;
|
|
33
|
+
/** A sheet's listed rows, and those of each normalized name, both in sheet order. */
|
|
34
|
+
export type NameIndex<Row> = {
|
|
35
|
+
rows: ReadonlyArray<Row>;
|
|
36
|
+
byName: ReadonlyMap<string, ReadonlyArray<Row>>;
|
|
37
|
+
};
|
|
38
|
+
/** What a word sheet says of one text: the words so named, and those listing it. */
|
|
39
|
+
export type WordMarks = {
|
|
40
|
+
words: Word[];
|
|
41
|
+
synonymOf: Word[];
|
|
42
|
+
forbiddenOf: Word[];
|
|
43
|
+
};
|
|
44
|
+
/** A node of the word trie, keyed by UTF-16 code unit. */
|
|
45
|
+
export type WordTrieNode = {
|
|
46
|
+
next: Map<number, WordTrieNode>;
|
|
47
|
+
marks?: WordMarks;
|
|
48
|
+
};
|
|
49
|
+
/** The word sheet's names, and a trie over them, its synonyms and its forbidden words. */
|
|
50
|
+
export type WordIndex = NameIndex<Word> & {
|
|
51
|
+
root: WordTrieNode;
|
|
52
|
+
};
|
|
53
|
+
/** The rows by name; a row without a name is in no group and matches nothing. */
|
|
54
|
+
export declare const buildNameIndex: <Row extends {
|
|
55
|
+
name: string;
|
|
56
|
+
}>(rows: ReadonlyArray<Row>) => NameIndex<Row>;
|
|
57
|
+
/**
|
|
58
|
+
* Marks each word's name, synonyms and forbidden words on the trie, in sheet
|
|
59
|
+
* order. A word without a name lists nothing, since it names no standard word
|
|
60
|
+
* to suggest, and a synonym equal to its own word's name is passed over.
|
|
61
|
+
*/
|
|
62
|
+
export declare function buildWordIndex(words: ReadonlyArray<Word>): WordIndex;
|
|
63
|
+
/** The word sheet's index, built once per generation of the sheet. */
|
|
64
|
+
export declare const getWordIndex: (state: RootState) => WordIndex;
|
|
65
|
+
/** The term sheet's names, built once per generation of the sheet. */
|
|
66
|
+
export declare const getTermNames: (state: RootState) => NameIndex<Term>;
|
|
67
|
+
/** The domain sheet's names, built once per generation of the sheet. */
|
|
68
|
+
export declare const getDomainNames: (state: RootState) => NameIndex<Domain>;
|
|
69
|
+
/** The first listed term of the name, compared trimmed, composed and case kept. */
|
|
70
|
+
export declare const findTerm: (state: RootState, name: string) => Term | undefined;
|
|
71
|
+
/** The first listed domain of the name, compared as a term's is. */
|
|
72
|
+
export declare const findDomain: (state: RootState, name: string) => Domain | undefined;
|
|
73
|
+
//# sourceMappingURL=dictionaryIndex.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RootState } from '../../state';
|
|
2
|
+
/** The ids of the columns linking the domain, a removed column's among them; no column links ''. */
|
|
3
|
+
export declare const domainColumnIds: (state: RootState, domainId: string) => ReadonlySet<string>;
|
|
4
|
+
/**
|
|
5
|
+
* Moves the column from the domain it linked to the one it links now, in the
|
|
6
|
+
* index built over its collection; a collection with none builds it later.
|
|
7
|
+
*/
|
|
8
|
+
export declare function relinkDomainColumn(state: RootState, columnId: string, from: string, to: string): void;
|
|
9
|
+
//# sourceMappingURL=domainLinks.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AnyAction } from '@dineug/r-html';
|
|
2
|
+
import { ChangeColumnValuePayload } from '../table-column/actions';
|
|
3
|
+
import { RootState } from '../../state';
|
|
4
|
+
/** What one dispatch writes that a column's data type or its domain follows. */
|
|
5
|
+
export type DomainTypeWrites = {
|
|
6
|
+
/** The data type each domain takes, by the domain's id. */
|
|
7
|
+
domainTypes?: ReadonlyMap<string, string>;
|
|
8
|
+
/** The columns linked to a domain, its id as the value, '' to unlink. */
|
|
9
|
+
links?: ReadonlyArray<ChangeColumnValuePayload>;
|
|
10
|
+
/** The columns given a data type directly, as a type cell writes one. */
|
|
11
|
+
dataTypes?: ReadonlyArray<ChangeColumnValuePayload>;
|
|
12
|
+
};
|
|
13
|
+
/** A domain's type in one dispatch: the one it writes the domain, else the domain's own. */
|
|
14
|
+
export declare function domainTypeIn(state: RootState, domainTypes: ReadonlyMap<string, string>): (id: string) => string;
|
|
15
|
+
/**
|
|
16
|
+
* The unlinks that close a dispatch writing these column types: each column
|
|
17
|
+
* whose type then differs from the type of the domain it links, listed or
|
|
18
|
+
* removed, read with the domain types and links the same dispatch writes.
|
|
19
|
+
*/
|
|
20
|
+
export declare function toDomainUnlinkActions(state: RootState, written: ReadonlyArray<ChangeColumnValuePayload>, { domainTypes, links, }?: Pick<DomainTypeWrites, 'domainTypes' | 'links'>): AnyAction[];
|
|
21
|
+
/**
|
|
22
|
+
* The column writes of one dispatch over all its rows: a column linked to a
|
|
23
|
+
* domain it changes or links takes that type first, the sync spreads from it
|
|
24
|
+
* without writing it again, and a written column off its domain's type unlinks.
|
|
25
|
+
*/
|
|
26
|
+
export declare function toDomainTypeActions(state: RootState, { domainTypes, links, dataTypes, }: DomainTypeWrites): AnyAction[];
|
|
27
|
+
//# sourceMappingURL=domainTypes.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { AnyAction } from '@dineug/r-html';
|
|
2
|
+
import { RootState } from '../../state';
|
|
3
|
+
import { ValuesType } from '../../../internal-types';
|
|
4
|
+
import { DictionaryCsvRow } from '../../../utils/dictionary-csv/dictionaryCsv';
|
|
5
|
+
import { DictionaryKind, DictionaryValues } from './actions';
|
|
6
|
+
/** A row a write names: a listed row by its id, or a new one with none. */
|
|
7
|
+
export type DictionaryEntryChange<K extends DictionaryKind = DictionaryKind> = {
|
|
8
|
+
id?: string;
|
|
9
|
+
/** The values to write, and the order key, which only the engine sends, that places the row. */
|
|
10
|
+
values: Partial<DictionaryValues[K]> & {
|
|
11
|
+
order?: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
/** Why a write of a dictionary row is turned away. */
|
|
15
|
+
export declare const DictionaryRefusalCode: {
|
|
16
|
+
readonly duplicateName: "duplicateName";
|
|
17
|
+
readonly unknownDomain: "unknownDomain";
|
|
18
|
+
};
|
|
19
|
+
export type DictionaryRefusalCode = ValuesType<typeof DictionaryRefusalCode>;
|
|
20
|
+
/**
|
|
21
|
+
* A row turned away: its position among the changes given, the name it would
|
|
22
|
+
* hold, and the text refused, the normalized name or the domain's id.
|
|
23
|
+
*/
|
|
24
|
+
export type DictionaryRefusal = {
|
|
25
|
+
code: DictionaryRefusalCode;
|
|
26
|
+
index: number;
|
|
27
|
+
name: string;
|
|
28
|
+
value: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Why each change would be turned away: a name another listed row of the
|
|
32
|
+
* sheet or another row of the same changes holds, compared normalized, or a
|
|
33
|
+
* term's domain the document does not list. An empty name is never refused.
|
|
34
|
+
*/
|
|
35
|
+
export declare function validateDictionaryValues<K extends DictionaryKind>(state: RootState, kind: K, changes: ReadonlyArray<DictionaryEntryChange<K>>): DictionaryRefusal[];
|
|
36
|
+
/** What a commit sends: nothing while any row of it is refused. */
|
|
37
|
+
export type DictionaryCommit = {
|
|
38
|
+
actions: AnyAction[];
|
|
39
|
+
refusals: DictionaryRefusal[];
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* The actions of a commit of rows, updates of listed rows and adds of new
|
|
43
|
+
* ones, with the columns its domains' new types reach, or none at all when a
|
|
44
|
+
* row is refused, so one commit lands whole or not.
|
|
45
|
+
*/
|
|
46
|
+
export declare function toDictionaryCommit<K extends DictionaryKind>(state: RootState, kind: K, changes: ReadonlyArray<DictionaryEntryChange<K>>): DictionaryCommit;
|
|
47
|
+
/** What an import of a file's rows sends, and the counts its message shows. */
|
|
48
|
+
export type DictionaryImport = {
|
|
49
|
+
actions: AnyAction[];
|
|
50
|
+
added: number;
|
|
51
|
+
updated: number;
|
|
52
|
+
/** The rows a later row of the same name replaced, or with no name. */
|
|
53
|
+
folded: number;
|
|
54
|
+
/** Each domain name a term row gives that the document lists no domain of. */
|
|
55
|
+
unknownDomains: string[];
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Folds a file's rows by normalized name, the later row's values in the
|
|
59
|
+
* earlier one's place, then updates the listed row of each name and adds the
|
|
60
|
+
* rest. A term's domain is read by name, '' where no domain has it.
|
|
61
|
+
*/
|
|
62
|
+
export declare function toDictionaryImport<K extends DictionaryKind>(state: RootState, kind: K, rows: ReadonlyArray<DictionaryCsvRow<K>>): DictionaryImport;
|
|
63
|
+
//# sourceMappingURL=entryWrites.d.ts.map
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { GeneratorAction } from '../../generator.actions';
|
|
2
|
+
import { ValuesType } from '../../../internal-types';
|
|
3
|
+
import { DictionaryCsvRow } from '../../../utils/dictionary-csv/dictionaryCsv';
|
|
4
|
+
import { DictionaryKind, DictionaryValues } from './actions';
|
|
5
|
+
import { DictionaryEntryChange } from './entryWrites';
|
|
6
|
+
/**
|
|
7
|
+
* Adds one row at the end of its sheet with the values given, none for an
|
|
8
|
+
* empty row; nothing when its name is another row's or its domain unknown.
|
|
9
|
+
*/
|
|
10
|
+
export declare const addDictionaryEntryAction$: <K extends DictionaryKind>(kind: K, values?: Partial<DictionaryValues[K]>) => GeneratorAction;
|
|
11
|
+
/** Where inserted rows go: before or after a listed row, or at the end for none. */
|
|
12
|
+
export type DictionaryInsertAnchor = {
|
|
13
|
+
id: string;
|
|
14
|
+
place: 'before' | 'after';
|
|
15
|
+
} | null;
|
|
16
|
+
/**
|
|
17
|
+
* Inserts empty rows before or after a row in one dispatch, at the end when it
|
|
18
|
+
* is gone, keying the rows around the place again where no key fits between
|
|
19
|
+
* them. Only the editor sends it, so it stays out of the barrel.
|
|
20
|
+
*/
|
|
21
|
+
export declare const insertDictionaryEntriesAction$: (kind: DictionaryKind, count: number, anchor?: DictionaryInsertAnchor) => GeneratorAction;
|
|
22
|
+
/** Which way a sort runs. */
|
|
23
|
+
export declare const DictionarySortDirection: {
|
|
24
|
+
readonly ascending: "ascending";
|
|
25
|
+
readonly descending: "descending";
|
|
26
|
+
};
|
|
27
|
+
export type DictionarySortDirection = ValuesType<typeof DictionarySortDirection>;
|
|
28
|
+
/**
|
|
29
|
+
* Orders a sheet by one field for everyone in one dispatch, by the text a cell
|
|
30
|
+
* shows in the language given, numbers as numbers, empty cells last, ties as
|
|
31
|
+
* they stood; nothing for a sheet in that order. Only the editor sends it.
|
|
32
|
+
*/
|
|
33
|
+
export declare const sortDictionaryAction$: (kind: DictionaryKind, field: string, direction: DictionarySortDirection, locale?: string) => GeneratorAction;
|
|
34
|
+
/**
|
|
35
|
+
* Writes the fields of a listed row that change, and the type of every column
|
|
36
|
+
* a domain's new type reaches; nothing when the row is refused or unlisted.
|
|
37
|
+
*/
|
|
38
|
+
export declare const updateDictionaryEntryAction$: <K extends DictionaryKind>(kind: K, id: string, values: Partial<DictionaryValues[K]>) => GeneratorAction;
|
|
39
|
+
/**
|
|
40
|
+
* Removes each listed row named, once, in one dispatch, from the end of the
|
|
41
|
+
* list back, each after every named row behind it: removing a whole sheet or
|
|
42
|
+
* its tail moves no other row, while rows a scattered pick leaves still move.
|
|
43
|
+
*/
|
|
44
|
+
export declare const removeDictionaryEntriesAction$: (kind: DictionaryKind, ids: ReadonlyArray<string>) => GeneratorAction;
|
|
45
|
+
/**
|
|
46
|
+
* A grid's commit: an update of each listed row named and an add of each row
|
|
47
|
+
* past the end, in one dispatch, or nothing at all when any row is refused.
|
|
48
|
+
*/
|
|
49
|
+
export declare const commitDictionaryCellsAction$: <K extends DictionaryKind>(kind: K, changes: ReadonlyArray<DictionaryEntryChange<K>>) => GeneratorAction;
|
|
50
|
+
/**
|
|
51
|
+
* A file's rows, folded by name and upserted by name in one dispatch: only the
|
|
52
|
+
* adds and the fields that change, so the same file again sends nothing.
|
|
53
|
+
*/
|
|
54
|
+
export declare const importDictionaryAction$: <K extends DictionaryKind>(kind: K, rows: ReadonlyArray<DictionaryCsvRow<K>>) => GeneratorAction;
|
|
55
|
+
/**
|
|
56
|
+
* Writes a column's logical name and what the dictionaries derive of it in
|
|
57
|
+
* one dispatch, the derivation only while the physical name is empty or
|
|
58
|
+
* derived; nothing when every value already holds.
|
|
59
|
+
*/
|
|
60
|
+
export declare const setColumnLogicalNameAction$: (tableId: string, columnId: string, value: string) => GeneratorAction;
|
|
61
|
+
/**
|
|
62
|
+
* The logical names of several columns and what the dictionaries derive of
|
|
63
|
+
* them in one dispatch, as Replace All writes them; the domains they link are
|
|
64
|
+
* read over all of them at once, which separate generators would not do.
|
|
65
|
+
*/
|
|
66
|
+
export declare const setColumnLogicalNamesAction$: (names: ReadonlyArray<{
|
|
67
|
+
tableId: string;
|
|
68
|
+
columnId: string;
|
|
69
|
+
value: string;
|
|
70
|
+
}>) => GeneratorAction;
|
|
71
|
+
/** The table's logical name and its derived name, as a column's are. */
|
|
72
|
+
export declare const setTableLogicalNameAction$: (tableId: string, value: string) => GeneratorAction;
|
|
73
|
+
/** Derives a column's name from the logical name it holds, as its editor closes. */
|
|
74
|
+
export declare const deriveColumnNameAction$: (tableId: string, columnId: string) => GeneratorAction;
|
|
75
|
+
/** Derives a table's name from the logical name it holds, as its editor closes. */
|
|
76
|
+
export declare const deriveTableNameAction$: (tableId: string) => GeneratorAction;
|
|
77
|
+
/** What a derivation again covers. */
|
|
78
|
+
export declare const RederiveScope: {
|
|
79
|
+
readonly column: "column";
|
|
80
|
+
readonly table: "table";
|
|
81
|
+
readonly selection: "selection";
|
|
82
|
+
readonly document: "document";
|
|
83
|
+
};
|
|
84
|
+
export type RederiveScope = ValuesType<typeof RederiveScope>;
|
|
85
|
+
/**
|
|
86
|
+
* One column; one table, its name and every column; the selected tables so;
|
|
87
|
+
* or every table of the document so.
|
|
88
|
+
*/
|
|
89
|
+
export type RederiveNamesTarget = {
|
|
90
|
+
scope: typeof RederiveScope.column;
|
|
91
|
+
tableId: string;
|
|
92
|
+
columnId: string;
|
|
93
|
+
} | {
|
|
94
|
+
scope: typeof RederiveScope.table;
|
|
95
|
+
tableId: string;
|
|
96
|
+
} | {
|
|
97
|
+
scope: typeof RederiveScope.selection;
|
|
98
|
+
} | {
|
|
99
|
+
scope: typeof RederiveScope.document;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Puts each name the target covers back under the dictionaries, its flag on,
|
|
103
|
+
* and derives it again, one dispatch and one undo; a name with no logical
|
|
104
|
+
* name, or a column whose new name another column holds, is left as it is.
|
|
105
|
+
*/
|
|
106
|
+
export declare const rederiveNamesAction$: (target: RederiveNamesTarget) => GeneratorAction;
|
|
107
|
+
/**
|
|
108
|
+
* Links a column to a live domain and gives it the domain's type, the data
|
|
109
|
+
* type sync spreading it, in one dispatch; '' unlinks alone. A domain the
|
|
110
|
+
* document does not list links nothing.
|
|
111
|
+
*/
|
|
112
|
+
export declare const setColumnDomainAction$: (tableId: string, columnId: string, domainId: string) => GeneratorAction;
|
|
113
|
+
export declare const actions$: {
|
|
114
|
+
addDictionaryEntryAction$: <K extends DictionaryKind>(kind: K, values?: Partial<DictionaryValues[K]>) => GeneratorAction;
|
|
115
|
+
updateDictionaryEntryAction$: <K extends DictionaryKind>(kind: K, id: string, values: Partial<DictionaryValues[K]>) => GeneratorAction;
|
|
116
|
+
removeDictionaryEntriesAction$: (kind: DictionaryKind, ids: ReadonlyArray<string>) => GeneratorAction;
|
|
117
|
+
importDictionaryAction$: <K extends DictionaryKind>(kind: K, rows: ReadonlyArray<DictionaryCsvRow<K>>) => GeneratorAction;
|
|
118
|
+
commitDictionaryCellsAction$: <K extends DictionaryKind>(kind: K, changes: ReadonlyArray<DictionaryEntryChange<K>>) => GeneratorAction;
|
|
119
|
+
setColumnLogicalNameAction$: (tableId: string, columnId: string, value: string) => GeneratorAction;
|
|
120
|
+
setTableLogicalNameAction$: (tableId: string, value: string) => GeneratorAction;
|
|
121
|
+
deriveColumnNameAction$: (tableId: string, columnId: string) => GeneratorAction;
|
|
122
|
+
deriveTableNameAction$: (tableId: string) => GeneratorAction;
|
|
123
|
+
rederiveNamesAction$: (target: RederiveNamesTarget) => GeneratorAction;
|
|
124
|
+
setColumnDomainAction$: (tableId: string, columnId: string, domainId: string) => GeneratorAction;
|
|
125
|
+
};
|
|
126
|
+
//# sourceMappingURL=generator.actions.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AnyAction } from '@dineug/r-html';
|
|
2
|
+
import { PushUndoHistory } from '../../history.actions';
|
|
3
|
+
/**
|
|
4
|
+
* Turns round the adds and removes an undo sends, in the slots they hold: the
|
|
5
|
+
* undo of an import then takes its rows off the end of each list, and the undo
|
|
6
|
+
* of a removal sent from the end puts the rows back in their order.
|
|
7
|
+
*/
|
|
8
|
+
export declare function reverseDictionaryListings(undoActions: AnyAction[]): void;
|
|
9
|
+
export declare const dictionaryPushUndoHistoryMap: {
|
|
10
|
+
"dictionary.add": PushUndoHistory;
|
|
11
|
+
"dictionary.update": PushUndoHistory;
|
|
12
|
+
"dictionary.remove": PushUndoHistory;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=history.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { RootState } from '../../state';
|
|
2
|
+
/** Whether a dictionary's id list holds the id, without walking the list. */
|
|
3
|
+
export declare const isListed: (list: string[], id: string) => boolean;
|
|
4
|
+
/** Puts the id at the end of the list unless it holds it; true when it did. */
|
|
5
|
+
export declare function listId(list: string[], id: string): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Takes the id out of the list if it holds it; true when it did. It looks from
|
|
8
|
+
* the end, where a removal and an undo send their rows, since every element a
|
|
9
|
+
* splice moves in a state list goes through its proxy.
|
|
10
|
+
*/
|
|
11
|
+
export declare function unlistId(list: string[], id: string): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The id while it names a domain the document lists, else '': what a paste
|
|
14
|
+
* links, since a copy from another document can name one this one lacks.
|
|
15
|
+
*/
|
|
16
|
+
export declare const toLiveDomainId: (state: RootState, domainId?: string) => string;
|
|
17
|
+
/**
|
|
18
|
+
* The domain a pasted column keeps: a live one whose data type the column holds,
|
|
19
|
+
* else ''. A copy can name a domain whose type changed since it was taken, and a
|
|
20
|
+
* link off its domain's type would break the rule that a domain governs its type.
|
|
21
|
+
*/
|
|
22
|
+
export declare function toPastedDomainId(state: RootState, domainId: string | undefined, dataType: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* The name of the domain an id links, or '' while it links none in the
|
|
25
|
+
* document: a removed domain's name is kept for its undo and shown nowhere.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getLiveDomainName(state: RootState, domainId: string): string;
|
|
28
|
+
//# sourceMappingURL=membership.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Ordered } from '@dineug/erd-editor-schema';
|
|
2
|
+
/** The keys of the rows a placement adds, and the listed rows it keys again. */
|
|
3
|
+
export type OrderPlacement = {
|
|
4
|
+
keys: string[];
|
|
5
|
+
rekeyed: Ordered[];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Keys for count new rows placed at index at of a sheet's rows in key order,
|
|
9
|
+
* rows.length for its end. Where no key fits between the neighbours, the rows
|
|
10
|
+
* around the place are keyed again with them, so the sheet reads as asked.
|
|
11
|
+
*/
|
|
12
|
+
export declare function placeOrderKeys(rows: ReadonlyArray<Ordered>, at: number, count: number): OrderPlacement;
|
|
13
|
+
//# sourceMappingURL=orderKeys.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Term } from '../../../internal-types';
|
|
2
|
+
/** The most terms a logical name cell offers while it is typed. */
|
|
3
|
+
export declare const TERM_COMPLETION_LIMIT = 8;
|
|
4
|
+
/**
|
|
5
|
+
* The listed terms sorted by their keys in code unit order, one per name, the
|
|
6
|
+
* first listed answering for it; keys and terms share each position.
|
|
7
|
+
*/
|
|
8
|
+
export type TermIndex = {
|
|
9
|
+
keys: ReadonlyArray<string>;
|
|
10
|
+
terms: ReadonlyArray<Term>;
|
|
11
|
+
};
|
|
12
|
+
/** A term name or a typed prefix as completion compares it: composed and in lower case. */
|
|
13
|
+
export declare const toTermKey: (text: string) => string;
|
|
14
|
+
/** Sorts the named terms by key, a name in two cases ordered by the name itself. */
|
|
15
|
+
export declare function buildTermIndex(terms: ReadonlyArray<Term>): TermIndex;
|
|
16
|
+
/** The term sheet's completion index, built once per generation of the sheet. */
|
|
17
|
+
export declare const getTermIndex: (state: import('../../state').RootState) => TermIndex;
|
|
18
|
+
/**
|
|
19
|
+
* The terms whose names start with what is typed, at most the limit, in key
|
|
20
|
+
* order. A lower bound search finds the first key, so a query reads at most
|
|
21
|
+
* one key per halving, then one per term it gives and one that ends the run.
|
|
22
|
+
*/
|
|
23
|
+
export declare function completeTerms(index: TermIndex, typed: string, limit?: number): Term[];
|
|
24
|
+
//# sourceMappingURL=termIndex.d.ts.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Reducer } from '@dineug/r-html';
|
|
2
2
|
import { EngineContext } from '../../context';
|
|
3
|
+
import { DictionaryKind } from '../dictionary/actions';
|
|
3
4
|
import { RootState } from '../../state';
|
|
4
5
|
import { LWW, Point, ValuesType } from '../../../internal-types';
|
|
5
6
|
import { Rect } from '../../../utils/dragSelect';
|
|
6
|
-
import { FocusType, MoveKey, SelectType, SharedFocus, ShowMode, ViewKind, VisualizationMode } from './state';
|
|
7
|
+
import { CenterStep, FocusType, MoveKey, SelectType, SharedFocus, ShowMode, ViewKind, VisualizationMode } from './state';
|
|
7
8
|
export declare const ActionType: {
|
|
8
9
|
readonly changeHasHistory: "editor.changeHasHistory";
|
|
9
10
|
readonly selectAll: "editor.selectAll";
|
|
@@ -55,13 +56,23 @@ export declare const ActionType: {
|
|
|
55
56
|
readonly viewSetLayout: "editor.viewSetLayout";
|
|
56
57
|
readonly viewChangeShowMode: "editor.viewChangeShowMode";
|
|
57
58
|
readonly viewSetCenters: "editor.viewSetCenters";
|
|
59
|
+
readonly viewStepCenters: "editor.viewStepCenters";
|
|
58
60
|
readonly changeVisualizationMode: "editor.changeVisualizationMode";
|
|
59
61
|
};
|
|
60
62
|
export type ActionType = ValuesType<typeof ActionType>;
|
|
63
|
+
/**
|
|
64
|
+
* Set on the clear and the load of a schema import, and of their undo, which
|
|
65
|
+
* leave the store's words, terms and domains and their lists as they are.
|
|
66
|
+
*/
|
|
67
|
+
export type DictionaryLoadFlag = {
|
|
68
|
+
keepDictionaries?: boolean;
|
|
69
|
+
};
|
|
61
70
|
export type ActionMap = {
|
|
62
71
|
[ActionType.changeHasHistory]: {
|
|
63
72
|
hasUndo: boolean;
|
|
64
73
|
hasRedo: boolean;
|
|
74
|
+
/** The dictionary sheet whose history this is, none for the document's. */
|
|
75
|
+
sheet?: DictionaryKind;
|
|
65
76
|
};
|
|
66
77
|
[ActionType.selectAll]: void;
|
|
67
78
|
[ActionType.unselectAll]: void;
|
|
@@ -70,8 +81,8 @@ export type ActionMap = {
|
|
|
70
81
|
width: number;
|
|
71
82
|
height: number;
|
|
72
83
|
};
|
|
73
|
-
[ActionType.clear]: void;
|
|
74
|
-
[ActionType.loadJson]: {
|
|
84
|
+
[ActionType.clear]: DictionaryLoadFlag | void;
|
|
85
|
+
[ActionType.loadJson]: DictionaryLoadFlag & {
|
|
75
86
|
value: string;
|
|
76
87
|
};
|
|
77
88
|
[ActionType.initialClear]: void;
|
|
@@ -206,6 +217,10 @@ export type ActionMap = {
|
|
|
206
217
|
tableIds: string[];
|
|
207
218
|
kind?: ViewKind;
|
|
208
219
|
};
|
|
220
|
+
[ActionType.viewStepCenters]: {
|
|
221
|
+
step: CenterStep;
|
|
222
|
+
kind?: ViewKind;
|
|
223
|
+
};
|
|
209
224
|
[ActionType.changeVisualizationMode]: {
|
|
210
225
|
value: VisualizationMode;
|
|
211
226
|
};
|
|
@@ -6,9 +6,11 @@ export declare const changeHasHistoryAction: {
|
|
|
6
6
|
(payload: {
|
|
7
7
|
hasUndo: boolean;
|
|
8
8
|
hasRedo: boolean;
|
|
9
|
+
sheet?: import('../dictionary/actions').DictionaryKind;
|
|
9
10
|
}): import('@dineug/r-html').AnyAction<{
|
|
10
11
|
hasUndo: boolean;
|
|
11
12
|
hasRedo: boolean;
|
|
13
|
+
sheet?: import('../dictionary/actions').DictionaryKind;
|
|
12
14
|
}>;
|
|
13
15
|
toString(): string;
|
|
14
16
|
type: string;
|
|
@@ -40,14 +42,16 @@ export declare const changeViewportAction: {
|
|
|
40
42
|
type: string;
|
|
41
43
|
};
|
|
42
44
|
export declare const clearAction: {
|
|
43
|
-
(payload: void): import('@dineug/r-html').AnyAction<void>;
|
|
45
|
+
(payload: void | import('./actions').DictionaryLoadFlag): import('@dineug/r-html').AnyAction<void | import('./actions').DictionaryLoadFlag>;
|
|
44
46
|
toString(): string;
|
|
45
47
|
type: string;
|
|
46
48
|
};
|
|
49
|
+
/** Whether a clear or a load carries the flag that keeps the dictionaries. */
|
|
50
|
+
export declare const keepsDictionaries: (payload: unknown) => boolean;
|
|
47
51
|
export declare const loadJsonAction: {
|
|
48
|
-
(payload: {
|
|
52
|
+
(payload: import('./actions').DictionaryLoadFlag & {
|
|
49
53
|
value: string;
|
|
50
|
-
}): import('@dineug/r-html').AnyAction<{
|
|
54
|
+
}): import('@dineug/r-html').AnyAction<import('./actions').DictionaryLoadFlag & {
|
|
51
55
|
value: string;
|
|
52
56
|
}>;
|
|
53
57
|
toString(): string;
|
|
@@ -337,6 +341,7 @@ export declare const editorReducers: {
|
|
|
337
341
|
"editor.viewSetLayout": ReducerType<"editor.viewSetLayout">;
|
|
338
342
|
"editor.viewChangeShowMode": ReducerType<"editor.viewChangeShowMode">;
|
|
339
343
|
"editor.viewSetCenters": ReducerType<"editor.viewSetCenters">;
|
|
344
|
+
"editor.viewStepCenters": ReducerType<"editor.viewStepCenters">;
|
|
340
345
|
"editor.changeVisualizationMode": ReducerType<"editor.changeVisualizationMode">;
|
|
341
346
|
"editor.changeHasHistory": ReducerType<"editor.changeHasHistory">;
|
|
342
347
|
"editor.selectAll": ReducerType<"editor.selectAll">;
|
|
@@ -496,6 +501,17 @@ export declare const actions: {
|
|
|
496
501
|
toString(): string;
|
|
497
502
|
type: string;
|
|
498
503
|
};
|
|
504
|
+
viewStepCentersAction: {
|
|
505
|
+
(payload: {
|
|
506
|
+
step: import('./state').CenterStep;
|
|
507
|
+
kind?: import('./state').ViewKind;
|
|
508
|
+
}): import('@dineug/r-html').AnyAction<{
|
|
509
|
+
step: import('./state').CenterStep;
|
|
510
|
+
kind?: import('./state').ViewKind;
|
|
511
|
+
}>;
|
|
512
|
+
toString(): string;
|
|
513
|
+
type: string;
|
|
514
|
+
};
|
|
499
515
|
changeVisualizationModeAction: {
|
|
500
516
|
(payload: {
|
|
501
517
|
value: import('./state').VisualizationMode;
|
|
@@ -509,9 +525,11 @@ export declare const actions: {
|
|
|
509
525
|
(payload: {
|
|
510
526
|
hasUndo: boolean;
|
|
511
527
|
hasRedo: boolean;
|
|
528
|
+
sheet?: import('../dictionary/actions').DictionaryKind;
|
|
512
529
|
}): import('@dineug/r-html').AnyAction<{
|
|
513
530
|
hasUndo: boolean;
|
|
514
531
|
hasRedo: boolean;
|
|
532
|
+
sheet?: import('../dictionary/actions').DictionaryKind;
|
|
515
533
|
}>;
|
|
516
534
|
toString(): string;
|
|
517
535
|
type: string;
|
|
@@ -543,14 +561,14 @@ export declare const actions: {
|
|
|
543
561
|
type: string;
|
|
544
562
|
};
|
|
545
563
|
clearAction: {
|
|
546
|
-
(payload: void): import('@dineug/r-html').AnyAction<void>;
|
|
564
|
+
(payload: void | import('./actions').DictionaryLoadFlag): import('@dineug/r-html').AnyAction<void | import('./actions').DictionaryLoadFlag>;
|
|
547
565
|
toString(): string;
|
|
548
566
|
type: string;
|
|
549
567
|
};
|
|
550
568
|
loadJsonAction: {
|
|
551
|
-
(payload: {
|
|
569
|
+
(payload: import('./actions').DictionaryLoadFlag & {
|
|
552
570
|
value: string;
|
|
553
|
-
}): import('@dineug/r-html').AnyAction<{
|
|
571
|
+
}): import('@dineug/r-html').AnyAction<import('./actions').DictionaryLoadFlag & {
|
|
554
572
|
value: string;
|
|
555
573
|
}>;
|
|
556
574
|
toString(): string;
|
|
@@ -8,9 +8,17 @@ import { Rect } from '../../../konva/scene/metrics';
|
|
|
8
8
|
import { Rect as DragRect } from '../../../utils/dragSelect';
|
|
9
9
|
import { GeometrySource } from '../../../utils/draw-relationship/geometrySource';
|
|
10
10
|
import { ClipboardPayload } from '../../../utils/table-clipboard';
|
|
11
|
+
import { DictionaryLoadFlag } from './actions';
|
|
11
12
|
import { MoveKey } from './state';
|
|
12
13
|
import { CreateEntityActions } from './utils/duplicate';
|
|
13
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Replaces the document. A schema import passes keepDictionaries, since its
|
|
16
|
+
* text holds no dictionary and the store's words, terms and domains stay.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* store.dispatch(loadJsonAction$(json, { keepDictionaries: true }));
|
|
20
|
+
*/
|
|
21
|
+
export declare const loadJsonAction$: (value: string, { keepDictionaries }?: DictionaryLoadFlag) => GeneratorAction;
|
|
14
22
|
export declare const initialLoadJsonAction$: (value: string) => GeneratorAction;
|
|
15
23
|
/**
|
|
16
24
|
* One drag of the selection: the document groups and tables it carries, read at its first step and
|
|
@@ -56,9 +64,9 @@ export type SchemaAppend = CreateEntityActions & {
|
|
|
56
64
|
*/
|
|
57
65
|
export declare function withGridPoints(json: string, state: RootState, ctx: EngineContext): string;
|
|
58
66
|
/**
|
|
59
|
-
* A document's tables, relationships, indexes and memos as new entities
|
|
60
|
-
*
|
|
61
|
-
* a gap under the diagram. Null for unreadable text or a document
|
|
67
|
+
* A document's tables, relationships, indexes and memos as new entities here,
|
|
68
|
+
* made as a paste makes them, no field at its default and no domain link sent,
|
|
69
|
+
* a gap under the diagram. Null for unreadable text or a document of nothing.
|
|
62
70
|
*
|
|
63
71
|
* @example
|
|
64
72
|
* const append = toSchemaAppend(state, json, 'grid', ctx);
|
|
@@ -125,21 +133,27 @@ export declare function withImportSettings(schema: Pick<ERDEditorSchemaV3, 'sett
|
|
|
125
133
|
export declare function toSchemaImportJson(type: SchemaImportType, value: string, { settings }: RootState, ctx: EngineContext): string;
|
|
126
134
|
/**
|
|
127
135
|
* The load each of the four text imports runs: the parsed document replaces
|
|
128
|
-
* this one, its tables at the points the grid gives them here
|
|
136
|
+
* this one, its tables at the points the grid gives them here, while the
|
|
137
|
+
* words, terms and domains stay, since the text brings none.
|
|
129
138
|
*/
|
|
130
139
|
export declare const loadSchemaAction$: (type: SchemaImportType, value: string) => GeneratorAction;
|
|
131
140
|
export declare const loadSchemaSQLAction$: (value: string) => GeneratorAction;
|
|
132
141
|
export declare const loadSchemaGraphQLAction$: (value: string) => GeneratorAction;
|
|
133
142
|
export declare const loadSchemaDBMLAction$: (value: string) => GeneratorAction;
|
|
134
143
|
export declare const loadSchemaAMLAction$: (value: string) => GeneratorAction;
|
|
135
|
-
|
|
144
|
+
/**
|
|
145
|
+
* Lifts the focused column, or the whole selection while the focused column is
|
|
146
|
+
* one of two or more selected in its table, as a table's press lifts the
|
|
147
|
+
* selected tables.
|
|
148
|
+
*/
|
|
149
|
+
export declare const dragstartColumnAction$: () => GeneratorAction;
|
|
136
150
|
/** A null targetId drops past the last row, which appends. */
|
|
137
151
|
export declare const dragoverColumnAction$: (targetId: string | null, targetTableId: string) => GeneratorAction;
|
|
138
152
|
export declare const columnKeyHoverStartAction$: (columnId: string) => GeneratorAction;
|
|
139
153
|
export declare const columnKeyHoverEndAction$: () => GeneratorAction;
|
|
140
154
|
export declare const actions$: {
|
|
141
155
|
focusFlowTableAction$: (tableIds: string[]) => GeneratorAction;
|
|
142
|
-
loadJsonAction$: (value: string) => GeneratorAction;
|
|
156
|
+
loadJsonAction$: (value: string, { keepDictionaries }?: DictionaryLoadFlag) => GeneratorAction;
|
|
143
157
|
initialLoadJsonAction$: (value: string) => GeneratorAction;
|
|
144
158
|
moveAllAction$: (movementX: number, movementY: number, source?: GeometrySource, gesture?: MoveAllGesture) => GeneratorAction;
|
|
145
159
|
removeSelectedAction$: () => GeneratorAction;
|
|
@@ -158,7 +172,7 @@ export declare const actions$: {
|
|
|
158
172
|
loadSchemaAMLAction$: (value: string) => GeneratorAction;
|
|
159
173
|
appendSchemaAction$: (type: SchemaImportType, value: string) => GeneratorAction;
|
|
160
174
|
appendSchemaJsonAction$: (json: string, layout?: AppendLayout) => GeneratorAction;
|
|
161
|
-
dragstartColumnAction$: (
|
|
175
|
+
dragstartColumnAction$: () => GeneratorAction;
|
|
162
176
|
dragoverColumnAction$: (targetId: string | null, targetTableId: string) => GeneratorAction;
|
|
163
177
|
columnKeyHoverStartAction$: (columnId: string) => GeneratorAction;
|
|
164
178
|
columnKeyHoverEndAction$: () => GeneratorAction;
|