gantt-source_management 3.37.5
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/.editorconfig +9 -0
- package/.eslintrc.json +39 -0
- package/.prettierrc.cjs +5 -0
- package/README.md +129 -0
- package/cypress/e2e/add-rows-items.test.ts +26 -0
- package/cypress/e2e/basic.test.ts +173 -0
- package/cypress/e2e/calculated-zoom-mode.test.ts +163 -0
- package/cypress/e2e/calendar-dates.test.ts +285 -0
- package/cypress/e2e/dst.test.ts +691 -0
- package/cypress/e2e/grid-cells.test.ts +72 -0
- package/cypress/e2e/items-vertical.test.ts +305 -0
- package/cypress/e2e/items.test.ts +501 -0
- package/cypress/e2e/list-columns-toggle.test.ts +124 -0
- package/cypress/e2e/list-header-resize.test.ts +30 -0
- package/cypress/e2e/locale.test.ts +102 -0
- package/cypress/e2e/move-items-outside.test.ts +437 -0
- package/cypress/e2e/rows.test.ts +50 -0
- package/cypress/e2e/scroll-bar.test.ts +357 -0
- package/cypress/e2e/time-bookmarks.test.ts +92 -0
- package/cypress/e2e/utc-mode.test.ts +51 -0
- package/cypress/fixtures/example.json +5 -0
- package/cypress/helpers.ts +12 -0
- package/cypress/plugins/index.js +22 -0
- package/cypress/support/commands.ts +175 -0
- package/cypress/support/e2e.ts +31 -0
- package/cypress.config.js +24 -0
- package/dist/api/api.d.ts +182 -0
- package/dist/api/helpers.d.ts +9 -0
- package/dist/api/id.d.ts +14 -0
- package/dist/api/locale.d.ts +3 -0
- package/dist/api/main.d.ts +47 -0
- package/dist/api/public.d.ts +32 -0
- package/dist/api/slots.d.ts +22 -0
- package/dist/api/time.d.ts +104 -0
- package/dist/assets/2f1f893a.wasm +0 -0
- package/dist/gstc.d.ts +708 -0
- package/dist/gstc.esm.min.d.ts +708 -0
- package/dist/gstc.esm.min.js +574 -0
- package/dist/gstc.umd.min.d.ts +708 -0
- package/dist/gstc.umd.min.js +701 -0
- package/dist/gstc.wasm.esm.min.d.ts +708 -0
- package/dist/gstc.wasm.esm.min.js +574 -0
- package/dist/gstc.wasm.umd.min.d.ts +708 -0
- package/dist/gstc.wasm.umd.min.js +701 -0
- package/dist/plugins/calendar-scroll.d.ts +15 -0
- package/dist/plugins/calendar-scroll.esm.min.d.ts +15 -0
- package/dist/plugins/calendar-scroll.esm.min.js +13 -0
- package/dist/plugins/calendar-scroll.umd.min.d.ts +15 -0
- package/dist/plugins/calendar-scroll.umd.min.js +13 -0
- package/dist/plugins/dependency-lines.d.ts +47 -0
- package/dist/plugins/dependency-lines.esm.min.d.ts +47 -0
- package/dist/plugins/dependency-lines.esm.min.js +38 -0
- package/dist/plugins/dependency-lines.umd.min.d.ts +47 -0
- package/dist/plugins/dependency-lines.umd.min.js +38 -0
- package/dist/plugins/export-image.d.ts +12 -0
- package/dist/plugins/export-image.esm.min.d.ts +12 -0
- package/dist/plugins/export-image.esm.min.js +28 -0
- package/dist/plugins/export-image.umd.min.d.ts +12 -0
- package/dist/plugins/export-image.umd.min.js +34 -0
- package/dist/plugins/export-pdf.d.ts +12 -0
- package/dist/plugins/export-pdf.esm.min.d.ts +12 -0
- package/dist/plugins/export-pdf.esm.min.js +389 -0
- package/dist/plugins/export-pdf.umd.min.d.ts +12 -0
- package/dist/plugins/export-pdf.umd.min.js +511 -0
- package/dist/plugins/grab-scroll.d.ts +14 -0
- package/dist/plugins/grab-scroll.esm.min.d.ts +14 -0
- package/dist/plugins/grab-scroll.umd.min.d.ts +14 -0
- package/dist/plugins/highlight-weekends.d.ts +12 -0
- package/dist/plugins/highlight-weekends.esm.min.d.ts +12 -0
- package/dist/plugins/highlight-weekends.esm.min.js +14 -0
- package/dist/plugins/highlight-weekends.umd.min.d.ts +12 -0
- package/dist/plugins/highlight-weekends.umd.min.js +14 -0
- package/dist/plugins/item-movement.d.ts +97 -0
- package/dist/plugins/item-movement.esm.min.d.ts +97 -0
- package/dist/plugins/item-movement.esm.min.js +25 -0
- package/dist/plugins/item-movement.umd.min.d.ts +97 -0
- package/dist/plugins/item-movement.umd.min.js +25 -0
- package/dist/plugins/item-resizing.d.ts +102 -0
- package/dist/plugins/item-resizing.esm.min.d.ts +102 -0
- package/dist/plugins/item-resizing.esm.min.js +37 -0
- package/dist/plugins/item-resizing.umd.min.d.ts +102 -0
- package/dist/plugins/item-resizing.umd.min.js +37 -0
- package/dist/plugins/item-types.d.ts +13 -0
- package/dist/plugins/item-types.esm.min.d.ts +13 -0
- package/dist/plugins/item-types.esm.min.js +127 -0
- package/dist/plugins/item-types.umd.min.d.ts +13 -0
- package/dist/plugins/item-types.umd.min.js +127 -0
- package/dist/plugins/progress-bar.d.ts +13 -0
- package/dist/plugins/progress-bar.esm.min.d.ts +13 -0
- package/dist/plugins/progress-bar.esm.min.js +27 -0
- package/dist/plugins/progress-bar.umd.min.d.ts +13 -0
- package/dist/plugins/progress-bar.umd.min.js +27 -0
- package/dist/plugins/selection.d.ts +94 -0
- package/dist/plugins/selection.esm.min.d.ts +94 -0
- package/dist/plugins/selection.esm.min.js +26 -0
- package/dist/plugins/selection.umd.min.d.ts +94 -0
- package/dist/plugins/selection.umd.min.js +26 -0
- package/dist/plugins/time-bookmarks.d.ts +38 -0
- package/dist/plugins/time-bookmarks.esm.min.d.ts +38 -0
- package/dist/plugins/time-bookmarks.esm.min.js +50 -0
- package/dist/plugins/time-bookmarks.umd.min.d.ts +38 -0
- package/dist/plugins/time-bookmarks.umd.min.js +50 -0
- package/dist/plugins/timeline-pointer.d.ts +83 -0
- package/dist/plugins/timeline-pointer.esm.min.d.ts +83 -0
- package/dist/plugins/timeline-pointer.esm.min.js +13 -0
- package/dist/plugins/timeline-pointer.umd.min.d.ts +83 -0
- package/dist/plugins/timeline-pointer.umd.min.js +13 -0
- package/dist/style.css +811 -0
- package/dist/vendor.esm.min.js +128 -0
- package/examples/complex-1/faces/face-1.jpg +0 -0
- package/examples/complex-1/faces/face-10.jpg +0 -0
- package/examples/complex-1/faces/face-11.jpg +0 -0
- package/examples/complex-1/faces/face-12.jpg +0 -0
- package/examples/complex-1/faces/face-13.jpg +0 -0
- package/examples/complex-1/faces/face-14.jpg +0 -0
- package/examples/complex-1/faces/face-15.jpg +0 -0
- package/examples/complex-1/faces/face-16.jpg +0 -0
- package/examples/complex-1/faces/face-17.jpg +0 -0
- package/examples/complex-1/faces/face-18.jpg +0 -0
- package/examples/complex-1/faces/face-19.jpg +0 -0
- package/examples/complex-1/faces/face-2.jpg +0 -0
- package/examples/complex-1/faces/face-20.jpg +0 -0
- package/examples/complex-1/faces/face-21.jpg +0 -0
- package/examples/complex-1/faces/face-22.jpg +0 -0
- package/examples/complex-1/faces/face-23.jpg +0 -0
- package/examples/complex-1/faces/face-24.jpg +0 -0
- package/examples/complex-1/faces/face-25.jpg +0 -0
- package/examples/complex-1/faces/face-26.jpg +0 -0
- package/examples/complex-1/faces/face-27.jpg +0 -0
- package/examples/complex-1/faces/face-28.jpg +0 -0
- package/examples/complex-1/faces/face-29.jpg +0 -0
- package/examples/complex-1/faces/face-3.jpg +0 -0
- package/examples/complex-1/faces/face-30.jpg +0 -0
- package/examples/complex-1/faces/face-31.jpg +0 -0
- package/examples/complex-1/faces/face-32.jpg +0 -0
- package/examples/complex-1/faces/face-33.jpg +0 -0
- package/examples/complex-1/faces/face-34.jpg +0 -0
- package/examples/complex-1/faces/face-35.jpg +0 -0
- package/examples/complex-1/faces/face-36.jpg +0 -0
- package/examples/complex-1/faces/face-37.jpg +0 -0
- package/examples/complex-1/faces/face-38.jpg +0 -0
- package/examples/complex-1/faces/face-39.jpg +0 -0
- package/examples/complex-1/faces/face-4.jpg +0 -0
- package/examples/complex-1/faces/face-40.jpg +0 -0
- package/examples/complex-1/faces/face-41.jpg +0 -0
- package/examples/complex-1/faces/face-42.jpg +0 -0
- package/examples/complex-1/faces/face-43.jpg +0 -0
- package/examples/complex-1/faces/face-44.jpg +0 -0
- package/examples/complex-1/faces/face-45.jpg +0 -0
- package/examples/complex-1/faces/face-46.jpg +0 -0
- package/examples/complex-1/faces/face-47.jpg +0 -0
- package/examples/complex-1/faces/face-48.jpg +0 -0
- package/examples/complex-1/faces/face-49.jpg +0 -0
- package/examples/complex-1/faces/face-5.jpg +0 -0
- package/examples/complex-1/faces/face-50.jpg +0 -0
- package/examples/complex-1/faces/face-6.jpg +0 -0
- package/examples/complex-1/faces/face-7.jpg +0 -0
- package/examples/complex-1/faces/face-8.jpg +0 -0
- package/examples/complex-1/faces/face-9.jpg +0 -0
- package/examples/complex-1/index.html +61 -0
- package/examples/complex-1/index.js +923 -0
- package/examples/index.html +22 -0
- package/examples/reset.css +455 -0
- package/examples/server.js +18 -0
- package/package.json +150 -0
- package/tsconfig.json +17 -0
package/dist/gstc.d.ts
ADDED
|
@@ -0,0 +1,708 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gantt-Schedule-Timeline-Calendar component
|
|
3
|
+
*
|
|
4
|
+
* @header --gstc--header--
|
|
5
|
+
*/
|
|
6
|
+
import Vido from '@neuronet.io/vido';
|
|
7
|
+
import type { vido } from '@neuronet.io/vido';
|
|
8
|
+
import { StyleInfo, ComponentInstance, lithtml } from '@neuronet.io/vido';
|
|
9
|
+
import { Api } from './api/api';
|
|
10
|
+
import { Dayjs } from 'dayjs';
|
|
11
|
+
import DeepState from 'deep-state-observer';
|
|
12
|
+
export type Vido = vido<DeepState, Api>;
|
|
13
|
+
export interface RowDataPosition {
|
|
14
|
+
top: number;
|
|
15
|
+
bottom: number;
|
|
16
|
+
}
|
|
17
|
+
export interface RowData {
|
|
18
|
+
id: string;
|
|
19
|
+
parentId: string | undefined;
|
|
20
|
+
actualHeight: number;
|
|
21
|
+
outerHeight: number;
|
|
22
|
+
position: RowDataPosition;
|
|
23
|
+
parents: string[];
|
|
24
|
+
children: string[];
|
|
25
|
+
allChildren: string[];
|
|
26
|
+
items: string[];
|
|
27
|
+
itemsOrder: string[];
|
|
28
|
+
inView: boolean;
|
|
29
|
+
parentsExpanded: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface RowsData {
|
|
32
|
+
[key: string]: RowData;
|
|
33
|
+
}
|
|
34
|
+
export interface Row {
|
|
35
|
+
id: string;
|
|
36
|
+
parentId?: string;
|
|
37
|
+
expanded?: boolean;
|
|
38
|
+
height?: number;
|
|
39
|
+
gap?: RowGap;
|
|
40
|
+
style?: StyleInfo;
|
|
41
|
+
classNames?: string[] | classNamesFn;
|
|
42
|
+
[key: string]: any;
|
|
43
|
+
}
|
|
44
|
+
export type classNamesFn = ({ row, vido }: {
|
|
45
|
+
row: Row;
|
|
46
|
+
vido: Vido;
|
|
47
|
+
}) => string[];
|
|
48
|
+
export interface Rows {
|
|
49
|
+
[id: string]: Row;
|
|
50
|
+
}
|
|
51
|
+
export interface ItemTime {
|
|
52
|
+
start: number;
|
|
53
|
+
end: number;
|
|
54
|
+
}
|
|
55
|
+
export interface ItemDataTime {
|
|
56
|
+
startDate: Dayjs;
|
|
57
|
+
endDate: Dayjs;
|
|
58
|
+
}
|
|
59
|
+
export interface ItemDataPosition {
|
|
60
|
+
left: number;
|
|
61
|
+
actualLeft: number;
|
|
62
|
+
right: number;
|
|
63
|
+
actualRight: number;
|
|
64
|
+
rowTop: number;
|
|
65
|
+
top: number;
|
|
66
|
+
actualRowTop: number;
|
|
67
|
+
viewTop: number;
|
|
68
|
+
}
|
|
69
|
+
export interface ItemDataIutOfView {
|
|
70
|
+
left: boolean;
|
|
71
|
+
right: boolean;
|
|
72
|
+
whole: boolean;
|
|
73
|
+
}
|
|
74
|
+
export interface ItemData {
|
|
75
|
+
id: string;
|
|
76
|
+
time: ItemDataTime;
|
|
77
|
+
actualHeight: number;
|
|
78
|
+
outerHeight: number;
|
|
79
|
+
position: ItemDataPosition;
|
|
80
|
+
outOfView: ItemDataIutOfView;
|
|
81
|
+
width: number;
|
|
82
|
+
actualWidth: number;
|
|
83
|
+
timeWidth: number;
|
|
84
|
+
detached: boolean;
|
|
85
|
+
linkedWith?: string[];
|
|
86
|
+
dependant?: string[];
|
|
87
|
+
dependsOn?: string[];
|
|
88
|
+
visible?: boolean;
|
|
89
|
+
inView?: boolean;
|
|
90
|
+
selected?: boolean;
|
|
91
|
+
selecting?: boolean;
|
|
92
|
+
}
|
|
93
|
+
export interface ItemDataUpdate {
|
|
94
|
+
time?: ItemDataTime;
|
|
95
|
+
actualHeight?: number;
|
|
96
|
+
outerHeight?: number;
|
|
97
|
+
position?: ItemDataPosition;
|
|
98
|
+
width?: number;
|
|
99
|
+
actualWidth?: number;
|
|
100
|
+
timeWidth?: number;
|
|
101
|
+
detached?: boolean;
|
|
102
|
+
linkedWith?: string[];
|
|
103
|
+
dependant?: string[];
|
|
104
|
+
}
|
|
105
|
+
export type ItemLabelFunction = ({ item, vido }: {
|
|
106
|
+
item: Item;
|
|
107
|
+
vido: Vido;
|
|
108
|
+
}) => lithtml.TemplateResult | string;
|
|
109
|
+
export interface Item {
|
|
110
|
+
id: string;
|
|
111
|
+
rowId: string;
|
|
112
|
+
time: ItemTime;
|
|
113
|
+
label: string | ItemLabelFunction;
|
|
114
|
+
height?: number;
|
|
115
|
+
top?: number;
|
|
116
|
+
gap?: ItemGap;
|
|
117
|
+
minWidth?: number;
|
|
118
|
+
style?: StyleInfo;
|
|
119
|
+
classNames?: string[] | (({ item, vido }: {
|
|
120
|
+
item: Item;
|
|
121
|
+
vido: Vido;
|
|
122
|
+
}) => string[]);
|
|
123
|
+
isHTML?: boolean;
|
|
124
|
+
linkedWith?: string[];
|
|
125
|
+
selected?: boolean;
|
|
126
|
+
overlap?: boolean;
|
|
127
|
+
[key: string]: any;
|
|
128
|
+
}
|
|
129
|
+
export interface Items {
|
|
130
|
+
[id: string]: Item;
|
|
131
|
+
}
|
|
132
|
+
export interface GridCell {
|
|
133
|
+
id: string;
|
|
134
|
+
time: ChartTimeDate;
|
|
135
|
+
top: number;
|
|
136
|
+
row: Row;
|
|
137
|
+
rowData: RowData;
|
|
138
|
+
content: null | string | htmlResult;
|
|
139
|
+
[key: string]: any;
|
|
140
|
+
}
|
|
141
|
+
export interface GridCells {
|
|
142
|
+
[id: string]: GridCell;
|
|
143
|
+
}
|
|
144
|
+
export interface GridRow {
|
|
145
|
+
row: Row;
|
|
146
|
+
rowData: RowData;
|
|
147
|
+
cells: string[];
|
|
148
|
+
top: number;
|
|
149
|
+
}
|
|
150
|
+
export interface GridRows {
|
|
151
|
+
[rowId: string]: GridRow;
|
|
152
|
+
}
|
|
153
|
+
export type VoidFunction = () => void;
|
|
154
|
+
export type PluginInitialization = (vido: Vido) => void | VoidFunction;
|
|
155
|
+
export type Plugin = <T>(options: T) => PluginInitialization;
|
|
156
|
+
export type htmlResult = lithtml.TemplateResult | lithtml.TemplateResult[] | lithtml.SVGTemplateResult | lithtml.SVGTemplateResult[] | string | Element | undefined | null;
|
|
157
|
+
export type RenderFunction = (templateProps: unknown) => htmlResult;
|
|
158
|
+
export type Component = (vido: unknown, props: unknown) => RenderFunction;
|
|
159
|
+
export interface Components {
|
|
160
|
+
[name: string]: Component;
|
|
161
|
+
}
|
|
162
|
+
export type SlotName = 'main' | 'scroll-bar' | 'list' | 'list-column' | 'list-column-headers' | 'list-column-header' | 'list-column-header-resizer' | 'list-column-rows' | 'list-column-row' | 'list-column-row-expander' | 'list-column-row-expander-toggle' | 'list-toggle' | 'chart' | 'chart-calendar' | 'chart-calendar-date' | 'chart-timeline' | 'chart-timeline-grid' | 'chart-timeline-grid-row' | 'chart-timeline-grid-row-cell' | 'chart-timeline-items' | 'chart-timeline-items-row' | 'chart-timeline-items-row-item';
|
|
163
|
+
export type SlotPlacement = 'outer' | 'inner' | 'container-outer' | 'container-inner' | 'content';
|
|
164
|
+
export type Slot = {
|
|
165
|
+
[placement in SlotPlacement]?: Component[];
|
|
166
|
+
};
|
|
167
|
+
export type Slots = {
|
|
168
|
+
[name in SlotName]?: Slot;
|
|
169
|
+
};
|
|
170
|
+
export interface ColumnResizer {
|
|
171
|
+
width?: number;
|
|
172
|
+
inRealTime?: boolean;
|
|
173
|
+
dots?: number;
|
|
174
|
+
}
|
|
175
|
+
export type ColumnDataFunction = ({ row, vido }: {
|
|
176
|
+
row: Row;
|
|
177
|
+
vido: Vido;
|
|
178
|
+
}) => string | number;
|
|
179
|
+
export type ColumnDataFunctionString = ({ row, vido }: {
|
|
180
|
+
row: Row;
|
|
181
|
+
vido: Vido;
|
|
182
|
+
}) => string;
|
|
183
|
+
export type ColumnDataFunctionTemplate = ({ row, vido }: {
|
|
184
|
+
row: Row;
|
|
185
|
+
vido: Vido;
|
|
186
|
+
}) => htmlResult;
|
|
187
|
+
export type ColumnDataHeaderContent = string | (({ column, vido }: {
|
|
188
|
+
column: ColumnData;
|
|
189
|
+
vido: Vido;
|
|
190
|
+
}) => htmlResult);
|
|
191
|
+
export interface ColumnDataHeader {
|
|
192
|
+
html?: htmlResult;
|
|
193
|
+
content?: ColumnDataHeaderContent;
|
|
194
|
+
}
|
|
195
|
+
export type Sortable = string | ColumnDataFunction;
|
|
196
|
+
export interface ColumnData {
|
|
197
|
+
id: string;
|
|
198
|
+
data: string | ColumnDataFunctionString | ColumnDataFunctionTemplate;
|
|
199
|
+
width: number;
|
|
200
|
+
header: ColumnDataHeader;
|
|
201
|
+
isHTML?: boolean;
|
|
202
|
+
expander?: boolean;
|
|
203
|
+
resizer?: boolean;
|
|
204
|
+
sortable?: Sortable;
|
|
205
|
+
minWidth?: number;
|
|
206
|
+
hidden?: boolean;
|
|
207
|
+
position?: number;
|
|
208
|
+
}
|
|
209
|
+
export interface ColumnsData {
|
|
210
|
+
[id: string]: ColumnData;
|
|
211
|
+
}
|
|
212
|
+
export interface Columns {
|
|
213
|
+
percent?: number;
|
|
214
|
+
resizer?: ColumnResizer;
|
|
215
|
+
minWidth?: number;
|
|
216
|
+
data?: ColumnsData;
|
|
217
|
+
}
|
|
218
|
+
export interface ExpanderIcon {
|
|
219
|
+
width?: number;
|
|
220
|
+
height?: number;
|
|
221
|
+
}
|
|
222
|
+
export interface ExpanderIcons {
|
|
223
|
+
child?: string;
|
|
224
|
+
open?: string;
|
|
225
|
+
closed?: string;
|
|
226
|
+
}
|
|
227
|
+
export interface Expander {
|
|
228
|
+
padding?: number;
|
|
229
|
+
size?: number;
|
|
230
|
+
icon?: ExpanderIcon;
|
|
231
|
+
icons?: ExpanderIcons;
|
|
232
|
+
}
|
|
233
|
+
export interface ListToggleIcons {
|
|
234
|
+
open?: string;
|
|
235
|
+
close?: string;
|
|
236
|
+
}
|
|
237
|
+
export interface ListToggle {
|
|
238
|
+
display?: boolean;
|
|
239
|
+
icons?: ListToggleIcons;
|
|
240
|
+
}
|
|
241
|
+
export interface RowGap {
|
|
242
|
+
top?: number;
|
|
243
|
+
bottom?: number;
|
|
244
|
+
}
|
|
245
|
+
export interface ListRow {
|
|
246
|
+
height?: number;
|
|
247
|
+
gap?: RowGap;
|
|
248
|
+
}
|
|
249
|
+
export interface SortIcons {
|
|
250
|
+
up?: string;
|
|
251
|
+
down?: string;
|
|
252
|
+
}
|
|
253
|
+
export interface Sort {
|
|
254
|
+
icons?: SortIcons;
|
|
255
|
+
compare?: null | ((column: ColumnData) => (a: Row, b: Row) => number);
|
|
256
|
+
activeColumnId?: string | null;
|
|
257
|
+
asc?: boolean;
|
|
258
|
+
}
|
|
259
|
+
export interface List {
|
|
260
|
+
rows?: Rows;
|
|
261
|
+
row?: ListRow;
|
|
262
|
+
columns?: Columns;
|
|
263
|
+
expander?: Expander;
|
|
264
|
+
toggle?: ListToggle;
|
|
265
|
+
sort?: Sort;
|
|
266
|
+
}
|
|
267
|
+
export interface ScrollType {
|
|
268
|
+
width?: number;
|
|
269
|
+
minInnerSize?: number;
|
|
270
|
+
precise?: boolean;
|
|
271
|
+
multiplier?: number;
|
|
272
|
+
byPixels?: boolean;
|
|
273
|
+
}
|
|
274
|
+
export interface ScrollTypeHorizontal extends ScrollType {
|
|
275
|
+
data?: ChartTimeDate;
|
|
276
|
+
}
|
|
277
|
+
export interface ScrollTypeVertical extends ScrollType {
|
|
278
|
+
data?: Row;
|
|
279
|
+
}
|
|
280
|
+
export interface Scroll {
|
|
281
|
+
bodyClassName?: string;
|
|
282
|
+
horizontal?: ScrollTypeHorizontal;
|
|
283
|
+
vertical?: ScrollTypeVertical;
|
|
284
|
+
}
|
|
285
|
+
export interface DataScrollValues {
|
|
286
|
+
lastPageSize: number;
|
|
287
|
+
lastPageCount: number;
|
|
288
|
+
absolutePosPx: number;
|
|
289
|
+
preciseOffset: number;
|
|
290
|
+
handlePosPx: number;
|
|
291
|
+
maxHandlePosPx: number;
|
|
292
|
+
absoluteSizeWithoutLastPage?: number;
|
|
293
|
+
absoluteSize: number;
|
|
294
|
+
scrollSize: number;
|
|
295
|
+
innerHandleSize: number;
|
|
296
|
+
dataIndex: number;
|
|
297
|
+
dataId: string;
|
|
298
|
+
visible: boolean;
|
|
299
|
+
percent: number;
|
|
300
|
+
}
|
|
301
|
+
export interface DataScrollHorizontal extends DataScrollValues {
|
|
302
|
+
data: ChartTimeDate;
|
|
303
|
+
}
|
|
304
|
+
export interface DataScrollVertical extends DataScrollValues {
|
|
305
|
+
data: Row;
|
|
306
|
+
}
|
|
307
|
+
export interface DataScroll {
|
|
308
|
+
horizontal: DataScrollHorizontal;
|
|
309
|
+
vertical: DataScrollVertical;
|
|
310
|
+
}
|
|
311
|
+
export interface ChartTimeDate extends DataChartTimeLevelDate {
|
|
312
|
+
}
|
|
313
|
+
export type ChartTimeDates = ChartTimeDate[];
|
|
314
|
+
export type ChartTimeOnLevelDatesArg = {
|
|
315
|
+
dates: DataChartTimeLevel;
|
|
316
|
+
time: DataChartTime;
|
|
317
|
+
format: ChartCalendarLevelFormat;
|
|
318
|
+
level: ChartCalendarLevel;
|
|
319
|
+
levelIndex: number;
|
|
320
|
+
};
|
|
321
|
+
export type ChartTimeOnLevelDates = (arg: ChartTimeOnLevelDatesArg) => DataChartTimeLevel;
|
|
322
|
+
export type ChartTimeOnDateArg = {
|
|
323
|
+
date: ChartTimeDate;
|
|
324
|
+
time: DataChartTime;
|
|
325
|
+
format: ChartCalendarLevelFormat;
|
|
326
|
+
level: ChartCalendarLevel;
|
|
327
|
+
levelIndex: number;
|
|
328
|
+
};
|
|
329
|
+
export type ChartTimeOnDate = (arg: ChartTimeOnDateArg) => ChartTimeDate | null;
|
|
330
|
+
export interface ChartTime {
|
|
331
|
+
period?: Period;
|
|
332
|
+
from?: number;
|
|
333
|
+
readonly fromDate?: Dayjs;
|
|
334
|
+
to?: number;
|
|
335
|
+
readonly toDate?: Dayjs;
|
|
336
|
+
zoom?: number;
|
|
337
|
+
level?: number;
|
|
338
|
+
leftGlobal?: number;
|
|
339
|
+
readonly leftGlobalDate?: Dayjs;
|
|
340
|
+
centerGlobal?: number;
|
|
341
|
+
readonly centerGlobalDate?: Dayjs;
|
|
342
|
+
rightGlobal?: number;
|
|
343
|
+
readonly rightGlobalDate?: Dayjs;
|
|
344
|
+
format?: ChartCalendarLevelFormat;
|
|
345
|
+
calculatedZoomMode?: boolean;
|
|
346
|
+
onLevelDates?: ChartTimeOnLevelDates[];
|
|
347
|
+
onCurrentViewLevelDates?: ChartTimeOnLevelDates[];
|
|
348
|
+
onDate?: ChartTimeOnDate[];
|
|
349
|
+
readonly allDates?: ChartTimeDates[];
|
|
350
|
+
readonly forceUpdate?: boolean;
|
|
351
|
+
autoExpandTimeFromItems?: boolean;
|
|
352
|
+
alignLevelsToMain?: boolean;
|
|
353
|
+
readonly timePerPixel?: number;
|
|
354
|
+
checkCurrentDateInterval?: number;
|
|
355
|
+
readonly datesCache?: DataChartTimeDatesCache;
|
|
356
|
+
}
|
|
357
|
+
export interface DataChartTimeLevelDateCurrentView {
|
|
358
|
+
leftPx: number;
|
|
359
|
+
rightPx: number;
|
|
360
|
+
width: number;
|
|
361
|
+
leftGlobalDate: Dayjs;
|
|
362
|
+
rightGlobalDate: Dayjs;
|
|
363
|
+
durationMs: number;
|
|
364
|
+
}
|
|
365
|
+
export interface DataChartTimeLevelDateDST {
|
|
366
|
+
diffMs: number;
|
|
367
|
+
afterDate: Dayjs;
|
|
368
|
+
afterTime: number;
|
|
369
|
+
}
|
|
370
|
+
export interface DataChartTimeLevelDate {
|
|
371
|
+
id: string;
|
|
372
|
+
leftGlobal: number;
|
|
373
|
+
leftGlobalDate: Dayjs;
|
|
374
|
+
rightGlobal: number;
|
|
375
|
+
rightGlobalDate: Dayjs;
|
|
376
|
+
width: number;
|
|
377
|
+
leftPx: number;
|
|
378
|
+
rightPx: number;
|
|
379
|
+
period: Period;
|
|
380
|
+
formatted: string | htmlResult;
|
|
381
|
+
current: boolean;
|
|
382
|
+
next: boolean;
|
|
383
|
+
previous: boolean;
|
|
384
|
+
currentView?: DataChartTimeLevelDateCurrentView;
|
|
385
|
+
periodIncrementedBy: number;
|
|
386
|
+
DST: DataChartTimeLevelDateDST;
|
|
387
|
+
}
|
|
388
|
+
export type DataChartTimeLevel = DataChartTimeLevelDate[];
|
|
389
|
+
export type DataChartTimeLevels = DataChartTimeLevel[];
|
|
390
|
+
export type DataChartTimeDatesCacheDate = DataChartTimeLevelDate;
|
|
391
|
+
export interface DataChartTimeDatesCacheLevel {
|
|
392
|
+
leftTime: number;
|
|
393
|
+
rightTime: number;
|
|
394
|
+
dates: DataChartTimeDatesCacheDate[];
|
|
395
|
+
}
|
|
396
|
+
export interface DataChartTimeDatesCache {
|
|
397
|
+
timePerPixel: number;
|
|
398
|
+
levels: DataChartTimeDatesCacheLevel[];
|
|
399
|
+
}
|
|
400
|
+
export interface DataChartTime extends ChartTime {
|
|
401
|
+
period: Period;
|
|
402
|
+
leftGlobal: number;
|
|
403
|
+
leftGlobalDate: Dayjs | undefined;
|
|
404
|
+
centerGlobal: number;
|
|
405
|
+
centerGlobalDate: Dayjs | undefined;
|
|
406
|
+
rightGlobal: number;
|
|
407
|
+
rightGlobalDate: Dayjs | undefined;
|
|
408
|
+
timePerPixel: number;
|
|
409
|
+
from: number;
|
|
410
|
+
fromDate: Dayjs | undefined;
|
|
411
|
+
to: number;
|
|
412
|
+
toDate: Dayjs | undefined;
|
|
413
|
+
totalViewDurationMs: number;
|
|
414
|
+
totalViewDurationPx: number;
|
|
415
|
+
leftPx: number;
|
|
416
|
+
rightPx: number;
|
|
417
|
+
width?: number;
|
|
418
|
+
zoom: number;
|
|
419
|
+
format: ChartCalendarLevelFormat;
|
|
420
|
+
level: number;
|
|
421
|
+
levels: DataChartTimeLevels;
|
|
422
|
+
currentZoomLevelFormatting: ChartCalendarLevelFormat[];
|
|
423
|
+
calculatedZoomMode?: boolean;
|
|
424
|
+
onLevelDates?: ChartTimeOnLevelDates[];
|
|
425
|
+
onCurrentViewLevelDates?: ChartTimeOnLevelDates[];
|
|
426
|
+
allDates?: ChartTimeDates[];
|
|
427
|
+
forceUpdate?: boolean;
|
|
428
|
+
recalculateTimesLastReason?: string;
|
|
429
|
+
datesCache: DataChartTimeDatesCache;
|
|
430
|
+
}
|
|
431
|
+
export interface ChartCalendarFormatArguments {
|
|
432
|
+
timeStart: Dayjs;
|
|
433
|
+
timeEnd: Dayjs;
|
|
434
|
+
className: string;
|
|
435
|
+
props: any;
|
|
436
|
+
vido: any;
|
|
437
|
+
}
|
|
438
|
+
export type Period = 'year' | 'month' | 'week' | 'day' | 'hour' | 'minute' | 'second' | 'millisecond';
|
|
439
|
+
export type CharCalendarLevelFormatFunction = ({ currentDates, date, leftDate, rightDate, period, level, levelIndex, time, vido, api, }: {
|
|
440
|
+
currentDates: DataChartTimeLevelDate[];
|
|
441
|
+
date: Dayjs;
|
|
442
|
+
leftDate: Dayjs;
|
|
443
|
+
rightDate: Dayjs;
|
|
444
|
+
period: Period;
|
|
445
|
+
level: ChartCalendarLevel;
|
|
446
|
+
levelIndex: number;
|
|
447
|
+
time: DataChartTime;
|
|
448
|
+
vido: Vido;
|
|
449
|
+
api: Api;
|
|
450
|
+
}) => number;
|
|
451
|
+
export interface ChartCalendarLevelFormat {
|
|
452
|
+
zoomTo: number;
|
|
453
|
+
period: Period;
|
|
454
|
+
periodIncrement?: number | CharCalendarLevelFormatFunction;
|
|
455
|
+
main?: boolean;
|
|
456
|
+
classNames?: string[];
|
|
457
|
+
format: (args: ChartCalendarFormatArguments) => string | htmlResult;
|
|
458
|
+
}
|
|
459
|
+
export type ChartCalendarLevel = ChartCalendarLevelFormat[];
|
|
460
|
+
export interface GridCellOnCreateArgument extends GridCell {
|
|
461
|
+
vido: Vido;
|
|
462
|
+
}
|
|
463
|
+
export type GridCellOnCreate = (cell: GridCellOnCreateArgument) => string | htmlResult;
|
|
464
|
+
export interface ChartGridCell {
|
|
465
|
+
onCreate: GridCellOnCreate[];
|
|
466
|
+
}
|
|
467
|
+
export interface ChartGrid {
|
|
468
|
+
cell?: ChartGridCell;
|
|
469
|
+
}
|
|
470
|
+
export interface ItemGap {
|
|
471
|
+
top?: number;
|
|
472
|
+
bottom?: number;
|
|
473
|
+
}
|
|
474
|
+
export interface CutIcons {
|
|
475
|
+
left?: string;
|
|
476
|
+
right?: string;
|
|
477
|
+
}
|
|
478
|
+
export interface DefaultItem {
|
|
479
|
+
gap?: ItemGap;
|
|
480
|
+
height?: number;
|
|
481
|
+
rowTop?: number;
|
|
482
|
+
minWidth?: number;
|
|
483
|
+
cutIcons?: CutIcons;
|
|
484
|
+
overlap?: boolean;
|
|
485
|
+
}
|
|
486
|
+
export interface ChartSpacing {
|
|
487
|
+
left?: number;
|
|
488
|
+
right?: number;
|
|
489
|
+
}
|
|
490
|
+
export interface Chart {
|
|
491
|
+
time?: ChartTime;
|
|
492
|
+
calendarLevels?: ChartCalendarLevel[];
|
|
493
|
+
grid?: ChartGrid;
|
|
494
|
+
items?: Items;
|
|
495
|
+
item?: DefaultItem;
|
|
496
|
+
spacing?: number | ChartSpacing;
|
|
497
|
+
}
|
|
498
|
+
export interface ActionFunctionResult {
|
|
499
|
+
update?: (element: HTMLElement, data: unknown) => void;
|
|
500
|
+
destroy?: (element: HTMLElement, data: unknown) => void;
|
|
501
|
+
}
|
|
502
|
+
export interface ActionData {
|
|
503
|
+
componentName: SlotName;
|
|
504
|
+
[key: string]: any;
|
|
505
|
+
}
|
|
506
|
+
export type Action = (element: HTMLElement, data: ActionData) => ActionFunctionResult | void;
|
|
507
|
+
export type Actions = {
|
|
508
|
+
[name in SlotName]?: Action[];
|
|
509
|
+
};
|
|
510
|
+
export interface Locale {
|
|
511
|
+
name: string;
|
|
512
|
+
weekdays?: string[];
|
|
513
|
+
months?: string[];
|
|
514
|
+
weekStart?: number;
|
|
515
|
+
weekdaysShort?: string[];
|
|
516
|
+
monthsShort?: string[];
|
|
517
|
+
weekdaysMin?: string[];
|
|
518
|
+
ordinal?: (n: number) => number | string;
|
|
519
|
+
formats: Partial<{
|
|
520
|
+
LT: string;
|
|
521
|
+
LTS: string;
|
|
522
|
+
L: string;
|
|
523
|
+
LL: string;
|
|
524
|
+
LLL: string;
|
|
525
|
+
LLLL: string;
|
|
526
|
+
}>;
|
|
527
|
+
relativeTime: Partial<{
|
|
528
|
+
future: string;
|
|
529
|
+
past: string;
|
|
530
|
+
s: string;
|
|
531
|
+
m: string;
|
|
532
|
+
mm: string;
|
|
533
|
+
h: string;
|
|
534
|
+
hh: string;
|
|
535
|
+
d: string;
|
|
536
|
+
dd: string;
|
|
537
|
+
M: string;
|
|
538
|
+
MM: string;
|
|
539
|
+
y: string;
|
|
540
|
+
yy: string;
|
|
541
|
+
}>;
|
|
542
|
+
}
|
|
543
|
+
export interface TemplateVariables {
|
|
544
|
+
[key: string]: any;
|
|
545
|
+
}
|
|
546
|
+
export type Template = (variables: TemplateVariables) => htmlResult;
|
|
547
|
+
export type Templates = {
|
|
548
|
+
[name in SlotName]?: Template;
|
|
549
|
+
};
|
|
550
|
+
export interface LicenseType {
|
|
551
|
+
text: 'Trial' | 'Free' | 'Regular' | 'Ultimate';
|
|
552
|
+
value: 'trial' | 'free' | 'regular' | 'ultimate';
|
|
553
|
+
}
|
|
554
|
+
export interface ValidUntil {
|
|
555
|
+
text: string;
|
|
556
|
+
value: number;
|
|
557
|
+
}
|
|
558
|
+
export interface License {
|
|
559
|
+
type: LicenseType;
|
|
560
|
+
registeredDomains: string[];
|
|
561
|
+
validUntil: ValidUntil;
|
|
562
|
+
for: string;
|
|
563
|
+
}
|
|
564
|
+
export interface AdditionalSpace {
|
|
565
|
+
top: number;
|
|
566
|
+
bottom: number;
|
|
567
|
+
}
|
|
568
|
+
export interface Config {
|
|
569
|
+
licenseKey: string;
|
|
570
|
+
debug?: boolean | string;
|
|
571
|
+
plugins?: PluginInitialization[];
|
|
572
|
+
plugin?: unknown;
|
|
573
|
+
innerHeight?: number;
|
|
574
|
+
autoInnerHeight?: boolean;
|
|
575
|
+
initialWidth?: number;
|
|
576
|
+
headerHeight?: number;
|
|
577
|
+
additionalSpace?: AdditionalSpace;
|
|
578
|
+
components?: Components;
|
|
579
|
+
slots?: Slots;
|
|
580
|
+
list?: List;
|
|
581
|
+
scroll?: Scroll;
|
|
582
|
+
chart?: Chart;
|
|
583
|
+
actions?: Actions;
|
|
584
|
+
templates?: Templates;
|
|
585
|
+
locale?: Locale;
|
|
586
|
+
utcMode?: boolean;
|
|
587
|
+
merge?: (target: object, source: object) => object;
|
|
588
|
+
useLast?: boolean;
|
|
589
|
+
Promise?: Promise<unknown> | any;
|
|
590
|
+
mute?: string[];
|
|
591
|
+
readonly version?: string;
|
|
592
|
+
}
|
|
593
|
+
export interface TreeMapNode {
|
|
594
|
+
id: string;
|
|
595
|
+
children: string[];
|
|
596
|
+
allChildren: string[];
|
|
597
|
+
parents: string[];
|
|
598
|
+
parentId: string | undefined;
|
|
599
|
+
}
|
|
600
|
+
export interface TreeMap {
|
|
601
|
+
[rowId: string]: TreeMapNode;
|
|
602
|
+
}
|
|
603
|
+
export interface DataList {
|
|
604
|
+
width: number;
|
|
605
|
+
visibleRows: string[];
|
|
606
|
+
visibleRowsHeight: number;
|
|
607
|
+
rowsWithParentsExpanded: string[];
|
|
608
|
+
rowsHeight: number;
|
|
609
|
+
rowsIds: string[];
|
|
610
|
+
rows: RowsData;
|
|
611
|
+
}
|
|
612
|
+
export interface Dimensions {
|
|
613
|
+
width: number;
|
|
614
|
+
height: number;
|
|
615
|
+
}
|
|
616
|
+
export interface DataChartDimensions extends Dimensions {
|
|
617
|
+
/**
|
|
618
|
+
* config.innerHeight (whole height - calendar height) minus scroll bar height
|
|
619
|
+
*/
|
|
620
|
+
heightWithoutScrollBar: number;
|
|
621
|
+
/**
|
|
622
|
+
* From config.innerHeight
|
|
623
|
+
*/
|
|
624
|
+
innerHeight: number;
|
|
625
|
+
widthWithoutScrollBar: number;
|
|
626
|
+
}
|
|
627
|
+
export interface DataGrid {
|
|
628
|
+
cells: GridCells;
|
|
629
|
+
rows: GridRows;
|
|
630
|
+
}
|
|
631
|
+
export interface DataItems {
|
|
632
|
+
[id: string]: ItemData;
|
|
633
|
+
}
|
|
634
|
+
export interface DataChart {
|
|
635
|
+
grid: DataGrid;
|
|
636
|
+
items: DataItems;
|
|
637
|
+
dimensions: DataChartDimensions;
|
|
638
|
+
visibleItems: string[];
|
|
639
|
+
time: DataChartTime;
|
|
640
|
+
allItemsOnTheLeftOrRight: boolean;
|
|
641
|
+
}
|
|
642
|
+
export interface DataElements {
|
|
643
|
+
[key: string]: HTMLElement;
|
|
644
|
+
}
|
|
645
|
+
export interface ItemRowMap {
|
|
646
|
+
[itemId: string]: string;
|
|
647
|
+
}
|
|
648
|
+
export interface Data {
|
|
649
|
+
treeMap: TreeMap;
|
|
650
|
+
itemRowMap: ItemRowMap;
|
|
651
|
+
list: DataList;
|
|
652
|
+
dimensions: Dimensions;
|
|
653
|
+
chart: DataChart;
|
|
654
|
+
scroll: DataScroll;
|
|
655
|
+
elements: DataElements;
|
|
656
|
+
initializedPlugins: Set<string>;
|
|
657
|
+
}
|
|
658
|
+
export interface GSTCState {
|
|
659
|
+
config: Config;
|
|
660
|
+
$data: Data;
|
|
661
|
+
license: License;
|
|
662
|
+
}
|
|
663
|
+
export interface Reason {
|
|
664
|
+
name: string;
|
|
665
|
+
oldValue?: unknown;
|
|
666
|
+
newValue?: unknown;
|
|
667
|
+
from?: number;
|
|
668
|
+
to?: number;
|
|
669
|
+
}
|
|
670
|
+
export interface GSTCOptions {
|
|
671
|
+
state: DeepState;
|
|
672
|
+
element: HTMLElement;
|
|
673
|
+
debug?: boolean;
|
|
674
|
+
}
|
|
675
|
+
export interface GSTCResult {
|
|
676
|
+
state: DeepState;
|
|
677
|
+
api: Api;
|
|
678
|
+
component: ComponentInstance;
|
|
679
|
+
destroy: () => void;
|
|
680
|
+
reload: () => void;
|
|
681
|
+
lithtml: typeof lithtml;
|
|
682
|
+
Vido: typeof Vido;
|
|
683
|
+
}
|
|
684
|
+
declare function GSTC(options: GSTCOptions): GSTCResult;
|
|
685
|
+
declare namespace GSTC {
|
|
686
|
+
var api: {
|
|
687
|
+
name: string;
|
|
688
|
+
GSTCID: (originalId: string) => string;
|
|
689
|
+
isGSTCID: (id: string) => boolean;
|
|
690
|
+
sourceID: (id: string) => string;
|
|
691
|
+
fromArray(array: any): Record<string, any>;
|
|
692
|
+
stateFromConfig: typeof import("./api/public").stateFromConfig;
|
|
693
|
+
wasmStateFromConfig: typeof import("./api/public").wasmStateFromConfig;
|
|
694
|
+
merge: typeof import("@neuronet.io/vido/types/helpers").mergeDeep;
|
|
695
|
+
mergeDeep: typeof import("@neuronet.io/vido/types/helpers").mergeDeep;
|
|
696
|
+
clone: (object: object) => unknown;
|
|
697
|
+
lithtml: typeof import("lit-html");
|
|
698
|
+
html: typeof import("lit-html");
|
|
699
|
+
vido: typeof import("@neuronet.io/vido");
|
|
700
|
+
date(time?: any, utcMode?: boolean, localeConfig?: Locale): Dayjs;
|
|
701
|
+
setPeriod(period: Period): number;
|
|
702
|
+
dayjs: typeof import("dayjs");
|
|
703
|
+
};
|
|
704
|
+
var lithtml: typeof import("lit-html");
|
|
705
|
+
var Vido: typeof import("@neuronet.io/vido").default;
|
|
706
|
+
}
|
|
707
|
+
export default GSTC;
|
|
708
|
+
//# sourceMappingURL=gstc.d.ts.map
|