@eightkk/vue-weave 1.0.0 → 1.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/CHANGELOG.md +42 -7
- package/CONTRIBUTING.md +13 -20
- package/README.ja.md +51 -37
- package/README.md +50 -36
- package/dist/{core-BH5rTsKp.js → core-C7J4FG_e.js} +5354 -2577
- package/dist/core.js +1 -1
- package/dist/index.js +6093 -3515
- package/dist/style.css +1 -1
- package/dist/types/components/EventCalendar.vue.d.ts +105 -0
- package/dist/types/components/GanttChart.vue.d.ts +15 -1
- package/dist/types/components/GraphPalette.vue.d.ts +38 -0
- package/dist/types/components/NetworkGraph.vue.d.ts +7 -1
- package/dist/types/components/PropertyInspector.vue.d.ts +41 -0
- package/dist/types/components/TaskBoard.vue.d.ts +72 -0
- package/dist/types/components/graphPalette.d.ts +12 -0
- package/dist/types/core/diagramEditor.d.ts +136 -0
- package/dist/types/core/earnedValue.d.ts +165 -0
- package/dist/types/core/eventCalendar.d.ts +214 -0
- package/dist/types/core/exportSvg.d.ts +8 -1
- package/dist/types/core/graph.d.ts +7 -2
- package/dist/types/core/graphCollapse.d.ts +1 -1
- package/dist/types/core/graphSwimlanes.d.ts +47 -0
- package/dist/types/core/index.d.ts +12 -0
- package/dist/types/core/interchange.d.ts +7 -0
- package/dist/types/core/interchangeDrawio.d.ts +60 -0
- package/dist/types/core/interchangeGraph.d.ts +153 -0
- package/dist/types/core/interchangeGraphMl.d.ts +32 -0
- package/dist/types/core/interchangeMermaid.d.ts +48 -0
- package/dist/types/core/sheetEditing.d.ts +36 -0
- package/dist/types/core/taskBoard.d.ts +150 -0
- package/dist/types/core/types.d.ts +49 -2
- package/dist/types/index.d.ts +44 -0
- package/docs/api.md +378 -0
- package/docs/architecture.md +6 -2
- package/docs/integration.md +180 -0
- package/docs/scheduling.md +31 -0
- package/docs/security.md +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type TaskBoardCard, type TaskBoardCardMove, type TaskBoardCardMoveValidator, type TaskBoardColumn, type TaskBoardColumnStatus, type TaskBoardLabels, type TaskBoardLane, type TaskBoardMoveCancel } from '../core/taskBoard.js';
|
|
2
|
+
import type { ChartDirection } from '../core/types.js';
|
|
3
|
+
declare const __VLS_export: <C extends TaskBoardCard = TaskBoardCard>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
5
|
+
/** Status columns, in display order. Each has a unique ID, a label, an optional detail and an optional `wipLimit`. Required. */
|
|
6
|
+
columns: readonly TaskBoardColumn[];
|
|
7
|
+
/** Cards, each with a unique ID, `columnId`, `laneId` (on a board with lanes), label and optional detail, tone and data. The array order is the order inside every cell. Required. */
|
|
8
|
+
cards: readonly C[];
|
|
9
|
+
/** Horizontal swimlanes, in display order. Without lanes (or with an empty array) the board has one row of cells. */
|
|
10
|
+
lanes?: readonly TaskBoardLane[];
|
|
11
|
+
/** Controlled selected card ID; supports `v-model:selected-id`. */
|
|
12
|
+
selectedId?: string;
|
|
13
|
+
/** Disables moving cards; cards can still be selected and activated. Default: false. */
|
|
14
|
+
readonly?: boolean;
|
|
15
|
+
/** Synchronous check of a card move proposal. Return `true` or nothing to accept, `false` or a reason string to reject. */
|
|
16
|
+
validateCardMove?: TaskBoardCardMoveValidator;
|
|
17
|
+
/** Overrides for the English UI strings and accessible names; fields you omit keep their defaults. */
|
|
18
|
+
labels?: Partial<TaskBoardLabels>;
|
|
19
|
+
/** Text direction: `ltr`, `rtl` or `auto`. `rtl` places the first column on the right. Default: `ltr`. */
|
|
20
|
+
dir?: ChartDirection;
|
|
21
|
+
/** Height of the scroll viewport, as a number of pixels or a CSS length. Default: the height of the content. */
|
|
22
|
+
height?: number | string;
|
|
23
|
+
/** Scrolls the board while a pointer drag is held near an edge of the viewport. Default: true. */
|
|
24
|
+
autoScroll?: boolean;
|
|
25
|
+
} & {
|
|
26
|
+
"onUpdate:selectedId"?: ((id: string) => any) | undefined;
|
|
27
|
+
"onValidation-error"?: ((error: Error) => any) | undefined;
|
|
28
|
+
"onCard-move"?: ((change: TaskBoardCardMove) => any) | undefined;
|
|
29
|
+
"onCard-move-rejected"?: ((change: TaskBoardCardMove, reason: string) => any) | undefined;
|
|
30
|
+
"onCard-move-cancel"?: ((event: TaskBoardMoveCancel) => any) | undefined;
|
|
31
|
+
"onCard-activate"?: ((id: string) => any) | undefined;
|
|
32
|
+
}> & (typeof globalThis extends {
|
|
33
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
34
|
+
} ? P : {});
|
|
35
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
36
|
+
/** Move the keyboard focus to a card. Returns false when the card is not shown. */
|
|
37
|
+
focusCard: (id: string) => boolean;
|
|
38
|
+
/** Cancel a pick-up or drag in progress, reporting `card-move-cancel` with reason `escape`. */
|
|
39
|
+
cancelMove: () => void;
|
|
40
|
+
}>) => void;
|
|
41
|
+
attrs: any;
|
|
42
|
+
slots: {
|
|
43
|
+
/** Content of a card button. Keep it non-interactive: the card is a button. */
|
|
44
|
+
card(props: {
|
|
45
|
+
card: C;
|
|
46
|
+
selected: boolean;
|
|
47
|
+
moving: boolean;
|
|
48
|
+
column: TaskBoardColumn;
|
|
49
|
+
lane?: TaskBoardLane;
|
|
50
|
+
}): unknown;
|
|
51
|
+
/** Content of a column header, with the card count and WIP state of the column. */
|
|
52
|
+
'column-header'(props: {
|
|
53
|
+
column: TaskBoardColumn;
|
|
54
|
+
status: TaskBoardColumnStatus;
|
|
55
|
+
}): unknown;
|
|
56
|
+
/** Content of a cell without cards, and (without `column`) of a board without columns. */
|
|
57
|
+
empty(props: {
|
|
58
|
+
column?: TaskBoardColumn;
|
|
59
|
+
lane?: TaskBoardLane;
|
|
60
|
+
}): unknown;
|
|
61
|
+
};
|
|
62
|
+
emit: ((evt: "update:selectedId", id: string) => void) & ((evt: "validation-error", error: Error) => void) & ((evt: "card-move", change: TaskBoardCardMove) => void) & ((evt: "card-move-rejected", change: TaskBoardCardMove, reason: string) => void) & ((evt: "card-move-cancel", event: TaskBoardMoveCancel) => void) & ((evt: "card-activate", id: string) => void);
|
|
63
|
+
}>) => import("vue").VNode & {
|
|
64
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
65
|
+
};
|
|
66
|
+
declare const _default: typeof __VLS_export;
|
|
67
|
+
export default _default;
|
|
68
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
69
|
+
[K in keyof T]: T[K];
|
|
70
|
+
} : {
|
|
71
|
+
[K in keyof T as K]: T[K];
|
|
72
|
+
}) & {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type GraphPaletteDrop } from '../core/diagramEditor.js';
|
|
2
|
+
/** Anything that carries the data of an HTML drag: a drop event of NetworkGraph or GanttChart, or the DataTransfer. */
|
|
3
|
+
export type PaletteDropSource = {
|
|
4
|
+
readonly dataTransfer: Pick<DataTransfer, 'getData'> | null;
|
|
5
|
+
} | Pick<DataTransfer, 'getData'>;
|
|
6
|
+
/**
|
|
7
|
+
* The palette item that a drop carries: its ID and data, or undefined when the drag did not come from a GraphPalette
|
|
8
|
+
* (no payload under `graphPaletteMimeType`, or one that is not `{ id, data }` JSON). Pass the `node-drop` event of
|
|
9
|
+
* NetworkGraph, the `bar-drop` event of GanttChart or a `DataTransfer`. Look the ID up in your own item list rather than
|
|
10
|
+
* trusting `data`: any page can start a drag with this MIME type.
|
|
11
|
+
*/
|
|
12
|
+
export declare function readPaletteDrop(source: PaletteDropSource | null | undefined): GraphPaletteDrop | undefined;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { type FieldCheck, type FieldParseResult, type FieldValue, type TimelineFieldKind, type TimelineFieldSpec } from './fieldEditing.js';
|
|
2
|
+
import type { ChartTone, NetworkNodeShape } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* The MIME type under which GraphPalette puts the JSON payload `{ id, data }` of a dragged item into the HTML
|
|
5
|
+
* `DataTransfer`. Read it back with `readPaletteDrop` (Vue entry).
|
|
6
|
+
*/
|
|
7
|
+
export declare const graphPaletteMimeType = "application/x-vue-weave-palette+json";
|
|
8
|
+
/** One template of GraphPalette. `D` types the optional `data` payload; it defaults to `unknown`. */
|
|
9
|
+
export interface GraphPaletteItem<D = unknown> {
|
|
10
|
+
/** Unique within the palette; the drag payload and the `insert` event carry it. */
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
/** Shown under the label and searched by the filter box. */
|
|
14
|
+
detail?: string;
|
|
15
|
+
/** The node outline drawn in the preview. Default `'box'`. */
|
|
16
|
+
shape?: NetworkNodeShape;
|
|
17
|
+
/** The tone of the preview. Default `'blue'`. */
|
|
18
|
+
tone?: ChartTone;
|
|
19
|
+
/** The heading of the section the item is listed under. Sections appear in the order of their first item. */
|
|
20
|
+
section?: string;
|
|
21
|
+
/** Extra words the filter box matches, besides the label, detail and section. */
|
|
22
|
+
keywords?: readonly string[];
|
|
23
|
+
/** True lists the item but keeps it from being dragged or inserted. */
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/** Application data. It travels in the drag payload as JSON, so keep it JSON-safe. */
|
|
26
|
+
data?: D;
|
|
27
|
+
}
|
|
28
|
+
/** Texts and accessible names of GraphPalette. */
|
|
29
|
+
export interface GraphPaletteLabels {
|
|
30
|
+
/** The accessible name of the list. */
|
|
31
|
+
region: string;
|
|
32
|
+
/** The accessible name of the filter box (`searchable`). */
|
|
33
|
+
search: string;
|
|
34
|
+
/** Shown when the filter matches no item. */
|
|
35
|
+
noMatches: string;
|
|
36
|
+
}
|
|
37
|
+
/** What `readPaletteDrop` reads from a drop: the item ID and the data it carried. */
|
|
38
|
+
export interface GraphPaletteDrop {
|
|
39
|
+
id: string;
|
|
40
|
+
/** The `data` of the dragged item, parsed from JSON. It comes from the drag source; do not trust it blindly. */
|
|
41
|
+
data?: unknown;
|
|
42
|
+
}
|
|
43
|
+
/** The field kinds of PropertyInspector: the typed timeline field kinds plus `color` (`#rrggbb` text). */
|
|
44
|
+
export type InspectorFieldKind = TimelineFieldKind | 'color';
|
|
45
|
+
/** An item that PropertyInspector can edit. */
|
|
46
|
+
export interface InspectorItem {
|
|
47
|
+
id: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* One field of PropertyInspector. It is a typed field (`TimelineFieldSpec`: parsing, formatting and validation are
|
|
51
|
+
* shared with GanttChart columns) whose getter reads the inspected item, plus a label and presentation options.
|
|
52
|
+
*/
|
|
53
|
+
export interface InspectorField<T extends InspectorItem = InspectorItem> extends Omit<TimelineFieldSpec, 'kind' | 'get'> {
|
|
54
|
+
kind: InspectorFieldKind;
|
|
55
|
+
/** The visible label and accessible name of the control. */
|
|
56
|
+
label: string;
|
|
57
|
+
/** The raw value of the item. */
|
|
58
|
+
get: (item: T) => FieldValue;
|
|
59
|
+
/** Shows the value without letting it be edited. */
|
|
60
|
+
readonly?: boolean;
|
|
61
|
+
/** Help text under the control; it also describes the control. */
|
|
62
|
+
description?: string;
|
|
63
|
+
placeholder?: string;
|
|
64
|
+
}
|
|
65
|
+
/** A change proposed by PropertyInspector. The parent applies `after` to the item's field to accept it. */
|
|
66
|
+
export interface InspectorChange {
|
|
67
|
+
/** The ID of the inspected item. */
|
|
68
|
+
id: string;
|
|
69
|
+
/** The ID of the field. */
|
|
70
|
+
field: string;
|
|
71
|
+
before: FieldValue;
|
|
72
|
+
after: FieldValue;
|
|
73
|
+
}
|
|
74
|
+
/** Synchronous check of an inspector change. Accept with true or undefined; reject with false or a reason. */
|
|
75
|
+
export type InspectorChangeValidator<T extends InspectorItem = InspectorItem> = (change: InspectorChange, item: T) => boolean | string | void;
|
|
76
|
+
/** Texts and accessible names of PropertyInspector. */
|
|
77
|
+
export interface PropertyInspectorLabels {
|
|
78
|
+
/** The accessible name of the form. */
|
|
79
|
+
region: string;
|
|
80
|
+
/** Shown when no item is inspected. */
|
|
81
|
+
empty: string;
|
|
82
|
+
/** The reason shown when `validateChange` returns false. */
|
|
83
|
+
rejected: string;
|
|
84
|
+
/** The text of the empty choice of an optional `select` field. */
|
|
85
|
+
none: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Props of a PropertyInspector field slot (`field-<id>`), which replaces the control of one field. Call `commit` with a
|
|
89
|
+
* value or `commitText` with editor text to propose a change (both run the field checks and `validateChange` and return
|
|
90
|
+
* whether the change was proposed or the value was unchanged), and `cancel` to drop an error or draft.
|
|
91
|
+
*/
|
|
92
|
+
export interface PropertyInspectorFieldSlot<T extends InspectorItem = InspectorItem> {
|
|
93
|
+
field: InspectorField<T>;
|
|
94
|
+
item: T;
|
|
95
|
+
/** The current raw value of the field. */
|
|
96
|
+
value: FieldValue;
|
|
97
|
+
/** The value as editor text. */
|
|
98
|
+
text: string;
|
|
99
|
+
/** The parse, check or rejection message shown under the field. */
|
|
100
|
+
error?: string;
|
|
101
|
+
readonly: boolean;
|
|
102
|
+
/** The ID that the field label points to; give it to your control. */
|
|
103
|
+
inputId: string;
|
|
104
|
+
/** The IDs of the description and error, for `aria-describedby`. */
|
|
105
|
+
describedBy?: string;
|
|
106
|
+
commit: (value: FieldValue) => boolean;
|
|
107
|
+
commitText: (text: string) => boolean;
|
|
108
|
+
cancel: () => void;
|
|
109
|
+
}
|
|
110
|
+
/** `#rgb` or `#rrggbb` as lowercase `#rrggbb`, or undefined. */
|
|
111
|
+
export declare function normalizeHexColor(text: string): string | undefined;
|
|
112
|
+
/** The typed field spec behind an inspector field. A `color` field is text whose built-in parser reads hex colours. */
|
|
113
|
+
export declare function inspectorFieldSpec(field: InspectorField<any>): TimelineFieldSpec<any>;
|
|
114
|
+
/** Check a value of an inspector field. Colours must be `#rgb` or `#rrggbb` unless the field has its own parser. */
|
|
115
|
+
export declare function checkInspectorValue(field: InspectorField<any>, value: FieldValue): FieldCheck;
|
|
116
|
+
export declare function parseInspectorText(field: InspectorField<any>, text: string): FieldParseResult;
|
|
117
|
+
/** Throws for an invalid or duplicate field ID and for a kind the inspector cannot edit. */
|
|
118
|
+
export declare function checkInspectorFields(fields: readonly InspectorField<any>[]): void;
|
|
119
|
+
/** One section of the palette: its heading (absent for items without a section) and its items in input order. */
|
|
120
|
+
export interface PaletteSection<D> {
|
|
121
|
+
title?: string;
|
|
122
|
+
items: GraphPaletteItem<D>[];
|
|
123
|
+
}
|
|
124
|
+
/** Throws for an invalid or duplicate item ID. */
|
|
125
|
+
export declare function checkPaletteItems(items: readonly GraphPaletteItem<any>[]): void;
|
|
126
|
+
/**
|
|
127
|
+
* The items that match a filter text, grouped into sections in the order of their first item. Every word of the
|
|
128
|
+
* text must occur, ignoring case, in the label, detail, section or keywords of an item.
|
|
129
|
+
*/
|
|
130
|
+
export declare function paletteSections<D>(items: readonly GraphPaletteItem<D>[], query?: string): PaletteSection<D>[];
|
|
131
|
+
/** The `{ id, data }` payload of a drag, or undefined when the text is not one. */
|
|
132
|
+
export declare function parsePalettePayload(text: string | undefined): GraphPaletteDrop | undefined;
|
|
133
|
+
/** The JSON text of a drag payload. Data that cannot be serialised is left out. */
|
|
134
|
+
export declare function palettePayload(item: GraphPaletteItem<unknown>): string;
|
|
135
|
+
/** True when two field value lists are equal, element by element. */
|
|
136
|
+
export declare function sameFieldValues(a: readonly FieldValue[], b: readonly FieldValue[]): boolean;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { WorkCalendar } from './workCalendar.js';
|
|
2
|
+
/**
|
|
3
|
+
* Progress and cost of one task as recorded at an earlier time, for the EV and AC curves of `computeEarnedValue`. The
|
|
4
|
+
* values are cumulative: `progress` is the completed share at `time`, `actualCost` the cost spent up to `time`.
|
|
5
|
+
*/
|
|
6
|
+
export interface EarnedValueRecord {
|
|
7
|
+
time: number;
|
|
8
|
+
/** The completed share at `time`, from 0 to 1, like `TimelineBar.progress`. */
|
|
9
|
+
progress: number;
|
|
10
|
+
/** The cost spent up to `time`, at least 0. When omitted, the value of the previous record (0 for the first). */
|
|
11
|
+
actualCost?: number;
|
|
12
|
+
}
|
|
13
|
+
/** One task of `computeEarnedValue`: its budget, its planned (baseline) dates, and its progress and cost so far. */
|
|
14
|
+
export interface EarnedValueTask {
|
|
15
|
+
id: string;
|
|
16
|
+
/** The budget at completion (BAC) of the task, a finite number ≥ 0 in the caller's currency or effort unit. */
|
|
17
|
+
budget: number;
|
|
18
|
+
/** Planned start and end of the baseline, half-open `[start, end)` in the caller's time unit; `end === start` is a milestone. */
|
|
19
|
+
start: number;
|
|
20
|
+
end: number;
|
|
21
|
+
/**
|
|
22
|
+
* The completed share at the status date, from 0 to 1, like `TimelineBar.progress`. When omitted, the progress of
|
|
23
|
+
* the last `history` record, or 0 without history.
|
|
24
|
+
*/
|
|
25
|
+
progress?: number;
|
|
26
|
+
/**
|
|
27
|
+
* The actual cost (AC) spent up to the status date, a finite number ≥ 0. When omitted, the cost of the last `history`
|
|
28
|
+
* record, or 0 without history.
|
|
29
|
+
*/
|
|
30
|
+
actualCost?: number;
|
|
31
|
+
/**
|
|
32
|
+
* A calendar of `EarnedValueOptions.calendars`: the planned value accrues over its working time only. When omitted,
|
|
33
|
+
* `defaultCalendarId` applies; without either, the planned value accrues linearly over elapsed time.
|
|
34
|
+
*/
|
|
35
|
+
calendarId?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Recorded progress and cost before the status date, sorted by strictly increasing `time`, each at or before the
|
|
38
|
+
* status date. They give the EV and AC curves of the series; they never change the status-date values.
|
|
39
|
+
*/
|
|
40
|
+
history?: readonly EarnedValueRecord[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* How `computeEarnedValue` forecasts the cost of the remaining work (BAC − EV): `cpi` divides it by the CPI (the cost
|
|
44
|
+
* efficiency so far continues), `cpi-spi` by CPI × SPI (cost and schedule efficiency both continue), and `budget`
|
|
45
|
+
* takes it at its budgeted cost (the variance so far does not recur).
|
|
46
|
+
*/
|
|
47
|
+
export type EarnedValueEacMethod = 'cpi' | 'cpi-spi' | 'budget';
|
|
48
|
+
/** The cumulative time series of `computeEarnedValue`, for an S-curve. */
|
|
49
|
+
export interface EarnedValueSeriesOptions {
|
|
50
|
+
/** Distance between two points, a finite number > 0 in the time unit. */
|
|
51
|
+
step: number;
|
|
52
|
+
/** First point. Default: the earliest planned start. */
|
|
53
|
+
start?: number;
|
|
54
|
+
/** Last point. Default: the latest planned end or the status date, whichever is later. */
|
|
55
|
+
end?: number;
|
|
56
|
+
}
|
|
57
|
+
export interface EarnedValueOptions {
|
|
58
|
+
/** The status (data) date: PV counts the planned work in `[start, statusDate)`, EV and AC are the values at this time. */
|
|
59
|
+
statusDate: number;
|
|
60
|
+
/** Working periods by calendar, like the calendars of `scheduleTasks`; only `id` and `periods` are read. */
|
|
61
|
+
calendars?: readonly WorkCalendar[];
|
|
62
|
+
/** The calendar of tasks without `calendarId`. */
|
|
63
|
+
defaultCalendarId?: string;
|
|
64
|
+
/** Default `cpi`. */
|
|
65
|
+
eacMethod?: EarnedValueEacMethod;
|
|
66
|
+
/** Calculate `series`. Without it, `series` is empty. */
|
|
67
|
+
series?: EarnedValueSeriesOptions;
|
|
68
|
+
}
|
|
69
|
+
/** The four base values of earned value management. */
|
|
70
|
+
export interface EarnedValueAmounts {
|
|
71
|
+
/** Budget at completion. */
|
|
72
|
+
bac: number;
|
|
73
|
+
/** Planned value: the budget of the work planned before the status date. */
|
|
74
|
+
pv: number;
|
|
75
|
+
/** Earned value: `progress × bac`. */
|
|
76
|
+
ev: number;
|
|
77
|
+
/** Actual cost. */
|
|
78
|
+
ac: number;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The base values and the derived indicators. A ratio whose denominator is zero is left out (undefined), never NaN
|
|
82
|
+
* or Infinity, and so is every value derived from it.
|
|
83
|
+
*/
|
|
84
|
+
export interface EarnedValueMetrics extends EarnedValueAmounts {
|
|
85
|
+
/** Schedule variance `ev − pv`. */
|
|
86
|
+
sv: number;
|
|
87
|
+
/** Cost variance `ev − ac`. */
|
|
88
|
+
cv: number;
|
|
89
|
+
/** Schedule performance index `ev / pv`; undefined when `pv` is 0. */
|
|
90
|
+
spi?: number;
|
|
91
|
+
/** Cost performance index `ev / ac`; undefined when `ac` is 0. */
|
|
92
|
+
cpi?: number;
|
|
93
|
+
/** Estimate at completion `ac + etc`; undefined when `etc` is. */
|
|
94
|
+
eac?: number;
|
|
95
|
+
/**
|
|
96
|
+
* Estimate to complete: the remaining work `bac − ev` divided by the index of the EAC method, where an undefined
|
|
97
|
+
* CPI or SPI counts as 1. 0 when no work remains; undefined when work remains and the index is 0.
|
|
98
|
+
*/
|
|
99
|
+
etc?: number;
|
|
100
|
+
/** Variance at completion `bac − eac`; undefined when `eac` is. */
|
|
101
|
+
vac?: number;
|
|
102
|
+
/** To-complete performance index `(bac − ev) / (bac − ac)`; undefined when `bac − ac` is not positive. */
|
|
103
|
+
tcpi?: number;
|
|
104
|
+
/** `ev / bac`, from 0 to 1; undefined when `bac` is 0. */
|
|
105
|
+
percentComplete?: number;
|
|
106
|
+
}
|
|
107
|
+
export interface EarnedValueTaskResult extends EarnedValueMetrics {
|
|
108
|
+
id: string;
|
|
109
|
+
}
|
|
110
|
+
/** One point of the cumulative series. `ev` and `ac` are present only up to the status date. */
|
|
111
|
+
export interface EarnedValuePoint {
|
|
112
|
+
time: number;
|
|
113
|
+
pv: number;
|
|
114
|
+
ev?: number;
|
|
115
|
+
ac?: number;
|
|
116
|
+
}
|
|
117
|
+
export interface EarnedValueResult {
|
|
118
|
+
statusDate: number;
|
|
119
|
+
eacMethod: EarnedValueEacMethod;
|
|
120
|
+
/** One entry per task, in input order. */
|
|
121
|
+
tasks: readonly EarnedValueTaskResult[];
|
|
122
|
+
/** `rollupEarnedValue(tasks)`: the sums of the base values, with indicators derived from the sums. */
|
|
123
|
+
totals: EarnedValueMetrics;
|
|
124
|
+
/** Sorted by time; empty without `options.series` or without tasks. */
|
|
125
|
+
series: readonly EarnedValuePoint[];
|
|
126
|
+
}
|
|
127
|
+
/** The largest number of series points `computeEarnedValue` calculates. */
|
|
128
|
+
export declare const maxEarnedValuePoints = 100000;
|
|
129
|
+
/**
|
|
130
|
+
* Earned value management (EVM) for a plan at a status date: planned value (PV), earned value (EV) and actual cost
|
|
131
|
+
* (AC) per task, the variances and indices derived from them, their totals and, with `options.series`, the cumulative
|
|
132
|
+
* PV, EV and AC over time for an S-curve.
|
|
133
|
+
*
|
|
134
|
+
* - **PV** is the budget times the share of the task's planned interval `[start, end)` that lies before the status
|
|
135
|
+
* date. On a calendar it accrues over working time only; otherwise linearly over elapsed time. A task whose planned
|
|
136
|
+
* dates hold no working time of its calendar accrues over elapsed time. A milestone (`end === start`) accrues its
|
|
137
|
+
* whole budget at its start: its PV is the budget from `statusDate >= start` on.
|
|
138
|
+
* - **EV** is `progress × budget` and **AC** is `actualCost`, both as reported at the status date.
|
|
139
|
+
* - The indicators follow `EarnedValueMetrics`; a ratio with a zero denominator is undefined, never NaN or Infinity.
|
|
140
|
+
*
|
|
141
|
+
* Totals sum BAC, PV, EV and AC over all tasks and derive the indicators from the sums, so a total SPI is the
|
|
142
|
+
* budget-weighted index and not the mean of the task indices. Pass only leaf tasks: a summary row's values are the
|
|
143
|
+
* rollup of its subtasks (`rollupEarnedValue`), and including both counts the budget twice.
|
|
144
|
+
*
|
|
145
|
+
* In the series, PV is defined at every point. EV and AC are present at the points up to the status date, from each
|
|
146
|
+
* task's `history` records followed by its status-date values, as steps: a task contributes the values of its last
|
|
147
|
+
* record at or before the point, and 0 before its first record. A task without history therefore adds its EV and AC
|
|
148
|
+
* from the status date on. The status date is always a point when it lies inside the series range.
|
|
149
|
+
*
|
|
150
|
+
* Throws a RangeError for a non-finite status date, a budget, actual cost or progress outside its range, planned dates
|
|
151
|
+
* that are not finite or end before they start, history records that are not finite, not increasing or after the
|
|
152
|
+
* status date, invalid calendar periods and invalid series options or a series of more than `maxEarnedValuePoints`
|
|
153
|
+
* points; and an Error for tasks that are not an array, an invalid or duplicate task or calendar ID, an unknown
|
|
154
|
+
* calendar, an invalid history and an unknown EAC method. The arguments are not modified.
|
|
155
|
+
*/
|
|
156
|
+
export declare function computeEarnedValue(tasks: readonly EarnedValueTask[], options: EarnedValueOptions): EarnedValueResult;
|
|
157
|
+
/**
|
|
158
|
+
* The earned value of a group, such as a summary row: the sums of BAC, PV, EV and AC of `items` (for example task
|
|
159
|
+
* results of `computeEarnedValue`), with the indicators derived from the sums by `eacMethod` (default `cpi`). An empty
|
|
160
|
+
* group has all base values 0. Throws an Error when `items` is not an array or the method is unknown, and a
|
|
161
|
+
* RangeError for a base value that is not a finite number ≥ 0. The arguments are not modified.
|
|
162
|
+
*/
|
|
163
|
+
export declare function rollupEarnedValue(items: readonly EarnedValueAmounts[], options?: {
|
|
164
|
+
eacMethod?: EarnedValueEacMethod;
|
|
165
|
+
}): EarnedValueMetrics;
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import type { TimeRange } from './timeline.js';
|
|
2
|
+
import type { ChartTone } from './types.js';
|
|
3
|
+
/** A view of EventCalendar: one day, one week or the weeks of one month. */
|
|
4
|
+
export type EventCalendarView = 'day' | 'week' | 'month';
|
|
5
|
+
/** An appointment of EventCalendar. `D` types the opaque `data`. */
|
|
6
|
+
export interface CalendarEvent<D = unknown> {
|
|
7
|
+
/** Unique among the events of a calendar. */
|
|
8
|
+
id: string;
|
|
9
|
+
/** Half-open interval `[start, end)` in epoch milliseconds. `end` must not be before `start`. */
|
|
10
|
+
start: number;
|
|
11
|
+
end: number;
|
|
12
|
+
label: string;
|
|
13
|
+
/**
|
|
14
|
+
* Draws the event in the all-day row of the day and week views and moves it by whole days. Give it local midnights
|
|
15
|
+
* as `start` and `end`. Events of 24 hours or more are drawn in the all-day row too, but keep their times.
|
|
16
|
+
*/
|
|
17
|
+
allDay?: boolean;
|
|
18
|
+
/** The resource (room, machine, person) of the event; with `resources`, the day view shows one column per resource. */
|
|
19
|
+
resourceId?: string;
|
|
20
|
+
/** A CSS colour for the event's accent stripe. Overrides the tone colour. */
|
|
21
|
+
color?: string;
|
|
22
|
+
/** Tone of the event background. Default `blue`. */
|
|
23
|
+
tone?: ChartTone;
|
|
24
|
+
/** Set false to keep this event fixed while the others can be edited. Default true (unless the calendar is `readonly`). */
|
|
25
|
+
editable?: boolean;
|
|
26
|
+
data?: D;
|
|
27
|
+
}
|
|
28
|
+
/** A column of the per-resource day view. */
|
|
29
|
+
export interface CalendarResource {
|
|
30
|
+
/** Unique among the resources of a calendar. */
|
|
31
|
+
id: string;
|
|
32
|
+
label: string;
|
|
33
|
+
detail?: string;
|
|
34
|
+
}
|
|
35
|
+
/** Time zone and week start of the calendar helpers. */
|
|
36
|
+
export interface EventCalendarOptions {
|
|
37
|
+
/** IANA time zone, such as `Europe/Berlin`, whose local dates the days follow. Default `UTC`. */
|
|
38
|
+
timeZone?: string;
|
|
39
|
+
/** First day of a week, 0 = Sunday to 6 = Saturday. Default 1 (Monday). */
|
|
40
|
+
weekStartsOn?: number;
|
|
41
|
+
}
|
|
42
|
+
/** One local day of a calendar view. */
|
|
43
|
+
export interface EventCalendarDay extends TimeRange {
|
|
44
|
+
/** The local date: full year, month 1 to 12 and day of the month 1 to 31. */
|
|
45
|
+
year: number;
|
|
46
|
+
month: number;
|
|
47
|
+
day: number;
|
|
48
|
+
/** Day of the week, 0 = Sunday to 6 = Saturday. */
|
|
49
|
+
weekday: number;
|
|
50
|
+
/** False for the leading and trailing days of a month grid that belong to the previous or next month. */
|
|
51
|
+
inMonth: boolean;
|
|
52
|
+
}
|
|
53
|
+
/** Position of a timed event in a day column (`layoutCalendarDayEvents`). */
|
|
54
|
+
export interface CalendarEventColumn {
|
|
55
|
+
id: string;
|
|
56
|
+
/** The event interval clipped to the day. */
|
|
57
|
+
start: number;
|
|
58
|
+
end: number;
|
|
59
|
+
/** Zero-based column of the event among the events it overlaps, directly or through others. */
|
|
60
|
+
column: number;
|
|
61
|
+
/** Number of columns of that overlapping group; the event takes `1 / columns` of the day's width. */
|
|
62
|
+
columns: number;
|
|
63
|
+
}
|
|
64
|
+
/** Placement of an event on the lanes of a row of days (`packCalendarEventLanes`). */
|
|
65
|
+
export interface CalendarEventLane {
|
|
66
|
+
id: string;
|
|
67
|
+
/** Zero-based lane, from the top of the row. */
|
|
68
|
+
lane: number;
|
|
69
|
+
/** Index of the first day the event covers, and one past the last one. */
|
|
70
|
+
startIndex: number;
|
|
71
|
+
endIndex: number;
|
|
72
|
+
/** The event starts before the first covered day, or ends after the last one. */
|
|
73
|
+
continuesBefore: boolean;
|
|
74
|
+
continuesAfter: boolean;
|
|
75
|
+
}
|
|
76
|
+
export interface CalendarEventLaneLayout {
|
|
77
|
+
/** The events that cover at least one of the days, in placement order. */
|
|
78
|
+
segments: CalendarEventLane[];
|
|
79
|
+
/** Number of lanes used (the largest lane plus one, or 0). */
|
|
80
|
+
lanes: number;
|
|
81
|
+
}
|
|
82
|
+
/** Proposal of EventCalendar `edit`: a move or resize of one event, and optionally a new resource. */
|
|
83
|
+
export interface EventCalendarEdit {
|
|
84
|
+
id: string;
|
|
85
|
+
before: TimeRange;
|
|
86
|
+
after: TimeRange;
|
|
87
|
+
/** `move` keeps the duration; `start` and `end` resize one end. */
|
|
88
|
+
mode: 'move' | 'start' | 'end';
|
|
89
|
+
source: 'pointer' | 'keyboard';
|
|
90
|
+
/** Present only when the proposal moves the event to another resource column of the day view. */
|
|
91
|
+
resource?: {
|
|
92
|
+
before: string;
|
|
93
|
+
after: string;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/** Proposal of EventCalendar `create`: a new event over an empty time range, drawn by pointer. */
|
|
97
|
+
export interface EventCalendarCreate extends TimeRange {
|
|
98
|
+
/** True when it was drawn over whole days (the month view or the all-day row). */
|
|
99
|
+
allDay: boolean;
|
|
100
|
+
/** The resource column it was drawn in, in the per-resource day view. */
|
|
101
|
+
resourceId?: string;
|
|
102
|
+
source: 'pointer';
|
|
103
|
+
}
|
|
104
|
+
/** Synchronous check of an `edit` proposal: true or nothing accepts, false rejects with the default text, a string rejects with it. */
|
|
105
|
+
export type EventCalendarEditValidator = (change: EventCalendarEdit) => boolean | string | void;
|
|
106
|
+
/** Synchronous check of a `create` proposal, with the same results as `EventCalendarEditValidator`. */
|
|
107
|
+
export type EventCalendarCreateValidator = (proposal: EventCalendarCreate) => boolean | string | void;
|
|
108
|
+
/** Why EventCalendar cancelled an in-flight pointer gesture (`edit-cancel`). */
|
|
109
|
+
export type EventCalendarEditCancelReason = 'escape' | 'source-changed' | 'pointer-cancel' | 'api';
|
|
110
|
+
/** Payload of the EventCalendar `edit-cancel` event; `eventIds` is empty for a cancelled create. */
|
|
111
|
+
export interface EventCalendarEditCancel {
|
|
112
|
+
reason: EventCalendarEditCancelReason;
|
|
113
|
+
eventIds: readonly string[];
|
|
114
|
+
}
|
|
115
|
+
/** Localizable texts of EventCalendar. Every field is optional in the `labels` prop. */
|
|
116
|
+
export interface EventCalendarLabels {
|
|
117
|
+
/** Accessible name of the calendar region. Default "Event calendar". */
|
|
118
|
+
region: string;
|
|
119
|
+
/** Toolbar buttons. Defaults "Previous", "Today" and "Next". */
|
|
120
|
+
previous: string;
|
|
121
|
+
today: string;
|
|
122
|
+
next: string;
|
|
123
|
+
/** Name of the view switch group. Default "Calendar view". */
|
|
124
|
+
views: string;
|
|
125
|
+
/** View names. Defaults "Day", "Week" and "Month". */
|
|
126
|
+
day: string;
|
|
127
|
+
week: string;
|
|
128
|
+
month: string;
|
|
129
|
+
/** Heading of the all-day row. Default "All day". */
|
|
130
|
+
allDay: string;
|
|
131
|
+
/** Word after the count of hidden events of a month day ("+2 more"). Default "more". */
|
|
132
|
+
more: string;
|
|
133
|
+
/** Name prefix of the month day buttons that open the day view, followed by the date. Default "Show day". */
|
|
134
|
+
showDay: string;
|
|
135
|
+
/** Description of editable timed events. */
|
|
136
|
+
editHint: string;
|
|
137
|
+
/** Description of editable events of the all-day row and the month view. */
|
|
138
|
+
dayEditHint: string;
|
|
139
|
+
/** Announced when `validateEdit` returns false. Default "This change was rejected." */
|
|
140
|
+
rejected: string;
|
|
141
|
+
/** Announced when `validateCreate` returns false. Default "This new event was rejected." */
|
|
142
|
+
createRejected: string;
|
|
143
|
+
/** Heading of the resource columns of the day view. Default "Resources". */
|
|
144
|
+
resources: string;
|
|
145
|
+
/** Label of the now line. Default "Now". */
|
|
146
|
+
now: string;
|
|
147
|
+
/** Shown when there is nothing to draw, for example after invalid input. Default "No events to display". */
|
|
148
|
+
empty: string;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* The half-open time range a view shows around `date`: the local day, the week that contains it (from `weekStartsOn`),
|
|
152
|
+
* or the whole weeks of the month grid, including the leading and trailing days of the neighbouring months. Load the
|
|
153
|
+
* events that overlap this range. Throws RangeError for an unknown view, a non-finite date, an invalid `weekStartsOn`
|
|
154
|
+
* or time zone.
|
|
155
|
+
*/
|
|
156
|
+
export declare function eventCalendarRange(view: EventCalendarView, date: number, options?: EventCalendarOptions): TimeRange;
|
|
157
|
+
/**
|
|
158
|
+
* The local days a view shows around `date`, in order: one for `day`, seven for `week` and the 28 to 42 days of the
|
|
159
|
+
* month grid for `month` (`inMonth` is false for days of the neighbouring months).
|
|
160
|
+
*/
|
|
161
|
+
export declare function eventCalendarDays(view: EventCalendarView, date: number, options?: EventCalendarOptions): EventCalendarDay[];
|
|
162
|
+
/** The month grid of `date`: four to six weeks of seven days each, starting on `weekStartsOn`. */
|
|
163
|
+
export declare function eventCalendarMonthGrid(date: number, options?: EventCalendarOptions): EventCalendarDay[][];
|
|
164
|
+
/**
|
|
165
|
+
* The anchor date `steps` views before (negative) or after `date`: whole local days for `day`, weeks for `week` and
|
|
166
|
+
* months for `month`, keeping the local time of day. A month step keeps the day of the month, clamped to the length of
|
|
167
|
+
* the target month (January 31 + 1 month is February 28 or 29). Throws RangeError for a non-integer `steps`.
|
|
168
|
+
*/
|
|
169
|
+
export declare function shiftEventCalendarDate(view: EventCalendarView, date: number, steps: number, options?: EventCalendarOptions): number;
|
|
170
|
+
/**
|
|
171
|
+
* The local wall-clock time of `time` in milliseconds since the local midnight of `day` (any instant of that day). It
|
|
172
|
+
* runs from 0 to 24 hours even on a 23- or 25-hour day, so a time grid stays 24 hours tall; repeated times of a
|
|
173
|
+
* daylight-saving change share a position. Times before or after the day give negative or larger values.
|
|
174
|
+
*/
|
|
175
|
+
export declare function eventCalendarTimeOfDay(day: number, time: number, options?: Pick<EventCalendarOptions, 'timeZone'>): number;
|
|
176
|
+
/**
|
|
177
|
+
* The instant of a local wall-clock `timeOfDay` (milliseconds since midnight, 0 to 24 hours) on the local day of `day`:
|
|
178
|
+
* the inverse of `eventCalendarTimeOfDay`. A time skipped by a forward change resolves to the change; a repeated time
|
|
179
|
+
* resolves to its earlier occurrence.
|
|
180
|
+
*/
|
|
181
|
+
export declare function eventCalendarTimeAt(day: number, timeOfDay: number, options?: Pick<EventCalendarOptions, 'timeZone'>): number;
|
|
182
|
+
/**
|
|
183
|
+
* Side-by-side columns for the timed events of one day column (`range`, usually an `EventCalendarDay`). Events that
|
|
184
|
+
* overlap the range (a zero-duration event when its time is inside it) are clipped to it and grouped with the events
|
|
185
|
+
* they overlap, directly or through others; each group gets as many columns as it needs, and each event the first
|
|
186
|
+
* column that is free at its start. Order: start, longer first, then ID, so the result does not depend on input order.
|
|
187
|
+
* `minDuration` extends short events for the overlap test only, so events drawn taller than their duration (with a
|
|
188
|
+
* minimum height) do not cover each other. Returns new objects in placement order.
|
|
189
|
+
*/
|
|
190
|
+
export declare function layoutCalendarDayEvents(events: readonly {
|
|
191
|
+
id: string;
|
|
192
|
+
start: number;
|
|
193
|
+
end: number;
|
|
194
|
+
}[], range: TimeRange, options?: {
|
|
195
|
+
minDuration?: number;
|
|
196
|
+
}): CalendarEventColumn[];
|
|
197
|
+
/**
|
|
198
|
+
* Lanes for events over a row of days, such as a week of the month view or the all-day row of the week view. `days`
|
|
199
|
+
* are ascending, non-overlapping ranges (usually `EventCalendarDay`s). Each event that overlaps a day (a zero-duration
|
|
200
|
+
* event when its time is inside it) covers the days from its first to its last one and takes the lowest lane that is
|
|
201
|
+
* free over all of them. Order: first day, more days first, start, then ID, so the result does not depend on input
|
|
202
|
+
* order.
|
|
203
|
+
*/
|
|
204
|
+
export declare function packCalendarEventLanes(events: readonly {
|
|
205
|
+
id: string;
|
|
206
|
+
start: number;
|
|
207
|
+
end: number;
|
|
208
|
+
}[], days: readonly TimeRange[]): CalendarEventLaneLayout;
|
|
209
|
+
/**
|
|
210
|
+
* Check the events and resources of EventCalendar: IDs are non-empty and unique (`Invalid event ID: …`, `Duplicate
|
|
211
|
+
* event ID: …`, the same for `resource`), intervals are finite with `start <= end` (RangeError), and every
|
|
212
|
+
* `resourceId` names a resource when `resources` is given (`Unknown resource in event <id>: <resourceId>`).
|
|
213
|
+
*/
|
|
214
|
+
export declare function validateCalendarEvents(events: readonly CalendarEvent[], resources?: readonly CalendarResource[]): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type GraphEdge, type GraphLayout } from './graph.js';
|
|
2
|
-
import { type GraphSwimlaneBand } from './graphSwimlanes.js';
|
|
2
|
+
import { type GraphSwimlaneBand, type GraphSwimlanePoolBand } from './graphSwimlanes.js';
|
|
3
3
|
import { type GraphEdgeBand } from './graphFlow.js';
|
|
4
4
|
import { type DependencyPathStyle, type TimeRange, type TimeScale } from './timeline.js';
|
|
5
5
|
import type { ChartTone, NetworkNode, TimelineBand, TimelineBar, TimelineColumn, TimelineDependency, TimelineLoadRow, TimelineLoadSegment, TimelineMarker, TimelineMarkerRange, TimelineRow } from './types.js';
|
|
@@ -99,6 +99,13 @@ export interface GraphSvgOptions<N extends NetworkNode = NetworkNode, E extends
|
|
|
99
99
|
* example the `lanes` of a `layoutSwimlaneGraph` result. Throws like NetworkGraph `lanes` for invalid lanes.
|
|
100
100
|
*/
|
|
101
101
|
lanes?: readonly GraphSwimlaneBand[];
|
|
102
|
+
/**
|
|
103
|
+
* Pools (BPMN participants) drawn behind the lanes, for example the `pools` of a `layoutSwimlaneGraph` result: a
|
|
104
|
+
* `g class="vw-swimlane-pool"` with a `title`, a `surface` rectangle with a 1.5-unit `muted` border, a `surfaceMuted`
|
|
105
|
+
* title band and the title centred in the band, rotated to read from bottom to top when the band is taller than it
|
|
106
|
+
* is wide, clipped to the band. Throws like NetworkGraph `pools` for invalid pools.
|
|
107
|
+
*/
|
|
108
|
+
pools?: readonly GraphSwimlanePoolBand[];
|
|
102
109
|
/** Node IDs drawn in the selected style. */
|
|
103
110
|
selectedIds?: Iterable<string>;
|
|
104
111
|
/** Node IDs whose box gets the highlight outline, like NetworkGraph `highlightedNodeIds`. Unknown IDs are ignored. */
|
|
@@ -33,13 +33,18 @@ export interface GraphEdge<D = unknown> extends GraphConnection {
|
|
|
33
33
|
* still under `prefers-reduced-motion: reduce` and in print. `renderGraphSvg` draws it dashed without motion.
|
|
34
34
|
*/
|
|
35
35
|
animated?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Draws the edge with a static dash pattern (class `vw-is-dashed`, `stroke-dasharray="5 4"` in `renderGraphSvg`), for
|
|
38
|
+
* example a BPMN message flow. `animated` wins when both are set.
|
|
39
|
+
*/
|
|
40
|
+
dashed?: boolean;
|
|
36
41
|
}
|
|
37
42
|
/**
|
|
38
43
|
* A decoration at one end of an edge. `arrow` is the filled arrowhead NetworkGraph has always drawn, `open-arrow` a
|
|
39
44
|
* line arrowhead, `circle` and `diamond` hollow shapes filled with the graph background, `bar` a line across the edge
|
|
40
|
-
* and `none` no decoration.
|
|
45
|
+
* and `none` no decoration. `hollow-arrow` is a triangle filled with the graph background, the end of a BPMN message flow.
|
|
41
46
|
*/
|
|
42
|
-
export type GraphEdgeMarker = 'arrow' | 'open-arrow' | 'circle' | 'diamond' | 'bar' | 'none';
|
|
47
|
+
export type GraphEdgeMarker = 'arrow' | 'open-arrow' | 'hollow-arrow' | 'circle' | 'diamond' | 'bar' | 'none';
|
|
43
48
|
export interface GraphIndex {
|
|
44
49
|
incoming: Map<string, string[]>;
|
|
45
50
|
outgoing: Map<string, string[]>;
|
|
@@ -54,7 +54,7 @@ export interface GraphCollapseResult<N extends NetworkNode = NetworkNode, E exte
|
|
|
54
54
|
* Replaces each outermost collapsed group with one proxy node. The proxy has the group's ID and label, a detail with the
|
|
55
55
|
* member count, the rounded shape and `data` of type GraphCollapsedNodeData. Member nodes are removed, edges are
|
|
56
56
|
* re-attached to the proxy (dropping the port on that end), edges inside one collapsed group are dropped, and parallel
|
|
57
|
-
* re-attached edges are merged; a merged edge keeps its label, edgeStyle, markers and
|
|
57
|
+
* re-attached edges are merged; a merged edge keeps its label, edgeStyle, markers, animated and dashed flags only when every merged
|
|
58
58
|
* edge has the same value. Throws Error for a duplicate or empty group ID, an unknown parent, a parent cycle, an
|
|
59
59
|
* unknown or repeated member, an unknown collapsed ID, or a collapsed group ID that is also a visible node ID. The
|
|
60
60
|
* inputs are not modified.
|