@sme.up/ketchup 9.6.3 → 9.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{bar.helpers-f46a5a83.js → bar.helpers-c481a535.js} +45 -13
- package/dist/cjs/{f-button-9a0eba42.js → f-button-23ec3db5.js} +1 -1
- package/dist/cjs/{f-cell-1ad41071.js → f-cell-bcc51c0f.js} +9 -29
- package/dist/cjs/{f-chip-48851b4f.js → f-chip-63363ecf.js} +2 -2
- package/dist/cjs/{f-image-541e5f4d.js → f-image-f3944c01.js} +2 -5
- package/dist/cjs/{f-paginator-utils-8ff2a9b4.js → f-paginator-utils-60e05759.js} +3 -3
- package/dist/cjs/{f-text-field-ac5d6497.js → f-text-field-354b6c78.js} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +3 -3
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +48 -48
- package/dist/cjs/kup-box.cjs.entry.js +8 -8
- package/dist/cjs/kup-calendar.cjs.entry.js +5 -5
- package/dist/cjs/kup-card-list.cjs.entry.js +2 -2
- package/dist/cjs/kup-cell.cjs.entry.js +7 -7
- package/dist/cjs/kup-custom-task-list-header_4.cjs.entry.js +256 -40
- package/dist/cjs/kup-dashboard.cjs.entry.js +5 -5
- package/dist/cjs/{kup-dates-b7d53b4d.js → kup-dates-e22ee32c.js} +21 -0
- package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
- package/dist/cjs/kup-echart.cjs.entry.js +2 -2
- package/dist/cjs/kup-editor.cjs.entry.js +2 -2
- package/dist/cjs/kup-family-tree.cjs.entry.js +4 -4
- package/dist/cjs/kup-gantt_10.cjs.entry.js +105 -39
- package/dist/cjs/kup-grid.cjs.entry.js +2 -2
- package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
- package/dist/cjs/kup-image-list.cjs.entry.js +21 -14
- package/dist/cjs/kup-input-panel.cjs.entry.js +444 -0
- package/dist/cjs/kup-lazy.cjs.entry.js +13 -13
- package/dist/cjs/kup-magic-box.cjs.entry.js +6 -6
- package/dist/cjs/{kup-manager-26a9154b.js → kup-manager-e1bfd4f8.js} +656 -121
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +4 -4
- package/dist/cjs/kup-pdf.cjs.entry.js +76600 -0
- package/dist/cjs/kup-photo-frame.cjs.entry.js +4 -4
- package/dist/cjs/{kup-planner-declarations-d3dec885.js → kup-planner-declarations-cb33663d.js} +3 -0
- package/dist/cjs/{kup-planner-renderer-helper-680bbd5a.js → kup-planner-renderer-helper-f001fad7.js} +56 -8
- package/dist/cjs/kup-planner-renderer.cjs.entry.js +44 -11
- package/dist/cjs/{kup-planner-time-formatter-a74e70f0.js → kup-planner-time-formatter-b7dca3ea.js} +3 -0
- package/dist/cjs/kup-planner.cjs.entry.js +81 -9
- package/dist/cjs/kup-probe.cjs.entry.js +3 -3
- package/dist/cjs/kup-qlik.cjs.entry.js +3 -3
- package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/image-list.js +332 -2
- package/dist/collection/assets/index.js +8 -0
- package/dist/collection/assets/input-panel.js +480 -0
- package/dist/collection/assets/pdf.js +15 -0
- package/dist/collection/assets/planner-example-5.js +19 -7
- package/dist/collection/assets/planner-example-6.js +3 -0
- package/dist/collection/assets/planner.js +4 -3
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/kup-badge/kup-badge.css +4 -4
- package/dist/collection/components/kup-image-list/kup-image-list.css +37 -4
- package/dist/collection/components/kup-image-list/kup-image-list.js +15 -8
- package/dist/collection/components/kup-input-panel/kup-input-panel-declarations.js +8 -0
- package/dist/collection/components/kup-input-panel/kup-input-panel.css +169 -0
- package/dist/collection/components/kup-input-panel/kup-input-panel.e2e.js +346 -0
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +669 -0
- package/dist/collection/components/kup-lazy/kup-lazy.js +11 -11
- package/dist/collection/components/kup-list/kup-list.js +1 -1
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +3 -3
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +1 -1
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +1 -1
- package/dist/collection/components/kup-pdf/kup-pdf-declarations.js +8 -0
- package/dist/collection/components/kup-pdf/kup-pdf.css +169 -0
- package/dist/collection/components/kup-pdf/kup-pdf.js +262 -0
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +2 -2
- package/dist/collection/components/kup-planner/kup-planner-declarations.js +3 -0
- package/dist/collection/components/kup-planner/kup-planner-helper.js +42 -1
- package/dist/collection/components/kup-planner/kup-planner.js +191 -5
- package/dist/collection/components/kup-planner/utils/custom-task-list-header.js +2 -2
- package/dist/collection/components/kup-planner/utils/custom-task-list-table.js +103 -11
- package/dist/collection/components/kup-planner/utils/gantt-table.module.css +80 -2
- package/dist/collection/components/kup-planner/utils/helpers/bar.helpers.js +41 -13
- package/dist/collection/components/kup-planner/utils/helpers/other.helpers.js +3 -0
- package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.css +10 -0
- package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.js +61 -6
- package/dist/collection/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.js +32 -2
- package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.css +4 -0
- package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.js +208 -24
- package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.css +4 -0
- package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.js +131 -7
- package/dist/collection/components/kup-planner/utils/kup-planner-renderer-helper.js +55 -6
- package/dist/collection/components/kup-planner/utils/kup-planner-renderer.js +40 -7
- package/dist/collection/components/kup-planner/utils/kup-switcher/kup-switcher.css +22 -15
- package/dist/collection/components/kup-planner/utils/kup-switcher/kup-switcher.js +21 -5
- package/dist/collection/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.js +19 -3
- package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-header.js +7 -7
- package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-table.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list.js +76 -2
- package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-standard-tooltip.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-tooltip.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-vertical-scroll/kup-vertical-scroll.js +2 -2
- package/dist/collection/components/kup-probe/kup-probe.js +1 -1
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +1 -1
- package/dist/collection/components/kup-qlik/kup-qlik.js +1 -1
- package/dist/collection/components/kup-rating/kup-rating.js +1 -1
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +1 -1
- package/dist/collection/components/kup-spinner/kup-spinner.js +34 -34
- package/dist/collection/components/kup-switch/kup-switch.js +1 -1
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +1 -1
- package/dist/collection/f-components/f-cell/f-cell.js +5 -24
- package/dist/collection/f-components/f-image/f-image.js +2 -5
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +7 -0
- package/dist/collection/types/GenericTypes.js +1 -0
- package/dist/components/_commonjsHelpers.js +26 -0
- package/dist/components/custom-task-list-header.js +2 -2
- package/dist/components/custom-task-list-table.js +58 -13
- package/dist/components/kup-autocomplete2.js +48 -70
- package/dist/components/kup-box2.js +1 -1
- package/dist/components/kup-calendar.js +2 -2
- package/dist/components/kup-cell.js +1 -1
- package/dist/components/kup-dashboard.js +1 -1
- package/dist/components/kup-dates.js +2 -6
- package/dist/components/kup-echart2.js +1 -1
- package/dist/components/kup-editor.js +1 -1
- package/dist/components/kup-gantt-calendar2.js +31 -1
- package/dist/components/kup-gantt2.js +26 -7
- package/dist/components/kup-grid-renderer2.js +219 -81
- package/dist/components/kup-grid2.js +1 -1
- package/dist/components/kup-horizontal-scroll2.js +48 -10
- package/dist/components/kup-iframe.js +1 -1
- package/dist/components/kup-image-list.js +15 -8
- package/dist/components/kup-input-panel.d.ts +11 -0
- package/dist/components/kup-input-panel.js +595 -0
- package/dist/components/kup-lazy.js +11 -11
- package/dist/components/kup-magic-box.js +4 -4
- package/dist/components/kup-manager.js +658 -122
- package/dist/components/kup-nav-bar.js +1 -1
- package/dist/components/kup-numeric-picker.js +2 -2
- package/dist/components/kup-pdf.d.ts +11 -0
- package/dist/components/kup-pdf.js +76756 -0
- package/dist/components/kup-photo-frame.js +2 -2
- package/dist/components/kup-planner-declarations.js +91 -0
- package/dist/components/kup-planner-renderer2.js +42 -9
- package/dist/components/kup-planner.js +86 -6
- package/dist/components/kup-probe.js +1 -1
- package/dist/components/kup-qlik.js +1 -1
- package/dist/components/kup-snackbar.js +1 -1
- package/dist/components/kup-standard-tooltip2.js +1 -1
- package/dist/components/kup-switcher2.js +19 -7
- package/dist/components/kup-task-gantt2.js +6 -4
- package/dist/components/kup-task-list-header2.js +7 -7
- package/dist/components/kup-task-list-table2.js +1 -1
- package/dist/components/kup-task-list2.js +434 -84
- package/dist/components/kup-tooltip2.js +1 -1
- package/dist/components/kup-vertical-scroll2.js +2 -2
- package/dist/components/other.helpers.js +47 -0
- package/dist/esm/{bar.helpers-0898efb9.js → bar.helpers-23a51579.js} +45 -14
- package/dist/esm/{f-button-45d690a5.js → f-button-d6dbcfd6.js} +1 -1
- package/dist/esm/{f-cell-63db06db.js → f-cell-7b41415c.js} +9 -29
- package/dist/esm/{f-chip-f1ab6c5e.js → f-chip-68d27d7a.js} +2 -2
- package/dist/esm/{f-image-8b382cc5.js → f-image-a67229e5.js} +2 -5
- package/dist/esm/{f-paginator-utils-ae563cd5.js → f-paginator-utils-8773e358.js} +3 -3
- package/dist/esm/{f-text-field-b5fcb598.js → f-text-field-d364ffd2.js} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-accordion.entry.js +3 -3
- package/dist/esm/kup-autocomplete_27.entry.js +48 -48
- package/dist/esm/kup-box.entry.js +8 -8
- package/dist/esm/kup-calendar.entry.js +5 -5
- package/dist/esm/kup-card-list.entry.js +2 -2
- package/dist/esm/kup-cell.entry.js +7 -7
- package/dist/esm/kup-custom-task-list-header_4.entry.js +256 -40
- package/dist/esm/kup-dashboard.entry.js +5 -5
- package/dist/esm/{kup-dates-4ad48be7.js → kup-dates-26a56bf7.js} +20 -1
- package/dist/esm/kup-drawer.entry.js +2 -2
- package/dist/esm/kup-echart.entry.js +2 -2
- package/dist/esm/kup-editor.entry.js +2 -2
- package/dist/esm/kup-family-tree.entry.js +4 -4
- package/dist/esm/kup-gantt_10.entry.js +106 -40
- package/dist/esm/kup-grid.entry.js +2 -2
- package/dist/esm/kup-iframe.entry.js +2 -2
- package/dist/esm/kup-image-list.entry.js +21 -14
- package/dist/esm/kup-input-panel.entry.js +440 -0
- package/dist/esm/kup-lazy.entry.js +13 -13
- package/dist/esm/kup-magic-box.entry.js +6 -6
- package/dist/esm/{kup-manager-cdb4f21a.js → kup-manager-a316a70e.js} +656 -121
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +4 -4
- package/dist/esm/kup-pdf.entry.js +76596 -0
- package/dist/esm/kup-photo-frame.entry.js +4 -4
- package/dist/esm/{kup-planner-declarations-b9345758.js → kup-planner-declarations-398babf9.js} +3 -0
- package/dist/esm/{kup-planner-renderer-helper-da0518be.js → kup-planner-renderer-helper-a2ec9a1c.js} +57 -8
- package/dist/esm/kup-planner-renderer.entry.js +44 -11
- package/dist/esm/{kup-planner-time-formatter-a68e05ba.js → kup-planner-time-formatter-ddf84f9b.js} +1 -1
- package/dist/esm/kup-planner.entry.js +81 -9
- package/dist/esm/kup-probe.entry.js +3 -3
- package/dist/esm/kup-qlik.entry.js +3 -3
- package/dist/esm/kup-snackbar.entry.js +5 -5
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-008bdcdc.js +1 -0
- package/dist/ketchup/p-042e874a.entry.js +1 -0
- package/dist/ketchup/{p-837bd0a6.entry.js → p-074ccd53.entry.js} +1 -1
- package/dist/ketchup/{p-41e8402e.entry.js → p-1088ab22.entry.js} +1 -1
- package/dist/ketchup/{p-d9284d98.entry.js → p-1bcac01f.entry.js} +1 -1
- package/dist/ketchup/{p-e0a1fbe7.entry.js → p-1e028d95.entry.js} +1 -1
- package/dist/ketchup/p-25058baa.js +1 -0
- package/dist/ketchup/{p-cbe42afd.entry.js → p-2932e7e8.entry.js} +1 -1
- package/dist/ketchup/{p-1cd48eea.entry.js → p-2b84db7b.entry.js} +1 -1
- package/dist/ketchup/{p-d608f866.entry.js → p-2ef90f60.entry.js} +1 -1
- package/dist/ketchup/{p-bedabdb5.js → p-339bbeae.js} +1 -1
- package/dist/ketchup/{p-157f0e89.entry.js → p-48e45ac0.entry.js} +1 -1
- package/dist/ketchup/p-53af4c87.js +1 -0
- package/dist/ketchup/{p-4dfc5927.entry.js → p-556f7ddc.entry.js} +1 -1
- package/dist/ketchup/{p-cc7352a8.entry.js → p-5f7d8c21.entry.js} +1 -1
- package/dist/ketchup/{p-e0c10de2.entry.js → p-6362738c.entry.js} +1 -1
- package/dist/ketchup/{p-ad6a3c2a.entry.js → p-65e363c6.entry.js} +1 -1
- package/dist/ketchup/p-6921bc81.entry.js +16 -0
- package/dist/ketchup/p-6961e0ce.entry.js +1 -0
- package/dist/ketchup/p-7123d2a4.entry.js +1 -0
- package/dist/ketchup/{p-a5074ce4.js → p-801776bc.js} +1 -1
- package/dist/ketchup/{p-ca8a1f53.entry.js → p-81645576.entry.js} +1 -1
- package/dist/ketchup/p-838dea62.js +1 -0
- package/dist/ketchup/{p-924b841b.js → p-84b511e1.js} +1 -1
- package/dist/ketchup/{p-9a856951.js → p-8d4050ec.js} +4 -4
- package/dist/ketchup/{p-1474852d.entry.js → p-9e2533e1.entry.js} +1 -1
- package/dist/ketchup/{p-c6b34763.entry.js → p-a06974a3.entry.js} +1 -1
- package/dist/ketchup/p-a6beb822.js +1 -0
- package/dist/ketchup/p-abe181d0.entry.js +1 -0
- package/dist/ketchup/{p-ba0f28b7.js → p-b3540f83.js} +1 -1
- package/dist/ketchup/{p-b6a21b6a.entry.js → p-c702eb45.entry.js} +1 -1
- package/dist/ketchup/{p-090e5097.entry.js → p-ccb6dbb0.entry.js} +1 -1
- package/dist/ketchup/{p-d839ce21.entry.js → p-cf44485a.entry.js} +2 -2
- package/dist/ketchup/p-d2001dec.entry.js +44 -0
- package/dist/ketchup/{p-e508b2fd.entry.js → p-dbb6cd8d.entry.js} +1 -1
- package/dist/ketchup/p-eb8ea3a6.js +1 -0
- package/dist/ketchup/{p-590c34bc.js → p-f6c8f006.js} +1 -1
- package/dist/ketchup/{p-4c100286.entry.js → p-f79ffe77.entry.js} +1 -1
- package/dist/ketchup/{p-31c0cfc0.entry.js → p-fdcfaedd.entry.js} +1 -1
- package/dist/ketchup/p-fe75ede2.entry.js +1 -0
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +1 -1
- package/dist/types/components/kup-input-panel/kup-input-panel-declarations.d.ts +81 -0
- package/dist/types/components/kup-input-panel/kup-input-panel.d.ts +67 -0
- package/dist/types/components/kup-pdf/kup-pdf-declarations.d.ts +7 -0
- package/dist/types/components/kup-pdf/kup-pdf.d.ts +42 -0
- package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +29 -2
- package/dist/types/components/kup-planner/kup-planner-helper.d.ts +2 -1
- package/dist/types/components/kup-planner/kup-planner.d.ts +38 -0
- package/dist/types/components/kup-planner/utils/custom-task-list-table.d.ts +7 -0
- package/dist/types/components/kup-planner/utils/helpers/bar.helpers.d.ts +1 -1
- package/dist/types/components/kup-planner/utils/helpers/other.helpers.d.ts +1 -0
- package/dist/types/components/kup-planner/utils/kup-gantt/kup-gantt.d.ts +6 -0
- package/dist/types/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.d.ts +1 -0
- package/dist/types/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.d.ts +13 -1
- package/dist/types/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.d.ts +7 -0
- package/dist/types/components/kup-planner/utils/kup-planner-renderer-helper.d.ts +6 -2
- package/dist/types/components/kup-planner/utils/kup-planner-renderer.d.ts +1 -0
- package/dist/types/components/kup-planner/utils/kup-switcher/kup-switcher.d.ts +3 -1
- package/dist/types/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.d.ts +1 -0
- package/dist/types/components/kup-planner/utils/kup-task-list/kup-task-list.d.ts +4 -0
- package/dist/types/components.d.ts +266 -2
- package/dist/types/types/GenericTypes.d.ts +1 -0
- package/package.json +2 -1
- package/dist/components/kup-planner-renderer-helper.js +0 -379
- package/dist/ketchup/p-21351b19.entry.js +0 -1
- package/dist/ketchup/p-2b40d9b9.entry.js +0 -1
- package/dist/ketchup/p-5c79cb74.js +0 -1
- package/dist/ketchup/p-670354ef.entry.js +0 -1
- package/dist/ketchup/p-8e3b6de8.js +0 -1
- package/dist/ketchup/p-935f58fc.js +0 -1
- package/dist/ketchup/p-9852b1e9.js +0 -1
- package/dist/ketchup/p-ca42a421.entry.js +0 -16
- package/dist/ketchup/p-d50515f7.js +0 -1
- package/dist/ketchup/p-e841c2ae.js +0 -1
- package/dist/ketchup/p-ec4050e1.entry.js +0 -1
|
@@ -1,379 +0,0 @@
|
|
|
1
|
-
import { b as KupDates } from './kup-dates.js';
|
|
2
|
-
|
|
3
|
-
const columnWidthForTimeUnit = (timeUnit) => {
|
|
4
|
-
switch (timeUnit) {
|
|
5
|
-
case 'year':
|
|
6
|
-
return 60 * 2;
|
|
7
|
-
default:
|
|
8
|
-
return 60;
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
const getProjectById = (id, items) => {
|
|
12
|
-
for (let i = 0; i < items.length; i++) {
|
|
13
|
-
if (items[i].id === id) {
|
|
14
|
-
return items[i];
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return undefined;
|
|
18
|
-
};
|
|
19
|
-
const getPhaseById = (id, items) => {
|
|
20
|
-
for (let i = 0; i < items.length; i++) {
|
|
21
|
-
if (isDetail(items[i])) {
|
|
22
|
-
continue;
|
|
23
|
-
}
|
|
24
|
-
const item = items[i];
|
|
25
|
-
if (!item.phases) {
|
|
26
|
-
continue;
|
|
27
|
-
}
|
|
28
|
-
for (let j = 0; j < item.phases.length; j++)
|
|
29
|
-
if (item.phases[j].id === id) {
|
|
30
|
-
return item.phases[j];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return undefined;
|
|
34
|
-
};
|
|
35
|
-
const isDetail = (row) => {
|
|
36
|
-
return (row &&
|
|
37
|
-
row.schedule &&
|
|
38
|
-
row.schedule.length !== 0);
|
|
39
|
-
};
|
|
40
|
-
const mergeTaskIntoProjects = (projects, { id, start, end }) => projects.map((project) => project.id === id ? withNewDates(project, start, end) : project);
|
|
41
|
-
const mergeTaskIntoPhases = (phases, { id, start, end }) => {
|
|
42
|
-
if (phases) {
|
|
43
|
-
return phases.map((phase) => phase.id === id ? withNewDates(phase, start, end) : phase);
|
|
44
|
-
}
|
|
45
|
-
return undefined;
|
|
46
|
-
};
|
|
47
|
-
const convertProjectToTasks = (item, mainGanttStartDate, mainGanttEndDate) => {
|
|
48
|
-
var _a;
|
|
49
|
-
if (!isDetail(item)) {
|
|
50
|
-
const kupDates = new KupDates();
|
|
51
|
-
const row = item;
|
|
52
|
-
const { start, end } = kupDates.validDates(row.startDate, row.endDate, row.name);
|
|
53
|
-
const { start: start2, end: end2 } = kupDates.validDates(row.secondaryStartDate, row.secondaryEndDate, row.name);
|
|
54
|
-
const mainTask = {
|
|
55
|
-
/**
|
|
56
|
-
* La libreria lo intende come le ore 00:00, che non è coerente
|
|
57
|
-
* con come vorremmo ragionare noi. Es.: se un task finisce il 9 luglio,
|
|
58
|
-
* la libreria colora le celle fino all'8 luglio compreso, ma non il 9;
|
|
59
|
-
* noi invece vorremmo colorare anche il 9.
|
|
60
|
-
* Possibili workaround: gestirsi ovunque il giorno di differenza (😱);
|
|
61
|
-
* impostare le conversioni dell'intervallo di fine come orario 23:59.
|
|
62
|
-
* In ogni caso va a cozzare con il calcolo delle durate
|
|
63
|
-
* (es.: dall'1 al 5 luglio => risulta 4 giorni ma dovrebbe
|
|
64
|
-
* essere 5 perché includiamo gli estremi; se sommiamo 23:59 ore
|
|
65
|
-
* risulta ancora 4 per la libreria, e 4.99.. se calcolato a mano, e
|
|
66
|
-
* ci vuole un Math.round come minimo)
|
|
67
|
-
*/
|
|
68
|
-
start: start,
|
|
69
|
-
end: end,
|
|
70
|
-
id: row.id,
|
|
71
|
-
name: row.name,
|
|
72
|
-
type: row.type,
|
|
73
|
-
valuesToShow: row.valuesToShow,
|
|
74
|
-
secondaryStart: start2,
|
|
75
|
-
secondaryEnd: end2,
|
|
76
|
-
progress: 100,
|
|
77
|
-
/** Non disabilita clic nè select, ma solo il resize/move */
|
|
78
|
-
isDisabled: false,
|
|
79
|
-
hideChildren: false,
|
|
80
|
-
icon: row.icon,
|
|
81
|
-
};
|
|
82
|
-
const children1 = ((_a = row.phases) !== null && _a !== void 0 ? _a : []).map(convertPhaseToTask);
|
|
83
|
-
return [mainTask, ...children1];
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
const row = item;
|
|
87
|
-
return [
|
|
88
|
-
Object.assign({}, convertDetailToTimeline(row, mainGanttStartDate, mainGanttEndDate)),
|
|
89
|
-
];
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
const convertPhaseToTask = (item) => {
|
|
93
|
-
const mapPhase = ({ startDate: phaseStart, endDate: phaseEnd, secondaryStartDate, secondaryEndDate, name: phaseName, id: phaseId, color, selectedColor, dependencies, icon, }) => {
|
|
94
|
-
const kupDates = new KupDates();
|
|
95
|
-
const { start, end } = kupDates.validDates(phaseStart, phaseEnd, phaseName);
|
|
96
|
-
const { start: phaseStart2, end: phaseEnd2 } = kupDates.validDates(secondaryStartDate, secondaryEndDate, phaseName);
|
|
97
|
-
return {
|
|
98
|
-
start,
|
|
99
|
-
end,
|
|
100
|
-
secondaryStart: phaseStart2,
|
|
101
|
-
secondaryEnd: phaseEnd2,
|
|
102
|
-
name: phaseName,
|
|
103
|
-
valuesToShow: item.valuesToShow,
|
|
104
|
-
id: phaseId,
|
|
105
|
-
type: 'task',
|
|
106
|
-
progress: 100,
|
|
107
|
-
dependencies,
|
|
108
|
-
/**
|
|
109
|
-
* Colori custom per specifico task - ci serve per distinguere le fasi
|
|
110
|
-
*/
|
|
111
|
-
styles: color
|
|
112
|
-
? {
|
|
113
|
-
backgroundColor: color,
|
|
114
|
-
progressColor: color,
|
|
115
|
-
backgroundSelectedColor: selectedColor,
|
|
116
|
-
progressSelectedColor: selectedColor,
|
|
117
|
-
}
|
|
118
|
-
: {},
|
|
119
|
-
icon,
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
return mapPhase(item);
|
|
123
|
-
};
|
|
124
|
-
const convertDetailToTimeline = (item, mainGanttStartDate, mainGanttEndDate) => {
|
|
125
|
-
const kupDates = new KupDates();
|
|
126
|
-
const { id, name, schedule } = item;
|
|
127
|
-
const getDatesForTask = (item) => {
|
|
128
|
-
let start = mainGanttStartDate !== null && mainGanttStartDate !== void 0 ? mainGanttStartDate : '';
|
|
129
|
-
let end = mainGanttEndDate !== null && mainGanttEndDate !== void 0 ? mainGanttEndDate : '';
|
|
130
|
-
for (let i = 0; i < item.schedule.length; i++) {
|
|
131
|
-
const lstart = item.schedule[i].startDate;
|
|
132
|
-
const lend = item.schedule[i].endDate;
|
|
133
|
-
if (!start || lstart.localeCompare(start) < 0) {
|
|
134
|
-
start = lstart;
|
|
135
|
-
}
|
|
136
|
-
if (!end || lend.localeCompare(end) > 0) {
|
|
137
|
-
end = lend;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
return kupDates.validDates(start, end, 'detail item');
|
|
141
|
-
};
|
|
142
|
-
const { start, end } = getDatesForTask(item);
|
|
143
|
-
const convertToFrame = (x) => {
|
|
144
|
-
const { startDate, endDate, color, selectedColor, icon } = x;
|
|
145
|
-
const { start, end } = kupDates.validDates(startDate, endDate, 'time frame');
|
|
146
|
-
return {
|
|
147
|
-
start,
|
|
148
|
-
end,
|
|
149
|
-
backgroundColor: color !== null && color !== void 0 ? color : '0xffffff',
|
|
150
|
-
backgroundSelectedColor: selectedColor !== null && selectedColor !== void 0 ? selectedColor : color,
|
|
151
|
-
icon,
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
const defaultColor = '#595959';
|
|
155
|
-
return {
|
|
156
|
-
id,
|
|
157
|
-
type: 'timeline',
|
|
158
|
-
timeline: schedule.map(convertToFrame),
|
|
159
|
-
name,
|
|
160
|
-
valuesToShow: item.valuesToShow,
|
|
161
|
-
start: start,
|
|
162
|
-
end: end,
|
|
163
|
-
progress: 100,
|
|
164
|
-
styles: {
|
|
165
|
-
backgroundColor: defaultColor,
|
|
166
|
-
progressColor: defaultColor,
|
|
167
|
-
backgroundSelectedColor: defaultColor,
|
|
168
|
-
progressSelectedColor: defaultColor,
|
|
169
|
-
},
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
|
-
/** Return a shallow copy, with the dates updated */
|
|
173
|
-
const withNewDates = (p, start, end) => {
|
|
174
|
-
const kupDates = new KupDates();
|
|
175
|
-
const startDate = kupDates.formatToIsoDate(start);
|
|
176
|
-
const endDate = kupDates.formatToIsoDate(end);
|
|
177
|
-
const extra = { startDate, endDate };
|
|
178
|
-
return Object.assign(Object.assign({}, p), extra);
|
|
179
|
-
};
|
|
180
|
-
/**
|
|
181
|
-
* Calculate date range valid for each Gantt
|
|
182
|
-
* @param mainGanttItems
|
|
183
|
-
* @param timeUnit
|
|
184
|
-
* @param mainGanttDoubleView
|
|
185
|
-
* @param secondaryGanttItems
|
|
186
|
-
* @param preStepsCount
|
|
187
|
-
* @returns
|
|
188
|
-
*/
|
|
189
|
-
const calculateDisplayedDateRange = (mainGanttItems, timeUnit, mainGanttDoubleView, secondaryGanttItems, preStepsCount) => {
|
|
190
|
-
const dates = ganttDateRangeFromGanttTask(mainGanttItems, timeUnit, preStepsCount !== null && preStepsCount !== void 0 ? preStepsCount : 1, mainGanttDoubleView);
|
|
191
|
-
if (secondaryGanttItems) {
|
|
192
|
-
const dates2 = ganttDateRangeFromDetail(secondaryGanttItems, timeUnit, preStepsCount !== null && preStepsCount !== void 0 ? preStepsCount : 1, mainGanttDoubleView);
|
|
193
|
-
if (dates2[0] < dates[0]) {
|
|
194
|
-
dates[0] = dates2[0];
|
|
195
|
-
}
|
|
196
|
-
if (dates2[1] > dates[1]) {
|
|
197
|
-
dates[1] = dates2[1];
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
return {
|
|
201
|
-
displayedStartDate: dates[0],
|
|
202
|
-
displayedEndDate: dates[1],
|
|
203
|
-
};
|
|
204
|
-
};
|
|
205
|
-
const ganttDateRangeFromGanttTask = (tasks, viewMode, preStepsCount, showSecondaryDates) => {
|
|
206
|
-
const dates = [];
|
|
207
|
-
const kupDates = new KupDates();
|
|
208
|
-
tasks.forEach((item) => {
|
|
209
|
-
var _a;
|
|
210
|
-
dates.push({
|
|
211
|
-
start: kupDates.parseToDayStart(item.startDate),
|
|
212
|
-
end: kupDates.parseToDayEnd(item.endDate),
|
|
213
|
-
secondaryStart: kupDates.parseToDayStart(item.secondaryStartDate),
|
|
214
|
-
secondaryEnd: kupDates.parseToDayEnd(item.secondaryEndDate),
|
|
215
|
-
});
|
|
216
|
-
(_a = item.phases) === null || _a === void 0 ? void 0 : _a.forEach((phase) => {
|
|
217
|
-
dates.push({
|
|
218
|
-
start: kupDates.parseToDayStart(phase.startDate),
|
|
219
|
-
end: kupDates.parseToDayEnd(phase.endDate),
|
|
220
|
-
secondaryStart: kupDates.parseToDayStart(phase.secondaryStartDate),
|
|
221
|
-
secondaryEnd: kupDates.parseToDayEnd(phase.secondaryEndDate),
|
|
222
|
-
});
|
|
223
|
-
});
|
|
224
|
-
});
|
|
225
|
-
return ganttDateRangeGeneric(dates, viewMode, preStepsCount, showSecondaryDates, true);
|
|
226
|
-
};
|
|
227
|
-
const ganttDateRangeGeneric = (dates, viewMode, preStepsCount, showSecondaryDates, realDates) => {
|
|
228
|
-
let newStartDate = dates.length > 0 ? dates[0].start : new Date();
|
|
229
|
-
let newEndDate = dates.length > 0 ? dates[0].end : new Date();
|
|
230
|
-
for (const d of dates) {
|
|
231
|
-
if (d.start < newStartDate) {
|
|
232
|
-
newStartDate = d.start;
|
|
233
|
-
}
|
|
234
|
-
if (d.end > newEndDate) {
|
|
235
|
-
newEndDate = d.end;
|
|
236
|
-
}
|
|
237
|
-
if (showSecondaryDates) {
|
|
238
|
-
if (d.secondaryStart && d.secondaryStart < newStartDate) {
|
|
239
|
-
newStartDate = d.secondaryStart;
|
|
240
|
-
}
|
|
241
|
-
if (d.secondaryEnd && d.secondaryEnd > newEndDate) {
|
|
242
|
-
newEndDate = d.secondaryEnd;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
if (realDates) {
|
|
247
|
-
return [newStartDate, newEndDate];
|
|
248
|
-
}
|
|
249
|
-
switch (viewMode) {
|
|
250
|
-
case 'year':
|
|
251
|
-
newStartDate = addToDate(newStartDate, -1, 'year');
|
|
252
|
-
newStartDate = startOfDate(newStartDate, 'year');
|
|
253
|
-
newEndDate = addToDate(newEndDate, 1, 'year');
|
|
254
|
-
newEndDate = startOfDate(newEndDate, 'year');
|
|
255
|
-
break;
|
|
256
|
-
case 'month':
|
|
257
|
-
newStartDate = addToDate(newStartDate, -1 * preStepsCount, 'month');
|
|
258
|
-
newStartDate = startOfDate(newStartDate, 'month');
|
|
259
|
-
newEndDate = addToDate(newEndDate, 1, 'month');
|
|
260
|
-
newEndDate = startOfDate(newEndDate, 'month');
|
|
261
|
-
break;
|
|
262
|
-
case 'week':
|
|
263
|
-
newStartDate = startOfDate(newStartDate, 'day');
|
|
264
|
-
newStartDate = addToDate(getMonday(newStartDate), -7 * preStepsCount, 'day');
|
|
265
|
-
newEndDate = startOfDate(newEndDate, 'day');
|
|
266
|
-
newEndDate = addToDate(newEndDate, 1.5, 'month');
|
|
267
|
-
break;
|
|
268
|
-
case 'day':
|
|
269
|
-
newStartDate = startOfDate(newStartDate, 'day');
|
|
270
|
-
newStartDate = addToDate(newStartDate, -1 * preStepsCount, 'day');
|
|
271
|
-
newEndDate = startOfDate(newEndDate, 'day');
|
|
272
|
-
newEndDate = addToDate(newEndDate, 19, 'day');
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
275
|
-
return [newStartDate, newEndDate];
|
|
276
|
-
};
|
|
277
|
-
const ganttDateRangeFromDetail = (details, viewMode, preStepsCount, showSecondaryDates) => {
|
|
278
|
-
const dates = [];
|
|
279
|
-
const kupDates = new KupDates();
|
|
280
|
-
details.forEach((item) => {
|
|
281
|
-
const scheduleItems = item.schedule;
|
|
282
|
-
if (scheduleItems) {
|
|
283
|
-
scheduleItems.forEach((item) => {
|
|
284
|
-
dates.push({
|
|
285
|
-
start: kupDates.parseToDayStart(item.startDate),
|
|
286
|
-
end: kupDates.parseToDayEnd(item.endDate),
|
|
287
|
-
secondaryStart: undefined,
|
|
288
|
-
secondaryEnd: undefined,
|
|
289
|
-
});
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
});
|
|
293
|
-
return ganttDateRangeGeneric(dates, viewMode, preStepsCount, showSecondaryDates, true);
|
|
294
|
-
};
|
|
295
|
-
const addToDate = (date, quantity, scale) => {
|
|
296
|
-
const newDate = new Date(date.getFullYear() + (scale === 'year' ? quantity : 0), date.getMonth() + (scale === 'month' ? quantity : 0), date.getDate() + (scale === 'day' ? quantity : 0), date.getHours() + (scale === 'hour' ? quantity : 0), date.getMinutes() + (scale === 'minute' ? quantity : 0), date.getSeconds() + (scale === 'second' ? quantity : 0), date.getMilliseconds() + (scale === 'millisecond' ? quantity : 0));
|
|
297
|
-
return newDate;
|
|
298
|
-
};
|
|
299
|
-
const startOfDate = (date, scale) => {
|
|
300
|
-
const scores = [
|
|
301
|
-
'millisecond',
|
|
302
|
-
'second',
|
|
303
|
-
'minute',
|
|
304
|
-
'hour',
|
|
305
|
-
'day',
|
|
306
|
-
'month',
|
|
307
|
-
'year',
|
|
308
|
-
];
|
|
309
|
-
const shouldReset = (_scale) => {
|
|
310
|
-
const maxScore = scores.indexOf(scale);
|
|
311
|
-
return scores.indexOf(_scale) <= maxScore;
|
|
312
|
-
};
|
|
313
|
-
const newDate = new Date(date.getFullYear(), shouldReset('year') ? 0 : date.getMonth(), shouldReset('month') ? 1 : date.getDate(), shouldReset('day') ? 0 : date.getHours(), shouldReset('hour') ? 0 : date.getMinutes(), shouldReset('minute') ? 0 : date.getSeconds(), shouldReset('second') ? 0 : date.getMilliseconds());
|
|
314
|
-
return newDate;
|
|
315
|
-
};
|
|
316
|
-
/**
|
|
317
|
-
* Returns monday of current week
|
|
318
|
-
* @param date date for modify
|
|
319
|
-
*/
|
|
320
|
-
const getMonday = (date) => {
|
|
321
|
-
const day = date.getDay();
|
|
322
|
-
const diff = date.getDate() - day + (day === 0 ? -6 : 1); // adjust when day is sunday
|
|
323
|
-
return new Date(date.setDate(diff));
|
|
324
|
-
};
|
|
325
|
-
const ganttDateRangeFromTask = (tasks, viewMode, preStepsCount, showSecondaryDates, mainGanttStartDate, mainGanttEndDate) => {
|
|
326
|
-
const dates = [];
|
|
327
|
-
tasks.forEach((item) => {
|
|
328
|
-
dates.push({
|
|
329
|
-
start: item.start,
|
|
330
|
-
end: item.end,
|
|
331
|
-
secondaryStart: item.secondaryStart,
|
|
332
|
-
secondaryEnd: item.secondaryEnd,
|
|
333
|
-
});
|
|
334
|
-
});
|
|
335
|
-
if (mainGanttStartDate && mainGanttEndDate) {
|
|
336
|
-
dates.push({
|
|
337
|
-
start: mainGanttStartDate,
|
|
338
|
-
end: mainGanttEndDate,
|
|
339
|
-
secondaryStart: undefined,
|
|
340
|
-
secondaryEnd: undefined,
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
return ganttDateRangeGeneric(dates, viewMode, preStepsCount, showSecondaryDates);
|
|
344
|
-
};
|
|
345
|
-
const seedDates = (startDate, endDate, viewMode) => {
|
|
346
|
-
let currentDate = new Date(startDate);
|
|
347
|
-
const dates = [currentDate];
|
|
348
|
-
while (currentDate < endDate) {
|
|
349
|
-
switch (viewMode) {
|
|
350
|
-
case 'year':
|
|
351
|
-
currentDate = addToDate(currentDate, 1, 'year');
|
|
352
|
-
break;
|
|
353
|
-
case 'month':
|
|
354
|
-
currentDate = addToDate(currentDate, 1, 'month');
|
|
355
|
-
break;
|
|
356
|
-
case 'week':
|
|
357
|
-
currentDate = addToDate(currentDate, 7, 'day');
|
|
358
|
-
break;
|
|
359
|
-
case 'day':
|
|
360
|
-
currentDate = addToDate(currentDate, 1, 'day');
|
|
361
|
-
break;
|
|
362
|
-
/*
|
|
363
|
-
case ViewMode.HalfDay:
|
|
364
|
-
currentDate = addToDate(currentDate, 12, "hour");
|
|
365
|
-
break;
|
|
366
|
-
case ViewMode.QuarterDay:
|
|
367
|
-
currentDate = addToDate(currentDate, 6, "hour");
|
|
368
|
-
break;
|
|
369
|
-
case ViewMode.Hour:
|
|
370
|
-
currentDate = addToDate(currentDate, 1, "hour");
|
|
371
|
-
break;
|
|
372
|
-
*/
|
|
373
|
-
}
|
|
374
|
-
dates.push(currentDate);
|
|
375
|
-
}
|
|
376
|
-
return dates;
|
|
377
|
-
};
|
|
378
|
-
|
|
379
|
-
export { addToDate as a, getPhaseById as b, getProjectById as c, calculateDisplayedDateRange as d, convertProjectToTasks as e, mergeTaskIntoPhases as f, ganttDateRangeFromTask as g, columnWidthForTimeUnit as h, mergeTaskIntoProjects as m, seedDates as s };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,f as e,d as a}from"./p-47040db6.js";import{f as n,s,g as o,b as l}from"./p-9852b1e9.js";import{r as h,s as p,c as r,a as f,b as d}from"./p-8e3b6de8.js";import{e as g}from"./p-924b841b.js";import"./p-935f58fc.js";const c=class{constructor(e){t(this,e),this.taskListTrueRef=null,this.ganttId=void 0,this.tasks=void 0,this.headerHeight=114,this.columnWidth=60,this.listCellWidth="297px",this.rowHeight=50,this.filter=void 0,this.ganttHeight=0,this.viewMode="month",this.preStepsCount=1,this.locale="en-GB",this.barFill=60,this.projectFill=80,this.timelineFill=40,this.barCornerRadius=3,this.barProgressColor="#a3a3ff",this.barProgressSelectedColor="#8282f5",this.barBackgroundColor="#b8c2cc",this.barBackgroundSelectedColor="#aeb8c2",this.projectProgressColor="#7db59a",this.projectProgressSelectedColor="#59a985",this.projectBackgroundColor="#fac465",this.projectBackgroundSelectedColor="#f7bb53",this.rtl=!1,this.handleWidth=8,this.timeStep=3e5,this.arrowColor="grey",this.fontFamily="Arial, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue",this.fontSize="14px",this.arrowIndent=20,this.todayColor="#ff0000",this.viewDate=void 0,this.TooltipContent=i("kup-standard-tooltip",null),this.TaskListHeader=i("kup-task-list-header",null),this.TaskListTable=i("kup-task-list-table",null),this.dateTimeFormatters=void 0,this.singleLineHeader=!1,this.hideLabel=!1,this.showSecondaryDates=!1,this.hideDependencies=!1,this.projection=void 0,this.displayedStartDate=void 0,this.displayedEndDate=void 0,this.initialScrollX=-1,this.initialScrollY=0,this.readOnly=void 0,this.currentTasks=[],this.label=void 0,this.doubleView=void 0,this.setDoubleView=void 0,this.barContextMenu=void 0,this.scrollXChange=void 0,this.scrollYChange=void 0,this.barClick=void 0,this.barDblClick=void 0,this.dateChange=void 0,this.select=void 0,this.handleClick=void 0,this.handleDblClick=void 0,this.handleContextMenu=void 0,this.ganttOnClick=void 0,this.ganttOnDblClick=void 0,this.ganttonOnContextMenu=void 0,this.progressChange=void 0,this.doubleClick=void 0,this.delete=void 0,this.expanderClick=void 0,this.wrapperRef=void 0,this.taskGanttRef=null,this.taskListRef=void 0,this.dateSetup=void 0,this.taskListWidth=0,this.svgContainerWidth=0,this.svgContainerHeight=this.ganttHeight,this.barTasks=[],this.ganttEvent={action:""},this.taskHeight=this.rowHeight*this.barFill/100,this.projectHeight=this.rowHeight*this.projectFill/100,this.timelineHeight=this.rowHeight*this.timelineFill/100,this.selectedTask=void 0,this.failedTask=null,this.svgWidth=void 0,this.ganttFullHeight=void 0,this.scrollX=0,this.scrollY=-1,this.ignoreScrollEvent=!1,this.currentDateIndicatorContent=void 0,this.projectionContent=void 0}componentWillLoad(){this.updateGanttData(),this.loadStates()}loadStates(){var t,i;this.scrollX=this.initialScrollX,this.scrollY=this.initialScrollY;const[e,a]=n(this.tasks,this.viewMode,this.preStepsCount,this.showSecondaryDates,this.displayedStartDate,this.displayedEndDate);this.dateSetup={viewMode:this.viewMode,dates:s(e,a,this.viewMode)},this.svgWidth=(null===(i=null===(t=this.dateSetup)||void 0===t?void 0:t.dates)||void 0===i?void 0:i.length)*this.columnWidth,this.ganttFullHeight=this.barTasks.length*this.rowHeight}componentDidRender(){this.taskGanttRef=this.rootElement.querySelector("kup-task-gantt").querySelector(".ganttVerticalContainer")}componentDidLoad(){this.updateScrollLeftAndScrollTop(),window.addEventListener("gantt-sync-scroll-event",this.onGanttSyncScrollEvent.bind(this))}async refresh(){e(this)}updateInitialScrollY(){this.scrollYChange&&this.scrollYChange(this.initialScrollY),this.scrollY=this.initialScrollY}updateInitialScrollX(){window.addEventListener("gantt-sync-scroll-event",(function(t){t.detail.id!==this.ganttId&&(this.scrollX=t.detail.scrollX,this.scrollXChange&&this.scrollXChange(t.detail.scrollX))}))}updateGanttData(){let t;t=this.expanderClick?h(this.tasks):this.tasks,t=t.sort(p);const[i,e]=n(t,this.viewMode,this.preStepsCount,this.showSecondaryDates,this.displayedStartDate,this.displayedEndDate);let a=s(i,e,this.viewMode);this.rtl&&(a=a.reverse(),-1===scrollX&&(this.scrollX=a.length*this.columnWidth));let o=!1;if(this.dateSetup&&this.dateSetup.dates){const t=this.dateSetup.dates;if(t.length!==a.length)o=!0;else for(let i=0;i<t.length;i++)if(t[i].valueOf()!==a[i].valueOf()){o=!0;break}}o&&(this.dateSetup={dates:a,viewMode:this.viewMode}),this.barTasks=r(t,a,this.columnWidth,this.rowHeight,this.taskHeight,this.projectHeight,this.timelineHeight,this.barCornerRadius,this.handleWidth,this.rtl,this.barProgressColor,this.barProgressSelectedColor,this.barBackgroundColor,this.barBackgroundSelectedColor,this.projectProgressColor,this.projectProgressSelectedColor,this.projectBackgroundColor,this.projectBackgroundSelectedColor,this.showSecondaryDates)}updateIgnoreScrollEvent(){if(this.viewMode===this.dateSetup.viewMode&&this.viewDate&&this.initialScrollX<1){const t=this.dateSetup.dates,i=t.findIndex(((i,e)=>this.viewDate.valueOf()>=i.valueOf()&&e+1!==t.length&&this.viewDate.valueOf()<t[e+1].valueOf()));if(-1===i)return;this.ignoreScrollEvent=!0,this.scrollX=this.columnWidth*i}}updateGanttEventAndBarTasks(){const{changedTask:t,action:i}=this.ganttEvent;if(t)if("delete"===i)this.ganttEvent={action:""},this.barTasks=this.barTasks.filter((i=>i.id!==t.id));else if("move"===i||"end"===i||"start"===i||"progress"===i){const i=this.barTasks.find((i=>i.id===t.id));if(i&&(i.start.getTime()!==t.start.getTime()||i.end.getTime()!==t.end.getTime()||i.progress!==t.progress)){const i=this.barTasks.map((i=>i.id===t.id?t:i));this.barTasks=i}}}updateFailedTasksAndBarChart(){this.failedTask&&(this.barTasks=this.barTasks.map((t=>t.id!==this.failedTask.id?t:this.failedTask)),this.failedTask=null)}updateTaskListWidth(){this.listCellWidth||(this.taskListWidth=0),this.taskListRef&&(this.taskListWidth=this.taskListRef.offsetWidth)}updateSvgContainerWidth(){this.wrapperRef&&(this.svgContainerWidth=this.wrapperRef.offsetWidth-this.taskListWidth)}updateSvgContainerHeight(){this.svgContainerHeight=this.ganttHeight?this.ganttHeight+this.headerHeight:this.tasks.length*this.rowHeight+this.headerHeight}handleWheel(t){if(this.wrapperRef&&"wheel"===(null==t?void 0:t.type)){if(t.shiftKey||t.deltaX){let i=this.scrollX+(t.deltaX?t.deltaX:t.deltaY);i<0?i=0:i>this.svgWidth&&(i=this.svgWidth),this.scrollX=i,window.dispatchEvent(new CustomEvent("gantt-sync-scroll-event",{detail:{componentId:this.ganttId,scrollX:i}})),t.preventDefault()}else if(this.ganttHeight){let i=this.scrollY+t.deltaY;i<0?i=0:i>Math.abs(this.ganttFullHeight-this.ganttHeight)&&(i=Math.abs(this.ganttFullHeight-this.ganttHeight)),i!==this.scrollY&&(this.scrollYChange&&this.scrollYChange(i),this.scrollY=i,t.preventDefault())}this.ignoreScrollEvent=!0}}updateCurrentDateIndicatorContent(){const t=f(this.dateSetup.dates,this.columnWidth);0!==t&&(this.currentDateIndicatorContent={color:this.todayColor,x:t})}updateProjectionContent(){if(this.projection){const{x0:t,xf:i}=d(this.projection.start,this.projection.end,this.dateSetup.dates,this.columnWidth);this.projectionContent={x0:t,xf:i,color:this.projection.color}}else this.projectionContent=void 0}updateSvgWidth(){var t,i;this.svgWidth=(null===(i=null===(t=this.dateSetup)||void 0===t?void 0:t.dates)||void 0===i?void 0:i.length)*this.columnWidth}updateGanttFullHeight(){this.ganttFullHeight=this.barTasks.length*this.rowHeight}onGanttSyncScrollEvent(t){t.detail.componentId!==this.ganttId&&(this.scrollX=t.detail.scrollX,this.scrollXChange&&this.scrollXChange(t.detail.scrollX))}updateScrollLeftAndScrollTop(){if(this.wrapperRef){const t=this.wrapperRef;t&&(-1!==this.scrollX&&setTimeout((()=>{t.scrollLeft=this.scrollX}),125),0!==this.scrollY&&setTimeout((()=>{t.scrollTop=this.scrollY}),125))}}handleScrollY(t){const i=t.currentTarget;this.scrollY!==i.scrollTop?this.ignoreScrollEvent?this.ignoreScrollEvent=!1:(this.scrollYChange&&this.scrollYChange(i.scrollTop),this.scrollY=i.scrollTop,this.ignoreScrollEvent=!0):this.ignoreScrollEvent=!1}handleScrollX(t){const i=t.currentTarget;this.scrollX===i.scrollLeft||this.ignoreScrollEvent?this.ignoreScrollEvent=!1:(this.scrollX=i.scrollLeft,this.ignoreScrollEvent=!0,window.dispatchEvent(new CustomEvent("gantt-sync-scroll-event",{detail:{componentId:this.ganttId,scrollX:i.scrollLeft}})))}handleKeyDown(t){if("INPUT"===t.target.tagName)return;t.preventDefault();let i=this.scrollY,e=this.scrollX,a=!0;switch(t.key){case"Down":case"ArrowDown":i+=this.rowHeight,a=!1;break;case"Up":case"ArrowUp":i-=this.rowHeight,a=!1;break;case"Left":case"ArrowLeft":e-=this.columnWidth;break;case"Right":case"ArrowRight":e+=this.columnWidth}a?(e<0?e=0:e>this.svgWidth&&(e=this.svgWidth),this.scrollX=e,window.dispatchEvent(new CustomEvent("gantt-sync-scroll-event",{detail:{componentId:this.ganttId,scrollX:e}}))):(i<0?i=0:i>this.ganttFullHeight-this.ganttHeight&&(i=this.ganttFullHeight-this.ganttHeight),this.scrollYChange&&this.scrollYChange(i),this.scrollY=i),this.ignoreScrollEvent=!0}handleSelectedTask(t){const i=this.barTasks.find((i=>i.id===t)),e=this.barTasks.find((t=>!!this.selectedTask&&t.id===this.selectedTask.id));this.select&&(e&&this.select(e,!1),i&&this.select(i,!0)),this.selectedTask=i}handleExpanderClick(t){this.expanderClick&&void 0!==t.hideChildren&&this.expanderClick(Object.assign(Object.assign({},t),{hideChildren:!t.hideChildren}))}setFailedTask(t){this.failedTask=t}setGanttEvent(t){this.ganttEvent=t}render(){var t,e;const a={columnWidth:this.columnWidth,svgWidth:this.svgWidth,tasks:this.tasks,rowHeight:this.rowHeight,dates:null===(t=this.dateSetup)||void 0===t?void 0:t.dates,todayColor:this.todayColor,rtl:this.rtl},n={dateSetup:this.dateSetup,locale:this.locale,viewMode:this.viewMode,headerHeight:this.headerHeight,columnWidth:this.columnWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,rtl:this.rtl,dateTimeFormatters:this.dateTimeFormatters,singleLineHeader:this.singleLineHeader,currentDateIndicator:this.currentDateIndicatorContent},s={tasks:this.barTasks,dates:null===(e=this.dateSetup)||void 0===e?void 0:e.dates,ganttEvent:this.ganttEvent,selectedTask:this.selectedTask,rowHeight:this.rowHeight,taskHeight:this.taskHeight,columnWidth:this.columnWidth,arrowColor:this.hideDependencies?"transparent":this.arrowColor,timeStep:this.timeStep,fontFamily:this.fontFamily,fontSize:this.fontSize,arrowIndent:this.arrowIndent,svgWidth:this.svgWidth,rtl:this.rtl,hideLabel:this.hideLabel,showSecondaryDates:this.showSecondaryDates,ganttHeight:this.ganttHeight,currentDateIndicator:this.currentDateIndicatorContent,projection:this.projectionContent,readOnly:this.readOnly,setGanttEvent:this.setGanttEvent.bind(this),setFailedTask:this.setFailedTask.bind(this),setSelectedTask:this.handleSelectedTask.bind(this),dateChange:this.dateChange,progressChange:this.progressChange,doubleClick:this.doubleClick,barClick:this.barClick,barDblClick:this.barDblClick,barContextMenu:this.barContextMenu,delete:this.delete},o={rowHeight:this.rowHeight,rowWidth:this.listCellWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,tasks:this.barTasks,locale:this.locale,headerHeight:this.headerHeight,scrollY:this.scrollY,ganttHeight:this.ganttHeight,filter:this.filter,horizontalContainerClass:"horizontalContainer",selectedTask:this.selectedTask,taskListRef:this.taskListRef,setSelectedTask:this.handleSelectedTask.bind(this),expanderClick:this.handleExpanderClick.bind(this),TaskListHeader:this.TaskListHeader,TaskListTable:this.TaskListTable};return i("div",{key:"f7f84291517b74796502599d7005f0902432da84",class:"gannt-wrapper-main"},i("div",{key:"bbf2af26ac05a9c67a82eddedbeb7641c9b75e04",class:"wrapper",onKeyDown:this.handleKeyDown.bind(this),tabIndex:0,ref:t=>this.wrapperRef=t},this.listCellWidth&&i("kup-task-list",Object.assign({currentTasks:this.currentTasks,handleClick:this.handleClick,handleDblClick:this.handleDblClick,handleContextMenu:this.handleContextMenu,ganttOnClick:this.ganttOnClick,ganttOnDblClick:this.ganttOnDblClick,ganttonOnContextMenu:this.ganttonOnContextMenu,label:this.label,doubleView:this.doubleView,setDoubleView:this.setDoubleView},o,{class:"tasks",ref:t=>this.taskListTrueRef=t})),i("kup-task-gantt",{key:"138391819549ea113ba52f3d218afbc74e4e92bb",gridProps:a,calendarProps:n,barProps:s,ganttHeight:this.ganttHeight,taskGanttRef:this.taskGanttRef,scrollY:this.scrollY,scrollX:this.scrollX,class:"ganttContainer"}),this.ganttEvent.changedTask&&i("kup-tooltip",{arrowIndent:this.arrowIndent,rowHeight:this.rowHeight,svgContainerHeight:this.svgContainerHeight,svgContainerWidth:this.svgContainerWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,scrollX:this.scrollX,scrollY:this.scrollY,task:this.ganttEvent.changedTask,headerHeight:this.headerHeight,taskListWidth:this.taskListWidth,TooltipContent:this.TooltipContent,rtl:this.rtl,svgWidth:this.svgWidth}),i("kup-vertical-scroll",{key:"da4e17e28991a3fbc7793c90d17d42cdb3f29383",ganttFullHeight:this.ganttFullHeight,ganttHeight:this.ganttHeight,headerHeight:this.headerHeight,scrollNumber:this.scrollY,verticalScroll:this.handleScrollY.bind(this),rtl:this.rtl})),this.taskGanttRef&&i("kup-horizontal-scroll",{svgWidth:this.svgWidth,taskListTrueRef:this.taskListTrueRef,taskListWidth:this.taskListWidth,scrollNumber:this.scrollX,rtl:this.rtl,horizontalScroll:this.handleScrollX.bind(this)}))}get rootElement(){return a(this)}static get watchers(){return{initialScrollY:["updateInitialScrollY"],scrollYChange:["updateInitialScrollY"],initialScrollX:["updateInitialScrollX","updateIgnoreScrollEvent"],scrollXChange:["updateInitialScrollX"],tasks:["updateGanttData","updateSvgContainerHeight"],viewMode:["updateGanttData","updateIgnoreScrollEvent"],preStepsCount:["updateGanttData"],rowHeight:["updateGanttData","updateSvgContainerHeight","updateGanttFullHeight"],barCornerRadius:["updateGanttData"],columnWidth:["updateGanttData","updateIgnoreScrollEvent","updateCurrentDateIndicatorContent","updateProjectionContent","updateSvgWidth"],taskHeight:["updateGanttData"],handleWidth:["updateGanttData"],barProgressColor:["updateGanttData"],barProgressSelectedColor:["updateGanttData"],barBackgroundColor:["updateGanttData"],barBackgroundSelectedColor:["updateGanttData"],projectProgressColor:["updateGanttData"],projectProgressSelectedColor:["updateGanttData"],projectBackgroundColor:["updateGanttData"],projectBackgroundSelectedColor:["updateGanttData"],milestoneBackgroundColor:["updateGanttData"],milestoneBackgroundSelectedColor:["updateGanttData"],rtl:["updateGanttData","handleWheel"],scrollX:["updateGanttData","handleWheel"],onExpanderClick:["updateGanttData"],showSecondaryDates:["updateGanttData"],projectHeight:["updateGanttData"],timelineHeight:["updateGanttData"],displayedStartDate:["updateGanttData"],displayedEndDate:["updateGanttData"],dateSetup:["updateGanttData","updateIgnoreScrollEvent","updateCurrentDateIndicatorContent","updateProjectionContent","updateSvgWidth"],viewDate:["updateIgnoreScrollEvent"],ganttEvent:["updateGanttEventAndBarTasks"],failedTask:["updateFailedTasksAndBarChart"],barTasks:["updateFailedTasksAndBarChart","updateGanttFullHeight"],taskListRef:["updateTaskListWidth"],listCellWidth:["updateTaskListWidth"],wrapperRef:["updateSvgContainerWidth","handleWheel"],ganttHeight:["updateSvgContainerHeight","handleWheel"],headerHeight:["updateSvgContainerHeight"],scrollY:["handleWheel"],svgWidth:["handleWheel"],ganttFullHeight:["handleWheel"],todayColor:["updateCurrentDateIndicatorContent"],projection:["updateProjectionContent"]}}};c.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.wrapper{display:flex;padding:0;margin:0;list-style:none;outline:none;position:relative}.ganttContainer{background:#efefef;border-radius:8px;margin:12px;overflow:hidden;padding:12px}.ganttVerticalContainer{overflow:hidden;font-size:0;margin:0;padding:0}.horizontalContainer{margin:0;padding:0;overflow:hidden}.task-gantt{overflow:hidden}.tasks{border-radius:8px;background:#efefef;margin:12px;padding:12px}";const u=class{constructor(i){t(this,i),this.scrollNumber=void 0,this.svgWidth=void 0,this.taskListTrueRef=void 0,this.rtl=void 0,this.taskListWidth=void 0,this.horizontalScroll=void 0,this.timeoutId=void 0}componentDidLoad(){this.scrollLeft()}scrollLeft(){clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>{this.setScrollLeft()}),50)}setScrollLeft(){this.rootElement&&(this.rootElement.shadowRoot.querySelector("div").scrollLeft=this.scrollNumber)}render(){var t,e;const a=null!==(e=(null===(t=this.taskListTrueRef)||void 0===t?void 0:t.getBoundingClientRect().width)+36)&&void 0!==e?e:0;return i("div",{key:"6900ce2b4ff33f7f48403c085861d25d8a55ae51",dir:"ltr",style:{margin:this.rtl?`0px ${a}px 0px 12px`:`0px 12px 0px ${a}px`},class:"scrollWrapper","data-scrollx":"true",onScroll:this.horizontalScroll},i("div",{key:"d5cd1e9ec9d4dc2a1c249eef3c485dc3eb9f82ad",style:{width:`${this.svgWidth}px`},class:"scroll"}))}get rootElement(){return a(this)}static get watchers(){return{scrollNumber:["scrollLeft"]}}};u.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.scrollWrapper{overflow:auto;max-width:100%;height:1.2rem}.scrollWrapper::-webkit-scrollbar{width:1.1rem;height:1.1rem}.scrollWrapper::-webkit-scrollbar-corner{background:transparent}.scrollWrapper::-webkit-scrollbar-thumb{border:6px solid transparent;background:rgba(0, 0, 0, 0.2);background:var(--palette-black-alpha-20, rgba(0, 0, 0, 0.2));border-radius:10px;background-clip:padding-box}.scrollWrapper::-webkit-scrollbar-thumb:hover{border:4px solid transparent;background:rgba(0, 0, 0, 0.3);background:var(--palette-black-alpha-30, rgba(0, 0, 0, 0.3));background-clip:padding-box}.scroll{height:1px}";const x=class{constructor(i){t(this,i),this.task=void 0,this.fontSize=void 0,this.fontFamily=void 0}render(){return i("div",{key:"654584ad4531cbc29fac8f6f1f8862f32127e614",class:"tooltipDefaultContainer",style:{fontSize:this.fontSize,fontFamily:this.fontFamily}},i("b",{key:"fc0104c8f5cce036410e84236b73237ca8c32e10",style:{fontSize:`${parseInt(this.fontSize)+6}px`}},`${this.task.name}: ${this.task.start.getDate()}-${this.task.start.getMonth()+1}-${this.task.start.getFullYear()} - ${this.task.end.getDate()}-${this.task.end.getMonth()+1}-${this.task.end.getFullYear()}`),this.task.end.getTime()-this.task.start.getTime()!=0&&i("p",{class:"tooltipDefaultContainerParagraph"},`Duration: ${~~((this.task.end.getTime()-this.task.start.getTime())/864e5)} day(s)`),i("p",{key:"021b32e66e1ee1254acb60d7a5c1f38f1b59ea42",class:"tooltipDefaultContainerParagraph"},!!this.task.progress&&`Progress: ${this.task.progress} %`))}};x.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.tooltipDefaultContainer{background:#fff;padding:12px;box-shadow:0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23)}.tooltipDefaultContainerParagraph{font-size:12px;margin-bottom:6px;color:#666}.tooltipDetailsContainer{position:absolute;display:flex;flex-shrink:0;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tooltipDetailsContainerHidden{visibility:hidden;position:absolute;display:flex;pointer-events:none}";const k=class{constructor(i){t(this,i),this.timeUnitChange=void 0}render(){return i("div",{key:"64c26910f550b5c74b294667e58f396f0642e601",class:"switcher"},i("button",{key:"1f110cd85b5e837aec6f5c2b69ac14b3a47d9f79",type:"button",class:"button",onClick:()=>this.timeUnitChange("day")},i("span",{key:"be249d7896fcd93905e8865309405d30dfa506bf",class:"label"},"Day")),i("button",{key:"81dfab2aebed98d32cff106577795a064c03a257",type:"button",class:"button",onClick:()=>this.timeUnitChange("week")},i("span",{key:"e5c41e5dcd9d775c6749c2907e59a7d0400e3712",class:"label"},"Week")),i("button",{key:"a598a5ab4f1496bbd267134201b21c45e5198d01",type:"button",class:"button",onClick:()=>this.timeUnitChange("month")},i("span",{key:"57769be17ca1de59a919cbb7e7ac11d0546a28fb",class:"label"},"Month")),i("button",{key:"b62c7585c44acc19863bc93898851348250ba7fa",type:"button",class:"button",onClick:()=>this.timeUnitChange("year")},i("span",{key:"9f4ab800c4eef1666ceabaebe0d35b042753430f",class:"label"},"Year")))}};k.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.switcher{display:grid;grid-auto-flow:column;grid-gap:8px;margin-left:12px;width:max-content}.button{background:transparent;border-color:var(--kup-primary-color, #003b77);border-radius:4px;border-width:1px;box-shadow:0 3px 1px -2px rgba(var(--kup-text-color-rgb, 51 51 51), 0.2), 0 2px 2px 0 rgba(var(--kup-text-color-rgb, 51 51 51), 0.14), 0 1px 5px 0 rgba(var(--kup-text-color-rgb, 51 51 51), 0.12);box-sizing:border-box;color:var(--kup-primary-color, #003b77);cursor:pointer;font-size:11px;height:32px;min-width:64px}.label{font-family:var(--kup-font-family, inherit);font-size:11px;letter-spacing:0.0892857143em;text-decoration:none;text-transform:uppercase;padding:0 6px}";const m=class{constructor(i){t(this,i),this.gridProps=void 0,this.calendarProps=void 0,this.barProps=void 0,this.taskGanttRef=void 0,this.ganttHeight=void 0,this.scrollY=void 0,this.scrollX=void 0}updateScrollX(){setTimeout((()=>{this.verticalGanttContainerRef&&(this.verticalGanttContainerRef.scrollLeft=this.scrollX)}),30)}updateScrollY(){setTimeout((()=>{this.horizontalContainerRef&&(this.horizontalContainerRef.scrollTop=this.scrollY)}),30)}componentDidLoad(){setTimeout((()=>{this.updateScrollX(),this.updateScrollY()}),75)}render(){const t=Object.assign(Object.assign({},this.barProps),{gridProps:this.gridProps});return i("div",{key:"d9a4cf68f10e8263f73123022b4e545f6a028580",class:"ganttVerticalContainer",ref:t=>this.verticalGanttContainerRef=t,dir:"ltr"},i("kup-gantt-calendar",{key:"2ad5614e2df01e5f3cc21b9940c14ba7dd5a785d",dateSetup:this.calendarProps.dateSetup,locale:this.calendarProps.locale,rtl:this.calendarProps.rtl,headerHeight:this.calendarProps.headerHeight,columnWidth:this.calendarProps.columnWidth,fontFamily:this.calendarProps.fontFamily,fontSize:this.calendarProps.fontSize,dateTimeFormatters:this.calendarProps.dateTimeFormatters,singleLineHeader:this.calendarProps.singleLineHeader,currentDateIndicator:this.calendarProps.currentDateIndicator,svgWidth:this.gridProps.svgWidth}),i("div",{key:"8c0e76cb967f172406f352c6568582fdc4008d38",ref:t=>this.horizontalContainerRef=t,class:"horizontalContainer",style:this.ganttHeight?{height:`${this.ganttHeight}px`,width:`${this.gridProps.svgWidth}px`}:{width:`${this.gridProps.svgWidth}px`}},i("kup-grid-renderer",Object.assign({key:"69040247d6fde1ddb12f3b2ce54e02bc7781e569"},t))))}get rootElement(){return a(this)}static get watchers(){return{scrollX:["updateScrollX"],verticalGanttContainerRef:["updateScrollX"],scrollY:["updateScrollY"],horizontalContainerRef:["updateScrollY"]}}},y=class{constructor(i){t(this,i),this.headerHeight=void 0,this.fontFamily=void 0,this.fontSize=void 0,this.rowWidth=void 0,this.rowHeight=void 0,this.scrollY=void 0,this.locale=void 0,this.tasks=void 0,this.selectedTask=void 0,this.horizontalContainerClass=void 0,this.ganttHeight=void 0,this.filter=void 0,this.TaskListHeader=void 0,this.TaskListTable=void 0,this.currentTasks=void 0,this.label=void 0,this.doubleView=void 0,this.setDoubleView=void 0,this.handleClick=void 0,this.handleDblClick=void 0,this.handleContextMenu=void 0,this.ganttOnClick=void 0,this.ganttOnDblClick=void 0,this.ganttonOnContextMenu=void 0,this.setSelectedTask=void 0,this.expanderClick=void 0,this.selectedTaskId=""}componentDidLoad(){this.taskListRef.prepend(this.filter),setTimeout((()=>{this.horizontalContainerRef&&(this.horizontalContainerRef.scrollTop=this.scrollY)}),75)}componentDidUpdate(){this.taskListRef&&(this.taskListRef.scrollTop=this.scrollY)}updateScrollY(){this.horizontalContainerRef&&(this.horizontalContainerRef.scrollTop=this.scrollY)}render(){var t;const e={headerHeight:this.headerHeight,fontFamily:this.fontFamily,fontSize:this.fontSize,rowWidth:this.rowWidth};this.selectedTask&&(this.selectedTaskId=this.selectedTask.id);const a={rowHeight:this.rowHeight,rowWidth:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,tasks:this.tasks,locale:this.locale,selectedTaskId:this.selectedTaskId,setSelectedTask:this.setSelectedTask.bind(this),onExpanderClick:this.expanderClick},n=this.TaskListHeader;n&&n.t&&Object.assign(n.t,Object.assign({},e));const s=this.TaskListTable;return s&&s.t&&Object.assign(s.t,Object.assign({},a)),i("div",{key:"7dd68dd1a7d21ae60df1565041e4c40c4e809190",ref:t=>this.taskListRef=t},n&&n.t?n:i("kup-custom-task-list-header",Object.assign({label:this.label,doubleView:null!==(t=this.doubleView)&&void 0!==t&&t,setDoubleView:this.setDoubleView},e)),i("div",{key:"7a956f23ef07603f31a331d229f1bb1d04e98773",class:this.horizontalContainerClass,style:this.ganttHeight?{height:this.ganttHeight+"px"}:{},ref:t=>this.horizontalContainerRef=t},s&&s.t?s:i("kup-custom-task-list-table",Object.assign({},a,{onclickTaskList:t=>{let i=l(t,this.currentTasks);i||(i=o(t,this.currentTasks)),i&&this.handleClick(i,this.ganttOnClick)},ondblclickTaskList:t=>{let i=l(t,this.currentTasks);i||(i=o(t,this.currentTasks)),i&&this.handleDblClick(i,this.ganttOnDblClick)},oncontextmenuTaskList:(t,i)=>{let e=l(i,this.currentTasks);e||(e=o(i,this.currentTasks)),e&&this.handleContextMenu(t,e,this.ganttonOnContextMenu)},ganttId:g}))))}get element(){return a(this)}static get watchers(){return{scrollY:["updateScrollY"]}}};y.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.tasks{border-radius:8px;background:#efefef;margin:12px;padding:12px}.taskListWrapper{display:table;border-bottom:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}.taskListTableRow{display:table-row;text-overflow:ellipsis}.taskListCell{display:table-cell;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.taskListNameWrapper{display:flex}.taskListExpander{color:rgb(86, 86, 86);font-size:0.6rem;padding:0.15rem 0.2rem 0 0.2rem;user-select:none;cursor:pointer}.taskListEmptyExpander{font-size:0.6rem;padding-left:1rem;user-select:none}.ganttTable{display:table;border-bottom:#e6e4e4 1px solid;border-top:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}.ganttTable_Header{display:table-row;list-style:none}.ganttTable_HeaderSeparator{border-right:1px solid rgb(196, 196, 196);opacity:1;margin-left:-2px}.ganttTable_HeaderItem{display:table-cell;vertical-align:-webkit-baseline-middle;vertical-align:middle}";const v=class{constructor(i){t(this,i),this.headerHeight=void 0,this.fontFamily=void 0,this.fontSize=void 0,this.rowWidth=void 0}render(){return i("div",{key:"85c164a7a4313c8708ce2774338ff123621e7648",class:"ganttTable",style:{fontFamily:this.fontFamily,fontSize:this.fontSize}},i("div",{key:"46aad2a15e9f7d6fe8e7b705b5cc4f385ebf2d69",class:"ganttTable_Header",style:{height:this.headerHeight-2+"px"}},i("div",{key:"fafa8c4eb47c740fff23eb204a75b872d39876e2",class:"ganttTable_HeaderItem",style:{minWidth:this.rowWidth}}," Name"),i("div",{key:"1ebbcca3ce32701a8af4140fb638173de9795995",class:"ganttTable_HeaderSeparator",style:{height:.5*this.headerHeight+"px",marginTop:.2*this.headerHeight+"px"}}),i("div",{key:"b08345a4be12e76a9d634508e32e035a3c570dfb",class:"ganttTable_HeaderItem",style:{minWidth:this.rowWidth}}," From"),i("div",{key:"3f035b39c2c66677e78c2786cea4a39c824bb60b",class:"ganttTable_HeaderSeparator",style:{height:.5*this.headerHeight+"px",marginTop:.25*this.headerHeight+"px"}}),i("div",{key:"01effc62e0e2ddf73ab5cf4cbad5873f70d510c6",class:"ganttTable_HeaderItem",style:{minWidth:this.rowWidth}}," To")))}};v.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.tasks{border-radius:8px;background:#efefef;margin:12px;padding:12px}.taskListWrapper{display:table;border-bottom:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}.taskListTableRow{display:table-row;text-overflow:ellipsis}.taskListCell{display:table-cell;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.taskListNameWrapper{display:flex}.taskListExpander{color:rgb(86, 86, 86);font-size:0.6rem;padding:0.15rem 0.2rem 0 0.2rem;user-select:none;cursor:pointer}.taskListEmptyExpander{font-size:0.6rem;padding-left:1rem;user-select:none}.ganttTable{display:table;border-bottom:#e6e4e4 1px solid;border-top:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}.ganttTable_Header{display:table-row;list-style:none}.ganttTable_HeaderSeparator{border-right:1px solid rgb(196, 196, 196);opacity:1;margin-left:-2px}.ganttTable_HeaderItem{display:table-cell;vertical-align:-webkit-baseline-middle;vertical-align:middle}";const b=class{constructor(i){t(this,i),this.dateTimeOptions={weekday:"short",year:"numeric",month:"long",day:"numeric"},this.rowHeight=void 0,this.rowWidth=void 0,this.fontFamily=void 0,this.fontSize=void 0,this.locale=void 0,this.tasks=void 0,this.selectedTaskId=void 0,this.expandedTasks=new Set,this.setSelectedTask=void 0,this.expanderClick=void 0}toLocaleDateString(t){return t.toLocaleDateString(this.locale,this.dateTimeOptions)}render(){return i("div",{key:"a488bee5b9421a1f1f63911ac1ad6702d2f08d65",class:"taskListWrapper",style:{fontFamily:this.fontFamily,fontSize:this.fontSize}},this.tasks.map((t=>i("div",{class:{taskListTableRow:!0,expanded:this.expandedTasks.has(t.id)},style:{height:`${this.rowHeight}px`},key:`${t.id}row`},i("div",{class:"taskListCell",style:{minWidth:this.rowWidth,maxWidth:this.rowWidth},title:t.name},i("div",{class:"taskListNameWrapper"},i("div",{class:{taskListExpander:!0,expanded:this.expandedTasks.has(t.id)},onClick:()=>this.expanderClick(t)},this.expandedTasks.has(t.id)?"▼":"▶"),i("div",null,t.name))),i("div",{class:"taskListCell",style:{minWidth:this.rowWidth,maxWidth:this.rowWidth}}," ",this.toLocaleDateString(t.start)),i("div",{class:"taskListCell",style:{minWidth:this.rowWidth,maxWidth:this.rowWidth}}," ",this.toLocaleDateString(t.end))))))}};b.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.tasks{border-radius:8px;background:#efefef;margin:12px;padding:12px}.taskListWrapper{display:table;border-bottom:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}.taskListTableRow{display:table-row;text-overflow:ellipsis}.taskListCell{display:table-cell;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.taskListNameWrapper{display:flex}.taskListExpander{color:rgb(86, 86, 86);font-size:0.6rem;padding:0.15rem 0.2rem 0 0.2rem;user-select:none;cursor:pointer}.taskListEmptyExpander{font-size:0.6rem;padding-left:1rem;user-select:none}.ganttTable{display:table;border-bottom:#e6e4e4 1px solid;border-top:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}.ganttTable_Header{display:table-row;list-style:none}.ganttTable_HeaderSeparator{border-right:1px solid rgb(196, 196, 196);opacity:1;margin-left:-2px}.ganttTable_HeaderItem{display:table-cell;vertical-align:-webkit-baseline-middle;vertical-align:middle}";const w=class{constructor(i){t(this,i),this.task=void 0,this.rowHeight=void 0,this.rtl=void 0,this.svgContainerHeight=void 0,this.svgContainerWidth=void 0,this.scrollX=void 0,this.scrollY=void 0,this.arrowIndent=void 0,this.fontSize=void 0,this.fontFamily=void 0,this.headerHeight=void 0,this.taskListWidth=void 0,this.TooltipContent=void 0,this.svgWidth=void 0,this.relatedY=0,this.relatedX=0}componentWillLoad(){this.calculateTooltipPosition()}calculateTooltipPosition(){if(this.rootElement){const t=1.1*this.rootElement.offsetHeight,i=1.1*this.rootElement.offsetWidth;let e,a=this.task.index*this.rowHeight-this.scrollY+this.headerHeight;this.rtl?(e=this.task.x1-1.5*this.arrowIndent-i-this.scrollX,e<0&&(e=this.task.x2+1.5*this.arrowIndent-this.scrollX),i+e>this.svgContainerWidth&&(e=this.svgContainerWidth-i,a+=this.rowHeight)):(e=this.task.x2+1.5*this.arrowIndent+this.taskListWidth-this.scrollX,i+e>this.taskListWidth+this.svgContainerWidth&&(e=this.task.x1+this.taskListWidth-1.5*this.arrowIndent-this.scrollX-i),e<this.taskListWidth&&(e=this.svgContainerWidth+this.taskListWidth-i,a+=this.rowHeight)),t+a-this.scrollY>this.svgContainerHeight-this.scrollY&&(a=this.svgContainerHeight-t),this.relatedY=a,this.relatedX=e}}render(){return i("div",{key:"6e6cc9d062e2910930ea039bd62c7d7c6cbfca30",class:this.relatedX?"tooltipDetailsContainer":"tooltipDetailsContainerHidden",style:{left:`${this.relatedX}px`,top:`${this.relatedY}px`}},i(this.TooltipContent,{key:"08262258302d58b11d3c832194adfcdecf262bc2",task:this.task,fontSize:this.fontSize,fontFamily:this.fontFamily}))}get rootElement(){return a(this)}static get watchers(){return{task:["calculateTooltipPosition"],arrowIndent:["calculateTooltipPosition"],scrollX:["calculateTooltipPosition"],scrollY:["calculateTooltipPosition"],headerHeight:["calculateTooltipPosition"],taskListWidth:["calculateTooltipPosition"],rowHeight:["calculateTooltipPosition"],svgContainerHeight:["calculateTooltipPosition"],svgContainerWidth:["calculateTooltipPosition"],rtl:["calculateTooltipPosition"]}}};w.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.tooltipDefaultContainer{background:#fff;padding:12px;box-shadow:0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23)}.tooltipDefaultContainerParagraph{font-size:12px;margin-bottom:6px;color:#666}.tooltipDetailsContainer{position:absolute;display:flex;flex-shrink:0;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tooltipDetailsContainerHidden{visibility:hidden;position:absolute;display:flex;pointer-events:none}";const z=class{constructor(i){t(this,i),this.scrollNumber=void 0,this.ganttHeight=void 0,this.ganttFullHeight=void 0,this.headerHeight=void 0,this.rtl=void 0,this.verticalScroll=void 0}componentDidLoad(){setTimeout((()=>{this.updateScroll()}),50)}updateScroll(){let t;if(this.scrollRef){const i=this.scrollRef;t=setTimeout((()=>{i.scrollTop=this.scrollNumber}),50)}return()=>{clearTimeout(t)}}render(){return i("div",{key:"80335159040a9c60dc8213840c3b2d684636585d",style:{height:`${this.ganttHeight}px`,marginTop:`${this.headerHeight}px`,marginLeft:this.rtl?"":"-1rem"},class:"scroll",onScroll:this.verticalScroll,ref:t=>this.scrollRef=t},i("div",{key:"2ad01e01bb31d6885cf87bda7e1448f70b182435",style:{height:`${this.ganttFullHeight}px`,width:"1px"}}))}get rootElement(){return a(this)}static get watchers(){return{scrollNumber:["updateScroll"]}}};z.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.scroll{overflow:hidden auto;width:1rem;flex-shrink:0}.scroll::-webkit-scrollbar{width:1.1rem;height:1.1rem}.scroll::-webkit-scrollbar-corner{background:transparent}.scroll::-webkit-scrollbar-thumb{border:6px solid transparent;background:rgba(0, 0, 0, 0.2);background:var(--palette-black-alpha-20, rgba(0, 0, 0, 0.2));border-radius:10px;background-clip:padding-box}.scroll::-webkit-scrollbar-thumb:hover{border:4px solid transparent;background:rgba(0, 0, 0, 0.3);background:var(--palette-black-alpha-30, rgba(0, 0, 0, 0.3));background-clip:padding-box}";export{c as kup_gantt,u as kup_horizontal_scroll,x as kup_standard_tooltip,k as kup_switcher,m as kup_task_gantt,y as kup_task_list,v as kup_task_list_header,b as kup_task_list_table,w as kup_tooltip,z as kup_vertical_scroll}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t,r as i,d as s}from"./p-47040db6.js";import{c as e,a as h,g as l,m as a,b as n,d as o,e as d}from"./p-9852b1e9.js";import{e as r,f as c}from"./p-924b841b.js";import{b as v}from"./p-935f58fc.js";import{g as u}from"./p-e841c2ae.js";const D=()=>()=>t("div",null),p=class{constructor(t){i(this,t),this.locale="it-IT",this.props=void 0,this.timeUnit=void 0,this.currentTasks=[],this.currentDetails=[],this.scrollX=-1,this.mainGanttDoubleView=!1,this.displayedDates={displayedStartDate:new Date,displayedEndDate:new Date},this.viewDate=void 0,this.projection=void 0,this.tasks=[],this.details=[]}mainGanttChangeHandler(){var t;this.currentTasks=this.props.mainGantt.items,this.currentDetails=null===(t=this.props.secondaryGantt)||void 0===t?void 0:t.items,this.projection=void 0,this.updateTasks()}updateDisplayedDates(){const t=e(this.currentTasks,this.timeUnit,this.mainGanttDoubleView,this.currentDetails,this.props.preStepsCount);if(!this.viewDate){const i=new Date;this.viewDate=t.displayedStartDate<=i&&t.displayedEndDate>=i?i:t.displayedStartDate}}updateTasks(){var t,i;const s=new v;this.tasks=[];for(let i=0;i<(null===(t=this.currentTasks)||void 0===t?void 0:t.length);i++)this.tasks.push(...h(this.currentTasks[i],s.formatToIsoDate(this.displayedDates.displayedStartDate),s.formatToIsoDate(this.displayedDates.displayedEndDate)));this.details=[];for(let t=0;t<(null===(i=this.currentDetails)||void 0===i?void 0:i.length);t++)this.details.push(...h(this.currentDetails[t],s.formatToIsoDate(this.displayedDates.displayedStartDate),s.formatToIsoDate(this.displayedDates.displayedEndDate)))}componentWillLoad(){var t,i,s,h,l,a,n,o,d,r;this.timeUnit=null===(t=this.props)||void 0===t?void 0:t.viewMode,this.currentTasks=(null===(i=this.props)||void 0===i?void 0:i.mainGantt.items)||[],this.currentDetails=null===(h=null===(s=this.props)||void 0===s?void 0:s.secondaryGantt)||void 0===h?void 0:h.items,this.scrollX=(null===(a=null===(l=this.props)||void 0===l?void 0:l.mainGantt)||void 0===a?void 0:a.initialScrollX)||-1,this.mainGanttDoubleView=null!==(d=null===(o=null===(n=this.props)||void 0===n?void 0:n.mainGantt)||void 0===o?void 0:o.showSecondaryDates)&&void 0!==d&&d,this.displayedDates=e(this.currentTasks,this.timeUnit,this.mainGanttDoubleView,this.currentDetails,null===(r=this.props)||void 0===r?void 0:r.preStepsCount),this.viewDate=void 0,this.projection=void 0,this.updateTasks()}async refresh(){var t;this.displayedDates=e(this.currentTasks,this.timeUnit,this.mainGanttDoubleView,this.currentDetails,null===(t=this.props)||void 0===t?void 0:t.preStepsCount)}handleClick(t,i){if(t){if("task"===t.type&&this.props.secondaryGantt){const i=t;this.projection={start:new Date(i.startDate),end:new Date(i.endDate),color:i.color||"#ED7D31"}}else this.projection=void 0;null==i||i(t)}}handleDblClick(t,i){t&&(null==i||i(t))}handleContextMenu(t,i,s){if(i){if("task"===i.type&&this.props.secondaryGantt){const t=i;this.projection={start:new Date(t.startDate),end:new Date(t.endDate),color:t.color||"#ED7D31"}}else this.projection=void 0;null==s||s(t,i)}}handleSetDoubleView(t){var i,s;this.mainGanttDoubleView=t,null===(s=null===(i=this.props)||void 0===i?void 0:i.onSetDoubleView)||void 0===s||s.call(i,t)}handleDateChange(t,i,s){var e;const h=null==t?void 0:t.id;if(!h)return;let d=n(h,i);if(d||(d=l(h,i)),d)if("timeline"!==d.type){if("project"===d.type){const s=a(i,t);d=n(d.id,s),this.viewDate=t.start,this.currentTasks=s}else if("task"===d.type){const s=i.find((t=>{var i;return null===(i=t.phases)||void 0===i?void 0:i.some((t=>(null==t?void 0:t.id)===h))}));if(s){const h=o(s.phases,t),a=i.map((t=>t.id===s.id?Object.assign(Object.assign({},t),{phases:h}):t));d=l(d.id,a),this.props.secondaryGantt&&d&&(this.projection={start:new Date(d.startDate),end:new Date(d.endDate),color:null!==(e=d.color)&&void 0!==e?e:"#ED7D31"}),this.viewDate=t.start,this.currentTasks=a}}null==s||s(d),setTimeout(this.getScrollX,500)}else console.log("onDateChange for timeline not managed yet",h,d.type)}getScrollX(){var t,i,s;if(this.rootElement){const e=null===(t=this.rootElement.querySelector('[data-scrollx="true"]'))||void 0===t?void 0:t.scrollLeft;void 0!==e&&(null===(s=(i=this.props).onScrollX)||void 0===s||s.call(i,e))}}render(){var i,s,e;return t("div",{key:"819b9d89b953274cacccee9bf2022575743e0d27",class:"planner-render"},t("kup-switcher",{key:"eebcce029f98a9f08cab9c96be0bad01999b7f95",timeUnitChange:t=>{var i,s;null===(s=(i=this.props).onSetViewMode)||void 0===s||s.call(i,t),this.timeUnit=t,this.viewDate=void 0,this.scrollX=-1}}),this.props&&t("div",{style:{display:"flex",flexDirection:"column"}},t("kup-gantt",Object.assign({ref:t=>this.mainGantt=t,ganttId:r,key:r,filter:this.props.mainGantt.filter,hideLabel:this.props.mainGantt.hideLabel,showSecondaryDates:this.mainGanttDoubleView,hideDependencies:this.props.mainGantt.hideDependencies,ganttHeight:this.props.mainGantt.ganttHeight,displayedStartDate:this.displayedDates.displayedStartDate,displayedEndDate:this.displayedDates.displayedEndDate,viewDate:this.viewDate,tasks:this.tasks,columnWidth:d(this.timeUnit),viewMode:this.timeUnit},this.props.mainGantt.stylingOptions,{TaskListHeader:this.props.mainGantt.taskListHeaderProject,TaskListTable:this.props.mainGantt.taskListTableProject,TooltipContent:null!==(i=this.props.mainGantt.tooltipContent)&&void 0!==i?i:D(),barClick:t=>{let i=n(t.id,this.currentTasks);i||(i=l(t.id,this.currentTasks)),i&&this.handleClick(i,this.props.mainGantt.onClick)},barDblClick:t=>{let i=n(t.id,this.currentTasks);i||(i=l(t.id,this.currentTasks)),i&&this.handleDblClick(i,this.props.mainGantt.onDblClick)},barContextMenu:(t,i)=>{let s=n(i.id,this.currentTasks);s||(s=l(i.id,this.currentTasks)),s&&this.handleContextMenu(t,s,this.props.mainGantt.onContextMenu)},dateChange:t=>this.handleDateChange(t,this.currentTasks,this.props.mainGantt.onDateChange),locale:this.locale,dateTimeFormatters:u,initialScrollX:this.scrollX,initialScrollY:this.props.mainGantt.initialScrollY,readOnly:this.props.mainGantt.readOnly,scrollXChange:this.props.onScrollX,scrollYChange:this.props.mainGantt.onScrollY,currentTasks:this.currentTasks,handleClick:this.handleClick.bind(this),handleDblClick:this.handleDblClick.bind(this),handleContextMenu:this.handleContextMenu.bind(this),ganttOnClick:this.props.mainGantt.onClick,ganttOnDblClick:this.props.mainGantt.onDblClick,ganttonOnContextMenu:this.props.mainGantt.onContextMenu,label:this.props.mainGantt.title,doubleView:null!==(s=this.mainGanttDoubleView)&&void 0!==s&&s,setDoubleView:this.handleSetDoubleView.bind(this)})),this.props.secondaryGantt&&t("kup-gantt",Object.assign({ref:t=>this.secondaryGantt=t,ganttId:c,key:c,filter:this.props.secondaryGantt.filter,hideLabel:this.props.secondaryGantt.hideLabel,showSecondaryDates:this.mainGanttDoubleView,hideDependencies:this.props.secondaryGantt.hideDependencies,ganttHeight:this.props.secondaryGantt.ganttHeight,displayedStartDate:this.displayedDates.displayedStartDate,displayedEndDate:this.displayedDates.displayedEndDate,viewDate:this.viewDate,tasks:this.details,columnWidth:d(this.timeUnit),viewMode:this.timeUnit},this.props.secondaryGantt.stylingOptions,{TaskListHeader:this.props.secondaryGantt.taskListHeaderProject,TaskListTable:this.props.secondaryGantt.taskListTableProject,TooltipContent:null!==(e=this.props.secondaryGantt.tooltipContent)&&void 0!==e?e:D(),projection:this.projection,barClick:t=>{if(this.props.secondaryGantt){let i=n(t.id,this.currentDetails);i&&this.handleClick(i,this.props.secondaryGantt.onClick)}},barDblClick:t=>{if(this.props.secondaryGantt){let i=n(t.id,this.currentDetails);i&&this.handleDblClick(i,this.props.secondaryGantt.onDblClick)}},barContextMenu:(t,i)=>{if(this.props.secondaryGantt){let s=n(i.id,this.currentDetails);s&&this.handleContextMenu(t,s,this.props.secondaryGantt.onContextMenu)}},dateChange:t=>this.handleDateChange(t,this.currentTasks,this.props.secondaryGantt.onDateChange),locale:this.locale,dateTimeFormatters:u,initialScrollX:this.scrollX,initialScrollY:this.props.secondaryGantt.initialScrollY,readOnly:this.props.secondaryGantt.readOnly,scrollXChange:this.props.onScrollX,scrollYChange:this.props.secondaryGantt.onScrollY,currentTasks:this.currentTasks,handleClick:this.handleClick.bind(this),handleDblClick:this.handleDblClick.bind(this),handleContextMenu:this.handleContextMenu.bind(this),ganttOnClick:this.props.secondaryGantt.onClick,ganttOnDblClick:this.props.secondaryGantt.onDblClick,ganttonOnContextMenu:this.props.secondaryGantt.onContextMenu,label:this.props.secondaryGantt.title}))))}get rootElement(){return s(this)}static get watchers(){return{props:["mainGanttChangeHandler"],timeUnit:["updateDisplayedDates"],mainGanttDoubleView:["updateDisplayedDates"],"props.preStepsCount":["updateDisplayedDates"],viewDate:["updateDisplayedDates"],currentTasks:["updateTasks"],currentDetails:["updateTasks"]}}};export{p as kup_planner_renderer}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a6 as e,a7 as s,c,a3 as t,a8 as a,F as n,a9 as i,aa as l,ab as o,ac as r,ad as u}from"./p-9a856951.js";import{h as p,g as d}from"./p-47040db6.js";import{F as k}from"./p-e2bf2bb6.js";import{F as b}from"./p-a5074ce4.js";import{F as h}from"./p-d50515f7.js";import{F as f,a as m}from"./p-ba0f28b7.js";import{F as g}from"./p-590c34bc.js";var v,w,y;!function(e){e.customStyle="Custom style of the component.",e.data="The data of the list.",e.displayMode="Selects how the items must display their label and how they can be filtered for.",e.filter="Keeps string for filtering elements when filter mode is active",e.hideText="Hides rows' text, ideally to display a list of icons only.",e.isMenu="Defines whether the list is a menu or not.",e.keyboardNavigation="When true, enables items' navigation through arrow keys.",e.menuVisible="Sets the status of the menu, when false it's hidden otherwise it's visible.",e.roleType="Defines the type of selection. Values accepted: listbox, radiogroup or group.",e.selectable="Defines whether items are selectable or not.",e.showIcons="Displays the icons associated to each row when set to true.",e.twoLine="The list elements descriptions will be arranged in two lines."}(v||(v={})),function(e){e.LISTBOX="listbox",e.RADIOGROUP="radiogroup",e.GROUP="group"}(w||(w={})),function(e){e.CODE="code",e.DESCRIPTION="description",e.DESCRIPTION_AND_CODE="both"}(y||(y={}));const j=e=>p("div",Object.assign({class:`f-switch ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),p("div",{class:"form-field "+(e.leadingLabel?"form-field--align-end":"")},p("div",{class:`switch ${e.checked?"switch--checked":""} ${e.disabled?"switch--disabled":""}`},p("div",{class:"switch__track"}),p("div",{class:"switch__thumb-underlay"},p("div",{class:"switch__thumb"},p("input",{type:"checkbox",class:"switch__native-control",role:"switch",checked:e.checked,disabled:e.disabled,value:e.checked?"on":"off",onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus})))),p("label",{onClick:e.onChange},e.label))),$=e=>{e.centeredLabel||0==!e.centeredLabel||(e.centeredLabel=!0);let s,c=`f-progress-bar ${e.danger?"kup-danger":""} ${e.animated?"kup-animated":""} ${e.padded?"kup-padded":""} ${e.info?"kup-info":""} ${e.slim?"kup-slim":""} ${e.striped?"kup-striped":""} ${e.secondary?"kup-secondary":""} ${e.slim?"kup-slim":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`,t="pie";c+=e.isRadial?" pie-wrapper is-radial":" progress-bar";const a={width:`${e.value}%`};e.centeredLabel?e.value>49&&(c+=" text-color-on-primary"):(s=a,e.value>2&&(c+=" text-color-on-primary"));let n=null;return e.icon?n=function(e){if(e.icon){if(e.icon.indexOf(".")>-1||e.icon.indexOf("/")>-1||e.icon.indexOf("\\")>-1)return p("span",{class:"label kup-icon is-image"},p("img",{src:e.icon}));{let s=`url('${d(`./assets/svg/${e.icon}.svg`)}') no-repeat center`;return p("span",{style:{mask:s,webkitMask:s},class:"label kup-icon"})}}}(e):e.hideLabel||(n=e.isRadial?e.label?p("span",{class:"label"},e.label):p("span",{class:"label"},e.value,p("span",{class:"smaller"},"%")):e.label?e.label:e.value+"%"),e.value>0&&(t+=" has-value",t+=e.value>50?" is-more-than-half":" is-less-than-half"),e.isRadial?p("div",{class:c},n,p("div",{class:t},p("div",{style:undefined,class:"left-side half-circle"}),p("div",{class:"right-side half-circle"})),p("div",{class:"shadow"})):p("div",{class:c},p("div",{class:"progress-bar-percentage",style:a},p("span",{style:s},n)))},x=e=>{var s;const c=!!e.columns,t=[];for(let c=0;c<(null===(s=e.data)||void 0===s?void 0:s.length);c++){const s=e.data[c];t.push(p("div",{class:"form-field "+(e.leadingLabel?" form-field--align-end":"")},p("div",{class:{radio:!0,"radio--checked":!!s.checked,"radio--disabled":!!e.disabled}},p("input",{class:"radio__native-control",type:"radio",name:"radio-element",value:s.value,checked:s.checked,disabled:e.disabled,onBlur:e.onBlur,onChange:e.onChange?e.onChange.bind(e.onChange,c):null,onFocus:e.onFocus}),p("div",{class:"radio__background"},p("div",{class:"radio__outer-circle"}),p("div",{class:"radio__inner-circle"}))),p("label",{htmlFor:"radio-element",onClick:e.onChange?e.onChange.bind(e.onChange,c):null},s.label?s.label:"")))}return p("div",{class:`f-radio radio-wrapper ${c?"radio-wrapper-grid":""} ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`,style:{"--kup_radio_columns":c?`repeat(${e.columns}, 1fr)`:""}},t)},O=e=>(e.maxValue||(e.maxValue=5),p("div",{class:`f-rating ${e.disabled?"disabled":""} ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},function(e){const s=[];for(let c=1;c<=e.maxValue;c++)s.push(p("span",{class:"rating",onClick:e.onClick?e.onClick.bind(e.onClick,c):null},c<=e.value?"★":"☆"));return s}(e))),_=document.documentElement;let C=0,I=0;const F=(i,o)=>{const d=i.cell,v=i.column,w=i.row,F=i.shape?i.shape:d.shape?d.shape:v.shape?v.shape:null,D=!_.ketchup.objects.isEmptyKupObj(d.obj),K=!(!d.isEditable&&!v.isEditable||!i.editable),V=i.previousValue!==d.value?d.value:"",H=_.ketchup.data.cell.getType(d,F),X=Object.assign({},d.data);let E=d.cssClass?d.cssClass:v.cssClass?v.cssClass:"";i.component.legacyLook&&(E+=" monospace c-pre");const S={"f-cell":!0,[l.OBJ]:!!D,[H+"-cell"]:!0,[i.wrapperClass]:!!i.wrapperClass,[i.density]:!(!i.density||H===t.BAR),[E]:!!E};let W=V;K&&e.includes(H)?W=function(e,s,c,a,i){var o,r;switch(e){case t.AUTOCOMPLETE:return p("kup-autocomplete",Object.assign({key:a.name+i.row.id,initialValue:c.value},c.data,{class:T(i)?"kup-full-width":"","onkup-autocomplete-change":s=>z(s,i,e,u.UPDATE),"onkup-autocomplete-input":s=>z(s,i,e,u.INPUT),"onkup-autocomplete-iconclick":s=>z(s,i,e,u.ICON_CLICK)}));case t.CHECKBOX:return M(i)&&(s[l.C_CENTERED]=!0),c.shape===n.INPUT_CHECKBOX?p("input",{checked:"on"===c.value||"1"===c.value,class:"input-checkbox",onChange:s=>z(s,i,e,u.UPDATE),type:"checkbox"}):p(k,Object.assign({},c.data,{onChange:s=>z(s,i,e,u.UPDATE)}));case t.CHIP:return p("kup-chip",Object.assign({},c.data,{type:f.INPUT,enableInput:!0,"onKup-chip-change":s=>z(s,i,e,u.UPDATE)}),p("kup-text-field",Object.assign({fullWidth:!0,slot:"field"},c.slotData)));case t.COLOR_PICKER:return p("kup-color-picker",Object.assign({key:a.name+i.row.id,initialValue:c.value},c.data,{class:T(i)?"kup-full-width":"",disabled:!1,"onkup-colorpicker-change":s=>z(s,i,e,u.UPDATE)}));case t.COMBOBOX:return p("kup-combobox",Object.assign({key:a.name+i.row.id,initialValue:c.value},c.data,{class:T(i)?"kup-full-width":"","onkup-combobox-change":s=>z(s,i,e,u.UPDATE),"onkup-combobox-input":s=>z(s,i,e,u.INPUT),"onkup-combobox-iconclick":s=>z(s,i,e,u.ICON_CLICK)}));case t.DATE:return p("kup-date-picker",Object.assign({key:a.name+i.row.id,initialValue:c.value},c.data,{class:T(i)?"kup-full-width":"","onkup-datepicker-change":s=>z(s,i,e,u.UPDATE),"onkup-datepicker-input":s=>z(s,i,e,u.INPUT)}));case t.MULTI_AUTOCOMPLETE:return p("kup-chip",Object.assign({displayId:!0},c.data,{type:f.INPUT,enableInput:!0,"onKup-chip-change":s=>z(s,i,e,u.UPDATE)}),p("kup-autocomplete",Object.assign({class:"kup-full-width",slot:"field",displayMode:y.DESCRIPTION_AND_CODE,selectMode:y.DESCRIPTION_AND_CODE,"onkup-autocomplete-input":s=>z(s,i,e,u.INPUT),"onkup-autocomplete-iconclick":s=>z(s,i,e,u.ICON_CLICK),showDropDownIcon:!1},c.slotData)));case t.MULTI_COMBOBOX:return p("kup-chip",Object.assign({displayId:!0},c.data,{type:f.INPUT,enableInput:!0,"onKup-chip-change":s=>z(s,i,e,u.UPDATE)}),p("kup-combobox",Object.assign({class:"kup-full-width",slot:"field",displayMode:y.DESCRIPTION_AND_CODE,selectMode:y.DESCRIPTION_AND_CODE,"onkup-combobox-input":s=>z(s,i,e,u.INPUT),"onkup-combobox-iconclick":s=>z(s,i,e,u.ICON_CLICK)},c.slotData)));case t.RADIO:return p(x,Object.assign({},c.data,{disabled:!1,onChange:(s,t)=>{const a=c.data.data;for(let e=0;e<a.length;e++){a[e].checked=e===s}z(t,i,e,u.UPDATE)}}));case t.RATING:return p("kup-rating",Object.assign({key:a.name+i.row.id},c.data,{disabled:!1,"onkup-rating-click":s=>z(s,i,e,u.UPDATE)}));case t.SWITCH:return p(j,Object.assign({},c.data,{disabled:!1,onChange:s=>z(s,i,e,u.UPDATE)}));case t.TIME:return p("kup-time-picker",Object.assign({key:a.name+i.row.id,initialValue:c.value},c.data,{class:T(i)?"kup-full-width":"","onkup-timepicker-change":s=>z(s,i,e,u.UPDATE),"onkup-timepicker-input":s=>z(s,i,e,u.INPUT)}));case t.NUMBER:s[l.C_RIGHT_ALIGNED]=!0;case t.LINK:case t.STRING:const d=s=>z(s,i,e,u.UPDATE),h=s=>z(s,i,e,u.INPUT),m=e===t.NUMBER?"number":null,g=e===t.NUMBER&&c.value?_.ketchup.math.numberifySafe(c.value).toString():c.value;return c.shape===n.INPUT_FIELD?p("input",{class:"input-field",onChange:d,onInput:h,type:m,value:g,maxLength:null!==(r=null===(o=a.cellData)||void 0===o?void 0:o.maxLength)&&void 0!==r?r:-1}):p(b,Object.assign({inputType:m,fullWidth:!!T(i)},c.data,{icon:c.data&&c.data.icon?c.data.icon:c.icon?c.icon:a.icon?a.icon:null,value:g,onChange:d,onInput:h,onIconClick:s=>z(s,i,e,u.ICON_CLICK)}))}}(H,S,d,v,i):d.data&&s.includes(H)?(i.setSizes&&function(e,s,c){switch(e){case t.BAR:s.sizeY||(s.sizeY="26px");break;case t.BUTTON:let e="";s.label&&(e="36px"),c.style?c.style.height||(c.style.minHeight=e):c.style={minHeight:e};break;case t.CHART:s.sizeX||(s.sizeX="100%"),s.sizeY||(s.sizeY="100%");break;case t.CHIP:case t.RADIO:c.style?c.style.height||(c.style.minHeight="40px"):c.style={minHeight:"40px"}}}(H,X,d),W=i.renderKup?function(e,s,c,a,n,i,o){switch(e){case t.BAR:return c.data?p("div",{style:{height:c.sizeY,width:"100%"}},p(h,Object.assign({},c))):p("kup-image",Object.assign({key:i.name+o.row.id,sizeX:"250px"},c));case t.BUTTON:return M(o)&&(s[l.C_CENTERED]=!0),p(g,Object.assign({},c,{onClick:s=>z(s,o,e,u.CLICK)}));case t.BUTTON_LIST:return M(o)&&(s[l.C_CENTERED]=!0),c["data-storage"]={cell:a,row:n,column:i},p("kup-button-list",Object.assign({key:i.name+o.row.id},c));case t.CHART:return M(o)&&(s[l.C_CENTERED]=!0),p("kup-chart",Object.assign({key:i.name+o.row.id},c));case t.MULTI_AUTOCOMPLETE:case t.MULTI_COMBOBOX:case t.CHIP:return p(m,Object.assign({},c));case t.COLOR_PICKER:return p("kup-color-picker",Object.assign({key:i.name+o.row.id},c,{class:T(o)?"kup-full-width":"",disabled:!0}));case t.GAUGE:return p("kup-gauge",Object.assign({key:i.name+o.row.id,value:_.ketchup.math.numberifySafe(a.value),"width-component":"280px"},c));case t.KNOB:case t.PROGRESS_BAR:return c.customStyle?p("kup-progress-bar",Object.assign({key:i.name+o.row.id},c)):p($,Object.assign({},c));case t.RADIO:return M(o)&&(s[l.C_CENTERED]=!0),c.disabled=n.readOnly,p(x,Object.assign({},c));case t.RATING:return p(O,Object.assign({},c,{disabled:!0}))}}(H,S,X,d,w,v,i):p("span",{class:"cell-"+H+" placeholder"})):(i.setSizes&&function(e,s,c,n){switch(e){case t.CHECKBOX:case t.ICON:s.sizeX||(s.sizeX="18px"),s.sizeY||(s.sizeY="18px"),c.style?c.style.height||(c.style.minHeight=s.sizeY):c.style={minHeight:s.sizeY};break;case t.IMAGE:n.component.rootElement.tagName===a.BOX?(s.sizeY||(s.sizeY="auto"),void 0===s.fit&&(s.fit=!0)):s.sizeX||(s.sizeX="auto"),s.sizeY||(s.sizeY="64px")}}(H,X,d,i),W=function(e,s,c,a,n,i,o){switch(e){case t.AUTOCOMPLETE:case t.COMBOBOX:case t.DATE:case t.DATETIME:case t.TIME:if(c&&""!=c){const e=r(i,n);return p("div",{class:"f-cell__text"},e)}return c;case t.CHECKBOX:return M(o)&&(a[l.C_CENTERED]=!0),p(h,{resource:s.checked?"check_box":"check_box_outline_blank",sizeX:"18px",sizeY:"18px"});case t.EDITOR:return p("div",{innerHTML:n.value});case t.ICON:case t.IMAGE:return M(o)&&(a[l.C_CENTERED]=!0),s.badgeData&&(a[l.C_PADDED]=!0),p(h,Object.assign({},s));case t.LINK:return p("a",{href:c,target:"_blank"},n.value);case t.NUMBER:if(c&&""!=c){const e=_.ketchup.math.numberifySafe(n.value),s=r(i,n);return e<0&&(a[l.TEXT_DANGER]=!0),M(o)&&(a[l.C_RIGHT_ALIGNED]=!0),p("div",{class:"f-cell__text"},s)}return p("div",{class:"f-cell__text"},c);case t.SWITCH:return M(o)&&(a[l.C_CENTERED]=!0),s.disabled=!0,p(j,Object.assign({},s));default:return p("div",{class:"f-cell__text"},c)}}(H,X,W,S,d,v,i));let Y=null;!K&&(v.icon||d.icon)&&W&&(Y=p(h,Object.assign({},{color:`rgba(var(${c.TEXT}-rgb), 0.375)`,resource:d.icon?d.icon:v.icon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"obj-icon"})));let B=null;_.ketchup.debug.isDebug()&&D?B=d.obj.t+"; "+d.obj.p+"; "+d.obj.k+";":null!=d.title&&""!=d.title.trim()&&(B=d.title);let L=null;if(d.info){const e=Object.assign({},d.info);e.color||(e.color=`var(${c.INFO})`),e.icon||(e.icon="info"),L=p(h,Object.assign({},{color:e.color,resource:e.icon,sizeX:"1.25em",sizeY:"1.25em",title:e.message?e.message:"",wrapperClass:"cell-info"}))}return p("div",{onKeyUp:e=>z(e,i,H,u.KEYUP),class:S,"kup-get-cell-props":()=>i,onTouchEnd:_.ketchup.interact.isMobileDevice()?()=>{I&&(C=performance.now(),C-I<600&&z(document.createEvent("MouseEvents"),i,H,u.CLICK),C=0,I=0)}:null,onTouchStart:_.ketchup.interact.isMobileDevice()?e=>{C=0,I=performance.now(),e.preventDefault()}:null,ref:e=>d.element=e,style:d.style},p("div",{class:"f-cell__content",style:d.styleContent,title:B},o&&o.length>0?o:[i.indents,L,Y,W]))};function z(e,s,c,a){const n=s.cell,i=s.column,l=s.component,o=s.row;if(a===u.UPDATE){let s=function(e,s){const c=!("INPUT"!==e.target.tagName);let a=c?e.target.value:e.detail.value;return s===t.CHECKBOX&&c&&(a=e.target.checked?"off":"on"),s===t.NUMBER&&c&&(a=_.ketchup.math.formattedStringToNumberString(a,"")),a}(e,c);switch(c){case t.AUTOCOMPLETE:case t.COMBOBOX:case t.DATE:case t.TIME:n.data&&(n.data.initialValue=s);break;case t.CHECKBOX:case t.SWITCH:s="on"===s?"0":"1",n.data&&(n.data.checked="0"!==s);break;case t.RADIO:break;case t.CHIP:case t.MULTI_AUTOCOMPLETE:case t.MULTI_COMBOBOX:s=e.detail.stringifiedValues,n.data&&(n.data.data=e.detail.comp.data)}n.obj&&(n.obj.k=s.toString()),n.value=s.toString(),n.displayedValue=null,n.displayedValue=r(i,n)}if(l&&l.rootElement){const s=new CustomEvent(a,{bubbles:!0,cancelable:!0,composed:!0,detail:{comp:l,id:l.rootElement.id,cell:n,column:i,event:e,row:o,type:c}});if(l.rootElement.dispatchEvent(s),a===u.UPDATE)try{l.refresh()}catch(e){}}}function M(e){var s;return o.includes(null===(s=e.component)||void 0===s?void 0:s.rootElement.tagName)}function T(e){var s;return i.includes(null===(s=e.component)||void 0===s?void 0:s.rootElement.tagName)}export{F,y as I,w as K,v as a,$ as b,x as c,O as d,j as e}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,f as s,h,H as e,d as n,g as o}from"./p-47040db6.js";import{k as a,ac as l,g as r,s as f,a as c,D as d}from"./p-9a856951.js";import{K as p,d as u,a as m,b as v,c as w}from"./p-924b841b.js";import{c as g}from"./p-635bb4b3.js";import{K as k}from"./p-935f58fc.js";import{F as y}from"./p-a5074ce4.js";import{F as b}from"./p-b3577066.js";import"./p-d4a879fc.js";const x=a();function D(t,i,s,h){const e=S(t,i);let n=[];return s&&h&&(n=O(s,h)?S(s,h):[...e]),{dateValues:e,secDateValues:n}}function S(t,i){let s=[t.value,i.value];return j(t)&&j(i)?s:j(t)?[t.value,t.value]:j(i)?[i.value,i.value]:s}function j(t){return x.objects.isDate(t.obj)&&x.dates.isValid(t.value,k.ISO_DATE)}function O(t,i){return j(t)||j(i)}function C(t,i,s,h,e,n){let o=()=>e.map((i=>l(h.find((t=>t.name==i)),t.cells[i])));return n&&(o=n),(null==e?void 0:e.length)>=2?o():[t.cells[i].value,t.cells[s].value]}class T{constructor(){this.showSecondaryDates=!1,this.detailFilter="",this.detailInitialScrollX=0,this.detailInitialScrollY=0,this.taskFilter="",this.taskInitialScrollX=0,this.taskInitialScrollY=0,this.viewMode="day"}toDebugString(){return"dt state"}}var z,M,E,W,I,R,Y,K,P,V,G,X,A,F,L,H,N,_,q,B,J,Q,U,Z,$=function(t,i,s,h){if("a"===s&&!h)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!h:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?h:"a"===s?h.call(t):h?h.value:i.get(t)},tt=function(t,i,s,h,e){if("m"===h)throw new TypeError("Private method is not writable");if("a"===h&&!e)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!e:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===h?e.call(t,s):e?e.value=s:i.set(t,s),s};const it=class{constructor(s){t(this,s),this.kupClick=i(this,"kup-planner-click",6),this.kupDblClick=i(this,"kup-planner-dblclick",6),this.kupDateChange=i(this,"kup-planner-datechange",6),this.kupReady=i(this,"kup-planner-ready",6),this.kupContextMenu=i(this,"kup-planner-contextmenu",6),this.kupDidUnload=i(this,"kup-planner-didunload",6),z.add(this),this.state=new T,this.plannerRenderer=void 0,M.set(this,a()),E.set(this,void 0),W.set(this,[]),I.set(this,{}),R.set(this,void 0),this.stateId="",this.store=void 0,this.customStyle="",this.data=void 0,this.detailData=void 0,this.detailColorCol=void 0,this.detailColumns=void 0,this.detailDates=void 0,this.detailFilter=void 0,this.detailHeight=void 0,this.detailIconCol=void 0,this.detailIdCol=void 0,this.detailNameCol=void 0,this.detailPrevDates=void 0,this.detailInitialScrollX=void 0,this.detailInitialScrollY=void 0,this.listCellWidth="300px",this.maxWidth="90vw",this.phaseColorCol=void 0,this.phaseColumns=void 0,this.phaseColParDep=void 0,this.phaseDates=void 0,this.phaseIconCol=void 0,this.phaseIdCol=void 0,this.phaseNameCol=void 0,this.phasePrevDates=void 0,this.readOnly=!1,this.showSecondaryDates=!1,this.taskColumns=void 0,this.taskDates=void 0,this.taskFilter=void 0,this.taskHeight=void 0,this.taskIconCol=void 0,this.taskIdCol=void 0,this.taskInitialScrollX=void 0,this.taskInitialScrollY=void 0,this.taskNameCol=void 0,this.taskPrevDates=void 0,this.titleMess=void 0,this.viewMode="month",this.mainFilter=void 0,this.secondaryFilter=void 0,this.plannerProps=void 0}initWithPersistedState(){if(this.store&&this.stateId){const t=this.store.getState(this.stateId);null!=t&&($(this,M,"f").debug.logMessage(this,"Initializing stateId "+this.stateId),this.detailFilter=t.detailFilter,this.showSecondaryDates=t.showSecondaryDates,this.detailInitialScrollX=t.detailInitialScrollX,this.detailInitialScrollY=t.detailInitialScrollY,this.taskFilter=t.taskFilter,this.taskInitialScrollX=t.taskInitialScrollX,this.taskInitialScrollY=t.taskInitialScrollY,this.viewMode=t.viewMode)}}persistState(){if(this.store&&this.stateId){let t=!1;$(this,M,"f").objects.deepEqual(this.state.detailFilter,$(this,R,"f").detailFilter)||(this.state.detailFilter=$(this,R,"f").detailFilter,t=!0),$(this,M,"f").objects.deepEqual(this.state.showSecondaryDates,$(this,R,"f").showSecondaryDates)||(this.state.showSecondaryDates=$(this,R,"f").showSecondaryDates,t=!0),$(this,M,"f").objects.deepEqual(this.state.detailInitialScrollX,$(this,R,"f").detailInitialScrollX)||(this.state.detailInitialScrollX=$(this,R,"f").detailInitialScrollX,t=!0),$(this,M,"f").objects.deepEqual(this.state.detailInitialScrollY,$(this,R,"f").detailInitialScrollY)||(this.state.detailInitialScrollY=$(this,R,"f").detailInitialScrollY,t=!0),$(this,M,"f").objects.deepEqual(this.state.taskFilter,$(this,R,"f").taskFilter)||(this.state.taskFilter=$(this,R,"f").taskFilter,t=!0),$(this,M,"f").objects.deepEqual(this.state.taskInitialScrollX,$(this,R,"f").taskInitialScrollX)||(this.state.taskInitialScrollX=$(this,R,"f").taskInitialScrollX,t=!0),$(this,M,"f").objects.deepEqual(this.state.taskInitialScrollY,$(this,R,"f").taskInitialScrollY)||(this.state.taskInitialScrollY=$(this,R,"f").taskInitialScrollY,t=!0),$(this,M,"f").objects.deepEqual(this.state.viewMode,$(this,R,"f").viewMode)||(this.state.viewMode=$(this,R,"f").viewMode,t=!0),t&&($(this,M,"f").debug.logMessage(this,"Persisting stateId "+this.stateId),this.store.persistState(this.stateId,this.state))}}dataChanged(){tt(this,I,{},"f")}async getProps(t){return r(this,w,t)}async refresh(){s(this),this.plannerRenderer.refresh()}async setProps(t){f(this,w,t)}async addPhases(t,i){var s;const h=$(this,z,"m",P).call(this,t);h&&($(this,I,"f")[t]=i,h.phases=null===(s=i.rows)||void 0===s?void 0:s.filter((t=>O(t.cells[this.phaseDates[0]],t.cells[this.phaseDates[1]]))).map((t=>{const s=D(t.cells[this.phaseDates[0]],t.cells[this.phaseDates[1]],t.cells[this.phasePrevDates[0]],t.cells[this.phasePrevDates[1]]),e=C(t,this.phaseIdCol,this.phaseNameCol,i.columns,this.phaseColumns,(()=>this.phaseColumns.map((s=>s==this.phaseDates[0]?"#START#":s==this.phaseDates[1]?"#END#":l(i.columns.find((t=>t.name==s)),t.cells[s])))));let n=$(this,z,"m",U).call(this,t,this.phaseIconCol),o=$(this,z,"m",Z).call(this,t,this.phaseIconCol);return{taskRow:h.taskRow,phaseRow:t,id:h.id+"_"+t.cells[this.phaseIdCol].value,phaseRowId:t.id,taskRowId:h.taskRowId,name:t.cells[this.phaseNameCol].value,startDate:s.dateValues[0],endDate:s.dateValues[1],secondaryStartDate:s.secDateValues[0],secondaryEndDate:s.secDateValues[1],type:"task",color:t.cells[this.phaseColorCol].value,selectedColor:t.cells[this.phaseColorCol].value,valuesToShow:e,rowType:p.PHASE,icon:n?{url:n,color:null!=o?o:"#595959"}:void 0}}))),this.plannerProps.mainGantt.initialScrollX=$(this,R,"f").taskInitialScrollX,this.plannerProps.mainGantt.initialScrollY=$(this,R,"f").taskInitialScrollY,this.plannerProps.secondaryGantt&&(this.plannerProps.secondaryGantt.initialScrollX=$(this,R,"f").detailInitialScrollX,this.plannerProps.secondaryGantt.initialScrollX=$(this,R,"f").detailInitialScrollY),this.plannerProps=Object.assign({},this.plannerProps),this.refresh()}componentWillLoad(){$(this,M,"f").debug.logLoad(this,!1),$(this,M,"f").theme.register(this),this.initWithPersistedState(),tt(this,R,{detailFilter:this.detailFilter,detailInitialScrollX:this.detailInitialScrollX,detailInitialScrollY:this.detailInitialScrollY,showSecondaryDates:this.showSecondaryDates,taskFilter:this.taskFilter,taskInitialScrollX:this.taskInitialScrollX,taskInitialScrollY:this.taskInitialScrollY,viewMode:this.viewMode},"f")}componentDidLoad(){let t=$(this,z,"m",K).call(this,$(this,z,"m",Q).call(this,$(this,R,"f").detailFilter,!0));const i=this.rootElement.shadowRoot.querySelector("#main-filter");b(i);const s=this.rootElement.shadowRoot.querySelector("#secondary-filter");let h,e,n;t&&b(s),this.plannerProps={mainGantt:{title:this.titleMess,items:$(this,z,"m",Y).call(this,$(this,z,"m",Q).call(this,$(this,R,"f").taskFilter,!1)),stylingOptions:Object.assign(Object.assign({},u),{listCellWidth:this.listCellWidth}),filter:i,hideLabel:!0,ganttHeight:this.taskHeight,showSecondaryDates:$(this,R,"f").showSecondaryDates,onClick:t=>this.handleOnClick(t),onDblClick:t=>this.handleOnDblClick(t),onContextMenu:(t,i)=>this.handleOnContextMenu(t,i),onDateChange:t=>this.handleOnDateChange(t),initialScrollX:this.taskInitialScrollX,initialScrollY:this.taskInitialScrollY,readOnly:this.readOnly,onScrollY:t=>{window.clearTimeout(e),e=window.setTimeout((()=>this.handleTaskGanttScrollY(t)),500)}},secondaryGantt:t?{title:"",items:t,stylingOptions:Object.assign(Object.assign({},u),{listCellWidth:this.listCellWidth}),filter:s,hideLabel:!0,ganttHeight:this.detailHeight,onClick:t=>this.handleOnClick(t),onContextMenu:(t,i)=>this.handleOnContextMenu(t,i),onDateChange:t=>this.handleOnDateChange(t),initialScrollX:this.detailInitialScrollX,initialScrollY:this.detailInitialScrollY,readOnly:this.readOnly,onScrollY:t=>{window.clearTimeout(n),n=window.setTimeout((()=>this.handleDetailGanttScrollY(t)),500)}}:void 0,onSetDoubleView:t=>this.handleOnSetDoubleView(t),onSetViewMode:t=>this.handleOnSetViewMode(t),viewMode:this.viewMode,onScrollX:t=>{window.clearTimeout(h),h=window.setTimeout((()=>this.handleOnScrollX(t)),500)}},this.kupReady.emit({comp:this,id:this.rootElement.id,value:void 0}),this.taskFilter&&$(this,z,"m",J).call(this,this.taskFilter),this.detailFilter&&$(this,z,"m",J).call(this,this.detailFilter,!0),$(this,M,"f").debug.logLoad(this,!0)}componentDidRender(){this.persistState(),$(this,M,"f").debug.logRender(this,!0)}onKupDblClick(t,i){this.kupDblClick.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}onKupClick(t,i){this.kupClick.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}onKupContextMenu(t,i,s){let h,e,n;switch(i.type){case"project":h=i.taskRow,e=h.cells[this.taskIdCol],n=this.data.columns[this.taskIdCol];break;case"task":h=i.phaseRow,e=h.cells[this.phaseIdCol];break;case"timeline":h=i.detailRow,e=h.cells[this.detailIdCol],n=this.data.columns[this.detailIdCol]}this.kupContextMenu.emit({comp:this,id:this.rootElement.id,value:i,taskAction:s,details:{cell:e,column:n,originalEvent:t,row:h}})}onKupDateChange(t,i){this.kupDateChange.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}handleOnDblClick(t){switch(t.rowType){case p.TASK:$(this,z,"m",G).call(this)&&this.onKupDblClick(t,m.onDblClick);break;case p.PHASE:$(this,z,"m",X).call(this)&&this.onKupDblClick(t,m.onDblClick);break;case p.DETAIL:$(this,z,"m",A).call(this)&&this.onKupDblClick(t,m.onDblClick)}for(let t=0;t<$(this,W,"f").length;t++)clearTimeout($(this,W,"f")[t]),$(this,M,"f").debug.logMessage(this,"Cleared click timeout("+$(this,W,"f")[t]+").");tt(this,W,[],"f")}handleOnClick(t){$(this,W,"f").push(setTimeout((()=>{switch(t.rowType){case p.TASK:const i=t.phases?m.onTaskClosing:m.onTaskOpening;$(this,z,"m",F).call(this,t)&&this.onKupClick(t,i);break;case p.PHASE:$(this,z,"m",L).call(this)&&this.onKupClick(t,m.onClick);break;case p.DETAIL:$(this,z,"m",H).call(this)&&this.onKupClick(t,m.onClick)}}),300))}handleOnContextMenu(t,i){switch(i.rowType){case p.TASK:$(this,z,"m",N).call(this)&&this.onKupContextMenu(t,i,m.onRightClick);break;case p.PHASE:$(this,z,"m",_).call(this)&&this.onKupContextMenu(t,i,m.onRightClick);break;case p.DETAIL:$(this,z,"m",q).call(this)&&this.onKupContextMenu(t,i,m.onRightClick)}}handleOnSetDoubleView(t){var i;$(this,R,"f").showSecondaryDates=t,(null===(i=this.plannerProps)||void 0===i?void 0:i.mainGantt)&&(this.plannerProps.mainGantt.showSecondaryDates=t),this.persistState()}handleOnSetViewMode(t){$(this,R,"f").viewMode=t,this.plannerProps.viewMode=t,this.persistState()}handleOnScrollX(t){$(this,R,"f").taskInitialScrollX=t,$(this,R,"f").detailInitialScrollX=t,this.persistState()}handleTaskGanttScrollY(t){$(this,R,"f").taskInitialScrollY=t,this.persistState()}handleDetailGanttScrollY(t){$(this,R,"f").detailInitialScrollY=t,this.persistState()}handleOnDateChange(t){$(this,z,"m",B).call(this,t)&&t.rowType!=p.DETAIL&&this.onKupDateChange(t,m.onResize)}render(){var t,i,s;const n=this.plannerProps?Object.assign(Object.assign({},this.plannerProps),{onSetDoubleView:this.handleOnSetDoubleView.bind(this),onSetViewMode:this.handleOnSetViewMode.bind(this),onScrollX:this.handleOnScrollX.bind(this),mainGantt:Object.assign(Object.assign({},null===(t=this.plannerProps)||void 0===t?void 0:t.mainGantt),{onScrollY:this.handleTaskGanttScrollY.bind(this)})}):null;return(null===(i=this.plannerProps)||void 0===i?void 0:i.secondaryGantt)&&(n.secondaryGantt=Object.assign(Object.assign({},this.plannerProps.secondaryGantt),{onScrollY:this.handleDetailGanttScrollY.bind(this)})),h(e,{key:"f3c51ffc99f55225dca3f5510f2be5881145a208"},h("style",{key:"f79296340221217cb79b5b2956c7a0e2907e844e"},$(this,M,"f").theme.setKupStyle(this.rootElement)),h("div",{key:"4df21c4b72d0a8984e17a507527fb927a5c23dca",id:g,style:{maxWidth:this.maxWidth}},this.plannerProps&&h("kup-planner-renderer",{props:n,ref:t=>this.plannerRenderer=t})),h("div",{key:"a95906fcd99bc6063045451d2d471a4d5ca18705",style:{display:this.plannerProps?"none":""}},h(y,{key:"c6975b21e0d1eb44663d341fa6db238c39faa032",icon:c.SEARCH,id:"main-filter",label:$(this,M,"f").language.translate(d.SEARCH),onKeyDown:t=>{"Enter"===t.key&&$(this,z,"m",J).call(this,t.target.value)},value:this.taskFilter,wrapperClass:"filter"}),(null===(s=this.detailData)||void 0===s?void 0:s.rows)&&this.detailData.rows.length>0?h(y,{icon:c.SEARCH,id:"secondary-filter",label:$(this,M,"f").language.translate(d.SEARCH),onKeyDown:t=>{"Enter"===t.key&&$(this,z,"m",J).call(this,t.target.value,!0)},value:this.detailFilter,wrapperClass:"filter"}):null))}disconnectedCallback(){$(this,M,"f").theme.unregister(this),this.kupDidUnload.emit({comp:this,id:this.rootElement.id,storedSettings:$(this,R,"f")})}get rootElement(){return n(this)}static get watchers(){return{data:["dataChanged"]}}};M=new WeakMap,E=new WeakMap,W=new WeakMap,I=new WeakMap,R=new WeakMap,z=new WeakSet,Y=function(t){var i;return t&&t.rows?null===(i=t.rows)||void 0===i?void 0:i.filter((t=>O(t.cells[this.taskDates[0]],t.cells[this.taskDates[1]]))).map((i=>{const s=D(i.cells[this.taskDates[0]],i.cells[this.taskDates[1]],i.cells[this.taskPrevDates[0]],i.cells[this.taskPrevDates[1]]),h=C(i,this.taskIdCol,this.taskNameCol,t.columns,this.taskColumns,(()=>this.taskColumns.map((s=>s==this.taskDates[0]?"#START#":s==this.taskDates[1]?"#END#":l(t.columns.find((t=>t.name==s)),i.cells[s])))));let e=$(this,z,"m",U).call(this,i,this.taskIconCol),n=$(this,z,"m",Z).call(this,i,this.taskIconCol);return{taskRow:i,taskRowId:i.id,id:i.cells[this.taskIdCol].value,name:i.cells[this.taskNameCol].value,startDate:s.dateValues[0],endDate:s.dateValues[1],secondaryStartDate:s.secDateValues[0],secondaryEndDate:s.secDateValues[1],type:"project",valuesToShow:h,rowType:p.TASK,icon:e?{url:e,color:null!=n?n:"#595959"}:void 0}})):[]},K=function(t){if(!t||!t.rows)return;let i=[];return t.rows.filter((t=>O(t.cells[this.detailDates[0]],t.cells[this.detailDates[1]]))).forEach((s=>{var h,e;const n=s.cells[this.detailIdCol].value,o=s.cells[this.detailNameCol].value,a=D(s.cells[this.detailDates[0]],s.cells[this.detailDates[1]]),l=C(s,this.detailIdCol,this.detailNameCol,t.columns,this.detailColumns);let r=i.find((t=>t.id==n));r||(r={id:n,name:o,detailRow:s,type:"timeline",valuesToShow:l,rowType:p.DETAIL,schedule:[]},i.push(r));let f=$(this,z,"m",U).call(this,s,this.detailIconCol),c=$(this,z,"m",Z).call(this,s,this.detailIconCol);r.schedule.push({startDate:a.dateValues[0],endDate:a.dateValues[1],color:this.detailColorCol&&null!==(h=s.cells[this.detailColorCol].value)&&void 0!==h?h:"#D9D9D8",selectedColor:this.detailColorCol&&null!==(e=s.cells[this.detailColorCol].value)&&void 0!==e?e:"#D9D9D8",icon:f?{url:f,color:null!=c?c:"#595959"}:void 0})})),i},P=function(t){return this.plannerProps.mainGantt.items.find((i=>i.id==t))},V=function(t){const i=$(this,z,"m",P).call(this,t);i&&(i.phases=void 0),this.plannerProps=Object.assign({},this.plannerProps)},G=function(){return!0},X=function(){return!0},A=function(){return!0},F=function(t){const i=$(this,z,"m",P).call(this,t.id);return(null==i?void 0:i.phases)&&$(this,z,"m",V).call(this,i.id),!0},L=function(){return!0},H=function(){return!0},N=function(){return!0},_=function(){return!0},q=function(){return!0},B=function(t){let i=!1;return $(this,E,"f")?$(this,E,"f").isEquivalent(t)||(tt(this,E,new v(t),"f"),i=!0):(i=!0,tt(this,E,new v(t),"f")),i},J=function(t,i){i?$(this,R,"f").detailFilter=t:$(this,R,"f").taskFilter=t;const s=i?{secondaryGantt:Object.assign(Object.assign({},this.plannerProps.secondaryGantt),{items:$(this,z,"m",K).call(this,$(this,z,"m",Q).call(this,t,i))})}:{mainGantt:Object.assign(Object.assign({},this.plannerProps.mainGantt),{items:$(this,z,"m",Y).call(this,$(this,z,"m",Q).call(this,t,i))})};this.plannerProps=Object.assign(Object.assign({},this.plannerProps),s),this.persistState()},Q=function(t,i){const s=i?this.detailData:this.data;if(!s||!s.rows||0==s.rows.length)return;if(!t)return s;const h={columns:this.data.columns,rows:[]},e=[];for(let i=0;i<s.rows.length;i++){const h=s.rows[i],n=h.cells;for(let i=0;i<s.columns.length;i++){const o=n[s.columns[i].name];if(o&&l(s.columns[i],o).toLowerCase().indexOf(t.toLowerCase())>-1){e.push({row:h,weight:i});break}}}return e.sort(((t,i)=>t.weight-i.weight)).forEach((t=>{h.rows.push(t.row)})),h},U=function(t,i){var s;let h;if(i){const e=t.cells[i];let n=null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.resource;n||(n=e.value),n&&(h=o("./assets/svg/"+n+".svg"))}return h},Z=function(t,i){var s;let h;if(i){const e=t.cells[i];h=null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.color,h&&(h=$(this,M,"f").theme.colorCheck(h).hexColor)}return h},it.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{display:block}.filter{margin:12px 10px 12px 0;padding:0 10px}.planner-render{padding-top:40px}";export{it as kup_planner}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){return void 0!==e.key}function r(e){const r=e.filter((e=>e.hideChildren&&"project"===e.type));if(r.length>0)for(let n=0;r.length>n;n++){const o=t(e,r[n]);e=e.filter((e=>-1===o.indexOf(e)))}return e}function t(e,r){let n=[];n=e.filter("project"!==r.type?e=>e.dependencies&&-1!==e.dependencies.indexOf(r.id):e=>e.project&&e.project===r.id);var o=[];return n.forEach((r=>{o.push(...t(e,r))})),n=n.concat(n,o),n}const n=(e,r)=>{const t=e.displayOrder||Number.MAX_VALUE,n=r.displayOrder||Number.MAX_VALUE;return t>n?1:t<n?-1:0},o=(e,r,t,n,o,a,l,c,d,i,u,b,h,g,p,x,v,C,f)=>{let k=e.map(((e,k)=>s(e,k,r,t,n,o,a,l,c,d,i,u,b,h,g,p,x,v,C,f)));return k=k.map((e=>{const r=e.dependencies||[];for(let t=0;t<r.length;t++){const n=k.findIndex((e=>e.id===r[t]));-1!==n&&k[n].barChildren.push(e)}return e})),k},s=(e,r,t,n,o,s,a,c,i,u,b,h,g,p,x,v,C,f,k,y)=>{let j;switch(e.type){case"timeline":j=d(e,r,t,n,o,c,i,u);break;case"project":j=l(e,r,t,n,o,a,i,u,b,v,C,f,k,y);break;default:j=l(e,r,t,n,o,s,i,u,b,h,g,p,x,y)}return j};function a(e,r,t,n,o,s,a){let l,c;a?(c=u(e,n,o),l=u(r,n,o)):(l=i(e,n,o),c=i(r,n,o));let d=t;return"task"===d&&c-l<2*s&&(d="smalltask",c=l+2*s),{x1:l,x2:c,typeInternal:d}}const l=(e,r,t,n,o,s,l,c,d,i,u,g,p,x)=>{const{x1:v,x2:C,typeInternal:f}=a(e.start,e.end,e.type,t,n,c,d),{x1:k,x2:y}=x&&e.secondaryStart&&e.secondaryEnd?a(e.secondaryStart,e.secondaryEnd,e.type,t,n,c,d):{x1:void 0,x2:void 0},[j,m]=h(v,C,e.progress,d),S=b(r,o,s),w="project"===e.type?e.hideChildren:void 0,O=Object.assign({backgroundColor:g,backgroundSelectedColor:p,progressColor:i,progressSelectedColor:u},e.styles);return Object.assign(Object.assign({},e),{typeInternal:f,x1:v,x2:C,x1secondary:k,x2secondary:y,y:S,index:r,progressX:m,progressWidth:j,barCornerRadius:l,handleWidth:c,hideChildren:w,height:s,barChildren:[],styles:O})},c=e=>{var r,t,n,o;return{backgroundColor:null!==(r=null==e?void 0:e.backgroundColor)&&void 0!==r?r:"#deadbeef",backgroundSelectedColor:null!==(t=null==e?void 0:e.backgroundSelectedColor)&&void 0!==t?t:"#cafebabe",progressColor:null!==(n=null==e?void 0:e.progressColor)&&void 0!==n?n:"#deadbeef",progressSelectedColor:null!==(o=null==e?void 0:e.progressSelectedColor)&&void 0!==o?o:"#cafebabe"}},d=(e,r,t,n,o,s,l,d)=>{var i;const u=b(r,o,s),{x1:h,x2:g}=a(e.start,e.end,e.type,t,n,d,!1),p=null===(i=e.timeline)||void 0===i?void 0:i.map((function(r,o){var l,c;const{x1:i,x2:b}=a(r.start,r.end,"task",t,n,d,!1),h=r.backgroundColor,g=null!==(l=r.backgroundSelectedColor)&&void 0!==l?l:h;return{barChildren:[],barCornerRadius:0,start:r.start,end:r.end,handleWidth:0,height:s,id:`Frame-${e.id}-${o}`,index:+r.start,name:"",valuesToShow:e.valuesToShow,progress:0,progressWidth:0,progressX:0,styles:{backgroundColor:h,backgroundSelectedColor:g,progressColor:h,progressSelectedColor:g},timeline:[],type:"task",typeInternal:"timeline",x1:i,x2:b,y:u,icon:null!==(c=r.icon)&&void 0!==c?c:void 0}}));return Object.assign(Object.assign({},e),{x1:h,x2:g,y:u,index:r,progressX:0,progressWidth:0,barCornerRadius:l,handleWidth:d,typeInternal:e.type,progress:0,height:s,hideChildren:void 0,barChildren:null!=p?p:[],styles:c(e.styles)})},i=(e,r,t)=>{const n=r.findIndex((r=>r.getTime()>=e.getTime()))-1;return n<0?0:n*t+(e.getTime()-r[n].getTime())/(r[n+1].getTime()-r[n].getTime())*t},u=(e,r,t)=>{let n=i(e,r,t);return n+=t,n},b=(e,r,t)=>e*r+(r-t)/2,h=(e,r,t,n)=>{const o=(r-e)*t*.01;let s;return s=n?r-o:e,[o,s]},g=(e,r,t)=>[e-5,r+t,e+5,r+t,e,r+t-8.66].join(","),p=(e,r,t,n,o)=>{let s=new Date((e-r)/n*o+t.getTime());return s=new Date(s.getTime()+6e4*(s.getTimezoneOffset()-t.getTimezoneOffset())),s},x=(e,r,t,n,o,s,a)=>v(e,r,t,n,o,s,a),v=(e,r,t,n,o,s,a)=>{const l=Object.assign({},t);let c=!1;switch(r){case"progress":if(l.progress=a?(d=e)>=(i=t).x2?0:d<=i.x1?100:Math.round(100*(i.x2-d)/(i.x2-i.x1)):((e,r)=>e>=r.x2?100:e<=r.x1?0:Math.round(100*(e-r.x1)/(r.x2-r.x1)))(e,t),c=l.progress!==t.progress,c){const[e,r]=h(l.x1,l.x2,l.progress,a);l.progressWidth=e,l.progressX=r}break;case"start":{const r=((e,r,t)=>{e>=t.x2-2*t.handleWidth&&(e=t.x2-2*t.handleWidth);const n=Math.round((e-t.x1)/r);return t.x1+n*r})(e,n,t);if(l.x1=r,c=l.x1!==t.x1,c){a?l.end=p(r,t.x1,t.end,n,o):l.start=p(r,t.x1,t.start,n,o);const[e,s]=h(l.x1,l.x2,l.progress,a);l.progressWidth=e,l.progressX=s}break}case"end":{const r=((e,r,t)=>{e<=t.x1+2*t.handleWidth&&(e=t.x1+2*t.handleWidth);const n=Math.round((e-t.x2)/r);return t.x2+n*r})(e,n,t);if(l.x2=r,c=l.x2!==t.x2,c){a?l.start=p(r,t.x2,t.start,n,o):l.end=p(r,t.x2,t.end,n,o);const[e,s]=h(l.x1,l.x2,l.progress,a);l.progressWidth=e,l.progressX=s}break}case"move":{const[r,d]=((e,r,t)=>{const n=Math.round((e-t.x1)/r),o=t.x1+n*r;return[o,o+t.x2-t.x1]})(e-s,n,t);if(c=r!==t.x1,c){l.start=p(r,t.x1,t.start,n,o),l.end=p(d,t.x2,t.end,n,o),l.x1=r,l.x2=d;const[e,s]=h(l.x1,l.x2,l.progress,a);l.progressWidth=e,l.progressX=s}break}}var d,i;return{isChanged:c,changedTask:l}};function C(e,r){return i(new Date,e,r)}function f(e,r,t,n){return{x0:i(e,t,n),xf:i(r,t,n)}}export{C as a,f as b,o as c,g,x as h,e as i,r,n as s}
|