@nxgt/material 3.43.0 → 3.44.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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/{async-slice-Dj0tAKRI.js → async-slice-D9LAUgth.js} +2 -2
- package/dist/{button-CTsT_LqL.js → button-b_kruV_L.js} +1 -1
- package/dist/charts.js +3 -3
- package/dist/{chip-DP7EyhtT.js → chip-6O3t9GXt.js} +1 -1
- package/dist/{code-editor-BWn0AXBf.js → code-editor-BtDOgUET.js} +4 -4
- package/dist/code-editor.js +4 -4
- package/dist/{code-language-items-CCRuLYpA.js → code-language-items-374m-OK8.js} +2 -2
- package/dist/{components-DSCK_Ohm.js → components-DMgim3_P.js} +21133 -20541
- package/dist/components.js +15 -15
- package/dist/{dialog-uQld1gKm.js → dialog-8Ua9uuJW.js} +1 -1
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-BA70o7HC.js → dropdown-menu-DJEeT1XT.js} +1 -1
- package/dist/editor.js +7 -7
- package/dist/{empty-state-BzwyRX5J.js → empty-state-CrhrmNqn.js} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/{i18n-provider-DkeMr5bw.js → i18n-provider-hrtFm9jD.js} +1 -1
- package/dist/i18n.js +5 -5
- package/dist/{icon-badge-D_z5BGbc.js → icon-badge-Cpke1tCf.js} +1 -1
- package/dist/lib/components/ui/dates/now-indicator/now-indicator.d.ts +9 -1
- package/dist/lib/components/ui/dates/now-indicator/now-indicator.utils.d.ts +2 -0
- package/dist/lib/components/ui/display/event-chip/event-chip.d.ts +3 -1
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/tone-color.d.ts +2 -0
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar-context.d.ts +2 -0
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar-events.utils.d.ts +8 -15
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar.axis.d.ts +49 -0
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar.d.ts +1 -1
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar.drop.d.ts +27 -0
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar.ids.d.ts +9 -2
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar.labels.d.ts +18 -0
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar.layout.d.ts +17 -0
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar.resources.d.ts +36 -0
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar.scroll.d.ts +7 -0
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar.slice.d.ts +28 -0
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar.utils.d.ts +0 -3
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar.zone.d.ts +35 -0
- package/dist/lib/components/ui/widgets/event-calendar/index.d.ts +1 -1
- package/dist/lib/components/ui/widgets/event-calendar/partials/calendar-event-chip.d.ts +3 -1
- package/dist/lib/components/ui/widgets/event-calendar/partials/event-preview-resource.d.ts +6 -0
- package/dist/lib/components/ui/widgets/event-calendar/partials/event-preview-title.d.ts +11 -0
- package/dist/lib/components/ui/widgets/event-calendar/partials/event-preview.d.ts +3 -2
- package/dist/lib/components/ui/widgets/event-calendar/partials/event-resize-handle.d.ts +3 -2
- package/dist/lib/components/ui/widgets/event-calendar/partials/resource-all-day-lane.d.ts +6 -0
- package/dist/lib/components/ui/widgets/event-calendar/partials/resource-header.d.ts +12 -0
- package/dist/lib/components/ui/widgets/event-calendar/partials/resource-switcher.d.ts +9 -0
- package/dist/lib/components/ui/widgets/event-calendar/partials/time-column-now.d.ts +10 -0
- package/dist/lib/components/ui/widgets/event-calendar/partials/time-column.d.ts +12 -1
- package/dist/lib/components/ui/widgets/event-calendar/partials/time-grid-event.d.ts +6 -2
- package/dist/lib/components/ui/widgets/event-calendar/partials/time-grid-header-day.d.ts +9 -0
- package/dist/lib/components/ui/widgets/event-calendar/partials/time-grid-header.d.ts +4 -1
- package/dist/lib/components/ui/widgets/event-calendar/partials/time-grid-hours.d.ts +6 -0
- package/dist/lib/components/ui/widgets/event-calendar/partials/time-grid.d.ts +11 -4
- package/dist/lib/components/ui/widgets/event-calendar/partials/time-gutter.d.ts +9 -4
- package/dist/lib/components/ui/widgets/event-calendar/partials/tone-mark.d.ts +5 -0
- package/dist/lib/components/ui/widgets/event-calendar/partials/zone-corner.d.ts +10 -0
- package/dist/lib/components/ui/widgets/event-calendar/types.d.ts +42 -0
- package/dist/lib/components/ui/widgets/event-calendar/use-calendar-drag.d.ts +3 -0
- package/dist/lib/components/ui/widgets/event-calendar/use-calendar-keys.d.ts +3 -0
- package/dist/lib/components/ui/widgets/event-calendar/use-calendar-nav.d.ts +15 -0
- package/dist/lib/components/ui/widgets/event-calendar/use-chip-event.d.ts +13 -0
- package/dist/lib/components/ui/widgets/event-calendar/use-drawn-events.d.ts +9 -0
- package/dist/lib/components/ui/widgets/event-calendar/use-event-calendar.d.ts +9 -25
- package/dist/lib/components/ui/widgets/event-calendar/use-event-list.d.ts +18 -0
- package/dist/lib/components/ui/widgets/event-calendar/use-slot-create.d.ts +5 -4
- package/dist/lib/components/ui/widgets/event-calendar/use-time-column.d.ts +22 -0
- package/dist/lib/components/ui/widgets/event-calendar/use-time-grid.d.ts +36 -0
- package/dist/lib/i18n/resources/en/en.d.ts +3 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +4 -1
- package/dist/lib/i18n/resources/fr/fr.d.ts +3 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +4 -1
- package/dist/lib/i18n/resources/resources.d.ts +6 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +21 -21
- package/dist/map.js +4 -4
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +2 -2
- package/dist/{public-ib0sK0Hr.js → public-DPPmNtZB.js} +6 -6
- package/dist/{rich-code-block-D_PTTZWQ.js → rich-code-block-KQYR0qt3.js} +4 -4
- package/dist/{sortable-provider-CrS51nKB.js → sortable-provider-hPPTMtJA.js} +632 -631
- package/dist/{spinner-DLd_IHev.js → spinner-Dd0os4cb.js} +1 -1
- package/dist/{stored-language-B5SMR-W2.js → stored-language-Blyb68vN.js} +8 -2
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-wJYmnwgu.js → theme-toggle-BDRRkkiA.js} +1 -1
- package/dist/{toolbar-items-BLjrk8uU.js → toolbar-items-D3hw7XZE.js} +2 -2
- package/dist/{translate-material-BYRDtSEk.js → translate-material-CdJBbURx.js} +2 -2
- package/dist/{translator-C-_M57ZA.js → translator-38JuN_VD.js} +1 -1
- package/dist/{use-chat-composer-D_hfO99B.js → use-chat-composer-utGkZQ6X.js} +12 -12
- package/dist/{use-heading-spy-wElRpO2G.js → use-heading-spy-bTccmEMF.js} +1 -1
- package/dist/{use-material-translation-CFF73jk5.js → use-material-translation-DLsfkMxp.js} +2 -2
- package/docs/components/date-and-time.md +2 -0
- package/docs/components/rich-widgets.md +105 -2
- package/docs/troubleshooting.md +14 -0
- package/package.json +1 -1
|
@@ -1,25 +1,6 @@
|
|
|
1
|
-
import { CalendarEvent,
|
|
2
|
-
type
|
|
3
|
-
export declare function useEventCalendar(
|
|
4
|
-
events?: CalendarEvent[];
|
|
5
|
-
defaultEvents?: CalendarEvent[];
|
|
6
|
-
onEventsChange?: (events: CalendarEvent[]) => void;
|
|
7
|
-
onChange?: (change: EventCalendarChange) => void;
|
|
8
|
-
view?: EventCalendarView;
|
|
9
|
-
defaultView?: EventCalendarView;
|
|
10
|
-
onViewChange?: (view: EventCalendarView) => void;
|
|
11
|
-
date?: string;
|
|
12
|
-
defaultDate?: string;
|
|
13
|
-
onDateChange?: (date: string) => void;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
startHour?: number;
|
|
16
|
-
endHour?: number;
|
|
17
|
-
hourHeight?: number;
|
|
18
|
-
slotDurationMinutes?: number;
|
|
19
|
-
weekStartsOn?: WeekStart;
|
|
20
|
-
density?: EventCalendarDensity;
|
|
21
|
-
now?: Date;
|
|
22
|
-
}): {
|
|
1
|
+
import { CalendarEvent, EventCalendarProps, EventCalendarView } from './types.js';
|
|
2
|
+
export type UseEventCalendarOptions = Pick<EventCalendarProps, 'events' | 'defaultEvents' | 'onEventsChange' | 'onChange' | 'view' | 'defaultView' | 'onViewChange' | 'date' | 'defaultDate' | 'onDateChange' | 'disabled' | 'startHour' | 'endHour' | 'hourHeight' | 'slotDurationMinutes' | 'weekStartsOn' | 'density' | 'now' | 'resources' | 'timeZone'>;
|
|
3
|
+
export declare function useEventCalendar(options: UseEventCalendarOptions): {
|
|
23
4
|
events: CalendarEvent[];
|
|
24
5
|
eventsById: Map<string, CalendarEvent>;
|
|
25
6
|
view: EventCalendarView;
|
|
@@ -31,6 +12,7 @@ export declare function useEventCalendar({ events, defaultEvents, onEventsChange
|
|
|
31
12
|
setQuery: (payload: string) => void;
|
|
32
13
|
setDirection: (payload: 0 | 1 | -1) => void;
|
|
33
14
|
requestDayFocus: (payload: boolean) => void;
|
|
15
|
+
setResourceId: (payload: string | null) => void;
|
|
34
16
|
pickView: (noArgument?: void | undefined) => void;
|
|
35
17
|
};
|
|
36
18
|
disabled: boolean;
|
|
@@ -38,10 +20,13 @@ export declare function useEventCalendar({ events, defaultEvents, onEventsChange
|
|
|
38
20
|
endHour: number;
|
|
39
21
|
hourHeight: number;
|
|
40
22
|
slotDurationMinutes: number;
|
|
41
|
-
weekStartsOn:
|
|
42
|
-
density: EventCalendarDensity;
|
|
23
|
+
weekStartsOn: 0 | 1 | 3 | 2 | 5 | 6 | 4 | undefined;
|
|
24
|
+
density: import('./types.js').EventCalendarDensity;
|
|
43
25
|
now: Date | undefined;
|
|
44
26
|
today: Date;
|
|
27
|
+
zone: string | undefined;
|
|
28
|
+
resources: import('./types.js').EventCalendarResource[] | undefined;
|
|
29
|
+
project: (event: CalendarEvent) => CalendarEvent;
|
|
45
30
|
setView: (next: EventCalendarView) => void;
|
|
46
31
|
setCursor: (next: string) => void;
|
|
47
32
|
goToday: () => void;
|
|
@@ -51,4 +36,3 @@ export declare function useEventCalendar({ events, defaultEvents, onEventsChange
|
|
|
51
36
|
removeEvent: (id: string) => void;
|
|
52
37
|
};
|
|
53
38
|
export type EventCalendarModel = ReturnType<typeof useEventCalendar>;
|
|
54
|
-
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CalendarEvent, EventCalendarChange } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The events, controlled or not, and the two ways to change them: a replaced
|
|
4
|
+
* event reports the change (`onChange`) and the new list (`onEventsChange`);
|
|
5
|
+
* a locked or unchanged one reports nothing.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useEventList({ events, defaultEvents, onEventsChange, onChange, disabled, }: {
|
|
8
|
+
events?: CalendarEvent[];
|
|
9
|
+
defaultEvents?: CalendarEvent[];
|
|
10
|
+
onEventsChange?: (events: CalendarEvent[]) => void;
|
|
11
|
+
onChange?: (change: EventCalendarChange) => void;
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
}): {
|
|
14
|
+
list: CalendarEvent[];
|
|
15
|
+
eventsById: Map<string, CalendarEvent>;
|
|
16
|
+
replaceEvent: (id: string, updater: (event: CalendarEvent) => CalendarEvent) => void;
|
|
17
|
+
removeEvent: (id: string) => void;
|
|
18
|
+
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { PointerEvent } from 'react';
|
|
2
|
+
import { DayAxis } from './event-calendar.axis.js';
|
|
2
3
|
import { EventCalendarSlot } from './types.js';
|
|
3
|
-
export declare function useSlotCreate({
|
|
4
|
-
|
|
5
|
-
startHour: number;
|
|
6
|
-
endHour: number;
|
|
4
|
+
export declare function useSlotCreate({ axis, slotDurationMinutes, onSlotClick, disabled, resourceId, }: {
|
|
5
|
+
axis: DayAxis;
|
|
7
6
|
slotDurationMinutes: number;
|
|
8
7
|
onSlotClick?: (slot: EventCalendarSlot) => void;
|
|
9
8
|
disabled: boolean;
|
|
9
|
+
/** The resource column the slots are made in (the day view with `resources`). */
|
|
10
|
+
resourceId?: string;
|
|
10
11
|
}): {
|
|
11
12
|
draft: {
|
|
12
13
|
startMin: number;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { DayAxis } from './event-calendar.axis.js';
|
|
3
|
+
import { ResourceColumn } from './event-calendar.resources.js';
|
|
4
|
+
/**
|
|
5
|
+
* What one column of hours works from: its timed events laid out in columns,
|
|
6
|
+
* the drag-to-create draft and the click that creates a slot (with the
|
|
7
|
+
* resource of the column, when it has one).
|
|
8
|
+
*/
|
|
9
|
+
export declare function useTimeColumn(day: Date, axis: DayAxis, resource: ResourceColumn | undefined): {
|
|
10
|
+
laid: import('./types.js').LaidOutEvent[];
|
|
11
|
+
create: {
|
|
12
|
+
draft: {
|
|
13
|
+
startMin: number;
|
|
14
|
+
endMin: number;
|
|
15
|
+
} | null;
|
|
16
|
+
dragged: import('react').RefObject<boolean>;
|
|
17
|
+
onPointerDown: (event: import('react').PointerEvent<HTMLElement>) => void;
|
|
18
|
+
onPointerMove: (event: import('react').PointerEvent<HTMLElement>) => void;
|
|
19
|
+
onPointerUp: (event: import('react').PointerEvent<HTMLElement>) => void;
|
|
20
|
+
};
|
|
21
|
+
onClick: (event: MouseEvent<HTMLDivElement>) => void;
|
|
22
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* What the week and day grid draws from: one axis per day, the resource
|
|
4
|
+
* columns (the day view with `resources`; one on a phone), the live clock and
|
|
5
|
+
* the now line's props. The hour height reaches the grid as CSS custom
|
|
6
|
+
* properties set from script, never as inline style in server markup, and the
|
|
7
|
+
* viewport opens on the current time (or `scrollToHour`) once per period.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useTimeGrid(days: Date[], real: boolean): {
|
|
10
|
+
rootRef: RefObject<HTMLDivElement | null>;
|
|
11
|
+
axes: import('./event-calendar.axis.js').DayAxis[];
|
|
12
|
+
gutterAxis: import('./event-calendar.axis.js').DayAxis;
|
|
13
|
+
showNow: boolean;
|
|
14
|
+
clock: Date | null;
|
|
15
|
+
byResource: boolean;
|
|
16
|
+
allColumns: import('./event-calendar.resources.js').ResourceColumn[];
|
|
17
|
+
picked: import('./event-calendar.resources.js').ResourceColumn | undefined;
|
|
18
|
+
columns: import('./event-calendar.resources.js').ResourceColumn[];
|
|
19
|
+
nowOffset: number | null;
|
|
20
|
+
line: {
|
|
21
|
+
now: Date | undefined;
|
|
22
|
+
startMinutes: number;
|
|
23
|
+
endMinutes: number;
|
|
24
|
+
minutes: number | undefined;
|
|
25
|
+
timeLabel: string | undefined;
|
|
26
|
+
} | {
|
|
27
|
+
now: Date | undefined;
|
|
28
|
+
startMinutes: number;
|
|
29
|
+
endMinutes: number;
|
|
30
|
+
minutes?: undefined;
|
|
31
|
+
timeLabel?: undefined;
|
|
32
|
+
};
|
|
33
|
+
zone: string | undefined;
|
|
34
|
+
zoneLabel: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
export type TimeGridState = ReturnType<typeof useTimeGrid>;
|
|
@@ -1618,7 +1618,10 @@ declare const _default: {
|
|
|
1618
1618
|
"delete": "Delete event",
|
|
1619
1619
|
"delete-confirm": "This event will be removed.",
|
|
1620
1620
|
"open-day": "Open {date}",
|
|
1621
|
-
"sidebar": "Calendar navigation"
|
|
1621
|
+
"sidebar": "Calendar navigation",
|
|
1622
|
+
"unassigned": "Unassigned",
|
|
1623
|
+
"resource": "Resource",
|
|
1624
|
+
"time-zone": "Time zone: {zone}"
|
|
1622
1625
|
},
|
|
1623
1626
|
"dnd": {
|
|
1624
1627
|
"drag": "Drag"
|
|
@@ -1618,7 +1618,10 @@ declare const _default: {
|
|
|
1618
1618
|
"delete": "Supprimer l'événement",
|
|
1619
1619
|
"delete-confirm": "Cet événement sera retiré.",
|
|
1620
1620
|
"open-day": "Ouvrir le {date}",
|
|
1621
|
-
"sidebar": "Navigation du calendrier"
|
|
1621
|
+
"sidebar": "Navigation du calendrier",
|
|
1622
|
+
"unassigned": "Non assigné",
|
|
1623
|
+
"resource": "Ressource",
|
|
1624
|
+
"time-zone": "Fuseau horaire : {zone}"
|
|
1622
1625
|
},
|
|
1623
1626
|
"dnd": {
|
|
1624
1627
|
"drag": "Déplacer"
|
|
@@ -1627,6 +1627,9 @@ export declare const resources: {
|
|
|
1627
1627
|
"delete-confirm": string;
|
|
1628
1628
|
"open-day": string;
|
|
1629
1629
|
sidebar: string;
|
|
1630
|
+
unassigned: string;
|
|
1631
|
+
resource: string;
|
|
1632
|
+
"time-zone": string;
|
|
1630
1633
|
};
|
|
1631
1634
|
dnd: {
|
|
1632
1635
|
drag: string;
|
|
@@ -4465,6 +4468,9 @@ export declare const resources: {
|
|
|
4465
4468
|
"delete-confirm": string;
|
|
4466
4469
|
"open-day": string;
|
|
4467
4470
|
sidebar: string;
|
|
4471
|
+
unassigned: string;
|
|
4472
|
+
resource: string;
|
|
4473
|
+
"time-zone": string;
|
|
4468
4474
|
};
|
|
4469
4475
|
dnd: {
|
|
4470
4476
|
drag: string;
|