@masterteam/task-schedule 0.0.19 → 0.0.21
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/README.md
CHANGED
|
@@ -26,10 +26,10 @@ Main context fields:
|
|
|
26
26
|
- `dateFormat`: default `dd/MM/yyyy`
|
|
27
27
|
- `height`: default `760px`
|
|
28
28
|
- `pdfFonts`: optional `{ regular?: string; arabic?: string; size?: number }`
|
|
29
|
-
- `mppRequestTimeoutMs`: optional timeout for MPP import, apply, and export requests. Defaults to `300000` ms.
|
|
30
|
-
- `mppPreviewMaxRows`: optional MPP import normalization cap. Defaults to `400` preview rows.
|
|
31
|
-
- `mppPreviewMaxResponseBytes`: optional maximum import response size to parse for preview rows. Defaults to `5000000` bytes; larger successful responses are treated as direct backend-applied imports.
|
|
32
|
-
- `mppKeepRawPayload`: optional flag to retain the raw MPP import response on `TaskScheduleImportResult.raw`. Defaults to `false`.
|
|
29
|
+
- `mppRequestTimeoutMs`: optional timeout for MPP import, apply, and export requests. Defaults to `300000` ms.
|
|
30
|
+
- `mppPreviewMaxRows`: optional MPP import normalization cap. Defaults to `400` preview rows.
|
|
31
|
+
- `mppPreviewMaxResponseBytes`: optional maximum import response size to parse for preview rows. Defaults to `5000000` bytes; larger successful responses are treated as direct backend-applied imports.
|
|
32
|
+
- `mppKeepRawPayload`: optional flag to retain the raw MPP import response on `TaskScheduleImportResult.raw`. Defaults to `false`.
|
|
33
33
|
|
|
34
34
|
## Outputs
|
|
35
35
|
|
|
@@ -141,11 +141,11 @@ When no PDF font is provided, package fallback uses embedded `TASK_SCHEDULE_DEFA
|
|
|
141
141
|
|
|
142
142
|
## Import Dialog
|
|
143
143
|
|
|
144
|
-
Use `TaskScheduleImportDialog` with `ModalService` to import `.mpp`/`.xer` files and apply tasks (replace or append).
|
|
145
|
-
The dialog is Tailwind-based and uses `@masterteam/components` (`mt-button`, `mt-entity-preview`).
|
|
146
|
-
Imported rows render as a checkbox tree so nested MPP summary tasks and children stay readable before apply.
|
|
147
|
-
If the MPP import endpoint returns a successful empty body or a response larger than `mppPreviewMaxResponseBytes`, the package treats it as a direct backend-applied import, closes the dialog with a success result, and lets the host schedule reload instead of rendering an empty preview.
|
|
148
|
-
The preview is capped by `maxRows`/`context.mppPreviewMaxRows` to keep large MPP files responsive. Select-all and apply operate on the visible preview rows only when the backend returns more rows than the preview cap. The full raw import payload is not retained unless `context.mppKeepRawPayload` is enabled.
|
|
144
|
+
Use `TaskScheduleImportDialog` with `ModalService` to import `.mpp`/`.xer` files and apply tasks (replace or append).
|
|
145
|
+
The dialog is Tailwind-based and uses `@masterteam/components` (`mt-button`, `mt-entity-preview`).
|
|
146
|
+
Imported rows render as a checkbox tree so nested MPP summary tasks and children stay readable before apply.
|
|
147
|
+
If the MPP import endpoint returns a successful empty body or a response larger than `mppPreviewMaxResponseBytes`, the package treats it as a direct backend-applied import, closes the dialog with a success result, and lets the host schedule reload instead of rendering an empty preview.
|
|
148
|
+
The preview is capped by `maxRows`/`context.mppPreviewMaxRows` to keep large MPP files responsive. Select-all and apply operate on the visible preview rows only when the backend returns more rows than the preview cap. The full raw import payload is not retained unless `context.mppKeepRawPayload` is enabled.
|
|
149
149
|
|
|
150
150
|
## Shell Component
|
|
151
151
|
|
|
@@ -3672,6 +3672,16 @@ class TaskSchedule {
|
|
|
3672
3672
|
if (item.id === 'convert_to') {
|
|
3673
3673
|
item.iconCss = 'fas fa-random';
|
|
3674
3674
|
item.items = this.editTaskTypes().filter((taskType) => taskType.id !== currentType);
|
|
3675
|
+
return;
|
|
3676
|
+
}
|
|
3677
|
+
// Hide the built-in "Add > Milestone" entry from the right-click menu;
|
|
3678
|
+
// milestones are still added via the toolbar and the convert-to submenu.
|
|
3679
|
+
// Scope this strictly to the Add submenu — touching other items' lazily
|
|
3680
|
+
// populated submenus (e.g. DeleteDependency) re-renders the menu and makes
|
|
3681
|
+
// Syncfusion's own Save/Cancel hide pass flicker.
|
|
3682
|
+
if (String(item.id ?? '').endsWith('_contextMenu_Add') &&
|
|
3683
|
+
Array.isArray(item.items)) {
|
|
3684
|
+
item.items = item.items.filter((subItem) => !String(subItem?.id ?? '').endsWith('_contextMenu_Milestone'));
|
|
3675
3685
|
}
|
|
3676
3686
|
});
|
|
3677
3687
|
}
|