@m3ui-vue/m3ui-vue 1.5.0 → 1.6.0
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/API.md +43 -32
- package/dist/{MButton-D_uxtJa-.js → MButton-CPghlKb0.js} +8 -9
- package/dist/MButton-CPghlKb0.js.map +1 -0
- package/dist/{MDialog-DT4KAPmn.js → MDialog-X50At1Gk.js} +38 -44
- package/dist/MDialog-X50At1Gk.js.map +1 -0
- package/dist/{MIcon-Bxh9j135.js → MIcon-DpajuUTJ.js} +2 -3
- package/dist/MIcon-DpajuUTJ.js.map +1 -0
- package/dist/{MIconButton-DoNotQ9v.js → MIconButton-BBggVwBV.js} +5 -6
- package/dist/MIconButton-BBggVwBV.js.map +1 -0
- package/dist/{MListItem-CwYrxpPZ.js → MListItem-DVi1j1QI.js} +8 -14
- package/dist/MListItem-DVi1j1QI.js.map +1 -0
- package/dist/{MLoadingIndicator-DhzECYRI.js → MLoadingIndicator-vooA3110.js} +3 -4
- package/dist/MLoadingIndicator-vooA3110.js.map +1 -0
- package/dist/{MMenuItem-Bih0h4-n.js → MMenuItem-CRNZkVVr.js} +13 -25
- package/dist/MMenuItem-CRNZkVVr.js.map +1 -0
- package/dist/{MProgressBar-BCoruxA-.js → MProgressBar-BWly1UKN.js} +3 -8
- package/dist/MProgressBar-BWly1UKN.js.map +1 -0
- package/dist/{MSeekBar-DQPF5FTp.js → MSeekBar-BL2W5_rD.js} +4 -5
- package/dist/MSeekBar-BL2W5_rD.js.map +1 -0
- package/dist/{MSegmentedButton-DL9JtJFX.js → MSegmentedButton-BEB4gXLA.js} +3 -4
- package/dist/MSegmentedButton-BEB4gXLA.js.map +1 -0
- package/dist/{MSlider-BvoMZTy9.js → MSlider-B9NcKTmZ.js} +22 -23
- package/dist/MSlider-B9NcKTmZ.js.map +1 -0
- package/dist/{MSpinner-CgcCQhS9.js → MSpinner-_XpTRkAg.js} +3 -4
- package/dist/MSpinner-_XpTRkAg.js.map +1 -0
- package/dist/{MTextField-B72dwF6V.js → MTextField-DpcPmR5B.js} +119 -89
- package/dist/MTextField-DpcPmR5B.js.map +1 -0
- package/dist/{MTooltip-YyF1CO75.js → MTooltip-BL3jPYPT.js} +10 -12
- package/dist/MTooltip-BL3jPYPT.js.map +1 -0
- package/dist/THIRD_PARTY_LICENSES.md +2 -2
- package/dist/{_plugin-vue_export-helper-B3ysoDQm.js → _plugin-vue_export-helper-Djzt4Yr7.js} +1 -2
- package/dist/{_storageKeys-CYXsUBwK.js → _storageKeys-C4W_4xK4.js} +2 -3
- package/dist/_storageKeys-C4W_4xK4.js.map +1 -0
- package/dist/{_useEscapeStack-CjndQhqg.js → _useEscapeStack-C5-BYr8y.js} +2 -3
- package/dist/_useEscapeStack-C5-BYr8y.js.map +1 -0
- package/dist/api.json +1 -1
- package/dist/barcode.js +1 -2
- package/dist/barcode.js.map +1 -1
- package/dist/chart.js +2 -4
- package/dist/chart.js.map +1 -1
- package/dist/code-editor.js +22 -23
- package/dist/code-editor.js.map +1 -1
- package/dist/{common-0dgrgaPL.js → common-kIb6A2Qu.js} +8 -37
- package/dist/common-kIb6A2Qu.js.map +1 -0
- package/dist/components/MAbsolute.vue.d.ts +5 -3
- package/dist/components/MAlert.vue.d.ts +8 -6
- package/dist/components/MAppBar.vue.d.ts +9 -7
- package/dist/components/MAppBarWithSearch.vue.d.ts +15 -13
- package/dist/components/MAppLayout.vue.d.ts +13 -11
- package/dist/components/MAspectRatio.vue.d.ts +5 -3
- package/dist/components/MAudioPlayer.vue.d.ts +22 -20
- package/dist/components/MAutocomplete.vue.d.ts +1 -1
- package/dist/components/MAvailabilityCalendar.vue.d.ts +19 -17
- package/dist/components/MBadge.vue.d.ts +6 -4
- package/dist/components/MBar.vue.d.ts +14 -12
- package/dist/components/MBarcode.vue.d.ts +5 -3
- package/dist/components/MBeforeAfter.vue.d.ts +12 -10
- package/dist/components/MBodyMap.vue.d.ts +1 -1
- package/dist/components/MBottomAppBar.vue.d.ts +10 -8
- package/dist/components/MBottomSheet.vue.d.ts +8 -6
- package/dist/components/MBottomSheetScaffold.vue.d.ts +9 -7
- package/dist/components/MBox.vue.d.ts +6 -4
- package/dist/components/MButton.vue.d.ts +7 -5
- package/dist/components/MCard.vue.d.ts +12 -10
- package/dist/components/MCenter.vue.d.ts +5 -3
- package/dist/components/MChatBubble.vue.d.ts +6 -4
- package/dist/components/MCheckbox.vue.d.ts +5 -3
- package/dist/components/MChip.vue.d.ts +9 -7
- package/dist/components/MCircleProgressBar.vue.d.ts +6 -4
- package/dist/components/MCodeEditor.vue.d.ts +5 -3
- package/dist/components/MContainer.vue.d.ts +6 -4
- package/dist/components/MContextMenu.vue.d.ts +8 -6
- package/dist/components/MCopyButton.vue.d.ts +1 -1
- package/dist/components/MDataTable.vue.d.ts +21 -19
- package/dist/components/MDialog.vue.d.ts +21 -19
- package/dist/components/MDragHandle.vue.d.ts +1 -1
- package/dist/components/MDrawCanvas.vue.d.ts +5 -3
- package/dist/components/MDrawToolbar.vue.d.ts +7 -5
- package/dist/components/MEmptyState.vue.d.ts +5 -3
- package/dist/components/MExpansionPanel.vue.d.ts +6 -4
- package/dist/components/MExportButton.vue.d.ts +7 -5
- package/dist/components/MFab.vue.d.ts +11 -9
- package/dist/components/MFabMenu.vue.d.ts +3 -3
- package/dist/components/MFixed.vue.d.ts +5 -3
- package/dist/components/MFlex.vue.d.ts +7 -5
- package/dist/components/MFloorPlan.vue.d.ts +3 -3
- package/dist/components/MFloorPlanInspector.vue.d.ts +32 -30
- package/dist/components/MFloorPlanToolbar.vue.d.ts +2 -2
- package/dist/components/MFlow.vue.d.ts +4 -4
- package/dist/components/MFlowControls.vue.d.ts +6 -4
- package/dist/components/MFlowHandle.vue.d.ts +1 -1
- package/dist/components/MFlowNode.vue.d.ts +11 -9
- package/dist/components/MFooter.vue.d.ts +12 -10
- package/dist/components/MFullscreen.vue.d.ts +5 -3
- package/dist/components/MGantt.vue.d.ts +33 -31
- package/dist/components/MGanttControls.vue.d.ts +8 -6
- package/dist/components/MGrid.vue.d.ts +6 -4
- package/dist/components/MIcon.vue.d.ts +5 -0
- package/dist/components/MIconButton.vue.d.ts +1 -1
- package/dist/components/MImageCropper.vue.d.ts +14 -12
- package/dist/components/MInfiniteScroll.vue.d.ts +11 -9
- package/dist/components/MList.vue.d.ts +5 -3
- package/dist/components/MListGroup.vue.d.ts +7 -5
- package/dist/components/MListItem.vue.d.ts +21 -19
- package/dist/components/MListSubheader.vue.d.ts +5 -3
- package/dist/components/MLoadingOverlay.vue.d.ts +10 -8
- package/dist/components/MMap.vue.d.ts +14 -6
- package/dist/components/MMapControl.vue.d.ts +12 -10
- package/dist/components/MMapFeatureInfo.vue.d.ts +11 -9
- package/dist/components/MMapIdentify.vue.d.ts +9 -7
- package/dist/components/MMapLayers.vue.d.ts +13 -11
- package/dist/components/MMapMarker.vue.d.ts +7 -5
- package/dist/components/MMapPopup.vue.d.ts +5 -3
- package/dist/components/MMasonry.vue.d.ts +5 -3
- package/dist/components/MMenu.vue.d.ts +12 -10
- package/dist/components/MMenuItem.vue.d.ts +11 -9
- package/dist/components/MMultiAutocomplete.vue.d.ts +1 -1
- package/dist/components/MMultiSelect.vue.d.ts +6 -4
- package/dist/components/MNavigationDrawer.vue.d.ts +14 -12
- package/dist/components/MNavigationRail.vue.d.ts +7 -5
- package/dist/components/MOdontogram.vue.d.ts +1 -1
- package/dist/components/MOrderBook.vue.d.ts +1 -1
- package/dist/components/MOverlay.vue.d.ts +5 -3
- package/dist/components/MPdfViewer.vue.d.ts +4 -4
- package/dist/components/MPhoneInput.vue.d.ts +11 -9
- package/dist/components/MPosKeypad.vue.d.ts +18 -16
- package/dist/components/MProgressBar.vue.d.ts +1 -1
- package/dist/components/MPullToRefresh.vue.d.ts +5 -3
- package/dist/components/MQRCode.vue.d.ts +7 -5
- package/dist/components/MRadioGroup.vue.d.ts +1 -1
- package/dist/components/MReceipt.vue.d.ts +2 -2
- package/dist/components/MRelative.vue.d.ts +5 -3
- package/dist/components/MResourceTimeline.vue.d.ts +31 -29
- package/dist/components/MResponsive.vue.d.ts +5 -3
- package/dist/components/MResult.vue.d.ts +7 -5
- package/dist/components/MScrollable.vue.d.ts +7 -5
- package/dist/components/MSearchBar.vue.d.ts +13 -11
- package/dist/components/MSearchField.vue.d.ts +7 -5
- package/dist/components/MSection.vue.d.ts +11 -9
- package/dist/components/MSeekBar.vue.d.ts +3 -3
- package/dist/components/MSelect.vue.d.ts +1 -1
- package/dist/components/MShader.vue.d.ts +11 -9
- package/dist/components/MShortNavigationBar.vue.d.ts +1 -1
- package/dist/components/MSideSheet.vue.d.ts +9 -7
- package/dist/components/MSimpleCarousel.vue.d.ts +1 -1
- package/dist/components/MSkeleton.vue.d.ts +2 -2
- package/dist/components/MSlider.vue.d.ts +3 -3
- package/dist/components/MSparkline.vue.d.ts +1 -1
- package/dist/components/MSplitButton.vue.d.ts +7 -5
- package/dist/components/MSplitter.vue.d.ts +9 -7
- package/dist/components/MSpotlightSearch.vue.d.ts +1 -1
- package/dist/components/MStack.vue.d.ts +8 -6
- package/dist/components/MStatCard.vue.d.ts +5 -3
- package/dist/components/MStepper.vue.d.ts +5 -3
- package/dist/components/MSticky.vue.d.ts +5 -3
- package/dist/components/MSubtitle.vue.d.ts +6 -4
- package/dist/components/MSwipeToDismiss.vue.d.ts +11 -9
- package/dist/components/MTable.vue.d.ts +17 -15
- package/dist/components/MText.vue.d.ts +5 -3
- package/dist/components/MTextField.vue.d.ts +6 -4
- package/dist/components/MTimePickerModal.vue.d.ts +1 -1
- package/dist/components/MTitle.vue.d.ts +6 -4
- package/dist/components/MToggleButton.vue.d.ts +5 -3
- package/dist/components/MToolbar.vue.d.ts +24 -22
- package/dist/components/MTooltip.vue.d.ts +10 -8
- package/dist/components/MTopAppBar.vue.d.ts +22 -20
- package/dist/components/MTour.vue.d.ts +28 -26
- package/dist/components/MTransition.vue.d.ts +5 -3
- package/dist/components/MTree.vue.d.ts +6 -4
- package/dist/components/MTreeTable.vue.d.ts +21 -19
- package/dist/components/MTypewriter.vue.d.ts +6 -4
- package/dist/components/MVirtualTable.vue.d.ts +8 -6
- package/dist/components/_MMapLayerItem.vue.d.ts +8 -6
- package/dist/components/_MPdfPage.vue.d.ts +2 -2
- package/dist/components/_MToolbarFab.vue.d.ts +5 -3
- package/dist/components/_MTreeNode.vue.d.ts +13 -11
- package/dist/composables/_fieldLayout.d.ts +47 -0
- package/dist/composables/useMap.d.ts +8 -0
- package/dist/{dist-CrjSW5DN.js → dist-Bj5kEq8G.js} +4 -6
- package/dist/dist-Bj5kEq8G.js.map +1 -0
- package/dist/draw.js +62 -82
- package/dist/draw.js.map +1 -1
- package/dist/{emoji-names-de-BphO5XpV.js → emoji-names-de-Cu3OSpp6.js} +2 -3
- package/dist/emoji-names-de-Cu3OSpp6.js.map +1 -0
- package/dist/{emoji-names-en-9ZvMRvzi.js → emoji-names-en-BNX1pM9h.js} +2 -3
- package/dist/emoji-names-en-BNX1pM9h.js.map +1 -0
- package/dist/{emoji-names-es-DvfWU3Pj.js → emoji-names-es-C_Dafg4D.js} +2 -3
- package/dist/emoji-names-es-C_Dafg4D.js.map +1 -0
- package/dist/{emoji-names-fr-B-jhUlsP.js → emoji-names-fr-D4HTMFuM.js} +2 -3
- package/dist/emoji-names-fr-D4HTMFuM.js.map +1 -0
- package/dist/{emoji-names-ja-l8cMFJo1.js → emoji-names-ja-BCql-Sj6.js} +2 -3
- package/dist/emoji-names-ja-BCql-Sj6.js.map +1 -0
- package/dist/{emoji-names-ko-YP-o9G0c.js → emoji-names-ko-CT8L52nn.js} +2 -3
- package/dist/emoji-names-ko-CT8L52nn.js.map +1 -0
- package/dist/{emoji-names-pt-DGj_Js4M.js → emoji-names-pt-DHiwPiL-.js} +2 -3
- package/dist/emoji-names-pt-DHiwPiL-.js.map +1 -0
- package/dist/{emoji-names-zh-Dzecwtw_.js → emoji-names-zh-L3FXVief.js} +2 -3
- package/dist/emoji-names-zh-L3FXVief.js.map +1 -0
- package/dist/flow.js +351 -374
- package/dist/flow.js.map +1 -1
- package/dist/{flowPaths-CcWOKY4Z.js → flowPaths-BaH7yaUM.js} +3 -8
- package/dist/flowPaths-BaH7yaUM.js.map +1 -0
- package/dist/gantt.js +272 -333
- package/dist/gantt.js.map +1 -1
- package/dist/locales/index.js +1 -2
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +4085 -4277
- package/dist/m3ui.js.map +1 -1
- package/dist/map.d.ts +1 -1
- package/dist/map.js +521 -520
- package/dist/map.js.map +1 -1
- package/dist/markdown.js +3 -4
- package/dist/markdown.js.map +1 -1
- package/dist/{material-color-utilities-C_iikgRm.js → material-color-utilities-CEFytLsr.js} +15 -32
- package/dist/material-color-utilities-CEFytLsr.js.map +1 -0
- package/dist/media.js +80 -94
- package/dist/media.js.map +1 -1
- package/dist/{motion-DZiXG09o.js → motion-BcejVTeX.js} +2 -3
- package/dist/motion-BcejVTeX.js.map +1 -0
- package/dist/pdf.js +103 -115
- package/dist/pdf.js.map +1 -1
- package/dist/qrcode.js +1 -2
- package/dist/qrcode.js.map +1 -1
- package/dist/rich-text-editor.js +33 -34
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/terminal.js +2 -3
- package/dist/terminal.js.map +1 -1
- package/dist/{useLocale-DLcG3qPC.js → useLocale-COav9m8C.js} +2 -3
- package/dist/useLocale-COav9m8C.js.map +1 -0
- package/dist/{useThemeTokens-DQQcaWbE.js → useThemeTokens-DyAdPQB0.js} +6 -10
- package/dist/useThemeTokens-DyAdPQB0.js.map +1 -0
- package/package.json +32 -32
- package/src/__tests__/MFab.test.ts +10 -1
- package/src/__tests__/MMap.test.ts +16 -1
- package/src/__tests__/_fakeMaplibre.ts +2 -0
- package/src/__tests__/fieldOverflow.test.ts +118 -0
- package/src/components/MAutocomplete.vue +21 -24
- package/src/components/MColorPicker.vue +3 -3
- package/src/components/MDatePicker.vue +4 -4
- package/src/components/MDateRangePicker.vue +4 -4
- package/src/components/MMap.vue +12 -3
- package/src/components/MMapMeasure.vue +3 -1
- package/src/components/MMaskField.vue +16 -24
- package/src/components/MMultiAutocomplete.vue +19 -25
- package/src/components/MMultiSelect.vue +20 -27
- package/src/components/MNumberField.vue +16 -26
- package/src/components/MPinInput.vue +3 -2
- package/src/components/MSearchBar.vue +2 -2
- package/src/components/MSelect.vue +16 -22
- package/src/components/MTagInput.vue +19 -26
- package/src/components/MTextField.vue +18 -46
- package/src/components/MTimePicker.vue +4 -4
- package/src/composables/_fieldLayout.ts +117 -0
- package/src/composables/useMap.ts +17 -0
- package/src/composables/useMapLayers.ts +4 -1
- package/src/map.ts +1 -1
- package/dist/MButton-D_uxtJa-.js.map +0 -1
- package/dist/MDialog-DT4KAPmn.js.map +0 -1
- package/dist/MIcon-Bxh9j135.js.map +0 -1
- package/dist/MIconButton-DoNotQ9v.js.map +0 -1
- package/dist/MListItem-CwYrxpPZ.js.map +0 -1
- package/dist/MLoadingIndicator-DhzECYRI.js.map +0 -1
- package/dist/MMenuItem-Bih0h4-n.js.map +0 -1
- package/dist/MProgressBar-BCoruxA-.js.map +0 -1
- package/dist/MSeekBar-DQPF5FTp.js.map +0 -1
- package/dist/MSegmentedButton-DL9JtJFX.js.map +0 -1
- package/dist/MSlider-BvoMZTy9.js.map +0 -1
- package/dist/MSpinner-CgcCQhS9.js.map +0 -1
- package/dist/MTextField-B72dwF6V.js.map +0 -1
- package/dist/MTooltip-YyF1CO75.js.map +0 -1
- package/dist/_storageKeys-CYXsUBwK.js.map +0 -1
- package/dist/_useEscapeStack-CjndQhqg.js.map +0 -1
- package/dist/common-0dgrgaPL.js.map +0 -1
- package/dist/dist-CrjSW5DN.js.map +0 -1
- package/dist/emoji-names-de-BphO5XpV.js.map +0 -1
- package/dist/emoji-names-en-9ZvMRvzi.js.map +0 -1
- package/dist/emoji-names-es-DvfWU3Pj.js.map +0 -1
- package/dist/emoji-names-fr-B-jhUlsP.js.map +0 -1
- package/dist/emoji-names-ja-l8cMFJo1.js.map +0 -1
- package/dist/emoji-names-ko-YP-o9G0c.js.map +0 -1
- package/dist/emoji-names-pt-DGj_Js4M.js.map +0 -1
- package/dist/emoji-names-zh-Dzecwtw_.js.map +0 -1
- package/dist/flowPaths-CcWOKY4Z.js.map +0 -1
- package/dist/material-color-utilities-C_iikgRm.js.map +0 -1
- package/dist/motion-DZiXG09o.js.map +0 -1
- package/dist/useLocale-DLcG3qPC.js.map +0 -1
- package/dist/useThemeTokens-DQQcaWbE.js.map +0 -1
package/dist/gantt.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as t, l as n, t as r, u as i } from "./MIconButton-
|
|
3
|
-
import {
|
|
4
|
-
import { t as o } from "./
|
|
1
|
+
import { t as e } from "./flowPaths-BaH7yaUM.js";
|
|
2
|
+
import { f as t, l as n, t as r, u as i } from "./MIconButton-BBggVwBV.js";
|
|
3
|
+
import { i as a } from "./useLocale-COav9m8C.js";
|
|
4
|
+
import { t as o } from "./MSegmentedButton-BEB4gXLA.js";
|
|
5
5
|
import { Fragment as s, Teleport as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as g, inject as _, nextTick as v, normalizeClass as y, normalizeStyle as b, onBeforeUnmount as ee, onBeforeUpdate as te, onMounted as ne, onUpdated as re, openBlock as x, provide as ie, ref as S, renderList as C, renderSlot as ae, shallowRef as oe, toDisplayString as w, toRaw as se, unref as T, useSlots as ce, vModelText as le, watch as E, withDirectives as ue, withKeys as de, withModifiers as fe } from "vue";
|
|
6
|
-
|
|
6
|
+
// src/composables/useGantt.ts
|
|
7
7
|
var pe = Symbol("m3-gantt"), me = Symbol("m3-timeline-controls");
|
|
8
8
|
function D() {
|
|
9
9
|
let e = _(pe, null);
|
|
10
10
|
if (!e) throw Error("useGantt() must be called inside <MGantt>");
|
|
11
11
|
return e;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
//#region src/composables/_ganttTime.ts
|
|
13
|
+
// src/composables/_ganttTime.ts
|
|
15
14
|
var he = 36e5, O = 864e5, k = [
|
|
16
15
|
"hour",
|
|
17
16
|
"day",
|
|
@@ -180,8 +179,7 @@ function Oe(e) {
|
|
|
180
179
|
function R(e, t, n) {
|
|
181
180
|
return t.includes(new Date(e).getDay()) && !n.has(M(e, !0));
|
|
182
181
|
}
|
|
183
|
-
|
|
184
|
-
//#region src/composables/ganttSchedule.ts
|
|
182
|
+
// src/composables/ganttSchedule.ts
|
|
185
183
|
function ke(e) {
|
|
186
184
|
return typeof e == "string" ? {
|
|
187
185
|
id: e,
|
|
@@ -393,7 +391,7 @@ function Pe(e, t = {}) {
|
|
|
393
391
|
}
|
|
394
392
|
function Fe(e, t = {}) {
|
|
395
393
|
let { sums: n, kids: r, leaves: i, links: a } = W(e), o = /* @__PURE__ */ new Map();
|
|
396
|
-
for (let t of e)
|
|
394
|
+
for (let t of e) n.has(t.id) && r.has(t.id) || o.set(t.id, B(t));
|
|
397
395
|
let s = [...o.keys()].filter((e) => Number.isFinite(o.get(e).start));
|
|
398
396
|
if (!s.length) return {
|
|
399
397
|
tasks: [],
|
|
@@ -454,8 +452,7 @@ function Fe(e, t = {}) {
|
|
|
454
452
|
finish: M(A(b?.start) ? P(y, -1) : y, A(b?.start))
|
|
455
453
|
};
|
|
456
454
|
}
|
|
457
|
-
|
|
458
|
-
//#region src/composables/_useTimeAxis.ts
|
|
455
|
+
// src/composables/_useTimeAxis.ts
|
|
459
456
|
function Ie(e) {
|
|
460
457
|
let t = (t) => Math.min(e.maxPxPerDay(), Math.max(e.minPxPerDay(), t)), n = S(t(e.pxPerDay() ?? xe[e.scale()])), r = l(() => Ee(n.value)), a = r.value;
|
|
461
458
|
E(r, (t) => {
|
|
@@ -509,11 +506,7 @@ function Ie(e) {
|
|
|
509
506
|
t.v += (-700 * (t.z - t.target) - 1.8 * Math.sqrt(700) * t.v) * e, t.z += t.v * e, n -= e;
|
|
510
507
|
}
|
|
511
508
|
let r = Math.abs(t.z - t.target) < .001 && Math.abs(t.v) < .01;
|
|
512
|
-
|
|
513
|
-
b = 0, te = null;
|
|
514
|
-
return;
|
|
515
|
-
}
|
|
516
|
-
b = requestAnimationFrame(p);
|
|
509
|
+
x(Math.exp(r ? t.target : t.z), t.anchor, t.at), r ? (b = 0, te = null) : b = requestAnimationFrame(p);
|
|
517
510
|
};
|
|
518
511
|
b = requestAnimationFrame(p);
|
|
519
512
|
}
|
|
@@ -654,8 +647,7 @@ function Ie(e) {
|
|
|
654
647
|
readView: M
|
|
655
648
|
};
|
|
656
649
|
}
|
|
657
|
-
|
|
658
|
-
//#region src/composables/_dragCursor.ts
|
|
650
|
+
// src/composables/_dragCursor.ts
|
|
659
651
|
function Le(e) {
|
|
660
652
|
let t = document.body;
|
|
661
653
|
t.style.cursor = e, t.style.userSelect = "none", t.classList.add("m3-drag-cursor");
|
|
@@ -664,8 +656,7 @@ function Re() {
|
|
|
664
656
|
let e = document.body;
|
|
665
657
|
e.style.cursor = "", e.style.userSelect = "", e.classList.remove("m3-drag-cursor");
|
|
666
658
|
}
|
|
667
|
-
|
|
668
|
-
//#region src/components/_MTimeHeader.vue?vue&type=script&setup=true&lang.ts
|
|
659
|
+
// src/components/_MTimeHeader.vue?vue&type=script&setup=true&lang.ts
|
|
669
660
|
var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset-x-0 bottom-0 h-7" }, Be = /* @__PURE__ */ g({
|
|
670
661
|
__name: "_MTimeHeader",
|
|
671
662
|
props: {
|
|
@@ -860,8 +851,8 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
|
|
|
860
851
|
"change",
|
|
861
852
|
"delete"
|
|
862
853
|
],
|
|
863
|
-
setup(r, { expose:
|
|
864
|
-
let _ = r, D = g, he = ce(), k =
|
|
854
|
+
setup(r, { expose: o, emit: g }) {
|
|
855
|
+
let _ = r, D = g, he = ce(), k = a(), ge = l(() => _.locale ?? (k.lang === "en" ? void 0 : k.lang)), A = oe(_.tasks);
|
|
865
856
|
E(() => _.tasks, (e) => {
|
|
866
857
|
A.value = e;
|
|
867
858
|
});
|
|
@@ -1040,18 +1031,14 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
|
|
|
1040
1031
|
let n = !1;
|
|
1041
1032
|
for (let [r, i] of e) {
|
|
1042
1033
|
let e = cn.get(r);
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
});
|
|
1052
|
-
continue;
|
|
1053
|
-
}
|
|
1054
|
-
(e.tx !== i.x || e.tw !== i.w) && (e.tx = i.x, e.tw = i.w, n = !0);
|
|
1034
|
+
!e || t ? cn.set(r, {
|
|
1035
|
+
x: i.x,
|
|
1036
|
+
w: i.w,
|
|
1037
|
+
vx: 0,
|
|
1038
|
+
vw: 0,
|
|
1039
|
+
tx: i.x,
|
|
1040
|
+
tw: i.w
|
|
1041
|
+
}) : (e.tx !== i.x || e.tw !== i.w) && (e.tx = i.x, e.tw = i.w, n = !0);
|
|
1055
1042
|
}
|
|
1056
1043
|
for (let t of cn.keys()) e.has(t) || cn.delete(t);
|
|
1057
1044
|
n ? pn() : hn();
|
|
@@ -1157,11 +1144,11 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
|
|
|
1157
1144
|
let [r, i] = e.at(-1);
|
|
1158
1145
|
return `${n} L${r},${i}`;
|
|
1159
1146
|
}
|
|
1160
|
-
function Cn(
|
|
1161
|
-
let
|
|
1162
|
-
if (!
|
|
1163
|
-
let
|
|
1164
|
-
l[0]?.setAttribute("d",
|
|
1147
|
+
function Cn(t, n) {
|
|
1148
|
+
let r = vn.value.find((e) => e.key === t), i = r && xn(r);
|
|
1149
|
+
if (!i) return;
|
|
1150
|
+
let a = Sn(i), [o, s] = i.at(-1), c = r.type === "FS" || r.type === "SS", l = n.querySelectorAll("path");
|
|
1151
|
+
l[0]?.setAttribute("d", a), l[1]?.setAttribute("d", a), l[2]?.setAttribute("d", e(o, s, c ? 0 : Math.PI, 7, !0));
|
|
1165
1152
|
}
|
|
1166
1153
|
function wn(e, t) {
|
|
1167
1154
|
t instanceof SVGGElement ? (un.set(e, t), Cn(e, t)) : un.delete(e);
|
|
@@ -1298,7 +1285,7 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
|
|
|
1298
1285
|
}, Yn(), r && n === "body" ? Ln = setTimeout(() => Zn(e), 250) : r && Zn(e);
|
|
1299
1286
|
}
|
|
1300
1287
|
function Kn(e) {
|
|
1301
|
-
mr.value = null,
|
|
1288
|
+
mr.value = null, e.button !== 0 || e.pointerType === "touch" || Un(e.target) || (Wn(e), Q = {
|
|
1302
1289
|
kind: "pan",
|
|
1303
1290
|
id: e.pointerId,
|
|
1304
1291
|
sx: e.clientX,
|
|
@@ -1386,35 +1373,34 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
|
|
|
1386
1373
|
function Qn(e) {
|
|
1387
1374
|
let t = Q;
|
|
1388
1375
|
if (t && t.id === e.pointerId) {
|
|
1389
|
-
if (Vn.x = e.clientX, Vn.y = e.clientY, t.kind === "split")
|
|
1390
|
-
|
|
1391
|
-
return;
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
return;
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1376
|
+
if (Vn.x = e.clientX, Vn.y = e.clientY, t.kind === "split") Ot(Math.round(Math.min(Math.max(120, t.w + e.clientX - t.sx), Math.max(160, X.value.width - 80))));
|
|
1377
|
+
else {
|
|
1378
|
+
if (t.kind === "pan") return $n(t, e);
|
|
1379
|
+
if (!t.active) {
|
|
1380
|
+
let n = Math.hypot(e.clientX - t.sx, e.clientY - t.sy);
|
|
1381
|
+
if (t.touch) {
|
|
1382
|
+
n > 8 && (Q = null, Xn());
|
|
1383
|
+
return;
|
|
1384
|
+
}
|
|
1385
|
+
if (n < 4) return;
|
|
1386
|
+
if (Zn(e), !t.active) {
|
|
1387
|
+
if (t.kind === "bar" && t.part === "body") {
|
|
1388
|
+
let n = {
|
|
1389
|
+
kind: "pan",
|
|
1390
|
+
id: t.id,
|
|
1391
|
+
sx: t.sx,
|
|
1392
|
+
sy: t.sy,
|
|
1393
|
+
sl: t.sl,
|
|
1394
|
+
st: t.st,
|
|
1395
|
+
moved: !1
|
|
1396
|
+
};
|
|
1397
|
+
Q = n, $n(n, e);
|
|
1398
|
+
}
|
|
1399
|
+
return;
|
|
1413
1400
|
}
|
|
1414
|
-
return;
|
|
1415
1401
|
}
|
|
1402
|
+
tr(e.clientX, e.clientY);
|
|
1416
1403
|
}
|
|
1417
|
-
tr(e.clientX, e.clientY);
|
|
1418
1404
|
}
|
|
1419
1405
|
}
|
|
1420
1406
|
function $n(e, t) {
|
|
@@ -1779,17 +1765,12 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
|
|
|
1779
1765
|
let n = J.value[Math.max(0, Math.min(J.value.length - 1, t))];
|
|
1780
1766
|
n && (zr(n.task.id), e.shiftKey ? G([.../* @__PURE__ */ new Set([...U.value, n.task.id])]) : G([n.task.id]), Xt(n.task.id));
|
|
1781
1767
|
}, a = !_.readonly;
|
|
1782
|
-
if (e.altKey && a && (e.key === "ArrowLeft" || e.key === "ArrowRight"))
|
|
1783
|
-
|
|
1784
|
-
return;
|
|
1785
|
-
}
|
|
1786
|
-
if (e.altKey && a && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
|
|
1768
|
+
if (e.altKey && a && (e.key === "ArrowLeft" || e.key === "ArrowRight")) e.preventDefault(), t.draggable !== !1 && Br(t, e.key === "ArrowLeft" ? -1 : 1, e.shiftKey);
|
|
1769
|
+
else if (e.altKey && a && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
|
|
1787
1770
|
e.preventDefault();
|
|
1788
1771
|
let n = H.value.get(t.parentId && L.value.has(t.parentId) ? t.parentId : void 0) ?? [], r = n[n.findIndex((e) => e.id === t.id) + (e.key === "ArrowUp" ? -1 : 1)];
|
|
1789
1772
|
r && ir(t.id, r.id, e.key === "ArrowUp" ? "before" : "after"), zr(t.id);
|
|
1790
|
-
|
|
1791
|
-
}
|
|
1792
|
-
if (r && a && (e.key === "]" || e.key === "[")) {
|
|
1773
|
+
} else if (r && a && (e.key === "]" || e.key === "[")) {
|
|
1793
1774
|
if (e.preventDefault(), e.key === "]") {
|
|
1794
1775
|
let e = H.value.get(t.parentId && L.value.has(t.parentId) ? t.parentId : void 0) ?? [], n = e[e.findIndex((e) => e.id === t.id) - 1];
|
|
1795
1776
|
if (n) {
|
|
@@ -1798,21 +1779,10 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
|
|
|
1798
1779
|
}
|
|
1799
1780
|
} else t.parentId && L.value.has(t.parentId) && ir(t.id, t.parentId, "after");
|
|
1800
1781
|
zr(t.id);
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
if (r && e.key.toLowerCase() === "
|
|
1804
|
-
|
|
1805
|
-
return;
|
|
1806
|
-
}
|
|
1807
|
-
if (r && e.key.toLowerCase() === "y") {
|
|
1808
|
-
e.preventDefault(), Te();
|
|
1809
|
-
return;
|
|
1810
|
-
}
|
|
1811
|
-
if (r && e.key.toLowerCase() === "a") {
|
|
1812
|
-
e.preventDefault(), G(J.value.map((e) => e.task.id));
|
|
1813
|
-
return;
|
|
1814
|
-
}
|
|
1815
|
-
switch (e.key) {
|
|
1782
|
+
} else if (r && e.key.toLowerCase() === "z") e.preventDefault(), e.shiftKey ? Te() : we();
|
|
1783
|
+
else if (r && e.key.toLowerCase() === "y") e.preventDefault(), Te();
|
|
1784
|
+
else if (r && e.key.toLowerCase() === "a") e.preventDefault(), G(J.value.map((e) => e.task.id));
|
|
1785
|
+
else switch (e.key) {
|
|
1816
1786
|
case "ArrowDown":
|
|
1817
1787
|
e.preventDefault(), i(n + 1);
|
|
1818
1788
|
break;
|
|
@@ -1917,7 +1887,7 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
|
|
|
1917
1887
|
});
|
|
1918
1888
|
}), ee(() => {
|
|
1919
1889
|
Y.value?.removeEventListener("touchmove", dr), Xn(), ur(), cancelAnimationFrame(dn), clearTimeout(hr);
|
|
1920
|
-
}),
|
|
1890
|
+
}), o(Wr), (e, t) => (x(), f("div", {
|
|
1921
1891
|
class: "m3-gantt flex flex-col overflow-hidden rounded-md bg-surface text-on-surface",
|
|
1922
1892
|
onKeydown: Hr
|
|
1923
1893
|
}, [
|
|
@@ -2310,10 +2280,10 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
|
|
|
2310
2280
|
default: !0
|
|
2311
2281
|
}
|
|
2312
2282
|
},
|
|
2313
|
-
setup(
|
|
2314
|
-
let
|
|
2315
|
-
if (!
|
|
2316
|
-
let
|
|
2283
|
+
setup(e) {
|
|
2284
|
+
let t = e, n = _(me, null);
|
|
2285
|
+
if (!n) throw Error("MGanttControls must be inside <MGantt> or <MResourceTimeline>");
|
|
2286
|
+
let i = n, c = a(), m = {
|
|
2317
2287
|
hour: "ganttScaleHour",
|
|
2318
2288
|
day: "ganttScaleDay",
|
|
2319
2289
|
week: "ganttScaleWeek",
|
|
@@ -2326,73 +2296,73 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
|
|
|
2326
2296
|
ne(() => {
|
|
2327
2297
|
v = window.matchMedia?.("(pointer: coarse)"), y(), v?.addEventListener?.("change", y);
|
|
2328
2298
|
}), ee(() => v?.removeEventListener?.("change", y));
|
|
2329
|
-
let b = l(() => g.value ? 48 : "sm"), te = l(() =>
|
|
2299
|
+
let b = l(() => g.value ? 48 : "sm"), te = l(() => t.list && !!i.hasList?.value && !!i.setGridCollapsed), re = l(() => t.scales.map((e) => ({
|
|
2330
2300
|
value: e,
|
|
2331
2301
|
label: c[m[e]]
|
|
2332
2302
|
})));
|
|
2333
|
-
return (
|
|
2303
|
+
return (t, n) => (x(), f("div", bt, [
|
|
2334
2304
|
te.value ? (x(), u(r, {
|
|
2335
2305
|
key: 0,
|
|
2336
2306
|
size: b.value,
|
|
2337
|
-
icon: T(
|
|
2338
|
-
label: T(
|
|
2339
|
-
onClick: n[0] ||= (e) => T(
|
|
2307
|
+
icon: T(i).gridCollapsed.value ? "left_panel_open" : "left_panel_close",
|
|
2308
|
+
label: T(i).gridCollapsed.value ? T(c).ganttShowList : T(c).ganttHideList,
|
|
2309
|
+
onClick: n[0] ||= (e) => T(i).setGridCollapsed(!T(i).gridCollapsed.value)
|
|
2340
2310
|
}, null, 8, [
|
|
2341
2311
|
"size",
|
|
2342
2312
|
"icon",
|
|
2343
2313
|
"label"
|
|
2344
2314
|
])) : d("", !0),
|
|
2345
|
-
ae(
|
|
2346
|
-
re.value.length ? (x(), u(
|
|
2315
|
+
ae(t.$slots, "default"),
|
|
2316
|
+
re.value.length ? (x(), u(o, {
|
|
2347
2317
|
key: 1,
|
|
2348
|
-
"model-value": T(
|
|
2318
|
+
"model-value": T(i).scale.value,
|
|
2349
2319
|
options: re.value,
|
|
2350
2320
|
density: "compact",
|
|
2351
|
-
"onUpdate:modelValue": n[1] ||= (e) => T(
|
|
2321
|
+
"onUpdate:modelValue": n[1] ||= (e) => T(i).setScale(e)
|
|
2352
2322
|
}, null, 8, ["model-value", "options"])) : d("", !0),
|
|
2353
2323
|
p("div", Y, [
|
|
2354
|
-
|
|
2324
|
+
e.zoom ? (x(), f(s, { key: 0 }, [h(r, {
|
|
2355
2325
|
size: b.value,
|
|
2356
2326
|
icon: "zoom_out",
|
|
2357
2327
|
label: T(c).ganttZoomOut,
|
|
2358
|
-
onClick: n[2] ||= (e) => T(
|
|
2328
|
+
onClick: n[2] ||= (e) => T(i).zoomOut()
|
|
2359
2329
|
}, null, 8, ["size", "label"]), h(r, {
|
|
2360
2330
|
size: b.value,
|
|
2361
2331
|
icon: "zoom_in",
|
|
2362
2332
|
label: T(c).ganttZoomIn,
|
|
2363
|
-
onClick: n[3] ||= (e) => T(
|
|
2333
|
+
onClick: n[3] ||= (e) => T(i).zoomIn()
|
|
2364
2334
|
}, null, 8, ["size", "label"])], 64)) : d("", !0),
|
|
2365
|
-
|
|
2335
|
+
e.fit ? (x(), u(r, {
|
|
2366
2336
|
key: 1,
|
|
2367
2337
|
size: b.value,
|
|
2368
2338
|
icon: "fit_width",
|
|
2369
2339
|
label: T(c).ganttFit,
|
|
2370
|
-
onClick: n[4] ||= (e) => T(
|
|
2340
|
+
onClick: n[4] ||= (e) => T(i).fit()
|
|
2371
2341
|
}, null, 8, ["size", "label"])) : d("", !0),
|
|
2372
|
-
|
|
2342
|
+
e.today ? (x(), u(r, {
|
|
2373
2343
|
key: 2,
|
|
2374
2344
|
size: b.value,
|
|
2375
2345
|
icon: "today",
|
|
2376
2346
|
label: T(c).ganttToday,
|
|
2377
|
-
onClick: n[5] ||= (e) => T(
|
|
2347
|
+
onClick: n[5] ||= (e) => T(i).scrollToDate()
|
|
2378
2348
|
}, null, 8, ["size", "label"])) : d("", !0),
|
|
2379
|
-
|
|
2349
|
+
e.fold && T(i).foldable.value ? (x(), u(r, {
|
|
2380
2350
|
key: 3,
|
|
2381
2351
|
size: b.value,
|
|
2382
|
-
icon: T(
|
|
2383
|
-
label: T(
|
|
2384
|
-
onClick: n[6] ||= (e) => T(
|
|
2352
|
+
icon: T(i).folded.value ? "unfold_more" : "unfold_less",
|
|
2353
|
+
label: T(i).folded.value ? T(c).ganttExpandAll : T(c).ganttCollapseAll,
|
|
2354
|
+
onClick: n[6] ||= (e) => T(i).folded.value ? T(i).expandAll() : T(i).collapseAll()
|
|
2385
2355
|
}, null, 8, [
|
|
2386
2356
|
"size",
|
|
2387
2357
|
"icon",
|
|
2388
2358
|
"label"
|
|
2389
2359
|
])) : d("", !0),
|
|
2390
|
-
|
|
2360
|
+
e.history && !T(i).readonly.value ? (x(), f(s, { key: 4 }, [h(r, {
|
|
2391
2361
|
size: b.value,
|
|
2392
2362
|
icon: "undo",
|
|
2393
2363
|
label: T(c).ganttUndo,
|
|
2394
|
-
disabled: !T(
|
|
2395
|
-
onClick: n[7] ||= (e) => T(
|
|
2364
|
+
disabled: !T(i).canUndo.value,
|
|
2365
|
+
onClick: n[7] ||= (e) => T(i).undo()
|
|
2396
2366
|
}, null, 8, [
|
|
2397
2367
|
"size",
|
|
2398
2368
|
"label",
|
|
@@ -2401,8 +2371,8 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
|
|
|
2401
2371
|
size: b.value,
|
|
2402
2372
|
icon: "redo",
|
|
2403
2373
|
label: T(c).ganttRedo,
|
|
2404
|
-
disabled: !T(
|
|
2405
|
-
onClick: n[8] ||= (e) => T(
|
|
2374
|
+
disabled: !T(i).canRedo.value,
|
|
2375
|
+
onClick: n[8] ||= (e) => T(i).redo()
|
|
2406
2376
|
}, null, 8, [
|
|
2407
2377
|
"size",
|
|
2408
2378
|
"label",
|
|
@@ -2410,12 +2380,11 @@ var ze = { class: "absolute inset-x-0 top-0 h-7" }, K = { class: "absolute inset
|
|
|
2410
2380
|
])], 64)) : d("", !0)
|
|
2411
2381
|
]),
|
|
2412
2382
|
n[9] ||= p("div", { class: "flex-1" }, null, -1),
|
|
2413
|
-
ae(
|
|
2383
|
+
ae(t.$slots, "end")
|
|
2414
2384
|
]));
|
|
2415
2385
|
}
|
|
2416
2386
|
});
|
|
2417
|
-
|
|
2418
|
-
//#region src/composables/ganttFormats.ts
|
|
2387
|
+
// src/composables/ganttFormats.ts
|
|
2419
2388
|
function St(e) {
|
|
2420
2389
|
let t = ke(e);
|
|
2421
2390
|
return `${t.id}${t.type !== "FS" || t.lag ? ` ${t.type}` : ""}${t.lag ? t.lag > 0 ? `+${t.lag}` : String(t.lag) : ""}`;
|
|
@@ -2734,16 +2703,14 @@ function Vt(e, t = {}) {
|
|
|
2734
2703
|
tasks: l
|
|
2735
2704
|
};
|
|
2736
2705
|
}
|
|
2737
|
-
|
|
2738
|
-
//#region src/composables/useResourceTimeline.ts
|
|
2706
|
+
// src/composables/useResourceTimeline.ts
|
|
2739
2707
|
var Ht = Symbol("m3-resource-timeline");
|
|
2740
2708
|
function Ut() {
|
|
2741
2709
|
let e = _(Ht, null);
|
|
2742
2710
|
if (!e) throw Error("useResourceTimeline() must be called inside <MResourceTimeline>");
|
|
2743
2711
|
return e;
|
|
2744
2712
|
}
|
|
2745
|
-
|
|
2746
|
-
//#region src/components/MResourceTimeline.vue?vue&type=script&setup=true&lang.ts
|
|
2713
|
+
// src/components/MResourceTimeline.vue?vue&type=script&setup=true&lang.ts
|
|
2747
2714
|
var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "truncate" }, qt = { class: "ml-auto pr-2 text-label-medium text-on-surface-variant" }, Jt = ["src"], Yt = {
|
|
2748
2715
|
key: 0,
|
|
2749
2716
|
class: "material-symbols-outlined text-[20px]"
|
|
@@ -2811,9 +2778,9 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
2811
2778
|
"conflict",
|
|
2812
2779
|
"delete"
|
|
2813
2780
|
],
|
|
2814
|
-
setup(
|
|
2815
|
-
let
|
|
2816
|
-
E(() =>
|
|
2781
|
+
setup(e, { expose: t, emit: n }) {
|
|
2782
|
+
let r = e, o = n, c = a(), u = l(() => r.locale ?? (c.lang === "en" ? void 0 : c.lang)), g = oe(r.events);
|
|
2783
|
+
E(() => r.events, (e) => {
|
|
2817
2784
|
g.value = e;
|
|
2818
2785
|
});
|
|
2819
2786
|
let _ = oe(null), te = l(() => _.value ?? g.value), re = [], ce = [], le = S(0);
|
|
@@ -2831,8 +2798,8 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
2831
2798
|
let e = ce.pop();
|
|
2832
2799
|
e && (re.push(se(g.value)), le.value++, ue(e));
|
|
2833
2800
|
}
|
|
2834
|
-
let ge = l(() => (le.value, re.length > 0)), A = l(() => (le.value, ce.length > 0)), _e = l(() => new Map(te.value.map((e) => [e.id, e]))), N = l(() => new Map(
|
|
2835
|
-
E(() =>
|
|
2801
|
+
let ge = l(() => (le.value, re.length > 0)), A = l(() => (le.value, ce.length > 0)), _e = l(() => new Map(te.value.map((e) => [e.id, e]))), N = l(() => new Map(r.resources.map((e) => [e.id, e]))), P = S(r.selection ?? []);
|
|
2802
|
+
E(() => r.selection, (e) => {
|
|
2836
2803
|
e && (P.value = e);
|
|
2837
2804
|
});
|
|
2838
2805
|
let ve = l(() => new Set(P.value));
|
|
@@ -2840,8 +2807,8 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
2840
2807
|
let t = e.filter((e) => _e.value.get(e)?.selectable !== !1);
|
|
2841
2808
|
P.value = t, o("update:selection", t);
|
|
2842
2809
|
}
|
|
2843
|
-
let ye = S(
|
|
2844
|
-
E(() =>
|
|
2810
|
+
let ye = S(r.collapsed ?? []);
|
|
2811
|
+
E(() => r.collapsed, (e) => {
|
|
2845
2812
|
e && (ye.value = e);
|
|
2846
2813
|
});
|
|
2847
2814
|
let xe = l(() => new Set(ye.value));
|
|
@@ -2893,37 +2860,31 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
2893
2860
|
return e;
|
|
2894
2861
|
}), L = l(() => new Set(De.value.keys())), R = l(() => {
|
|
2895
2862
|
let e = [], t = /* @__PURE__ */ new Map(), n = [];
|
|
2896
|
-
for (let e of
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
continue;
|
|
2900
|
-
}
|
|
2901
|
-
t.has(e.group) || (t.set(e.group, []), n.push(e.group)), t.get(e.group).push(e);
|
|
2902
|
-
}
|
|
2903
|
-
let r = 0, i = (t) => {
|
|
2904
|
-
let n = Math.max(a.rowHeight, (Te.value.count.get(t.id) ?? 1) * a.laneHeight + 8);
|
|
2863
|
+
for (let e of r.resources) e.group ? (t.has(e.group) || (t.set(e.group, []), n.push(e.group)), t.get(e.group).push(e)) : n.push(e);
|
|
2864
|
+
let i = 0, a = (t) => {
|
|
2865
|
+
let n = Math.max(r.rowHeight, (Te.value.count.get(t.id) ?? 1) * r.laneHeight + 8);
|
|
2905
2866
|
e.push({
|
|
2906
2867
|
kind: "resource",
|
|
2907
2868
|
key: t.id,
|
|
2908
2869
|
resource: t,
|
|
2909
|
-
top:
|
|
2870
|
+
top: i,
|
|
2910
2871
|
height: n
|
|
2911
|
-
}),
|
|
2872
|
+
}), i += n;
|
|
2912
2873
|
};
|
|
2913
|
-
for (let
|
|
2914
|
-
if (typeof
|
|
2915
|
-
|
|
2874
|
+
for (let r of n) {
|
|
2875
|
+
if (typeof r != "string") {
|
|
2876
|
+
a(r);
|
|
2916
2877
|
continue;
|
|
2917
2878
|
}
|
|
2918
|
-
let n = t.get(
|
|
2879
|
+
let n = t.get(r);
|
|
2919
2880
|
e.push({
|
|
2920
2881
|
kind: "group",
|
|
2921
|
-
key: `group:${
|
|
2922
|
-
group:
|
|
2923
|
-
top:
|
|
2882
|
+
key: `group:${r}`,
|
|
2883
|
+
group: r,
|
|
2884
|
+
top: i,
|
|
2924
2885
|
height: ln,
|
|
2925
2886
|
resources: n
|
|
2926
|
-
}),
|
|
2887
|
+
}), i += ln, xe.value.has(r) || n.forEach(a);
|
|
2927
2888
|
}
|
|
2928
2889
|
return e;
|
|
2929
2890
|
}), ke = l(() => {
|
|
@@ -2933,14 +2894,14 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
2933
2894
|
}), Ae = l(() => {
|
|
2934
2895
|
let e = R.value.at(-1);
|
|
2935
2896
|
return e ? e.top + e.height : 0;
|
|
2936
|
-
}), z = (e) => N.value.get(e)?.group, V = S(), Me = S(
|
|
2937
|
-
E(() =>
|
|
2897
|
+
}), z = (e) => N.value.get(e)?.group, V = S(), Me = S(r.listWidth ?? 220);
|
|
2898
|
+
E(() => r.listWidth, (e) => {
|
|
2938
2899
|
e !== void 0 && (Me.value = e);
|
|
2939
2900
|
});
|
|
2940
2901
|
let H = l(() => Me.value), Ne = l(() => {
|
|
2941
2902
|
let e = Infinity, t = -Infinity;
|
|
2942
2903
|
for (let n of I.value.values()) e = Math.min(e, n.start), t = Math.max(t, n.end);
|
|
2943
|
-
let n =
|
|
2904
|
+
let n = r.start ? j(r.start) : r.now ? j(r.now) : Date.now();
|
|
2944
2905
|
return Number.isFinite(e) || (e = n, t = n + O), {
|
|
2945
2906
|
min: Math.min(e, n),
|
|
2946
2907
|
max: Math.max(t, n + O)
|
|
@@ -2950,15 +2911,15 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
2950
2911
|
listWidth: H,
|
|
2951
2912
|
headerHeight: un,
|
|
2952
2913
|
extent: Ne,
|
|
2953
|
-
scale: () =>
|
|
2954
|
-
pxPerDay: () =>
|
|
2955
|
-
minPxPerDay: () =>
|
|
2956
|
-
maxPxPerDay: () =>
|
|
2957
|
-
weekStartsOn: () =>
|
|
2914
|
+
scale: () => r.scale,
|
|
2915
|
+
pxPerDay: () => r.pxPerDay,
|
|
2916
|
+
minPxPerDay: () => r.minPxPerDay,
|
|
2917
|
+
maxPxPerDay: () => r.maxPxPerDay,
|
|
2918
|
+
weekStartsOn: () => r.weekStartsOn,
|
|
2958
2919
|
lang: u,
|
|
2959
2920
|
quarterLabel: () => c.ganttQuarter,
|
|
2960
|
-
today: () =>
|
|
2961
|
-
calendar: () =>
|
|
2921
|
+
today: () => r.now,
|
|
2922
|
+
calendar: () => r.calendar ?? { workingDays: [
|
|
2962
2923
|
0,
|
|
2963
2924
|
1,
|
|
2964
2925
|
2,
|
|
@@ -2967,7 +2928,7 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
2967
2928
|
5,
|
|
2968
2929
|
6
|
|
2969
2930
|
] },
|
|
2970
|
-
workHours: () =>
|
|
2931
|
+
workHours: () => r.workHours,
|
|
2971
2932
|
onScale: (e) => o("update:scale", e),
|
|
2972
2933
|
onPinch: () => {
|
|
2973
2934
|
q && X({ pointerId: q.id });
|
|
@@ -2985,12 +2946,12 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
2985
2946
|
});
|
|
2986
2947
|
}
|
|
2987
2948
|
return e;
|
|
2988
|
-
}), tt = l(() =>
|
|
2949
|
+
}), tt = l(() => r.laneHeight - 8), nt = l(() => {
|
|
2989
2950
|
let e = /* @__PURE__ */ new Map();
|
|
2990
2951
|
for (let t of te.value) {
|
|
2991
|
-
let n = I.value.get(t.id),
|
|
2992
|
-
if (!n || !
|
|
2993
|
-
let
|
|
2952
|
+
let n = I.value.get(t.id), i = ke.value.get(t.resourceId);
|
|
2953
|
+
if (!n || !i) continue;
|
|
2954
|
+
let a = (Te.value.count.get(t.resourceId) ?? 1) * r.laneHeight, o = i.top + (i.height - a) / 2 + (Te.value.lane.get(t.id) ?? 0) * r.laneHeight + 4;
|
|
2994
2955
|
e.set(t.id, {
|
|
2995
2956
|
x: K(n.start),
|
|
2996
2957
|
y: o,
|
|
@@ -3011,33 +2972,25 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3011
2972
|
let n = !1;
|
|
3012
2973
|
for (let [r, i] of e) {
|
|
3013
2974
|
let e = rt.get(r);
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
tw: i.w,
|
|
3034
|
-
vx: 0,
|
|
3035
|
-
vy: 0,
|
|
3036
|
-
vw: 0
|
|
3037
|
-
});
|
|
3038
|
-
continue;
|
|
3039
|
-
}
|
|
3040
|
-
(e.tx !== i.x || e.ty !== i.y || e.tw !== i.w) && (e.tx = i.x, e.ty = i.y, e.tw = i.w, n = !0);
|
|
2975
|
+
!e || t ? rt.set(r, {
|
|
2976
|
+
...i,
|
|
2977
|
+
vx: 0,
|
|
2978
|
+
vy: 0,
|
|
2979
|
+
vw: 0,
|
|
2980
|
+
tx: i.x,
|
|
2981
|
+
ty: i.y,
|
|
2982
|
+
tw: i.w
|
|
2983
|
+
}) : ft.value?.id === r && ft.value.part === "body" ? Object.assign(e, {
|
|
2984
|
+
x: i.x,
|
|
2985
|
+
y: i.y,
|
|
2986
|
+
w: i.w,
|
|
2987
|
+
tx: i.x,
|
|
2988
|
+
ty: i.y,
|
|
2989
|
+
tw: i.w,
|
|
2990
|
+
vx: 0,
|
|
2991
|
+
vy: 0,
|
|
2992
|
+
vw: 0
|
|
2993
|
+
}) : (e.tx !== i.x || e.ty !== i.y || e.tw !== i.w) && (e.tx = i.x, e.ty = i.y, e.tw = i.w, n = !0);
|
|
3041
2994
|
}
|
|
3042
2995
|
for (let t of rt.keys()) e.has(t) || rt.delete(t);
|
|
3043
2996
|
n ? st() : lt();
|
|
@@ -3077,8 +3030,8 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3077
3030
|
function ut(e, t) {
|
|
3078
3031
|
t instanceof HTMLElement ? (it.set(e, t), ct(e, t)) : it.delete(e);
|
|
3079
3032
|
}
|
|
3080
|
-
let q = null, dt, ft = S(null), pt = S(!1), mt = S(
|
|
3081
|
-
E(() =>
|
|
3033
|
+
let q = null, dt, ft = S(null), pt = S(!1), mt = S(r.listWidth ?? 220);
|
|
3034
|
+
E(() => r.listWidth, (e) => {
|
|
3082
3035
|
e !== void 0 && (mt.value = e);
|
|
3083
3036
|
});
|
|
3084
3037
|
function ht(e) {
|
|
@@ -3103,7 +3056,7 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3103
3056
|
return t?.kind === "resource" ? t.resource : void 0;
|
|
3104
3057
|
}
|
|
3105
3058
|
function xt(e) {
|
|
3106
|
-
return e ? 1440 :
|
|
3059
|
+
return e ? 1440 : r.snap ?? (W.value >= 192 ? 15 : Oe(W.value));
|
|
3107
3060
|
}
|
|
3108
3061
|
function St(e, t, n) {
|
|
3109
3062
|
if (e.button !== 0 || yt(e.target)) return;
|
|
@@ -3129,34 +3082,26 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3129
3082
|
function Ct(e) {
|
|
3130
3083
|
if (e.button !== 0 || yt(e.target)) return;
|
|
3131
3084
|
J(e);
|
|
3132
|
-
let t = bt(e.clientX, e.clientY), n = Y(t.y),
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
sy: e.clientY,
|
|
3153
|
-
t0: Ve(t.x),
|
|
3154
|
-
touch: r,
|
|
3155
|
-
active: !1
|
|
3156
|
-
}, Tt());
|
|
3157
|
-
return;
|
|
3158
|
-
}
|
|
3159
|
-
q = {
|
|
3085
|
+
let t = bt(e.clientX, e.clientY), n = Y(t.y), i = e.pointerType === "touch";
|
|
3086
|
+
n && r.creatable && !r.readonly ? (q = {
|
|
3087
|
+
kind: "empty",
|
|
3088
|
+
id: e.pointerId,
|
|
3089
|
+
resourceId: n.id,
|
|
3090
|
+
sx: e.clientX,
|
|
3091
|
+
sy: e.clientY,
|
|
3092
|
+
t0: Ve(t.x),
|
|
3093
|
+
touch: i,
|
|
3094
|
+
active: !1
|
|
3095
|
+
}, Tt(), i && (dt = setTimeout(() => Dt(), 350))) : i ? n && (q = {
|
|
3096
|
+
kind: "empty",
|
|
3097
|
+
id: e.pointerId,
|
|
3098
|
+
resourceId: n.id,
|
|
3099
|
+
sx: e.clientX,
|
|
3100
|
+
sy: e.clientY,
|
|
3101
|
+
t0: Ve(t.x),
|
|
3102
|
+
touch: i,
|
|
3103
|
+
active: !1
|
|
3104
|
+
}, Tt()) : (q = {
|
|
3160
3105
|
kind: "pan",
|
|
3161
3106
|
id: e.pointerId,
|
|
3162
3107
|
sx: e.clientX,
|
|
@@ -3165,7 +3110,7 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3165
3110
|
st: V.value.scrollTop,
|
|
3166
3111
|
moved: !1,
|
|
3167
3112
|
resourceId: n?.id
|
|
3168
|
-
}, Tt();
|
|
3113
|
+
}, Tt());
|
|
3169
3114
|
}
|
|
3170
3115
|
function wt(e) {
|
|
3171
3116
|
e.button === 0 && (e.preventDefault(), q = {
|
|
@@ -3186,13 +3131,13 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3186
3131
|
if (!(!e || e.kind !== "event" && e.kind !== "empty" || e.active)) {
|
|
3187
3132
|
if (e.kind === "event") {
|
|
3188
3133
|
let t = _e.value.get(e.eventId);
|
|
3189
|
-
if (!t ||
|
|
3134
|
+
if (!t || r.readonly || e.part === "body" && t.draggable === !1 || e.part !== "body" && t.resizable === !1) return;
|
|
3190
3135
|
e.active = !0, ve.value.has(t.id) || F([t.id]), ft.value = {
|
|
3191
3136
|
id: t.id,
|
|
3192
3137
|
part: e.part
|
|
3193
3138
|
};
|
|
3194
3139
|
} else {
|
|
3195
|
-
if (!
|
|
3140
|
+
if (!r.creatable || r.readonly) return;
|
|
3196
3141
|
e.active = !0;
|
|
3197
3142
|
let t = xt(!1) * 6e4, n = be(e.t0, xt(!1));
|
|
3198
3143
|
gt.value = {
|
|
@@ -3207,35 +3152,34 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3207
3152
|
function Ot(e) {
|
|
3208
3153
|
let t = q;
|
|
3209
3154
|
if (t && t.id === e.pointerId) {
|
|
3210
|
-
if (vt.x = e.clientX, vt.y = e.clientY, t.kind === "split")
|
|
3211
|
-
|
|
3212
|
-
return;
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
return;
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
}
|
|
3233
|
-
|
|
3155
|
+
if (vt.x = e.clientX, vt.y = e.clientY, t.kind === "split") ht(Math.round(Math.min(Math.max(0, t.w + e.clientX - t.sx), Math.max(160, G.value.width - 80))));
|
|
3156
|
+
else {
|
|
3157
|
+
if (t.kind === "pan") return kt(t, e);
|
|
3158
|
+
if (!t.active) {
|
|
3159
|
+
let n = Math.hypot(e.clientX - t.sx, e.clientY - t.sy);
|
|
3160
|
+
if (t.touch) {
|
|
3161
|
+
n > 8 && (q = null, Et());
|
|
3162
|
+
return;
|
|
3163
|
+
}
|
|
3164
|
+
if (n < 4) return;
|
|
3165
|
+
if (Dt(), !t.active) {
|
|
3166
|
+
if (t.kind === "event" && t.part === "body") {
|
|
3167
|
+
let n = {
|
|
3168
|
+
kind: "pan",
|
|
3169
|
+
id: t.id,
|
|
3170
|
+
sx: t.sx,
|
|
3171
|
+
sy: t.sy,
|
|
3172
|
+
sl: t.sl,
|
|
3173
|
+
st: t.st,
|
|
3174
|
+
moved: !0
|
|
3175
|
+
};
|
|
3176
|
+
q = n, Le("grabbing"), kt(n, e);
|
|
3177
|
+
}
|
|
3178
|
+
return;
|
|
3234
3179
|
}
|
|
3235
|
-
return;
|
|
3236
3180
|
}
|
|
3181
|
+
At(e.clientX, e.clientY);
|
|
3237
3182
|
}
|
|
3238
|
-
At(e.clientX, e.clientY);
|
|
3239
3183
|
}
|
|
3240
3184
|
}
|
|
3241
3185
|
function kt(e, t) {
|
|
@@ -3245,50 +3189,50 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3245
3189
|
function At(e, t) {
|
|
3246
3190
|
let n = q;
|
|
3247
3191
|
if (!n || n.kind !== "event" && n.kind !== "empty" || !n.active) return;
|
|
3248
|
-
let
|
|
3192
|
+
let i = bt(e, t);
|
|
3249
3193
|
if (n.kind === "empty") {
|
|
3250
|
-
let e = xt(!1), t = be(n.t0, e),
|
|
3194
|
+
let e = xt(!1), t = be(n.t0, e), r = be(Ve(i.x), e), a = Math.max(e * 6e4, 9e5);
|
|
3251
3195
|
gt.value = {
|
|
3252
3196
|
resourceId: n.resourceId,
|
|
3253
|
-
start: Math.min(t,
|
|
3254
|
-
end: Math.max(Math.max(t,
|
|
3197
|
+
start: Math.min(t, r),
|
|
3198
|
+
end: Math.max(Math.max(t, r), Math.min(t, r) + a)
|
|
3255
3199
|
};
|
|
3256
3200
|
return;
|
|
3257
3201
|
}
|
|
3258
|
-
let
|
|
3259
|
-
if (!
|
|
3202
|
+
let a = g.value.find((e) => e.id === n.eventId);
|
|
3203
|
+
if (!a) return;
|
|
3260
3204
|
let o = n.span, s = (e - n.sx + (V.value.scrollLeft - n.sl)) / W.value * O, c = xt(o.dateOnly), l = o.dateOnly ? O : c * 6e4, u;
|
|
3261
3205
|
if (n.part === "body") {
|
|
3262
|
-
let e = be(o.start + s, c), t = Y(
|
|
3206
|
+
let e = be(o.start + s, c), t = Y(i.y), n = t && !r.readonly ? t.id : a.resourceId;
|
|
3263
3207
|
u = {
|
|
3264
|
-
...
|
|
3208
|
+
...a,
|
|
3265
3209
|
...je({
|
|
3266
|
-
start:
|
|
3267
|
-
end:
|
|
3210
|
+
start: a.start,
|
|
3211
|
+
end: a.end
|
|
3268
3212
|
}, e, e + (o.end - o.start)),
|
|
3269
3213
|
resourceId: n
|
|
3270
3214
|
};
|
|
3271
3215
|
} else if (n.part === "start") {
|
|
3272
3216
|
let e = Math.min(be(o.start + s, c), o.end - l);
|
|
3273
3217
|
u = {
|
|
3274
|
-
...
|
|
3218
|
+
...a,
|
|
3275
3219
|
...je({
|
|
3276
|
-
start:
|
|
3277
|
-
end:
|
|
3220
|
+
start: a.start,
|
|
3221
|
+
end: a.end
|
|
3278
3222
|
}, e, o.end)
|
|
3279
3223
|
};
|
|
3280
3224
|
} else {
|
|
3281
3225
|
let e = Math.max(be(o.end + s, c), o.start + l);
|
|
3282
3226
|
u = {
|
|
3283
|
-
...
|
|
3227
|
+
...a,
|
|
3284
3228
|
...je({
|
|
3285
|
-
start:
|
|
3286
|
-
end:
|
|
3229
|
+
start: a.start,
|
|
3230
|
+
end: a.end
|
|
3287
3231
|
}, o.start, e)
|
|
3288
3232
|
};
|
|
3289
3233
|
}
|
|
3290
|
-
let d = g.value.map((e) => e.id ===
|
|
3291
|
-
_.value = d, _t.value =
|
|
3234
|
+
let d = g.value.map((e) => e.id === a.id ? u : e);
|
|
3235
|
+
_.value = d, _t.value = r.overlap === "prevent" && jt(u, d).length > 0;
|
|
3292
3236
|
}
|
|
3293
3237
|
function jt(e, t) {
|
|
3294
3238
|
let n = /* @__PURE__ */ new Map(), r = t.filter((t) => t.resourceId === e.resourceId);
|
|
@@ -3329,24 +3273,24 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3329
3273
|
n.selectable !== !1 && (e.shiftKey || e.ctrlKey || e.metaKey ? F(ve.value.has(n.id) ? P.value.filter((e) => e !== n.id) : [...P.value, n.id]) : F([n.id])), o("event-click", n, e);
|
|
3330
3274
|
return;
|
|
3331
3275
|
}
|
|
3332
|
-
let
|
|
3276
|
+
let i = _.value;
|
|
3333
3277
|
_.value = null;
|
|
3334
|
-
let
|
|
3335
|
-
if (_t.value = !1,
|
|
3336
|
-
if (
|
|
3337
|
-
let e = jt(
|
|
3278
|
+
let a = i?.find((e) => e.id === t.eventId), s = g.value.find((e) => e.id === t.eventId);
|
|
3279
|
+
if (_t.value = !1, i && a && s && (a.start !== s.start || a.end !== s.end || a.resourceId !== s.resourceId)) {
|
|
3280
|
+
if (r.overlap === "prevent") {
|
|
3281
|
+
let e = jt(a, i);
|
|
3338
3282
|
if (e.length) {
|
|
3339
3283
|
o("conflict", {
|
|
3340
|
-
event:
|
|
3284
|
+
event: a,
|
|
3341
3285
|
with: e
|
|
3342
3286
|
}), Lt(c.timelineConflict);
|
|
3343
3287
|
return;
|
|
3344
3288
|
}
|
|
3345
3289
|
}
|
|
3346
|
-
pe(
|
|
3347
|
-
events: [
|
|
3290
|
+
pe(i), o("change", {
|
|
3291
|
+
events: [a],
|
|
3348
3292
|
kind: t.part === "body" ? "move" : "resize"
|
|
3349
|
-
}), Bt(
|
|
3293
|
+
}), Bt(a);
|
|
3350
3294
|
}
|
|
3351
3295
|
}
|
|
3352
3296
|
function X(e) {
|
|
@@ -3410,7 +3354,7 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3410
3354
|
}
|
|
3411
3355
|
async function fn(e) {
|
|
3412
3356
|
let t = g.value.filter((t) => e.includes(t.id) && t.deletable !== !1);
|
|
3413
|
-
if (!t.length ||
|
|
3357
|
+
if (!t.length || r.beforeDelete && !await r.beforeDelete(t)) return;
|
|
3414
3358
|
let n = new Set(t.map((e) => e.id));
|
|
3415
3359
|
pe(g.value.filter((e) => !n.has(e.id))), F(P.value.filter((e) => !n.has(e))), o("delete", { events: t }), Lt(c.ganttDeleted.replace("{count}", String(t.length)));
|
|
3416
3360
|
}
|
|
@@ -3431,16 +3375,16 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3431
3375
|
e.preventDefault(), o("event-dblclick", t, e);
|
|
3432
3376
|
return;
|
|
3433
3377
|
}
|
|
3434
|
-
if (
|
|
3378
|
+
if (r.readonly) return;
|
|
3435
3379
|
if (e.key === "Delete" || e.key === "Backspace") {
|
|
3436
3380
|
e.preventDefault(), fn(ve.value.has(t.id) ? P.value : [t.id]);
|
|
3437
3381
|
return;
|
|
3438
3382
|
}
|
|
3439
|
-
let
|
|
3440
|
-
if (!
|
|
3441
|
-
let
|
|
3383
|
+
let i = I.value.get(t.id);
|
|
3384
|
+
if (!i) return;
|
|
3385
|
+
let a = i.dateOnly ? O : xt(!1) * 6e4, s = null;
|
|
3442
3386
|
if ((e.key === "ArrowLeft" || e.key === "ArrowRight") && t.draggable !== !1) {
|
|
3443
|
-
let n = e.key === "ArrowLeft" ? -
|
|
3387
|
+
let n = e.key === "ArrowLeft" ? -a : a;
|
|
3444
3388
|
if (e.shiftKey) {
|
|
3445
3389
|
if (t.resizable === !1) return;
|
|
3446
3390
|
s = {
|
|
@@ -3448,14 +3392,14 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3448
3392
|
...je({
|
|
3449
3393
|
start: t.start,
|
|
3450
3394
|
end: t.end
|
|
3451
|
-
},
|
|
3395
|
+
}, i.start, Math.max(i.start + a, i.end + n))
|
|
3452
3396
|
};
|
|
3453
3397
|
} else s = {
|
|
3454
3398
|
...t,
|
|
3455
3399
|
...je({
|
|
3456
3400
|
start: t.start,
|
|
3457
3401
|
end: t.end
|
|
3458
|
-
},
|
|
3402
|
+
}, i.start + n, i.end + n)
|
|
3459
3403
|
};
|
|
3460
3404
|
} else if ((e.key === "ArrowUp" || e.key === "ArrowDown") && t.draggable !== !1) {
|
|
3461
3405
|
let n = pn(), r = n[n.findIndex((e) => e.resource.id === t.resourceId) + (e.key === "ArrowUp" ? -1 : 1)];
|
|
@@ -3467,17 +3411,13 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3467
3411
|
if (!s) return;
|
|
3468
3412
|
e.preventDefault();
|
|
3469
3413
|
let l = g.value.map((e) => e.id === t.id ? s : e);
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
}), Lt(c.timelineConflict);
|
|
3475
|
-
return;
|
|
3476
|
-
}
|
|
3477
|
-
pe(l), o("change", {
|
|
3414
|
+
r.overlap === "prevent" && jt(s, l).length ? (o("conflict", {
|
|
3415
|
+
event: s,
|
|
3416
|
+
with: jt(s, l)
|
|
3417
|
+
}), Lt(c.timelineConflict)) : (pe(l), o("change", {
|
|
3478
3418
|
events: [s],
|
|
3479
3419
|
kind: e.shiftKey ? "resize" : "move"
|
|
3480
|
-
}), Bt(s), v(() => it.get(t.id)?.querySelector("[data-timeline-event]")?.focus({ preventScroll: !0 }));
|
|
3420
|
+
}), Bt(s), v(() => it.get(t.id)?.querySelector("[data-timeline-event]")?.focus({ preventScroll: !0 })));
|
|
3481
3421
|
}
|
|
3482
3422
|
function hn(e) {
|
|
3483
3423
|
let t = _e.value.get(e);
|
|
@@ -3550,10 +3490,10 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3550
3490
|
};
|
|
3551
3491
|
return ie(Ht, Sn), ie(me, {
|
|
3552
3492
|
scale: U.scaleNow,
|
|
3553
|
-
readonly: l(() =>
|
|
3493
|
+
readonly: l(() => r.readonly),
|
|
3554
3494
|
canUndo: ge,
|
|
3555
3495
|
canRedo: A,
|
|
3556
|
-
foldable: l(() =>
|
|
3496
|
+
foldable: l(() => r.resources.some((e) => e.group)),
|
|
3557
3497
|
folded: l(() => ye.value.length > 0),
|
|
3558
3498
|
undo: D,
|
|
3559
3499
|
redo: k,
|
|
@@ -3565,20 +3505,20 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3565
3505
|
I.value.size && U.fit(Ne.value);
|
|
3566
3506
|
},
|
|
3567
3507
|
expandAll: () => Se([]),
|
|
3568
|
-
collapseAll: () => Se([...new Set(
|
|
3508
|
+
collapseAll: () => Se([...new Set(r.resources.map((e) => e.group).filter((e) => !!e))])
|
|
3569
3509
|
}), ne(() => {
|
|
3570
3510
|
let e = V.value;
|
|
3571
3511
|
e.addEventListener("touchmove", Ft, { passive: !1 }), v(() => {
|
|
3572
|
-
let t =
|
|
3512
|
+
let t = r.start ? j(r.start) : ze.value ?? Ne.value.min;
|
|
3573
3513
|
e.scrollLeft = Math.max(0, K(t) - Math.min(48, Pe.value / 4)), G.value.left = e.scrollLeft;
|
|
3574
3514
|
});
|
|
3575
3515
|
}), ee(() => {
|
|
3576
3516
|
V.value?.removeEventListener("touchmove", Ft), Et(), Z(), cancelAnimationFrame(at);
|
|
3577
|
-
}),
|
|
3517
|
+
}), t(Sn), (t, n) => (x(), f("div", {
|
|
3578
3518
|
class: "m3-resource-timeline flex flex-col overflow-hidden rounded-md bg-surface text-on-surface",
|
|
3579
3519
|
onKeydown: gn
|
|
3580
3520
|
}, [
|
|
3581
|
-
ae(
|
|
3521
|
+
ae(t.$slots, "default", { timeline: Sn }),
|
|
3582
3522
|
p("div", {
|
|
3583
3523
|
ref_key: "scroller",
|
|
3584
3524
|
ref: V,
|
|
@@ -3621,42 +3561,42 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3621
3561
|
class: "sticky left-0 z-10 shrink-0 border-r border-outline-variant bg-surface",
|
|
3622
3562
|
style: b({ width: `${H.value}px` }),
|
|
3623
3563
|
role: "list",
|
|
3624
|
-
"aria-label":
|
|
3625
|
-
}, [(x(!0), f(s, null, C(Ze.value, (
|
|
3564
|
+
"aria-label": e.label
|
|
3565
|
+
}, [(x(!0), f(s, null, C(Ze.value, (e) => (x(), f(s, { key: e.key }, [e.kind === "group" ? (x(), f("button", {
|
|
3626
3566
|
key: 0,
|
|
3627
3567
|
type: "button",
|
|
3628
3568
|
class: "absolute inset-x-0 flex items-center gap-1 border-b border-outline-variant/60 bg-surface-container-low px-2 text-left text-title-small text-on-surface outline-none hover:bg-on-surface/8 focus-visible:ring-2 focus-visible:ring-secondary focus-visible:ring-inset",
|
|
3629
3569
|
style: b({
|
|
3630
|
-
top: `${
|
|
3631
|
-
height: `${
|
|
3570
|
+
top: `${e.top}px`,
|
|
3571
|
+
height: `${e.height}px`
|
|
3632
3572
|
}),
|
|
3633
|
-
"aria-expanded": !xe.value.has(
|
|
3634
|
-
onClick: (
|
|
3635
|
-
}, [p("span", { class: y(["material-symbols-outlined text-[20px] text-on-surface-variant transition-transform duration-200", xe.value.has(
|
|
3636
|
-
group:
|
|
3637
|
-
resources:
|
|
3638
|
-
collapsed: xe.value.has(
|
|
3639
|
-
}, () => [p("span", Kt, w(
|
|
3573
|
+
"aria-expanded": !xe.value.has(e.group),
|
|
3574
|
+
onClick: (t) => Ce(e.group)
|
|
3575
|
+
}, [p("span", { class: y(["material-symbols-outlined text-[20px] text-on-surface-variant transition-transform duration-200", xe.value.has(e.group) ? "-rotate-90" : ""]) }, "expand_more", 2), ae(t.$slots, "group", {
|
|
3576
|
+
group: e.group,
|
|
3577
|
+
resources: e.resources,
|
|
3578
|
+
collapsed: xe.value.has(e.group)
|
|
3579
|
+
}, () => [p("span", Kt, w(e.group), 1), p("span", qt, w(e.resources.length), 1)])], 12, Gt)) : (x(), f("div", {
|
|
3640
3580
|
key: 1,
|
|
3641
3581
|
role: "listitem",
|
|
3642
3582
|
class: "absolute inset-x-0 flex items-center gap-3 border-b border-outline-variant/60 px-4",
|
|
3643
3583
|
style: b({
|
|
3644
|
-
top: `${
|
|
3645
|
-
height: `${
|
|
3584
|
+
top: `${e.top}px`,
|
|
3585
|
+
height: `${e.height}px`
|
|
3646
3586
|
})
|
|
3647
|
-
}, [ae(
|
|
3648
|
-
resource:
|
|
3649
|
-
events: we.value.get(
|
|
3650
|
-
hours: Math.round((xn.value.get(
|
|
3651
|
-
}, () => [
|
|
3587
|
+
}, [ae(t.$slots, "resource", {
|
|
3588
|
+
resource: e.resource,
|
|
3589
|
+
events: we.value.get(e.resource.id) ?? [],
|
|
3590
|
+
hours: Math.round((xn.value.get(e.resource.id) ?? 0) * 10) / 10
|
|
3591
|
+
}, () => [e.resource.avatar ? (x(), f("img", {
|
|
3652
3592
|
key: 0,
|
|
3653
|
-
src:
|
|
3593
|
+
src: e.resource.avatar,
|
|
3654
3594
|
alt: "",
|
|
3655
3595
|
class: "size-9 shrink-0 rounded-full object-cover"
|
|
3656
3596
|
}, null, 8, Jt)) : (x(), f("span", {
|
|
3657
3597
|
key: 1,
|
|
3658
|
-
class: y(["flex size-9 shrink-0 items-center justify-center rounded-full text-label-large", _n[
|
|
3659
|
-
}, [
|
|
3598
|
+
class: y(["flex size-9 shrink-0 items-center justify-center rounded-full text-label-large", _n[e.resource.color ?? "neutral"]])
|
|
3599
|
+
}, [e.resource.icon ? (x(), f("span", Yt, w(e.resource.icon), 1)) : (x(), f(s, { key: 1 }, [m(w(bn(e.resource.name)), 1)], 64))], 2)), p("span", Xt, [p("span", Zt, w(e.resource.name), 1), e.resource.subtitle ? (x(), f("span", Qt, w(e.resource.subtitle), 1)) : d("", !0)])])], 4))], 64))), 128)), h(We, {
|
|
3660
3600
|
label: T(c).ganttResize,
|
|
3661
3601
|
value: H.value,
|
|
3662
3602
|
active: pt.value,
|
|
@@ -3670,7 +3610,7 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3670
3610
|
"active",
|
|
3671
3611
|
"grip-top"
|
|
3672
3612
|
])], 12, Wt)) : d("", !0), p("div", {
|
|
3673
|
-
class: y(["relative shrink-0 select-none [-webkit-user-drag:none]",
|
|
3613
|
+
class: y(["relative shrink-0 select-none [-webkit-user-drag:none]", e.creatable && !e.readonly ? "" : "cursor-grab active:cursor-grabbing"]),
|
|
3674
3614
|
style: b({ width: `${T(Fe)}px` }),
|
|
3675
3615
|
onPointerdown: Ct,
|
|
3676
3616
|
onDragstart: n[3] ||= fe(() => {}, ["prevent"])
|
|
@@ -3719,13 +3659,13 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3719
3659
|
ve.value.has(n.id) ? "ring-2 ring-on-surface ring-offset-1 ring-offset-surface" : "",
|
|
3720
3660
|
L.value.has(n.id) || ft.value?.id === n.id && _t.value ? "outline-2 outline-offset-1 outline-error" : "",
|
|
3721
3661
|
ft.value?.id === n.id ? "shadow-elevation-3" : "hover:shadow-elevation-1",
|
|
3722
|
-
|
|
3662
|
+
e.readonly || n.draggable === !1 ? "" : "cursor-grab active:cursor-grabbing"
|
|
3723
3663
|
]]),
|
|
3724
3664
|
onPointerdown: (e) => St(e, n, "body"),
|
|
3725
3665
|
onDblclick: (e) => o("event-dblclick", n, e),
|
|
3726
3666
|
onContextmenu: (e) => o("event-contextmenu", n, e),
|
|
3727
3667
|
onKeydown: (e) => mn(e, n)
|
|
3728
|
-
}, [p("span", { class: y(["w-1 shrink-0", vn[yn(n)]]) }, null, 2), p("span", en, [ae(
|
|
3668
|
+
}, [p("span", { class: y(["w-1 shrink-0", vn[yn(n)]]) }, null, 2), p("span", en, [ae(t.$slots, "event", {
|
|
3729
3669
|
event: n,
|
|
3730
3670
|
resource: N.value.get(n.resourceId),
|
|
3731
3671
|
selected: ve.value.has(n.id),
|
|
@@ -3734,13 +3674,13 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3734
3674
|
key: 0,
|
|
3735
3675
|
class: "material-symbols-outlined shrink-0 text-[18px] text-error",
|
|
3736
3676
|
title: T(c).timelineConflict
|
|
3737
|
-
}, "warning", 8, an)) : d("", !0)])])], 42, $t), !
|
|
3677
|
+
}, "warning", 8, an)) : d("", !0)])])], 42, $t), !e.readonly && n.resizable !== !1 ? (x(), f(s, { key: 0 }, C(["start", "end"], (e) => p("span", {
|
|
3738
3678
|
key: e,
|
|
3739
3679
|
"data-timeline-resize": e,
|
|
3740
3680
|
class: y(["absolute inset-y-0 z-[1] flex w-3 cursor-ew-resize items-center justify-center pointer-coarse:w-7", e === "start" ? "-left-1 pointer-coarse:-left-3.5" : "-right-1 pointer-coarse:-right-3.5"]),
|
|
3741
3681
|
onPointerdown: (t) => St(t, n, e)
|
|
3742
3682
|
}, [p("span", { class: y(["hidden h-3/5 w-1 rounded-full bg-on-surface pointer-coarse:block", ve.value.has(n.id) ? "opacity-100" : "opacity-0"]) }, null, 2)], 42, on)), 64)) : d("", !0)], 6))), 128)),
|
|
3743
|
-
|
|
3683
|
+
e.resources.length ? d("", !0) : (x(), f("div", {
|
|
3744
3684
|
key: 1,
|
|
3745
3685
|
class: "absolute flex items-center justify-center p-6",
|
|
3746
3686
|
style: b({
|
|
@@ -3749,13 +3689,12 @@ var Wt = ["aria-label"], Gt = ["aria-expanded", "onClick"], Kt = { class: "trunc
|
|
|
3749
3689
|
top: 0,
|
|
3750
3690
|
height: `${Math.max(120, T(G).height - un)}px`
|
|
3751
3691
|
})
|
|
3752
|
-
}, [ae(
|
|
3692
|
+
}, [ae(t.$slots, "empty", {}, () => [p("span", sn, w(T(c).timelineEmpty), 1)])], 4))
|
|
3753
3693
|
], 38)], 4)], 4)], 544),
|
|
3754
3694
|
p("div", cn, w(It.value), 1)
|
|
3755
3695
|
], 32));
|
|
3756
3696
|
}
|
|
3757
3697
|
});
|
|
3758
|
-
//#endregion
|
|
3759
3698
|
export { J as MGantt, xt as MGanttControls, fn as MResourceTimeline, U as addWorkingDays, Fe as criticalPath, At as parseGanttCsv, Mt as parseGanttJson, Vt as parseMsProjectXml, Me as rollupSummaries, Pe as scheduleTasks, B as taskSpan, Et as toGanttCsv, jt as toGanttJson, Bt as toMsProjectXml, D as useGantt, Ut as useResourceTimeline, Ne as workingDays };
|
|
3760
3699
|
|
|
3761
3700
|
//# sourceMappingURL=gantt.js.map
|