graphwise-reactodia 0.0.1-TR18 → 0.0.1-TR19
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 +4 -3
- package/dist/cjs/{error-code-BdRU0RQ9.js → error-code-BjU_V9e8.js} +1 -0
- package/dist/cjs/graphwise-reactodia.cjs.entry.js +17 -3
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/collection/components/graphwise-reactodia/graphwise-reactodia.js +1 -1
- package/dist/collection/components/graphwise-reactodia/models/event/event-type.js +1 -0
- package/dist/collection/components/graphwise-reactodia/reactodia-app.js +17 -2
- package/dist/collection/pages/graphwise-reactodia/main.js +8 -0
- package/dist/esm/{error-code-DHI2bePh.js → error-code-HfC639tc.js} +1 -0
- package/dist/esm/graphwise-reactodia.entry.js +17 -3
- package/dist/esm/index.js +1 -1
- package/dist/graphwise-reactodia/graphwise-reactodia.esm.js +1 -1
- package/dist/graphwise-reactodia/index.esm.js +1 -1
- package/dist/graphwise-reactodia/p-HfC639tc.js +1 -0
- package/dist/graphwise-reactodia/{p-abfb5091.entry.js → p-bf7f09d2.entry.js} +1 -1
- package/dist/types/components/graphwise-reactodia/models/event/event-detail.d.ts +9 -2
- package/dist/types/components/graphwise-reactodia/models/event/event-type.d.ts +2 -1
- package/package.json +1 -1
- package/dist/graphwise-reactodia/p-DHI2bePh.js +0 -1
|
@@ -6,7 +6,8 @@ import { ErrorReport } from '../error/error-report';
|
|
|
6
6
|
export declare const GRAPHWISE_REACTODIA_EVENT = "graphwiseReactodiaEvent";
|
|
7
7
|
/**
|
|
8
8
|
* The payload of each {@link EventType}. It is the single place that ties an event type to its payload, so
|
|
9
|
-
* adding an event is one {@link EventType} value and one entry here.
|
|
9
|
+
* adding an event is one {@link EventType} value and one entry here. An event without a payload maps to `void`
|
|
10
|
+
* and is emitted without `payload`.
|
|
10
11
|
*
|
|
11
12
|
* @example
|
|
12
13
|
* ```ts
|
|
@@ -14,11 +15,14 @@ export declare const GRAPHWISE_REACTODIA_EVENT = "graphwiseReactodiaEvent";
|
|
|
14
15
|
* [EventType.ERROR]: ErrorReport;
|
|
15
16
|
* // A new event:
|
|
16
17
|
* [EventType.NEW_TYPE]: NewTypePayload;
|
|
18
|
+
* // A new event without a payload:
|
|
19
|
+
* [EventType.NEW_SIGNAL]: void;
|
|
17
20
|
* }
|
|
18
21
|
* ```
|
|
19
22
|
*/
|
|
20
23
|
interface EventPayloadMap {
|
|
21
24
|
[EventType.ERROR]: ErrorReport;
|
|
25
|
+
[EventType.TEXT_SEARCH]: void;
|
|
22
26
|
}
|
|
23
27
|
/**
|
|
24
28
|
* Maps an {@link EventType} to its event detail: `{type, payload}`, with the payload from
|
|
@@ -40,7 +44,10 @@ interface EventPayloadMap {
|
|
|
40
44
|
* ```
|
|
41
45
|
*/
|
|
42
46
|
export type EventDetail<T extends EventType = EventType> = {
|
|
43
|
-
[K in T]: {
|
|
47
|
+
[K in T]: EventPayloadMap[K] extends void ? {
|
|
48
|
+
type: K;
|
|
49
|
+
payload?: undefined;
|
|
50
|
+
} : {
|
|
44
51
|
type: K;
|
|
45
52
|
payload: EventPayloadMap[K];
|
|
46
53
|
};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a="graphwise-reactodia:clear-diagram-storage";var r,i;!function(a){a.ERROR="error"}(r||(r={})),function(a){a.MISSING_REQUIRED_PROP="missing-required-prop",a.DATA_FETCH="data-fetch",a.DIAGRAM_LOAD="diagram-load",a.DIAGRAM_IMPORT="diagram-import",a.LOCAL_DIAGRAM_READ="local-diagram-read",a.LOCAL_DIAGRAM_SAVE="local-diagram-save"}(i||(i={}));export{a as C,r as E,i as a}
|