@zeniai/web-components 4.3.29 → 4.3.31
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/{SessionTimeoutPopup-DXlvVpud.cjs → SessionTimeoutPopup-C1r2PmeB.cjs} +15850 -15584
- package/dist/{SessionTimeoutPopup-jS9F5TG6.js → SessionTimeoutPopup-evLVE3bs.js} +79871 -78802
- package/dist/appLocale.d.ts +81 -0
- package/dist/cockpit.cjs.js +5 -5
- package/dist/cockpit.esm.js +397 -390
- package/dist/common/util.d.ts +8 -0
- package/dist/components/aiCfo/AiCfoPage.d.ts +48 -2
- package/dist/components/aiCfo/components/AiCfoSkillEditor.d.ts +24 -0
- package/dist/components/aiCfo/components/AiCfoSkillVersionHistory.d.ts +18 -0
- package/dist/components/aiCfo/components/AiCfoSkillsBrowser.d.ts +61 -0
- package/dist/components/aiCfo/stories/hooks/useAiCfoStreamingState.d.ts +1 -0
- package/dist/components/appDrawerContent/AiCfoMenuContent.d.ts +3 -1
- package/dist/components/appDrawerContent/AppDrawerContent.d.ts +3 -1
- package/dist/components/appDrawerContent/MenuButton.d.ts +3 -3
- package/dist/components/appDrawerContent/MenuList.d.ts +3 -1
- package/dist/components/formElements/common/common.d.ts +5 -0
- package/dist/components/formElements/fieldHelp/FieldHelpContext.d.ts +20 -0
- package/dist/components/formElements/fieldHelp/FieldHelpIcon.d.ts +13 -0
- package/dist/components/formElements/label/Label.d.ts +7 -1
- package/dist/components/formElements/labeledAutoCompleteGroupedSingleSelectCustomGroupField/LabeledAutoCompleteGroupedSingleSelectCustomGroupField.d.ts +2 -0
- package/dist/components/formElements/labeledAutoCompleteGroupedSingleSelectField/LabeledAutoCompleteGroupedSingleSelectField.d.ts +2 -0
- package/dist/components/formElements/labeledAutoCompleteGroupedSingleSelectFieldWithCOT/LabeledAutoCompleteGroupedSingleSelectFieldWithCOT.d.ts +2 -0
- package/dist/components/formElements/labeledAutoCompleteSingleSelectField/LabeledAutoCompleteSingleSelectField.d.ts +2 -0
- package/dist/components/formElements/labeledCheckBox/LabeledControlledCheckBoxField.d.ts +2 -0
- package/dist/components/formElements/labeledCheckBox/LabeledUnSafeCheckBoxField.d.ts +2 -0
- package/dist/components/formElements/labeledCountryMultiSelectField/LabeledCountryMultiSelectField.d.ts +2 -0
- package/dist/components/formElements/labeledCreatableAutoCompleteSingleSelectField/LabeledCreatableAutoCompleteSingleSelectField.d.ts +2 -0
- package/dist/components/formElements/labeledCreatableMultiSelectField/LabeledCreatableMultiSelectField.d.ts +2 -0
- package/dist/components/formElements/labeledCreatableSingleSelectField/LabeledCreatableSingleSelectField.d.ts +2 -0
- package/dist/components/formElements/labeledCurrencyAmountField/LabeledCurrencyAmountField.d.ts +2 -0
- package/dist/components/formElements/labeledCurrencyField/LabeledCurrencyField.d.ts +2 -0
- package/dist/components/formElements/labeledDatePickerWithRadioOptionsField/LabeledDatePickerWithRadioOptionsField.d.ts +2 -0
- package/dist/components/formElements/labeledDayOfMonthSelectorField/LabeledDayOfMonthSelectorField.d.ts +2 -0
- package/dist/components/formElements/labeledDocumentField/LabeledDocumentField.d.ts +2 -0
- package/dist/components/formElements/labeledEmailInputField/LabeledEmailInputField.d.ts +2 -0
- package/dist/components/formElements/labeledFormattedText/LabeledFormattedTextField.d.ts +2 -0
- package/dist/components/formElements/labeledGroupSingleSelectFieldWithRecommendationCheckbox/LabeledGroupSingleSelectWithRecommendationCheckboxField.d.ts +2 -0
- package/dist/components/formElements/labeledGroupedSingleSelectField/LabeledGroupedSingleSelectField.d.ts +2 -0
- package/dist/components/formElements/labeledGroupedSingleSelectWithCOT/LabeledGroupSingleSelectWithRecommendationCheckboxFieldWithCOT.d.ts +2 -0
- package/dist/components/formElements/labeledMonthSelectorField/LabeledMonthSelectorField.d.ts +2 -0
- package/dist/components/formElements/labeledMultiLineSingleSelectPickerField/LabeledMultiLineSingleSelectPickerField.d.ts +2 -0
- package/dist/components/formElements/labeledMultiSelectField/LabeledMultiSelectField.d.ts +2 -0
- package/dist/components/formElements/labeledMultiSelectWithCheckBoxField/LabeledMultiSelectWithCheckBoxField.d.ts +2 -0
- package/dist/components/formElements/labeledMultiTextField/LabeledMultiTextFieldMedium.d.ts +2 -0
- package/dist/components/formElements/labeledNameField/LabeledNameField.d.ts +2 -0
- package/dist/components/formElements/labeledPaymentMethodSingleSelectField/LabeledPaymentMethodSingleSelectField.d.ts +2 -0
- package/dist/components/formElements/labeledRadio/LabeledRadioField.d.ts +2 -0
- package/dist/components/formElements/labeledSingleSelectCreatablePickerField/LabeledSingleSelectCreatablePickerField.d.ts +2 -0
- package/dist/components/formElements/labeledSingleSelectField/LabeledSingleSelectField.d.ts +2 -0
- package/dist/components/formElements/labeledSingleSelectNumericField/LabeledSingleSelectNumericField.d.ts +2 -0
- package/dist/components/formElements/labeledSingleSelectPickerField/LabeledSingleSelectPickerField.d.ts +2 -0
- package/dist/components/formElements/labeledSingleSelectWithoutClearableField/LabeledSingleSelectWithoutClearableField.d.ts +2 -0
- package/dist/components/formElements/labeledTextWithButton/LabeledTextWithButtonField.d.ts +2 -0
- package/dist/components/formElements/labeledTextWithRecommendation/LabeledTextWithRecommendationsField.d.ts +2 -0
- package/dist/components/formElements/labeledTimeSpentField/LabeledTimeSpentField.d.ts +2 -0
- package/dist/components/formElements/labeledUserSingleSelectField/LabeledUserSingleSelectField.d.ts +2 -0
- package/dist/components/formElements/labeledUserSingleSelectWithSubtitlesField/LabeledUserSingleSelectWithSubtitlesField.d.ts +2 -0
- package/dist/components/formElements/staticFields/labeledAddressValue/LabeledAddressValue.d.ts +2 -0
- package/dist/components/formElements/staticFields/labeledItemWithLoader/LabeledItemWithLoader.d.ts +2 -0
- package/dist/components/formElements/staticFields/labeledItemWithMultiTextAndSubtext/LabeledItemWithMultiTextAndSubtext.d.ts +2 -0
- package/dist/components/formElements/staticFields/labeledItemWithTag/LabeledItemWithTag.d.ts +2 -0
- package/dist/components/formElements/staticFields/labeledLabelWithSubtitle/LabeledLabelWithSubtitle.d.ts +2 -0
- package/dist/components/formElements/staticFields/labeledLabelsWithBullets/LabeledLabelsWithBullets.d.ts +2 -0
- package/dist/components/formElements/staticFields/labeledUserAvatars/LabeledUserAvatars.d.ts +2 -0
- package/dist/components/invoicing/catalogForm/InvoicingCatalogItemFormPage.d.ts +7 -1
- package/dist/components/invoicing/common/InvoicingDetailScaffold.d.ts +3 -1
- package/dist/components/invoicing/common/InvoicingFormRows.d.ts +3 -1
- package/dist/components/invoicing/subscriptionDetail/InvoicingSubscriptionDetailPage.d.ts +1 -2
- package/dist/components/invoicing/subscriptionForm/InvoicingSubscriptionFormPage.d.ts +1 -2
- package/dist/components/invoicing/subscriptionForm/subscriptionForm.shared.d.ts +17 -11
- package/dist/components/taskManagement/TaskDetailPage.d.ts +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.esm.js +413 -409
- package/dist/strings/strings.d.ts +81 -0
- package/package.json +7 -5
package/dist/common/util.d.ts
CHANGED
|
@@ -75,6 +75,14 @@ export declare function escapeRegExp(keyword: string): string;
|
|
|
75
75
|
export declare const formatToSentenceCase: (text: string) => string;
|
|
76
76
|
export declare const convertMinutesToDays: (minutes: number) => number;
|
|
77
77
|
export declare const convertMinutesToWeeks: (minutes: number) => number;
|
|
78
|
+
/**
|
|
79
|
+
* "Jul 29, 2026" from an ISO timestamp, or null when there is nothing to show.
|
|
80
|
+
*
|
|
81
|
+
* Returns null rather than a placeholder string so the caller decides the copy — a
|
|
82
|
+
* skill that has never been updated reads differently from one whose timestamp we
|
|
83
|
+
* failed to parse, and both are worse than an em-dash chosen here.
|
|
84
|
+
*/
|
|
85
|
+
export declare const formatIsoDateShort: (iso: string | null) => string | null;
|
|
78
86
|
export declare const formatMonthYear: (monthStr: string) => string;
|
|
79
87
|
type YearMonthPeriod = string & {
|
|
80
88
|
readonly __brand: "YearMonthPeriod";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { AICFOChatSubmissionSource } from '@zeniai/client-analytics';
|
|
3
|
-
import { AiCfoQuestionWithAnswer, AiCfoViewSelector, ID, SyntheticAiCfoAnswer, User } from '@zeniai/client-epic-state';
|
|
3
|
+
import { AiCfoQuestionWithAnswer, AiCfoViewSelector, ID, Skill, SkillDetail, SkillDraft, SkillVersion, SkillVisibility, SyntheticAiCfoAnswer, User } from '@zeniai/client-epic-state';
|
|
4
4
|
import { AiCfoChatHeaderProps } from './components/AiCfoChatHeader';
|
|
5
5
|
import { FileAttachment } from './components/AiCfoInput';
|
|
6
6
|
import { AiCfoQuestionAnswerProps } from './components/AiCfoQuestionAnswer';
|
|
@@ -122,6 +122,8 @@ export interface AiCfoPageProps {
|
|
|
122
122
|
isFileUploadEnabled?: boolean;
|
|
123
123
|
/** True while the create-cards mutation is in flight; disables the form CTA. */
|
|
124
124
|
isInteractiveFormSubmitting?: boolean;
|
|
125
|
+
/** Replaces the chat body with the Skills browser. Driven by the left-rail entry. */
|
|
126
|
+
isSkillsOpen?: boolean;
|
|
125
127
|
isUploadPromoVisible?: boolean;
|
|
126
128
|
/** Debounced (300ms) flush of the card-policy RHF watch subscription. */
|
|
127
129
|
onCardPolicyFormChange?: AiCfoQuestionAnswerProps["onCardPolicyFormChange"];
|
|
@@ -153,8 +155,44 @@ export interface AiCfoPageProps {
|
|
|
153
155
|
routedInitialQuestionSource?: AICFOChatSubmissionSource;
|
|
154
156
|
/** Suggestion chip index when the routed question came from a sample chip (e.g. `question_card` or `dashboard_card`). */
|
|
155
157
|
routedInitialQuestionSuggestionIndex?: number;
|
|
158
|
+
skillDetail?: SkillDetail;
|
|
159
|
+
skillDetailError?: boolean;
|
|
160
|
+
skillDetailLoading?: boolean;
|
|
161
|
+
skillRestoreBody?: {
|
|
162
|
+
macroId: string;
|
|
163
|
+
version: number;
|
|
164
|
+
error?: boolean;
|
|
165
|
+
instructions?: string;
|
|
166
|
+
loading?: boolean;
|
|
167
|
+
};
|
|
156
168
|
/** Chat-visible skills for the `/` menu (from getSkills). */
|
|
157
169
|
skills?: SkillMenuItem[];
|
|
170
|
+
/** Authoring. Absent leaves the Skills browser read-only. */
|
|
171
|
+
skillSaveError?: boolean;
|
|
172
|
+
skillSaving?: boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Whether the signed-in user may publish a skill tenant-wide. Optional, defaulting to
|
|
175
|
+
* withheld: a host that has not wired it shows no publish control rather than a button
|
|
176
|
+
* the API refuses.
|
|
177
|
+
*/
|
|
178
|
+
skillsCanPublish?: boolean;
|
|
179
|
+
/** Full skill list for the browser — richer than the `/` menu's {@link skills}. */
|
|
180
|
+
skillsList?: Skill[];
|
|
181
|
+
skillsListError?: boolean;
|
|
182
|
+
skillsListLoading?: boolean;
|
|
183
|
+
/**
|
|
184
|
+
* A skill's history and a restore's pinned body, each WITH the identity it belongs to.
|
|
185
|
+
*
|
|
186
|
+
* Grouped rather than split into value-plus-key props: the key is not optional relative
|
|
187
|
+
* to the data, and when they were separate a host could pass one and forget the other —
|
|
188
|
+
* which shipped, and left history hidden and Restore hanging. The type now refuses it.
|
|
189
|
+
*/
|
|
190
|
+
skillVersionHistory?: {
|
|
191
|
+
macroId: string;
|
|
192
|
+
versions: SkillVersion[];
|
|
193
|
+
error?: boolean;
|
|
194
|
+
loading?: boolean;
|
|
195
|
+
};
|
|
158
196
|
style?: React.CSSProperties;
|
|
159
197
|
/**
|
|
160
198
|
* Client-synthesized "Creating…" / "Created" bubbles for the active
|
|
@@ -176,10 +214,18 @@ export interface AiCfoPageProps {
|
|
|
176
214
|
openOnboardingPage: () => void;
|
|
177
215
|
togglePageView: () => void;
|
|
178
216
|
updateCurrentInput: (input: string) => void;
|
|
179
|
-
onEmailLinkQuestionProcessed?: () => void;
|
|
180
217
|
/** Called when the user first types `/` so the container can fetch skills. */
|
|
218
|
+
onCloseSkillDetail?: () => void;
|
|
219
|
+
onDeleteSkill?: (macroId: string) => void;
|
|
220
|
+
onEmailLinkQuestionProcessed?: () => void;
|
|
181
221
|
onFetchSkills?: () => void;
|
|
222
|
+
onFetchSkillVersionBody?: (macroId: string, version: number) => void;
|
|
182
223
|
onMenuClick?: () => void;
|
|
224
|
+
onOpenSkill?: (macroId: string) => void;
|
|
225
|
+
onRunSkill?: (macroId: string, label: string) => void;
|
|
226
|
+
onSaveSkill?: (draft: SkillDraft, macroId: string | undefined) => void;
|
|
227
|
+
/** Publish or unpublish in place. Absent withholds the control. */
|
|
228
|
+
onSetSkillVisibility?: (macroId: string, visibility: SkillVisibility) => void;
|
|
183
229
|
onUploadPromoClose?: () => void;
|
|
184
230
|
/**
|
|
185
231
|
* Resolves a newly-created card id to a `{ title, subtitle? }` tile.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Skill, SkillDraft } from '@zeniai/client-epic-state';
|
|
3
|
+
export interface AiCfoSkillEditorProps {
|
|
4
|
+
/**
|
|
5
|
+
* Whether this user may publish tenant-wide. From the server — a scope granted to
|
|
6
|
+
* admin roles. False hides the audience control entirely rather than disabling it: a
|
|
7
|
+
* greyed-out "Everyone" is an invitation to go asking for a permission most people do
|
|
8
|
+
* not need.
|
|
9
|
+
*/
|
|
10
|
+
canPublish: boolean;
|
|
11
|
+
/** The skill being edited. Absent means this is a new one. */
|
|
12
|
+
editing: Skill | undefined;
|
|
13
|
+
/** Prefilled body — the existing prompt when editing, a forked one when copying. */
|
|
14
|
+
initialInstructions: string;
|
|
15
|
+
/** Prefilled name. Differs from `editing.name` when forking, which suggests a new one. */
|
|
16
|
+
initialName: string;
|
|
17
|
+
saveError: boolean;
|
|
18
|
+
saving: boolean;
|
|
19
|
+
initialDescription?: string | null;
|
|
20
|
+
onCancel: () => void;
|
|
21
|
+
onSave: (draft: SkillDraft) => void;
|
|
22
|
+
}
|
|
23
|
+
declare const AiCfoSkillEditor: React.FC<AiCfoSkillEditorProps>;
|
|
24
|
+
export default AiCfoSkillEditor;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SkillVersion } from '@zeniai/client-epic-state';
|
|
3
|
+
export interface AiCfoSkillVersionHistoryProps {
|
|
4
|
+
error: boolean;
|
|
5
|
+
loading: boolean;
|
|
6
|
+
versions: SkillVersion[];
|
|
7
|
+
/** Absent leaves the list read-only, so a host without authoring shows no Restore. */
|
|
8
|
+
onRestore?: (version: SkillVersion) => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A skill's versions, newest first.
|
|
12
|
+
*
|
|
13
|
+
* Restore does not write from here. It hands the version to the caller, which loads that
|
|
14
|
+
* body and opens the EDITOR on it — so a restore goes through the same validation and the
|
|
15
|
+
* same unsaved-changes handling as any other edit, and is reviewed before it is saved.
|
|
16
|
+
*/
|
|
17
|
+
declare const AiCfoSkillVersionHistory: React.FC<AiCfoSkillVersionHistoryProps>;
|
|
18
|
+
export default AiCfoSkillVersionHistory;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Skill, SkillDetail, SkillDraft, SkillVersion, SkillVisibility } from '@zeniai/client-epic-state';
|
|
3
|
+
export interface AiCfoSkillsBrowserProps {
|
|
4
|
+
/**
|
|
5
|
+
* Whether this user may publish a skill tenant-wide. Straight through to the editor,
|
|
6
|
+
* which owns the control; the browser only forwards it.
|
|
7
|
+
*/
|
|
8
|
+
canPublish: boolean;
|
|
9
|
+
detail: SkillDetail | undefined;
|
|
10
|
+
detailError: boolean;
|
|
11
|
+
detailLoading: boolean;
|
|
12
|
+
listError: boolean;
|
|
13
|
+
/** The list is being fetched. Distinct from "no skills": opening the browser triggers
|
|
14
|
+
* the fetch, so without this an empty list reads as "none exist" for the whole
|
|
15
|
+
* round-trip — the same conflation this component already avoids for errors. */
|
|
16
|
+
listLoading: boolean;
|
|
17
|
+
/** macroId whose detail is open; undefined shows the list. */
|
|
18
|
+
openMacroId: string | undefined;
|
|
19
|
+
skills: Skill[];
|
|
20
|
+
/**
|
|
21
|
+
* A restore's pinned body, WITH the (skill, version) it is for.
|
|
22
|
+
*
|
|
23
|
+
* One object rather than a value plus separate keys, because the keys are not optional
|
|
24
|
+
* relative to the data: a body that cannot be attributed must not seed the editor,
|
|
25
|
+
* which seeds once. Split apart, a host could pass the body and forget the keys — which
|
|
26
|
+
* shipped, and left Restore hanging on its loading state forever. Grouped, that is a
|
|
27
|
+
* type error instead of a silent break.
|
|
28
|
+
*/
|
|
29
|
+
restoreBody?: {
|
|
30
|
+
macroId: string;
|
|
31
|
+
version: number;
|
|
32
|
+
error?: boolean;
|
|
33
|
+
instructions?: string;
|
|
34
|
+
loading?: boolean;
|
|
35
|
+
};
|
|
36
|
+
/** Authoring is absent unless the host wires it, so the browser stays read-only by
|
|
37
|
+
* default rather than rendering buttons that do nothing. */
|
|
38
|
+
saveError?: boolean;
|
|
39
|
+
saving?: boolean;
|
|
40
|
+
/** A skill's history, WITH the skill it belongs to. Same reasoning. */
|
|
41
|
+
versionHistory?: {
|
|
42
|
+
macroId: string;
|
|
43
|
+
versions: SkillVersion[];
|
|
44
|
+
error?: boolean;
|
|
45
|
+
loading?: boolean;
|
|
46
|
+
};
|
|
47
|
+
onBack: () => void;
|
|
48
|
+
onOpenSkill: (skill: Skill) => void;
|
|
49
|
+
onRunSkill: (skill: Skill) => void;
|
|
50
|
+
onDeleteSkill?: (skill: Skill) => void;
|
|
51
|
+
onFetchVersionBody?: (macroId: string, version: number) => void;
|
|
52
|
+
/** Absent disables authoring entirely — see `saveError`. */
|
|
53
|
+
onSaveSkill?: (draft: SkillDraft, editing: Skill | undefined) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Publish or unpublish in place. Absent withholds the control — a host without it gets
|
|
56
|
+
* no button rather than one the API refuses, the same rule Edit and Delete follow.
|
|
57
|
+
*/
|
|
58
|
+
onSetVisibility?: (skill: Skill, visibility: SkillVisibility) => void;
|
|
59
|
+
}
|
|
60
|
+
declare const AiCfoSkillsBrowser: React.FC<AiCfoSkillsBrowserProps>;
|
|
61
|
+
export default AiCfoSkillsBrowser;
|
|
@@ -27,6 +27,7 @@ export declare const useAiCfoStreamingState: ({ initialAiCfoView, currentChatSes
|
|
|
27
27
|
};
|
|
28
28
|
agentId?: import('@zeniai/client-epic-state').ID;
|
|
29
29
|
aiCfoSidePanelHostPageKey?: string;
|
|
30
|
+
isSkillsBrowserOpen?: boolean;
|
|
30
31
|
lastContextMessage?: string;
|
|
31
32
|
lastContextStatus?: import('@zeniai/client-epic-state/view/aiCfoView/aiCfoViewPayload').ContextStatus;
|
|
32
33
|
};
|
|
@@ -5,8 +5,10 @@ export interface Props {
|
|
|
5
5
|
selectedMenu: MenuType | SettingsMenu | AiCfoMenu | InvoicingMenu;
|
|
6
6
|
aiCfoView?: AiCfoViewSelector;
|
|
7
7
|
isMobile?: boolean;
|
|
8
|
+
/** Absent/false hides the Skills entry entirely — the server decides. */
|
|
9
|
+
skillsEnabled?: boolean;
|
|
8
10
|
onClick: (_menu: MenuListItem) => void;
|
|
9
11
|
onDeleteChatSession?: (chatSessionId: string) => void;
|
|
10
12
|
updateCurrentChatSessionId?: (chatSessionId: string) => void;
|
|
11
13
|
}
|
|
12
|
-
export default function AiCfoMenuContent({ selectedMenu, aiCfoView, isMobile, onClick, onDeleteChatSession, updateCurrentChatSessionId, }: Readonly<Props>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default function AiCfoMenuContent({ selectedMenu, aiCfoView, isMobile, skillsEnabled, onClick, onDeleteChatSession, updateCurrentChatSessionId, }: Readonly<Props>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -36,6 +36,8 @@ export interface Props {
|
|
|
36
36
|
count: number;
|
|
37
37
|
fetchStatus: FetchStateAndError;
|
|
38
38
|
};
|
|
39
|
+
/** Forwarded to the AI CFO rail: absent/false hides the Skills entry. */
|
|
40
|
+
skillsEnabled?: boolean;
|
|
39
41
|
thanksGivingAnimationEnabled?: boolean;
|
|
40
42
|
handleLogOutClick: () => void;
|
|
41
43
|
handleMenuChange: (selectedMenu: MenuListItem, additionalMessage?: string) => void;
|
|
@@ -51,4 +53,4 @@ export interface Props {
|
|
|
51
53
|
onZeniLogoClick?: () => void;
|
|
52
54
|
updateCurrentChatSessionId?: (chatSessionId: string) => void;
|
|
53
55
|
}
|
|
54
|
-
export default function AppDrawerContent({ currentTenantId, tenants, isVendorsTabVisible, isZeniAccountEnabled, isTreasuryEnabled, isChargeCardEnabled, rewardsConfiguration, selectedMenu, isTenantDropdownDisabled, isSettings, isInvoicing, isAiCfo, isAiCfoAccessEnabled, isNotificationsTabVisible, isSettingsFeatureEnabled, signedInUser, aiCfoView, currentTenant, christmasAnimationEnabled, expenseAutomationEnabledCompanies: _expenseAutomationEnabledCompanies, halloweenAnimationEnabled, newYearAnimationEnabled, thanksGivingAnimationEnabled, notificationCountDetails, isExpenseAutomationEnabledForUser, isTaskManagerAccessEnabled, onNotificationIconClick, handleLogOutClick, handleMenuChange, onZeniLogoClick, handleBackClick, handleCockpitClick, handleMyProfileClick, handleReferralsClick, handleTenantSelect, monthEndCloseChecksView, onCalendarOpen, onDeleteChatSession, onPeriodChange, updateCurrentChatSessionId, }: Readonly<Props>): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export default function AppDrawerContent({ currentTenantId, tenants, isVendorsTabVisible, isZeniAccountEnabled, isTreasuryEnabled, isChargeCardEnabled, rewardsConfiguration, selectedMenu, isTenantDropdownDisabled, isSettings, isInvoicing, isAiCfo, isAiCfoAccessEnabled, skillsEnabled, isNotificationsTabVisible, isSettingsFeatureEnabled, signedInUser, aiCfoView, currentTenant, christmasAnimationEnabled, expenseAutomationEnabledCompanies: _expenseAutomationEnabledCompanies, halloweenAnimationEnabled, newYearAnimationEnabled, thanksGivingAnimationEnabled, notificationCountDetails, isExpenseAutomationEnabledForUser, isTaskManagerAccessEnabled, onNotificationIconClick, handleLogOutClick, handleMenuChange, onZeniLogoClick, handleBackClick, handleCockpitClick, handleMyProfileClick, handleReferralsClick, handleTenantSelect, monthEndCloseChecksView, onCalendarOpen, onDeleteChatSession, onPeriodChange, updateCurrentChatSessionId, }: Readonly<Props>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,9 +7,9 @@ export declare const ALL_SETTINGS_MENU_OPTIONS: readonly ["accounting", "approva
|
|
|
7
7
|
export declare const toSettingsMenuOptionType: (v: string) => "my_profile" | "accounting" | "billing" | "company_details" | "integrations" | "approval_rules" | "bank_connections" | "business_verification" | "my_bank_connections" | "notifications";
|
|
8
8
|
export declare const toSettingsMenuOptionTypeStrict: (v: string) => "my_profile" | "accounting" | "billing" | "company_details" | "integrations" | "approval_rules" | "bank_connections" | "business_verification" | "my_bank_connections" | "notifications" | undefined;
|
|
9
9
|
export type SettingsMenu = (typeof ALL_SETTINGS_MENU_OPTIONS)[number];
|
|
10
|
-
export declare const ALL_AI_CFO_MENU_OPTIONS: readonly ["new_chat", "explore", "search_chats"];
|
|
11
|
-
export declare const toAiCfoMenuOptionType: (v: string) => "new_chat" | "explore" | "search_chats";
|
|
12
|
-
export declare const toAiCfoMenuOptionTypeStrict: (v: string) => "new_chat" | "explore" | "search_chats" | undefined;
|
|
10
|
+
export declare const ALL_AI_CFO_MENU_OPTIONS: readonly ["new_chat", "explore", "skills", "search_chats"];
|
|
11
|
+
export declare const toAiCfoMenuOptionType: (v: string) => "skills" | "new_chat" | "explore" | "search_chats";
|
|
12
|
+
export declare const toAiCfoMenuOptionTypeStrict: (v: string) => "skills" | "new_chat" | "explore" | "search_chats" | undefined;
|
|
13
13
|
export type AiCfoMenu = (typeof ALL_AI_CFO_MENU_OPTIONS)[number];
|
|
14
14
|
export declare const ALL_INVOICING_MENU_OPTIONS: readonly ["invoicing_overview", "invoicing_analytics", "invoicing_customers", "invoicing_subscriptions", "invoicing_invoices", "invoicing_payments", "invoicing_credits", "invoicing_discounts", "invoicing_dunning", "invoicing_reports", "invoicing_catalog", "invoicing_settings", "invoicing_settings_payment_destination", "invoicing_settings_branding", "invoicing_settings_integrations", "invoicing_settings_dunning", "invoicing_integrations", "invoicing_data_import", "invoicing_audit_log"];
|
|
15
15
|
export declare const toInvoicingMenuOptionType: (v: string) => "invoicing_overview" | "invoicing_analytics" | "invoicing_customers" | "invoicing_subscriptions" | "invoicing_invoices" | "invoicing_payments" | "invoicing_credits" | "invoicing_discounts" | "invoicing_dunning" | "invoicing_reports" | "invoicing_catalog" | "invoicing_settings" | "invoicing_settings_payment_destination" | "invoicing_settings_branding" | "invoicing_settings_integrations" | "invoicing_settings_dunning" | "invoicing_integrations" | "invoicing_data_import" | "invoicing_audit_log";
|
|
@@ -31,6 +31,8 @@ interface Props {
|
|
|
31
31
|
currentTenant?: CurrentTenant;
|
|
32
32
|
isTaskManagerAccessEnabled?: boolean;
|
|
33
33
|
monthEndCloseChecksView?: MonthEndCloseChecksView;
|
|
34
|
+
/** Forwarded to the AI CFO rail: absent/false hides the Skills entry. */
|
|
35
|
+
skillsEnabled?: boolean;
|
|
34
36
|
style?: React.CSSProperties;
|
|
35
37
|
onSelectionChanged: (selectedMenu: MenuListItem, additionalMessage?: string) => void;
|
|
36
38
|
onBackClick?: () => void;
|
|
@@ -39,5 +41,5 @@ interface Props {
|
|
|
39
41
|
onPeriodChange?: (period: MonthYearPeriod) => void;
|
|
40
42
|
updateCurrentChatSessionId?: (chatSessionId: string) => void;
|
|
41
43
|
}
|
|
42
|
-
export default function MenuList({ selectedMenu, currentTenant, isVendorsTabVisible, isSetting, isInvoicing, isAiCfo, isAiCfoAccessEnabled, isZeniAccountEnabled, isChargeCardEnabled, isTreasuryEnabled, rewardsConfiguration, className, style, isNotificationsTabVisible, isTaskManagerAccessEnabled, isExpenseAutomationEnabledForUser, aiCfoView, additionalMessage, monthEndCloseChecksView, onCalendarOpen, onPeriodChange, onSelectionChanged, onDeleteChatSession, updateCurrentChatSessionId, onBackClick, }: Readonly<Props>): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export default function MenuList({ selectedMenu, currentTenant, isVendorsTabVisible, isSetting, isInvoicing, isAiCfo, isAiCfoAccessEnabled, skillsEnabled, isZeniAccountEnabled, isChargeCardEnabled, isTreasuryEnabled, rewardsConfiguration, className, style, isNotificationsTabVisible, isTaskManagerAccessEnabled, isExpenseAutomationEnabledForUser, aiCfoView, additionalMessage, monthEndCloseChecksView, onCalendarOpen, onPeriodChange, onSelectionChanged, onDeleteChatSession, updateCurrentChatSessionId, onBackClick, }: Readonly<Props>): import("react/jsx-runtime").JSX.Element;
|
|
43
45
|
export {};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export type DisableMode = "readonly" | "disabled";
|
|
2
2
|
export type LabelProps = {
|
|
3
3
|
label: string;
|
|
4
|
+
/**
|
|
5
|
+
* Backend field-help code. A field inside a `FieldHelpProvider` shows the
|
|
6
|
+
* label's info tooltip when the server has copy for this code.
|
|
7
|
+
*/
|
|
8
|
+
fieldCode?: string;
|
|
4
9
|
showBullet?: boolean;
|
|
5
10
|
style?: React.CSSProperties;
|
|
6
11
|
width?: number;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** Help copy for the fields in scope, keyed by backend field code. */
|
|
3
|
+
export type FieldHelpByCode = Record<string, string>;
|
|
4
|
+
export interface FieldHelpProviderProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** The `code -> description` map for the fields rendered below. */
|
|
7
|
+
fieldHelp?: FieldHelpByCode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Supplies help copy to every labeled field beneath it, so a screen declares
|
|
11
|
+
* its copy once and each field names only its own code. Threading a `helpText`
|
|
12
|
+
* prop through instead would touch every field on every form for what is one
|
|
13
|
+
* value per screen.
|
|
14
|
+
*/
|
|
15
|
+
export declare function FieldHelpProvider({ children, fieldHelp, }: Readonly<FieldHelpProviderProps>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
/**
|
|
17
|
+
* Help copy for a field code, or `undefined` when there is none. Blank copy is
|
|
18
|
+
* already dropped upstream, so any value returned here is renderable.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useFieldHelp(fieldCode: string | undefined): string | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface FieldHelpIconProps {
|
|
2
|
+
/** Field label, used for the icon's accessible name. */
|
|
3
|
+
label: string;
|
|
4
|
+
/** Backend field code; nothing renders when the server has no copy for it. */
|
|
5
|
+
fieldCode?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The info icon beside a field label, for labels that do not go through
|
|
9
|
+
* {@link Label} — detail-page rows, most notably. Matches `Label`'s own tooltip
|
|
10
|
+
* so both sides of a screen look identical. Renders nothing without copy: an
|
|
11
|
+
* icon that opens an empty tooltip is worse than no icon.
|
|
12
|
+
*/
|
|
13
|
+
export declare function FieldHelpIcon({ fieldCode, label, }: Readonly<FieldHelpIconProps>): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -5,6 +5,12 @@ import { DisableMode } from '../common/common';
|
|
|
5
5
|
*/
|
|
6
6
|
export interface Props {
|
|
7
7
|
label: string | React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Backend field-help code. When help copy exists for it, the label shows
|
|
10
|
+
* its info tooltip without the caller passing `showTooltip`/`tooltipTitle` —
|
|
11
|
+
* the copy is server-owned, so the form should not have to know it.
|
|
12
|
+
*/
|
|
13
|
+
fieldCode?: string;
|
|
8
14
|
htmlFor?: string;
|
|
9
15
|
isDisabled?: DisableMode;
|
|
10
16
|
isOptional?: boolean;
|
|
@@ -16,4 +22,4 @@ export interface Props {
|
|
|
16
22
|
tooltipTitle?: string | ReactFragment | React.ReactElement;
|
|
17
23
|
toolTipWidth?: string;
|
|
18
24
|
}
|
|
19
|
-
export declare function Label({ label, htmlFor, style, labelStyle, showTooltip, syncBackgroundWithAncestor, tooltipTitle, toolTipWidth, isOptional, showBullet, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function Label({ label, fieldCode, htmlFor, style, labelStyle, showTooltip, syncBackgroundWithAncestor, tooltipTitle, toolTipWidth, isOptional, showBullet, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,6 +5,8 @@ import { AutoCompleteGroupedSingleSelectCustomGroupFieldProps } from '../autoCom
|
|
|
5
5
|
export interface Props {
|
|
6
6
|
label: {
|
|
7
7
|
label: string;
|
|
8
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
9
|
+
fieldCode?: string;
|
|
8
10
|
width?: number;
|
|
9
11
|
};
|
|
10
12
|
selectFieldProps: AutoCompleteGroupedSingleSelectCustomGroupFieldProps;
|
|
@@ -7,6 +7,8 @@ export interface Props {
|
|
|
7
7
|
autoCompleteGroupedSingleSelectField: AutoCompleteGroupedSingleSelectFieldProps;
|
|
8
8
|
label: {
|
|
9
9
|
label: string;
|
|
10
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
11
|
+
fieldCode?: string;
|
|
10
12
|
width?: number;
|
|
11
13
|
};
|
|
12
14
|
additionalLabelInfo?: string;
|
|
@@ -7,6 +7,8 @@ export interface Props {
|
|
|
7
7
|
autoCompleteSingleSelectField: AutoCompleteSingleSelectFieldProps;
|
|
8
8
|
label: {
|
|
9
9
|
label: string;
|
|
10
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
11
|
+
fieldCode?: string;
|
|
10
12
|
width?: number;
|
|
11
13
|
};
|
|
12
14
|
controlWidth?: number;
|
|
@@ -8,6 +8,8 @@ export interface Props {
|
|
|
8
8
|
checkBoxField: ControlledCheckBoxFieldProps;
|
|
9
9
|
label: {
|
|
10
10
|
label: string | React.ReactNode;
|
|
11
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
12
|
+
fieldCode?: string;
|
|
11
13
|
style?: React.CSSProperties;
|
|
12
14
|
width?: number;
|
|
13
15
|
};
|
|
@@ -8,6 +8,8 @@ export interface Props {
|
|
|
8
8
|
checkBoxField: UnSafeCheckBoxFieldProps;
|
|
9
9
|
label: {
|
|
10
10
|
label: string | React.ReactNode;
|
|
11
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
12
|
+
fieldCode?: string;
|
|
11
13
|
style?: React.CSSProperties;
|
|
12
14
|
width?: number;
|
|
13
15
|
};
|
|
@@ -6,6 +6,8 @@ import { CountryMultiSelectFieldProps } from '../countryMultiSelectField/Country
|
|
|
6
6
|
export interface Props {
|
|
7
7
|
label: {
|
|
8
8
|
label: string;
|
|
9
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
10
|
+
fieldCode?: string;
|
|
9
11
|
style?: React.CSSProperties;
|
|
10
12
|
width?: number;
|
|
11
13
|
};
|
|
@@ -7,6 +7,8 @@ export interface Props {
|
|
|
7
7
|
autoCompleteSingleSelectField: CreatableAutoCompleteSingleSelectFieldProps;
|
|
8
8
|
label: {
|
|
9
9
|
label: string;
|
|
10
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
11
|
+
fieldCode?: string;
|
|
10
12
|
width?: number;
|
|
11
13
|
};
|
|
12
14
|
addIconInCreateLabel?: boolean;
|
|
@@ -7,6 +7,8 @@ export interface Props {
|
|
|
7
7
|
creatableMultiSelectField: CreatableMultiSelectFieldProps;
|
|
8
8
|
label: {
|
|
9
9
|
label: string;
|
|
10
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
11
|
+
fieldCode?: string;
|
|
10
12
|
width?: number;
|
|
11
13
|
};
|
|
12
14
|
errorInfoLabel?: string;
|
|
@@ -8,6 +8,8 @@ export interface Props {
|
|
|
8
8
|
creatableSingleSelectField: CreatableSingleSelectFieldProps;
|
|
9
9
|
label: {
|
|
10
10
|
label: string;
|
|
11
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
12
|
+
fieldCode?: string;
|
|
11
13
|
width?: number;
|
|
12
14
|
};
|
|
13
15
|
addIconInCreateLabel?: boolean;
|
package/dist/components/formElements/labeledCurrencyAmountField/LabeledCurrencyAmountField.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export interface Props {
|
|
|
7
7
|
currencyAmountField: CurrencyAmountFieldProps;
|
|
8
8
|
label: {
|
|
9
9
|
label: string;
|
|
10
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
11
|
+
fieldCode?: string;
|
|
10
12
|
width?: number;
|
|
11
13
|
};
|
|
12
14
|
additionalInfoLabel?: string;
|
|
@@ -7,6 +7,8 @@ export interface Props {
|
|
|
7
7
|
currencySelectField: CurrencySelectFieldProps;
|
|
8
8
|
label: {
|
|
9
9
|
label: string;
|
|
10
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
11
|
+
fieldCode?: string;
|
|
10
12
|
width?: number;
|
|
11
13
|
};
|
|
12
14
|
additionalInfoLabel?: string;
|
|
@@ -7,6 +7,8 @@ export interface Props {
|
|
|
7
7
|
dateField: DatePickerFieldWithRadioOptionsProps;
|
|
8
8
|
label: {
|
|
9
9
|
label: string;
|
|
10
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
11
|
+
fieldCode?: string;
|
|
10
12
|
width?: number;
|
|
11
13
|
};
|
|
12
14
|
additionalInfoLabel?: string;
|
|
@@ -6,6 +6,8 @@ export interface Props {
|
|
|
6
6
|
export default function LabeledEmailInputField({ name, label, style, additionalInfoLabel, showAdditionalInfoLabel, isSaveError, showErrorInfoLabel, errorInfoLabel, showTickIcon, placeholder, registerOptions, }: {
|
|
7
7
|
label: {
|
|
8
8
|
label: string;
|
|
9
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
10
|
+
fieldCode?: string;
|
|
9
11
|
width?: number;
|
|
10
12
|
};
|
|
11
13
|
name: string;
|
|
@@ -8,6 +8,8 @@ export interface Props {
|
|
|
8
8
|
formattedTextField: FormattedTextFieldProps;
|
|
9
9
|
label: {
|
|
10
10
|
label: string;
|
|
11
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
12
|
+
fieldCode?: string;
|
|
11
13
|
style?: React.CSSProperties;
|
|
12
14
|
width?: number;
|
|
13
15
|
};
|
|
@@ -7,6 +7,8 @@ export interface Props {
|
|
|
7
7
|
groupedSingleSelectField: GroupedSingleSelectFieldProps;
|
|
8
8
|
label: {
|
|
9
9
|
label: string;
|
|
10
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
11
|
+
fieldCode?: string;
|
|
10
12
|
width?: number;
|
|
11
13
|
};
|
|
12
14
|
additionalLabelInfo?: string;
|
package/dist/components/formElements/labeledMonthSelectorField/LabeledMonthSelectorField.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import { MonthSelectorFieldProps } from '../monthSelectorField/MonthSelectorFiel
|
|
|
6
6
|
export interface Props {
|
|
7
7
|
label: {
|
|
8
8
|
label: string | React.ReactNode;
|
|
9
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
10
|
+
fieldCode?: string;
|
|
9
11
|
style?: React.CSSProperties;
|
|
10
12
|
width?: number;
|
|
11
13
|
};
|
|
@@ -8,6 +8,8 @@ export interface Props {
|
|
|
8
8
|
defaultValues: string[];
|
|
9
9
|
label: {
|
|
10
10
|
label: string;
|
|
11
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
12
|
+
fieldCode?: string;
|
|
11
13
|
width?: number;
|
|
12
14
|
};
|
|
13
15
|
singleSelectPickerField: Omit<SingleSelectPickerFieldProps, "defaultValue">;
|
|
@@ -6,6 +6,8 @@ import { MultiSelectFieldProps } from '../multiSelectField/MultiSelectField';
|
|
|
6
6
|
export interface Props {
|
|
7
7
|
label: {
|
|
8
8
|
label: string;
|
|
9
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
10
|
+
fieldCode?: string;
|
|
9
11
|
style?: React.CSSProperties;
|
|
10
12
|
width?: number;
|
|
11
13
|
};
|
|
@@ -5,6 +5,8 @@ import { MultiSelectWithCheckBoxFieldProps } from '../multiSelectWithCheckBoxFie
|
|
|
5
5
|
export interface Props {
|
|
6
6
|
label: {
|
|
7
7
|
label: string;
|
|
8
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
9
|
+
fieldCode?: string;
|
|
8
10
|
width?: number;
|
|
9
11
|
};
|
|
10
12
|
multiSelectWithCheckBoxField: MultiSelectWithCheckBoxFieldProps;
|
|
@@ -7,6 +7,8 @@ import { NameFieldProps } from '../nameField/NameField';
|
|
|
7
7
|
export interface Props {
|
|
8
8
|
label: {
|
|
9
9
|
label: string;
|
|
10
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
11
|
+
fieldCode?: string;
|
|
10
12
|
width?: number;
|
|
11
13
|
};
|
|
12
14
|
nameField: NameFieldProps;
|
|
@@ -3,6 +3,8 @@ import { DisableMode } from '../common/common';
|
|
|
3
3
|
export interface Props {
|
|
4
4
|
label: {
|
|
5
5
|
label: string;
|
|
6
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
7
|
+
fieldCode?: string;
|
|
6
8
|
width?: number;
|
|
7
9
|
};
|
|
8
10
|
paymentSingleSelectField: PaymentMethodSingleSelectFieldProps;
|
|
@@ -6,6 +6,8 @@ import { RadioFieldProps } from '../radioField/RadioField';
|
|
|
6
6
|
export interface Props {
|
|
7
7
|
label: {
|
|
8
8
|
label: string | React.ReactNode;
|
|
9
|
+
/** Backend field-help code; shows the label's info tooltip when copy exists. */
|
|
10
|
+
fieldCode?: string;
|
|
9
11
|
width?: number;
|
|
10
12
|
};
|
|
11
13
|
radioField: RadioFieldProps;
|