@m3ui-vue/m3ui-vue 1.4.3 → 1.5.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 +29 -7
- package/dist/{MButton-D7M324r9.js → MButton-D_uxtJa-.js} +2 -2
- package/dist/{MButton-D7M324r9.js.map → MButton-D_uxtJa-.js.map} +1 -1
- package/dist/{MDialog-DuOnNF9s.js → MDialog-DT4KAPmn.js} +2 -2
- package/dist/{MDialog-DuOnNF9s.js.map → MDialog-DT4KAPmn.js.map} +1 -1
- package/dist/{MListItem-Bb84X6ex.js → MListItem-CwYrxpPZ.js} +2 -2
- package/dist/{MListItem-Bb84X6ex.js.map → MListItem-CwYrxpPZ.js.map} +1 -1
- package/dist/{MLoadingIndicator-BUGRo2Tu.js → MLoadingIndicator-DhzECYRI.js} +2 -2
- package/dist/{MLoadingIndicator-BUGRo2Tu.js.map → MLoadingIndicator-DhzECYRI.js.map} +1 -1
- package/dist/{MSeekBar-BQUvUqb9.js → MSeekBar-DQPF5FTp.js} +2 -2
- package/dist/{MSeekBar-BQUvUqb9.js.map → MSeekBar-DQPF5FTp.js.map} +1 -1
- package/dist/{MSlider-SFdjE1Hy.js → MSlider-BvoMZTy9.js} +2 -2
- package/dist/{MSlider-SFdjE1Hy.js.map → MSlider-BvoMZTy9.js.map} +1 -1
- package/dist/{MSpinner-DKGNN64_.js → MSpinner-CgcCQhS9.js} +2 -2
- package/dist/{MSpinner-DKGNN64_.js.map → MSpinner-CgcCQhS9.js.map} +1 -1
- package/dist/{MTextField-Utsef6Kk.js → MTextField-B72dwF6V.js} +2 -2
- package/dist/{MTextField-Utsef6Kk.js.map → MTextField-B72dwF6V.js.map} +1 -1
- package/dist/{MTooltip-BhTFQ9Z2.js → MTooltip-YyF1CO75.js} +4 -4
- package/dist/{MTooltip-BhTFQ9Z2.js.map → MTooltip-YyF1CO75.js.map} +1 -1
- package/dist/api.json +1 -1
- package/dist/code-editor.js +1 -1
- package/dist/components/MGantt.vue.d.ts +11 -6
- package/dist/components/MGanttControls.vue.d.ts +9 -3
- package/dist/components/MResourceTimeline.vue.d.ts +4 -4
- package/dist/components/MTreeTable.vue.d.ts +1 -1
- package/dist/components/_MTimeSplitter.vue.d.ts +10 -0
- package/dist/composables/_dragCursor.d.ts +2 -0
- package/dist/composables/_useTimeAxis.d.ts +5 -1
- package/dist/composables/useGantt.d.ts +13 -0
- package/dist/composables/useLocale.d.ts +3 -0
- package/dist/draw.js +2 -2
- package/dist/flow.js +1 -1
- package/dist/gantt.js +1608 -1422
- package/dist/gantt.js.map +1 -1
- package/dist/locales/index.js +21 -0
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +5854 -5791
- package/dist/m3ui.js.map +1 -1
- package/dist/map.js +5 -5
- package/dist/media.js +4 -4
- package/dist/pdf.js +4 -4
- package/dist/rich-text-editor.js +4 -4
- package/dist/styles.css +1 -1
- package/dist/{useLocale-B8YKWg-H.js → useLocale-DLcG3qPC.js} +4 -1
- package/dist/useLocale-DLcG3qPC.js.map +1 -0
- package/package.json +1 -1
- package/src/__tests__/MGantt.test.ts +105 -0
- package/src/__tests__/MResourceTimeline.test.ts +16 -0
- package/src/__tests__/MTabs.test.ts +112 -4
- package/src/components/MGantt.vue +138 -43
- package/src/components/MGanttControls.vue +36 -8
- package/src/components/MResourceTimeline.vue +59 -24
- package/src/components/MTabs.vue +163 -77
- package/src/components/_MTimeHeader.vue +3 -2
- package/src/components/_MTimeSplitter.vue +37 -0
- package/src/composables/_dragCursor.ts +15 -0
- package/src/composables/_ganttTime.ts +2 -1
- package/src/composables/_useTimeAxis.ts +10 -3
- package/src/composables/useGantt.ts +13 -0
- package/src/composables/useLocale.ts +6 -0
- package/src/locales/de.ts +3 -0
- package/src/locales/es.ts +3 -0
- package/src/locales/fr.ts +3 -0
- package/src/locales/ja.ts +3 -0
- package/src/locales/ko.ts +3 -0
- package/src/locales/pt.ts +3 -0
- package/src/locales/zh.ts +3 -0
- package/dist/useLocale-B8YKWg-H.js.map +0 -1
package/dist/code-editor.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as e } from "./useLocale-
|
|
1
|
+
import { i as e } from "./useLocale-DLcG3qPC.js";
|
|
2
2
|
import { t } from "./MIcon-Bxh9j135.js";
|
|
3
3
|
import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
4
4
|
import { computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, normalizeClass as u, normalizeStyle as d, onBeforeUnmount as f, onMounted as p, openBlock as m, ref as h, renderSlot as g, toDisplayString as _, watch as v, withCtx as y } from "vue";
|
|
@@ -12,8 +12,11 @@ type __VLS_Props = {
|
|
|
12
12
|
collapsed?: string[];
|
|
13
13
|
/** The task list's columns (default name, start and duration); `[]` hides the list */
|
|
14
14
|
columns?: GanttColumn[];
|
|
15
|
-
/** The task list's width, px (`v-model:grid-width`; drag its edge) */
|
|
15
|
+
/** The task list's width, px (`v-model:grid-width`; drag its edge, double-click it to restore this width) */
|
|
16
16
|
gridWidth?: number;
|
|
17
|
+
/** Hides the task list, leaving the timeline the whole width (`v-model:grid-collapsed`; MGanttControls has a button) */
|
|
18
|
+
gridCollapsed?: boolean;
|
|
19
|
+
/** Row height, px. Fingers get on fine with the default; raise it (e.g. 48) for roomier touch targets */
|
|
17
20
|
rowHeight?: number;
|
|
18
21
|
/** No editing: drag, resize, link, reorder, rename and delete off */
|
|
19
22
|
readonly?: boolean;
|
|
@@ -48,11 +51,11 @@ declare var __VLS_1: {
|
|
|
48
51
|
}, __VLS_13: `cell-${string}`, __VLS_14: {
|
|
49
52
|
task: GanttTask<any>;
|
|
50
53
|
value: string;
|
|
51
|
-
},
|
|
54
|
+
}, __VLS_31: {
|
|
52
55
|
task: GanttTask<any>;
|
|
53
56
|
selected: boolean;
|
|
54
57
|
critical: boolean;
|
|
55
|
-
},
|
|
58
|
+
}, __VLS_33: {}, __VLS_41: {
|
|
56
59
|
task: GanttTask<any>;
|
|
57
60
|
slack: number | undefined;
|
|
58
61
|
};
|
|
@@ -63,11 +66,11 @@ type __VLS_Slots = {} & {
|
|
|
63
66
|
} & {
|
|
64
67
|
default?: (props: typeof __VLS_1) => any;
|
|
65
68
|
} & {
|
|
66
|
-
bar?: (props: typeof
|
|
69
|
+
bar?: (props: typeof __VLS_31) => any;
|
|
67
70
|
} & {
|
|
68
|
-
empty?: (props: typeof
|
|
71
|
+
empty?: (props: typeof __VLS_33) => any;
|
|
69
72
|
} & {
|
|
70
|
-
tooltip?: (props: typeof
|
|
73
|
+
tooltip?: (props: typeof __VLS_41) => any;
|
|
71
74
|
};
|
|
72
75
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, GanttContext, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
73
76
|
link: (args_0: {
|
|
@@ -87,6 +90,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, GanttContex
|
|
|
87
90
|
"update:scale": (args_0: import("../composables/_ganttTime").TimeUnit) => any;
|
|
88
91
|
"update:collapsed": (args_0: string[]) => any;
|
|
89
92
|
"update:gridWidth": (args_0: number) => any;
|
|
93
|
+
"update:gridCollapsed": (args_0: boolean) => any;
|
|
90
94
|
"task-click": (args_0: GanttTask<any>, args_1: MouseEvent) => any;
|
|
91
95
|
"task-dblclick": (args_0: GanttTask<any>, args_1: MouseEvent | KeyboardEvent) => any;
|
|
92
96
|
"task-contextmenu": (args_0: GanttTask<any>, args_1: MouseEvent) => any;
|
|
@@ -112,6 +116,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, GanttContex
|
|
|
112
116
|
"onUpdate:scale"?: ((args_0: import("../composables/_ganttTime").TimeUnit) => any) | undefined;
|
|
113
117
|
"onUpdate:collapsed"?: ((args_0: string[]) => any) | undefined;
|
|
114
118
|
"onUpdate:gridWidth"?: ((args_0: number) => any) | undefined;
|
|
119
|
+
"onUpdate:gridCollapsed"?: ((args_0: boolean) => any) | undefined;
|
|
115
120
|
"onTask-click"?: ((args_0: GanttTask<any>, args_1: MouseEvent) => any) | undefined;
|
|
116
121
|
"onTask-dblclick"?: ((args_0: GanttTask<any>, args_1: MouseEvent | KeyboardEvent) => any) | undefined;
|
|
117
122
|
"onTask-contextmenu"?: ((args_0: GanttTask<any>, args_1: MouseEvent) => any) | undefined;
|
|
@@ -3,23 +3,29 @@ type __VLS_Props = {
|
|
|
3
3
|
/** The scales offered as a segmented button (`[]` hides it) */
|
|
4
4
|
scales?: GanttScale[];
|
|
5
5
|
zoom?: boolean;
|
|
6
|
+
/** A button that zooms and scrolls so every task fits the width */
|
|
7
|
+
fit?: boolean;
|
|
8
|
+
/** A button that shows / hides MGantt's task list */
|
|
9
|
+
list?: boolean;
|
|
6
10
|
today?: boolean;
|
|
7
11
|
/** Expand all / collapse all */
|
|
8
12
|
fold?: boolean;
|
|
9
13
|
/** Undo and redo */
|
|
10
14
|
history?: boolean;
|
|
11
15
|
};
|
|
12
|
-
declare var
|
|
16
|
+
declare var __VLS_8: {}, __VLS_66: {};
|
|
13
17
|
type __VLS_Slots = {} & {
|
|
14
|
-
default?: (props: typeof
|
|
18
|
+
default?: (props: typeof __VLS_8) => any;
|
|
15
19
|
} & {
|
|
16
|
-
end?: (props: typeof
|
|
20
|
+
end?: (props: typeof __VLS_66) => any;
|
|
17
21
|
};
|
|
18
22
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
19
23
|
scales: GanttScale[];
|
|
20
24
|
today: boolean;
|
|
21
25
|
history: boolean;
|
|
26
|
+
list: boolean;
|
|
22
27
|
zoom: boolean;
|
|
28
|
+
fit: boolean;
|
|
23
29
|
fold: boolean;
|
|
24
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
31
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -50,12 +50,12 @@ declare var __VLS_1: {
|
|
|
50
50
|
resource: TimelineResource<any>;
|
|
51
51
|
events: TimelineEvent<any>[];
|
|
52
52
|
hours: number;
|
|
53
|
-
},
|
|
53
|
+
}, __VLS_27: {
|
|
54
54
|
event: TimelineEvent<any>;
|
|
55
55
|
resource: TimelineResource<any> | undefined;
|
|
56
56
|
selected: boolean;
|
|
57
57
|
conflict: boolean;
|
|
58
|
-
},
|
|
58
|
+
}, __VLS_29: {};
|
|
59
59
|
type __VLS_Slots = {} & {
|
|
60
60
|
default?: (props: typeof __VLS_1) => any;
|
|
61
61
|
} & {
|
|
@@ -63,9 +63,9 @@ type __VLS_Slots = {} & {
|
|
|
63
63
|
} & {
|
|
64
64
|
resource?: (props: typeof __VLS_10) => any;
|
|
65
65
|
} & {
|
|
66
|
-
event?: (props: typeof
|
|
66
|
+
event?: (props: typeof __VLS_27) => any;
|
|
67
67
|
} & {
|
|
68
|
-
empty?: (props: typeof
|
|
68
|
+
empty?: (props: typeof __VLS_29) => any;
|
|
69
69
|
};
|
|
70
70
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, ResourceTimelineContext, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
71
71
|
delete: (args_0: {
|
|
@@ -50,9 +50,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
50
50
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
51
51
|
onRowClick?: ((args_0: TreeTableRow) => any) | undefined;
|
|
52
52
|
}>, {
|
|
53
|
+
indent: number;
|
|
53
54
|
dense: boolean;
|
|
54
55
|
rowKey: string;
|
|
55
|
-
indent: number;
|
|
56
56
|
defaultExpanded: boolean;
|
|
57
57
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
58
58
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label: string;
|
|
3
|
+
value: number;
|
|
4
|
+
active: boolean;
|
|
5
|
+
/** Where the grip's center sits, px from the body's top (the middle of what's in view) */
|
|
6
|
+
gripTop: number;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -52,10 +52,14 @@ export declare function useTimeAxis(o: TimeAxisOptions): {
|
|
|
52
52
|
todayMs: ComputedRef<number | null>;
|
|
53
53
|
xOf: (ms: number) => number;
|
|
54
54
|
timeAt: (x: number) => number;
|
|
55
|
-
zoomTo: (target: number, anchor?: number, animate?: boolean) => void;
|
|
55
|
+
zoomTo: (target: number, anchor?: number, animate?: boolean, atTime?: number) => void;
|
|
56
56
|
zoomIn: () => void;
|
|
57
57
|
zoomOut: () => void;
|
|
58
58
|
setScale: (s: TimeUnit) => void;
|
|
59
|
+
fit: (range: {
|
|
60
|
+
min: number;
|
|
61
|
+
max: number;
|
|
62
|
+
}, margin?: number) => void;
|
|
59
63
|
scrollToDate: (date?: string, opts?: {
|
|
60
64
|
align?: "start" | "center";
|
|
61
65
|
animate?: boolean;
|
|
@@ -13,6 +13,8 @@ export interface GanttColumn {
|
|
|
13
13
|
align?: 'start' | 'center' | 'end';
|
|
14
14
|
/** Text for a cell */
|
|
15
15
|
format?: (task: GanttTask) => string;
|
|
16
|
+
/** Hidden while the chart (its own width, not the window's) is narrower than this, px */
|
|
17
|
+
hideBelow?: number;
|
|
16
18
|
}
|
|
17
19
|
/** What MGantt provides to everything inside it (MGanttControls, panels of yours), and its template ref exposes */
|
|
18
20
|
export interface GanttContext {
|
|
@@ -59,6 +61,11 @@ export interface GanttContext {
|
|
|
59
61
|
criticalPath: ComputedRef<GanttCriticalPath>;
|
|
60
62
|
/** The date (snapped) under a page x */
|
|
61
63
|
dateAt(clientX: number): string;
|
|
64
|
+
/** Whether the task list is hidden (`v-model:grid-collapsed`) */
|
|
65
|
+
gridCollapsed: ComputedRef<boolean>;
|
|
66
|
+
setGridCollapsed(collapsed: boolean): void;
|
|
67
|
+
/** Zooms and scrolls so every task fits the timeline's width */
|
|
68
|
+
fit(): void;
|
|
62
69
|
}
|
|
63
70
|
export declare const GANTT_KEY: InjectionKey<GanttContext>;
|
|
64
71
|
/** What MGanttControls drives, in an MGantt or an MResourceTimeline */
|
|
@@ -78,6 +85,12 @@ export interface TimelineControls {
|
|
|
78
85
|
scrollToDate(date?: string): void;
|
|
79
86
|
expandAll(): void;
|
|
80
87
|
collapseAll(): void;
|
|
88
|
+
/** Zooms and scrolls so everything fits the timeline's width */
|
|
89
|
+
fit(): void;
|
|
90
|
+
/** Hosts with a list that can hide (MGantt) */
|
|
91
|
+
hasList?: ComputedRef<boolean>;
|
|
92
|
+
gridCollapsed?: ComputedRef<boolean>;
|
|
93
|
+
setGridCollapsed?(collapsed: boolean): void;
|
|
81
94
|
}
|
|
82
95
|
export declare const TIMELINE_CONTROLS_KEY: InjectionKey<TimelineControls>;
|
|
83
96
|
/**
|
|
@@ -331,6 +331,9 @@ export interface M3Locale {
|
|
|
331
331
|
ganttBaseline: string;
|
|
332
332
|
ganttEmpty: string;
|
|
333
333
|
ganttResize: string;
|
|
334
|
+
ganttFit: string;
|
|
335
|
+
ganttShowList: string;
|
|
336
|
+
ganttHideList: string;
|
|
334
337
|
timelineResource: string;
|
|
335
338
|
timelineConflict: string;
|
|
336
339
|
timelineMoved: string;
|
package/dist/draw.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as e } from "./useLocale-
|
|
1
|
+
import { i as e } from "./useLocale-DLcG3qPC.js";
|
|
2
2
|
import { t } from "./MIconButton-DoNotQ9v.js";
|
|
3
|
-
import { n, t as r } from "./MTooltip-
|
|
3
|
+
import { n, t as r } from "./MTooltip-YyF1CO75.js";
|
|
4
4
|
import { n as i, t as a } from "./MMenuItem-Bih0h4-n.js";
|
|
5
5
|
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, inject as h, mergeModels as g, mergeProps as _, nextTick as v, normalizeClass as y, normalizeStyle as b, onBeforeUnmount as x, onMounted as S, openBlock as C, provide as ee, ref as w, renderList as T, renderSlot as E, shallowRef as D, toDisplayString as te, unref as O, useId as ne, useModel as k, vModelText as re, watch as ie, withCtx as A, withDirectives as j, withKeys as ae, withModifiers as M } from "vue";
|
|
6
6
|
//#region src/composables/drawGeometry.ts
|
package/dist/flow.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as e } from "./useLocale-
|
|
1
|
+
import { i as e } from "./useLocale-DLcG3qPC.js";
|
|
2
2
|
import { r as t, t as n, u as r } from "./MIconButton-DoNotQ9v.js";
|
|
3
3
|
import { a as i, c as a, d as o, i as s, l as c, n as l, o as u, r as d, s as f, t as p, u as m } from "./flowPaths-CcWOKY4Z.js";
|
|
4
4
|
import { Fragment as h, Transition as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createTextVNode as S, createVNode as C, defineComponent as w, inject as T, mergeProps as ee, nextTick as E, normalizeClass as D, normalizeStyle as O, onBeforeUnmount as te, onMounted as ne, openBlock as k, provide as re, reactive as ie, ref as A, renderList as ae, renderSlot as oe, shallowReactive as se, shallowRef as ce, toDisplayString as le, toRaw as ue, unref as j, useSlots as de, vShow as fe, watch as pe, withCtx as me, withDirectives as M, withModifiers as he } from "vue";
|