@zeniai/web-components 4.3.66 → 4.3.67

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 (49) hide show
  1. package/dist/{SessionTimeoutPopup-D6GIFLK3.cjs → SessionTimeoutPopup-CEzTvoWR.cjs} +16482 -17447
  2. package/dist/{SessionTimeoutPopup-B8Btzn0k.js → SessionTimeoutPopup-ruPC7hq-.js} +91740 -94465
  3. package/dist/appLocale.d.ts +0 -146
  4. package/dist/cockpit.cjs.js +2 -2
  5. package/dist/cockpit.esm.js +166 -168
  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/common/Picker.d.ts +1 -7
  15. package/dist/components/commonSetUp/approval/ApprovalStageRow.d.ts +0 -24
  16. package/dist/components/commonSetUp/approval/ApprovalStagesSection.d.ts +1 -9
  17. package/dist/components/commonSetUp/approval/ConditionRow.d.ts +4 -7
  18. package/dist/components/expenseAutomation/ExpenseAutomationPage.d.ts +0 -15
  19. package/dist/components/expenseAutomation/sections/jeSchedules/JESchedulePage.d.ts +2 -15
  20. package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/JEOneTimeAccrualDetailPage.d.ts +4 -8
  21. package/dist/components/expenseAutomation/sections/jeSchedules/list/jeScheduleConfig.d.ts +1 -12
  22. package/dist/components/expenseAutomation/sections/jeSchedules/list/jeScheduleListRow.helpers.d.ts +1 -9
  23. package/dist/components/expenseAutomation/sections/jeSchedules/sections/JEExistingSection.d.ts +1 -11
  24. package/dist/components/expenseAutomation/sections/jeSchedules/sections/JESchedulesSection.d.ts +1 -11
  25. package/dist/components/expenseAutomation/sections/missingReceipts/completedTab/CompletedTab.d.ts +1 -1
  26. package/dist/components/expenseAutomation/sections/missingReceipts/missingReceiptsSidePanelListMargin.d.ts +1 -1
  27. package/dist/components/expenseAutomation/sections/missingReceipts/missingTab/MissingReceiptsListTable.d.ts +1 -1
  28. package/dist/components/jeSchedules/scheduleDetails/ScheduleDetailsAccruedExpensesPage.d.ts +1 -4
  29. package/dist/components/jeSchedules/scheduleDetails/ScheduleDetailsFixedAssetsPage.d.ts +1 -4
  30. package/dist/components/jeSchedules/scheduleDetails/ScheduleDetailsPage.d.ts +1 -4
  31. package/dist/components/singleSelect/SingleSelect.d.ts +1 -8
  32. package/dist/components/singleSelect/SingleSelectField.d.ts +1 -3
  33. package/dist/components/spendManagement/billPay/billPaySetUp/components/formElements/UserMultiSelect.d.ts +1 -35
  34. package/dist/components/spendManagement/billPay/billPaySetUp/components/formElements/UserMultiSelectField.d.ts +1 -9
  35. package/dist/components/{common/sidePanel/SidePanelLayout.d.ts → transactionDetail/TransactionSidePanelLayout.d.ts} +2 -17
  36. package/dist/context/SidePanelContext.d.ts +11 -25
  37. package/dist/index.cjs.js +1 -1
  38. package/dist/index.d.ts +3 -5
  39. package/dist/index.esm.js +256 -258
  40. package/dist/strings/strings.d.ts +0 -146
  41. package/package.json +5 -5
  42. package/dist/components/aiCfo/components/AiCfoCombobox.d.ts +0 -24
  43. package/dist/components/aiCfo/components/AiCfoRoutineDetail.d.ts +0 -29
  44. package/dist/components/aiCfo/components/AiCfoRoutineEditor.d.ts +0 -46
  45. package/dist/components/aiCfo/components/AiCfoRoutineRunsPanel.d.ts +0 -42
  46. package/dist/components/aiCfo/components/AiCfoRoutinesBrowser.d.ts +0 -41
  47. package/dist/components/aiCfo/components/helpers/aiCfoRoutines.d.ts +0 -197
  48. package/dist/components/expenseAutomation/sections/jeSchedules/list/useJEScheduleRowClick.d.ts +0 -13
  49. /package/dist/components/{common/sidePanel → transactionDetail}/panelSelectedMixin.d.ts +0 -0
@@ -754,7 +754,6 @@ export declare const zeniStrings: {
754
754
  signInSecurelyViaPlaid: string;
755
755
  signUpForFree: string;
756
756
  siteDefault: string;
757
- routines: string;
758
757
  skills: string;
759
758
  skipGoToMyDashboard: string;
760
759
  snooze: string;
@@ -5147,7 +5146,6 @@ export declare const zeniStrings: {
5147
5146
  };
5148
5147
  amountRangeToPlaceholder: string;
5149
5148
  amountMissingError: string;
5150
- noRequireApprovalStageError: string;
5151
5149
  operatorIsOrIsNot: {
5152
5150
  is_not: string;
5153
5151
  is: string;
@@ -9081,150 +9079,6 @@ export declare const zeniStrings: {
9081
9079
  examplePrefix: string;
9082
9080
  tip: string;
9083
9081
  };
9084
- routines: {
9085
- title: string;
9086
- am: string;
9087
- pm: string;
9088
- subtitle: string;
9089
- empty: string;
9090
- loading: string;
9091
- loadFailed: string;
9092
- newRoutine: string;
9093
- capReached: string;
9094
- everyDayAt: string;
9095
- everyWeekAt: string;
9096
- everyMonthAt: string;
9097
- unknownSchedule: string;
9098
- weekdays: string[];
9099
- ordinalSuffixes: {
9100
- one: string;
9101
- two: string;
9102
- few: string;
9103
- other: string;
9104
- };
9105
- unknownScheduleHint: string;
9106
- inTimezone: string;
9107
- nextRun: string;
9108
- neverRun: string;
9109
- lastRunSucceeded: string;
9110
- lastRunSucceededNoDate: string;
9111
- lastRunFailedNoDate: string;
9112
- lastRunTimeoutNoDate: string;
9113
- lastRunFailed: string;
9114
- lastRunTimeout: string;
9115
- pausedBadge: string;
9116
- autoPaused: string;
9117
- adHocBadge: string;
9118
- brokenSkill: string;
9119
- pause: string;
9120
- resume: string;
9121
- pauseRoutine: string;
9122
- resumeRoutine: string;
9123
- editRoutine: string;
9124
- deleteRoutine: string;
9125
- openThread: string;
9126
- run: string;
9127
- runRoutine: string;
9128
- running: string;
9129
- runQueued: string;
9130
- runFailed: string;
9131
- history: string;
9132
- hideHistory: string;
9133
- historyLoading: string;
9134
- historyFailed: string;
9135
- historyEmpty: string;
9136
- runManual: string;
9137
- runScheduled: string;
9138
- runInFlight: string;
9139
- runSucceeded: string;
9140
- runFailedStatus: string;
9141
- runTimedOut: string;
9142
- runUnknownStatus: string;
9143
- runAt: string;
9144
- runAttempt: string;
9145
- openRun: string;
9146
- openRunLabel: string;
9147
- backToRoutines: string;
9148
- configuration: string;
9149
- enabledLabel: string;
9150
- enabledOn: string;
9151
- enabledOff: string;
9152
- enabledOnHint: string;
9153
- enabledOffHint: string;
9154
- scheduleRow: string;
9155
- oneOffSource: string;
9156
- instructionsHeading: string;
9157
- showAll: string;
9158
- showLess: string;
9159
- runsHeading: string;
9160
- successRatio: string;
9161
- neverRunStatus: string;
9162
- openRoutine: string;
9163
- openRoutinePage: string;
9164
- breadcrumbRoot: string;
9165
- edit: string;
9166
- runRowLabel: string;
9167
- newRuns: string;
9168
- scheduledSection: string;
9169
- cadenceDaily: string;
9170
- cadenceWeekly: string;
9171
- cadenceMonthly: string;
9172
- cadenceCustom: string;
9173
- showRuns: string;
9174
- hideRuns: string;
9175
- panelRuns: string;
9176
- panelDetails: string;
9177
- panelSkill: string;
9178
- composerPlaceholder: string;
9179
- composerSubmit: string;
9180
- composerExamples: string[];
9181
- deleteConfirm: string;
9182
- deleteConfirmBody: string;
9183
- deleting: string;
9184
- deleteFailed: string;
9185
- saveFailed: string;
9186
- nameLabel: string;
9187
- namePlaceholder: string;
9188
- sourceLabel: string;
9189
- sourceSkill: string;
9190
- sourcePrompt: string;
9191
- promptPlaceholder: string;
9192
- promptHint: string;
9193
- skillLabel: string;
9194
- skillHint: string;
9195
- cadenceLabel: string;
9196
- daily: string;
9197
- weekly: string;
9198
- monthly: string;
9199
- weekdayLabel: string;
9200
- dayOfMonthLabel: string;
9201
- dayOfMonthHint: string;
9202
- hourLabel: string;
9203
- minuteLabel: string;
9204
- timeLabel: string;
9205
- scheduleLabel: string;
9206
- runsSummary: string;
9207
- timezoneLabel: string;
9208
- timezonePlaceholder: string;
9209
- timezoneHint: string;
9210
- timezoneInvalid: string;
9211
- skillPlaceholder: string;
9212
- skillUnknown: string;
9213
- templateLabel: string;
9214
- templatePlaceholder: string;
9215
- templateHint: string;
9216
- templateLoading: string;
9217
- templateFailed: string;
9218
- skillInstructionsLabel: string;
9219
- skillInstructionsLoading: string;
9220
- skillInstructionsFailed: string;
9221
- editACopy: string;
9222
- editACopyHint: string;
9223
- noMatches: string;
9224
- deliveryNote: string;
9225
- save: string;
9226
- saving: string;
9227
- };
9228
9082
  skills: {
9229
9083
  subtitle: string;
9230
9084
  byZeni: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/web-components",
3
- "version": "4.3.66",
3
+ "version": "4.3.67",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -47,8 +47,8 @@
47
47
  "@statsig/react-bindings": "^3.14.0",
48
48
  "@stripe/react-stripe-js": "^2.7.3",
49
49
  "@stripe/stripe-js": "^4.4.0",
50
- "@zeniai/client-analytics": "2.0.87",
51
- "@zeniai/client-epic-state": "5.2.35",
50
+ "@zeniai/client-analytics": "2.0.88",
51
+ "@zeniai/client-epic-state": "5.2.36",
52
52
  "autosuggest-highlight": "^3.2.1",
53
53
  "browser-image-compression": "^2.0.2",
54
54
  "countries-list": "^2.6.1",
@@ -166,8 +166,8 @@
166
166
  "@types/color": "^3.0.2",
167
167
  "@types/react-select": "^4.0.18",
168
168
  "@types/react-window": "^1.8.8",
169
- "@zeniai/client-analytics": "2.0.87",
170
- "@zeniai/client-epic-state": "5.2.35",
169
+ "@zeniai/client-analytics": "2.0.88",
170
+ "@zeniai/client-epic-state": "5.2.36",
171
171
  "color": "^3.1.3",
172
172
  "react": "18.3.1",
173
173
  "react-dom": "18.3.1",
@@ -1,24 +0,0 @@
1
- import { default as React } from 'react';
2
- /**
3
- * A type-to-filter picker.
4
- *
5
- * Replaces `<input list>` + `<datalist>`: the native control cannot be styled,
6
- * renders in the OS's own popup rather than the app's, and positions itself
7
- * over whatever sits below the field. Everything here is app chrome.
8
- *
9
- * The component owns only the open/highlight state. The typed text lives with
10
- * the caller, which is what lets a caller resolve it to an id (or reject it) on
11
- * its own terms — a picker that also owned the value would have to know what
12
- * the value meant.
13
- */
14
- export interface AiCfoComboboxProps {
15
- id: string;
16
- /** Rendered as-is; already filtered options are not expected. */
17
- options: string[];
18
- query: string;
19
- placeholder?: string;
20
- onQueryChange: (query: string) => void;
21
- onBlur?: () => void;
22
- }
23
- declare const AiCfoCombobox: React.FC<AiCfoComboboxProps>;
24
- export default AiCfoCombobox;
@@ -1,29 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Routine, RoutineRun, SchedulableSkill } from './helpers/aiCfoRoutines';
3
- export interface AiCfoRoutineDetailProps {
4
- historyError: boolean;
5
- historyLoading: boolean;
6
- /** The routine being shown. */
7
- routine: Routine;
8
- /** True while a Run-now is in flight for this routine. */
9
- running: boolean;
10
- runs: RoutineRun[];
11
- /** Used to name the skill this runs, rather than showing a raw macro id. */
12
- skills: SchedulableSkill[];
13
- /**
14
- * What this routine will run, if the host has loaded it.
15
- *
16
- * Not on `Routine`: the list endpoint returns schedules, and the text lives
17
- * behind the skill-detail fetch. Absent simply hides the card rather than
18
- * showing an empty one.
19
- */
20
- instructions?: string;
21
- onBack: () => void;
22
- onDelete: () => void;
23
- onEdit: () => void;
24
- onOpenRun: (run: RoutineRun) => void;
25
- onRun: () => void;
26
- onSetEnabled: (enabled: boolean) => void;
27
- }
28
- declare const AiCfoRoutineDetail: React.FC<AiCfoRoutineDetailProps>;
29
- export default AiCfoRoutineDetail;
@@ -1,46 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Routine, RoutineEditorDraft, SchedulableSkill } from './helpers/aiCfoRoutines';
3
- export interface AiCfoRoutineEditorProps {
4
- editing: Routine | undefined;
5
- saveError: boolean;
6
- saving: boolean;
7
- /**
8
- * Skills this user can schedule. Empty hides the skill option entirely rather
9
- * than offering a picker with nothing in it — a new user's only real choice
10
- * is a one-off, and an empty dropdown reads as something being broken.
11
- */
12
- skills: SchedulableSkill[];
13
- /**
14
- * The routine being edited. Absent means this is a new one.
15
- *
16
- * The host MUST mount this with `key={editing?.scheduleId ?? "new"}`. Every
17
- * field seeds from `editing` once, so without the key, opening B after
18
- * cancelling A shows A's schedule and saves it onto B.
19
- */
20
- /**
21
- * Instructions to start a NEW routine from, from the list page's composer.
22
- *
23
- * Also switches the source to the one-off branch: someone who described what
24
- * they want has already said it is not a saved skill.
25
- */
26
- draftPrompt?: string;
27
- /**
28
- * The instructions behind the skill last requested via `onLoadSkillInstructions`.
29
- *
30
- * Carries its own `macroId` because this is the same detail slice the skills
31
- * browser fills: without the check, opening a skill there and then opening
32
- * this editor would seed the box from whatever that slice happened to hold.
33
- */
34
- skillInstructions?: {
35
- instructions: string;
36
- macroId: string;
37
- };
38
- skillInstructionsError?: boolean;
39
- skillInstructionsLoading?: boolean;
40
- onCancel: () => void;
41
- onSave: (draft: RoutineEditorDraft) => void;
42
- /** Absent withholds the "start from a skill" picker rather than offering one that cannot load. */
43
- onLoadSkillInstructions?: (macroId: string) => void;
44
- }
45
- declare const AiCfoRoutineEditor: React.FC<AiCfoRoutineEditorProps>;
46
- export default AiCfoRoutineEditor;
@@ -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;
@@ -1,13 +0,0 @@
1
- import { MouseEvent } from 'react';
2
- import { ID, ScheduleTypes } from '@zeniai/client-epic-state';
3
- import { JEScheduleRowKey } from './jeScheduleListRow.helpers';
4
- export type JEScheduleRowClickHandler = (event: MouseEvent<HTMLDivElement>, jeScheduleId: ID, jeScheduleKey: JEScheduleRowKey, jeScheduleType: ScheduleTypes) => void;
5
- /**
6
- * Opens a schedule row unless the click started inside cell content that owns it.
7
- *
8
- * Both tabs previously inlined their own copy of the guard and they had drifted: the Existing tab
9
- * only checked two of the six interactive class names, so a click on an open select menu there
10
- * navigated away instead of picking the option. Both now defer to
11
- * {@link isInteractiveCellClick}, which is the single list of those class names.
12
- */
13
- export declare function useJEScheduleRowClick(onOpenSchedule: (jeScheduleId: ID, jeScheduleKey: JEScheduleRowKey, jeScheduleType: ScheduleTypes) => void): JEScheduleRowClickHandler;