@layerfi/components 0.1.121 → 0.1.122
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/cjs/index.cjs +981 -918
- package/dist/esm/index.mjs +983 -920
- package/dist/index.css +178 -113
- package/dist/index.d.ts +6 -4
- package/package.json +1 -1
package/dist/esm/index.mjs
CHANGED
|
@@ -65,15 +65,15 @@ import useSWRInfinite from "swr/infinite";
|
|
|
65
65
|
import { useStoreWithEqualityFn } from "zustand/traditional";
|
|
66
66
|
import { useFloating, offset, flip, shift, autoUpdate, useHover, useFocus, useDismiss, useRole, useInteractions, useTransitionStyles, useMergeRefs, FloatingPortal } from "@floating-ui/react";
|
|
67
67
|
import useSWRMutation from "swr/mutation";
|
|
68
|
-
import { Header as Header$3, Label as Label$1, Text as Text$1, ToggleButton, SelectionIndicator, ToggleButtonGroup, Button as Button$2, ModalOverlay as ModalOverlay$1, Modal as Modal$1, Dialog as Dialog$1, Heading as Heading$2, Group, SearchField as SearchField$1, Input as Input$2, Form as Form$1, TextField as TextField$1, FieldError as FieldError$1, Checkbox as Checkbox$1, DateField as DateField$1, DateInput as DateInput$1, DateSegment as DateSegment$1, DatePicker as DatePicker$2,
|
|
68
|
+
import { Header as Header$3, Label as Label$1, Text as Text$1, ToggleButton, SelectionIndicator, ToggleButtonGroup, Button as Button$2, ModalOverlay as ModalOverlay$1, Modal as Modal$1, Dialog as Dialog$1, Heading as Heading$2, Group, SearchField as SearchField$1, Input as Input$2, Form as Form$1, TextField as TextField$1, FieldError as FieldError$1, Checkbox as Checkbox$1, DateField as DateField$1, DateInput as DateInput$1, DateSegment as DateSegment$1, DatePicker as DatePicker$2, Calendar as Calendar$1, CalendarGrid as CalendarGrid$1, CalendarGridBody as CalendarGridBody$1, CalendarCell as CalendarCell$1, CalendarGridHeader as CalendarGridHeader$1, CalendarHeaderCell as CalendarHeaderCell$1, Popover as Popover$1, NumberField as NumberField$1, RadioGroup as RadioGroup$1, Radio as Radio$1, Switch as Switch$1, TextArea as TextArea$1, MenuTrigger, Menu as Menu$1, MenuItem as MenuItem$2, GridList, GridListItem, DialogTrigger, composeRenderProps, Table as Table$2, Column as Column$1, Cell as Cell$1, TableHeader as TableHeader$1, TableBody as TableBody$2, Row as Row$1, Meter as Meter$1, Link as Link$2, I18nProvider } from "react-aria-components";
|
|
69
69
|
import { mergeRefs } from "react-merge-refs";
|
|
70
70
|
import useResizeObserver from "@react-hook/resize-observer";
|
|
71
|
-
import { LoaderCircle, X as X$1, UploadCloud as UploadCloud$1, Layers2Icon, Search, ChevronLeft as ChevronLeft$1, CopyIcon, FileSpreadsheet, FileDownIcon, Minus, Check as Check$1, Circle, RefreshCcw as RefreshCcw$1, MenuIcon, ChevronRight as ChevronRight$1, PencilRuler, Trash2, SearchX, CheckIcon, AlertCircle as AlertCircle$1,
|
|
71
|
+
import { LoaderCircle, X as X$1, UploadCloud as UploadCloud$1, Layers2Icon, Search, ChevronLeft as ChevronLeft$1, CopyIcon, FileSpreadsheet, FileDownIcon, Minus, Check as Check$1, TriangleAlert, Circle, RefreshCcw as RefreshCcw$1, MenuIcon, ChevronRight as ChevronRight$1, PencilRuler, Trash2, SearchX, CheckIcon, AlertCircle as AlertCircle$1, Hourglass, List, AlertTriangle, Save as Save$1, Plus as Plus$1, HandCoins, Menu as Menu$2, Send, Trash as Trash$1, Info, CheckCircle as CheckCircle$1, XCircle, RotateCcw, ExternalLink, Calendar as Calendar$2, ChevronDown as ChevronDown$1, Download, Users, Milestone, Video, Clock as Clock$1, Link as Link$3, Edit, Car, Archive, UserRoundPen } from "lucide-react";
|
|
72
72
|
import pluralize from "pluralize";
|
|
73
73
|
import ReactSelect, { components } from "react-select";
|
|
74
|
+
import CreatableSelect from "react-select/creatable";
|
|
74
75
|
import { useDropzone } from "react-dropzone";
|
|
75
76
|
import { createFormHookContexts, createFormHook, useForm as useForm$1, useStore as useStore$1, revalidateLogic } from "@tanstack/react-form";
|
|
76
|
-
import BaseCreatableSelect from "react-select/creatable";
|
|
77
77
|
import { useReactTable, getSortedRowModel, getCoreRowModel, flexRender, createColumnHelper, getPaginationRowModel, getExpandedRowModel } from "@tanstack/react-table";
|
|
78
78
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
79
79
|
import { motion, AnimatePresence } from "motion/react";
|
|
@@ -208,7 +208,7 @@ class ErrorHandlerClass {
|
|
|
208
208
|
}
|
|
209
209
|
const errorHandler = new ErrorHandlerClass();
|
|
210
210
|
const reportError = (payload) => errorHandler.onError(payload);
|
|
211
|
-
const version = "0.1.
|
|
211
|
+
const version = "0.1.122";
|
|
212
212
|
const pkg = {
|
|
213
213
|
version
|
|
214
214
|
};
|
|
@@ -2334,6 +2334,12 @@ Schema$1.Struct({
|
|
|
2334
2334
|
Schema$1.fromKey("update_categorization_rules_suggestion")
|
|
2335
2335
|
)
|
|
2336
2336
|
});
|
|
2337
|
+
var BankTransactionsTableContent = /* @__PURE__ */ ((BankTransactionsTableContent2) => {
|
|
2338
|
+
BankTransactionsTableContent2["List"] = "List";
|
|
2339
|
+
BankTransactionsTableContent2["MobileList"] = "MobileList";
|
|
2340
|
+
BankTransactionsTableContent2["Table"] = "Table";
|
|
2341
|
+
return BankTransactionsTableContent2;
|
|
2342
|
+
})(BankTransactionsTableContent || {});
|
|
2337
2343
|
const CategorizedCategories = [
|
|
2338
2344
|
CategorizationStatus.CATEGORIZED,
|
|
2339
2345
|
CategorizationStatus.SPLIT,
|
|
@@ -8139,11 +8145,11 @@ function buildCustomPlaceholder({
|
|
|
8139
8145
|
"children"
|
|
8140
8146
|
]);
|
|
8141
8147
|
if (!placeholder) return null;
|
|
8142
|
-
return /* @__PURE__ */ jsx(components.Placeholder, __spreadProps(__spreadValues({}, restProps), {
|
|
8148
|
+
return /* @__PURE__ */ jsx(components.Placeholder, __spreadProps(__spreadValues({}, restProps), { children: /* @__PURE__ */ jsx(Span, { variant: "inherit", ellipsis: true, children: placeholder }) }));
|
|
8143
8149
|
};
|
|
8144
8150
|
}
|
|
8145
8151
|
function buildCustomSingleValue({
|
|
8146
|
-
|
|
8152
|
+
SingleValue
|
|
8147
8153
|
}) {
|
|
8148
8154
|
return function CustomSingleValue(_a) {
|
|
8149
8155
|
var _b = _a, {
|
|
@@ -8151,7 +8157,8 @@ function buildCustomSingleValue({
|
|
|
8151
8157
|
} = _b, restProps = __objRest(_b, [
|
|
8152
8158
|
"children"
|
|
8153
8159
|
]);
|
|
8154
|
-
|
|
8160
|
+
const defaultRenderedSingleValue = /* @__PURE__ */ jsx(Span, { ellipsis: true, children });
|
|
8161
|
+
return /* @__PURE__ */ jsx(components.SingleValue, __spreadProps(__spreadValues({}, restProps), { children: SingleValue ? /* @__PURE__ */ jsx(SingleValue, { option: restProps.data, fallback: defaultRenderedSingleValue }) : defaultRenderedSingleValue }));
|
|
8155
8162
|
};
|
|
8156
8163
|
}
|
|
8157
8164
|
function useComboBoxSubcomponents({
|
|
@@ -8159,7 +8166,7 @@ function useComboBoxSubcomponents({
|
|
|
8159
8166
|
slots,
|
|
8160
8167
|
displayDisabledAsSelected
|
|
8161
8168
|
}) {
|
|
8162
|
-
const { EmptyMessage,
|
|
8169
|
+
const { EmptyMessage, SingleValue, GroupHeading, Option: Option2 } = slots != null ? slots : {};
|
|
8163
8170
|
const ClearIndicatorRef = useRef(buildCustomClearIndicator());
|
|
8164
8171
|
const DropdownIndicatorRef = useRef(buildCustomDropdownIndicator());
|
|
8165
8172
|
const LoadingIndicatorRef = useRef(buildCustomLoadingIndicator());
|
|
@@ -8181,8 +8188,8 @@ function useComboBoxSubcomponents({
|
|
|
8181
8188
|
[placeholder]
|
|
8182
8189
|
);
|
|
8183
8190
|
const SingleValueComponent = useMemo(
|
|
8184
|
-
() => buildCustomSingleValue({
|
|
8185
|
-
[
|
|
8191
|
+
() => buildCustomSingleValue({ SingleValue }),
|
|
8192
|
+
[SingleValue]
|
|
8186
8193
|
);
|
|
8187
8194
|
return useMemo(() => ({
|
|
8188
8195
|
ClearIndicator: ClearIndicatorRef.current,
|
|
@@ -8212,6 +8219,7 @@ function useCommonComboBoxProps({
|
|
|
8212
8219
|
slots,
|
|
8213
8220
|
displayDisabledAsSelected,
|
|
8214
8221
|
isDisabled,
|
|
8222
|
+
isError,
|
|
8215
8223
|
isReadOnly = false,
|
|
8216
8224
|
isClearable = true,
|
|
8217
8225
|
isSearchable = true,
|
|
@@ -8234,10 +8242,14 @@ function useCommonComboBoxProps({
|
|
|
8234
8242
|
COMBO_BOX_CLASS_NAMES.CONTROL,
|
|
8235
8243
|
isFocused && `${COMBO_BOX_CLASS_NAMES.CONTROL}--focused`,
|
|
8236
8244
|
isDisabled2 && `${COMBO_BOX_CLASS_NAMES.CONTROL}--disabled`,
|
|
8245
|
+
isError && `${COMBO_BOX_CLASS_NAMES.CONTROL}--error`,
|
|
8237
8246
|
isReadOnly && `${COMBO_BOX_CLASS_NAMES.CONTROL}--readonly`
|
|
8238
8247
|
),
|
|
8239
8248
|
valueContainer: () => COMBO_BOX_CLASS_NAMES.VALUE_CONTAINER,
|
|
8240
|
-
placeholder: () =>
|
|
8249
|
+
placeholder: () => classNames(
|
|
8250
|
+
COMBO_BOX_CLASS_NAMES.PLACEHOLDER,
|
|
8251
|
+
isError && `${COMBO_BOX_CLASS_NAMES.PLACEHOLDER}--error`
|
|
8252
|
+
),
|
|
8241
8253
|
indicatorsContainer: () => classNames(
|
|
8242
8254
|
COMBO_BOX_CLASS_NAMES.INDICATORS_CONTAINER,
|
|
8243
8255
|
isReadOnly && `${COMBO_BOX_CLASS_NAMES.INDICATORS_CONTAINER}--readonly`
|
|
@@ -8245,7 +8257,7 @@ function useCommonComboBoxProps({
|
|
|
8245
8257
|
menu: () => COMBO_BOX_CLASS_NAMES.MENU,
|
|
8246
8258
|
menuList: () => COMBO_BOX_CLASS_NAMES.MENU_LIST,
|
|
8247
8259
|
group: () => COMBO_BOX_CLASS_NAMES.GROUP
|
|
8248
|
-
}), [isReadOnly]);
|
|
8260
|
+
}), [isError, isReadOnly]);
|
|
8249
8261
|
const styles = useMemo(() => ({
|
|
8250
8262
|
menuPortal: (base) => __spreadProps(__spreadValues({}, base), { zIndex: 101 })
|
|
8251
8263
|
}), []);
|
|
@@ -8305,7 +8317,7 @@ function ComboBox(_la) {
|
|
|
8305
8317
|
"selectedValue",
|
|
8306
8318
|
"onSelectedValueChange"
|
|
8307
8319
|
]);
|
|
8308
|
-
const commonSelectProps = useCommonComboBoxProps(__spreadValues({ className, slots }, props));
|
|
8320
|
+
const commonSelectProps = useCommonComboBoxProps(__spreadValues({ className, slots, isError }, props));
|
|
8309
8321
|
return /* @__PURE__ */ jsxs(VStack, { gap: "3xs", fluid: true, className: className ? `${className}__Container` : void 0, children: [
|
|
8310
8322
|
/* @__PURE__ */ jsx(ReactSelect, __spreadProps(__spreadValues({}, commonSelectProps), { value: selectedValue, onChange: onSelectedValueChange })),
|
|
8311
8323
|
/* @__PURE__ */ jsx(ComboBoxErrorMessage, { isError, errorMessage: slots == null ? void 0 : slots.ErrorMessage })
|
|
@@ -8803,7 +8815,7 @@ const BankTransactionCategoryComboBox = ({
|
|
|
8803
8815
|
const numMatchOptions = (matchGroup == null ? void 0 : matchGroup.options.length) || 0;
|
|
8804
8816
|
const loadingSuggestions = bankTransaction && isLoadingSuggestions(bankTransaction) && selectedValue === null;
|
|
8805
8817
|
const placeholder = numMatchOptions > 1 ? `${numMatchOptions} possible matches...` : loadingSuggestions ? "Generating suggestions..." : includeSuggestedMatches ? "Categorize or match..." : "Select category";
|
|
8806
|
-
const
|
|
8818
|
+
const SingleValue = useCallback(() => {
|
|
8807
8819
|
return /* @__PURE__ */ jsx(BankTransactionsUncategorizedSelectedValue, { selectedValue });
|
|
8808
8820
|
}, [selectedValue]);
|
|
8809
8821
|
return /* @__PURE__ */ jsx(
|
|
@@ -8816,7 +8828,7 @@ const BankTransactionCategoryComboBox = ({
|
|
|
8816
8828
|
selectedValue,
|
|
8817
8829
|
placeholder,
|
|
8818
8830
|
slots: {
|
|
8819
|
-
|
|
8831
|
+
SingleValue,
|
|
8820
8832
|
Option: BankTransactionCategoryComboBoxOption,
|
|
8821
8833
|
GroupHeading: BankTransactionCategoryComboBoxGroupHeading
|
|
8822
8834
|
},
|
|
@@ -9826,6 +9838,45 @@ function useCustomAccountParseCsv() {
|
|
|
9826
9838
|
}
|
|
9827
9839
|
);
|
|
9828
9840
|
}
|
|
9841
|
+
const returnTrue = () => true;
|
|
9842
|
+
function CreatableComboBox(_Ba) {
|
|
9843
|
+
var _Ca = _Ba, {
|
|
9844
|
+
className,
|
|
9845
|
+
slots,
|
|
9846
|
+
isError,
|
|
9847
|
+
selectedValue,
|
|
9848
|
+
onSelectedValueChange,
|
|
9849
|
+
onCreateOption,
|
|
9850
|
+
formatCreateLabel: formatCreateLabel2,
|
|
9851
|
+
createOptionPosition = "first",
|
|
9852
|
+
isValidNewOption = returnTrue
|
|
9853
|
+
} = _Ca, props = __objRest(_Ca, [
|
|
9854
|
+
"className",
|
|
9855
|
+
"slots",
|
|
9856
|
+
"isError",
|
|
9857
|
+
"selectedValue",
|
|
9858
|
+
"onSelectedValueChange",
|
|
9859
|
+
"onCreateOption",
|
|
9860
|
+
"formatCreateLabel",
|
|
9861
|
+
"createOptionPosition",
|
|
9862
|
+
"isValidNewOption"
|
|
9863
|
+
]);
|
|
9864
|
+
const commonSelectProps = useCommonComboBoxProps(__spreadValues({ className, slots, isError }, props));
|
|
9865
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "3xs", fluid: true, className: className ? `${className}__Container` : void 0, children: [
|
|
9866
|
+
/* @__PURE__ */ jsx(
|
|
9867
|
+
CreatableSelect,
|
|
9868
|
+
__spreadProps(__spreadValues({}, commonSelectProps), {
|
|
9869
|
+
value: selectedValue,
|
|
9870
|
+
onChange: onSelectedValueChange,
|
|
9871
|
+
onCreateOption,
|
|
9872
|
+
isValidNewOption,
|
|
9873
|
+
formatCreateLabel: formatCreateLabel2,
|
|
9874
|
+
createOptionPosition
|
|
9875
|
+
})
|
|
9876
|
+
),
|
|
9877
|
+
/* @__PURE__ */ jsx(ComboBoxErrorMessage, { isError, errorMessage: slots == null ? void 0 : slots.ErrorMessage })
|
|
9878
|
+
] });
|
|
9879
|
+
}
|
|
9829
9880
|
const copyTextToClipboard = (text) => {
|
|
9830
9881
|
navigator.clipboard.writeText(text).catch(() => {
|
|
9831
9882
|
});
|
|
@@ -9842,8 +9893,8 @@ const CopyTemplateHeadersButtonGroup = ({ headers, className }) => {
|
|
|
9842
9893
|
key
|
|
9843
9894
|
)) });
|
|
9844
9895
|
};
|
|
9845
|
-
const CloseIcon = (
|
|
9846
|
-
var
|
|
9896
|
+
const CloseIcon = (_Da) => {
|
|
9897
|
+
var _Ea = _Da, { size = 12 } = _Ea, props = __objRest(_Ea, ["size"]);
|
|
9847
9898
|
return /* @__PURE__ */ jsxs(
|
|
9848
9899
|
"svg",
|
|
9849
9900
|
__spreadProps(__spreadValues({
|
|
@@ -10155,15 +10206,15 @@ function useCreateCustomAccount() {
|
|
|
10155
10206
|
}
|
|
10156
10207
|
const FORM_CLASS_NAME = "Layer__UI__Form";
|
|
10157
10208
|
const Form = forwardRef(
|
|
10158
|
-
function Form2(
|
|
10159
|
-
var
|
|
10209
|
+
function Form2(_Fa, ref) {
|
|
10210
|
+
var _Ga = _Fa, { children, className } = _Ga, restProps = __objRest(_Ga, ["children", "className"]);
|
|
10160
10211
|
return /* @__PURE__ */ jsx(Form$1, __spreadProps(__spreadValues({}, restProps), { className: classNames(FORM_CLASS_NAME, className), ref, children }));
|
|
10161
10212
|
}
|
|
10162
10213
|
);
|
|
10163
10214
|
const TEXT_FIELD_CLASS_NAME = "Layer__UI__TextField";
|
|
10164
10215
|
const TextField = forwardRef(
|
|
10165
|
-
function TextField2(
|
|
10166
|
-
var
|
|
10216
|
+
function TextField2(_Ha, ref) {
|
|
10217
|
+
var _Ia = _Ha, { children, inline, textarea, className } = _Ia, restProps = __objRest(_Ia, ["children", "inline", "textarea", "className"]);
|
|
10167
10218
|
const dataProperties = toDataProperties({ inline, textarea });
|
|
10168
10219
|
return /* @__PURE__ */ jsx(TextField$1, __spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), { className: classNames(TEXT_FIELD_CLASS_NAME, className), ref, children: withRenderProp(children, (node) => node) }));
|
|
10169
10220
|
}
|
|
@@ -10293,8 +10344,8 @@ function formatBigDecimalToString(value, options2 = {
|
|
|
10293
10344
|
}
|
|
10294
10345
|
const INPUT_CLASS_NAME = "Layer__UI__Input";
|
|
10295
10346
|
const Input$1 = forwardRef(
|
|
10296
|
-
function Input2(
|
|
10297
|
-
var
|
|
10347
|
+
function Input2(_Ja, ref) {
|
|
10348
|
+
var _Ka = _Ja, { inset, placement } = _Ka, restProps = __objRest(_Ka, ["inset", "placement"]);
|
|
10298
10349
|
const dataProperties = toDataProperties({ inset, placement });
|
|
10299
10350
|
return /* @__PURE__ */ jsx(
|
|
10300
10351
|
Input$2,
|
|
@@ -10305,39 +10356,17 @@ const Input$1 = forwardRef(
|
|
|
10305
10356
|
);
|
|
10306
10357
|
}
|
|
10307
10358
|
);
|
|
10308
|
-
const DEFAULT_MAX_VALUE = BigDecimal.fromBigInt(BigInt(1e7));
|
|
10309
|
-
const DEFAULT_MIN_DECIMAL_PLACES = 0;
|
|
10310
|
-
const DEFAULT_MAX_DECIMAL_PLACES = 3;
|
|
10311
10359
|
const DECORATOR_CHARS_REGEX = /[,%$]/g;
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
mode = "decimal",
|
|
10323
|
-
allowNegative = false,
|
|
10324
|
-
maxValue = mode === "percent" ? BIG_DECIMAL_ONE : DEFAULT_MAX_VALUE,
|
|
10325
|
-
minDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MIN_DECIMAL_PLACES,
|
|
10326
|
-
maxDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MAX_DECIMAL_PLACES,
|
|
10327
|
-
slots,
|
|
10328
|
-
placeholder
|
|
10329
|
-
} = _Ka, restProps = __objRest(_Ka, [
|
|
10330
|
-
"mode",
|
|
10331
|
-
"allowNegative",
|
|
10332
|
-
"maxValue",
|
|
10333
|
-
"minDecimalPlaces",
|
|
10334
|
-
"maxDecimalPlaces",
|
|
10335
|
-
"slots",
|
|
10336
|
-
"placeholder"
|
|
10337
|
-
]);
|
|
10338
|
-
const field = useFieldContext();
|
|
10339
|
-
const { name, state, handleChange, handleBlur } = field;
|
|
10340
|
-
const { value } = state;
|
|
10360
|
+
function useBigDecimalInput({
|
|
10361
|
+
value,
|
|
10362
|
+
onChange,
|
|
10363
|
+
onBlur,
|
|
10364
|
+
mode,
|
|
10365
|
+
maxValue,
|
|
10366
|
+
maxDecimalPlaces,
|
|
10367
|
+
minDecimalPlaces,
|
|
10368
|
+
allowNegative
|
|
10369
|
+
}) {
|
|
10341
10370
|
const formattingProps = useMemo(() => ({
|
|
10342
10371
|
minDecimalPlaces,
|
|
10343
10372
|
maxDecimalPlaces,
|
|
@@ -10359,11 +10388,11 @@ function FormBigDecimalField(_Ja) {
|
|
|
10359
10388
|
const normalized = BigDecimal.normalize(adjustedForPercent);
|
|
10360
10389
|
const clamped = BigDecimal.min(normalized, maxValue);
|
|
10361
10390
|
if (!BigDecimal.equals(clamped, value)) {
|
|
10362
|
-
|
|
10391
|
+
onChange(clamped);
|
|
10363
10392
|
}
|
|
10364
|
-
|
|
10393
|
+
onBlur();
|
|
10365
10394
|
setInputValue(formatBigDecimalToString(clamped, formattingProps));
|
|
10366
|
-
}, [inputValue, mode, maxValue,
|
|
10395
|
+
}, [inputValue, maxDecimalPlaces, mode, maxValue, value, onBlur, formattingProps, onChange]);
|
|
10367
10396
|
const allowedChars = useMemo(
|
|
10368
10397
|
() => buildDecimalCharRegex({ allowNegative, allowPercent: mode === "percent", allowDollar: mode === "currency" }),
|
|
10369
10398
|
[allowNegative, mode]
|
|
@@ -10382,6 +10411,48 @@ function FormBigDecimalField(_Ja) {
|
|
|
10382
10411
|
useEffect(() => {
|
|
10383
10412
|
setInputValue(formatBigDecimalToString(value, formattingProps));
|
|
10384
10413
|
}, [value, formattingProps]);
|
|
10414
|
+
return {
|
|
10415
|
+
inputValue,
|
|
10416
|
+
onInputChange,
|
|
10417
|
+
onInputBlur,
|
|
10418
|
+
onBeforeInput,
|
|
10419
|
+
onPaste
|
|
10420
|
+
};
|
|
10421
|
+
}
|
|
10422
|
+
const DEFAULT_MAX_VALUE$1 = BigDecimal.fromBigInt(BigInt(1e7));
|
|
10423
|
+
const DEFAULT_MIN_DECIMAL_PLACES$1 = 0;
|
|
10424
|
+
const DEFAULT_MAX_DECIMAL_PLACES$1 = 3;
|
|
10425
|
+
function FormBigDecimalField(_La) {
|
|
10426
|
+
var _Ma = _La, {
|
|
10427
|
+
mode = "decimal",
|
|
10428
|
+
allowNegative = false,
|
|
10429
|
+
maxValue = mode === "percent" ? BIG_DECIMAL_ONE : DEFAULT_MAX_VALUE$1,
|
|
10430
|
+
minDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MIN_DECIMAL_PLACES$1,
|
|
10431
|
+
maxDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MAX_DECIMAL_PLACES$1,
|
|
10432
|
+
slots,
|
|
10433
|
+
placeholder
|
|
10434
|
+
} = _Ma, restProps = __objRest(_Ma, [
|
|
10435
|
+
"mode",
|
|
10436
|
+
"allowNegative",
|
|
10437
|
+
"maxValue",
|
|
10438
|
+
"minDecimalPlaces",
|
|
10439
|
+
"maxDecimalPlaces",
|
|
10440
|
+
"slots",
|
|
10441
|
+
"placeholder"
|
|
10442
|
+
]);
|
|
10443
|
+
const field = useFieldContext();
|
|
10444
|
+
const { name, state, handleChange, handleBlur } = field;
|
|
10445
|
+
const { value } = state;
|
|
10446
|
+
const { inputValue, onInputChange, onInputBlur, onBeforeInput, onPaste } = useBigDecimalInput({
|
|
10447
|
+
value,
|
|
10448
|
+
onChange: handleChange,
|
|
10449
|
+
onBlur: handleBlur,
|
|
10450
|
+
mode,
|
|
10451
|
+
maxValue,
|
|
10452
|
+
maxDecimalPlaces,
|
|
10453
|
+
minDecimalPlaces,
|
|
10454
|
+
allowNegative
|
|
10455
|
+
});
|
|
10385
10456
|
return /* @__PURE__ */ jsx(BaseFormTextField, __spreadProps(__spreadValues({}, restProps), { inputMode: "decimal", children: /* @__PURE__ */ jsxs(InputGroup$1, { slot: "input", actionCount: slots ? 2 : void 0, children: [
|
|
10386
10457
|
/* @__PURE__ */ jsx(
|
|
10387
10458
|
Input$1,
|
|
@@ -10406,8 +10477,8 @@ const CHECK_SIZE = {
|
|
|
10406
10477
|
md: 14,
|
|
10407
10478
|
lg: 16
|
|
10408
10479
|
};
|
|
10409
|
-
function Checkbox(
|
|
10410
|
-
var
|
|
10480
|
+
function Checkbox(_Na) {
|
|
10481
|
+
var _Oa = _Na, { children, className, variant = "default", size = "sm", isIndeterminate } = _Oa, props = __objRest(_Oa, ["children", "className", "variant", "size", "isIndeterminate"]);
|
|
10411
10482
|
const dataProperties = useMemo(() => toDataProperties({
|
|
10412
10483
|
size,
|
|
10413
10484
|
variant,
|
|
@@ -10425,8 +10496,8 @@ function Checkbox(_La) {
|
|
|
10425
10496
|
})
|
|
10426
10497
|
);
|
|
10427
10498
|
}
|
|
10428
|
-
function CheckboxWithTooltip(
|
|
10429
|
-
var
|
|
10499
|
+
function CheckboxWithTooltip(_Pa) {
|
|
10500
|
+
var _Qa = _Pa, { tooltip } = _Qa, props = __objRest(_Qa, ["tooltip"]);
|
|
10430
10501
|
return /* @__PURE__ */ jsx("div", { className: "Layer__checkbox-wrapper", children: /* @__PURE__ */ jsxs(DeprecatedTooltip, { disabled: !tooltip, children: [
|
|
10431
10502
|
/* @__PURE__ */ jsx(DeprecatedTooltipTrigger, { className: "Layer__input-tooltip", children: /* @__PURE__ */ jsx(Checkbox, __spreadValues({}, props)) }),
|
|
10432
10503
|
/* @__PURE__ */ jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", children: tooltip })
|
|
@@ -10470,10 +10541,11 @@ function FormCheckboxField({
|
|
|
10470
10541
|
})
|
|
10471
10542
|
);
|
|
10472
10543
|
}
|
|
10544
|
+
const DATE_PICKER_CLASS_NAME = "Layer__UI__DatePicker";
|
|
10473
10545
|
const DATE_FIELD_CLASS_NAME = "Layer__UI__DateField";
|
|
10474
10546
|
const DateField = forwardRef(
|
|
10475
|
-
function DateField2(
|
|
10476
|
-
var
|
|
10547
|
+
function DateField2(_Ra, ref) {
|
|
10548
|
+
var _Sa = _Ra, { inline, className, isReadOnly } = _Sa, restProps = __objRest(_Sa, ["inline", "className", "isReadOnly"]);
|
|
10477
10549
|
const dataProperties = toDataProperties({ inline, readonly: isReadOnly });
|
|
10478
10550
|
return /* @__PURE__ */ jsx(
|
|
10479
10551
|
DateField$1,
|
|
@@ -10487,8 +10559,8 @@ const DateField = forwardRef(
|
|
|
10487
10559
|
);
|
|
10488
10560
|
const DATE_INPUT_CLASS_NAME = "Layer__UI__DateInput";
|
|
10489
10561
|
const DateInput = forwardRef(
|
|
10490
|
-
function DateInput2(
|
|
10491
|
-
var
|
|
10562
|
+
function DateInput2(_Ta, ref) {
|
|
10563
|
+
var _Ua = _Ta, { inset, pointerEvents } = _Ua, restProps = __objRest(_Ua, ["inset", "pointerEvents"]);
|
|
10492
10564
|
const dataProperties = toDataProperties({ inset, "pointer-events": pointerEvents });
|
|
10493
10565
|
return /* @__PURE__ */ jsx(
|
|
10494
10566
|
DateInput$1,
|
|
@@ -10501,8 +10573,8 @@ const DateInput = forwardRef(
|
|
|
10501
10573
|
);
|
|
10502
10574
|
const DATE_SEGMENT_CLASS_NAME = "Layer__UI__DateSegment";
|
|
10503
10575
|
const DateSegment = forwardRef(
|
|
10504
|
-
function DateSegment2(
|
|
10505
|
-
var
|
|
10576
|
+
function DateSegment2(_Va, ref) {
|
|
10577
|
+
var _Wa = _Va, { isReadOnly } = _Wa, restProps = __objRest(_Wa, ["isReadOnly"]);
|
|
10506
10578
|
const dataProperties = toDataProperties({ interactive: !isReadOnly });
|
|
10507
10579
|
return /* @__PURE__ */ jsx(
|
|
10508
10580
|
DateSegment$1,
|
|
@@ -10513,13 +10585,13 @@ const DateSegment = forwardRef(
|
|
|
10513
10585
|
);
|
|
10514
10586
|
}
|
|
10515
10587
|
);
|
|
10516
|
-
const DATE_PICKER_CLASS_NAME = "Layer__UI__DatePicker";
|
|
10517
10588
|
const DatePicker$1 = forwardRef(
|
|
10518
|
-
function DatePicker2(
|
|
10589
|
+
function DatePicker2(_Xa, ref) {
|
|
10590
|
+
var _Ya = _Xa, { className } = _Ya, restProps = __objRest(_Ya, ["className"]);
|
|
10519
10591
|
return /* @__PURE__ */ jsx(
|
|
10520
10592
|
DatePicker$2,
|
|
10521
|
-
__spreadProps(__spreadValues({},
|
|
10522
|
-
className: DATE_PICKER_CLASS_NAME,
|
|
10593
|
+
__spreadProps(__spreadValues({}, restProps), {
|
|
10594
|
+
className: classNames(DATE_PICKER_CLASS_NAME, className),
|
|
10523
10595
|
ref
|
|
10524
10596
|
})
|
|
10525
10597
|
);
|
|
@@ -10581,10 +10653,349 @@ function FormDateField({
|
|
|
10581
10653
|
})
|
|
10582
10654
|
);
|
|
10583
10655
|
}
|
|
10656
|
+
const ChevronLeft = (_Za) => {
|
|
10657
|
+
var props = __objRest(_Za, []);
|
|
10658
|
+
return /* @__PURE__ */ jsx(
|
|
10659
|
+
"svg",
|
|
10660
|
+
__spreadProps(__spreadValues({
|
|
10661
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10662
|
+
width: "18",
|
|
10663
|
+
height: "18",
|
|
10664
|
+
viewBox: "0 0 18 18",
|
|
10665
|
+
fill: "none"
|
|
10666
|
+
}, props), {
|
|
10667
|
+
children: /* @__PURE__ */ jsx(
|
|
10668
|
+
"path",
|
|
10669
|
+
{
|
|
10670
|
+
d: "M11.25 13.5L6.75 9L11.25 4.5",
|
|
10671
|
+
stroke: "currentColor",
|
|
10672
|
+
strokeLinecap: "round",
|
|
10673
|
+
strokeLinejoin: "round"
|
|
10674
|
+
}
|
|
10675
|
+
)
|
|
10676
|
+
})
|
|
10677
|
+
);
|
|
10678
|
+
};
|
|
10679
|
+
const CALENDAR_CLASS_NAME = "Layer__UI__Calendar";
|
|
10680
|
+
const Calendar = forwardRef(
|
|
10681
|
+
function Calendar2(__a, ref) {
|
|
10682
|
+
var _$a = __a, { className, isReadOnly } = _$a, restProps = __objRest(_$a, ["className", "isReadOnly"]);
|
|
10683
|
+
const dataProperties = toDataProperties({ readonly: isReadOnly });
|
|
10684
|
+
return /* @__PURE__ */ jsx(
|
|
10685
|
+
Calendar$1,
|
|
10686
|
+
__spreadProps(__spreadValues(__spreadValues({}, dataProperties), restProps), {
|
|
10687
|
+
isReadOnly,
|
|
10688
|
+
className: classNames(CALENDAR_CLASS_NAME, className),
|
|
10689
|
+
ref
|
|
10690
|
+
})
|
|
10691
|
+
);
|
|
10692
|
+
}
|
|
10693
|
+
);
|
|
10694
|
+
const CALENDAR_GRID_CLASS_NAME = "Layer__UI__CalendarGrid";
|
|
10695
|
+
const CalendarGrid = forwardRef(
|
|
10696
|
+
function CalendarGrid2(_ab, ref) {
|
|
10697
|
+
var _bb = _ab, { className } = _bb, restProps = __objRest(_bb, ["className"]);
|
|
10698
|
+
return /* @__PURE__ */ jsx(
|
|
10699
|
+
CalendarGrid$1,
|
|
10700
|
+
__spreadProps(__spreadValues({}, restProps), {
|
|
10701
|
+
className: classNames(CALENDAR_GRID_CLASS_NAME, className),
|
|
10702
|
+
ref
|
|
10703
|
+
})
|
|
10704
|
+
);
|
|
10705
|
+
}
|
|
10706
|
+
);
|
|
10707
|
+
const CALENDAR_GRID_BODY_CLASS_NAME = "Layer__UI__CalendarGridBody";
|
|
10708
|
+
const CalendarGridBody = forwardRef(
|
|
10709
|
+
function CalendarGridBody2(_cb, ref) {
|
|
10710
|
+
var _db = _cb, { className } = _db, restProps = __objRest(_db, ["className"]);
|
|
10711
|
+
return /* @__PURE__ */ jsx(
|
|
10712
|
+
CalendarGridBody$1,
|
|
10713
|
+
__spreadProps(__spreadValues({}, restProps), {
|
|
10714
|
+
className: classNames(CALENDAR_GRID_BODY_CLASS_NAME, className),
|
|
10715
|
+
ref
|
|
10716
|
+
})
|
|
10717
|
+
);
|
|
10718
|
+
}
|
|
10719
|
+
);
|
|
10720
|
+
const CALENDAR_CELL_CLASS_NAME = "Layer__UI__CalendarCell";
|
|
10721
|
+
const CalendarCell = forwardRef(
|
|
10722
|
+
function CalendarCell2(_eb, ref) {
|
|
10723
|
+
var _fb = _eb, { className, size = "sm" } = _fb, restProps = __objRest(_fb, ["className", "size"]);
|
|
10724
|
+
const dataProperties = toDataProperties({ size });
|
|
10725
|
+
return /* @__PURE__ */ jsx(
|
|
10726
|
+
CalendarCell$1,
|
|
10727
|
+
__spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
|
|
10728
|
+
className: classNames(CALENDAR_CELL_CLASS_NAME, className),
|
|
10729
|
+
ref
|
|
10730
|
+
})
|
|
10731
|
+
);
|
|
10732
|
+
}
|
|
10733
|
+
);
|
|
10734
|
+
const CALENDAR_GRID_HEADER_CLASS_NAME = "Layer__UI__CalendarGridHeader";
|
|
10735
|
+
const CalendarGridHeader = forwardRef(
|
|
10736
|
+
function CalendarGridHeader2(_gb, ref) {
|
|
10737
|
+
var _hb = _gb, { className } = _hb, restProps = __objRest(_hb, ["className"]);
|
|
10738
|
+
return /* @__PURE__ */ jsx(
|
|
10739
|
+
CalendarGridHeader$1,
|
|
10740
|
+
__spreadProps(__spreadValues({}, restProps), {
|
|
10741
|
+
className: classNames(CALENDAR_GRID_HEADER_CLASS_NAME, className),
|
|
10742
|
+
ref
|
|
10743
|
+
})
|
|
10744
|
+
);
|
|
10745
|
+
}
|
|
10746
|
+
);
|
|
10747
|
+
const CALENDAR_HEADER_CELL_CLASS_NAME = "Layer__UI__CalendarHeaderCell";
|
|
10748
|
+
const CalendarHeaderCell = forwardRef(
|
|
10749
|
+
function CalendarHeaderCell2(_ib, ref) {
|
|
10750
|
+
var _jb = _ib, { className, size = "sm" } = _jb, restProps = __objRest(_jb, ["className", "size"]);
|
|
10751
|
+
const dataProperties = toDataProperties({ size });
|
|
10752
|
+
return /* @__PURE__ */ jsx(
|
|
10753
|
+
CalendarHeaderCell$1,
|
|
10754
|
+
__spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
|
|
10755
|
+
className: classNames(CALENDAR_HEADER_CELL_CLASS_NAME, className),
|
|
10756
|
+
ref
|
|
10757
|
+
})
|
|
10758
|
+
);
|
|
10759
|
+
}
|
|
10760
|
+
);
|
|
10761
|
+
const DateCalendar = ({ minDate, maxDate, variant }) => {
|
|
10762
|
+
return /* @__PURE__ */ jsxs(Calendar, { minValue: minDate, maxValue: maxDate, children: [
|
|
10763
|
+
/* @__PURE__ */ jsxs(HStack, { align: "center", justify: "space-between", pb: "xs", pi: "xs", className: "Layer__DateCalendar__Header", children: [
|
|
10764
|
+
/* @__PURE__ */ jsx(Button, { icon: true, inset: true, variant: "ghost", slot: "previous", children: /* @__PURE__ */ jsx(ChevronLeft, { size: 20 }) }),
|
|
10765
|
+
/* @__PURE__ */ jsx(Heading$1, { weight: "normal", size: "sm" }),
|
|
10766
|
+
/* @__PURE__ */ jsx(Button, { icon: true, inset: true, variant: "ghost", slot: "next", children: /* @__PURE__ */ jsx(ChevronRight, { size: 20 }) })
|
|
10767
|
+
] }),
|
|
10768
|
+
/* @__PURE__ */ jsx(HStack, { pb: "xs", pi: "xs", children: /* @__PURE__ */ jsxs(CalendarGrid, { children: [
|
|
10769
|
+
/* @__PURE__ */ jsx(CalendarGridHeader, { children: (day) => /* @__PURE__ */ jsx(CalendarHeaderCell, { size: variant === "mobile" ? "md" : "sm", children: day }) }),
|
|
10770
|
+
/* @__PURE__ */ jsx(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx(CalendarCell, { date, size: variant === "mobile" ? "md" : "sm" }) })
|
|
10771
|
+
] }) })
|
|
10772
|
+
] });
|
|
10773
|
+
};
|
|
10774
|
+
const PickerDropdownIndicator = ({ onClick }) => /* @__PURE__ */ jsx(Button$2, { className: "Layer__PickerDropdownIndicator", onPress: onClick, children: /* @__PURE__ */ jsx(ChevronDown, { size: 16 }) });
|
|
10775
|
+
const DatePickerInput = ({ errorText, variant, onClick, isReadOnly }) => {
|
|
10776
|
+
const errorTriangle = useMemo(() => {
|
|
10777
|
+
if (variant === "mobile" || !errorText) return null;
|
|
10778
|
+
return /* @__PURE__ */ jsxs(DeprecatedTooltip, { offset: 12, children: [
|
|
10779
|
+
/* @__PURE__ */ jsx(DeprecatedTooltipTrigger, { children: /* @__PURE__ */ jsx(FieldError, { children: /* @__PURE__ */ jsx(TriangleAlert, { size: 18 }) }) }),
|
|
10780
|
+
/* @__PURE__ */ jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", width: "md", children: errorText })
|
|
10781
|
+
] });
|
|
10782
|
+
}, [errorText, variant]);
|
|
10783
|
+
if (variant === "mobile") {
|
|
10784
|
+
return /* @__PURE__ */ jsx(InputGroup$1, { slot: "input", isInvalid: !!errorText, onClick: isReadOnly ? void 0 : onClick, children: /* @__PURE__ */ jsx(DateInput, { inset: true, pointerEvents: "none", children: (segment) => /* @__PURE__ */ jsx(DateSegment, { isReadOnly: true, segment }) }) });
|
|
10785
|
+
}
|
|
10786
|
+
return /* @__PURE__ */ jsxs(InputGroup$1, { slot: "input", isInvalid: !!errorText, children: [
|
|
10787
|
+
/* @__PURE__ */ jsx(DateInput, { inset: true, children: (segment) => /* @__PURE__ */ jsx(DateSegment, { segment, isReadOnly }) }),
|
|
10788
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "3xs", align: "center", pie: "4xs", children: [
|
|
10789
|
+
errorTriangle,
|
|
10790
|
+
!isReadOnly && /* @__PURE__ */ jsx(PickerDropdownIndicator, { onClick })
|
|
10791
|
+
] })
|
|
10792
|
+
] });
|
|
10793
|
+
};
|
|
10794
|
+
const POPOVER_CLASS_NAME = "Layer__Popover";
|
|
10795
|
+
const POPOVER_CLASS_NAMES = `Layer__Portal ${POPOVER_CLASS_NAME}`;
|
|
10796
|
+
const Popover = forwardRef(
|
|
10797
|
+
function Popover2(_kb, ref) {
|
|
10798
|
+
var _lb = _kb, { flexInline = false } = _lb, restProps = __objRest(_lb, ["flexInline"]);
|
|
10799
|
+
const dataProperties = toDataProperties({ "flex-inline": flexInline });
|
|
10800
|
+
return /* @__PURE__ */ jsx(
|
|
10801
|
+
Popover$1,
|
|
10802
|
+
__spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
|
|
10803
|
+
className: POPOVER_CLASS_NAMES,
|
|
10804
|
+
ref
|
|
10805
|
+
})
|
|
10806
|
+
);
|
|
10807
|
+
}
|
|
10808
|
+
);
|
|
10809
|
+
function ResponsivePopover({ children, triggerRef }) {
|
|
10810
|
+
const { isMobile } = useSizeClass();
|
|
10811
|
+
if (isMobile) {
|
|
10812
|
+
return /* @__PURE__ */ jsx(
|
|
10813
|
+
Modal,
|
|
10814
|
+
{
|
|
10815
|
+
flexBlock: true,
|
|
10816
|
+
flexInline: true,
|
|
10817
|
+
variant: "mobile-popover",
|
|
10818
|
+
isDismissable: true,
|
|
10819
|
+
children
|
|
10820
|
+
}
|
|
10821
|
+
);
|
|
10822
|
+
}
|
|
10823
|
+
return /* @__PURE__ */ jsx(
|
|
10824
|
+
Popover,
|
|
10825
|
+
{
|
|
10826
|
+
triggerRef,
|
|
10827
|
+
placement: "bottom left",
|
|
10828
|
+
flexInline: true,
|
|
10829
|
+
children
|
|
10830
|
+
}
|
|
10831
|
+
);
|
|
10832
|
+
}
|
|
10833
|
+
const DatePicker = ({
|
|
10834
|
+
label,
|
|
10835
|
+
showLabel = true,
|
|
10836
|
+
date,
|
|
10837
|
+
minDate,
|
|
10838
|
+
maxDate,
|
|
10839
|
+
isInvalid,
|
|
10840
|
+
errorText,
|
|
10841
|
+
onBlur,
|
|
10842
|
+
onChange,
|
|
10843
|
+
isDisabled,
|
|
10844
|
+
isReadOnly,
|
|
10845
|
+
className,
|
|
10846
|
+
slotProps
|
|
10847
|
+
}) => {
|
|
10848
|
+
const additionalAriaProps = !showLabel && { "aria-label": label };
|
|
10849
|
+
const { value } = useSizeClass();
|
|
10850
|
+
const [isPopoverOpen, setPopoverOpen] = useState(false);
|
|
10851
|
+
return /* @__PURE__ */ jsxs(
|
|
10852
|
+
DatePicker$1,
|
|
10853
|
+
__spreadProps(__spreadValues({
|
|
10854
|
+
granularity: "day",
|
|
10855
|
+
value: date,
|
|
10856
|
+
onBlur,
|
|
10857
|
+
onChange,
|
|
10858
|
+
isInvalid
|
|
10859
|
+
}, additionalAriaProps), {
|
|
10860
|
+
isOpen: isPopoverOpen,
|
|
10861
|
+
onOpenChange: setPopoverOpen,
|
|
10862
|
+
isDisabled,
|
|
10863
|
+
isReadOnly,
|
|
10864
|
+
className: classNames(DATE_PICKER_CLASS_NAME, className),
|
|
10865
|
+
children: [
|
|
10866
|
+
showLabel && /* @__PURE__ */ jsx(Label, __spreadProps(__spreadValues({ slot: "label", size: "sm" }, slotProps == null ? void 0 : slotProps.Label), { children: label })),
|
|
10867
|
+
/* @__PURE__ */ jsx(DatePickerInput, { errorText, variant: value, onClick: () => setPopoverOpen(true), isReadOnly }),
|
|
10868
|
+
/* @__PURE__ */ jsx(ResponsivePopover, { children: /* @__PURE__ */ jsx(Dialog$1, { children: /* @__PURE__ */ jsx(DateCalendar, { minDate, maxDate, variant: value }) }) })
|
|
10869
|
+
]
|
|
10870
|
+
})
|
|
10871
|
+
);
|
|
10872
|
+
};
|
|
10873
|
+
const FORM_DATE_PICKER_FIELD_CLASSNAME = "Layer__FormDatePickerField";
|
|
10874
|
+
function FormDatePickerField({
|
|
10875
|
+
label,
|
|
10876
|
+
className,
|
|
10877
|
+
inline = false,
|
|
10878
|
+
showLabel = true,
|
|
10879
|
+
showFieldError = true,
|
|
10880
|
+
isReadOnly = false,
|
|
10881
|
+
minDate,
|
|
10882
|
+
maxDate
|
|
10883
|
+
}) {
|
|
10884
|
+
const field = useFieldContext();
|
|
10885
|
+
const { state, handleChange, handleBlur } = field;
|
|
10886
|
+
const { meta, value } = state;
|
|
10887
|
+
const { errors, isValid: isValid2 } = meta;
|
|
10888
|
+
const [localDate, setLocalDate] = useState(value);
|
|
10889
|
+
useEffect(() => {
|
|
10890
|
+
setLocalDate(value);
|
|
10891
|
+
}, [value]);
|
|
10892
|
+
const onChange = useCallback((newValue) => {
|
|
10893
|
+
setLocalDate(newValue);
|
|
10894
|
+
}, []);
|
|
10895
|
+
const onBlur = useCallback(() => {
|
|
10896
|
+
handleChange(localDate);
|
|
10897
|
+
handleBlur();
|
|
10898
|
+
}, [handleBlur, handleChange, localDate]);
|
|
10899
|
+
const errorMessage = errors.length !== 0 ? errors[0] : void 0;
|
|
10900
|
+
const shouldShowErrorMessage = showFieldError && errorMessage;
|
|
10901
|
+
const datePickerClassNames = classNames(
|
|
10902
|
+
FORM_DATE_PICKER_FIELD_CLASSNAME,
|
|
10903
|
+
inline && `${FORM_DATE_PICKER_FIELD_CLASSNAME}--inline`,
|
|
10904
|
+
className
|
|
10905
|
+
);
|
|
10906
|
+
return /* @__PURE__ */ jsx(
|
|
10907
|
+
DatePicker,
|
|
10908
|
+
{
|
|
10909
|
+
label,
|
|
10910
|
+
showLabel,
|
|
10911
|
+
date: localDate,
|
|
10912
|
+
onChange,
|
|
10913
|
+
onBlur,
|
|
10914
|
+
minDate,
|
|
10915
|
+
maxDate,
|
|
10916
|
+
isInvalid: !isValid2,
|
|
10917
|
+
errorText: shouldShowErrorMessage ? errorMessage : null,
|
|
10918
|
+
isReadOnly,
|
|
10919
|
+
className: datePickerClassNames
|
|
10920
|
+
}
|
|
10921
|
+
);
|
|
10922
|
+
}
|
|
10923
|
+
const NonRecursiveBigDecimalSchema = Schema.Struct({
|
|
10924
|
+
value: Schema.BigIntFromSelf,
|
|
10925
|
+
scale: Schema.Int
|
|
10926
|
+
});
|
|
10927
|
+
const NRBD_ZERO = { value: /* @__PURE__ */ BigInt("0"), scale: 0 };
|
|
10928
|
+
const NRBD_ONE = { value: /* @__PURE__ */ BigInt("1"), scale: 0 };
|
|
10929
|
+
const toNonRecursiveBigDecimal = (bd) => {
|
|
10930
|
+
const normalized = BigDecimal.normalize(bd);
|
|
10931
|
+
return { value: normalized.value, scale: normalized.scale };
|
|
10932
|
+
};
|
|
10933
|
+
const fromNonRecursiveBigDecimal = (nrbd) => {
|
|
10934
|
+
return BigDecimal.make(nrbd.value, nrbd.scale);
|
|
10935
|
+
};
|
|
10936
|
+
const nrbdEquals = (a, b) => {
|
|
10937
|
+
return BigDecimal.equals(fromNonRecursiveBigDecimal(a), fromNonRecursiveBigDecimal(b));
|
|
10938
|
+
};
|
|
10939
|
+
const DEFAULT_MAX_VALUE = BigDecimal.fromBigInt(BigInt(1e7));
|
|
10940
|
+
const DEFAULT_MIN_DECIMAL_PLACES = 0;
|
|
10941
|
+
const DEFAULT_MAX_DECIMAL_PLACES = 3;
|
|
10942
|
+
function FormNonRecursiveBigDecimalField(_mb) {
|
|
10943
|
+
var _nb = _mb, {
|
|
10944
|
+
mode = "decimal",
|
|
10945
|
+
allowNegative = false,
|
|
10946
|
+
maxValue = mode === "percent" ? BIG_DECIMAL_ONE : DEFAULT_MAX_VALUE,
|
|
10947
|
+
minDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MIN_DECIMAL_PLACES,
|
|
10948
|
+
maxDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MAX_DECIMAL_PLACES,
|
|
10949
|
+
slots,
|
|
10950
|
+
placeholder
|
|
10951
|
+
} = _nb, restProps = __objRest(_nb, [
|
|
10952
|
+
"mode",
|
|
10953
|
+
"allowNegative",
|
|
10954
|
+
"maxValue",
|
|
10955
|
+
"minDecimalPlaces",
|
|
10956
|
+
"maxDecimalPlaces",
|
|
10957
|
+
"slots",
|
|
10958
|
+
"placeholder"
|
|
10959
|
+
]);
|
|
10960
|
+
const field = useFieldContext();
|
|
10961
|
+
const { name, state, handleChange, handleBlur } = field;
|
|
10962
|
+
const { value: nrbdValue } = state;
|
|
10963
|
+
const value = useMemo(() => fromNonRecursiveBigDecimal(nrbdValue), [nrbdValue]);
|
|
10964
|
+
const onChange = useCallback((bd) => {
|
|
10965
|
+
handleChange(toNonRecursiveBigDecimal(bd));
|
|
10966
|
+
}, [handleChange]);
|
|
10967
|
+
const { inputValue, onInputChange, onInputBlur, onBeforeInput, onPaste } = useBigDecimalInput({
|
|
10968
|
+
value,
|
|
10969
|
+
onChange,
|
|
10970
|
+
onBlur: handleBlur,
|
|
10971
|
+
mode,
|
|
10972
|
+
maxValue,
|
|
10973
|
+
maxDecimalPlaces,
|
|
10974
|
+
minDecimalPlaces,
|
|
10975
|
+
allowNegative
|
|
10976
|
+
});
|
|
10977
|
+
return /* @__PURE__ */ jsx(BaseFormTextField, __spreadProps(__spreadValues({}, restProps), { inputMode: "decimal", children: /* @__PURE__ */ jsxs(InputGroup$1, { slot: "input", actionCount: slots ? 2 : void 0, children: [
|
|
10978
|
+
/* @__PURE__ */ jsx(
|
|
10979
|
+
Input$1,
|
|
10980
|
+
{
|
|
10981
|
+
inset: true,
|
|
10982
|
+
id: name,
|
|
10983
|
+
name,
|
|
10984
|
+
value: inputValue,
|
|
10985
|
+
onChange: onInputChange,
|
|
10986
|
+
onBlur: onInputBlur,
|
|
10987
|
+
onBeforeInput,
|
|
10988
|
+
onPaste,
|
|
10989
|
+
placeholder
|
|
10990
|
+
}
|
|
10991
|
+
),
|
|
10992
|
+
(slots == null ? void 0 : slots.badge) && /* @__PURE__ */ jsx(HStack, { children: slots.badge })
|
|
10993
|
+
] }) }));
|
|
10994
|
+
}
|
|
10584
10995
|
const NUMBER_FIELD_CLASS_NAME = "Layer__UI__NumberField";
|
|
10585
10996
|
const NumberField = forwardRef(
|
|
10586
|
-
function NumberField2(
|
|
10587
|
-
var
|
|
10997
|
+
function NumberField2(_ob, ref) {
|
|
10998
|
+
var _pb = _ob, { inline, className, isReadOnly } = _pb, restProps = __objRest(_pb, ["inline", "className", "isReadOnly"]);
|
|
10588
10999
|
const dataProperties = toDataProperties({ inline, readonly: isReadOnly });
|
|
10589
11000
|
return /* @__PURE__ */ jsx(
|
|
10590
11001
|
NumberField$1,
|
|
@@ -10653,17 +11064,13 @@ function FormNumberField({
|
|
|
10653
11064
|
}
|
|
10654
11065
|
const RADIO_GROUP_CLASS_NAME = "Layer__RadioGroup";
|
|
10655
11066
|
const RADIO_CLASS_NAME = "Layer__Radio";
|
|
10656
|
-
const INDICATOR_SIZE =
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
lg: 12
|
|
10660
|
-
};
|
|
10661
|
-
function RadioGroup(_Xa) {
|
|
10662
|
-
var _Ya = _Xa, {
|
|
11067
|
+
const INDICATOR_SIZE = 10;
|
|
11068
|
+
function RadioGroup(_qb) {
|
|
11069
|
+
var _rb = _qb, {
|
|
10663
11070
|
children,
|
|
10664
11071
|
className,
|
|
10665
11072
|
onChange
|
|
10666
|
-
} =
|
|
11073
|
+
} = _rb, restProps = __objRest(_rb, [
|
|
10667
11074
|
"children",
|
|
10668
11075
|
"className",
|
|
10669
11076
|
"onChange"
|
|
@@ -10677,26 +11084,20 @@ function RadioGroup(_Xa) {
|
|
|
10677
11084
|
})
|
|
10678
11085
|
);
|
|
10679
11086
|
}
|
|
10680
|
-
function Radio(
|
|
10681
|
-
var
|
|
11087
|
+
function Radio(_sb) {
|
|
11088
|
+
var _tb = _sb, {
|
|
10682
11089
|
children,
|
|
10683
|
-
className
|
|
10684
|
-
|
|
10685
|
-
} = __a, restProps = __objRest(__a, [
|
|
11090
|
+
className
|
|
11091
|
+
} = _tb, restProps = __objRest(_tb, [
|
|
10686
11092
|
"children",
|
|
10687
|
-
"className"
|
|
10688
|
-
"size"
|
|
11093
|
+
"className"
|
|
10689
11094
|
]);
|
|
10690
|
-
const dataProperties = useMemo(() => toDataProperties({
|
|
10691
|
-
size,
|
|
10692
|
-
labeled: typeof children === "string" && children.length > 0
|
|
10693
|
-
}), [children, size]);
|
|
10694
11095
|
return /* @__PURE__ */ jsx(
|
|
10695
11096
|
Radio$1,
|
|
10696
|
-
__spreadProps(__spreadValues(
|
|
11097
|
+
__spreadProps(__spreadValues({}, restProps), {
|
|
10697
11098
|
className: classNames(RADIO_CLASS_NAME, className),
|
|
10698
11099
|
children: withRenderProp(children, (node) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10699
|
-
/* @__PURE__ */ jsx("div", { slot: "radio", children: /* @__PURE__ */ jsx(Circle, { size: INDICATOR_SIZE
|
|
11100
|
+
/* @__PURE__ */ jsx("div", { slot: "radio", children: /* @__PURE__ */ jsx(Circle, { size: INDICATOR_SIZE }) }),
|
|
10700
11101
|
node
|
|
10701
11102
|
] }))
|
|
10702
11103
|
})
|
|
@@ -10717,7 +11118,6 @@ function FormRadioGroupField({
|
|
|
10717
11118
|
const { name, state, handleChange, handleBlur } = field;
|
|
10718
11119
|
const { meta, value } = state;
|
|
10719
11120
|
const { errors, isValid: isValid2 } = meta;
|
|
10720
|
-
const errorMessage = errors.length !== 0 ? errors[0] : void 0;
|
|
10721
11121
|
const labelId = useId();
|
|
10722
11122
|
const additionalAriaProps = showLabel ? { "aria-labelledby": labelId } : { "aria-label": label };
|
|
10723
11123
|
const radioGroupClassNames = classNames(
|
|
@@ -10725,25 +11125,30 @@ function FormRadioGroupField({
|
|
|
10725
11125
|
inline && `${FORM_RADIO_GROUP_FIELD_CLASSNAME$1}--inline`,
|
|
10726
11126
|
className
|
|
10727
11127
|
);
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
|
|
10738
|
-
|
|
10739
|
-
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
|
|
11128
|
+
const errorMessage = errors.length !== 0 ? errors[0] : void 0;
|
|
11129
|
+
const shouldShowErrorMessage = showFieldError && errorMessage;
|
|
11130
|
+
return /* @__PURE__ */ jsxs(
|
|
11131
|
+
RadioGroup,
|
|
11132
|
+
__spreadProps(__spreadValues({
|
|
11133
|
+
slot: "radiogroup",
|
|
11134
|
+
value,
|
|
11135
|
+
onChange: handleChange,
|
|
11136
|
+
onBlur: handleBlur,
|
|
11137
|
+
name,
|
|
11138
|
+
orientation,
|
|
11139
|
+
isReadOnly,
|
|
11140
|
+
isInvalid: !isValid2,
|
|
11141
|
+
className: radioGroupClassNames
|
|
11142
|
+
}, additionalAriaProps), {
|
|
11143
|
+
children: [
|
|
11144
|
+
showLabel && /* @__PURE__ */ jsx(Label, { slot: "label", size: "sm", id: labelId, children: label }),
|
|
11145
|
+
/* @__PURE__ */ jsxs(VStack, { slot: "options", gap: "3xs", children: [
|
|
11146
|
+
/* @__PURE__ */ jsx(Stack, { direction: orientation === "horizontal" ? "row" : "column", gap: orientation === "horizontal" ? "sm" : "xs", children: options2.map((option) => /* @__PURE__ */ jsx(Radio, { value: option.value, children: /* @__PURE__ */ jsx(Span, { slot: "description", children: option.label }) }, option.value)) }),
|
|
11147
|
+
shouldShowErrorMessage && /* @__PURE__ */ jsx(FieldError, { children: errorMessage })
|
|
11148
|
+
] })
|
|
11149
|
+
]
|
|
11150
|
+
})
|
|
11151
|
+
);
|
|
10747
11152
|
}
|
|
10748
11153
|
const FORM_RADIO_GROUP_FIELD_CLASSNAME = "Layer__FormRadioGroupField";
|
|
10749
11154
|
function FormRadioGroupYesNoField({
|
|
@@ -10760,6 +11165,7 @@ function FormRadioGroupYesNoField({
|
|
|
10760
11165
|
const { meta, value } = state;
|
|
10761
11166
|
const { errors, isValid: isValid2 } = meta;
|
|
10762
11167
|
const errorMessage = errors.length !== 0 ? errors[0] : void 0;
|
|
11168
|
+
const shouldShowErrorMessage = showFieldError && errorMessage;
|
|
10763
11169
|
const labelId = useId();
|
|
10764
11170
|
const additionalAriaProps = showLabel ? { "aria-labelledby": labelId } : { "aria-label": label };
|
|
10765
11171
|
const radioGroupClassNames = classNames(
|
|
@@ -10771,35 +11177,38 @@ function FormRadioGroupYesNoField({
|
|
|
10771
11177
|
const handleRadioChange = (newValue) => {
|
|
10772
11178
|
handleChange(newValue === "yes");
|
|
10773
11179
|
};
|
|
10774
|
-
return /* @__PURE__ */ jsxs(
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
|
|
10788
|
-
children:
|
|
10789
|
-
|
|
10790
|
-
/* @__PURE__ */
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
|
|
11180
|
+
return /* @__PURE__ */ jsxs(
|
|
11181
|
+
RadioGroup,
|
|
11182
|
+
__spreadProps(__spreadValues({
|
|
11183
|
+
slot: "radiogroup",
|
|
11184
|
+
value: radioValue,
|
|
11185
|
+
onChange: handleRadioChange,
|
|
11186
|
+
onBlur: handleBlur,
|
|
11187
|
+
name,
|
|
11188
|
+
orientation,
|
|
11189
|
+
isReadOnly,
|
|
11190
|
+
isInvalid: !isValid2,
|
|
11191
|
+
className: radioGroupClassNames
|
|
11192
|
+
}, additionalAriaProps), {
|
|
11193
|
+
children: [
|
|
11194
|
+
showLabel && /* @__PURE__ */ jsx(Label, { slot: "label", size: "sm", id: labelId, children: label }),
|
|
11195
|
+
/* @__PURE__ */ jsxs(VStack, { slot: "options", gap: "3xs", children: [
|
|
11196
|
+
/* @__PURE__ */ jsxs(Stack, { direction: orientation === "horizontal" ? "row" : "column", gap: orientation === "horizontal" ? "sm" : "xs", children: [
|
|
11197
|
+
/* @__PURE__ */ jsx(Radio, { value: "no", children: /* @__PURE__ */ jsx(Span, { slot: "description", children: "No" }) }),
|
|
11198
|
+
/* @__PURE__ */ jsx(Radio, { value: "yes", children: /* @__PURE__ */ jsx(Span, { slot: "description", children: "Yes" }) })
|
|
11199
|
+
] }),
|
|
11200
|
+
shouldShowErrorMessage && /* @__PURE__ */ jsx(FieldError, { children: errorMessage })
|
|
11201
|
+
] })
|
|
11202
|
+
]
|
|
11203
|
+
})
|
|
11204
|
+
);
|
|
10796
11205
|
}
|
|
10797
11206
|
const SWITCH_CLASS_NAME = "Layer__UI__Switch";
|
|
10798
|
-
const Switch = forwardRef((
|
|
10799
|
-
var
|
|
11207
|
+
const Switch = forwardRef((_ub, ref) => {
|
|
11208
|
+
var _vb = _ub, {
|
|
10800
11209
|
children,
|
|
10801
11210
|
className
|
|
10802
|
-
} =
|
|
11211
|
+
} = _vb, props = __objRest(_vb, [
|
|
10803
11212
|
"children",
|
|
10804
11213
|
"className"
|
|
10805
11214
|
]);
|
|
@@ -10849,8 +11258,8 @@ function FormSwitchField({
|
|
|
10849
11258
|
}
|
|
10850
11259
|
const TEXTAREA_CLASS_NAME = "Layer__UI__TextArea";
|
|
10851
11260
|
const TextArea = forwardRef(
|
|
10852
|
-
function TextArea2(
|
|
10853
|
-
var
|
|
11261
|
+
function TextArea2(_wb, ref) {
|
|
11262
|
+
var _xb = _wb, { resize = "none" } = _xb, restProps = __objRest(_xb, ["resize"]);
|
|
10854
11263
|
const dataProperties = toDataProperties({ resize });
|
|
10855
11264
|
return /* @__PURE__ */ jsx(
|
|
10856
11265
|
TextArea$1,
|
|
@@ -10861,8 +11270,8 @@ const TextArea = forwardRef(
|
|
|
10861
11270
|
);
|
|
10862
11271
|
}
|
|
10863
11272
|
);
|
|
10864
|
-
function FormTextAreaField(
|
|
10865
|
-
var
|
|
11273
|
+
function FormTextAreaField(_yb) {
|
|
11274
|
+
var _zb = _yb, { placeholder } = _zb, props = __objRest(_zb, ["placeholder"]);
|
|
10866
11275
|
const field = useFieldContext();
|
|
10867
11276
|
const { name, state, handleChange, handleBlur } = field;
|
|
10868
11277
|
const { value } = state;
|
|
@@ -10882,8 +11291,8 @@ function FormTextAreaField(_db) {
|
|
|
10882
11291
|
}
|
|
10883
11292
|
) }));
|
|
10884
11293
|
}
|
|
10885
|
-
function FormTextField(
|
|
10886
|
-
var
|
|
11294
|
+
function FormTextField(_Ab) {
|
|
11295
|
+
var _Bb = _Ab, { placeholder } = _Bb, props = __objRest(_Bb, ["placeholder"]);
|
|
10887
11296
|
const field = useFieldContext();
|
|
10888
11297
|
const { name, state, handleChange, handleBlur } = field;
|
|
10889
11298
|
const { value } = state;
|
|
@@ -10910,6 +11319,8 @@ const { useAppForm: useRawAppForm } = createFormHook({
|
|
|
10910
11319
|
FormBigDecimalField,
|
|
10911
11320
|
FormCheckboxField,
|
|
10912
11321
|
FormDateField,
|
|
11322
|
+
FormDatePickerField,
|
|
11323
|
+
FormNonRecursiveBigDecimalField,
|
|
10913
11324
|
FormNumberField,
|
|
10914
11325
|
FormRadioGroupField,
|
|
10915
11326
|
FormRadioGroupYesNoField,
|
|
@@ -10974,13 +11385,13 @@ const useCustomAccountForm = ({ onSuccess }) => {
|
|
|
10974
11385
|
const isFormValid = useStore$1(form.store, (state) => state.isValid);
|
|
10975
11386
|
return { form, submitError, isFormValid };
|
|
10976
11387
|
};
|
|
10977
|
-
const Input = (
|
|
10978
|
-
var
|
|
11388
|
+
const Input = (_Cb) => {
|
|
11389
|
+
var _Db = _Cb, {
|
|
10979
11390
|
className,
|
|
10980
11391
|
isInvalid,
|
|
10981
11392
|
errorMessage,
|
|
10982
11393
|
leftText
|
|
10983
|
-
} =
|
|
11394
|
+
} = _Db, props = __objRest(_Db, [
|
|
10984
11395
|
"className",
|
|
10985
11396
|
"isInvalid",
|
|
10986
11397
|
"errorMessage",
|
|
@@ -11026,8 +11437,8 @@ const InputGroup = ({
|
|
|
11026
11437
|
children
|
|
11027
11438
|
] });
|
|
11028
11439
|
};
|
|
11029
|
-
const ChevronDownFill = (
|
|
11030
|
-
var
|
|
11440
|
+
const ChevronDownFill = (_Eb) => {
|
|
11441
|
+
var _Fb = _Eb, { size = 18 } = _Fb, props = __objRest(_Fb, ["size"]);
|
|
11031
11442
|
return /* @__PURE__ */ jsxs(
|
|
11032
11443
|
"svg",
|
|
11033
11444
|
__spreadProps(__spreadValues({
|
|
@@ -11052,10 +11463,10 @@ const ChevronDownFill = (_jb) => {
|
|
|
11052
11463
|
})
|
|
11053
11464
|
);
|
|
11054
11465
|
};
|
|
11055
|
-
const SelectMenuPortal = (
|
|
11056
|
-
var
|
|
11466
|
+
const SelectMenuPortal = (_Gb) => {
|
|
11467
|
+
var _Hb = _Gb, {
|
|
11057
11468
|
children
|
|
11058
|
-
} =
|
|
11469
|
+
} = _Hb, restProps = __objRest(_Hb, [
|
|
11059
11470
|
"children"
|
|
11060
11471
|
]);
|
|
11061
11472
|
const dataProperties = toDataProperties({ "react-aria-top-layer": true });
|
|
@@ -11080,7 +11491,7 @@ const Select = ({
|
|
|
11080
11491
|
errorMessage,
|
|
11081
11492
|
inputId,
|
|
11082
11493
|
isLoading,
|
|
11083
|
-
formatOptionLabel
|
|
11494
|
+
formatOptionLabel
|
|
11084
11495
|
}) => {
|
|
11085
11496
|
const baseClassName2 = classNames(
|
|
11086
11497
|
"Layer__select",
|
|
@@ -11098,7 +11509,7 @@ const Select = ({
|
|
|
11098
11509
|
classNamePrefix,
|
|
11099
11510
|
placeholder: placeholder != null ? placeholder : "Select...",
|
|
11100
11511
|
options: options2,
|
|
11101
|
-
formatOptionLabel
|
|
11512
|
+
formatOptionLabel,
|
|
11102
11513
|
value,
|
|
11103
11514
|
onChange: (newValue) => newValue && onChange(newValue),
|
|
11104
11515
|
menuPortalTarget: document.body,
|
|
@@ -11111,8 +11522,8 @@ const Select = ({
|
|
|
11111
11522
|
/* @__PURE__ */ jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", children: errorMessage })
|
|
11112
11523
|
] });
|
|
11113
11524
|
};
|
|
11114
|
-
const ErrorText = (
|
|
11115
|
-
var
|
|
11525
|
+
const ErrorText = (_Ib) => {
|
|
11526
|
+
var _Jb = _Ib, { className } = _Jb, props = __objRest(_Jb, ["className"]);
|
|
11116
11527
|
return /* @__PURE__ */ jsx(Text, __spreadProps(__spreadValues({}, props), { status: "error", className }));
|
|
11117
11528
|
};
|
|
11118
11529
|
const accountTypeOptions = [
|
|
@@ -11222,61 +11633,6 @@ const CustomAccountForm = ({ initialAccountName, onCancel, onSuccess }) => {
|
|
|
11222
11633
|
}
|
|
11223
11634
|
);
|
|
11224
11635
|
};
|
|
11225
|
-
const CreatableSelect = ({
|
|
11226
|
-
name,
|
|
11227
|
-
options: options2,
|
|
11228
|
-
className,
|
|
11229
|
-
classNamePrefix = "Layer__select",
|
|
11230
|
-
value,
|
|
11231
|
-
onChange,
|
|
11232
|
-
disabled,
|
|
11233
|
-
placeholder,
|
|
11234
|
-
isInvalid,
|
|
11235
|
-
errorMessage,
|
|
11236
|
-
formatOptionLabel: formatOptionLabel2,
|
|
11237
|
-
onCreateOption,
|
|
11238
|
-
isValidNewOption,
|
|
11239
|
-
formatCreateLabel: formatCreateLabel2,
|
|
11240
|
-
inputId,
|
|
11241
|
-
isLoading,
|
|
11242
|
-
isClearable,
|
|
11243
|
-
createOptionPosition = "first"
|
|
11244
|
-
}) => {
|
|
11245
|
-
const baseClassName2 = classNames(
|
|
11246
|
-
"Layer__select",
|
|
11247
|
-
isInvalid ? "Layer__select--error" : "",
|
|
11248
|
-
className
|
|
11249
|
-
);
|
|
11250
|
-
const DropdownIndicator = useCallback((props) => /* @__PURE__ */ jsx(components.DropdownIndicator, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx(ChevronDownFill, {}) })), []);
|
|
11251
|
-
return /* @__PURE__ */ jsxs(DeprecatedTooltip, { disabled: !isInvalid || !errorMessage, children: [
|
|
11252
|
-
/* @__PURE__ */ jsx(DeprecatedTooltipTrigger, { className: "Layer__input-tooltip", children: /* @__PURE__ */ jsx(
|
|
11253
|
-
BaseCreatableSelect,
|
|
11254
|
-
{
|
|
11255
|
-
inputId,
|
|
11256
|
-
name,
|
|
11257
|
-
className: baseClassName2,
|
|
11258
|
-
classNamePrefix,
|
|
11259
|
-
placeholder: placeholder != null ? placeholder : "Select...",
|
|
11260
|
-
options: options2,
|
|
11261
|
-
formatOptionLabel: formatOptionLabel2,
|
|
11262
|
-
value,
|
|
11263
|
-
onChange: (newValue) => onChange(newValue),
|
|
11264
|
-
onCreateOption,
|
|
11265
|
-
isValidNewOption,
|
|
11266
|
-
formatCreateLabel: formatCreateLabel2,
|
|
11267
|
-
menuPortalTarget: document.body,
|
|
11268
|
-
styles: { menuPortal: (base) => __spreadProps(__spreadValues({}, base), { zIndex: 9999 }) },
|
|
11269
|
-
components: { DropdownIndicator, MenuPortal: SelectMenuPortal },
|
|
11270
|
-
isLoading,
|
|
11271
|
-
isDisabled: disabled,
|
|
11272
|
-
isClearable,
|
|
11273
|
-
escapeClearsValue: isClearable,
|
|
11274
|
-
createOptionPosition
|
|
11275
|
-
}
|
|
11276
|
-
) }),
|
|
11277
|
-
/* @__PURE__ */ jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", children: errorMessage })
|
|
11278
|
-
] });
|
|
11279
|
-
};
|
|
11280
11636
|
const templateHeaders = {
|
|
11281
11637
|
date: "Date",
|
|
11282
11638
|
description: "Description",
|
|
@@ -11304,18 +11660,27 @@ const templateExampleTransactions = [
|
|
|
11304
11660
|
const formatCreateLabel$1 = (inputValue) => {
|
|
11305
11661
|
return inputValue ? `Create "${inputValue}"` : "Create account";
|
|
11306
11662
|
};
|
|
11307
|
-
const
|
|
11663
|
+
const AccountOption = ({ option, fallback }) => {
|
|
11308
11664
|
if (option.account && !option.__isNew__) {
|
|
11309
|
-
return /* @__PURE__ */ jsxs(
|
|
11310
|
-
/* @__PURE__ */ jsx(
|
|
11311
|
-
|
|
11312
|
-
option.account.
|
|
11313
|
-
"
|
|
11314
|
-
|
|
11665
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
11666
|
+
/* @__PURE__ */ jsx(Check, { size: 16, className: COMBO_BOX_CLASS_NAMES.OPTION_CHECK_ICON }),
|
|
11667
|
+
/* @__PURE__ */ jsxs(VStack, { children: [
|
|
11668
|
+
/* @__PURE__ */ jsx(Span, { ellipsis: true, children: option.account.accountName }),
|
|
11669
|
+
/* @__PURE__ */ jsxs(Span, { size: "sm", variant: "subtle", noWrap: true, children: [
|
|
11670
|
+
option.account.institutionName,
|
|
11671
|
+
" · ",
|
|
11672
|
+
humanizeEnum(option.account.accountSubtype)
|
|
11673
|
+
] })
|
|
11315
11674
|
] })
|
|
11316
11675
|
] });
|
|
11317
11676
|
}
|
|
11318
|
-
return
|
|
11677
|
+
return fallback;
|
|
11678
|
+
};
|
|
11679
|
+
const AccountSingleValue = ({ option, fallback }) => {
|
|
11680
|
+
if (option.account && !option.__isNew__) {
|
|
11681
|
+
return /* @__PURE__ */ jsx(Span, { ellipsis: true, children: option.account.accountName });
|
|
11682
|
+
}
|
|
11683
|
+
return fallback;
|
|
11319
11684
|
};
|
|
11320
11685
|
function UploadTransactionsUploadCsvStep({ selectedAccount, onSelectAccount, selectedFile, onSelectFile, onParseCsv }) {
|
|
11321
11686
|
var _a;
|
|
@@ -11370,30 +11735,27 @@ function UploadTransactionsUploadCsvStep({ selectedAccount, onSelectAccount, sel
|
|
|
11370
11735
|
setHasParseCsvError(true);
|
|
11371
11736
|
});
|
|
11372
11737
|
}, [selectedAccount, isCreatingNewAccount, selectedFile, parseCsv2, onParseCsv, next]);
|
|
11373
|
-
const inputClassName = classNames(
|
|
11374
|
-
"Layer__upload-transactions__select-account-name-input",
|
|
11375
|
-
!!customAccountsError && "Layer__upload-transactions__select-account-name-input--error"
|
|
11376
|
-
);
|
|
11377
11738
|
const hasSelectedAccount = selectedAccount && !isCreatingNewAccount;
|
|
11378
11739
|
return /* @__PURE__ */ jsxs(VStack, { gap: "lg", children: [
|
|
11379
|
-
/* @__PURE__ */ jsxs(VStack, {
|
|
11740
|
+
/* @__PURE__ */ jsxs(VStack, { pis: "3xs", gap: "xs", children: [
|
|
11380
11741
|
/* @__PURE__ */ jsx(Label, { size: "md", htmlFor: "account_name", children: "Which account are these transactions from?" }),
|
|
11381
11742
|
/* @__PURE__ */ jsx(
|
|
11382
|
-
|
|
11743
|
+
CreatableComboBox,
|
|
11383
11744
|
{
|
|
11384
11745
|
inputId: "account_name",
|
|
11385
11746
|
placeholder: customAccountsError ? "Failed to load options" : "Select account...",
|
|
11386
11747
|
options: accountOptions,
|
|
11387
|
-
|
|
11388
|
-
onChange: onSelectAccount,
|
|
11748
|
+
onSelectedValueChange: onSelectAccount,
|
|
11389
11749
|
onCreateOption,
|
|
11390
11750
|
formatCreateLabel: formatCreateLabel$1,
|
|
11391
11751
|
isValidNewOption: () => true,
|
|
11392
|
-
|
|
11752
|
+
selectedValue: selectedAccount,
|
|
11393
11753
|
isClearable: true,
|
|
11394
11754
|
isLoading: isLoadingCustomAccounts,
|
|
11395
|
-
|
|
11396
|
-
|
|
11755
|
+
isDisabled: !!customAccountsError,
|
|
11756
|
+
isError: !!customAccountsError,
|
|
11757
|
+
className: "Layer__upload-transactions__select-account-name-input",
|
|
11758
|
+
slots: { Option: AccountOption, SingleValue: AccountSingleValue }
|
|
11397
11759
|
}
|
|
11398
11760
|
)
|
|
11399
11761
|
] }),
|
|
@@ -11760,7 +12122,8 @@ function UploadTransactionsHeader({ currentStep, isValid: isValid2, onClose }) {
|
|
|
11760
12122
|
{
|
|
11761
12123
|
heading: /* @__PURE__ */ jsx(Heading$1, { level: 1, size: "sm", children: title }),
|
|
11762
12124
|
description: /* @__PURE__ */ jsx(Heading$1, { level: 2, size: "xs", variant: "subtle", weight: "normal", children: description }),
|
|
11763
|
-
onClose
|
|
12125
|
+
onClose,
|
|
12126
|
+
hideBottomPadding: true
|
|
11764
12127
|
}
|
|
11765
12128
|
);
|
|
11766
12129
|
}
|
|
@@ -11970,8 +12333,8 @@ const BulkActionsModule = ({ showSelectedLabel = true, fullWidth = false, slots
|
|
|
11970
12333
|
/* @__PURE__ */ jsx(slots.BulkActions, {})
|
|
11971
12334
|
] });
|
|
11972
12335
|
};
|
|
11973
|
-
const DownloadCloud = (
|
|
11974
|
-
var
|
|
12336
|
+
const DownloadCloud = (_Kb) => {
|
|
12337
|
+
var _Lb = _Kb, { size = 18 } = _Lb, props = __objRest(_Lb, ["size"]);
|
|
11975
12338
|
return /* @__PURE__ */ jsxs(
|
|
11976
12339
|
"svg",
|
|
11977
12340
|
__spreadProps(__spreadValues({
|
|
@@ -12022,7 +12385,7 @@ const DownloadButton$1 = ({
|
|
|
12022
12385
|
text = "Download",
|
|
12023
12386
|
retryText = "Retry",
|
|
12024
12387
|
errorText = "Download failed. Check connection and retry in few seconds.",
|
|
12025
|
-
variant =
|
|
12388
|
+
variant = ButtonVariant.secondary,
|
|
12026
12389
|
disabled = false
|
|
12027
12390
|
}) => {
|
|
12028
12391
|
if (requestFailed) {
|
|
@@ -12189,45 +12552,6 @@ function MonthCalendar({
|
|
|
12189
12552
|
)
|
|
12190
12553
|
] });
|
|
12191
12554
|
}
|
|
12192
|
-
const POPOVER_CLASS_NAME = "Layer__Popover";
|
|
12193
|
-
const POPOVER_CLASS_NAMES = `Layer__Portal ${POPOVER_CLASS_NAME}`;
|
|
12194
|
-
const Popover = forwardRef(
|
|
12195
|
-
function Popover2(_rb, ref) {
|
|
12196
|
-
var _sb = _rb, { flexInline = false } = _sb, restProps = __objRest(_sb, ["flexInline"]);
|
|
12197
|
-
const dataProperties = toDataProperties({ "flex-inline": flexInline });
|
|
12198
|
-
return /* @__PURE__ */ jsx(
|
|
12199
|
-
Popover$1,
|
|
12200
|
-
__spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
|
|
12201
|
-
className: POPOVER_CLASS_NAMES,
|
|
12202
|
-
ref
|
|
12203
|
-
})
|
|
12204
|
-
);
|
|
12205
|
-
}
|
|
12206
|
-
);
|
|
12207
|
-
function ResponsivePopover({ children, triggerRef }) {
|
|
12208
|
-
const { isMobile } = useSizeClass();
|
|
12209
|
-
if (isMobile) {
|
|
12210
|
-
return /* @__PURE__ */ jsx(
|
|
12211
|
-
Modal,
|
|
12212
|
-
{
|
|
12213
|
-
flexBlock: true,
|
|
12214
|
-
flexInline: true,
|
|
12215
|
-
variant: "mobile-popover",
|
|
12216
|
-
isDismissable: true,
|
|
12217
|
-
children
|
|
12218
|
-
}
|
|
12219
|
-
);
|
|
12220
|
-
}
|
|
12221
|
-
return /* @__PURE__ */ jsx(
|
|
12222
|
-
Popover,
|
|
12223
|
-
{
|
|
12224
|
-
triggerRef,
|
|
12225
|
-
placement: "bottom left",
|
|
12226
|
-
flexInline: true,
|
|
12227
|
-
children
|
|
12228
|
-
}
|
|
12229
|
-
);
|
|
12230
|
-
}
|
|
12231
12555
|
const MonthPicker = ({
|
|
12232
12556
|
label,
|
|
12233
12557
|
showLabel = true,
|
|
@@ -12246,31 +12570,34 @@ const MonthPicker = ({
|
|
|
12246
12570
|
}, [onChange]);
|
|
12247
12571
|
const inputValue = format(date.toDate(), truncateMonth ? MONTH_YEAR_FORMAT_SHORT : MONTH_YEAR_FORMAT);
|
|
12248
12572
|
const additionalAriaProps = !showLabel && { "aria-label": label };
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
/* @__PURE__ */
|
|
12252
|
-
|
|
12253
|
-
|
|
12254
|
-
|
|
12255
|
-
|
|
12256
|
-
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
|
|
12260
|
-
|
|
12261
|
-
|
|
12262
|
-
|
|
12263
|
-
|
|
12264
|
-
|
|
12265
|
-
|
|
12266
|
-
{
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
|
|
12273
|
-
|
|
12573
|
+
const inputId = useId();
|
|
12574
|
+
return /* @__PURE__ */ jsxs(VStack, { children: [
|
|
12575
|
+
showLabel && /* @__PURE__ */ jsx(Label, { pbe: "3xs", size: "sm", htmlFor: inputId, children: label }),
|
|
12576
|
+
/* @__PURE__ */ jsxs(DialogTrigger, { isOpen: isPopoverOpen, onOpenChange: setPopoverOpen, children: [
|
|
12577
|
+
/* @__PURE__ */ jsxs(
|
|
12578
|
+
InputGroup$1,
|
|
12579
|
+
{
|
|
12580
|
+
ref: triggerRef,
|
|
12581
|
+
slot: "input",
|
|
12582
|
+
className: classNames("Layer__MonthPicker__InputGroup", { "Layer__MonthPicker__InputGroup--truncated": truncateMonth }),
|
|
12583
|
+
onClick: () => setPopoverOpen(true),
|
|
12584
|
+
children: [
|
|
12585
|
+
/* @__PURE__ */ jsx(Input$1, __spreadProps(__spreadValues({ inset: true }, additionalAriaProps), { value: inputValue, readOnly: true, id: inputId })),
|
|
12586
|
+
/* @__PURE__ */ jsx(PickerDropdownIndicator, { onClick: () => setPopoverOpen(true) })
|
|
12587
|
+
]
|
|
12588
|
+
}
|
|
12589
|
+
),
|
|
12590
|
+
/* @__PURE__ */ jsx(ResponsivePopover, { triggerRef, children: /* @__PURE__ */ jsx(Dialog$1, { children: /* @__PURE__ */ jsx(
|
|
12591
|
+
MonthCalendar,
|
|
12592
|
+
{
|
|
12593
|
+
date,
|
|
12594
|
+
onChange: onChangeMonth,
|
|
12595
|
+
minDate,
|
|
12596
|
+
maxDate,
|
|
12597
|
+
variant: value
|
|
12598
|
+
}
|
|
12599
|
+
) }) })
|
|
12600
|
+
] })
|
|
12274
12601
|
] });
|
|
12275
12602
|
};
|
|
12276
12603
|
const SmallLoader = ({ size = 28 }) => {
|
|
@@ -12432,8 +12759,7 @@ const DownloadButton = ({
|
|
|
12432
12759
|
const BankTransactionsHeader = ({
|
|
12433
12760
|
shiftStickyHeader,
|
|
12434
12761
|
asWidget,
|
|
12435
|
-
|
|
12436
|
-
listView,
|
|
12762
|
+
tableContentMode,
|
|
12437
12763
|
stringOverrides,
|
|
12438
12764
|
isSyncing,
|
|
12439
12765
|
withUploadMenu,
|
|
@@ -12463,7 +12789,8 @@ const BankTransactionsHeader = ({
|
|
|
12463
12789
|
}, [setFilters]);
|
|
12464
12790
|
const { count } = useCountSelectedIds();
|
|
12465
12791
|
const showBulkActions = count > 0;
|
|
12466
|
-
const isMobileList =
|
|
12792
|
+
const isMobileList = tableContentMode === BankTransactionsTableContent.MobileList;
|
|
12793
|
+
const isListView = isMobileList || tableContentMode === BankTransactionsTableContent.List;
|
|
12467
12794
|
const headerTopRow = useMemo(() => /* @__PURE__ */ jsxs("div", { className: "Layer__bank-transactions__header__content", children: [
|
|
12468
12795
|
/* @__PURE__ */ jsxs(HStack, { align: "center", children: [
|
|
12469
12796
|
/* @__PURE__ */ jsx(
|
|
@@ -12479,7 +12806,7 @@ const BankTransactionsHeader = ({
|
|
|
12479
12806
|
{
|
|
12480
12807
|
timeSync: 5,
|
|
12481
12808
|
inProgress: true,
|
|
12482
|
-
hideContent:
|
|
12809
|
+
hideContent: isListView
|
|
12483
12810
|
}
|
|
12484
12811
|
)
|
|
12485
12812
|
] }),
|
|
@@ -12499,7 +12826,7 @@ const BankTransactionsHeader = ({
|
|
|
12499
12826
|
activationDate,
|
|
12500
12827
|
asWidget,
|
|
12501
12828
|
isSyncing,
|
|
12502
|
-
|
|
12829
|
+
isListView,
|
|
12503
12830
|
monthPickerDate,
|
|
12504
12831
|
setDateRange,
|
|
12505
12832
|
stringOverrides == null ? void 0 : stringOverrides.header,
|
|
@@ -12534,7 +12861,8 @@ const BankTransactionsHeader = ({
|
|
|
12534
12861
|
}
|
|
12535
12862
|
);
|
|
12536
12863
|
}, [isMobileList]);
|
|
12537
|
-
const
|
|
12864
|
+
const isStatusToggleVisible = isCategorizationEnabled && showStatusToggle;
|
|
12865
|
+
const statusToggle = isStatusToggleVisible ? /* @__PURE__ */ jsx(
|
|
12538
12866
|
Toggle,
|
|
12539
12867
|
{
|
|
12540
12868
|
ariaLabel: "Categorization status",
|
|
@@ -12547,50 +12875,34 @@ const BankTransactionsHeader = ({
|
|
|
12547
12875
|
fullWidth: isMobileList
|
|
12548
12876
|
}
|
|
12549
12877
|
) : null;
|
|
12550
|
-
if (
|
|
12878
|
+
if (isListView) {
|
|
12551
12879
|
return /* @__PURE__ */ jsx(
|
|
12552
12880
|
Header$1,
|
|
12553
12881
|
{
|
|
12554
12882
|
className: classNames(
|
|
12555
12883
|
"Layer__bank-transactions__header",
|
|
12556
12884
|
withDatePicker && "Layer__bank-transactions__header--with-date-picker",
|
|
12557
|
-
"Layer__bank-transactions__header--mobile"
|
|
12885
|
+
isMobileList && "Layer__bank-transactions__header--mobile"
|
|
12558
12886
|
),
|
|
12559
12887
|
style: { top: shiftStickyHeader },
|
|
12560
|
-
children: /* @__PURE__ */ jsxs(VStack, { gap: "
|
|
12888
|
+
children: /* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
|
|
12561
12889
|
headerTopRow,
|
|
12562
|
-
|
|
12890
|
+
showBulkActions && /* @__PURE__ */ jsx(
|
|
12563
12891
|
BulkActionsModule,
|
|
12564
12892
|
{
|
|
12565
|
-
showSelectedLabel:
|
|
12566
|
-
fullWidth:
|
|
12893
|
+
showSelectedLabel: !isMobileList,
|
|
12894
|
+
fullWidth: isMobileList,
|
|
12567
12895
|
slots: { BulkActions }
|
|
12568
12896
|
}
|
|
12569
|
-
)
|
|
12570
|
-
|
|
12571
|
-
/* @__PURE__ */ jsx(BankTransactionsHeaderMenu, { actions: headerMenuActions, isDisabled: showBulkActions })
|
|
12572
|
-
] }) }),
|
|
12573
|
-
/* @__PURE__ */ jsx(TransactionsSearch, { isDisabled: showBulkActions })
|
|
12574
|
-
] })
|
|
12575
|
-
}
|
|
12576
|
-
);
|
|
12577
|
-
}
|
|
12578
|
-
if (listView) {
|
|
12579
|
-
return /* @__PURE__ */ jsx(
|
|
12580
|
-
Header$1,
|
|
12581
|
-
{
|
|
12582
|
-
className: classNames(
|
|
12583
|
-
"Layer__bank-transactions__header",
|
|
12584
|
-
withDatePicker && "Layer__bank-transactions__header--with-date-picker"
|
|
12585
|
-
),
|
|
12586
|
-
style: { top: shiftStickyHeader },
|
|
12587
|
-
children: /* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
|
|
12588
|
-
headerTopRow,
|
|
12589
|
-
/* @__PURE__ */ jsx(HStack, { justify: "space-between", align: "center", gap: "xs", children: showBulkActions ? /* @__PURE__ */ jsx(BulkActionsModule, { slots: { BulkActions } }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12897
|
+
),
|
|
12898
|
+
!showBulkActions && isStatusToggleVisible && /* @__PURE__ */ jsxs(HStack, { justify: "space-between", align: "center", gap: "xs", children: [
|
|
12590
12899
|
statusToggle,
|
|
12591
|
-
/* @__PURE__ */ jsx(BankTransactionsHeaderMenu, { actions: headerMenuActions
|
|
12592
|
-
] })
|
|
12593
|
-
/* @__PURE__ */
|
|
12900
|
+
/* @__PURE__ */ jsx(BankTransactionsHeaderMenu, { actions: headerMenuActions })
|
|
12901
|
+
] }),
|
|
12902
|
+
/* @__PURE__ */ jsxs(HStack, { className: "Layer__bank-transactions__header__search-and-menu", align: "center", gap: "xs", children: [
|
|
12903
|
+
/* @__PURE__ */ jsx(TransactionsSearch, { isDisabled: showBulkActions }),
|
|
12904
|
+
!isStatusToggleVisible && /* @__PURE__ */ jsx(BankTransactionsHeaderMenu, { actions: headerMenuActions, isDisabled: showBulkActions })
|
|
12905
|
+
] })
|
|
12594
12906
|
] })
|
|
12595
12907
|
}
|
|
12596
12908
|
);
|
|
@@ -12616,7 +12928,7 @@ const BankTransactionsHeader = ({
|
|
|
12616
12928
|
DownloadButton,
|
|
12617
12929
|
{
|
|
12618
12930
|
downloadButtonTextOverride: stringOverrides == null ? void 0 : stringOverrides.downloadButton,
|
|
12619
|
-
iconOnly:
|
|
12931
|
+
iconOnly: isListView,
|
|
12620
12932
|
disabled: showBulkActions
|
|
12621
12933
|
}
|
|
12622
12934
|
),
|
|
@@ -13000,8 +13312,8 @@ function useDelayedVisibility({
|
|
|
13000
13312
|
);
|
|
13001
13313
|
return { isVisible };
|
|
13002
13314
|
}
|
|
13003
|
-
const File$1 = (
|
|
13004
|
-
var
|
|
13315
|
+
const File$1 = (_Mb) => {
|
|
13316
|
+
var _Nb = _Mb, { size = 12 } = _Nb, props = __objRest(_Nb, ["size"]);
|
|
13005
13317
|
return /* @__PURE__ */ jsxs(
|
|
13006
13318
|
"svg",
|
|
13007
13319
|
__spreadProps(__spreadValues({
|
|
@@ -13084,15 +13396,15 @@ const variants = {
|
|
|
13084
13396
|
}
|
|
13085
13397
|
}
|
|
13086
13398
|
};
|
|
13087
|
-
function AnimatedPresenceElementInner(
|
|
13088
|
-
var
|
|
13399
|
+
function AnimatedPresenceElementInner(_Ob, ref) {
|
|
13400
|
+
var _Pb = _Ob, {
|
|
13089
13401
|
as,
|
|
13090
13402
|
children,
|
|
13091
13403
|
variant,
|
|
13092
13404
|
isOpen,
|
|
13093
13405
|
slotProps = { AnimatePresence: { initial: false } },
|
|
13094
13406
|
motionKey
|
|
13095
|
-
} =
|
|
13407
|
+
} = _Pb, props = __objRest(_Pb, [
|
|
13096
13408
|
"as",
|
|
13097
13409
|
"children",
|
|
13098
13410
|
"variant",
|
|
@@ -13291,8 +13603,8 @@ function useBookkeepingPeriods() {
|
|
|
13291
13603
|
}
|
|
13292
13604
|
});
|
|
13293
13605
|
}
|
|
13294
|
-
const Clock = (
|
|
13295
|
-
var
|
|
13606
|
+
const Clock = (_Qb) => {
|
|
13607
|
+
var _Rb = _Qb, { size = 18 } = _Rb, props = __objRest(_Rb, ["size"]);
|
|
13296
13608
|
return /* @__PURE__ */ jsxs(
|
|
13297
13609
|
"svg",
|
|
13298
13610
|
__spreadProps(__spreadValues({
|
|
@@ -13618,8 +13930,8 @@ const useSplitsForm = ({
|
|
|
13618
13930
|
saveLocalSplitsToCategoryStore
|
|
13619
13931
|
};
|
|
13620
13932
|
};
|
|
13621
|
-
const ScissorsFullOpen = (
|
|
13622
|
-
var
|
|
13933
|
+
const ScissorsFullOpen = (_Sb) => {
|
|
13934
|
+
var _Tb = _Sb, { size = 12 } = _Tb, props = __objRest(_Tb, ["size"]);
|
|
13623
13935
|
return /* @__PURE__ */ jsx(
|
|
13624
13936
|
"svg",
|
|
13625
13937
|
__spreadProps(__spreadValues({
|
|
@@ -13684,8 +13996,8 @@ const ScissorsFullOpen = (_zb) => {
|
|
|
13684
13996
|
})
|
|
13685
13997
|
);
|
|
13686
13998
|
};
|
|
13687
|
-
const Trash = (
|
|
13688
|
-
var
|
|
13999
|
+
const Trash = (_Ub) => {
|
|
14000
|
+
var _Vb = _Ub, { size = 18 } = _Vb, props = __objRest(_Vb, ["size"]);
|
|
13689
14001
|
return /* @__PURE__ */ jsxs(
|
|
13690
14002
|
"svg",
|
|
13691
14003
|
__spreadProps(__spreadValues({
|
|
@@ -13936,8 +14248,8 @@ const ReceiptsProvider = ({
|
|
|
13936
14248
|
const contextData = useReceipts({ bankTransaction, isActive });
|
|
13937
14249
|
return /* @__PURE__ */ jsx(ReceiptsContext.Provider, { value: contextData, children });
|
|
13938
14250
|
};
|
|
13939
|
-
const Eye = (
|
|
13940
|
-
var
|
|
14251
|
+
const Eye = (_Wb) => {
|
|
14252
|
+
var _Xb = _Wb, { size = 18 } = _Xb, props = __objRest(_Xb, ["size"]);
|
|
13941
14253
|
return /* @__PURE__ */ jsx(
|
|
13942
14254
|
"svg",
|
|
13943
14255
|
__spreadProps(__spreadValues({
|
|
@@ -14073,11 +14385,11 @@ const FileThumb = ({
|
|
|
14073
14385
|
}
|
|
14074
14386
|
);
|
|
14075
14387
|
};
|
|
14076
|
-
const TextButton = (
|
|
14077
|
-
var
|
|
14388
|
+
const TextButton = (_Yb) => {
|
|
14389
|
+
var _Zb = _Yb, {
|
|
14078
14390
|
className,
|
|
14079
14391
|
children
|
|
14080
|
-
} =
|
|
14392
|
+
} = _Zb, props = __objRest(_Zb, [
|
|
14081
14393
|
"className",
|
|
14082
14394
|
"children"
|
|
14083
14395
|
]);
|
|
@@ -14165,8 +14477,8 @@ const openReceiptInNewTab = (url, index) => (e) => {
|
|
|
14165
14477
|
`);
|
|
14166
14478
|
}
|
|
14167
14479
|
};
|
|
14168
|
-
const BankTransactionReceiptsWithProvider = forwardRef((
|
|
14169
|
-
var
|
|
14480
|
+
const BankTransactionReceiptsWithProvider = forwardRef((__b, ref) => {
|
|
14481
|
+
var _$b = __b, { bankTransaction, isActive } = _$b, props = __objRest(_$b, ["bankTransaction", "isActive"]);
|
|
14170
14482
|
return /* @__PURE__ */ jsx(ReceiptsProvider, { bankTransaction, isActive, children: /* @__PURE__ */ jsx(BankTransactionReceipts, __spreadProps(__spreadValues({}, props), { ref })) });
|
|
14171
14483
|
});
|
|
14172
14484
|
BankTransactionReceiptsWithProvider.displayName = "BankTransactionReceiptsWithProvider";
|
|
@@ -14228,8 +14540,8 @@ const transformCurrencyValue = (rawValue) => {
|
|
|
14228
14540
|
}
|
|
14229
14541
|
return cleaned;
|
|
14230
14542
|
};
|
|
14231
|
-
const AmountInput = (
|
|
14232
|
-
var
|
|
14543
|
+
const AmountInput = (_ac) => {
|
|
14544
|
+
var _bc = _ac, {
|
|
14233
14545
|
onChange,
|
|
14234
14546
|
className,
|
|
14235
14547
|
leftText,
|
|
@@ -14237,7 +14549,7 @@ const AmountInput = (_Jb) => {
|
|
|
14237
14549
|
isInvalid,
|
|
14238
14550
|
badge,
|
|
14239
14551
|
placeholder = "$0.00"
|
|
14240
|
-
} =
|
|
14552
|
+
} = _bc, props = __objRest(_bc, [
|
|
14241
14553
|
"onChange",
|
|
14242
14554
|
"className",
|
|
14243
14555
|
"leftText",
|
|
@@ -14551,12 +14863,12 @@ const useBankTransactionMemo = ({ bankTransactionId }) => {
|
|
|
14551
14863
|
isSaved
|
|
14552
14864
|
}), [form, isErrorUpdatingMemo, isUpdatingMemo, isSaved]);
|
|
14553
14865
|
};
|
|
14554
|
-
const Textarea = (
|
|
14555
|
-
var
|
|
14866
|
+
const Textarea = (_cc) => {
|
|
14867
|
+
var _dc = _cc, {
|
|
14556
14868
|
className,
|
|
14557
14869
|
isInvalid,
|
|
14558
14870
|
errorMessage
|
|
14559
|
-
} =
|
|
14871
|
+
} = _dc, props = __objRest(_dc, [
|
|
14560
14872
|
"className",
|
|
14561
14873
|
"isInvalid",
|
|
14562
14874
|
"errorMessage"
|
|
@@ -15535,9 +15847,6 @@ function useTagDimensionByKey({ isEnabled = true, dimensionKey }) {
|
|
|
15535
15847
|
);
|
|
15536
15848
|
return new TagDimensionByKeySWRResponse(swrResponse);
|
|
15537
15849
|
}
|
|
15538
|
-
function usePreloadTagDimensionByKey(parameters) {
|
|
15539
|
-
useTagDimensionByKey(parameters);
|
|
15540
|
-
}
|
|
15541
15850
|
class TagValueDefinitionAsOption {
|
|
15542
15851
|
constructor(tagValueDefinition) {
|
|
15543
15852
|
__publicField(this, "tagValueDefinition");
|
|
@@ -16343,8 +16652,8 @@ const BankTransactionsMobileListItemCheckbox = ({
|
|
|
16343
16652
|
}
|
|
16344
16653
|
) });
|
|
16345
16654
|
};
|
|
16346
|
-
const Paperclip = (
|
|
16347
|
-
var
|
|
16655
|
+
const Paperclip = (_ec) => {
|
|
16656
|
+
var _fc = _ec, { size = 20 } = _fc, props = __objRest(_fc, ["size"]);
|
|
16348
16657
|
return /* @__PURE__ */ jsx(
|
|
16349
16658
|
"svg",
|
|
16350
16659
|
__spreadProps(__spreadValues({
|
|
@@ -18065,8 +18374,8 @@ function useArchiveCategorizationRule() {
|
|
|
18065
18374
|
}
|
|
18066
18375
|
});
|
|
18067
18376
|
}
|
|
18068
|
-
const BackArrow = (
|
|
18069
|
-
var
|
|
18377
|
+
const BackArrow = (_gc) => {
|
|
18378
|
+
var _hc = _gc, { size = 18 } = _hc, props = __objRest(_hc, ["size"]);
|
|
18070
18379
|
return /* @__PURE__ */ jsx(
|
|
18071
18380
|
"svg",
|
|
18072
18381
|
__spreadProps(__spreadValues({
|
|
@@ -18233,31 +18542,8 @@ const usePaginationRange = ({
|
|
|
18233
18542
|
}, [totalCount, pageSize, siblingCount, currentPage]);
|
|
18234
18543
|
return paginationRange;
|
|
18235
18544
|
};
|
|
18236
|
-
const
|
|
18237
|
-
var
|
|
18238
|
-
return /* @__PURE__ */ jsx(
|
|
18239
|
-
"svg",
|
|
18240
|
-
__spreadProps(__spreadValues({
|
|
18241
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
18242
|
-
width: "18",
|
|
18243
|
-
height: "18",
|
|
18244
|
-
viewBox: "0 0 18 18",
|
|
18245
|
-
fill: "none"
|
|
18246
|
-
}, props), {
|
|
18247
|
-
children: /* @__PURE__ */ jsx(
|
|
18248
|
-
"path",
|
|
18249
|
-
{
|
|
18250
|
-
d: "M11.25 13.5L6.75 9L11.25 4.5",
|
|
18251
|
-
stroke: "currentColor",
|
|
18252
|
-
strokeLinecap: "round",
|
|
18253
|
-
strokeLinejoin: "round"
|
|
18254
|
-
}
|
|
18255
|
-
)
|
|
18256
|
-
})
|
|
18257
|
-
);
|
|
18258
|
-
};
|
|
18259
|
-
const PaginationButton = (_Sb) => {
|
|
18260
|
-
var _Tb = _Sb, { children, isSelected } = _Tb, buttonProps = __objRest(_Tb, ["children", "isSelected"]);
|
|
18545
|
+
const PaginationButton = (_ic) => {
|
|
18546
|
+
var _jc = _ic, { children, isSelected } = _jc, buttonProps = __objRest(_jc, ["children", "isSelected"]);
|
|
18261
18547
|
return /* @__PURE__ */ jsx(
|
|
18262
18548
|
Button,
|
|
18263
18549
|
__spreadProps(__spreadValues({
|
|
@@ -18458,8 +18744,8 @@ const getColumnDefs = (columnConfig2) => {
|
|
|
18458
18744
|
const CSS_PREFIX$1 = "Layer__UI__Table";
|
|
18459
18745
|
const getClassName = (component, additionalClassNames, withHidden) => classNames(`${CSS_PREFIX$1}-${component}`, withHidden && `${CSS_PREFIX$1}-${component}--hidden`, additionalClassNames);
|
|
18460
18746
|
const Table$1 = forwardRef(
|
|
18461
|
-
(
|
|
18462
|
-
var
|
|
18747
|
+
(_kc, ref) => {
|
|
18748
|
+
var _lc = _kc, { children, className, nonAria, slot } = _lc, restProps = __objRest(_lc, ["children", "className", "nonAria", "slot"]);
|
|
18463
18749
|
const TableComponent = nonAria ? "table" : Table$2;
|
|
18464
18750
|
return /* @__PURE__ */ jsx(
|
|
18465
18751
|
TableComponent,
|
|
@@ -18474,8 +18760,8 @@ const Table$1 = forwardRef(
|
|
|
18474
18760
|
}
|
|
18475
18761
|
);
|
|
18476
18762
|
Table$1.displayName = "Table";
|
|
18477
|
-
const TableHeaderInner = (
|
|
18478
|
-
var
|
|
18763
|
+
const TableHeaderInner = (_mc, ref) => {
|
|
18764
|
+
var _nc = _mc, { children, className, hideHeader, nonAria } = _nc, restProps = __objRest(_nc, ["children", "className", "hideHeader", "nonAria"]);
|
|
18479
18765
|
const TableHeaderComponent = nonAria ? "thead" : TableHeader$1;
|
|
18480
18766
|
return /* @__PURE__ */ jsx(
|
|
18481
18767
|
TableHeaderComponent,
|
|
@@ -18489,8 +18775,8 @@ const TableHeaderInner = (_Wb, ref) => {
|
|
|
18489
18775
|
};
|
|
18490
18776
|
const TableHeader = forwardRef(TableHeaderInner);
|
|
18491
18777
|
TableHeader.displayName = "TableHeader";
|
|
18492
|
-
const TableBodyInner = (
|
|
18493
|
-
var
|
|
18778
|
+
const TableBodyInner = (_oc, ref) => {
|
|
18779
|
+
var _pc = _oc, { children, className, nonAria } = _pc, restProps = __objRest(_pc, ["children", "className", "nonAria"]);
|
|
18494
18780
|
const TableBodyComponent = nonAria ? "tbody" : TableBody$2;
|
|
18495
18781
|
return /* @__PURE__ */ jsx(
|
|
18496
18782
|
TableBodyComponent,
|
|
@@ -18504,8 +18790,8 @@ const TableBodyInner = (_Yb, ref) => {
|
|
|
18504
18790
|
};
|
|
18505
18791
|
const TableBody$1 = forwardRef(TableBodyInner);
|
|
18506
18792
|
TableBody$1.displayName = "TableBody";
|
|
18507
|
-
const RowInner = (
|
|
18508
|
-
var
|
|
18793
|
+
const RowInner = (_qc, ref) => {
|
|
18794
|
+
var _rc = _qc, { children, className, depth = 0, nonAria, id } = _rc, restProps = __objRest(_rc, ["children", "className", "depth", "nonAria", "id"]);
|
|
18509
18795
|
const dataProperties = toDataProperties({ depth });
|
|
18510
18796
|
const RowComponent = nonAria ? "tr" : Row$1;
|
|
18511
18797
|
return /* @__PURE__ */ jsx(
|
|
@@ -18522,8 +18808,8 @@ const RowInner = (__b, ref) => {
|
|
|
18522
18808
|
const Row = forwardRef(RowInner);
|
|
18523
18809
|
Row.displayName = "Row";
|
|
18524
18810
|
const Column = forwardRef(
|
|
18525
|
-
(
|
|
18526
|
-
var
|
|
18811
|
+
(_sc, ref) => {
|
|
18812
|
+
var _tc = _sc, { children, className, nonAria, id, textAlign = "left", colSpan = 1 } = _tc, restProps = __objRest(_tc, ["children", "className", "nonAria", "id", "textAlign", "colSpan"]);
|
|
18527
18813
|
const dataProperties = toDataProperties({ "text-align": textAlign });
|
|
18528
18814
|
const columnClassName = getClassName("Column", className);
|
|
18529
18815
|
const ColumnComponent = nonAria ? "th" : Column$1;
|
|
@@ -18542,8 +18828,8 @@ const Column = forwardRef(
|
|
|
18542
18828
|
);
|
|
18543
18829
|
Column.displayName = "Column";
|
|
18544
18830
|
const Cell = forwardRef(
|
|
18545
|
-
(
|
|
18546
|
-
var
|
|
18831
|
+
(_uc, ref) => {
|
|
18832
|
+
var _vc = _uc, { children, className, nonAria, id } = _vc, restProps = __objRest(_vc, ["children", "className", "nonAria", "id"]);
|
|
18547
18833
|
const CellComponent = nonAria ? "td" : Cell$1;
|
|
18548
18834
|
return /* @__PURE__ */ jsx(
|
|
18549
18835
|
CellComponent,
|
|
@@ -19456,8 +19742,8 @@ function useTagDimensions({ isEnabled = true } = {}) {
|
|
|
19456
19742
|
function usePreloadTagDimensions(parameters) {
|
|
19457
19743
|
useTagDimensions(parameters);
|
|
19458
19744
|
}
|
|
19459
|
-
const Inbox = (
|
|
19460
|
-
var
|
|
19745
|
+
const Inbox = (_wc) => {
|
|
19746
|
+
var _xc = _wc, { size = 18 } = _xc, props = __objRest(_xc, ["size"]);
|
|
19461
19747
|
return /* @__PURE__ */ jsxs(
|
|
19462
19748
|
"svg",
|
|
19463
19749
|
__spreadProps(__spreadValues({
|
|
@@ -19537,8 +19823,8 @@ function BankTransactionsListWithEmptyStates({
|
|
|
19537
19823
|
return slots.List;
|
|
19538
19824
|
}
|
|
19539
19825
|
const COMPONENT_NAME$d = "bank-transactions";
|
|
19540
|
-
const BankTransactions = (
|
|
19541
|
-
var
|
|
19826
|
+
const BankTransactions = (_yc) => {
|
|
19827
|
+
var _zc = _yc, {
|
|
19542
19828
|
onError,
|
|
19543
19829
|
showTags = false,
|
|
19544
19830
|
showCustomerVendor = false,
|
|
@@ -19547,7 +19833,7 @@ const BankTransactions = (_gc) => {
|
|
|
19547
19833
|
mode,
|
|
19548
19834
|
renderInAppLink,
|
|
19549
19835
|
filters
|
|
19550
|
-
} =
|
|
19836
|
+
} = _zc, restProps = __objRest(_zc, [
|
|
19551
19837
|
"onError",
|
|
19552
19838
|
"showTags",
|
|
19553
19839
|
"showCustomerVendor",
|
|
@@ -19642,7 +19928,7 @@ const BankTransactionsTableView = ({
|
|
|
19642
19928
|
}
|
|
19643
19929
|
});
|
|
19644
19930
|
const isLastPage = data && !hasMore && Math.ceil(((data == null ? void 0 : data.length) || 0) / pageSize) === currentPage;
|
|
19645
|
-
const tableContentMode = listView && mobileComponent === "mobileList" ?
|
|
19931
|
+
const tableContentMode = listView && mobileComponent === "mobileList" ? BankTransactionsTableContent.MobileList : listView ? BankTransactionsTableContent.List : BankTransactionsTableContent.Table;
|
|
19646
19932
|
const BankTransactionsTableViewContent = useMemo(() => {
|
|
19647
19933
|
return /* @__PURE__ */ jsx("div", { className: "Layer__bank-transactions__table-wrapper", children: /* @__PURE__ */ jsx(
|
|
19648
19934
|
BankTransactionsTable,
|
|
@@ -19697,16 +19983,16 @@ const BankTransactionsTableView = ({
|
|
|
19697
19983
|
}, [bankTransactions, showDescriptions, showReceiptUploads, showTooltips]);
|
|
19698
19984
|
const slots = useMemo(() => {
|
|
19699
19985
|
switch (tableContentMode) {
|
|
19700
|
-
case
|
|
19986
|
+
case BankTransactionsTableContent.Table:
|
|
19701
19987
|
return {
|
|
19702
19988
|
List: BankTransactionsTableViewContent
|
|
19703
19989
|
};
|
|
19704
|
-
case
|
|
19990
|
+
case BankTransactionsTableContent.List:
|
|
19705
19991
|
return {
|
|
19706
19992
|
List: BankTransactionsListView,
|
|
19707
19993
|
Loader: BankTransactionsListLoader
|
|
19708
19994
|
};
|
|
19709
|
-
case
|
|
19995
|
+
case BankTransactionsTableContent.MobileList:
|
|
19710
19996
|
return {
|
|
19711
19997
|
List: BankTransactionsMobileListView,
|
|
19712
19998
|
Loader: /* @__PURE__ */ jsx(MobileListSkeleton, {})
|
|
@@ -19740,8 +20026,7 @@ const BankTransactionsTableView = ({
|
|
|
19740
20026
|
{
|
|
19741
20027
|
shiftStickyHeader,
|
|
19742
20028
|
asWidget,
|
|
19743
|
-
|
|
19744
|
-
listView,
|
|
20029
|
+
tableContentMode,
|
|
19745
20030
|
stringOverrides: stringOverrides == null ? void 0 : stringOverrides.bankTransactionsHeader,
|
|
19746
20031
|
isSyncing,
|
|
19747
20032
|
withUploadMenu: showUploadOptions,
|
|
@@ -19757,7 +20042,7 @@ const BankTransactionsTableView = ({
|
|
|
19757
20042
|
isOpen: !!ruleSuggestion,
|
|
19758
20043
|
onOpenChange: handleRuleSuggestionOpenChange,
|
|
19759
20044
|
ruleSuggestion,
|
|
19760
|
-
variant: tableContentMode ===
|
|
20045
|
+
variant: tableContentMode === BankTransactionsTableContent.MobileList ? "drawer" : "modal"
|
|
19761
20046
|
}
|
|
19762
20047
|
),
|
|
19763
20048
|
!isMonthlyViewMode && !isLoading && /* @__PURE__ */ jsx(HStack, { justify: "end", children: /* @__PURE__ */ jsx(
|
|
@@ -19854,8 +20139,8 @@ function QuickbooksContextProvider({ children }) {
|
|
|
19854
20139
|
const quickbooksContextData = useQuickbooks();
|
|
19855
20140
|
return /* @__PURE__ */ jsx(QuickbooksContext.Provider, { value: quickbooksContextData, children });
|
|
19856
20141
|
}
|
|
19857
|
-
const Cog = (
|
|
19858
|
-
var
|
|
20142
|
+
const Cog = (_Ac) => {
|
|
20143
|
+
var _Bc = _Ac, { size = 12 } = _Bc, props = __objRest(_Bc, ["size"]);
|
|
19859
20144
|
const id = useId();
|
|
19860
20145
|
return /* @__PURE__ */ jsxs(
|
|
19861
20146
|
"svg",
|
|
@@ -19876,8 +20161,8 @@ const Cog = (_ic) => {
|
|
|
19876
20161
|
})
|
|
19877
20162
|
);
|
|
19878
20163
|
};
|
|
19879
|
-
const QuickbooksIcon = (
|
|
19880
|
-
var
|
|
20164
|
+
const QuickbooksIcon = (_Cc) => {
|
|
20165
|
+
var _Dc = _Cc, { size = 24 } = _Dc, props = __objRest(_Dc, ["size"]);
|
|
19881
20166
|
return /* @__PURE__ */ jsxs(
|
|
19882
20167
|
"svg",
|
|
19883
20168
|
__spreadProps(__spreadValues({
|
|
@@ -20036,8 +20321,8 @@ function IntegrationsQuickbooksUnlinkConfirmationModal({ isOpen, onOpenChange })
|
|
|
20036
20321
|
}
|
|
20037
20322
|
);
|
|
20038
20323
|
}
|
|
20039
|
-
const MoreVertical = (
|
|
20040
|
-
var
|
|
20324
|
+
const MoreVertical = (_Ec) => {
|
|
20325
|
+
var _Fc = _Ec, { size = 18 } = _Fc, props = __objRest(_Fc, ["size"]);
|
|
20041
20326
|
return /* @__PURE__ */ jsxs(
|
|
20042
20327
|
"svg",
|
|
20043
20328
|
__spreadProps(__spreadValues({
|
|
@@ -20266,8 +20551,8 @@ const IntegrationsComponent = ({
|
|
|
20266
20551
|
(quickbooksConnectionStatus == null ? void 0 : quickbooksConnectionStatus.is_connected) && /* @__PURE__ */ jsx(IntegrationsContent, {})
|
|
20267
20552
|
] });
|
|
20268
20553
|
};
|
|
20269
|
-
const PlusIcon = (
|
|
20270
|
-
var
|
|
20554
|
+
const PlusIcon = (_Gc) => {
|
|
20555
|
+
var _Hc = _Gc, { size = 14 } = _Hc, props = __objRest(_Hc, ["size"]);
|
|
20271
20556
|
return /* @__PURE__ */ jsxs(
|
|
20272
20557
|
"svg",
|
|
20273
20558
|
__spreadProps(__spreadValues({
|
|
@@ -20309,8 +20594,8 @@ const PlusIcon = (_oc) => {
|
|
|
20309
20594
|
})
|
|
20310
20595
|
);
|
|
20311
20596
|
};
|
|
20312
|
-
const InstitutionIcon = (
|
|
20313
|
-
var
|
|
20597
|
+
const InstitutionIcon = (_Ic) => {
|
|
20598
|
+
var _Jc = _Ic, { size = 18 } = _Jc, props = __objRest(_Jc, ["size"]);
|
|
20314
20599
|
return /* @__PURE__ */ jsxs(
|
|
20315
20600
|
"svg",
|
|
20316
20601
|
__spreadProps(__spreadValues({
|
|
@@ -20928,8 +21213,8 @@ const MenuItem = forwardRef(
|
|
|
20928
21213
|
);
|
|
20929
21214
|
const PILL_CLASS_NAME = "Layer__Pill";
|
|
20930
21215
|
const Pill = forwardRef(
|
|
20931
|
-
function Pill2(
|
|
20932
|
-
var
|
|
21216
|
+
function Pill2(_Kc, ref) {
|
|
21217
|
+
var _Lc = _Kc, { children, status } = _Lc, restProps = __objRest(_Lc, ["children", "status"]);
|
|
20933
21218
|
const dataProperties = toDataProperties({ status });
|
|
20934
21219
|
return /* @__PURE__ */ jsx(
|
|
20935
21220
|
Button$2,
|
|
@@ -21290,158 +21575,9 @@ const LinkedAccountsContent = ({
|
|
|
21290
21575
|
/* @__PURE__ */ jsx(LinkedAccountsConfirmationModal, {})
|
|
21291
21576
|
] });
|
|
21292
21577
|
};
|
|
21293
|
-
const CALENDAR_CLASS_NAME = "Layer__UI__Calendar";
|
|
21294
|
-
const Calendar = forwardRef(
|
|
21295
|
-
function Calendar2(_uc, ref) {
|
|
21296
|
-
var _vc = _uc, { className, isReadOnly } = _vc, restProps = __objRest(_vc, ["className", "isReadOnly"]);
|
|
21297
|
-
const dataProperties = toDataProperties({ readonly: isReadOnly });
|
|
21298
|
-
return /* @__PURE__ */ jsx(
|
|
21299
|
-
Calendar$1,
|
|
21300
|
-
__spreadProps(__spreadValues(__spreadValues({}, dataProperties), restProps), {
|
|
21301
|
-
isReadOnly,
|
|
21302
|
-
className: classNames(CALENDAR_CLASS_NAME, className),
|
|
21303
|
-
ref
|
|
21304
|
-
})
|
|
21305
|
-
);
|
|
21306
|
-
}
|
|
21307
|
-
);
|
|
21308
|
-
const CALENDAR_GRID_CLASS_NAME = "Layer__UI__CalendarGrid";
|
|
21309
|
-
const CalendarGrid = forwardRef(
|
|
21310
|
-
function CalendarGrid2(_wc, ref) {
|
|
21311
|
-
var _xc = _wc, { className } = _xc, restProps = __objRest(_xc, ["className"]);
|
|
21312
|
-
return /* @__PURE__ */ jsx(
|
|
21313
|
-
CalendarGrid$1,
|
|
21314
|
-
__spreadProps(__spreadValues({}, restProps), {
|
|
21315
|
-
className: classNames(CALENDAR_GRID_CLASS_NAME, className),
|
|
21316
|
-
ref
|
|
21317
|
-
})
|
|
21318
|
-
);
|
|
21319
|
-
}
|
|
21320
|
-
);
|
|
21321
|
-
const CALENDAR_GRID_BODY_CLASS_NAME = "Layer__UI__CalendarGridBody";
|
|
21322
|
-
const CalendarGridBody = forwardRef(
|
|
21323
|
-
function CalendarGridBody2(_yc, ref) {
|
|
21324
|
-
var _zc = _yc, { className } = _zc, restProps = __objRest(_zc, ["className"]);
|
|
21325
|
-
return /* @__PURE__ */ jsx(
|
|
21326
|
-
CalendarGridBody$1,
|
|
21327
|
-
__spreadProps(__spreadValues({}, restProps), {
|
|
21328
|
-
className: classNames(CALENDAR_GRID_BODY_CLASS_NAME, className),
|
|
21329
|
-
ref
|
|
21330
|
-
})
|
|
21331
|
-
);
|
|
21332
|
-
}
|
|
21333
|
-
);
|
|
21334
|
-
const CALENDAR_CELL_CLASS_NAME = "Layer__UI__CalendarCell";
|
|
21335
|
-
const CalendarCell = forwardRef(
|
|
21336
|
-
function CalendarCell2(_Ac, ref) {
|
|
21337
|
-
var _Bc = _Ac, { className, size = "sm" } = _Bc, restProps = __objRest(_Bc, ["className", "size"]);
|
|
21338
|
-
const dataProperties = toDataProperties({ size });
|
|
21339
|
-
return /* @__PURE__ */ jsx(
|
|
21340
|
-
CalendarCell$1,
|
|
21341
|
-
__spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
|
|
21342
|
-
className: classNames(CALENDAR_CELL_CLASS_NAME, className),
|
|
21343
|
-
ref
|
|
21344
|
-
})
|
|
21345
|
-
);
|
|
21346
|
-
}
|
|
21347
|
-
);
|
|
21348
|
-
const CALENDAR_GRID_HEADER_CLASS_NAME = "Layer__UI__CalendarGridHeader";
|
|
21349
|
-
const CalendarGridHeader = forwardRef(
|
|
21350
|
-
function CalendarGridHeader2(_Cc, ref) {
|
|
21351
|
-
var _Dc = _Cc, { className } = _Dc, restProps = __objRest(_Dc, ["className"]);
|
|
21352
|
-
return /* @__PURE__ */ jsx(
|
|
21353
|
-
CalendarGridHeader$1,
|
|
21354
|
-
__spreadProps(__spreadValues({}, restProps), {
|
|
21355
|
-
className: classNames(CALENDAR_GRID_HEADER_CLASS_NAME, className),
|
|
21356
|
-
ref
|
|
21357
|
-
})
|
|
21358
|
-
);
|
|
21359
|
-
}
|
|
21360
|
-
);
|
|
21361
|
-
const CALENDAR_HEADER_CELL_CLASS_NAME = "Layer__UI__CalendarHeaderCell";
|
|
21362
|
-
const CalendarHeaderCell = forwardRef(
|
|
21363
|
-
function CalendarHeaderCell2(_Ec, ref) {
|
|
21364
|
-
var _Fc = _Ec, { className, size = "sm" } = _Fc, restProps = __objRest(_Fc, ["className", "size"]);
|
|
21365
|
-
const dataProperties = toDataProperties({ size });
|
|
21366
|
-
return /* @__PURE__ */ jsx(
|
|
21367
|
-
CalendarHeaderCell$1,
|
|
21368
|
-
__spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
|
|
21369
|
-
className: classNames(CALENDAR_HEADER_CELL_CLASS_NAME, className),
|
|
21370
|
-
ref
|
|
21371
|
-
})
|
|
21372
|
-
);
|
|
21373
|
-
}
|
|
21374
|
-
);
|
|
21375
|
-
const DateCalendar = ({ minDate, maxDate, variant }) => {
|
|
21376
|
-
return /* @__PURE__ */ jsxs(Calendar, { minValue: minDate, maxValue: maxDate, children: [
|
|
21377
|
-
/* @__PURE__ */ jsxs(HStack, { align: "center", justify: "space-between", pb: "xs", pi: "xs", className: "Layer__DateCalendar__Header", children: [
|
|
21378
|
-
/* @__PURE__ */ jsx(Button, { icon: true, inset: true, variant: "ghost", slot: "previous", children: /* @__PURE__ */ jsx(ChevronLeft, { size: 20 }) }),
|
|
21379
|
-
/* @__PURE__ */ jsx(Heading$1, { weight: "normal", size: "sm" }),
|
|
21380
|
-
/* @__PURE__ */ jsx(Button, { icon: true, inset: true, variant: "ghost", slot: "next", children: /* @__PURE__ */ jsx(ChevronRight, { size: 20 }) })
|
|
21381
|
-
] }),
|
|
21382
|
-
/* @__PURE__ */ jsx(HStack, { pb: "xs", pi: "xs", children: /* @__PURE__ */ jsxs(CalendarGrid, { children: [
|
|
21383
|
-
/* @__PURE__ */ jsx(CalendarGridHeader, { children: (day) => /* @__PURE__ */ jsx(CalendarHeaderCell, { size: variant === "mobile" ? "md" : "sm", children: day }) }),
|
|
21384
|
-
/* @__PURE__ */ jsx(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx(CalendarCell, { date, size: variant === "mobile" ? "md" : "sm" }) })
|
|
21385
|
-
] }) })
|
|
21386
|
-
] });
|
|
21387
|
-
};
|
|
21388
|
-
const DatePickerInput = ({ errorText, variant, onClick }) => {
|
|
21389
|
-
const errorTriangle = useMemo(() => {
|
|
21390
|
-
if (variant === "mobile" || !errorText) return null;
|
|
21391
|
-
return /* @__PURE__ */ jsxs(DeprecatedTooltip, { offset: 12, children: [
|
|
21392
|
-
/* @__PURE__ */ jsx(DeprecatedTooltipTrigger, { children: /* @__PURE__ */ jsx(FieldError, { children: /* @__PURE__ */ jsx(TriangleAlert, { size: 18 }) }) }),
|
|
21393
|
-
/* @__PURE__ */ jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", width: "md", children: errorText })
|
|
21394
|
-
] });
|
|
21395
|
-
}, [errorText, variant]);
|
|
21396
|
-
if (variant === "mobile") {
|
|
21397
|
-
return /* @__PURE__ */ jsx(InputGroup$1, { slot: "input", isInvalid: !!errorText, onClick, children: /* @__PURE__ */ jsx(DateInput, { inset: true, pointerEvents: "none", children: (segment) => /* @__PURE__ */ jsx(DateSegment, { isReadOnly: true, segment }) }) });
|
|
21398
|
-
}
|
|
21399
|
-
return /* @__PURE__ */ jsxs(InputGroup$1, { slot: "input", isInvalid: !!errorText, children: [
|
|
21400
|
-
/* @__PURE__ */ jsx(DateInput, { inset: true, children: (segment) => /* @__PURE__ */ jsx(DateSegment, { segment }) }),
|
|
21401
|
-
/* @__PURE__ */ jsxs(HStack, { gap: "3xs", align: "center", children: [
|
|
21402
|
-
errorTriangle,
|
|
21403
|
-
/* @__PURE__ */ jsx(Button, { icon: true, inset: true, variant: "ghost", onClick, children: /* @__PURE__ */ jsx(ChevronDown, { size: 20 }) })
|
|
21404
|
-
] })
|
|
21405
|
-
] });
|
|
21406
|
-
};
|
|
21407
|
-
const DatePicker = ({
|
|
21408
|
-
label,
|
|
21409
|
-
showLabel = true,
|
|
21410
|
-
date,
|
|
21411
|
-
minDate,
|
|
21412
|
-
maxDate,
|
|
21413
|
-
isInvalid,
|
|
21414
|
-
errorText,
|
|
21415
|
-
onBlur,
|
|
21416
|
-
onChange,
|
|
21417
|
-
isDisabled
|
|
21418
|
-
}) => {
|
|
21419
|
-
const additionalAriaProps = !showLabel && { "aria-label": label };
|
|
21420
|
-
const { value } = useSizeClass();
|
|
21421
|
-
const [isPopoverOpen, setPopoverOpen] = useState(false);
|
|
21422
|
-
return /* @__PURE__ */ jsxs(
|
|
21423
|
-
DatePicker$1,
|
|
21424
|
-
__spreadProps(__spreadValues({
|
|
21425
|
-
granularity: "day",
|
|
21426
|
-
value: date,
|
|
21427
|
-
onBlur,
|
|
21428
|
-
onChange,
|
|
21429
|
-
isInvalid
|
|
21430
|
-
}, additionalAriaProps), {
|
|
21431
|
-
isOpen: isPopoverOpen,
|
|
21432
|
-
onOpenChange: setPopoverOpen,
|
|
21433
|
-
isDisabled,
|
|
21434
|
-
children: [
|
|
21435
|
-
showLabel && /* @__PURE__ */ jsx(Label, { children: label }),
|
|
21436
|
-
/* @__PURE__ */ jsx(DatePickerInput, { errorText, variant: value, onClick: () => setPopoverOpen(true) }),
|
|
21437
|
-
/* @__PURE__ */ jsx(ResponsivePopover, { children: /* @__PURE__ */ jsx(Dialog$1, { children: /* @__PURE__ */ jsx(DateCalendar, { minDate, maxDate, variant: value }) }) })
|
|
21438
|
-
]
|
|
21439
|
-
})
|
|
21440
|
-
);
|
|
21441
|
-
};
|
|
21442
21578
|
const getIsDateInvalid = (date, { minDate, maxDate }) => {
|
|
21443
21579
|
if (date === null) return "Cannot select empty date";
|
|
21444
|
-
if (minDate && date.compare(minDate) < 0) return
|
|
21580
|
+
if (minDate && date.compare(minDate) < 0) return `Cannot select date before ${formatDate(minDate.toDate())}`;
|
|
21445
21581
|
if (maxDate && date.compare(maxDate) > 0) return "Cannot select date in the future";
|
|
21446
21582
|
return null;
|
|
21447
21583
|
};
|
|
@@ -22469,14 +22605,14 @@ const formatYAxisValue = (value) => {
|
|
|
22469
22605
|
return value;
|
|
22470
22606
|
}
|
|
22471
22607
|
};
|
|
22472
|
-
const CustomizedYTick = (
|
|
22473
|
-
var
|
|
22608
|
+
const CustomizedYTick = (_Mc) => {
|
|
22609
|
+
var _Nc = _Mc, {
|
|
22474
22610
|
verticalAnchor: _verticalAnchor,
|
|
22475
22611
|
visibleTicksCount: _visibleTicksCount,
|
|
22476
22612
|
tickFormatter: _tickFormatter,
|
|
22477
22613
|
format: format2,
|
|
22478
22614
|
payload
|
|
22479
|
-
} =
|
|
22615
|
+
} = _Nc, restProps = __objRest(_Nc, [
|
|
22480
22616
|
"verticalAnchor",
|
|
22481
22617
|
"visibleTicksCount",
|
|
22482
22618
|
"tickFormatter",
|
|
@@ -22485,8 +22621,8 @@ const CustomizedYTick = (_Gc) => {
|
|
|
22485
22621
|
]);
|
|
22486
22622
|
return /* @__PURE__ */ jsx("text", __spreadProps(__spreadValues({}, restProps), { className: "Layer__ChartYAxis__tick", children: /* @__PURE__ */ jsx("tspan", { dy: "0.355em", children: format2(payload.value) }) }));
|
|
22487
22623
|
};
|
|
22488
|
-
const ChartYAxis = (
|
|
22489
|
-
var
|
|
22624
|
+
const ChartYAxis = (_Oc) => {
|
|
22625
|
+
var _Pc = _Oc, { format: format2 = formatYAxisValue } = _Pc, props = __objRest(_Pc, ["format"]);
|
|
22490
22626
|
const tick = (tickProps) => /* @__PURE__ */ jsx(CustomizedYTick, __spreadProps(__spreadValues({}, tickProps), { format: format2 }));
|
|
22491
22627
|
return /* @__PURE__ */ jsx(YAxis, __spreadValues({ tick }, props));
|
|
22492
22628
|
};
|
|
@@ -22734,8 +22870,8 @@ const renderLegendContent = () => {
|
|
|
22734
22870
|
)) });
|
|
22735
22871
|
};
|
|
22736
22872
|
const ProfitAndLossChartLegend = () => /* @__PURE__ */ jsx(Legend, { verticalAlign: "top", align: "right", content: renderLegendContent });
|
|
22737
|
-
const BarChart2 = (
|
|
22738
|
-
var
|
|
22873
|
+
const BarChart2 = (_Qc) => {
|
|
22874
|
+
var _Rc = _Qc, { size = 12 } = _Rc, props = __objRest(_Rc, ["size"]);
|
|
22739
22875
|
return /* @__PURE__ */ jsxs(
|
|
22740
22876
|
"svg",
|
|
22741
22877
|
__spreadProps(__spreadValues({
|
|
@@ -22815,13 +22951,13 @@ const ChartTooltipCursor = ({ width, points, height }) => {
|
|
|
22815
22951
|
}
|
|
22816
22952
|
) });
|
|
22817
22953
|
};
|
|
22818
|
-
const ChartTooltip = (
|
|
22819
|
-
var
|
|
22954
|
+
const ChartTooltip = (_Sc) => {
|
|
22955
|
+
var _Tc = _Sc, {
|
|
22820
22956
|
content,
|
|
22821
22957
|
cursorWidth,
|
|
22822
22958
|
animationDuration = 100,
|
|
22823
22959
|
animationEasing = "ease-out"
|
|
22824
|
-
} =
|
|
22960
|
+
} = _Tc, props = __objRest(_Tc, [
|
|
22825
22961
|
"content",
|
|
22826
22962
|
"cursorWidth",
|
|
22827
22963
|
"animationDuration",
|
|
@@ -23083,11 +23219,11 @@ const ProfitAndLossChart = ({ tagFilter }) => {
|
|
|
23083
23219
|
isSyncing ? /* @__PURE__ */ jsx(ProfitAndLossChartStateCard, {}) : null
|
|
23084
23220
|
] });
|
|
23085
23221
|
};
|
|
23086
|
-
const BackButton = (
|
|
23087
|
-
var
|
|
23222
|
+
const BackButton = (_Uc) => {
|
|
23223
|
+
var _Vc = _Uc, {
|
|
23088
23224
|
className,
|
|
23089
23225
|
textOnly = false
|
|
23090
|
-
} =
|
|
23226
|
+
} = _Vc, props = __objRest(_Vc, [
|
|
23091
23227
|
"className",
|
|
23092
23228
|
"textOnly"
|
|
23093
23229
|
]);
|
|
@@ -23100,7 +23236,7 @@ function useGlobalDatePickerBounds() {
|
|
|
23100
23236
|
const maxDate = useMemo(() => endOfDay(/* @__PURE__ */ new Date()), []);
|
|
23101
23237
|
return useMemo(() => ({ minDate, maxDate }), [minDate, maxDate]);
|
|
23102
23238
|
}
|
|
23103
|
-
const GlobalMonthPicker = ({ truncateMonth }) => {
|
|
23239
|
+
const GlobalMonthPicker = ({ truncateMonth, showLabel = false }) => {
|
|
23104
23240
|
const { minDate, maxDate } = useGlobalDatePickerBounds();
|
|
23105
23241
|
const { setMonth } = useGlobalDateRangeActions();
|
|
23106
23242
|
const { date } = useGlobalDate({ dateSelectionMode: "month" });
|
|
@@ -23113,8 +23249,8 @@ const GlobalMonthPicker = ({ truncateMonth }) => {
|
|
|
23113
23249
|
return /* @__PURE__ */ jsx(
|
|
23114
23250
|
MonthPicker,
|
|
23115
23251
|
{
|
|
23116
|
-
label: "
|
|
23117
|
-
showLabel
|
|
23252
|
+
label: "Month",
|
|
23253
|
+
showLabel,
|
|
23118
23254
|
date: dateZdt,
|
|
23119
23255
|
onChange,
|
|
23120
23256
|
minDate: minDateZdt,
|
|
@@ -23141,8 +23277,8 @@ const TASKS_CHARTS_COLORS = {
|
|
|
23141
23277
|
done: "#3B9C63",
|
|
23142
23278
|
pending: "#DFA000"
|
|
23143
23279
|
};
|
|
23144
|
-
const SortArrows = (
|
|
23145
|
-
var
|
|
23280
|
+
const SortArrows = (_Wc) => {
|
|
23281
|
+
var _Xc = _Wc, { size = 13 } = _Xc, props = __objRest(_Xc, ["size"]);
|
|
23146
23282
|
return /* @__PURE__ */ jsxs(
|
|
23147
23283
|
"svg",
|
|
23148
23284
|
__spreadProps(__spreadValues({
|
|
@@ -23568,8 +23704,8 @@ const DetailedChart = ({
|
|
|
23568
23704
|
] }) }) })
|
|
23569
23705
|
] });
|
|
23570
23706
|
};
|
|
23571
|
-
const HeaderCol = ({ className, children, style, noPadding = false }) => {
|
|
23572
|
-
const dataProperties = toDataProperties({ "no-padding": noPadding });
|
|
23707
|
+
const HeaderCol = ({ className, children, style, noPadding = false, fluid = false }) => {
|
|
23708
|
+
const dataProperties = toDataProperties({ "no-padding": noPadding, fluid });
|
|
23573
23709
|
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({}, dataProperties), { className: classNames("Layer__header__col", className), style, children }));
|
|
23574
23710
|
};
|
|
23575
23711
|
const DetailReportBreadcrumb = ({
|
|
@@ -23673,11 +23809,11 @@ const LedgerAccountsContext = createContext({
|
|
|
23673
23809
|
fetchMore: () => {
|
|
23674
23810
|
}
|
|
23675
23811
|
});
|
|
23676
|
-
const CloseButton = (
|
|
23677
|
-
var
|
|
23812
|
+
const CloseButton = (_Yc) => {
|
|
23813
|
+
var _Zc = _Yc, {
|
|
23678
23814
|
className,
|
|
23679
23815
|
textOnly = false
|
|
23680
|
-
} =
|
|
23816
|
+
} = _Zc, props = __objRest(_Zc, [
|
|
23681
23817
|
"className",
|
|
23682
23818
|
"textOnly"
|
|
23683
23819
|
]);
|
|
@@ -24687,16 +24823,21 @@ const DateSelectionComboBox = () => {
|
|
|
24687
24823
|
const nextRange = rangeForPreset(nextPreset);
|
|
24688
24824
|
setDateRange(nextRange);
|
|
24689
24825
|
}, [setDateRange]);
|
|
24690
|
-
|
|
24691
|
-
|
|
24692
|
-
{
|
|
24693
|
-
|
|
24694
|
-
|
|
24695
|
-
|
|
24696
|
-
|
|
24697
|
-
|
|
24698
|
-
|
|
24699
|
-
|
|
24826
|
+
const inputId = useId();
|
|
24827
|
+
return /* @__PURE__ */ jsxs(VStack, { children: [
|
|
24828
|
+
/* @__PURE__ */ jsx(Label, { pbe: "3xs", size: "sm", htmlFor: inputId, children: "Report period" }),
|
|
24829
|
+
/* @__PURE__ */ jsx(
|
|
24830
|
+
ComboBox,
|
|
24831
|
+
{
|
|
24832
|
+
options: options$4,
|
|
24833
|
+
onSelectedValueChange,
|
|
24834
|
+
selectedValue: selectedOption,
|
|
24835
|
+
isSearchable: false,
|
|
24836
|
+
isClearable: false,
|
|
24837
|
+
inputId
|
|
24838
|
+
}
|
|
24839
|
+
)
|
|
24840
|
+
] });
|
|
24700
24841
|
};
|
|
24701
24842
|
const GlobalDateRangePicker = () => {
|
|
24702
24843
|
const { startDate: globalStartDate, endDate: globalEndDate } = useGlobalDateRange({ dateSelectionMode: "full" });
|
|
@@ -24737,29 +24878,29 @@ const GlobalDateRangePicker = () => {
|
|
|
24737
24878
|
/* @__PURE__ */ jsx(
|
|
24738
24879
|
DatePicker,
|
|
24739
24880
|
{
|
|
24740
|
-
label: "Start
|
|
24741
|
-
showLabel: false,
|
|
24881
|
+
label: "Start date",
|
|
24742
24882
|
date: localStartDate,
|
|
24743
24883
|
onChange: onChangeStartDate,
|
|
24744
24884
|
minDate: minStartDate,
|
|
24745
24885
|
maxDate: maxStartDate,
|
|
24746
24886
|
isInvalid: startDateInvalid,
|
|
24747
24887
|
errorText: startDateErrorText,
|
|
24748
|
-
onBlur: onBlurStartDate
|
|
24888
|
+
onBlur: onBlurStartDate,
|
|
24889
|
+
slotProps: { Label: { size: "sm", pbe: "3xs" } }
|
|
24749
24890
|
}
|
|
24750
24891
|
),
|
|
24751
24892
|
/* @__PURE__ */ jsx(
|
|
24752
24893
|
DatePicker,
|
|
24753
24894
|
{
|
|
24754
|
-
label: "End
|
|
24755
|
-
showLabel: false,
|
|
24895
|
+
label: "End date",
|
|
24756
24896
|
date: localEndDate,
|
|
24757
24897
|
onChange: onChangeEndDate,
|
|
24758
24898
|
minDate: minEndDate,
|
|
24759
24899
|
maxDate: maxEndDate,
|
|
24760
24900
|
isInvalid: endDateInvalid,
|
|
24761
24901
|
errorText: endDateErrorText,
|
|
24762
|
-
onBlur: onBlurEndDate
|
|
24902
|
+
onBlur: onBlurEndDate,
|
|
24903
|
+
slotProps: { Label: { size: "sm", pbe: "3xs" } }
|
|
24763
24904
|
}
|
|
24764
24905
|
)
|
|
24765
24906
|
] });
|
|
@@ -24781,7 +24922,7 @@ const DateRangeSelection = () => {
|
|
|
24781
24922
|
};
|
|
24782
24923
|
const CombinedDateRangeSelection = ({ mode }) => {
|
|
24783
24924
|
if (mode === "month") {
|
|
24784
|
-
return /* @__PURE__ */ jsx(GlobalMonthPicker, {});
|
|
24925
|
+
return /* @__PURE__ */ jsx(GlobalMonthPicker, { showLabel: true });
|
|
24785
24926
|
}
|
|
24786
24927
|
return /* @__PURE__ */ jsx(DateRangeSelection, {});
|
|
24787
24928
|
};
|
|
@@ -25046,17 +25187,22 @@ const DateGroupByComboBox = ({ value, onValueChange }) => {
|
|
|
25046
25187
|
const onSelectedValueChange = useCallback((option) => {
|
|
25047
25188
|
onValueChange((option == null ? void 0 : option.value) || null);
|
|
25048
25189
|
}, [onValueChange]);
|
|
25049
|
-
|
|
25050
|
-
|
|
25051
|
-
{
|
|
25052
|
-
|
|
25053
|
-
|
|
25054
|
-
|
|
25055
|
-
|
|
25056
|
-
|
|
25057
|
-
|
|
25058
|
-
|
|
25059
|
-
|
|
25190
|
+
const inputId = useId();
|
|
25191
|
+
return /* @__PURE__ */ jsxs(VStack, { className: "Layer__DateGroupByComboBox__Container", children: [
|
|
25192
|
+
/* @__PURE__ */ jsx(Label, { pbe: "3xs", size: "sm", htmlFor: inputId, children: "Group by" }),
|
|
25193
|
+
/* @__PURE__ */ jsx(
|
|
25194
|
+
ComboBox,
|
|
25195
|
+
{
|
|
25196
|
+
className: "Layer__DateGroupByComboBox",
|
|
25197
|
+
options: options$3,
|
|
25198
|
+
onSelectedValueChange,
|
|
25199
|
+
selectedValue: selectedOption,
|
|
25200
|
+
isSearchable: false,
|
|
25201
|
+
isClearable: false,
|
|
25202
|
+
inputId
|
|
25203
|
+
}
|
|
25204
|
+
)
|
|
25205
|
+
] });
|
|
25060
25206
|
};
|
|
25061
25207
|
const MultiSelect = ({
|
|
25062
25208
|
name,
|
|
@@ -25106,6 +25252,10 @@ const MultiSelect = ({
|
|
|
25106
25252
|
/* @__PURE__ */ jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", children: errorMessage })
|
|
25107
25253
|
] });
|
|
25108
25254
|
};
|
|
25255
|
+
const toSelectOption = (opt) => ({
|
|
25256
|
+
value: JSON.stringify(opt.tagFilterConfig),
|
|
25257
|
+
label: opt.displayName
|
|
25258
|
+
});
|
|
25109
25259
|
const selectStyles = {
|
|
25110
25260
|
valueContainer: (styles) => {
|
|
25111
25261
|
return __spreadProps(__spreadValues({}, styles), {
|
|
@@ -25113,49 +25263,43 @@ const selectStyles = {
|
|
|
25113
25263
|
});
|
|
25114
25264
|
}
|
|
25115
25265
|
};
|
|
25116
|
-
const
|
|
25266
|
+
const CompareTagsMultiSelect = () => {
|
|
25117
25267
|
const {
|
|
25118
|
-
setSelectedCompareOptions,
|
|
25119
25268
|
compareOptions,
|
|
25120
25269
|
selectedCompareOptions,
|
|
25270
|
+
setSelectedCompareOptions
|
|
25271
|
+
} = useContext(ProfitAndLossComparisonContext);
|
|
25272
|
+
const inputId = useId();
|
|
25273
|
+
return /* @__PURE__ */ jsxs(VStack, { className: "Layer__CompareTagsMultiSelect__Container", children: [
|
|
25274
|
+
/* @__PURE__ */ jsx(Label, { pbe: "3xs", size: "sm", htmlFor: inputId, children: "Compare by" }),
|
|
25275
|
+
/* @__PURE__ */ jsx(
|
|
25276
|
+
MultiSelect,
|
|
25277
|
+
{
|
|
25278
|
+
inputId,
|
|
25279
|
+
options: compareOptions.map(toSelectOption),
|
|
25280
|
+
onChange: setSelectedCompareOptions,
|
|
25281
|
+
defaultValue: selectedCompareOptions == null ? void 0 : selectedCompareOptions.map(toSelectOption),
|
|
25282
|
+
value: selectedCompareOptions.map(toSelectOption),
|
|
25283
|
+
placeholder: "Select tags",
|
|
25284
|
+
styles: selectStyles,
|
|
25285
|
+
className: "Layer__CompareTagsMultiSelect"
|
|
25286
|
+
}
|
|
25287
|
+
)
|
|
25288
|
+
] });
|
|
25289
|
+
};
|
|
25290
|
+
const ProfitAndLossCompareOptions = () => {
|
|
25291
|
+
const {
|
|
25121
25292
|
comparisonConfig,
|
|
25122
25293
|
comparisonPeriodMode,
|
|
25123
25294
|
setComparisonPeriodMode
|
|
25124
25295
|
} = useContext(ProfitAndLossComparisonContext);
|
|
25125
25296
|
const { dateSelectionMode } = useContext(ProfitAndLossContext);
|
|
25126
|
-
const tagComparisonSelectOptions = compareOptions.map(
|
|
25127
|
-
(tagComparisonOption) => {
|
|
25128
|
-
return {
|
|
25129
|
-
value: JSON.stringify(tagComparisonOption.tagFilterConfig),
|
|
25130
|
-
label: tagComparisonOption.displayName
|
|
25131
|
-
};
|
|
25132
|
-
}
|
|
25133
|
-
);
|
|
25134
25297
|
if (!comparisonConfig) {
|
|
25135
25298
|
return null;
|
|
25136
25299
|
}
|
|
25137
|
-
return /* @__PURE__ */ jsxs(HStack, { align: "
|
|
25300
|
+
return /* @__PURE__ */ jsxs(HStack, { align: "end", gap: "xs", children: [
|
|
25138
25301
|
dateSelectionMode === "full" && /* @__PURE__ */ jsx(DateGroupByComboBox, { value: comparisonPeriodMode, onValueChange: setComparisonPeriodMode }),
|
|
25139
|
-
/* @__PURE__ */ jsx(
|
|
25140
|
-
MultiSelect,
|
|
25141
|
-
{
|
|
25142
|
-
options: tagComparisonSelectOptions,
|
|
25143
|
-
onChange: (values) => setSelectedCompareOptions(values),
|
|
25144
|
-
defaultValue: selectedCompareOptions == null ? void 0 : selectedCompareOptions.map((option) => ({
|
|
25145
|
-
value: JSON.stringify(option.tagFilterConfig),
|
|
25146
|
-
label: option.displayName
|
|
25147
|
-
})),
|
|
25148
|
-
value: selectedCompareOptions.map((tagComparisonOption) => {
|
|
25149
|
-
return {
|
|
25150
|
-
value: JSON.stringify(tagComparisonOption.tagFilterConfig),
|
|
25151
|
-
label: tagComparisonOption.displayName
|
|
25152
|
-
};
|
|
25153
|
-
}),
|
|
25154
|
-
placeholder: "Select views",
|
|
25155
|
-
styles: selectStyles,
|
|
25156
|
-
className: "Layer__ProfitAndLoss__TagMultiSelect"
|
|
25157
|
-
}
|
|
25158
|
-
)
|
|
25302
|
+
/* @__PURE__ */ jsx(CompareTagsMultiSelect, {})
|
|
25159
25303
|
] });
|
|
25160
25304
|
};
|
|
25161
25305
|
const defaultValue = {
|
|
@@ -25788,29 +25932,22 @@ const ProfitAndLossReport = ({
|
|
|
25788
25932
|
const header = useMemo(() => {
|
|
25789
25933
|
if (hideHeader) return null;
|
|
25790
25934
|
return /* @__PURE__ */ jsxs(Header, { children: [
|
|
25791
|
-
/* @__PURE__ */
|
|
25792
|
-
/* @__PURE__ */ jsxs(
|
|
25935
|
+
/* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { fluid: true, children: /* @__PURE__ */ jsxs(HStack, { pb: "sm", align: "end", fluid: true, gap: "xs", justify: "space-between", children: [
|
|
25936
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", children: [
|
|
25793
25937
|
/* @__PURE__ */ jsx(CombinedDateRangeSelection, { mode: dateSelectionMode }),
|
|
25794
25938
|
view === "desktop" && useComparisonPnl && /* @__PURE__ */ jsx(ProfitAndLossCompareOptions, {})
|
|
25795
25939
|
] }),
|
|
25796
|
-
/* @__PURE__ */ jsx(
|
|
25940
|
+
/* @__PURE__ */ jsx(
|
|
25797
25941
|
ProfitAndLossDownloadButton,
|
|
25798
25942
|
{
|
|
25799
25943
|
stringOverrides: stringOverrides == null ? void 0 : stringOverrides.downloadButton,
|
|
25800
25944
|
moneyFormat: csvMoneyFormat
|
|
25801
25945
|
}
|
|
25802
|
-
)
|
|
25803
|
-
] }),
|
|
25804
|
-
view !== "desktop" && useComparisonPnl && /* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { children: /* @__PURE__ */ jsx(ProfitAndLossCompareOptions, {}) }) })
|
|
25946
|
+
)
|
|
25947
|
+
] }) }) }),
|
|
25948
|
+
view !== "desktop" && useComparisonPnl && /* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { fluid: true, children: /* @__PURE__ */ jsx(HStack, { pb: "sm", fluid: true, children: /* @__PURE__ */ jsx(ProfitAndLossCompareOptions, {}) }) }) })
|
|
25805
25949
|
] });
|
|
25806
|
-
}, [
|
|
25807
|
-
csvMoneyFormat,
|
|
25808
|
-
dateSelectionMode,
|
|
25809
|
-
hideHeader,
|
|
25810
|
-
stringOverrides == null ? void 0 : stringOverrides.downloadButton,
|
|
25811
|
-
useComparisonPnl,
|
|
25812
|
-
view
|
|
25813
|
-
]);
|
|
25950
|
+
}, [csvMoneyFormat, dateSelectionMode, hideHeader, stringOverrides == null ? void 0 : stringOverrides.downloadButton, useComparisonPnl, view]);
|
|
25814
25951
|
return /* @__PURE__ */ jsx(InAppLinkProvider, { renderInAppLink, children: /* @__PURE__ */ jsx(View, { type: "panel", header, children: selectedLineItem ? /* @__PURE__ */ jsx(
|
|
25815
25952
|
ProfitAndLossDetailReport,
|
|
25816
25953
|
{
|
|
@@ -26221,10 +26358,10 @@ function Internal_ProfitAndLossSummaries({
|
|
|
26221
26358
|
unstable_AdditionalListItems.map((item, index) => /* @__PURE__ */ jsx(ProfitAndLossSummariesListItem, { children: item }, index))
|
|
26222
26359
|
] }) });
|
|
26223
26360
|
}
|
|
26224
|
-
function ProfitAndLossSummaries(
|
|
26225
|
-
var
|
|
26361
|
+
function ProfitAndLossSummaries(__c) {
|
|
26362
|
+
var _$c = __c, {
|
|
26226
26363
|
onTransactionsToReviewClick
|
|
26227
|
-
} =
|
|
26364
|
+
} = _$c, restProps = __objRest(_$c, [
|
|
26228
26365
|
"onTransactionsToReviewClick"
|
|
26229
26366
|
]);
|
|
26230
26367
|
return /* @__PURE__ */ jsx(
|
|
@@ -26423,8 +26560,8 @@ function BalanceSheetDownloadButton({
|
|
|
26423
26560
|
/* @__PURE__ */ jsx(InvisibleDownload, { ref: invisibleDownloadRef })
|
|
26424
26561
|
] });
|
|
26425
26562
|
}
|
|
26426
|
-
const Collapse = (
|
|
26427
|
-
var props = __objRest(
|
|
26563
|
+
const Collapse = (_ad) => {
|
|
26564
|
+
var props = __objRest(_ad, []);
|
|
26428
26565
|
return /* @__PURE__ */ jsxs(
|
|
26429
26566
|
"svg",
|
|
26430
26567
|
__spreadProps(__spreadValues({
|
|
@@ -26457,8 +26594,8 @@ const Collapse = (_Wc) => {
|
|
|
26457
26594
|
})
|
|
26458
26595
|
);
|
|
26459
26596
|
};
|
|
26460
|
-
const Expand = (
|
|
26461
|
-
var props = __objRest(
|
|
26597
|
+
const Expand = (_bd) => {
|
|
26598
|
+
var props = __objRest(_bd, []);
|
|
26462
26599
|
return /* @__PURE__ */ jsxs(
|
|
26463
26600
|
"svg",
|
|
26464
26601
|
__spreadProps(__spreadValues({
|
|
@@ -26502,7 +26639,7 @@ const ExpandCollapseButton = ({
|
|
|
26502
26639
|
Button$1,
|
|
26503
26640
|
{
|
|
26504
26641
|
onClick: () => onClick(!expanded),
|
|
26505
|
-
variant: variant ? variant :
|
|
26642
|
+
variant: variant ? variant : ButtonVariant.secondary,
|
|
26506
26643
|
className: classNames(
|
|
26507
26644
|
iconOnly ? "Layer__expand-collpase-all-rows-btn--sm" : "Layer__expand-collpase-all-rows-btn",
|
|
26508
26645
|
className
|
|
@@ -26624,15 +26761,15 @@ const GlobalDatePicker = () => {
|
|
|
26624
26761
|
return /* @__PURE__ */ jsx(
|
|
26625
26762
|
DatePicker,
|
|
26626
26763
|
{
|
|
26627
|
-
label: "Effective
|
|
26628
|
-
showLabel: false,
|
|
26764
|
+
label: "Effective date",
|
|
26629
26765
|
date: localDate,
|
|
26630
26766
|
onChange,
|
|
26631
26767
|
minDate: minDateZdt,
|
|
26632
26768
|
maxDate: maxDateZdt,
|
|
26633
26769
|
isInvalid,
|
|
26634
26770
|
errorText,
|
|
26635
|
-
onBlur
|
|
26771
|
+
onBlur,
|
|
26772
|
+
slotProps: { Label: { size: "sm", pbe: "3xs" } }
|
|
26636
26773
|
}
|
|
26637
26774
|
);
|
|
26638
26775
|
};
|
|
@@ -26653,7 +26790,7 @@ const DateSelection = () => {
|
|
|
26653
26790
|
};
|
|
26654
26791
|
const CombinedDateSelection = ({ mode }) => {
|
|
26655
26792
|
if (mode === "month") {
|
|
26656
|
-
return /* @__PURE__ */ jsx(GlobalMonthPicker, {});
|
|
26793
|
+
return /* @__PURE__ */ jsx(GlobalMonthPicker, { showLabel: true });
|
|
26657
26794
|
}
|
|
26658
26795
|
return /* @__PURE__ */ jsx(DateSelection, {});
|
|
26659
26796
|
};
|
|
@@ -26682,10 +26819,10 @@ const BalanceSheetView = ({
|
|
|
26682
26819
|
{
|
|
26683
26820
|
type: "panel",
|
|
26684
26821
|
ref: containerRef,
|
|
26685
|
-
header: /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */
|
|
26686
|
-
/* @__PURE__ */ jsx(
|
|
26687
|
-
withExpandAllButton && /* @__PURE__ */ jsx(
|
|
26688
|
-
] }) }),
|
|
26822
|
+
header: /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { fluid: true, children: /* @__PURE__ */ jsxs(HStack, { pb: "sm", align: "end", gap: "xs", justify: "space-between", fluid: true, children: [
|
|
26823
|
+
/* @__PURE__ */ jsx(CombinedDateSelection, { mode: dateSelectionMode }),
|
|
26824
|
+
withExpandAllButton && /* @__PURE__ */ jsx(BalanceSheetExpandAllButton, { view })
|
|
26825
|
+
] }) }) }) }),
|
|
26689
26826
|
children: !data || isLoading ? /* @__PURE__ */ jsx("div", { className: `Layer__${COMPONENT_NAME$9}__loader-container`, children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsx(
|
|
26690
26827
|
BalanceSheetTable,
|
|
26691
26828
|
{
|
|
@@ -26702,9 +26839,9 @@ const BalanceSheetView = ({
|
|
|
26702
26839
|
{
|
|
26703
26840
|
type: "panel",
|
|
26704
26841
|
ref: containerRef,
|
|
26705
|
-
header: /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */
|
|
26706
|
-
/* @__PURE__ */ jsx(
|
|
26707
|
-
/* @__PURE__ */ jsxs(
|
|
26842
|
+
header: /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { fluid: true, children: /* @__PURE__ */ jsxs(HStack, { pb: "sm", align: "end", gap: "xs", justify: "space-between", fluid: true, children: [
|
|
26843
|
+
/* @__PURE__ */ jsx(CombinedDateSelection, { mode: dateSelectionMode }),
|
|
26844
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", children: [
|
|
26708
26845
|
withExpandAllButton && /* @__PURE__ */ jsx(BalanceSheetExpandAllButton, { view }),
|
|
26709
26846
|
/* @__PURE__ */ jsx(
|
|
26710
26847
|
BalanceSheetDownloadButton,
|
|
@@ -26714,7 +26851,7 @@ const BalanceSheetView = ({
|
|
|
26714
26851
|
}
|
|
26715
26852
|
)
|
|
26716
26853
|
] })
|
|
26717
|
-
] }) }),
|
|
26854
|
+
] }) }) }) }),
|
|
26718
26855
|
children: !data || isLoading ? /* @__PURE__ */ jsx("div", { className: `Layer__${COMPONENT_NAME$9}__loader-container`, children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsx(
|
|
26719
26856
|
BalanceSheetTable,
|
|
26720
26857
|
{
|
|
@@ -26996,17 +27133,17 @@ const StatementOfCashFlowView = ({
|
|
|
26996
27133
|
{
|
|
26997
27134
|
type: "panel",
|
|
26998
27135
|
ref: containerRef,
|
|
26999
|
-
header: /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */
|
|
27000
|
-
/* @__PURE__ */ jsx(
|
|
27001
|
-
/* @__PURE__ */ jsx(
|
|
27136
|
+
header: /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { fluid: true, children: /* @__PURE__ */ jsxs(HStack, { pb: "sm", align: "end", fluid: true, gap: "xs", justify: "space-between", children: [
|
|
27137
|
+
/* @__PURE__ */ jsx(CombinedDateRangeSelection, { mode: dateSelectionMode }),
|
|
27138
|
+
/* @__PURE__ */ jsx(
|
|
27002
27139
|
CashflowStatementDownloadButton,
|
|
27003
27140
|
{
|
|
27004
27141
|
startDate: dateRange.startDate,
|
|
27005
27142
|
endDate: dateRange.endDate,
|
|
27006
27143
|
iconOnly: view === "mobile"
|
|
27007
27144
|
}
|
|
27008
|
-
)
|
|
27009
|
-
] }) }),
|
|
27145
|
+
)
|
|
27146
|
+
] }) }) }) }),
|
|
27010
27147
|
children: !data || isLoading ? /* @__PURE__ */ jsx("div", { className: `Layer__${COMPONENT_NAME$8}__loader-container`, children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsx(
|
|
27011
27148
|
StatementOfCashFlowTable,
|
|
27012
27149
|
{
|
|
@@ -28146,8 +28283,8 @@ const ChartOfAccountsContext = createContext(
|
|
|
28146
28283
|
}
|
|
28147
28284
|
}
|
|
28148
28285
|
);
|
|
28149
|
-
const Plus = (
|
|
28150
|
-
var
|
|
28286
|
+
const Plus = (_cd) => {
|
|
28287
|
+
var _dd = _cd, { size = 14 } = _dd, props = __objRest(_dd, ["size"]);
|
|
28151
28288
|
return /* @__PURE__ */ jsxs(
|
|
28152
28289
|
"svg",
|
|
28153
28290
|
__spreadProps(__spreadValues({
|
|
@@ -28518,8 +28655,8 @@ var LedgerAccountNodeType = /* @__PURE__ */ ((LedgerAccountNodeType2) => {
|
|
|
28518
28655
|
LedgerAccountNodeType2["Parent"] = "Parent";
|
|
28519
28656
|
return LedgerAccountNodeType2;
|
|
28520
28657
|
})(LedgerAccountNodeType || {});
|
|
28521
|
-
const Edit2 = (
|
|
28522
|
-
var
|
|
28658
|
+
const Edit2 = (_ed) => {
|
|
28659
|
+
var _fd = _ed, { size = 18 } = _fd, props = __objRest(_fd, ["size"]);
|
|
28523
28660
|
return /* @__PURE__ */ jsx(
|
|
28524
28661
|
"svg",
|
|
28525
28662
|
__spreadProps(__spreadValues({
|
|
@@ -31150,8 +31287,8 @@ const TasksHeader = ({
|
|
|
31150
31287
|
}) => {
|
|
31151
31288
|
return /* @__PURE__ */ jsx("div", { className: "Layer__tasks-header", children: /* @__PURE__ */ jsx(Text, { size: TextSize.lg, children: tasksHeader }) });
|
|
31152
31289
|
};
|
|
31153
|
-
const SmileIcon = (
|
|
31154
|
-
var
|
|
31290
|
+
const SmileIcon = (_gd) => {
|
|
31291
|
+
var _hd = _gd, { size = 12 } = _hd, props = __objRest(_hd, ["size"]);
|
|
31155
31292
|
return /* @__PURE__ */ jsxs(
|
|
31156
31293
|
"svg",
|
|
31157
31294
|
__spreadProps(__spreadValues({
|
|
@@ -31996,8 +32133,8 @@ const useBookkeepingYearsStatus = () => {
|
|
|
31996
32133
|
isLoading
|
|
31997
32134
|
};
|
|
31998
32135
|
};
|
|
31999
|
-
const ArrowRightCircle = (
|
|
32000
|
-
var
|
|
32136
|
+
const ArrowRightCircle = (_id) => {
|
|
32137
|
+
var _jd = _id, { size = 18 } = _jd, props = __objRest(_jd, ["size"]);
|
|
32001
32138
|
return /* @__PURE__ */ jsxs(
|
|
32002
32139
|
"svg",
|
|
32003
32140
|
__spreadProps(__spreadValues({
|
|
@@ -34045,12 +34182,12 @@ const FormSection = ({ children, title }) => {
|
|
|
34045
34182
|
children
|
|
34046
34183
|
] });
|
|
34047
34184
|
};
|
|
34048
|
-
const PhoneInput = (
|
|
34049
|
-
var
|
|
34185
|
+
const PhoneInput = (_kd) => {
|
|
34186
|
+
var _ld = _kd, {
|
|
34050
34187
|
value,
|
|
34051
34188
|
onChange,
|
|
34052
34189
|
placeholder = "Phone number"
|
|
34053
|
-
} =
|
|
34190
|
+
} = _ld, props = __objRest(_ld, [
|
|
34054
34191
|
"value",
|
|
34055
34192
|
"onChange",
|
|
34056
34193
|
"placeholder"
|
|
@@ -34342,8 +34479,8 @@ const SummaryStep = ({ onNext, title = defaultTitle$1, description = defaultDesc
|
|
|
34342
34479
|
/* @__PURE__ */ jsx(Button$1, { onClick: onNext, children: nextBtnText })
|
|
34343
34480
|
] });
|
|
34344
34481
|
};
|
|
34345
|
-
const Document = (
|
|
34346
|
-
var
|
|
34482
|
+
const Document = (_md) => {
|
|
34483
|
+
var _nd = _md, { size = 20 } = _nd, props = __objRest(_nd, ["size"]);
|
|
34347
34484
|
return /* @__PURE__ */ jsxs(
|
|
34348
34485
|
"svg",
|
|
34349
34486
|
__spreadProps(__spreadValues({
|
|
@@ -34448,8 +34585,8 @@ const Document = (_gd) => {
|
|
|
34448
34585
|
})
|
|
34449
34586
|
);
|
|
34450
34587
|
};
|
|
34451
|
-
const TrendingUp = (
|
|
34452
|
-
var
|
|
34588
|
+
const TrendingUp = (_od) => {
|
|
34589
|
+
var _pd = _od, { size = 20 } = _pd, props = __objRest(_pd, ["size"]);
|
|
34453
34590
|
return /* @__PURE__ */ jsxs(
|
|
34454
34591
|
"svg",
|
|
34455
34592
|
__spreadProps(__spreadValues({
|
|
@@ -34706,8 +34843,8 @@ const PlatformOnboarding = ({ onComplete }) => {
|
|
|
34706
34843
|
/* @__PURE__ */ jsx("div", { className: "Layer__platform-onboarding-layout__footer", children: renderStepFooter() })
|
|
34707
34844
|
] }) });
|
|
34708
34845
|
};
|
|
34709
|
-
const CoffeeIcon = (
|
|
34710
|
-
var
|
|
34846
|
+
const CoffeeIcon = (_qd) => {
|
|
34847
|
+
var _rd = _qd, { size = 11 } = _rd, props = __objRest(_rd, ["size"]);
|
|
34711
34848
|
return /* @__PURE__ */ jsxs(
|
|
34712
34849
|
"svg",
|
|
34713
34850
|
__spreadProps(__spreadValues({
|
|
@@ -34778,8 +34915,8 @@ const CoffeeIcon = (_kd) => {
|
|
|
34778
34915
|
})
|
|
34779
34916
|
);
|
|
34780
34917
|
};
|
|
34781
|
-
const Link = (
|
|
34782
|
-
var
|
|
34918
|
+
const Link = (_sd) => {
|
|
34919
|
+
var _td = _sd, {
|
|
34783
34920
|
className,
|
|
34784
34921
|
children,
|
|
34785
34922
|
variant = ButtonVariant.primary,
|
|
@@ -34789,7 +34926,7 @@ const Link = (_md) => {
|
|
|
34789
34926
|
iconAsPrimary = false,
|
|
34790
34927
|
justify = "center",
|
|
34791
34928
|
fullWidth
|
|
34792
|
-
} =
|
|
34929
|
+
} = _td, props = __objRest(_td, [
|
|
34793
34930
|
"className",
|
|
34794
34931
|
"children",
|
|
34795
34932
|
"variant",
|
|
@@ -34881,8 +35018,8 @@ const BookkeepingUpsellBar = ({
|
|
|
34881
35018
|
onClick ? /* @__PURE__ */ jsx(Button$1, { variant: ButtonVariant.secondary, onClick, children: "Schedule a demo" }) : href ? /* @__PURE__ */ jsx(Link, { href, target: "_blank", variant: ButtonVariant.secondary, children: "Schedule a demo" }) : null
|
|
34882
35019
|
] });
|
|
34883
35020
|
};
|
|
34884
|
-
const ChevronRightFill = (
|
|
34885
|
-
var
|
|
35021
|
+
const ChevronRightFill = (_ud) => {
|
|
35022
|
+
var _vd = _ud, { size = 18 } = _vd, props = __objRest(_vd, ["size"]);
|
|
34886
35023
|
return /* @__PURE__ */ jsxs(
|
|
34887
35024
|
"svg",
|
|
34888
35025
|
__spreadProps(__spreadValues({
|
|
@@ -35178,7 +35315,11 @@ const InvoiceSchema = Schema.Struct({
|
|
|
35178
35315
|
Schema.propertySignature(Schema.NullOr(Schema.Date)),
|
|
35179
35316
|
Schema.fromKey("updated_at")
|
|
35180
35317
|
),
|
|
35181
|
-
memo: Schema.NullOr(Schema.String)
|
|
35318
|
+
memo: Schema.NullOr(Schema.String),
|
|
35319
|
+
customPaymentInstructions: pipe(
|
|
35320
|
+
Schema.propertySignature(Schema.NullOr(Schema.String)),
|
|
35321
|
+
Schema.fromKey("custom_payment_instructions")
|
|
35322
|
+
)
|
|
35182
35323
|
});
|
|
35183
35324
|
const UpsertInvoiceTaxLineItemSchema = Schema.Struct({
|
|
35184
35325
|
amount: Schema.Number
|
|
@@ -35215,6 +35356,9 @@ const UpsertInvoiceSchema = Schema.Struct({
|
|
|
35215
35356
|
Schema.fromKey("customer_id")
|
|
35216
35357
|
),
|
|
35217
35358
|
memo: Schema.optional(Schema.String),
|
|
35359
|
+
customPaymentInstructions: Schema.optional(Schema.String).pipe(
|
|
35360
|
+
Schema.fromKey("custom_payment_instructions")
|
|
35361
|
+
),
|
|
35218
35362
|
lineItems: pipe(
|
|
35219
35363
|
Schema.propertySignature(Schema.Array(UpsertInvoiceLineItemSchema)),
|
|
35220
35364
|
Schema.fromKey("line_items")
|
|
@@ -35225,12 +35369,10 @@ const UpsertInvoiceSchema = Schema.Struct({
|
|
|
35225
35369
|
});
|
|
35226
35370
|
const InvoiceFormLineItemSchema = Schema.Struct({
|
|
35227
35371
|
description: Schema.String,
|
|
35228
|
-
unitPrice:
|
|
35229
|
-
quantity:
|
|
35230
|
-
amount:
|
|
35231
|
-
isTaxable: Schema.Boolean
|
|
35232
|
-
accountIdentifier: Schema.NullOr(AccountIdentifierSchema),
|
|
35233
|
-
tags: Schema.Array(TagSchema)
|
|
35372
|
+
unitPrice: NonRecursiveBigDecimalSchema,
|
|
35373
|
+
quantity: NonRecursiveBigDecimalSchema,
|
|
35374
|
+
amount: NonRecursiveBigDecimalSchema,
|
|
35375
|
+
isTaxable: Schema.Boolean
|
|
35234
35376
|
});
|
|
35235
35377
|
const InvoiceFormLineItemEquivalence = Schema.equivalence(InvoiceFormLineItemSchema);
|
|
35236
35378
|
const InvoiceTermsValuesSchema = Schema.Enums(InvoiceTermsValues);
|
|
@@ -35726,7 +35868,7 @@ const InvoiceTable = () => {
|
|
|
35726
35868
|
};
|
|
35727
35869
|
}, [fetchMore, hasMore]);
|
|
35728
35870
|
const options2 = useMemo(() => Object.values(InvoiceStatusOptionConfig), []);
|
|
35729
|
-
const
|
|
35871
|
+
const SingleValue = useCallback(() => {
|
|
35730
35872
|
const label = selectedInvoiceStatusOption.label;
|
|
35731
35873
|
return label ? `Status: ${label}` : "Status";
|
|
35732
35874
|
}, [selectedInvoiceStatusOption.label]);
|
|
@@ -35741,11 +35883,11 @@ const InvoiceTable = () => {
|
|
|
35741
35883
|
isSearchable: false,
|
|
35742
35884
|
isClearable: false,
|
|
35743
35885
|
placeholder: "Status",
|
|
35744
|
-
slots: {
|
|
35886
|
+
slots: { SingleValue },
|
|
35745
35887
|
"aria-label": "Status Filter"
|
|
35746
35888
|
}
|
|
35747
35889
|
),
|
|
35748
|
-
[
|
|
35890
|
+
[SingleValue, options2, selectedInvoiceStatusOption, setTableFilters]
|
|
35749
35891
|
);
|
|
35750
35892
|
const CreateInvoiceButton = useCallback(
|
|
35751
35893
|
() => /* @__PURE__ */ jsxs(Button, { onPress: toCreateInvoice, children: [
|
|
@@ -37723,8 +37865,8 @@ const useCustomerForm = (props) => {
|
|
|
37723
37865
|
}, [form, formDefaults]);
|
|
37724
37866
|
return useMemo(() => ({ form, submitError }), [form, submitError]);
|
|
37725
37867
|
};
|
|
37726
|
-
const CustomerForm = (
|
|
37727
|
-
var
|
|
37868
|
+
const CustomerForm = (_wd) => {
|
|
37869
|
+
var _xd = _wd, { onSuccess, isReadOnly } = _xd, formState = __objRest(_xd, ["onSuccess", "isReadOnly"]);
|
|
37728
37870
|
const { form, submitError } = useCustomerForm(__spreadValues({ onSuccess }, formState));
|
|
37729
37871
|
const blockNativeOnSubmit = useCallback((e) => {
|
|
37730
37872
|
e.preventDefault();
|
|
@@ -37826,7 +37968,8 @@ const CustomerFormDrawer = (props) => {
|
|
|
37826
37968
|
}
|
|
37827
37969
|
);
|
|
37828
37970
|
};
|
|
37829
|
-
const InvoiceFormErrorBanner = ({
|
|
37971
|
+
const InvoiceFormErrorBanner = ({ submitError }) => {
|
|
37972
|
+
const form = useFormContext();
|
|
37830
37973
|
return /* @__PURE__ */ jsx(form.Subscribe, { selector: (state) => state.errorMap, children: (errorMap) => {
|
|
37831
37974
|
const validationErrors = flattenValidationErrors(errorMap);
|
|
37832
37975
|
if (validationErrors.length > 0 || submitError) {
|
|
@@ -37844,9 +37987,9 @@ const InvoiceFormErrorBanner = ({ form, submitError }) => {
|
|
|
37844
37987
|
} });
|
|
37845
37988
|
};
|
|
37846
37989
|
function computeSubtotal(lineItems) {
|
|
37847
|
-
return lineItems.reduce((sum, item) => BigDecimal.sum(sum, item.amount), BIG_DECIMAL_ZERO);
|
|
37990
|
+
return lineItems.reduce((sum, item) => BigDecimal.sum(sum, fromNonRecursiveBigDecimal(item.amount)), BIG_DECIMAL_ZERO);
|
|
37848
37991
|
}
|
|
37849
|
-
const computeRawTaxableSubtotal = (lineItems) => lineItems.filter((item) => item.isTaxable).reduce((sum, item) => BigDecimal.sum(sum, item.amount), BIG_DECIMAL_ZERO);
|
|
37992
|
+
const computeRawTaxableSubtotal = (lineItems) => lineItems.filter((item) => item.isTaxable).reduce((sum, item) => BigDecimal.sum(sum, fromNonRecursiveBigDecimal(item.amount)), BIG_DECIMAL_ZERO);
|
|
37850
37993
|
function computeAdditionalDiscount({
|
|
37851
37994
|
subtotal,
|
|
37852
37995
|
discountRate
|
|
@@ -37890,15 +38033,22 @@ const getGrandTotalFromInvoice = (invoice) => {
|
|
|
37890
38033
|
const grandTotal = computeGrandTotal({ subtotal, additionalDiscount, taxes });
|
|
37891
38034
|
return grandTotal;
|
|
37892
38035
|
};
|
|
37893
|
-
const INVOICE_MECE_TAG_DIMENSION = "Job";
|
|
37894
38036
|
const EMPTY_LINE_ITEM = {
|
|
37895
38037
|
description: "",
|
|
37896
|
-
unitPrice:
|
|
37897
|
-
quantity:
|
|
37898
|
-
amount:
|
|
37899
|
-
isTaxable: false
|
|
37900
|
-
|
|
37901
|
-
|
|
38038
|
+
unitPrice: NRBD_ZERO,
|
|
38039
|
+
quantity: NRBD_ONE,
|
|
38040
|
+
amount: NRBD_ZERO,
|
|
38041
|
+
isTaxable: false
|
|
38042
|
+
};
|
|
38043
|
+
const computeLineItemAmount = (unitPrice, quantity) => {
|
|
38044
|
+
const bdUnitPrice = fromNonRecursiveBigDecimal(unitPrice);
|
|
38045
|
+
const bdQuantity = fromNonRecursiveBigDecimal(quantity);
|
|
38046
|
+
return toNonRecursiveBigDecimal(BigDecimal.round(BigDecimal.normalize(BigDecimal.multiply(bdUnitPrice, bdQuantity)), { scale: 2 }));
|
|
38047
|
+
};
|
|
38048
|
+
const computeLineItemUnitPrice = (amount, quantity) => {
|
|
38049
|
+
const bdAmount = fromNonRecursiveBigDecimal(amount);
|
|
38050
|
+
const bdQuantity = fromNonRecursiveBigDecimal(quantity);
|
|
38051
|
+
return toNonRecursiveBigDecimal(BigDecimal.round(BigDecimal.normalize(safeDivide(bdAmount, bdQuantity)), { scale: 2 }));
|
|
37902
38052
|
};
|
|
37903
38053
|
const getEmptyInvoiceFormValues = () => {
|
|
37904
38054
|
const sentAt = fromDate(startOfToday(), getLocalTimeZone());
|
|
@@ -37917,13 +38067,6 @@ const getEmptyInvoiceFormValues = () => {
|
|
|
37917
38067
|
taxRate: BIG_DECIMAL_ZERO
|
|
37918
38068
|
};
|
|
37919
38069
|
};
|
|
37920
|
-
const getAdditionalTags = (tags) => {
|
|
37921
|
-
return tags.filter((obj) => obj.key.toLowerCase() !== INVOICE_MECE_TAG_DIMENSION.toLowerCase());
|
|
37922
|
-
};
|
|
37923
|
-
const getSelectedTag = (tags) => {
|
|
37924
|
-
var _a;
|
|
37925
|
-
return (_a = tags.find((obj) => obj.key.toLowerCase() === INVOICE_MECE_TAG_DIMENSION.toLowerCase())) != null ? _a : null;
|
|
37926
|
-
};
|
|
37927
38070
|
const getInvoiceLineItemAmount = (lineItem) => {
|
|
37928
38071
|
const { unitPrice, quantity } = lineItem;
|
|
37929
38072
|
return BigDecimal.multiply(quantity, convertCentsToBigDecimal(unitPrice));
|
|
@@ -37932,12 +38075,10 @@ const getInvoiceFormLineItem = (lineItem) => {
|
|
|
37932
38075
|
const { description, unitPrice, quantity } = lineItem;
|
|
37933
38076
|
return {
|
|
37934
38077
|
description: description || "",
|
|
37935
|
-
quantity:
|
|
37936
|
-
unitPrice: convertCentsToBigDecimal(unitPrice),
|
|
37937
|
-
amount: getInvoiceLineItemAmount(lineItem),
|
|
37938
|
-
isTaxable: lineItem.salesTaxTotal > 0
|
|
37939
|
-
accountIdentifier: lineItem.accountIdentifier,
|
|
37940
|
-
tags: lineItem.transactionTags.map(makeTagFromTransactionTag)
|
|
38078
|
+
quantity: toNonRecursiveBigDecimal(quantity),
|
|
38079
|
+
unitPrice: toNonRecursiveBigDecimal(convertCentsToBigDecimal(unitPrice)),
|
|
38080
|
+
amount: toNonRecursiveBigDecimal(getInvoiceLineItemAmount(lineItem)),
|
|
38081
|
+
isTaxable: lineItem.salesTaxTotal > 0
|
|
37941
38082
|
};
|
|
37942
38083
|
};
|
|
37943
38084
|
const getInvoiceFormInitialValues = (invoice) => {
|
|
@@ -37995,14 +38136,6 @@ const validateInvoiceForm = ({ value: invoice }) => {
|
|
|
37995
38136
|
errors.push({ lineItems: "Invoice requires at least one non-empty line item." });
|
|
37996
38137
|
}
|
|
37997
38138
|
nonEmptyLineItems.some((item) => {
|
|
37998
|
-
if (item.accountIdentifier === null) {
|
|
37999
|
-
errors.push({ lineItems: "Invoice has incomplete line items. Please include required field: Revenue account." });
|
|
38000
|
-
return true;
|
|
38001
|
-
}
|
|
38002
|
-
if (getSelectedTag(item.tags) === null) {
|
|
38003
|
-
errors.push({ lineItems: `Invoice has incomplete line items. Please include required field: ${INVOICE_MECE_TAG_DIMENSION}.` });
|
|
38004
|
-
return true;
|
|
38005
|
-
}
|
|
38006
38139
|
if (item.description.trim() === "") {
|
|
38007
38140
|
errors.push({ lineItems: "Invoice has incomplete line items. Please include required field: Description." });
|
|
38008
38141
|
return true;
|
|
@@ -38023,14 +38156,14 @@ const convertInvoiceFormToParams = (form) => {
|
|
|
38023
38156
|
invoiceNumber: form.invoiceNumber.trim(),
|
|
38024
38157
|
memo: form.memo.trim(),
|
|
38025
38158
|
lineItems: form.lineItems.filter((item) => !InvoiceFormLineItemEquivalence(EMPTY_LINE_ITEM, item)).map((item) => {
|
|
38026
|
-
const baseLineItem =
|
|
38159
|
+
const baseLineItem = {
|
|
38027
38160
|
description: item.description.trim(),
|
|
38028
|
-
unitPrice: convertBigDecimalToCents(item.unitPrice),
|
|
38029
|
-
quantity: item.quantity
|
|
38030
|
-
|
|
38031
|
-
}, item.accountIdentifier && { accountIdentifier: item.accountIdentifier });
|
|
38161
|
+
unitPrice: convertBigDecimalToCents(fromNonRecursiveBigDecimal(item.unitPrice)),
|
|
38162
|
+
quantity: fromNonRecursiveBigDecimal(item.quantity)
|
|
38163
|
+
};
|
|
38032
38164
|
if (!item.isTaxable || BigDecimal.equals(form.taxRate, BIG_DECIMAL_ZERO)) return baseLineItem;
|
|
38033
|
-
const
|
|
38165
|
+
const itemAmount = fromNonRecursiveBigDecimal(item.amount);
|
|
38166
|
+
const itemTaxableSubtotal = computeTaxableSubtotal({ rawTaxableSubtotal: itemAmount, discountRate: form.discountRate });
|
|
38034
38167
|
const itemTaxes = computeTaxes({ taxableSubtotal: itemTaxableSubtotal, taxRate: form.taxRate });
|
|
38035
38168
|
return __spreadProps(__spreadValues({}, baseLineItem), { salesTaxes: [{ amount: convertBigDecimalToCents(itemTaxes) }] });
|
|
38036
38169
|
})
|
|
@@ -38041,50 +38174,13 @@ const convertInvoiceFormToParams = (form) => {
|
|
|
38041
38174
|
});
|
|
38042
38175
|
};
|
|
38043
38176
|
const InvoiceFormLineItemRow = ({ form, index, isReadOnly, onDeleteLine }) => {
|
|
38044
|
-
return /* @__PURE__ */ jsx(VStack, {
|
|
38177
|
+
return /* @__PURE__ */ jsx(VStack, { children: /* @__PURE__ */ jsxs(
|
|
38045
38178
|
HStack,
|
|
38046
38179
|
{
|
|
38047
38180
|
gap: "xs",
|
|
38048
38181
|
align: "end",
|
|
38049
38182
|
className: classNames("Layer__InvoiceForm__LineItem", isReadOnly && "Layer__InvoiceForm__LineItem--readonly"),
|
|
38050
38183
|
children: [
|
|
38051
|
-
/* @__PURE__ */ jsx(form.Field, { name: `lineItems[${index}].accountIdentifier`, children: (field) => {
|
|
38052
|
-
const onValueChange = (value) => {
|
|
38053
|
-
if (value && !isClassificationAccountIdentifier(value)) {
|
|
38054
|
-
return;
|
|
38055
|
-
}
|
|
38056
|
-
field.setValue(value);
|
|
38057
|
-
};
|
|
38058
|
-
return /* @__PURE__ */ jsx(
|
|
38059
|
-
LedgerAccountCombobox,
|
|
38060
|
-
{
|
|
38061
|
-
label: "Revenue account (hidden)",
|
|
38062
|
-
value: field.state.value,
|
|
38063
|
-
mode: CategoriesListMode.Revenue,
|
|
38064
|
-
onValueChange,
|
|
38065
|
-
isReadOnly,
|
|
38066
|
-
showLabel: index === 0
|
|
38067
|
-
}
|
|
38068
|
-
);
|
|
38069
|
-
} }),
|
|
38070
|
-
/* @__PURE__ */ jsx(form.Field, { name: `lineItems[${index}].tags`, children: (field) => {
|
|
38071
|
-
const additionalTags = getAdditionalTags(field.state.value);
|
|
38072
|
-
const selectedTag = getSelectedTag(field.state.value);
|
|
38073
|
-
const onValueChange = (value) => {
|
|
38074
|
-
field.setValue(value ? [...additionalTags, value] : additionalTags);
|
|
38075
|
-
};
|
|
38076
|
-
return /* @__PURE__ */ jsx(
|
|
38077
|
-
TagDimensionCombobox,
|
|
38078
|
-
{
|
|
38079
|
-
dimensionKey: INVOICE_MECE_TAG_DIMENSION,
|
|
38080
|
-
isReadOnly,
|
|
38081
|
-
value: selectedTag,
|
|
38082
|
-
onValueChange,
|
|
38083
|
-
showLabel: index === 0,
|
|
38084
|
-
isClearable: false
|
|
38085
|
-
}
|
|
38086
|
-
);
|
|
38087
|
-
} }),
|
|
38088
38184
|
/* @__PURE__ */ jsx(form.AppField, { name: `lineItems[${index}].description`, children: (field) => /* @__PURE__ */ jsx(field.FormTextField, { label: "Description", showLabel: index === 0, isReadOnly }) }),
|
|
38089
38185
|
/* @__PURE__ */ jsx(
|
|
38090
38186
|
form.AppField,
|
|
@@ -38094,13 +38190,13 @@ const InvoiceFormLineItemRow = ({ form, index, isReadOnly, onDeleteLine }) => {
|
|
|
38094
38190
|
onBlur: ({ value: quantity }) => {
|
|
38095
38191
|
const amount = form.getFieldValue(`lineItems[${index}].amount`);
|
|
38096
38192
|
const unitPrice = form.getFieldValue(`lineItems[${index}].unitPrice`);
|
|
38097
|
-
const nextAmount =
|
|
38098
|
-
if (!
|
|
38099
|
-
form.setFieldValue(`lineItems[${index}].amount`,
|
|
38193
|
+
const nextAmount = computeLineItemAmount(unitPrice, quantity);
|
|
38194
|
+
if (!nrbdEquals(amount, nextAmount)) {
|
|
38195
|
+
form.setFieldValue(`lineItems[${index}].amount`, nextAmount);
|
|
38100
38196
|
}
|
|
38101
38197
|
}
|
|
38102
38198
|
},
|
|
38103
|
-
children: (field) => /* @__PURE__ */ jsx(field.
|
|
38199
|
+
children: (field) => /* @__PURE__ */ jsx(field.FormNonRecursiveBigDecimalField, { label: "Quantity", showLabel: index === 0, isReadOnly })
|
|
38104
38200
|
}
|
|
38105
38201
|
),
|
|
38106
38202
|
/* @__PURE__ */ jsx(
|
|
@@ -38111,13 +38207,13 @@ const InvoiceFormLineItemRow = ({ form, index, isReadOnly, onDeleteLine }) => {
|
|
|
38111
38207
|
onBlur: ({ value: unitPrice }) => {
|
|
38112
38208
|
const amount = form.getFieldValue(`lineItems[${index}].amount`);
|
|
38113
38209
|
const quantity = form.getFieldValue(`lineItems[${index}].quantity`);
|
|
38114
|
-
const nextAmount =
|
|
38115
|
-
if (!
|
|
38116
|
-
form.setFieldValue(`lineItems[${index}].amount`,
|
|
38210
|
+
const nextAmount = computeLineItemAmount(unitPrice, quantity);
|
|
38211
|
+
if (!nrbdEquals(amount, nextAmount)) {
|
|
38212
|
+
form.setFieldValue(`lineItems[${index}].amount`, nextAmount);
|
|
38117
38213
|
}
|
|
38118
38214
|
}
|
|
38119
38215
|
},
|
|
38120
|
-
children: (field) => /* @__PURE__ */ jsx(field.
|
|
38216
|
+
children: (field) => /* @__PURE__ */ jsx(field.FormNonRecursiveBigDecimalField, { label: "Rate", mode: "currency", showLabel: index === 0, allowNegative: true, isReadOnly })
|
|
38121
38217
|
}
|
|
38122
38218
|
),
|
|
38123
38219
|
/* @__PURE__ */ jsx(
|
|
@@ -38128,13 +38224,13 @@ const InvoiceFormLineItemRow = ({ form, index, isReadOnly, onDeleteLine }) => {
|
|
|
38128
38224
|
onBlur: ({ value: amount }) => {
|
|
38129
38225
|
const unitPrice = form.getFieldValue(`lineItems[${index}].unitPrice`);
|
|
38130
38226
|
const quantity = form.getFieldValue(`lineItems[${index}].quantity`);
|
|
38131
|
-
const nextUnitPrice =
|
|
38132
|
-
if (!
|
|
38133
|
-
form.setFieldValue(`lineItems[${index}].unitPrice`,
|
|
38227
|
+
const nextUnitPrice = computeLineItemUnitPrice(amount, quantity);
|
|
38228
|
+
if (!nrbdEquals(unitPrice, nextUnitPrice)) {
|
|
38229
|
+
form.setFieldValue(`lineItems[${index}].unitPrice`, nextUnitPrice);
|
|
38134
38230
|
}
|
|
38135
38231
|
}
|
|
38136
38232
|
},
|
|
38137
|
-
children: (field) => /* @__PURE__ */ jsx(field.
|
|
38233
|
+
children: (field) => /* @__PURE__ */ jsx(field.FormNonRecursiveBigDecimalField, { label: "Amount", mode: "currency", showLabel: index === 0, allowNegative: true, isReadOnly })
|
|
38138
38234
|
}
|
|
38139
38235
|
),
|
|
38140
38236
|
/* @__PURE__ */ jsx(form.AppField, { name: `lineItems[${index}].isTaxable`, children: (field) => /* @__PURE__ */ jsx(field.FormCheckboxField, { label: "Taxable", showLabel: index === 0, isReadOnly }) }),
|
|
@@ -38148,7 +38244,16 @@ const InvoiceFormLineItemsSection = ({
|
|
|
38148
38244
|
isReadOnly
|
|
38149
38245
|
}) => {
|
|
38150
38246
|
return /* @__PURE__ */ jsx(form.Field, { name: "lineItems", mode: "array", children: (field) => /* @__PURE__ */ jsxs(VStack, { gap: "xs", align: "baseline", children: [
|
|
38151
|
-
field.state.value.map((
|
|
38247
|
+
field.state.value.map((_lineItem, index) => /* @__PURE__ */ jsx(
|
|
38248
|
+
InvoiceFormLineItemRow,
|
|
38249
|
+
{
|
|
38250
|
+
form,
|
|
38251
|
+
index,
|
|
38252
|
+
isReadOnly,
|
|
38253
|
+
onDeleteLine: () => field.removeValue(index)
|
|
38254
|
+
},
|
|
38255
|
+
index
|
|
38256
|
+
)),
|
|
38152
38257
|
!isReadOnly && /* @__PURE__ */ jsxs(Button, { variant: "outlined", onClick: () => field.pushValue(EMPTY_LINE_ITEM), children: [
|
|
38153
38258
|
"Add line item",
|
|
38154
38259
|
/* @__PURE__ */ jsx(Plus$1, { size: 16 })
|
|
@@ -38183,45 +38288,6 @@ const InvoiceFormMetadataSection = ({
|
|
|
38183
38288
|
] })
|
|
38184
38289
|
] }) });
|
|
38185
38290
|
};
|
|
38186
|
-
const returnTrue = () => true;
|
|
38187
|
-
function CreatableComboBox(_sd) {
|
|
38188
|
-
var _td = _sd, {
|
|
38189
|
-
className,
|
|
38190
|
-
slots,
|
|
38191
|
-
isError,
|
|
38192
|
-
selectedValue,
|
|
38193
|
-
onSelectedValueChange,
|
|
38194
|
-
onCreateOption,
|
|
38195
|
-
formatCreateLabel: formatCreateLabel2,
|
|
38196
|
-
createOptionPosition = "first",
|
|
38197
|
-
isValidNewOption = returnTrue
|
|
38198
|
-
} = _td, props = __objRest(_td, [
|
|
38199
|
-
"className",
|
|
38200
|
-
"slots",
|
|
38201
|
-
"isError",
|
|
38202
|
-
"selectedValue",
|
|
38203
|
-
"onSelectedValueChange",
|
|
38204
|
-
"onCreateOption",
|
|
38205
|
-
"formatCreateLabel",
|
|
38206
|
-
"createOptionPosition",
|
|
38207
|
-
"isValidNewOption"
|
|
38208
|
-
]);
|
|
38209
|
-
const commonSelectProps = useCommonComboBoxProps(__spreadValues({ className, slots }, props));
|
|
38210
|
-
return /* @__PURE__ */ jsxs(VStack, { gap: "3xs", fluid: true, className: className ? `${className}__Container` : void 0, children: [
|
|
38211
|
-
/* @__PURE__ */ jsx(
|
|
38212
|
-
BaseCreatableSelect,
|
|
38213
|
-
__spreadProps(__spreadValues({}, commonSelectProps), {
|
|
38214
|
-
value: selectedValue,
|
|
38215
|
-
onChange: onSelectedValueChange,
|
|
38216
|
-
onCreateOption,
|
|
38217
|
-
isValidNewOption,
|
|
38218
|
-
formatCreateLabel: formatCreateLabel2,
|
|
38219
|
-
createOptionPosition
|
|
38220
|
-
})
|
|
38221
|
-
),
|
|
38222
|
-
/* @__PURE__ */ jsx(ComboBoxErrorMessage, { isError, errorMessage: slots == null ? void 0 : slots.ErrorMessage })
|
|
38223
|
-
] });
|
|
38224
|
-
}
|
|
38225
38291
|
function MaybeCreatableComboBox(props) {
|
|
38226
38292
|
if (props.isCreatable) {
|
|
38227
38293
|
return /* @__PURE__ */ jsx(CreatableComboBox, __spreadValues({}, props));
|
|
@@ -38431,7 +38497,7 @@ const InvoiceFormTermsSection = ({
|
|
|
38431
38497
|
updateDueAtFromTermsAndSentAt(terms, sentAt);
|
|
38432
38498
|
}
|
|
38433
38499
|
},
|
|
38434
|
-
children: (field) => /* @__PURE__ */ jsx(field.
|
|
38500
|
+
children: (field) => /* @__PURE__ */ jsx(field.FormDatePickerField, { label: "Invoice date", inline: true, className: "Layer__InvoiceForm__Field__SentAt", isReadOnly })
|
|
38435
38501
|
}
|
|
38436
38502
|
),
|
|
38437
38503
|
/* @__PURE__ */ jsx(
|
|
@@ -38449,7 +38515,7 @@ const InvoiceFormTermsSection = ({
|
|
|
38449
38515
|
lastDueAtRef.current = dueAt;
|
|
38450
38516
|
}
|
|
38451
38517
|
},
|
|
38452
|
-
children: (field) => /* @__PURE__ */ jsx(field.
|
|
38518
|
+
children: (field) => /* @__PURE__ */ jsx(field.FormDatePickerField, { label: "Due date", inline: true, className: "Layer__InvoiceForm__Field__DueAt", isReadOnly })
|
|
38453
38519
|
}
|
|
38454
38520
|
)
|
|
38455
38521
|
] })
|
|
@@ -38502,23 +38568,26 @@ const useInvoiceForm = (props) => {
|
|
|
38502
38568
|
const upsertInvoiceProps = mode === UpsertInvoiceMode.Update ? { mode, invoiceId: props.invoice.id } : { mode };
|
|
38503
38569
|
const { trigger: upsertInvoice } = useUpsertInvoice(upsertInvoiceProps);
|
|
38504
38570
|
const invoice = isUpdateMode(props) ? props.invoice : null;
|
|
38505
|
-
const
|
|
38506
|
-
const
|
|
38507
|
-
|
|
38508
|
-
|
|
38509
|
-
|
|
38510
|
-
|
|
38511
|
-
|
|
38512
|
-
|
|
38513
|
-
|
|
38514
|
-
|
|
38515
|
-
|
|
38571
|
+
const defaultValues = useMemo(() => getInvoiceFormDefaultValues(invoice), [invoice]);
|
|
38572
|
+
const onSubmit = useCallback(
|
|
38573
|
+
(_0) => __async(null, [_0], function* ({ value, meta, formApi }) {
|
|
38574
|
+
try {
|
|
38575
|
+
const upsertInvoiceParams = convertInvoiceFormToParams(value);
|
|
38576
|
+
const upsertInvoiceRequest = Schema.encodeUnknownSync(UpsertInvoiceSchema)(upsertInvoiceParams);
|
|
38577
|
+
const { data: invoice2 } = yield upsertInvoice(upsertInvoiceRequest);
|
|
38578
|
+
setSubmitError(void 0);
|
|
38579
|
+
onSuccess(invoice2);
|
|
38580
|
+
formApi.reset();
|
|
38581
|
+
if (meta.submitAction === "send" && onSendInvoice) {
|
|
38582
|
+
yield onSendInvoice(invoice2.id);
|
|
38583
|
+
}
|
|
38584
|
+
} catch (e) {
|
|
38585
|
+
console.error(e);
|
|
38586
|
+
setSubmitError("Something went wrong. Please try again.");
|
|
38516
38587
|
}
|
|
38517
|
-
}
|
|
38518
|
-
|
|
38519
|
-
|
|
38520
|
-
}
|
|
38521
|
-
}), [onSendInvoice, onSuccess, upsertInvoice]);
|
|
38588
|
+
}),
|
|
38589
|
+
[onSendInvoice, onSuccess, upsertInvoice]
|
|
38590
|
+
);
|
|
38522
38591
|
const validators = useMemo(() => ({
|
|
38523
38592
|
onDynamic: validateInvoiceForm
|
|
38524
38593
|
}), []);
|
|
@@ -38605,7 +38674,7 @@ const InvoiceForm = forwardRef((props, ref) => {
|
|
|
38605
38674
|
}, [formState, onChangeFormState]);
|
|
38606
38675
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
38607
38676
|
/* @__PURE__ */ jsxs(Form, { className: "Layer__InvoiceForm", onSubmit: blockNativeOnSubmit, children: [
|
|
38608
|
-
/* @__PURE__ */ jsx(
|
|
38677
|
+
/* @__PURE__ */ jsx(form.AppForm, { children: /* @__PURE__ */ jsx(InvoiceFormErrorBanner, { submitError }) }),
|
|
38609
38678
|
/* @__PURE__ */ jsx(
|
|
38610
38679
|
InvoiceFormTermsSection,
|
|
38611
38680
|
{
|
|
@@ -38715,8 +38784,8 @@ const getClassnameForSubComponent = (className, suffix) => {
|
|
|
38715
38784
|
};
|
|
38716
38785
|
const METER_CLASS_NAME = "Layer__Meter";
|
|
38717
38786
|
const Meter = forwardRef(
|
|
38718
|
-
function Meter2(
|
|
38719
|
-
var
|
|
38787
|
+
function Meter2(_yd, ref) {
|
|
38788
|
+
var _zd = _yd, { className, label, meterOnly } = _zd, restProps = __objRest(_zd, ["className", "label", "meterOnly"]);
|
|
38720
38789
|
return /* @__PURE__ */ jsx(Meter$1, __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, restProps), { className: classNames(METER_CLASS_NAME, className), ref }), meterOnly && { "aria-label": label }), { children: ({ percentage, valueText }) => /* @__PURE__ */ jsxs(VStack, { gap: "3xs", fluid: true, children: [
|
|
38721
38790
|
!meterOnly && /* @__PURE__ */ jsxs(HStack, { justify: "space-between", children: [
|
|
38722
38791
|
/* @__PURE__ */ jsx(Label, { slot: "label", children: label }),
|
|
@@ -39143,15 +39212,9 @@ const InvoiceOverview = () => {
|
|
|
39143
39212
|
/* @__PURE__ */ jsx(InvoiceTable, {})
|
|
39144
39213
|
] });
|
|
39145
39214
|
};
|
|
39146
|
-
const Invoices = ({
|
|
39147
|
-
showTitle = true,
|
|
39148
|
-
stringOverrides,
|
|
39149
|
-
onSendInvoice
|
|
39150
|
-
}) => {
|
|
39215
|
+
const Invoices = ({ stringOverrides, onSendInvoice }) => {
|
|
39151
39216
|
usePreloadCustomers();
|
|
39152
|
-
|
|
39153
|
-
usePreloadTagDimensionByKey({ dimensionKey: INVOICE_MECE_TAG_DIMENSION });
|
|
39154
|
-
return /* @__PURE__ */ jsx(InvoicesProvider, { onSendInvoice, children: /* @__PURE__ */ jsx(View, { title: (stringOverrides == null ? void 0 : stringOverrides.title) || "Invoices", showHeader: showTitle, children: /* @__PURE__ */ jsx(InvoicesContent, {}) }) });
|
|
39217
|
+
return /* @__PURE__ */ jsx(InvoicesProvider, { onSendInvoice, children: /* @__PURE__ */ jsx(View, { title: (stringOverrides == null ? void 0 : stringOverrides.title) || "Invoices", children: /* @__PURE__ */ jsx(InvoicesContent, {}) }) });
|
|
39155
39218
|
};
|
|
39156
39219
|
const InvoicesContent = () => {
|
|
39157
39220
|
const routeState = useInvoiceRouteState();
|
|
@@ -39162,11 +39225,11 @@ const ProfitAndLossView = (props) => {
|
|
|
39162
39225
|
const containerRef = useRef(null);
|
|
39163
39226
|
return /* @__PURE__ */ jsx(Container, { name: COMPONENT_NAME$4, ref: containerRef, children: /* @__PURE__ */ jsx(ProfitAndLoss, { children: /* @__PURE__ */ jsx(ProfitAndLossPanel, __spreadValues({ containerRef }, props)) }) });
|
|
39164
39227
|
};
|
|
39165
|
-
const ProfitAndLossPanel = (
|
|
39166
|
-
var
|
|
39228
|
+
const ProfitAndLossPanel = (_Ad) => {
|
|
39229
|
+
var _Bd = _Ad, {
|
|
39167
39230
|
containerRef,
|
|
39168
39231
|
stringOverrides
|
|
39169
|
-
} =
|
|
39232
|
+
} = _Bd, props = __objRest(_Bd, [
|
|
39170
39233
|
"containerRef",
|
|
39171
39234
|
"stringOverrides"
|
|
39172
39235
|
]);
|
|
@@ -39417,14 +39480,14 @@ function ExpandableDataTable({
|
|
|
39417
39480
|
);
|
|
39418
39481
|
}
|
|
39419
39482
|
const UNIFIED_REPORT_TAG_KEY = "#unified-report";
|
|
39420
|
-
function buildKey$g(
|
|
39421
|
-
var
|
|
39483
|
+
function buildKey$g(_Cd) {
|
|
39484
|
+
var _Dd = _Cd, {
|
|
39422
39485
|
access_token: accessToken,
|
|
39423
39486
|
apiUrl,
|
|
39424
39487
|
businessId,
|
|
39425
39488
|
report,
|
|
39426
39489
|
groupBy
|
|
39427
|
-
} =
|
|
39490
|
+
} = _Dd, dateParams = __objRest(_Dd, [
|
|
39428
39491
|
"access_token",
|
|
39429
39492
|
"apiUrl",
|
|
39430
39493
|
"businessId",
|
|
@@ -39442,8 +39505,8 @@ function buildKey$g(_yd) {
|
|
|
39442
39505
|
}, dateParams);
|
|
39443
39506
|
}
|
|
39444
39507
|
}
|
|
39445
|
-
const getUnifiedReport = get((
|
|
39446
|
-
var
|
|
39508
|
+
const getUnifiedReport = get((_Ed) => {
|
|
39509
|
+
var _Fd = _Ed, { businessId, report, groupBy } = _Fd, dateParams = __objRest(_Fd, ["businessId", "report", "groupBy"]);
|
|
39447
39510
|
const parameters = toDefinedSearchParameters(__spreadProps(__spreadValues({}, dateParams), { groupBy }));
|
|
39448
39511
|
return `/v1/businesses/${businessId}/reports/unified/${report}?${parameters}`;
|
|
39449
39512
|
});
|
|
@@ -39468,8 +39531,8 @@ class UnifiedReportSWRResponse {
|
|
|
39468
39531
|
return this.swrResponse.mutate;
|
|
39469
39532
|
}
|
|
39470
39533
|
}
|
|
39471
|
-
function useUnifiedReport(
|
|
39472
|
-
var
|
|
39534
|
+
function useUnifiedReport(_Gd) {
|
|
39535
|
+
var _Hd = _Gd, { report, groupBy } = _Hd, dateParams = __objRest(_Hd, ["report", "groupBy"]);
|
|
39473
39536
|
const { data: auth } = useAuth();
|
|
39474
39537
|
const { apiUrl } = useEnvironment();
|
|
39475
39538
|
const { businessId } = useLayerContext();
|
|
@@ -39588,8 +39651,8 @@ const S3PresignedUrlSchema = Schema.Struct({
|
|
|
39588
39651
|
createdAt: Schema.Date,
|
|
39589
39652
|
documentId: Schema.NullishOr(Schema.UUID)
|
|
39590
39653
|
});
|
|
39591
|
-
const getUnifiedReportExcel = get((
|
|
39592
|
-
var
|
|
39654
|
+
const getUnifiedReportExcel = get((_Id) => {
|
|
39655
|
+
var _Jd = _Id, { businessId, report, groupBy } = _Jd, dateParams = __objRest(_Jd, ["businessId", "report", "groupBy"]);
|
|
39593
39656
|
const parameters = toDefinedSearchParameters(__spreadProps(__spreadValues({}, dateParams), { groupBy }));
|
|
39594
39657
|
return `/v1/businesses/${businessId}/reports/unified/${report}/exports/excel?${parameters}`;
|
|
39595
39658
|
});
|
|
@@ -41002,19 +41065,19 @@ const VendorsProvider = ({ children }) => {
|
|
|
41002
41065
|
const vendors = useVendors();
|
|
41003
41066
|
return /* @__PURE__ */ jsx(VendorsContext.Provider, { value: vendors, children });
|
|
41004
41067
|
};
|
|
41005
|
-
const SelectVendor = (
|
|
41006
|
-
var
|
|
41068
|
+
const SelectVendor = (_Kd) => {
|
|
41069
|
+
var _Ld = _Kd, { withContext = true } = _Ld, props = __objRest(_Ld, ["withContext"]);
|
|
41007
41070
|
if (withContext) {
|
|
41008
41071
|
return /* @__PURE__ */ jsx(VendorsProvider, { children: /* @__PURE__ */ jsx(SelectVendorContent, __spreadValues({}, props)) });
|
|
41009
41072
|
}
|
|
41010
41073
|
return /* @__PURE__ */ jsx(SelectVendorContent, __spreadValues({}, props));
|
|
41011
41074
|
};
|
|
41012
|
-
const SelectVendorContent = (
|
|
41013
|
-
var
|
|
41075
|
+
const SelectVendorContent = (_Md) => {
|
|
41076
|
+
var _Nd = _Md, {
|
|
41014
41077
|
value,
|
|
41015
41078
|
onChange,
|
|
41016
41079
|
placeholder = "Select vendor"
|
|
41017
|
-
} =
|
|
41080
|
+
} = _Nd, props = __objRest(_Nd, [
|
|
41018
41081
|
"value",
|
|
41019
41082
|
"onChange",
|
|
41020
41083
|
"placeholder"
|
|
@@ -41752,8 +41815,8 @@ const BillsTableWithPanel = ({
|
|
|
41752
41815
|
}
|
|
41753
41816
|
);
|
|
41754
41817
|
};
|
|
41755
|
-
const Bills = (
|
|
41756
|
-
var
|
|
41818
|
+
const Bills = (_Od) => {
|
|
41819
|
+
var _Pd = _Od, { context = true } = _Pd, props = __objRest(_Pd, ["context"]);
|
|
41757
41820
|
if (context) {
|
|
41758
41821
|
return /* @__PURE__ */ jsx(BillsProvider, { children: /* @__PURE__ */ jsx(BillsContent, __spreadValues({}, props)) });
|
|
41759
41822
|
}
|
|
@@ -41808,8 +41871,8 @@ const getTimezoneDisplay = (date) => {
|
|
|
41808
41871
|
}
|
|
41809
41872
|
};
|
|
41810
41873
|
const LinkButton = forwardRef(
|
|
41811
|
-
function LinkButton2(
|
|
41812
|
-
var
|
|
41874
|
+
function LinkButton2(_Qd, ref) {
|
|
41875
|
+
var _Rd = _Qd, {
|
|
41813
41876
|
children,
|
|
41814
41877
|
ellipsis,
|
|
41815
41878
|
icon,
|
|
@@ -41822,7 +41885,7 @@ const LinkButton = forwardRef(
|
|
|
41822
41885
|
href,
|
|
41823
41886
|
target,
|
|
41824
41887
|
rel
|
|
41825
|
-
} =
|
|
41888
|
+
} = _Rd, restProps = __objRest(_Rd, [
|
|
41826
41889
|
"children",
|
|
41827
41890
|
"ellipsis",
|
|
41828
41891
|
"icon",
|
|
@@ -46603,11 +46666,11 @@ const TaxPaymentsMobileList = ({ data, isLoading, isError, slots }) => {
|
|
|
46603
46666
|
) });
|
|
46604
46667
|
};
|
|
46605
46668
|
const EMPTY_ARRAY = [];
|
|
46606
|
-
const SimpleDataTable = (
|
|
46607
|
-
var
|
|
46669
|
+
const SimpleDataTable = (_Sd) => {
|
|
46670
|
+
var _Td = _Sd, {
|
|
46608
46671
|
data,
|
|
46609
46672
|
columnConfig: columnConfig2
|
|
46610
|
-
} =
|
|
46673
|
+
} = _Td, rest = __objRest(_Td, [
|
|
46611
46674
|
"data",
|
|
46612
46675
|
"columnConfig"
|
|
46613
46676
|
]);
|
|
@@ -47719,14 +47782,14 @@ const BusinessProvider = ({
|
|
|
47719
47782
|
}
|
|
47720
47783
|
);
|
|
47721
47784
|
};
|
|
47722
|
-
const LayerProvider = (
|
|
47723
|
-
var
|
|
47785
|
+
const LayerProvider = (_Ud) => {
|
|
47786
|
+
var _Vd = _Ud, {
|
|
47724
47787
|
appId,
|
|
47725
47788
|
appSecret,
|
|
47726
47789
|
businessAccessToken,
|
|
47727
47790
|
environment,
|
|
47728
47791
|
usePlaidSandbox
|
|
47729
|
-
} =
|
|
47792
|
+
} = _Vd, restProps = __objRest(_Vd, [
|
|
47730
47793
|
"appId",
|
|
47731
47794
|
"appSecret",
|
|
47732
47795
|
"businessAccessToken",
|
|
@@ -47734,7 +47797,7 @@ const LayerProvider = (_Qd) => {
|
|
|
47734
47797
|
"usePlaidSandbox"
|
|
47735
47798
|
]);
|
|
47736
47799
|
const [cache] = useState(() => /* @__PURE__ */ new Map());
|
|
47737
|
-
return /* @__PURE__ */ jsx(SWRConfig, { value: __spreadProps(__spreadValues({}, DEFAULT_SWR_CONFIG), { provider: () => cache }), children: /* @__PURE__ */ jsx(EnvironmentInputProvider, { environment, usePlaidSandbox, children: /* @__PURE__ */ jsx(
|
|
47800
|
+
return /* @__PURE__ */ jsx(SWRConfig, { value: __spreadProps(__spreadValues({}, DEFAULT_SWR_CONFIG), { provider: () => cache }), children: /* @__PURE__ */ jsx(I18nProvider, { locale: "en-US", children: /* @__PURE__ */ jsx(EnvironmentInputProvider, { environment, usePlaidSandbox, children: /* @__PURE__ */ jsx(
|
|
47738
47801
|
AuthInputProvider,
|
|
47739
47802
|
{
|
|
47740
47803
|
appId,
|
|
@@ -47742,7 +47805,7 @@ const LayerProvider = (_Qd) => {
|
|
|
47742
47805
|
businessAccessToken,
|
|
47743
47806
|
children: /* @__PURE__ */ jsx(GlobalDateStoreProvider, { children: /* @__PURE__ */ jsx(BusinessProvider, __spreadValues({}, restProps)) })
|
|
47744
47807
|
}
|
|
47745
|
-
) }) });
|
|
47808
|
+
) }) }) });
|
|
47746
47809
|
};
|
|
47747
47810
|
export {
|
|
47748
47811
|
AccountingOverview,
|