@octaviaflow/core 3.1.0-beta.85 → 3.1.0-beta.87
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/chunk-5ISJ5NI3.js +2765 -0
- package/dist/chunk-5ISJ5NI3.js.map +1 -0
- package/dist/chunk-7VHJRHJA.js +5725 -0
- package/dist/chunk-7VHJRHJA.js.map +1 -0
- package/dist/chunk-AMSH2ALP.js +5701 -0
- package/dist/chunk-AMSH2ALP.js.map +1 -0
- package/dist/chunk-BZA2F4V6.js +5722 -0
- package/dist/chunk-BZA2F4V6.js.map +1 -0
- package/dist/chunk-IOJPMFBQ.js +5725 -0
- package/dist/chunk-IOJPMFBQ.js.map +1 -0
- package/dist/chunk-JRFIAQHQ.js +5725 -0
- package/dist/chunk-JRFIAQHQ.js.map +1 -0
- package/dist/chunk-KKVGM7AQ.js +5723 -0
- package/dist/chunk-KKVGM7AQ.js.map +1 -0
- package/dist/chunk-NPGWV47J.js +5725 -0
- package/dist/chunk-NPGWV47J.js.map +1 -0
- package/dist/chunk-TCWVOHEZ.js +1646 -0
- package/dist/chunk-TCWVOHEZ.js.map +1 -0
- package/dist/chunk-WR7VLFZS.js +5722 -0
- package/dist/chunk-WR7VLFZS.js.map +1 -0
- package/dist/chunk-WYYXHBFE.js +5722 -0
- package/dist/chunk-WYYXHBFE.js.map +1 -0
- package/dist/chunk-XXT7FTMZ.js +1646 -0
- package/dist/chunk-XXT7FTMZ.js.map +1 -0
- package/dist/components/Combobox/Combobox.d.ts +14 -1
- package/dist/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/components/ConditionBuilder/ConditionBuilder.d.ts +8 -0
- package/dist/components/ConditionBuilder/ConditionBuilder.d.ts.map +1 -1
- package/dist/components/DataMapper/DataMapper.d.ts +33 -0
- package/dist/components/DataMapper/DataMapper.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts +48 -1
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Popover/index.d.ts +1 -1
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/ScheduleBuilder/ScheduleBuilder.d.ts +89 -0
- package/dist/components/ScheduleBuilder/ScheduleBuilder.d.ts.map +1 -0
- package/dist/components/ScheduleBuilder/index.d.ts +2 -0
- package/dist/components/ScheduleBuilder/index.d.ts.map +1 -0
- package/dist/components/Sheet/Sheet.d.ts +10 -0
- package/dist/components/Sheet/Sheet.d.ts.map +1 -1
- package/dist/components/Sheet/index.d.ts +1 -1
- package/dist/components/Sheet/index.d.ts.map +1 -1
- package/dist/components/TimezonePicker/TimezonePicker.d.ts +9 -0
- package/dist/components/TimezonePicker/TimezonePicker.d.ts.map +1 -1
- package/dist/components/TimezonePicker/index.d.ts +1 -1
- package/dist/components/TimezonePicker/index.d.ts.map +1 -1
- package/dist/index.cjs +30418 -26886
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18665 -15203
- package/dist/index.js.map +1 -1
- package/dist/notifications/components/AlertConditionComposer/AlertConditionComposer.d.ts +38 -0
- package/dist/notifications/components/AlertConditionComposer/AlertConditionComposer.d.ts.map +1 -0
- package/dist/notifications/components/DeliveryFrequencyControl/DeliveryFrequencyControl.d.ts +33 -0
- package/dist/notifications/components/DeliveryFrequencyControl/DeliveryFrequencyControl.d.ts.map +1 -0
- package/dist/notifications/components/EventCatalogPicker/EventCatalogPicker.d.ts +34 -0
- package/dist/notifications/components/EventCatalogPicker/EventCatalogPicker.d.ts.map +1 -0
- package/dist/notifications/components/NotificationBell/NotificationBell.d.ts +47 -0
- package/dist/notifications/components/NotificationBell/NotificationBell.d.ts.map +1 -0
- package/dist/notifications/components/NotificationChannelCard/NotificationChannelCard.d.ts +39 -0
- package/dist/notifications/components/NotificationChannelCard/NotificationChannelCard.d.ts.map +1 -0
- package/dist/notifications/components/NotificationChannelDialog/NotificationChannelDialog.d.ts +48 -0
- package/dist/notifications/components/NotificationChannelDialog/NotificationChannelDialog.d.ts.map +1 -0
- package/dist/notifications/components/NotificationChannelForm/NotificationChannelForm.d.ts +55 -0
- package/dist/notifications/components/NotificationChannelForm/NotificationChannelForm.d.ts.map +1 -0
- package/dist/notifications/components/NotificationChannelList/NotificationChannelList.d.ts +31 -0
- package/dist/notifications/components/NotificationChannelList/NotificationChannelList.d.ts.map +1 -0
- package/dist/notifications/components/NotificationDetailDialog/NotificationDetailDialog.d.ts +30 -0
- package/dist/notifications/components/NotificationDetailDialog/NotificationDetailDialog.d.ts.map +1 -0
- package/dist/notifications/components/NotificationInbox/NotificationInbox.d.ts +65 -0
- package/dist/notifications/components/NotificationInbox/NotificationInbox.d.ts.map +1 -0
- package/dist/notifications/components/NotificationPreferenceMatrix/NotificationPreferenceMatrix.d.ts +37 -0
- package/dist/notifications/components/NotificationPreferenceMatrix/NotificationPreferenceMatrix.d.ts.map +1 -0
- package/dist/notifications/components/NotificationRuleEditor/NotificationRuleEditor.d.ts +52 -0
- package/dist/notifications/components/NotificationRuleEditor/NotificationRuleEditor.d.ts.map +1 -0
- package/dist/notifications/components/NotificationRuleList/NotificationRuleList.d.ts +37 -0
- package/dist/notifications/components/NotificationRuleList/NotificationRuleList.d.ts.map +1 -0
- package/dist/notifications/components/meta.d.ts +32 -0
- package/dist/notifications/components/meta.d.ts.map +1 -0
- package/dist/notifications/engine/catalog.d.ts +27 -0
- package/dist/notifications/engine/catalog.d.ts.map +1 -0
- package/dist/notifications/engine/channels.d.ts +31 -0
- package/dist/notifications/engine/channels.d.ts.map +1 -0
- package/dist/notifications/engine/describeRule.d.ts +44 -0
- package/dist/notifications/engine/describeRule.d.ts.map +1 -0
- package/dist/notifications/engine/inbox.d.ts +29 -0
- package/dist/notifications/engine/inbox.d.ts.map +1 -0
- package/dist/notifications/engine/preferences.d.ts +48 -0
- package/dist/notifications/engine/preferences.d.ts.map +1 -0
- package/dist/notifications/index.d.ts +34 -0
- package/dist/notifications/index.d.ts.map +1 -0
- package/dist/notifications/types.d.ts +236 -0
- package/dist/notifications/types.d.ts.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/workflow.cjs +25 -1
- package/dist/workflow.cjs.map +1 -1
- package/dist/workflow.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { AlertCondition } from "../../types";
|
|
3
|
+
export type AlertConditionKind = AlertCondition["kind"];
|
|
4
|
+
export interface AlertConditionComposerProps {
|
|
5
|
+
value: AlertCondition;
|
|
6
|
+
onChange: (next: AlertCondition) => void;
|
|
7
|
+
/** Noun for the subject — "app", "flow", "account". Default "item". */
|
|
8
|
+
subjectNoun?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Offer the counting kinds. When none of the selected events supports a
|
|
11
|
+
* threshold, the host passes `false` and only every / state change remain.
|
|
12
|
+
*/
|
|
13
|
+
allowThreshold?: boolean;
|
|
14
|
+
/** Windows offered for "N times in W", in minutes. */
|
|
15
|
+
windows?: number[];
|
|
16
|
+
label?: ReactNode;
|
|
17
|
+
helperText?: ReactNode;
|
|
18
|
+
size?: "sm" | "md";
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
id?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* AlertConditionComposer — the "how many" axis as a sentence.
|
|
25
|
+
*
|
|
26
|
+
* Notify [after it fails N times in a row ▾] [ 2 ] failures
|
|
27
|
+
*
|
|
28
|
+
* Kinds map one-to-one onto the `AlertCondition` union: every occurrence,
|
|
29
|
+
* status change (failed → recovered → failed), N consecutive, N in a window.
|
|
30
|
+
* Count and window fields appear only for the kinds that use them, and are
|
|
31
|
+
* preserved when switching kinds so a user comparing two shapes does not
|
|
32
|
+
* lose the number they typed.
|
|
33
|
+
*/
|
|
34
|
+
export declare function AlertConditionComposer({ value, onChange, subjectNoun, allowThreshold, windows, label, helperText, size, disabled, className, id, }: AlertConditionComposerProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare namespace AlertConditionComposer {
|
|
36
|
+
var displayName: string;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=AlertConditionComposer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertConditionComposer.d.ts","sourceRoot":"","sources":["../../../../src/notifications/components/AlertConditionComposer/AlertConditionComposer.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAK9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;AAExD,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAiBD;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,QAAQ,EACR,WAAoB,EACpB,cAAqB,EACrB,OAAyB,EACzB,KAAmB,EACnB,UAAU,EACV,IAAW,EACX,QAAgB,EAChB,SAAS,EACT,EAAE,GACH,EAAE,2BAA2B,2CA2H7B;yBAvIe,sBAAsB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { DeliveryMode, DeliveryPolicy } from "../../types";
|
|
3
|
+
export interface DeliveryFrequencyControlProps {
|
|
4
|
+
value: DeliveryPolicy;
|
|
5
|
+
onChange: (next: DeliveryPolicy) => void;
|
|
6
|
+
/** Modes offered. Default all three. */
|
|
7
|
+
modes?: DeliveryMode[];
|
|
8
|
+
/** Batch windows offered, in minutes. */
|
|
9
|
+
batchWindows?: number[];
|
|
10
|
+
label?: ReactNode;
|
|
11
|
+
size?: "sm" | "md";
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
id?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* DeliveryFrequencyControl — the "how often" axis.
|
|
18
|
+
*
|
|
19
|
+
* Three modes, each revealing only what it needs: immediate shows nothing
|
|
20
|
+
* more, batched shows a window, digest shows the ScheduleBuilder plus the
|
|
21
|
+
* "send even when empty" switch. That switch defaults OFF because an empty
|
|
22
|
+
* daily post trains a channel to be ignored — the one decision most likely
|
|
23
|
+
* to decide whether the feature stays switched on.
|
|
24
|
+
*
|
|
25
|
+
* Schedule and window values are preserved across mode changes for the same
|
|
26
|
+
* reason ScheduleBuilder preserves its fields: toggling to compare should not
|
|
27
|
+
* cost the user what they already entered.
|
|
28
|
+
*/
|
|
29
|
+
export declare function DeliveryFrequencyControl({ value, onChange, modes, batchWindows, label, size, disabled, className, id, }: DeliveryFrequencyControlProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare namespace DeliveryFrequencyControl {
|
|
31
|
+
var displayName: string;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=DeliveryFrequencyControl.d.ts.map
|
package/dist/notifications/components/DeliveryFrequencyControl/DeliveryFrequencyControl.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeliveryFrequencyControl.d.ts","sourceRoot":"","sources":["../../../../src/notifications/components/DeliveryFrequencyControl/DeliveryFrequencyControl.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAM9C,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,wCAAwC;IACxC,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAqBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,KAAK,EACL,QAAQ,EACR,KAA0C,EAC1C,YAAoC,EACpC,KAAc,EACd,IAAW,EACX,QAAgB,EAChB,SAAS,EACT,EAAE,GACH,EAAE,6BAA6B,2CA2E/B;yBArFe,wBAAwB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { NotificationEventCategory } from "../../types";
|
|
3
|
+
export interface EventCatalogPickerProps {
|
|
4
|
+
catalog: NotificationEventCategory[];
|
|
5
|
+
/** Selected event keys. */
|
|
6
|
+
value: string[];
|
|
7
|
+
onChange: (next: string[]) => void;
|
|
8
|
+
searchable?: boolean;
|
|
9
|
+
/** Show the severity badge per row. Default true. */
|
|
10
|
+
showSeverity?: boolean;
|
|
11
|
+
/** Start with every category collapsed except those with a selection. */
|
|
12
|
+
collapsible?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
label?: ReactNode;
|
|
15
|
+
emptyLabel?: ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
id?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* EventCatalogPicker — grouped, searchable event checklist.
|
|
21
|
+
*
|
|
22
|
+
* Each category header is a tri-state checkbox (all / some / none) so "every
|
|
23
|
+
* workflow event" is one click, and the rows underneath carry a severity
|
|
24
|
+
* badge and a "threshold" hint so the reader can see, before opening the
|
|
25
|
+
* advanced section, which events support "after N failures".
|
|
26
|
+
*
|
|
27
|
+
* Controlled: the component holds no copy of the selection. Search filters
|
|
28
|
+
* rows but never changes the selection — a hidden selected row stays selected.
|
|
29
|
+
*/
|
|
30
|
+
export declare function EventCatalogPicker({ catalog, value, onChange, searchable, showSeverity, collapsible, disabled, label, emptyLabel, className, id, }: EventCatalogPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare namespace EventCatalogPicker {
|
|
32
|
+
var displayName: string;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=EventCatalogPicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventCatalogPicker.d.ts","sourceRoot":"","sources":["../../../../src/notifications/components/EventCatalogPicker/EventCatalogPicker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAA4B,MAAM,OAAO,CAAC;AAKjE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAG7D,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,yBAAyB,EAAE,CAAC;IACrC,2BAA2B;IAC3B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qDAAqD;IACrD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,yEAAyE;IACzE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,KAAK,EACL,QAAQ,EACR,UAAiB,EACjB,YAAmB,EACnB,WAAmB,EACnB,QAAgB,EAChB,KAAK,EACL,UAA8B,EAC9B,SAAS,EACT,EAAE,GACH,EAAE,uBAAuB,2CAyKzB;yBArLe,kBAAkB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type PopoverAlign, type PopoverPlacement } from "../../../components/Popover";
|
|
2
|
+
import type { InboxAction, InboxItem, NotificationEventCategory } from "../../types";
|
|
3
|
+
export interface NotificationBellProps {
|
|
4
|
+
items: InboxItem[];
|
|
5
|
+
/** Override the derived unread count (e.g. the server's total when `items` is a page). */
|
|
6
|
+
unreadCount?: number;
|
|
7
|
+
/** Catalogue for per-event click defaults. */
|
|
8
|
+
catalog?: NotificationEventCategory[];
|
|
9
|
+
/** Every click, with the resolved action — `panel` / `callback` are the host's to handle. */
|
|
10
|
+
onOpenItem?: (item: InboxItem, action: InboxAction) => void;
|
|
11
|
+
/** Intercept anchor navigation (client-side routing); return `true` to prevent default. */
|
|
12
|
+
onNavigate?: (href: string, item: InboxItem) => boolean | undefined;
|
|
13
|
+
onMarkRead?: (ids: string[]) => void;
|
|
14
|
+
onMarkAllRead?: () => void;
|
|
15
|
+
onArchive?: (ids: string[]) => void;
|
|
16
|
+
/** "View all" — the host navigates to the Notification Center. */
|
|
17
|
+
onViewAll?: () => void;
|
|
18
|
+
/** Controlled popover state. */
|
|
19
|
+
open?: boolean;
|
|
20
|
+
onOpenChange?: (open: boolean) => void;
|
|
21
|
+
placement?: PopoverPlacement;
|
|
22
|
+
/**
|
|
23
|
+
* Cross-axis alignment. Default `end`: a bell lives at the right edge of
|
|
24
|
+
* the top bar, so the panel must grow inward (leftward), not off-screen.
|
|
25
|
+
*/
|
|
26
|
+
align?: PopoverAlign;
|
|
27
|
+
/** Rows shown in the popover. Default 8. */
|
|
28
|
+
max?: number;
|
|
29
|
+
label?: string;
|
|
30
|
+
now?: number;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* NotificationBell — the top-bar trigger: bell icon, unread count, and a
|
|
35
|
+
* popover with the most recent items and a "View all" link to the center.
|
|
36
|
+
*
|
|
37
|
+
* The count caps at "99+" and hides at zero. Clicking a row closes the
|
|
38
|
+
* popover and performs the item's resolved action; `modal` actions open the
|
|
39
|
+
* detail dialog, which is rendered HERE rather than inside the popover —
|
|
40
|
+
* the popover unmounts its content on outside-click, and the dialog's own
|
|
41
|
+
* overlay counts as outside.
|
|
42
|
+
*/
|
|
43
|
+
export declare function NotificationBell({ items, unreadCount, catalog, onOpenItem, onNavigate, onMarkRead, onMarkAllRead, onArchive, onViewAll, open, onOpenChange, placement, align, max, label, now, className, }: NotificationBellProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export declare namespace NotificationBell {
|
|
45
|
+
var displayName: string;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=NotificationBell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationBell.d.ts","sourceRoot":"","sources":["../../../../src/notifications/components/NotificationBell/NotificationBell.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAW,KAAK,YAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAGhG,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAIrF,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,0FAA0F;IAC1F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,yBAAyB,EAAE,CAAC;IACtC,6FAA6F;IAC7F,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5D,2FAA2F;IAC3F,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,KAAK,OAAO,GAAG,SAAS,CAAC;IACpE,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpC,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,gCAAgC;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,4CAA4C;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,WAAW,EACX,OAAO,EACP,UAAU,EACV,UAAU,EACV,UAAU,EACV,aAAa,EACb,SAAS,EACT,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,SAAoB,EACpB,KAAa,EACb,GAAO,EACP,KAAuB,EACvB,GAAG,EACH,SAAS,GACV,EAAE,qBAAqB,2CA4GvB;yBA9He,gBAAgB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { NotificationChannel } from "../../types";
|
|
3
|
+
export interface ChannelTestResult {
|
|
4
|
+
ok: boolean;
|
|
5
|
+
message?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export interface NotificationChannelCardProps {
|
|
8
|
+
channel: NotificationChannel;
|
|
9
|
+
/** Send a test message. The card shows a spinner while `testing`. */
|
|
10
|
+
onTest?: (channel: NotificationChannel) => void;
|
|
11
|
+
testing?: boolean;
|
|
12
|
+
/** Result of the last test send, shown inline under the actions. */
|
|
13
|
+
testResult?: ChannelTestResult | null;
|
|
14
|
+
onEdit?: (channel: NotificationChannel) => void;
|
|
15
|
+
onRemove?: (channel: NotificationChannel) => void;
|
|
16
|
+
onToggle?: (channel: NotificationChannel, enabled: boolean) => void;
|
|
17
|
+
/** Brand mark override; defaults to the type's generic icon. */
|
|
18
|
+
icon?: ReactNode;
|
|
19
|
+
/** Hide actions and the enable switch (non-admin viewers). */
|
|
20
|
+
readOnly?: boolean;
|
|
21
|
+
/** Injectable clock for deterministic "2h ago" in stories and tests. */
|
|
22
|
+
now?: number;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* NotificationChannelCard — one destination: type, label, target, verified
|
|
27
|
+
* state, last delivery, and the actions that matter (Send test, edit, remove,
|
|
28
|
+
* enable).
|
|
29
|
+
*
|
|
30
|
+
* "Verified" is a first-class state rather than a detail because a channel
|
|
31
|
+
* that has never delivered is the single most common support issue for this
|
|
32
|
+
* feature class. The test button sits on the card, not in a menu, for the
|
|
33
|
+
* same reason.
|
|
34
|
+
*/
|
|
35
|
+
export declare function NotificationChannelCard({ channel, onTest, testing, testResult, onEdit, onRemove, onToggle, icon, readOnly, now, className, }: NotificationChannelCardProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare namespace NotificationChannelCard {
|
|
37
|
+
var displayName: string;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=NotificationChannelCard.d.ts.map
|
package/dist/notifications/components/NotificationChannelCard/NotificationChannelCard.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationChannelCard.d.ts","sourceRoot":"","sources":["../../../../src/notifications/components/NotificationChannelCard/NotificationChannelCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGvD,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,OAAO,CAAC;IACZ,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,mBAAmB,CAAC;IAC7B,qEAAqE;IACrE,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAChD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oEAAoE;IACpE,UAAU,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACtC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAChD,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACpE,gEAAgE;IAChE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,OAAO,EACP,MAAM,EACN,OAAe,EACf,UAAU,EACV,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,QAAgB,EAChB,GAAG,EACH,SAAS,GACV,EAAE,4BAA4B,2CA6G9B;yBAzHe,uBAAuB"}
|
package/dist/notifications/components/NotificationChannelDialog/NotificationChannelDialog.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type DialogSize } from "../../../components/Dialog";
|
|
3
|
+
import type { SelectOption } from "../../../components/Select";
|
|
4
|
+
import type { ConnectedAppInstance, NotificationChannel, NotificationChannelDraft, NotificationChannelType } from "../../types";
|
|
5
|
+
import type { ChannelTestResult } from "../NotificationChannelCard/NotificationChannelCard";
|
|
6
|
+
export interface NotificationChannelDialogProps {
|
|
7
|
+
open: boolean;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
/** Existing channel → edit mode (type locked). Omit for create mode. */
|
|
10
|
+
channel?: NotificationChannel | null;
|
|
11
|
+
/** Type pre-selected in create mode. Default `slack`. */
|
|
12
|
+
initialType?: NotificationChannelType;
|
|
13
|
+
types?: NotificationChannelType[];
|
|
14
|
+
instances?: ConnectedAppInstance[];
|
|
15
|
+
/** Targets for the current instance. The host reloads them from `onDraftChange`. */
|
|
16
|
+
targetOptions?: SelectOption[];
|
|
17
|
+
targetsLoading?: boolean;
|
|
18
|
+
onConnectNew?: (type: NotificationChannelType) => void;
|
|
19
|
+
/** Every keystroke — lets the host load targets when the instance changes. */
|
|
20
|
+
onDraftChange?: (draft: NotificationChannelDraft) => void;
|
|
21
|
+
/** Called with a complete draft; the dialog closes when the promise settles without throwing. */
|
|
22
|
+
onSubmit: (draft: NotificationChannelDraft) => void | Promise<void>;
|
|
23
|
+
/** Optional "Send test" before saving — proves the destination works. */
|
|
24
|
+
onTest?: (draft: NotificationChannelDraft) => Promise<ChannelTestResult>;
|
|
25
|
+
saving?: boolean;
|
|
26
|
+
size?: DialogSize;
|
|
27
|
+
title?: ReactNode;
|
|
28
|
+
description?: ReactNode;
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* NotificationChannelDialog — the modal that creates or edits a channel.
|
|
33
|
+
*
|
|
34
|
+
* Owns the draft for the life of one open (Cancel discards, Save hands the
|
|
35
|
+
* complete draft to the host), runs the pure `validateChannelDraft` so the
|
|
36
|
+
* primary button is disabled until the destination is real, and offers a
|
|
37
|
+
* **Send test** before saving — an unverified channel is the top support
|
|
38
|
+
* issue for this feature, so proving it here is cheaper than discovering it
|
|
39
|
+
* from the Failing badge later.
|
|
40
|
+
*
|
|
41
|
+
* Empty labels save as the suggested label ("#alerts · Acme Slack"), so a
|
|
42
|
+
* channel is never called "New channel".
|
|
43
|
+
*/
|
|
44
|
+
export declare function NotificationChannelDialog({ open, onClose, channel, initialType, types, instances, targetOptions, targetsLoading, onConnectNew, onDraftChange, onSubmit, onTest, saving, size, title, description, className, }: NotificationChannelDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare namespace NotificationChannelDialog {
|
|
46
|
+
var displayName: string;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=NotificationChannelDialog.d.ts.map
|
package/dist/notifications/components/NotificationChannelDialog/NotificationChannelDialog.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationChannelDialog.d.ts","sourceRoot":"","sources":["../../../../src/notifications/components/NotificationChannelDialog/NotificationChannelDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAgC,MAAM,OAAO,CAAC;AAErE,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAErE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAQ/D,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAG5F,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wEAAwE;IACxE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACrC,yDAAyD;IACzD,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,KAAK,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAClC,SAAS,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACnC,oFAAoF;IACpF,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACvD,8EAA8E;IAC9E,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC1D,iGAAiG;IACjG,QAAQ,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpE,yEAAyE;IACzE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACzE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,IAAI,EACJ,OAAO,EACP,OAAO,EACP,WAAqB,EACrB,KAAK,EACL,SAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,MAAM,EACN,MAAc,EACd,IAAW,EACX,KAAK,EACL,WAAW,EACX,SAAS,GACV,EAAE,8BAA8B,2CAuIhC;yBAzJe,yBAAyB"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type SelectOption } from "../../../components/Select";
|
|
3
|
+
import { type ChannelDraftErrors } from "../../engine/channels";
|
|
4
|
+
import type { ConnectedAppInstance, NotificationChannelDraft, NotificationChannelType } from "../../types";
|
|
5
|
+
export type ChannelFormField = keyof ChannelDraftErrors;
|
|
6
|
+
export interface NotificationChannelFormProps {
|
|
7
|
+
value: NotificationChannelDraft;
|
|
8
|
+
onChange: (next: NotificationChannelDraft) => void;
|
|
9
|
+
/** Types offered. Defaults to every type except `in_app` (which needs no setup). */
|
|
10
|
+
types?: NotificationChannelType[];
|
|
11
|
+
/** Connected app instances across all types; filtered by the chosen type. */
|
|
12
|
+
instances?: ConnectedAppInstance[];
|
|
13
|
+
/** Targets for the chosen instance (channels / spaces / teams), host-loaded. */
|
|
14
|
+
targetOptions?: SelectOption[];
|
|
15
|
+
targetsLoading?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Start the connect flow for a type (the host opens its OAuth popup). When
|
|
18
|
+
* omitted, the form only offers already-connected apps.
|
|
19
|
+
*/
|
|
20
|
+
onConnectNew?: (type: NotificationChannelType) => void;
|
|
21
|
+
/** Lock the type — editing an existing channel. */
|
|
22
|
+
lockType?: boolean;
|
|
23
|
+
/** Field errors. Shown only for fields the user has interacted with unless `showAllErrors`. */
|
|
24
|
+
errors?: Partial<Record<ChannelFormField, ReactNode>>;
|
|
25
|
+
/** Surface every error at once (after a submit attempt). */
|
|
26
|
+
showAllErrors?: boolean;
|
|
27
|
+
/** Show the numbered step headings. Default true. */
|
|
28
|
+
numbered?: boolean;
|
|
29
|
+
/** Show the "Posts to …" confirmation line. Default true. */
|
|
30
|
+
showSummary?: boolean;
|
|
31
|
+
readOnly?: boolean;
|
|
32
|
+
size?: "sm" | "md";
|
|
33
|
+
className?: string;
|
|
34
|
+
id?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* NotificationChannelForm — create or edit a destination.
|
|
38
|
+
*
|
|
39
|
+
* Three numbered steps — Type → Destination → Name — so the form reads the
|
|
40
|
+
* same way the rule editor does. Connection-only, on purpose: for chat types
|
|
41
|
+
* the form picks WHICH connected app and WHERE to post; authorising the app
|
|
42
|
+
* happens in Connectors (the host receives `onConnectNew` and opens its own
|
|
43
|
+
* OAuth flow). Embedding auth here would duplicate the connectors page and
|
|
44
|
+
* drift from it.
|
|
45
|
+
*
|
|
46
|
+
* The type grid is a radiogroup rather than a select so the hint under each
|
|
47
|
+
* type is visible before choosing — "what is a webhook channel" is answered
|
|
48
|
+
* on the tile, not in docs. A "Posts to …" line at the bottom confirms the
|
|
49
|
+
* destination in words, the way `describeRule` confirms a rule.
|
|
50
|
+
*/
|
|
51
|
+
export declare function NotificationChannelForm({ value, onChange, types, instances, targetOptions, targetsLoading, onConnectNew, lockType, errors, showAllErrors, numbered, showSummary, readOnly, size, className, id, }: NotificationChannelFormProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare namespace NotificationChannelForm {
|
|
53
|
+
var displayName: string;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=NotificationChannelForm.d.ts.map
|
package/dist/notifications/components/NotificationChannelForm/NotificationChannelForm.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationChannelForm.d.ts","sourceRoot":"","sources":["../../../../src/notifications/components/NotificationChannelForm/NotificationChannelForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,SAAS,EAAmB,MAAM,OAAO,CAAC;AAM5E,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EACL,KAAK,kBAAkB,EAIxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,aAAa,CAAC;AAGrB,MAAM,MAAM,gBAAgB,GAAG,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,wBAAwB,CAAC;IAChC,QAAQ,EAAE,CAAC,IAAI,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACnD,oFAAoF;IACpF,KAAK,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAClC,6EAA6E;IAC7E,SAAS,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACnC,gFAAgF;IAChF,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACvD,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+FAA+F;IAC/F,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC,CAAC;IACtD,4DAA4D;IAC5D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAyBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,KAAK,EACL,QAAQ,EACR,KAAqB,EACrB,SAAc,EACd,aAAa,EACb,cAAsB,EACtB,YAAY,EACZ,QAAgB,EAChB,MAAM,EACN,aAAqB,EACrB,QAAe,EACf,WAAkB,EAClB,QAAgB,EAChB,IAAW,EACX,SAAS,EACT,EAAE,GACH,EAAE,4BAA4B,2CA0S9B;yBA3Te,uBAAuB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { NotificationChannel } from "../../types";
|
|
3
|
+
import { type ChannelTestResult } from "../NotificationChannelCard/NotificationChannelCard";
|
|
4
|
+
export interface NotificationChannelListProps {
|
|
5
|
+
channels: NotificationChannel[];
|
|
6
|
+
title?: ReactNode;
|
|
7
|
+
onAdd?: () => void;
|
|
8
|
+
onTest?: (channel: NotificationChannel) => void;
|
|
9
|
+
/** Id of the channel currently being tested. */
|
|
10
|
+
testingId?: string | null;
|
|
11
|
+
/** Last test result per channel id. */
|
|
12
|
+
testResults?: Record<string, ChannelTestResult | null | undefined>;
|
|
13
|
+
onEdit?: (channel: NotificationChannel) => void;
|
|
14
|
+
onRemove?: (channel: NotificationChannel) => void;
|
|
15
|
+
onToggle?: (channel: NotificationChannel, enabled: boolean) => void;
|
|
16
|
+
/** Brand marks per channel id, when the host has them. */
|
|
17
|
+
icons?: Record<string, ReactNode>;
|
|
18
|
+
readOnly?: boolean;
|
|
19
|
+
now?: number;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* NotificationChannelList — the Channels tab: a responsive grid of channel
|
|
24
|
+
* cards with an "Add channel" tile, or an empty state that says what a
|
|
25
|
+
* channel is for before asking the user to create one.
|
|
26
|
+
*/
|
|
27
|
+
export declare function NotificationChannelList({ channels, title, onAdd, onTest, testingId, testResults, onEdit, onRemove, onToggle, icons, readOnly, now, className, }: NotificationChannelListProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare namespace NotificationChannelList {
|
|
29
|
+
var displayName: string;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=NotificationChannelList.d.ts.map
|
package/dist/notifications/components/NotificationChannelList/NotificationChannelList.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationChannelList.d.ts","sourceRoot":"","sources":["../../../../src/notifications/components/NotificationChannelList/NotificationChannelList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,oDAAoD,CAAC;AAE5D,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAChD,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACnE,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAChD,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACpE,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,KAAkB,EAClB,KAAK,EACL,MAAM,EACN,SAAS,EACT,WAAW,EACX,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,QAAgB,EAChB,GAAG,EACH,SAAS,GACV,EAAE,4BAA4B,2CAoE9B;yBAlFe,uBAAuB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { InboxAction, InboxItem, NotificationEventCategory } from "../../types";
|
|
2
|
+
export interface NotificationDetailDialogProps {
|
|
3
|
+
item: InboxItem | null;
|
|
4
|
+
open: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
/** Used for the CTA copy / href when the item does not carry its own. */
|
|
7
|
+
catalog?: NotificationEventCategory[];
|
|
8
|
+
/** Pre-resolved action, if the caller already has it. */
|
|
9
|
+
action?: InboxAction;
|
|
10
|
+
onArchive?: (item: InboxItem) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Intercept the primary CTA (client-side routing). Return `true` to
|
|
13
|
+
* prevent the default anchor navigation.
|
|
14
|
+
*/
|
|
15
|
+
onNavigate?: (href: string, item: InboxItem) => boolean | undefined;
|
|
16
|
+
now?: number;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* NotificationDetailDialog — the `modal` click action: the full message
|
|
21
|
+
* (the row clamps it), the event's key facts, and one primary CTA that goes
|
|
22
|
+
* to the subject. Security events land here by default because there is
|
|
23
|
+
* something to read and a decision to make ("was this me?"), which a row
|
|
24
|
+
* that navigates away cannot offer.
|
|
25
|
+
*/
|
|
26
|
+
export declare function NotificationDetailDialog({ item, open, onClose, catalog, action, onArchive, onNavigate, now, className, }: NotificationDetailDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare namespace NotificationDetailDialog {
|
|
28
|
+
var displayName: string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=NotificationDetailDialog.d.ts.map
|
package/dist/notifications/components/NotificationDetailDialog/NotificationDetailDialog.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationDetailDialog.d.ts","sourceRoot":"","sources":["../../../../src/notifications/components/NotificationDetailDialog/NotificationDetailDialog.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAGrF,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,yEAAyE;IACzE,OAAO,CAAC,EAAE,yBAAyB,EAAE,CAAC;IACtC,yDAAyD;IACzD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACtC;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,KAAK,OAAO,GAAG,SAAS,CAAC;IACpE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,OAAO,EACP,MAAM,EACN,SAAS,EACT,UAAU,EACV,GAAG,EACH,SAAS,GACV,EAAE,6BAA6B,2CA4E/B;yBAtFe,wBAAwB"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { InboxAction, InboxFilter, InboxItem, NotificationEventCategory } from "../../types";
|
|
3
|
+
export interface NotificationInboxProps {
|
|
4
|
+
items: InboxItem[];
|
|
5
|
+
/** Controlled filter; uncontrolled when omitted. */
|
|
6
|
+
filter?: InboxFilter;
|
|
7
|
+
defaultFilter?: InboxFilter;
|
|
8
|
+
onFilterChange?: (filter: InboxFilter) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Catalogue, for per-event click defaults (`onClick`, `actionLabel`).
|
|
11
|
+
* Optional: without it, items with a subject href link and the rest open
|
|
12
|
+
* the detail dialog.
|
|
13
|
+
*/
|
|
14
|
+
catalog?: NotificationEventCategory[];
|
|
15
|
+
/**
|
|
16
|
+
* Fired on every click with the resolved action. For `panel` and
|
|
17
|
+
* `callback` actions this is the whole behaviour — the host opens its
|
|
18
|
+
* drawer or route. `link` rows navigate natively as anchors; `modal` rows
|
|
19
|
+
* open the built-in detail dialog unless `detailDialog` is `false`.
|
|
20
|
+
*/
|
|
21
|
+
onOpen?: (item: InboxItem, action: InboxAction) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Intercept anchor navigation (client-side routing). Return `true` to
|
|
24
|
+
* prevent the default navigation.
|
|
25
|
+
*/
|
|
26
|
+
onNavigate?: (href: string, item: InboxItem) => boolean | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Render the detail dialog for `modal` actions here. Default `true`.
|
|
29
|
+
* Hosts that mount the inbox inside a popover (the bell does) pass
|
|
30
|
+
* `false` and hoist the dialog, or the popover's outside-click would
|
|
31
|
+
* unmount it.
|
|
32
|
+
*/
|
|
33
|
+
detailDialog?: boolean;
|
|
34
|
+
onMarkRead?: (ids: string[]) => void;
|
|
35
|
+
onMarkAllRead?: () => void;
|
|
36
|
+
onArchive?: (ids: string[]) => void;
|
|
37
|
+
/** Popover mode: no filter bar, tighter rows, `max` applies. */
|
|
38
|
+
compact?: boolean;
|
|
39
|
+
max?: number;
|
|
40
|
+
/** Hide the day headers (e.g. inside the bell popover). */
|
|
41
|
+
hideDayGroups?: boolean;
|
|
42
|
+
emptyTitle?: ReactNode;
|
|
43
|
+
emptyDescription?: ReactNode;
|
|
44
|
+
/** Injectable clock for deterministic grouping and "2h ago". */
|
|
45
|
+
now?: number;
|
|
46
|
+
className?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* NotificationInbox — the in-app feed: day-grouped, unread-marked, each row
|
|
50
|
+
* deep-links to its subject.
|
|
51
|
+
*
|
|
52
|
+
* The inbox is the always-on channel. It needs no setup, it survives a dead
|
|
53
|
+
* Slack token, and it is the audit trail a user can see — so it renders
|
|
54
|
+
* every event in the viewer's audience, not only the ones a rule routed.
|
|
55
|
+
*
|
|
56
|
+
* Read state belongs to the host: rows call `onMarkRead` / `onArchive` and
|
|
57
|
+
* the host re-renders with updated items. Opening an item also marks it
|
|
58
|
+
* read, which is what every mature inbox does and what suppresses the
|
|
59
|
+
* matching email that has not left yet.
|
|
60
|
+
*/
|
|
61
|
+
export declare function NotificationInbox({ items, filter, defaultFilter, onFilterChange, catalog, onOpen, onNavigate, detailDialog, onMarkRead, onMarkAllRead, onArchive, compact, max, hideDayGroups, emptyTitle, emptyDescription, now, className, }: NotificationInboxProps): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
export declare namespace NotificationInbox {
|
|
63
|
+
var displayName: string;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=NotificationInbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationInbox.d.ts","sourceRoot":"","sources":["../../../../src/notifications/components/NotificationInbox/NotificationInbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAa1D,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAIlG,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,oDAAoD;IACpD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC/C;;;;OAIG;IACH,OAAO,CAAC,EAAE,yBAAyB,EAAE,CAAC;IACtC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACxD;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,KAAK,OAAO,GAAG,SAAS,CAAC;IACpE;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpC,gEAAgE;IAChE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,gEAAgE;IAChE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAQD;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,MAAM,EACN,aAAqB,EACrB,cAAc,EACd,OAAO,EACP,MAAM,EACN,UAAU,EACV,YAAmB,EACnB,UAAU,EACV,aAAa,EACb,SAAS,EACT,OAAe,EACf,GAAG,EACH,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,GAAG,EACH,SAAS,GACV,EAAE,sBAAsB,2CAoLxB;yBAvMe,iBAAiB"}
|
package/dist/notifications/components/NotificationPreferenceMatrix/NotificationPreferenceMatrix.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { NotificationEventCategory, NotificationPreferences, PersonalChannel } from "../../types";
|
|
3
|
+
export interface PersonalChannelColumn {
|
|
4
|
+
id: PersonalChannel;
|
|
5
|
+
label?: ReactNode;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
/** Explain why a column is unavailable (e.g. "Connect Slack to enable DMs"). */
|
|
8
|
+
disabledReason?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface NotificationPreferenceMatrixProps {
|
|
11
|
+
catalog: NotificationEventCategory[];
|
|
12
|
+
value: NotificationPreferences;
|
|
13
|
+
onChange: (next: NotificationPreferences) => void;
|
|
14
|
+
/** Admins see billing / membership rows; members do not. */
|
|
15
|
+
isAdmin?: boolean;
|
|
16
|
+
/** Columns. Default In-app + Email. */
|
|
17
|
+
channels?: PersonalChannelColumn[];
|
|
18
|
+
/** Show the email-frequency control above the grid. Default true. */
|
|
19
|
+
showEmailFrequency?: boolean;
|
|
20
|
+
readOnly?: boolean;
|
|
21
|
+
className?: string;
|
|
22
|
+
id?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* NotificationPreferenceMatrix — "My notifications": event rows × personal
|
|
26
|
+
* channel columns, plus one email-frequency preset.
|
|
27
|
+
*
|
|
28
|
+
* It is a filter, not a rule engine: no thresholds, no scope. Those belong to
|
|
29
|
+
* org rules. What it does enforce is the critical-row guard — a security or
|
|
30
|
+
* billing row may lose any one channel but never the last one — and it shows
|
|
31
|
+
* the lock BEFORE the click, from the same pure function the server uses.
|
|
32
|
+
*/
|
|
33
|
+
export declare function NotificationPreferenceMatrix({ catalog, value, onChange, isAdmin, channels, showEmailFrequency, readOnly, className, id, }: NotificationPreferenceMatrixProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare namespace NotificationPreferenceMatrix {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=NotificationPreferenceMatrix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationPreferenceMatrix.d.ts","sourceRoot":"","sources":["../../../../src/notifications/components/NotificationPreferenceMatrix/NotificationPreferenceMatrix.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,SAAS,EAA4B,MAAM,OAAO,CAAC;AAkBrF,OAAO,KAAK,EAEV,yBAAyB,EACzB,uBAAuB,EACvB,eAAe,EAChB,MAAM,aAAa,CAAC;AAGrB,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,eAAe,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,gFAAgF;IAChF,cAAc,CAAC,EAAE,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,iCAAiC;IAChD,OAAO,EAAE,yBAAyB,EAAE,CAAC;IACrC,KAAK,EAAE,uBAAuB,CAAC;IAC/B,QAAQ,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAClD,4DAA4D;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACnC,qEAAqE;IACrE,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAaD;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,OAAO,EACP,KAAK,EACL,QAAQ,EACR,OAAe,EACf,QAA0B,EAC1B,kBAAyB,EACzB,QAAgB,EAChB,SAAS,EACT,EAAE,GACH,EAAE,iCAAiC,2CAsNnC;yBAhOe,4BAA4B"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type MultiSelectOption } from "../../../components/MultiSelect";
|
|
3
|
+
import type { NotificationChannel, NotificationEventCategory, NotificationRule } from "../../types";
|
|
4
|
+
export interface RuleScopeOptions {
|
|
5
|
+
flows?: MultiSelectOption[];
|
|
6
|
+
connectors?: MultiSelectOption[];
|
|
7
|
+
}
|
|
8
|
+
export type RuleFormField = "name" | "events" | "channelIds";
|
|
9
|
+
export interface NotificationRuleEditorProps {
|
|
10
|
+
value: NotificationRule;
|
|
11
|
+
onChange: (next: NotificationRule) => void;
|
|
12
|
+
catalog: NotificationEventCategory[];
|
|
13
|
+
channels: NotificationChannel[];
|
|
14
|
+
/** "Add channel" inside the Where section; the host opens its channel form. */
|
|
15
|
+
onAddChannel?: () => void;
|
|
16
|
+
scopeOptions?: RuleScopeOptions;
|
|
17
|
+
/** Render Save / Cancel. Omit both to embed the editor in a host-owned form. */
|
|
18
|
+
onSave?: () => void;
|
|
19
|
+
onCancel?: () => void;
|
|
20
|
+
saving?: boolean;
|
|
21
|
+
errors?: Partial<Record<RuleFormField, ReactNode>>;
|
|
22
|
+
readOnly?: boolean;
|
|
23
|
+
/** Open the Advanced section initially (e.g. when editing a rule that uses it). */
|
|
24
|
+
advancedOpen?: boolean;
|
|
25
|
+
className?: string;
|
|
26
|
+
id?: string;
|
|
27
|
+
}
|
|
28
|
+
/** A rule with sensible defaults — what "New rule" starts from. */
|
|
29
|
+
export declare function createEmptyRule(partial?: Partial<NotificationRule>): NotificationRule;
|
|
30
|
+
/** Does any advanced field differ from its default? Used to open the disclosure when editing. */
|
|
31
|
+
export declare function ruleUsesAdvanced(rule: NotificationRule): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* NotificationRuleEditor — What → Where → When, with ONE Advanced disclosure.
|
|
34
|
+
*
|
|
35
|
+
* The default surface is three questions: which events, which channels, how
|
|
36
|
+
* fast. Everything that makes the feature powerful — thresholds, scope,
|
|
37
|
+
* cooldown, re-notify, quiet hours, severity floor — sits behind a single
|
|
38
|
+
* collapsed "Advanced options" so the common rule stays a one-minute task.
|
|
39
|
+
*
|
|
40
|
+
* A live sentence at the top echoes the whole rule. A rule assembled from
|
|
41
|
+
* eight controls is easy to build wrong and hard to re-read; the sentence is
|
|
42
|
+
* the confirmation, and the same function renders it in the rules list so
|
|
43
|
+
* the two never disagree.
|
|
44
|
+
*
|
|
45
|
+
* Controlled and stateless: the host owns the draft, decides when it is
|
|
46
|
+
* saved, and can run its own validation through `errors`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function NotificationRuleEditor({ value, onChange, catalog, channels, onAddChannel, scopeOptions, onSave, onCancel, saving, errors, readOnly, advancedOpen, className, id, }: NotificationRuleEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export declare namespace NotificationRuleEditor {
|
|
50
|
+
var displayName: string;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=NotificationRuleEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationRuleEditor.d.ts","sourceRoot":"","sources":["../../../../src/notifications/components/NotificationRuleEditor/NotificationRuleEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,OAAO,CAAC;AAKvD,OAAO,EAAe,KAAK,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAStF,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAGjB,MAAM,aAAa,CAAC;AAMrB,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAClC;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE7D,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,gBAAgB,CAAC;IACxB,QAAQ,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC3C,OAAO,EAAE,yBAAyB,EAAE,CAAC;IACrC,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,gFAAgF;IAChF,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mFAAmF;IACnF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAuCD,mEAAmE;AACnE,wBAAgB,eAAe,CAAC,OAAO,GAAE,OAAO,CAAC,gBAAgB,CAAM,GAAG,gBAAgB,CAUzF;AAED,iGAAiG;AACjG,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAUhE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,MAAc,EACd,MAAM,EACN,QAAgB,EAChB,YAAY,EACZ,SAAS,EACT,EAAE,GACH,EAAE,2BAA2B,2CAoR7B;yBAnSe,sBAAsB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { NotificationChannel, NotificationEventCategory, NotificationRule } from "../../types";
|
|
3
|
+
export interface RuleStarter {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
/** The rule to seed the editor with. */
|
|
8
|
+
rule: Partial<NotificationRule>;
|
|
9
|
+
}
|
|
10
|
+
export interface NotificationRuleListProps {
|
|
11
|
+
rules: NotificationRule[];
|
|
12
|
+
catalog: NotificationEventCategory[];
|
|
13
|
+
channels: NotificationChannel[];
|
|
14
|
+
title?: ReactNode;
|
|
15
|
+
onCreate?: () => void;
|
|
16
|
+
/** One-click starters shown in the empty state. */
|
|
17
|
+
starters?: RuleStarter[];
|
|
18
|
+
onStarter?: (starter: RuleStarter) => void;
|
|
19
|
+
onEdit?: (rule: NotificationRule) => void;
|
|
20
|
+
onDuplicate?: (rule: NotificationRule) => void;
|
|
21
|
+
onDelete?: (rule: NotificationRule) => void;
|
|
22
|
+
onToggle?: (rule: NotificationRule, enabled: boolean) => void;
|
|
23
|
+
readOnly?: boolean;
|
|
24
|
+
now?: number;
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* NotificationRuleList — the Rules tab. Each row is the rule's sentence (the
|
|
29
|
+
* same `describeRule` the editor shows), its channels, when it last fired,
|
|
30
|
+
* and an enable switch. The empty state offers one-click starters so the
|
|
31
|
+
* first rule is a choice, not a blank form.
|
|
32
|
+
*/
|
|
33
|
+
export declare function NotificationRuleList({ rules, catalog, channels, title, onCreate, starters, onStarter, onEdit, onDuplicate, onDelete, onToggle, readOnly, now, className, }: NotificationRuleListProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare namespace NotificationRuleList {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=NotificationRuleList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationRuleList.d.ts","sourceRoot":"","sources":["../../../../src/notifications/components/NotificationRuleList/NotificationRuleList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpG,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,OAAO,EAAE,yBAAyB,EAAE,CAAC;IACrC,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,OAAO,EACP,QAAQ,EACR,KAAe,EACf,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,MAAM,EACN,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAgB,EAChB,GAAG,EACH,SAAS,GACV,EAAE,yBAAyB,2CA4I3B;yBA3Je,oBAAoB"}
|