@mintplayer/web-components 2.15.0 → 2.17.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/accordion/index.mjs +5 -5
- package/calendar/index.mjs +1 -1
- package/carousel/index.mjs +57 -143
- package/charts/core/index.mjs +30 -20
- package/charts/core/src/attributes.d.ts +18 -0
- package/charts/core/src/index.d.ts +2 -0
- package/charts/core/src/view-window.d.ts +46 -0
- package/charts/hierarchy/index.mjs +245 -256
- package/charts/hierarchy/src/components/mp-hierarchy-chart.d.ts +1 -3
- package/charts/sparkline/index.mjs +27 -26
- package/charts/trend/index.mjs +21 -20
- package/checkbox/index.mjs +1 -1
- package/checkbox/src/components/mp-checkbox.d.ts +1 -0
- package/chunks/attributes-L3eKsbdy.mjs +16 -0
- package/chunks/color-mode-warning-71FmlzWX.mjs +13 -0
- package/chunks/{form-check.styles-B0pxJ6YC.mjs → form-check.styles-DqvBnspm.mjs} +24 -3
- package/chunks/{mp-calendar.element-CJ8-t-Zn.mjs → mp-calendar.element-BIHS9SZZ.mjs} +11 -6
- package/chunks/{mp-checkbox-CzwS7Y_t.mjs → mp-checkbox-zV83gILn.mjs} +44 -36
- package/chunks/mp-datatable-eRpl7-2V.mjs +2238 -0
- package/chunks/{mp-datetime-picker.element-D1CiLbHm.mjs → mp-datetime-picker.element-Cxu5-qRE.mjs} +29 -32
- package/chunks/{mp-pagination-Dea75mD4.mjs → mp-pagination-hGy4dL7p.mjs} +9 -4
- package/chunks/{mp-radio-cL46sUA0.mjs → mp-radio-BhRVNdKp.mjs} +32 -28
- package/chunks/{mp-select-BNrbPwN4.mjs → mp-select-CgqYFvUj.mjs} +41 -26
- package/chunks/{mp-splitter-Ckn1kN4v.mjs → mp-splitter-DLehrw3Y.mjs} +144 -120
- package/chunks/{mp-timepicker.element-COZEUIoE.mjs → mp-timepicker.element-BiB9lkgc.mjs} +58 -45
- package/chunks/{mp-toggle-button-eo_aTQtu.mjs → mp-toggle-button-CaS9uYLE.mjs} +26 -24
- package/chunks/{mp-treeview-C8iltDbq.mjs → mp-treeview-CaMTDrvY.mjs} +51 -50
- package/chunks/{overlay-controller-D6agzzOI.mjs → overlay-controller-BHDagokg.mjs} +130 -70
- package/chunks/{id-DNZVAnGC.mjs → resource.service--lqLwEqk.mjs} +144 -206
- package/chunks/view-window-DGvFiDnW.mjs +263 -0
- package/code-snippet/index.mjs +70 -66
- package/code-snippet/src/hljs-loaders.generated.d.ts +1 -1
- package/custom-elements.json +65750 -0
- package/datatable/index.mjs +6 -5
- package/datatable/src/components/column-resize.d.ts +11 -0
- package/datatable/src/components/mp-datatable.d.ts +206 -1
- package/datatable/src/index.d.ts +3 -1
- package/datatable/src/types/column-def.d.ts +61 -0
- package/datatable/src/types/filter.d.ts +138 -0
- package/datatable/src/types/index.d.ts +3 -2
- package/datatable/src/types/labels.d.ts +58 -0
- package/datepicker/index.mjs +10 -9
- package/datetime-picker/index.mjs +1 -1
- package/datetime-picker/src/mp-datetime-picker.element.d.ts +3 -0
- package/dock/index.mjs +430 -463
- package/dock/src/components/mint-dock-manager.element.d.ts +25 -2
- package/dock/src/core/resize.d.ts +60 -0
- package/dropdown-menu/index.mjs +4 -2
- package/dropdown-menu/src/components/mp-dropdown-menu.d.ts +6 -1
- package/dropdown-menu/src/index.d.ts +1 -1
- package/dropdown-menu/src/types/dropdown.d.ts +14 -1
- package/dropdown-menu/src/types/index.d.ts +1 -1
- package/file-manager/index.mjs +63 -61
- package/file-manager/src/components/mp-file-manager.d.ts +4 -3
- package/multi-range/index.mjs +56 -50
- package/multi-range/src/mint-multi-range.element.d.ts +4 -10
- package/multi-range/src/pointer-geometry.d.ts +31 -0
- package/navbar/index.mjs +89 -439
- package/overlay/index.mjs +5 -2
- package/overlay/src/index.d.ts +2 -0
- package/overlay/src/overlay-controller.d.ts +27 -14
- package/overlay/src/overlay-portal.d.ts +53 -0
- package/overlay/src/placement.d.ts +48 -0
- package/package.json +7 -1
- package/pagination/index.mjs +1 -1
- package/phone-input/index.mjs +44 -40
- package/phone-input/src/components/stack.d.ts +8 -0
- package/query-builder/index.mjs +418 -466
- package/query-builder/src/dnd/drag-controller.d.ts +12 -8
- package/query-builder/src/mp-query-builder.element.d.ts +5 -1
- package/query-builder/src/mp-query-condition.element.d.ts +1 -0
- package/radio/index.mjs +1 -1
- package/radio-group/index.mjs +1 -1
- package/ribbon/index.mjs +477 -498
- package/ribbon/src/core/band-text-color.d.ts +10 -0
- package/ribbon/src/core/key-tip-allocator.d.ts +10 -0
- package/ribbon/src/core/plan-reduce-steps.d.ts +62 -0
- package/ribbon/src/mp-ribbon.element.d.ts +0 -27
- package/scheduler/index.mjs +726 -711
- package/scheduler/src/components/mp-scheduler.d.ts +19 -3
- package/scheduler/src/drag/drag-manager.d.ts +1 -9
- package/scheduler/src/input/input-handler.d.ts +12 -2
- package/scheduler/src/utils/geometry.d.ts +39 -0
- package/scheduler/src/views/timeline-view.d.ts +0 -1
- package/scheduler-core/index.mjs +84 -71
- package/scheduler-core/src/services/resource.service.d.ts +0 -12
- package/scheduler-core/src/services/timeline.service.d.ts +0 -9
- package/select/index.mjs +1 -1
- package/select/src/components/mp-select.d.ts +1 -0
- package/signature-pad/index.mjs +21 -23
- package/signature-pad/src/canvas-point.d.ts +26 -0
- package/signature-pad/src/mp-signature-pad.element.d.ts +1 -7
- package/splitter/index.mjs +1 -1
- package/splitter/src/components/mp-splitter.d.ts +16 -0
- package/splitter/src/managers/index.d.ts +1 -0
- package/splitter/src/managers/rescale-panel-sizes.d.ts +14 -0
- package/swiper-core/index.mjs +2 -2
- package/theming/bs-theme-preboot.js +1 -0
- package/theming/color-mode.css +36 -0
- package/theming/index.d.ts +1 -0
- package/theming/index.mjs +327 -0
- package/theming/src/components/mp-theme-toggle.d.ts +71 -0
- package/theming/src/cookie.d.ts +31 -0
- package/theming/src/index.d.ts +5 -0
- package/theming/src/preboot.d.ts +1 -0
- package/theming/src/resolve.d.ts +36 -0
- package/theming/src/store.d.ts +27 -0
- package/theming/src/styles/theme-toggle.styles.d.ts +2 -0
- package/theming/src/testing/fake-broadcast-channel.d.ts +35 -0
- package/theming/src/toggle-modes.d.ts +23 -0
- package/tile-manager/index.mjs +252 -211
- package/tile-manager/src/components/mint-tile-manager.element.d.ts +8 -0
- package/tile-manager/src/utils/grid-geometry.d.ts +49 -0
- package/timeline/index.mjs +156 -164
- package/timeline/src/components/mp-timeline.d.ts +41 -7
- package/timepicker/index.mjs +7 -4
- package/timepicker/src/mp-time-list.element.d.ts +26 -0
- package/timepicker/src/mp-timepicker.element.d.ts +3 -0
- package/toggle-button/index.mjs +1 -1
- package/tree-select/index.mjs +21 -9
- package/treeview/index.mjs +1 -1
- package/treeview/src/components/mp-treeview.d.ts +6 -4
- package/chunks/color-DIeST-IS.mjs +0 -224
- package/chunks/mp-datatable-UJI8E73X.mjs +0 -1400
- package/datatable/src/styles/datatable.styles.d.ts +0 -2
- package/query-builder/src/mp-query-condition.element.template.d.ts +0 -2
|
@@ -131,6 +131,11 @@ export declare class MpScheduler extends LitElement {
|
|
|
131
131
|
set options(value: Partial<SchedulerOptions>);
|
|
132
132
|
get selectedEvent(): SchedulerEvent | null;
|
|
133
133
|
set selectedEvent(value: SchedulerEvent | null);
|
|
134
|
+
/**
|
|
135
|
+
* The active time-range selection: the same range `selection-change`
|
|
136
|
+
* reports, and the one Enter turns into an `event-create` request. Not the
|
|
137
|
+
* drag or move-mode preview, which is transient and never a selection.
|
|
138
|
+
*/
|
|
134
139
|
get selectedRange(): {
|
|
135
140
|
start: Date;
|
|
136
141
|
end: Date;
|
|
@@ -520,11 +525,14 @@ export declare class MpScheduler extends LitElement {
|
|
|
520
525
|
*/
|
|
521
526
|
private applyHeaderLabels;
|
|
522
527
|
private updateUI;
|
|
528
|
+
private cancelPendingDragUpdate;
|
|
523
529
|
private scheduleDragUpdate;
|
|
524
530
|
private handlePointerDown;
|
|
525
531
|
private allowsGesture;
|
|
526
532
|
private handlePointerMove;
|
|
527
533
|
private handlePointerUp;
|
|
534
|
+
/** Abandon a pointer drag without committing it (the platform cancelled the touch). */
|
|
535
|
+
private cancelPointerDrag;
|
|
528
536
|
/** Distance from a scroller edge at which auto-scroll engages. */
|
|
529
537
|
private static readonly EDGE_SCROLL_ZONE_PX;
|
|
530
538
|
/** Fastest scroll step, in px per frame, reached at the very edge. */
|
|
@@ -709,9 +717,10 @@ export declare class MpScheduler extends LitElement {
|
|
|
709
717
|
*/
|
|
710
718
|
private scrollAndFocusDateCell;
|
|
711
719
|
/**
|
|
712
|
-
* Emit `event-create` covering the focused day (month view)
|
|
713
|
-
*
|
|
714
|
-
*
|
|
720
|
+
* Emit `event-create` covering the focused day (month view). No internal
|
|
721
|
+
* mutation per PRD scheduler-controlled-selection — consumer constructs the
|
|
722
|
+
* actual event. (Year view's Enter drills into the month instead, so there
|
|
723
|
+
* is no month-spanning variant.)
|
|
715
724
|
*/
|
|
716
725
|
private commitFocusedDateAsCreate;
|
|
717
726
|
private moveCellByTime;
|
|
@@ -856,6 +865,13 @@ export declare class MpScheduler extends LitElement {
|
|
|
856
865
|
private cancelEventMoveMode;
|
|
857
866
|
private startNowIndicatorTimer;
|
|
858
867
|
private stopNowIndicatorTimer;
|
|
868
|
+
/**
|
|
869
|
+
* The one hit-test seam (PRD test-coverage P2-D4): which elements sit under a
|
|
870
|
+
* viewport point, topmost first. Every pointer-to-slot resolution goes
|
|
871
|
+
* through here, so a spec can answer "what is under the pointer" without
|
|
872
|
+
* inventing a single rect value.
|
|
873
|
+
*/
|
|
874
|
+
private elementsAt;
|
|
859
875
|
private getSlotAtPosition;
|
|
860
876
|
private getSlotFromElement;
|
|
861
877
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TimeSlot } from '@mintplayer/web-components/scheduler-core';
|
|
2
2
|
import { SchedulerStateManager } from '../state/scheduler-state';
|
|
3
3
|
import { DragConfig, DragCompletionResult, PointerTarget } from './drag-types';
|
|
4
4
|
import { NormalizedPointerEvent } from '../input/pointer-event';
|
|
@@ -67,14 +67,6 @@ export declare class DragManager {
|
|
|
67
67
|
* Clean up resources.
|
|
68
68
|
*/
|
|
69
69
|
destroy(): void;
|
|
70
|
-
/**
|
|
71
|
-
* Create a new event from a completed create drag.
|
|
72
|
-
*/
|
|
73
|
-
createEventFromResult(result: DragCompletionResult): SchedulerEvent;
|
|
74
|
-
/**
|
|
75
|
-
* Update an event from a completed move/resize drag.
|
|
76
|
-
*/
|
|
77
|
-
updateEventFromResult(result: DragCompletionResult, event: SchedulerEvent): SchedulerEvent;
|
|
78
70
|
/**
|
|
79
71
|
* Process pending pointer move using RAF.
|
|
80
72
|
*/
|
|
@@ -19,6 +19,8 @@ export interface InputHandlerCallbacks {
|
|
|
19
19
|
onTouchDragActivated?: () => void;
|
|
20
20
|
/** Called when touch drag mode is deactivated */
|
|
21
21
|
onTouchDragDeactivated?: () => void;
|
|
22
|
+
/** Called when the platform cancels an active touch drag; the drag must be abandoned, not committed */
|
|
23
|
+
onPointerCancel?: () => void;
|
|
22
24
|
/** Called to get the scrollable container for panning */
|
|
23
25
|
getScrollContainer?: () => HTMLElement | null;
|
|
24
26
|
}
|
|
@@ -66,7 +68,8 @@ export declare class InputHandler {
|
|
|
66
68
|
private touchStartPosition;
|
|
67
69
|
private isTouchDragMode;
|
|
68
70
|
private touchHoldTarget;
|
|
69
|
-
|
|
71
|
+
/** The element the current gesture started on; see bindGestureElement. */
|
|
72
|
+
private gestureElement;
|
|
70
73
|
private isPanMode;
|
|
71
74
|
private panStartPosition;
|
|
72
75
|
private panStartScroll;
|
|
@@ -115,12 +118,19 @@ export declare class InputHandler {
|
|
|
115
118
|
private handleTouchMove;
|
|
116
119
|
private handleTouchEnd;
|
|
117
120
|
private handleTouchCancel;
|
|
121
|
+
/**
|
|
122
|
+
* Listen for the rest of the gesture on the element the touch started on.
|
|
123
|
+
* At most one element is bound at a time, and it is released when the
|
|
124
|
+
* gesture ends — before, every touchstart added three listeners that were
|
|
125
|
+
* never removed.
|
|
126
|
+
*/
|
|
127
|
+
private bindGestureElement;
|
|
128
|
+
private unbindGestureElement;
|
|
118
129
|
private activateTouchDragMode;
|
|
119
130
|
private cancelTouchHold;
|
|
120
131
|
private exitTouchDragMode;
|
|
121
132
|
private addTouchFeedback;
|
|
122
133
|
private removeTouchFeedback;
|
|
123
|
-
private triggerHapticFeedback;
|
|
124
134
|
private enterPanMode;
|
|
125
135
|
private exitPanMode;
|
|
126
136
|
private performPan;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure geometry for the scheduler's pointer paths.
|
|
3
|
+
*
|
|
4
|
+
* These take numbers and return numbers so the arithmetic can be pinned by
|
|
5
|
+
* specs without faking a single rect value (R3, PRD test-coverage P2-D4). The
|
|
6
|
+
* callers read the live geometry and pass it in.
|
|
7
|
+
*/
|
|
8
|
+
export interface EdgeRect {
|
|
9
|
+
left: number;
|
|
10
|
+
top: number;
|
|
11
|
+
right: number;
|
|
12
|
+
bottom: number;
|
|
13
|
+
}
|
|
14
|
+
export interface Vector {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Per-frame auto-scroll step while a drag is near a scroller edge.
|
|
20
|
+
*
|
|
21
|
+
* Each axis is 0 outside the `zone`-wide band along an edge and ramps
|
|
22
|
+
* linearly to `max` px per frame at the edge itself (clamped beyond it), with
|
|
23
|
+
* the sign pointing toward that edge: negative scrolls toward left/top.
|
|
24
|
+
*/
|
|
25
|
+
export declare function edgeScrollVector(point: Vector, rect: EdgeRect, zone: number, max: number): Vector;
|
|
26
|
+
/**
|
|
27
|
+
* Clamp a requested resource-column width to what the scroller can hold.
|
|
28
|
+
*
|
|
29
|
+
* Never narrower than `minColumn`, and never so wide that less than `minGrid`
|
|
30
|
+
* px of grid remains; when the scroller is too narrow for both, `minColumn`
|
|
31
|
+
* wins. The result is rounded to a whole pixel.
|
|
32
|
+
*/
|
|
33
|
+
export declare function clampColumnWidth(requested: number, containerWidth: number, minColumn: number, minGrid: number): number;
|
|
34
|
+
/**
|
|
35
|
+
* The resource column's share of the scroller, as the whole percentage the
|
|
36
|
+
* window-splitter pattern reports in `aria-valuenow`. A zero-width scroller
|
|
37
|
+
* (not laid out yet) is treated as 1px rather than dividing by zero.
|
|
38
|
+
*/
|
|
39
|
+
export declare function columnWidthPercent(width: number, containerWidth: number): number;
|
|
@@ -85,7 +85,6 @@ export declare class TimelineView extends BaseView {
|
|
|
85
85
|
*/
|
|
86
86
|
private createColumnResizer;
|
|
87
87
|
private currentColumnWidth;
|
|
88
|
-
private maxColumnWidth;
|
|
89
88
|
private applyColumnWidth;
|
|
90
89
|
/** aria-valuenow as a percentage of the scroller, per the splitter pattern. */
|
|
91
90
|
private updateResizerValue;
|
package/scheduler-core/index.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { D as C, d as
|
|
2
|
-
import { a as
|
|
1
|
+
import { D as C, d as v } from "../chunks/resource.service--lqLwEqk.mjs";
|
|
2
|
+
import { a as X, b as Y, c as q, e as J, f as K, R as Q, T as Z, g as tt, h as et, i as ot, j as nt, k as st, l as it, m as ct, n as rt, o as at, p as lt, r as dt, q as gt, s as ut, t as ht, u as ft, v as mt } from "../chunks/resource.service--lqLwEqk.mjs";
|
|
3
3
|
class x {
|
|
4
4
|
/**
|
|
5
5
|
* Calculate position for an event part in week/day view
|
|
6
6
|
*/
|
|
7
|
-
calculateWeekPosition(t, e,
|
|
7
|
+
calculateWeekPosition(t, e, n, s, i, l = {}) {
|
|
8
8
|
const c = { ...C, ...l };
|
|
9
9
|
new Date(t.start).setHours(0, 0, 0, 0);
|
|
10
|
-
const a =
|
|
10
|
+
const a = v.getSecondsFromMidnight(t.start), h = v.getSecondsFromMidnight(t.end) - a, [d] = c.slotMinTime.split(":").map(Number), [f] = c.slotMaxTime.split(":").map(Number), g = (f - d) * 3600, S = (a - d * 3600) / g * 100, b = h / g * 100, p = 10, T = (100 - p) / i, $ = T / n, w = p + s * T + e * $;
|
|
11
11
|
return {
|
|
12
|
-
top:
|
|
13
|
-
left:
|
|
14
|
-
width:
|
|
15
|
-
height:
|
|
12
|
+
top: S,
|
|
13
|
+
left: w,
|
|
14
|
+
width: $,
|
|
15
|
+
height: b,
|
|
16
16
|
zIndex: e + 1
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Calculate position for an event in timeline view
|
|
21
21
|
*/
|
|
22
|
-
calculateTimelinePosition(t, e,
|
|
22
|
+
calculateTimelinePosition(t, e, n, s, i, l = {}) {
|
|
23
23
|
({ ...C, ...l });
|
|
24
|
-
const c = i.getTime() -
|
|
24
|
+
const c = i.getTime() - s.getTime(), r = Math.max(t.start.getTime(), s.getTime()), a = Math.min(t.end.getTime(), i.getTime()), u = r - s.getTime(), h = a - r, d = u / c * 100, f = h / c * 100, g = 100 / n;
|
|
25
25
|
return {
|
|
26
26
|
top: e * g,
|
|
27
27
|
left: d,
|
|
@@ -33,12 +33,12 @@ class x {
|
|
|
33
33
|
/**
|
|
34
34
|
* Calculate position for an all-day event in month view
|
|
35
35
|
*/
|
|
36
|
-
calculateMonthEventPosition(t, e,
|
|
37
|
-
const c = 100 / l, r = 100 /
|
|
36
|
+
calculateMonthEventPosition(t, e, n, s, i, l = 7) {
|
|
37
|
+
const c = 100 / l, r = 100 / n, a = s * c, u = (i - s + 1) * c;
|
|
38
38
|
return {
|
|
39
39
|
top: e * r,
|
|
40
40
|
left: a,
|
|
41
|
-
width:
|
|
41
|
+
width: u,
|
|
42
42
|
height: r,
|
|
43
43
|
zIndex: e + 1
|
|
44
44
|
};
|
|
@@ -46,12 +46,12 @@ class x {
|
|
|
46
46
|
/**
|
|
47
47
|
* Convert percentage-based position to pixel-based
|
|
48
48
|
*/
|
|
49
|
-
toPixelPosition(t, e,
|
|
49
|
+
toPixelPosition(t, e, n) {
|
|
50
50
|
return {
|
|
51
|
-
top: t.top / 100 *
|
|
51
|
+
top: t.top / 100 * n,
|
|
52
52
|
left: t.left / 100 * e,
|
|
53
53
|
width: t.width / 100 * e,
|
|
54
|
-
height: t.height / 100 *
|
|
54
|
+
height: t.height / 100 * n,
|
|
55
55
|
zIndex: t.zIndex
|
|
56
56
|
};
|
|
57
57
|
}
|
|
@@ -82,103 +82,116 @@ class x {
|
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
const
|
|
86
|
-
function
|
|
87
|
-
const
|
|
85
|
+
const D = new x();
|
|
86
|
+
function m(o = "evt") {
|
|
87
|
+
const t = Date.now().toString(36), e = Math.random().toString(36).substring(2, 9);
|
|
88
|
+
return `${o}-${t}-${e}`;
|
|
89
|
+
}
|
|
90
|
+
function M() {
|
|
91
|
+
return m("evt");
|
|
92
|
+
}
|
|
93
|
+
function P() {
|
|
94
|
+
return m("res");
|
|
95
|
+
}
|
|
96
|
+
function L() {
|
|
97
|
+
return m("grp");
|
|
98
|
+
}
|
|
99
|
+
function z(o, t) {
|
|
100
|
+
const e = Object.entries(t).map(([n, s]) => `[data-${n}="${s}"]`).join("");
|
|
88
101
|
return o.querySelector(e);
|
|
89
102
|
}
|
|
90
|
-
function
|
|
103
|
+
function O(o) {
|
|
91
104
|
const t = o.dataset, e = {};
|
|
92
|
-
for (const
|
|
93
|
-
const
|
|
94
|
-
|
|
105
|
+
for (const n in t) {
|
|
106
|
+
const s = t[n];
|
|
107
|
+
s !== void 0 && (e[n] = s);
|
|
95
108
|
}
|
|
96
109
|
return e;
|
|
97
110
|
}
|
|
98
|
-
function
|
|
111
|
+
function B(o, t) {
|
|
99
112
|
return o.closest(`[data-${t}]`);
|
|
100
113
|
}
|
|
101
|
-
function
|
|
114
|
+
function W(o) {
|
|
102
115
|
return {
|
|
103
116
|
top: o.scrollTop,
|
|
104
117
|
left: o.scrollLeft
|
|
105
118
|
};
|
|
106
119
|
}
|
|
107
|
-
function
|
|
108
|
-
const
|
|
120
|
+
function A(o, t, e = "smooth") {
|
|
121
|
+
const n = o.getBoundingClientRect(), i = t.getBoundingClientRect().top - n.top + o.scrollTop;
|
|
109
122
|
o.scrollTo({
|
|
110
123
|
top: i,
|
|
111
124
|
behavior: e
|
|
112
125
|
});
|
|
113
126
|
}
|
|
114
|
-
function
|
|
115
|
-
const e = o.getBoundingClientRect(),
|
|
116
|
-
return e.top >=
|
|
127
|
+
function F(o, t) {
|
|
128
|
+
const e = o.getBoundingClientRect(), n = t ? t.getBoundingClientRect() : { top: 0, left: 0, bottom: window.innerHeight, right: window.innerWidth };
|
|
129
|
+
return e.top >= n.top && e.left >= n.left && e.bottom <= n.bottom && e.right <= n.right;
|
|
117
130
|
}
|
|
118
|
-
function
|
|
119
|
-
const e = t.getBoundingClientRect(),
|
|
131
|
+
function _(o, t) {
|
|
132
|
+
const e = t.getBoundingClientRect(), n = "touches" in o ? o.touches[0].clientX : o.clientX, s = "touches" in o ? o.touches[0].clientY : o.clientY;
|
|
120
133
|
return {
|
|
121
|
-
x:
|
|
122
|
-
y:
|
|
134
|
+
x: n - e.left,
|
|
135
|
+
y: s - e.top
|
|
123
136
|
};
|
|
124
137
|
}
|
|
125
|
-
function
|
|
138
|
+
function k(o, t, e) {
|
|
126
139
|
o.style.setProperty(`--${t}`, e);
|
|
127
140
|
}
|
|
128
|
-
function
|
|
141
|
+
function H(o, t) {
|
|
129
142
|
return getComputedStyle(o).getPropertyValue(`--${t}`).trim();
|
|
130
143
|
}
|
|
131
|
-
function
|
|
144
|
+
function N(o, ...t) {
|
|
132
145
|
o.classList.add(...t.filter(Boolean));
|
|
133
146
|
}
|
|
134
|
-
function
|
|
147
|
+
function U(o, ...t) {
|
|
135
148
|
o.classList.remove(...t.filter(Boolean));
|
|
136
149
|
}
|
|
137
|
-
function
|
|
150
|
+
function V(o, t, e) {
|
|
138
151
|
o.classList.toggle(t, e);
|
|
139
152
|
}
|
|
140
153
|
export {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
154
|
+
X as DEFAULT_COLORS,
|
|
155
|
+
Y as DEFAULT_EVENT_COLOR,
|
|
156
|
+
q as DEFAULT_MESSAGES,
|
|
144
157
|
C as DEFAULT_OPTIONS,
|
|
145
|
-
|
|
146
|
-
|
|
158
|
+
J as DEFAULT_PERMISSIONS,
|
|
159
|
+
K as DateService,
|
|
147
160
|
x as PositionService,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
Q as ResourceService,
|
|
162
|
+
Z as TimelineService,
|
|
163
|
+
tt as addAlpha,
|
|
164
|
+
N as addClasses,
|
|
165
|
+
et as contrastRatioWith,
|
|
166
|
+
ot as darkenColor,
|
|
167
|
+
v as dateService,
|
|
168
|
+
B as findClosestWithData,
|
|
169
|
+
nt as formatMessage,
|
|
170
|
+
M as generateEventId,
|
|
171
|
+
L as generateGroupId,
|
|
172
|
+
m as generateId,
|
|
173
|
+
P as generateResourceId,
|
|
174
|
+
H as getCSSVariable,
|
|
175
|
+
st as getColorByIndex,
|
|
163
176
|
it as getContrastColor,
|
|
164
|
-
|
|
165
|
-
|
|
177
|
+
O as getDataAttributes,
|
|
178
|
+
z as getElementByData,
|
|
166
179
|
ct as getReadableTextColor,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
180
|
+
_ as getRelativePosition,
|
|
181
|
+
W as getScrollPosition,
|
|
182
|
+
F as isInViewport,
|
|
170
183
|
rt as isResource,
|
|
171
184
|
at as isResourceGroup,
|
|
172
185
|
lt as lightenColor,
|
|
173
|
-
|
|
174
|
-
|
|
186
|
+
D as positionService,
|
|
187
|
+
U as removeClasses,
|
|
175
188
|
dt as resolveCapability,
|
|
176
189
|
gt as resolveEventColor,
|
|
177
|
-
|
|
178
|
-
|
|
190
|
+
ut as resolveMessages,
|
|
191
|
+
ht as resolveResizeEdge,
|
|
179
192
|
ft as resourceService,
|
|
180
|
-
|
|
181
|
-
|
|
193
|
+
A as scrollToTime,
|
|
194
|
+
k as setCSSVariable,
|
|
182
195
|
mt as timelineService,
|
|
183
|
-
|
|
196
|
+
V as toggleClass
|
|
184
197
|
};
|
|
@@ -66,18 +66,6 @@ export declare class ResourceService {
|
|
|
66
66
|
* Set collapse state of a group
|
|
67
67
|
*/
|
|
68
68
|
setGroupCollapse(items: (Resource | ResourceGroup)[], groupId: string, collapsed: boolean): (Resource | ResourceGroup)[];
|
|
69
|
-
/**
|
|
70
|
-
* Collapse all groups
|
|
71
|
-
*/
|
|
72
|
-
collapseAll(items: (Resource | ResourceGroup)[]): (Resource | ResourceGroup)[];
|
|
73
|
-
/**
|
|
74
|
-
* Expand all groups
|
|
75
|
-
*/
|
|
76
|
-
expandAll(items: (Resource | ResourceGroup)[]): (Resource | ResourceGroup)[];
|
|
77
|
-
/**
|
|
78
|
-
* Map over all resources in the hierarchy
|
|
79
|
-
*/
|
|
80
|
-
private mapResources;
|
|
81
69
|
/**
|
|
82
70
|
* Map over all groups in the hierarchy
|
|
83
71
|
*/
|
|
@@ -67,11 +67,6 @@ export declare class TimelineService {
|
|
|
67
67
|
* Check if two events overlap in time
|
|
68
68
|
*/
|
|
69
69
|
private eventsOverlap;
|
|
70
|
-
/**
|
|
71
|
-
* Calculate the relative track position for an event part (legacy method)
|
|
72
|
-
* @deprecated Use getColspanLayout instead for better layout
|
|
73
|
-
*/
|
|
74
|
-
private getRelativeTrackPosition;
|
|
75
70
|
/**
|
|
76
71
|
* Filter events that fall within a date range
|
|
77
72
|
*/
|
|
@@ -92,10 +87,6 @@ export declare class TimelineService {
|
|
|
92
87
|
* Get events for a specific day
|
|
93
88
|
*/
|
|
94
89
|
getEventsForDay(events: SchedulerEvent[], day: Date): SchedulerEvent[];
|
|
95
|
-
/**
|
|
96
|
-
* Get event parts for a specific day
|
|
97
|
-
*/
|
|
98
|
-
getPartsForDay(parts: SchedulerEventPart[], day: Date): SchedulerEventPart[];
|
|
99
90
|
}
|
|
100
91
|
/**
|
|
101
92
|
* Singleton instance of TimelineService
|
package/select/index.mjs
CHANGED
|
@@ -141,6 +141,7 @@ export declare class MpSelect extends MpSelect_base {
|
|
|
141
141
|
get optionRenderer(): MpSelectOptionRenderer | null;
|
|
142
142
|
set optionRenderer(value: MpSelectOptionRenderer | null);
|
|
143
143
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
144
|
+
connectedCallback(): void;
|
|
144
145
|
disconnectedCallback(): void;
|
|
145
146
|
/**
|
|
146
147
|
* Rich rendering is on only when everything holds at once: an engine that
|
package/signature-pad/index.mjs
CHANGED
|
@@ -66,10 +66,16 @@ button.control-btn:focus-visible {
|
|
|
66
66
|
outline: 2px solid var(--bs-primary, #0d6efd);
|
|
67
67
|
outline-offset: 2px;
|
|
68
68
|
}`);
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
(n
|
|
72
|
-
|
|
69
|
+
function y(n, t, e, i) {
|
|
70
|
+
return !e.width || !e.height ? { x: t.x, y: t.y } : {
|
|
71
|
+
x: (n.x - e.left) * (i.width / e.width),
|
|
72
|
+
y: (n.y - e.top) * (i.height / e.height)
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
var m = Object.defineProperty, u = (n, t, e, i) => {
|
|
76
|
+
for (var r = void 0, s = n.length - 1, o; s >= 0; s--)
|
|
77
|
+
(o = n[s]) && (r = o(t, e, r) || r);
|
|
78
|
+
return r && m(t, e, r), r;
|
|
73
79
|
};
|
|
74
80
|
class l extends b {
|
|
75
81
|
constructor() {
|
|
@@ -78,12 +84,15 @@ class l extends b {
|
|
|
78
84
|
}), this.onPointerStart = (t) => {
|
|
79
85
|
t.preventDefault(), this._isDrawing = !0;
|
|
80
86
|
const e = this.toCanvasPoint(t);
|
|
81
|
-
this._signature.strokes.
|
|
87
|
+
this._signature = { ...this._signature, strokes: [...this._signature.strokes, { points: [e] }] }, this._context && (this._context.strokeStyle = "black", this._context.beginPath(), this._context.moveTo(e.x, e.y)), this.dispatchSignatureChange();
|
|
82
88
|
}, this.onPointerMove = (t) => {
|
|
83
89
|
if (!this._isDrawing) return;
|
|
84
90
|
t.preventDefault();
|
|
85
|
-
const e = this.toCanvasPoint(t);
|
|
86
|
-
|
|
91
|
+
const e = this.toCanvasPoint(t), i = this._signature.strokes, r = i.at(-1);
|
|
92
|
+
r && (this._signature = {
|
|
93
|
+
...this._signature,
|
|
94
|
+
strokes: [...i.slice(0, -1), { ...r, points: [...r.points, e] }]
|
|
95
|
+
}), this._context && (this._context.lineTo(e.x, e.y), this._context.stroke()), this.dispatchSignatureChange();
|
|
87
96
|
}, this.onPointerEnd = (t) => {
|
|
88
97
|
this._isDrawing && (t.preventDefault(), this._isDrawing = !1);
|
|
89
98
|
}, this.onTypedInput = (t) => {
|
|
@@ -151,21 +160,10 @@ class l extends b {
|
|
|
151
160
|
this.hostAria.syncReferences(), (t.has("signature") || t.has("width") || t.has("height")) && this.redraw();
|
|
152
161
|
}
|
|
153
162
|
/* ---- Drawing ---- */
|
|
154
|
-
/**
|
|
155
|
-
* Map a pointer event into canvas BITMAP coordinates. `offsetX/offsetY` are
|
|
156
|
-
* CSS pixels of the rendered box; when the canvas is CSS-sized (e.g.
|
|
157
|
-
* `width: 100%`) those disagree with the `width`/`height` drawing space and
|
|
158
|
-
* every stroke would land offset and stretched. Scaling by
|
|
159
|
-
* bitmap-size / rendered-rect keeps drawing correct under any CSS sizing.
|
|
160
|
-
*/
|
|
163
|
+
/** Map a pointer event into canvas bitmap coordinates; see toBitmapPoint. */
|
|
161
164
|
toCanvasPoint(t) {
|
|
162
|
-
const e = this.canvasEl;
|
|
163
|
-
|
|
164
|
-
const i = e.getBoundingClientRect();
|
|
165
|
-
return !i.width || !i.height ? { x: t.offsetX, y: t.offsetY } : {
|
|
166
|
-
x: (t.clientX - i.left) * (e.width / i.width),
|
|
167
|
-
y: (t.clientY - i.top) * (e.height / i.height)
|
|
168
|
-
};
|
|
165
|
+
const e = this.canvasEl, i = { x: t.offsetX, y: t.offsetY };
|
|
166
|
+
return e ? y({ x: t.clientX, y: t.clientY }, i, e.getBoundingClientRect(), e) : i;
|
|
169
167
|
}
|
|
170
168
|
/** Repaint the canvas from the model: every stroke, then the typed text. */
|
|
171
169
|
redraw() {
|
|
@@ -174,10 +172,10 @@ class l extends b {
|
|
|
174
172
|
const { strokes: e, text: i } = this._signature;
|
|
175
173
|
t.clearRect(0, 0, this.width, this.height), t.fillStyle = "black", t.strokeStyle = "black";
|
|
176
174
|
for (const r of e) {
|
|
177
|
-
const [s, ...
|
|
175
|
+
const [s, ...o] = r.points;
|
|
178
176
|
if (s) {
|
|
179
177
|
t.beginPath(), t.moveTo(s.x, s.y);
|
|
180
|
-
for (const h of
|
|
178
|
+
for (const h of o)
|
|
181
179
|
t.lineTo(h.x, h.y);
|
|
182
180
|
t.stroke();
|
|
183
181
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface CanvasPoint {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
/** The rendered box of the canvas, in CSS pixels (a DOMRect's relevant part). */
|
|
6
|
+
export interface RenderedBox {
|
|
7
|
+
left: number;
|
|
8
|
+
top: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Map a pointer position into canvas BITMAP coordinates.
|
|
14
|
+
*
|
|
15
|
+
* `offsetX/offsetY` are CSS pixels of the rendered box; when the canvas is
|
|
16
|
+
* CSS-sized (e.g. `width: 100%`) those disagree with the `width`/`height`
|
|
17
|
+
* drawing space and every stroke would land offset and stretched. Scaling by
|
|
18
|
+
* bitmap-size / rendered-box keeps drawing correct under any CSS sizing.
|
|
19
|
+
*
|
|
20
|
+
* A box with no area (no layout yet, a hidden pad) cannot be scaled against,
|
|
21
|
+
* so the offset coordinates are used as they are.
|
|
22
|
+
*/
|
|
23
|
+
export declare function toBitmapPoint(client: CanvasPoint, offset: CanvasPoint, box: RenderedBox, bitmap: {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
}): CanvasPoint;
|
|
@@ -119,13 +119,7 @@ export declare class MpSignaturePadElement extends LitElement {
|
|
|
119
119
|
clear(): void;
|
|
120
120
|
protected firstUpdated(): void;
|
|
121
121
|
protected updated(changed: Map<string, unknown>): void;
|
|
122
|
-
/**
|
|
123
|
-
* Map a pointer event into canvas BITMAP coordinates. `offsetX/offsetY` are
|
|
124
|
-
* CSS pixels of the rendered box; when the canvas is CSS-sized (e.g.
|
|
125
|
-
* `width: 100%`) those disagree with the `width`/`height` drawing space and
|
|
126
|
-
* every stroke would land offset and stretched. Scaling by
|
|
127
|
-
* bitmap-size / rendered-rect keeps drawing correct under any CSS sizing.
|
|
128
|
-
*/
|
|
122
|
+
/** Map a pointer event into canvas bitmap coordinates; see toBitmapPoint. */
|
|
129
123
|
private toCanvasPoint;
|
|
130
124
|
private onPointerStart;
|
|
131
125
|
private onPointerMove;
|
package/splitter/index.mjs
CHANGED
|
@@ -43,10 +43,26 @@ export declare class MpSplitter extends LitElement {
|
|
|
43
43
|
constructor();
|
|
44
44
|
render(): TemplateResult;
|
|
45
45
|
protected firstUpdated(): void;
|
|
46
|
+
connectedCallback(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Observers + state subscription, plus a deferred panel rebuild so children
|
|
49
|
+
* changed while detached are picked up. Paired with disconnectedCallback.
|
|
50
|
+
*/
|
|
51
|
+
private attachObservers;
|
|
46
52
|
disconnectedCallback(): void;
|
|
47
53
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
54
|
+
/**
|
|
55
|
+
* Anything but "vertical" is horizontal. The attribute was cast straight to
|
|
56
|
+
* `Direction`, so an unknown value was reported as the orientation and added
|
|
57
|
+
* to the container as a class, matching neither layout rule.
|
|
58
|
+
*/
|
|
48
59
|
get orientation(): Direction;
|
|
49
60
|
set orientation(value: Direction);
|
|
61
|
+
/**
|
|
62
|
+
* The minimum panel size the resize maths enforces. Read from the resize
|
|
63
|
+
* manager, the single source of truth, so a non-numeric attribute reads
|
|
64
|
+
* back as the 50 px fallback actually in use rather than NaN.
|
|
65
|
+
*/
|
|
50
66
|
get minPanelSize(): number;
|
|
51
67
|
set minPanelSize(value: number);
|
|
52
68
|
get touchMode(): boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Proportionally rescale stored panel sizes so they fill `availableSpace`
|
|
3
|
+
* (the container minus dividers and their overlap margins), preserving the
|
|
4
|
+
* ratios between panels.
|
|
5
|
+
*
|
|
6
|
+
* Returns null when there is nothing to do, so the caller writes nothing:
|
|
7
|
+
* - no stored sizes, or they sum to zero or less (no ratio to preserve);
|
|
8
|
+
* - `availableSpace` is not a finite number (a style read failed);
|
|
9
|
+
* - the change is below 1 px. Applying the sizes can itself nudge the
|
|
10
|
+
* container by a subpixel, and rescaling on that would chase our own writes.
|
|
11
|
+
*
|
|
12
|
+
* A negative `availableSpace` is treated as 0.
|
|
13
|
+
*/
|
|
14
|
+
export declare function rescalePanelSizes(stored: readonly number[], availableSpace: number): number[] | null;
|