@dineug/erd-editor 3.9.2 → 4.0.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 +321 -133
- package/dist/components/appContext.d.ts +4 -0
- package/dist/components/erd/Erd.d.ts +4 -0
- package/dist/components/erd/automatic-table-placement/AutomaticTablePlacement.d.ts +2 -1
- package/dist/components/erd/automatic-table-placement/createAutomaticTablePlacement.d.ts +38 -2
- package/dist/components/erd/automatic-table-placement/elkPlacement.d.ts +42 -0
- package/dist/components/erd/automatic-table-placement/flowPlacement.d.ts +21 -0
- package/dist/components/erd/automatic-table-placement/placementActions.d.ts +14 -0
- package/dist/components/erd/automatic-table-placement/runElkPlacement.d.ts +0 -11
- package/dist/components/erd/canvas/SceneIcon.template.d.ts +2 -2
- package/dist/components/erd/canvas/entityDrag.d.ts +17 -1
- package/dist/components/erd/canvas/middleButtonPan.d.ts +11 -0
- package/dist/components/erd/canvas/relationship-group/relationship/Relationship.d.ts +2 -0
- package/dist/components/erd/canvas/relationship-group/relationship/RelationshipActionLabel.d.ts +32 -0
- package/dist/components/erd/canvas/sceneTokens.d.ts +38 -0
- package/dist/components/erd/canvas/table/Table.d.ts +9 -1
- package/dist/components/erd/canvas/table/cellLayout.d.ts +11 -0
- package/dist/components/erd/canvas/table/column/Column.d.ts +7 -0
- package/dist/components/erd/canvas/table/doubleClick.d.ts +3 -4
- package/dist/components/erd/canvas/table/goToErd.d.ts +3 -10
- package/dist/components/erd/canvas/table-group/TableGroup.d.ts +17 -0
- package/dist/components/erd/canvas/table-group/TableGroupBody.d.ts +17 -0
- package/dist/components/erd/canvas/table-group/TableGroupDropTarget.d.ts +10 -0
- package/dist/components/erd/canvas/table-group/TableGroupSash.d.ts +35 -0
- package/dist/components/erd/canvas/table-group/TableGroups.d.ts +10 -0
- package/dist/components/erd/canvas/table-group/tableGroupBox.d.ts +40 -0
- package/dist/components/erd/canvas/table-group/titleLayout.d.ts +45 -0
- package/dist/components/erd/canvas/useMoveEntity.d.ts +2 -0
- package/dist/components/erd/draw-target/DrawTargetButtons.d.ts +16 -0
- package/dist/components/erd/draw-target/DrawTargetButtons.styles.d.ts +14 -0
- package/dist/components/erd/draw-target/drawTargetState.d.ts +26 -0
- package/dist/components/erd/draw-target/findDrawTarget.d.ts +29 -0
- package/dist/components/erd/draw-target/placePill.d.ts +49 -0
- package/dist/components/erd/erd-context-menu/ErdContextMenu.d.ts +6 -0
- package/dist/components/erd/erd-context-menu/menus/drawRelationshipMenus.d.ts +3 -0
- package/dist/components/erd/erd-context-menu/menus/exportMenus.d.ts +7 -2
- package/dist/components/erd/erd-context-menu/menus/importMenus.d.ts +5 -1
- package/dist/components/erd/erd-context-menu/menus/relationshipMenus.d.ts +16 -1
- package/dist/components/erd/erd-context-menu/menus/showMenus.d.ts +3 -1
- package/dist/components/erd/erd-context-menu/menus/tablePlacementMenus.d.ts +3 -0
- package/dist/components/erd/floating-toolbar/ToolbarCompass.template.d.ts +3 -1
- package/dist/components/erd/goToErdTarget.d.ts +85 -0
- package/dist/components/erd/hitTest.d.ts +16 -1
- package/dist/components/erd/minimap/MinimapScene.d.ts +1 -1
- package/dist/components/erd/minimap/table/Table.d.ts +3 -3
- package/dist/components/erd/minimap/table-group/TableGroup.d.ts +17 -0
- package/dist/components/erd/table-group/TableGroupDraft.d.ts +15 -0
- package/dist/components/erd/table-group/TableGroupDraft.styles.d.ts +6 -0
- package/dist/components/erd/table-group/tableGroupName.d.ts +21 -0
- package/dist/components/erd/table-group/useTableGroupDraw.d.ts +25 -0
- package/dist/components/erd/table-properties/TableProperties.d.ts +2 -0
- package/dist/components/erd/table-properties/TableProperties.styles.d.ts +24 -2
- package/dist/components/erd/table-properties/table-properties-indexes/TablePropertiesIndexes.d.ts +2 -0
- package/dist/components/erd/table-properties/table-properties-indexes/TablePropertiesIndexes.styles.d.ts +32 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-checkbox-column/IndexesCheckboxColumn.d.ts +7 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-checkbox-column/IndexesCheckboxColumn.styles.d.ts +5 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-column/IndexesColumn.d.ts +7 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-column/IndexesColumn.styles.d.ts +3 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-index/IndexesIndex.d.ts +7 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-index/IndexesIndex.styles.d.ts +6 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-key/IndexesKey.d.ts +21 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-key/IndexesKey.styles.d.ts +13 -0
- package/dist/components/erd/table-properties/table-properties-tabs/TablePropertiesTabs.d.ts +3 -0
- package/dist/components/erd/welcome-screen/WelcomeScreen.d.ts +17 -0
- package/dist/components/erd/welcome-screen/WelcomeScreen.styles.d.ts +17 -0
- package/dist/components/erd/welcome-screen/welcome-hints/WelcomeHints.d.ts +21 -0
- package/dist/components/erd/welcome-screen/welcome-hints/WelcomeHints.styles.d.ts +14 -0
- package/dist/components/erd/welcome-screen/welcome-hints/hintArrows.d.ts +10 -0
- package/dist/components/erd/welcome-screen/welcomeLayout.d.ts +87 -0
- package/dist/components/erd-editor/ErdEditor.d.ts +67 -7
- package/dist/components/erd-editor/useErdEditorAttachElement.d.ts +14 -1
- package/dist/components/export-image/ExportImage.d.ts +23 -0
- package/dist/components/export-image/ExportImage.styles.d.ts +34 -0
- package/dist/components/export-image/exportImageActions.d.ts +48 -0
- package/dist/components/find-replace/FindReplace.d.ts +13 -0
- package/dist/components/find-replace/FindReplace.styles.d.ts +27 -0
- package/dist/components/find-replace/fieldIcon.d.ts +5 -0
- package/dist/components/find-replace/matchTarget.d.ts +26 -0
- package/dist/components/find-replace/panelLayout.d.ts +20 -0
- package/dist/components/generator-code/GeneratorCode.d.ts +1 -0
- package/dist/components/generator-code/generator-code-context-menu/GeneratorCodeContextMenu.d.ts +3 -0
- package/dist/components/generator-code/generator-code-context-menu/menus/columnNameCaseMenus.d.ts +3 -0
- package/dist/components/generator-code/generator-code-context-menu/menus/languageMenus.d.ts +8 -0
- package/dist/components/generator-code/generator-code-context-menu/menus/tableNameCaseMenus.d.ts +3 -0
- package/dist/components/generator-code/generator-code-options/GeneratorCodeOptions.d.ts +17 -0
- package/dist/components/generator-code/generator-code-options/GeneratorCodeOptions.styles.d.ts +5 -0
- package/dist/components/generator-code/generatorCodeView.d.ts +12 -0
- package/dist/components/generator-code/languageSettings.d.ts +14 -0
- package/dist/components/locale-picker/LocalePicker.d.ts +13 -0
- package/dist/components/locale-picker/LocalePicker.styles.d.ts +19 -0
- package/dist/components/localeContext.d.ts +10 -0
- package/dist/components/localized/Localized.d.ts +18 -0
- package/dist/components/map-columns/MapColumnsBody.d.ts +24 -0
- package/dist/components/map-columns/MapColumnsDialog.d.ts +13 -0
- package/dist/components/map-columns/MapColumnsDialog.styles.d.ts +38 -0
- package/dist/components/map-columns/mapColumnsAction.d.ts +13 -0
- package/dist/components/map-columns/nameOf.d.ts +6 -0
- package/dist/components/map-columns/openMapColumns.d.ts +9 -0
- package/dist/components/primitives/code-block/CodeBlock.d.ts +6 -1
- package/dist/components/primitives/code-block/CodeBlock.styles.d.ts +2 -0
- package/dist/components/primitives/color-picker/ColorPicker.d.ts +10 -1
- package/dist/components/primitives/color-picker/ColorPicker.styles.d.ts +25 -0
- package/dist/components/primitives/color-picker/colorModel.d.ts +36 -0
- package/dist/components/primitives/color-picker/presetColors.d.ts +13 -0
- package/dist/components/primitives/color-picker/resolveColor.d.ts +7 -0
- package/dist/components/primitives/context-menu/ContextMenu.d.ts +2 -0
- package/dist/components/primitives/context-menu/context-menu-content/ContextMenuContent.d.ts +1 -0
- package/dist/components/primitives/context-menu/context-menu-content/fitMenu.d.ts +4 -4
- package/dist/components/primitives/context-menu/context-menu-separator/ContextMenuSeparator.d.ts +8 -0
- package/dist/components/primitives/context-menu/context-menu-separator/ContextMenuSeparator.styles.d.ts +2 -0
- package/dist/components/primitives/context-menu/menu/Menu.d.ts +2 -0
- package/dist/components/primitives/context-menu/submenu-chevron/SubmenuChevron.d.ts +5 -0
- package/dist/components/primitives/dialog/Dialog.d.ts +21 -0
- package/dist/components/primitives/dialog/Dialog.styles.d.ts +12 -0
- package/dist/components/primitives/highlighted-text/HighlightedText.d.ts +2 -5
- package/dist/components/primitives/icon/icons.d.ts +27 -1
- package/dist/components/primitives/select/Select.d.ts +18 -0
- package/dist/components/primitives/select/Select.styles.d.ts +13 -0
- package/dist/components/primitives/text-input/TextInput.d.ts +2 -0
- package/dist/components/primitives/toast/Toast.d.ts +5 -1
- package/dist/components/primitives/toast/Toast.styles.d.ts +2 -2
- package/dist/components/quick-search/QuickSearch.d.ts +2 -1
- package/dist/components/quick-search/QuickSearch.styles.d.ts +6 -0
- package/dist/components/quick-search/actions.d.ts +60 -2
- package/dist/components/quick-search/hangul.d.ts +79 -0
- package/dist/components/quick-search/paletteQuery.d.ts +38 -0
- package/dist/components/quick-search/scopedActions.d.ts +42 -0
- package/dist/components/schema-sql/SchemaSQL.d.ts +2 -0
- package/dist/components/schema-sql/SchemaSQL.styles.d.ts +7 -0
- package/dist/components/schema-sql/schema-sql-context-menu/SchemaSQLContextMenu.d.ts +3 -0
- package/dist/components/schema-sql/schema-sql-context-menu/menus/bracketMenus.d.ts +3 -0
- package/dist/components/schema-sql/schema-sql-context-menu/menus/headerMenus.d.ts +29 -0
- package/dist/components/schema-sql/schema-sql-context-menu/menus/statementsMenus.d.ts +27 -0
- package/dist/components/schema-sql/schema-sql-options/SchemaSQLOptions.d.ts +24 -0
- package/dist/components/schema-sql/schema-sql-options/SchemaSQLOptions.styles.d.ts +45 -0
- package/dist/components/schema-sql/schema-sql-options/ScriptEditor.d.ts +20 -0
- package/dist/components/schema-sql/schema-sql-options/ScriptEditor.styles.d.ts +13 -0
- package/dist/components/schema-sql/schema-sql-options/dropWarning.d.ts +8 -0
- package/dist/components/schema-sql/schemaSQLView.d.ts +71 -0
- package/dist/components/settings/Settings.styles.d.ts +7 -0
- package/dist/components/settings/columnTypeLabels.d.ts +8 -0
- package/dist/components/settings/lockSettingRows.d.ts +16 -0
- package/dist/components/settings/settings-lnb/SettingsLnb.d.ts +3 -0
- package/dist/components/settings/settingsPage.d.ts +10 -0
- package/dist/components/theme-builder/ThemeBuilder.d.ts +9 -1
- package/dist/components/theme-builder/ThemeBuilder.styles.d.ts +8 -5
- package/dist/components/toast-container/openStatusToast.d.ts +29 -0
- package/dist/components/toast-container/openToastWhileRunning.d.ts +1 -1
- package/dist/components/toolbar/Toolbar.d.ts +1 -0
- package/dist/components/visualization/graph-node/GraphNode.d.ts +2 -2
- package/dist/components/visualization/graphPan.d.ts +12 -0
- package/dist/components/visualization/table/column/Column.d.ts +4 -0
- package/dist/components/visualization/visualizationView.d.ts +2 -2
- package/dist/constants/language.d.ts +1 -1
- package/dist/constants/layout.d.ts +47 -0
- package/dist/constants/open.d.ts +4 -0
- package/dist/constants/schema.d.ts +38 -4
- package/dist/constants/sql/dataType/PostgreSQL.d.ts +2 -1
- package/dist/constants/sql/dataType/SQLite.d.ts +3 -1
- package/dist/engine/actions.d.ts +20 -2
- package/dist/engine/context.d.ts +6 -0
- package/dist/engine/index.d.ts +1 -1
- package/dist/engine/index.js +29 -18
- package/dist/engine/modules/editor/actions.d.ts +10 -2
- package/dist/engine/modules/editor/atom.actions.d.ts +49 -11
- package/dist/engine/modules/editor/generator.actions.d.ts +107 -8
- package/dist/engine/modules/editor/state.d.ts +16 -3
- package/dist/engine/modules/editor/utils/color.d.ts +21 -0
- package/dist/engine/modules/editor/utils/duplicate.d.ts +28 -1
- package/dist/engine/modules/editor/utils/focus.d.ts +16 -0
- package/dist/engine/modules/editor/utils/releaseHidden.d.ts +16 -0
- package/dist/engine/modules/editor/utils/selection.d.ts +12 -0
- package/dist/engine/modules/relationship/actions.d.ts +19 -0
- package/dist/engine/modules/relationship/atom.actions.d.ts +111 -1
- package/dist/engine/modules/relationship/endFlags.d.ts +14 -0
- package/dist/engine/modules/relationship/fkColumns.d.ts +40 -4
- package/dist/engine/modules/relationship/generator.actions.d.ts +5 -2
- package/dist/engine/modules/relationship/history.d.ts +3 -0
- package/dist/engine/modules/relationship/referenceType.d.ts +12 -0
- package/dist/engine/modules/settings/actions.d.ts +17 -4
- package/dist/engine/modules/settings/atom.actions.d.ts +63 -19
- package/dist/engine/modules/settings/generator.actions.d.ts +7 -0
- package/dist/engine/modules/settings/history.d.ts +1 -0
- package/dist/engine/modules/table/actions.d.ts +8 -0
- package/dist/engine/modules/table/atom.actions.d.ts +31 -0
- package/dist/engine/modules/table/generator.actions.d.ts +3 -3
- package/dist/engine/modules/table/history.d.ts +1 -0
- package/dist/engine/modules/table-column/generator.actions.d.ts +8 -0
- package/dist/engine/modules/table-column/keys.d.ts +14 -0
- package/dist/engine/modules/table-column/utils/dataType.d.ts +19 -1
- package/dist/engine/modules/table-group/actions.d.ts +63 -0
- package/dist/engine/modules/table-group/atom.actions.d.ts +238 -0
- package/dist/engine/modules/table-group/generator.actions.d.ts +111 -0
- package/dist/engine/modules/table-group/history.d.ts +13 -0
- package/dist/engine/peer-store.d.ts +9 -3
- package/dist/engine/replication-store.d.ts +18 -1
- package/dist/engine/rx-operators/groupByStreamActions.d.ts +5 -1
- package/dist/engine/rx-operators/lockIgnoreFilter.d.ts +8 -0
- package/dist/engine/rx-store.d.ts +2 -0
- package/dist/engine/settle.d.ts +9 -0
- package/dist/erd-editor.umd.js +2523 -4060
- package/dist/hooks/useNavigatorLanguages.d.ts +7 -0
- package/dist/i18n/locales.d.ts +126 -0
- package/dist/i18n/menuLabel.d.ts +12 -0
- package/dist/i18n/messages/ar-SA.d.ts +399 -0
- package/dist/i18n/messages/de-DE.d.ts +375 -0
- package/dist/i18n/messages/en/code.d.ts +17 -0
- package/dist/i18n/messages/en/colorPicker.d.ts +35 -0
- package/dist/i18n/messages/en/common.d.ts +65 -0
- package/dist/i18n/messages/en/contextMenu.d.ts +29 -0
- package/dist/i18n/messages/en/exportImage.d.ts +25 -0
- package/dist/i18n/messages/en/feedback.d.ts +11 -0
- package/dist/i18n/messages/en/findReplace.d.ts +36 -0
- package/dist/i18n/messages/en/floatingToolbar.d.ts +12 -0
- package/dist/i18n/messages/en/index.d.ts +378 -0
- package/dist/i18n/messages/en/mapColumns.d.ts +39 -0
- package/dist/i18n/messages/en/palette.d.ts +40 -0
- package/dist/i18n/messages/en/schemaSql.d.ts +28 -0
- package/dist/i18n/messages/en/settings.d.ts +22 -0
- package/dist/i18n/messages/en/shortcuts.d.ts +32 -0
- package/dist/i18n/messages/en/tableProperties.d.ts +34 -0
- package/dist/i18n/messages/en/themeBuilder.d.ts +7 -0
- package/dist/i18n/messages/en/toolbar.d.ts +9 -0
- package/dist/i18n/messages/en/visualization.d.ts +12 -0
- package/dist/i18n/messages/en/welcome.d.ts +13 -0
- package/dist/i18n/messages/es-ES.d.ts +381 -0
- package/dist/i18n/messages/eu-ES.d.ts +375 -0
- package/dist/i18n/messages/fa-IR.d.ts +375 -0
- package/dist/i18n/messages/fr-FR.d.ts +381 -0
- package/dist/i18n/messages/he-IL.d.ts +381 -0
- package/dist/i18n/messages/id-ID.d.ts +369 -0
- package/dist/i18n/messages/index.d.ts +11 -0
- package/dist/i18n/messages/it-IT.d.ts +381 -0
- package/dist/i18n/messages/ja-JP.d.ts +369 -0
- package/dist/i18n/messages/ko-KR.d.ts +369 -0
- package/dist/i18n/messages/nl-NL.d.ts +375 -0
- package/dist/i18n/messages/pl-PL.d.ts +387 -0
- package/dist/i18n/messages/pt-BR.d.ts +381 -0
- package/dist/i18n/messages/pt-PT.d.ts +381 -0
- package/dist/i18n/messages/ro-RO.d.ts +381 -0
- package/dist/i18n/messages/ru-RU.d.ts +387 -0
- package/dist/i18n/messages/sk-SK.d.ts +387 -0
- package/dist/i18n/messages/sl-SI.d.ts +387 -0
- package/dist/i18n/messages/sv-SE.d.ts +375 -0
- package/dist/i18n/messages/tr-TR.d.ts +375 -0
- package/dist/i18n/messages/uk-UA.d.ts +387 -0
- package/dist/i18n/messages/zh-CN.d.ts +369 -0
- package/dist/i18n/messages/zh-TW.d.ts +369 -0
- package/dist/i18n/resolveLocale.d.ts +11 -0
- package/dist/i18n/source.d.ts +7 -0
- package/dist/i18n/translate.d.ts +58 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +28966 -11220
- package/dist/internal-types/index.d.ts +2 -4
- package/dist/konva/scene/contentBounds.d.ts +18 -12
- package/dist/konva/scene/metrics.d.ts +7 -0
- package/dist/konva/scene/renderScene.d.ts +10 -4
- package/dist/konva/scene/stacking.d.ts +21 -0
- package/dist/konva/scene/viewLayout.d.ts +2 -1
- package/dist/loadValue-B3EFSe9k.js +12925 -0
- package/dist/peer/index.d.ts +6 -3
- package/dist/peer/index.js +87 -83
- package/dist/services/elk-layout/elkGraph.d.ts +6 -4
- package/dist/services/elk-layout/elkLayoutOptions.d.ts +20 -0
- package/dist/services/elk-layout/elkLayoutService.d.ts +3 -3
- package/dist/services/export-png/ExportScene.d.ts +3 -3
- package/dist/services/export-png/documentScene.d.ts +14 -9
- package/dist/services/export-png/exportBox.d.ts +40 -5
- package/dist/services/export-png/exportPngService.d.ts +15 -0
- package/dist/services/export-png/exportTheme.d.ts +26 -0
- package/dist/services/export-png/index.d.ts +44 -11
- package/dist/services/export-png/renderPng.d.ts +18 -10
- package/dist/services/export-png/renderSvg.d.ts +22 -0
- package/dist/services/export-png/sceneSvg.d.ts +54 -0
- package/dist/services/shiki/graphqlGrammar.d.ts +8 -0
- package/dist/shared-store-fUggY7sI.js +1341 -0
- package/dist/themes/radix-ui-theme.d.ts +11 -3
- package/dist/themes/tokens.d.ts +9 -0
- package/dist/utils/calcTable.d.ts +18 -1
- package/dist/utils/clipboard.d.ts +9 -0
- package/dist/utils/collection/tableGroup.entity.d.ts +3 -0
- package/dist/utils/contrastText.d.ts +21 -0
- package/dist/utils/deepMerge.d.ts +8 -0
- package/dist/utils/device-detect/index.d.ts +2 -6
- package/dist/utils/domEvent.d.ts +18 -0
- package/dist/utils/dragSelect.d.ts +2 -0
- package/dist/utils/draw-relationship/bezier.d.ts +2 -0
- package/dist/utils/draw-relationship/corner.d.ts +9 -0
- package/dist/utils/draw-relationship/index.d.ts +18 -18
- package/dist/utils/draw-relationship/loop.d.ts +29 -0
- package/dist/utils/draw-relationship/pathFinding.d.ts +1 -1
- package/dist/utils/draw-relationship/sort.d.ts +8 -1
- package/dist/utils/draw-relationship/stub.d.ts +4 -3
- package/dist/utils/emitter.d.ts +64 -4
- package/dist/utils/file/exportFile.d.ts +15 -5
- package/dist/utils/file/importFile.d.ts +9 -5
- package/dist/utils/file/importSchema.d.ts +45 -0
- package/dist/utils/find-replace/findMatches.d.ts +90 -0
- package/dist/utils/find-replace/index.d.ts +5 -0
- package/dist/utils/find-replace/matcher.d.ts +53 -0
- package/dist/utils/find-replace/present.d.ts +24 -0
- package/dist/utils/find-replace/replaceActions.d.ts +20 -0
- package/dist/utils/generator-code/columnTypes.d.ts +99 -0
- package/dist/utils/generator-code/doctrine.d.ts +6 -0
- package/dist/utils/generator-code/doctrineReservedWords.d.ts +7 -0
- package/dist/utils/generator-code/graphql.d.ts +6 -0
- package/dist/utils/generator-code/heck.d.ts +5 -0
- package/dist/utils/generator-code/java.d.ts +28 -0
- package/dist/utils/generator-code/jsonSchema.d.ts +50 -0
- package/dist/utils/generator-code/jsonShape.d.ts +37 -0
- package/dist/utils/generator-code/kotlin.d.ts +1 -0
- package/dist/utils/generator-code/mermaid.d.ts +5 -0
- package/dist/utils/generator-code/php.d.ts +28 -0
- package/dist/utils/generator-code/rust.d.ts +13 -0
- package/dist/utils/generator-code/rustTypes.d.ts +44 -0
- package/dist/utils/generator-code/scala.d.ts +1 -0
- package/dist/utils/generator-code/seaorm.d.ts +22 -0
- package/dist/utils/generator-code/swift.d.ts +44 -0
- package/dist/utils/generator-code/utils.d.ts +31 -1
- package/dist/utils/generator-code/zod.d.ts +25 -0
- package/dist/utils/globalEventObservable.d.ts +10 -1
- package/dist/utils/highlightWords.d.ts +29 -0
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/keyboard-shortcut/bindKeys.d.ts +9 -0
- package/dist/utils/keyboard-shortcut/index.d.ts +15 -1
- package/dist/utils/keyboard-shortcut/utils.d.ts +21 -0
- package/dist/utils/loadValue.d.ts +7 -0
- package/dist/utils/map-columns/alignTypes.d.ts +37 -0
- package/dist/utils/map-columns/buildRows.d.ts +102 -0
- package/dist/utils/map-columns/candidateKeys.d.ts +24 -0
- package/dist/utils/map-columns/index.d.ts +8 -0
- package/dist/utils/map-columns/mapping.d.ts +67 -0
- package/dist/utils/map-columns/prefill.d.ts +26 -0
- package/dist/utils/map-columns/toMapColumnsActions.d.ts +10 -0
- package/dist/utils/map-columns/validate.d.ts +45 -0
- package/dist/utils/memo.d.ts +4 -0
- package/dist/utils/referentialAction.d.ts +21 -0
- package/dist/utils/schema-aml-parser/types.d.ts +8 -0
- package/dist/utils/schema-dbml-parser/tokenizer.d.ts +2 -0
- package/dist/utils/schema-dbml-parser/types.d.ts +14 -0
- package/dist/utils/schema-sql/Databricks.d.ts +13 -3
- package/dist/utils/schema-sql/MSSQL.d.ts +19 -2
- package/dist/utils/schema-sql/MariaDB.d.ts +10 -4
- package/dist/utils/schema-sql/MySQL.d.ts +18 -4
- package/dist/utils/schema-sql/Oracle.d.ts +23 -4
- package/dist/utils/schema-sql/PostgreSQL.d.ts +16 -4
- package/dist/utils/schema-sql/SQLite.d.ts +16 -4
- package/dist/utils/schema-sql/Snowflake.d.ts +8 -3
- package/dist/utils/schema-sql/index.d.ts +21 -1
- package/dist/utils/schema-sql/options.d.ts +57 -0
- package/dist/utils/schema-sql/utils.d.ts +120 -2
- package/dist/utils/schema-sql-parser/index.d.ts +5 -1
- package/dist/utils/stageCursor.d.ts +20 -0
- package/dist/utils/table-clipboard/payload.d.ts +3 -0
- package/dist/utils/table-clipboard/placement.d.ts +2 -0
- package/dist/utils/tableColor.d.ts +29 -0
- package/dist/utils/tableGroup.d.ts +142 -0
- package/dist/utils/tableKeys.d.ts +54 -0
- package/dist/workers/elkLayout.shared-worker.js +1 -1
- package/dist/workers/exportPng.shared-worker.js +30 -28
- package/dist/workers/shiki.shared-worker.js +1 -1
- package/dist/workers/spawn.d.ts +1 -2
- package/dist/workers/spawn.inline.d.ts +0 -1
- package/package.json +12 -18
- package/dist/components/generator-code/GeneratorCode.styles.d.ts +0 -2
- package/dist/schemaGCService-BagQ1wfF.js +0 -38
- package/dist/services/schema-gc/index.d.ts +0 -18
- package/dist/services/schema-gc/procGC.d.ts +0 -4
- package/dist/services/schema-gc/schemaGC.shared-worker.d.ts +0 -2
- package/dist/services/schema-gc/schemaGCService.d.ts +0 -5
- package/dist/shared-store-BqPSXAEf.js +0 -1072
- package/dist/store-hooks-DuzDVhPy.js +0 -10282
- package/dist/styles/colorPicker.style.d.ts +0 -7
- package/dist/utils/draw-relationship/chamfer.d.ts +0 -3
- package/dist/workers/schemaGC.shared-worker.js +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DataTypeHint, PrimitiveType } from '../../constants/sql/dataType';
|
|
2
|
-
import { Column, Table } from '../../internal-types';
|
|
2
|
+
import { Column, Relationship, Table } from '../../internal-types';
|
|
3
|
+
import { ReferentialActionSupport } from '../schema-sql/utils';
|
|
3
4
|
export interface FormatTableOptions {
|
|
4
5
|
buffer: string[];
|
|
5
6
|
table: Table;
|
|
@@ -14,7 +15,36 @@ export interface FormatRelationOptions {
|
|
|
14
15
|
}
|
|
15
16
|
export declare const hasOneRelationship: (value: number) => boolean;
|
|
16
17
|
export declare const hasNRelationship: (value: number) => boolean;
|
|
18
|
+
/** The ECMAScript line terminators, CR LF one of them, where a line comment ends. */
|
|
19
|
+
export declare const LINE_TERMINATOR: RegExp;
|
|
17
20
|
export declare function getPrimitiveType(dataType: string, database: number): PrimitiveType;
|
|
21
|
+
/** The vendor list entry a data type names, the longest that prefixes it. */
|
|
22
|
+
export declare function findDataTypeHint(dataType: string, database: number): DataTypeHint | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* The precision and scale of an Oracle or Snowflake NUMBER with a scale, which
|
|
25
|
+
* the vendor lists file under long with every other NUMBER; a star is 38.
|
|
26
|
+
*/
|
|
27
|
+
export declare function fractionalNumber(dataType: string, database: number): [precision: number, scale: number] | null;
|
|
28
|
+
/** The type name in lower case, with its argument lists and extra spaces gone. */
|
|
29
|
+
export declare function baseTypeName(dataType: string): string;
|
|
30
|
+
/** A text split into its lines at every ECMAScript line terminator. */
|
|
31
|
+
export declare function splitLines(value: string): string[];
|
|
32
|
+
/**
|
|
33
|
+
* A line comment's text with a backslash before its at sign where it opens with
|
|
34
|
+
* one and ts-, after any white space and in any case, so the line stays legible
|
|
35
|
+
* and TypeScript reads no directive in it, which would hide or expect an error.
|
|
36
|
+
*/
|
|
37
|
+
export declare function escapeTypeScriptDirective(line: string): string;
|
|
18
38
|
export declare function getDataTypeHints(database: number): DataTypeHint[];
|
|
19
39
|
export declare function getNameCase(name: string, nameCase: number): string;
|
|
40
|
+
export type ReferentialActionEntry = {
|
|
41
|
+
key: 'onDelete' | 'onUpdate';
|
|
42
|
+
action: number;
|
|
43
|
+
sql: string;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* The actions a relationship sets, ON DELETE first, each with its SQL spelling;
|
|
47
|
+
* with a support, only those the database's DDL would write too.
|
|
48
|
+
*/
|
|
49
|
+
export declare function referentialActionEntries({ onDelete, onUpdate }: Pick<Relationship, 'onDelete' | 'onUpdate'>, support?: ReferentialActionSupport): ReferentialActionEntry[];
|
|
20
50
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Table } from '../../internal-types';
|
|
3
|
+
import { JsonShape } from './jsonShape';
|
|
4
|
+
import { FormatTableOptions } from './utils';
|
|
5
|
+
/** Every table's row schema and its inferred type, under one import line. */
|
|
6
|
+
export declare function createCode(state: RootState): string;
|
|
7
|
+
/** One table under the import line, so its file compiles on its own. */
|
|
8
|
+
export declare function createTableCode(state: RootState, table: Table): string;
|
|
9
|
+
export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
|
|
10
|
+
/** A value's Zod schema, one z.array around it for each array dimension. */
|
|
11
|
+
export declare function toZodSchema(shape: JsonShape): string;
|
|
12
|
+
/**
|
|
13
|
+
* A name a type alias may not take, z included, gets an underscore after it;
|
|
14
|
+
* any other name, one that is no identifier or a repeated one included, is
|
|
15
|
+
* written as is.
|
|
16
|
+
*/
|
|
17
|
+
export declare function toZodTypeName(name: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* A property key as an object literal writes it; __proto__ is computed, since
|
|
20
|
+
* written plainly or quoted it would set the object's prototype instead.
|
|
21
|
+
*/
|
|
22
|
+
export declare function toZodPropertyKey(name: string): string;
|
|
23
|
+
/** A comment as line comments, one for each of its lines, none a TypeScript directive. */
|
|
24
|
+
export declare function formatComment(buffer: string[], indent: string, comment: string): void;
|
|
25
|
+
//# sourceMappingURL=zod.d.ts.map
|
|
@@ -11,12 +11,21 @@ export declare const animationFrames$: Observable<{
|
|
|
11
11
|
elapsed: number;
|
|
12
12
|
}>;
|
|
13
13
|
export declare const moveStart$: Observable<MouseEvent | TouchEvent>;
|
|
14
|
+
/**
|
|
15
|
+
* The middle presses a scene pan stopped below a target, read off the forward
|
|
16
|
+
* each one hands the move stream: a listener above the stage container that
|
|
17
|
+
* closes on any press hears a middle press there only this way.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* addUnsubscribe(middlePanPress$(root).subscribe(handleOutsidePress));
|
|
21
|
+
*/
|
|
22
|
+
export declare function middlePanPress$(target: EventTarget): Observable<MouseEvent>;
|
|
14
23
|
/**
|
|
15
24
|
* A gesture also ends wherever the browser takes the pointer away: a native
|
|
16
25
|
* drag swallows the rest of the stream, a cancelled pointer never lifts, and a
|
|
17
26
|
* blurred window never sees the mouseup, each leaving drag$ subscribed.
|
|
18
27
|
*/
|
|
19
|
-
export declare const moveEnd$: Observable<MouseEvent | TouchEvent |
|
|
28
|
+
export declare const moveEnd$: Observable<MouseEvent | TouchEvent | FocusEvent | PointerEvent | DragEvent>;
|
|
20
29
|
export type DragMove = {
|
|
21
30
|
movementX: number;
|
|
22
31
|
movementY: number;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TextRange } from './find-replace';
|
|
2
|
+
/** A stretch of the text, lit or plain; the chunks of one text run end to end. */
|
|
3
|
+
type Chunk = TextRange & {
|
|
4
|
+
highlight: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type FindChunksArgs = {
|
|
7
|
+
searchWords: string[];
|
|
8
|
+
textToHighlight: string;
|
|
9
|
+
/** Whether a word lights only its own letter case; false when left out. */
|
|
10
|
+
caseSensitive?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type FindAllArgs = FindChunksArgs & {
|
|
13
|
+
/** Where the text holds the words, findChunks when left out; the ranges may overlap and come in any order. */
|
|
14
|
+
findChunks?: (args: FindChunksArgs) => TextRange[];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Where the text holds each word, word by word and left to right, a match
|
|
18
|
+
* starting only past the end of that word's last one: a word is read as typed,
|
|
19
|
+
* never as a regular expression, and an empty one holds nothing.
|
|
20
|
+
*/
|
|
21
|
+
export declare function findChunks({ searchWords, textToHighlight, caseSensitive, }: FindChunksArgs): TextRange[];
|
|
22
|
+
/**
|
|
23
|
+
* The whole text as chunks: one lit chunk for each run of matches that overlap
|
|
24
|
+
* or touch, so two words side by side light as one, and plain chunks between
|
|
25
|
+
* them. An empty text has none.
|
|
26
|
+
*/
|
|
27
|
+
export declare function findAll({ searchWords, textToHighlight, caseSensitive, findChunks: find, }: FindAllArgs): Chunk[];
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=highlightWords.d.ts.map
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Memo, Point, Settings, Table } from '../internal-types';
|
|
2
2
|
export declare const nextZIndex: (tables: Table[], memos: Memo[]) => number;
|
|
3
3
|
export declare function nextPoint(settings: Settings, tables: Table[], memos: Memo[]): Point;
|
|
4
4
|
export declare const toList: <T>(ids: string[], entities: Record<string, T>) => Array<T>;
|
|
5
|
-
export declare function getDefaultEntityMeta(): EntityMeta;
|
|
6
5
|
export declare function safeRange(a: number, b: number): number[];
|
|
7
6
|
export declare function pascalCase(value?: string): string;
|
|
8
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** A handler per shortcut, whose presses of a sequence a space separates. */
|
|
2
|
+
export type KeyBindingHandlers = Record<string, (event: KeyboardEvent) => void>;
|
|
3
|
+
/**
|
|
4
|
+
* Calls each shortcut's handler on the target's keydown that completes it and
|
|
5
|
+
* returns the unbinding. A modifier's own keydown keeps a sequence going; any
|
|
6
|
+
* other miss, or a second with no keydown, sends it back to its first press.
|
|
7
|
+
*/
|
|
8
|
+
export declare function bindKeys(target: EventTarget, handlers: KeyBindingHandlers): () => void;
|
|
9
|
+
//# sourceMappingURL=bindKeys.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ValuesType } from '../../internal-types';
|
|
2
2
|
import { KeyBindingPress } from './utils';
|
|
3
|
+
export { bindKeys, type KeyBindingHandlers } from './bindKeys';
|
|
3
4
|
export type ShortcutOption = {
|
|
4
5
|
shortcut: string;
|
|
5
6
|
preventDefault?: boolean;
|
|
@@ -9,6 +10,7 @@ export declare const KeyBindingName: {
|
|
|
9
10
|
readonly edit: "edit";
|
|
10
11
|
readonly stop: "stop";
|
|
11
12
|
readonly search: "search";
|
|
13
|
+
readonly findReplace: "findReplace";
|
|
12
14
|
readonly undo: "undo";
|
|
13
15
|
readonly redo: "redo";
|
|
14
16
|
readonly addTable: "addTable";
|
|
@@ -16,6 +18,7 @@ export declare const KeyBindingName: {
|
|
|
16
18
|
readonly addMemo: "addMemo";
|
|
17
19
|
readonly removeTable: "removeTable";
|
|
18
20
|
readonly removeColumn: "removeColumn";
|
|
21
|
+
readonly removeSelection: "removeSelection";
|
|
19
22
|
readonly primaryKey: "primaryKey";
|
|
20
23
|
readonly selectAllTable: "selectAllTable";
|
|
21
24
|
readonly selectAllColumn: "selectAllColumn";
|
|
@@ -32,9 +35,20 @@ export declare const KeyBindingName: {
|
|
|
32
35
|
readonly zenMode: "zenMode";
|
|
33
36
|
};
|
|
34
37
|
export type KeyBindingName = ValuesType<typeof KeyBindingName>;
|
|
35
|
-
export declare const KeyBindingNameList: ("undo" | "redo" | "selectAllColumn" | "search" | "stop" | "edit" | "addMemo" | "addTable" | "removeTable" | "addColumn" | "removeColumn" | "
|
|
38
|
+
export declare const KeyBindingNameList: ("undo" | "redo" | "selectAllColumn" | "search" | "stop" | "primaryKey" | "edit" | "addMemo" | "addTable" | "removeTable" | "addColumn" | "removeColumn" | "findReplace" | "removeSelection" | "selectAllTable" | "relationshipZeroOne" | "relationshipZeroN" | "relationshipOneOnly" | "relationshipOneN" | "tableProperties" | "focusView" | "zoomIn" | "zoomOut" | "zoomReset" | "handTool" | "zenMode")[];
|
|
39
|
+
/**
|
|
40
|
+
* The chords a press inside a floating panel still carries to the editor:
|
|
41
|
+
* Find and Replace's own, search, the document's undo and redo, and the zoom.
|
|
42
|
+
*/
|
|
43
|
+
export declare const PANEL_PASSING_BINDINGS: ReadonlyArray<KeyBindingName>;
|
|
36
44
|
export type KeyBindingMap = Record<KeyBindingName, ShortcutOption[]>;
|
|
37
45
|
export declare const createKeyBindingMap: () => KeyBindingMap;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the press is one of the chords given, matched as bindKeys matches a
|
|
48
|
+
* press, so a panel reads a binding as the editor root does. A sequence of
|
|
49
|
+
* presses never matches a single one.
|
|
50
|
+
*/
|
|
51
|
+
export declare function matchesShortcut(event: KeyboardEvent, options: ReadonlyArray<ShortcutOption>): boolean;
|
|
38
52
|
export declare function shortcutToTuple(shortcut?: string): KeyBindingPress[];
|
|
39
53
|
export declare function isMod(event: MouseEvent | TouchEvent | KeyboardEvent): boolean;
|
|
40
54
|
/**
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
import { ValuesType } from '../../internal-types';
|
|
1
2
|
export type KeyBindingPress = [string[], string];
|
|
3
|
+
/** The modifiers that change what a press means; AltGraph is read through them. */
|
|
4
|
+
export declare const ModifierKey: {
|
|
5
|
+
readonly Shift: "Shift";
|
|
6
|
+
readonly Meta: "Meta";
|
|
7
|
+
readonly Alt: "Alt";
|
|
8
|
+
readonly Control: "Control";
|
|
9
|
+
};
|
|
10
|
+
export type ModifierKey = ValuesType<typeof ModifierKey>;
|
|
2
11
|
export declare function parseKeybinding(str: string): KeyBindingPress[];
|
|
12
|
+
/**
|
|
13
|
+
* Whether the modifier is held, AltGraph counting as the ones it aliases. A
|
|
14
|
+
* keydown Chrome sends for a function key may lack getModifierState, and then
|
|
15
|
+
* holds nothing.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isModifierHeld(event: KeyboardEvent, mod: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the event is the press: the key by its value in any case or by its
|
|
20
|
+
* code, every modifier the press names held, and no other modifier unless it
|
|
21
|
+
* is the key itself.
|
|
22
|
+
*/
|
|
23
|
+
export declare function matchesPress(event: KeyboardEvent, [mods, key]: KeyBindingPress): boolean;
|
|
3
24
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The text a load parses, trimmed. An empty one, a new file's, is a document
|
|
3
|
+
* created from nothing, written out in full so every peer replaying the load
|
|
4
|
+
* reads that document, a released one included, which cannot parse nothing.
|
|
5
|
+
*/
|
|
6
|
+
export declare function toLoadValue(value: unknown): string;
|
|
7
|
+
//# sourceMappingURL=loadValue.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AnyAction } from '@dineug/r-html';
|
|
2
|
+
import { RootState } from '../../engine/state';
|
|
3
|
+
import { Column } from '../../internal-types';
|
|
4
|
+
type AlignEnd = {
|
|
5
|
+
tableId: string;
|
|
6
|
+
columnIds: string[];
|
|
7
|
+
};
|
|
8
|
+
export type AlignTypesInput = {
|
|
9
|
+
/** The relationship whose columns change; a new one has none. */
|
|
10
|
+
relationshipId?: string;
|
|
11
|
+
start: AlignEnd;
|
|
12
|
+
end: AlignEnd;
|
|
13
|
+
/** The child columns the same batch adds, which already take the parent's type. */
|
|
14
|
+
newColumnIds: string[];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The data type changes that bring each existing child column of the mapping
|
|
18
|
+
* to its parent's, through the data type sync over the relationships as they
|
|
19
|
+
* will stand, while the sync is on; a column already at its value takes none.
|
|
20
|
+
*/
|
|
21
|
+
export declare function toAlignTypeActions(state: RootState, { relationshipId, start, end, newColumnIds }: AlignTypesInput): AnyAction[];
|
|
22
|
+
/**
|
|
23
|
+
* What the dialog says under a row whose child column type differs from the
|
|
24
|
+
* one its parent's gives a foreign key: the type confirming writes there while
|
|
25
|
+
* the sync is on and the parent has one, else both types.
|
|
26
|
+
*/
|
|
27
|
+
export type TypeNote = {
|
|
28
|
+
kind: 'becomes';
|
|
29
|
+
dataType: string;
|
|
30
|
+
} | {
|
|
31
|
+
kind: 'differ';
|
|
32
|
+
parentType: string;
|
|
33
|
+
childType: string;
|
|
34
|
+
};
|
|
35
|
+
export declare function getTypeNote({ settings: { relationshipDataTypeSync, database }, }: Pick<RootState, 'settings'>, parent: Column, child: Column): TypeNote | null;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=alignTypes.d.ts.map
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Table } from '../../internal-types';
|
|
3
|
+
import { CandidateKey } from './candidateKeys';
|
|
4
|
+
import { ColumnPick, MapColumnsDraft, MappingRow } from './mapping';
|
|
5
|
+
import { MappingIssues } from './validate';
|
|
6
|
+
/** The child column picked for each parent column, null where the reader emptied it. */
|
|
7
|
+
export type MapColumnsPicks = Readonly<Record<string, ColumnPick | null>>;
|
|
8
|
+
/** A Map Columns dialog opened while drawing a relationship between two tables. */
|
|
9
|
+
export type CreateMapColumnsSession = {
|
|
10
|
+
mode: 'create';
|
|
11
|
+
startTableId: string;
|
|
12
|
+
endTableId: string;
|
|
13
|
+
relationshipType: number;
|
|
14
|
+
keyId: string | null;
|
|
15
|
+
picks: MapColumnsPicks;
|
|
16
|
+
};
|
|
17
|
+
/** The mapping and the keys a relationship had when the dialog opened on it. */
|
|
18
|
+
export type MapColumnsBase = {
|
|
19
|
+
startColumnIds: string[];
|
|
20
|
+
endColumnIds: string[];
|
|
21
|
+
keyId: string;
|
|
22
|
+
keys: Readonly<Record<string, string[]>>;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A Map Columns dialog opened on a relationship. Until the reader changes a row
|
|
26
|
+
* or the key it follows the relationship as it stands; after, it keeps the key
|
|
27
|
+
* and the rows they changed, the others still following it.
|
|
28
|
+
*/
|
|
29
|
+
export type EditMapColumnsSession = {
|
|
30
|
+
mode: 'edit';
|
|
31
|
+
relationshipId: string;
|
|
32
|
+
base: MapColumnsBase;
|
|
33
|
+
touched: boolean;
|
|
34
|
+
keyId: string;
|
|
35
|
+
picks: MapColumnsPicks;
|
|
36
|
+
};
|
|
37
|
+
export type MapColumnsSession = CreateMapColumnsSession | EditMapColumnsSession;
|
|
38
|
+
/**
|
|
39
|
+
* A row as the dialog shows it: whether its parent or picked child column has
|
|
40
|
+
* left its table, and the name a new foreign key column takes for it beside
|
|
41
|
+
* the other rows picking one.
|
|
42
|
+
*/
|
|
43
|
+
export type MappingRowView = MappingRow & {
|
|
44
|
+
removedParent: boolean;
|
|
45
|
+
removedChild: boolean;
|
|
46
|
+
newColumnName: string;
|
|
47
|
+
};
|
|
48
|
+
/** The line under a stored mapping no key covers, or one only a key can mend. */
|
|
49
|
+
export type MapColumnsNotice = 'notAKey' | 'noKey' | 'fixMapping' | 'addKeyToFix';
|
|
50
|
+
/** Why the dialog closes on its own: a table it maps between, or the relationship, is gone. */
|
|
51
|
+
export type MapColumnsClosed = {
|
|
52
|
+
reason: 'tableRemoved';
|
|
53
|
+
tableId: string;
|
|
54
|
+
} | {
|
|
55
|
+
reason: 'relationshipRemoved';
|
|
56
|
+
};
|
|
57
|
+
export type MapColumnsView = {
|
|
58
|
+
closed: null;
|
|
59
|
+
parentTable: Table;
|
|
60
|
+
childTable: Table;
|
|
61
|
+
relationshipType: number;
|
|
62
|
+
keys: CandidateKey[];
|
|
63
|
+
keyId: string | null;
|
|
64
|
+
showReferences: boolean;
|
|
65
|
+
rows: MappingRowView[];
|
|
66
|
+
notice: MapColumnsNotice | null;
|
|
67
|
+
changedRemotely: boolean;
|
|
68
|
+
draft: MapColumnsDraft;
|
|
69
|
+
issues: MappingIssues;
|
|
70
|
+
canConfirm: boolean;
|
|
71
|
+
};
|
|
72
|
+
export type MapColumnsClosedView = {
|
|
73
|
+
closed: MapColumnsClosed;
|
|
74
|
+
};
|
|
75
|
+
type MapState = Pick<RootState, 'doc' | 'collections' | 'settings'>;
|
|
76
|
+
/**
|
|
77
|
+
* What the dialog shows for its session over the state as it stands, built
|
|
78
|
+
* again on every render, or why it closes: a table it maps between, or the
|
|
79
|
+
* relationship it edits, has left the document.
|
|
80
|
+
*/
|
|
81
|
+
export declare function buildMapColumns(state: MapState, session: MapColumnsSession): MapColumnsView | MapColumnsClosedView;
|
|
82
|
+
/**
|
|
83
|
+
* A dialog opened to map the start table's key onto the end table's columns:
|
|
84
|
+
* on the primary key, or the first unique column without one, each row a
|
|
85
|
+
* column of the end table only one name match points at, or empty.
|
|
86
|
+
*/
|
|
87
|
+
export declare function openCreateSession(state: MapState, { startTableId, endTableId, relationshipType, }: Pick<CreateMapColumnsSession, 'startTableId' | 'endTableId' | 'relationshipType'>): CreateMapColumnsSession;
|
|
88
|
+
/** A dialog opened on the relationship, remembering its mapping and the parent's keys. */
|
|
89
|
+
export declare function openEditSession(state: MapState, relationshipId: string): EditMapColumnsSession;
|
|
90
|
+
/**
|
|
91
|
+
* The session once the reader picks another key in References: a row for each
|
|
92
|
+
* of its columns keeps the child it had where that child is live, and an empty
|
|
93
|
+
* row takes the one column a name match points at, if any.
|
|
94
|
+
*/
|
|
95
|
+
export declare const changeMapColumnsKey: <S extends MapColumnsSession>(state: MapState, session: S, keyId: string) => S;
|
|
96
|
+
/**
|
|
97
|
+
* The session once the reader picks a child column for a row, or empties it,
|
|
98
|
+
* on the key the dialog shows, which an edit keeps from then on.
|
|
99
|
+
*/
|
|
100
|
+
export declare const pickMapColumn: <S extends MapColumnsSession>(state: MapState, session: S, parentColumnId: string, pick: ColumnPick | null) => S;
|
|
101
|
+
export {};
|
|
102
|
+
//# sourceMappingURL=buildRows.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Table } from '../../internal-types';
|
|
3
|
+
import { ColumnKey } from '../tableKeys';
|
|
4
|
+
/** The References choice that keeps a stored mapping no key of the parent covers. */
|
|
5
|
+
export declare const CURRENT_KEY_ID = "current";
|
|
6
|
+
/** A key a mapping can reference, or the stored columns kept as they are. */
|
|
7
|
+
export type CandidateKey = {
|
|
8
|
+
id: string;
|
|
9
|
+
kind: ColumnKey['kind'] | 'current';
|
|
10
|
+
columnIds: string[];
|
|
11
|
+
};
|
|
12
|
+
type KeyState = Pick<RootState, 'collections' | 'settings'>;
|
|
13
|
+
/**
|
|
14
|
+
* The keys a foreign key can reference on the table: its primary key, in
|
|
15
|
+
* column order, then each unique column; a unique column over the very columns
|
|
16
|
+
* of a key before it is left out, so a primary key also marked unique is one.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getCandidateKeys(state: KeyState, table: Table): CandidateKey[];
|
|
19
|
+
/** The key the table's columns declare under the id, as they declare it now. */
|
|
20
|
+
export declare const findColumnKey: (state: KeyState, table: Table, keyId: string) => ColumnKey | undefined;
|
|
21
|
+
/** The References choice of a stored mapping no key covers. */
|
|
22
|
+
export declare const toCurrentKey: (columnIds: string[]) => CandidateKey;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=candidateKeys.d.ts.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Relationship, Table } from '../../internal-types';
|
|
3
|
+
/** The child column a row maps its parent column to: one the child holds, or a new one. */
|
|
4
|
+
export type ColumnPick = {
|
|
5
|
+
kind: 'existing';
|
|
6
|
+
columnId: string;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'new';
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* One pair of a mapping, a parent key column and the child column picked for
|
|
12
|
+
* it, null until one is. A place of a stored mapping its lists cannot pair is
|
|
13
|
+
* invalid, with no parent column where the start list ends before it.
|
|
14
|
+
*/
|
|
15
|
+
export type MappingRow = {
|
|
16
|
+
parentColumnId: string | null;
|
|
17
|
+
pick: ColumnPick | null;
|
|
18
|
+
invalid?: boolean;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* What the Map Columns dialog confirms: the relationship to create between two
|
|
22
|
+
* tables, or the one whose columns it changes, with the parent key it reads,
|
|
23
|
+
* a key id of the parent's columns or the stored mapping kept as it is.
|
|
24
|
+
*/
|
|
25
|
+
export type MapColumnsDraft = {
|
|
26
|
+
mode: 'create';
|
|
27
|
+
startTableId: string;
|
|
28
|
+
endTableId: string;
|
|
29
|
+
relationshipType: number;
|
|
30
|
+
keyId: string | null;
|
|
31
|
+
rows: MappingRow[];
|
|
32
|
+
} | {
|
|
33
|
+
mode: 'edit';
|
|
34
|
+
relationshipId: string;
|
|
35
|
+
keyId: string;
|
|
36
|
+
rows: MappingRow[];
|
|
37
|
+
};
|
|
38
|
+
/** A relationship's two column lists, end[i] referencing start[i]. */
|
|
39
|
+
export type ColumnMapping = {
|
|
40
|
+
start: string[];
|
|
41
|
+
end: string[];
|
|
42
|
+
};
|
|
43
|
+
/** The two column lists the relationship holds, as they stand. */
|
|
44
|
+
export declare const toColumnMapping: ({ start, end, }: Relationship) => ColumnMapping;
|
|
45
|
+
/** The table, while the document holds it; a removed one stays an entity a while. */
|
|
46
|
+
export declare function getLiveTable({ doc, collections }: Pick<RootState, 'doc' | 'collections'>, tableId: string): Table | undefined;
|
|
47
|
+
/** The relationship, while the document holds it. */
|
|
48
|
+
export declare function getLiveRelationship({ doc, collections }: Pick<RootState, 'doc' | 'collections'>, relationshipId: string): Relationship | undefined;
|
|
49
|
+
/** Whether the column is one of the live table's, not one removed from it. */
|
|
50
|
+
export declare const isLiveColumn: (table: Table | undefined, columnId: string) => boolean;
|
|
51
|
+
/** Two lists holding the same ids, however ordered or repeated. */
|
|
52
|
+
export declare function sameSet(a: string[], b: string[]): boolean;
|
|
53
|
+
/** Two lists holding the same ids once each, however ordered. */
|
|
54
|
+
export declare const sameMembers: (a: string[], b: string[]) => boolean;
|
|
55
|
+
/** The ids a list holds more than once. */
|
|
56
|
+
export declare function repeatedIds(ids: string[]): Set<string>;
|
|
57
|
+
/** Lists of one length that repeat no id, which pair by place into one key reference. */
|
|
58
|
+
export declare const isNormalMapping: ({ start, end }: ColumnMapping) => boolean;
|
|
59
|
+
/** Two mappings pairing the same columns, in whatever order they list the pairs. */
|
|
60
|
+
export declare const samePairs: (a: ColumnMapping, b: ColumnMapping) => boolean;
|
|
61
|
+
/** Whether the relationship's own lists are normal and pair what the mapping pairs. */
|
|
62
|
+
export declare function holdsPairs(relationship: Relationship, mapping: ColumnMapping): boolean;
|
|
63
|
+
/** The child column each picked row maps to, in row order. */
|
|
64
|
+
export declare const toPickedColumnIds: (rows: MappingRow[]) => string[];
|
|
65
|
+
/** The child columns the other rows hold, which a row's own list shows in use. */
|
|
66
|
+
export declare const getUsedColumnIds: (rows: MappingRow[], rowIndex: number) => Set<string>;
|
|
67
|
+
//# sourceMappingURL=mapping.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Table } from '../../internal-types';
|
|
3
|
+
import { CandidateKey } from './candidateKeys';
|
|
4
|
+
import { ColumnPick } from './mapping';
|
|
5
|
+
/**
|
|
6
|
+
* The names a child column may hold to reference the parent column, compared
|
|
7
|
+
* without case: the name a new foreign key column would take, that name from
|
|
8
|
+
* the table name without its schema, and for a unique key the column's own.
|
|
9
|
+
*/
|
|
10
|
+
export declare function toPrefillNames(tableName: string, columnName: string, bracketType: number, unique: boolean): Set<string>;
|
|
11
|
+
export type PrefillInput = {
|
|
12
|
+
parentTable: Table;
|
|
13
|
+
childTable: Table;
|
|
14
|
+
keyKind: CandidateKey['kind'];
|
|
15
|
+
rows: Array<{
|
|
16
|
+
parentColumnId: string;
|
|
17
|
+
pick: ColumnPick | null;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Picks a child column for each empty row, in row order, where exactly one
|
|
22
|
+
* column holds a name of toPrefillNames; never the parent column itself, nor
|
|
23
|
+
* one a row holds or an earlier row was just given. Only the fills come back.
|
|
24
|
+
*/
|
|
25
|
+
export declare function prefillPicks({ collections, settings }: Pick<RootState, 'collections' | 'settings'>, { parentTable, childTable, keyKind, rows }: PrefillInput): Record<string, ColumnPick>;
|
|
26
|
+
//# sourceMappingURL=prefill.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AnyAction } from '@dineug/r-html';
|
|
2
|
+
import { RootState } from '../../engine/state';
|
|
3
|
+
import { MapColumnsDraft } from './mapping';
|
|
4
|
+
/**
|
|
5
|
+
* The one batch a confirmed mapping writes, for a draft validateMapping passes:
|
|
6
|
+
* the new foreign key columns its New rows add, the data type changes the sync
|
|
7
|
+
* makes, then the relationship it adds or the columns it changes.
|
|
8
|
+
*/
|
|
9
|
+
export declare function toMapColumnsActions(state: RootState, draft: MapColumnsDraft, createId: () => string): AnyAction[];
|
|
10
|
+
//# sourceMappingURL=toMapColumnsActions.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Relationship } from '../../internal-types';
|
|
3
|
+
import { MapColumnsDraft } from './mapping';
|
|
4
|
+
/**
|
|
5
|
+
* What keeps one row from being written: a place its stored lists cannot pair,
|
|
6
|
+
* a parent or picked child column gone from its table, no pick yet, or a child
|
|
7
|
+
* an earlier row already holds.
|
|
8
|
+
*/
|
|
9
|
+
export type MappingRowIssue = 'invalid' | 'removedParent' | 'unpicked' | 'removedChild' | 'inUse';
|
|
10
|
+
/**
|
|
11
|
+
* What keeps the mapping as a whole from being written: rows that cover no key
|
|
12
|
+
* of the parent as it stands, every row on its own column, another relationship
|
|
13
|
+
* linking the same columns, or a mapping the relationship already holds.
|
|
14
|
+
*/
|
|
15
|
+
export type MappingSetIssue = 'noKey' | 'selfOnly' | 'duplicate' | 'unchanged';
|
|
16
|
+
export type MappingIssues = {
|
|
17
|
+
rows: Array<MappingRowIssue | null>;
|
|
18
|
+
set: MappingSetIssue[];
|
|
19
|
+
};
|
|
20
|
+
type MappingState = Pick<RootState, 'doc' | 'collections' | 'settings'>;
|
|
21
|
+
type DraftEnds = {
|
|
22
|
+
startTableId: string;
|
|
23
|
+
endTableId: string;
|
|
24
|
+
relationship?: Relationship;
|
|
25
|
+
};
|
|
26
|
+
/** The tables a draft maps between, read from the relationship it edits. */
|
|
27
|
+
export declare function getDraftEnds({ collections }: Pick<RootState, 'collections'>, draft: MapColumnsDraft): DraftEnds | null;
|
|
28
|
+
/**
|
|
29
|
+
* The issues of each row and of the mapping as a whole, read against the state
|
|
30
|
+
* as it stands, which the dialog shows and the write checks again on landing.
|
|
31
|
+
* A row past the first issue it has reports that one.
|
|
32
|
+
*/
|
|
33
|
+
export declare function validateMapping(state: MappingState, draft: MapColumnsDraft): MappingIssues;
|
|
34
|
+
/** Whether any issue but the set issues given stands in the way. */
|
|
35
|
+
export declare const hasMappingIssues: ({ rows, set }: MappingIssues, ignore?: MappingSetIssue[]) => boolean;
|
|
36
|
+
/** Whether the tables a draft maps between, and the relationship it edits, are all still there. */
|
|
37
|
+
export declare function hasMappingTargets(state: Pick<RootState, 'doc' | 'collections'>, draft: MapColumnsDraft): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the state already holds what the draft would write: every row on a
|
|
40
|
+
* live column it already pairs, in the relationship it edits, or in one from
|
|
41
|
+
* the same parent to the same child a peer or an agent made first.
|
|
42
|
+
*/
|
|
43
|
+
export declare function isSameResult(state: Pick<RootState, 'doc' | 'collections'>, draft: MapColumnsDraft): boolean;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The action a source spells as SQL does, in any case, with a space or an
|
|
3
|
+
* underscore between words: CASCADE, set null, no_action. Anything else is none.
|
|
4
|
+
*/
|
|
5
|
+
export declare function toReferentialAction(spelling: string): number;
|
|
6
|
+
type ReferentialActions = {
|
|
7
|
+
onDelete: number;
|
|
8
|
+
onUpdate: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* What a connector shows at its child end: D: for ON DELETE, then U: for ON
|
|
12
|
+
* UPDATE, each only when set, so a relationship that sets neither shows none.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* referentialActionLabel({ onDelete: cascade, onUpdate: restrict }); // 'D:C U:R'
|
|
16
|
+
*/
|
|
17
|
+
export declare function referentialActionLabel({ onDelete, onUpdate, }: ReferentialActions): string;
|
|
18
|
+
/** The clauses the label stands for, one to a line, as a hover spells them out. */
|
|
19
|
+
export declare function referentialActionTitle({ onDelete, onUpdate, }: ReferentialActions): string;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=referentialAction.d.ts.map
|
|
@@ -23,6 +23,12 @@ export type AMLRelation = {
|
|
|
23
23
|
refCardinality: AMLCardinality;
|
|
24
24
|
/** -item_kind=User>; the discriminator has no editor slot and is dropped. */
|
|
25
25
|
polymorphic: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* A standalone rel's onDelete and onUpdate properties as written, set null
|
|
28
|
+
* say; '' otherwise, since an inline relation's properties are its attribute's.
|
|
29
|
+
*/
|
|
30
|
+
onDelete: string;
|
|
31
|
+
onUpdate: string;
|
|
26
32
|
};
|
|
27
33
|
/**
|
|
28
34
|
* One unique / unique=name / index / index=name constraint. A bare
|
|
@@ -52,6 +58,8 @@ export type AMLEntity = {
|
|
|
52
58
|
name: string;
|
|
53
59
|
alias: string;
|
|
54
60
|
comment: string;
|
|
61
|
+
/** The color property as a hex: a name as its own, a hex as written; '' otherwise. */
|
|
62
|
+
color: string;
|
|
55
63
|
attributes: AMLAttribute[];
|
|
56
64
|
};
|
|
57
65
|
/** A struct and a custom type carry neither field, which is what stops a lookup. */
|
|
@@ -12,6 +12,8 @@ export type Token = {
|
|
|
12
12
|
kind: number;
|
|
13
13
|
value: string;
|
|
14
14
|
line: number;
|
|
15
|
+
/** The token's start in the source, which tells touching tokens from spaced ones. */
|
|
16
|
+
offset: number;
|
|
15
17
|
};
|
|
16
18
|
export declare function tokenize(source: string): Token[];
|
|
17
19
|
//# sourceMappingURL=tokenizer.d.ts.map
|
|
@@ -38,6 +38,8 @@ export type DBMLTable = {
|
|
|
38
38
|
name: string;
|
|
39
39
|
alias: string;
|
|
40
40
|
comment: string;
|
|
41
|
+
/** headercolor as written when it is #rgb or #rrggbb; '' otherwise. */
|
|
42
|
+
color: string;
|
|
41
43
|
columns: DBMLColumn[];
|
|
42
44
|
indexes: DBMLIndex[];
|
|
43
45
|
};
|
|
@@ -45,10 +47,22 @@ export type DBMLRef = {
|
|
|
45
47
|
operator: string;
|
|
46
48
|
left: DBMLEndpoint;
|
|
47
49
|
right: DBMLEndpoint;
|
|
50
|
+
/** The delete and update settings as written, set null say; '' if absent. */
|
|
51
|
+
onDelete: string;
|
|
52
|
+
onUpdate: string;
|
|
53
|
+
};
|
|
54
|
+
export type DBMLTableName = Pick<DBMLEndpoint, 'schemaName' | 'tableName'>;
|
|
55
|
+
export type DBMLTableGroup = {
|
|
56
|
+
name: string;
|
|
57
|
+
/** color as written when it is #rgb or #rrggbb; '' otherwise. */
|
|
58
|
+
color: string;
|
|
59
|
+
/** One per member line, as written; resolving them is convert.ts's concern. */
|
|
60
|
+
tables: DBMLTableName[];
|
|
48
61
|
};
|
|
49
62
|
export type DBMLModel = {
|
|
50
63
|
tables: DBMLTable[];
|
|
51
64
|
refs: DBMLRef[];
|
|
65
|
+
tableGroups: DBMLTableGroup[];
|
|
52
66
|
/** Keyed by the qualified name, so s.status and status stay apart. */
|
|
53
67
|
enums: Record<string, string[]>;
|
|
54
68
|
skipped: string[];
|