@editora/ui-core 0.1.19 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ElementBase-1b301e7f.js → ElementBase-EV6mVBUV.js} +1 -1
- package/dist/{ElementBase-909688f3.mjs → ElementBase-YlTLMsGk.mjs} +3 -3
- package/dist/accordion.cjs.js +3 -3
- package/dist/accordion.esm.js +39 -62
- package/dist/alert-dialog.cjs.js +19 -19
- package/dist/alert-dialog.esm.js +69 -87
- package/dist/alert.cjs.js +1 -1
- package/dist/alert.esm.js +4 -7
- package/dist/anchor.cjs.js +2 -2
- package/dist/anchor.esm.js +3 -3
- package/dist/animated-beam.cjs.js +83 -83
- package/dist/animated-beam.esm.js +250 -277
- package/dist/animated-list.cjs.js +4 -4
- package/dist/animated-list.esm.js +47 -61
- package/dist/animated-text.cjs.js +2 -2
- package/dist/animated-text.esm.js +13 -24
- package/dist/app-header.cjs.js +3 -3
- package/dist/app-header.esm.js +11 -13
- package/dist/aspect-ratio.cjs.js +1 -1
- package/dist/aspect-ratio.esm.js +4 -7
- package/dist/avatar.cjs.js +1 -1
- package/dist/avatar.esm.js +7 -13
- package/dist/badge.cjs.js +1 -1
- package/dist/badge.esm.js +4 -7
- package/dist/block-controls.cjs.js +2 -2
- package/dist/block-controls.esm.js +19 -35
- package/dist/box.cjs.js +1 -1
- package/dist/box.esm.js +8 -15
- package/dist/breadcrumb.cjs.js +2 -2
- package/dist/breadcrumb.esm.js +20 -37
- package/dist/button.cjs.js +1 -521
- package/dist/button.esm.js +2 -671
- package/dist/{calendar-2c11b824.mjs → calendar-DLY4acgn.mjs} +293 -342
- package/dist/{calendar-a8735e40.js → calendar-Dkof-FTK.js} +25 -25
- package/dist/calendar.cjs.js +1 -1
- package/dist/calendar.esm.js +8 -9
- package/dist/card.cjs.js +4 -4
- package/dist/card.esm.js +13 -19
- package/dist/chart.cjs.js +64 -64
- package/dist/chart.esm.js +223 -254
- package/dist/checkbox.cjs.js +1 -1
- package/dist/checkbox.esm.js +2 -3
- package/dist/collapsible.cjs.js +1 -1
- package/dist/collapsible.esm.js +5 -9
- package/dist/{collection-a1aac0c6.mjs → collection-C7URGjEI.mjs} +8 -14
- package/dist/collection.cjs.js +1 -1
- package/dist/collection.esm.js +30 -29
- package/dist/color-picker.cjs.js +10 -10
- package/dist/color-picker.esm.js +190 -253
- package/dist/combobox.cjs.js +13 -13
- package/dist/combobox.esm.js +93 -126
- package/dist/command-palette.cjs.js +3 -3
- package/dist/command-palette.esm.js +19 -30
- package/dist/command.cjs.js +4 -4
- package/dist/command.esm.js +41 -53
- package/dist/components/ui-collection.d.ts.map +1 -1
- package/dist/components/ui-multi-select.d.ts.map +1 -1
- package/dist/components/ui-orbiter.d.ts.map +1 -1
- package/dist/components/ui-portal.d.ts.map +1 -1
- package/dist/components/ui-positioner.d.ts.map +1 -1
- package/dist/components/ui-skeleton.d.ts.map +1 -1
- package/dist/components/ui-sortable.d.ts +8 -0
- package/dist/components/ui-sortable.d.ts.map +1 -1
- package/dist/components/ui-split-button.d.ts +1 -0
- package/dist/components/ui-split-button.d.ts.map +1 -1
- package/dist/components/ui-tabs.d.ts.map +1 -1
- package/dist/components/ui-textarea.d.ts.map +1 -1
- package/dist/components/ui-time-picker.d.ts.map +1 -1
- package/dist/container.cjs.js +2 -2
- package/dist/container.esm.js +2 -3
- package/dist/context-menu.cjs.js +8 -8
- package/dist/context-menu.esm.js +157 -219
- package/dist/control-group.cjs.js +1 -1
- package/dist/control-group.esm.js +2 -3
- package/dist/data-table.cjs.js +4 -4
- package/dist/data-table.esm.js +299 -381
- package/dist/date-field.cjs.js +3 -3
- package/dist/date-field.esm.js +68 -80
- package/dist/date-picker.cjs.js +9 -9
- package/dist/date-picker.esm.js +69 -97
- package/dist/date-range-picker.cjs.js +3 -3
- package/dist/date-range-picker.esm.js +32 -56
- package/dist/date-range-time-picker.cjs.js +9 -9
- package/dist/date-range-time-picker.esm.js +111 -140
- package/dist/date-time-picker.cjs.js +7 -7
- package/dist/date-time-picker.esm.js +115 -147
- package/dist/date-time-utils-Dmost5Ee.js +1 -0
- package/dist/date-time-utils-y1N2gvG2.mjs +268 -0
- package/dist/description.cjs.js +1 -1
- package/dist/description.esm.js +3 -5
- package/dist/dialog.cjs.js +12 -12
- package/dist/dialog.esm.js +44 -63
- package/dist/direction-provider.cjs.js +1 -1
- package/dist/direction-provider.esm.js +2 -3
- package/dist/{dismissable-layer-9c7e6b58.mjs → dismissable-layer-BmPIoK80.mjs} +29 -33
- package/dist/dismissable-layer-DNfrKA20.js +1 -0
- package/dist/dismissable-layer.cjs.js +2 -2
- package/dist/dismissable-layer.esm.js +4 -6
- package/dist/dock.cjs.js +5 -5
- package/dist/dock.esm.js +134 -155
- package/dist/drawer.cjs.js +2 -2
- package/dist/drawer.esm.js +18 -35
- package/dist/dropdown.cjs.js +2 -2
- package/dist/dropdown.esm.js +119 -149
- package/dist/dropzone.cjs.js +1 -1
- package/dist/dropzone.esm.js +0 -1
- package/dist/empty-state.cjs.js +1 -1
- package/dist/empty-state.esm.js +1 -1
- package/dist/field-error.cjs.js +1 -1
- package/dist/field-error.esm.js +3 -5
- package/dist/field.cjs.js +5 -5
- package/dist/field.esm.js +27 -34
- package/dist/fieldset.cjs.js +4 -4
- package/dist/fieldset.esm.js +19 -24
- package/dist/file-upload.cjs.js +4 -4
- package/dist/file-upload.esm.js +69 -93
- package/dist/flex.cjs.js +1 -1
- package/dist/flex.esm.js +5 -9
- package/dist/floating-toolbar.cjs.js +4 -4
- package/dist/floating-toolbar.esm.js +60 -85
- package/dist/focus-scope-Bwug2gDv.js +1 -0
- package/dist/{focus-scope-103833ee.mjs → focus-scope-CmEsG5UZ.mjs} +39 -48
- package/dist/focus-scope.cjs.js +2 -2
- package/dist/focus-scope.esm.js +15 -20
- package/dist/form.cjs.js +2 -2
- package/dist/form.esm.js +26 -53
- package/dist/gantt.cjs.js +43 -43
- package/dist/gantt.esm.js +295 -322
- package/dist/grid.cjs.js +1 -1
- package/dist/grid.esm.js +5 -9
- package/dist/hover-card.cjs.js +4 -4
- package/dist/hover-card.esm.js +22 -28
- package/dist/icon-cloud.cjs.js +7 -7
- package/dist/icon-cloud.esm.js +48 -62
- package/dist/icon.cjs.js +1 -1
- package/dist/icon.esm.js +2 -4
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +378 -390
- package/dist/inline-edit.cjs.js +11 -11
- package/dist/inline-edit.esm.js +32 -36
- package/dist/input.cjs.js +17 -17
- package/dist/input.esm.js +50 -63
- package/dist/label.cjs.js +2 -2
- package/dist/label.esm.js +8 -17
- package/dist/layout.cjs.js +2 -2
- package/dist/layout.esm.js +20 -26
- package/dist/listbox-B6QgECax.js +46 -0
- package/dist/listbox-DJamVeFj.mjs +200 -0
- package/dist/listbox.cjs.js +1 -1
- package/dist/listbox.esm.js +2 -4
- package/dist/marquee.cjs.js +5 -5
- package/dist/marquee.esm.js +33 -50
- package/dist/masonry-grid.cjs.js +1 -1
- package/dist/masonry-grid.esm.js +5 -9
- package/dist/menu.cjs.js +3 -3
- package/dist/menu.esm.js +106 -126
- package/dist/menubar.cjs.js +5 -5
- package/dist/menubar.esm.js +118 -164
- package/dist/meter.cjs.js +2 -2
- package/dist/meter.esm.js +4 -4
- package/dist/multi-select.cjs.js +5 -5
- package/dist/multi-select.esm.js +125 -137
- package/dist/navigation-menu.cjs.js +4 -4
- package/dist/navigation-menu.esm.js +44 -55
- package/dist/number-field.cjs.js +2 -2
- package/dist/number-field.esm.js +73 -98
- package/dist/number-ticker.cjs.js +3 -3
- package/dist/number-ticker.esm.js +22 -43
- package/dist/odometer.cjs.js +1 -1
- package/dist/odometer.esm.js +5 -9
- package/dist/orbiter.cjs.js +13 -13
- package/dist/orbiter.esm.js +79 -90
- package/dist/{overlayManager-5bbd4dc3.mjs → overlayManager-BJjU1VA8.mjs} +4 -5
- package/dist/{overlayManager-0eda4e08.js → overlayManager-CSy3fJmJ.js} +1 -1
- package/dist/pagination.cjs.js +2 -2
- package/dist/pagination.esm.js +14 -18
- package/dist/{panel-group-a376cc5e.mjs → panel-group-8sVNnGxg.mjs} +24 -46
- package/dist/panel-group-CaD0_KQf.js +36 -0
- package/dist/panel-group.cjs.js +1 -1
- package/dist/panel-group.esm.js +2 -5
- package/dist/panel.cjs.js +4 -4
- package/dist/panel.esm.js +8 -10
- package/dist/password-field.cjs.js +9 -9
- package/dist/password-field.esm.js +62 -82
- package/dist/pin-input.cjs.js +3 -3
- package/dist/pin-input.esm.js +33 -39
- package/dist/placement-grid.cjs.js +4 -4
- package/dist/placement-grid.esm.js +108 -131
- package/dist/plugin-panel.cjs.js +7 -7
- package/dist/plugin-panel.esm.js +13 -15
- package/dist/popover.cjs.js +2 -2
- package/dist/popover.esm.js +21 -31
- package/dist/portal-DgpQ3Jo1.js +1 -0
- package/dist/{portal-fe73e5cc.mjs → portal-bR42gHvG.mjs} +43 -48
- package/dist/portal.cjs.js +3 -3
- package/dist/portal.esm.js +20 -28
- package/dist/{positioner-e9770c66.mjs → positioner-D0VGxtYU.mjs} +189 -209
- package/dist/positioner-D_fqyx_j.js +1 -0
- package/dist/positioner.cjs.js +2 -2
- package/dist/positioner.esm.js +22 -28
- package/dist/presence.cjs.js +1 -1
- package/dist/presence.esm.js +7 -13
- package/dist/primitives/auto-scroll.d.ts +9 -0
- package/dist/primitives/auto-scroll.d.ts.map +1 -0
- package/dist/primitives/selector.d.ts +4 -0
- package/dist/primitives/selector.d.ts.map +1 -0
- package/dist/progress.cjs.js +1 -1
- package/dist/progress.esm.js +5 -9
- package/dist/quick-actions.cjs.js +6 -6
- package/dist/quick-actions.esm.js +52 -62
- package/dist/radio-group.cjs.js +13 -13
- package/dist/radio-group.esm.js +39 -51
- package/dist/radio.cjs.js +1 -1
- package/dist/radio.esm.js +5 -9
- package/dist/rating.cjs.js +1 -1
- package/dist/rating.esm.js +12 -23
- package/dist/{roving-focus-group-4350c9a7.mjs → roving-focus-group-Dbm1Jko_.mjs} +3 -6
- package/dist/roving-focus-group.cjs.js +1 -1
- package/dist/roving-focus-group.esm.js +3 -5
- package/dist/runtime-CTaOSmBj.js +1 -0
- package/dist/{runtime-161f68a2.mjs → runtime-D1gFh1fS.mjs} +338 -366
- package/dist/runtime.cjs.js +1 -1
- package/dist/runtime.esm.js +6 -6
- package/dist/scroll-area.cjs.js +3 -3
- package/dist/scroll-area.esm.js +38 -46
- package/dist/{scroll-lock-31da444f.mjs → scroll-lock-LfqXXqsu.mjs} +5 -9
- package/dist/section.cjs.js +1 -1
- package/dist/section.esm.js +1 -1
- package/dist/select.cjs.js +7 -7
- package/dist/select.esm.js +67 -97
- package/dist/selection-popup.cjs.js +1 -1
- package/dist/selection-popup.esm.js +8 -15
- package/dist/selector-BvAh35ve.js +1 -0
- package/dist/selector-WI8pD7YO.mjs +18 -0
- package/dist/separator.cjs.js +1 -1
- package/dist/separator.esm.js +1 -1
- package/dist/sidebar.cjs.js +18 -18
- package/dist/sidebar.esm.js +117 -139
- package/dist/skeleton.cjs.js +11 -11
- package/dist/skeleton.esm.js +27 -24
- package/dist/slider.cjs.js +1 -1
- package/dist/slider.esm.js +6 -11
- package/dist/slot.cjs.js +4 -4
- package/dist/slot.esm.js +16 -19
- package/dist/sortable.cjs.js +79 -65
- package/dist/sortable.esm.js +714 -734
- package/dist/spinning-text.cjs.js +12 -12
- package/dist/spinning-text.esm.js +80 -92
- package/dist/split-button.cjs.js +4 -4
- package/dist/split-button.esm.js +77 -62
- package/dist/splitter.cjs.js +1 -1
- package/dist/splitter.esm.js +1 -1
- package/dist/stepper.cjs.js +8 -8
- package/dist/stepper.esm.js +32 -52
- package/dist/switch.cjs.js +7 -7
- package/dist/switch.esm.js +23 -31
- package/dist/table.cjs.js +2 -2
- package/dist/table.esm.js +46 -56
- package/dist/tabs.cjs.js +8 -8
- package/dist/tabs.esm.js +89 -109
- package/dist/tags-input.cjs.js +4 -4
- package/dist/tags-input.esm.js +45 -62
- package/dist/textarea.cjs.js +10 -10
- package/dist/textarea.esm.js +49 -52
- package/dist/time-field.cjs.js +4 -4
- package/dist/time-field.esm.js +70 -84
- package/dist/time-picker.cjs.js +22 -22
- package/dist/time-picker.esm.js +88 -110
- package/dist/timeline.cjs.js +1 -1
- package/dist/timeline.esm.js +3 -5
- package/dist/toast.cjs.js +2 -2
- package/dist/toast.esm.js +33 -47
- package/dist/toggle-group.cjs.js +6 -6
- package/dist/toggle-group.esm.js +85 -105
- package/dist/toggle.cjs.js +1 -1
- package/dist/toggle.esm.js +3 -5
- package/dist/toolbar.cjs.js +1 -1
- package/dist/toolbar.esm.js +13 -24
- package/dist/tooltip.cjs.js +2 -2
- package/dist/tooltip.esm.js +31 -42
- package/dist/transfer-list.cjs.js +31 -31
- package/dist/transfer-list.esm.js +114 -127
- package/dist/{tree-dcd74a4a.mjs → tree-B3kE8ESs.mjs} +55 -62
- package/dist/tree-Dx_kv_ih.js +39 -0
- package/dist/tree-item.cjs.js +2 -2
- package/dist/tree-item.esm.js +2 -3
- package/dist/tree.cjs.js +1 -1
- package/dist/tree.esm.js +2 -5
- package/dist/ui-button-Q0GNNWKC.mjs +665 -0
- package/dist/ui-button-rXQOS9QJ.js +521 -0
- package/dist/{icon-9e9da03b.js → ui-icon-BzVNC_lr.js} +4 -4
- package/dist/{icon-e2a85cc1.mjs → ui-icon-YI6lyuqU.mjs} +58 -65
- package/dist/visually-hidden.cjs.js +1 -1
- package/dist/visually-hidden.esm.js +1 -1
- package/dist/wizard.cjs.js +14 -14
- package/dist/wizard.esm.js +85 -105
- package/package.json +2 -2
- package/dist/date-time-utils-66480de4.js +0 -1
- package/dist/date-time-utils-a2c7af25.mjs +0 -307
- package/dist/dismissable-layer-193e3bed.js +0 -1
- package/dist/focus-scope-2b12b4e7.js +0 -1
- package/dist/listbox-308789a0.mjs +0 -210
- package/dist/listbox-ef2f708e.js +0 -46
- package/dist/panel-group-40254cdd.js +0 -36
- package/dist/portal-c69756c0.js +0 -1
- package/dist/positioner-33529bb8.js +0 -1
- package/dist/runtime-3f13807b.js +0 -1
- package/dist/tree-0a7a8d05.js +0 -39
- /package/dist/{collection-a2969ad2.js → collection-qv8A8rq4.js} +0 -0
- /package/dist/{menu-item-styles-27fdbac4.mjs → menu-item-styles-CZiPwPwl.mjs} +0 -0
- /package/dist/{menu-item-styles-83ad1e22.js → menu-item-styles-CbNUEwP2.js} +0 -0
- /package/dist/{roving-focus-group-5c059bf9.js → roving-focus-group-BdJ_4Njm.js} +0 -0
- /package/dist/{scroll-lock-d7b0df21.js → scroll-lock-BX6e3Ced.js} +0 -0
package/dist/gantt.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { E as
|
|
2
|
-
const I =
|
|
1
|
+
import { E as It } from "./ElementBase-YlTLMsGk.mjs";
|
|
2
|
+
const I = 1440 * 60 * 1e3, y = 42, _ = 62, J = 376, N = 28, At = 15, vt = At * Math.SQRT2 / 2, gt = {
|
|
3
3
|
day: 36,
|
|
4
4
|
week: 13,
|
|
5
5
|
month: 4.4,
|
|
6
6
|
quarter: 2.2,
|
|
7
7
|
year: 1.15
|
|
8
|
-
},
|
|
8
|
+
}, ht = `
|
|
9
9
|
:host {
|
|
10
10
|
--ui-gantt-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
|
|
11
11
|
--ui-gantt-panel: var(--ui-color-surface, #ffffff);
|
|
@@ -207,7 +207,7 @@ const I = 24 * 60 * 60 * 1e3, $ = 42, _ = 62, J = 376, N = 28, Lt = 15, wt = Lt
|
|
|
207
207
|
|
|
208
208
|
.grid-row,
|
|
209
209
|
.timeline-row {
|
|
210
|
-
block-size: ${
|
|
210
|
+
block-size: ${y}px;
|
|
211
211
|
border-bottom: 1px solid color-mix(in srgb, var(--ui-gantt-border) 56%, transparent);
|
|
212
212
|
}
|
|
213
213
|
|
|
@@ -663,173 +663,163 @@ const I = 24 * 60 * 60 * 1e3, $ = 42, _ = 62, J = 376, N = 28, Lt = 15, wt = Lt
|
|
|
663
663
|
box-shadow: none;
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
-
`,
|
|
666
|
+
`, mt = {
|
|
667
667
|
default: "var(--ui-color-primary, #2563eb)",
|
|
668
668
|
info: "var(--ui-color-info, #0891b2)",
|
|
669
669
|
success: "var(--ui-color-success, #16a34a)",
|
|
670
670
|
warning: "var(--ui-color-warning, #d97706)",
|
|
671
671
|
danger: "var(--ui-color-danger, #dc2626)"
|
|
672
672
|
};
|
|
673
|
-
function
|
|
674
|
-
return String(
|
|
673
|
+
function f(a) {
|
|
674
|
+
return String(a ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
675
675
|
}
|
|
676
|
-
function
|
|
677
|
-
if (
|
|
678
|
-
const
|
|
679
|
-
return Number.isFinite(
|
|
680
|
-
}
|
|
681
|
-
const
|
|
682
|
-
if (
|
|
683
|
-
const
|
|
684
|
-
return Number.isFinite(
|
|
685
|
-
}
|
|
686
|
-
const
|
|
687
|
-
return Number.isFinite(
|
|
676
|
+
function b(a) {
|
|
677
|
+
if (a instanceof Date) {
|
|
678
|
+
const n = a.getTime();
|
|
679
|
+
return Number.isFinite(n) ? D(n) : null;
|
|
680
|
+
}
|
|
681
|
+
const t = String(a || "").trim(), i = /^(\d{4})-(\d{2})-(\d{2})$/.exec(t);
|
|
682
|
+
if (i) {
|
|
683
|
+
const n = Number(i[1]), s = Number(i[2]), l = Number(i[3]), p = new Date(n, s - 1, l).getTime();
|
|
684
|
+
return Number.isFinite(p) ? D(p) : null;
|
|
685
|
+
}
|
|
686
|
+
const e = Date.parse(t);
|
|
687
|
+
return Number.isFinite(e) ? D(e) : null;
|
|
688
688
|
}
|
|
689
|
-
function D(
|
|
690
|
-
const
|
|
691
|
-
return
|
|
689
|
+
function D(a) {
|
|
690
|
+
const t = new Date(a);
|
|
691
|
+
return t.setHours(0, 0, 0, 0), t.getTime();
|
|
692
692
|
}
|
|
693
|
-
function
|
|
694
|
-
return D(
|
|
693
|
+
function x(a, t) {
|
|
694
|
+
return D(a + t * I);
|
|
695
695
|
}
|
|
696
|
-
function S(
|
|
697
|
-
const
|
|
698
|
-
return `${
|
|
696
|
+
function S(a) {
|
|
697
|
+
const t = new Date(a), i = t.getFullYear(), e = String(t.getMonth() + 1).padStart(2, "0"), n = String(t.getDate()).padStart(2, "0");
|
|
698
|
+
return `${i}-${e}-${n}`;
|
|
699
699
|
}
|
|
700
|
-
function O(
|
|
701
|
-
return new Intl.DateTimeFormat(void 0, { month: "short", day: "numeric" }).format(new Date(
|
|
700
|
+
function O(a) {
|
|
701
|
+
return new Intl.DateTimeFormat(void 0, { month: "short", day: "numeric" }).format(new Date(a));
|
|
702
702
|
}
|
|
703
|
-
function
|
|
704
|
-
return
|
|
703
|
+
function ft(a) {
|
|
704
|
+
return a === "day" || a === "month" || a === "quarter" || a === "year" ? a : "week";
|
|
705
705
|
}
|
|
706
|
-
function j(
|
|
707
|
-
return
|
|
706
|
+
function j(a) {
|
|
707
|
+
return a === "start" || a === "end" || a === "label" || a === "progress" ? a : "none";
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
return
|
|
709
|
+
function Lt(a) {
|
|
710
|
+
return a === "soft" || a === "striped" || a === "outline" || a === "glass" ? a : "solid";
|
|
711
711
|
}
|
|
712
|
-
function
|
|
713
|
-
if (!
|
|
714
|
-
return [];
|
|
712
|
+
function Ft(a, t) {
|
|
713
|
+
if (!a) return [];
|
|
715
714
|
try {
|
|
716
|
-
const
|
|
717
|
-
return Array.isArray(
|
|
718
|
-
if (!
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
return null;
|
|
724
|
-
const o = e.type === "summary" || e.type === "milestone" ? e.type : "task", u = o === "milestone" ? s : Math.max(c ?? w(s, 1), w(s, 1)), p = String(e.id || `task-${a + 1}`), m = r.get(p) || {};
|
|
715
|
+
const i = JSON.parse(a);
|
|
716
|
+
return Array.isArray(i) ? i.map((e, n) => {
|
|
717
|
+
if (!e || typeof e != "object") return null;
|
|
718
|
+
const s = e, l = String(s.label || s.text || "").trim(), o = b(s.start), p = Number(s.duration);
|
|
719
|
+
let u = b(s.end);
|
|
720
|
+
if (u == null && o != null && Number.isFinite(p) && (u = x(o, Math.max(0, p))), !l || o == null) return null;
|
|
721
|
+
const d = s.type === "summary" || s.type === "milestone" ? s.type : "task", g = d === "milestone" ? o : Math.max(u ?? x(o, 1), x(o, 1)), c = String(s.id || `task-${n + 1}`), m = t.get(c) || {};
|
|
725
722
|
return {
|
|
726
|
-
id:
|
|
727
|
-
label:
|
|
728
|
-
start: m.start || S(
|
|
729
|
-
end: m.end || S(
|
|
730
|
-
progress: Number.isFinite(Number(
|
|
731
|
-
tone: typeof
|
|
732
|
-
type:
|
|
733
|
-
parent:
|
|
734
|
-
open:
|
|
735
|
-
assignee:
|
|
736
|
-
readonly:
|
|
737
|
-
baselineStart:
|
|
738
|
-
baselineEnd:
|
|
739
|
-
critical:
|
|
740
|
-
segments: Array.isArray(
|
|
723
|
+
id: c,
|
|
724
|
+
label: l,
|
|
725
|
+
start: m.start || S(o),
|
|
726
|
+
end: m.end || S(g),
|
|
727
|
+
progress: Number.isFinite(Number(s.progress)) ? Math.max(0, Math.min(100, Number(s.progress))) : void 0,
|
|
728
|
+
tone: typeof s.tone == "string" ? s.tone : void 0,
|
|
729
|
+
type: d,
|
|
730
|
+
parent: s.parent != null ? String(s.parent) : void 0,
|
|
731
|
+
open: s.open !== !1,
|
|
732
|
+
assignee: s.assignee != null ? String(s.assignee) : s.owner != null ? String(s.owner) : void 0,
|
|
733
|
+
readonly: s.readonly === !0,
|
|
734
|
+
baselineStart: s.baselineStart != null ? String(s.baselineStart) : void 0,
|
|
735
|
+
baselineEnd: s.baselineEnd != null ? String(s.baselineEnd) : void 0,
|
|
736
|
+
critical: s.critical === !0,
|
|
737
|
+
segments: Array.isArray(s.segments) ? s.segments : void 0
|
|
741
738
|
};
|
|
742
739
|
}).filter(Boolean) : [];
|
|
743
740
|
} catch {
|
|
744
741
|
return [];
|
|
745
742
|
}
|
|
746
743
|
}
|
|
747
|
-
function
|
|
748
|
-
if (!
|
|
749
|
-
return [];
|
|
744
|
+
function Dt(a) {
|
|
745
|
+
if (!a) return [];
|
|
750
746
|
try {
|
|
751
|
-
const
|
|
752
|
-
return Array.isArray(
|
|
753
|
-
if (!
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
const s = a.type === "s2s" || a.type === "e2e" || a.type === "s2e" ? a.type : "e2s";
|
|
759
|
-
return { id: String(a.id || `link-${l + 1}`), source: e, target: i, type: s };
|
|
747
|
+
const t = JSON.parse(a);
|
|
748
|
+
return Array.isArray(t) ? t.map((i, e) => {
|
|
749
|
+
if (!i || typeof i != "object") return null;
|
|
750
|
+
const n = i, s = String(n.source || "").trim(), l = String(n.target || "").trim();
|
|
751
|
+
if (!s || !l) return null;
|
|
752
|
+
const o = n.type === "s2s" || n.type === "e2e" || n.type === "s2e" ? n.type : "e2s";
|
|
753
|
+
return { id: String(n.id || `link-${e + 1}`), source: s, target: l, type: o };
|
|
760
754
|
}).filter(Boolean) : [];
|
|
761
755
|
} catch {
|
|
762
756
|
return [];
|
|
763
757
|
}
|
|
764
758
|
}
|
|
765
|
-
function
|
|
766
|
-
return
|
|
767
|
-
if (
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
const a = x(r === "start" ? d.start : d.end) ?? 0, e = x(r === "start" ? l.start : l.end) ?? 0;
|
|
772
|
-
return a - e;
|
|
759
|
+
function Rt(a, t) {
|
|
760
|
+
return t === "none" ? a : [...a].sort((i, e) => {
|
|
761
|
+
if (t === "label") return i.label.localeCompare(e.label);
|
|
762
|
+
if (t === "progress") return Number(e.progress ?? 0) - Number(i.progress ?? 0);
|
|
763
|
+
const n = b(t === "start" ? i.start : i.end) ?? 0, s = b(t === "start" ? e.start : e.end) ?? 0;
|
|
764
|
+
return n - s;
|
|
773
765
|
});
|
|
774
766
|
}
|
|
775
|
-
function
|
|
776
|
-
const
|
|
777
|
-
|
|
778
|
-
const
|
|
779
|
-
|
|
767
|
+
function qt(a, t, i, e) {
|
|
768
|
+
const n = /* @__PURE__ */ new Map(), s = new Map(a.map((d) => [d.id, d]));
|
|
769
|
+
a.forEach((d) => {
|
|
770
|
+
const g = d.parent && s.has(d.parent) ? d.parent : "__root__", c = n.get(g) || [];
|
|
771
|
+
c.push(d), n.set(g, c);
|
|
780
772
|
});
|
|
781
|
-
const
|
|
782
|
-
|
|
783
|
-
if (!
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
const f = (a.get(p.id) || []).length > 0;
|
|
789
|
-
g.push({ ...p, depth: u, hasChildren: f, startMs: m, endMs: h }), f && !r.has(p.id) && c(p.id, u + 1);
|
|
773
|
+
const l = i.trim().toLowerCase(), o = (d) => !l || d.label.toLowerCase().includes(l) || (d.assignee || "").toLowerCase().includes(l) ? !0 : (n.get(d.id) || []).some(o), p = [], u = (d, g) => {
|
|
774
|
+
Rt(n.get(d) || [], e).forEach((c) => {
|
|
775
|
+
if (!o(c)) return;
|
|
776
|
+
const m = b(c.start), h = b(c.end);
|
|
777
|
+
if (m == null || h == null) return;
|
|
778
|
+
const w = (n.get(c.id) || []).length > 0;
|
|
779
|
+
p.push({ ...c, depth: g, hasChildren: w, startMs: m, endMs: h }), w && !t.has(c.id) && u(c.id, g + 1);
|
|
790
780
|
});
|
|
791
781
|
};
|
|
792
|
-
return
|
|
782
|
+
return u("__root__", 0), p;
|
|
793
783
|
}
|
|
794
|
-
function
|
|
795
|
-
const
|
|
796
|
-
for (let
|
|
797
|
-
const
|
|
798
|
-
|
|
784
|
+
function Nt(a, t, i, e, n = 0, s = Number.POSITIVE_INFINITY) {
|
|
785
|
+
const l = Math.max(1, Math.ceil((t - a) / I)), o = e === "day" ? 1 : e === "week" ? 7 : e === "month" ? 30 : e === "quarter" ? 91 : 365, p = Math.max(0, Math.floor(Math.max(0, n - 480) / i / o) * o), u = Math.min(l, Math.ceil((n + s + 960) / i / o) * o), d = [];
|
|
786
|
+
for (let g = p; g <= u; g += o) {
|
|
787
|
+
const c = g * i, m = x(a, g), h = e === "day" ? O(m) : new Intl.DateTimeFormat(void 0, { month: "short", year: e === "week" || e === "month" ? void 0 : "numeric" }).format(new Date(m));
|
|
788
|
+
d.push(`<span class="tick" style="left:${c.toFixed(2)}px">${f(h)}</span>`);
|
|
799
789
|
}
|
|
800
|
-
return
|
|
790
|
+
return d.join("");
|
|
801
791
|
}
|
|
802
|
-
function H(
|
|
803
|
-
return
|
|
792
|
+
function H(a) {
|
|
793
|
+
return a.type === "summary" || a.hasChildren ? "summary" : a.type === "milestone" || a.startMs === a.endMs ? "milestone" : "task";
|
|
804
794
|
}
|
|
805
|
-
function
|
|
806
|
-
const
|
|
807
|
-
return
|
|
795
|
+
function bt(a) {
|
|
796
|
+
const t = H(a);
|
|
797
|
+
return t === "summary" ? 17 + 9 / 2 : t === "milestone" ? 7 + N / 2 : 12 + 18 / 2;
|
|
808
798
|
}
|
|
809
|
-
function
|
|
810
|
-
return H(
|
|
799
|
+
function Ht(a, t) {
|
|
800
|
+
return H(a) === "milestone" ? t(a.startMs) - vt : t(a.startMs);
|
|
811
801
|
}
|
|
812
|
-
function
|
|
813
|
-
return H(
|
|
802
|
+
function Vt(a, t) {
|
|
803
|
+
return H(a) === "milestone" ? t(a.startMs) + vt : t(a.endMs);
|
|
814
804
|
}
|
|
815
|
-
function
|
|
816
|
-
return
|
|
805
|
+
function xt(a, t, i) {
|
|
806
|
+
return t === "start" ? Ht(a, i) : Vt(a, i);
|
|
817
807
|
}
|
|
818
|
-
function
|
|
819
|
-
return
|
|
808
|
+
function Wt(a = "e2s") {
|
|
809
|
+
return a === "s2s" ? { source: "start", target: "start" } : a === "e2e" ? { source: "end", target: "end" } : a === "s2e" ? { source: "start", target: "end" } : { source: "end", target: "start" };
|
|
820
810
|
}
|
|
821
|
-
function
|
|
822
|
-
const
|
|
823
|
-
let
|
|
824
|
-
if (
|
|
825
|
-
const T =
|
|
826
|
-
|
|
811
|
+
function _t(a, t, i, e, n, s) {
|
|
812
|
+
const l = Wt(n), o = l.source === "start" ? -1 : 1, p = l.target === "start" ? 1 : -1, u = xt(a, l.source, s), d = xt(i, l.target, s), g = t * y + bt(a), c = e * y + bt(i), m = 22, h = u + o * m, w = d - p * m, M = 26;
|
|
813
|
+
let k = (h + w) / 2;
|
|
814
|
+
if (o === p) {
|
|
815
|
+
const T = o === 1 ? Math.max(h, w, u, d) + M : Math.min(h, w, u, d) - M;
|
|
816
|
+
k = (o === 1 ? w > h + M : w < h - M) ? k : T;
|
|
827
817
|
} else
|
|
828
|
-
(
|
|
829
|
-
const A = Math.abs(
|
|
830
|
-
return [[
|
|
818
|
+
(o === 1 ? w < h : w > h) && (k = o === 1 ? Math.max(h, u, d) + M : Math.min(h, u, d) - M);
|
|
819
|
+
const A = Math.abs(c - g) < 1 ? l.target === "start" ? c - 16 : c + 16 : c > g ? c - y / 2 + 3 : c + y / 2 - 3;
|
|
820
|
+
return [[u, g], [h, g], [k, g], [k, A], [w, A], [w, c], [d, c]].map(([T, R], P) => `${P === 0 ? "M" : "L"} ${T.toFixed(1)} ${R.toFixed(1)}`).join(" ");
|
|
831
821
|
}
|
|
832
|
-
class
|
|
822
|
+
class jt extends It {
|
|
833
823
|
constructor() {
|
|
834
824
|
super(...arguments), this.collapsed = /* @__PURE__ */ new Set(), this.overrides = /* @__PURE__ */ new Map(), this.drag = null, this.selectedId = null, this.internalFilter = "", this.viewportTop = 0, this.viewportLeft = 0, this.viewportWidth = 1800, this.viewportHeight = 620, this.renderedFirstRow = 0, this.renderedLastRow = 0, this.scrollFrame = null, this.overridesVersion = 0, this.taskCacheRaw = null, this.taskCacheVersion = -1, this.taskCache = [], this.linkCacheRaw = null, this.linkCache = [], this.visibleCacheKey = "", this.visibleCache = [];
|
|
835
825
|
}
|
|
@@ -837,83 +827,79 @@ class Ot extends At {
|
|
|
837
827
|
return ["tasks", "links", "zoom", "filter", "sort", "bar-variant", "variant", "readonly", "show-toolbar", "show-today", "headless"];
|
|
838
828
|
}
|
|
839
829
|
render() {
|
|
840
|
-
const
|
|
841
|
-
if (!
|
|
830
|
+
const t = this.getTasks(), i = this.getLinks(), e = ft(this.getAttribute("zoom")), n = j(this.getAttribute("sort")), s = Lt(this.getAttribute("bar-variant")), l = this.getAttribute("filter") ?? this.internalFilter, o = this.getVisibleTasks(t, l, n), p = this.hasAttribute("readonly"), u = this.getAttribute("show-toolbar") !== "false", d = this.getAttribute("show-today") !== "false";
|
|
831
|
+
if (!t.length) {
|
|
842
832
|
this.setContent(`
|
|
843
|
-
<style>${
|
|
833
|
+
<style>${ht}</style>
|
|
844
834
|
<section class="frame" part="frame">
|
|
845
835
|
<div class="empty" part="empty">No tasks in this range</div>
|
|
846
836
|
</section>
|
|
847
837
|
`);
|
|
848
838
|
return;
|
|
849
839
|
}
|
|
850
|
-
const
|
|
840
|
+
const g = t.map((r) => b(r.start)).filter((r) => r != null), c = t.map((r) => b(r.end)).filter((r) => r != null), m = x(Math.min(...g), -2), h = x(Math.max(...c), 3), w = Math.max(7, Math.ceil((h - m) / I)), M = gt[e], k = Math.max(680, w * M), A = Math.max(o.length * y, y), z = this.getAttribute("virtualized") !== "false" && o.length > 240, T = Math.max(20, Math.ceil(Math.max(420, this.viewportHeight - _) / y)), R = 160, P = Math.max(0, this.viewportTop - _), wt = Math.max(0, Math.floor(P / y)), X = Math.max(180, T * 4), L = z ? Math.max(0, Math.floor(wt / X) * X - R) : 0, B = z ? Math.min(o.length, L + T + R * 2 + X) : o.length, K = o.slice(L, B), V = L * y, W = Math.max(0, (o.length - B) * y);
|
|
851
841
|
this.renderedFirstRow = L, this.renderedLastRow = B;
|
|
852
|
-
const Q = new Map(
|
|
853
|
-
const E = L +
|
|
842
|
+
const Q = new Map(o.map((r, $) => [r.id, { task: r, index: $ }])), tt = new Set(K.map((r) => r.id)), C = (r) => (r - m) / I * M, yt = K.map((r, $) => {
|
|
843
|
+
const E = L + $, v = this.selectedId === r.id ? " selected" : "", F = H(r), G = r.progress == null ? "-" : `${Math.round(r.progress)}%`, U = F === "milestone" ? O(r.startMs) : `${O(r.startMs)} - ${O(r.endMs)}`;
|
|
854
844
|
return `
|
|
855
|
-
<article class="grid-row${
|
|
856
|
-
<div class="grid-cell task-name" role="gridcell" style="padding-left:${10 +
|
|
857
|
-
${
|
|
858
|
-
<span class="name-text" title="${
|
|
845
|
+
<article class="grid-row${v}" part="grid-row" data-task-id="${f(r.id)}" role="row" aria-rowindex="${E + 2}" aria-level="${r.depth + 1}" ${r.hasChildren ? `aria-expanded="${!this.collapsed.has(r.id)}"` : ""}>
|
|
846
|
+
<div class="grid-cell task-name" role="gridcell" style="padding-left:${10 + r.depth * 18}px">
|
|
847
|
+
${r.hasChildren ? `<button class="expander" data-action="toggle" data-task-id="${f(r.id)}" aria-label="${this.collapsed.has(r.id) ? "Expand" : "Collapse"} ${f(r.label)}">${this.collapsed.has(r.id) ? "›" : "⌄"}</button>` : '<span style="inline-size:22px"></span>'}
|
|
848
|
+
<span class="name-text" title="${f(r.label)}">${f(r.label)}</span>
|
|
859
849
|
</div>
|
|
860
|
-
<div class="grid-cell badge" role="gridcell">${
|
|
861
|
-
<div class="grid-cell badge" role="gridcell">${
|
|
862
|
-
<div class="grid-cell badge" role="gridcell">${
|
|
850
|
+
<div class="grid-cell badge" role="gridcell">${f(r.assignee || F)}</div>
|
|
851
|
+
<div class="grid-cell badge" role="gridcell">${f(U)}</div>
|
|
852
|
+
<div class="grid-cell badge" role="gridcell">${f(G)}</div>
|
|
863
853
|
</article>
|
|
864
854
|
`;
|
|
865
|
-
}).join(""),
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
const
|
|
872
|
-
|
|
873
|
-
return "";
|
|
874
|
-
const ut = Math.max(0, Math.min(100, (Z - t.startMs) / ct * 100)), It = (pt - Z) / ct * 100, gt = Math.min(100 - ut, Math.max(1, It));
|
|
875
|
-
return gt <= 0 ? "" : `<span class="split-segment" style="left:${ut.toFixed(2)}%;width:${gt.toFixed(2)}%"></span>`;
|
|
855
|
+
}).join(""), kt = K.map((r, $) => {
|
|
856
|
+
const E = L + $, v = H(r), F = this.selectedId === r.id ? " selected" : "", G = this.selectedId === r.id || !this.selectedId && E === 0, U = mt[r.tone || (v === "summary" ? "info" : "default")] || mt.default, rt = v === "milestone" ? C(r.startMs) - N / 2 : C(r.startMs), St = C(v === "milestone" ? r.startMs : r.endMs), zt = v === "milestone" ? N : Math.max(12, St - rt), Ct = Math.max(0, Math.min(100, Number(r.progress ?? 0))), at = !p && !r.readonly && v !== "summary", nt = at && v === "task", it = v === "task" && r.segments?.length ? r.segments.map((st) => {
|
|
857
|
+
const ot = b(st.start), lt = b(st.end);
|
|
858
|
+
if (ot == null || lt == null) return "";
|
|
859
|
+
const dt = Math.max(I, r.endMs - r.startMs), Z = Math.max(r.startMs, ot), ct = Math.min(r.endMs, lt);
|
|
860
|
+
if (ct <= Z) return "";
|
|
861
|
+
const pt = Math.max(0, Math.min(100, (Z - r.startMs) / dt * 100)), Tt = (ct - Z) / dt * 100, ut = Math.min(100 - pt, Math.max(1, Tt));
|
|
862
|
+
return ut <= 0 ? "" : `<span class="split-segment" style="left:${pt.toFixed(2)}%;width:${ut.toFixed(2)}%"></span>`;
|
|
876
863
|
}).join("") : "";
|
|
877
864
|
return `
|
|
878
|
-
<article class="timeline-row${F}" part="timeline-row" data-task-id="${
|
|
879
|
-
${
|
|
865
|
+
<article class="timeline-row${F}" part="timeline-row" data-task-id="${f(r.id)}" role="row" aria-rowindex="${E + 2}">
|
|
866
|
+
${r.baselineStart && r.baselineEnd ? `<span class="baseline" style="left:${C(b(r.baselineStart) || r.startMs).toFixed(2)}px;width:${Math.max(4, C(b(r.baselineEnd) || r.endMs) - C(b(r.baselineStart) || r.startMs)).toFixed(2)}px"></span>` : ""}
|
|
880
867
|
<button
|
|
881
|
-
class="bar ${
|
|
882
|
-
part="bar ${
|
|
883
|
-
data-task-id="${
|
|
884
|
-
data-kind="${
|
|
868
|
+
class="bar ${v}${r.critical ? " critical" : ""}${it ? " split" : ""}"
|
|
869
|
+
part="bar ${v}"
|
|
870
|
+
data-task-id="${f(r.id)}"
|
|
871
|
+
data-kind="${v}"
|
|
885
872
|
role="gridcell"
|
|
886
873
|
tabindex="${G ? "0" : "-1"}"
|
|
887
|
-
aria-selected="${this.selectedId ===
|
|
874
|
+
aria-selected="${this.selectedId === r.id}"
|
|
888
875
|
aria-colindex="5"
|
|
889
|
-
style="left:${rt.toFixed(2)}px;width:${
|
|
890
|
-
aria-label="${
|
|
876
|
+
style="left:${rt.toFixed(2)}px;width:${zt.toFixed(2)}px;--tone:${U};--progress:${Ct.toFixed(2)}%"
|
|
877
|
+
aria-label="${f(r.label)}"
|
|
891
878
|
${at ? 'data-draggable="true"' : ""}
|
|
892
879
|
>
|
|
893
880
|
${nt ? '<span class="handle start" data-mode="resize-start"></span>' : ""}
|
|
894
881
|
<span class="progress"></span>
|
|
895
882
|
${it}
|
|
896
|
-
${
|
|
883
|
+
${v === "milestone" ? '<span class="milestone-shape"></span>' : ""}
|
|
897
884
|
<span class="drag-tip"></span>
|
|
898
885
|
${nt ? '<span class="handle end" data-mode="resize-end"></span>' : ""}
|
|
899
886
|
</button>
|
|
900
887
|
</article>
|
|
901
888
|
`;
|
|
902
|
-
}).join(""), et =
|
|
903
|
-
const
|
|
904
|
-
if (
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
}).join(""), Mt = et ? '<defs><marker id="ui-gantt-arrow" markerWidth="9" markerHeight="9" refX="8.5" refY="4.5" orient="auto" markerUnits="userSpaceOnUse"><path d="M 0.5 0.75 L 8.5 4.5 L 0.5 8.25 z" /></marker></defs>' : "", Y = D(Date.now()), Et = C(Y), St = o && Y >= m && Y <= h ? `<div class="today" part="today" style="left:${Et.toFixed(2)}px"></div>` : "";
|
|
889
|
+
}).join(""), et = i.map((r) => {
|
|
890
|
+
const $ = Q.get(r.source), E = Q.get(r.target);
|
|
891
|
+
if (!$ || !E || z && !tt.has(r.source) && !tt.has(r.target)) return "";
|
|
892
|
+
const v = _t($.task, $.index, E.task, E.index, r.type, C), F = `${$.task.label} dependency to ${E.task.label}`;
|
|
893
|
+
return `<path class="link-hit" d="${v}" data-link-id="${f(r.id)}" data-source-id="${f(r.source)}" data-target-id="${f(r.target)}" data-link-type="${f(r.type || "e2s")}" aria-label="${f(F)}" /><path d="${v}" />`;
|
|
894
|
+
}).join(""), $t = et ? '<defs><marker id="ui-gantt-arrow" markerWidth="9" markerHeight="9" refX="8.5" refY="4.5" orient="auto" markerUnits="userSpaceOnUse"><path d="M 0.5 0.75 L 8.5 4.5 L 0.5 8.25 z" /></marker></defs>' : "", Y = D(Date.now()), Mt = C(Y), Et = d && Y >= m && Y <= h ? `<div class="today" part="today" style="left:${Mt.toFixed(2)}px"></div>` : "";
|
|
909
895
|
this.setContent(`
|
|
910
|
-
<style>${
|
|
911
|
-
<section class="frame" part="frame" data-bar-variant="${
|
|
912
|
-
${
|
|
896
|
+
<style>${ht}</style>
|
|
897
|
+
<section class="frame" part="frame" data-bar-variant="${s}">
|
|
898
|
+
${u ? `
|
|
913
899
|
<header class="toolbar" part="toolbar">
|
|
914
|
-
<div class="title">Project schedule <span class="meta">${
|
|
900
|
+
<div class="title">Project schedule <span class="meta">${o.length}/${t.length} tasks</span></div>
|
|
915
901
|
<div class="controls">
|
|
916
|
-
<input class="control" value="${
|
|
902
|
+
<input class="control" value="${f(l)}" placeholder="Filter tasks" aria-label="Filter tasks" />
|
|
917
903
|
<select class="select" aria-label="Sort tasks">
|
|
918
904
|
${[
|
|
919
905
|
["none", "Manual"],
|
|
@@ -921,33 +907,33 @@ class Ot extends At {
|
|
|
921
907
|
["end", "End date"],
|
|
922
908
|
["label", "Name"],
|
|
923
909
|
["progress", "Progress"]
|
|
924
|
-
].map(([
|
|
910
|
+
].map(([r, $]) => `<option value="${r}" ${n === r ? "selected" : ""}>${$}</option>`).join("")}
|
|
925
911
|
</select>
|
|
926
|
-
${["day", "week", "month", "quarter", "year"].map((
|
|
912
|
+
${["day", "week", "month", "quarter", "year"].map((r) => `<button class="zoom-button" data-zoom="${r}" aria-pressed="${e === r}">${r}</button>`).join("")}
|
|
927
913
|
</div>
|
|
928
914
|
</header>
|
|
929
915
|
` : ""}
|
|
930
916
|
<div class="viewport" part="viewport">
|
|
931
|
-
<div class="surface" part="surface" style="--day-width:${
|
|
917
|
+
<div class="surface" part="surface" style="--day-width:${M}px;grid-template-columns:${J}px ${k.toFixed(2)}px;inline-size:max(100%, ${(J + k).toFixed(2)}px)">
|
|
932
918
|
<header class="grid-head" part="grid-head" role="row">
|
|
933
|
-
<button class="head-button" data-sort="label" role="columnheader" aria-sort="${
|
|
919
|
+
<button class="head-button" data-sort="label" role="columnheader" aria-sort="${n === "label" ? "ascending" : "none"}">Task</button>
|
|
934
920
|
<span role="columnheader">Owner</span>
|
|
935
|
-
<button class="head-button" data-sort="start" role="columnheader" aria-sort="${
|
|
936
|
-
<button class="head-button" data-sort="progress" role="columnheader" aria-sort="${
|
|
921
|
+
<button class="head-button" data-sort="start" role="columnheader" aria-sort="${n === "start" ? "ascending" : "none"}">Dates</button>
|
|
922
|
+
<button class="head-button" data-sort="progress" role="columnheader" aria-sort="${n === "progress" ? "descending" : "none"}">%</button>
|
|
937
923
|
</header>
|
|
938
924
|
<header class="timeline-head" part="timeline-head">
|
|
939
|
-
<div class="scale" style="width:${
|
|
925
|
+
<div class="scale" style="width:${k.toFixed(2)}px">${Nt(m, h, M, e, this.viewportLeft, this.viewportWidth)}</div>
|
|
940
926
|
</header>
|
|
941
|
-
<div class="grid-body" part="grid-body" role="treegrid" aria-rowcount="${
|
|
927
|
+
<div class="grid-body" part="grid-body" role="treegrid" aria-rowcount="${o.length + 1}" aria-colcount="4">
|
|
942
928
|
${z && V ? `<div style="height:${V}px"></div>` : ""}
|
|
943
|
-
${
|
|
929
|
+
${yt || '<div class="empty">No matching tasks</div>'}
|
|
944
930
|
${z && W ? `<div style="height:${W}px"></div>` : ""}
|
|
945
931
|
</div>
|
|
946
|
-
<div class="timeline-body" part="timeline-body" style="width:${
|
|
947
|
-
<svg class="links" width="${
|
|
948
|
-
${
|
|
932
|
+
<div class="timeline-body" part="timeline-body" style="width:${k.toFixed(2)}px;min-height:${A}px">
|
|
933
|
+
<svg class="links" width="${k.toFixed(0)}" height="${A}" viewBox="0 0 ${k.toFixed(0)} ${A}" aria-hidden="true">${$t}${et}</svg>
|
|
934
|
+
${Et}
|
|
949
935
|
${z && V ? `<div style="height:${V}px"></div>` : ""}
|
|
950
|
-
${
|
|
936
|
+
${kt}
|
|
951
937
|
${z && W ? `<div style="height:${W}px"></div>` : ""}
|
|
952
938
|
</div>
|
|
953
939
|
</div>
|
|
@@ -958,207 +944,194 @@ class Ot extends At {
|
|
|
958
944
|
q && (q.scrollTop = this.viewportTop, q.scrollLeft = this.viewportLeft, this.viewportWidth = q.clientWidth || this.viewportWidth, this.viewportHeight = q.clientHeight || this.viewportHeight), this.bindEvents();
|
|
959
945
|
}
|
|
960
946
|
bindEvents() {
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
return;
|
|
968
|
-
if ((o = this.drag) != null && o.moved) {
|
|
969
|
-
e.stopPropagation();
|
|
947
|
+
this.root.querySelectorAll("[data-task-id]").forEach((t) => {
|
|
948
|
+
t.addEventListener("click", (i) => {
|
|
949
|
+
const e = i.target, n = i.currentTarget;
|
|
950
|
+
if (!n.classList.contains("bar") && e.closest(".bar")) return;
|
|
951
|
+
if (this.drag?.moved) {
|
|
952
|
+
i.stopPropagation();
|
|
970
953
|
return;
|
|
971
954
|
}
|
|
972
|
-
const
|
|
973
|
-
|
|
955
|
+
const l = i.currentTarget.dataset.taskId;
|
|
956
|
+
l && (e.closest('[data-action="toggle"]') || (n.classList.contains("bar") && i.stopPropagation(), this.selectTask(l)));
|
|
974
957
|
});
|
|
975
|
-
}), this.root.querySelectorAll('[data-action="toggle"]').forEach((
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
const
|
|
979
|
-
|
|
958
|
+
}), this.root.querySelectorAll('[data-action="toggle"]').forEach((t) => {
|
|
959
|
+
t.addEventListener("click", (i) => {
|
|
960
|
+
i.stopPropagation();
|
|
961
|
+
const e = t.dataset.taskId;
|
|
962
|
+
e && (this.collapsed.has(e) ? this.collapsed.delete(e) : this.collapsed.add(e), this.requestRender());
|
|
980
963
|
});
|
|
981
|
-
}), this.root.querySelectorAll("[data-zoom]").forEach((
|
|
982
|
-
|
|
983
|
-
const
|
|
984
|
-
this.setAttribute("zoom",
|
|
964
|
+
}), this.root.querySelectorAll("[data-zoom]").forEach((t) => {
|
|
965
|
+
t.addEventListener("click", () => {
|
|
966
|
+
const i = t.dataset.zoom || "week";
|
|
967
|
+
this.setAttribute("zoom", i), this.dispatchEvent(new CustomEvent("zoomchange", { detail: { zoom: i }, bubbles: !0, composed: !0 }));
|
|
985
968
|
});
|
|
986
|
-
}), this.root.querySelectorAll(".head-button[data-sort]").forEach((
|
|
987
|
-
|
|
988
|
-
const
|
|
989
|
-
|
|
969
|
+
}), this.root.querySelectorAll(".head-button[data-sort]").forEach((t) => {
|
|
970
|
+
t.addEventListener("click", () => {
|
|
971
|
+
const i = j(t.dataset.sort || null);
|
|
972
|
+
i === "none" ? this.removeAttribute("sort") : this.setAttribute("sort", i), this.dispatchEvent(new CustomEvent("sortchange", { detail: { sort: i }, bubbles: !0, composed: !0 }));
|
|
990
973
|
});
|
|
991
|
-
}),
|
|
992
|
-
const
|
|
993
|
-
this.viewportTop =
|
|
974
|
+
}), this.root.querySelector(".viewport")?.addEventListener("scroll", (t) => {
|
|
975
|
+
const i = t.currentTarget, e = i.scrollTop, n = i.scrollLeft, s = Math.max(20, Math.ceil(Math.max(420, this.viewportHeight - _) / y)), l = Math.max(0, Math.floor(Math.max(0, e - _) / y)), o = l < this.renderedFirstRow + 64 || l + s > this.renderedLastRow - 64, p = Math.abs(n - this.viewportLeft) >= Math.max(480, this.viewportWidth * 0.6);
|
|
976
|
+
this.viewportTop = e, this.viewportLeft = n, !(!o && !p) && this.scrollFrame == null && (this.scrollFrame = window.setTimeout(() => {
|
|
994
977
|
this.scrollFrame = null, this.requestRender();
|
|
995
978
|
}, 24));
|
|
996
|
-
}, { passive: !0 }),
|
|
997
|
-
this.internalFilter =
|
|
998
|
-
}),
|
|
999
|
-
const
|
|
1000
|
-
|
|
1001
|
-
}), this.root.querySelectorAll(".link-hit").forEach((
|
|
1002
|
-
|
|
1003
|
-
|
|
979
|
+
}, { passive: !0 }), this.root.querySelector(".control")?.addEventListener("input", (t) => {
|
|
980
|
+
this.internalFilter = t.currentTarget.value, this.dispatchEvent(new CustomEvent("filterchange", { detail: { filter: this.internalFilter }, bubbles: !0, composed: !0 })), this.requestRender();
|
|
981
|
+
}), this.root.querySelector(".select")?.addEventListener("change", (t) => {
|
|
982
|
+
const i = j(t.currentTarget.value);
|
|
983
|
+
i === "none" ? this.removeAttribute("sort") : this.setAttribute("sort", i), this.dispatchEvent(new CustomEvent("sortchange", { detail: { sort: i }, bubbles: !0, composed: !0 }));
|
|
984
|
+
}), this.root.querySelectorAll(".link-hit").forEach((t) => {
|
|
985
|
+
t.addEventListener("click", (i) => {
|
|
986
|
+
i.stopPropagation(), this.dispatchEvent(new CustomEvent("linkselect", {
|
|
1004
987
|
detail: {
|
|
1005
|
-
id:
|
|
1006
|
-
source:
|
|
1007
|
-
target:
|
|
1008
|
-
type:
|
|
988
|
+
id: t.dataset.linkId || "",
|
|
989
|
+
source: t.dataset.sourceId || "",
|
|
990
|
+
target: t.dataset.targetId || "",
|
|
991
|
+
type: t.dataset.linkType || "e2s"
|
|
1009
992
|
},
|
|
1010
993
|
bubbles: !0,
|
|
1011
994
|
composed: !0
|
|
1012
995
|
}));
|
|
1013
996
|
});
|
|
1014
|
-
}), !this.hasAttribute("readonly") && this.root.querySelectorAll('.bar[data-draggable="true"]').forEach((
|
|
1015
|
-
|
|
1016
|
-
if (
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
taskId: s,
|
|
1028
|
-
mode: h,
|
|
1029
|
-
startX: i.clientX,
|
|
997
|
+
}), !this.hasAttribute("readonly") && this.root.querySelectorAll('.bar[data-draggable="true"]').forEach((t) => {
|
|
998
|
+
t.addEventListener("pointerdown", (e) => {
|
|
999
|
+
if (e.button !== 0) return;
|
|
1000
|
+
const n = t.dataset.taskId;
|
|
1001
|
+
if (!n) return;
|
|
1002
|
+
const l = this.getTasks().find((h) => h.id === n), o = b(l?.start), p = b(l?.end);
|
|
1003
|
+
if (!l || o == null || p == null) return;
|
|
1004
|
+
e.preventDefault();
|
|
1005
|
+
const u = t.dataset.kind || "task", d = e.target.dataset.mode || "move", g = u === "milestone" ? "move" : d, c = ft(this.getAttribute("zoom")), m = this.selectedId !== n;
|
|
1006
|
+
this.selectedId = n, this.dispatchEvent(new CustomEvent("taskselect", { detail: { id: n }, bubbles: !0, composed: !0 })), this.drag = {
|
|
1007
|
+
taskId: n,
|
|
1008
|
+
mode: g,
|
|
1009
|
+
startX: e.clientX,
|
|
1030
1010
|
originalStart: o,
|
|
1031
|
-
originalEnd:
|
|
1032
|
-
kind:
|
|
1011
|
+
originalEnd: p,
|
|
1012
|
+
kind: u,
|
|
1033
1013
|
rangeMin: this.rangeMin(),
|
|
1034
|
-
dayWidth:
|
|
1014
|
+
dayWidth: gt[c],
|
|
1035
1015
|
latestStart: o,
|
|
1036
|
-
latestEnd:
|
|
1016
|
+
latestEnd: p,
|
|
1037
1017
|
frame: null,
|
|
1038
|
-
bar:
|
|
1018
|
+
bar: t,
|
|
1039
1019
|
moved: !1,
|
|
1040
|
-
selectedChanged:
|
|
1041
|
-
},
|
|
1042
|
-
}),
|
|
1043
|
-
if (!this.drag || this.drag.taskId !==
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
let g = this.drag.originalStart, c = this.drag.originalEnd;
|
|
1020
|
+
selectedChanged: m
|
|
1021
|
+
}, t.classList.add("dragging"), t.setPointerCapture(e.pointerId);
|
|
1022
|
+
}), t.addEventListener("pointermove", (e) => {
|
|
1023
|
+
if (!this.drag || this.drag.taskId !== t.dataset.taskId) return;
|
|
1024
|
+
e.preventDefault();
|
|
1025
|
+
const n = e.clientX - this.drag.startX;
|
|
1026
|
+
Math.abs(n) > 2 && (this.drag.moved = !0);
|
|
1027
|
+
let s = this.drag.originalStart, l = this.drag.originalEnd;
|
|
1049
1028
|
if (this.drag.mode === "move") {
|
|
1050
|
-
const o = Math.round(
|
|
1051
|
-
|
|
1029
|
+
const o = Math.round(n / this.drag.dayWidth);
|
|
1030
|
+
s = x(this.drag.originalStart, o), l = this.drag.kind === "milestone" ? s : x(this.drag.originalEnd, o);
|
|
1052
1031
|
} else if (this.drag.mode === "resize-start") {
|
|
1053
|
-
const o = Math.round(
|
|
1054
|
-
|
|
1032
|
+
const o = Math.round(n / this.drag.dayWidth);
|
|
1033
|
+
s = Math.min(x(this.drag.originalStart, o), x(l, -1));
|
|
1055
1034
|
} else {
|
|
1056
|
-
const o = Math.round(
|
|
1057
|
-
|
|
1035
|
+
const o = Math.round(n / this.drag.dayWidth);
|
|
1036
|
+
l = Math.max(x(this.drag.originalEnd, o), x(s, 1));
|
|
1058
1037
|
}
|
|
1059
|
-
this.drag.latestStart =
|
|
1060
|
-
if (!this.drag)
|
|
1061
|
-
return;
|
|
1038
|
+
this.drag.latestStart = s, this.drag.latestEnd = l, this.drag.frame == null && (this.drag.frame = requestAnimationFrame(() => {
|
|
1039
|
+
if (!this.drag) return;
|
|
1062
1040
|
this.drag.frame = null;
|
|
1063
|
-
const o = (this.drag.latestStart - this.drag.rangeMin) / I * this.drag.dayWidth - (this.drag.kind === "milestone" ? N / 2 : 0),
|
|
1064
|
-
this.drag.bar.style.left = `${o.toFixed(2)}px`, this.drag.bar.style.width = `${
|
|
1065
|
-
const
|
|
1066
|
-
|
|
1041
|
+
const o = (this.drag.latestStart - this.drag.rangeMin) / I * this.drag.dayWidth - (this.drag.kind === "milestone" ? N / 2 : 0), p = this.drag.kind === "milestone" ? N : Math.max(12, (this.drag.latestEnd - this.drag.latestStart) / I * this.drag.dayWidth);
|
|
1042
|
+
this.drag.bar.style.left = `${o.toFixed(2)}px`, this.drag.bar.style.width = `${p.toFixed(2)}px`;
|
|
1043
|
+
const u = this.drag.bar.querySelector(".drag-tip");
|
|
1044
|
+
u && (u.textContent = this.drag.kind === "milestone" ? S(this.drag.latestStart) : `${S(this.drag.latestStart)} - ${S(this.drag.latestEnd)}`);
|
|
1067
1045
|
}));
|
|
1068
1046
|
});
|
|
1069
|
-
const
|
|
1070
|
-
if (!this.drag)
|
|
1071
|
-
return;
|
|
1047
|
+
const i = () => {
|
|
1048
|
+
if (!this.drag) return;
|
|
1072
1049
|
this.drag.frame != null && cancelAnimationFrame(this.drag.frame);
|
|
1073
|
-
const
|
|
1074
|
-
if (
|
|
1075
|
-
|
|
1050
|
+
const e = this.drag;
|
|
1051
|
+
if (e.bar.classList.remove("dragging"), this.drag = null, !e.moved) {
|
|
1052
|
+
e.selectedChanged && this.requestRender();
|
|
1076
1053
|
return;
|
|
1077
1054
|
}
|
|
1078
|
-
const
|
|
1079
|
-
id:
|
|
1080
|
-
start: S(
|
|
1081
|
-
end: S(
|
|
1055
|
+
const n = {
|
|
1056
|
+
id: e.taskId,
|
|
1057
|
+
start: S(e.latestStart),
|
|
1058
|
+
end: S(e.latestEnd)
|
|
1082
1059
|
};
|
|
1083
|
-
this.overrides.set(
|
|
1084
|
-
detail:
|
|
1060
|
+
this.overrides.set(e.taskId, { start: n.start, end: n.end }), this.bumpOverrides(), this.dispatchEvent(new CustomEvent("taskchange", {
|
|
1061
|
+
detail: n,
|
|
1085
1062
|
bubbles: !0,
|
|
1086
1063
|
composed: !0
|
|
1087
1064
|
})), this.requestRender();
|
|
1088
1065
|
};
|
|
1089
|
-
|
|
1090
|
-
const
|
|
1091
|
-
if (!
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
i.preventDefault(), this.dispatchEvent(new CustomEvent("taskdelete", { detail: { id: s }, bubbles: !0, composed: !0 }));
|
|
1066
|
+
t.addEventListener("pointerup", i), t.addEventListener("pointercancel", i), t.addEventListener("keydown", (e) => {
|
|
1067
|
+
const n = t.dataset.taskId;
|
|
1068
|
+
if (!n) return;
|
|
1069
|
+
if (e.key === "Delete" || e.key === "Backspace") {
|
|
1070
|
+
e.preventDefault(), this.dispatchEvent(new CustomEvent("taskdelete", { detail: { id: n }, bubbles: !0, composed: !0 }));
|
|
1095
1071
|
return;
|
|
1096
1072
|
}
|
|
1097
|
-
if (
|
|
1098
|
-
|
|
1073
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
1074
|
+
e.preventDefault(), this.selectTask(n);
|
|
1099
1075
|
return;
|
|
1100
1076
|
}
|
|
1101
|
-
if (
|
|
1102
|
-
|
|
1077
|
+
if (e.key === "ArrowUp" || e.key === "ArrowDown") {
|
|
1078
|
+
e.preventDefault(), this.selectAdjacentTask(n, e.key === "ArrowDown" ? 1 : -1);
|
|
1103
1079
|
return;
|
|
1104
1080
|
}
|
|
1105
|
-
if (
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
const p = i.key === "ArrowLeft" ? -1 : 1, m = a.dataset.kind === "milestone", h = i.shiftKey && !m ? o : w(o, p), f = m ? h : i.shiftKey ? Math.max(w(u, p), w(o, 1)) : w(u, p), v = { id: s, start: S(h), end: S(f) };
|
|
1112
|
-
this.overrides.set(s, { start: v.start, end: v.end }), this.bumpOverrides(), this.dispatchEvent(new CustomEvent("taskchange", { detail: v, bubbles: !0, composed: !0 })), this.requestRender();
|
|
1081
|
+
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
1082
|
+
const l = this.getTasks().find((h) => h.id === n), o = b(l?.start), p = b(l?.end);
|
|
1083
|
+
if (!l || o == null || p == null) return;
|
|
1084
|
+
e.preventDefault();
|
|
1085
|
+
const u = e.key === "ArrowLeft" ? -1 : 1, d = t.dataset.kind === "milestone", g = e.shiftKey && !d ? o : x(o, u), c = d ? g : e.shiftKey ? Math.max(x(p, u), x(o, 1)) : x(p, u), m = { id: n, start: S(g), end: S(c) };
|
|
1086
|
+
this.overrides.set(n, { start: m.start, end: m.end }), this.bumpOverrides(), this.dispatchEvent(new CustomEvent("taskchange", { detail: m, bubbles: !0, composed: !0 })), this.requestRender();
|
|
1113
1087
|
});
|
|
1114
1088
|
});
|
|
1115
1089
|
}
|
|
1116
1090
|
rangeMin() {
|
|
1117
|
-
const
|
|
1118
|
-
return
|
|
1091
|
+
const i = this.getTasks().map((e) => b(e.start)).filter((e) => e != null);
|
|
1092
|
+
return i.length ? x(Math.min(...i), -2) : D(Date.now());
|
|
1119
1093
|
}
|
|
1120
|
-
selectTask(
|
|
1121
|
-
if (this.captureViewport(), this.selectedId ===
|
|
1122
|
-
this.dispatchEvent(new CustomEvent("taskselect", { detail: { id:
|
|
1094
|
+
selectTask(t) {
|
|
1095
|
+
if (this.captureViewport(), this.selectedId === t) {
|
|
1096
|
+
this.dispatchEvent(new CustomEvent("taskselect", { detail: { id: t }, bubbles: !0, composed: !0 }));
|
|
1123
1097
|
return;
|
|
1124
1098
|
}
|
|
1125
|
-
this.selectedId =
|
|
1099
|
+
this.selectedId = t, this.dispatchEvent(new CustomEvent("taskselect", { detail: { id: t }, bubbles: !0, composed: !0 })), this.requestRender();
|
|
1126
1100
|
}
|
|
1127
|
-
selectAdjacentTask(
|
|
1128
|
-
const
|
|
1101
|
+
selectAdjacentTask(t, i) {
|
|
1102
|
+
const e = this.getVisibleTasks(
|
|
1129
1103
|
this.getTasks(),
|
|
1130
1104
|
this.getAttribute("filter") ?? this.internalFilter,
|
|
1131
1105
|
j(this.getAttribute("sort"))
|
|
1132
|
-
),
|
|
1133
|
-
!
|
|
1134
|
-
|
|
1135
|
-
(i = this.root.querySelector(`.bar[data-task-id="${CSS.escape(e.id)}"]`)) == null || i.focus();
|
|
1106
|
+
), n = e.findIndex((l) => l.id === t), s = e[Math.max(0, Math.min(e.length - 1, n + i))];
|
|
1107
|
+
!s || s.id === t || (this.selectedId = s.id, this.dispatchEvent(new CustomEvent("taskselect", { detail: { id: s.id }, bubbles: !0, composed: !0 })), this.requestRender(), window.requestAnimationFrame(() => {
|
|
1108
|
+
this.root.querySelector(`.bar[data-task-id="${CSS.escape(s.id)}"]`)?.focus();
|
|
1136
1109
|
}));
|
|
1137
1110
|
}
|
|
1138
1111
|
captureViewport() {
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1112
|
+
const t = this.root.querySelector(".viewport");
|
|
1113
|
+
t && (this.viewportTop = t.scrollTop, this.viewportLeft = t.scrollLeft, this.viewportWidth = t.clientWidth || this.viewportWidth, this.viewportHeight = t.clientHeight || this.viewportHeight);
|
|
1141
1114
|
}
|
|
1142
1115
|
getTasks() {
|
|
1143
|
-
const
|
|
1144
|
-
return
|
|
1116
|
+
const t = this.getAttribute("tasks");
|
|
1117
|
+
return t === this.taskCacheRaw && this.taskCacheVersion === this.overridesVersion ? this.taskCache : (this.taskCacheRaw = t, this.taskCacheVersion = this.overridesVersion, this.taskCache = Ft(t, this.overrides), this.visibleCacheKey = "", this.taskCache);
|
|
1145
1118
|
}
|
|
1146
1119
|
getLinks() {
|
|
1147
|
-
const
|
|
1148
|
-
return
|
|
1120
|
+
const t = this.getAttribute("links");
|
|
1121
|
+
return t === this.linkCacheRaw ? this.linkCache : (this.linkCacheRaw = t, this.linkCache = Dt(t), this.linkCache);
|
|
1149
1122
|
}
|
|
1150
|
-
getVisibleTasks(
|
|
1151
|
-
const
|
|
1152
|
-
return
|
|
1123
|
+
getVisibleTasks(t, i, e) {
|
|
1124
|
+
const n = Array.from(this.collapsed).sort().join(","), s = `${this.taskCacheRaw || ""}|${this.overridesVersion}|${i}|${e}|${n}`;
|
|
1125
|
+
return s === this.visibleCacheKey ? this.visibleCache : (this.visibleCacheKey = s, this.visibleCache = qt(t, this.collapsed, i, e), this.visibleCache);
|
|
1153
1126
|
}
|
|
1154
1127
|
bumpOverrides() {
|
|
1155
1128
|
this.overridesVersion += 1, this.taskCacheVersion = -1, this.visibleCacheKey = "";
|
|
1156
1129
|
}
|
|
1157
|
-
shouldRenderOnAttributeChange(
|
|
1158
|
-
return
|
|
1130
|
+
shouldRenderOnAttributeChange(t, i, e) {
|
|
1131
|
+
return t === "tasks" && (this.overrides.clear(), this.bumpOverrides(), this.viewportTop = 0, this.viewportLeft = 0), t === "links" && (this.linkCacheRaw = null), !0;
|
|
1159
1132
|
}
|
|
1160
1133
|
}
|
|
1161
|
-
typeof customElements < "u" && !customElements.get("ui-gantt") && customElements.define("ui-gantt",
|
|
1134
|
+
typeof customElements < "u" && !customElements.get("ui-gantt") && customElements.define("ui-gantt", jt);
|
|
1162
1135
|
export {
|
|
1163
|
-
|
|
1136
|
+
jt as UIGantt
|
|
1164
1137
|
};
|