@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,5 +1,5 @@
|
|
|
1
1
|
import { h, Fragment } from "@stencil/core";
|
|
2
|
-
import {
|
|
2
|
+
import { defaultStylingOptions, } from "../../kup-planner-declarations";
|
|
3
3
|
import { handleTaskBySVGMouseEvent, getProgressPoint, } from "../helpers/bar.helpers";
|
|
4
4
|
import { isKeyboardEvent } from "../helpers/other.helpers";
|
|
5
5
|
import { hexToCSSFilter } from "hex-to-css-filter";
|
|
@@ -35,13 +35,18 @@ export class KupGridRenderer {
|
|
|
35
35
|
this.setSelectedTask = undefined;
|
|
36
36
|
this.eventStart = undefined;
|
|
37
37
|
this.eMouseDown = undefined;
|
|
38
|
+
this.phaseDrop = undefined;
|
|
38
39
|
this.setGanttEvent = undefined;
|
|
40
|
+
this.phaseDragScroll = undefined;
|
|
39
41
|
this.xStep = 0;
|
|
40
42
|
this.initEventX1Delta = 0;
|
|
41
43
|
this.initEventXClick = 0;
|
|
42
44
|
this.isMoving = false;
|
|
43
45
|
this.point = undefined;
|
|
44
46
|
this.svg = undefined;
|
|
47
|
+
this.currentTarget = undefined;
|
|
48
|
+
this.dragScrollInterval = undefined;
|
|
49
|
+
this.dropZoneTask = undefined;
|
|
45
50
|
}
|
|
46
51
|
//---- Lifecycle hooks ----
|
|
47
52
|
componentDidLoad() {
|
|
@@ -73,14 +78,22 @@ export class KupGridRenderer {
|
|
|
73
78
|
return;
|
|
74
79
|
event.preventDefault();
|
|
75
80
|
this.point.x = event.clientX;
|
|
81
|
+
this.point.y = event.clientY;
|
|
76
82
|
const cursor = this.point.matrixTransform((_b = (_a = this.svg) === null || _a === void 0 ? void 0 : _a.getScreenCTM()) === null || _b === void 0 ? void 0 : _b.inverse());
|
|
77
|
-
const { isChanged, changedTask } = handleTaskBySVGMouseEvent(cursor.x, this.ganttEvent.action, this.ganttEvent.changedTask, this.xStep, this.timeStep, this.initEventX1Delta, this.rtl);
|
|
83
|
+
const { isChanged, changedTask } = handleTaskBySVGMouseEvent(cursor.x, this.ganttEvent.action, this.ganttEvent.changedTask, this.xStep, this.timeStep, this.initEventX1Delta, this.rtl, cursor.y);
|
|
84
|
+
if (this.currentTarget) {
|
|
85
|
+
this.addGhostPreview(event);
|
|
86
|
+
this.handleAutoScrollForPhaseDrag(event);
|
|
87
|
+
this.addDropzoneVisualization();
|
|
88
|
+
}
|
|
78
89
|
if (isChanged) {
|
|
79
90
|
this.setGanttEvent(Object.assign(Object.assign({}, this.ganttEvent), { action: this.ganttEvent.action, changedTask }));
|
|
80
91
|
}
|
|
81
92
|
};
|
|
82
93
|
const handleMouseUp = async (event) => {
|
|
83
|
-
var _a, _b;
|
|
94
|
+
var _a, _b, _c;
|
|
95
|
+
clearInterval(this.dragScrollInterval);
|
|
96
|
+
this.resetDropzoneVisualization();
|
|
84
97
|
const { action, originalSelectedTask, changedTask } = this.ganttEvent;
|
|
85
98
|
if (!changedTask ||
|
|
86
99
|
!this.point ||
|
|
@@ -90,18 +103,33 @@ export class KupGridRenderer {
|
|
|
90
103
|
event.preventDefault();
|
|
91
104
|
this.point.x = event.clientX;
|
|
92
105
|
const cursor = this.point.matrixTransform((_b = (_a = this.svg) === null || _a === void 0 ? void 0 : _a.getScreenCTM()) === null || _b === void 0 ? void 0 : _b.inverse());
|
|
93
|
-
|
|
106
|
+
this.currentTarget = null;
|
|
107
|
+
const { changedTask: newChangedTask } = handleTaskBySVGMouseEvent(cursor.x, action, changedTask, this.xStep, this.timeStep, this.initEventX1Delta, this.rtl, cursor.y);
|
|
94
108
|
const isNotLikeOriginal = originalSelectedTask.start !== newChangedTask.start ||
|
|
95
109
|
originalSelectedTask.end !== newChangedTask.end ||
|
|
96
|
-
originalSelectedTask.progress !== newChangedTask.progress
|
|
110
|
+
originalSelectedTask.progress !== newChangedTask.progress ||
|
|
111
|
+
originalSelectedTask.y !== newChangedTask.y;
|
|
97
112
|
// remove listeners
|
|
98
113
|
this.svg.removeEventListener('mousemove', handleMouseMove);
|
|
99
114
|
this.svg.removeEventListener('mouseup', handleMouseUp);
|
|
115
|
+
(_c = this.svg.querySelector('.ghost-preview')) === null || _c === void 0 ? void 0 : _c.remove();
|
|
100
116
|
this.setGanttEvent({ action: '' });
|
|
101
117
|
this.isMoving = false;
|
|
102
118
|
// custom operation start
|
|
103
119
|
let operationSuccess = true;
|
|
104
|
-
|
|
120
|
+
let droppedOn = undefined;
|
|
121
|
+
let originalTaskData = undefined;
|
|
122
|
+
if (action === 'move' &&
|
|
123
|
+
isNotLikeOriginal &&
|
|
124
|
+
newChangedTask.type === 'task') {
|
|
125
|
+
droppedOn = this.tasks.find((task) => this.isPhaseWithinTaskArea(changedTask, task) &&
|
|
126
|
+
task.type === 'project');
|
|
127
|
+
originalTaskData = this.tasks.find((task) => task.id == originalSelectedTask.id.split('_').shift());
|
|
128
|
+
}
|
|
129
|
+
if ((droppedOn === null || droppedOn === void 0 ? void 0 : droppedOn.id) && (originalTaskData === null || originalTaskData === void 0 ? void 0 : originalTaskData.id) !== (droppedOn === null || droppedOn === void 0 ? void 0 : droppedOn.id)) {
|
|
130
|
+
this.phaseDrop(originalSelectedTask, originalTaskData, newChangedTask, droppedOn);
|
|
131
|
+
}
|
|
132
|
+
else if ((action === 'move' || action === 'end' || action === 'start') &&
|
|
105
133
|
this.dateChange &&
|
|
106
134
|
isNotLikeOriginal) {
|
|
107
135
|
try {
|
|
@@ -147,6 +175,110 @@ export class KupGridRenderer {
|
|
|
147
175
|
}
|
|
148
176
|
return this.initEventXClick !== event.clientX;
|
|
149
177
|
}
|
|
178
|
+
addGhostPreview(event) {
|
|
179
|
+
var _a;
|
|
180
|
+
(_a = this.svg.querySelector('.ghost-preview')) === null || _a === void 0 ? void 0 : _a.remove();
|
|
181
|
+
const mockEvent = Object.assign(Object.assign({}, event), { dataTransfer: new DataTransfer() });
|
|
182
|
+
const dragEle = this.currentTarget;
|
|
183
|
+
dragEle.classList.add('ghost-preview');
|
|
184
|
+
this.svg.appendChild(dragEle.cloneNode(true));
|
|
185
|
+
const nodeRect = dragEle.getBoundingClientRect();
|
|
186
|
+
mockEvent.dataTransfer.setDragImage(dragEle, mockEvent.clientX - nodeRect.left, mockEvent.clientY - nodeRect.top);
|
|
187
|
+
}
|
|
188
|
+
handleAutoScrollForPhaseDrag(event) {
|
|
189
|
+
var _a, _b;
|
|
190
|
+
const list = (_b = (_a = this.svg) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.parentElement;
|
|
191
|
+
if (!list)
|
|
192
|
+
return;
|
|
193
|
+
clearInterval(this.dragScrollInterval);
|
|
194
|
+
const isOverFlowing = list.clientHeight < list.scrollHeight;
|
|
195
|
+
if (isOverFlowing) {
|
|
196
|
+
// if container is overflowing we need to scroll within the container
|
|
197
|
+
const containerRect = list.getBoundingClientRect();
|
|
198
|
+
const offsetY = event.clientY - containerRect.top;
|
|
199
|
+
const diff = 5;
|
|
200
|
+
if (offsetY - 20 < diff) {
|
|
201
|
+
this.dragScrollInterval = setInterval(() => {
|
|
202
|
+
this.phaseDragScroll((list.scrollTop -= diff));
|
|
203
|
+
}, 1);
|
|
204
|
+
}
|
|
205
|
+
else if (offsetY + 20 > containerRect.height - diff) {
|
|
206
|
+
this.dragScrollInterval = setInterval(() => {
|
|
207
|
+
this.phaseDragScroll((list.scrollTop += diff));
|
|
208
|
+
}, 1);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
// else we need to scroll the window when viewport exceeds
|
|
213
|
+
const scrollOffset = 20;
|
|
214
|
+
const windowHeight = window.innerHeight;
|
|
215
|
+
const y = event.clientY;
|
|
216
|
+
if (y < scrollOffset) {
|
|
217
|
+
window.scrollBy(0, -scrollOffset);
|
|
218
|
+
}
|
|
219
|
+
else if (y > windowHeight - scrollOffset) {
|
|
220
|
+
window.scrollBy(0, scrollOffset);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
isPhaseWithinTaskArea(phase, task) {
|
|
225
|
+
return (phase.y + phase.height >= task.ySecondary &&
|
|
226
|
+
phase.y <= task.ySecondary + task.height &&
|
|
227
|
+
phase.x2 >= task.x1 &&
|
|
228
|
+
phase.x1 <= task.x2);
|
|
229
|
+
}
|
|
230
|
+
addDropzoneVisualization() {
|
|
231
|
+
var _a;
|
|
232
|
+
this.resetDropzoneVisualization();
|
|
233
|
+
// find the tasks where drop is allowed, includes all projects except parent project also includes current phase
|
|
234
|
+
const dropAllowedOn = this.tasks.filter((task) => {
|
|
235
|
+
var _a, _b, _c;
|
|
236
|
+
return task.type == 'project' &&
|
|
237
|
+
((_c = (_b = (_a = this.ganttEvent.originalSelectedTask) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.split('_')) === null || _c === void 0 ? void 0 : _c.shift()) !=
|
|
238
|
+
task.id;
|
|
239
|
+
});
|
|
240
|
+
const changedTask = this.ganttEvent.changedTask;
|
|
241
|
+
// to determine whether the phase is in some another project y and x area
|
|
242
|
+
this.dropZoneTask = dropAllowedOn.find((task) => this.isPhaseWithinTaskArea(changedTask, task));
|
|
243
|
+
if ((_a = this.dropZoneTask) === null || _a === void 0 ? void 0 : _a.ySecondary) {
|
|
244
|
+
const rects = this.getBarRectsForDropzoneVisualization();
|
|
245
|
+
rects.forEach((rect) => {
|
|
246
|
+
rect.setAttribute('fill', defaultStylingOptions.barDropZoneColor);
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
resetDropzoneVisualization() {
|
|
251
|
+
if (!this.dropZoneTask)
|
|
252
|
+
return;
|
|
253
|
+
const rects = this.getBarRectsForDropzoneVisualization();
|
|
254
|
+
const isSelected = !!this.selectedTask &&
|
|
255
|
+
this.dropZoneTask.id === this.selectedTask.id;
|
|
256
|
+
rects.forEach((rect) => {
|
|
257
|
+
rect.setAttribute('fill', this.getBarColor(isSelected, this.dropZoneTask.styles));
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
getBarRectsForDropzoneVisualization() {
|
|
261
|
+
let rects;
|
|
262
|
+
if (!this.showSecondaryDates) {
|
|
263
|
+
rects = this.svg.querySelectorAll(`.barWrapper[data-type="${this.dropZoneTask.type}"] rect[y='${this.dropZoneTask.ySecondary}']`);
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
const rect = this.svg.querySelector(`.barWrapper[data-type="${this.dropZoneTask.type}"] rect[y='${this.dropZoneTask.ySecondary}']`);
|
|
267
|
+
const siblings = [rect];
|
|
268
|
+
let nextSibling = rect.nextElementSibling;
|
|
269
|
+
while (nextSibling !== null) {
|
|
270
|
+
siblings.push(nextSibling);
|
|
271
|
+
nextSibling = nextSibling.nextElementSibling;
|
|
272
|
+
}
|
|
273
|
+
let prevSibling = rect.previousElementSibling;
|
|
274
|
+
while (prevSibling !== null) {
|
|
275
|
+
siblings.unshift(prevSibling);
|
|
276
|
+
prevSibling = prevSibling.previousElementSibling;
|
|
277
|
+
}
|
|
278
|
+
rects = siblings;
|
|
279
|
+
}
|
|
280
|
+
return rects;
|
|
281
|
+
}
|
|
150
282
|
handleBarEventStart(action, task, event) {
|
|
151
283
|
var _a;
|
|
152
284
|
if (!event) {
|
|
@@ -202,7 +334,14 @@ export class KupGridRenderer {
|
|
|
202
334
|
return;
|
|
203
335
|
this.point.x = event.clientX;
|
|
204
336
|
const cursor = this.point.matrixTransform((_a = this.svg.getScreenCTM()) === null || _a === void 0 ? void 0 : _a.inverse());
|
|
337
|
+
if (task.type === 'task') {
|
|
338
|
+
this.currentTarget = event.currentTarget.cloneNode(true);
|
|
339
|
+
}
|
|
340
|
+
else {
|
|
341
|
+
this.currentTarget = null;
|
|
342
|
+
}
|
|
205
343
|
this.initEventX1Delta = cursor.x - task.x1;
|
|
344
|
+
this.point.y = event.clientY;
|
|
206
345
|
this.initEventXClick = event.clientX;
|
|
207
346
|
this.setGanttEvent({
|
|
208
347
|
action,
|
|
@@ -224,7 +363,7 @@ export class KupGridRenderer {
|
|
|
224
363
|
}
|
|
225
364
|
renderKupBar(task, isSelected, isDateResizable, isProgressChangeable) {
|
|
226
365
|
var _a, _b, _c;
|
|
227
|
-
return (h("g", { class: "barWrapper", "tab-index": 0 }, this.renderKupBarDisplay(task.x1, task.y, task.x2 - task.x1, task.height, task.progressX, task.progressWidth, task.barCornerRadius, task.styles, isSelected, !this.readOnly && !!this.dateChange && !task.isDisabled, task, task.x1secondary, ((_a = task.x2secondary) !== null && _a !== void 0 ? _a : 0) - ((_b = task.x1secondary) !== null && _b !== void 0 ? _b : 0)), h("g", { class: "handleGroup" }, isDateResizable && (h("g", null, this.renderKupBarDateHandle(task.x1 + 1, task.y + 1, task.handleWidth, task.height - 2, task.barCornerRadius, task, 'start'), this.renderKupBarDateHandle(task.x2 - task.handleWidth - 1, task.y + 1, task.handleWidth, task.height - 2, task.barCornerRadius, task, 'end'))), isProgressChangeable && (h("polygon", { class: "barHandle", points: this.calculateProgressPoint(task), onMouseDown: (e) => {
|
|
366
|
+
return (h("g", { class: "barWrapper", "tab-index": 0, "data-type": task.type }, this.renderKupBarDisplay(task.x1, task.y, task.x2 - task.x1, task.height, task.progressX, task.progressWidth, task.barCornerRadius, task.styles, isSelected, !this.readOnly && !!this.dateChange && !task.isDisabled, task, task.x1secondary, ((_a = task.x2secondary) !== null && _a !== void 0 ? _a : 0) - ((_b = task.x1secondary) !== null && _b !== void 0 ? _b : 0), task.ySecondary), h("g", { class: "handleGroup" }, isDateResizable && (h("g", null, this.renderKupBarDateHandle(task.x1 + 1, task.y + 1, task.handleWidth, task.height - 2, task.barCornerRadius, task, 'start'), this.renderKupBarDateHandle(task.x2 - task.handleWidth - 1, task.y + 1, task.handleWidth, task.height - 2, task.barCornerRadius, task, 'end'))), isProgressChangeable && (h("polygon", { class: "barHandle", points: this.calculateProgressPoint(task), onMouseDown: (e) => {
|
|
228
367
|
this.handleBarEventStart('progress', task, e);
|
|
229
368
|
} }))), task.icon &&
|
|
230
369
|
task.icon.url &&
|
|
@@ -239,11 +378,11 @@ export class KupGridRenderer {
|
|
|
239
378
|
(this.showSecondaryDates ? task.height / 2 : 0),
|
|
240
379
|
})));
|
|
241
380
|
}
|
|
242
|
-
renderKupBarDisplay(x, y, width, height, progressX, progressWidth, barCornerRadius, styles, isSelected, isDateMovable, task, xSecondary, widthSecondary) {
|
|
381
|
+
renderKupBarDisplay(x, y, width, height, progressX, progressWidth, barCornerRadius, styles, isSelected, isDateMovable, task, xSecondary, widthSecondary, ySecondary) {
|
|
243
382
|
if (this.showSecondaryDates && typeof xSecondary !== 'undefined') {
|
|
244
383
|
const halfHeight = height / 2;
|
|
245
384
|
return (h("g", { onMouseDown: (e) => isDateMovable &&
|
|
246
|
-
this.handleBarEventStart('move', task, e) }, h("rect", { key: "top semi-transparent bar", x: xSecondary, width: widthSecondary, y: y, height: halfHeight, ry: barCornerRadius, rx: barCornerRadius, fill: this.getBarColor(isSelected, styles), opacity: 0.5, class: 'barBackground' }), h("rect", { key: "main bar", x: x, width: width, y: y + halfHeight, height: halfHeight, ry: barCornerRadius, rx: barCornerRadius, fill: this.getBarColor(isSelected, styles), class: 'barBackground' }), h("rect", { key: "progress bar", x: progressX, width: progressWidth, y: y + halfHeight, height: halfHeight, ry: barCornerRadius, rx: barCornerRadius, fill: this.getProcessColor(isSelected, styles) })));
|
|
385
|
+
this.handleBarEventStart('move', task, e) }, h("rect", { key: "top semi-transparent bar", x: xSecondary, width: widthSecondary, y: ySecondary !== null && ySecondary !== void 0 ? ySecondary : y, height: halfHeight, ry: barCornerRadius, rx: barCornerRadius, fill: this.getBarColor(isSelected, styles), opacity: 0.5, class: 'barBackground' }), h("rect", { key: "main bar", x: x, width: width, y: y + halfHeight, height: halfHeight, ry: barCornerRadius, rx: barCornerRadius, fill: this.getBarColor(isSelected, styles), class: 'barBackground' }), h("rect", { key: "progress bar", x: progressX, width: progressWidth, y: y + halfHeight, height: halfHeight, ry: barCornerRadius, rx: barCornerRadius, fill: this.getProcessColor(isSelected, styles) })));
|
|
247
386
|
}
|
|
248
387
|
return (h("g", { onMouseDown: (e) => {
|
|
249
388
|
isDateMovable && this.handleBarEventStart('move', task, e);
|
|
@@ -346,31 +485,37 @@ export class KupGridRenderer {
|
|
|
346
485
|
rowLines.push(h("line", { key: 'RowLine' + task.id, x1: 0, y1: y + this.rowHeight, x2: this.gridProps.svgWidth, y2: y + this.rowHeight, class: "gridRowLine" }));
|
|
347
486
|
y += this.rowHeight;
|
|
348
487
|
}
|
|
349
|
-
const now = new Date();
|
|
488
|
+
// const now = new Date();
|
|
350
489
|
let tickX = 0;
|
|
351
490
|
const ticks = [];
|
|
352
491
|
for (let i = 0; i < this.dates.length; i++) {
|
|
353
492
|
const date = this.dates[i];
|
|
354
493
|
ticks.push(h("line", { key: date.getTime(), x1: tickX, y1: 0, x2: tickX, y2: y, class: "gridTick" }));
|
|
355
|
-
if (
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
494
|
+
// if (
|
|
495
|
+
// (i + 1 !== this.dates.length &&
|
|
496
|
+
// date.getTime() < now.getTime() &&
|
|
497
|
+
// this.dates[i + 1].getTime() >= now.getTime()) ||
|
|
498
|
+
// // if current date is last
|
|
499
|
+
// (i !== 0 &&
|
|
500
|
+
// i + 1 === this.dates.length &&
|
|
501
|
+
// date.getTime() < now.getTime() &&
|
|
502
|
+
// addToDate(
|
|
503
|
+
// date,
|
|
504
|
+
// date.getTime() - this.dates[i - 1].getTime(),
|
|
505
|
+
// 'millisecond'
|
|
506
|
+
// ).getTime() >= now.getTime())
|
|
507
|
+
// ) {
|
|
508
|
+
// // Add custom logic here if needed
|
|
509
|
+
// }
|
|
365
510
|
tickX += this.columnWidth;
|
|
366
511
|
}
|
|
367
|
-
return (h("svg", { key: '
|
|
512
|
+
return (h("svg", { key: '95b5c0ebccd9d472507328baa068f9d75daa4a6e', xmlns: "http://www.w3.org/2000/svg", width: this.gridProps.svgWidth, height: `${this.rowHeight * this.tasks.length}px`, "font-family": this.fontFamily, ref: (el) => (this.svg = el) }, h("g", { key: 'bd6598993c35c69c6aadca0d41c50b028a283b70', class: "grid" }, h("g", { key: 'c52a1de5fa57cc5fdd4b80ff84b3a09b13e3b199', class: "rows" }, gridRows), h("g", { key: 'd8747275b307b05c7a5c4ab1ab3efa5956c95f25', class: "rowLines" }, rowLines), h("g", { key: '000d0b2ec6253da9d23096a7cfa3564a2a3a173d', class: "ticks" }, ticks)), h("g", { key: 'fc0d6cc1b4f60e84b77082b7c47d68eb364fbb7b', class: "content" }, this.currentDateIndicator && (h("rect", { fill: this.currentDateIndicator.color, x: this.currentDateIndicator.x + 1.5, y: "0", width: "2", height: "100%" })), this.projection && (h("rect", { fill: this.projection.color, x: this.projection.x0, y: "0", width: this.projection.xf - this.projection.x0, height: "100%", "fill-opacity": "0.35" })), h("g", { key: '04162e3432a56f08c1ea29e69503fe97e1fb84d2', class: "arrows", fill: this.arrowColor, stroke: this.arrowColor }, this.tasks.map((task) => {
|
|
368
513
|
return task.barChildren.map((child) => {
|
|
369
514
|
if (task.type !== 'timeline') {
|
|
370
515
|
this.renderKupArrow(task, child);
|
|
371
516
|
}
|
|
372
517
|
});
|
|
373
|
-
})), h("g", { key: '
|
|
518
|
+
})), h("g", { key: '4e5888f0a6335480ee0f32df3844982e355f4e39', class: "bar", "font-family": this.fontFamily, "font-size": this.fontSize }, this.tasks.map((task) => {
|
|
374
519
|
const forbidResize = task.type === 'project';
|
|
375
520
|
return (h("g", { onKeyDown: (e) => {
|
|
376
521
|
switch (e.key) {
|
|
@@ -430,7 +575,7 @@ export class KupGridRenderer {
|
|
|
430
575
|
return this.renderKupBar(task, props.isSelected, isDateResizable, isProgressChangeable);
|
|
431
576
|
}
|
|
432
577
|
})()));
|
|
433
|
-
})))));
|
|
578
|
+
}), this.currentTarget && this.ganttEvent.changedTask && (h("g", { class: "task-wrapper" }, this.renderKupBar(this.ganttEvent.changedTask, false, false, false)))))));
|
|
434
579
|
}
|
|
435
580
|
static get is() { return "kup-grid-renderer"; }
|
|
436
581
|
static get originalStyleUrls() {
|
|
@@ -1111,6 +1256,27 @@ export class KupGridRenderer {
|
|
|
1111
1256
|
"text": ""
|
|
1112
1257
|
}
|
|
1113
1258
|
},
|
|
1259
|
+
"phaseDrop": {
|
|
1260
|
+
"type": "unknown",
|
|
1261
|
+
"mutable": false,
|
|
1262
|
+
"complexType": {
|
|
1263
|
+
"original": "KupPlannerEventOption['phaseDrop']",
|
|
1264
|
+
"resolved": "(originalPhaseData: KupPlannerTask, originalTaskData: KupPlannerTask, finalPhaseData: KupPlannerTask, destinationData: KupPlannerTask) => boolean | void | Promise<boolean> | Promise<void>",
|
|
1265
|
+
"references": {
|
|
1266
|
+
"KupPlannerEventOption": {
|
|
1267
|
+
"location": "import",
|
|
1268
|
+
"path": "../../kup-planner-declarations",
|
|
1269
|
+
"id": "src/components/kup-planner/kup-planner-declarations.ts::KupPlannerEventOption"
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
},
|
|
1273
|
+
"required": false,
|
|
1274
|
+
"optional": false,
|
|
1275
|
+
"docs": {
|
|
1276
|
+
"tags": [],
|
|
1277
|
+
"text": ""
|
|
1278
|
+
}
|
|
1279
|
+
},
|
|
1114
1280
|
"setGanttEvent": {
|
|
1115
1281
|
"type": "unknown",
|
|
1116
1282
|
"mutable": true,
|
|
@@ -1131,6 +1297,21 @@ export class KupGridRenderer {
|
|
|
1131
1297
|
"tags": [],
|
|
1132
1298
|
"text": ""
|
|
1133
1299
|
}
|
|
1300
|
+
},
|
|
1301
|
+
"phaseDragScroll": {
|
|
1302
|
+
"type": "unknown",
|
|
1303
|
+
"mutable": false,
|
|
1304
|
+
"complexType": {
|
|
1305
|
+
"original": "(scrollY: number) => void",
|
|
1306
|
+
"resolved": "(scrollY: number) => void",
|
|
1307
|
+
"references": {}
|
|
1308
|
+
},
|
|
1309
|
+
"required": false,
|
|
1310
|
+
"optional": false,
|
|
1311
|
+
"docs": {
|
|
1312
|
+
"tags": [],
|
|
1313
|
+
"text": ""
|
|
1314
|
+
}
|
|
1134
1315
|
}
|
|
1135
1316
|
};
|
|
1136
1317
|
}
|
|
@@ -1141,7 +1322,10 @@ export class KupGridRenderer {
|
|
|
1141
1322
|
"initEventXClick": {},
|
|
1142
1323
|
"isMoving": {},
|
|
1143
1324
|
"point": {},
|
|
1144
|
-
"svg": {}
|
|
1325
|
+
"svg": {},
|
|
1326
|
+
"currentTarget": {},
|
|
1327
|
+
"dragScrollInterval": {},
|
|
1328
|
+
"dropZoneTask": {}
|
|
1145
1329
|
};
|
|
1146
1330
|
}
|
|
1147
1331
|
static get watchers() {
|
package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
1
|
+
import { h, Fragment, } from "@stencil/core";
|
|
2
2
|
export class HorizontalScroll {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.scrollNumber = undefined;
|
|
@@ -6,7 +6,12 @@ export class HorizontalScroll {
|
|
|
6
6
|
this.taskListTrueRef = undefined;
|
|
7
7
|
this.rtl = undefined;
|
|
8
8
|
this.taskListWidth = undefined;
|
|
9
|
+
this.scrollableTaskList = false;
|
|
10
|
+
this.listCellWidth = '300px';
|
|
11
|
+
this.taskListScrollWidth = undefined;
|
|
12
|
+
this.taskListScrollNumber = undefined;
|
|
9
13
|
this.horizontalScroll = undefined;
|
|
14
|
+
this.horizontalTaskListScroll = undefined;
|
|
10
15
|
this.timeoutId = undefined;
|
|
11
16
|
}
|
|
12
17
|
//---- Lifecycle hooks ----
|
|
@@ -22,20 +27,46 @@ export class HorizontalScroll {
|
|
|
22
27
|
this.setScrollLeft();
|
|
23
28
|
}, 50);
|
|
24
29
|
}
|
|
30
|
+
listScrollLeft() {
|
|
31
|
+
clearTimeout(this.timeoutId);
|
|
32
|
+
this.timeoutId = setTimeout(() => {
|
|
33
|
+
this.setTaskListScrollLeft();
|
|
34
|
+
}, 50);
|
|
35
|
+
}
|
|
25
36
|
setScrollLeft() {
|
|
26
37
|
if (this.rootElement) {
|
|
27
|
-
this.rootElement.shadowRoot.querySelector('div')
|
|
28
|
-
|
|
38
|
+
const shadowElement = this.rootElement.shadowRoot.querySelector('div');
|
|
39
|
+
const element = shadowElement.children.length == 2
|
|
40
|
+
? shadowElement.children[1]
|
|
41
|
+
: shadowElement.children[0];
|
|
42
|
+
element && (element.scrollLeft = this.scrollNumber);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
setTaskListScrollLeft() {
|
|
46
|
+
if (this.rootElement) {
|
|
47
|
+
const shadowElement = this.rootElement.shadowRoot.querySelector('div');
|
|
48
|
+
const taskListScrollBar = shadowElement.children.length == 2 ? shadowElement.children[0] : null;
|
|
49
|
+
taskListScrollBar && (taskListScrollBar.scrollLeft = this.taskListScrollNumber);
|
|
29
50
|
}
|
|
30
51
|
}
|
|
31
52
|
render() {
|
|
32
53
|
var _a, _b;
|
|
33
54
|
const w = (_b = ((_a = this.taskListTrueRef) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width) + 24 * 1.5) !== null && _b !== void 0 ? _b : 0; // 24 * 2 is the sum of padding and margin for both list and gantt, multiplied by 1.5 cause we need to add the other half to the right
|
|
34
|
-
|
|
55
|
+
const width = +this.listCellWidth.replace('px', '');
|
|
56
|
+
return (h(Fragment, { key: '84cd5ee2a862b2e0afaba38f81ad299466c6c90a' }, h("div", { key: '8be4374ca4ae407dd6c538994a4236d24196111b', class: "scroll-container" }, this.scrollableTaskList &&
|
|
57
|
+
this.taskListScrollWidth > width && (h("div", { dir: "ltr", style: {
|
|
58
|
+
margin: this.rtl
|
|
59
|
+
? `0px 20px 0px 20px`
|
|
60
|
+
: `0px 20px 0px 20px`,
|
|
61
|
+
maxWidth: `${width + 20}px`,
|
|
62
|
+
minWidth: `${width + 20}px`,
|
|
63
|
+
}, class: "scrollWrapper", "data-scrollx": "true", onScroll: this.horizontalTaskListScroll }, h("div", { style: {
|
|
64
|
+
width: `${this.taskListScrollWidth}px`,
|
|
65
|
+
}, class: "scroll" }))), h("div", { key: '703cb38b994d2012c5c8718e144b360d6351eafd', dir: "ltr", style: {
|
|
35
66
|
margin: this.rtl
|
|
36
|
-
? `0px ${w}px 0px 12px`
|
|
37
|
-
: `0px 12px 0px ${w}px`,
|
|
38
|
-
}, class: "scrollWrapper", "data-scrollx": "true", onScroll: this.horizontalScroll }, h("div", { key: '
|
|
67
|
+
? `0px ${this.scrollableTaskList && this.taskListScrollWidth > width ? 40 : w}px 0px 12px`
|
|
68
|
+
: `0px 12px 0px ${this.scrollableTaskList && this.taskListScrollWidth > width ? 40 : w}px`,
|
|
69
|
+
}, class: "scrollWrapper", "data-scrollx": "true", onScroll: this.horizontalScroll }, h("div", { key: '347758c21c87bd6069526f5079acac13e50220f8', style: { width: `${this.svgWidth}px` }, class: "scroll" })))));
|
|
39
70
|
}
|
|
40
71
|
static get is() { return "kup-horizontal-scroll"; }
|
|
41
72
|
static get encapsulation() { return "shadow"; }
|
|
@@ -139,6 +170,76 @@ export class HorizontalScroll {
|
|
|
139
170
|
"attribute": "task-list-width",
|
|
140
171
|
"reflect": false
|
|
141
172
|
},
|
|
173
|
+
"scrollableTaskList": {
|
|
174
|
+
"type": "boolean",
|
|
175
|
+
"mutable": false,
|
|
176
|
+
"complexType": {
|
|
177
|
+
"original": "boolean",
|
|
178
|
+
"resolved": "boolean",
|
|
179
|
+
"references": {}
|
|
180
|
+
},
|
|
181
|
+
"required": false,
|
|
182
|
+
"optional": false,
|
|
183
|
+
"docs": {
|
|
184
|
+
"tags": [],
|
|
185
|
+
"text": ""
|
|
186
|
+
},
|
|
187
|
+
"attribute": "scrollable-task-list",
|
|
188
|
+
"reflect": false,
|
|
189
|
+
"defaultValue": "false"
|
|
190
|
+
},
|
|
191
|
+
"listCellWidth": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"mutable": false,
|
|
194
|
+
"complexType": {
|
|
195
|
+
"original": "string",
|
|
196
|
+
"resolved": "string",
|
|
197
|
+
"references": {}
|
|
198
|
+
},
|
|
199
|
+
"required": false,
|
|
200
|
+
"optional": false,
|
|
201
|
+
"docs": {
|
|
202
|
+
"tags": [],
|
|
203
|
+
"text": ""
|
|
204
|
+
},
|
|
205
|
+
"attribute": "list-cell-width",
|
|
206
|
+
"reflect": false,
|
|
207
|
+
"defaultValue": "'300px'"
|
|
208
|
+
},
|
|
209
|
+
"taskListScrollWidth": {
|
|
210
|
+
"type": "number",
|
|
211
|
+
"mutable": false,
|
|
212
|
+
"complexType": {
|
|
213
|
+
"original": "number",
|
|
214
|
+
"resolved": "number",
|
|
215
|
+
"references": {}
|
|
216
|
+
},
|
|
217
|
+
"required": false,
|
|
218
|
+
"optional": false,
|
|
219
|
+
"docs": {
|
|
220
|
+
"tags": [],
|
|
221
|
+
"text": ""
|
|
222
|
+
},
|
|
223
|
+
"attribute": "task-list-scroll-width",
|
|
224
|
+
"reflect": false
|
|
225
|
+
},
|
|
226
|
+
"taskListScrollNumber": {
|
|
227
|
+
"type": "number",
|
|
228
|
+
"mutable": false,
|
|
229
|
+
"complexType": {
|
|
230
|
+
"original": "number",
|
|
231
|
+
"resolved": "number",
|
|
232
|
+
"references": {}
|
|
233
|
+
},
|
|
234
|
+
"required": false,
|
|
235
|
+
"optional": false,
|
|
236
|
+
"docs": {
|
|
237
|
+
"tags": [],
|
|
238
|
+
"text": ""
|
|
239
|
+
},
|
|
240
|
+
"attribute": "task-list-scroll-number",
|
|
241
|
+
"reflect": false
|
|
242
|
+
},
|
|
142
243
|
"horizontalScroll": {
|
|
143
244
|
"type": "unknown",
|
|
144
245
|
"mutable": false,
|
|
@@ -158,6 +259,26 @@ export class HorizontalScroll {
|
|
|
158
259
|
"tags": [],
|
|
159
260
|
"text": ""
|
|
160
261
|
}
|
|
262
|
+
},
|
|
263
|
+
"horizontalTaskListScroll": {
|
|
264
|
+
"type": "unknown",
|
|
265
|
+
"mutable": false,
|
|
266
|
+
"complexType": {
|
|
267
|
+
"original": "(event: UIEvent) => void",
|
|
268
|
+
"resolved": "(event: UIEvent) => void",
|
|
269
|
+
"references": {
|
|
270
|
+
"UIEvent": {
|
|
271
|
+
"location": "global",
|
|
272
|
+
"id": "global::UIEvent"
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"required": false,
|
|
277
|
+
"optional": false,
|
|
278
|
+
"docs": {
|
|
279
|
+
"tags": [],
|
|
280
|
+
"text": ""
|
|
281
|
+
}
|
|
161
282
|
}
|
|
162
283
|
};
|
|
163
284
|
}
|
|
@@ -171,6 +292,9 @@ export class HorizontalScroll {
|
|
|
171
292
|
return [{
|
|
172
293
|
"propName": "scrollNumber",
|
|
173
294
|
"methodName": "scrollLeft"
|
|
295
|
+
}, {
|
|
296
|
+
"propName": "taskListScrollNumber",
|
|
297
|
+
"methodName": "listScrollLeft"
|
|
174
298
|
}];
|
|
175
299
|
}
|
|
176
300
|
}
|