@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,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;
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
+
import { DictionaryKind } from '../dictionary/actions';
|
|
1
2
|
import { Point, ValuesType } from '../../../internal-types';
|
|
2
3
|
import { Rect } from '../../../utils/dragSelect';
|
|
4
|
+
/** Whether a history can undo and redo. */
|
|
5
|
+
export type HasHistory = {
|
|
6
|
+
hasUndo: boolean;
|
|
7
|
+
hasRedo: boolean;
|
|
8
|
+
};
|
|
3
9
|
export type Editor = {
|
|
4
10
|
id: string;
|
|
5
11
|
selectedMap: Record<string, SelectType>;
|
|
6
12
|
hasUndo: boolean;
|
|
7
13
|
hasRedo: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Whether each dictionary sheet's own history can undo and redo: the Dictionary
|
|
16
|
+
* tab's edits go there, never into the document's (hasUndo, hasRedo).
|
|
17
|
+
*/
|
|
18
|
+
dictionaryHistory: Record<DictionaryKind, HasHistory>;
|
|
8
19
|
viewport: Viewport;
|
|
9
20
|
/**
|
|
10
21
|
* Whether a loaded origin still waits to be pulled into the content's travel
|
|
@@ -126,6 +137,12 @@ export declare const VisualizationMode: {
|
|
|
126
137
|
readonly flow: "flow";
|
|
127
138
|
};
|
|
128
139
|
export type VisualizationMode = ValuesType<typeof VisualizationMode>;
|
|
140
|
+
/** Which way a view steps through the centers it has stood on. */
|
|
141
|
+
export declare const CenterStep: {
|
|
142
|
+
readonly previous: "previous";
|
|
143
|
+
readonly next: "next";
|
|
144
|
+
};
|
|
145
|
+
export type CenterStep = ValuesType<typeof CenterStep>;
|
|
129
146
|
/**
|
|
130
147
|
* A scene drawn over the document in its own coordinates: the tables it places
|
|
131
148
|
* by id, the placement it is looked at through, and what it shows of each
|
|
@@ -140,6 +157,10 @@ export type SceneView = {
|
|
|
140
157
|
zoomLevel: number;
|
|
141
158
|
/** The tables the view narrows to, and none while it shows the whole document. */
|
|
142
159
|
centerIds: string[];
|
|
160
|
+
/** The centers it stood on before these, the latest last, which a step back returns to. */
|
|
161
|
+
previousCenterIds: string[][];
|
|
162
|
+
/** The centers a step back left, the latest last, which a step forward returns to. */
|
|
163
|
+
nextCenterIds: string[][];
|
|
143
164
|
};
|
|
144
165
|
export type EditorViews = {
|
|
145
166
|
flow: SceneView | null;
|
|
@@ -154,6 +175,9 @@ export declare const FocusType: {
|
|
|
154
175
|
readonly columnAutoIncrement: "columnAutoIncrement";
|
|
155
176
|
readonly columnDefault: "columnDefault";
|
|
156
177
|
readonly columnComment: "columnComment";
|
|
178
|
+
readonly tableLogicalName: "tableLogicalName";
|
|
179
|
+
readonly columnLogicalName: "columnLogicalName";
|
|
180
|
+
readonly columnDomain: "columnDomain";
|
|
157
181
|
};
|
|
158
182
|
export type FocusType = ValuesType<typeof FocusType>;
|
|
159
183
|
export declare const MoveKey: {
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { FocusType } from '../state';
|
|
2
|
+
import { RootState } from '../../../state';
|
|
3
|
+
import { Column } from '../../../../internal-types';
|
|
4
|
+
import { GeometrySource } from '../../../../utils/draw-relationship/geometrySource';
|
|
5
|
+
type Settings = RootState['settings'];
|
|
6
|
+
type ViewSettings = Pick<Settings, 'nameViewMode' | 'show'>;
|
|
7
|
+
/**
|
|
8
|
+
* The name view and the show bits a scene lays its cells out by: the document's
|
|
9
|
+
* settings, and in a view the name view alone, since a view reads no show bit.
|
|
10
|
+
* So a view's type cell stands for the domain in the logical view whatever the Domain bit says.
|
|
11
|
+
*/
|
|
12
|
+
export declare const sceneNameSettings: (settings: ViewSettings, source?: GeometrySource) => ViewSettings;
|
|
13
|
+
/** Whether the document draws each logical name in the place of its name. */
|
|
14
|
+
export declare const isLogicalNameView: ({ nameViewMode, }: Pick<Settings, "nameViewMode">) => boolean;
|
|
15
|
+
/** Whether the document draws each logical name beside its name. */
|
|
16
|
+
export declare const isBothNameView: ({ nameViewMode, }: Pick<Settings, "nameViewMode">) => boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether a logical name cell draws the name in its place: in the logical
|
|
19
|
+
* view while the logical name is blank, dimmed, and measured by the name.
|
|
20
|
+
*/
|
|
21
|
+
export declare const drawsNameForLogicalName: (settings: Pick<Settings, "nameViewMode">, { logicalName }: {
|
|
22
|
+
logicalName: string;
|
|
23
|
+
}) => boolean;
|
|
24
|
+
/** What a label outside the canvas shows of a table's or a column's names. */
|
|
25
|
+
export type NameLabel = {
|
|
26
|
+
/** The name it leads with, blank while there is none to show. */
|
|
27
|
+
text: string;
|
|
28
|
+
/** The name after it, muted where it can be: the view of both's own, '' otherwise. */
|
|
29
|
+
after: string;
|
|
30
|
+
/** Whether the text is the name standing in for a blank logical name, which a label dims. */
|
|
31
|
+
standIn: boolean;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* What a label shows in the name view: the logical name in the logical view,
|
|
35
|
+
* the name standing in while it is blank, and in the view of both the logical
|
|
36
|
+
* name with the name after it, or the name alone while the logical one is blank.
|
|
37
|
+
*/
|
|
38
|
+
export declare function toNameLabel(settings: Pick<Settings, 'nameViewMode'>, { name, logicalName }: {
|
|
39
|
+
name: string;
|
|
40
|
+
logicalName: string;
|
|
41
|
+
}): NameLabel;
|
|
42
|
+
/**
|
|
43
|
+
* A label as one text, where it cannot set its names apart: the name after
|
|
44
|
+
* the logical name stands in brackets.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* nameLabelText({ text: 'Member', after: 'member', standIn: false }); // 'Member (member)'
|
|
48
|
+
*/
|
|
49
|
+
export declare const nameLabelText: ({ text, after }: NameLabel) => string;
|
|
50
|
+
/**
|
|
51
|
+
* Whether a document row's type cell stands for its domain: in the logical
|
|
52
|
+
* view while the domain has no cell of its own, so a row never draws the
|
|
53
|
+
* domain twice. It then shows the domain's name, or the type while it has none.
|
|
54
|
+
*/
|
|
55
|
+
export declare const isDomainInTypeCell: (settings: ViewSettings) => boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether one row's type cell draws its column's domain: while the cell stands
|
|
58
|
+
* for the domain in the source's scene and the column links one the document
|
|
59
|
+
* lists by a name. Otherwise it draws the type, and is measured by it.
|
|
60
|
+
*/
|
|
61
|
+
export declare const drawsDomainInTypeCell: (state: RootState, column: Pick<Column, "domainId">, source?: GeometrySource) => boolean;
|
|
62
|
+
/**
|
|
63
|
+
* The cells a document table header lays out, in order: the name, the
|
|
64
|
+
* logical name in its place in the logical view or before it in the view of
|
|
65
|
+
* both, then the comment while it shows.
|
|
66
|
+
*/
|
|
67
|
+
export declare function getTableFocusTypes(settings: ViewSettings): FocusType[];
|
|
68
|
+
/**
|
|
69
|
+
* Whether a document row lays out the cell of each column type: the name
|
|
70
|
+
* always, the logical name in the view of both names alone, and every other
|
|
71
|
+
* cell, the domain among them, while its show bit is set.
|
|
72
|
+
*/
|
|
73
|
+
export declare const ColumnTypeShown: Readonly<Record<number, (settings: ViewSettings) => boolean>>;
|
|
74
|
+
/**
|
|
75
|
+
* The focus a document cell takes in the name view, given the one it takes in
|
|
76
|
+
* the physical view: the logical view edits the logical name in the name cell
|
|
77
|
+
* and, while the type cell stands for the domain, the domain there.
|
|
78
|
+
*/
|
|
79
|
+
export declare function toNameViewFocusType(settings: ViewSettings, focusType: FocusType): FocusType;
|
|
80
|
+
/** The focus types of a document row's cells, in the order the settings put them. */
|
|
81
|
+
export declare function getColumnFocusTypes(settings: Pick<Settings, 'nameViewMode' | 'show' | 'columnOrder'>): FocusType[];
|
|
82
|
+
/**
|
|
83
|
+
* The cells a view row lays out, whatever the show bits or the column order:
|
|
84
|
+
* the name and the type, which the logical view fills its own way, and in the
|
|
85
|
+
* view of both the logical name before them and the domain before the type.
|
|
86
|
+
*/
|
|
87
|
+
export declare function getViewColumnTypes(settings: Pick<Settings, 'nameViewMode'>): number[];
|
|
88
|
+
/** The focus types of a view row's cells, in that order. */
|
|
89
|
+
export declare function getViewColumnFocusTypes(settings: ViewSettings): FocusType[];
|
|
90
|
+
/**
|
|
91
|
+
* Where a header or a row of the given cells shows a focus type: on its own
|
|
92
|
+
* cell, else on the cell the name view draws in its place, the name and the
|
|
93
|
+
* logical name standing in for each other, as the type and the domain do.
|
|
94
|
+
*/
|
|
95
|
+
export declare function toShownFocusType(settings: ViewSettings, types: ReadonlyArray<FocusType>, focusType: FocusType): FocusType | null;
|
|
96
|
+
/**
|
|
97
|
+
* Moves the focus onto the cell that shows it once the name view or the Domain
|
|
98
|
+
* bit changed, the logical name's cell for the name's, and closes an editor it
|
|
99
|
+
* moves off. A focus neither cell of its pair shows is left as a hidden bit leaves it.
|
|
100
|
+
*/
|
|
101
|
+
export declare function keepFocusShown(state: RootState): void;
|
|
102
|
+
export {};
|
|
103
|
+
//# sourceMappingURL=nameView.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReducerType } from './actions';
|
|
2
|
-
import { Editor, ViewKind } from './state';
|
|
2
|
+
import { CenterStep, Editor, ViewKind } from './state';
|
|
3
3
|
/** Drops the view, which is what any replacement of the document owes it. */
|
|
4
4
|
export declare function clearViews(editor: Editor): void;
|
|
5
5
|
export declare const viewOpenAction: {
|
|
@@ -118,6 +118,17 @@ export declare const viewSetCentersAction: {
|
|
|
118
118
|
toString(): string;
|
|
119
119
|
type: string;
|
|
120
120
|
};
|
|
121
|
+
export declare const viewStepCentersAction: {
|
|
122
|
+
(payload: {
|
|
123
|
+
step: CenterStep;
|
|
124
|
+
kind?: ViewKind;
|
|
125
|
+
}): import('@dineug/r-html').AnyAction<{
|
|
126
|
+
step: CenterStep;
|
|
127
|
+
kind?: ViewKind;
|
|
128
|
+
}>;
|
|
129
|
+
toString(): string;
|
|
130
|
+
type: string;
|
|
131
|
+
};
|
|
121
132
|
export declare const changeVisualizationModeAction: {
|
|
122
133
|
(payload: {
|
|
123
134
|
value: import('./state').VisualizationMode;
|
|
@@ -138,6 +149,7 @@ export declare const viewReducers: {
|
|
|
138
149
|
"editor.viewSetLayout": ReducerType<"editor.viewSetLayout">;
|
|
139
150
|
"editor.viewChangeShowMode": ReducerType<"editor.viewChangeShowMode">;
|
|
140
151
|
"editor.viewSetCenters": ReducerType<"editor.viewSetCenters">;
|
|
152
|
+
"editor.viewStepCenters": ReducerType<"editor.viewStepCenters">;
|
|
141
153
|
"editor.changeVisualizationMode": ReducerType<"editor.changeVisualizationMode">;
|
|
142
154
|
};
|
|
143
155
|
export declare const viewActions: {
|
|
@@ -257,6 +269,17 @@ export declare const viewActions: {
|
|
|
257
269
|
toString(): string;
|
|
258
270
|
type: string;
|
|
259
271
|
};
|
|
272
|
+
viewStepCentersAction: {
|
|
273
|
+
(payload: {
|
|
274
|
+
step: CenterStep;
|
|
275
|
+
kind?: ViewKind;
|
|
276
|
+
}): import('@dineug/r-html').AnyAction<{
|
|
277
|
+
step: CenterStep;
|
|
278
|
+
kind?: ViewKind;
|
|
279
|
+
}>;
|
|
280
|
+
toString(): string;
|
|
281
|
+
type: string;
|
|
282
|
+
};
|
|
260
283
|
changeVisualizationModeAction: {
|
|
261
284
|
(payload: {
|
|
262
285
|
value: import('./state').VisualizationMode;
|
|
@@ -19,6 +19,14 @@ export declare const isViewShown: (state: RootState, kind: ViewSource) => boolea
|
|
|
19
19
|
* never the active one, so an export of the document is never drawn from a view.
|
|
20
20
|
*/
|
|
21
21
|
export declare const getSourceView: (state: RootState, source: GeometrySource) => SceneView | null;
|
|
22
|
+
/** Whether two center sets name the same tables in the same order, which frame a view alike. */
|
|
23
|
+
export declare const isSameCenters: (a: string[], b: string[]) => boolean;
|
|
24
|
+
/**
|
|
25
|
+
* What a step to the centers given stands the view on: those of the tables given
|
|
26
|
+
* that it names, none standing for the whole document. Null where the step passes
|
|
27
|
+
* them over, all their tables gone or what is left the centers the view stands on.
|
|
28
|
+
*/
|
|
29
|
+
export declare function toSteppedCenters(tableIds: ReadonlySet<string>, view: SceneView, centerIds: string[]): string[] | null;
|
|
22
30
|
/**
|
|
23
31
|
* A view just opened: nothing placed yet, the neutral placement a fit will
|
|
24
32
|
* replace, and the display its centers ask for. Narrowed to a few tables it
|
|
@@ -3,12 +3,18 @@ import { RootState } from '../../state';
|
|
|
3
3
|
import { Column, Table } from '../../../internal-types';
|
|
4
4
|
/**
|
|
5
5
|
* The start table's name and the names the end table's columns hold, which
|
|
6
|
-
* name the copies,
|
|
6
|
+
* name the copies, the document's database, which types a serial key's copy,
|
|
7
|
+
* and its domains, which the copies link.
|
|
7
8
|
*/
|
|
8
9
|
export type ForeignKeyContext = {
|
|
9
10
|
startTableName: string;
|
|
10
11
|
endColumnNames: string[];
|
|
11
12
|
database: number;
|
|
13
|
+
/**
|
|
14
|
+
* The document's domain list: a copy links its start column's domain while
|
|
15
|
+
* the list holds it and toReferenceDataType leaves the type as it was.
|
|
16
|
+
*/
|
|
17
|
+
domainIds?: string[];
|
|
12
18
|
};
|
|
13
19
|
/**
|
|
14
20
|
* The columns a relationship drawn from a table copies into the table it ends
|
|
@@ -38,8 +44,8 @@ export declare function prefixKeyName(tableName: string, keyName: string): strin
|
|
|
38
44
|
export declare function toForeignKeyNames(startTableName: string, keyNames: string[], endColumnNames: string[]): string[];
|
|
39
45
|
/**
|
|
40
46
|
* Adds a NOT NULL copy of each start column to the end table under the id at
|
|
41
|
-
* the same index of endColumnIds, named by toForeignKeyNames
|
|
42
|
-
* toReferenceDataType, with its default
|
|
47
|
+
* the same index of endColumnIds, named by toForeignKeyNames and typed by
|
|
48
|
+
* toReferenceDataType, with its default, comment, logical name and domain.
|
|
43
49
|
*/
|
|
44
|
-
export declare const toForeignKeyActions: (startColumns: Column[], endTableId: string, endColumnIds: string[], { startTableName, endColumnNames, database }: ForeignKeyContext) => AnyAction[];
|
|
50
|
+
export declare const toForeignKeyActions: (startColumns: Column[], endTableId: string, endColumnIds: string[], { startTableName, endColumnNames, database, domainIds, }: ForeignKeyContext) => AnyAction[];
|
|
45
51
|
//# sourceMappingURL=fkColumns.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Reducer } from '@dineug/r-html';
|
|
2
|
-
import { DDLScriptPosition } from '../../../constants/schema';
|
|
2
|
+
import { DDLScriptPosition, NameViewMode } from '../../../constants/schema';
|
|
3
3
|
import { EngineContext } from '../../context';
|
|
4
4
|
import { RootState } from '../../state';
|
|
5
5
|
import { ValuesType } from '../../../internal-types';
|
|
@@ -22,6 +22,7 @@ export declare const ActionType: {
|
|
|
22
22
|
readonly changeLockSettings: "settings.changeLockSettings";
|
|
23
23
|
readonly changeIgnoreSaveSettings: "settings.changeIgnoreSaveSettings";
|
|
24
24
|
readonly changeDDLScript: "settings.changeDDLScript";
|
|
25
|
+
readonly changeNameViewMode: "settings.changeNameViewMode";
|
|
25
26
|
};
|
|
26
27
|
export type ActionType = ValuesType<typeof ActionType>;
|
|
27
28
|
export type ActionMap = {
|
|
@@ -79,8 +80,8 @@ export type ActionMap = {
|
|
|
79
80
|
value: boolean;
|
|
80
81
|
/**
|
|
81
82
|
* The settings named as the sending store shows them: a lock holds them,
|
|
82
|
-
* and an unlock shows the code settings
|
|
83
|
-
* saves one value. The viewport and the tab carry none
|
|
83
|
+
* and an unlock shows the code settings and the name view among them on
|
|
84
|
+
* every peer, so each saves one value. The viewport and the tab carry none.
|
|
84
85
|
*/
|
|
85
86
|
values: Partial<RootState['settings']['lockedValues']>;
|
|
86
87
|
};
|
|
@@ -92,6 +93,15 @@ export type ActionMap = {
|
|
|
92
93
|
position: ValuesType<typeof DDLScriptPosition>;
|
|
93
94
|
value: string;
|
|
94
95
|
};
|
|
96
|
+
[ActionType.changeNameViewMode]: {
|
|
97
|
+
value: ValuesType<typeof NameViewMode>;
|
|
98
|
+
/**
|
|
99
|
+
* Whether every peer takes it: the sender's lock was off and it could
|
|
100
|
+
* edit. Otherwise only the store whose editor sent it shows it.
|
|
101
|
+
*/
|
|
102
|
+
shared: boolean;
|
|
103
|
+
editorId: string;
|
|
104
|
+
};
|
|
95
105
|
};
|
|
96
106
|
export type ReducerType<T extends keyof ActionMap> = Reducer<RootState, T, ActionMap, EngineContext>;
|
|
97
107
|
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { NameViewMode } from '../../../constants/schema';
|
|
1
2
|
import { Viewport } from '../editor/state';
|
|
2
3
|
import { RootState } from '../../state';
|
|
3
|
-
import { Point } from '../../../internal-types';
|
|
4
|
+
import { Point, ValuesType } from '../../../internal-types';
|
|
4
5
|
import { GeometrySource } from '../../../utils/draw-relationship/geometrySource';
|
|
5
6
|
import { ActionMap, ActionType, ReducerType } from './actions';
|
|
6
7
|
import { ScrollRange } from './scrollRange';
|
|
@@ -212,6 +213,11 @@ export declare const changeLockSettingsAction: {
|
|
|
212
213
|
* never following-tagged, so an unlock of one carries the unlocker's value.
|
|
213
214
|
*/
|
|
214
215
|
export declare const CodeLockSettings: number;
|
|
216
|
+
/**
|
|
217
|
+
* The locks whose unlock carries the unlocker's value onto every peer: the
|
|
218
|
+
* code settings, and the name view each reader held as its own while locked.
|
|
219
|
+
*/
|
|
220
|
+
export declare const UnlockCarriedSettings: number;
|
|
215
221
|
export declare const changeIgnoreSaveSettingsAction: {
|
|
216
222
|
(payload: {
|
|
217
223
|
saveSettingType: number;
|
|
@@ -225,15 +231,39 @@ export declare const changeIgnoreSaveSettingsAction: {
|
|
|
225
231
|
};
|
|
226
232
|
export declare const changeDDLScriptAction: {
|
|
227
233
|
(payload: {
|
|
228
|
-
position:
|
|
234
|
+
position: ValuesType<typeof import('../../../constants/schema').DDLScriptPosition>;
|
|
229
235
|
value: string;
|
|
230
236
|
}): import('@dineug/r-html').AnyAction<{
|
|
231
|
-
position:
|
|
237
|
+
position: ValuesType<typeof import('../../../constants/schema').DDLScriptPosition>;
|
|
232
238
|
value: string;
|
|
233
239
|
}>;
|
|
234
240
|
toString(): string;
|
|
235
241
|
type: string;
|
|
236
242
|
};
|
|
243
|
+
type NameViewModeValue = ValuesType<typeof NameViewMode>;
|
|
244
|
+
export declare const changeNameViewModeAction: {
|
|
245
|
+
(payload: {
|
|
246
|
+
value: ValuesType<typeof NameViewMode>;
|
|
247
|
+
shared: boolean;
|
|
248
|
+
editorId: string;
|
|
249
|
+
}): import('@dineug/r-html').AnyAction<{
|
|
250
|
+
value: ValuesType<typeof NameViewMode>;
|
|
251
|
+
shared: boolean;
|
|
252
|
+
editorId: string;
|
|
253
|
+
}>;
|
|
254
|
+
toString(): string;
|
|
255
|
+
type: string;
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* The switch a reader makes: shared while the lock is off and the store may
|
|
259
|
+
* edit, its own screen otherwise. The caller passes the store's readonly flag,
|
|
260
|
+
* which no state holds.
|
|
261
|
+
*/
|
|
262
|
+
export declare const toNameViewModeAction: (state: RootState, value: NameViewModeValue, readonly: boolean) => import('@dineug/r-html').AnyAction<{
|
|
263
|
+
value: ValuesType<typeof NameViewMode>;
|
|
264
|
+
shared: boolean;
|
|
265
|
+
editorId: string;
|
|
266
|
+
}>;
|
|
237
267
|
/**
|
|
238
268
|
* Lands the settings of a load that replaces the document: each lock through
|
|
239
269
|
* its register, a bit no lock owns taken from the load as show is, and each
|
|
@@ -259,6 +289,7 @@ export declare const settingsReducers: {
|
|
|
259
289
|
"settings.changeLockSettings": ReducerType<"settings.changeLockSettings">;
|
|
260
290
|
"settings.changeIgnoreSaveSettings": ReducerType<"settings.changeIgnoreSaveSettings">;
|
|
261
291
|
"settings.changeDDLScript": ReducerType<"settings.changeDDLScript">;
|
|
292
|
+
"settings.changeNameViewMode": ReducerType<"settings.changeNameViewMode">;
|
|
262
293
|
};
|
|
263
294
|
export declare const actions: {
|
|
264
295
|
changeDatabaseNameAction: {
|
|
@@ -430,14 +461,27 @@ export declare const actions: {
|
|
|
430
461
|
};
|
|
431
462
|
changeDDLScriptAction: {
|
|
432
463
|
(payload: {
|
|
433
|
-
position:
|
|
464
|
+
position: ValuesType<typeof import('../../../constants/schema').DDLScriptPosition>;
|
|
434
465
|
value: string;
|
|
435
466
|
}): import('@dineug/r-html').AnyAction<{
|
|
436
|
-
position:
|
|
467
|
+
position: ValuesType<typeof import('../../../constants/schema').DDLScriptPosition>;
|
|
437
468
|
value: string;
|
|
438
469
|
}>;
|
|
439
470
|
toString(): string;
|
|
440
471
|
type: string;
|
|
441
472
|
};
|
|
473
|
+
changeNameViewModeAction: {
|
|
474
|
+
(payload: {
|
|
475
|
+
value: ValuesType<typeof NameViewMode>;
|
|
476
|
+
shared: boolean;
|
|
477
|
+
editorId: string;
|
|
478
|
+
}): import('@dineug/r-html').AnyAction<{
|
|
479
|
+
value: ValuesType<typeof NameViewMode>;
|
|
480
|
+
shared: boolean;
|
|
481
|
+
editorId: string;
|
|
482
|
+
}>;
|
|
483
|
+
toString(): string;
|
|
484
|
+
type: string;
|
|
485
|
+
};
|
|
442
486
|
};
|
|
443
487
|
//# sourceMappingURL=atom.actions.d.ts.map
|
|
@@ -20,8 +20,8 @@ export type PinchZoom = {
|
|
|
20
20
|
export declare const pinchZoomAction$: ({ zoomLevel, screen, scene }: PinchZoom, source?: GeometrySource) => GeneratorAction;
|
|
21
21
|
/**
|
|
22
22
|
* Locks the settings named at what they hold now, or unlocks them carrying the
|
|
23
|
-
* code settings among them as they show here. A canvas type
|
|
24
|
-
* Settings tab holds the tab the reader came from.
|
|
23
|
+
* code settings and the name view among them as they show here. A canvas type
|
|
24
|
+
* locked on the Settings tab holds the tab the reader came from.
|
|
25
25
|
*/
|
|
26
26
|
export declare const changeLockSettingsAction$: (lockSettingType: number, value: boolean) => GeneratorAction;
|
|
27
27
|
export declare const actions$: {
|
|
@@ -13,6 +13,8 @@ export declare const ActionType: {
|
|
|
13
13
|
readonly changeTableGroup: "table.changeGroup";
|
|
14
14
|
readonly changeZIndex: "table.changeZIndex";
|
|
15
15
|
readonly sortTable: "table.sort";
|
|
16
|
+
readonly changeTableLogicalName: "table.changeLogicalName";
|
|
17
|
+
readonly changeTableNameDerived: "table.changeNameDerived";
|
|
16
18
|
};
|
|
17
19
|
export type ActionType = ValuesType<typeof ActionType>;
|
|
18
20
|
export type ActionMap = {
|
|
@@ -57,6 +59,11 @@ export type ActionMap = {
|
|
|
57
59
|
zIndex: number;
|
|
58
60
|
};
|
|
59
61
|
[ActionType.sortTable]: void;
|
|
62
|
+
[ActionType.changeTableLogicalName]: ChangeTableValuePayload;
|
|
63
|
+
[ActionType.changeTableNameDerived]: {
|
|
64
|
+
id: string;
|
|
65
|
+
value: boolean;
|
|
66
|
+
};
|
|
60
67
|
};
|
|
61
68
|
export type ReducerType<T extends keyof ActionMap> = Reducer<RootState, T, ActionMap, EngineContext>;
|
|
62
69
|
type ChangeTableValuePayload = {
|