x4js 2.3.27 → 2.3.29
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/LICENSE +21 -0
- package/README.md +5 -0
- package/aicontext.md +412 -24
- package/package.json +8 -3
- package/src/components/autocomplete/autocomplete.ts +5 -1
- package/src/components/bargraph/bargraph.module.scss +44 -0
- package/src/components/bargraph/bargraph.ts +362 -0
- package/src/components/base.scss +71 -1
- package/src/components/boxes/boxes.ts +2 -2
- package/src/components/button/button.module.scss +4 -3
- package/src/components/calendar/calendar.module.scss +6 -5
- package/src/components/calendar/calendar.ts +14 -8
- package/src/components/canvas/canvas.ts +5 -4
- package/src/components/carousel/carousel.module.scss +165 -0
- package/src/components/carousel/carousel.ts +423 -0
- package/src/components/chart/chart.module.scss +8 -0
- package/src/components/chart/chart.ts +170 -12
- package/src/components/checkbox/checkbox.module.scss +67 -1
- package/src/components/checkbox/checkbox.ts +22 -6
- package/src/components/colorinput/colorinput.module.scss +1 -0
- package/src/components/combobox/combobox.module.scss +6 -2
- package/src/components/components.ts +3 -0
- package/src/components/gantt/gantt.module.scss +462 -0
- package/src/components/gantt/gantt.ts +1254 -0
- package/src/components/gridview/gridview.module.scss +6 -0
- package/src/components/input/input.module.scss +1 -1
- package/src/components/knob/knob.module.scss +113 -0
- package/src/components/knob/knob.ts +355 -0
- package/src/components/mapview/mapview.module.scss +177 -0
- package/src/components/mapview/mapview.ts +764 -0
- package/src/components/messages/messages.module.scss +9 -4
- package/src/components/planner/planner.module.scss +688 -0
- package/src/components/planner/planner.ts +1792 -0
- package/src/components/propgrid/progrid.module.scss +13 -5
- package/src/components/radio/radio.module.scss +58 -32
- package/src/components/radio/radio.ts +12 -1
- package/src/components/sizers/sizer.ts +17 -5
- package/src/components/slider/slider.module.scss +22 -20
- package/src/components/spreadsheet/spreadsheet.module.scss +6 -0
- package/src/components/switch/switch.module.scss +68 -44
- package/src/components/switch/switch.ts +6 -3
- package/src/components/tabs/tabs.module.scss +2 -0
- package/src/components/tabs/tabs.ts +1 -0
- package/src/components/tag/tag.module.scss +4 -4
- package/src/components/textarea/textarea.module.scss +9 -0
- package/src/components/textarea/textarea.ts +1 -0
- package/src/components/textedit/textedit.module.scss +5 -2
- package/src/components/themes.scss +20 -6
- package/src/components/treeview/treeview.module.scss +6 -1
- package/src/components/treeview/treeview.ts +1 -0
- package/src/components/video/video.module.scss +5 -2
- package/src/components/video/video.ts +14 -1
- package/src/core/core_i18n.ts +65 -0
- package/src/core/core_pdf.ts +17 -0
- package/src/core/core_react.ts +12 -18
- package/src/core/core_svg.ts +9 -6
- package/src/core/core_tools.ts +44 -0
- package/src/x4doc.ts +3 -0
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ___ ___ __
|
|
3
|
+
* \ \/ / / _
|
|
4
|
+
* \ / /_| |_
|
|
5
|
+
* / \____ _|
|
|
6
|
+
* /__/\__\ |_|
|
|
7
|
+
*
|
|
8
|
+
* @file gantt.module.scss
|
|
9
|
+
* @author Etienne Cochard
|
|
10
|
+
*
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
|
+
*
|
|
13
|
+
* Use of this source code is governed by an MIT-style license
|
|
14
|
+
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
15
|
+
**/
|
|
16
|
+
|
|
17
|
+
:root {
|
|
18
|
+
--gantt-background: var( --background-primary );
|
|
19
|
+
--gantt-border: var( --border );
|
|
20
|
+
--gantt-border-focus: var( --border-focus );
|
|
21
|
+
|
|
22
|
+
--gantt-header-background: var( --background-primary );
|
|
23
|
+
--gantt-header-color: var( --text-primary );
|
|
24
|
+
|
|
25
|
+
--gantt-line-color: var( --border-light ); // between the columns, the rows
|
|
26
|
+
--gantt-major-line-color: var( --border ); // at the start of a unit of the first line of the header
|
|
27
|
+
--gantt-weekend-background: var( --background-ternary );
|
|
28
|
+
--gantt-today-color: var( --alert-background );
|
|
29
|
+
|
|
30
|
+
--gantt-row-background-sel: var( --accent-background );
|
|
31
|
+
--gantt-row-color-sel: var( --accent-color );
|
|
32
|
+
--gantt-lane-background-sel: var( --accent-background-light );
|
|
33
|
+
--gantt-icon-color: var( --icon-color );
|
|
34
|
+
|
|
35
|
+
--gantt-bar-background: var( --accent-background-light );
|
|
36
|
+
--gantt-bar-border: var( --accent-background );
|
|
37
|
+
--gantt-bar-progress: var( --accent-background );
|
|
38
|
+
--gantt-bar-label: var( --text-primary );
|
|
39
|
+
--gantt-handle-color: var( --text-ternary );
|
|
40
|
+
--gantt-group-background: var( --text-ternary );
|
|
41
|
+
--gantt-milestone-background: var( --accent-background );
|
|
42
|
+
|
|
43
|
+
--gantt-link-color: var( --text-secondary );
|
|
44
|
+
--gantt-link-color-sel: var( --accent-background );
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.x4gantt {
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
outline: none;
|
|
52
|
+
border: 1px solid var( --gantt-border );
|
|
53
|
+
background-color: var( --gantt-background );
|
|
54
|
+
|
|
55
|
+
&:focus {
|
|
56
|
+
border-color: var( --gantt-border-focus );
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// disabled (inert: nothing reaches it): faded as a Box
|
|
60
|
+
&[disabled] {
|
|
61
|
+
opacity: var( --box-disabled-opacity );
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// one scroll for all: the header stays at the top, the list on the left
|
|
65
|
+
> .body {
|
|
66
|
+
flex: 1;
|
|
67
|
+
min-height: 0;
|
|
68
|
+
overflow: auto;
|
|
69
|
+
display: grid;
|
|
70
|
+
grid-template-rows: auto 1fr;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.corner,
|
|
74
|
+
.head {
|
|
75
|
+
position: sticky;
|
|
76
|
+
top: 0;
|
|
77
|
+
color: var( --gantt-header-color );
|
|
78
|
+
background-color: var( --gantt-header-background );
|
|
79
|
+
border-bottom: 1px solid var( --gantt-major-line-color );
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// the titles of the columns of the list
|
|
83
|
+
.corner {
|
|
84
|
+
grid-area: 1 / 1;
|
|
85
|
+
left: 0;
|
|
86
|
+
z-index: 4;
|
|
87
|
+
display: flex;
|
|
88
|
+
align-items: flex-end;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
border-right: 1px solid var( --gantt-major-line-color );
|
|
91
|
+
|
|
92
|
+
.cell {
|
|
93
|
+
position: relative;
|
|
94
|
+
flex-shrink: 0;
|
|
95
|
+
box-sizing: border-box;
|
|
96
|
+
padding: 0 6px;
|
|
97
|
+
line-height: 24px;
|
|
98
|
+
font-weight: bold;
|
|
99
|
+
white-space: nowrap;
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
text-overflow: ellipsis;
|
|
102
|
+
|
|
103
|
+
&.center {
|
|
104
|
+
text-align: center;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&.right {
|
|
108
|
+
text-align: right;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// the dates: two lines of cells, each one on its days
|
|
114
|
+
.head {
|
|
115
|
+
grid-area: 1 / 2;
|
|
116
|
+
z-index: 3;
|
|
117
|
+
|
|
118
|
+
.line {
|
|
119
|
+
position: relative;
|
|
120
|
+
height: 24px;
|
|
121
|
+
|
|
122
|
+
&.top {
|
|
123
|
+
border-bottom: 1px solid var( --gantt-line-color );
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.cell {
|
|
128
|
+
position: absolute;
|
|
129
|
+
top: 0;
|
|
130
|
+
bottom: 0;
|
|
131
|
+
box-sizing: border-box;
|
|
132
|
+
border-left: 1px solid var( --gantt-line-color );
|
|
133
|
+
line-height: 24px;
|
|
134
|
+
font-size: 0.85em;
|
|
135
|
+
white-space: nowrap;
|
|
136
|
+
overflow: clip; // not hidden: the sticky text of the first line follows the scroll of the body
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.top .cell {
|
|
140
|
+
padding: 0 6px;
|
|
141
|
+
border-left-color: var( --gantt-major-line-color );
|
|
142
|
+
|
|
143
|
+
// the name of the month stays in view while some of its days are
|
|
144
|
+
span {
|
|
145
|
+
display: inline-block;
|
|
146
|
+
position: sticky;
|
|
147
|
+
left: calc( var( --gantt-list-width ) + 6px );
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.bottom .cell {
|
|
152
|
+
text-align: center;
|
|
153
|
+
|
|
154
|
+
&.weekend {
|
|
155
|
+
background-color: var( --gantt-weekend-background );
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// the tasks, one by line: a cell by column
|
|
161
|
+
.list {
|
|
162
|
+
grid-area: 2 / 1;
|
|
163
|
+
position: sticky;
|
|
164
|
+
left: 0;
|
|
165
|
+
z-index: 2;
|
|
166
|
+
overflow: hidden;
|
|
167
|
+
background-color: var( --gantt-background );
|
|
168
|
+
border-right: 1px solid var( --gantt-major-line-color );
|
|
169
|
+
|
|
170
|
+
.row {
|
|
171
|
+
display: flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
box-sizing: border-box;
|
|
174
|
+
height: var( --gantt-row-height );
|
|
175
|
+
border-bottom: 1px solid var( --gantt-line-color );
|
|
176
|
+
|
|
177
|
+
&.group {
|
|
178
|
+
font-weight: bold;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&.selected {
|
|
182
|
+
color: var( --gantt-row-color-sel );
|
|
183
|
+
background-color: var( --gantt-row-background-sel );
|
|
184
|
+
|
|
185
|
+
.arrow {
|
|
186
|
+
color: var( --gantt-row-color-sel );
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.cell {
|
|
192
|
+
flex-shrink: 0;
|
|
193
|
+
box-sizing: border-box;
|
|
194
|
+
padding: 0 6px;
|
|
195
|
+
white-space: nowrap;
|
|
196
|
+
overflow: hidden;
|
|
197
|
+
text-overflow: ellipsis;
|
|
198
|
+
|
|
199
|
+
&.center {
|
|
200
|
+
text-align: center;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
&.right {
|
|
204
|
+
text-align: right;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// the tree: the arrow of a group, then the title
|
|
208
|
+
&.title {
|
|
209
|
+
display: flex;
|
|
210
|
+
align-items: center;
|
|
211
|
+
gap: 4px;
|
|
212
|
+
|
|
213
|
+
.text {
|
|
214
|
+
overflow: hidden;
|
|
215
|
+
text-overflow: ellipsis;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.arrow {
|
|
221
|
+
width: 16px;
|
|
222
|
+
height: 16px;
|
|
223
|
+
color: var( --gantt-icon-color );
|
|
224
|
+
transform: rotate( -90deg );
|
|
225
|
+
transition: transform 0.2s;
|
|
226
|
+
cursor: pointer;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.row.open .arrow {
|
|
230
|
+
transform: none;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// a stack of its own: its bars and arrows go under the list and the header
|
|
235
|
+
.chart {
|
|
236
|
+
grid-area: 2 / 2;
|
|
237
|
+
position: relative;
|
|
238
|
+
z-index: 0;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// behind the tasks: the week-ends, the lines of the rows, a line by column, now over them. Its paths are in a height of 1
|
|
242
|
+
// stretched to the one of the chart: their lines keep their width (non-scaling-stroke)
|
|
243
|
+
.grid {
|
|
244
|
+
position: absolute;
|
|
245
|
+
left: 0;
|
|
246
|
+
top: 0;
|
|
247
|
+
width: 100%;
|
|
248
|
+
height: 100%;
|
|
249
|
+
pointer-events: none;
|
|
250
|
+
|
|
251
|
+
path {
|
|
252
|
+
fill: none;
|
|
253
|
+
stroke-width: 1;
|
|
254
|
+
vector-effect: non-scaling-stroke;
|
|
255
|
+
shape-rendering: crispEdges;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.weekend {
|
|
259
|
+
fill: var( --gantt-weekend-background );
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.row,
|
|
263
|
+
.col {
|
|
264
|
+
stroke: var( --gantt-line-color );
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.major {
|
|
268
|
+
stroke: var( --gantt-major-line-color );
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.today {
|
|
272
|
+
stroke: var( --gantt-today-color );
|
|
273
|
+
stroke-width: 2;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.lanes {
|
|
278
|
+
position: relative;
|
|
279
|
+
z-index: 1;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// its line under it: in the grid (.row), under the line of now
|
|
283
|
+
.lane {
|
|
284
|
+
position: relative;
|
|
285
|
+
box-sizing: border-box;
|
|
286
|
+
height: var( --gantt-row-height );
|
|
287
|
+
|
|
288
|
+
&.selected {
|
|
289
|
+
background-color: var( --gantt-lane-background-sel );
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// the arrows, above the bars, not in the way of the pointer
|
|
294
|
+
.links {
|
|
295
|
+
position: absolute;
|
|
296
|
+
left: 0;
|
|
297
|
+
top: 0;
|
|
298
|
+
width: 100%;
|
|
299
|
+
height: 100%;
|
|
300
|
+
z-index: 2;
|
|
301
|
+
overflow: visible;
|
|
302
|
+
pointer-events: none;
|
|
303
|
+
|
|
304
|
+
.link {
|
|
305
|
+
fill: none;
|
|
306
|
+
stroke: var( --gantt-link-color );
|
|
307
|
+
stroke-width: 1.5;
|
|
308
|
+
|
|
309
|
+
&.selected {
|
|
310
|
+
stroke: var( --gantt-link-color-sel );
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.bar {
|
|
316
|
+
position: absolute;
|
|
317
|
+
top: 22%;
|
|
318
|
+
bottom: 22%;
|
|
319
|
+
box-sizing: border-box;
|
|
320
|
+
border: 1px solid var( --gantt-bar-border );
|
|
321
|
+
border-radius: 3px;
|
|
322
|
+
background-color: var( --gantt-bar-background );
|
|
323
|
+
touch-action: none;
|
|
324
|
+
|
|
325
|
+
.fill {
|
|
326
|
+
position: absolute;
|
|
327
|
+
left: 0;
|
|
328
|
+
top: 0;
|
|
329
|
+
bottom: 0;
|
|
330
|
+
background-color: var( --gantt-bar-progress );
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
// the title, after the bar and after the arrow that leaves it
|
|
334
|
+
.label {
|
|
335
|
+
position: absolute;
|
|
336
|
+
left: 100%;
|
|
337
|
+
top: 50%;
|
|
338
|
+
transform: translateY( -50% );
|
|
339
|
+
margin-left: 12px;
|
|
340
|
+
font-size: 0.9em;
|
|
341
|
+
white-space: nowrap;
|
|
342
|
+
color: var( --gantt-bar-label );
|
|
343
|
+
pointer-events: none;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// shown on the bar under the pointer
|
|
347
|
+
.handle {
|
|
348
|
+
position: absolute;
|
|
349
|
+
display: none;
|
|
350
|
+
cursor: ew-resize;
|
|
351
|
+
|
|
352
|
+
&[data-mode=start],
|
|
353
|
+
&[data-mode=end] {
|
|
354
|
+
top: -1px;
|
|
355
|
+
bottom: -1px;
|
|
356
|
+
width: 6px;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
&[data-mode=start] {
|
|
360
|
+
left: -1px;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
&[data-mode=end] {
|
|
364
|
+
right: -1px;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// under the bar, at the end of its progress: a triangle up
|
|
368
|
+
&[data-mode=progress] {
|
|
369
|
+
top: calc( 100% - 3px );
|
|
370
|
+
right: -5px;
|
|
371
|
+
border: 5px solid transparent;
|
|
372
|
+
border-bottom-color: var( --gantt-handle-color );
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
&:hover .handle {
|
|
377
|
+
display: block;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// the colour of the task (--gantt-task-color, set by the code): its border and its progress,
|
|
381
|
+
// nothing behind; the line of a group, the diamond of a milestone
|
|
382
|
+
&.colored {
|
|
383
|
+
--gantt-bar-background: transparent;
|
|
384
|
+
--gantt-bar-border: var( --gantt-task-color );
|
|
385
|
+
--gantt-bar-progress: var( --gantt-task-color );
|
|
386
|
+
--gantt-group-background: var( --gantt-task-color );
|
|
387
|
+
--gantt-milestone-background: var( --gantt-task-color );
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// a line on the days of its tasks, its ends pointing down
|
|
391
|
+
&.group {
|
|
392
|
+
top: calc( 50% - 6px );
|
|
393
|
+
bottom: auto;
|
|
394
|
+
height: 8px;
|
|
395
|
+
border: none;
|
|
396
|
+
border-radius: 0;
|
|
397
|
+
background-color: var( --gantt-group-background );
|
|
398
|
+
|
|
399
|
+
.fill {
|
|
400
|
+
display: none;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
&::before,
|
|
404
|
+
&::after {
|
|
405
|
+
content: "";
|
|
406
|
+
position: absolute;
|
|
407
|
+
top: 100%;
|
|
408
|
+
border-top: 5px solid var( --gantt-group-background );
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
&::before {
|
|
412
|
+
left: 0;
|
|
413
|
+
border-right: 5px solid transparent;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
&::after {
|
|
417
|
+
right: 0;
|
|
418
|
+
border-left: 5px solid transparent;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
// a diamond on the middle of its days: the bar has no width
|
|
423
|
+
&.milestone {
|
|
424
|
+
border: none;
|
|
425
|
+
background: none;
|
|
426
|
+
|
|
427
|
+
.fill {
|
|
428
|
+
display: none;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
&::before {
|
|
432
|
+
content: "";
|
|
433
|
+
position: absolute;
|
|
434
|
+
left: -6px;
|
|
435
|
+
top: calc( 50% - 6px );
|
|
436
|
+
width: 12px;
|
|
437
|
+
height: 12px;
|
|
438
|
+
transform: rotate( 45deg );
|
|
439
|
+
background-color: var( --gantt-milestone-background );
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.label {
|
|
443
|
+
margin-left: 20px;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
&:not( .readonly ) .bar:not( .group ) {
|
|
449
|
+
cursor: move;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
// while a bar is moved or stretched, the cursor wherever the pointer is
|
|
453
|
+
&.moving .chart,
|
|
454
|
+
&.moving .chart * {
|
|
455
|
+
cursor: move;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
&.sizing .chart,
|
|
459
|
+
&.sizing .chart * {
|
|
460
|
+
cursor: ew-resize;
|
|
461
|
+
}
|
|
462
|
+
}
|