Skip to content

Commit

Permalink
Add log-message, log-message-monitor, and undo-change-notice handler …
Browse files Browse the repository at this point in the history
…skeletons.
  • Loading branch information
tealefristoe committed May 20, 2024
1 parent 13d7903 commit 33fc60a
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
5 changes: 4 additions & 1 deletion v3/src/data-interactive/data-interactive-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,13 @@ interface DIBaseHandler {
update?: DIHandlerFn
delete?: DIHandlerFn
notify?: DIHandlerFn
register?: DIHandlerFn
unregister?: DIHandlerFn
}

export type ActionName = keyof DIBaseHandler | "register" | "unregister"
export type DIHandler = RequireAtLeastOne<DIBaseHandler, "get" | "create" | "update" | "delete" | "notify">
export type DIHandler =
RequireAtLeastOne<DIBaseHandler, "get" | "create" | "update" | "delete" | "notify" | "register" | "unregister">

export interface DIResourceSelector {
attribute?: string
Expand Down
8 changes: 8 additions & 0 deletions v3/src/data-interactive/handlers/log-message-handler.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { registerDIHandler } from "../data-interactive-handler"
import { DIHandler, diNotImplementedYet } from "../data-interactive-types"

export const diLogMessageHandler: DIHandler = {
notify: diNotImplementedYet
}

registerDIHandler("logMessage", diLogMessageHandler)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { registerDIHandler } from "../data-interactive-handler"
import { DIHandler, diNotImplementedYet } from "../data-interactive-types"

export const diLogMessageMonitorHandler: DIHandler = {
register: diNotImplementedYet,
unregister: diNotImplementedYet
}

registerDIHandler("logMessageMonitor", diLogMessageMonitorHandler)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { registerDIHandler } from "../data-interactive-handler"
import { DIHandler, diNotImplementedYet } from "../data-interactive-types"

export const diUndoChangeNoticeHandler: DIHandler = {
// TODO Implement operation: undoableActionPerformed | undoButtonPressed | redoButtonPressed
notify: diNotImplementedYet
}

registerDIHandler("undoChangeNotice", diUndoChangeNoticeHandler)
3 changes: 3 additions & 0 deletions v3/src/data-interactive/register-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ import "./handlers/item-by-id-handler"
import "./handlers/item-count-handler"
import "./handlers/item-handler"
import "./handlers/item-search-handler"
import "./handlers/log-message-handler"
import "./handlers/log-message-monitor-handler"
import "./handlers/selection-list-handler"
import "./handlers/undo-change-notice-handler"

0 comments on commit 33fc60a

Please sign in to comment.