@zeniai/web-components 4.3.62 → 4.3.64

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.
Files changed (25) hide show
  1. package/dist/{SessionTimeoutPopup-DmX_8Ywi.js → SessionTimeoutPopup-B9J7SmPi.js} +82435 -84674
  2. package/dist/{SessionTimeoutPopup-tTBthWBM.cjs → SessionTimeoutPopup-fxavLyZ0.cjs} +16443 -17298
  3. package/dist/appLocale.d.ts +0 -145
  4. package/dist/cockpit.cjs.js +2 -2
  5. package/dist/cockpit.esm.js +76 -79
  6. package/dist/components/aiCfo/AiCfoPage.d.ts +0 -68
  7. package/dist/components/aiCfo/components/AiCfoScrollArea.d.ts +0 -11
  8. package/dist/components/aiCfo/stories/hooks/useAiCfoStreamingState.d.ts +0 -1
  9. package/dist/components/appDrawerContent/AiCfoMenuContent.d.ts +1 -29
  10. package/dist/components/appDrawerContent/AppDrawerContent.d.ts +1 -8
  11. package/dist/components/appDrawerContent/MenuButton.d.ts +3 -4
  12. package/dist/components/appDrawerContent/MenuList.d.ts +1 -8
  13. package/dist/components/appDrawerContent/appDrawerContent.helpers.d.ts +0 -5
  14. package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/JEAccrualJournalEntryCard.d.ts +6 -7
  15. package/dist/index.cjs.js +1 -1
  16. package/dist/index.d.ts +0 -2
  17. package/dist/index.esm.js +127 -130
  18. package/dist/strings/strings.d.ts +0 -145
  19. package/package.json +5 -5
  20. package/dist/components/aiCfo/components/AiCfoCombobox.d.ts +0 -24
  21. package/dist/components/aiCfo/components/AiCfoRoutineDetail.d.ts +0 -29
  22. package/dist/components/aiCfo/components/AiCfoRoutineEditor.d.ts +0 -46
  23. package/dist/components/aiCfo/components/AiCfoRoutineRunsPanel.d.ts +0 -42
  24. package/dist/components/aiCfo/components/AiCfoRoutinesBrowser.d.ts +0 -41
  25. package/dist/components/aiCfo/components/helpers/aiCfoRoutines.d.ts +0 -197
@@ -1,42 +0,0 @@
1
- import { default as React } from 'react';
2
- import { RoutineRun } from './helpers/aiCfoRoutines';
3
- /**
4
- * The routine's past runs, beside its conversation.
5
- *
6
- * A routine's runs all append to ONE thread, so scrolling is the only way to
7
- * find the run you came for. This lists them, newest first, and says which are
8
- * unread — the same question the rail badge raises, answered where the answers
9
- * actually are.
10
- */
11
- export interface AiCfoRoutineRunsPanelProps {
12
- error: boolean;
13
- /**
14
- * True while the runs are being fetched OR before the fetch has begun.
15
- *
16
- * Both, because an empty list with nothing in flight rendered "No runs yet."
17
- * on a routine that had runs — the panel answered before it had asked.
18
- */
19
- loading: boolean;
20
- routineName: string;
21
- runs: RoutineRun[];
22
- /** The cadence sentence, so the panel says what this thing does unprompted. */
23
- schedule: string;
24
- /** The routine's timezone, so run times read as the routine's own. */
25
- tzName: string | null;
26
- /** Runs newer than this many are marked unread. 0 means none are. */
27
- unreadCount: number;
28
- /**
29
- * The conversation currently on screen, so its run reads as the one being
30
- * looked at. Null on the routine's own page, where no run is open.
31
- */
32
- openSessionId?: string | null;
33
- /** The skill this runs, when it runs one. Absent for a written prompt. */
34
- skillName?: string;
35
- onOpenRun: (run: RoutineRun) => void;
36
- /** Opens the routine's own page, where it is configured and edited. */
37
- onOpenRoutine?: () => void;
38
- /** Absent renders the skill as text rather than a link that goes nowhere. */
39
- onOpenSkill?: () => void;
40
- }
41
- declare const AiCfoRoutineRunsPanel: React.FC<AiCfoRoutineRunsPanelProps>;
42
- export default AiCfoRoutineRunsPanel;
@@ -1,41 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Routine } from './helpers/aiCfoRoutines';
3
- export interface AiCfoRoutinesBrowserProps {
4
- /** False withholds "New routine" — the server states the cap, not the client. */
5
- canCreate: boolean;
6
- listError: boolean;
7
- /**
8
- * The list is being fetched. Distinct from "no routines": opening the tab
9
- * triggers the fetch, so without this an empty list reads as "you have none"
10
- * for the whole round trip.
11
- */
12
- listLoading: boolean;
13
- /** The server's cap, for the message when it is reached. */
14
- maxRoutines: number;
15
- routines: Routine[];
16
- /**
17
- * Open one routine.
18
- *
19
- * Everything a routine can DO — run, pause, edit, delete, its run history —
20
- * lives on that page. The list stayed readable while it had two controls; at
21
- * six it was a wall of identical text links with no hierarchy.
22
- */
23
- /**
24
- * Required: every row renders as a button with a chevron, so a list
25
- * mounted without this looks navigable and silently does nothing — and
26
- * opening a routine is the only thing this list does.
27
- */
28
- onOpen: (routine: Routine) => void;
29
- /** Absent withholds the control rather than rendering one the API refuses. */
30
- onCreate?: () => void;
31
- /**
32
- * Start a routine from a description.
33
- *
34
- * Opens the editor with the text as the instructions — it does NOT infer a
35
- * schedule from the sentence. The cadence is one control away and getting it
36
- * wrong silently is worse than asking.
37
- */
38
- onDraft?: (instructions: string) => void;
39
- }
40
- declare const AiCfoRoutinesBrowser: React.FC<AiCfoRoutinesBrowserProps>;
41
- export default AiCfoRoutinesBrowser;
@@ -1,197 +0,0 @@
1
- /**
2
- * Imported from `@zeniai/client-epic-state` once #3360 publishes. Declared here
3
- * meanwhile because that import does not fail today — it degrades silently, so
4
- * every guarantee below would be unchecked.
5
- */
6
- export type RoutineRecurrence = "daily" | "weekly" | "monthly";
7
- export type RoutineStatus = "succeeded" | "failed" | "timeout";
8
- export interface Routine {
9
- consecutiveFailures: number;
10
- dayOfMonth: number | null;
11
- enabled: boolean;
12
- hour: number;
13
- isAdHoc: boolean;
14
- lastRunAt: string | null;
15
- lastStatus: RoutineStatus | null;
16
- /** '' when the skill behind this routine was deleted. */
17
- macroId: string;
18
- minute: number;
19
- name: string;
20
- nextRunAt: string | null;
21
- pinnedVersion: number | null;
22
- /** Null when this client does not recognise the server's cadence. */
23
- recurrence: RoutineRecurrence | null;
24
- scheduleId: string;
25
- sessionId: string | null;
26
- tzName: string | null;
27
- /** Runs whose answer has not been opened. Drives the "N new" badge. */
28
- unreadRuns: number;
29
- weekday: number | null;
30
- }
31
- /** Mirrors `RoutineDraft`; imported from the package once #3360 publishes. */
32
- export interface RoutineEditorDraft {
33
- hour: number;
34
- minute: number;
35
- name: string;
36
- recurrence: RoutineRecurrence;
37
- tzName: string;
38
- dayOfMonth?: number;
39
- macroId?: string;
40
- prompt?: string;
41
- weekday?: number;
42
- }
43
- /**
44
- * Just the cadence fields, so the editor can describe a draft it has not saved
45
- * yet. `Routine` satisfies this structurally, which keeps one implementation of
46
- * the sentence behind both the list row and the editor's summary line.
47
- */
48
- export interface RoutineSchedule {
49
- dayOfMonth: number | null;
50
- hour: number;
51
- minute: number;
52
- recurrence: RoutineRecurrence | null;
53
- weekday: number | null;
54
- }
55
- /** Mirrors `RoutineRunStatus`; imported from the package once #3360 publishes. */
56
- export type RoutineRunStatus = "claimed" | "running" | "succeeded" | "failed" | "timeout";
57
- /** Mirrors `RoutineRun`; imported from the package once #3360 publishes. */
58
- export interface RoutineRun {
59
- attempt: number;
60
- /** Why it failed. The only place a failed run explains itself. */
61
- error: string | null;
62
- finishedAt: string | null;
63
- isManual: boolean;
64
- /** The message this run produced. Null opens the thread instead. */
65
- questionAnswerId: string | null;
66
- runId: string;
67
- scheduledFor: string | null;
68
- /**
69
- * This run's own conversation.
70
- *
71
- * Each run gets one, so a follow-up about one report stays with that report.
72
- * Null on runs from before that was true, and on a run that has not started
73
- * — neither has a thread to open.
74
- */
75
- sessionId: string | null;
76
- startedAt: string | null;
77
- /** Null when this client does not recognise the server's status. */
78
- status: RoutineRunStatus | null;
79
- }
80
- /** Whether a run is still going, and so has no outcome to report yet. */
81
- export declare const isRunInFlight: (run: RoutineRun) => boolean;
82
- /**
83
- * When a run happened, in the routine's own timezone.
84
- *
85
- * `finishedAt` first, then `startedAt`, then the occurrence it belongs to: a
86
- * run in flight has no finish, and a claimed one has no start, but every run
87
- * has something honest to show.
88
- */
89
- export declare const runTimestamp: (run: RoutineRun) => string | null;
90
- /** A skill the user may schedule, as the editor's picker needs it. */
91
- export interface SchedulableSkill {
92
- macroId: string;
93
- name: string;
94
- }
95
- /**
96
- * Whether this client can honestly describe — and therefore edit — the schedule.
97
- *
98
- * One predicate feeding the label, the hint AND the Edit control, because when
99
- * those disagree the user gets an editor for a routine the app just said it did
100
- * not understand, and saving rewrites the schedule to whatever the form
101
- * defaulted to. Range checks are part of it: a weekday of 7 or an hour of 24
102
- * otherwise renders a confident, wrong sentence instead of the honest fallback.
103
- */
104
- export declare const isDescribable: (routine: RoutineSchedule) => boolean;
105
- /**
106
- * A routine's time of day, in its own timezone.
107
- *
108
- * Formatted from the stored hour/minute rather than a Date, because the
109
- * routine's timezone is not the viewer's: constructing a Date would render 9am
110
- * Pacific as whatever that is locally.
111
- */
112
- export declare const formatTime: (hour: number, minute: number) => string;
113
- /** An hour, for a picker. */
114
- export declare const formatHour: (hour: number) => string;
115
- /** The human sentence for a routine's cadence, or an honest admission. */
116
- export declare const describeSchedule: (routine: RoutineSchedule) => string;
117
- /**
118
- * A date rendered in the ROUTINE's timezone, not the viewer's.
119
- *
120
- * `formatIsoDateShort` converts to the browser's zone, which put "Next Sep 8"
121
- * (a Tuesday) under "Every Monday at 9:00am (America/Los_Angeles)" for a viewer
122
- * in Tokyo. Everything else here avoids Date for that reason; these dates have
123
- * to as well, or the row contradicts itself.
124
- */
125
- export declare const formatDateInZone: (iso: string | null, tzName: string | null) => string | null;
126
- /** Whether a timezone string is one the platform actually knows. */
127
- export declare const isValidTimezone: (tzName: string) => boolean;
128
- /**
129
- * A timezone's current UTC offset, e.g. "GMT+5:30", for the schedule summary.
130
- *
131
- * Offsets shift with DST, so this is what the zone reads TODAY — enough to
132
- * confirm you picked the right zone, which is all the summary claims.
133
- */
134
- export declare const formatZoneOffset: (tzName: string) => string | null;
135
- /**
136
- * Every timezone the platform knows, for the picker's suggestions.
137
- *
138
- * Empty on a browser without `Intl.supportedValuesOf` — the field stays a plain
139
- * text input there, which still works because the value is validated anyway.
140
- */
141
- export declare const timezoneOptions: () => string[];
142
- /**
143
- * The last-run sentence, which must never claim success for a failed run.
144
- *
145
- * Lives here rather than in the list, because the detail page had its own copy
146
- * that hardcoded the success string — so a routine the list correctly showed as
147
- * failed reported "Last run 3 Sep" on the page you opened to find out why.
148
- */
149
- export declare const describeLastRun: (routine: RoutineSchedule & {
150
- lastRunAt: string | null;
151
- lastStatus: RoutineStatus | null;
152
- tzName: string | null;
153
- }) => string;
154
- /** Whether the routine's last run went wrong, for the status colour. */
155
- export declare const lastRunFailed: (routine: {
156
- lastStatus: RoutineStatus | null;
157
- }) => boolean;
158
- /**
159
- * The cadence in one or two words, for a rail row.
160
- *
161
- * `describeSchedule` gives the full sentence a page can afford; a rail row
162
- * cannot. "Custom" for a cadence this client does not recognise, matching
163
- * everywhere else that refuses to guess one.
164
- */
165
- export declare const shortCadence: (routine: {
166
- recurrence: RoutineRecurrence | null;
167
- }) => string;
168
- /**
169
- * The prefix chat gives a routine's own conversation.
170
- *
171
- * Mirrors `_ROUTINE_SESSION_PREFIX` in chat's services/routine_runner.py. A
172
- * routine's runs all append to one session, and that session comes back in the
173
- * ordinary session list, so without this the rail listed every routine twice —
174
- * once under Routines and again under Chat history.
175
- */
176
- export declare const ROUTINE_SESSION_PREFIX = "routine_";
177
- export declare const isRoutineSession: (chatSessionId: string | null | undefined) => boolean;
178
- /** Mirrors `_SESSION_ID_SEPARATOR` in chat's services/routine_runner.py. */
179
- export declare const ROUTINE_SESSION_SEPARATOR = "__";
180
- /**
181
- * The routine a run's conversation belongs to, or null.
182
- *
183
- * `routine_<scheduleId>__<runUuid>`. Kept here rather than in each caller so
184
- * the rail and the screen cannot drift on how a session id is read — they both
185
- * answer "which routine is open" and have to agree.
186
- */
187
- export declare const routineIdFromSession: (chatSessionId: string | null | undefined) => string | null;
188
- /**
189
- * When a run happened, to the minute.
190
- *
191
- * Runs need the time and scheduled dates do not: a routine can run more than
192
- * once a day — pressing Run does exactly that — and two rows both reading
193
- * "Sep 3, 2026" gave no way to tell which run was which. A next-run date takes
194
- * `formatDateInZone` instead, because the cadence line beside it already says
195
- * the time.
196
- */
197
- export declare const formatRunTime: (iso: string | null, tzName: string | null) => string | null;