devexpress-gantt 4.1.29 → 4.1.30
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/dist/dx-gantt.css +2 -2
- package/dist/dx-gantt.js +2 -2
- package/dist/dx-gantt.min.css +2 -2
- package/dist/dx-gantt.min.js +2 -2
- package/dist/lib/.license-header +6 -0
- package/dist/lib/css/system.scss +425 -0
- package/dist/lib/package.json +66 -0
- package/dist/lib/src/BarManager/BarManager.ts +48 -0
- package/dist/lib/src/BarManager/IBar.ts +16 -0
- package/dist/lib/src/Commands/ClientCommand.ts +18 -0
- package/dist/lib/src/Commands/CollapseExpand/CollapseAllCommand.ts +18 -0
- package/dist/lib/src/Commands/CollapseExpand/ExpandAllCommand.ts +18 -0
- package/dist/lib/src/Commands/CommandBase.ts +35 -0
- package/dist/lib/src/Commands/CommandManager.ts +84 -0
- package/dist/lib/src/Commands/Dependency/CreateDependencyCommand.ts +39 -0
- package/dist/lib/src/Commands/Dependency/DependencyCommandBase.ts +8 -0
- package/dist/lib/src/Commands/Dependency/RemoveDependencyCommand.ts +45 -0
- package/dist/lib/src/Commands/Dependency/ToggleDependencies.ts +15 -0
- package/dist/lib/src/Commands/FullScreen/FullScreenCommand.ts +20 -0
- package/dist/lib/src/Commands/History/RedoCommand.ts +20 -0
- package/dist/lib/src/Commands/History/UndoCommand.ts +20 -0
- package/dist/lib/src/Commands/Resource/AssignResourceCommand.ts +32 -0
- package/dist/lib/src/Commands/Resource/CreateResourceCommand.ts +19 -0
- package/dist/lib/src/Commands/Resource/DeassignResourceCommand.ts +19 -0
- package/dist/lib/src/Commands/Resource/Properties/ResourceColorCommand.ts +15 -0
- package/dist/lib/src/Commands/Resource/Properties/ResourcePropertyCommandBase.ts +11 -0
- package/dist/lib/src/Commands/Resource/RemoveResourceCommand.ts +31 -0
- package/dist/lib/src/Commands/Resource/ResourceCommandBase.ts +8 -0
- package/dist/lib/src/Commands/Resource/ToggleResource.ts +15 -0
- package/dist/lib/src/Commands/SimpleCommandState.ts +11 -0
- package/dist/lib/src/Commands/Task/CreateSubTaskCommand.ts +43 -0
- package/dist/lib/src/Commands/Task/CreateTaskCommand.ts +40 -0
- package/dist/lib/src/Commands/Task/RemoveTaskCommand.ts +72 -0
- package/dist/lib/src/Commands/Task/TaskAddContextItemCommand.ts +13 -0
- package/dist/lib/src/Commands/Task/TaskCommandBase.ts +18 -0
- package/dist/lib/src/Commands/Task/UpdateTaskCommand.ts +127 -0
- package/dist/lib/src/Commands/Zoom/ZoomInCommand.ts +15 -0
- package/dist/lib/src/Commands/Zoom/ZoomOutCommand.ts +15 -0
- package/dist/lib/src/Dialogs/ConfirmationDialog.ts +18 -0
- package/dist/lib/src/Dialogs/ConstraintViolationDialog.ts +15 -0
- package/dist/lib/src/Dialogs/DialogBase.ts +63 -0
- package/dist/lib/src/Dialogs/DialogEnums.ts +10 -0
- package/dist/lib/src/Dialogs/DialogParameters/ConfirmationDialogParameters.ts +18 -0
- package/dist/lib/src/Dialogs/DialogParameters/ConstraintViolationDialogParameters.ts +25 -0
- package/dist/lib/src/Dialogs/DialogParameters/DialogParametersBase.ts +5 -0
- package/dist/lib/src/Dialogs/DialogParameters/ResourcesDialogParameters.ts +12 -0
- package/dist/lib/src/Dialogs/DialogParameters/TaskEditParameters.ts +48 -0
- package/dist/lib/src/Dialogs/ResourcesDialog.ts +68 -0
- package/dist/lib/src/Dialogs/TaskEditDialog.ts +110 -0
- package/dist/lib/src/Export/Pdf/Calculator.ts +612 -0
- package/dist/lib/src/Export/Pdf/DataObjects/DependencyLineInfo.ts +20 -0
- package/dist/lib/src/Export/Pdf/DataObjects/Drawer.ts +189 -0
- package/dist/lib/src/Export/Pdf/DataObjects/TaskInfo.ts +58 -0
- package/dist/lib/src/Export/Pdf/DataObjects/TaskResourcesInfo.ts +27 -0
- package/dist/lib/src/Export/Pdf/DataObjects/TimeMarkerInfo.ts +35 -0
- package/dist/lib/src/Export/Pdf/Exporter.ts +67 -0
- package/dist/lib/src/Export/Pdf/Interfaces.ts +44 -0
- package/dist/lib/src/Export/Pdf/Paging/PageDrawer.ts +63 -0
- package/dist/lib/src/Export/Pdf/Paging/PageNavigation.ts +110 -0
- package/dist/lib/src/Export/Pdf/Paging/Paginator.ts +482 -0
- package/dist/lib/src/Export/Pdf/ScalingHelper.ts +150 -0
- package/dist/lib/src/Export/Pdf/Settings/CustomFont.ts +34 -0
- package/dist/lib/src/Export/Pdf/Settings/DataRange.ts +24 -0
- package/dist/lib/src/Export/Pdf/Settings/Enums.ts +3 -0
- package/dist/lib/src/Export/Pdf/Settings/Props.ts +91 -0
- package/dist/lib/src/Export/Pdf/Table/CellDef.ts +48 -0
- package/dist/lib/src/Export/Pdf/Table/Color.ts +107 -0
- package/dist/lib/src/Export/Pdf/Table/Drawer.ts +106 -0
- package/dist/lib/src/Export/Pdf/Table/Ellipsis.ts +21 -0
- package/dist/lib/src/Export/Pdf/Table/IPdfTableDataProvider.ts +5 -0
- package/dist/lib/src/Export/Pdf/Table/Margin.ts +94 -0
- package/dist/lib/src/Export/Pdf/Table/PredefinedStyles.ts +17 -0
- package/dist/lib/src/Export/Pdf/Table/StyleDef.ts +212 -0
- package/dist/lib/src/Export/Pdf/Table/TableOptions.ts +153 -0
- package/dist/lib/src/Export/Pdf/Table/Width.ts +39 -0
- package/dist/lib/src/Export/Pdf/TaskAreaHelper.ts +434 -0
- package/dist/lib/src/Interfaces/ICommand.ts +13 -0
- package/dist/lib/src/Interfaces/IEventManager.ts +8 -0
- package/dist/lib/src/Interfaces/IGanttOwner.ts +49 -0
- package/dist/lib/src/Interfaces/IGanttView.ts +77 -0
- package/dist/lib/src/Interfaces/IHistiryListener.ts +4 -0
- package/dist/lib/src/Interfaces/IModelChangesListener.ts +34 -0
- package/dist/lib/src/Interfaces/ITaskAreaContainer.ts +11 -0
- package/dist/lib/src/Model/Collections/CollectionBase.ts +107 -0
- package/dist/lib/src/Model/Collections/DependencyCollection.ts +6 -0
- package/dist/lib/src/Model/Collections/GanttWorkingDayRuleCollection.ts +6 -0
- package/dist/lib/src/Model/Collections/ResourceAssignmentCollection.ts +6 -0
- package/dist/lib/src/Model/Collections/ResourceCollection.ts +6 -0
- package/dist/lib/src/Model/Collections/TaskCollection.ts +6 -0
- package/dist/lib/src/Model/Dispatchers/EventDispatcher.ts +32 -0
- package/dist/lib/src/Model/Dispatchers/ModelChangesDispatcher.ts +169 -0
- package/dist/lib/src/Model/Entities/DataObject.ts +21 -0
- package/dist/lib/src/Model/Entities/Dependency.ts +48 -0
- package/dist/lib/src/Model/Entities/Enums.ts +12 -0
- package/dist/lib/src/Model/Entities/ITaskUpdateValues.ts +7 -0
- package/dist/lib/src/Model/Entities/Resource.ts +23 -0
- package/dist/lib/src/Model/Entities/ResourceAssignment.ts +21 -0
- package/dist/lib/src/Model/Entities/Task.ts +79 -0
- package/dist/lib/src/Model/Events/BaseArguments.ts +11 -0
- package/dist/lib/src/Model/Events/Dependency/DependencyInsertingArguments.ts +17 -0
- package/dist/lib/src/Model/Events/Dependency/DependencyRemovingArguments.ts +9 -0
- package/dist/lib/src/Model/Events/Dialogs/ResourceManagerDialogShowingArguments.ts +9 -0
- package/dist/lib/src/Model/Events/Dialogs/TaskEditDialogShowingArguments.ts +19 -0
- package/dist/lib/src/Model/Events/Resource/ResourceInsertingArguments.ts +14 -0
- package/dist/lib/src/Model/Events/Resource/ResourceRemovingArguments.ts +9 -0
- package/dist/lib/src/Model/Events/ResourceAssignment/ResourceAssigningArguments.ts +14 -0
- package/dist/lib/src/Model/Events/ResourceAssignment/ResourceUnassigningArguments.ts +10 -0
- package/dist/lib/src/Model/Events/Task/TaskInsertingArguments.ts +15 -0
- package/dist/lib/src/Model/Events/Task/TaskRemovingArguments.ts +10 -0
- package/dist/lib/src/Model/Events/Task/TaskUpdatingArguments.ts +23 -0
- package/dist/lib/src/Model/History/History.ts +121 -0
- package/dist/lib/src/Model/History/HistoryItems/CompositionHistoryItem.ts +32 -0
- package/dist/lib/src/Model/History/HistoryItems/Dependency/InsertDependencyHistoryItem.ts +25 -0
- package/dist/lib/src/Model/History/HistoryItems/Dependency/RemoveDependencyHistoryItem.ts +19 -0
- package/dist/lib/src/Model/History/HistoryItems/HistoryItem.ts +15 -0
- package/dist/lib/src/Model/History/HistoryItems/HistoryItemInfo.ts +10 -0
- package/dist/lib/src/Model/History/HistoryItems/HistoryItemState.ts +8 -0
- package/dist/lib/src/Model/History/HistoryItems/Resource/CreateResourceHistoryItem.ts +23 -0
- package/dist/lib/src/Model/History/HistoryItems/Resource/Properties/ResourceColorHistoryItem.ts +8 -0
- package/dist/lib/src/Model/History/HistoryItems/Resource/Properties/ResourcePropertiesHistoryItemBase.ts +25 -0
- package/dist/lib/src/Model/History/HistoryItems/Resource/RemoveResourceHistoryItem.ts +32 -0
- package/dist/lib/src/Model/History/HistoryItems/ResourceAssignment/AssignResourceHistoryItem.ts +21 -0
- package/dist/lib/src/Model/History/HistoryItems/ResourceAssignment/DeassignResourceHistoryItem.ts +19 -0
- package/dist/lib/src/Model/History/HistoryItems/Task/CreateTaskHistoryItem.ts +18 -0
- package/dist/lib/src/Model/History/HistoryItems/Task/RemoveTaskHistoryItem.ts +64 -0
- package/dist/lib/src/Model/History/HistoryItems/Task/UpdateTaskHistoryItem.ts +25 -0
- package/dist/lib/src/Model/History/IHistory.ts +18 -0
- package/dist/lib/src/Model/Manipulators/BaseManipulator.ts +21 -0
- package/dist/lib/src/Model/Manipulators/Dependency/DependencyManipulator.ts +40 -0
- package/dist/lib/src/Model/Manipulators/ModelManipulator.ts +21 -0
- package/dist/lib/src/Model/Manipulators/Resource/Properties/ResourceColorManipulator.ts +12 -0
- package/dist/lib/src/Model/Manipulators/Resource/Properties/ResourcePropertiesManipulator.ts +13 -0
- package/dist/lib/src/Model/Manipulators/Resource/Properties/ResourcePropertyManipulator.ts +32 -0
- package/dist/lib/src/Model/Manipulators/Resource/ResourcesManipulator.ts +76 -0
- package/dist/lib/src/Model/Manipulators/Task/TaskManipulator.ts +75 -0
- package/dist/lib/src/Model/Utils/GanttJsonUtils.ts +7 -0
- package/dist/lib/src/Model/Validation/ValidationController.ts +311 -0
- package/dist/lib/src/Model/Validation/ValidationError.ts +8 -0
- package/dist/lib/src/Model/VisualModel/ViewVisualModelDependencyInfo.ts +6 -0
- package/dist/lib/src/Model/VisualModel/ViewVisualModelItem.ts +69 -0
- package/dist/lib/src/Model/VisualModel/VisualModel.ts +531 -0
- package/dist/lib/src/Model/WorkingTime/DateRange.ts +16 -0
- package/dist/lib/src/Model/WorkingTime/DateTimeUtils.ts +213 -0
- package/dist/lib/src/Model/WorkingTime/DayOfWeek.ts +9 -0
- package/dist/lib/src/Model/WorkingTime/DayOfWeekMonthlyOccurrence.ts +7 -0
- package/dist/lib/src/Model/WorkingTime/DayWorkingTimeInfo.ts +71 -0
- package/dist/lib/src/Model/WorkingTime/Month.ts +14 -0
- package/dist/lib/src/Model/WorkingTime/MonthInfo.ts +15 -0
- package/dist/lib/src/Model/WorkingTime/Recurrence/Daily.ts +21 -0
- package/dist/lib/src/Model/WorkingTime/Recurrence/Monthly.ts +48 -0
- package/dist/lib/src/Model/WorkingTime/Recurrence/RecurrenceBase.ts +165 -0
- package/dist/lib/src/Model/WorkingTime/Recurrence/RecurrenceFactory.ts +41 -0
- package/dist/lib/src/Model/WorkingTime/Recurrence/Weekly.ts +39 -0
- package/dist/lib/src/Model/WorkingTime/Recurrence/Yearly.ts +50 -0
- package/dist/lib/src/Model/WorkingTime/Time.ts +56 -0
- package/dist/lib/src/Model/WorkingTime/TimeRange.ts +44 -0
- package/dist/lib/src/Model/WorkingTime/WorkingTimeCalculator.ts +80 -0
- package/dist/lib/src/Model/WorkingTime/WorkingTimeRule.ts +36 -0
- package/dist/lib/src/View/Api/GanttViewApi.ts +122 -0
- package/dist/lib/src/View/Edit/TaskEditController.ts +490 -0
- package/dist/lib/src/View/Edit/TaskEditTooltip.ts +210 -0
- package/dist/lib/src/View/Events/MovingHelper.ts +72 -0
- package/dist/lib/src/View/Events/States/StateController.ts +242 -0
- package/dist/lib/src/View/Events/States/TaskAreaDefaultState.ts +94 -0
- package/dist/lib/src/View/Events/States/TaskAreaDependencyState.ts +77 -0
- package/dist/lib/src/View/Events/States/TaskAreaDomHelper.ts +42 -0
- package/dist/lib/src/View/Events/States/TaskAreaScrollState.ts +42 -0
- package/dist/lib/src/View/Events/States/TaskAreaStateBase.ts +200 -0
- package/dist/lib/src/View/Events/States/TaskAreaStateEventNames.ts +33 -0
- package/dist/lib/src/View/Events/States/TaskAreaZoomState.ts +98 -0
- package/dist/lib/src/View/Events/States/TaskDragBaseState.ts +45 -0
- package/dist/lib/src/View/Events/States/TaskEditState.ts +44 -0
- package/dist/lib/src/View/Events/States/TaskMoveState.ts +13 -0
- package/dist/lib/src/View/Events/TaskAreaEventArgs.ts +18 -0
- package/dist/lib/src/View/Events/TaskAreaEventsListener.ts +197 -0
- package/dist/lib/src/View/Events/TaskAreaManager.ts +248 -0
- package/dist/lib/src/View/GanttView.ts +893 -0
- package/dist/lib/src/View/Helpers/Enums.ts +16 -0
- package/dist/lib/src/View/Helpers/EtalonSizeValues.ts +12 -0
- package/dist/lib/src/View/Helpers/FullScreenModeHelper.ts +125 -0
- package/dist/lib/src/View/Helpers/GridElementInfo.ts +65 -0
- package/dist/lib/src/View/Helpers/GridLayoutCalculator.ts +918 -0
- package/dist/lib/src/View/Helpers/ScaleCalculator.ts +305 -0
- package/dist/lib/src/View/Helpers/TaskAreaContainer.ts +52 -0
- package/dist/lib/src/View/Render/ConnectorLinesRender.ts +95 -0
- package/dist/lib/src/View/Render/CustomTaskRender.ts +141 -0
- package/dist/lib/src/View/Render/EtalonsHelper.ts +97 -0
- package/dist/lib/src/View/Render/Events/ScaleCellPreparedArguments.ts +15 -0
- package/dist/lib/src/View/Render/MainElementsRender.ts +16 -0
- package/dist/lib/src/View/Render/NoWorkingIntervalRender.ts +57 -0
- package/dist/lib/src/View/Render/RenderElementUtils.ts +52 -0
- package/dist/lib/src/View/Render/RenderHelper.ts +476 -0
- package/dist/lib/src/View/Render/ResourceRender.ts +54 -0
- package/dist/lib/src/View/Render/ScaleRender.ts +166 -0
- package/dist/lib/src/View/Render/StripLinesRender.ts +52 -0
- package/dist/lib/src/View/Render/TaskAreaRender.ts +192 -0
- package/dist/lib/src/View/Render/TaskRender.ts +307 -0
- package/dist/lib/src/View/Settings/EditingSettings.ts +59 -0
- package/dist/lib/src/View/Settings/InitSettings/FullScreenHelperSettings.ts +17 -0
- package/dist/lib/src/View/Settings/InitSettings/HandlerSettings.ts +50 -0
- package/dist/lib/src/View/Settings/InitSettings/TaskEditSettings.ts +42 -0
- package/dist/lib/src/View/Settings/InitSettings/TooltipSettings.ts +29 -0
- package/dist/lib/src/View/Settings/InitSettings/ValidationControllerSettings.ts +37 -0
- package/dist/lib/src/View/Settings/Settings.ts +102 -0
- package/dist/lib/src/View/Settings/StripLine.ts +45 -0
- package/dist/lib/src/View/Settings/StripLineSettings.ts +42 -0
- package/dist/lib/src/View/Settings/ValidationSettings.ts +29 -0
- package/dist/lib/src/View/Settings/ViewTypeRange.ts +26 -0
- package/dist/lib/src/View/Utils/DateUtils.ts +207 -0
- package/dist/lib/src/View/Utils/ElementTextHelper.ts +215 -0
- package/dist/lib/src/View/Utils/ElementTextHelperCultureInfo.ts +12 -0
- package/dist/lib/src/index.ts +3 -0
- package/dist/lib/tsconfig.json +12 -0
- package/dist/lib/webpack.config.js +78 -0
- package/package.json +1 -1
package/dist/dx-gantt.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* DevExpress Gantt (dx-gantt)
|
|
3
|
-
* Version: 4.1.
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 4.1.30
|
|
4
|
+
* Build date: Thu May 26 2022
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
* Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
|
package/dist/dx-gantt.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* DevExpress Gantt (dx-gantt)
|
|
3
|
-
* Version: 4.1.
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 4.1.30
|
|
4
|
+
* Build date: Thu May 26 2022
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
* Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
|
package/dist/dx-gantt.min.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* DevExpress Gantt (dx-gantt.min)
|
|
3
|
-
* Version: 4.1.
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 4.1.30
|
|
4
|
+
* Build date: Thu May 26 2022
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
* Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
|
package/dist/dx-gantt.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* DevExpress Gantt (dx-gantt.min)
|
|
3
|
-
* Version: 4.1.
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 4.1.30
|
|
4
|
+
* Build date: Thu May 26 2022
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
* Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
|
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
.dx-gantt-tsac { /* timeScaleAreaContainer */
|
|
2
|
+
position: relative;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
background-color: white;
|
|
5
|
+
z-index: 6;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.dx-gantt-tsa { /* time scale area */
|
|
9
|
+
position: relative;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.dx-gantt-hb { /* horizontal border */
|
|
13
|
+
position: absolute;
|
|
14
|
+
left: 0;
|
|
15
|
+
height: 0;
|
|
16
|
+
z-index: 6;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.dx-gantt-vb { /* vertical border */
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: 0;
|
|
22
|
+
width: 0;
|
|
23
|
+
z-index: 6;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.dx-gantt-tm,
|
|
27
|
+
.dx-gantt-ti,
|
|
28
|
+
.dx-gantt-tc {
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: 0;
|
|
31
|
+
z-index: 6;
|
|
32
|
+
|
|
33
|
+
&:before {
|
|
34
|
+
content: "";
|
|
35
|
+
position: absolute;
|
|
36
|
+
top: 0;
|
|
37
|
+
width: 6px;
|
|
38
|
+
margin-left: -3px;
|
|
39
|
+
z-index: 6;
|
|
40
|
+
height: 100%;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.dx-gantt-si { /* time scale item */
|
|
45
|
+
position: absolute;
|
|
46
|
+
top: 0;
|
|
47
|
+
white-space: nowrap;
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.dx-gantt-taskWrapper,
|
|
52
|
+
.dx-gantt-milestoneWrapper,
|
|
53
|
+
.dx-gantt-taskResWrapper { /* task wrapper */
|
|
54
|
+
position: absolute;
|
|
55
|
+
z-index: 10;
|
|
56
|
+
vertical-align: top;
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.dx-gantt-taskWrapper > div {
|
|
61
|
+
vertical-align: top;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.dx-gantt-taskResWrapper {
|
|
65
|
+
pointer-events: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.dx-gantt-task {
|
|
69
|
+
position: relative;
|
|
70
|
+
display: inline-block;
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
vertical-align: top;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.dx-gantt-tPrg { /* task progress */
|
|
76
|
+
position: absolute;
|
|
77
|
+
top: 0;
|
|
78
|
+
height: 100%;
|
|
79
|
+
z-index: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.dx-gantt-taskTitle,
|
|
83
|
+
.dx-gantt-taskRes {
|
|
84
|
+
text-overflow: ellipsis;
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.dx-gantt-titleIn {
|
|
90
|
+
position: relative;
|
|
91
|
+
width: 100%;
|
|
92
|
+
z-index: 1;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.dx-gantt-titleOut {
|
|
96
|
+
display: inline-block;
|
|
97
|
+
width: 500px;
|
|
98
|
+
margin-left: -500px;
|
|
99
|
+
text-align: right;
|
|
100
|
+
text-overflow: ellipsis;
|
|
101
|
+
padding-left: 5px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.dx-gantt-taskRes { /* task-resource */
|
|
105
|
+
display: inline-block;
|
|
106
|
+
overflow: hidden;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.dx-gantt-task,
|
|
110
|
+
.dx-gantt-taskTitle,
|
|
111
|
+
.dx-gantt-titleOut,
|
|
112
|
+
.dx-gantt-taskRes {
|
|
113
|
+
box-sizing: border-box;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.dx-gantt-sel { /* row-selection */
|
|
117
|
+
position: absolute;
|
|
118
|
+
z-index: 5;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.dx-gantt-task.dx-gantt-milestone {
|
|
122
|
+
transform: rotate(45deg);
|
|
123
|
+
border-radius: 0 !important; // stylelint-disable-line declaration-no-important
|
|
124
|
+
padding: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.dx-gantt-task.dx-gantt-smallTask {
|
|
128
|
+
text-align: center;
|
|
129
|
+
|
|
130
|
+
.dx-gantt-titleIn {
|
|
131
|
+
padding: 0;
|
|
132
|
+
visibility: hidden;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.dx-gantt-conn-h, /* connector-horizontal */
|
|
137
|
+
.dx-gantt-conn-v, /* connector-vertical */
|
|
138
|
+
.dx-gantt-arrow { /* connector-arrow */
|
|
139
|
+
position: absolute;
|
|
140
|
+
z-index: 9;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.dx-gantt-conn-v {
|
|
144
|
+
top: 0;
|
|
145
|
+
width: 4px;
|
|
146
|
+
cursor: pointer;
|
|
147
|
+
border-left-width: 1px;
|
|
148
|
+
border-left-style: solid;
|
|
149
|
+
|
|
150
|
+
&.active {
|
|
151
|
+
border-left-width: 2px !important; // stylelint-disable-line declaration-no-important
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.dx-gantt-conn-h {
|
|
156
|
+
left: 0;
|
|
157
|
+
height: 4px;
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
border-top-width: 1px;
|
|
160
|
+
border-top-style: solid;
|
|
161
|
+
|
|
162
|
+
&.active {
|
|
163
|
+
border-top-width: 2px !important; // stylelint-disable-line declaration-no-important
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.dx-gantt-arrow {
|
|
168
|
+
width: 0;
|
|
169
|
+
height: 0;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.dx-gantt-arrow.dx-gantt-TA { /* connector-arrow-top */
|
|
173
|
+
border-left-color: transparent !important; // stylelint-disable-line declaration-no-important
|
|
174
|
+
border-right-color: transparent !important; // stylelint-disable-line declaration-no-important
|
|
175
|
+
border-top-color: transparent !important; // stylelint-disable-line declaration-no-important
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.dx-gantt-arrow.dx-gantt-RA { /* connector-arrow-right */
|
|
179
|
+
border-right-color: transparent !important; // stylelint-disable-line declaration-no-important
|
|
180
|
+
border-top-color: transparent !important; // stylelint-disable-line declaration-no-important
|
|
181
|
+
border-bottom-color: transparent !important; // stylelint-disable-line declaration-no-important
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.dx-gantt-arrow.dx-gantt-BA { /* connector-arrow-bottom */
|
|
185
|
+
border-left-color: transparent !important; // stylelint-disable-line declaration-no-important
|
|
186
|
+
border-right-color: transparent !important; // stylelint-disable-line declaration-no-important
|
|
187
|
+
border-bottom-color: transparent !important; // stylelint-disable-line declaration-no-important
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.dx-gantt-arrow.dx-gantt-LA { /* connector-arrow-left */
|
|
191
|
+
border-left-color: transparent !important; // stylelint-disable-line declaration-no-important
|
|
192
|
+
border-top-color: transparent !important; // stylelint-disable-line declaration-no-important
|
|
193
|
+
border-bottom-color: transparent !important; // stylelint-disable-line declaration-no-important
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.dx-gantt-nwi { /* column-holiday */
|
|
197
|
+
position: absolute;
|
|
198
|
+
z-index: 3;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.dx-gantt-altRow /* row-alternated */ {
|
|
202
|
+
position: absolute;
|
|
203
|
+
z-index: 2;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.dx-gantt-task-edit-wrapper {
|
|
207
|
+
padding-left: 1px;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.dx-gantt-task-edit-wrapper,
|
|
211
|
+
.dx-gantt-task-edit-wrapper-successor {
|
|
212
|
+
position: absolute;
|
|
213
|
+
z-index: 11;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.dx-gantt-task-edit-wrapper-custom {
|
|
217
|
+
background-color: rgba(90, 84, 84, 0.3);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.dx-gantt-task-edit-wrapper-custom.hide-updating {
|
|
221
|
+
background-color: transparent;
|
|
222
|
+
pointer-events: none;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.dx-gantt-task-edit-wrapper.milestone .dx-gantt-task-edit-frame,
|
|
226
|
+
.dx-gantt-task-edit-wrapper.hide-updating .dx-gantt-task-edit-frame {
|
|
227
|
+
border: none !important; // stylelint-disable-line declaration-no-important
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
#dx-gantt-ta.ms-pointer-active,
|
|
231
|
+
#dx-gantt-ta.ms-pointer-active .dx-gantt-task-edit-frame,
|
|
232
|
+
#dx-gantt-ta.ms-pointer-active .dx-gantt-task-edit-frame div {
|
|
233
|
+
-webkit-appearance: none; // stylelint-disable-line property-no-vendor-prefix
|
|
234
|
+
-ms-touch-action: none; // stylelint-disable-line property-no-vendor-prefix
|
|
235
|
+
touch-action: none;
|
|
236
|
+
-ms-user-select: none; // stylelint-disable-line property-no-vendor-prefix
|
|
237
|
+
-webkit-user-select: none; // stylelint-disable-line property-no-vendor-prefix
|
|
238
|
+
user-select: none; // stylelint-disable-line property-no-vendor-prefix
|
|
239
|
+
-moz-user-select: none; // stylelint-disable-line property-no-vendor-prefix
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.dx-gantt-task-edit-wrapper.milestone .dx-gantt-task-edit-progress,
|
|
243
|
+
.dx-gantt-task-edit-wrapper.milestone .dx-gantt-task-edit-start,
|
|
244
|
+
.dx-gantt-task-edit-wrapper.milestone .dx-gantt-task-edit-end,
|
|
245
|
+
.dx-gantt-task-edit-wrapper.move .dx-gantt-task-edit-progress,
|
|
246
|
+
.dx-gantt-task-edit-wrapper.move .dx-gantt-task-edit-dependency-r,
|
|
247
|
+
.dx-gantt-task-edit-wrapper.move .dx-gantt-task-edit-dependency-l,
|
|
248
|
+
.dx-gantt-task-edit-wrapper.hide-dependency .dx-gantt-task-edit-dependency-r,
|
|
249
|
+
.dx-gantt-task-edit-wrapper.hide-dependency .dx-gantt-task-edit-dependency-l,
|
|
250
|
+
.dx-gantt-task-edit-wrapper.hide-updating .dx-gantt-task-edit-progress,
|
|
251
|
+
.dx-gantt-task-edit-wrapper.hide-updating .dx-gantt-task-edit-start,
|
|
252
|
+
.dx-gantt-task-edit-wrapper.hide-updating .dx-gantt-task-edit-end {
|
|
253
|
+
display: none;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.dx-gantt-task-edit-frame,
|
|
257
|
+
.dx-gantt-task-edit-frame-successor {
|
|
258
|
+
box-sizing: border-box;
|
|
259
|
+
height: 100%;
|
|
260
|
+
width: 100%;
|
|
261
|
+
position: absolute;
|
|
262
|
+
z-index: 9;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.dx-gantt-task-edit-frame {
|
|
266
|
+
border: 1px solid #269aff;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.dx-gantt-task-edit-progress {
|
|
270
|
+
position: absolute;
|
|
271
|
+
width: 0;
|
|
272
|
+
height: 0;
|
|
273
|
+
bottom: 0;
|
|
274
|
+
cursor: pointer;
|
|
275
|
+
border-style: solid;
|
|
276
|
+
border-width: 0 6px 9px 6px;
|
|
277
|
+
border-color: transparent transparent #269aff transparent;
|
|
278
|
+
z-index: 10;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.dx-gantt-task-edit-progress:before {
|
|
282
|
+
content: "";
|
|
283
|
+
width: 10px;
|
|
284
|
+
height: 4px;
|
|
285
|
+
background-color: white;
|
|
286
|
+
position: absolute;
|
|
287
|
+
bottom: -14px;
|
|
288
|
+
left: -6px;
|
|
289
|
+
border: 1px solid #269aff;
|
|
290
|
+
border-top: none;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.dx-gantt-task-edit-progress div {
|
|
294
|
+
position: absolute;
|
|
295
|
+
bottom: 0;
|
|
296
|
+
cursor: pointer;
|
|
297
|
+
border-style: solid;
|
|
298
|
+
border-width: 0 5px 7px 5px;
|
|
299
|
+
border-color: transparent transparent white transparent;
|
|
300
|
+
z-index: 9;
|
|
301
|
+
top: 2px;
|
|
302
|
+
left: -5px;
|
|
303
|
+
pointer-events: none;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.dx-gantt-task-edit-tooltip {
|
|
307
|
+
position: absolute;
|
|
308
|
+
font-family: sans-serif;
|
|
309
|
+
width: max-content;
|
|
310
|
+
line-height: 16px;
|
|
311
|
+
font-size: 12px;
|
|
312
|
+
border-radius: 2px;
|
|
313
|
+
display: none;
|
|
314
|
+
z-index: 12;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.dx-gantt-task-edit-tooltip-default {
|
|
318
|
+
padding: 6px;
|
|
319
|
+
color: white;
|
|
320
|
+
background-color: rgba(0, 0, 0, 0.64);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.dx-gantt-task-edit-tooltip-after:after {
|
|
324
|
+
content: "";
|
|
325
|
+
width: 0;
|
|
326
|
+
height: 0;
|
|
327
|
+
border-left: 5px solid transparent;
|
|
328
|
+
border-right: 5px solid transparent;
|
|
329
|
+
border-bottom: 6px solid rgba(0, 0, 0, 0.64);
|
|
330
|
+
top: -6px;
|
|
331
|
+
position: absolute;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.dx-gantt-task-edit-tooltip-before:before {
|
|
335
|
+
content: "";
|
|
336
|
+
width: 0;
|
|
337
|
+
height: 0;
|
|
338
|
+
border-left: 5px solid transparent;
|
|
339
|
+
border-right: 5px solid transparent;
|
|
340
|
+
border-top: 6px solid rgba(0, 0, 0, 0.64);
|
|
341
|
+
bottom: -6px;
|
|
342
|
+
position: absolute;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.dx-gantt-task-edit-tooltip .dx-gantt-task-title {
|
|
346
|
+
padding-bottom: 3px;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.dx-gantt-task-edit-tooltip .dx-gantt-status-time tr td:first-child {
|
|
350
|
+
padding-right: 3px;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.dx-gantt-task-edit-tooltip .dx-gantt-status-time tr td:first-child,
|
|
354
|
+
.dx-gantt-task-edit-tooltip .dx-gantt-status-time span:first-child,
|
|
355
|
+
.dx-gantt-task-edit-tooltip .dx-gantt-task-title {
|
|
356
|
+
font-weight: 600;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.dx-gantt-task-edit-dependency-r,
|
|
360
|
+
.dx-gantt-task-edit-successor-dependency-r,
|
|
361
|
+
.dx-gantt-task-edit-dependency-l,
|
|
362
|
+
.dx-gantt-task-edit-successor-dependency-l {
|
|
363
|
+
position: absolute;
|
|
364
|
+
border-radius: 50%;
|
|
365
|
+
top: 5px;
|
|
366
|
+
width: 8px;
|
|
367
|
+
height: 8px;
|
|
368
|
+
background: white;
|
|
369
|
+
border: 1px solid #269aff;
|
|
370
|
+
cursor: pointer;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.dx-gantt-task-edit-dependency-r,
|
|
374
|
+
.dx-gantt-task-edit-successor-dependency-r {
|
|
375
|
+
left: -10px;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.dx-gantt-task-edit-dependency-l,
|
|
379
|
+
.dx-gantt-task-edit-successor-dependency-l {
|
|
380
|
+
right: -10px;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.dx-gantt-task-edit-dependency-r.dx-gantt-edit-touch,
|
|
384
|
+
.dx-gantt-task-edit-successor-dependency-r.dx-gantt-edit-touch,
|
|
385
|
+
.dx-gantt-task-edit-dependency-l.dx-gantt-edit-touch,
|
|
386
|
+
.dx-gantt-task-edit-successor-dependency-l.dx-gantt-edit-touch {
|
|
387
|
+
top: 3px;
|
|
388
|
+
width: 11px;
|
|
389
|
+
height: 11px;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.dx-gantt-task-edit-dependency-r.dx-gantt-edit-touch,
|
|
393
|
+
.dx-gantt-task-edit-successor-dependency-r.dx-gantt-edit-touch {
|
|
394
|
+
left: -15px;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.dx-gantt-task-edit-dependency-l.dx-gantt-edit-touch,
|
|
398
|
+
.dx-gantt-task-edit-successor-dependency-l.dx-gantt-edit-touch {
|
|
399
|
+
right: -15px;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.dx-gantt-task-edit-start,
|
|
403
|
+
.dx-gantt-task-edit-end {
|
|
404
|
+
position: absolute;
|
|
405
|
+
height: 100%;
|
|
406
|
+
width: 5px;
|
|
407
|
+
top: 0;
|
|
408
|
+
cursor: col-resize;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.dx-gantt-task-edit-end {
|
|
412
|
+
right: 0;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.dx-gantt-task-edit-dependency-line {
|
|
416
|
+
height: 2px;
|
|
417
|
+
background-color: #269aff;
|
|
418
|
+
position: absolute;
|
|
419
|
+
transform-origin: 0% 0%;
|
|
420
|
+
z-index: 9;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.dx-gantt-touch-action {
|
|
424
|
+
touch-action: none;
|
|
425
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "devexpress-gantt",
|
|
3
|
+
"version": "4.1.30",
|
|
4
|
+
"description": "DevExpress Gantt Control",
|
|
5
|
+
"main": "dist/dx-gantt.min.js",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@devexpress/utils": "1.3.14",
|
|
8
|
+
"tslib": "2.3.1"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"@fortawesome/fontawesome-free": "^5.6.3",
|
|
12
|
+
"@types/jasmine": "^3.3.4",
|
|
13
|
+
"@typescript-eslint/eslint-plugin": "^4.6.0",
|
|
14
|
+
"@typescript-eslint/parser": "^4.6.0",
|
|
15
|
+
"babel-register": "^6.26.0",
|
|
16
|
+
"bootstrap": "^4.2.1",
|
|
17
|
+
"canvas": "^2.5.0",
|
|
18
|
+
"concurrently": "^4.1.0",
|
|
19
|
+
"copy-webpack-plugin": "^4.5.1",
|
|
20
|
+
"css-loader": "^2.1.1",
|
|
21
|
+
"decomment": "^0.9.5",
|
|
22
|
+
"eslint": "^7.12.1",
|
|
23
|
+
"eslint-config-airbnb-typescript": "^12.0.0",
|
|
24
|
+
"eslint-plugin-import": "^2.22.1",
|
|
25
|
+
"eslint-plugin-no-loops": "^0.3.0",
|
|
26
|
+
"eslint-plugin-spellcheck": "0.0.17",
|
|
27
|
+
"express": "^4.16.4",
|
|
28
|
+
"filemanager-webpack-plugin": "^2.0.5",
|
|
29
|
+
"ignore-styles": "^5.0.1",
|
|
30
|
+
"jasmine": "^3.3.1",
|
|
31
|
+
"jquery": "^3.3.1",
|
|
32
|
+
"jsdom": "^13.1.0",
|
|
33
|
+
"lint-staged": "^10.5.0",
|
|
34
|
+
"mini-css-extract-plugin": "^0.7.0",
|
|
35
|
+
"node-sass": "^4.11.0",
|
|
36
|
+
"npm-run-all": "^4.1.5",
|
|
37
|
+
"optimize-css-assets-webpack-plugin": "^5.0.1",
|
|
38
|
+
"popper.js": "^1.14.6",
|
|
39
|
+
"pre-commit": "^1.2.2",
|
|
40
|
+
"sass-loader": "^7.1.0",
|
|
41
|
+
"stylelint": "^13.7.2",
|
|
42
|
+
"stylelint-config-standard": "^20.0.0",
|
|
43
|
+
"stylelint-scss": "^3.18.0",
|
|
44
|
+
"terser-webpack-plugin": "^1.3.0",
|
|
45
|
+
"ts-loader": "^5.3.2",
|
|
46
|
+
"ts-node": "^7.0.1",
|
|
47
|
+
"tslib": "2.3.1",
|
|
48
|
+
"typescript": "^4.0.5",
|
|
49
|
+
"webpack": "^4.28.1",
|
|
50
|
+
"webpack-cli": "^3.1.2",
|
|
51
|
+
"webpack-merge": "^4.2.1"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "webpack --config webpack.config.js --mode production --progress --colors"
|
|
55
|
+
},
|
|
56
|
+
"homepage": "https://devexpress.com/",
|
|
57
|
+
"bugs": "https://www.devexpress.com/support/",
|
|
58
|
+
"author": "Developer Express Inc.",
|
|
59
|
+
"license": "SEE LICENSE IN README.md",
|
|
60
|
+
"keywords": [
|
|
61
|
+
"gantt",
|
|
62
|
+
"editor",
|
|
63
|
+
"devextreme",
|
|
64
|
+
"devexpress"
|
|
65
|
+
]
|
|
66
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { IBar } from "./IBar";
|
|
2
|
+
import { GanttClientCommand } from "../Commands/ClientCommand";
|
|
3
|
+
import { CommandManager } from "../Commands/CommandManager";
|
|
4
|
+
|
|
5
|
+
export class BarManager {
|
|
6
|
+
private bars: IBar[];
|
|
7
|
+
private commandManager: CommandManager;
|
|
8
|
+
|
|
9
|
+
constructor(commandManager: CommandManager, bars: IBar[]) {
|
|
10
|
+
this.commandManager = commandManager;
|
|
11
|
+
this.bars = bars;
|
|
12
|
+
}
|
|
13
|
+
updateContextMenu(): void {
|
|
14
|
+
for(let i = 0, bar: IBar; bar = this.bars[i]; i++)
|
|
15
|
+
if(bar.isContextMenu()) {
|
|
16
|
+
bar.updateItemsList();
|
|
17
|
+
const commandKeys = bar.getCommandKeys();
|
|
18
|
+
for(let j = 0; j < commandKeys.length; j++)
|
|
19
|
+
this.updateBarItem(bar, commandKeys[j]);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
updateItemsState(queryCommands: GanttClientCommand[]): void {
|
|
23
|
+
const anyQuerySended: boolean = !!queryCommands.length;
|
|
24
|
+
|
|
25
|
+
for(let i = 0, bar: IBar; bar = this.bars[i]; i++)
|
|
26
|
+
if(bar.isVisible()) {
|
|
27
|
+
const commandKeys = bar.getCommandKeys();
|
|
28
|
+
for(let j = 0; j < commandKeys.length; j++) {
|
|
29
|
+
if(anyQuerySended && !queryCommands.filter(q => q == commandKeys[j]).length)
|
|
30
|
+
continue;
|
|
31
|
+
this.updateBarItem(bar, commandKeys[j]);
|
|
32
|
+
}
|
|
33
|
+
bar.completeUpdate();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
private updateBarItem(bar: IBar, commandKey: GanttClientCommand) {
|
|
38
|
+
const command = this.commandManager.getCommand(commandKey);
|
|
39
|
+
if(command) {
|
|
40
|
+
const commandState = command.getState();
|
|
41
|
+
bar.setItemVisible(commandKey, commandState.visible);
|
|
42
|
+
if(commandState.visible) {
|
|
43
|
+
bar.setItemEnabled(commandKey, commandState.enabled);
|
|
44
|
+
bar.setItemValue(commandKey, commandState.value);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GanttClientCommand } from "../Commands/ClientCommand";
|
|
2
|
+
|
|
3
|
+
export interface IBar {
|
|
4
|
+
getCommandKeys(): GanttClientCommand[];
|
|
5
|
+
setItemValue(key: GanttClientCommand, value: any);
|
|
6
|
+
setItemEnabled(key: GanttClientCommand, enabled: boolean);
|
|
7
|
+
setItemVisible(key: GanttClientCommand, visible: boolean);
|
|
8
|
+
setItemSubItems(key: GanttClientCommand, subItems: any[]);
|
|
9
|
+
setEnabled(enabled: boolean);
|
|
10
|
+
getItem(key: GanttClientCommand): any;
|
|
11
|
+
isVisible(): boolean;
|
|
12
|
+
isContextMenu(): boolean;
|
|
13
|
+
|
|
14
|
+
updateItemsList();
|
|
15
|
+
completeUpdate();
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export enum GanttClientCommand {
|
|
2
|
+
CreateTask = 0,
|
|
3
|
+
CreateSubTask = 1,
|
|
4
|
+
RemoveTask = 2,
|
|
5
|
+
RemoveDependency = 3,
|
|
6
|
+
TaskInformation = 4,
|
|
7
|
+
TaskAddContextItem = 5,
|
|
8
|
+
Undo = 6,
|
|
9
|
+
Redo = 7,
|
|
10
|
+
ZoomIn = 8,
|
|
11
|
+
ZoomOut = 9,
|
|
12
|
+
FullScreen = 10,
|
|
13
|
+
CollapseAll = 11,
|
|
14
|
+
ExpandAll = 12,
|
|
15
|
+
ResourceManager = 13,
|
|
16
|
+
ToggleResources = 14,
|
|
17
|
+
ToggleDependencies = 15
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CommandBase } from "../CommandBase";
|
|
2
|
+
import { SimpleCommandState } from "../SimpleCommandState";
|
|
3
|
+
|
|
4
|
+
export class CollapseAllCommand extends CommandBase<SimpleCommandState> {
|
|
5
|
+
public getState(): SimpleCommandState {
|
|
6
|
+
return new SimpleCommandState(this.isEnabled());
|
|
7
|
+
}
|
|
8
|
+
public execute(): boolean {
|
|
9
|
+
return super.execute();
|
|
10
|
+
}
|
|
11
|
+
protected executeInternal(): boolean {
|
|
12
|
+
this.control.collapseAll();
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
isEnabled(): boolean {
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CommandBase } from "../CommandBase";
|
|
2
|
+
import { SimpleCommandState } from "../SimpleCommandState";
|
|
3
|
+
|
|
4
|
+
export class ExpandAllCommand extends CommandBase<SimpleCommandState> {
|
|
5
|
+
public getState(): SimpleCommandState {
|
|
6
|
+
return new SimpleCommandState(this.isEnabled());
|
|
7
|
+
}
|
|
8
|
+
public execute(): boolean {
|
|
9
|
+
return super.execute();
|
|
10
|
+
}
|
|
11
|
+
protected executeInternal(): boolean {
|
|
12
|
+
this.control.expandAll();
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
isEnabled(): boolean {
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ICommand, ICommandState } from "../Interfaces/ICommand";
|
|
2
|
+
import { GanttView } from "../View/GanttView";
|
|
3
|
+
import { ModelManipulator } from "../Model/Manipulators/ModelManipulator";
|
|
4
|
+
import { IHistory } from "../Model/History/IHistory";
|
|
5
|
+
import { ValidationController } from "../Model/Validation/ValidationController";
|
|
6
|
+
|
|
7
|
+
export abstract class CommandBase<T extends ICommandState> implements ICommand {
|
|
8
|
+
control: GanttView;
|
|
9
|
+
private _state: ICommandState;
|
|
10
|
+
get modelManipulator(): ModelManipulator { return this.control.modelManipulator; }
|
|
11
|
+
get history(): IHistory { return this.control.history; }
|
|
12
|
+
get validationController(): ValidationController { return this.control.validationController; }
|
|
13
|
+
get state(): ICommandState {
|
|
14
|
+
if(!this._state)
|
|
15
|
+
this._state = this.getState();
|
|
16
|
+
return this._state;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
constructor(control: GanttView) {
|
|
20
|
+
this.control = control;
|
|
21
|
+
}
|
|
22
|
+
execute(...parameters: any): boolean {
|
|
23
|
+
if(!this.state.enabled)
|
|
24
|
+
return false;
|
|
25
|
+
const executed = this.executeInternal(...parameters);
|
|
26
|
+
if(executed)
|
|
27
|
+
this.control.barManager.updateItemsState([]);
|
|
28
|
+
return executed;
|
|
29
|
+
}
|
|
30
|
+
abstract getState(): T;
|
|
31
|
+
isEnabled(): boolean {
|
|
32
|
+
return this.control.settings.editing.enabled;
|
|
33
|
+
}
|
|
34
|
+
protected executeInternal(...parameters: any): boolean { throw new Error("Not implemented"); }
|
|
35
|
+
}
|