@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.
Files changed (38) hide show
  1. package/CHANGELOG.md +42 -7
  2. package/CONTRIBUTING.md +13 -20
  3. package/README.ja.md +51 -37
  4. package/README.md +50 -36
  5. package/dist/{core-BH5rTsKp.js → core-C7J4FG_e.js} +5354 -2577
  6. package/dist/core.js +1 -1
  7. package/dist/index.js +6093 -3515
  8. package/dist/style.css +1 -1
  9. package/dist/types/components/EventCalendar.vue.d.ts +105 -0
  10. package/dist/types/components/GanttChart.vue.d.ts +15 -1
  11. package/dist/types/components/GraphPalette.vue.d.ts +38 -0
  12. package/dist/types/components/NetworkGraph.vue.d.ts +7 -1
  13. package/dist/types/components/PropertyInspector.vue.d.ts +41 -0
  14. package/dist/types/components/TaskBoard.vue.d.ts +72 -0
  15. package/dist/types/components/graphPalette.d.ts +12 -0
  16. package/dist/types/core/diagramEditor.d.ts +136 -0
  17. package/dist/types/core/earnedValue.d.ts +165 -0
  18. package/dist/types/core/eventCalendar.d.ts +214 -0
  19. package/dist/types/core/exportSvg.d.ts +8 -1
  20. package/dist/types/core/graph.d.ts +7 -2
  21. package/dist/types/core/graphCollapse.d.ts +1 -1
  22. package/dist/types/core/graphSwimlanes.d.ts +47 -0
  23. package/dist/types/core/index.d.ts +12 -0
  24. package/dist/types/core/interchange.d.ts +7 -0
  25. package/dist/types/core/interchangeDrawio.d.ts +60 -0
  26. package/dist/types/core/interchangeGraph.d.ts +153 -0
  27. package/dist/types/core/interchangeGraphMl.d.ts +32 -0
  28. package/dist/types/core/interchangeMermaid.d.ts +48 -0
  29. package/dist/types/core/sheetEditing.d.ts +36 -0
  30. package/dist/types/core/taskBoard.d.ts +150 -0
  31. package/dist/types/core/types.d.ts +49 -2
  32. package/dist/types/index.d.ts +44 -0
  33. package/docs/api.md +378 -0
  34. package/docs/architecture.md +6 -2
  35. package/docs/integration.md +180 -0
  36. package/docs/scheduling.md +31 -0
  37. package/docs/security.md +1 -0
  38. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import type { GraphBox, GraphEdge, GraphLayout, GraphPoint, IdentifiedNode } from './graph.js';
2
2
  import type { GraphGroup } from './graph.js';
3
3
  import type { EditMode, TimeRange } from './timeline.js';
4
- import type { TimelineFieldSpec } from './fieldEditing.js';
4
+ import type { TimelineFieldSpec, TimelineFieldEdit } from './fieldEditing.js';
5
5
  import type { SvgExportThemeInput } from './exportSvg.js';
6
6
  import type { GraphRect } from './graphView.js';
7
7
  import type { GraphEdgeBand } from './graphFlow.js';
@@ -21,6 +21,15 @@ export interface NetworkNode<D = unknown> extends IdentifiedNode {
21
21
  shape?: NetworkNodeShape;
22
22
  /** False hides the NetworkGraph resize handles of this node (`resizable`). */
23
23
  resizable?: boolean;
24
+ /**
25
+ * Decorative BPMN symbol drawn by the default renderer and `renderGraphSvg`: a gateway or event symbol in the centre
26
+ * or a task type icon in the top inline-start corner. Hidden from assistive technology. Unknown values draw nothing.
27
+ */
28
+ marker?: NetworkNodeMarker;
29
+ /** BPMN event border drawn by the default renderer and `renderGraphSvg`: `start` thin, `intermediate` double, `end` thick. */
30
+ event?: NetworkNodeEvent;
31
+ /** Where the default renderer and `renderGraphSvg` draw the label and detail. Default `'inside'`; `'below'` draws them under the box, unclipped. */
32
+ labelPosition?: NetworkNodeLabelPosition;
24
33
  /** Application data. The components pass it through untouched. */
25
34
  data?: D;
26
35
  }
@@ -28,7 +37,23 @@ export interface NetworkNode<D = unknown> extends IdentifiedNode {
28
37
  * The outline of a node in its layout box. `box` (the default) and `rounded` are rectangles with small and large corner
29
38
  * radii; `diamond`, `ellipse` and `hexagon` are drawn inside the box and centre the label and detail text.
30
39
  */
31
- export type NetworkNodeShape = 'box' | 'rounded' | 'diamond' | 'ellipse' | 'hexagon';
40
+ export type NetworkNodeShape = 'box' | 'rounded' | 'diamond' | 'ellipse' | 'hexagon' | NetworkFlowchartShape;
41
+ /**
42
+ * Flowchart and BPMN outlines, drawn inside the node box like `diamond`: `circle` (a true circle centred in the box, a
43
+ * BPMN event), `stadium` (terminator), `parallelogram` (input or output), `document` (wavy bottom), `cylinder` (data
44
+ * store or database) and `data-object` (folded corner).
45
+ */
46
+ export type NetworkFlowchartShape = 'circle' | 'stadium' | 'parallelogram' | 'document' | 'cylinder' | 'data-object';
47
+ /**
48
+ * BPMN symbols of `NetworkNode.marker`. Gateways: `exclusive` (×), `parallel` (+), `inclusive` (○) and `event-based`
49
+ * (a pentagon in a double circle). Events: `message` (envelope) and `timer` (clock). Task types, drawn in the corner:
50
+ * `user`, `service` and `manual`.
51
+ */
52
+ export type NetworkNodeMarker = 'exclusive' | 'parallel' | 'inclusive' | 'event-based' | 'message' | 'timer' | 'user' | 'service' | 'manual';
53
+ /** BPMN event borders of `NetworkNode.event`. */
54
+ export type NetworkNodeEvent = 'start' | 'intermediate' | 'end';
55
+ /** Positions of the default node label (`NetworkNode.labelPosition`). */
56
+ export type NetworkNodeLabelPosition = 'inside' | 'below';
32
57
  /**
33
58
  * A custom NetworkGraph layout. `N` and `E` type the nodes and edges it receives; with collapsed groups they include
34
59
  * proxy nodes and re-attached edges (see `GraphShownNode` and `GraphShownEdge`).
@@ -165,6 +190,18 @@ export interface TimelineColumn<R extends TimelineRow = TimelineRow> {
165
190
  /** Optional typed field definition. Leave it unset to keep the plain text cell behaviour. */
166
191
  field?: TimelineFieldSpec<R>;
167
192
  }
193
+ /**
194
+ * One GanttChart spreadsheet operation (`sheet-edit`), proposed as a whole: apply both lists as a single transaction,
195
+ * for example with `applyTimelineSheetEdit`.
196
+ */
197
+ export interface TimelineSheetEdit<R extends TimelineRow = TimelineRow> {
198
+ /** `paste` (clipboard), `fill` (Ctrl/Cmd+D or the fill handle) or `clear` (Delete, Backspace or cut). */
199
+ action: 'paste' | 'fill' | 'clear';
200
+ /** Edits of typed columns (`column.field`), in row then column order. */
201
+ fieldEdits: TimelineFieldEdit<R>[];
202
+ /** Edits of plain editable columns, in row then column order. */
203
+ cellEdits: TimelineCellEdit[];
204
+ }
168
205
  export interface TimelineCellEdit {
169
206
  rowId: string;
170
207
  columnId: string;
@@ -337,6 +374,16 @@ export interface GanttLabels {
337
374
  moveRow?: string;
338
375
  /** Description of the row move handles. Default lists the Alt key shortcuts. */
339
376
  moveRowKeysHint?: string;
377
+ /** Description of spreadsheet cells (`spreadsheet`). Default lists the selection and editing keys. */
378
+ sheetHint?: string;
379
+ /** Reason of a spreadsheet operation that would change a read-only cell. Default "Read-only cell." */
380
+ sheetReadOnly?: string;
381
+ /** Reason of a paste whose records have different numbers of cells. Default "The pasted rows must have the same number of cells." */
382
+ sheetRagged?: string;
383
+ /** Reason of a paste that extends past the last row or column. Default "The pasted cells extend past the table." */
384
+ sheetOutside?: string;
385
+ /** Announced when `validateSheetEdit` returns false. Default "This sheet change was rejected." */
386
+ sheetRejected?: string;
340
387
  /** Announced when `validateRowMove` returns false. Default "This row move was rejected." */
341
388
  rowMoveRejected?: string;
342
389
  /** Label of the status-date line (`statusDate`). Default "Status date". */
@@ -1,6 +1,8 @@
1
1
  import type { ComponentPublicInstance, DefineComponent } from 'vue';
2
2
  import NetworkGraphVue from './components/NetworkGraph.vue.js';
3
3
  import GanttChartVue from './components/GanttChart.vue.js';
4
+ import TaskBoardVue from './components/TaskBoard.vue.js';
5
+ import type { TaskBoardCard, TaskBoardColumn } from './core/taskBoard.js';
4
6
  import type { GraphEdge } from './core/graph.js';
5
7
  import type { NetworkGroup, NetworkNode, TimelineBar, TimelineRow } from './core/types.js';
6
8
  type SfcContext<F extends (...args: any) => any> = NonNullable<ReturnType<F>['__ctx']>;
@@ -50,3 +52,45 @@ export { useAsyncGraphLayout, graphLayoutWorkerAdapter } from './composables/use
50
52
  export type { AsyncGraphLayoutAdapter, AsyncGraphFrame, AsyncGraphDisplayFrame, AsyncGraphLayoutError, UseAsyncGraphLayoutOptions, AsyncGraphLayout, AsyncGraphGestureListeners, GraphLayoutWorkerPort, GraphLayoutWorkerAdapterOptions, } from './composables/useAsyncGraphLayout.js';
51
53
  export { useWindowedData } from './composables/useWindowedData.js';
52
54
  export type { UseWindowedDataOptions, WindowedData, WindowedDataLoader, WindowedDataError } from './composables/useWindowedData.js';
55
+ type TaskBoardSfc<C extends TaskBoardCard> = typeof TaskBoardVue<C>;
56
+ /** Methods that TaskBoard exposes on its template ref. `C` is the card type of the board. */
57
+ export type TaskBoardExposed<C extends TaskBoardCard = TaskBoardCard> = SfcExposed<TaskBoardSfc<C>>;
58
+ /** The type of the `TaskBoard` component. In a template, the card type is inferred from `cards`. */
59
+ export type TaskBoardComponent = (new <C extends TaskBoardCard = TaskBoardCard>(props: {
60
+ columns: readonly TaskBoardColumn[];
61
+ cards: readonly C[];
62
+ } & Record<string, unknown>) => SfcInstance<TaskBoardSfc<C & TaskBoardCard>>) & SfcDefaultComponent<TaskBoardSfc<TaskBoardCard>>;
63
+ export declare const TaskBoard: TaskBoardComponent;
64
+ import GraphPaletteVue from './components/GraphPalette.vue.js';
65
+ import PropertyInspectorVue from './components/PropertyInspector.vue.js';
66
+ import type { GraphPaletteItem, InspectorField, InspectorItem } from './core/diagramEditor.js';
67
+ type GraphPaletteSfc<D> = typeof GraphPaletteVue<D>;
68
+ type PropertyInspectorSfc<T extends InspectorItem> = typeof PropertyInspectorVue<T>;
69
+ /** Methods that GraphPalette exposes on its template ref. */
70
+ export type GraphPaletteExposed<D = unknown> = SfcExposed<GraphPaletteSfc<D>>;
71
+ /** Methods that PropertyInspector exposes on its template ref. */
72
+ export type PropertyInspectorExposed<T extends InspectorItem = InspectorItem> = SfcExposed<PropertyInspectorSfc<T>>;
73
+ /** The type of the `GraphPalette` component. In a template, the item data type is inferred from `items`. */
74
+ export type GraphPaletteComponent = (new <D = unknown>(props: {
75
+ items: readonly GraphPaletteItem<D>[];
76
+ } & Record<string, unknown>) => SfcInstance<GraphPaletteSfc<D>>) & SfcDefaultComponent<GraphPaletteSfc<unknown>>;
77
+ /** The type of the `PropertyInspector` component. In a template, the item type is inferred from `item` and `fields`. */
78
+ export type PropertyInspectorComponent = (new <T extends InspectorItem = InspectorItem>(props: {
79
+ item?: T | null;
80
+ fields: readonly InspectorField<T>[];
81
+ } & Record<string, unknown>) => SfcInstance<PropertyInspectorSfc<T>>) & SfcDefaultComponent<PropertyInspectorSfc<InspectorItem>>;
82
+ export declare const GraphPalette: GraphPaletteComponent;
83
+ export declare const PropertyInspector: PropertyInspectorComponent;
84
+ export { readPaletteDrop } from './components/graphPalette.js';
85
+ export type { PaletteDropSource } from './components/graphPalette.js';
86
+ import EventCalendarVue from './components/EventCalendar.vue.js';
87
+ import type { CalendarEvent } from './core/eventCalendar.js';
88
+ type EventCalendarSfc<E extends CalendarEvent> = typeof EventCalendarVue<E>;
89
+ /** Methods that EventCalendar exposes on its template ref. `E` is the event type of the calendar. */
90
+ export type EventCalendarExposed<E extends CalendarEvent = CalendarEvent> = SfcExposed<EventCalendarSfc<E>>;
91
+ /** The type of the `EventCalendar` component. In a template, the event type is inferred from `events`. */
92
+ export type EventCalendarComponent = (new <E extends CalendarEvent = CalendarEvent>(props: {
93
+ events: readonly E[];
94
+ date: number;
95
+ } & Record<string, unknown>) => SfcInstance<EventCalendarSfc<E & CalendarEvent>>) & SfcDefaultComponent<EventCalendarSfc<CalendarEvent>>;
96
+ export declare const EventCalendar: EventCalendarComponent;