@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/cjs/index.cjs
CHANGED
|
@@ -71,9 +71,9 @@ const useResizeObserver = require("@react-hook/resize-observer");
|
|
|
71
71
|
const lucideReact = require("lucide-react");
|
|
72
72
|
const pluralize = require("pluralize");
|
|
73
73
|
const ReactSelect = require("react-select");
|
|
74
|
+
const CreatableSelect = require("react-select/creatable");
|
|
74
75
|
const reactDropzone = require("react-dropzone");
|
|
75
76
|
const reactForm = require("@tanstack/react-form");
|
|
76
|
-
const BaseCreatableSelect = require("react-select/creatable");
|
|
77
77
|
const reactTable = require("@tanstack/react-table");
|
|
78
78
|
const reactVirtual = require("@tanstack/react-virtual");
|
|
79
79
|
const react$1 = require("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 @@ index.Schema.Struct({
|
|
|
2334
2334
|
index.Schema.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,
|
|
@@ -9615,11 +9621,11 @@ function buildCustomPlaceholder({
|
|
|
9615
9621
|
"children"
|
|
9616
9622
|
]);
|
|
9617
9623
|
if (!placeholder) return null;
|
|
9618
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ReactSelect.components.Placeholder, __spreadProps(__spreadValues({}, restProps), {
|
|
9624
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ReactSelect.components.Placeholder, __spreadProps(__spreadValues({}, restProps), { children: /* @__PURE__ */ jsxRuntime.jsx(Span, { variant: "inherit", ellipsis: true, children: placeholder }) }));
|
|
9619
9625
|
};
|
|
9620
9626
|
}
|
|
9621
9627
|
function buildCustomSingleValue({
|
|
9622
|
-
|
|
9628
|
+
SingleValue
|
|
9623
9629
|
}) {
|
|
9624
9630
|
return function CustomSingleValue(_a) {
|
|
9625
9631
|
var _b = _a, {
|
|
@@ -9627,7 +9633,8 @@ function buildCustomSingleValue({
|
|
|
9627
9633
|
} = _b, restProps = __objRest(_b, [
|
|
9628
9634
|
"children"
|
|
9629
9635
|
]);
|
|
9630
|
-
|
|
9636
|
+
const defaultRenderedSingleValue = /* @__PURE__ */ jsxRuntime.jsx(Span, { ellipsis: true, children });
|
|
9637
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ReactSelect.components.SingleValue, __spreadProps(__spreadValues({}, restProps), { children: SingleValue ? /* @__PURE__ */ jsxRuntime.jsx(SingleValue, { option: restProps.data, fallback: defaultRenderedSingleValue }) : defaultRenderedSingleValue }));
|
|
9631
9638
|
};
|
|
9632
9639
|
}
|
|
9633
9640
|
function useComboBoxSubcomponents({
|
|
@@ -9635,7 +9642,7 @@ function useComboBoxSubcomponents({
|
|
|
9635
9642
|
slots,
|
|
9636
9643
|
displayDisabledAsSelected
|
|
9637
9644
|
}) {
|
|
9638
|
-
const { EmptyMessage,
|
|
9645
|
+
const { EmptyMessage, SingleValue, GroupHeading, Option } = slots != null ? slots : {};
|
|
9639
9646
|
const ClearIndicatorRef = React.useRef(buildCustomClearIndicator());
|
|
9640
9647
|
const DropdownIndicatorRef = React.useRef(buildCustomDropdownIndicator());
|
|
9641
9648
|
const LoadingIndicatorRef = React.useRef(buildCustomLoadingIndicator());
|
|
@@ -9657,8 +9664,8 @@ function useComboBoxSubcomponents({
|
|
|
9657
9664
|
[placeholder]
|
|
9658
9665
|
);
|
|
9659
9666
|
const SingleValueComponent = React.useMemo(
|
|
9660
|
-
() => buildCustomSingleValue({
|
|
9661
|
-
[
|
|
9667
|
+
() => buildCustomSingleValue({ SingleValue }),
|
|
9668
|
+
[SingleValue]
|
|
9662
9669
|
);
|
|
9663
9670
|
return React.useMemo(() => ({
|
|
9664
9671
|
ClearIndicator: ClearIndicatorRef.current,
|
|
@@ -9688,6 +9695,7 @@ function useCommonComboBoxProps({
|
|
|
9688
9695
|
slots,
|
|
9689
9696
|
displayDisabledAsSelected,
|
|
9690
9697
|
isDisabled,
|
|
9698
|
+
isError,
|
|
9691
9699
|
isReadOnly = false,
|
|
9692
9700
|
isClearable = true,
|
|
9693
9701
|
isSearchable = true,
|
|
@@ -9710,10 +9718,14 @@ function useCommonComboBoxProps({
|
|
|
9710
9718
|
COMBO_BOX_CLASS_NAMES.CONTROL,
|
|
9711
9719
|
isFocused && `${COMBO_BOX_CLASS_NAMES.CONTROL}--focused`,
|
|
9712
9720
|
isDisabled2 && `${COMBO_BOX_CLASS_NAMES.CONTROL}--disabled`,
|
|
9721
|
+
isError && `${COMBO_BOX_CLASS_NAMES.CONTROL}--error`,
|
|
9713
9722
|
isReadOnly && `${COMBO_BOX_CLASS_NAMES.CONTROL}--readonly`
|
|
9714
9723
|
),
|
|
9715
9724
|
valueContainer: () => COMBO_BOX_CLASS_NAMES.VALUE_CONTAINER,
|
|
9716
|
-
placeholder: () =>
|
|
9725
|
+
placeholder: () => classNames(
|
|
9726
|
+
COMBO_BOX_CLASS_NAMES.PLACEHOLDER,
|
|
9727
|
+
isError && `${COMBO_BOX_CLASS_NAMES.PLACEHOLDER}--error`
|
|
9728
|
+
),
|
|
9717
9729
|
indicatorsContainer: () => classNames(
|
|
9718
9730
|
COMBO_BOX_CLASS_NAMES.INDICATORS_CONTAINER,
|
|
9719
9731
|
isReadOnly && `${COMBO_BOX_CLASS_NAMES.INDICATORS_CONTAINER}--readonly`
|
|
@@ -9721,7 +9733,7 @@ function useCommonComboBoxProps({
|
|
|
9721
9733
|
menu: () => COMBO_BOX_CLASS_NAMES.MENU,
|
|
9722
9734
|
menuList: () => COMBO_BOX_CLASS_NAMES.MENU_LIST,
|
|
9723
9735
|
group: () => COMBO_BOX_CLASS_NAMES.GROUP
|
|
9724
|
-
}), [isReadOnly]);
|
|
9736
|
+
}), [isError, isReadOnly]);
|
|
9725
9737
|
const styles = React.useMemo(() => ({
|
|
9726
9738
|
menuPortal: (base) => __spreadProps(__spreadValues({}, base), { zIndex: 101 })
|
|
9727
9739
|
}), []);
|
|
@@ -9781,7 +9793,7 @@ function ComboBox(_la) {
|
|
|
9781
9793
|
"selectedValue",
|
|
9782
9794
|
"onSelectedValueChange"
|
|
9783
9795
|
]);
|
|
9784
|
-
const commonSelectProps = useCommonComboBoxProps(__spreadValues({ className, slots }, props));
|
|
9796
|
+
const commonSelectProps = useCommonComboBoxProps(__spreadValues({ className, slots, isError }, props));
|
|
9785
9797
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "3xs", fluid: true, className: className ? `${className}__Container` : void 0, children: [
|
|
9786
9798
|
/* @__PURE__ */ jsxRuntime.jsx(ReactSelect, __spreadProps(__spreadValues({}, commonSelectProps), { value: selectedValue, onChange: onSelectedValueChange })),
|
|
9787
9799
|
/* @__PURE__ */ jsxRuntime.jsx(ComboBoxErrorMessage, { isError, errorMessage: slots == null ? void 0 : slots.ErrorMessage })
|
|
@@ -10279,7 +10291,7 @@ const BankTransactionCategoryComboBox = ({
|
|
|
10279
10291
|
const numMatchOptions = (matchGroup == null ? void 0 : matchGroup.options.length) || 0;
|
|
10280
10292
|
const loadingSuggestions = bankTransaction && isLoadingSuggestions(bankTransaction) && selectedValue === null;
|
|
10281
10293
|
const placeholder = numMatchOptions > 1 ? `${numMatchOptions} possible matches...` : loadingSuggestions ? "Generating suggestions..." : includeSuggestedMatches ? "Categorize or match..." : "Select category";
|
|
10282
|
-
const
|
|
10294
|
+
const SingleValue = React.useCallback(() => {
|
|
10283
10295
|
return /* @__PURE__ */ jsxRuntime.jsx(BankTransactionsUncategorizedSelectedValue, { selectedValue });
|
|
10284
10296
|
}, [selectedValue]);
|
|
10285
10297
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10292,7 +10304,7 @@ const BankTransactionCategoryComboBox = ({
|
|
|
10292
10304
|
selectedValue,
|
|
10293
10305
|
placeholder,
|
|
10294
10306
|
slots: {
|
|
10295
|
-
|
|
10307
|
+
SingleValue,
|
|
10296
10308
|
Option: BankTransactionCategoryComboBoxOption,
|
|
10297
10309
|
GroupHeading: BankTransactionCategoryComboBoxGroupHeading
|
|
10298
10310
|
},
|
|
@@ -11302,6 +11314,45 @@ function useCustomAccountParseCsv() {
|
|
|
11302
11314
|
}
|
|
11303
11315
|
);
|
|
11304
11316
|
}
|
|
11317
|
+
const returnTrue = () => true;
|
|
11318
|
+
function CreatableComboBox(_Ba) {
|
|
11319
|
+
var _Ca = _Ba, {
|
|
11320
|
+
className,
|
|
11321
|
+
slots,
|
|
11322
|
+
isError,
|
|
11323
|
+
selectedValue,
|
|
11324
|
+
onSelectedValueChange,
|
|
11325
|
+
onCreateOption,
|
|
11326
|
+
formatCreateLabel: formatCreateLabel2,
|
|
11327
|
+
createOptionPosition = "first",
|
|
11328
|
+
isValidNewOption = returnTrue
|
|
11329
|
+
} = _Ca, props = __objRest(_Ca, [
|
|
11330
|
+
"className",
|
|
11331
|
+
"slots",
|
|
11332
|
+
"isError",
|
|
11333
|
+
"selectedValue",
|
|
11334
|
+
"onSelectedValueChange",
|
|
11335
|
+
"onCreateOption",
|
|
11336
|
+
"formatCreateLabel",
|
|
11337
|
+
"createOptionPosition",
|
|
11338
|
+
"isValidNewOption"
|
|
11339
|
+
]);
|
|
11340
|
+
const commonSelectProps = useCommonComboBoxProps(__spreadValues({ className, slots, isError }, props));
|
|
11341
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "3xs", fluid: true, className: className ? `${className}__Container` : void 0, children: [
|
|
11342
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11343
|
+
CreatableSelect,
|
|
11344
|
+
__spreadProps(__spreadValues({}, commonSelectProps), {
|
|
11345
|
+
value: selectedValue,
|
|
11346
|
+
onChange: onSelectedValueChange,
|
|
11347
|
+
onCreateOption,
|
|
11348
|
+
isValidNewOption,
|
|
11349
|
+
formatCreateLabel: formatCreateLabel2,
|
|
11350
|
+
createOptionPosition
|
|
11351
|
+
})
|
|
11352
|
+
),
|
|
11353
|
+
/* @__PURE__ */ jsxRuntime.jsx(ComboBoxErrorMessage, { isError, errorMessage: slots == null ? void 0 : slots.ErrorMessage })
|
|
11354
|
+
] });
|
|
11355
|
+
}
|
|
11305
11356
|
const copyTextToClipboard = (text) => {
|
|
11306
11357
|
navigator.clipboard.writeText(text).catch(() => {
|
|
11307
11358
|
});
|
|
@@ -11318,8 +11369,8 @@ const CopyTemplateHeadersButtonGroup = ({ headers, className }) => {
|
|
|
11318
11369
|
key
|
|
11319
11370
|
)) });
|
|
11320
11371
|
};
|
|
11321
|
-
const CloseIcon = (
|
|
11322
|
-
var
|
|
11372
|
+
const CloseIcon = (_Da) => {
|
|
11373
|
+
var _Ea = _Da, { size = 12 } = _Ea, props = __objRest(_Ea, ["size"]);
|
|
11323
11374
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11324
11375
|
"svg",
|
|
11325
11376
|
__spreadProps(__spreadValues({
|
|
@@ -11631,15 +11682,15 @@ function useCreateCustomAccount() {
|
|
|
11631
11682
|
}
|
|
11632
11683
|
const FORM_CLASS_NAME = "Layer__UI__Form";
|
|
11633
11684
|
const Form = React.forwardRef(
|
|
11634
|
-
function Form2(
|
|
11635
|
-
var
|
|
11685
|
+
function Form2(_Fa, ref) {
|
|
11686
|
+
var _Ga = _Fa, { children, className } = _Ga, restProps = __objRest(_Ga, ["children", "className"]);
|
|
11636
11687
|
return /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.Form, __spreadProps(__spreadValues({}, restProps), { className: classNames(FORM_CLASS_NAME, className), ref, children }));
|
|
11637
11688
|
}
|
|
11638
11689
|
);
|
|
11639
11690
|
const TEXT_FIELD_CLASS_NAME = "Layer__UI__TextField";
|
|
11640
11691
|
const TextField = React.forwardRef(
|
|
11641
|
-
function TextField2(
|
|
11642
|
-
var
|
|
11692
|
+
function TextField2(_Ha, ref) {
|
|
11693
|
+
var _Ia = _Ha, { children, inline, textarea, className } = _Ia, restProps = __objRest(_Ia, ["children", "inline", "textarea", "className"]);
|
|
11643
11694
|
const dataProperties = toDataProperties({ inline, textarea });
|
|
11644
11695
|
return /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.TextField, __spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), { className: classNames(TEXT_FIELD_CLASS_NAME, className), ref, children: withRenderProp(children, (node) => node) }));
|
|
11645
11696
|
}
|
|
@@ -11769,8 +11820,8 @@ function formatBigDecimalToString(value, options2 = {
|
|
|
11769
11820
|
}
|
|
11770
11821
|
const INPUT_CLASS_NAME = "Layer__UI__Input";
|
|
11771
11822
|
const Input$1 = React.forwardRef(
|
|
11772
|
-
function Input2(
|
|
11773
|
-
var
|
|
11823
|
+
function Input2(_Ja, ref) {
|
|
11824
|
+
var _Ka = _Ja, { inset, placement } = _Ka, restProps = __objRest(_Ka, ["inset", "placement"]);
|
|
11774
11825
|
const dataProperties = toDataProperties({ inset, placement });
|
|
11775
11826
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11776
11827
|
reactAriaComponents.Input,
|
|
@@ -11781,39 +11832,17 @@ const Input$1 = React.forwardRef(
|
|
|
11781
11832
|
);
|
|
11782
11833
|
}
|
|
11783
11834
|
);
|
|
11784
|
-
const DEFAULT_MAX_VALUE = effect.BigDecimal.fromBigInt(BigInt(1e7));
|
|
11785
|
-
const DEFAULT_MIN_DECIMAL_PLACES = 0;
|
|
11786
|
-
const DEFAULT_MAX_DECIMAL_PLACES = 3;
|
|
11787
11835
|
const DECORATOR_CHARS_REGEX = /[,%$]/g;
|
|
11788
|
-
|
|
11789
|
-
|
|
11790
|
-
|
|
11791
|
-
|
|
11792
|
-
|
|
11793
|
-
|
|
11794
|
-
|
|
11795
|
-
|
|
11796
|
-
|
|
11797
|
-
|
|
11798
|
-
mode = "decimal",
|
|
11799
|
-
allowNegative = false,
|
|
11800
|
-
maxValue = mode === "percent" ? BIG_DECIMAL_ONE : DEFAULT_MAX_VALUE,
|
|
11801
|
-
minDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MIN_DECIMAL_PLACES,
|
|
11802
|
-
maxDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MAX_DECIMAL_PLACES,
|
|
11803
|
-
slots,
|
|
11804
|
-
placeholder
|
|
11805
|
-
} = _Ka, restProps = __objRest(_Ka, [
|
|
11806
|
-
"mode",
|
|
11807
|
-
"allowNegative",
|
|
11808
|
-
"maxValue",
|
|
11809
|
-
"minDecimalPlaces",
|
|
11810
|
-
"maxDecimalPlaces",
|
|
11811
|
-
"slots",
|
|
11812
|
-
"placeholder"
|
|
11813
|
-
]);
|
|
11814
|
-
const field = useFieldContext();
|
|
11815
|
-
const { name, state, handleChange, handleBlur } = field;
|
|
11816
|
-
const { value } = state;
|
|
11836
|
+
function useBigDecimalInput({
|
|
11837
|
+
value,
|
|
11838
|
+
onChange,
|
|
11839
|
+
onBlur,
|
|
11840
|
+
mode,
|
|
11841
|
+
maxValue,
|
|
11842
|
+
maxDecimalPlaces,
|
|
11843
|
+
minDecimalPlaces,
|
|
11844
|
+
allowNegative
|
|
11845
|
+
}) {
|
|
11817
11846
|
const formattingProps = React.useMemo(() => ({
|
|
11818
11847
|
minDecimalPlaces,
|
|
11819
11848
|
maxDecimalPlaces,
|
|
@@ -11835,11 +11864,11 @@ function FormBigDecimalField(_Ja) {
|
|
|
11835
11864
|
const normalized = effect.BigDecimal.normalize(adjustedForPercent);
|
|
11836
11865
|
const clamped = effect.BigDecimal.min(normalized, maxValue);
|
|
11837
11866
|
if (!effect.BigDecimal.equals(clamped, value)) {
|
|
11838
|
-
|
|
11867
|
+
onChange(clamped);
|
|
11839
11868
|
}
|
|
11840
|
-
|
|
11869
|
+
onBlur();
|
|
11841
11870
|
setInputValue(formatBigDecimalToString(clamped, formattingProps));
|
|
11842
|
-
}, [inputValue, mode, maxValue,
|
|
11871
|
+
}, [inputValue, maxDecimalPlaces, mode, maxValue, value, onBlur, formattingProps, onChange]);
|
|
11843
11872
|
const allowedChars = React.useMemo(
|
|
11844
11873
|
() => buildDecimalCharRegex({ allowNegative, allowPercent: mode === "percent", allowDollar: mode === "currency" }),
|
|
11845
11874
|
[allowNegative, mode]
|
|
@@ -11858,6 +11887,48 @@ function FormBigDecimalField(_Ja) {
|
|
|
11858
11887
|
React.useEffect(() => {
|
|
11859
11888
|
setInputValue(formatBigDecimalToString(value, formattingProps));
|
|
11860
11889
|
}, [value, formattingProps]);
|
|
11890
|
+
return {
|
|
11891
|
+
inputValue,
|
|
11892
|
+
onInputChange,
|
|
11893
|
+
onInputBlur,
|
|
11894
|
+
onBeforeInput,
|
|
11895
|
+
onPaste
|
|
11896
|
+
};
|
|
11897
|
+
}
|
|
11898
|
+
const DEFAULT_MAX_VALUE$1 = effect.BigDecimal.fromBigInt(BigInt(1e7));
|
|
11899
|
+
const DEFAULT_MIN_DECIMAL_PLACES$1 = 0;
|
|
11900
|
+
const DEFAULT_MAX_DECIMAL_PLACES$1 = 3;
|
|
11901
|
+
function FormBigDecimalField(_La) {
|
|
11902
|
+
var _Ma = _La, {
|
|
11903
|
+
mode = "decimal",
|
|
11904
|
+
allowNegative = false,
|
|
11905
|
+
maxValue = mode === "percent" ? BIG_DECIMAL_ONE : DEFAULT_MAX_VALUE$1,
|
|
11906
|
+
minDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MIN_DECIMAL_PLACES$1,
|
|
11907
|
+
maxDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MAX_DECIMAL_PLACES$1,
|
|
11908
|
+
slots,
|
|
11909
|
+
placeholder
|
|
11910
|
+
} = _Ma, restProps = __objRest(_Ma, [
|
|
11911
|
+
"mode",
|
|
11912
|
+
"allowNegative",
|
|
11913
|
+
"maxValue",
|
|
11914
|
+
"minDecimalPlaces",
|
|
11915
|
+
"maxDecimalPlaces",
|
|
11916
|
+
"slots",
|
|
11917
|
+
"placeholder"
|
|
11918
|
+
]);
|
|
11919
|
+
const field = useFieldContext();
|
|
11920
|
+
const { name, state, handleChange, handleBlur } = field;
|
|
11921
|
+
const { value } = state;
|
|
11922
|
+
const { inputValue, onInputChange, onInputBlur, onBeforeInput, onPaste } = useBigDecimalInput({
|
|
11923
|
+
value,
|
|
11924
|
+
onChange: handleChange,
|
|
11925
|
+
onBlur: handleBlur,
|
|
11926
|
+
mode,
|
|
11927
|
+
maxValue,
|
|
11928
|
+
maxDecimalPlaces,
|
|
11929
|
+
minDecimalPlaces,
|
|
11930
|
+
allowNegative
|
|
11931
|
+
});
|
|
11861
11932
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseFormTextField, __spreadProps(__spreadValues({}, restProps), { inputMode: "decimal", children: /* @__PURE__ */ jsxRuntime.jsxs(InputGroup$1, { slot: "input", actionCount: slots ? 2 : void 0, children: [
|
|
11862
11933
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11863
11934
|
Input$1,
|
|
@@ -11882,8 +11953,8 @@ const CHECK_SIZE = {
|
|
|
11882
11953
|
md: 14,
|
|
11883
11954
|
lg: 16
|
|
11884
11955
|
};
|
|
11885
|
-
function Checkbox(
|
|
11886
|
-
var
|
|
11956
|
+
function Checkbox(_Na) {
|
|
11957
|
+
var _Oa = _Na, { children, className, variant = "default", size = "sm", isIndeterminate } = _Oa, props = __objRest(_Oa, ["children", "className", "variant", "size", "isIndeterminate"]);
|
|
11887
11958
|
const dataProperties = React.useMemo(() => toDataProperties({
|
|
11888
11959
|
size,
|
|
11889
11960
|
variant,
|
|
@@ -11901,8 +11972,8 @@ function Checkbox(_La) {
|
|
|
11901
11972
|
})
|
|
11902
11973
|
);
|
|
11903
11974
|
}
|
|
11904
|
-
function CheckboxWithTooltip(
|
|
11905
|
-
var
|
|
11975
|
+
function CheckboxWithTooltip(_Pa) {
|
|
11976
|
+
var _Qa = _Pa, { tooltip } = _Qa, props = __objRest(_Qa, ["tooltip"]);
|
|
11906
11977
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "Layer__checkbox-wrapper", children: /* @__PURE__ */ jsxRuntime.jsxs(DeprecatedTooltip, { disabled: !tooltip, children: [
|
|
11907
11978
|
/* @__PURE__ */ jsxRuntime.jsx(DeprecatedTooltipTrigger, { className: "Layer__input-tooltip", children: /* @__PURE__ */ jsxRuntime.jsx(Checkbox, __spreadValues({}, props)) }),
|
|
11908
11979
|
/* @__PURE__ */ jsxRuntime.jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", children: tooltip })
|
|
@@ -11946,10 +12017,11 @@ function FormCheckboxField({
|
|
|
11946
12017
|
})
|
|
11947
12018
|
);
|
|
11948
12019
|
}
|
|
12020
|
+
const DATE_PICKER_CLASS_NAME = "Layer__UI__DatePicker";
|
|
11949
12021
|
const DATE_FIELD_CLASS_NAME = "Layer__UI__DateField";
|
|
11950
12022
|
const DateField = React.forwardRef(
|
|
11951
|
-
function DateField2(
|
|
11952
|
-
var
|
|
12023
|
+
function DateField2(_Ra, ref) {
|
|
12024
|
+
var _Sa = _Ra, { inline, className, isReadOnly } = _Sa, restProps = __objRest(_Sa, ["inline", "className", "isReadOnly"]);
|
|
11953
12025
|
const dataProperties = toDataProperties({ inline, readonly: isReadOnly });
|
|
11954
12026
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11955
12027
|
reactAriaComponents.DateField,
|
|
@@ -11963,8 +12035,8 @@ const DateField = React.forwardRef(
|
|
|
11963
12035
|
);
|
|
11964
12036
|
const DATE_INPUT_CLASS_NAME = "Layer__UI__DateInput";
|
|
11965
12037
|
const DateInput = React.forwardRef(
|
|
11966
|
-
function DateInput2(
|
|
11967
|
-
var
|
|
12038
|
+
function DateInput2(_Ta, ref) {
|
|
12039
|
+
var _Ua = _Ta, { inset, pointerEvents } = _Ua, restProps = __objRest(_Ua, ["inset", "pointerEvents"]);
|
|
11968
12040
|
const dataProperties = toDataProperties({ inset, "pointer-events": pointerEvents });
|
|
11969
12041
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11970
12042
|
reactAriaComponents.DateInput,
|
|
@@ -11977,8 +12049,8 @@ const DateInput = React.forwardRef(
|
|
|
11977
12049
|
);
|
|
11978
12050
|
const DATE_SEGMENT_CLASS_NAME = "Layer__UI__DateSegment";
|
|
11979
12051
|
const DateSegment = React.forwardRef(
|
|
11980
|
-
function DateSegment2(
|
|
11981
|
-
var
|
|
12052
|
+
function DateSegment2(_Va, ref) {
|
|
12053
|
+
var _Wa = _Va, { isReadOnly } = _Wa, restProps = __objRest(_Wa, ["isReadOnly"]);
|
|
11982
12054
|
const dataProperties = toDataProperties({ interactive: !isReadOnly });
|
|
11983
12055
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11984
12056
|
reactAriaComponents.DateSegment,
|
|
@@ -11989,13 +12061,13 @@ const DateSegment = React.forwardRef(
|
|
|
11989
12061
|
);
|
|
11990
12062
|
}
|
|
11991
12063
|
);
|
|
11992
|
-
const DATE_PICKER_CLASS_NAME = "Layer__UI__DatePicker";
|
|
11993
12064
|
const DatePicker$1 = React.forwardRef(
|
|
11994
|
-
function DatePicker2(
|
|
12065
|
+
function DatePicker2(_Xa, ref) {
|
|
12066
|
+
var _Ya = _Xa, { className } = _Ya, restProps = __objRest(_Ya, ["className"]);
|
|
11995
12067
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11996
12068
|
reactAriaComponents.DatePicker,
|
|
11997
|
-
__spreadProps(__spreadValues({},
|
|
11998
|
-
className: DATE_PICKER_CLASS_NAME,
|
|
12069
|
+
__spreadProps(__spreadValues({}, restProps), {
|
|
12070
|
+
className: classNames(DATE_PICKER_CLASS_NAME, className),
|
|
11999
12071
|
ref
|
|
12000
12072
|
})
|
|
12001
12073
|
);
|
|
@@ -12057,10 +12129,349 @@ function FormDateField({
|
|
|
12057
12129
|
})
|
|
12058
12130
|
);
|
|
12059
12131
|
}
|
|
12132
|
+
const ChevronLeft = (_Za) => {
|
|
12133
|
+
var props = __objRest(_Za, []);
|
|
12134
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12135
|
+
"svg",
|
|
12136
|
+
__spreadProps(__spreadValues({
|
|
12137
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12138
|
+
width: "18",
|
|
12139
|
+
height: "18",
|
|
12140
|
+
viewBox: "0 0 18 18",
|
|
12141
|
+
fill: "none"
|
|
12142
|
+
}, props), {
|
|
12143
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12144
|
+
"path",
|
|
12145
|
+
{
|
|
12146
|
+
d: "M11.25 13.5L6.75 9L11.25 4.5",
|
|
12147
|
+
stroke: "currentColor",
|
|
12148
|
+
strokeLinecap: "round",
|
|
12149
|
+
strokeLinejoin: "round"
|
|
12150
|
+
}
|
|
12151
|
+
)
|
|
12152
|
+
})
|
|
12153
|
+
);
|
|
12154
|
+
};
|
|
12155
|
+
const CALENDAR_CLASS_NAME = "Layer__UI__Calendar";
|
|
12156
|
+
const Calendar = React.forwardRef(
|
|
12157
|
+
function Calendar2(__a, ref) {
|
|
12158
|
+
var _$a = __a, { className, isReadOnly } = _$a, restProps = __objRest(_$a, ["className", "isReadOnly"]);
|
|
12159
|
+
const dataProperties = toDataProperties({ readonly: isReadOnly });
|
|
12160
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12161
|
+
reactAriaComponents.Calendar,
|
|
12162
|
+
__spreadProps(__spreadValues(__spreadValues({}, dataProperties), restProps), {
|
|
12163
|
+
isReadOnly,
|
|
12164
|
+
className: classNames(CALENDAR_CLASS_NAME, className),
|
|
12165
|
+
ref
|
|
12166
|
+
})
|
|
12167
|
+
);
|
|
12168
|
+
}
|
|
12169
|
+
);
|
|
12170
|
+
const CALENDAR_GRID_CLASS_NAME = "Layer__UI__CalendarGrid";
|
|
12171
|
+
const CalendarGrid = React.forwardRef(
|
|
12172
|
+
function CalendarGrid2(_ab, ref) {
|
|
12173
|
+
var _bb = _ab, { className } = _bb, restProps = __objRest(_bb, ["className"]);
|
|
12174
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12175
|
+
reactAriaComponents.CalendarGrid,
|
|
12176
|
+
__spreadProps(__spreadValues({}, restProps), {
|
|
12177
|
+
className: classNames(CALENDAR_GRID_CLASS_NAME, className),
|
|
12178
|
+
ref
|
|
12179
|
+
})
|
|
12180
|
+
);
|
|
12181
|
+
}
|
|
12182
|
+
);
|
|
12183
|
+
const CALENDAR_GRID_BODY_CLASS_NAME = "Layer__UI__CalendarGridBody";
|
|
12184
|
+
const CalendarGridBody = React.forwardRef(
|
|
12185
|
+
function CalendarGridBody2(_cb, ref) {
|
|
12186
|
+
var _db = _cb, { className } = _db, restProps = __objRest(_db, ["className"]);
|
|
12187
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12188
|
+
reactAriaComponents.CalendarGridBody,
|
|
12189
|
+
__spreadProps(__spreadValues({}, restProps), {
|
|
12190
|
+
className: classNames(CALENDAR_GRID_BODY_CLASS_NAME, className),
|
|
12191
|
+
ref
|
|
12192
|
+
})
|
|
12193
|
+
);
|
|
12194
|
+
}
|
|
12195
|
+
);
|
|
12196
|
+
const CALENDAR_CELL_CLASS_NAME = "Layer__UI__CalendarCell";
|
|
12197
|
+
const CalendarCell = React.forwardRef(
|
|
12198
|
+
function CalendarCell2(_eb, ref) {
|
|
12199
|
+
var _fb = _eb, { className, size = "sm" } = _fb, restProps = __objRest(_fb, ["className", "size"]);
|
|
12200
|
+
const dataProperties = toDataProperties({ size });
|
|
12201
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12202
|
+
reactAriaComponents.CalendarCell,
|
|
12203
|
+
__spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
|
|
12204
|
+
className: classNames(CALENDAR_CELL_CLASS_NAME, className),
|
|
12205
|
+
ref
|
|
12206
|
+
})
|
|
12207
|
+
);
|
|
12208
|
+
}
|
|
12209
|
+
);
|
|
12210
|
+
const CALENDAR_GRID_HEADER_CLASS_NAME = "Layer__UI__CalendarGridHeader";
|
|
12211
|
+
const CalendarGridHeader = React.forwardRef(
|
|
12212
|
+
function CalendarGridHeader2(_gb, ref) {
|
|
12213
|
+
var _hb = _gb, { className } = _hb, restProps = __objRest(_hb, ["className"]);
|
|
12214
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12215
|
+
reactAriaComponents.CalendarGridHeader,
|
|
12216
|
+
__spreadProps(__spreadValues({}, restProps), {
|
|
12217
|
+
className: classNames(CALENDAR_GRID_HEADER_CLASS_NAME, className),
|
|
12218
|
+
ref
|
|
12219
|
+
})
|
|
12220
|
+
);
|
|
12221
|
+
}
|
|
12222
|
+
);
|
|
12223
|
+
const CALENDAR_HEADER_CELL_CLASS_NAME = "Layer__UI__CalendarHeaderCell";
|
|
12224
|
+
const CalendarHeaderCell = React.forwardRef(
|
|
12225
|
+
function CalendarHeaderCell2(_ib, ref) {
|
|
12226
|
+
var _jb = _ib, { className, size = "sm" } = _jb, restProps = __objRest(_jb, ["className", "size"]);
|
|
12227
|
+
const dataProperties = toDataProperties({ size });
|
|
12228
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12229
|
+
reactAriaComponents.CalendarHeaderCell,
|
|
12230
|
+
__spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
|
|
12231
|
+
className: classNames(CALENDAR_HEADER_CELL_CLASS_NAME, className),
|
|
12232
|
+
ref
|
|
12233
|
+
})
|
|
12234
|
+
);
|
|
12235
|
+
}
|
|
12236
|
+
);
|
|
12237
|
+
const DateCalendar = ({ minDate, maxDate, variant }) => {
|
|
12238
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Calendar, { minValue: minDate, maxValue: maxDate, children: [
|
|
12239
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { align: "center", justify: "space-between", pb: "xs", pi: "xs", className: "Layer__DateCalendar__Header", children: [
|
|
12240
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { icon: true, inset: true, variant: "ghost", slot: "previous", children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeft, { size: 20 }) }),
|
|
12241
|
+
/* @__PURE__ */ jsxRuntime.jsx(Heading$1, { weight: "normal", size: "sm" }),
|
|
12242
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { icon: true, inset: true, variant: "ghost", slot: "next", children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRight, { size: 20 }) })
|
|
12243
|
+
] }),
|
|
12244
|
+
/* @__PURE__ */ jsxRuntime.jsx(HStack, { pb: "xs", pi: "xs", children: /* @__PURE__ */ jsxRuntime.jsxs(CalendarGrid, { children: [
|
|
12245
|
+
/* @__PURE__ */ jsxRuntime.jsx(CalendarGridHeader, { children: (day) => /* @__PURE__ */ jsxRuntime.jsx(CalendarHeaderCell, { size: variant === "mobile" ? "md" : "sm", children: day }) }),
|
|
12246
|
+
/* @__PURE__ */ jsxRuntime.jsx(CalendarGridBody, { children: (date2) => /* @__PURE__ */ jsxRuntime.jsx(CalendarCell, { date: date2, size: variant === "mobile" ? "md" : "sm" }) })
|
|
12247
|
+
] }) })
|
|
12248
|
+
] });
|
|
12249
|
+
};
|
|
12250
|
+
const PickerDropdownIndicator = ({ onClick }) => /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.Button, { className: "Layer__PickerDropdownIndicator", onPress: onClick, children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDown, { size: 16 }) });
|
|
12251
|
+
const DatePickerInput = ({ errorText, variant, onClick, isReadOnly }) => {
|
|
12252
|
+
const errorTriangle = React.useMemo(() => {
|
|
12253
|
+
if (variant === "mobile" || !errorText) return null;
|
|
12254
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(DeprecatedTooltip, { offset: 12, children: [
|
|
12255
|
+
/* @__PURE__ */ jsxRuntime.jsx(DeprecatedTooltipTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(FieldError, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TriangleAlert, { size: 18 }) }) }),
|
|
12256
|
+
/* @__PURE__ */ jsxRuntime.jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", width: "md", children: errorText })
|
|
12257
|
+
] });
|
|
12258
|
+
}, [errorText, variant]);
|
|
12259
|
+
if (variant === "mobile") {
|
|
12260
|
+
return /* @__PURE__ */ jsxRuntime.jsx(InputGroup$1, { slot: "input", isInvalid: !!errorText, onClick: isReadOnly ? void 0 : onClick, children: /* @__PURE__ */ jsxRuntime.jsx(DateInput, { inset: true, pointerEvents: "none", children: (segment) => /* @__PURE__ */ jsxRuntime.jsx(DateSegment, { isReadOnly: true, segment }) }) });
|
|
12261
|
+
}
|
|
12262
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(InputGroup$1, { slot: "input", isInvalid: !!errorText, children: [
|
|
12263
|
+
/* @__PURE__ */ jsxRuntime.jsx(DateInput, { inset: true, children: (segment) => /* @__PURE__ */ jsxRuntime.jsx(DateSegment, { segment, isReadOnly }) }),
|
|
12264
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "3xs", align: "center", pie: "4xs", children: [
|
|
12265
|
+
errorTriangle,
|
|
12266
|
+
!isReadOnly && /* @__PURE__ */ jsxRuntime.jsx(PickerDropdownIndicator, { onClick })
|
|
12267
|
+
] })
|
|
12268
|
+
] });
|
|
12269
|
+
};
|
|
12270
|
+
const POPOVER_CLASS_NAME = "Layer__Popover";
|
|
12271
|
+
const POPOVER_CLASS_NAMES = `Layer__Portal ${POPOVER_CLASS_NAME}`;
|
|
12272
|
+
const Popover = React.forwardRef(
|
|
12273
|
+
function Popover2(_kb, ref) {
|
|
12274
|
+
var _lb = _kb, { flexInline = false } = _lb, restProps = __objRest(_lb, ["flexInline"]);
|
|
12275
|
+
const dataProperties = toDataProperties({ "flex-inline": flexInline });
|
|
12276
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12277
|
+
reactAriaComponents.Popover,
|
|
12278
|
+
__spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
|
|
12279
|
+
className: POPOVER_CLASS_NAMES,
|
|
12280
|
+
ref
|
|
12281
|
+
})
|
|
12282
|
+
);
|
|
12283
|
+
}
|
|
12284
|
+
);
|
|
12285
|
+
function ResponsivePopover({ children, triggerRef }) {
|
|
12286
|
+
const { isMobile } = useSizeClass();
|
|
12287
|
+
if (isMobile) {
|
|
12288
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12289
|
+
Modal,
|
|
12290
|
+
{
|
|
12291
|
+
flexBlock: true,
|
|
12292
|
+
flexInline: true,
|
|
12293
|
+
variant: "mobile-popover",
|
|
12294
|
+
isDismissable: true,
|
|
12295
|
+
children
|
|
12296
|
+
}
|
|
12297
|
+
);
|
|
12298
|
+
}
|
|
12299
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12300
|
+
Popover,
|
|
12301
|
+
{
|
|
12302
|
+
triggerRef,
|
|
12303
|
+
placement: "bottom left",
|
|
12304
|
+
flexInline: true,
|
|
12305
|
+
children
|
|
12306
|
+
}
|
|
12307
|
+
);
|
|
12308
|
+
}
|
|
12309
|
+
const DatePicker = ({
|
|
12310
|
+
label,
|
|
12311
|
+
showLabel = true,
|
|
12312
|
+
date: date2,
|
|
12313
|
+
minDate,
|
|
12314
|
+
maxDate,
|
|
12315
|
+
isInvalid,
|
|
12316
|
+
errorText,
|
|
12317
|
+
onBlur,
|
|
12318
|
+
onChange,
|
|
12319
|
+
isDisabled,
|
|
12320
|
+
isReadOnly,
|
|
12321
|
+
className,
|
|
12322
|
+
slotProps
|
|
12323
|
+
}) => {
|
|
12324
|
+
const additionalAriaProps = !showLabel && { "aria-label": label };
|
|
12325
|
+
const { value } = useSizeClass();
|
|
12326
|
+
const [isPopoverOpen, setPopoverOpen] = React.useState(false);
|
|
12327
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12328
|
+
DatePicker$1,
|
|
12329
|
+
__spreadProps(__spreadValues({
|
|
12330
|
+
granularity: "day",
|
|
12331
|
+
value: date2,
|
|
12332
|
+
onBlur,
|
|
12333
|
+
onChange,
|
|
12334
|
+
isInvalid
|
|
12335
|
+
}, additionalAriaProps), {
|
|
12336
|
+
isOpen: isPopoverOpen,
|
|
12337
|
+
onOpenChange: setPopoverOpen,
|
|
12338
|
+
isDisabled,
|
|
12339
|
+
isReadOnly,
|
|
12340
|
+
className: classNames(DATE_PICKER_CLASS_NAME, className),
|
|
12341
|
+
children: [
|
|
12342
|
+
showLabel && /* @__PURE__ */ jsxRuntime.jsx(Label, __spreadProps(__spreadValues({ slot: "label", size: "sm" }, slotProps == null ? void 0 : slotProps.Label), { children: label })),
|
|
12343
|
+
/* @__PURE__ */ jsxRuntime.jsx(DatePickerInput, { errorText, variant: value, onClick: () => setPopoverOpen(true), isReadOnly }),
|
|
12344
|
+
/* @__PURE__ */ jsxRuntime.jsx(ResponsivePopover, { children: /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.Dialog, { children: /* @__PURE__ */ jsxRuntime.jsx(DateCalendar, { minDate, maxDate, variant: value }) }) })
|
|
12345
|
+
]
|
|
12346
|
+
})
|
|
12347
|
+
);
|
|
12348
|
+
};
|
|
12349
|
+
const FORM_DATE_PICKER_FIELD_CLASSNAME = "Layer__FormDatePickerField";
|
|
12350
|
+
function FormDatePickerField({
|
|
12351
|
+
label,
|
|
12352
|
+
className,
|
|
12353
|
+
inline = false,
|
|
12354
|
+
showLabel = true,
|
|
12355
|
+
showFieldError = true,
|
|
12356
|
+
isReadOnly = false,
|
|
12357
|
+
minDate,
|
|
12358
|
+
maxDate
|
|
12359
|
+
}) {
|
|
12360
|
+
const field = useFieldContext();
|
|
12361
|
+
const { state, handleChange, handleBlur } = field;
|
|
12362
|
+
const { meta, value } = state;
|
|
12363
|
+
const { errors, isValid } = meta;
|
|
12364
|
+
const [localDate, setLocalDate] = React.useState(value);
|
|
12365
|
+
React.useEffect(() => {
|
|
12366
|
+
setLocalDate(value);
|
|
12367
|
+
}, [value]);
|
|
12368
|
+
const onChange = React.useCallback((newValue) => {
|
|
12369
|
+
setLocalDate(newValue);
|
|
12370
|
+
}, []);
|
|
12371
|
+
const onBlur = React.useCallback(() => {
|
|
12372
|
+
handleChange(localDate);
|
|
12373
|
+
handleBlur();
|
|
12374
|
+
}, [handleBlur, handleChange, localDate]);
|
|
12375
|
+
const errorMessage = errors.length !== 0 ? errors[0] : void 0;
|
|
12376
|
+
const shouldShowErrorMessage = showFieldError && errorMessage;
|
|
12377
|
+
const datePickerClassNames = classNames(
|
|
12378
|
+
FORM_DATE_PICKER_FIELD_CLASSNAME,
|
|
12379
|
+
inline && `${FORM_DATE_PICKER_FIELD_CLASSNAME}--inline`,
|
|
12380
|
+
className
|
|
12381
|
+
);
|
|
12382
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12383
|
+
DatePicker,
|
|
12384
|
+
{
|
|
12385
|
+
label,
|
|
12386
|
+
showLabel,
|
|
12387
|
+
date: localDate,
|
|
12388
|
+
onChange,
|
|
12389
|
+
onBlur,
|
|
12390
|
+
minDate,
|
|
12391
|
+
maxDate,
|
|
12392
|
+
isInvalid: !isValid,
|
|
12393
|
+
errorText: shouldShowErrorMessage ? errorMessage : null,
|
|
12394
|
+
isReadOnly,
|
|
12395
|
+
className: datePickerClassNames
|
|
12396
|
+
}
|
|
12397
|
+
);
|
|
12398
|
+
}
|
|
12399
|
+
const NonRecursiveBigDecimalSchema = effect.Schema.Struct({
|
|
12400
|
+
value: effect.Schema.BigIntFromSelf,
|
|
12401
|
+
scale: effect.Schema.Int
|
|
12402
|
+
});
|
|
12403
|
+
const NRBD_ZERO = { value: /* @__PURE__ */ BigInt("0"), scale: 0 };
|
|
12404
|
+
const NRBD_ONE = { value: /* @__PURE__ */ BigInt("1"), scale: 0 };
|
|
12405
|
+
const toNonRecursiveBigDecimal = (bd) => {
|
|
12406
|
+
const normalized = effect.BigDecimal.normalize(bd);
|
|
12407
|
+
return { value: normalized.value, scale: normalized.scale };
|
|
12408
|
+
};
|
|
12409
|
+
const fromNonRecursiveBigDecimal = (nrbd) => {
|
|
12410
|
+
return effect.BigDecimal.make(nrbd.value, nrbd.scale);
|
|
12411
|
+
};
|
|
12412
|
+
const nrbdEquals = (a, b) => {
|
|
12413
|
+
return effect.BigDecimal.equals(fromNonRecursiveBigDecimal(a), fromNonRecursiveBigDecimal(b));
|
|
12414
|
+
};
|
|
12415
|
+
const DEFAULT_MAX_VALUE = effect.BigDecimal.fromBigInt(BigInt(1e7));
|
|
12416
|
+
const DEFAULT_MIN_DECIMAL_PLACES = 0;
|
|
12417
|
+
const DEFAULT_MAX_DECIMAL_PLACES = 3;
|
|
12418
|
+
function FormNonRecursiveBigDecimalField(_mb) {
|
|
12419
|
+
var _nb = _mb, {
|
|
12420
|
+
mode = "decimal",
|
|
12421
|
+
allowNegative = false,
|
|
12422
|
+
maxValue = mode === "percent" ? BIG_DECIMAL_ONE : DEFAULT_MAX_VALUE,
|
|
12423
|
+
minDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MIN_DECIMAL_PLACES,
|
|
12424
|
+
maxDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MAX_DECIMAL_PLACES,
|
|
12425
|
+
slots,
|
|
12426
|
+
placeholder
|
|
12427
|
+
} = _nb, restProps = __objRest(_nb, [
|
|
12428
|
+
"mode",
|
|
12429
|
+
"allowNegative",
|
|
12430
|
+
"maxValue",
|
|
12431
|
+
"minDecimalPlaces",
|
|
12432
|
+
"maxDecimalPlaces",
|
|
12433
|
+
"slots",
|
|
12434
|
+
"placeholder"
|
|
12435
|
+
]);
|
|
12436
|
+
const field = useFieldContext();
|
|
12437
|
+
const { name, state, handleChange, handleBlur } = field;
|
|
12438
|
+
const { value: nrbdValue } = state;
|
|
12439
|
+
const value = React.useMemo(() => fromNonRecursiveBigDecimal(nrbdValue), [nrbdValue]);
|
|
12440
|
+
const onChange = React.useCallback((bd) => {
|
|
12441
|
+
handleChange(toNonRecursiveBigDecimal(bd));
|
|
12442
|
+
}, [handleChange]);
|
|
12443
|
+
const { inputValue, onInputChange, onInputBlur, onBeforeInput, onPaste } = useBigDecimalInput({
|
|
12444
|
+
value,
|
|
12445
|
+
onChange,
|
|
12446
|
+
onBlur: handleBlur,
|
|
12447
|
+
mode,
|
|
12448
|
+
maxValue,
|
|
12449
|
+
maxDecimalPlaces,
|
|
12450
|
+
minDecimalPlaces,
|
|
12451
|
+
allowNegative
|
|
12452
|
+
});
|
|
12453
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BaseFormTextField, __spreadProps(__spreadValues({}, restProps), { inputMode: "decimal", children: /* @__PURE__ */ jsxRuntime.jsxs(InputGroup$1, { slot: "input", actionCount: slots ? 2 : void 0, children: [
|
|
12454
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12455
|
+
Input$1,
|
|
12456
|
+
{
|
|
12457
|
+
inset: true,
|
|
12458
|
+
id: name,
|
|
12459
|
+
name,
|
|
12460
|
+
value: inputValue,
|
|
12461
|
+
onChange: onInputChange,
|
|
12462
|
+
onBlur: onInputBlur,
|
|
12463
|
+
onBeforeInput,
|
|
12464
|
+
onPaste,
|
|
12465
|
+
placeholder
|
|
12466
|
+
}
|
|
12467
|
+
),
|
|
12468
|
+
(slots == null ? void 0 : slots.badge) && /* @__PURE__ */ jsxRuntime.jsx(HStack, { children: slots.badge })
|
|
12469
|
+
] }) }));
|
|
12470
|
+
}
|
|
12060
12471
|
const NUMBER_FIELD_CLASS_NAME = "Layer__UI__NumberField";
|
|
12061
12472
|
const NumberField = React.forwardRef(
|
|
12062
|
-
function NumberField2(
|
|
12063
|
-
var
|
|
12473
|
+
function NumberField2(_ob, ref) {
|
|
12474
|
+
var _pb = _ob, { inline, className, isReadOnly } = _pb, restProps = __objRest(_pb, ["inline", "className", "isReadOnly"]);
|
|
12064
12475
|
const dataProperties = toDataProperties({ inline, readonly: isReadOnly });
|
|
12065
12476
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12066
12477
|
reactAriaComponents.NumberField,
|
|
@@ -12129,17 +12540,13 @@ function FormNumberField({
|
|
|
12129
12540
|
}
|
|
12130
12541
|
const RADIO_GROUP_CLASS_NAME = "Layer__RadioGroup";
|
|
12131
12542
|
const RADIO_CLASS_NAME = "Layer__Radio";
|
|
12132
|
-
const INDICATOR_SIZE =
|
|
12133
|
-
|
|
12134
|
-
|
|
12135
|
-
lg: 12
|
|
12136
|
-
};
|
|
12137
|
-
function RadioGroup(_Xa) {
|
|
12138
|
-
var _Ya = _Xa, {
|
|
12543
|
+
const INDICATOR_SIZE = 10;
|
|
12544
|
+
function RadioGroup(_qb) {
|
|
12545
|
+
var _rb = _qb, {
|
|
12139
12546
|
children,
|
|
12140
12547
|
className,
|
|
12141
12548
|
onChange
|
|
12142
|
-
} =
|
|
12549
|
+
} = _rb, restProps = __objRest(_rb, [
|
|
12143
12550
|
"children",
|
|
12144
12551
|
"className",
|
|
12145
12552
|
"onChange"
|
|
@@ -12153,26 +12560,20 @@ function RadioGroup(_Xa) {
|
|
|
12153
12560
|
})
|
|
12154
12561
|
);
|
|
12155
12562
|
}
|
|
12156
|
-
function Radio(
|
|
12157
|
-
var
|
|
12563
|
+
function Radio(_sb) {
|
|
12564
|
+
var _tb = _sb, {
|
|
12158
12565
|
children,
|
|
12159
|
-
className
|
|
12160
|
-
|
|
12161
|
-
} = __a, restProps = __objRest(__a, [
|
|
12566
|
+
className
|
|
12567
|
+
} = _tb, restProps = __objRest(_tb, [
|
|
12162
12568
|
"children",
|
|
12163
|
-
"className"
|
|
12164
|
-
"size"
|
|
12569
|
+
"className"
|
|
12165
12570
|
]);
|
|
12166
|
-
const dataProperties = React.useMemo(() => toDataProperties({
|
|
12167
|
-
size,
|
|
12168
|
-
labeled: typeof children === "string" && children.length > 0
|
|
12169
|
-
}), [children, size]);
|
|
12170
12571
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12171
12572
|
reactAriaComponents.Radio,
|
|
12172
|
-
__spreadProps(__spreadValues(
|
|
12573
|
+
__spreadProps(__spreadValues({}, restProps), {
|
|
12173
12574
|
className: classNames(RADIO_CLASS_NAME, className),
|
|
12174
12575
|
children: withRenderProp(children, (node) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12175
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { slot: "radio", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { size: INDICATOR_SIZE
|
|
12576
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { slot: "radio", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { size: INDICATOR_SIZE }) }),
|
|
12176
12577
|
node
|
|
12177
12578
|
] }))
|
|
12178
12579
|
})
|
|
@@ -12193,7 +12594,6 @@ function FormRadioGroupField({
|
|
|
12193
12594
|
const { name, state, handleChange, handleBlur } = field;
|
|
12194
12595
|
const { meta, value } = state;
|
|
12195
12596
|
const { errors, isValid } = meta;
|
|
12196
|
-
const errorMessage = errors.length !== 0 ? errors[0] : void 0;
|
|
12197
12597
|
const labelId = React.useId();
|
|
12198
12598
|
const additionalAriaProps = showLabel ? { "aria-labelledby": labelId } : { "aria-label": label };
|
|
12199
12599
|
const radioGroupClassNames = classNames(
|
|
@@ -12201,25 +12601,30 @@ function FormRadioGroupField({
|
|
|
12201
12601
|
inline && `${FORM_RADIO_GROUP_FIELD_CLASSNAME$1}--inline`,
|
|
12202
12602
|
className
|
|
12203
12603
|
);
|
|
12204
|
-
|
|
12205
|
-
|
|
12206
|
-
|
|
12207
|
-
|
|
12208
|
-
|
|
12209
|
-
|
|
12210
|
-
|
|
12211
|
-
|
|
12212
|
-
|
|
12213
|
-
|
|
12214
|
-
|
|
12215
|
-
|
|
12216
|
-
|
|
12217
|
-
|
|
12218
|
-
|
|
12219
|
-
|
|
12220
|
-
|
|
12221
|
-
|
|
12222
|
-
|
|
12604
|
+
const errorMessage = errors.length !== 0 ? errors[0] : void 0;
|
|
12605
|
+
const shouldShowErrorMessage = showFieldError && errorMessage;
|
|
12606
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12607
|
+
RadioGroup,
|
|
12608
|
+
__spreadProps(__spreadValues({
|
|
12609
|
+
slot: "radiogroup",
|
|
12610
|
+
value,
|
|
12611
|
+
onChange: handleChange,
|
|
12612
|
+
onBlur: handleBlur,
|
|
12613
|
+
name,
|
|
12614
|
+
orientation,
|
|
12615
|
+
isReadOnly,
|
|
12616
|
+
isInvalid: !isValid,
|
|
12617
|
+
className: radioGroupClassNames
|
|
12618
|
+
}, additionalAriaProps), {
|
|
12619
|
+
children: [
|
|
12620
|
+
showLabel && /* @__PURE__ */ jsxRuntime.jsx(Label, { slot: "label", size: "sm", id: labelId, children: label }),
|
|
12621
|
+
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { slot: "options", gap: "3xs", children: [
|
|
12622
|
+
/* @__PURE__ */ jsxRuntime.jsx(Stack, { direction: orientation === "horizontal" ? "row" : "column", gap: orientation === "horizontal" ? "sm" : "xs", children: options2.map((option) => /* @__PURE__ */ jsxRuntime.jsx(Radio, { value: option.value, children: /* @__PURE__ */ jsxRuntime.jsx(Span, { slot: "description", children: option.label }) }, option.value)) }),
|
|
12623
|
+
shouldShowErrorMessage && /* @__PURE__ */ jsxRuntime.jsx(FieldError, { children: errorMessage })
|
|
12624
|
+
] })
|
|
12625
|
+
]
|
|
12626
|
+
})
|
|
12627
|
+
);
|
|
12223
12628
|
}
|
|
12224
12629
|
const FORM_RADIO_GROUP_FIELD_CLASSNAME = "Layer__FormRadioGroupField";
|
|
12225
12630
|
function FormRadioGroupYesNoField({
|
|
@@ -12236,6 +12641,7 @@ function FormRadioGroupYesNoField({
|
|
|
12236
12641
|
const { meta, value } = state;
|
|
12237
12642
|
const { errors, isValid } = meta;
|
|
12238
12643
|
const errorMessage = errors.length !== 0 ? errors[0] : void 0;
|
|
12644
|
+
const shouldShowErrorMessage = showFieldError && errorMessage;
|
|
12239
12645
|
const labelId = React.useId();
|
|
12240
12646
|
const additionalAriaProps = showLabel ? { "aria-labelledby": labelId } : { "aria-label": label };
|
|
12241
12647
|
const radioGroupClassNames = classNames(
|
|
@@ -12247,35 +12653,38 @@ function FormRadioGroupYesNoField({
|
|
|
12247
12653
|
const handleRadioChange = (newValue) => {
|
|
12248
12654
|
handleChange(newValue === "yes");
|
|
12249
12655
|
};
|
|
12250
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12251
|
-
|
|
12252
|
-
|
|
12253
|
-
|
|
12254
|
-
|
|
12255
|
-
|
|
12256
|
-
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
|
|
12260
|
-
|
|
12261
|
-
|
|
12262
|
-
|
|
12263
|
-
|
|
12264
|
-
children:
|
|
12265
|
-
|
|
12266
|
-
/* @__PURE__ */ jsxRuntime.
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
|
|
12271
|
-
|
|
12656
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12657
|
+
RadioGroup,
|
|
12658
|
+
__spreadProps(__spreadValues({
|
|
12659
|
+
slot: "radiogroup",
|
|
12660
|
+
value: radioValue,
|
|
12661
|
+
onChange: handleRadioChange,
|
|
12662
|
+
onBlur: handleBlur,
|
|
12663
|
+
name,
|
|
12664
|
+
orientation,
|
|
12665
|
+
isReadOnly,
|
|
12666
|
+
isInvalid: !isValid,
|
|
12667
|
+
className: radioGroupClassNames
|
|
12668
|
+
}, additionalAriaProps), {
|
|
12669
|
+
children: [
|
|
12670
|
+
showLabel && /* @__PURE__ */ jsxRuntime.jsx(Label, { slot: "label", size: "sm", id: labelId, children: label }),
|
|
12671
|
+
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { slot: "options", gap: "3xs", children: [
|
|
12672
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Stack, { direction: orientation === "horizontal" ? "row" : "column", gap: orientation === "horizontal" ? "sm" : "xs", children: [
|
|
12673
|
+
/* @__PURE__ */ jsxRuntime.jsx(Radio, { value: "no", children: /* @__PURE__ */ jsxRuntime.jsx(Span, { slot: "description", children: "No" }) }),
|
|
12674
|
+
/* @__PURE__ */ jsxRuntime.jsx(Radio, { value: "yes", children: /* @__PURE__ */ jsxRuntime.jsx(Span, { slot: "description", children: "Yes" }) })
|
|
12675
|
+
] }),
|
|
12676
|
+
shouldShowErrorMessage && /* @__PURE__ */ jsxRuntime.jsx(FieldError, { children: errorMessage })
|
|
12677
|
+
] })
|
|
12678
|
+
]
|
|
12679
|
+
})
|
|
12680
|
+
);
|
|
12272
12681
|
}
|
|
12273
12682
|
const SWITCH_CLASS_NAME = "Layer__UI__Switch";
|
|
12274
|
-
const Switch = React.forwardRef((
|
|
12275
|
-
var
|
|
12683
|
+
const Switch = React.forwardRef((_ub, ref) => {
|
|
12684
|
+
var _vb = _ub, {
|
|
12276
12685
|
children,
|
|
12277
12686
|
className
|
|
12278
|
-
} =
|
|
12687
|
+
} = _vb, props = __objRest(_vb, [
|
|
12279
12688
|
"children",
|
|
12280
12689
|
"className"
|
|
12281
12690
|
]);
|
|
@@ -12325,8 +12734,8 @@ function FormSwitchField({
|
|
|
12325
12734
|
}
|
|
12326
12735
|
const TEXTAREA_CLASS_NAME = "Layer__UI__TextArea";
|
|
12327
12736
|
const TextArea = React.forwardRef(
|
|
12328
|
-
function TextArea2(
|
|
12329
|
-
var
|
|
12737
|
+
function TextArea2(_wb, ref) {
|
|
12738
|
+
var _xb = _wb, { resize = "none" } = _xb, restProps = __objRest(_xb, ["resize"]);
|
|
12330
12739
|
const dataProperties = toDataProperties({ resize });
|
|
12331
12740
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12332
12741
|
reactAriaComponents.TextArea,
|
|
@@ -12337,8 +12746,8 @@ const TextArea = React.forwardRef(
|
|
|
12337
12746
|
);
|
|
12338
12747
|
}
|
|
12339
12748
|
);
|
|
12340
|
-
function FormTextAreaField(
|
|
12341
|
-
var
|
|
12749
|
+
function FormTextAreaField(_yb) {
|
|
12750
|
+
var _zb = _yb, { placeholder } = _zb, props = __objRest(_zb, ["placeholder"]);
|
|
12342
12751
|
const field = useFieldContext();
|
|
12343
12752
|
const { name, state, handleChange, handleBlur } = field;
|
|
12344
12753
|
const { value } = state;
|
|
@@ -12358,8 +12767,8 @@ function FormTextAreaField(_db) {
|
|
|
12358
12767
|
}
|
|
12359
12768
|
) }));
|
|
12360
12769
|
}
|
|
12361
|
-
function FormTextField(
|
|
12362
|
-
var
|
|
12770
|
+
function FormTextField(_Ab) {
|
|
12771
|
+
var _Bb = _Ab, { placeholder } = _Bb, props = __objRest(_Bb, ["placeholder"]);
|
|
12363
12772
|
const field = useFieldContext();
|
|
12364
12773
|
const { name, state, handleChange, handleBlur } = field;
|
|
12365
12774
|
const { value } = state;
|
|
@@ -12386,6 +12795,8 @@ const { useAppForm: useRawAppForm } = reactForm.createFormHook({
|
|
|
12386
12795
|
FormBigDecimalField,
|
|
12387
12796
|
FormCheckboxField,
|
|
12388
12797
|
FormDateField,
|
|
12798
|
+
FormDatePickerField,
|
|
12799
|
+
FormNonRecursiveBigDecimalField,
|
|
12389
12800
|
FormNumberField,
|
|
12390
12801
|
FormRadioGroupField,
|
|
12391
12802
|
FormRadioGroupYesNoField,
|
|
@@ -12450,13 +12861,13 @@ const useCustomAccountForm = ({ onSuccess }) => {
|
|
|
12450
12861
|
const isFormValid = reactForm.useStore(form.store, (state) => state.isValid);
|
|
12451
12862
|
return { form, submitError, isFormValid };
|
|
12452
12863
|
};
|
|
12453
|
-
const Input = (
|
|
12454
|
-
var
|
|
12864
|
+
const Input = (_Cb) => {
|
|
12865
|
+
var _Db = _Cb, {
|
|
12455
12866
|
className,
|
|
12456
12867
|
isInvalid,
|
|
12457
12868
|
errorMessage,
|
|
12458
12869
|
leftText
|
|
12459
|
-
} =
|
|
12870
|
+
} = _Db, props = __objRest(_Db, [
|
|
12460
12871
|
"className",
|
|
12461
12872
|
"isInvalid",
|
|
12462
12873
|
"errorMessage",
|
|
@@ -12502,8 +12913,8 @@ const InputGroup = ({
|
|
|
12502
12913
|
children
|
|
12503
12914
|
] });
|
|
12504
12915
|
};
|
|
12505
|
-
const ChevronDownFill = (
|
|
12506
|
-
var
|
|
12916
|
+
const ChevronDownFill = (_Eb) => {
|
|
12917
|
+
var _Fb = _Eb, { size = 18 } = _Fb, props = __objRest(_Fb, ["size"]);
|
|
12507
12918
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12508
12919
|
"svg",
|
|
12509
12920
|
__spreadProps(__spreadValues({
|
|
@@ -12528,10 +12939,10 @@ const ChevronDownFill = (_jb) => {
|
|
|
12528
12939
|
})
|
|
12529
12940
|
);
|
|
12530
12941
|
};
|
|
12531
|
-
const SelectMenuPortal = (
|
|
12532
|
-
var
|
|
12942
|
+
const SelectMenuPortal = (_Gb) => {
|
|
12943
|
+
var _Hb = _Gb, {
|
|
12533
12944
|
children
|
|
12534
|
-
} =
|
|
12945
|
+
} = _Hb, restProps = __objRest(_Hb, [
|
|
12535
12946
|
"children"
|
|
12536
12947
|
]);
|
|
12537
12948
|
const dataProperties = toDataProperties({ "react-aria-top-layer": true });
|
|
@@ -12556,7 +12967,7 @@ const Select = ({
|
|
|
12556
12967
|
errorMessage,
|
|
12557
12968
|
inputId,
|
|
12558
12969
|
isLoading,
|
|
12559
|
-
formatOptionLabel
|
|
12970
|
+
formatOptionLabel
|
|
12560
12971
|
}) => {
|
|
12561
12972
|
const baseClassName2 = classNames(
|
|
12562
12973
|
"Layer__select",
|
|
@@ -12574,7 +12985,7 @@ const Select = ({
|
|
|
12574
12985
|
classNamePrefix,
|
|
12575
12986
|
placeholder: placeholder != null ? placeholder : "Select...",
|
|
12576
12987
|
options: options2,
|
|
12577
|
-
formatOptionLabel
|
|
12988
|
+
formatOptionLabel,
|
|
12578
12989
|
value,
|
|
12579
12990
|
onChange: (newValue) => newValue && onChange(newValue),
|
|
12580
12991
|
menuPortalTarget: document.body,
|
|
@@ -12587,8 +12998,8 @@ const Select = ({
|
|
|
12587
12998
|
/* @__PURE__ */ jsxRuntime.jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", children: errorMessage })
|
|
12588
12999
|
] });
|
|
12589
13000
|
};
|
|
12590
|
-
const ErrorText = (
|
|
12591
|
-
var
|
|
13001
|
+
const ErrorText = (_Ib) => {
|
|
13002
|
+
var _Jb = _Ib, { className } = _Jb, props = __objRest(_Jb, ["className"]);
|
|
12592
13003
|
return /* @__PURE__ */ jsxRuntime.jsx(Text, __spreadProps(__spreadValues({}, props), { status: "error", className }));
|
|
12593
13004
|
};
|
|
12594
13005
|
const accountTypeOptions = [
|
|
@@ -12698,61 +13109,6 @@ const CustomAccountForm = ({ initialAccountName, onCancel, onSuccess }) => {
|
|
|
12698
13109
|
}
|
|
12699
13110
|
);
|
|
12700
13111
|
};
|
|
12701
|
-
const CreatableSelect = ({
|
|
12702
|
-
name,
|
|
12703
|
-
options: options2,
|
|
12704
|
-
className,
|
|
12705
|
-
classNamePrefix = "Layer__select",
|
|
12706
|
-
value,
|
|
12707
|
-
onChange,
|
|
12708
|
-
disabled,
|
|
12709
|
-
placeholder,
|
|
12710
|
-
isInvalid,
|
|
12711
|
-
errorMessage,
|
|
12712
|
-
formatOptionLabel: formatOptionLabel2,
|
|
12713
|
-
onCreateOption,
|
|
12714
|
-
isValidNewOption,
|
|
12715
|
-
formatCreateLabel: formatCreateLabel2,
|
|
12716
|
-
inputId,
|
|
12717
|
-
isLoading,
|
|
12718
|
-
isClearable,
|
|
12719
|
-
createOptionPosition = "first"
|
|
12720
|
-
}) => {
|
|
12721
|
-
const baseClassName2 = classNames(
|
|
12722
|
-
"Layer__select",
|
|
12723
|
-
isInvalid ? "Layer__select--error" : "",
|
|
12724
|
-
className
|
|
12725
|
-
);
|
|
12726
|
-
const DropdownIndicator = React.useCallback((props) => /* @__PURE__ */ jsxRuntime.jsx(ReactSelect.components.DropdownIndicator, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDownFill, {}) })), []);
|
|
12727
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(DeprecatedTooltip, { disabled: !isInvalid || !errorMessage, children: [
|
|
12728
|
-
/* @__PURE__ */ jsxRuntime.jsx(DeprecatedTooltipTrigger, { className: "Layer__input-tooltip", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12729
|
-
BaseCreatableSelect,
|
|
12730
|
-
{
|
|
12731
|
-
inputId,
|
|
12732
|
-
name,
|
|
12733
|
-
className: baseClassName2,
|
|
12734
|
-
classNamePrefix,
|
|
12735
|
-
placeholder: placeholder != null ? placeholder : "Select...",
|
|
12736
|
-
options: options2,
|
|
12737
|
-
formatOptionLabel: formatOptionLabel2,
|
|
12738
|
-
value,
|
|
12739
|
-
onChange: (newValue) => onChange(newValue),
|
|
12740
|
-
onCreateOption,
|
|
12741
|
-
isValidNewOption,
|
|
12742
|
-
formatCreateLabel: formatCreateLabel2,
|
|
12743
|
-
menuPortalTarget: document.body,
|
|
12744
|
-
styles: { menuPortal: (base) => __spreadProps(__spreadValues({}, base), { zIndex: 9999 }) },
|
|
12745
|
-
components: { DropdownIndicator, MenuPortal: SelectMenuPortal },
|
|
12746
|
-
isLoading,
|
|
12747
|
-
isDisabled: disabled,
|
|
12748
|
-
isClearable,
|
|
12749
|
-
escapeClearsValue: isClearable,
|
|
12750
|
-
createOptionPosition
|
|
12751
|
-
}
|
|
12752
|
-
) }),
|
|
12753
|
-
/* @__PURE__ */ jsxRuntime.jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", children: errorMessage })
|
|
12754
|
-
] });
|
|
12755
|
-
};
|
|
12756
13112
|
const templateHeaders = {
|
|
12757
13113
|
date: "Date",
|
|
12758
13114
|
description: "Description",
|
|
@@ -12780,18 +13136,27 @@ const templateExampleTransactions = [
|
|
|
12780
13136
|
const formatCreateLabel$1 = (inputValue) => {
|
|
12781
13137
|
return inputValue ? `Create "${inputValue}"` : "Create account";
|
|
12782
13138
|
};
|
|
12783
|
-
const
|
|
13139
|
+
const AccountOption = ({ option, fallback }) => {
|
|
12784
13140
|
if (option.account && !option.__isNew__) {
|
|
12785
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12786
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12787
|
-
|
|
12788
|
-
option.account.
|
|
12789
|
-
"
|
|
12790
|
-
|
|
13141
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
13142
|
+
/* @__PURE__ */ jsxRuntime.jsx(Check, { size: 16, className: COMBO_BOX_CLASS_NAMES.OPTION_CHECK_ICON }),
|
|
13143
|
+
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { children: [
|
|
13144
|
+
/* @__PURE__ */ jsxRuntime.jsx(Span, { ellipsis: true, children: option.account.accountName }),
|
|
13145
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Span, { size: "sm", variant: "subtle", noWrap: true, children: [
|
|
13146
|
+
option.account.institutionName,
|
|
13147
|
+
" · ",
|
|
13148
|
+
humanizeEnum(option.account.accountSubtype)
|
|
13149
|
+
] })
|
|
12791
13150
|
] })
|
|
12792
13151
|
] });
|
|
12793
13152
|
}
|
|
12794
|
-
return
|
|
13153
|
+
return fallback;
|
|
13154
|
+
};
|
|
13155
|
+
const AccountSingleValue = ({ option, fallback }) => {
|
|
13156
|
+
if (option.account && !option.__isNew__) {
|
|
13157
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Span, { ellipsis: true, children: option.account.accountName });
|
|
13158
|
+
}
|
|
13159
|
+
return fallback;
|
|
12795
13160
|
};
|
|
12796
13161
|
function UploadTransactionsUploadCsvStep({ selectedAccount, onSelectAccount, selectedFile, onSelectFile, onParseCsv }) {
|
|
12797
13162
|
var _a;
|
|
@@ -12846,30 +13211,27 @@ function UploadTransactionsUploadCsvStep({ selectedAccount, onSelectAccount, sel
|
|
|
12846
13211
|
setHasParseCsvError(true);
|
|
12847
13212
|
});
|
|
12848
13213
|
}, [selectedAccount, isCreatingNewAccount, selectedFile, parseCsv2, onParseCsv, next]);
|
|
12849
|
-
const inputClassName = classNames(
|
|
12850
|
-
"Layer__upload-transactions__select-account-name-input",
|
|
12851
|
-
!!customAccountsError && "Layer__upload-transactions__select-account-name-input--error"
|
|
12852
|
-
);
|
|
12853
13214
|
const hasSelectedAccount = selectedAccount && !isCreatingNewAccount;
|
|
12854
13215
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "lg", children: [
|
|
12855
|
-
/* @__PURE__ */ jsxRuntime.jsxs(VStack, {
|
|
13216
|
+
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { pis: "3xs", gap: "xs", children: [
|
|
12856
13217
|
/* @__PURE__ */ jsxRuntime.jsx(Label, { size: "md", htmlFor: "account_name", children: "Which account are these transactions from?" }),
|
|
12857
13218
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12858
|
-
|
|
13219
|
+
CreatableComboBox,
|
|
12859
13220
|
{
|
|
12860
13221
|
inputId: "account_name",
|
|
12861
13222
|
placeholder: customAccountsError ? "Failed to load options" : "Select account...",
|
|
12862
13223
|
options: accountOptions,
|
|
12863
|
-
|
|
12864
|
-
onChange: onSelectAccount,
|
|
13224
|
+
onSelectedValueChange: onSelectAccount,
|
|
12865
13225
|
onCreateOption,
|
|
12866
13226
|
formatCreateLabel: formatCreateLabel$1,
|
|
12867
13227
|
isValidNewOption: () => true,
|
|
12868
|
-
|
|
13228
|
+
selectedValue: selectedAccount,
|
|
12869
13229
|
isClearable: true,
|
|
12870
13230
|
isLoading: isLoadingCustomAccounts,
|
|
12871
|
-
|
|
12872
|
-
|
|
13231
|
+
isDisabled: !!customAccountsError,
|
|
13232
|
+
isError: !!customAccountsError,
|
|
13233
|
+
className: "Layer__upload-transactions__select-account-name-input",
|
|
13234
|
+
slots: { Option: AccountOption, SingleValue: AccountSingleValue }
|
|
12873
13235
|
}
|
|
12874
13236
|
)
|
|
12875
13237
|
] }),
|
|
@@ -13236,7 +13598,8 @@ function UploadTransactionsHeader({ currentStep, isValid, onClose }) {
|
|
|
13236
13598
|
{
|
|
13237
13599
|
heading: /* @__PURE__ */ jsxRuntime.jsx(Heading$1, { level: 1, size: "sm", children: title }),
|
|
13238
13600
|
description: /* @__PURE__ */ jsxRuntime.jsx(Heading$1, { level: 2, size: "xs", variant: "subtle", weight: "normal", children: description }),
|
|
13239
|
-
onClose
|
|
13601
|
+
onClose,
|
|
13602
|
+
hideBottomPadding: true
|
|
13240
13603
|
}
|
|
13241
13604
|
);
|
|
13242
13605
|
}
|
|
@@ -13446,8 +13809,8 @@ const BulkActionsModule = ({ showSelectedLabel = true, fullWidth = false, slots
|
|
|
13446
13809
|
/* @__PURE__ */ jsxRuntime.jsx(slots.BulkActions, {})
|
|
13447
13810
|
] });
|
|
13448
13811
|
};
|
|
13449
|
-
const DownloadCloud = (
|
|
13450
|
-
var
|
|
13812
|
+
const DownloadCloud = (_Kb) => {
|
|
13813
|
+
var _Lb = _Kb, { size = 18 } = _Lb, props = __objRest(_Lb, ["size"]);
|
|
13451
13814
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13452
13815
|
"svg",
|
|
13453
13816
|
__spreadProps(__spreadValues({
|
|
@@ -13498,7 +13861,7 @@ const DownloadButton$1 = ({
|
|
|
13498
13861
|
text = "Download",
|
|
13499
13862
|
retryText = "Retry",
|
|
13500
13863
|
errorText = "Download failed. Check connection and retry in few seconds.",
|
|
13501
|
-
variant =
|
|
13864
|
+
variant = ButtonVariant.secondary,
|
|
13502
13865
|
disabled = false
|
|
13503
13866
|
}) => {
|
|
13504
13867
|
if (requestFailed) {
|
|
@@ -13665,45 +14028,6 @@ function MonthCalendar({
|
|
|
13665
14028
|
)
|
|
13666
14029
|
] });
|
|
13667
14030
|
}
|
|
13668
|
-
const POPOVER_CLASS_NAME = "Layer__Popover";
|
|
13669
|
-
const POPOVER_CLASS_NAMES = `Layer__Portal ${POPOVER_CLASS_NAME}`;
|
|
13670
|
-
const Popover = React.forwardRef(
|
|
13671
|
-
function Popover2(_rb, ref) {
|
|
13672
|
-
var _sb = _rb, { flexInline = false } = _sb, restProps = __objRest(_sb, ["flexInline"]);
|
|
13673
|
-
const dataProperties = toDataProperties({ "flex-inline": flexInline });
|
|
13674
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13675
|
-
reactAriaComponents.Popover,
|
|
13676
|
-
__spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
|
|
13677
|
-
className: POPOVER_CLASS_NAMES,
|
|
13678
|
-
ref
|
|
13679
|
-
})
|
|
13680
|
-
);
|
|
13681
|
-
}
|
|
13682
|
-
);
|
|
13683
|
-
function ResponsivePopover({ children, triggerRef }) {
|
|
13684
|
-
const { isMobile } = useSizeClass();
|
|
13685
|
-
if (isMobile) {
|
|
13686
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13687
|
-
Modal,
|
|
13688
|
-
{
|
|
13689
|
-
flexBlock: true,
|
|
13690
|
-
flexInline: true,
|
|
13691
|
-
variant: "mobile-popover",
|
|
13692
|
-
isDismissable: true,
|
|
13693
|
-
children
|
|
13694
|
-
}
|
|
13695
|
-
);
|
|
13696
|
-
}
|
|
13697
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13698
|
-
Popover,
|
|
13699
|
-
{
|
|
13700
|
-
triggerRef,
|
|
13701
|
-
placement: "bottom left",
|
|
13702
|
-
flexInline: true,
|
|
13703
|
-
children
|
|
13704
|
-
}
|
|
13705
|
-
);
|
|
13706
|
-
}
|
|
13707
14031
|
const MonthPicker = ({
|
|
13708
14032
|
label,
|
|
13709
14033
|
showLabel = true,
|
|
@@ -13722,31 +14046,34 @@ const MonthPicker = ({
|
|
|
13722
14046
|
}, [onChange]);
|
|
13723
14047
|
const inputValue = dateFns.format(date2.toDate(), truncateMonth ? MONTH_YEAR_FORMAT_SHORT : MONTH_YEAR_FORMAT);
|
|
13724
14048
|
const additionalAriaProps = !showLabel && { "aria-label": label };
|
|
13725
|
-
|
|
13726
|
-
|
|
13727
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13728
|
-
|
|
13729
|
-
|
|
13730
|
-
|
|
13731
|
-
|
|
13732
|
-
|
|
13733
|
-
|
|
13734
|
-
|
|
13735
|
-
|
|
13736
|
-
|
|
13737
|
-
|
|
13738
|
-
|
|
13739
|
-
|
|
13740
|
-
|
|
13741
|
-
|
|
13742
|
-
{
|
|
13743
|
-
|
|
13744
|
-
|
|
13745
|
-
|
|
13746
|
-
|
|
13747
|
-
|
|
13748
|
-
|
|
13749
|
-
|
|
14049
|
+
const inputId = React.useId();
|
|
14050
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { children: [
|
|
14051
|
+
showLabel && /* @__PURE__ */ jsxRuntime.jsx(Label, { pbe: "3xs", size: "sm", htmlFor: inputId, children: label }),
|
|
14052
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactAriaComponents.DialogTrigger, { isOpen: isPopoverOpen, onOpenChange: setPopoverOpen, children: [
|
|
14053
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
14054
|
+
InputGroup$1,
|
|
14055
|
+
{
|
|
14056
|
+
ref: triggerRef,
|
|
14057
|
+
slot: "input",
|
|
14058
|
+
className: classNames("Layer__MonthPicker__InputGroup", { "Layer__MonthPicker__InputGroup--truncated": truncateMonth }),
|
|
14059
|
+
onClick: () => setPopoverOpen(true),
|
|
14060
|
+
children: [
|
|
14061
|
+
/* @__PURE__ */ jsxRuntime.jsx(Input$1, __spreadProps(__spreadValues({ inset: true }, additionalAriaProps), { value: inputValue, readOnly: true, id: inputId })),
|
|
14062
|
+
/* @__PURE__ */ jsxRuntime.jsx(PickerDropdownIndicator, { onClick: () => setPopoverOpen(true) })
|
|
14063
|
+
]
|
|
14064
|
+
}
|
|
14065
|
+
),
|
|
14066
|
+
/* @__PURE__ */ jsxRuntime.jsx(ResponsivePopover, { triggerRef, children: /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.Dialog, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14067
|
+
MonthCalendar,
|
|
14068
|
+
{
|
|
14069
|
+
date: date2,
|
|
14070
|
+
onChange: onChangeMonth,
|
|
14071
|
+
minDate,
|
|
14072
|
+
maxDate,
|
|
14073
|
+
variant: value
|
|
14074
|
+
}
|
|
14075
|
+
) }) })
|
|
14076
|
+
] })
|
|
13750
14077
|
] });
|
|
13751
14078
|
};
|
|
13752
14079
|
const SmallLoader = ({ size = 28 }) => {
|
|
@@ -13908,8 +14235,7 @@ const DownloadButton = ({
|
|
|
13908
14235
|
const BankTransactionsHeader = ({
|
|
13909
14236
|
shiftStickyHeader,
|
|
13910
14237
|
asWidget,
|
|
13911
|
-
|
|
13912
|
-
listView,
|
|
14238
|
+
tableContentMode,
|
|
13913
14239
|
stringOverrides,
|
|
13914
14240
|
isSyncing,
|
|
13915
14241
|
withUploadMenu,
|
|
@@ -13939,7 +14265,8 @@ const BankTransactionsHeader = ({
|
|
|
13939
14265
|
}, [setFilters]);
|
|
13940
14266
|
const { count } = useCountSelectedIds();
|
|
13941
14267
|
const showBulkActions = count > 0;
|
|
13942
|
-
const isMobileList =
|
|
14268
|
+
const isMobileList = tableContentMode === BankTransactionsTableContent.MobileList;
|
|
14269
|
+
const isListView = isMobileList || tableContentMode === BankTransactionsTableContent.List;
|
|
13943
14270
|
const headerTopRow = React.useMemo(() => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "Layer__bank-transactions__header__content", children: [
|
|
13944
14271
|
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { align: "center", children: [
|
|
13945
14272
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13955,7 +14282,7 @@ const BankTransactionsHeader = ({
|
|
|
13955
14282
|
{
|
|
13956
14283
|
timeSync: 5,
|
|
13957
14284
|
inProgress: true,
|
|
13958
|
-
hideContent:
|
|
14285
|
+
hideContent: isListView
|
|
13959
14286
|
}
|
|
13960
14287
|
)
|
|
13961
14288
|
] }),
|
|
@@ -13975,7 +14302,7 @@ const BankTransactionsHeader = ({
|
|
|
13975
14302
|
activationDate,
|
|
13976
14303
|
asWidget,
|
|
13977
14304
|
isSyncing,
|
|
13978
|
-
|
|
14305
|
+
isListView,
|
|
13979
14306
|
monthPickerDate,
|
|
13980
14307
|
setDateRange,
|
|
13981
14308
|
stringOverrides == null ? void 0 : stringOverrides.header,
|
|
@@ -14010,7 +14337,8 @@ const BankTransactionsHeader = ({
|
|
|
14010
14337
|
}
|
|
14011
14338
|
);
|
|
14012
14339
|
}, [isMobileList]);
|
|
14013
|
-
const
|
|
14340
|
+
const isStatusToggleVisible = isCategorizationEnabled && showStatusToggle;
|
|
14341
|
+
const statusToggle = isStatusToggleVisible ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
14014
14342
|
Toggle,
|
|
14015
14343
|
{
|
|
14016
14344
|
ariaLabel: "Categorization status",
|
|
@@ -14023,50 +14351,34 @@ const BankTransactionsHeader = ({
|
|
|
14023
14351
|
fullWidth: isMobileList
|
|
14024
14352
|
}
|
|
14025
14353
|
) : null;
|
|
14026
|
-
if (
|
|
14354
|
+
if (isListView) {
|
|
14027
14355
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14028
14356
|
Header$1,
|
|
14029
14357
|
{
|
|
14030
14358
|
className: classNames(
|
|
14031
14359
|
"Layer__bank-transactions__header",
|
|
14032
14360
|
withDatePicker && "Layer__bank-transactions__header--with-date-picker",
|
|
14033
|
-
"Layer__bank-transactions__header--mobile"
|
|
14361
|
+
isMobileList && "Layer__bank-transactions__header--mobile"
|
|
14034
14362
|
),
|
|
14035
14363
|
style: { top: shiftStickyHeader },
|
|
14036
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "
|
|
14364
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", children: [
|
|
14037
14365
|
headerTopRow,
|
|
14038
|
-
|
|
14366
|
+
showBulkActions && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14039
14367
|
BulkActionsModule,
|
|
14040
14368
|
{
|
|
14041
|
-
showSelectedLabel:
|
|
14042
|
-
fullWidth:
|
|
14369
|
+
showSelectedLabel: !isMobileList,
|
|
14370
|
+
fullWidth: isMobileList,
|
|
14043
14371
|
slots: { BulkActions }
|
|
14044
14372
|
}
|
|
14045
|
-
)
|
|
14046
|
-
|
|
14047
|
-
/* @__PURE__ */ jsxRuntime.jsx(BankTransactionsHeaderMenu, { actions: headerMenuActions, isDisabled: showBulkActions })
|
|
14048
|
-
] }) }),
|
|
14049
|
-
/* @__PURE__ */ jsxRuntime.jsx(TransactionsSearch, { isDisabled: showBulkActions })
|
|
14050
|
-
] })
|
|
14051
|
-
}
|
|
14052
|
-
);
|
|
14053
|
-
}
|
|
14054
|
-
if (listView) {
|
|
14055
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14056
|
-
Header$1,
|
|
14057
|
-
{
|
|
14058
|
-
className: classNames(
|
|
14059
|
-
"Layer__bank-transactions__header",
|
|
14060
|
-
withDatePicker && "Layer__bank-transactions__header--with-date-picker"
|
|
14061
|
-
),
|
|
14062
|
-
style: { top: shiftStickyHeader },
|
|
14063
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", children: [
|
|
14064
|
-
headerTopRow,
|
|
14065
|
-
/* @__PURE__ */ jsxRuntime.jsx(HStack, { justify: "space-between", align: "center", gap: "xs", children: showBulkActions ? /* @__PURE__ */ jsxRuntime.jsx(BulkActionsModule, { slots: { BulkActions } }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
14373
|
+
),
|
|
14374
|
+
!showBulkActions && isStatusToggleVisible && /* @__PURE__ */ jsxRuntime.jsxs(HStack, { justify: "space-between", align: "center", gap: "xs", children: [
|
|
14066
14375
|
statusToggle,
|
|
14067
|
-
/* @__PURE__ */ jsxRuntime.jsx(BankTransactionsHeaderMenu, { actions: headerMenuActions
|
|
14068
|
-
] })
|
|
14069
|
-
/* @__PURE__ */ jsxRuntime.
|
|
14376
|
+
/* @__PURE__ */ jsxRuntime.jsx(BankTransactionsHeaderMenu, { actions: headerMenuActions })
|
|
14377
|
+
] }),
|
|
14378
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { className: "Layer__bank-transactions__header__search-and-menu", align: "center", gap: "xs", children: [
|
|
14379
|
+
/* @__PURE__ */ jsxRuntime.jsx(TransactionsSearch, { isDisabled: showBulkActions }),
|
|
14380
|
+
!isStatusToggleVisible && /* @__PURE__ */ jsxRuntime.jsx(BankTransactionsHeaderMenu, { actions: headerMenuActions, isDisabled: showBulkActions })
|
|
14381
|
+
] })
|
|
14070
14382
|
] })
|
|
14071
14383
|
}
|
|
14072
14384
|
);
|
|
@@ -14092,7 +14404,7 @@ const BankTransactionsHeader = ({
|
|
|
14092
14404
|
DownloadButton,
|
|
14093
14405
|
{
|
|
14094
14406
|
downloadButtonTextOverride: stringOverrides == null ? void 0 : stringOverrides.downloadButton,
|
|
14095
|
-
iconOnly:
|
|
14407
|
+
iconOnly: isListView,
|
|
14096
14408
|
disabled: showBulkActions
|
|
14097
14409
|
}
|
|
14098
14410
|
),
|
|
@@ -14476,8 +14788,8 @@ function useDelayedVisibility({
|
|
|
14476
14788
|
);
|
|
14477
14789
|
return { isVisible };
|
|
14478
14790
|
}
|
|
14479
|
-
const File$1 = (
|
|
14480
|
-
var
|
|
14791
|
+
const File$1 = (_Mb) => {
|
|
14792
|
+
var _Nb = _Mb, { size = 12 } = _Nb, props = __objRest(_Nb, ["size"]);
|
|
14481
14793
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14482
14794
|
"svg",
|
|
14483
14795
|
__spreadProps(__spreadValues({
|
|
@@ -14560,15 +14872,15 @@ const variants = {
|
|
|
14560
14872
|
}
|
|
14561
14873
|
}
|
|
14562
14874
|
};
|
|
14563
|
-
function AnimatedPresenceElementInner(
|
|
14564
|
-
var
|
|
14875
|
+
function AnimatedPresenceElementInner(_Ob, ref) {
|
|
14876
|
+
var _Pb = _Ob, {
|
|
14565
14877
|
as,
|
|
14566
14878
|
children,
|
|
14567
14879
|
variant,
|
|
14568
14880
|
isOpen,
|
|
14569
14881
|
slotProps = { AnimatePresence: { initial: false } },
|
|
14570
14882
|
motionKey
|
|
14571
|
-
} =
|
|
14883
|
+
} = _Pb, props = __objRest(_Pb, [
|
|
14572
14884
|
"as",
|
|
14573
14885
|
"children",
|
|
14574
14886
|
"variant",
|
|
@@ -14767,8 +15079,8 @@ function useBookkeepingPeriods() {
|
|
|
14767
15079
|
}
|
|
14768
15080
|
});
|
|
14769
15081
|
}
|
|
14770
|
-
const Clock = (
|
|
14771
|
-
var
|
|
15082
|
+
const Clock = (_Qb) => {
|
|
15083
|
+
var _Rb = _Qb, { size = 18 } = _Rb, props = __objRest(_Rb, ["size"]);
|
|
14772
15084
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14773
15085
|
"svg",
|
|
14774
15086
|
__spreadProps(__spreadValues({
|
|
@@ -15094,8 +15406,8 @@ const useSplitsForm = ({
|
|
|
15094
15406
|
saveLocalSplitsToCategoryStore
|
|
15095
15407
|
};
|
|
15096
15408
|
};
|
|
15097
|
-
const ScissorsFullOpen = (
|
|
15098
|
-
var
|
|
15409
|
+
const ScissorsFullOpen = (_Sb) => {
|
|
15410
|
+
var _Tb = _Sb, { size = 12 } = _Tb, props = __objRest(_Tb, ["size"]);
|
|
15099
15411
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15100
15412
|
"svg",
|
|
15101
15413
|
__spreadProps(__spreadValues({
|
|
@@ -15160,8 +15472,8 @@ const ScissorsFullOpen = (_zb) => {
|
|
|
15160
15472
|
})
|
|
15161
15473
|
);
|
|
15162
15474
|
};
|
|
15163
|
-
const Trash = (
|
|
15164
|
-
var
|
|
15475
|
+
const Trash = (_Ub) => {
|
|
15476
|
+
var _Vb = _Ub, { size = 18 } = _Vb, props = __objRest(_Vb, ["size"]);
|
|
15165
15477
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15166
15478
|
"svg",
|
|
15167
15479
|
__spreadProps(__spreadValues({
|
|
@@ -15412,8 +15724,8 @@ const ReceiptsProvider = ({
|
|
|
15412
15724
|
const contextData = useReceipts({ bankTransaction, isActive });
|
|
15413
15725
|
return /* @__PURE__ */ jsxRuntime.jsx(ReceiptsContext.Provider, { value: contextData, children });
|
|
15414
15726
|
};
|
|
15415
|
-
const Eye = (
|
|
15416
|
-
var
|
|
15727
|
+
const Eye = (_Wb) => {
|
|
15728
|
+
var _Xb = _Wb, { size = 18 } = _Xb, props = __objRest(_Xb, ["size"]);
|
|
15417
15729
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15418
15730
|
"svg",
|
|
15419
15731
|
__spreadProps(__spreadValues({
|
|
@@ -15549,11 +15861,11 @@ const FileThumb = ({
|
|
|
15549
15861
|
}
|
|
15550
15862
|
);
|
|
15551
15863
|
};
|
|
15552
|
-
const TextButton = (
|
|
15553
|
-
var
|
|
15864
|
+
const TextButton = (_Yb) => {
|
|
15865
|
+
var _Zb = _Yb, {
|
|
15554
15866
|
className,
|
|
15555
15867
|
children
|
|
15556
|
-
} =
|
|
15868
|
+
} = _Zb, props = __objRest(_Zb, [
|
|
15557
15869
|
"className",
|
|
15558
15870
|
"children"
|
|
15559
15871
|
]);
|
|
@@ -15641,8 +15953,8 @@ const openReceiptInNewTab = (url, index2) => (e) => {
|
|
|
15641
15953
|
`);
|
|
15642
15954
|
}
|
|
15643
15955
|
};
|
|
15644
|
-
const BankTransactionReceiptsWithProvider = React.forwardRef((
|
|
15645
|
-
var
|
|
15956
|
+
const BankTransactionReceiptsWithProvider = React.forwardRef((__b, ref) => {
|
|
15957
|
+
var _$b = __b, { bankTransaction, isActive } = _$b, props = __objRest(_$b, ["bankTransaction", "isActive"]);
|
|
15646
15958
|
return /* @__PURE__ */ jsxRuntime.jsx(ReceiptsProvider, { bankTransaction, isActive, children: /* @__PURE__ */ jsxRuntime.jsx(BankTransactionReceipts, __spreadProps(__spreadValues({}, props), { ref })) });
|
|
15647
15959
|
});
|
|
15648
15960
|
BankTransactionReceiptsWithProvider.displayName = "BankTransactionReceiptsWithProvider";
|
|
@@ -15704,8 +16016,8 @@ const transformCurrencyValue = (rawValue) => {
|
|
|
15704
16016
|
}
|
|
15705
16017
|
return cleaned;
|
|
15706
16018
|
};
|
|
15707
|
-
const AmountInput = (
|
|
15708
|
-
var
|
|
16019
|
+
const AmountInput = (_ac) => {
|
|
16020
|
+
var _bc = _ac, {
|
|
15709
16021
|
onChange,
|
|
15710
16022
|
className,
|
|
15711
16023
|
leftText,
|
|
@@ -15713,7 +16025,7 @@ const AmountInput = (_Jb) => {
|
|
|
15713
16025
|
isInvalid,
|
|
15714
16026
|
badge,
|
|
15715
16027
|
placeholder = "$0.00"
|
|
15716
|
-
} =
|
|
16028
|
+
} = _bc, props = __objRest(_bc, [
|
|
15717
16029
|
"onChange",
|
|
15718
16030
|
"className",
|
|
15719
16031
|
"leftText",
|
|
@@ -16027,12 +16339,12 @@ const useBankTransactionMemo = ({ bankTransactionId }) => {
|
|
|
16027
16339
|
isSaved
|
|
16028
16340
|
}), [form, isErrorUpdatingMemo, isUpdatingMemo, isSaved]);
|
|
16029
16341
|
};
|
|
16030
|
-
const Textarea = (
|
|
16031
|
-
var
|
|
16342
|
+
const Textarea = (_cc) => {
|
|
16343
|
+
var _dc = _cc, {
|
|
16032
16344
|
className,
|
|
16033
16345
|
isInvalid,
|
|
16034
16346
|
errorMessage
|
|
16035
|
-
} =
|
|
16347
|
+
} = _dc, props = __objRest(_dc, [
|
|
16036
16348
|
"className",
|
|
16037
16349
|
"isInvalid",
|
|
16038
16350
|
"errorMessage"
|
|
@@ -17011,9 +17323,6 @@ function useTagDimensionByKey({ isEnabled = true, dimensionKey }) {
|
|
|
17011
17323
|
);
|
|
17012
17324
|
return new TagDimensionByKeySWRResponse(swrResponse);
|
|
17013
17325
|
}
|
|
17014
|
-
function usePreloadTagDimensionByKey(parameters) {
|
|
17015
|
-
useTagDimensionByKey(parameters);
|
|
17016
|
-
}
|
|
17017
17326
|
class TagValueDefinitionAsOption {
|
|
17018
17327
|
constructor(tagValueDefinition) {
|
|
17019
17328
|
__publicField(this, "tagValueDefinition");
|
|
@@ -17819,8 +18128,8 @@ const BankTransactionsMobileListItemCheckbox = ({
|
|
|
17819
18128
|
}
|
|
17820
18129
|
) });
|
|
17821
18130
|
};
|
|
17822
|
-
const Paperclip = (
|
|
17823
|
-
var
|
|
18131
|
+
const Paperclip = (_ec) => {
|
|
18132
|
+
var _fc = _ec, { size = 20 } = _fc, props = __objRest(_fc, ["size"]);
|
|
17824
18133
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17825
18134
|
"svg",
|
|
17826
18135
|
__spreadProps(__spreadValues({
|
|
@@ -19541,8 +19850,8 @@ function useArchiveCategorizationRule() {
|
|
|
19541
19850
|
}
|
|
19542
19851
|
});
|
|
19543
19852
|
}
|
|
19544
|
-
const BackArrow = (
|
|
19545
|
-
var
|
|
19853
|
+
const BackArrow = (_gc) => {
|
|
19854
|
+
var _hc = _gc, { size = 18 } = _hc, props = __objRest(_hc, ["size"]);
|
|
19546
19855
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
19547
19856
|
"svg",
|
|
19548
19857
|
__spreadProps(__spreadValues({
|
|
@@ -19709,31 +20018,8 @@ const usePaginationRange = ({
|
|
|
19709
20018
|
}, [totalCount, pageSize, siblingCount, currentPage]);
|
|
19710
20019
|
return paginationRange;
|
|
19711
20020
|
};
|
|
19712
|
-
const
|
|
19713
|
-
var
|
|
19714
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
19715
|
-
"svg",
|
|
19716
|
-
__spreadProps(__spreadValues({
|
|
19717
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
19718
|
-
width: "18",
|
|
19719
|
-
height: "18",
|
|
19720
|
-
viewBox: "0 0 18 18",
|
|
19721
|
-
fill: "none"
|
|
19722
|
-
}, props), {
|
|
19723
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
19724
|
-
"path",
|
|
19725
|
-
{
|
|
19726
|
-
d: "M11.25 13.5L6.75 9L11.25 4.5",
|
|
19727
|
-
stroke: "currentColor",
|
|
19728
|
-
strokeLinecap: "round",
|
|
19729
|
-
strokeLinejoin: "round"
|
|
19730
|
-
}
|
|
19731
|
-
)
|
|
19732
|
-
})
|
|
19733
|
-
);
|
|
19734
|
-
};
|
|
19735
|
-
const PaginationButton = (_Sb) => {
|
|
19736
|
-
var _Tb = _Sb, { children, isSelected } = _Tb, buttonProps = __objRest(_Tb, ["children", "isSelected"]);
|
|
20021
|
+
const PaginationButton = (_ic) => {
|
|
20022
|
+
var _jc = _ic, { children, isSelected } = _jc, buttonProps = __objRest(_jc, ["children", "isSelected"]);
|
|
19737
20023
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
19738
20024
|
Button,
|
|
19739
20025
|
__spreadProps(__spreadValues({
|
|
@@ -19934,8 +20220,8 @@ const getColumnDefs = (columnConfig2) => {
|
|
|
19934
20220
|
const CSS_PREFIX$1 = "Layer__UI__Table";
|
|
19935
20221
|
const getClassName = (component, additionalClassNames, withHidden) => classNames(`${CSS_PREFIX$1}-${component}`, withHidden && `${CSS_PREFIX$1}-${component}--hidden`, additionalClassNames);
|
|
19936
20222
|
const Table$1 = React.forwardRef(
|
|
19937
|
-
(
|
|
19938
|
-
var
|
|
20223
|
+
(_kc, ref) => {
|
|
20224
|
+
var _lc = _kc, { children, className, nonAria, slot } = _lc, restProps = __objRest(_lc, ["children", "className", "nonAria", "slot"]);
|
|
19939
20225
|
const TableComponent = nonAria ? "table" : reactAriaComponents.Table;
|
|
19940
20226
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
19941
20227
|
TableComponent,
|
|
@@ -19950,8 +20236,8 @@ const Table$1 = React.forwardRef(
|
|
|
19950
20236
|
}
|
|
19951
20237
|
);
|
|
19952
20238
|
Table$1.displayName = "Table";
|
|
19953
|
-
const TableHeaderInner = (
|
|
19954
|
-
var
|
|
20239
|
+
const TableHeaderInner = (_mc, ref) => {
|
|
20240
|
+
var _nc = _mc, { children, className, hideHeader, nonAria } = _nc, restProps = __objRest(_nc, ["children", "className", "hideHeader", "nonAria"]);
|
|
19955
20241
|
const TableHeaderComponent = nonAria ? "thead" : reactAriaComponents.TableHeader;
|
|
19956
20242
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
19957
20243
|
TableHeaderComponent,
|
|
@@ -19965,8 +20251,8 @@ const TableHeaderInner = (_Wb, ref) => {
|
|
|
19965
20251
|
};
|
|
19966
20252
|
const TableHeader = React.forwardRef(TableHeaderInner);
|
|
19967
20253
|
TableHeader.displayName = "TableHeader";
|
|
19968
|
-
const TableBodyInner = (
|
|
19969
|
-
var
|
|
20254
|
+
const TableBodyInner = (_oc, ref) => {
|
|
20255
|
+
var _pc = _oc, { children, className, nonAria } = _pc, restProps = __objRest(_pc, ["children", "className", "nonAria"]);
|
|
19970
20256
|
const TableBodyComponent = nonAria ? "tbody" : reactAriaComponents.TableBody;
|
|
19971
20257
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
19972
20258
|
TableBodyComponent,
|
|
@@ -19980,8 +20266,8 @@ const TableBodyInner = (_Yb, ref) => {
|
|
|
19980
20266
|
};
|
|
19981
20267
|
const TableBody$1 = React.forwardRef(TableBodyInner);
|
|
19982
20268
|
TableBody$1.displayName = "TableBody";
|
|
19983
|
-
const RowInner = (
|
|
19984
|
-
var
|
|
20269
|
+
const RowInner = (_qc, ref) => {
|
|
20270
|
+
var _rc = _qc, { children, className, depth = 0, nonAria, id } = _rc, restProps = __objRest(_rc, ["children", "className", "depth", "nonAria", "id"]);
|
|
19985
20271
|
const dataProperties = toDataProperties({ depth });
|
|
19986
20272
|
const RowComponent = nonAria ? "tr" : reactAriaComponents.Row;
|
|
19987
20273
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -19998,8 +20284,8 @@ const RowInner = (__b, ref) => {
|
|
|
19998
20284
|
const Row = React.forwardRef(RowInner);
|
|
19999
20285
|
Row.displayName = "Row";
|
|
20000
20286
|
const Column = React.forwardRef(
|
|
20001
|
-
(
|
|
20002
|
-
var
|
|
20287
|
+
(_sc, ref) => {
|
|
20288
|
+
var _tc = _sc, { children, className, nonAria, id, textAlign = "left", colSpan = 1 } = _tc, restProps = __objRest(_tc, ["children", "className", "nonAria", "id", "textAlign", "colSpan"]);
|
|
20003
20289
|
const dataProperties = toDataProperties({ "text-align": textAlign });
|
|
20004
20290
|
const columnClassName = getClassName("Column", className);
|
|
20005
20291
|
const ColumnComponent = nonAria ? "th" : reactAriaComponents.Column;
|
|
@@ -20018,8 +20304,8 @@ const Column = React.forwardRef(
|
|
|
20018
20304
|
);
|
|
20019
20305
|
Column.displayName = "Column";
|
|
20020
20306
|
const Cell = React.forwardRef(
|
|
20021
|
-
(
|
|
20022
|
-
var
|
|
20307
|
+
(_uc, ref) => {
|
|
20308
|
+
var _vc = _uc, { children, className, nonAria, id } = _vc, restProps = __objRest(_vc, ["children", "className", "nonAria", "id"]);
|
|
20023
20309
|
const CellComponent = nonAria ? "td" : reactAriaComponents.Cell;
|
|
20024
20310
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
20025
20311
|
CellComponent,
|
|
@@ -20932,8 +21218,8 @@ function useTagDimensions({ isEnabled = true } = {}) {
|
|
|
20932
21218
|
function usePreloadTagDimensions(parameters) {
|
|
20933
21219
|
useTagDimensions(parameters);
|
|
20934
21220
|
}
|
|
20935
|
-
const Inbox = (
|
|
20936
|
-
var
|
|
21221
|
+
const Inbox = (_wc) => {
|
|
21222
|
+
var _xc = _wc, { size = 18 } = _xc, props = __objRest(_xc, ["size"]);
|
|
20937
21223
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
20938
21224
|
"svg",
|
|
20939
21225
|
__spreadProps(__spreadValues({
|
|
@@ -21013,8 +21299,8 @@ function BankTransactionsListWithEmptyStates({
|
|
|
21013
21299
|
return slots.List;
|
|
21014
21300
|
}
|
|
21015
21301
|
const COMPONENT_NAME$d = "bank-transactions";
|
|
21016
|
-
const BankTransactions = (
|
|
21017
|
-
var
|
|
21302
|
+
const BankTransactions = (_yc) => {
|
|
21303
|
+
var _zc = _yc, {
|
|
21018
21304
|
onError,
|
|
21019
21305
|
showTags = false,
|
|
21020
21306
|
showCustomerVendor = false,
|
|
@@ -21023,7 +21309,7 @@ const BankTransactions = (_gc) => {
|
|
|
21023
21309
|
mode,
|
|
21024
21310
|
renderInAppLink,
|
|
21025
21311
|
filters
|
|
21026
|
-
} =
|
|
21312
|
+
} = _zc, restProps = __objRest(_zc, [
|
|
21027
21313
|
"onError",
|
|
21028
21314
|
"showTags",
|
|
21029
21315
|
"showCustomerVendor",
|
|
@@ -21118,7 +21404,7 @@ const BankTransactionsTableView = ({
|
|
|
21118
21404
|
}
|
|
21119
21405
|
});
|
|
21120
21406
|
const isLastPage = data && !hasMore && Math.ceil(((data == null ? void 0 : data.length) || 0) / pageSize) === currentPage;
|
|
21121
|
-
const tableContentMode = listView && mobileComponent === "mobileList" ?
|
|
21407
|
+
const tableContentMode = listView && mobileComponent === "mobileList" ? BankTransactionsTableContent.MobileList : listView ? BankTransactionsTableContent.List : BankTransactionsTableContent.Table;
|
|
21122
21408
|
const BankTransactionsTableViewContent = React.useMemo(() => {
|
|
21123
21409
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "Layer__bank-transactions__table-wrapper", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
21124
21410
|
BankTransactionsTable,
|
|
@@ -21173,16 +21459,16 @@ const BankTransactionsTableView = ({
|
|
|
21173
21459
|
}, [bankTransactions, showDescriptions, showReceiptUploads, showTooltips]);
|
|
21174
21460
|
const slots = React.useMemo(() => {
|
|
21175
21461
|
switch (tableContentMode) {
|
|
21176
|
-
case
|
|
21462
|
+
case BankTransactionsTableContent.Table:
|
|
21177
21463
|
return {
|
|
21178
21464
|
List: BankTransactionsTableViewContent
|
|
21179
21465
|
};
|
|
21180
|
-
case
|
|
21466
|
+
case BankTransactionsTableContent.List:
|
|
21181
21467
|
return {
|
|
21182
21468
|
List: BankTransactionsListView,
|
|
21183
21469
|
Loader: BankTransactionsListLoader
|
|
21184
21470
|
};
|
|
21185
|
-
case
|
|
21471
|
+
case BankTransactionsTableContent.MobileList:
|
|
21186
21472
|
return {
|
|
21187
21473
|
List: BankTransactionsMobileListView,
|
|
21188
21474
|
Loader: /* @__PURE__ */ jsxRuntime.jsx(MobileListSkeleton, {})
|
|
@@ -21216,8 +21502,7 @@ const BankTransactionsTableView = ({
|
|
|
21216
21502
|
{
|
|
21217
21503
|
shiftStickyHeader,
|
|
21218
21504
|
asWidget,
|
|
21219
|
-
|
|
21220
|
-
listView,
|
|
21505
|
+
tableContentMode,
|
|
21221
21506
|
stringOverrides: stringOverrides == null ? void 0 : stringOverrides.bankTransactionsHeader,
|
|
21222
21507
|
isSyncing,
|
|
21223
21508
|
withUploadMenu: showUploadOptions,
|
|
@@ -21233,7 +21518,7 @@ const BankTransactionsTableView = ({
|
|
|
21233
21518
|
isOpen: !!ruleSuggestion,
|
|
21234
21519
|
onOpenChange: handleRuleSuggestionOpenChange,
|
|
21235
21520
|
ruleSuggestion,
|
|
21236
|
-
variant: tableContentMode ===
|
|
21521
|
+
variant: tableContentMode === BankTransactionsTableContent.MobileList ? "drawer" : "modal"
|
|
21237
21522
|
}
|
|
21238
21523
|
),
|
|
21239
21524
|
!isMonthlyViewMode && !isLoading && /* @__PURE__ */ jsxRuntime.jsx(HStack, { justify: "end", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -21330,8 +21615,8 @@ function QuickbooksContextProvider({ children }) {
|
|
|
21330
21615
|
const quickbooksContextData = useQuickbooks();
|
|
21331
21616
|
return /* @__PURE__ */ jsxRuntime.jsx(QuickbooksContext.Provider, { value: quickbooksContextData, children });
|
|
21332
21617
|
}
|
|
21333
|
-
const Cog = (
|
|
21334
|
-
var
|
|
21618
|
+
const Cog = (_Ac) => {
|
|
21619
|
+
var _Bc = _Ac, { size = 12 } = _Bc, props = __objRest(_Bc, ["size"]);
|
|
21335
21620
|
const id = React.useId();
|
|
21336
21621
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
21337
21622
|
"svg",
|
|
@@ -21352,8 +21637,8 @@ const Cog = (_ic) => {
|
|
|
21352
21637
|
})
|
|
21353
21638
|
);
|
|
21354
21639
|
};
|
|
21355
|
-
const QuickbooksIcon = (
|
|
21356
|
-
var
|
|
21640
|
+
const QuickbooksIcon = (_Cc) => {
|
|
21641
|
+
var _Dc = _Cc, { size = 24 } = _Dc, props = __objRest(_Dc, ["size"]);
|
|
21357
21642
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
21358
21643
|
"svg",
|
|
21359
21644
|
__spreadProps(__spreadValues({
|
|
@@ -21512,8 +21797,8 @@ function IntegrationsQuickbooksUnlinkConfirmationModal({ isOpen, onOpenChange })
|
|
|
21512
21797
|
}
|
|
21513
21798
|
);
|
|
21514
21799
|
}
|
|
21515
|
-
const MoreVertical = (
|
|
21516
|
-
var
|
|
21800
|
+
const MoreVertical = (_Ec) => {
|
|
21801
|
+
var _Fc = _Ec, { size = 18 } = _Fc, props = __objRest(_Fc, ["size"]);
|
|
21517
21802
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
21518
21803
|
"svg",
|
|
21519
21804
|
__spreadProps(__spreadValues({
|
|
@@ -21742,8 +22027,8 @@ const IntegrationsComponent = ({
|
|
|
21742
22027
|
(quickbooksConnectionStatus == null ? void 0 : quickbooksConnectionStatus.is_connected) && /* @__PURE__ */ jsxRuntime.jsx(IntegrationsContent, {})
|
|
21743
22028
|
] });
|
|
21744
22029
|
};
|
|
21745
|
-
const PlusIcon = (
|
|
21746
|
-
var
|
|
22030
|
+
const PlusIcon = (_Gc) => {
|
|
22031
|
+
var _Hc = _Gc, { size = 14 } = _Hc, props = __objRest(_Hc, ["size"]);
|
|
21747
22032
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
21748
22033
|
"svg",
|
|
21749
22034
|
__spreadProps(__spreadValues({
|
|
@@ -21785,8 +22070,8 @@ const PlusIcon = (_oc) => {
|
|
|
21785
22070
|
})
|
|
21786
22071
|
);
|
|
21787
22072
|
};
|
|
21788
|
-
const InstitutionIcon = (
|
|
21789
|
-
var
|
|
22073
|
+
const InstitutionIcon = (_Ic) => {
|
|
22074
|
+
var _Jc = _Ic, { size = 18 } = _Jc, props = __objRest(_Jc, ["size"]);
|
|
21790
22075
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
21791
22076
|
"svg",
|
|
21792
22077
|
__spreadProps(__spreadValues({
|
|
@@ -22404,8 +22689,8 @@ const MenuItem = React.forwardRef(
|
|
|
22404
22689
|
);
|
|
22405
22690
|
const PILL_CLASS_NAME = "Layer__Pill";
|
|
22406
22691
|
const Pill = React.forwardRef(
|
|
22407
|
-
function Pill2(
|
|
22408
|
-
var
|
|
22692
|
+
function Pill2(_Kc, ref) {
|
|
22693
|
+
var _Lc = _Kc, { children, status } = _Lc, restProps = __objRest(_Lc, ["children", "status"]);
|
|
22409
22694
|
const dataProperties = toDataProperties({ status });
|
|
22410
22695
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22411
22696
|
reactAriaComponents.Button,
|
|
@@ -22766,158 +23051,9 @@ const LinkedAccountsContent = ({
|
|
|
22766
23051
|
/* @__PURE__ */ jsxRuntime.jsx(LinkedAccountsConfirmationModal, {})
|
|
22767
23052
|
] });
|
|
22768
23053
|
};
|
|
22769
|
-
const CALENDAR_CLASS_NAME = "Layer__UI__Calendar";
|
|
22770
|
-
const Calendar = React.forwardRef(
|
|
22771
|
-
function Calendar2(_uc, ref) {
|
|
22772
|
-
var _vc = _uc, { className, isReadOnly } = _vc, restProps = __objRest(_vc, ["className", "isReadOnly"]);
|
|
22773
|
-
const dataProperties = toDataProperties({ readonly: isReadOnly });
|
|
22774
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22775
|
-
reactAriaComponents.Calendar,
|
|
22776
|
-
__spreadProps(__spreadValues(__spreadValues({}, dataProperties), restProps), {
|
|
22777
|
-
isReadOnly,
|
|
22778
|
-
className: classNames(CALENDAR_CLASS_NAME, className),
|
|
22779
|
-
ref
|
|
22780
|
-
})
|
|
22781
|
-
);
|
|
22782
|
-
}
|
|
22783
|
-
);
|
|
22784
|
-
const CALENDAR_GRID_CLASS_NAME = "Layer__UI__CalendarGrid";
|
|
22785
|
-
const CalendarGrid = React.forwardRef(
|
|
22786
|
-
function CalendarGrid2(_wc, ref) {
|
|
22787
|
-
var _xc = _wc, { className } = _xc, restProps = __objRest(_xc, ["className"]);
|
|
22788
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22789
|
-
reactAriaComponents.CalendarGrid,
|
|
22790
|
-
__spreadProps(__spreadValues({}, restProps), {
|
|
22791
|
-
className: classNames(CALENDAR_GRID_CLASS_NAME, className),
|
|
22792
|
-
ref
|
|
22793
|
-
})
|
|
22794
|
-
);
|
|
22795
|
-
}
|
|
22796
|
-
);
|
|
22797
|
-
const CALENDAR_GRID_BODY_CLASS_NAME = "Layer__UI__CalendarGridBody";
|
|
22798
|
-
const CalendarGridBody = React.forwardRef(
|
|
22799
|
-
function CalendarGridBody2(_yc, ref) {
|
|
22800
|
-
var _zc = _yc, { className } = _zc, restProps = __objRest(_zc, ["className"]);
|
|
22801
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22802
|
-
reactAriaComponents.CalendarGridBody,
|
|
22803
|
-
__spreadProps(__spreadValues({}, restProps), {
|
|
22804
|
-
className: classNames(CALENDAR_GRID_BODY_CLASS_NAME, className),
|
|
22805
|
-
ref
|
|
22806
|
-
})
|
|
22807
|
-
);
|
|
22808
|
-
}
|
|
22809
|
-
);
|
|
22810
|
-
const CALENDAR_CELL_CLASS_NAME = "Layer__UI__CalendarCell";
|
|
22811
|
-
const CalendarCell = React.forwardRef(
|
|
22812
|
-
function CalendarCell2(_Ac, ref) {
|
|
22813
|
-
var _Bc = _Ac, { className, size = "sm" } = _Bc, restProps = __objRest(_Bc, ["className", "size"]);
|
|
22814
|
-
const dataProperties = toDataProperties({ size });
|
|
22815
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22816
|
-
reactAriaComponents.CalendarCell,
|
|
22817
|
-
__spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
|
|
22818
|
-
className: classNames(CALENDAR_CELL_CLASS_NAME, className),
|
|
22819
|
-
ref
|
|
22820
|
-
})
|
|
22821
|
-
);
|
|
22822
|
-
}
|
|
22823
|
-
);
|
|
22824
|
-
const CALENDAR_GRID_HEADER_CLASS_NAME = "Layer__UI__CalendarGridHeader";
|
|
22825
|
-
const CalendarGridHeader = React.forwardRef(
|
|
22826
|
-
function CalendarGridHeader2(_Cc, ref) {
|
|
22827
|
-
var _Dc = _Cc, { className } = _Dc, restProps = __objRest(_Dc, ["className"]);
|
|
22828
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22829
|
-
reactAriaComponents.CalendarGridHeader,
|
|
22830
|
-
__spreadProps(__spreadValues({}, restProps), {
|
|
22831
|
-
className: classNames(CALENDAR_GRID_HEADER_CLASS_NAME, className),
|
|
22832
|
-
ref
|
|
22833
|
-
})
|
|
22834
|
-
);
|
|
22835
|
-
}
|
|
22836
|
-
);
|
|
22837
|
-
const CALENDAR_HEADER_CELL_CLASS_NAME = "Layer__UI__CalendarHeaderCell";
|
|
22838
|
-
const CalendarHeaderCell = React.forwardRef(
|
|
22839
|
-
function CalendarHeaderCell2(_Ec, ref) {
|
|
22840
|
-
var _Fc = _Ec, { className, size = "sm" } = _Fc, restProps = __objRest(_Fc, ["className", "size"]);
|
|
22841
|
-
const dataProperties = toDataProperties({ size });
|
|
22842
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22843
|
-
reactAriaComponents.CalendarHeaderCell,
|
|
22844
|
-
__spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
|
|
22845
|
-
className: classNames(CALENDAR_HEADER_CELL_CLASS_NAME, className),
|
|
22846
|
-
ref
|
|
22847
|
-
})
|
|
22848
|
-
);
|
|
22849
|
-
}
|
|
22850
|
-
);
|
|
22851
|
-
const DateCalendar = ({ minDate, maxDate, variant }) => {
|
|
22852
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Calendar, { minValue: minDate, maxValue: maxDate, children: [
|
|
22853
|
-
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { align: "center", justify: "space-between", pb: "xs", pi: "xs", className: "Layer__DateCalendar__Header", children: [
|
|
22854
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { icon: true, inset: true, variant: "ghost", slot: "previous", children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeft, { size: 20 }) }),
|
|
22855
|
-
/* @__PURE__ */ jsxRuntime.jsx(Heading$1, { weight: "normal", size: "sm" }),
|
|
22856
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { icon: true, inset: true, variant: "ghost", slot: "next", children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRight, { size: 20 }) })
|
|
22857
|
-
] }),
|
|
22858
|
-
/* @__PURE__ */ jsxRuntime.jsx(HStack, { pb: "xs", pi: "xs", children: /* @__PURE__ */ jsxRuntime.jsxs(CalendarGrid, { children: [
|
|
22859
|
-
/* @__PURE__ */ jsxRuntime.jsx(CalendarGridHeader, { children: (day) => /* @__PURE__ */ jsxRuntime.jsx(CalendarHeaderCell, { size: variant === "mobile" ? "md" : "sm", children: day }) }),
|
|
22860
|
-
/* @__PURE__ */ jsxRuntime.jsx(CalendarGridBody, { children: (date2) => /* @__PURE__ */ jsxRuntime.jsx(CalendarCell, { date: date2, size: variant === "mobile" ? "md" : "sm" }) })
|
|
22861
|
-
] }) })
|
|
22862
|
-
] });
|
|
22863
|
-
};
|
|
22864
|
-
const DatePickerInput = ({ errorText, variant, onClick }) => {
|
|
22865
|
-
const errorTriangle = React.useMemo(() => {
|
|
22866
|
-
if (variant === "mobile" || !errorText) return null;
|
|
22867
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(DeprecatedTooltip, { offset: 12, children: [
|
|
22868
|
-
/* @__PURE__ */ jsxRuntime.jsx(DeprecatedTooltipTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(FieldError, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TriangleAlert, { size: 18 }) }) }),
|
|
22869
|
-
/* @__PURE__ */ jsxRuntime.jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", width: "md", children: errorText })
|
|
22870
|
-
] });
|
|
22871
|
-
}, [errorText, variant]);
|
|
22872
|
-
if (variant === "mobile") {
|
|
22873
|
-
return /* @__PURE__ */ jsxRuntime.jsx(InputGroup$1, { slot: "input", isInvalid: !!errorText, onClick, children: /* @__PURE__ */ jsxRuntime.jsx(DateInput, { inset: true, pointerEvents: "none", children: (segment) => /* @__PURE__ */ jsxRuntime.jsx(DateSegment, { isReadOnly: true, segment }) }) });
|
|
22874
|
-
}
|
|
22875
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(InputGroup$1, { slot: "input", isInvalid: !!errorText, children: [
|
|
22876
|
-
/* @__PURE__ */ jsxRuntime.jsx(DateInput, { inset: true, children: (segment) => /* @__PURE__ */ jsxRuntime.jsx(DateSegment, { segment }) }),
|
|
22877
|
-
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "3xs", align: "center", children: [
|
|
22878
|
-
errorTriangle,
|
|
22879
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { icon: true, inset: true, variant: "ghost", onClick, children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDown, { size: 20 }) })
|
|
22880
|
-
] })
|
|
22881
|
-
] });
|
|
22882
|
-
};
|
|
22883
|
-
const DatePicker = ({
|
|
22884
|
-
label,
|
|
22885
|
-
showLabel = true,
|
|
22886
|
-
date: date2,
|
|
22887
|
-
minDate,
|
|
22888
|
-
maxDate,
|
|
22889
|
-
isInvalid,
|
|
22890
|
-
errorText,
|
|
22891
|
-
onBlur,
|
|
22892
|
-
onChange,
|
|
22893
|
-
isDisabled
|
|
22894
|
-
}) => {
|
|
22895
|
-
const additionalAriaProps = !showLabel && { "aria-label": label };
|
|
22896
|
-
const { value } = useSizeClass();
|
|
22897
|
-
const [isPopoverOpen, setPopoverOpen] = React.useState(false);
|
|
22898
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
22899
|
-
DatePicker$1,
|
|
22900
|
-
__spreadProps(__spreadValues({
|
|
22901
|
-
granularity: "day",
|
|
22902
|
-
value: date2,
|
|
22903
|
-
onBlur,
|
|
22904
|
-
onChange,
|
|
22905
|
-
isInvalid
|
|
22906
|
-
}, additionalAriaProps), {
|
|
22907
|
-
isOpen: isPopoverOpen,
|
|
22908
|
-
onOpenChange: setPopoverOpen,
|
|
22909
|
-
isDisabled,
|
|
22910
|
-
children: [
|
|
22911
|
-
showLabel && /* @__PURE__ */ jsxRuntime.jsx(Label, { children: label }),
|
|
22912
|
-
/* @__PURE__ */ jsxRuntime.jsx(DatePickerInput, { errorText, variant: value, onClick: () => setPopoverOpen(true) }),
|
|
22913
|
-
/* @__PURE__ */ jsxRuntime.jsx(ResponsivePopover, { children: /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.Dialog, { children: /* @__PURE__ */ jsxRuntime.jsx(DateCalendar, { minDate, maxDate, variant: value }) }) })
|
|
22914
|
-
]
|
|
22915
|
-
})
|
|
22916
|
-
);
|
|
22917
|
-
};
|
|
22918
23054
|
const getIsDateInvalid = (date2, { minDate, maxDate }) => {
|
|
22919
23055
|
if (date2 === null) return "Cannot select empty date";
|
|
22920
|
-
if (minDate && date2.compare(minDate) < 0) return
|
|
23056
|
+
if (minDate && date2.compare(minDate) < 0) return `Cannot select date before ${formatDate(minDate.toDate())}`;
|
|
22921
23057
|
if (maxDate && date2.compare(maxDate) > 0) return "Cannot select date in the future";
|
|
22922
23058
|
return null;
|
|
22923
23059
|
};
|
|
@@ -23945,14 +24081,14 @@ const formatYAxisValue = (value) => {
|
|
|
23945
24081
|
return value;
|
|
23946
24082
|
}
|
|
23947
24083
|
};
|
|
23948
|
-
const CustomizedYTick = (
|
|
23949
|
-
var
|
|
24084
|
+
const CustomizedYTick = (_Mc) => {
|
|
24085
|
+
var _Nc = _Mc, {
|
|
23950
24086
|
verticalAnchor: _verticalAnchor,
|
|
23951
24087
|
visibleTicksCount: _visibleTicksCount,
|
|
23952
24088
|
tickFormatter: _tickFormatter,
|
|
23953
24089
|
format,
|
|
23954
24090
|
payload
|
|
23955
|
-
} =
|
|
24091
|
+
} = _Nc, restProps = __objRest(_Nc, [
|
|
23956
24092
|
"verticalAnchor",
|
|
23957
24093
|
"visibleTicksCount",
|
|
23958
24094
|
"tickFormatter",
|
|
@@ -23961,8 +24097,8 @@ const CustomizedYTick = (_Gc) => {
|
|
|
23961
24097
|
]);
|
|
23962
24098
|
return /* @__PURE__ */ jsxRuntime.jsx("text", __spreadProps(__spreadValues({}, restProps), { className: "Layer__ChartYAxis__tick", children: /* @__PURE__ */ jsxRuntime.jsx("tspan", { dy: "0.355em", children: format(payload.value) }) }));
|
|
23963
24099
|
};
|
|
23964
|
-
const ChartYAxis = (
|
|
23965
|
-
var
|
|
24100
|
+
const ChartYAxis = (_Oc) => {
|
|
24101
|
+
var _Pc = _Oc, { format = formatYAxisValue } = _Pc, props = __objRest(_Pc, ["format"]);
|
|
23966
24102
|
const tick = (tickProps) => /* @__PURE__ */ jsxRuntime.jsx(CustomizedYTick, __spreadProps(__spreadValues({}, tickProps), { format }));
|
|
23967
24103
|
return /* @__PURE__ */ jsxRuntime.jsx(recharts.YAxis, __spreadValues({ tick }, props));
|
|
23968
24104
|
};
|
|
@@ -24210,8 +24346,8 @@ const renderLegendContent = () => {
|
|
|
24210
24346
|
)) });
|
|
24211
24347
|
};
|
|
24212
24348
|
const ProfitAndLossChartLegend = () => /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, { verticalAlign: "top", align: "right", content: renderLegendContent });
|
|
24213
|
-
const BarChart2 = (
|
|
24214
|
-
var
|
|
24349
|
+
const BarChart2 = (_Qc) => {
|
|
24350
|
+
var _Rc = _Qc, { size = 12 } = _Rc, props = __objRest(_Rc, ["size"]);
|
|
24215
24351
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24216
24352
|
"svg",
|
|
24217
24353
|
__spreadProps(__spreadValues({
|
|
@@ -24291,13 +24427,13 @@ const ChartTooltipCursor = ({ width, points, height }) => {
|
|
|
24291
24427
|
}
|
|
24292
24428
|
) });
|
|
24293
24429
|
};
|
|
24294
|
-
const ChartTooltip = (
|
|
24295
|
-
var
|
|
24430
|
+
const ChartTooltip = (_Sc) => {
|
|
24431
|
+
var _Tc = _Sc, {
|
|
24296
24432
|
content,
|
|
24297
24433
|
cursorWidth,
|
|
24298
24434
|
animationDuration = 100,
|
|
24299
24435
|
animationEasing = "ease-out"
|
|
24300
|
-
} =
|
|
24436
|
+
} = _Tc, props = __objRest(_Tc, [
|
|
24301
24437
|
"content",
|
|
24302
24438
|
"cursorWidth",
|
|
24303
24439
|
"animationDuration",
|
|
@@ -24559,11 +24695,11 @@ const ProfitAndLossChart = ({ tagFilter }) => {
|
|
|
24559
24695
|
isSyncing ? /* @__PURE__ */ jsxRuntime.jsx(ProfitAndLossChartStateCard, {}) : null
|
|
24560
24696
|
] });
|
|
24561
24697
|
};
|
|
24562
|
-
const BackButton = (
|
|
24563
|
-
var
|
|
24698
|
+
const BackButton = (_Uc) => {
|
|
24699
|
+
var _Vc = _Uc, {
|
|
24564
24700
|
className,
|
|
24565
24701
|
textOnly = false
|
|
24566
|
-
} =
|
|
24702
|
+
} = _Vc, props = __objRest(_Vc, [
|
|
24567
24703
|
"className",
|
|
24568
24704
|
"textOnly"
|
|
24569
24705
|
]);
|
|
@@ -24576,7 +24712,7 @@ function useGlobalDatePickerBounds() {
|
|
|
24576
24712
|
const maxDate = React.useMemo(() => dateFns.endOfDay(/* @__PURE__ */ new Date()), []);
|
|
24577
24713
|
return React.useMemo(() => ({ minDate, maxDate }), [minDate, maxDate]);
|
|
24578
24714
|
}
|
|
24579
|
-
const GlobalMonthPicker = ({ truncateMonth }) => {
|
|
24715
|
+
const GlobalMonthPicker = ({ truncateMonth, showLabel = false }) => {
|
|
24580
24716
|
const { minDate, maxDate } = useGlobalDatePickerBounds();
|
|
24581
24717
|
const { setMonth } = useGlobalDateRangeActions();
|
|
24582
24718
|
const { date: date2 } = useGlobalDate({ dateSelectionMode: "month" });
|
|
@@ -24589,8 +24725,8 @@ const GlobalMonthPicker = ({ truncateMonth }) => {
|
|
|
24589
24725
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
24590
24726
|
MonthPicker,
|
|
24591
24727
|
{
|
|
24592
|
-
label: "
|
|
24593
|
-
showLabel
|
|
24728
|
+
label: "Month",
|
|
24729
|
+
showLabel,
|
|
24594
24730
|
date: dateZdt,
|
|
24595
24731
|
onChange,
|
|
24596
24732
|
minDate: minDateZdt,
|
|
@@ -24617,8 +24753,8 @@ const TASKS_CHARTS_COLORS = {
|
|
|
24617
24753
|
done: "#3B9C63",
|
|
24618
24754
|
pending: "#DFA000"
|
|
24619
24755
|
};
|
|
24620
|
-
const SortArrows = (
|
|
24621
|
-
var
|
|
24756
|
+
const SortArrows = (_Wc) => {
|
|
24757
|
+
var _Xc = _Wc, { size = 13 } = _Xc, props = __objRest(_Xc, ["size"]);
|
|
24622
24758
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24623
24759
|
"svg",
|
|
24624
24760
|
__spreadProps(__spreadValues({
|
|
@@ -25044,8 +25180,8 @@ const DetailedChart = ({
|
|
|
25044
25180
|
] }) }) })
|
|
25045
25181
|
] });
|
|
25046
25182
|
};
|
|
25047
|
-
const HeaderCol = ({ className, children, style, noPadding = false }) => {
|
|
25048
|
-
const dataProperties = toDataProperties({ "no-padding": noPadding });
|
|
25183
|
+
const HeaderCol = ({ className, children, style, noPadding = false, fluid = false }) => {
|
|
25184
|
+
const dataProperties = toDataProperties({ "no-padding": noPadding, fluid });
|
|
25049
25185
|
return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({}, dataProperties), { className: classNames("Layer__header__col", className), style, children }));
|
|
25050
25186
|
};
|
|
25051
25187
|
const DetailReportBreadcrumb = ({
|
|
@@ -25149,11 +25285,11 @@ const LedgerAccountsContext = React.createContext({
|
|
|
25149
25285
|
fetchMore: () => {
|
|
25150
25286
|
}
|
|
25151
25287
|
});
|
|
25152
|
-
const CloseButton = (
|
|
25153
|
-
var
|
|
25288
|
+
const CloseButton = (_Yc) => {
|
|
25289
|
+
var _Zc = _Yc, {
|
|
25154
25290
|
className,
|
|
25155
25291
|
textOnly = false
|
|
25156
|
-
} =
|
|
25292
|
+
} = _Zc, props = __objRest(_Zc, [
|
|
25157
25293
|
"className",
|
|
25158
25294
|
"textOnly"
|
|
25159
25295
|
]);
|
|
@@ -26163,16 +26299,21 @@ const DateSelectionComboBox = () => {
|
|
|
26163
26299
|
const nextRange = rangeForPreset(nextPreset);
|
|
26164
26300
|
setDateRange(nextRange);
|
|
26165
26301
|
}, [setDateRange]);
|
|
26166
|
-
|
|
26167
|
-
|
|
26168
|
-
{
|
|
26169
|
-
|
|
26170
|
-
|
|
26171
|
-
|
|
26172
|
-
|
|
26173
|
-
|
|
26174
|
-
|
|
26175
|
-
|
|
26302
|
+
const inputId = React.useId();
|
|
26303
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { children: [
|
|
26304
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { pbe: "3xs", size: "sm", htmlFor: inputId, children: "Report period" }),
|
|
26305
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26306
|
+
ComboBox,
|
|
26307
|
+
{
|
|
26308
|
+
options: options$4,
|
|
26309
|
+
onSelectedValueChange,
|
|
26310
|
+
selectedValue: selectedOption,
|
|
26311
|
+
isSearchable: false,
|
|
26312
|
+
isClearable: false,
|
|
26313
|
+
inputId
|
|
26314
|
+
}
|
|
26315
|
+
)
|
|
26316
|
+
] });
|
|
26176
26317
|
};
|
|
26177
26318
|
const GlobalDateRangePicker = () => {
|
|
26178
26319
|
const { startDate: globalStartDate, endDate: globalEndDate } = useGlobalDateRange({ dateSelectionMode: "full" });
|
|
@@ -26213,29 +26354,29 @@ const GlobalDateRangePicker = () => {
|
|
|
26213
26354
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26214
26355
|
DatePicker,
|
|
26215
26356
|
{
|
|
26216
|
-
label: "Start
|
|
26217
|
-
showLabel: false,
|
|
26357
|
+
label: "Start date",
|
|
26218
26358
|
date: localStartDate,
|
|
26219
26359
|
onChange: onChangeStartDate,
|
|
26220
26360
|
minDate: minStartDate,
|
|
26221
26361
|
maxDate: maxStartDate,
|
|
26222
26362
|
isInvalid: startDateInvalid,
|
|
26223
26363
|
errorText: startDateErrorText,
|
|
26224
|
-
onBlur: onBlurStartDate
|
|
26364
|
+
onBlur: onBlurStartDate,
|
|
26365
|
+
slotProps: { Label: { size: "sm", pbe: "3xs" } }
|
|
26225
26366
|
}
|
|
26226
26367
|
),
|
|
26227
26368
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26228
26369
|
DatePicker,
|
|
26229
26370
|
{
|
|
26230
|
-
label: "End
|
|
26231
|
-
showLabel: false,
|
|
26371
|
+
label: "End date",
|
|
26232
26372
|
date: localEndDate,
|
|
26233
26373
|
onChange: onChangeEndDate,
|
|
26234
26374
|
minDate: minEndDate,
|
|
26235
26375
|
maxDate: maxEndDate,
|
|
26236
26376
|
isInvalid: endDateInvalid,
|
|
26237
26377
|
errorText: endDateErrorText,
|
|
26238
|
-
onBlur: onBlurEndDate
|
|
26378
|
+
onBlur: onBlurEndDate,
|
|
26379
|
+
slotProps: { Label: { size: "sm", pbe: "3xs" } }
|
|
26239
26380
|
}
|
|
26240
26381
|
)
|
|
26241
26382
|
] });
|
|
@@ -26257,7 +26398,7 @@ const DateRangeSelection = () => {
|
|
|
26257
26398
|
};
|
|
26258
26399
|
const CombinedDateRangeSelection = ({ mode }) => {
|
|
26259
26400
|
if (mode === "month") {
|
|
26260
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GlobalMonthPicker, {});
|
|
26401
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GlobalMonthPicker, { showLabel: true });
|
|
26261
26402
|
}
|
|
26262
26403
|
return /* @__PURE__ */ jsxRuntime.jsx(DateRangeSelection, {});
|
|
26263
26404
|
};
|
|
@@ -26522,17 +26663,22 @@ const DateGroupByComboBox = ({ value, onValueChange }) => {
|
|
|
26522
26663
|
const onSelectedValueChange = React.useCallback((option) => {
|
|
26523
26664
|
onValueChange((option == null ? void 0 : option.value) || null);
|
|
26524
26665
|
}, [onValueChange]);
|
|
26525
|
-
|
|
26526
|
-
|
|
26527
|
-
{
|
|
26528
|
-
|
|
26529
|
-
|
|
26530
|
-
|
|
26531
|
-
|
|
26532
|
-
|
|
26533
|
-
|
|
26534
|
-
|
|
26535
|
-
|
|
26666
|
+
const inputId = React.useId();
|
|
26667
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: "Layer__DateGroupByComboBox__Container", children: [
|
|
26668
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { pbe: "3xs", size: "sm", htmlFor: inputId, children: "Group by" }),
|
|
26669
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26670
|
+
ComboBox,
|
|
26671
|
+
{
|
|
26672
|
+
className: "Layer__DateGroupByComboBox",
|
|
26673
|
+
options: options$3,
|
|
26674
|
+
onSelectedValueChange,
|
|
26675
|
+
selectedValue: selectedOption,
|
|
26676
|
+
isSearchable: false,
|
|
26677
|
+
isClearable: false,
|
|
26678
|
+
inputId
|
|
26679
|
+
}
|
|
26680
|
+
)
|
|
26681
|
+
] });
|
|
26536
26682
|
};
|
|
26537
26683
|
const MultiSelect = ({
|
|
26538
26684
|
name,
|
|
@@ -26582,6 +26728,10 @@ const MultiSelect = ({
|
|
|
26582
26728
|
/* @__PURE__ */ jsxRuntime.jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", children: errorMessage })
|
|
26583
26729
|
] });
|
|
26584
26730
|
};
|
|
26731
|
+
const toSelectOption = (opt) => ({
|
|
26732
|
+
value: JSON.stringify(opt.tagFilterConfig),
|
|
26733
|
+
label: opt.displayName
|
|
26734
|
+
});
|
|
26585
26735
|
const selectStyles = {
|
|
26586
26736
|
valueContainer: (styles) => {
|
|
26587
26737
|
return __spreadProps(__spreadValues({}, styles), {
|
|
@@ -26589,49 +26739,43 @@ const selectStyles = {
|
|
|
26589
26739
|
});
|
|
26590
26740
|
}
|
|
26591
26741
|
};
|
|
26592
|
-
const
|
|
26742
|
+
const CompareTagsMultiSelect = () => {
|
|
26593
26743
|
const {
|
|
26594
|
-
setSelectedCompareOptions,
|
|
26595
26744
|
compareOptions,
|
|
26596
26745
|
selectedCompareOptions,
|
|
26746
|
+
setSelectedCompareOptions
|
|
26747
|
+
} = React.useContext(ProfitAndLossComparisonContext);
|
|
26748
|
+
const inputId = React.useId();
|
|
26749
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: "Layer__CompareTagsMultiSelect__Container", children: [
|
|
26750
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { pbe: "3xs", size: "sm", htmlFor: inputId, children: "Compare by" }),
|
|
26751
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26752
|
+
MultiSelect,
|
|
26753
|
+
{
|
|
26754
|
+
inputId,
|
|
26755
|
+
options: compareOptions.map(toSelectOption),
|
|
26756
|
+
onChange: setSelectedCompareOptions,
|
|
26757
|
+
defaultValue: selectedCompareOptions == null ? void 0 : selectedCompareOptions.map(toSelectOption),
|
|
26758
|
+
value: selectedCompareOptions.map(toSelectOption),
|
|
26759
|
+
placeholder: "Select tags",
|
|
26760
|
+
styles: selectStyles,
|
|
26761
|
+
className: "Layer__CompareTagsMultiSelect"
|
|
26762
|
+
}
|
|
26763
|
+
)
|
|
26764
|
+
] });
|
|
26765
|
+
};
|
|
26766
|
+
const ProfitAndLossCompareOptions = () => {
|
|
26767
|
+
const {
|
|
26597
26768
|
comparisonConfig,
|
|
26598
26769
|
comparisonPeriodMode,
|
|
26599
26770
|
setComparisonPeriodMode
|
|
26600
26771
|
} = React.useContext(ProfitAndLossComparisonContext);
|
|
26601
26772
|
const { dateSelectionMode } = React.useContext(ProfitAndLossContext);
|
|
26602
|
-
const tagComparisonSelectOptions = compareOptions.map(
|
|
26603
|
-
(tagComparisonOption) => {
|
|
26604
|
-
return {
|
|
26605
|
-
value: JSON.stringify(tagComparisonOption.tagFilterConfig),
|
|
26606
|
-
label: tagComparisonOption.displayName
|
|
26607
|
-
};
|
|
26608
|
-
}
|
|
26609
|
-
);
|
|
26610
26773
|
if (!comparisonConfig) {
|
|
26611
26774
|
return null;
|
|
26612
26775
|
}
|
|
26613
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(HStack, { align: "
|
|
26776
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(HStack, { align: "end", gap: "xs", children: [
|
|
26614
26777
|
dateSelectionMode === "full" && /* @__PURE__ */ jsxRuntime.jsx(DateGroupByComboBox, { value: comparisonPeriodMode, onValueChange: setComparisonPeriodMode }),
|
|
26615
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26616
|
-
MultiSelect,
|
|
26617
|
-
{
|
|
26618
|
-
options: tagComparisonSelectOptions,
|
|
26619
|
-
onChange: (values) => setSelectedCompareOptions(values),
|
|
26620
|
-
defaultValue: selectedCompareOptions == null ? void 0 : selectedCompareOptions.map((option) => ({
|
|
26621
|
-
value: JSON.stringify(option.tagFilterConfig),
|
|
26622
|
-
label: option.displayName
|
|
26623
|
-
})),
|
|
26624
|
-
value: selectedCompareOptions.map((tagComparisonOption) => {
|
|
26625
|
-
return {
|
|
26626
|
-
value: JSON.stringify(tagComparisonOption.tagFilterConfig),
|
|
26627
|
-
label: tagComparisonOption.displayName
|
|
26628
|
-
};
|
|
26629
|
-
}),
|
|
26630
|
-
placeholder: "Select views",
|
|
26631
|
-
styles: selectStyles,
|
|
26632
|
-
className: "Layer__ProfitAndLoss__TagMultiSelect"
|
|
26633
|
-
}
|
|
26634
|
-
)
|
|
26778
|
+
/* @__PURE__ */ jsxRuntime.jsx(CompareTagsMultiSelect, {})
|
|
26635
26779
|
] });
|
|
26636
26780
|
};
|
|
26637
26781
|
const defaultValue = {
|
|
@@ -27264,29 +27408,22 @@ const ProfitAndLossReport = ({
|
|
|
27264
27408
|
const header = React.useMemo(() => {
|
|
27265
27409
|
if (hideHeader) return null;
|
|
27266
27410
|
return /* @__PURE__ */ jsxRuntime.jsxs(Header, { children: [
|
|
27267
|
-
/* @__PURE__ */ jsxRuntime.
|
|
27268
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
27411
|
+
/* @__PURE__ */ jsxRuntime.jsx(HeaderRow, { children: /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { fluid: true, children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { pb: "sm", align: "end", fluid: true, gap: "xs", justify: "space-between", children: [
|
|
27412
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "xs", children: [
|
|
27269
27413
|
/* @__PURE__ */ jsxRuntime.jsx(CombinedDateRangeSelection, { mode: dateSelectionMode }),
|
|
27270
27414
|
view === "desktop" && useComparisonPnl && /* @__PURE__ */ jsxRuntime.jsx(ProfitAndLossCompareOptions, {})
|
|
27271
27415
|
] }),
|
|
27272
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27416
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27273
27417
|
ProfitAndLossDownloadButton,
|
|
27274
27418
|
{
|
|
27275
27419
|
stringOverrides: stringOverrides == null ? void 0 : stringOverrides.downloadButton,
|
|
27276
27420
|
moneyFormat: csvMoneyFormat
|
|
27277
27421
|
}
|
|
27278
|
-
)
|
|
27279
|
-
] }),
|
|
27280
|
-
view !== "desktop" && useComparisonPnl && /* @__PURE__ */ jsxRuntime.jsx(HeaderRow, { children: /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(ProfitAndLossCompareOptions, {}) }) })
|
|
27422
|
+
)
|
|
27423
|
+
] }) }) }),
|
|
27424
|
+
view !== "desktop" && useComparisonPnl && /* @__PURE__ */ jsxRuntime.jsx(HeaderRow, { children: /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { fluid: true, children: /* @__PURE__ */ jsxRuntime.jsx(HStack, { pb: "sm", fluid: true, children: /* @__PURE__ */ jsxRuntime.jsx(ProfitAndLossCompareOptions, {}) }) }) })
|
|
27281
27425
|
] });
|
|
27282
|
-
}, [
|
|
27283
|
-
csvMoneyFormat,
|
|
27284
|
-
dateSelectionMode,
|
|
27285
|
-
hideHeader,
|
|
27286
|
-
stringOverrides == null ? void 0 : stringOverrides.downloadButton,
|
|
27287
|
-
useComparisonPnl,
|
|
27288
|
-
view
|
|
27289
|
-
]);
|
|
27426
|
+
}, [csvMoneyFormat, dateSelectionMode, hideHeader, stringOverrides == null ? void 0 : stringOverrides.downloadButton, useComparisonPnl, view]);
|
|
27290
27427
|
return /* @__PURE__ */ jsxRuntime.jsx(InAppLinkProvider, { renderInAppLink, children: /* @__PURE__ */ jsxRuntime.jsx(View, { type: "panel", header, children: selectedLineItem ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
27291
27428
|
ProfitAndLossDetailReport,
|
|
27292
27429
|
{
|
|
@@ -27697,10 +27834,10 @@ function Internal_ProfitAndLossSummaries({
|
|
|
27697
27834
|
unstable_AdditionalListItems.map((item, index2) => /* @__PURE__ */ jsxRuntime.jsx(ProfitAndLossSummariesListItem, { children: item }, index2))
|
|
27698
27835
|
] }) });
|
|
27699
27836
|
}
|
|
27700
|
-
function ProfitAndLossSummaries(
|
|
27701
|
-
var
|
|
27837
|
+
function ProfitAndLossSummaries(__c) {
|
|
27838
|
+
var _$c = __c, {
|
|
27702
27839
|
onTransactionsToReviewClick
|
|
27703
|
-
} =
|
|
27840
|
+
} = _$c, restProps = __objRest(_$c, [
|
|
27704
27841
|
"onTransactionsToReviewClick"
|
|
27705
27842
|
]);
|
|
27706
27843
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -27899,8 +28036,8 @@ function BalanceSheetDownloadButton({
|
|
|
27899
28036
|
/* @__PURE__ */ jsxRuntime.jsx(InvisibleDownload, { ref: invisibleDownloadRef })
|
|
27900
28037
|
] });
|
|
27901
28038
|
}
|
|
27902
|
-
const Collapse = (
|
|
27903
|
-
var props = __objRest(
|
|
28039
|
+
const Collapse = (_ad) => {
|
|
28040
|
+
var props = __objRest(_ad, []);
|
|
27904
28041
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
27905
28042
|
"svg",
|
|
27906
28043
|
__spreadProps(__spreadValues({
|
|
@@ -27933,8 +28070,8 @@ const Collapse = (_Wc) => {
|
|
|
27933
28070
|
})
|
|
27934
28071
|
);
|
|
27935
28072
|
};
|
|
27936
|
-
const Expand = (
|
|
27937
|
-
var props = __objRest(
|
|
28073
|
+
const Expand = (_bd) => {
|
|
28074
|
+
var props = __objRest(_bd, []);
|
|
27938
28075
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
27939
28076
|
"svg",
|
|
27940
28077
|
__spreadProps(__spreadValues({
|
|
@@ -27978,7 +28115,7 @@ const ExpandCollapseButton = ({
|
|
|
27978
28115
|
Button$1,
|
|
27979
28116
|
{
|
|
27980
28117
|
onClick: () => onClick(!expanded),
|
|
27981
|
-
variant: variant ? variant :
|
|
28118
|
+
variant: variant ? variant : ButtonVariant.secondary,
|
|
27982
28119
|
className: classNames(
|
|
27983
28120
|
iconOnly ? "Layer__expand-collpase-all-rows-btn--sm" : "Layer__expand-collpase-all-rows-btn",
|
|
27984
28121
|
className
|
|
@@ -28100,15 +28237,15 @@ const GlobalDatePicker = () => {
|
|
|
28100
28237
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
28101
28238
|
DatePicker,
|
|
28102
28239
|
{
|
|
28103
|
-
label: "Effective
|
|
28104
|
-
showLabel: false,
|
|
28240
|
+
label: "Effective date",
|
|
28105
28241
|
date: localDate,
|
|
28106
28242
|
onChange,
|
|
28107
28243
|
minDate: minDateZdt,
|
|
28108
28244
|
maxDate: maxDateZdt,
|
|
28109
28245
|
isInvalid,
|
|
28110
28246
|
errorText,
|
|
28111
|
-
onBlur
|
|
28247
|
+
onBlur,
|
|
28248
|
+
slotProps: { Label: { size: "sm", pbe: "3xs" } }
|
|
28112
28249
|
}
|
|
28113
28250
|
);
|
|
28114
28251
|
};
|
|
@@ -28129,7 +28266,7 @@ const DateSelection = () => {
|
|
|
28129
28266
|
};
|
|
28130
28267
|
const CombinedDateSelection = ({ mode }) => {
|
|
28131
28268
|
if (mode === "month") {
|
|
28132
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GlobalMonthPicker, {});
|
|
28269
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GlobalMonthPicker, { showLabel: true });
|
|
28133
28270
|
}
|
|
28134
28271
|
return /* @__PURE__ */ jsxRuntime.jsx(DateSelection, {});
|
|
28135
28272
|
};
|
|
@@ -28158,10 +28295,10 @@ const BalanceSheetView = ({
|
|
|
28158
28295
|
{
|
|
28159
28296
|
type: "panel",
|
|
28160
28297
|
ref: containerRef,
|
|
28161
|
-
header: /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.
|
|
28162
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28163
|
-
withExpandAllButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
28164
|
-
] }) }),
|
|
28298
|
+
header: /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.jsx(HeaderRow, { children: /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { fluid: true, children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { pb: "sm", align: "end", gap: "xs", justify: "space-between", fluid: true, children: [
|
|
28299
|
+
/* @__PURE__ */ jsxRuntime.jsx(CombinedDateSelection, { mode: dateSelectionMode }),
|
|
28300
|
+
withExpandAllButton && /* @__PURE__ */ jsxRuntime.jsx(BalanceSheetExpandAllButton, { view })
|
|
28301
|
+
] }) }) }) }),
|
|
28165
28302
|
children: !data || isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `Layer__${COMPONENT_NAME$9}__loader-container`, children: /* @__PURE__ */ jsxRuntime.jsx(Loader, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
28166
28303
|
BalanceSheetTable,
|
|
28167
28304
|
{
|
|
@@ -28178,9 +28315,9 @@ const BalanceSheetView = ({
|
|
|
28178
28315
|
{
|
|
28179
28316
|
type: "panel",
|
|
28180
28317
|
ref: containerRef,
|
|
28181
|
-
header: /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.
|
|
28182
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28183
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
28318
|
+
header: /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.jsx(HeaderRow, { children: /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { fluid: true, children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { pb: "sm", align: "end", gap: "xs", justify: "space-between", fluid: true, children: [
|
|
28319
|
+
/* @__PURE__ */ jsxRuntime.jsx(CombinedDateSelection, { mode: dateSelectionMode }),
|
|
28320
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "xs", children: [
|
|
28184
28321
|
withExpandAllButton && /* @__PURE__ */ jsxRuntime.jsx(BalanceSheetExpandAllButton, { view }),
|
|
28185
28322
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28186
28323
|
BalanceSheetDownloadButton,
|
|
@@ -28190,7 +28327,7 @@ const BalanceSheetView = ({
|
|
|
28190
28327
|
}
|
|
28191
28328
|
)
|
|
28192
28329
|
] })
|
|
28193
|
-
] }) }),
|
|
28330
|
+
] }) }) }) }),
|
|
28194
28331
|
children: !data || isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `Layer__${COMPONENT_NAME$9}__loader-container`, children: /* @__PURE__ */ jsxRuntime.jsx(Loader, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
28195
28332
|
BalanceSheetTable,
|
|
28196
28333
|
{
|
|
@@ -28472,17 +28609,17 @@ const StatementOfCashFlowView = ({
|
|
|
28472
28609
|
{
|
|
28473
28610
|
type: "panel",
|
|
28474
28611
|
ref: containerRef,
|
|
28475
|
-
header: /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.
|
|
28476
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28477
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28612
|
+
header: /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.jsx(HeaderRow, { children: /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { fluid: true, children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { pb: "sm", align: "end", fluid: true, gap: "xs", justify: "space-between", children: [
|
|
28613
|
+
/* @__PURE__ */ jsxRuntime.jsx(CombinedDateRangeSelection, { mode: dateSelectionMode }),
|
|
28614
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28478
28615
|
CashflowStatementDownloadButton,
|
|
28479
28616
|
{
|
|
28480
28617
|
startDate: dateRange.startDate,
|
|
28481
28618
|
endDate: dateRange.endDate,
|
|
28482
28619
|
iconOnly: view === "mobile"
|
|
28483
28620
|
}
|
|
28484
|
-
)
|
|
28485
|
-
] }) }),
|
|
28621
|
+
)
|
|
28622
|
+
] }) }) }) }),
|
|
28486
28623
|
children: !data || isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `Layer__${COMPONENT_NAME$8}__loader-container`, children: /* @__PURE__ */ jsxRuntime.jsx(Loader, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
28487
28624
|
StatementOfCashFlowTable,
|
|
28488
28625
|
{
|
|
@@ -29622,8 +29759,8 @@ const ChartOfAccountsContext = React.createContext(
|
|
|
29622
29759
|
}
|
|
29623
29760
|
}
|
|
29624
29761
|
);
|
|
29625
|
-
const Plus = (
|
|
29626
|
-
var
|
|
29762
|
+
const Plus = (_cd) => {
|
|
29763
|
+
var _dd = _cd, { size = 14 } = _dd, props = __objRest(_dd, ["size"]);
|
|
29627
29764
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
29628
29765
|
"svg",
|
|
29629
29766
|
__spreadProps(__spreadValues({
|
|
@@ -29994,8 +30131,8 @@ var LedgerAccountNodeType = /* @__PURE__ */ ((LedgerAccountNodeType2) => {
|
|
|
29994
30131
|
LedgerAccountNodeType2["Parent"] = "Parent";
|
|
29995
30132
|
return LedgerAccountNodeType2;
|
|
29996
30133
|
})(LedgerAccountNodeType || {});
|
|
29997
|
-
const Edit2 = (
|
|
29998
|
-
var
|
|
30134
|
+
const Edit2 = (_ed) => {
|
|
30135
|
+
var _fd = _ed, { size = 18 } = _fd, props = __objRest(_fd, ["size"]);
|
|
29999
30136
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30000
30137
|
"svg",
|
|
30001
30138
|
__spreadProps(__spreadValues({
|
|
@@ -32626,8 +32763,8 @@ const TasksHeader = ({
|
|
|
32626
32763
|
}) => {
|
|
32627
32764
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "Layer__tasks-header", children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: TextSize.lg, children: tasksHeader }) });
|
|
32628
32765
|
};
|
|
32629
|
-
const SmileIcon = (
|
|
32630
|
-
var
|
|
32766
|
+
const SmileIcon = (_gd) => {
|
|
32767
|
+
var _hd = _gd, { size = 12 } = _hd, props = __objRest(_hd, ["size"]);
|
|
32631
32768
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32632
32769
|
"svg",
|
|
32633
32770
|
__spreadProps(__spreadValues({
|
|
@@ -33472,8 +33609,8 @@ const useBookkeepingYearsStatus = () => {
|
|
|
33472
33609
|
isLoading
|
|
33473
33610
|
};
|
|
33474
33611
|
};
|
|
33475
|
-
const ArrowRightCircle = (
|
|
33476
|
-
var
|
|
33612
|
+
const ArrowRightCircle = (_id) => {
|
|
33613
|
+
var _jd = _id, { size = 18 } = _jd, props = __objRest(_jd, ["size"]);
|
|
33477
33614
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33478
33615
|
"svg",
|
|
33479
33616
|
__spreadProps(__spreadValues({
|
|
@@ -35521,12 +35658,12 @@ const FormSection = ({ children, title }) => {
|
|
|
35521
35658
|
children
|
|
35522
35659
|
] });
|
|
35523
35660
|
};
|
|
35524
|
-
const PhoneInput = (
|
|
35525
|
-
var
|
|
35661
|
+
const PhoneInput = (_kd) => {
|
|
35662
|
+
var _ld = _kd, {
|
|
35526
35663
|
value,
|
|
35527
35664
|
onChange,
|
|
35528
35665
|
placeholder = "Phone number"
|
|
35529
|
-
} =
|
|
35666
|
+
} = _ld, props = __objRest(_ld, [
|
|
35530
35667
|
"value",
|
|
35531
35668
|
"onChange",
|
|
35532
35669
|
"placeholder"
|
|
@@ -35818,8 +35955,8 @@ const SummaryStep = ({ onNext, title = defaultTitle$1, description = defaultDesc
|
|
|
35818
35955
|
/* @__PURE__ */ jsxRuntime.jsx(Button$1, { onClick: onNext, children: nextBtnText })
|
|
35819
35956
|
] });
|
|
35820
35957
|
};
|
|
35821
|
-
const Document = (
|
|
35822
|
-
var
|
|
35958
|
+
const Document = (_md) => {
|
|
35959
|
+
var _nd = _md, { size = 20 } = _nd, props = __objRest(_nd, ["size"]);
|
|
35823
35960
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
35824
35961
|
"svg",
|
|
35825
35962
|
__spreadProps(__spreadValues({
|
|
@@ -35924,8 +36061,8 @@ const Document = (_gd) => {
|
|
|
35924
36061
|
})
|
|
35925
36062
|
);
|
|
35926
36063
|
};
|
|
35927
|
-
const TrendingUp = (
|
|
35928
|
-
var
|
|
36064
|
+
const TrendingUp = (_od) => {
|
|
36065
|
+
var _pd = _od, { size = 20 } = _pd, props = __objRest(_pd, ["size"]);
|
|
35929
36066
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
35930
36067
|
"svg",
|
|
35931
36068
|
__spreadProps(__spreadValues({
|
|
@@ -36182,8 +36319,8 @@ const PlatformOnboarding = ({ onComplete }) => {
|
|
|
36182
36319
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "Layer__platform-onboarding-layout__footer", children: renderStepFooter() })
|
|
36183
36320
|
] }) });
|
|
36184
36321
|
};
|
|
36185
|
-
const CoffeeIcon = (
|
|
36186
|
-
var
|
|
36322
|
+
const CoffeeIcon = (_qd) => {
|
|
36323
|
+
var _rd = _qd, { size = 11 } = _rd, props = __objRest(_rd, ["size"]);
|
|
36187
36324
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
36188
36325
|
"svg",
|
|
36189
36326
|
__spreadProps(__spreadValues({
|
|
@@ -36254,8 +36391,8 @@ const CoffeeIcon = (_kd) => {
|
|
|
36254
36391
|
})
|
|
36255
36392
|
);
|
|
36256
36393
|
};
|
|
36257
|
-
const Link = (
|
|
36258
|
-
var
|
|
36394
|
+
const Link = (_sd) => {
|
|
36395
|
+
var _td = _sd, {
|
|
36259
36396
|
className,
|
|
36260
36397
|
children,
|
|
36261
36398
|
variant = ButtonVariant.primary,
|
|
@@ -36265,7 +36402,7 @@ const Link = (_md) => {
|
|
|
36265
36402
|
iconAsPrimary = false,
|
|
36266
36403
|
justify = "center",
|
|
36267
36404
|
fullWidth
|
|
36268
|
-
} =
|
|
36405
|
+
} = _td, props = __objRest(_td, [
|
|
36269
36406
|
"className",
|
|
36270
36407
|
"children",
|
|
36271
36408
|
"variant",
|
|
@@ -36357,8 +36494,8 @@ const BookkeepingUpsellBar = ({
|
|
|
36357
36494
|
onClick ? /* @__PURE__ */ jsxRuntime.jsx(Button$1, { variant: ButtonVariant.secondary, onClick, children: "Schedule a demo" }) : href ? /* @__PURE__ */ jsxRuntime.jsx(Link, { href, target: "_blank", variant: ButtonVariant.secondary, children: "Schedule a demo" }) : null
|
|
36358
36495
|
] });
|
|
36359
36496
|
};
|
|
36360
|
-
const ChevronRightFill = (
|
|
36361
|
-
var
|
|
36497
|
+
const ChevronRightFill = (_ud) => {
|
|
36498
|
+
var _vd = _ud, { size = 18 } = _vd, props = __objRest(_vd, ["size"]);
|
|
36362
36499
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
36363
36500
|
"svg",
|
|
36364
36501
|
__spreadProps(__spreadValues({
|
|
@@ -36654,7 +36791,11 @@ const InvoiceSchema = effect.Schema.Struct({
|
|
|
36654
36791
|
effect.Schema.propertySignature(effect.Schema.NullOr(effect.Schema.Date)),
|
|
36655
36792
|
effect.Schema.fromKey("updated_at")
|
|
36656
36793
|
),
|
|
36657
|
-
memo: effect.Schema.NullOr(effect.Schema.String)
|
|
36794
|
+
memo: effect.Schema.NullOr(effect.Schema.String),
|
|
36795
|
+
customPaymentInstructions: effect.pipe(
|
|
36796
|
+
effect.Schema.propertySignature(effect.Schema.NullOr(effect.Schema.String)),
|
|
36797
|
+
effect.Schema.fromKey("custom_payment_instructions")
|
|
36798
|
+
)
|
|
36658
36799
|
});
|
|
36659
36800
|
const UpsertInvoiceTaxLineItemSchema = effect.Schema.Struct({
|
|
36660
36801
|
amount: effect.Schema.Number
|
|
@@ -36691,6 +36832,9 @@ const UpsertInvoiceSchema = effect.Schema.Struct({
|
|
|
36691
36832
|
effect.Schema.fromKey("customer_id")
|
|
36692
36833
|
),
|
|
36693
36834
|
memo: effect.Schema.optional(effect.Schema.String),
|
|
36835
|
+
customPaymentInstructions: effect.Schema.optional(effect.Schema.String).pipe(
|
|
36836
|
+
effect.Schema.fromKey("custom_payment_instructions")
|
|
36837
|
+
),
|
|
36694
36838
|
lineItems: effect.pipe(
|
|
36695
36839
|
effect.Schema.propertySignature(effect.Schema.Array(UpsertInvoiceLineItemSchema)),
|
|
36696
36840
|
effect.Schema.fromKey("line_items")
|
|
@@ -36701,12 +36845,10 @@ const UpsertInvoiceSchema = effect.Schema.Struct({
|
|
|
36701
36845
|
});
|
|
36702
36846
|
const InvoiceFormLineItemSchema = effect.Schema.Struct({
|
|
36703
36847
|
description: effect.Schema.String,
|
|
36704
|
-
unitPrice:
|
|
36705
|
-
quantity:
|
|
36706
|
-
amount:
|
|
36707
|
-
isTaxable: effect.Schema.Boolean
|
|
36708
|
-
accountIdentifier: effect.Schema.NullOr(AccountIdentifierSchema),
|
|
36709
|
-
tags: effect.Schema.Array(TagSchema)
|
|
36848
|
+
unitPrice: NonRecursiveBigDecimalSchema,
|
|
36849
|
+
quantity: NonRecursiveBigDecimalSchema,
|
|
36850
|
+
amount: NonRecursiveBigDecimalSchema,
|
|
36851
|
+
isTaxable: effect.Schema.Boolean
|
|
36710
36852
|
});
|
|
36711
36853
|
const InvoiceFormLineItemEquivalence = effect.Schema.equivalence(InvoiceFormLineItemSchema);
|
|
36712
36854
|
const InvoiceTermsValuesSchema = effect.Schema.Enums(InvoiceTermsValues);
|
|
@@ -37202,7 +37344,7 @@ const InvoiceTable = () => {
|
|
|
37202
37344
|
};
|
|
37203
37345
|
}, [fetchMore, hasMore]);
|
|
37204
37346
|
const options2 = React.useMemo(() => Object.values(InvoiceStatusOptionConfig), []);
|
|
37205
|
-
const
|
|
37347
|
+
const SingleValue = React.useCallback(() => {
|
|
37206
37348
|
const label = selectedInvoiceStatusOption.label;
|
|
37207
37349
|
return label ? `Status: ${label}` : "Status";
|
|
37208
37350
|
}, [selectedInvoiceStatusOption.label]);
|
|
@@ -37217,11 +37359,11 @@ const InvoiceTable = () => {
|
|
|
37217
37359
|
isSearchable: false,
|
|
37218
37360
|
isClearable: false,
|
|
37219
37361
|
placeholder: "Status",
|
|
37220
|
-
slots: {
|
|
37362
|
+
slots: { SingleValue },
|
|
37221
37363
|
"aria-label": "Status Filter"
|
|
37222
37364
|
}
|
|
37223
37365
|
),
|
|
37224
|
-
[
|
|
37366
|
+
[SingleValue, options2, selectedInvoiceStatusOption, setTableFilters]
|
|
37225
37367
|
);
|
|
37226
37368
|
const CreateInvoiceButton = React.useCallback(
|
|
37227
37369
|
() => /* @__PURE__ */ jsxRuntime.jsxs(Button, { onPress: toCreateInvoice, children: [
|
|
@@ -39199,8 +39341,8 @@ const useCustomerForm = (props) => {
|
|
|
39199
39341
|
}, [form, formDefaults]);
|
|
39200
39342
|
return React.useMemo(() => ({ form, submitError }), [form, submitError]);
|
|
39201
39343
|
};
|
|
39202
|
-
const CustomerForm = (
|
|
39203
|
-
var
|
|
39344
|
+
const CustomerForm = (_wd) => {
|
|
39345
|
+
var _xd = _wd, { onSuccess, isReadOnly } = _xd, formState = __objRest(_xd, ["onSuccess", "isReadOnly"]);
|
|
39204
39346
|
const { form, submitError } = useCustomerForm(__spreadValues({ onSuccess }, formState));
|
|
39205
39347
|
const blockNativeOnSubmit = React.useCallback((e) => {
|
|
39206
39348
|
e.preventDefault();
|
|
@@ -39302,7 +39444,8 @@ const CustomerFormDrawer = (props) => {
|
|
|
39302
39444
|
}
|
|
39303
39445
|
);
|
|
39304
39446
|
};
|
|
39305
|
-
const InvoiceFormErrorBanner = ({
|
|
39447
|
+
const InvoiceFormErrorBanner = ({ submitError }) => {
|
|
39448
|
+
const form = useFormContext();
|
|
39306
39449
|
return /* @__PURE__ */ jsxRuntime.jsx(form.Subscribe, { selector: (state) => state.errorMap, children: (errorMap) => {
|
|
39307
39450
|
const validationErrors = flattenValidationErrors(errorMap);
|
|
39308
39451
|
if (validationErrors.length > 0 || submitError) {
|
|
@@ -39320,9 +39463,9 @@ const InvoiceFormErrorBanner = ({ form, submitError }) => {
|
|
|
39320
39463
|
} });
|
|
39321
39464
|
};
|
|
39322
39465
|
function computeSubtotal(lineItems) {
|
|
39323
|
-
return lineItems.reduce((sum, item) => effect.BigDecimal.sum(sum, item.amount), BIG_DECIMAL_ZERO);
|
|
39466
|
+
return lineItems.reduce((sum, item) => effect.BigDecimal.sum(sum, fromNonRecursiveBigDecimal(item.amount)), BIG_DECIMAL_ZERO);
|
|
39324
39467
|
}
|
|
39325
|
-
const computeRawTaxableSubtotal = (lineItems) => lineItems.filter((item) => item.isTaxable).reduce((sum, item) => effect.BigDecimal.sum(sum, item.amount), BIG_DECIMAL_ZERO);
|
|
39468
|
+
const computeRawTaxableSubtotal = (lineItems) => lineItems.filter((item) => item.isTaxable).reduce((sum, item) => effect.BigDecimal.sum(sum, fromNonRecursiveBigDecimal(item.amount)), BIG_DECIMAL_ZERO);
|
|
39326
39469
|
function computeAdditionalDiscount({
|
|
39327
39470
|
subtotal,
|
|
39328
39471
|
discountRate
|
|
@@ -39366,15 +39509,22 @@ const getGrandTotalFromInvoice = (invoice) => {
|
|
|
39366
39509
|
const grandTotal = computeGrandTotal({ subtotal, additionalDiscount, taxes });
|
|
39367
39510
|
return grandTotal;
|
|
39368
39511
|
};
|
|
39369
|
-
const INVOICE_MECE_TAG_DIMENSION = "Job";
|
|
39370
39512
|
const EMPTY_LINE_ITEM = {
|
|
39371
39513
|
description: "",
|
|
39372
|
-
unitPrice:
|
|
39373
|
-
quantity:
|
|
39374
|
-
amount:
|
|
39375
|
-
isTaxable: false
|
|
39376
|
-
|
|
39377
|
-
|
|
39514
|
+
unitPrice: NRBD_ZERO,
|
|
39515
|
+
quantity: NRBD_ONE,
|
|
39516
|
+
amount: NRBD_ZERO,
|
|
39517
|
+
isTaxable: false
|
|
39518
|
+
};
|
|
39519
|
+
const computeLineItemAmount = (unitPrice, quantity) => {
|
|
39520
|
+
const bdUnitPrice = fromNonRecursiveBigDecimal(unitPrice);
|
|
39521
|
+
const bdQuantity = fromNonRecursiveBigDecimal(quantity);
|
|
39522
|
+
return toNonRecursiveBigDecimal(effect.BigDecimal.round(effect.BigDecimal.normalize(effect.BigDecimal.multiply(bdUnitPrice, bdQuantity)), { scale: 2 }));
|
|
39523
|
+
};
|
|
39524
|
+
const computeLineItemUnitPrice = (amount, quantity) => {
|
|
39525
|
+
const bdAmount = fromNonRecursiveBigDecimal(amount);
|
|
39526
|
+
const bdQuantity = fromNonRecursiveBigDecimal(quantity);
|
|
39527
|
+
return toNonRecursiveBigDecimal(effect.BigDecimal.round(effect.BigDecimal.normalize(safeDivide(bdAmount, bdQuantity)), { scale: 2 }));
|
|
39378
39528
|
};
|
|
39379
39529
|
const getEmptyInvoiceFormValues = () => {
|
|
39380
39530
|
const sentAt = date.fromDate(dateFns.startOfToday(), date.getLocalTimeZone());
|
|
@@ -39393,13 +39543,6 @@ const getEmptyInvoiceFormValues = () => {
|
|
|
39393
39543
|
taxRate: BIG_DECIMAL_ZERO
|
|
39394
39544
|
};
|
|
39395
39545
|
};
|
|
39396
|
-
const getAdditionalTags = (tags) => {
|
|
39397
|
-
return tags.filter((obj) => obj.key.toLowerCase() !== INVOICE_MECE_TAG_DIMENSION.toLowerCase());
|
|
39398
|
-
};
|
|
39399
|
-
const getSelectedTag = (tags) => {
|
|
39400
|
-
var _a;
|
|
39401
|
-
return (_a = tags.find((obj) => obj.key.toLowerCase() === INVOICE_MECE_TAG_DIMENSION.toLowerCase())) != null ? _a : null;
|
|
39402
|
-
};
|
|
39403
39546
|
const getInvoiceLineItemAmount = (lineItem) => {
|
|
39404
39547
|
const { unitPrice, quantity } = lineItem;
|
|
39405
39548
|
return effect.BigDecimal.multiply(quantity, convertCentsToBigDecimal(unitPrice));
|
|
@@ -39408,12 +39551,10 @@ const getInvoiceFormLineItem = (lineItem) => {
|
|
|
39408
39551
|
const { description, unitPrice, quantity } = lineItem;
|
|
39409
39552
|
return {
|
|
39410
39553
|
description: description || "",
|
|
39411
|
-
quantity:
|
|
39412
|
-
unitPrice: convertCentsToBigDecimal(unitPrice),
|
|
39413
|
-
amount: getInvoiceLineItemAmount(lineItem),
|
|
39414
|
-
isTaxable: lineItem.salesTaxTotal > 0
|
|
39415
|
-
accountIdentifier: lineItem.accountIdentifier,
|
|
39416
|
-
tags: lineItem.transactionTags.map(makeTagFromTransactionTag)
|
|
39554
|
+
quantity: toNonRecursiveBigDecimal(quantity),
|
|
39555
|
+
unitPrice: toNonRecursiveBigDecimal(convertCentsToBigDecimal(unitPrice)),
|
|
39556
|
+
amount: toNonRecursiveBigDecimal(getInvoiceLineItemAmount(lineItem)),
|
|
39557
|
+
isTaxable: lineItem.salesTaxTotal > 0
|
|
39417
39558
|
};
|
|
39418
39559
|
};
|
|
39419
39560
|
const getInvoiceFormInitialValues = (invoice) => {
|
|
@@ -39471,14 +39612,6 @@ const validateInvoiceForm = ({ value: invoice }) => {
|
|
|
39471
39612
|
errors.push({ lineItems: "Invoice requires at least one non-empty line item." });
|
|
39472
39613
|
}
|
|
39473
39614
|
nonEmptyLineItems.some((item) => {
|
|
39474
|
-
if (item.accountIdentifier === null) {
|
|
39475
|
-
errors.push({ lineItems: "Invoice has incomplete line items. Please include required field: Revenue account." });
|
|
39476
|
-
return true;
|
|
39477
|
-
}
|
|
39478
|
-
if (getSelectedTag(item.tags) === null) {
|
|
39479
|
-
errors.push({ lineItems: `Invoice has incomplete line items. Please include required field: ${INVOICE_MECE_TAG_DIMENSION}.` });
|
|
39480
|
-
return true;
|
|
39481
|
-
}
|
|
39482
39615
|
if (item.description.trim() === "") {
|
|
39483
39616
|
errors.push({ lineItems: "Invoice has incomplete line items. Please include required field: Description." });
|
|
39484
39617
|
return true;
|
|
@@ -39499,14 +39632,14 @@ const convertInvoiceFormToParams = (form) => {
|
|
|
39499
39632
|
invoiceNumber: form.invoiceNumber.trim(),
|
|
39500
39633
|
memo: form.memo.trim(),
|
|
39501
39634
|
lineItems: form.lineItems.filter((item) => !InvoiceFormLineItemEquivalence(EMPTY_LINE_ITEM, item)).map((item) => {
|
|
39502
|
-
const baseLineItem =
|
|
39635
|
+
const baseLineItem = {
|
|
39503
39636
|
description: item.description.trim(),
|
|
39504
|
-
unitPrice: convertBigDecimalToCents(item.unitPrice),
|
|
39505
|
-
quantity: item.quantity
|
|
39506
|
-
|
|
39507
|
-
}, item.accountIdentifier && { accountIdentifier: item.accountIdentifier });
|
|
39637
|
+
unitPrice: convertBigDecimalToCents(fromNonRecursiveBigDecimal(item.unitPrice)),
|
|
39638
|
+
quantity: fromNonRecursiveBigDecimal(item.quantity)
|
|
39639
|
+
};
|
|
39508
39640
|
if (!item.isTaxable || effect.BigDecimal.equals(form.taxRate, BIG_DECIMAL_ZERO)) return baseLineItem;
|
|
39509
|
-
const
|
|
39641
|
+
const itemAmount = fromNonRecursiveBigDecimal(item.amount);
|
|
39642
|
+
const itemTaxableSubtotal = computeTaxableSubtotal({ rawTaxableSubtotal: itemAmount, discountRate: form.discountRate });
|
|
39510
39643
|
const itemTaxes = computeTaxes({ taxableSubtotal: itemTaxableSubtotal, taxRate: form.taxRate });
|
|
39511
39644
|
return __spreadProps(__spreadValues({}, baseLineItem), { salesTaxes: [{ amount: convertBigDecimalToCents(itemTaxes) }] });
|
|
39512
39645
|
})
|
|
@@ -39517,50 +39650,13 @@ const convertInvoiceFormToParams = (form) => {
|
|
|
39517
39650
|
});
|
|
39518
39651
|
};
|
|
39519
39652
|
const InvoiceFormLineItemRow = ({ form, index: index2, isReadOnly, onDeleteLine }) => {
|
|
39520
|
-
return /* @__PURE__ */ jsxRuntime.jsx(VStack, {
|
|
39653
|
+
return /* @__PURE__ */ jsxRuntime.jsx(VStack, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
39521
39654
|
HStack,
|
|
39522
39655
|
{
|
|
39523
39656
|
gap: "xs",
|
|
39524
39657
|
align: "end",
|
|
39525
39658
|
className: classNames("Layer__InvoiceForm__LineItem", isReadOnly && "Layer__InvoiceForm__LineItem--readonly"),
|
|
39526
39659
|
children: [
|
|
39527
|
-
/* @__PURE__ */ jsxRuntime.jsx(form.Field, { name: `lineItems[${index2}].accountIdentifier`, children: (field) => {
|
|
39528
|
-
const onValueChange = (value) => {
|
|
39529
|
-
if (value && !isClassificationAccountIdentifier(value)) {
|
|
39530
|
-
return;
|
|
39531
|
-
}
|
|
39532
|
-
field.setValue(value);
|
|
39533
|
-
};
|
|
39534
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
39535
|
-
LedgerAccountCombobox,
|
|
39536
|
-
{
|
|
39537
|
-
label: "Revenue account (hidden)",
|
|
39538
|
-
value: field.state.value,
|
|
39539
|
-
mode: CategoriesListMode.Revenue,
|
|
39540
|
-
onValueChange,
|
|
39541
|
-
isReadOnly,
|
|
39542
|
-
showLabel: index2 === 0
|
|
39543
|
-
}
|
|
39544
|
-
);
|
|
39545
|
-
} }),
|
|
39546
|
-
/* @__PURE__ */ jsxRuntime.jsx(form.Field, { name: `lineItems[${index2}].tags`, children: (field) => {
|
|
39547
|
-
const additionalTags = getAdditionalTags(field.state.value);
|
|
39548
|
-
const selectedTag = getSelectedTag(field.state.value);
|
|
39549
|
-
const onValueChange = (value) => {
|
|
39550
|
-
field.setValue(value ? [...additionalTags, value] : additionalTags);
|
|
39551
|
-
};
|
|
39552
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
39553
|
-
TagDimensionCombobox,
|
|
39554
|
-
{
|
|
39555
|
-
dimensionKey: INVOICE_MECE_TAG_DIMENSION,
|
|
39556
|
-
isReadOnly,
|
|
39557
|
-
value: selectedTag,
|
|
39558
|
-
onValueChange,
|
|
39559
|
-
showLabel: index2 === 0,
|
|
39560
|
-
isClearable: false
|
|
39561
|
-
}
|
|
39562
|
-
);
|
|
39563
|
-
} }),
|
|
39564
39660
|
/* @__PURE__ */ jsxRuntime.jsx(form.AppField, { name: `lineItems[${index2}].description`, children: (field) => /* @__PURE__ */ jsxRuntime.jsx(field.FormTextField, { label: "Description", showLabel: index2 === 0, isReadOnly }) }),
|
|
39565
39661
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
39566
39662
|
form.AppField,
|
|
@@ -39570,13 +39666,13 @@ const InvoiceFormLineItemRow = ({ form, index: index2, isReadOnly, onDeleteLine
|
|
|
39570
39666
|
onBlur: ({ value: quantity }) => {
|
|
39571
39667
|
const amount = form.getFieldValue(`lineItems[${index2}].amount`);
|
|
39572
39668
|
const unitPrice = form.getFieldValue(`lineItems[${index2}].unitPrice`);
|
|
39573
|
-
const nextAmount =
|
|
39574
|
-
if (!
|
|
39575
|
-
form.setFieldValue(`lineItems[${index2}].amount`,
|
|
39669
|
+
const nextAmount = computeLineItemAmount(unitPrice, quantity);
|
|
39670
|
+
if (!nrbdEquals(amount, nextAmount)) {
|
|
39671
|
+
form.setFieldValue(`lineItems[${index2}].amount`, nextAmount);
|
|
39576
39672
|
}
|
|
39577
39673
|
}
|
|
39578
39674
|
},
|
|
39579
|
-
children: (field) => /* @__PURE__ */ jsxRuntime.jsx(field.
|
|
39675
|
+
children: (field) => /* @__PURE__ */ jsxRuntime.jsx(field.FormNonRecursiveBigDecimalField, { label: "Quantity", showLabel: index2 === 0, isReadOnly })
|
|
39580
39676
|
}
|
|
39581
39677
|
),
|
|
39582
39678
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -39587,13 +39683,13 @@ const InvoiceFormLineItemRow = ({ form, index: index2, isReadOnly, onDeleteLine
|
|
|
39587
39683
|
onBlur: ({ value: unitPrice }) => {
|
|
39588
39684
|
const amount = form.getFieldValue(`lineItems[${index2}].amount`);
|
|
39589
39685
|
const quantity = form.getFieldValue(`lineItems[${index2}].quantity`);
|
|
39590
|
-
const nextAmount =
|
|
39591
|
-
if (!
|
|
39592
|
-
form.setFieldValue(`lineItems[${index2}].amount`,
|
|
39686
|
+
const nextAmount = computeLineItemAmount(unitPrice, quantity);
|
|
39687
|
+
if (!nrbdEquals(amount, nextAmount)) {
|
|
39688
|
+
form.setFieldValue(`lineItems[${index2}].amount`, nextAmount);
|
|
39593
39689
|
}
|
|
39594
39690
|
}
|
|
39595
39691
|
},
|
|
39596
|
-
children: (field) => /* @__PURE__ */ jsxRuntime.jsx(field.
|
|
39692
|
+
children: (field) => /* @__PURE__ */ jsxRuntime.jsx(field.FormNonRecursiveBigDecimalField, { label: "Rate", mode: "currency", showLabel: index2 === 0, allowNegative: true, isReadOnly })
|
|
39597
39693
|
}
|
|
39598
39694
|
),
|
|
39599
39695
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -39604,13 +39700,13 @@ const InvoiceFormLineItemRow = ({ form, index: index2, isReadOnly, onDeleteLine
|
|
|
39604
39700
|
onBlur: ({ value: amount }) => {
|
|
39605
39701
|
const unitPrice = form.getFieldValue(`lineItems[${index2}].unitPrice`);
|
|
39606
39702
|
const quantity = form.getFieldValue(`lineItems[${index2}].quantity`);
|
|
39607
|
-
const nextUnitPrice =
|
|
39608
|
-
if (!
|
|
39609
|
-
form.setFieldValue(`lineItems[${index2}].unitPrice`,
|
|
39703
|
+
const nextUnitPrice = computeLineItemUnitPrice(amount, quantity);
|
|
39704
|
+
if (!nrbdEquals(unitPrice, nextUnitPrice)) {
|
|
39705
|
+
form.setFieldValue(`lineItems[${index2}].unitPrice`, nextUnitPrice);
|
|
39610
39706
|
}
|
|
39611
39707
|
}
|
|
39612
39708
|
},
|
|
39613
|
-
children: (field) => /* @__PURE__ */ jsxRuntime.jsx(field.
|
|
39709
|
+
children: (field) => /* @__PURE__ */ jsxRuntime.jsx(field.FormNonRecursiveBigDecimalField, { label: "Amount", mode: "currency", showLabel: index2 === 0, allowNegative: true, isReadOnly })
|
|
39614
39710
|
}
|
|
39615
39711
|
),
|
|
39616
39712
|
/* @__PURE__ */ jsxRuntime.jsx(form.AppField, { name: `lineItems[${index2}].isTaxable`, children: (field) => /* @__PURE__ */ jsxRuntime.jsx(field.FormCheckboxField, { label: "Taxable", showLabel: index2 === 0, isReadOnly }) }),
|
|
@@ -39624,7 +39720,16 @@ const InvoiceFormLineItemsSection = ({
|
|
|
39624
39720
|
isReadOnly
|
|
39625
39721
|
}) => {
|
|
39626
39722
|
return /* @__PURE__ */ jsxRuntime.jsx(form.Field, { name: "lineItems", mode: "array", children: (field) => /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", align: "baseline", children: [
|
|
39627
|
-
field.state.value.map((
|
|
39723
|
+
field.state.value.map((_lineItem, index2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
39724
|
+
InvoiceFormLineItemRow,
|
|
39725
|
+
{
|
|
39726
|
+
form,
|
|
39727
|
+
index: index2,
|
|
39728
|
+
isReadOnly,
|
|
39729
|
+
onDeleteLine: () => field.removeValue(index2)
|
|
39730
|
+
},
|
|
39731
|
+
index2
|
|
39732
|
+
)),
|
|
39628
39733
|
!isReadOnly && /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outlined", onClick: () => field.pushValue(EMPTY_LINE_ITEM), children: [
|
|
39629
39734
|
"Add line item",
|
|
39630
39735
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { size: 16 })
|
|
@@ -39659,45 +39764,6 @@ const InvoiceFormMetadataSection = ({
|
|
|
39659
39764
|
] })
|
|
39660
39765
|
] }) });
|
|
39661
39766
|
};
|
|
39662
|
-
const returnTrue = () => true;
|
|
39663
|
-
function CreatableComboBox(_sd) {
|
|
39664
|
-
var _td = _sd, {
|
|
39665
|
-
className,
|
|
39666
|
-
slots,
|
|
39667
|
-
isError,
|
|
39668
|
-
selectedValue,
|
|
39669
|
-
onSelectedValueChange,
|
|
39670
|
-
onCreateOption,
|
|
39671
|
-
formatCreateLabel: formatCreateLabel2,
|
|
39672
|
-
createOptionPosition = "first",
|
|
39673
|
-
isValidNewOption = returnTrue
|
|
39674
|
-
} = _td, props = __objRest(_td, [
|
|
39675
|
-
"className",
|
|
39676
|
-
"slots",
|
|
39677
|
-
"isError",
|
|
39678
|
-
"selectedValue",
|
|
39679
|
-
"onSelectedValueChange",
|
|
39680
|
-
"onCreateOption",
|
|
39681
|
-
"formatCreateLabel",
|
|
39682
|
-
"createOptionPosition",
|
|
39683
|
-
"isValidNewOption"
|
|
39684
|
-
]);
|
|
39685
|
-
const commonSelectProps = useCommonComboBoxProps(__spreadValues({ className, slots }, props));
|
|
39686
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "3xs", fluid: true, className: className ? `${className}__Container` : void 0, children: [
|
|
39687
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
39688
|
-
BaseCreatableSelect,
|
|
39689
|
-
__spreadProps(__spreadValues({}, commonSelectProps), {
|
|
39690
|
-
value: selectedValue,
|
|
39691
|
-
onChange: onSelectedValueChange,
|
|
39692
|
-
onCreateOption,
|
|
39693
|
-
isValidNewOption,
|
|
39694
|
-
formatCreateLabel: formatCreateLabel2,
|
|
39695
|
-
createOptionPosition
|
|
39696
|
-
})
|
|
39697
|
-
),
|
|
39698
|
-
/* @__PURE__ */ jsxRuntime.jsx(ComboBoxErrorMessage, { isError, errorMessage: slots == null ? void 0 : slots.ErrorMessage })
|
|
39699
|
-
] });
|
|
39700
|
-
}
|
|
39701
39767
|
function MaybeCreatableComboBox(props) {
|
|
39702
39768
|
if (props.isCreatable) {
|
|
39703
39769
|
return /* @__PURE__ */ jsxRuntime.jsx(CreatableComboBox, __spreadValues({}, props));
|
|
@@ -39907,7 +39973,7 @@ const InvoiceFormTermsSection = ({
|
|
|
39907
39973
|
updateDueAtFromTermsAndSentAt(terms, sentAt);
|
|
39908
39974
|
}
|
|
39909
39975
|
},
|
|
39910
|
-
children: (field) => /* @__PURE__ */ jsxRuntime.jsx(field.
|
|
39976
|
+
children: (field) => /* @__PURE__ */ jsxRuntime.jsx(field.FormDatePickerField, { label: "Invoice date", inline: true, className: "Layer__InvoiceForm__Field__SentAt", isReadOnly })
|
|
39911
39977
|
}
|
|
39912
39978
|
),
|
|
39913
39979
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -39925,7 +39991,7 @@ const InvoiceFormTermsSection = ({
|
|
|
39925
39991
|
lastDueAtRef.current = dueAt;
|
|
39926
39992
|
}
|
|
39927
39993
|
},
|
|
39928
|
-
children: (field) => /* @__PURE__ */ jsxRuntime.jsx(field.
|
|
39994
|
+
children: (field) => /* @__PURE__ */ jsxRuntime.jsx(field.FormDatePickerField, { label: "Due date", inline: true, className: "Layer__InvoiceForm__Field__DueAt", isReadOnly })
|
|
39929
39995
|
}
|
|
39930
39996
|
)
|
|
39931
39997
|
] })
|
|
@@ -39978,23 +40044,26 @@ const useInvoiceForm = (props) => {
|
|
|
39978
40044
|
const upsertInvoiceProps = mode === UpsertInvoiceMode.Update ? { mode, invoiceId: props.invoice.id } : { mode };
|
|
39979
40045
|
const { trigger: upsertInvoice } = useUpsertInvoice(upsertInvoiceProps);
|
|
39980
40046
|
const invoice = isUpdateMode(props) ? props.invoice : null;
|
|
39981
|
-
const
|
|
39982
|
-
const
|
|
39983
|
-
|
|
39984
|
-
|
|
39985
|
-
|
|
39986
|
-
|
|
39987
|
-
|
|
39988
|
-
|
|
39989
|
-
|
|
39990
|
-
|
|
39991
|
-
|
|
40047
|
+
const defaultValues = React.useMemo(() => getInvoiceFormDefaultValues(invoice), [invoice]);
|
|
40048
|
+
const onSubmit = React.useCallback(
|
|
40049
|
+
(_0) => __async(null, [_0], function* ({ value, meta, formApi }) {
|
|
40050
|
+
try {
|
|
40051
|
+
const upsertInvoiceParams = convertInvoiceFormToParams(value);
|
|
40052
|
+
const upsertInvoiceRequest = effect.Schema.encodeUnknownSync(UpsertInvoiceSchema)(upsertInvoiceParams);
|
|
40053
|
+
const { data: invoice2 } = yield upsertInvoice(upsertInvoiceRequest);
|
|
40054
|
+
setSubmitError(void 0);
|
|
40055
|
+
onSuccess(invoice2);
|
|
40056
|
+
formApi.reset();
|
|
40057
|
+
if (meta.submitAction === "send" && onSendInvoice) {
|
|
40058
|
+
yield onSendInvoice(invoice2.id);
|
|
40059
|
+
}
|
|
40060
|
+
} catch (e) {
|
|
40061
|
+
console.error(e);
|
|
40062
|
+
setSubmitError("Something went wrong. Please try again.");
|
|
39992
40063
|
}
|
|
39993
|
-
}
|
|
39994
|
-
|
|
39995
|
-
|
|
39996
|
-
}
|
|
39997
|
-
}), [onSendInvoice, onSuccess, upsertInvoice]);
|
|
40064
|
+
}),
|
|
40065
|
+
[onSendInvoice, onSuccess, upsertInvoice]
|
|
40066
|
+
);
|
|
39998
40067
|
const validators = React.useMemo(() => ({
|
|
39999
40068
|
onDynamic: validateInvoiceForm
|
|
40000
40069
|
}), []);
|
|
@@ -40081,7 +40150,7 @@ const InvoiceForm = React.forwardRef((props, ref) => {
|
|
|
40081
40150
|
}, [formState, onChangeFormState]);
|
|
40082
40151
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
40083
40152
|
/* @__PURE__ */ jsxRuntime.jsxs(Form, { className: "Layer__InvoiceForm", onSubmit: blockNativeOnSubmit, children: [
|
|
40084
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40153
|
+
/* @__PURE__ */ jsxRuntime.jsx(form.AppForm, { children: /* @__PURE__ */ jsxRuntime.jsx(InvoiceFormErrorBanner, { submitError }) }),
|
|
40085
40154
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40086
40155
|
InvoiceFormTermsSection,
|
|
40087
40156
|
{
|
|
@@ -40191,8 +40260,8 @@ const getClassnameForSubComponent = (className, suffix) => {
|
|
|
40191
40260
|
};
|
|
40192
40261
|
const METER_CLASS_NAME = "Layer__Meter";
|
|
40193
40262
|
const Meter = React.forwardRef(
|
|
40194
|
-
function Meter2(
|
|
40195
|
-
var
|
|
40263
|
+
function Meter2(_yd, ref) {
|
|
40264
|
+
var _zd = _yd, { className, label, meterOnly } = _zd, restProps = __objRest(_zd, ["className", "label", "meterOnly"]);
|
|
40196
40265
|
return /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.Meter, __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, restProps), { className: classNames(METER_CLASS_NAME, className), ref }), meterOnly && { "aria-label": label }), { children: ({ percentage, valueText }) => /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "3xs", fluid: true, children: [
|
|
40197
40266
|
!meterOnly && /* @__PURE__ */ jsxRuntime.jsxs(HStack, { justify: "space-between", children: [
|
|
40198
40267
|
/* @__PURE__ */ jsxRuntime.jsx(Label, { slot: "label", children: label }),
|
|
@@ -40619,15 +40688,9 @@ const InvoiceOverview = () => {
|
|
|
40619
40688
|
/* @__PURE__ */ jsxRuntime.jsx(InvoiceTable, {})
|
|
40620
40689
|
] });
|
|
40621
40690
|
};
|
|
40622
|
-
const Invoices = ({
|
|
40623
|
-
showTitle = true,
|
|
40624
|
-
stringOverrides,
|
|
40625
|
-
onSendInvoice
|
|
40626
|
-
}) => {
|
|
40691
|
+
const Invoices = ({ stringOverrides, onSendInvoice }) => {
|
|
40627
40692
|
usePreloadCustomers();
|
|
40628
|
-
|
|
40629
|
-
usePreloadTagDimensionByKey({ dimensionKey: INVOICE_MECE_TAG_DIMENSION });
|
|
40630
|
-
return /* @__PURE__ */ jsxRuntime.jsx(InvoicesProvider, { onSendInvoice, children: /* @__PURE__ */ jsxRuntime.jsx(View, { title: (stringOverrides == null ? void 0 : stringOverrides.title) || "Invoices", showHeader: showTitle, children: /* @__PURE__ */ jsxRuntime.jsx(InvoicesContent, {}) }) });
|
|
40693
|
+
return /* @__PURE__ */ jsxRuntime.jsx(InvoicesProvider, { onSendInvoice, children: /* @__PURE__ */ jsxRuntime.jsx(View, { title: (stringOverrides == null ? void 0 : stringOverrides.title) || "Invoices", children: /* @__PURE__ */ jsxRuntime.jsx(InvoicesContent, {}) }) });
|
|
40631
40694
|
};
|
|
40632
40695
|
const InvoicesContent = () => {
|
|
40633
40696
|
const routeState = useInvoiceRouteState();
|
|
@@ -40638,11 +40701,11 @@ const ProfitAndLossView = (props) => {
|
|
|
40638
40701
|
const containerRef = React.useRef(null);
|
|
40639
40702
|
return /* @__PURE__ */ jsxRuntime.jsx(Container, { name: COMPONENT_NAME$4, ref: containerRef, children: /* @__PURE__ */ jsxRuntime.jsx(ProfitAndLoss, { children: /* @__PURE__ */ jsxRuntime.jsx(ProfitAndLossPanel, __spreadValues({ containerRef }, props)) }) });
|
|
40640
40703
|
};
|
|
40641
|
-
const ProfitAndLossPanel = (
|
|
40642
|
-
var
|
|
40704
|
+
const ProfitAndLossPanel = (_Ad) => {
|
|
40705
|
+
var _Bd = _Ad, {
|
|
40643
40706
|
containerRef,
|
|
40644
40707
|
stringOverrides
|
|
40645
|
-
} =
|
|
40708
|
+
} = _Bd, props = __objRest(_Bd, [
|
|
40646
40709
|
"containerRef",
|
|
40647
40710
|
"stringOverrides"
|
|
40648
40711
|
]);
|
|
@@ -40893,14 +40956,14 @@ function ExpandableDataTable({
|
|
|
40893
40956
|
);
|
|
40894
40957
|
}
|
|
40895
40958
|
const UNIFIED_REPORT_TAG_KEY = "#unified-report";
|
|
40896
|
-
function buildKey$g(
|
|
40897
|
-
var
|
|
40959
|
+
function buildKey$g(_Cd) {
|
|
40960
|
+
var _Dd = _Cd, {
|
|
40898
40961
|
access_token: accessToken,
|
|
40899
40962
|
apiUrl,
|
|
40900
40963
|
businessId,
|
|
40901
40964
|
report,
|
|
40902
40965
|
groupBy
|
|
40903
|
-
} =
|
|
40966
|
+
} = _Dd, dateParams = __objRest(_Dd, [
|
|
40904
40967
|
"access_token",
|
|
40905
40968
|
"apiUrl",
|
|
40906
40969
|
"businessId",
|
|
@@ -40918,8 +40981,8 @@ function buildKey$g(_yd) {
|
|
|
40918
40981
|
}, dateParams);
|
|
40919
40982
|
}
|
|
40920
40983
|
}
|
|
40921
|
-
const getUnifiedReport = get$1((
|
|
40922
|
-
var
|
|
40984
|
+
const getUnifiedReport = get$1((_Ed) => {
|
|
40985
|
+
var _Fd = _Ed, { businessId, report, groupBy } = _Fd, dateParams = __objRest(_Fd, ["businessId", "report", "groupBy"]);
|
|
40923
40986
|
const parameters = toDefinedSearchParameters(__spreadProps(__spreadValues({}, dateParams), { groupBy }));
|
|
40924
40987
|
return `/v1/businesses/${businessId}/reports/unified/${report}?${parameters}`;
|
|
40925
40988
|
});
|
|
@@ -40944,8 +41007,8 @@ class UnifiedReportSWRResponse {
|
|
|
40944
41007
|
return this.swrResponse.mutate;
|
|
40945
41008
|
}
|
|
40946
41009
|
}
|
|
40947
|
-
function useUnifiedReport(
|
|
40948
|
-
var
|
|
41010
|
+
function useUnifiedReport(_Gd) {
|
|
41011
|
+
var _Hd = _Gd, { report, groupBy } = _Hd, dateParams = __objRest(_Hd, ["report", "groupBy"]);
|
|
40949
41012
|
const { data: auth } = useAuth();
|
|
40950
41013
|
const { apiUrl } = useEnvironment();
|
|
40951
41014
|
const { businessId } = useLayerContext();
|
|
@@ -41064,8 +41127,8 @@ const S3PresignedUrlSchema = effect.Schema.Struct({
|
|
|
41064
41127
|
createdAt: effect.Schema.Date,
|
|
41065
41128
|
documentId: effect.Schema.NullishOr(effect.Schema.UUID)
|
|
41066
41129
|
});
|
|
41067
|
-
const getUnifiedReportExcel = get$1((
|
|
41068
|
-
var
|
|
41130
|
+
const getUnifiedReportExcel = get$1((_Id) => {
|
|
41131
|
+
var _Jd = _Id, { businessId, report, groupBy } = _Jd, dateParams = __objRest(_Jd, ["businessId", "report", "groupBy"]);
|
|
41069
41132
|
const parameters = toDefinedSearchParameters(__spreadProps(__spreadValues({}, dateParams), { groupBy }));
|
|
41070
41133
|
return `/v1/businesses/${businessId}/reports/unified/${report}/exports/excel?${parameters}`;
|
|
41071
41134
|
});
|
|
@@ -42478,19 +42541,19 @@ const VendorsProvider = ({ children }) => {
|
|
|
42478
42541
|
const vendors = useVendors();
|
|
42479
42542
|
return /* @__PURE__ */ jsxRuntime.jsx(VendorsContext.Provider, { value: vendors, children });
|
|
42480
42543
|
};
|
|
42481
|
-
const SelectVendor = (
|
|
42482
|
-
var
|
|
42544
|
+
const SelectVendor = (_Kd) => {
|
|
42545
|
+
var _Ld = _Kd, { withContext = true } = _Ld, props = __objRest(_Ld, ["withContext"]);
|
|
42483
42546
|
if (withContext) {
|
|
42484
42547
|
return /* @__PURE__ */ jsxRuntime.jsx(VendorsProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectVendorContent, __spreadValues({}, props)) });
|
|
42485
42548
|
}
|
|
42486
42549
|
return /* @__PURE__ */ jsxRuntime.jsx(SelectVendorContent, __spreadValues({}, props));
|
|
42487
42550
|
};
|
|
42488
|
-
const SelectVendorContent = (
|
|
42489
|
-
var
|
|
42551
|
+
const SelectVendorContent = (_Md) => {
|
|
42552
|
+
var _Nd = _Md, {
|
|
42490
42553
|
value,
|
|
42491
42554
|
onChange,
|
|
42492
42555
|
placeholder = "Select vendor"
|
|
42493
|
-
} =
|
|
42556
|
+
} = _Nd, props = __objRest(_Nd, [
|
|
42494
42557
|
"value",
|
|
42495
42558
|
"onChange",
|
|
42496
42559
|
"placeholder"
|
|
@@ -43228,8 +43291,8 @@ const BillsTableWithPanel = ({
|
|
|
43228
43291
|
}
|
|
43229
43292
|
);
|
|
43230
43293
|
};
|
|
43231
|
-
const Bills = (
|
|
43232
|
-
var
|
|
43294
|
+
const Bills = (_Od) => {
|
|
43295
|
+
var _Pd = _Od, { context = true } = _Pd, props = __objRest(_Pd, ["context"]);
|
|
43233
43296
|
if (context) {
|
|
43234
43297
|
return /* @__PURE__ */ jsxRuntime.jsx(BillsProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(BillsContent, __spreadValues({}, props)) });
|
|
43235
43298
|
}
|
|
@@ -43284,8 +43347,8 @@ const getTimezoneDisplay = (date2) => {
|
|
|
43284
43347
|
}
|
|
43285
43348
|
};
|
|
43286
43349
|
const LinkButton = React.forwardRef(
|
|
43287
|
-
function LinkButton2(
|
|
43288
|
-
var
|
|
43350
|
+
function LinkButton2(_Qd, ref) {
|
|
43351
|
+
var _Rd = _Qd, {
|
|
43289
43352
|
children,
|
|
43290
43353
|
ellipsis,
|
|
43291
43354
|
icon,
|
|
@@ -43298,7 +43361,7 @@ const LinkButton = React.forwardRef(
|
|
|
43298
43361
|
href,
|
|
43299
43362
|
target,
|
|
43300
43363
|
rel
|
|
43301
|
-
} =
|
|
43364
|
+
} = _Rd, restProps = __objRest(_Rd, [
|
|
43302
43365
|
"children",
|
|
43303
43366
|
"ellipsis",
|
|
43304
43367
|
"icon",
|
|
@@ -48079,11 +48142,11 @@ const TaxPaymentsMobileList = ({ data, isLoading, isError, slots }) => {
|
|
|
48079
48142
|
) });
|
|
48080
48143
|
};
|
|
48081
48144
|
const EMPTY_ARRAY = [];
|
|
48082
|
-
const SimpleDataTable = (
|
|
48083
|
-
var
|
|
48145
|
+
const SimpleDataTable = (_Sd) => {
|
|
48146
|
+
var _Td = _Sd, {
|
|
48084
48147
|
data,
|
|
48085
48148
|
columnConfig: columnConfig2
|
|
48086
|
-
} =
|
|
48149
|
+
} = _Td, rest = __objRest(_Td, [
|
|
48087
48150
|
"data",
|
|
48088
48151
|
"columnConfig"
|
|
48089
48152
|
]);
|
|
@@ -49195,14 +49258,14 @@ const BusinessProvider = ({
|
|
|
49195
49258
|
}
|
|
49196
49259
|
);
|
|
49197
49260
|
};
|
|
49198
|
-
const LayerProvider = (
|
|
49199
|
-
var
|
|
49261
|
+
const LayerProvider = (_Ud) => {
|
|
49262
|
+
var _Vd = _Ud, {
|
|
49200
49263
|
appId,
|
|
49201
49264
|
appSecret,
|
|
49202
49265
|
businessAccessToken,
|
|
49203
49266
|
environment,
|
|
49204
49267
|
usePlaidSandbox
|
|
49205
|
-
} =
|
|
49268
|
+
} = _Vd, restProps = __objRest(_Vd, [
|
|
49206
49269
|
"appId",
|
|
49207
49270
|
"appSecret",
|
|
49208
49271
|
"businessAccessToken",
|
|
@@ -49210,7 +49273,7 @@ const LayerProvider = (_Qd) => {
|
|
|
49210
49273
|
"usePlaidSandbox"
|
|
49211
49274
|
]);
|
|
49212
49275
|
const [cache] = React.useState(() => /* @__PURE__ */ new Map());
|
|
49213
|
-
return /* @__PURE__ */ jsxRuntime.jsx(useSWR.SWRConfig, { value: __spreadProps(__spreadValues({}, DEFAULT_SWR_CONFIG), { provider: () => cache }), children: /* @__PURE__ */ jsxRuntime.jsx(EnvironmentInputProvider, { environment, usePlaidSandbox, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
49276
|
+
return /* @__PURE__ */ jsxRuntime.jsx(useSWR.SWRConfig, { value: __spreadProps(__spreadValues({}, DEFAULT_SWR_CONFIG), { provider: () => cache }), children: /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.I18nProvider, { locale: "en-US", children: /* @__PURE__ */ jsxRuntime.jsx(EnvironmentInputProvider, { environment, usePlaidSandbox, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
49214
49277
|
AuthInputProvider,
|
|
49215
49278
|
{
|
|
49216
49279
|
appId,
|
|
@@ -49218,7 +49281,7 @@ const LayerProvider = (_Qd) => {
|
|
|
49218
49281
|
businessAccessToken,
|
|
49219
49282
|
children: /* @__PURE__ */ jsxRuntime.jsx(GlobalDateStoreProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(BusinessProvider, __spreadValues({}, restProps)) })
|
|
49220
49283
|
}
|
|
49221
|
-
) }) });
|
|
49284
|
+
) }) }) });
|
|
49222
49285
|
};
|
|
49223
49286
|
exports.AccountingOverview = AccountingOverview;
|
|
49224
49287
|
exports.BalanceSheet = BalanceSheet;
|