@peripheries/core 0.5.0 → 0.5.1
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/README.md +1 -1
- package/index.css +1 -1
- package/index.js +3 -3
- package/package.json +1 -1
- package/types/core/events/BookEventCard/BookEventCard.d.ts +37 -0
- package/types/core/events/OverlapNotice/OverlapNotice.d.ts +11 -0
- package/types/core/events/TaskCard/TaskCard.d.ts +11 -0
- package/types/core/events/_shared/when.d.ts +10 -0
- package/types/core/page/PageStaffTools/PageStaffTools.d.ts +19 -0
- package/types/index.core.d.ts +4 -1
package/package.json
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactElement } from 'react';
|
|
2
|
+
import { type IntentHandler } from '../_shared/intent';
|
|
3
|
+
export interface BookableType {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
kind?: 'scheduled' | 'record';
|
|
7
|
+
}
|
|
8
|
+
export interface BookablePerson {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
role?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface BookEventPrefill {
|
|
14
|
+
typeId?: string;
|
|
15
|
+
startsAt?: string;
|
|
16
|
+
startOn?: string;
|
|
17
|
+
durationMin?: number;
|
|
18
|
+
attendeeIds?: ReadonlyArray<string>;
|
|
19
|
+
title?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface BookEventCardProps {
|
|
22
|
+
types: ReadonlyArray<BookableType>;
|
|
23
|
+
people?: ReadonlyArray<BookablePerson>;
|
|
24
|
+
subjectName?: string;
|
|
25
|
+
prefill?: BookEventPrefill;
|
|
26
|
+
invitesSent?: boolean;
|
|
27
|
+
booked?: {
|
|
28
|
+
name?: string;
|
|
29
|
+
href?: string;
|
|
30
|
+
};
|
|
31
|
+
locale?: string;
|
|
32
|
+
timeZone?: string;
|
|
33
|
+
onIntent?: IntentHandler<'book_event'>;
|
|
34
|
+
className?: string;
|
|
35
|
+
style?: CSSProperties;
|
|
36
|
+
}
|
|
37
|
+
export declare function BookEventCard(props: BookEventCardProps): ReactElement;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CSSProperties, ReactElement } from 'react';
|
|
2
|
+
export interface OverlapNoticeProps {
|
|
3
|
+
days: ReadonlyArray<string>;
|
|
4
|
+
param?: string;
|
|
5
|
+
viewParam?: string;
|
|
6
|
+
keep?: Readonly<Record<string, string>>;
|
|
7
|
+
locale?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export declare function OverlapNotice({ days, param, viewParam, keep, locale, className, style }: OverlapNoticeProps): ReactElement | null;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactElement } from 'react';
|
|
2
2
|
import { type IntentHandler } from '../_shared/intent';
|
|
3
|
+
import { localWithOffset } from '../_shared/when';
|
|
4
|
+
export { localWithOffset };
|
|
5
|
+
export interface TaskTypeOption {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
kind?: 'scheduled' | 'record';
|
|
9
|
+
}
|
|
3
10
|
export interface TaskView {
|
|
4
11
|
title: string;
|
|
5
12
|
dueOn?: string;
|
|
13
|
+
dueAt?: string;
|
|
14
|
+
typeId?: string;
|
|
6
15
|
assigneeName?: string;
|
|
7
16
|
state?: 'proposed' | 'created' | 'done';
|
|
8
17
|
}
|
|
@@ -10,6 +19,8 @@ export interface TaskCardProps {
|
|
|
10
19
|
task: TaskView;
|
|
11
20
|
subjectName?: string;
|
|
12
21
|
locale?: string;
|
|
22
|
+
timeZone?: string;
|
|
23
|
+
types?: ReadonlyArray<TaskTypeOption>;
|
|
13
24
|
onIntent?: IntentHandler<'log_event' | 'complete'>;
|
|
14
25
|
className?: string;
|
|
15
26
|
style?: CSSProperties;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const DATE: RegExp;
|
|
2
|
+
export declare const TIME: RegExp;
|
|
3
|
+
export declare const dayText: (iso: string | undefined, locale?: string) => string;
|
|
4
|
+
export declare const clockText: (time: string, locale?: string) => string;
|
|
5
|
+
export declare function partsOf(iso: string | undefined, timeZone?: string): {
|
|
6
|
+
date: string;
|
|
7
|
+
time: string;
|
|
8
|
+
} | null;
|
|
9
|
+
export declare function localWithOffset(date: string, time: string): string | undefined;
|
|
10
|
+
export declare function todayIn(timeZone?: string, now?: number): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactElement } from 'react';
|
|
2
|
+
import { type IntentHandler } from '../../events/_shared/intent';
|
|
3
|
+
export type PageStaffAction = 'release' | 'view_versions' | 'view_as_client' | 'edit_with_assistant';
|
|
4
|
+
export interface PageRelease {
|
|
5
|
+
state: 'unreleased' | 'released' | 'withdrawn' | 'staff_only';
|
|
6
|
+
number?: number;
|
|
7
|
+
hasChanges?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface PageStaffToolsProps {
|
|
10
|
+
release: PageRelease;
|
|
11
|
+
canRelease?: boolean;
|
|
12
|
+
busy?: boolean;
|
|
13
|
+
versionsHref?: string;
|
|
14
|
+
viewAsHref?: string;
|
|
15
|
+
onIntent?: IntentHandler<PageStaffAction>;
|
|
16
|
+
className?: string;
|
|
17
|
+
style?: CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
export declare function PageStaffTools(props: PageStaffToolsProps): ReactElement | null;
|
package/types/index.core.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export { Stack } from './core/Stack/Stack';
|
|
|
17
17
|
export { ListRow, type ListRowProps } from './core/page/ListRow/ListRow';
|
|
18
18
|
export { PageFrame, type PageFrameProps } from './core/page/PageFrame/PageFrame';
|
|
19
19
|
export { PageHead, type PageHeadProps } from './core/page/PageHead/PageHead';
|
|
20
|
+
export { PageStaffTools, type PageStaffAction, type PageRelease, type PageStaffToolsProps } from './core/page/PageStaffTools/PageStaffTools';
|
|
20
21
|
export { RuleSection, type RuleSectionProps } from './core/page/RuleSection/RuleSection';
|
|
21
22
|
export { UnderlinedAction, type UnderlinedActionProps } from './core/page/UnderlinedAction/UnderlinedAction';
|
|
22
23
|
export { Avatar, initialsOf, type AvatarProps } from './core/text/Avatar/Avatar';
|
|
@@ -108,6 +109,7 @@ export { eventWhen, hrefFrom, typeCard, type EventTypeOption, type EventView, ty
|
|
|
108
109
|
export { DAY_MINUTES, isBusyOnly, layoutDay, overlapDays, visibleRange, wallOf, weekDates, type CalendarBlock, type DayLayout, type Wall } from './core/events/_shared/calendar';
|
|
109
110
|
export { HourGrid, type HourGridColumn, type HourGridProps } from './core/events/HourGrid/HourGrid';
|
|
110
111
|
export { SeriesGlyph, seriesNumber, seriesShape, SERIES_SHAPES, type SeriesShape } from './core/events/_shared/SeriesGlyph';
|
|
112
|
+
export { OverlapNotice, type OverlapNoticeProps } from './core/events/OverlapNotice/OverlapNotice';
|
|
111
113
|
export { CalendarFilters, type CalendarFilterType, type CalendarFiltersProps } from './core/events/CalendarFilters/CalendarFilters';
|
|
112
114
|
export { MiniMonth, type MiniMonthProps } from './core/events/MiniMonth/MiniMonth';
|
|
113
115
|
export { CalendarView, type CalendarViewName, type CalendarViewProps } from './core/events/CalendarView/CalendarView';
|
|
@@ -116,7 +118,8 @@ export { sameOriginPath } from './core/events/_shared/path';
|
|
|
116
118
|
export { NOT_AVAILABLE, useIntent, type CardIntent, type IntentHandler } from './core/events/_shared/intent';
|
|
117
119
|
export { LogCard, type LogCardPrefill, type LogCardProps } from './core/events/LogCard/LogCard';
|
|
118
120
|
export { QuickNoteCard, type QuickNote, type QuickNoteCardProps } from './core/events/QuickNoteCard/QuickNoteCard';
|
|
119
|
-
export {
|
|
121
|
+
export { BookEventCard, type BookEventCardProps, type BookEventPrefill, type BookablePerson, type BookableType } from './core/events/BookEventCard/BookEventCard';
|
|
122
|
+
export { TaskCard, localWithOffset, type TaskCardProps, type TaskTypeOption, type TaskView } from './core/events/TaskCard/TaskCard';
|
|
120
123
|
export { HandoverCard, type HandoverCardProps, type HandoverPointer } from './core/events/HandoverCard/HandoverCard';
|
|
121
124
|
export { StartProcessCard, type StartProcessCardProps, type StartProcessNeed } from './core/events/StartProcessCard/StartProcessCard';
|
|
122
125
|
export { NoteSplitCard, type NoteSplitCardProps, type NoteSplitMatch, type NoteSplitPart } from './core/events/NoteSplitCard/NoteSplitCard';
|