@masterteam/task-schedule 0.0.7 → 0.0.8
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.
|
@@ -1037,10 +1037,10 @@ class TaskScheduleFetchService {
|
|
|
1037
1037
|
isEmptyIdentityValue(value) {
|
|
1038
1038
|
return value.trim() === '00000000-0000-0000-0000-000000000000';
|
|
1039
1039
|
}
|
|
1040
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1041
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1040
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskScheduleFetchService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1041
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskScheduleFetchService, providedIn: 'root' });
|
|
1042
1042
|
}
|
|
1043
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1043
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskScheduleFetchService, decorators: [{
|
|
1044
1044
|
type: Injectable,
|
|
1045
1045
|
args: [{ providedIn: 'root' }]
|
|
1046
1046
|
}] });
|
|
@@ -1776,10 +1776,10 @@ class TaskScheduleActionService {
|
|
|
1776
1776
|
isObject(value) {
|
|
1777
1777
|
return !!value && typeof value === 'object' && !Array.isArray(value);
|
|
1778
1778
|
}
|
|
1779
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1780
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1779
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskScheduleActionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1780
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskScheduleActionService, providedIn: 'root' });
|
|
1781
1781
|
}
|
|
1782
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1782
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskScheduleActionService, decorators: [{
|
|
1783
1783
|
type: Injectable,
|
|
1784
1784
|
args: [{ providedIn: 'root' }]
|
|
1785
1785
|
}] });
|
|
@@ -2330,26 +2330,26 @@ function createGanttConfig(modelType, data, dateFormat, langCode = 'en') {
|
|
|
2330
2330
|
class TaskScheduleDialog {
|
|
2331
2331
|
modal = inject(ModalService);
|
|
2332
2332
|
ref = inject(ModalRef);
|
|
2333
|
-
clientForm = viewChild(ClientForm, ...(ngDevMode ? [{ debugName: "clientForm" }] : []));
|
|
2334
|
-
mode = input('create', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
2335
|
-
context = input(null, ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
2336
|
-
task = input(null, ...(ngDevMode ? [{ debugName: "task" }] : []));
|
|
2337
|
-
typeOptions = input([], ...(ngDevMode ? [{ debugName: "typeOptions" }] : []));
|
|
2338
|
-
langCode = input('en', ...(ngDevMode ? [{ debugName: "langCode" }] : []));
|
|
2339
|
-
parentGuid = input(null, ...(ngDevMode ? [{ debugName: "parentGuid" }] : []));
|
|
2340
|
-
selectedType = signal(null, ...(ngDevMode ? [{ debugName: "selectedType" }] : []));
|
|
2333
|
+
clientForm = viewChild(ClientForm, ...(ngDevMode ? [{ debugName: "clientForm" }] : /* istanbul ignore next */ []));
|
|
2334
|
+
mode = input('create', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
2335
|
+
context = input(null, ...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
|
|
2336
|
+
task = input(null, ...(ngDevMode ? [{ debugName: "task" }] : /* istanbul ignore next */ []));
|
|
2337
|
+
typeOptions = input([], ...(ngDevMode ? [{ debugName: "typeOptions" }] : /* istanbul ignore next */ []));
|
|
2338
|
+
langCode = input('en', ...(ngDevMode ? [{ debugName: "langCode" }] : /* istanbul ignore next */ []));
|
|
2339
|
+
parentGuid = input(null, ...(ngDevMode ? [{ debugName: "parentGuid" }] : /* istanbul ignore next */ []));
|
|
2340
|
+
selectedType = signal(null, ...(ngDevMode ? [{ debugName: "selectedType" }] : /* istanbul ignore next */ []));
|
|
2341
2341
|
typeSelectOptions = computed(() => this.typeOptions().map((option) => ({
|
|
2342
2342
|
label: option.text,
|
|
2343
2343
|
value: option.id,
|
|
2344
|
-
})), ...(ngDevMode ? [{ debugName: "typeSelectOptions" }] : []));
|
|
2344
|
+
})), ...(ngDevMode ? [{ debugName: "typeSelectOptions" }] : /* istanbul ignore next */ []));
|
|
2345
2345
|
selectedTypeOption = computed(() => this.typeOptions().find((option) => option.id === this.selectedType()) ??
|
|
2346
|
-
null, ...(ngDevMode ? [{ debugName: "selectedTypeOption" }] : []));
|
|
2346
|
+
null, ...(ngDevMode ? [{ debugName: "selectedTypeOption" }] : /* istanbul ignore next */ []));
|
|
2347
2347
|
selectedModuleId = computed(() => this.mode() === 'edit'
|
|
2348
2348
|
? (this.task()?.schemaId ?? null)
|
|
2349
|
-
: (this.selectedTypeOption()?.moduleId ?? null), ...(ngDevMode ? [{ debugName: "selectedModuleId" }] : []));
|
|
2350
|
-
selectedModuleDataId = computed(() => this.mode() === 'edit' ? (this.task()?.id ?? null) : null, ...(ngDevMode ? [{ debugName: "selectedModuleDataId" }] : []));
|
|
2351
|
-
ignoredFieldKeys = computed(() => ['type'], ...(ngDevMode ? [{ debugName: "ignoredFieldKeys" }] : []));
|
|
2352
|
-
submitting = computed(() => this.clientForm()?.submitting() ?? false, ...(ngDevMode ? [{ debugName: "submitting" }] : []));
|
|
2349
|
+
: (this.selectedTypeOption()?.moduleId ?? null), ...(ngDevMode ? [{ debugName: "selectedModuleId" }] : /* istanbul ignore next */ []));
|
|
2350
|
+
selectedModuleDataId = computed(() => this.mode() === 'edit' ? (this.task()?.id ?? null) : null, ...(ngDevMode ? [{ debugName: "selectedModuleDataId" }] : /* istanbul ignore next */ []));
|
|
2351
|
+
ignoredFieldKeys = computed(() => ['type'], ...(ngDevMode ? [{ debugName: "ignoredFieldKeys" }] : /* istanbul ignore next */ []));
|
|
2352
|
+
submitting = computed(() => this.clientForm()?.submitting() ?? false, ...(ngDevMode ? [{ debugName: "submitting" }] : /* istanbul ignore next */ []));
|
|
2353
2353
|
submitRequestMapper = (request, _context) => this.mapSubmitRequest(request);
|
|
2354
2354
|
constructor() {
|
|
2355
2355
|
effect(() => {
|
|
@@ -2412,10 +2412,10 @@ class TaskScheduleDialog {
|
|
|
2412
2412
|
],
|
|
2413
2413
|
};
|
|
2414
2414
|
}
|
|
2415
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2416
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
2415
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskScheduleDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2416
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: TaskScheduleDialog, isStandalone: true, selector: "mt-task-schedule-dialog", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, task: { classPropertyName: "task", publicName: "task", isSignal: true, isRequired: false, transformFunction: null }, typeOptions: { classPropertyName: "typeOptions", publicName: "typeOptions", isSignal: true, isRequired: false, transformFunction: null }, langCode: { classPropertyName: "langCode", publicName: "langCode", isSignal: true, isRequired: false, transformFunction: null }, parentGuid: { classPropertyName: "parentGuid", publicName: "parentGuid", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "clientForm", first: true, predicate: ClientForm, descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"'p-4 overflow-y-auto ' + (modal.contentClass || '')\">\n <div class=\"flex flex-col gap-4\">\n <mt-select-field\n [options]=\"typeSelectOptions()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [label]=\"'task-schedule.dialog.type' | transloco\"\n [placeholder]=\"'task-schedule.dialog.typePlaceholder' | transloco\"\n [ngModel]=\"selectedType() ?? undefined\"\n (onChange)=\"onTypeChange($event)\"\n />\n\n @if (selectedType()) {\n <mt-client-form\n #clientForm\n [moduleKey]=\"'ModuleData'\"\n [moduleId]=\"selectedModuleId() ?? undefined\"\n [operationKey]=\"mode() === 'edit' ? 'Update' : 'Create'\"\n [formMode]=\"mode()\"\n [levelId]=\"context()?.levelId ?? undefined\"\n [levelDataId]=\"context()?.levelDataId ?? undefined\"\n [moduleDataId]=\"selectedModuleDataId() ?? undefined\"\n [lang]=\"langCode()\"\n [autoLoad]=\"true\"\n [ignoredFieldKeys]=\"ignoredFieldKeys()\"\n [submitRequestMapper]=\"submitRequestMapper\"\n (submitted)=\"onClientFormSubmitted($event)\"\n />\n } @else {\n <div\n class=\"rounded-xl border border-surface bg-content px-4 py-4 text-sm text-muted-color\"\n >\n {{ \"task-schedule.dialog.typeFirst\" | transloco }}\n </div>\n }\n </div>\n</div>\n\n<div [class]=\"modal.footerClass\">\n <div class=\"flex items-center justify-end gap-3\">\n <mt-button\n [label]=\"'task-schedule.dialog.cancel' | transloco\"\n severity=\"secondary\"\n variant=\"outlined\"\n [disabled]=\"submitting()\"\n (onClick)=\"cancel()\"\n />\n <mt-button\n [label]=\"'task-schedule.dialog.save' | transloco\"\n severity=\"primary\"\n [loading]=\"submitting()\"\n [disabled]=\"submitting()\"\n (onClick)=\"save()\"\n />\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: ClientForm, selector: "mt-client-form", inputs: ["moduleKey", "operationKey", "moduleId", "levelId", "levelDataId", "moduleDataId", "requestSchemaId", "draftProcessId", "preview", "returnUrl", "defaultValues", "submitRequestMapper", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "lookups", "ignoredFieldKeys"], outputs: ["loaded", "submitted", "errored", "modeDetected", "formSourceDetected", "footerStateChanged"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i2.TranslocoPipe, name: "transloco" }] });
|
|
2417
2417
|
}
|
|
2418
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2418
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskScheduleDialog, decorators: [{
|
|
2419
2419
|
type: Component,
|
|
2420
2420
|
args: [{ selector: 'mt-task-schedule-dialog', standalone: true, imports: [
|
|
2421
2421
|
CommonModule,
|
|
@@ -2441,19 +2441,19 @@ class TaskScheduleImportDialog {
|
|
|
2441
2441
|
actualFinishDateCellTpl = viewChild.required('actualFinishDateCellTpl');
|
|
2442
2442
|
assignedToCellTpl = viewChild.required('assignedToCellTpl');
|
|
2443
2443
|
progressCellTpl = viewChild.required('progressCellTpl');
|
|
2444
|
-
context = input(null, ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
2445
|
-
maxRows = input(400, ...(ngDevMode ? [{ debugName: "maxRows" }] : []));
|
|
2446
|
-
selectedFile = signal(null, ...(ngDevMode ? [{ debugName: "selectedFile" }] : []));
|
|
2447
|
-
loadingImport = signal(false, ...(ngDevMode ? [{ debugName: "loadingImport" }] : []));
|
|
2448
|
-
loadingApply = signal(false, ...(ngDevMode ? [{ debugName: "loadingApply" }] : []));
|
|
2449
|
-
importResult = signal(null, ...(ngDevMode ? [{ debugName: "importResult" }] : []));
|
|
2450
|
-
selectedTaskKeys = signal(new Set(), ...(ngDevMode ? [{ debugName: "selectedTaskKeys" }] : []));
|
|
2451
|
-
errorMessage = signal(null, ...(ngDevMode ? [{ debugName: "errorMessage" }] : []));
|
|
2444
|
+
context = input(null, ...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
|
|
2445
|
+
maxRows = input(400, ...(ngDevMode ? [{ debugName: "maxRows" }] : /* istanbul ignore next */ []));
|
|
2446
|
+
selectedFile = signal(null, ...(ngDevMode ? [{ debugName: "selectedFile" }] : /* istanbul ignore next */ []));
|
|
2447
|
+
loadingImport = signal(false, ...(ngDevMode ? [{ debugName: "loadingImport" }] : /* istanbul ignore next */ []));
|
|
2448
|
+
loadingApply = signal(false, ...(ngDevMode ? [{ debugName: "loadingApply" }] : /* istanbul ignore next */ []));
|
|
2449
|
+
importResult = signal(null, ...(ngDevMode ? [{ debugName: "importResult" }] : /* istanbul ignore next */ []));
|
|
2450
|
+
selectedTaskKeys = signal(new Set(), ...(ngDevMode ? [{ debugName: "selectedTaskKeys" }] : /* istanbul ignore next */ []));
|
|
2451
|
+
errorMessage = signal(null, ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
2452
2452
|
activeLang = toSignal(this.transloco.langChanges$, {
|
|
2453
2453
|
initialValue: this.transloco.getActiveLang(),
|
|
2454
2454
|
});
|
|
2455
|
-
resolvedLangCode = computed(() => this.context()?.langCode === 'ar' ? 'ar' : 'en', ...(ngDevMode ? [{ debugName: "resolvedLangCode" }] : []));
|
|
2456
|
-
isRtl = computed(() => this.resolvedLangCode() === 'ar', ...(ngDevMode ? [{ debugName: "isRtl" }] : []));
|
|
2455
|
+
resolvedLangCode = computed(() => this.context()?.langCode === 'ar' ? 'ar' : 'en', ...(ngDevMode ? [{ debugName: "resolvedLangCode" }] : /* istanbul ignore next */ []));
|
|
2456
|
+
isRtl = computed(() => this.resolvedLangCode() === 'ar', ...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
|
|
2457
2457
|
labels = computed(() => {
|
|
2458
2458
|
this.activeLang();
|
|
2459
2459
|
return {
|
|
@@ -2477,7 +2477,7 @@ class TaskScheduleImportDialog {
|
|
|
2477
2477
|
chooseFileFirst: this.transloco.translate('task-schedule.importModal.chooseFileFirst'),
|
|
2478
2478
|
rowsLimited: this.transloco.translate('task-schedule.importModal.rowsLimited'),
|
|
2479
2479
|
};
|
|
2480
|
-
}, ...(ngDevMode ? [{ debugName: "labels" }] : []));
|
|
2480
|
+
}, ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
|
|
2481
2481
|
previewRows = computed(() => {
|
|
2482
2482
|
const rows = [];
|
|
2483
2483
|
const tasks = this.importResult()?.tasks ?? [];
|
|
@@ -2499,7 +2499,7 @@ class TaskScheduleImportDialog {
|
|
|
2499
2499
|
};
|
|
2500
2500
|
walk(tasks, 0, 'root');
|
|
2501
2501
|
return rows;
|
|
2502
|
-
}, ...(ngDevMode ? [{ debugName: "previewRows" }] : []));
|
|
2502
|
+
}, ...(ngDevMode ? [{ debugName: "previewRows" }] : /* istanbul ignore next */ []));
|
|
2503
2503
|
resourceOptions = computed(() => {
|
|
2504
2504
|
const rows = this.context()?.resources ?? [];
|
|
2505
2505
|
const seen = new Set();
|
|
@@ -2529,11 +2529,11 @@ class TaskScheduleImportDialog {
|
|
|
2529
2529
|
output.push({ id: typeof id === 'number' ? id : key, label });
|
|
2530
2530
|
});
|
|
2531
2531
|
return output;
|
|
2532
|
-
}, ...(ngDevMode ? [{ debugName: "resourceOptions" }] : []));
|
|
2532
|
+
}, ...(ngDevMode ? [{ debugName: "resourceOptions" }] : /* istanbul ignore next */ []));
|
|
2533
2533
|
isTruncated = computed(() => {
|
|
2534
2534
|
const loadedCount = this.countTasks(this.importResult()?.tasks ?? []);
|
|
2535
2535
|
return loadedCount > this.previewRows().length;
|
|
2536
|
-
}, ...(ngDevMode ? [{ debugName: "isTruncated" }] : []));
|
|
2536
|
+
}, ...(ngDevMode ? [{ debugName: "isTruncated" }] : /* istanbul ignore next */ []));
|
|
2537
2537
|
allSelected = computed(() => {
|
|
2538
2538
|
const rows = this.previewRows();
|
|
2539
2539
|
if (!rows.length) {
|
|
@@ -2541,11 +2541,11 @@ class TaskScheduleImportDialog {
|
|
|
2541
2541
|
}
|
|
2542
2542
|
const selected = this.selectedTaskKeys();
|
|
2543
2543
|
return rows.every((row) => selected.has(row.key));
|
|
2544
|
-
}, ...(ngDevMode ? [{ debugName: "allSelected" }] : []));
|
|
2545
|
-
hasSelection = computed(() => this.selectedTaskKeys().size > 0, ...(ngDevMode ? [{ debugName: "hasSelection" }] : []));
|
|
2546
|
-
canImport = computed(() => !!this.selectedFile() && !this.loadingImport(), ...(ngDevMode ? [{ debugName: "canImport" }] : []));
|
|
2547
|
-
canApply = computed(() => !!this.importResult() && this.hasSelection() && !this.loadingApply(), ...(ngDevMode ? [{ debugName: "canApply" }] : []));
|
|
2548
|
-
previewPageSize = computed(() => Math.min(Math.max(this.previewRows().length, 1), 50), ...(ngDevMode ? [{ debugName: "previewPageSize" }] : []));
|
|
2544
|
+
}, ...(ngDevMode ? [{ debugName: "allSelected" }] : /* istanbul ignore next */ []));
|
|
2545
|
+
hasSelection = computed(() => this.selectedTaskKeys().size > 0, ...(ngDevMode ? [{ debugName: "hasSelection" }] : /* istanbul ignore next */ []));
|
|
2546
|
+
canImport = computed(() => !!this.selectedFile() && !this.loadingImport(), ...(ngDevMode ? [{ debugName: "canImport" }] : /* istanbul ignore next */ []));
|
|
2547
|
+
canApply = computed(() => !!this.importResult() && this.hasSelection() && !this.loadingApply(), ...(ngDevMode ? [{ debugName: "canApply" }] : /* istanbul ignore next */ []));
|
|
2548
|
+
previewPageSize = computed(() => Math.min(Math.max(this.previewRows().length, 1), 50), ...(ngDevMode ? [{ debugName: "previewPageSize" }] : /* istanbul ignore next */ []));
|
|
2549
2549
|
previewColumns = linkedSignal(() => [
|
|
2550
2550
|
{
|
|
2551
2551
|
key: 'selected',
|
|
@@ -2595,7 +2595,7 @@ class TaskScheduleImportDialog {
|
|
|
2595
2595
|
type: 'custom',
|
|
2596
2596
|
customCellTpl: this.progressCellTpl(),
|
|
2597
2597
|
},
|
|
2598
|
-
], ...(ngDevMode ? [{ debugName: "previewColumns" }] : []));
|
|
2598
|
+
], ...(ngDevMode ? [{ debugName: "previewColumns" }] : /* istanbul ignore next */ []));
|
|
2599
2599
|
onFileChanged(event) {
|
|
2600
2600
|
const input = event.target;
|
|
2601
2601
|
const file = input?.files?.item(0) ?? null;
|
|
@@ -3035,10 +3035,10 @@ class TaskScheduleImportDialog {
|
|
|
3035
3035
|
setError(message) {
|
|
3036
3036
|
this.errorMessage.set(message);
|
|
3037
3037
|
}
|
|
3038
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3039
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: TaskScheduleImportDialog, isStandalone: true, selector: "mt-task-schedule-import-dialog", inputs: { context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "selectionCellTpl", first: true, predicate: ["selectionCellTpl"], descendants: true, isSignal: true }, { propertyName: "taskCellTpl", first: true, predicate: ["taskCellTpl"], descendants: true, isSignal: true }, { propertyName: "startDateCellTpl", first: true, predicate: ["startDateCellTpl"], descendants: true, isSignal: true }, { propertyName: "finishDateCellTpl", first: true, predicate: ["finishDateCellTpl"], descendants: true, isSignal: true }, { propertyName: "actualStartDateCellTpl", first: true, predicate: ["actualStartDateCellTpl"], descendants: true, isSignal: true }, { propertyName: "actualFinishDateCellTpl", first: true, predicate: ["actualFinishDateCellTpl"], descendants: true, isSignal: true }, { propertyName: "assignedToCellTpl", first: true, predicate: ["assignedToCellTpl"], descendants: true, isSignal: true }, { propertyName: "progressCellTpl", first: true, predicate: ["progressCellTpl"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n [class]=\"modal.contentClass\"\n [attr.dir]=\"isRtl() ? 'rtl' : 'ltr'\"\n class=\"flex h-full min-h-0 flex-col gap-4 !overflow-y-hidden p-5\"\n>\n <div class=\"rounded-2xl border border-surface-200 bg-surface-50 p-4\">\n <div class=\"grid gap-3 lg:grid-cols-[minmax(0,1fr)_auto_auto] lg:items-end\">\n <input\n #fileInput\n class=\"hidden\"\n type=\"file\"\n accept=\".mpp,.xer\"\n (change)=\"onFileChanged($event)\"\n />\n\n <mt-text-field\n [ngModel]=\"selectedFile()?.name ?? ''\"\n [readonly]=\"true\"\n [placeholder]=\"labels().selectFile\"\n />\n\n <mt-button\n [label]=\"labels().selectFile\"\n severity=\"secondary\"\n variant=\"outlined\"\n [disabled]=\"loadingImport() || loadingApply()\"\n (onClick)=\"fileInput.click()\"\n />\n\n <mt-button\n [label]=\"labels().startImport\"\n [disabled]=\"!canImport()\"\n [loading]=\"loadingImport()\"\n (onClick)=\"importFile()\"\n />\n </div>\n </div>\n\n @if (errorMessage()) {\n <div\n class=\"rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700\"\n >\n {{ errorMessage() }}\n </div>\n }\n\n <div class=\"min-h-0 flex-1 overflow-y-auto\">\n @if (importResult()) {\n @if (!previewRows().length) {\n <div\n class=\"rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-800\"\n >\n {{ labels().noTasks }}\n </div>\n } @else {\n <div class=\"rounded-2xl border border-surface-200 bg-surface-0\">\n <div\n class=\"flex flex-wrap items-center justify-between gap-3 border-b border-surface-200 bg-surface-50 px-4 py-3\"\n >\n <div class=\"flex items-center gap-3\">\n <mt-checkbox-field\n [ngModel]=\"allSelected()\"\n (ngModelChange)=\"selectAllRows(!!$event)\"\n />\n <span class=\"text-sm text-surface-600\">\n {{ selectedTaskKeys().size }} / {{ previewRows().length }}\n </span>\n </div>\n\n @if (isTruncated()) {\n <p class=\"text-xs text-surface-500\">\n {{ labels().rowsLimited }}\n </p>\n }\n </div>\n\n <div class=\"px-2 py-2\">\n <mt-table\n [data]=\"previewRows()\"\n [columns]=\"previewColumns()\"\n dataKey=\"key\"\n size=\"small\"\n [stripedRows]=\"true\"\n [showGridlines]=\"true\"\n [pageSize]=\"previewPageSize()\"\n />\n </div>\n </div>\n }\n }\n </div>\n</div>\n\n<div [class]=\"modal.footerClass\">\n <mt-button\n [label]=\"labels().cancel\"\n severity=\"secondary\"\n [outlined]=\"true\"\n [disabled]=\"loadingImport() || loadingApply()\"\n (onClick)=\"close()\"\n />\n\n <mt-button\n [label]=\"labels().replace\"\n [disabled]=\"!canApply()\"\n [loading]=\"loadingApply()\"\n (onClick)=\"applyImport(true)\"\n />\n\n <mt-button\n [label]=\"labels().append\"\n severity=\"secondary\"\n [disabled]=\"!canApply()\"\n [loading]=\"loadingApply()\"\n (onClick)=\"applyImport(false)\"\n />\n</div>\n\n<ng-template #selectionCellTpl let-row>\n <div class=\"flex items-center justify-center\">\n <mt-checkbox-field\n [ngModel]=\"selectedTaskKeys().has(row.key)\"\n (ngModelChange)=\"toggleRowSelection(row.key, !!$event)\"\n />\n </div>\n</ng-template>\n\n<ng-template #taskCellTpl let-row>\n <div class=\"min-w-0\" [style.paddingInlineStart.px]=\"row.depth * 18\">\n <mt-text-field\n [ngModel]=\"row.task.title || row.task.name || ''\"\n (ngModelChange)=\"onTaskTitleChanged(row.key, $event)\"\n />\n </div>\n</ng-template>\n\n<ng-template #startDateCellTpl let-row>\n <mt-date-field\n [ngModel]=\"toDateFieldValue(row.task.startDate)\"\n [showClear]=\"true\"\n (ngModelChange)=\"onTaskDateChanged(row.key, 'startDate', $event)\"\n />\n</ng-template>\n\n<ng-template #finishDateCellTpl let-row>\n <mt-date-field\n [ngModel]=\"toDateFieldValue(row.task.finishDate)\"\n [showClear]=\"true\"\n (ngModelChange)=\"onTaskDateChanged(row.key, 'finishDate', $event)\"\n />\n</ng-template>\n\n<ng-template #actualStartDateCellTpl let-row>\n <mt-date-field\n [ngModel]=\"\n toDateFieldValue(row.task.actualStartDate || row.task.actualStart)\n \"\n [showClear]=\"true\"\n (ngModelChange)=\"onTaskDateChanged(row.key, 'actualStartDate', $event)\"\n />\n</ng-template>\n\n<ng-template #actualFinishDateCellTpl let-row>\n <mt-date-field\n [ngModel]=\"\n toDateFieldValue(row.task.actualFinishDate || row.task.actualFinish)\n \"\n [showClear]=\"true\"\n (ngModelChange)=\"onTaskDateChanged(row.key, 'actualFinishDate', $event)\"\n />\n</ng-template>\n\n<ng-template #assignedToCellTpl let-row>\n <div class=\"min-w-0\">\n @if (resourceOptions().length) {\n <div class=\"space-y-2\">\n <mt-select-field\n [ngModel]=\"resolveAssignedValue(row.task)\"\n [options]=\"resourceOptions()\"\n optionLabel=\"label\"\n optionValue=\"id\"\n [showClear]=\"true\"\n [hasPlaceholderPrefix]=\"false\"\n [placeholder]=\"labels().assignedTo\"\n (ngModelChange)=\"onTaskAssignedToChanged(row.key, $event)\"\n />\n @if (row.task.assignedTo) {\n <mt-entity-preview [data]=\"toAssignedEntity(row.task)\" />\n }\n </div>\n } @else if (row.task.assignedTo) {\n <mt-entity-preview [data]=\"toAssignedEntity(row.task)\" />\n } @else {\n <span class=\"text-slate-400\">-</span>\n }\n </div>\n</ng-template>\n\n<ng-template #progressCellTpl let-row>\n <div class=\"space-y-2\">\n <mt-number-field\n [ngModel]=\"normalizeProgress(row.task.progress)\"\n [min]=\"0\"\n [max]=\"100\"\n [useGrouping]=\"false\"\n [maxFractionDigits]=\"0\"\n (ngModelChange)=\"onTaskProgressChanged(row.key, $event)\"\n />\n <mt-entity-preview [data]=\"toProgressEntity(row.task)\" />\n </div>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: CheckboxField, selector: "mt-checkbox-field", inputs: ["label", "labelPosition", "placeholder", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: DateField, selector: "mt-date-field", inputs: ["field", "label", "placeholder", "class", "readonly", "showIcon", "showClear", "showTime", "pInputs", "required"] }, { kind: "component", type: EntityPreview, selector: "mt-entity-preview", inputs: ["data", "attachmentShape"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "exportable", "exportFilename", "actionShape", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "paginatorPosition", "pageSize", "currentPage", "first", "filterTerm"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "icon", "iconPosition"] }, { kind: "ngmodule", type: TranslocoModule }] });
|
|
3038
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskScheduleImportDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3039
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: TaskScheduleImportDialog, isStandalone: true, selector: "mt-task-schedule-import-dialog", inputs: { context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "selectionCellTpl", first: true, predicate: ["selectionCellTpl"], descendants: true, isSignal: true }, { propertyName: "taskCellTpl", first: true, predicate: ["taskCellTpl"], descendants: true, isSignal: true }, { propertyName: "startDateCellTpl", first: true, predicate: ["startDateCellTpl"], descendants: true, isSignal: true }, { propertyName: "finishDateCellTpl", first: true, predicate: ["finishDateCellTpl"], descendants: true, isSignal: true }, { propertyName: "actualStartDateCellTpl", first: true, predicate: ["actualStartDateCellTpl"], descendants: true, isSignal: true }, { propertyName: "actualFinishDateCellTpl", first: true, predicate: ["actualFinishDateCellTpl"], descendants: true, isSignal: true }, { propertyName: "assignedToCellTpl", first: true, predicate: ["assignedToCellTpl"], descendants: true, isSignal: true }, { propertyName: "progressCellTpl", first: true, predicate: ["progressCellTpl"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n [class]=\"modal.contentClass\"\r\n [attr.dir]=\"isRtl() ? 'rtl' : 'ltr'\"\r\n class=\"flex h-full min-h-0 flex-col gap-4 !overflow-y-hidden p-5\"\r\n>\r\n <div class=\"rounded-lg border border-surface-200 bg-surface-50 p-4\">\r\n <div class=\"grid gap-3 lg:grid-cols-[minmax(0,1fr)_auto_auto] lg:items-end\">\r\n <input\r\n #fileInput\r\n class=\"hidden\"\r\n type=\"file\"\r\n accept=\".mpp,.xer\"\r\n (change)=\"onFileChanged($event)\"\r\n />\r\n\r\n <mt-text-field\r\n [ngModel]=\"selectedFile()?.name ?? ''\"\r\n [readonly]=\"true\"\r\n [placeholder]=\"labels().selectFile\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"labels().selectFile\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n [disabled]=\"loadingImport() || loadingApply()\"\r\n (onClick)=\"fileInput.click()\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"labels().startImport\"\r\n [disabled]=\"!canImport()\"\r\n [loading]=\"loadingImport()\"\r\n (onClick)=\"importFile()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (errorMessage()) {\r\n <div\r\n class=\"rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700\"\r\n >\r\n {{ errorMessage() }}\r\n </div>\r\n }\r\n\r\n <div class=\"min-h-0 flex-1 overflow-y-auto\">\r\n @if (importResult()) {\r\n @if (!previewRows().length) {\r\n <div\r\n class=\"rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-800\"\r\n >\r\n {{ labels().noTasks }}\r\n </div>\r\n } @else {\r\n <div class=\"rounded-lg border border-surface-200 bg-surface-0\">\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 border-b border-surface-200 bg-surface-50 px-4 py-3\"\r\n >\r\n <div class=\"flex items-center gap-3\">\r\n <mt-checkbox-field\r\n [ngModel]=\"allSelected()\"\r\n (ngModelChange)=\"selectAllRows(!!$event)\"\r\n />\r\n <span class=\"text-sm text-surface-600\">\r\n {{ selectedTaskKeys().size }} / {{ previewRows().length }}\r\n </span>\r\n </div>\r\n\r\n @if (isTruncated()) {\r\n <p class=\"text-xs text-surface-500\">\r\n {{ labels().rowsLimited }}\r\n </p>\r\n }\r\n </div>\r\n\r\n <div class=\"px-2 py-2\">\r\n <mt-table\r\n [data]=\"previewRows()\"\r\n [columns]=\"previewColumns()\"\r\n dataKey=\"key\"\r\n storageKey=\"task-schedule-import-preview-table\"\r\n size=\"small\"\r\n [stripedRows]=\"true\"\r\n [showGridlines]=\"true\"\r\n [pageSize]=\"previewPageSize()\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n</div>\r\n\r\n<div [class]=\"modal.footerClass\">\r\n <mt-button\r\n [label]=\"labels().cancel\"\r\n severity=\"secondary\"\r\n [outlined]=\"true\"\r\n [disabled]=\"loadingImport() || loadingApply()\"\r\n (onClick)=\"close()\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"labels().replace\"\r\n [disabled]=\"!canApply()\"\r\n [loading]=\"loadingApply()\"\r\n (onClick)=\"applyImport(true)\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"labels().append\"\r\n severity=\"secondary\"\r\n [disabled]=\"!canApply()\"\r\n [loading]=\"loadingApply()\"\r\n (onClick)=\"applyImport(false)\"\r\n />\r\n</div>\r\n\r\n<ng-template #selectionCellTpl let-row>\r\n <div class=\"flex items-center justify-center\">\r\n <mt-checkbox-field\r\n [ngModel]=\"selectedTaskKeys().has(row.key)\"\r\n (ngModelChange)=\"toggleRowSelection(row.key, !!$event)\"\r\n />\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #taskCellTpl let-row>\r\n <div class=\"min-w-0\" [style.paddingInlineStart.px]=\"row.depth * 18\">\r\n <mt-text-field\r\n [ngModel]=\"row.task.title || row.task.name || ''\"\r\n (ngModelChange)=\"onTaskTitleChanged(row.key, $event)\"\r\n />\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #startDateCellTpl let-row>\r\n <mt-date-field\r\n [ngModel]=\"toDateFieldValue(row.task.startDate)\"\r\n [showClear]=\"true\"\r\n (ngModelChange)=\"onTaskDateChanged(row.key, 'startDate', $event)\"\r\n />\r\n</ng-template>\r\n\r\n<ng-template #finishDateCellTpl let-row>\r\n <mt-date-field\r\n [ngModel]=\"toDateFieldValue(row.task.finishDate)\"\r\n [showClear]=\"true\"\r\n (ngModelChange)=\"onTaskDateChanged(row.key, 'finishDate', $event)\"\r\n />\r\n</ng-template>\r\n\r\n<ng-template #actualStartDateCellTpl let-row>\r\n <mt-date-field\r\n [ngModel]=\"\r\n toDateFieldValue(row.task.actualStartDate || row.task.actualStart)\r\n \"\r\n [showClear]=\"true\"\r\n (ngModelChange)=\"onTaskDateChanged(row.key, 'actualStartDate', $event)\"\r\n />\r\n</ng-template>\r\n\r\n<ng-template #actualFinishDateCellTpl let-row>\r\n <mt-date-field\r\n [ngModel]=\"\r\n toDateFieldValue(row.task.actualFinishDate || row.task.actualFinish)\r\n \"\r\n [showClear]=\"true\"\r\n (ngModelChange)=\"onTaskDateChanged(row.key, 'actualFinishDate', $event)\"\r\n />\r\n</ng-template>\r\n\r\n<ng-template #assignedToCellTpl let-row>\r\n <div class=\"min-w-0\">\r\n @if (resourceOptions().length) {\r\n <div class=\"space-y-2\">\r\n <mt-select-field\r\n [ngModel]=\"resolveAssignedValue(row.task)\"\r\n [options]=\"resourceOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"id\"\r\n [showClear]=\"true\"\r\n [hasPlaceholderPrefix]=\"false\"\r\n [placeholder]=\"labels().assignedTo\"\r\n (ngModelChange)=\"onTaskAssignedToChanged(row.key, $event)\"\r\n />\r\n @if (row.task.assignedTo) {\r\n <mt-entity-preview [data]=\"toAssignedEntity(row.task)\" />\r\n }\r\n </div>\r\n } @else if (row.task.assignedTo) {\r\n <mt-entity-preview [data]=\"toAssignedEntity(row.task)\" />\r\n } @else {\r\n <span class=\"text-slate-400\">-</span>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #progressCellTpl let-row>\r\n <div class=\"space-y-2\">\r\n <mt-number-field\r\n [ngModel]=\"normalizeProgress(row.task.progress)\"\r\n [min]=\"0\"\r\n [max]=\"100\"\r\n [useGrouping]=\"false\"\r\n [maxFractionDigits]=\"0\"\r\n (ngModelChange)=\"onTaskProgressChanged(row.key, $event)\"\r\n />\r\n <mt-entity-preview [data]=\"toProgressEntity(row.task)\" />\r\n </div>\r\n</ng-template>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: CheckboxField, selector: "mt-checkbox-field", inputs: ["label", "labelPosition", "placeholder", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: DateField, selector: "mt-date-field", inputs: ["field", "label", "placeholder", "class", "readonly", "showIcon", "showClear", "showTime", "pInputs", "required"] }, { kind: "component", type: EntityPreview, selector: "mt-entity-preview", inputs: ["data", "attachmentShape"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "exportable", "exportFilename", "actionShape", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "paginatorPosition", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "icon", "iconPosition"] }, { kind: "ngmodule", type: TranslocoModule }] });
|
|
3040
3040
|
}
|
|
3041
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3041
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskScheduleImportDialog, decorators: [{
|
|
3042
3042
|
type: Component,
|
|
3043
3043
|
args: [{ selector: 'mt-task-schedule-import-dialog', standalone: true, imports: [
|
|
3044
3044
|
CommonModule,
|
|
@@ -3052,7 +3052,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
3052
3052
|
Table,
|
|
3053
3053
|
TextField,
|
|
3054
3054
|
TranslocoModule,
|
|
3055
|
-
], template: "<div\n [class]=\"modal.contentClass\"\n [attr.dir]=\"isRtl() ? 'rtl' : 'ltr'\"\n class=\"flex h-full min-h-0 flex-col gap-4 !overflow-y-hidden p-5\"\n>\n <div class=\"rounded-
|
|
3055
|
+
], template: "<div\r\n [class]=\"modal.contentClass\"\r\n [attr.dir]=\"isRtl() ? 'rtl' : 'ltr'\"\r\n class=\"flex h-full min-h-0 flex-col gap-4 !overflow-y-hidden p-5\"\r\n>\r\n <div class=\"rounded-lg border border-surface-200 bg-surface-50 p-4\">\r\n <div class=\"grid gap-3 lg:grid-cols-[minmax(0,1fr)_auto_auto] lg:items-end\">\r\n <input\r\n #fileInput\r\n class=\"hidden\"\r\n type=\"file\"\r\n accept=\".mpp,.xer\"\r\n (change)=\"onFileChanged($event)\"\r\n />\r\n\r\n <mt-text-field\r\n [ngModel]=\"selectedFile()?.name ?? ''\"\r\n [readonly]=\"true\"\r\n [placeholder]=\"labels().selectFile\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"labels().selectFile\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n [disabled]=\"loadingImport() || loadingApply()\"\r\n (onClick)=\"fileInput.click()\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"labels().startImport\"\r\n [disabled]=\"!canImport()\"\r\n [loading]=\"loadingImport()\"\r\n (onClick)=\"importFile()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (errorMessage()) {\r\n <div\r\n class=\"rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700\"\r\n >\r\n {{ errorMessage() }}\r\n </div>\r\n }\r\n\r\n <div class=\"min-h-0 flex-1 overflow-y-auto\">\r\n @if (importResult()) {\r\n @if (!previewRows().length) {\r\n <div\r\n class=\"rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-800\"\r\n >\r\n {{ labels().noTasks }}\r\n </div>\r\n } @else {\r\n <div class=\"rounded-lg border border-surface-200 bg-surface-0\">\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 border-b border-surface-200 bg-surface-50 px-4 py-3\"\r\n >\r\n <div class=\"flex items-center gap-3\">\r\n <mt-checkbox-field\r\n [ngModel]=\"allSelected()\"\r\n (ngModelChange)=\"selectAllRows(!!$event)\"\r\n />\r\n <span class=\"text-sm text-surface-600\">\r\n {{ selectedTaskKeys().size }} / {{ previewRows().length }}\r\n </span>\r\n </div>\r\n\r\n @if (isTruncated()) {\r\n <p class=\"text-xs text-surface-500\">\r\n {{ labels().rowsLimited }}\r\n </p>\r\n }\r\n </div>\r\n\r\n <div class=\"px-2 py-2\">\r\n <mt-table\r\n [data]=\"previewRows()\"\r\n [columns]=\"previewColumns()\"\r\n dataKey=\"key\"\r\n storageKey=\"task-schedule-import-preview-table\"\r\n size=\"small\"\r\n [stripedRows]=\"true\"\r\n [showGridlines]=\"true\"\r\n [pageSize]=\"previewPageSize()\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n</div>\r\n\r\n<div [class]=\"modal.footerClass\">\r\n <mt-button\r\n [label]=\"labels().cancel\"\r\n severity=\"secondary\"\r\n [outlined]=\"true\"\r\n [disabled]=\"loadingImport() || loadingApply()\"\r\n (onClick)=\"close()\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"labels().replace\"\r\n [disabled]=\"!canApply()\"\r\n [loading]=\"loadingApply()\"\r\n (onClick)=\"applyImport(true)\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"labels().append\"\r\n severity=\"secondary\"\r\n [disabled]=\"!canApply()\"\r\n [loading]=\"loadingApply()\"\r\n (onClick)=\"applyImport(false)\"\r\n />\r\n</div>\r\n\r\n<ng-template #selectionCellTpl let-row>\r\n <div class=\"flex items-center justify-center\">\r\n <mt-checkbox-field\r\n [ngModel]=\"selectedTaskKeys().has(row.key)\"\r\n (ngModelChange)=\"toggleRowSelection(row.key, !!$event)\"\r\n />\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #taskCellTpl let-row>\r\n <div class=\"min-w-0\" [style.paddingInlineStart.px]=\"row.depth * 18\">\r\n <mt-text-field\r\n [ngModel]=\"row.task.title || row.task.name || ''\"\r\n (ngModelChange)=\"onTaskTitleChanged(row.key, $event)\"\r\n />\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #startDateCellTpl let-row>\r\n <mt-date-field\r\n [ngModel]=\"toDateFieldValue(row.task.startDate)\"\r\n [showClear]=\"true\"\r\n (ngModelChange)=\"onTaskDateChanged(row.key, 'startDate', $event)\"\r\n />\r\n</ng-template>\r\n\r\n<ng-template #finishDateCellTpl let-row>\r\n <mt-date-field\r\n [ngModel]=\"toDateFieldValue(row.task.finishDate)\"\r\n [showClear]=\"true\"\r\n (ngModelChange)=\"onTaskDateChanged(row.key, 'finishDate', $event)\"\r\n />\r\n</ng-template>\r\n\r\n<ng-template #actualStartDateCellTpl let-row>\r\n <mt-date-field\r\n [ngModel]=\"\r\n toDateFieldValue(row.task.actualStartDate || row.task.actualStart)\r\n \"\r\n [showClear]=\"true\"\r\n (ngModelChange)=\"onTaskDateChanged(row.key, 'actualStartDate', $event)\"\r\n />\r\n</ng-template>\r\n\r\n<ng-template #actualFinishDateCellTpl let-row>\r\n <mt-date-field\r\n [ngModel]=\"\r\n toDateFieldValue(row.task.actualFinishDate || row.task.actualFinish)\r\n \"\r\n [showClear]=\"true\"\r\n (ngModelChange)=\"onTaskDateChanged(row.key, 'actualFinishDate', $event)\"\r\n />\r\n</ng-template>\r\n\r\n<ng-template #assignedToCellTpl let-row>\r\n <div class=\"min-w-0\">\r\n @if (resourceOptions().length) {\r\n <div class=\"space-y-2\">\r\n <mt-select-field\r\n [ngModel]=\"resolveAssignedValue(row.task)\"\r\n [options]=\"resourceOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"id\"\r\n [showClear]=\"true\"\r\n [hasPlaceholderPrefix]=\"false\"\r\n [placeholder]=\"labels().assignedTo\"\r\n (ngModelChange)=\"onTaskAssignedToChanged(row.key, $event)\"\r\n />\r\n @if (row.task.assignedTo) {\r\n <mt-entity-preview [data]=\"toAssignedEntity(row.task)\" />\r\n }\r\n </div>\r\n } @else if (row.task.assignedTo) {\r\n <mt-entity-preview [data]=\"toAssignedEntity(row.task)\" />\r\n } @else {\r\n <span class=\"text-slate-400\">-</span>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #progressCellTpl let-row>\r\n <div class=\"space-y-2\">\r\n <mt-number-field\r\n [ngModel]=\"normalizeProgress(row.task.progress)\"\r\n [min]=\"0\"\r\n [max]=\"100\"\r\n [useGrouping]=\"false\"\r\n [maxFractionDigits]=\"0\"\r\n (ngModelChange)=\"onTaskProgressChanged(row.key, $event)\"\r\n />\r\n <mt-entity-preview [data]=\"toProgressEntity(row.task)\" />\r\n </div>\r\n</ng-template>\r\n" }]
|
|
3056
3056
|
}], propDecorators: { selectionCellTpl: [{ type: i0.ViewChild, args: ['selectionCellTpl', { isSignal: true }] }], taskCellTpl: [{ type: i0.ViewChild, args: ['taskCellTpl', { isSignal: true }] }], startDateCellTpl: [{ type: i0.ViewChild, args: ['startDateCellTpl', { isSignal: true }] }], finishDateCellTpl: [{ type: i0.ViewChild, args: ['finishDateCellTpl', { isSignal: true }] }], actualStartDateCellTpl: [{ type: i0.ViewChild, args: ['actualStartDateCellTpl', { isSignal: true }] }], actualFinishDateCellTpl: [{ type: i0.ViewChild, args: ['actualFinishDateCellTpl', { isSignal: true }] }], assignedToCellTpl: [{ type: i0.ViewChild, args: ['assignedToCellTpl', { isSignal: true }] }], progressCellTpl: [{ type: i0.ViewChild, args: ['progressCellTpl', { isSignal: true }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }], maxRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxRows", required: false }] }] } });
|
|
3057
3057
|
|
|
3058
3058
|
class TaskScheduleQueueService {
|
|
@@ -3215,21 +3215,21 @@ class TaskScheduleQueueService {
|
|
|
3215
3215
|
}
|
|
3216
3216
|
localStorage.removeItem(key);
|
|
3217
3217
|
}
|
|
3218
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3219
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3218
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskScheduleQueueService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3219
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskScheduleQueueService, providedIn: 'root' });
|
|
3220
3220
|
}
|
|
3221
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3221
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskScheduleQueueService, decorators: [{
|
|
3222
3222
|
type: Injectable,
|
|
3223
3223
|
args: [{ providedIn: 'root' }]
|
|
3224
3224
|
}] });
|
|
3225
3225
|
|
|
3226
3226
|
class TaskScheduleTaskbarTemplate {
|
|
3227
|
-
data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
3228
|
-
langCode = input('en', ...(ngDevMode ? [{ debugName: "langCode" }] : []));
|
|
3229
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3230
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
3227
|
+
data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
3228
|
+
langCode = input('en', ...(ngDevMode ? [{ debugName: "langCode" }] : /* istanbul ignore next */ []));
|
|
3229
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskScheduleTaskbarTemplate, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3230
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: TaskScheduleTaskbarTemplate, isStandalone: true, selector: "mt-task-schedule-taskbar-template", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, langCode: { classPropertyName: "langCode", publicName: "langCode", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div>\r\n <div\r\n class=\"e-gantt-child-taskbar-inner-div e-gantt-child-taskbar gantt-child-taskbar\"\r\n [style.width.px]=\"data().ganttProperties?.width\"\r\n tabindex=\"-1\"\r\n >\r\n <div\r\n class=\"e-gantt-child-progressbar-inner-div e-gantt-child-progressbar gantt-child-progressbar\"\r\n [style.width.px]=\"data().ganttProperties?.progressWidth\"\r\n >\r\n <span class=\"e-task-label gantt-task-label\"></span>\r\n </div>\r\n </div>\r\n\r\n @if (data().taskData?.type === \"Milestone\") {\r\n <div\r\n class=\"e-gantt-milestone gantt-milestone\"\r\n [class.diamond-left]=\"langCode() === 'en'\"\r\n [class.diamond-right]=\"langCode() === 'ar'\"\r\n tabindex=\"-1\"\r\n ></div>\r\n }\r\n</div>\r\n", styles: [".gantt-child-taskbar{height:22px!important;margin-top:-1px!important}.gantt-child-progressbar{border-style:solid!important;height:100%!important;border-top-right-radius:0;border-bottom-right-radius:0}.gantt-task-label{line-height:21px!important;text-align:left;display:inline-block;width:122px!important;height:22px!important}.gantt-milestone{width:16px!important;height:16px!important;position:absolute!important;transform:rotate(45deg)}.diamond-left{left:calc(100% + .5rem)}.diamond-right{right:calc(100% + .5rem)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
3231
3231
|
}
|
|
3232
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3232
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskScheduleTaskbarTemplate, decorators: [{
|
|
3233
3233
|
type: Component,
|
|
3234
3234
|
args: [{ selector: 'mt-task-schedule-taskbar-template', standalone: true, imports: [CommonModule], template: "<div>\r\n <div\r\n class=\"e-gantt-child-taskbar-inner-div e-gantt-child-taskbar gantt-child-taskbar\"\r\n [style.width.px]=\"data().ganttProperties?.width\"\r\n tabindex=\"-1\"\r\n >\r\n <div\r\n class=\"e-gantt-child-progressbar-inner-div e-gantt-child-progressbar gantt-child-progressbar\"\r\n [style.width.px]=\"data().ganttProperties?.progressWidth\"\r\n >\r\n <span class=\"e-task-label gantt-task-label\"></span>\r\n </div>\r\n </div>\r\n\r\n @if (data().taskData?.type === \"Milestone\") {\r\n <div\r\n class=\"e-gantt-milestone gantt-milestone\"\r\n [class.diamond-left]=\"langCode() === 'en'\"\r\n [class.diamond-right]=\"langCode() === 'ar'\"\r\n tabindex=\"-1\"\r\n ></div>\r\n }\r\n</div>\r\n", styles: [".gantt-child-taskbar{height:22px!important;margin-top:-1px!important}.gantt-child-progressbar{border-style:solid!important;height:100%!important;border-top-right-radius:0;border-bottom-right-radius:0}.gantt-task-label{line-height:21px!important;text-align:left;display:inline-block;width:122px!important;height:22px!important}.gantt-milestone{width:16px!important;height:16px!important;position:absolute!important;transform:rotate(45deg)}.diamond-left{left:calc(100% + .5rem)}.diamond-right{right:calc(100% + .5rem)}\n"] }]
|
|
3235
3235
|
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], langCode: [{ type: i0.Input, args: [{ isSignal: true, alias: "langCode", required: false }] }] } });
|
|
@@ -3268,10 +3268,10 @@ class TaskSchedule {
|
|
|
3268
3268
|
localeEffect;
|
|
3269
3269
|
loadSubscription;
|
|
3270
3270
|
operationSub = new Subscription();
|
|
3271
|
-
contextAddTask = signal('', ...(ngDevMode ? [{ debugName: "contextAddTask" }] : []));
|
|
3272
|
-
contextAddAnchorTask = signal(null, ...(ngDevMode ? [{ debugName: "contextAddAnchorTask" }] : []));
|
|
3273
|
-
customProperties = signal([], ...(ngDevMode ? [{ debugName: "customProperties" }] : []));
|
|
3274
|
-
context = input(null, ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
3271
|
+
contextAddTask = signal('', ...(ngDevMode ? [{ debugName: "contextAddTask" }] : /* istanbul ignore next */ []));
|
|
3272
|
+
contextAddAnchorTask = signal(null, ...(ngDevMode ? [{ debugName: "contextAddAnchorTask" }] : /* istanbul ignore next */ []));
|
|
3273
|
+
customProperties = signal([], ...(ngDevMode ? [{ debugName: "customProperties" }] : /* istanbul ignore next */ []));
|
|
3274
|
+
context = input(null, ...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
|
|
3275
3275
|
toolbarAction = output();
|
|
3276
3276
|
actionBegin = output();
|
|
3277
3277
|
actionCompleted = output();
|
|
@@ -3279,25 +3279,25 @@ class TaskSchedule {
|
|
|
3279
3279
|
actionError = output();
|
|
3280
3280
|
loaded = output();
|
|
3281
3281
|
loadError = output();
|
|
3282
|
-
loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
3283
|
-
settingBaseline = signal(false, ...(ngDevMode ? [{ debugName: "settingBaseline" }] : []));
|
|
3284
|
-
locale = signal('en-US', ...(ngDevMode ? [{ debugName: "locale" }] : []));
|
|
3285
|
-
dataSource = signal([], ...(ngDevMode ? [{ debugName: "dataSource" }] : []));
|
|
3286
|
-
ganttConfig = signal(createGanttConfig('default', EMPTY_RESULT, 'dd/MM/yyyy', 'en'), ...(ngDevMode ? [{ debugName: "ganttConfig" }] : []));
|
|
3282
|
+
loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
3283
|
+
settingBaseline = signal(false, ...(ngDevMode ? [{ debugName: "settingBaseline" }] : /* istanbul ignore next */ []));
|
|
3284
|
+
locale = signal('en-US', ...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
|
|
3285
|
+
dataSource = signal([], ...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
|
|
3286
|
+
ganttConfig = signal(createGanttConfig('default', EMPTY_RESULT, 'dd/MM/yyyy', 'en'), ...(ngDevMode ? [{ debugName: "ganttConfig" }] : /* istanbul ignore next */ []));
|
|
3287
3287
|
treeColumnIndex = computed(() => {
|
|
3288
3288
|
const columns = this.ganttConfig().columns ?? [];
|
|
3289
3289
|
const firstVisibleIndex = columns.findIndex((column) => column['visible'] !== false);
|
|
3290
3290
|
return firstVisibleIndex >= 0 ? firstVisibleIndex : 0;
|
|
3291
|
-
}, ...(ngDevMode ? [{ debugName: "treeColumnIndex" }] : []));
|
|
3291
|
+
}, ...(ngDevMode ? [{ debugName: "treeColumnIndex" }] : /* istanbul ignore next */ []));
|
|
3292
3292
|
ganttId = `mtTaskScheduleGantt-${Math.random().toString(36).slice(2, 10)}`;
|
|
3293
|
-
resolvedModelTypeInput = computed(() => this.context()?.modelType ?? 'default', ...(ngDevMode ? [{ debugName: "resolvedModelTypeInput" }] : []));
|
|
3294
|
-
resolvedDateFormat = computed(() => this.context()?.dateFormat ?? 'dd/MM/yyyy', ...(ngDevMode ? [{ debugName: "resolvedDateFormat" }] : []));
|
|
3295
|
-
resolvedHeight = computed(() => this.context()?.height ?? '760px', ...(ngDevMode ? [{ debugName: "resolvedHeight" }] : []));
|
|
3296
|
-
resolvedModelType = computed(() => normalizeTaskScheduleModelType(this.resolvedModelTypeInput()), ...(ngDevMode ? [{ debugName: "resolvedModelType" }] : []));
|
|
3297
|
-
resolvedLangCode = computed(() => this.context()?.langCode === 'ar' ? 'ar' : 'en', ...(ngDevMode ? [{ debugName: "resolvedLangCode" }] : []));
|
|
3298
|
-
isEditMode = computed(() => this.resolvedModelType() === 'edit', ...(ngDevMode ? [{ debugName: "isEditMode" }] : []));
|
|
3299
|
-
editTaskTypes = computed(() => resolveEditTaskTypes(this.resolvedLangCode(), this.context()), ...(ngDevMode ? [{ debugName: "editTaskTypes" }] : []));
|
|
3300
|
-
enableRtl = computed(() => this.resolvedLangCode() === 'ar', ...(ngDevMode ? [{ debugName: "enableRtl" }] : []));
|
|
3293
|
+
resolvedModelTypeInput = computed(() => this.context()?.modelType ?? 'default', ...(ngDevMode ? [{ debugName: "resolvedModelTypeInput" }] : /* istanbul ignore next */ []));
|
|
3294
|
+
resolvedDateFormat = computed(() => this.context()?.dateFormat ?? 'dd/MM/yyyy', ...(ngDevMode ? [{ debugName: "resolvedDateFormat" }] : /* istanbul ignore next */ []));
|
|
3295
|
+
resolvedHeight = computed(() => this.context()?.height ?? '760px', ...(ngDevMode ? [{ debugName: "resolvedHeight" }] : /* istanbul ignore next */ []));
|
|
3296
|
+
resolvedModelType = computed(() => normalizeTaskScheduleModelType(this.resolvedModelTypeInput()), ...(ngDevMode ? [{ debugName: "resolvedModelType" }] : /* istanbul ignore next */ []));
|
|
3297
|
+
resolvedLangCode = computed(() => this.context()?.langCode === 'ar' ? 'ar' : 'en', ...(ngDevMode ? [{ debugName: "resolvedLangCode" }] : /* istanbul ignore next */ []));
|
|
3298
|
+
isEditMode = computed(() => this.resolvedModelType() === 'edit', ...(ngDevMode ? [{ debugName: "isEditMode" }] : /* istanbul ignore next */ []));
|
|
3299
|
+
editTaskTypes = computed(() => resolveEditTaskTypes(this.resolvedLangCode(), this.context()), ...(ngDevMode ? [{ debugName: "editTaskTypes" }] : /* istanbul ignore next */ []));
|
|
3300
|
+
enableRtl = computed(() => this.resolvedLangCode() === 'ar', ...(ngDevMode ? [{ debugName: "enableRtl" }] : /* istanbul ignore next */ []));
|
|
3301
3301
|
tooltipTranslations = computed(() => this.resolvedLangCode() === 'ar'
|
|
3302
3302
|
? {
|
|
3303
3303
|
startsOn: 'يبدأ في',
|
|
@@ -3312,9 +3312,9 @@ class TaskSchedule {
|
|
|
3312
3312
|
progress: 'Progress',
|
|
3313
3313
|
plannedStart: 'Planned Start Date',
|
|
3314
3314
|
plannedEnd: 'Planned End Date',
|
|
3315
|
-
}, ...(ngDevMode ? [{ debugName: "tooltipTranslations" }] : []));
|
|
3315
|
+
}, ...(ngDevMode ? [{ debugName: "tooltipTranslations" }] : /* istanbul ignore next */ []));
|
|
3316
3316
|
ngOnInit() {
|
|
3317
|
-
this.localeEffect = effect(() => this.locale.set(ensureTaskScheduleLocale(this.resolvedLangCode())), { ...(ngDevMode ? { debugName: "localeEffect" } : {}), injector: this.injector });
|
|
3317
|
+
this.localeEffect = effect(() => this.locale.set(ensureTaskScheduleLocale(this.resolvedLangCode())), { ...(ngDevMode ? { debugName: "localeEffect" } : /* istanbul ignore next */ {}), injector: this.injector });
|
|
3318
3318
|
this.loadEffect = effect(() => {
|
|
3319
3319
|
const context = this.context();
|
|
3320
3320
|
if (!context) {
|
|
@@ -3322,7 +3322,7 @@ class TaskSchedule {
|
|
|
3322
3322
|
}
|
|
3323
3323
|
const langCode = this.resolvedLangCode();
|
|
3324
3324
|
this.loadSchedule(this.resolvedModelTypeInput(), context, this.resolvedDateFormat(), langCode);
|
|
3325
|
-
}, { ...(ngDevMode ? { debugName: "loadEffect" } : {}), injector: this.injector });
|
|
3325
|
+
}, { ...(ngDevMode ? { debugName: "loadEffect" } : /* istanbul ignore next */ {}), injector: this.injector });
|
|
3326
3326
|
const refreshSub = this.queueService.refreshTasks$.subscribe(() => {
|
|
3327
3327
|
this.reloadSchedule();
|
|
3328
3328
|
});
|
|
@@ -3861,8 +3861,8 @@ class TaskSchedule {
|
|
|
3861
3861
|
emitActionError(message) {
|
|
3862
3862
|
this.actionError.emit(message);
|
|
3863
3863
|
}
|
|
3864
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3865
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
3864
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskSchedule, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3865
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: TaskSchedule, isStandalone: true, selector: "mt-task-schedule", inputs: { context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toolbarAction: "toolbarAction", actionBegin: "actionBegin", actionCompleted: "actionCompleted", baselineSet: "baselineSet", actionError: "actionError", loaded: "loaded", loadError: "loadError" }, host: { classAttribute: "block" }, providers: [
|
|
3866
3866
|
DayMarkersService,
|
|
3867
3867
|
EditService,
|
|
3868
3868
|
ExcelExportService,
|
|
@@ -3877,7 +3877,7 @@ class TaskSchedule {
|
|
|
3877
3877
|
ResizeService,
|
|
3878
3878
|
], viewQueries: [{ propertyName: "ganttObj", first: true, predicate: ["ganttObj"], descendants: true }], ngImport: i0, template: "@if (!loading()) {\r\n <ejs-gantt\r\n #ganttObj\r\n [id]=\"ganttId\"\r\n [enableVirtualization]=\"true\"\r\n [enableTimelineVirtualization]=\"true\"\r\n [enableVirtualMaskRow]=\"false\"\r\n [allowResizing]=\"true\"\r\n [enableRtl]=\"enableRtl()\"\r\n [locale]=\"locale()\"\r\n [height]=\"resolvedHeight()\"\r\n [dataSource]=\"dataSource()\"\r\n [taskFields]=\"ganttConfig().taskFields\"\r\n [columns]=\"ganttConfig().columns\"\r\n [renderBaseline]=\"ganttConfig().renderBaseline\"\r\n [enableCriticalPath]=\"ganttConfig().enableCriticalPath\"\r\n [allowSelection]=\"true\"\r\n [labelSettings]=\"ganttConfig().labelSettings\"\r\n [treeColumnIndex]=\"treeColumnIndex()\"\r\n [workWeek]=\"ganttConfig().workWeek\"\r\n [highlightWeekends]=\"true\"\r\n [enablePredecessorValidation]=\"true\"\r\n [splitterSettings]=\"ganttConfig().splitterSettings\"\r\n [gridLines]=\"ganttConfig().gridLines\"\r\n [toolbar]=\"ganttConfig().toolbar\"\r\n [allowExcelExport]=\"ganttConfig().allowExcelExport\"\r\n [allowPdfExport]=\"ganttConfig().allowPdfExport\"\r\n [enableContextMenu]=\"ganttConfig().enableContextMenu\"\r\n [contextMenuItems]=\"ganttConfig().contextMenuItems\"\r\n [timelineSettings]=\"ganttConfig().timelineSettings\"\r\n [editSettings]=\"ganttConfig().editSettings\"\r\n [allowRowDragAndDrop]=\"ganttConfig().allowRowDragAndDrop\"\r\n [addDialogFields]=\"ganttConfig().addDialogFields\"\r\n [editDialogFields]=\"ganttConfig().editDialogFields\"\r\n [resourceFields]=\"ganttConfig().resourceFields\"\r\n [resources]=\"ganttConfig().resources\"\r\n [viewType]=\"ganttConfig().viewType\"\r\n [showOverAllocation]=\"ganttConfig().showOverAllocation\"\r\n [allowUnscheduledTasks]=\"ganttConfig().allowUnscheduledTasks\"\r\n [eventMarkers]=\"ganttConfig().eventMarkers\"\r\n [projectStartDate]=\"ganttConfig().projectStartDate\"\r\n [projectEndDate]=\"ganttConfig().projectEndDate\"\r\n [autoCalculateDateScheduling]=\"false\"\r\n [dateFormat]=\"resolvedDateFormat()\"\r\n [allowSorting]=\"true\"\r\n [holidays]=\"ganttConfig().holidays\"\r\n [enableWBS]=\"true\"\r\n [enableAutoWbsUpdate]=\"true\"\r\n [allowReordering]=\"true\"\r\n (toolbarClick)=\"onToolbarClick($event)\"\r\n (contextMenuOpen)=\"onContextMenuOpen($event)\"\r\n (contextMenuClick)=\"onContextMenuClick($event)\"\r\n (actionBegin)=\"onActionBegin($event)\"\r\n (actionComplete)=\"onActionComplete($event)\"\r\n (cellEdit)=\"onCellEdit($event)\"\r\n (queryTaskbarInfo)=\"onQueryTaskbarInfo($event)\"\r\n (dataBound)=\"onDataBound()\"\r\n >\r\n <ng-template #tooltipSettingsTaskbar let-data>\r\n <div class=\"px-2 py-1 text-xs\">\r\n <div class=\"font-medium\">{{ data?.title ?? \"-\" }}</div>\r\n <div>\r\n {{ tooltipTranslations().startsOn }}:\r\n {{ data?.startDate ?? \"-\" }}\r\n </div>\r\n <div>\r\n {{ tooltipTranslations().endsOn }}:\r\n {{ data?.finishDate ?? \"-\" }}\r\n </div>\r\n @if (data?.baselineStartDate) {\r\n <div>\r\n {{ tooltipTranslations().plannedStart }}:\r\n {{ data?.baselineStartDate ?? \"-\" }}\r\n </div>\r\n }\r\n @if (data?.baselineEndDate) {\r\n <div>\r\n {{ tooltipTranslations().plannedEnd }}:\r\n {{ data?.baselineEndDate ?? \"-\" }}\r\n </div>\r\n }\r\n <div>\r\n {{ tooltipTranslations().progress }}: {{ data?.progress ?? 0 }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #taskbarTemplate let-data>\r\n <mt-task-schedule-taskbar-template\r\n [data]=\"data\"\r\n [langCode]=\"resolvedLangCode()\"\r\n />\r\n </ng-template>\r\n </ejs-gantt>\r\n} @else {\r\n <div class=\"task-schedule-loader\">\r\n <div class=\"task-schedule-loader__spinner\" aria-label=\"Loading\"></div>\r\n </div>\r\n}\r\n", styles: [":host{display:block}:host ::ng-deep .e-headercell .e-headercelldiv{height:auto;display:flex!important}:host ::ng-deep .e-custom-holiday{background-color:#0a0f32}:host ::ng-deep .e-gantt .e-gantt-chart .e-baseline-bar{height:7px!important;border-radius:3px}:host ::ng-deep .e-gantt .e-gantt-chart .e-gantt-child-taskbar-inner-div{height:17px!important}:host ::ng-deep .e-row{cursor:pointer!important}.task-schedule-loader{display:grid;place-items:center;min-height:18rem}.task-schedule-loader__spinner{width:2.25rem;height:2.25rem;border-radius:9999px;border:3px solid rgba(148,163,184,.3);border-top-color:#334155;animation:task-schedule-spin .8s linear infinite}@keyframes task-schedule-spin{to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: GanttModule }, { kind: "component", type: i1$1.GanttComponent, selector: "ejs-gantt", inputs: ["addDialogFields", "allowExcelExport", "allowFiltering", "allowKeyboard", "allowParentDependency", "allowPdfExport", "allowReordering", "allowResizing", "allowRowDragAndDrop", "allowSelection", "allowSorting", "allowTaskbarDragAndDrop", "allowTaskbarOverlap", "allowUnscheduledTasks", "autoCalculateDateScheduling", "autoFocusTasks", "baselineColor", "calendarSettings", "collapseAllParentTasks", "columnMenuItems", "columns", "connectorLineBackground", "connectorLineWidth", "contextMenuItems", "dataSource", "dateFormat", "dayWorkingTime", "disableHtmlEncode", "durationUnit", "editDialogFields", "editSettings", "emptyRecordTemplate", "enableAdaptiveUI", "enableAutoWbsUpdate", "enableContextMenu", "enableCriticalPath", "enableHover", "enableHtmlSanitizer", "enableImmutableMode", "enableMultiTaskbar", "enablePersistence", "enablePredecessorValidation", "enableRtl", "enableTimelineVirtualization", "enableUndoRedo", "enableVirtualMaskRow", "enableVirtualization", "enableWBS", "eventMarkers", "filterSettings", "frozenColumns", "gridLines", "height", "highlightWeekends", "holidays", "includeWeekend", "labelSettings", "loadChildOnDemand", "loadingIndicator", "locale", "milestoneTemplate", "parentTaskbarTemplate", "projectEndDate", "projectStartDate", "query", "readOnly", "renderBaseline", "resourceFields", "resourceIDMapping", "resourceNameMapping", "resources", "rowHeight", "searchSettings", "segmentData", "selectedRowIndex", "selectionSettings", "showColumnMenu", "showInlineNotes", "showOverAllocation", "sortSettings", "splitterSettings", "taskFields", "taskMode", "taskType", "taskbarHeight", "taskbarTemplate", "timelineSettings", "timelineTemplate", "timezone", "toolbar", "tooltipSettings", "treeColumnIndex", "undoRedoActions", "undoRedoStepsCount", "updateOffsetOnTaskbarEdit", "validateManualTasksOnLinking", "viewType", "weekWorkingTime", "width", "workUnit", "workWeek", "zoomingLevels"], outputs: ["actionBegin", "actionComplete", "actionFailure", "beforeDataBound", "beforeExcelExport", "beforePdfExport", "beforeTooltipRender", "cellDeselected", "cellDeselecting", "cellEdit", "cellSave", "cellSelected", "cellSelecting", "collapsed", "collapsing", "columnDrag", "columnDragStart", "columnDrop", "columnMenuClick", "columnMenuOpen", "contextMenuClick", "contextMenuOpen", "created", "dataBound", "dataStateChange", "destroyed", "endEdit", "excelExportComplete", "excelHeaderQueryCellInfo", "excelQueryCellInfo", "expanded", "expanding", "headerCellInfo", "load", "onMouseMove", "onTaskbarClick", "pdfColumnHeaderQueryCellInfo", "pdfExportComplete", "pdfQueryCellInfo", "pdfQueryTaskbarInfo", "pdfQueryTimelineCellInfo", "queryCellInfo", "queryTaskbarInfo", "recordDoubleClick", "resizeStart", "resizeStop", "resizing", "rowDataBound", "rowDeselected", "rowDeselecting", "rowDrag", "rowDragStart", "rowDragStartHelper", "rowDrop", "rowSelected", "rowSelecting", "splitterResizeStart", "splitterResized", "splitterResizing", "taskbarEdited", "taskbarEditing", "toolbarClick", "dataSourceChange"] }, { kind: "component", type: TaskScheduleTaskbarTemplate, selector: "mt-task-schedule-taskbar-template", inputs: ["data", "langCode"] }] });
|
|
3879
3879
|
}
|
|
3880
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3880
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskSchedule, decorators: [{
|
|
3881
3881
|
type: Component,
|
|
3882
3882
|
args: [{ selector: 'mt-task-schedule', standalone: true, imports: [CommonModule, GanttModule, TaskScheduleTaskbarTemplate], host: { class: 'block' }, providers: [
|
|
3883
3883
|
DayMarkersService,
|
|
@@ -3903,19 +3903,19 @@ class TaskScheduleHeader {
|
|
|
3903
3903
|
activeLang = toSignal(this.transloco.langChanges$, {
|
|
3904
3904
|
initialValue: this.transloco.getActiveLang(),
|
|
3905
3905
|
});
|
|
3906
|
-
context = input(null, ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
3907
|
-
title = input(null, ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
3908
|
-
modeOptions = input.required(...(ngDevMode ? [{ debugName: "modeOptions" }] : []));
|
|
3906
|
+
context = input(null, ...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
|
|
3907
|
+
title = input(null, ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
3908
|
+
modeOptions = input.required(...(ngDevMode ? [{ debugName: "modeOptions" }] : /* istanbul ignore next */ []));
|
|
3909
3909
|
modeChanged = output();
|
|
3910
3910
|
baselineSet = output();
|
|
3911
3911
|
actionError = output();
|
|
3912
|
-
currentModelType = signal('default', ...(ngDevMode ? [{ debugName: "currentModelType" }] : []));
|
|
3912
|
+
currentModelType = signal('default', ...(ngDevMode ? [{ debugName: "currentModelType" }] : /* istanbul ignore next */ []));
|
|
3913
3913
|
labels = computed(() => {
|
|
3914
3914
|
this.activeLang();
|
|
3915
3915
|
return {
|
|
3916
3916
|
title: this.title() || this.translate('task-schedule.header.title'),
|
|
3917
3917
|
};
|
|
3918
|
-
}, ...(ngDevMode ? [{ debugName: "labels" }] : []));
|
|
3918
|
+
}, ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
|
|
3919
3919
|
resolvedModes = computed(() => {
|
|
3920
3920
|
return this.modeOptions()
|
|
3921
3921
|
.filter((item) => (this.context()?.allowEditMode ?? true) ||
|
|
@@ -3926,7 +3926,7 @@ class TaskScheduleHeader {
|
|
|
3926
3926
|
icon: item.icon ?? '',
|
|
3927
3927
|
color: item.color ?? 'primary',
|
|
3928
3928
|
}));
|
|
3929
|
-
}, ...(ngDevMode ? [{ debugName: "resolvedModes" }] : []));
|
|
3929
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedModes" }] : /* istanbul ignore next */ []));
|
|
3930
3930
|
constructor() {
|
|
3931
3931
|
effect(() => {
|
|
3932
3932
|
this.currentModelType.set(this.context()?.modelType ?? 'default');
|
|
@@ -3951,10 +3951,10 @@ class TaskScheduleHeader {
|
|
|
3951
3951
|
this.activeLang();
|
|
3952
3952
|
return this.transloco.translate(key);
|
|
3953
3953
|
}
|
|
3954
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3955
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
3954
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskScheduleHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3955
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: TaskScheduleHeader, isStandalone: true, selector: "mt-task-schedule-header", inputs: { context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, modeOptions: { classPropertyName: "modeOptions", publicName: "modeOptions", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { modeChanged: "modeChanged", baselineSet: "baselineSet", actionError: "actionError" }, ngImport: i0, template: "<div class=\"flex w-full items-center gap-3\">\r\n <div class=\"flex min-w-0 flex-1 items-center gap-2\">\r\n <h3 class=\"m-0 text-lg font-bold\">\r\n {{ labels().title }}\r\n </h3>\r\n </div>\r\n\r\n <div class=\"ml-auto flex shrink-0 items-center gap-2 whitespace-nowrap\">\r\n <mt-select-field\r\n class=\"w-56 shrink-0\"\r\n [options]=\"resolvedModes()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n optionIcon=\"icon\"\r\n optionIconColor=\"color\"\r\n [field]=\"false\"\r\n [ngModel]=\"currentModelType()\"\r\n (onChange)=\"onModeChange($event)\"\r\n />\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }] });
|
|
3956
3956
|
}
|
|
3957
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3957
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TaskScheduleHeader, decorators: [{
|
|
3958
3958
|
type: Component,
|
|
3959
3959
|
args: [{ selector: 'mt-task-schedule-header', standalone: true, imports: [CommonModule, FormsModule, SelectField], template: "<div class=\"flex w-full items-center gap-3\">\r\n <div class=\"flex min-w-0 flex-1 items-center gap-2\">\r\n <h3 class=\"m-0 text-lg font-bold\">\r\n {{ labels().title }}\r\n </h3>\r\n </div>\r\n\r\n <div class=\"ml-auto flex shrink-0 items-center gap-2 whitespace-nowrap\">\r\n <mt-select-field\r\n class=\"w-56 shrink-0\"\r\n [options]=\"resolvedModes()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n optionIcon=\"icon\"\r\n optionIconColor=\"color\"\r\n [field]=\"false\"\r\n [ngModel]=\"currentModelType()\"\r\n (onChange)=\"onModeChange($event)\"\r\n />\r\n </div>\r\n</div>\r\n" }]
|
|
3960
3960
|
}], ctorParameters: () => [], propDecorators: { context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], modeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "modeOptions", required: true }] }], modeChanged: [{ type: i0.Output, args: ["modeChanged"] }], baselineSet: [{ type: i0.Output, args: ["baselineSet"] }], actionError: [{ type: i0.Output, args: ["actionError"] }] } });
|