@zeniai/web-components 4.3.40 → 4.3.41
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-BWBsmq2A.cjs → SessionTimeoutPopup-B6IhYc5j.cjs} +17448 -15784
- package/dist/{SessionTimeoutPopup-B-WVI7aL.js → SessionTimeoutPopup-TT3Z0Y7j.js} +102699 -96364
- package/dist/appLocale.d.ts +356 -13
- package/dist/assets/interface/avatars-without-pic.svg +12 -0
- package/dist/cockpit.cjs.js +2 -2
- package/dist/cockpit.esm.js +760 -759
- package/dist/components/address/addressHelper.d.ts +2 -2
- package/dist/components/common/Picker.d.ts +3 -1
- package/dist/components/common/allNavBars/statusSwitcher/switcherTypes.d.ts +1 -0
- package/dist/components/common/tooltipVariants/types.d.ts +11 -9
- package/dist/components/commonSetUp/approval/ApprovalRuleSection.d.ts +11 -2
- package/dist/components/commonSetUp/approval/ApprovalStageRow.d.ts +37 -12
- package/dist/components/commonSetUp/approval/ApprovalStagesSection.d.ts +8 -2
- package/dist/components/commonSetUp/approval/ConditionRow.d.ts +10 -1
- package/dist/components/commonSetUp/approval/FormSection.d.ts +19 -3
- package/dist/components/commonSetUp/approval/RuleOverlapBanner.d.ts +63 -17
- package/dist/components/commonSetUp/approval/RuleOverlapCard.d.ts +10 -1
- package/dist/components/commonSetUp/approval/detectDuplicateRule.d.ts +12 -0
- package/dist/components/commonSetUp/approval/formatFallbackRuleChain.d.ts +12 -0
- package/dist/components/expenseAutomation/ExpenseAutomationPage.d.ts +41 -6
- package/dist/components/expenseAutomation/components/NavBarWithHeader.d.ts +21 -5
- package/dist/components/expenseAutomation/components/navbarHeaderData.d.ts +3 -4
- package/dist/components/expenseAutomation/sections/accountRecon/AccountReconDetailsDrawerPageV2.d.ts +3 -1
- package/dist/components/expenseAutomation/sections/accountRecon/CombinedStatementAccountMappingSection.d.ts +2 -2
- package/dist/components/expenseAutomation/sections/accountRecon/StatementProcessingPage.d.ts +0 -1
- package/dist/components/expenseAutomation/sections/accountRecon/statementProcessingHelpers.d.ts +2 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/JESchedulePage.d.ts +30 -5
- package/dist/components/expenseAutomation/sections/jeSchedules/JESchedulePageSkeleton.d.ts +5 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/JEAccrualBillingPatternCard.d.ts +14 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/JEAccrualCalculationBreakdownCard.d.ts +26 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/JEAccrualDetailsSection.d.ts +31 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/JEAccrualFeedbackDialog.d.ts +27 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/JEAccrualFeedbackDialog.test.d.ts +1 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/JEAccrualHeader.d.ts +16 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/JEAccrualSequenceSection.d.ts +22 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/JEOneTimeAccrualDetailPage.d.ts +28 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/accrualActions.d.ts +24 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/accrualFieldHelpers.d.ts +18 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/accrualFieldHelpers.test.d.ts +1 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/common/JEBaseTransactionSearch.d.ts +23 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/common/JEBaseTransactionSearch.test.d.ts +1 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/common/JEExistingKpiStrip.d.ts +7 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/common/JEGroupSectionHeader.d.ts +8 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/common/JEJournalEntryPreview.d.ts +28 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/common/JEKpiStrip.d.ts +8 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/{JEScheduleAccountSettings.d.ts → common/JEScheduleAccountSettings.d.ts} +2 -2
- package/dist/components/expenseAutomation/sections/jeSchedules/common/JEScheduleCreatedBy.d.ts +21 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/common/JEScheduleCreatedBy.test.d.ts +1 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/common/JEScheduleLifecycle.d.ts +19 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/common/JEScheduleLifecycle.test.d.ts +1 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/common/JEScheduleNewEntryButton.d.ts +14 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/common/JEScheduleNewEntryButton.test.d.ts +1 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/common/JESchedulePreview.d.ts +18 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/common/JEScheduleRadioCardGroup.d.ts +27 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/{JEScheduleResolveComponent.d.ts → common/JEScheduleResolveComponent.d.ts} +3 -3
- package/dist/components/expenseAutomation/sections/jeSchedules/{JEScheduleResolveListRow.d.ts → common/JEScheduleResolveListRow.d.ts} +4 -11
- package/dist/components/expenseAutomation/sections/jeSchedules/common/JETypeFilterBar.d.ts +8 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/common/jeScheduleKpiHelpers.d.ts +14 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/common/newScheduleCopy.test.d.ts +1 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/list/JEOneTimeAccrualCell.d.ts +12 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/list/JEScheduleDownloadRangeDialog.d.ts +18 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/list/JEScheduleDownloadRangeDialog.test.d.ts +1 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/list/JEScheduleDraftListRow.d.ts +16 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/list/JEScheduleGroupList.d.ts +53 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/list/JEScheduleListWrapperRow.d.ts +39 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/list/JEScheduleListWrapperRow.test.d.ts +1 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/list/JEScheduleReadOnlyListRow.d.ts +15 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/list/JEScheduleReadOnlyListRow.test.d.ts +1 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/{jeSchedule.helpers.d.ts → list/jeSchedule.helpers.d.ts} +1 -1
- package/dist/components/expenseAutomation/sections/jeSchedules/list/jeScheduleConfig.d.ts +46 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/list/jeScheduleListItems.d.ts +56 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/list/jeScheduleListRow.helpers.d.ts +29 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/list/jeScheduleListRow.helpers.test.d.ts +1 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/sections/JEExistingSection.d.ts +22 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/sections/JESchedulesSection.d.ts +27 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/sections/JESummarySection.d.ts +7 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/sections/NewJEScheduleSection.d.ts +59 -0
- package/dist/components/expenseAutomation/sections/jeSchedules/sections/NewScheduleDocumentAutofillPanel.d.ts +11 -0
- package/dist/components/formElements/formattedTextField/FormattedTextField.d.ts +3 -1
- package/dist/components/formElements/multiSelectField/MultiSelectField.d.ts +13 -1
- package/dist/components/formElements/textField/TextField.d.ts +3 -1
- package/dist/components/jeSchedules/downloadJESchedules/types/downloadJESchedulesOptionsPayload.d.ts +3 -1
- package/dist/components/jeSchedules/scheduleDetails/table/ScheduleAccruedSequenceTable.d.ts +2 -1
- package/dist/components/jeSchedules/scheduleDetails/table/items/ScheduleAccruedSequenceTableRow.d.ts +6 -1
- package/dist/components/singleSelect/SingleSelect.d.ts +12 -1
- package/dist/components/singleSelect/SingleSelectField.d.ts +13 -1
- package/dist/components/spendManagement/billPay/billPaySetUp/BillPayApprovalRuleDetailPage.d.ts +1 -0
- package/dist/components/spendManagement/billPay/billPaySetUp/components/formElements/UserMultiSelect.d.ts +17 -2
- package/dist/components/spendManagement/billPay/billPaySetUp/components/formElements/UserMultiSelectField.d.ts +6 -2
- package/dist/components/spendManagement/reimbursement/AllReimbursementLineItems.d.ts +1 -1
- package/dist/components/spendManagement/reimbursement/reimbursementSetUp/ReimbursementApprovalRuleDetailPage.d.ts +1 -0
- package/dist/context/featureProvider/FeatureGateNameConstants.d.ts +8 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.esm.js +267 -266
- package/dist/strings/strings.d.ts +356 -13
- package/package.json +5 -5
- package/dist/components/expenseAutomation/sections/jeSchedules/JEScheduleDraftListRow.d.ts +0 -19
- package/dist/components/expenseAutomation/sections/jeSchedules/JEScheduleListWrapperRow.d.ts +0 -31
- package/dist/components/expenseAutomation/sections/jeSchedules/JEScheduleReadOnlyListRow.d.ts +0 -13
- package/dist/components/expenseAutomation/sections/jeSchedules/JEScheduleRecommendationIcon.d.ts +0 -13
- package/dist/components/expenseAutomation/sections/jeSchedules/JESchedulesList.d.ts +0 -24
- package/dist/components/expenseAutomation/sections/jeSchedules/jeScheduleConfig.d.ts +0 -28
- package/dist/components/expenseAutomation/sections/jeSchedules/jeScheduleListRow.helpers.d.ts +0 -17
- /package/dist/components/expenseAutomation/sections/jeSchedules/{jeScheduleListRow.helpers.test.d.ts → accrualDetail/JEAccrualDetailsSection.test.d.ts} +0 -0
- /package/dist/components/expenseAutomation/sections/jeSchedules/{JEScheduleDraftComponent.d.ts → common/JEScheduleDraftComponent.d.ts} +0 -0
- /package/dist/components/expenseAutomation/sections/jeSchedules/{JESchedulesListEmptyTable.d.ts → common/JESchedulesListEmptyTable.d.ts} +0 -0
- /package/dist/components/expenseAutomation/sections/jeSchedules/{common.d.ts → common/common.d.ts} +0 -0
|
@@ -61,10 +61,10 @@ export declare const getMultiCountryOptions: (countries?: string[], supportedCou
|
|
|
61
61
|
* Same as getMultiCountryOptions but uses Alpha-2 codes
|
|
62
62
|
*/
|
|
63
63
|
export declare const getMultiCountryOptionsAlpha2: (countries?: string[], supportedCountries?: CountryCode[]) => {
|
|
64
|
-
selectedOptions: ("AI" | "BD" | "US" | "NA" | "CA" | "AD" | "AE" | "AF" | "AG" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "
|
|
64
|
+
selectedOptions: ("AI" | "BD" | "US" | "NA" | "CR" | "CA" | "AD" | "AE" | "AF" | "AG" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW")[];
|
|
65
65
|
allOptions: {
|
|
66
66
|
label: string;
|
|
67
|
-
value: "AI" | "BD" | "US" | "NA" | "CA" | "AD" | "AE" | "AF" | "AG" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "
|
|
67
|
+
value: "AI" | "BD" | "US" | "NA" | "CR" | "CA" | "AD" | "AE" | "AF" | "AG" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
|
|
68
68
|
}[];
|
|
69
69
|
};
|
|
70
70
|
export declare const defaultAddressFormatter: (addressValue: AddressValue) => string;
|
|
@@ -28,6 +28,8 @@ export interface Props<T extends string = string> {
|
|
|
28
28
|
selectedOptionColor?: string;
|
|
29
29
|
selectedValue?: T;
|
|
30
30
|
showOnlyDownChevronNotSelectedValue?: boolean;
|
|
31
|
+
/** When true, the selected value + chevron span the full control width with the chevron pushed to the trailing edge, instead of sitting flush against the label. Independent of `outlined` — doesn't touch menu/option styling. Opt-in; existing callers are unaffected. */
|
|
32
|
+
stretchValueToEdge?: boolean;
|
|
31
33
|
title?: string;
|
|
32
34
|
titleColor?: string;
|
|
33
35
|
titleTextAlignment?: "flex-start" | "flex-end" | "center";
|
|
@@ -49,5 +51,5 @@ interface OptionType extends OptionTypeBase {
|
|
|
49
51
|
label: string;
|
|
50
52
|
value: string;
|
|
51
53
|
}
|
|
52
|
-
export default function Picker<T extends string = string>({ pickerValues, placeholder, selectedValue, backgroundColor, optionBackgroundColor, selectedOptionBackgroundColor, selectedOptionColor, optionTextStyle, title, titleTextStyle, placeholderTextStyle, titleTextAlignment, titleColor, placeholderColor, inheritRowSurfaceBackground, valueOpacity, outlined, outlinedHeight, isDisabled, isSearchable, isOptionDisabled, menuPosition, menuPlacement, menuMaxWidth, name, zIndex, menuIsOpen, downChevronVisible, showOnlyDownChevronNotSelectedValue, filterOption, onMenuOpen, controlStyle, controlHoverStyle, valueToLabel, onPickerSelectionChanged, }: Readonly<Props<T>>): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export default function Picker<T extends string = string>({ pickerValues, placeholder, selectedValue, backgroundColor, optionBackgroundColor, selectedOptionBackgroundColor, selectedOptionColor, optionTextStyle, title, titleTextStyle, placeholderTextStyle, titleTextAlignment, titleColor, placeholderColor, inheritRowSurfaceBackground, valueOpacity, outlined, outlinedHeight, isDisabled, isSearchable, isOptionDisabled, menuPosition, menuPlacement, menuMaxWidth, name, zIndex, menuIsOpen, downChevronVisible, showOnlyDownChevronNotSelectedValue, stretchValueToEdge, filterOption, onMenuOpen, controlStyle, controlHoverStyle, valueToLabel, onPickerSelectionChanged, }: Readonly<Props<T>>): import("react/jsx-runtime").JSX.Element;
|
|
53
55
|
export { Picker };
|
|
@@ -52,21 +52,21 @@ export interface CategorizedListData {
|
|
|
52
52
|
sections: CategorizedListSection[];
|
|
53
53
|
}
|
|
54
54
|
export interface ChainOfThoughtData {
|
|
55
|
-
existingOption: {
|
|
56
|
-
label?: string;
|
|
57
|
-
value?: string;
|
|
58
|
-
};
|
|
59
55
|
isCOTEnabled: boolean;
|
|
60
56
|
isThoughtProcessOnly: boolean;
|
|
61
|
-
pageSource: TransactionPage;
|
|
62
57
|
recommendations: RecommendationWithChainOfThought[];
|
|
63
|
-
|
|
58
|
+
existingOption?: {
|
|
59
|
+
label?: string;
|
|
60
|
+
value?: string;
|
|
61
|
+
};
|
|
64
62
|
isAlternateLoading?: boolean;
|
|
65
63
|
isPrimaryLoading?: boolean;
|
|
64
|
+
pageSource?: TransactionPage;
|
|
65
|
+
transactionStatus?: TransactionStatus | null;
|
|
66
66
|
width?: number;
|
|
67
|
-
onAlternateRecommendationConfirmationClick
|
|
68
|
-
onAlternateRecommendationExpandClick
|
|
69
|
-
onPrimaryRecommendationConfirmationClick
|
|
67
|
+
onAlternateRecommendationConfirmationClick?: (recommendationID: ID) => void;
|
|
68
|
+
onAlternateRecommendationExpandClick?: (isExpanded: boolean) => void;
|
|
69
|
+
onPrimaryRecommendationConfirmationClick?: (recommendationID: ID) => void;
|
|
70
70
|
}
|
|
71
71
|
export interface RecommendationWithChainOfThought {
|
|
72
72
|
cot: string[];
|
|
@@ -77,6 +77,8 @@ export interface RecommendationWithChainOfThought {
|
|
|
77
77
|
confidencePercentage?: number;
|
|
78
78
|
isDisabled?: boolean;
|
|
79
79
|
source?: string;
|
|
80
|
+
/** Heading above the recommendation. Falls back to a label derived from `type`. */
|
|
81
|
+
title?: string;
|
|
80
82
|
type?: TransactionLineRecommendationFieldTypes;
|
|
81
83
|
}
|
|
82
84
|
export interface RootProps {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BillPayApprovalRuleWithUser, RemiApprovalRuleWithUser } from '@zeniai/client-epic-state';
|
|
1
|
+
import { BillPayApprovalRuleWithUser, ID, RemiApprovalRuleWithUser } from '@zeniai/client-epic-state';
|
|
2
2
|
/**
|
|
3
3
|
* The setup-approver view selectors alias the same underlying
|
|
4
4
|
* `ApprovalRuleWithUser` shape across bills and reimbursements.
|
|
@@ -29,6 +29,15 @@ export interface Props {
|
|
|
29
29
|
*/
|
|
30
30
|
departmentNamesById?: Record<string, string>;
|
|
31
31
|
disableButtons?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* User ids of approvers that no longer appear in the tenant's active
|
|
34
|
+
* approvers list (per the `/approvers` endpoint). When a step actor's
|
|
35
|
+
* id is in this set, the card highlights their name in red and shows
|
|
36
|
+
* a banner prompting the user to change the approver. Undefined while
|
|
37
|
+
* the active-approvers list hasn't loaded yet — no highlighting is
|
|
38
|
+
* shown in that case (avoids a false "inactive" flash on load).
|
|
39
|
+
*/
|
|
40
|
+
inactiveApproverIds?: Set<ID>;
|
|
32
41
|
/**
|
|
33
42
|
* Number rendered before the rule name (e.g. "1. Marketing vendor block").
|
|
34
43
|
* Defaults to `approvalRule.priority`.
|
|
@@ -66,5 +75,5 @@ export interface Props {
|
|
|
66
75
|
* │ ② Require approval from Matteo Ramsey │
|
|
67
76
|
* └─────────────────────────────────────────────────────────┘
|
|
68
77
|
*/
|
|
69
|
-
declare const ApprovalRuleSection: ({ approvalRule, isLastSection, disableButtons, onDeleteRuleClick, onEditRuleClick, vendorNamesById, departmentNamesById, positionNumber, onReorderRules, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
declare const ApprovalRuleSection: ({ approvalRule, isLastSection, disableButtons, inactiveApproverIds, onDeleteRuleClick, onEditRuleClick, vendorNamesById, departmentNamesById, positionNumber, onReorderRules, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
70
79
|
export default ApprovalRuleSection;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { ApprovalActionType, AttributeType, User } from '@zeniai/client-epic-state';
|
|
1
|
+
import { ApprovalActionType, AttributeType, ID, User } from '@zeniai/client-epic-state';
|
|
2
|
+
import { NonUserOption } from '../../spendManagement/billPay/billPaySetUp/components/formElements/UserMultiSelect';
|
|
3
|
+
import { UserMultiSelectFieldValue } from '../../spendManagement/billPay/billPaySetUp/components/formElements/UserMultiSelectField';
|
|
2
4
|
/**
|
|
3
5
|
* Approval Rules 3.0 — Set Approval Stages row.
|
|
4
6
|
*
|
|
@@ -9,15 +11,21 @@ import { ApprovalActionType, AttributeType, User } from '@zeniai/client-epic-sta
|
|
|
9
11
|
* Actor kind drives the value picker:
|
|
10
12
|
* - "specific_person" → user multi-select (renders avatars + "or"
|
|
11
13
|
* between names, via the existing `UserMultiSelectField`).
|
|
12
|
-
* - "role" →
|
|
14
|
+
* - "role" → role multi-select of `Manager / Manager of Manager /
|
|
13
15
|
* Vendor Owner`, backed by `AttributeType` in `client-epic-state`.
|
|
16
|
+
* Reuses `UserMultiSelectField` the same way "specific_person"
|
|
17
|
+
* does — via `NonUserOption` entries — so multiple roles join
|
|
18
|
+
* with "or" / "and" exactly like multiple people.
|
|
14
19
|
*
|
|
15
20
|
* Form-state model — each row binds to a slot under `steps[N]`:
|
|
16
21
|
* - `steps[N].action` → 'require_approval' | 'send_notification'
|
|
17
22
|
* - `steps[N].actorKind` → 'specific_person' | 'role'
|
|
18
23
|
* - `steps[N].persons` → `{allUsers, allNonUsers, selectedUsers, selectedNonUsers}`
|
|
19
24
|
* (the UserMultiSelectField-native shape)
|
|
20
|
-
* - `steps[N].selectedRole` →
|
|
25
|
+
* - `steps[N].selectedRole` → same `UserMultiSelectField`-native
|
|
26
|
+
* shape, populated via `allNonUsers` /
|
|
27
|
+
* `selectedNonUsers` (`allUsers` /
|
|
28
|
+
* `selectedUsers` stay empty)
|
|
21
29
|
*
|
|
22
30
|
* Both `persons` and `selectedRole` live on the slot at all times so
|
|
23
31
|
* the user can toggle actor kind without losing the data they entered
|
|
@@ -84,24 +92,33 @@ export interface ApprovalStageData {
|
|
|
84
92
|
selectedUsers: any[];
|
|
85
93
|
};
|
|
86
94
|
/**
|
|
87
|
-
* Bound when `actorKind.selectedOption === "role"`.
|
|
88
|
-
* (same
|
|
95
|
+
* Bound when `actorKind.selectedOption === "role"`. Shape matches
|
|
96
|
+
* `UserMultiSelectField`'s native value (same reuse as `persons`) so
|
|
97
|
+
* multiple roles can be picked and joined with "or"/"and", exactly
|
|
98
|
+
* like Specific Person. `allUsers` / `selectedUsers` stay empty —
|
|
99
|
+
* roles only ever populate the non-user slots. Readers do
|
|
100
|
+
* `selectedRole.selectedNonUsers`.
|
|
89
101
|
*/
|
|
90
|
-
selectedRole?:
|
|
91
|
-
allOptions: AttributeType[];
|
|
92
|
-
selectedOption?: AttributeType;
|
|
93
|
-
};
|
|
102
|
+
selectedRole?: UserMultiSelectFieldValue;
|
|
94
103
|
}
|
|
95
104
|
/**
|
|
96
105
|
* Builds role dropdown options from API `allAttributes`.
|
|
97
|
-
* Appends
|
|
106
|
+
* Appends any saved roles that are no longer in the allowed list so
|
|
98
107
|
* existing rules still render their current selection.
|
|
99
108
|
*
|
|
100
109
|
* IMPORTANT: `allAttributes` must already be the API-filtered list
|
|
101
110
|
* for the caller's context. For V3 remi rules the API is expected to
|
|
102
111
|
* exclude `vendor_owner`; this function does not filter it itself.
|
|
103
112
|
*/
|
|
104
|
-
export declare function buildStageRoleOptions(allAttributes: AttributeType[] | undefined | null,
|
|
113
|
+
export declare function buildStageRoleOptions(allAttributes: AttributeType[] | undefined | null, selectedRoles?: AttributeType[]): AttributeType[];
|
|
114
|
+
/**
|
|
115
|
+
* Builds a role's `NonUserOption` entry for `UserMultiSelectField`'s
|
|
116
|
+
* option list / selected values. `position: "top"` and no subtitles —
|
|
117
|
+
* roles render as flat labeled entries, same as the pre-existing
|
|
118
|
+
* manager / manager-of-manager / vendor-owner rows `UserMultiSelect`
|
|
119
|
+
* already renders for this exact set of values.
|
|
120
|
+
*/
|
|
121
|
+
export declare function buildRoleOption(role: AttributeType): NonUserOption;
|
|
105
122
|
export interface ApprovalStageRowProps {
|
|
106
123
|
/** Pool of users surfaced by the "Specific Person" multi-select. */
|
|
107
124
|
allUsers: User[];
|
|
@@ -116,6 +133,14 @@ export interface ApprovalStageRowProps {
|
|
|
116
133
|
fieldNameBase: string;
|
|
117
134
|
/** Zero-based index of this row within the parent's stage list. */
|
|
118
135
|
index: number;
|
|
136
|
+
/**
|
|
137
|
+
* User ids of approvers that no longer appear in the tenant's active
|
|
138
|
+
* approvers list. When this row's selected "Specific Person" actor
|
|
139
|
+
* is in this set, the picker highlights red and an inline warning
|
|
140
|
+
* renders below the row. Undefined while the active-approvers list
|
|
141
|
+
* hasn't loaded yet.
|
|
142
|
+
*/
|
|
143
|
+
inactiveUserIds?: Set<ID>;
|
|
119
144
|
/**
|
|
120
145
|
* Roles the user can pick when actorKind === "role". Reimbursement
|
|
121
146
|
* passes API `allAttributes`; Bill Pay omits this and keeps the
|
|
@@ -133,5 +158,5 @@ export interface ApprovalStageRowProps {
|
|
|
133
158
|
*/
|
|
134
159
|
onReorder?: (dragIndex: number, hoverIndex: number) => void;
|
|
135
160
|
}
|
|
136
|
-
export declare function ApprovalStageRow({ index, fieldNameBase, allUsers, onRemove, canRemove, onReorder, stageRoleOptions, }: ApprovalStageRowProps): import("react/jsx-runtime").JSX.Element;
|
|
161
|
+
export declare function ApprovalStageRow({ index, fieldNameBase, allUsers, inactiveUserIds, onRemove, canRemove, onReorder, stageRoleOptions, }: ApprovalStageRowProps): import("react/jsx-runtime").JSX.Element;
|
|
137
162
|
export default ApprovalStageRow;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AttributeType, User } from '@zeniai/client-epic-state';
|
|
1
|
+
import { AttributeType, ID, User } from '@zeniai/client-epic-state';
|
|
2
2
|
/**
|
|
3
3
|
* Approval Rules 3.0 — Set Approval Stages form section.
|
|
4
4
|
*
|
|
@@ -50,6 +50,12 @@ export interface ApprovalStagesSectionProps {
|
|
|
50
50
|
* row's full path is `${stagesFieldName}.${index}`.
|
|
51
51
|
*/
|
|
52
52
|
stagesFieldName: string;
|
|
53
|
+
/**
|
|
54
|
+
* User ids of approvers no longer in the tenant's active approvers
|
|
55
|
+
* list — forwarded to each `ApprovalStageRow` so it can highlight a
|
|
56
|
+
* selected inactive approver. See `ApprovalStageRowProps.inactiveUserIds`.
|
|
57
|
+
*/
|
|
58
|
+
inactiveUserIds?: Set<ID>;
|
|
53
59
|
/** Role options for stage rows — reimbursement passes API `allAttributes`. */
|
|
54
60
|
stageRoleOptions?: AttributeType[];
|
|
55
61
|
onAddStage: () => void;
|
|
@@ -64,5 +70,5 @@ export interface ApprovalStagesSectionProps {
|
|
|
64
70
|
*/
|
|
65
71
|
onReorderStages?: (dragIndex: number, hoverIndex: number) => void;
|
|
66
72
|
}
|
|
67
|
-
export declare function ApprovalStagesSection({ allUsers, stageFields, stagesFieldName, separationOfDutiesFieldName, onAddStage, onClearAllStages, onRemoveStage, onReorderStages, stageRoleOptions, }: ApprovalStagesSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
export declare function ApprovalStagesSection({ allUsers, stageFields, stagesFieldName, separationOfDutiesFieldName, inactiveUserIds, onAddStage, onClearAllStages, onRemoveStage, onReorderStages, stageRoleOptions, }: ApprovalStagesSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
68
74
|
export default ApprovalStagesSection;
|
|
@@ -56,6 +56,15 @@ export interface ConditionRowProps {
|
|
|
56
56
|
/** When `false`, the trash icon is dimmed and inert. */
|
|
57
57
|
canRemove: boolean;
|
|
58
58
|
index: number;
|
|
59
|
+
/**
|
|
60
|
+
* True while `RuleOverlapBanner` is showing a detected overlap for
|
|
61
|
+
* the rule being edited. Every currently-set condition contributed
|
|
62
|
+
* to that overlap (see `detectRuleOverlap`), so every row's value
|
|
63
|
+
* field (not the type/operator slots) is highlighted with the same
|
|
64
|
+
* error-pink background used for validation errors — pointing the
|
|
65
|
+
* user at what to change to resolve the conflict.
|
|
66
|
+
*/
|
|
67
|
+
isOverlapHighlighted: boolean;
|
|
59
68
|
rowType: ConditionType;
|
|
60
69
|
/**
|
|
61
70
|
* Types currently used by *other* rows (i.e. excludes this row's own
|
|
@@ -74,5 +83,5 @@ export interface ConditionRowProps {
|
|
|
74
83
|
onRemove: () => void;
|
|
75
84
|
onTypeChange: (next: ConditionType) => void;
|
|
76
85
|
}
|
|
77
|
-
export declare function ConditionRow({ rowType, index, availableTypes, usedTypes, onTypeChange, onRemove, canRemove, currencySymbol, allVendorIds, vendorNamesById, allDepartmentIds, departmentNamesById, }: ConditionRowProps): import("react/jsx-runtime").JSX.Element;
|
|
86
|
+
export declare function ConditionRow({ rowType, index, availableTypes, usedTypes, isOverlapHighlighted, onTypeChange, onRemove, canRemove, currencySymbol, allVendorIds, vendorNamesById, allDepartmentIds, departmentNamesById, }: ConditionRowProps): import("react/jsx-runtime").JSX.Element;
|
|
78
87
|
export default ConditionRow;
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { ResponsiveSized } from '../../../context/windowSizeProvider';
|
|
2
|
+
/**
|
|
3
|
+
* Whether the nearest ancestor `FormSection` (rendered with
|
|
4
|
+
* `highlightOnHover`) is currently hovered. Lets deeply-nested field
|
|
5
|
+
* primitives (TextField, MultiSelectField, SingleSelect, Picker) swap
|
|
6
|
+
* their background the moment the cursor is anywhere inside the card
|
|
7
|
+
* — not just when the cursor is directly over that specific field —
|
|
8
|
+
* without those generic components needing to know about
|
|
9
|
+
* `FormSection` itself. Exported (not just the hook) so a section that
|
|
10
|
+
* needs a hover scope narrower than its whole card — e.g. Set Approval
|
|
11
|
+
* Stages excluding the Separation of Duties row — can nest its own
|
|
12
|
+
* `<FormHoverContext.Provider>` around just that subtree.
|
|
13
|
+
*/
|
|
14
|
+
export declare const FormHoverContext: import('react').Context<boolean>;
|
|
15
|
+
export declare function useFormHover(): boolean;
|
|
2
16
|
/**
|
|
3
17
|
* A labelled section wrapper for the approval-rule create/edit form.
|
|
4
18
|
*
|
|
@@ -19,8 +33,10 @@ export declare const D: {
|
|
|
19
33
|
};
|
|
20
34
|
export interface FormSectionProps {
|
|
21
35
|
children: React.ReactNode;
|
|
22
|
-
heading
|
|
23
|
-
|
|
36
|
+
heading?: string;
|
|
37
|
+
/** When true, the card's background switches to `theme.colors.background` on hover. Opt-in; other FormSection usages are unaffected. */
|
|
38
|
+
highlightOnHover?: boolean;
|
|
39
|
+
subheading?: string;
|
|
24
40
|
}
|
|
25
|
-
export declare function FormSection({ heading, subheading, children }: FormSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare function FormSection({ heading, subheading, highlightOnHover, children, }: FormSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
26
42
|
export default FormSection;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RuleOverlap } from '@zeniai/client-epic-state';
|
|
1
|
+
import { ID, RuleOverlap } from '@zeniai/client-epic-state';
|
|
2
2
|
import { ApprovalRuleWithUser } from './RuleOverlapCard';
|
|
3
3
|
/**
|
|
4
4
|
* Approval Rules 3.0 — frontend overlap warning surface.
|
|
@@ -8,13 +8,19 @@ import { ApprovalRuleWithUser } from './RuleOverlapCard';
|
|
|
8
8
|
* (same 'FormSection.D.width' tuple) so the banner stacks cleanly
|
|
9
9
|
* above the first SectionCard.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* Two variants share this one component (see 'overlapKind'):
|
|
12
|
+
*
|
|
13
|
+
* 'partial' — the candidate's conditions merely intersect an
|
|
14
|
+
* existing rule (e.g. overlapping amount ranges). Non-blocking: the
|
|
15
|
+
* user can collapse the details, ignore the warning and save anyway,
|
|
16
|
+
* or jump to the conflicting rule.
|
|
17
|
+
*
|
|
12
18
|
* ┌─[gold border]──────────────────────────────────────┐
|
|
13
19
|
* │ [warm warning fill — header only] │
|
|
14
20
|
* │ ⚠ Partial rule overlap detected │
|
|
15
|
-
* │ Conditions partially overlap
|
|
21
|
+
* │ Conditions partially overlap… Hide Details ⌄ │
|
|
16
22
|
* ├────────────────────────────────────────────────────┤
|
|
17
|
-
* │ [grey-5 surface — body]
|
|
23
|
+
* │ [grey-5 surface — body, collapsible via the toggle] │
|
|
18
24
|
* │ ┌─ inner rule card ───────────────────────────┐ │
|
|
19
25
|
* │ │ Rule name [SoD][Set at Priority] │ │
|
|
20
26
|
* │ │ Description │ │
|
|
@@ -24,38 +30,78 @@ import { ApprovalRuleWithUser } from './RuleOverlapCard';
|
|
|
24
30
|
* │ [Ignore & Proceed] [Edit] │
|
|
25
31
|
* └────────────────────────────────────────────────────┘
|
|
26
32
|
*
|
|
33
|
+
* 'duplicate' — the candidate's conditions are an EXACT match
|
|
34
|
+
* (identical amount range too, not just an intersecting one) against
|
|
35
|
+
* an existing rule. Blocking: no toggle (always expanded, per
|
|
36
|
+
* design), no Ignore/Edit escape — the parent additionally disables
|
|
37
|
+
* its own Save button while this is showing. Same red palette as a
|
|
38
|
+
* validation error (Colors.important / Colors.importantLight).
|
|
39
|
+
*
|
|
40
|
+
* ┌─[red border]────────────────────────────────────────┐
|
|
41
|
+
* │ [red-tinted fill — header only] │
|
|
42
|
+
* │ ⚠ Duplicate rule detected │
|
|
43
|
+
* │ All conditions overlap… Check the details below│
|
|
44
|
+
* ├────────────────────────────────────────────────────┤
|
|
45
|
+
* │ [grey-5 surface — body, always expanded] │
|
|
46
|
+
* │ ┌─ inner rule card ───────────────────────────┐ │
|
|
47
|
+
* │ │ (same RuleOverlapCard as the partial variant)│ │
|
|
48
|
+
* │ └─────────────────────────────────────────────┘ │
|
|
49
|
+
* │ Duplicate rule can not be created│
|
|
50
|
+
* └────────────────────────────────────────────────────┘
|
|
51
|
+
*
|
|
27
52
|
* Colors are explicit static tokens per the design (not theme-
|
|
28
|
-
* adaptive) — the warning surface stays
|
|
29
|
-
* the body stays light, the rule card stays white. See
|
|
30
|
-
* components below for the token-by-token mapping.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
53
|
+
* adaptive) — the warning surface stays the same accent color in
|
|
54
|
+
* both themes, the body stays light, the rule card stays white. See
|
|
55
|
+
* the styled components below for the token-by-token mapping.
|
|
56
|
+
*
|
|
57
|
+
* The 'Hide Details' / 'Show Details' toggle (partial only) collapses
|
|
58
|
+
* the entire body (rule cards + action buttons) — collapsing doesn't
|
|
59
|
+
* lose any pending action, it just gives the user a compact view of
|
|
60
|
+
* the warning while they finish the rest of the form.
|
|
61
|
+
*
|
|
62
|
+
* Action buttons (partial only) sit at the bottom-right of the body.
|
|
63
|
+
* 'Ignore & Proceed' fires the parent's save flow as-is. 'Edit
|
|
64
|
+
* Existing Rule' navigates same-tab to the conflicting rule's detail
|
|
65
|
+
* page; when multiple overlaps are present we suppress this button
|
|
66
|
+
* because it has no unambiguous target — the user can pick a card via
|
|
67
|
+
* its own header context (TODO: multi-overlap design pass).
|
|
38
68
|
*/
|
|
39
69
|
export interface RuleOverlapBannerProps {
|
|
70
|
+
/**
|
|
71
|
+
* 'partial' — non-blocking overlap, user can ignore and proceed.
|
|
72
|
+
* 'duplicate' — exact match against an existing rule; blocking, no
|
|
73
|
+
* toggle, no action buttons. The parent is responsible for also
|
|
74
|
+
* disabling its own Save button when this is 'duplicate'.
|
|
75
|
+
*/
|
|
76
|
+
overlapKind: "duplicate" | "partial";
|
|
40
77
|
overlaps: RuleOverlap<ApprovalRuleWithUser>[];
|
|
41
78
|
departmentNamesById?: Record<string, string>;
|
|
42
79
|
/**
|
|
43
80
|
* Disables both action buttons while the page is in an in-flight
|
|
44
81
|
* save (so the user can't double-fire or navigate away mid-write).
|
|
82
|
+
* No-op for the 'duplicate' variant, which has no action buttons.
|
|
45
83
|
*/
|
|
46
84
|
disableButtons?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Maps a conflicting rule's id to its list-page display position
|
|
87
|
+
* (1-indexed, fallback excluded) — see `RuleOverlapCard.positionNumber`.
|
|
88
|
+
* When omitted, each card falls back to the rule's raw `priority`.
|
|
89
|
+
*/
|
|
90
|
+
positionNumberByRuleId?: Record<ID, number>;
|
|
47
91
|
vendorNamesById?: Record<string, string>;
|
|
48
92
|
/**
|
|
49
93
|
* Called when the user clicks Edit Existing Rule. The parent's
|
|
50
94
|
* connector navigates same-tab to that rule's edit page. Only
|
|
51
|
-
* invoked when 'overlaps.length === 1'
|
|
95
|
+
* invoked when 'overlaps.length === 1' and 'overlapKind' is
|
|
96
|
+
* 'partial'.
|
|
52
97
|
*/
|
|
53
98
|
onEditExistingRule: (ruleId: string) => void;
|
|
54
99
|
/**
|
|
55
100
|
* Called when the user accepts the overlap and wants the save to
|
|
56
|
-
* proceed. The parent dispatches the underlying save here.
|
|
101
|
+
* proceed. The parent dispatches the underlying save here. Never
|
|
102
|
+
* invoked when 'overlapKind' is 'duplicate' (no button to fire it).
|
|
57
103
|
*/
|
|
58
104
|
onIgnoreAndProceed: () => void;
|
|
59
105
|
}
|
|
60
|
-
declare const RuleOverlapBanner: ({ overlaps, vendorNamesById, departmentNamesById, onIgnoreAndProceed, onEditExistingRule, disableButtons, }: RuleOverlapBannerProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
106
|
+
declare const RuleOverlapBanner: ({ overlaps, overlapKind, vendorNamesById, departmentNamesById, positionNumberByRuleId, onIgnoreAndProceed, onEditExistingRule, disableButtons, }: RuleOverlapBannerProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
61
107
|
export default RuleOverlapBanner;
|
|
@@ -26,6 +26,15 @@ export interface RuleOverlapCardProps {
|
|
|
26
26
|
rule: ApprovalRuleWithUser;
|
|
27
27
|
vendorNamesById: Record<string, string>;
|
|
28
28
|
dataTestId?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Display position among non-fallback rules (matches the list
|
|
31
|
+
* page's `ApprovalRuleSection.positionNumber` — 1-indexed, fallback
|
|
32
|
+
* excluded from the count). Falls back to `rule.priority` when the
|
|
33
|
+
* caller doesn't have the full ordered rule list on hand; prefer
|
|
34
|
+
* passing this explicitly so the number shown here matches what the
|
|
35
|
+
* list page shows for the same rule.
|
|
36
|
+
*/
|
|
37
|
+
positionNumber?: number;
|
|
29
38
|
}
|
|
30
|
-
declare const RuleOverlapCard: ({ rule, vendorNamesById, departmentNamesById, dataTestId, }: RuleOverlapCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
declare const RuleOverlapCard: ({ rule, vendorNamesById, departmentNamesById, dataTestId, positionNumber, }: RuleOverlapCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
40
|
export default RuleOverlapCard;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Criteria, RuleForOverlapCheck, RuleOverlap } from '@zeniai/client-epic-state';
|
|
2
|
+
/**
|
|
3
|
+
* The subset of `overlaps` that are exact duplicates of the candidate
|
|
4
|
+
* (identical amount criteria too, not just intersecting). An overlap
|
|
5
|
+
* set can be a mix — e.g. one rule with the exact same amount bound
|
|
6
|
+
* and another that merely intersects it — so this is what
|
|
7
|
+
* `RuleOverlapBanner`'s 'duplicate' variant should actually list;
|
|
8
|
+
* showing the non-duplicate members alongside would misrepresent them
|
|
9
|
+
* as exact matches.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getDuplicateOverlaps: <T extends RuleForOverlapCheck>(candidateCriteria: Criteria[], overlaps: RuleOverlap<T>[]) => RuleOverlap<T>[];
|
|
12
|
+
export declare const isDuplicateOverlap: <T extends RuleForOverlapCheck>(candidateCriteria: Criteria[], overlaps: RuleOverlap<T>[]) => boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { appLocale } from '../../../appLocale';
|
|
2
|
+
import { ApprovalRuleWithUser } from './ApprovalRuleSection';
|
|
3
|
+
type ApprovalStrings = ReturnType<typeof appLocale.getLocalizedStrings>["commonSetUp"]["approval"];
|
|
4
|
+
/**
|
|
5
|
+
* Formats an existing fallback rule's steps into an ordered list of
|
|
6
|
+
* per-step actor labels (e.g. `["Vendor Owner", "Manager", "Admin"]`)
|
|
7
|
+
* for the "Set as Default Fallback Rule" row, rendered there with an
|
|
8
|
+
* arrow icon between entries. Mirrors the per-step actor-label logic
|
|
9
|
+
* in `ApprovalRuleSection`'s `StepItem`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getFallbackRuleChainEntities(fallbackRule: ApprovalRuleWithUser | undefined, strings: ApprovalStrings): string[];
|
|
12
|
+
export {};
|
|
@@ -1,33 +1,44 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { AccountBase, AccountFilterOption, AuthParams, BulkUploadResultsTab, BulkUploadSelectorData, BulkUploadSortKey, COTTransactionTrackingByTransactionId, ClassBase, ClassFilterOption, CompletedSubTab, CustomerBase, Entity, ExpenseAutomationJESchedulesViewUIState, ExpenseAutomationMissingReceiptsViewUIState, ExpenseAutomationReconciliationViewTab, ExpenseAutomationStepDetails, ExpenseAutomationTransactionsTab, ExpenseAutomationTransactionsViewUIState, ExpenseAutomationViewSelector, ExpenseAutomationViewType, FetchState, FluxAnalysisActionType, FluxAnalysisSectionType, FluxAnalysisViewUIState, ID, JEScheduleTransactionKey, LoggedInUser, MissingReceiptsTab, MonthYearPeriod, PageToken, PlaidLinkTokenType, RecommendationWithCOT, ReconReconcileSortKey, ReconReviewSortKey, ReconciliationReviewTabLocalData, SaveExpenseAutomationReconciliationActionType, ScheduleTypes, SortOrder, SupportedTransactionPayload, SupportedTransactionWithCOT, TransactionEntityType, TransactionFilters, TransactionGroup, TransactionID, TransactionType, Vendor, VendorBase, ZeniAPIStatus } from '@zeniai/client-epic-state';
|
|
2
|
+
import { AccountBase, AccountFilterOption, AuthParams, BulkUploadResultsTab, BulkUploadSelectorData, BulkUploadSortKey, COTTransactionTrackingByTransactionId, ClassBase, ClassFilterOption, CompletedSubTab, CustomerBase, Entity, ExpenseAutomationJESchedulesViewUIState, ExpenseAutomationMissingReceiptsViewUIState, ExpenseAutomationReconciliationViewTab, ExpenseAutomationStepDetails, ExpenseAutomationTransactionsTab, ExpenseAutomationTransactionsViewUIState, ExpenseAutomationViewSelector, ExpenseAutomationViewType, FetchState, FetchStateAndError, FluxAnalysisActionType, FluxAnalysisSectionType, FluxAnalysisViewUIState, ID, JEScheduleTransactionKey, LoggedInUser, MissingReceiptsTab, MonthYearPeriod, NestedAccountHierarchyForReport, NestedClassHierarchyForReport, NewAccrualAccountsView, NewOneTimeAccrualLocalData, PageToken, PlaidLinkTokenType, RecommendationWithCOT, ReconReconcileSortKey, ReconReviewSortKey, ReconciliationReviewTabLocalData, SaveExpenseAutomationReconciliationActionType, ScheduleDetailsLocalDataAccruedExpenses, ScheduleTransaction, ScheduleTypes, SortOrder, SupportedTransactionPayload, SupportedTransactionWithCOT, TransactionEntityType, TransactionFilters, TransactionGroup, TransactionID, TransactionType, Vendor, VendorBase, ZeniAPIStatus } from '@zeniai/client-epic-state';
|
|
3
3
|
import { AutoCompleteActions, AutoCompleteData } from '../common/autoComplete/autoCompleteProps';
|
|
4
|
+
import { DownloadJEScheduleParams } from '../jeSchedules/downloadJESchedules/types/scheduleTypes';
|
|
4
5
|
import { ReportTreeScrollPosition } from '../reportTree/ReportTree';
|
|
5
6
|
import { ExpenseAutomationThreadClickTarget } from './components/ExpenseAutomationCommentingShell';
|
|
6
7
|
import { MonthEndReportPageProps } from './components/TableSection';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
8
|
+
import { JEAccrualFeedbackReason } from './sections/jeSchedules/accrualDetail/JEAccrualFeedbackDialog';
|
|
9
|
+
import { FormData as JEScheduleAccountSettingsFormData } from './sections/jeSchedules/common/JEScheduleAccountSettings';
|
|
10
|
+
import { JEScheduleNewEntrySelection } from './sections/jeSchedules/common/JEScheduleNewEntryButton';
|
|
11
|
+
import { JEScheduleResolveComponentFormData } from './sections/jeSchedules/common/JEScheduleResolveComponent';
|
|
12
|
+
import { JEScheduleRowKey } from './sections/jeSchedules/list/jeScheduleListRow.helpers';
|
|
13
|
+
import { NewScheduleSaveFormValues } from './sections/jeSchedules/sections/NewJEScheduleSection';
|
|
9
14
|
import { TransferDrawerTransactionData } from './sections/transactionCategorization/transactionCategorizationTypes';
|
|
10
15
|
/**
|
|
11
16
|
* Component & its Props
|
|
12
17
|
*/
|
|
13
18
|
export interface ExpenseAutomationPageProps extends MonthEndReportPageProps {
|
|
19
|
+
accountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
14
20
|
authParams: AuthParams;
|
|
21
|
+
baseTransactionSearchFetchState: FetchStateAndError;
|
|
22
|
+
baseTransactionSearchResults: ScheduleTransaction[];
|
|
23
|
+
classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
|
|
15
24
|
companyId: ID;
|
|
25
|
+
downloadParams: DownloadJEScheduleParams;
|
|
16
26
|
expenseAutomationViewSelector: ExpenseAutomationViewSelector;
|
|
17
27
|
isAccountingClassesEnabled: boolean;
|
|
18
28
|
isCOTEnabled: boolean;
|
|
19
29
|
isDisabled: boolean;
|
|
20
|
-
isJEScheduleCOTEnabled: boolean;
|
|
21
30
|
isProjectsTransactionsEnabled: boolean;
|
|
22
31
|
isRealtimeInsightsFeatureEnabled: boolean;
|
|
23
32
|
isReconV3Enabled: boolean;
|
|
24
33
|
isTransactionActivityEnabled: boolean;
|
|
34
|
+
newScheduleSaveStatus: FetchStateAndError;
|
|
25
35
|
receiptUploadEndpoint: string;
|
|
26
36
|
selectedTransactionGroup: TransactionGroup;
|
|
27
37
|
vendorSearchAutoCompleteActions: AutoCompleteActions;
|
|
28
38
|
vendorSearchAutoCompleteData: AutoCompleteData;
|
|
29
39
|
/** Accounts from getAllAccounts(accountState) for Payment Account Name/Type filter dropdowns */
|
|
30
40
|
accountsForFilters?: AccountFilterOption[];
|
|
41
|
+
allDepreciationAccountListNestedAccountHierarchy?: NestedAccountHierarchyForReport[];
|
|
31
42
|
bulkUploadEndpoint?: string;
|
|
32
43
|
bulkUploadSelector?: BulkUploadSelectorData;
|
|
33
44
|
/** Options for the Category filter dropdown (converted to { label: accountName, value: accountId }) */
|
|
@@ -45,6 +56,10 @@ export interface ExpenseAutomationPageProps extends MonthEndReportPageProps {
|
|
|
45
56
|
classesForFilters?: ClassFilterOption[];
|
|
46
57
|
/** Initial receipts sub-tab (e.g. Storybook: show Unmatched without clicking tabs). */
|
|
47
58
|
initialMissingReceiptsTab?: MissingReceiptsTab;
|
|
59
|
+
/** The base transaction that draft names, resolved by the host. */
|
|
60
|
+
initialSelectedBaseTransaction?: ScheduleTransaction;
|
|
61
|
+
/** Cron-2's live gate for this company, per Statsig. Off hides one-time accrual creation. */
|
|
62
|
+
isAccrualEnabled?: boolean;
|
|
48
63
|
isAiCfoAccessEnabled?: boolean;
|
|
49
64
|
/**
|
|
50
65
|
* Statsig `is_create_transfer_entry_from_expense_enabled`. When false the TC list
|
|
@@ -57,6 +72,15 @@ export interface ExpenseAutomationPageProps extends MonthEndReportPageProps {
|
|
|
57
72
|
/** Transaction categorization only: when true, the right rail is expanded. */
|
|
58
73
|
isRightPanelOpen?: boolean;
|
|
59
74
|
loggedInUser?: LoggedInUser;
|
|
75
|
+
newAccrualAccountsView?: NewAccrualAccountsView;
|
|
76
|
+
/** The draft this form was last left with, for a host that stores it. */
|
|
77
|
+
newScheduleLocalData?: NewScheduleSaveFormValues;
|
|
78
|
+
/**
|
|
79
|
+
* The open New-schedule form, when the host persists it (in the URL, say) so it survives
|
|
80
|
+
* navigating away and back. Supply both or neither: with `onNewScheduleSelectionChange` the page
|
|
81
|
+
* is controlled, without it the page keeps its own state as before.
|
|
82
|
+
*/
|
|
83
|
+
newScheduleSelection?: JEScheduleNewEntrySelection;
|
|
60
84
|
panelContent?: ReactNode;
|
|
61
85
|
receiptsEmail?: string;
|
|
62
86
|
/**
|
|
@@ -69,13 +93,15 @@ export interface ExpenseAutomationPageProps extends MonthEndReportPageProps {
|
|
|
69
93
|
transactionAttachmentsEndpoint?: string;
|
|
70
94
|
clearJeScheduleLocalData: () => void;
|
|
71
95
|
fetchFluxViewOnScroll: (selectedPeriod: MonthYearPeriod, pageToken: PageToken) => void;
|
|
72
|
-
handleJeScheduleClick: (jeScheduleId: ID, jeScheduleKey:
|
|
73
|
-
ignoreRecommendedJeSchedule: (jeScheduleTransactionKey: JEScheduleTransactionKey, scheduleType: ScheduleTypes) => void;
|
|
96
|
+
handleJeScheduleClick: (jeScheduleId: ID, jeScheduleKey: JEScheduleRowKey, jeScheduleType: ScheduleTypes) => void;
|
|
97
|
+
ignoreRecommendedJeSchedule: (jeScheduleTransactionKey: JEScheduleTransactionKey, scheduleType: ScheduleTypes, reason: JEAccrualFeedbackReason, note?: string) => void;
|
|
74
98
|
markAsReview: (opExRowId: ID[], action: FluxAnalysisActionType, selectedPeriod: MonthYearPeriod, isBulkAction?: boolean) => void;
|
|
75
99
|
onAddStatementClick: (accountId: ID) => void;
|
|
76
100
|
onBack: () => void;
|
|
77
101
|
onBackClick: () => void;
|
|
78
102
|
onClose: () => void;
|
|
103
|
+
onCreateAccruedSchedule: (localData: Partial<ScheduleDetailsLocalDataAccruedExpenses>) => void;
|
|
104
|
+
onCreateOneTimeAccrual: (formValues: NewOneTimeAccrualLocalData) => void;
|
|
79
105
|
onEstablishConnectionClick: (accountId: ID, publicToken: ID) => void;
|
|
80
106
|
onExcludeAccountFromReconciliation: (accountId: ID) => void;
|
|
81
107
|
onFetchFluxViewList: () => void;
|
|
@@ -98,6 +124,9 @@ export interface ExpenseAutomationPageProps extends MonthEndReportPageProps {
|
|
|
98
124
|
onJeAccountSettingsChange: (formData: JEScheduleAccountSettingsFormData) => void;
|
|
99
125
|
onJESchedulesFormDataChange: (scheduleJournalEntryID: ID, localData: JEScheduleResolveComponentFormData) => void;
|
|
100
126
|
onMissingReceiptsRowClick: (transactionId: ID, transactionType: TransactionType) => void;
|
|
127
|
+
onNewScheduleSaved: () => void;
|
|
128
|
+
onOneTimeAccrualClick: (accrualId: ID) => void;
|
|
129
|
+
onOneTimeAccrualFeedback: (accrualId: ID, action: "ignore" | "revert", reason: JEAccrualFeedbackReason, note?: string) => void;
|
|
101
130
|
onPostJESchedule: (scheduledJournalEntryID: ID, jeScheduleTransactionKey: JEScheduleTransactionKey) => void;
|
|
102
131
|
onReconListPageScroll: (scrollPosition: ReportTreeScrollPosition) => void;
|
|
103
132
|
onReconMatchedTransactionClick: (transactionId: ID) => void;
|
|
@@ -112,7 +141,10 @@ export interface ExpenseAutomationPageProps extends MonthEndReportPageProps {
|
|
|
112
141
|
onSaveJeAccountSettingsClick: (formData: JEScheduleAccountSettingsFormData) => void;
|
|
113
142
|
onSaveReconciliation: (action: SaveExpenseAutomationReconciliationActionType) => void;
|
|
114
143
|
onSaveReconciliationReview: (transactionId: ID) => void;
|
|
144
|
+
onSaveSchedule: (scheduleType: string, formValues: NewScheduleSaveFormValues) => void;
|
|
115
145
|
onSaveUpdateTransactionCategorization: (selectedTab: ExpenseAutomationTransactionsTab, transactionsIds: ID[], cotTrackingByTransactionId: COTTransactionTrackingByTransactionId) => void;
|
|
146
|
+
onScheduleTypeChange: (scheduleType: string, scheduleDetailsMode: string, shouldResetEnteredData: boolean) => void;
|
|
147
|
+
onSearchBaseTransaction: (query: string) => void;
|
|
116
148
|
onSearchTextChanged: (searchText: string) => void;
|
|
117
149
|
onTransactionCategorizationRowClick: (transactionId: ID, transactionType: TransactionType) => void;
|
|
118
150
|
onTransactionGroupChange: (group: TransactionGroup) => void;
|
|
@@ -131,6 +163,7 @@ export interface ExpenseAutomationPageProps extends MonthEndReportPageProps {
|
|
|
131
163
|
onUploadReceiptFetchStatus: (transactionId: ID, fetchState: FetchState, error?: ZeniAPIStatus, customErrorMessage?: string) => void;
|
|
132
164
|
onUploadTransactionReceipt: (selectedTab: ExpenseAutomationTransactionsTab, transactionId: ID, transactionType: string, files: Blob[], fileNames: string[]) => void;
|
|
133
165
|
onVendorAutoCompleteInputChange: (inputValue: string, entity: TransactionEntityType) => void;
|
|
166
|
+
onViewTransaction: (transactionID: TransactionID) => void;
|
|
134
167
|
redirectToVendorDetailPage: (vendor: Vendor) => void;
|
|
135
168
|
resetTransactionCategorizationLocalData: (selectedTab: ExpenseAutomationTransactionsTab, transactionIds: ID[], selectedPeriod: MonthYearPeriod, keepExistingData: boolean, totalCount: number, lineItemsByTransactionIds: Record<ID, string[]>, pageToken?: PageToken) => void;
|
|
136
169
|
setActivityLogTransactionId: (transactionId: ID | undefined) => void;
|
|
@@ -175,6 +208,8 @@ export interface ExpenseAutomationPageProps extends MonthEndReportPageProps {
|
|
|
175
208
|
onFetchCompletedTransactions?: (pageToken?: string, cacheOverride?: boolean) => void;
|
|
176
209
|
onFetchMoreBatchDetails?: () => void;
|
|
177
210
|
onLoadMoreManualSearch?: () => void;
|
|
211
|
+
onNewScheduleFormChange?: (scheduleType: string, formValues: NewScheduleSaveFormValues) => void;
|
|
212
|
+
onNewScheduleSelectionChange?: (selection: JEScheduleNewEntrySelection | undefined) => void;
|
|
178
213
|
/** Inline transfer rail (TC): opens from list row; host renders `ReviewConfirmTransferPanel`. */
|
|
179
214
|
onOpenTransferRightPanel?: (data: TransferDrawerTransactionData) => void;
|
|
180
215
|
onResetBulkUploadSort?: () => void;
|