@layerfi/components 0.1.122-alpha → 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 +110 -123
- package/dist/esm/index.mjs +110 -123
- package/dist/index.css +10 -3
- package/dist/index.d.ts +5 -2
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -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.122
|
|
211
|
+
const version = "0.1.122";
|
|
212
212
|
const pkg = {
|
|
213
213
|
version
|
|
214
214
|
};
|
|
@@ -13861,7 +13861,7 @@ const DownloadButton$1 = ({
|
|
|
13861
13861
|
text = "Download",
|
|
13862
13862
|
retryText = "Retry",
|
|
13863
13863
|
errorText = "Download failed. Check connection and retry in few seconds.",
|
|
13864
|
-
variant =
|
|
13864
|
+
variant = ButtonVariant.secondary,
|
|
13865
13865
|
disabled = false
|
|
13866
13866
|
}) => {
|
|
13867
13867
|
if (requestFailed) {
|
|
@@ -14046,31 +14046,34 @@ const MonthPicker = ({
|
|
|
14046
14046
|
}, [onChange]);
|
|
14047
14047
|
const inputValue = dateFns.format(date2.toDate(), truncateMonth ? MONTH_YEAR_FORMAT_SHORT : MONTH_YEAR_FORMAT);
|
|
14048
14048
|
const additionalAriaProps = !showLabel && { "aria-label": label };
|
|
14049
|
-
|
|
14050
|
-
|
|
14051
|
-
/* @__PURE__ */ jsxRuntime.
|
|
14052
|
-
|
|
14053
|
-
|
|
14054
|
-
|
|
14055
|
-
|
|
14056
|
-
|
|
14057
|
-
|
|
14058
|
-
|
|
14059
|
-
|
|
14060
|
-
|
|
14061
|
-
|
|
14062
|
-
|
|
14063
|
-
|
|
14064
|
-
|
|
14065
|
-
|
|
14066
|
-
{
|
|
14067
|
-
|
|
14068
|
-
|
|
14069
|
-
|
|
14070
|
-
|
|
14071
|
-
|
|
14072
|
-
|
|
14073
|
-
|
|
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
|
+
] })
|
|
14074
14077
|
] });
|
|
14075
14078
|
};
|
|
14076
14079
|
const SmallLoader = ({ size = 28 }) => {
|
|
@@ -24709,7 +24712,7 @@ function useGlobalDatePickerBounds() {
|
|
|
24709
24712
|
const maxDate = React.useMemo(() => dateFns.endOfDay(/* @__PURE__ */ new Date()), []);
|
|
24710
24713
|
return React.useMemo(() => ({ minDate, maxDate }), [minDate, maxDate]);
|
|
24711
24714
|
}
|
|
24712
|
-
const GlobalMonthPicker = ({ truncateMonth }) => {
|
|
24715
|
+
const GlobalMonthPicker = ({ truncateMonth, showLabel = false }) => {
|
|
24713
24716
|
const { minDate, maxDate } = useGlobalDatePickerBounds();
|
|
24714
24717
|
const { setMonth } = useGlobalDateRangeActions();
|
|
24715
24718
|
const { date: date2 } = useGlobalDate({ dateSelectionMode: "month" });
|
|
@@ -24722,8 +24725,8 @@ const GlobalMonthPicker = ({ truncateMonth }) => {
|
|
|
24722
24725
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
24723
24726
|
MonthPicker,
|
|
24724
24727
|
{
|
|
24725
|
-
label: "
|
|
24726
|
-
showLabel
|
|
24728
|
+
label: "Month",
|
|
24729
|
+
showLabel,
|
|
24727
24730
|
date: dateZdt,
|
|
24728
24731
|
onChange,
|
|
24729
24732
|
minDate: minDateZdt,
|
|
@@ -25177,8 +25180,8 @@ const DetailedChart = ({
|
|
|
25177
25180
|
] }) }) })
|
|
25178
25181
|
] });
|
|
25179
25182
|
};
|
|
25180
|
-
const HeaderCol = ({ className, children, style, noPadding = false }) => {
|
|
25181
|
-
const dataProperties = toDataProperties({ "no-padding": noPadding });
|
|
25183
|
+
const HeaderCol = ({ className, children, style, noPadding = false, fluid = false }) => {
|
|
25184
|
+
const dataProperties = toDataProperties({ "no-padding": noPadding, fluid });
|
|
25182
25185
|
return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({}, dataProperties), { className: classNames("Layer__header__col", className), style, children }));
|
|
25183
25186
|
};
|
|
25184
25187
|
const DetailReportBreadcrumb = ({
|
|
@@ -26298,7 +26301,7 @@ const DateSelectionComboBox = () => {
|
|
|
26298
26301
|
}, [setDateRange]);
|
|
26299
26302
|
const inputId = React.useId();
|
|
26300
26303
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { children: [
|
|
26301
|
-
/* @__PURE__ */ jsxRuntime.jsx(Label, { size: "
|
|
26304
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { pbe: "3xs", size: "sm", htmlFor: inputId, children: "Report period" }),
|
|
26302
26305
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26303
26306
|
ComboBox,
|
|
26304
26307
|
{
|
|
@@ -26351,7 +26354,7 @@ const GlobalDateRangePicker = () => {
|
|
|
26351
26354
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26352
26355
|
DatePicker,
|
|
26353
26356
|
{
|
|
26354
|
-
label: "Start
|
|
26357
|
+
label: "Start date",
|
|
26355
26358
|
date: localStartDate,
|
|
26356
26359
|
onChange: onChangeStartDate,
|
|
26357
26360
|
minDate: minStartDate,
|
|
@@ -26359,17 +26362,13 @@ const GlobalDateRangePicker = () => {
|
|
|
26359
26362
|
isInvalid: startDateInvalid,
|
|
26360
26363
|
errorText: startDateErrorText,
|
|
26361
26364
|
onBlur: onBlurStartDate,
|
|
26362
|
-
slotProps: {
|
|
26363
|
-
Label: {
|
|
26364
|
-
size: "2xs"
|
|
26365
|
-
}
|
|
26366
|
-
}
|
|
26365
|
+
slotProps: { Label: { size: "sm", pbe: "3xs" } }
|
|
26367
26366
|
}
|
|
26368
26367
|
),
|
|
26369
26368
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26370
26369
|
DatePicker,
|
|
26371
26370
|
{
|
|
26372
|
-
label: "End
|
|
26371
|
+
label: "End date",
|
|
26373
26372
|
date: localEndDate,
|
|
26374
26373
|
onChange: onChangeEndDate,
|
|
26375
26374
|
minDate: minEndDate,
|
|
@@ -26377,11 +26376,7 @@ const GlobalDateRangePicker = () => {
|
|
|
26377
26376
|
isInvalid: endDateInvalid,
|
|
26378
26377
|
errorText: endDateErrorText,
|
|
26379
26378
|
onBlur: onBlurEndDate,
|
|
26380
|
-
slotProps: {
|
|
26381
|
-
Label: {
|
|
26382
|
-
size: "2xs"
|
|
26383
|
-
}
|
|
26384
|
-
}
|
|
26379
|
+
slotProps: { Label: { size: "sm", pbe: "3xs" } }
|
|
26385
26380
|
}
|
|
26386
26381
|
)
|
|
26387
26382
|
] });
|
|
@@ -26403,7 +26398,7 @@ const DateRangeSelection = () => {
|
|
|
26403
26398
|
};
|
|
26404
26399
|
const CombinedDateRangeSelection = ({ mode }) => {
|
|
26405
26400
|
if (mode === "month") {
|
|
26406
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GlobalMonthPicker, {});
|
|
26401
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GlobalMonthPicker, { showLabel: true });
|
|
26407
26402
|
}
|
|
26408
26403
|
return /* @__PURE__ */ jsxRuntime.jsx(DateRangeSelection, {});
|
|
26409
26404
|
};
|
|
@@ -26668,17 +26663,22 @@ const DateGroupByComboBox = ({ value, onValueChange }) => {
|
|
|
26668
26663
|
const onSelectedValueChange = React.useCallback((option) => {
|
|
26669
26664
|
onValueChange((option == null ? void 0 : option.value) || null);
|
|
26670
26665
|
}, [onValueChange]);
|
|
26671
|
-
|
|
26672
|
-
|
|
26673
|
-
{
|
|
26674
|
-
|
|
26675
|
-
|
|
26676
|
-
|
|
26677
|
-
|
|
26678
|
-
|
|
26679
|
-
|
|
26680
|
-
|
|
26681
|
-
|
|
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
|
+
] });
|
|
26682
26682
|
};
|
|
26683
26683
|
const MultiSelect = ({
|
|
26684
26684
|
name,
|
|
@@ -26728,6 +26728,10 @@ const MultiSelect = ({
|
|
|
26728
26728
|
/* @__PURE__ */ jsxRuntime.jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", children: errorMessage })
|
|
26729
26729
|
] });
|
|
26730
26730
|
};
|
|
26731
|
+
const toSelectOption = (opt) => ({
|
|
26732
|
+
value: JSON.stringify(opt.tagFilterConfig),
|
|
26733
|
+
label: opt.displayName
|
|
26734
|
+
});
|
|
26731
26735
|
const selectStyles = {
|
|
26732
26736
|
valueContainer: (styles) => {
|
|
26733
26737
|
return __spreadProps(__spreadValues({}, styles), {
|
|
@@ -26735,49 +26739,43 @@ const selectStyles = {
|
|
|
26735
26739
|
});
|
|
26736
26740
|
}
|
|
26737
26741
|
};
|
|
26738
|
-
const
|
|
26742
|
+
const CompareTagsMultiSelect = () => {
|
|
26739
26743
|
const {
|
|
26740
|
-
setSelectedCompareOptions,
|
|
26741
26744
|
compareOptions,
|
|
26742
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 {
|
|
26743
26768
|
comparisonConfig,
|
|
26744
26769
|
comparisonPeriodMode,
|
|
26745
26770
|
setComparisonPeriodMode
|
|
26746
26771
|
} = React.useContext(ProfitAndLossComparisonContext);
|
|
26747
26772
|
const { dateSelectionMode } = React.useContext(ProfitAndLossContext);
|
|
26748
|
-
const tagComparisonSelectOptions = compareOptions.map(
|
|
26749
|
-
(tagComparisonOption) => {
|
|
26750
|
-
return {
|
|
26751
|
-
value: JSON.stringify(tagComparisonOption.tagFilterConfig),
|
|
26752
|
-
label: tagComparisonOption.displayName
|
|
26753
|
-
};
|
|
26754
|
-
}
|
|
26755
|
-
);
|
|
26756
26773
|
if (!comparisonConfig) {
|
|
26757
26774
|
return null;
|
|
26758
26775
|
}
|
|
26759
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(HStack, { align: "
|
|
26776
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(HStack, { align: "end", gap: "xs", children: [
|
|
26760
26777
|
dateSelectionMode === "full" && /* @__PURE__ */ jsxRuntime.jsx(DateGroupByComboBox, { value: comparisonPeriodMode, onValueChange: setComparisonPeriodMode }),
|
|
26761
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26762
|
-
MultiSelect,
|
|
26763
|
-
{
|
|
26764
|
-
options: tagComparisonSelectOptions,
|
|
26765
|
-
onChange: (values) => setSelectedCompareOptions(values),
|
|
26766
|
-
defaultValue: selectedCompareOptions == null ? void 0 : selectedCompareOptions.map((option) => ({
|
|
26767
|
-
value: JSON.stringify(option.tagFilterConfig),
|
|
26768
|
-
label: option.displayName
|
|
26769
|
-
})),
|
|
26770
|
-
value: selectedCompareOptions.map((tagComparisonOption) => {
|
|
26771
|
-
return {
|
|
26772
|
-
value: JSON.stringify(tagComparisonOption.tagFilterConfig),
|
|
26773
|
-
label: tagComparisonOption.displayName
|
|
26774
|
-
};
|
|
26775
|
-
}),
|
|
26776
|
-
placeholder: "Select views",
|
|
26777
|
-
styles: selectStyles,
|
|
26778
|
-
className: "Layer__ProfitAndLoss__TagMultiSelect"
|
|
26779
|
-
}
|
|
26780
|
-
)
|
|
26778
|
+
/* @__PURE__ */ jsxRuntime.jsx(CompareTagsMultiSelect, {})
|
|
26781
26779
|
] });
|
|
26782
26780
|
};
|
|
26783
26781
|
const defaultValue = {
|
|
@@ -27410,29 +27408,22 @@ const ProfitAndLossReport = ({
|
|
|
27410
27408
|
const header = React.useMemo(() => {
|
|
27411
27409
|
if (hideHeader) return null;
|
|
27412
27410
|
return /* @__PURE__ */ jsxRuntime.jsxs(Header, { children: [
|
|
27413
|
-
/* @__PURE__ */ jsxRuntime.
|
|
27414
|
-
/* @__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: [
|
|
27415
27413
|
/* @__PURE__ */ jsxRuntime.jsx(CombinedDateRangeSelection, { mode: dateSelectionMode }),
|
|
27416
27414
|
view === "desktop" && useComparisonPnl && /* @__PURE__ */ jsxRuntime.jsx(ProfitAndLossCompareOptions, {})
|
|
27417
27415
|
] }),
|
|
27418
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27416
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27419
27417
|
ProfitAndLossDownloadButton,
|
|
27420
27418
|
{
|
|
27421
27419
|
stringOverrides: stringOverrides == null ? void 0 : stringOverrides.downloadButton,
|
|
27422
27420
|
moneyFormat: csvMoneyFormat
|
|
27423
27421
|
}
|
|
27424
|
-
)
|
|
27425
|
-
] }),
|
|
27426
|
-
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, {}) }) }) })
|
|
27427
27425
|
] });
|
|
27428
|
-
}, [
|
|
27429
|
-
csvMoneyFormat,
|
|
27430
|
-
dateSelectionMode,
|
|
27431
|
-
hideHeader,
|
|
27432
|
-
stringOverrides == null ? void 0 : stringOverrides.downloadButton,
|
|
27433
|
-
useComparisonPnl,
|
|
27434
|
-
view
|
|
27435
|
-
]);
|
|
27426
|
+
}, [csvMoneyFormat, dateSelectionMode, hideHeader, stringOverrides == null ? void 0 : stringOverrides.downloadButton, useComparisonPnl, view]);
|
|
27436
27427
|
return /* @__PURE__ */ jsxRuntime.jsx(InAppLinkProvider, { renderInAppLink, children: /* @__PURE__ */ jsxRuntime.jsx(View, { type: "panel", header, children: selectedLineItem ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
27437
27428
|
ProfitAndLossDetailReport,
|
|
27438
27429
|
{
|
|
@@ -28124,7 +28115,7 @@ const ExpandCollapseButton = ({
|
|
|
28124
28115
|
Button$1,
|
|
28125
28116
|
{
|
|
28126
28117
|
onClick: () => onClick(!expanded),
|
|
28127
|
-
variant: variant ? variant :
|
|
28118
|
+
variant: variant ? variant : ButtonVariant.secondary,
|
|
28128
28119
|
className: classNames(
|
|
28129
28120
|
iconOnly ? "Layer__expand-collpase-all-rows-btn--sm" : "Layer__expand-collpase-all-rows-btn",
|
|
28130
28121
|
className
|
|
@@ -28246,7 +28237,7 @@ const GlobalDatePicker = () => {
|
|
|
28246
28237
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
28247
28238
|
DatePicker,
|
|
28248
28239
|
{
|
|
28249
|
-
label: "Effective
|
|
28240
|
+
label: "Effective date",
|
|
28250
28241
|
date: localDate,
|
|
28251
28242
|
onChange,
|
|
28252
28243
|
minDate: minDateZdt,
|
|
@@ -28254,11 +28245,7 @@ const GlobalDatePicker = () => {
|
|
|
28254
28245
|
isInvalid,
|
|
28255
28246
|
errorText,
|
|
28256
28247
|
onBlur,
|
|
28257
|
-
slotProps: {
|
|
28258
|
-
Label: {
|
|
28259
|
-
size: "2xs"
|
|
28260
|
-
}
|
|
28261
|
-
}
|
|
28248
|
+
slotProps: { Label: { size: "sm", pbe: "3xs" } }
|
|
28262
28249
|
}
|
|
28263
28250
|
);
|
|
28264
28251
|
};
|
|
@@ -28279,7 +28266,7 @@ const DateSelection = () => {
|
|
|
28279
28266
|
};
|
|
28280
28267
|
const CombinedDateSelection = ({ mode }) => {
|
|
28281
28268
|
if (mode === "month") {
|
|
28282
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GlobalMonthPicker, {});
|
|
28269
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GlobalMonthPicker, { showLabel: true });
|
|
28283
28270
|
}
|
|
28284
28271
|
return /* @__PURE__ */ jsxRuntime.jsx(DateSelection, {});
|
|
28285
28272
|
};
|
|
@@ -28308,10 +28295,10 @@ const BalanceSheetView = ({
|
|
|
28308
28295
|
{
|
|
28309
28296
|
type: "panel",
|
|
28310
28297
|
ref: containerRef,
|
|
28311
|
-
header: /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.
|
|
28312
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28313
|
-
withExpandAllButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
28314
|
-
] }) }),
|
|
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
|
+
] }) }) }) }),
|
|
28315
28302
|
children: !data || isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `Layer__${COMPONENT_NAME$9}__loader-container`, children: /* @__PURE__ */ jsxRuntime.jsx(Loader, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
28316
28303
|
BalanceSheetTable,
|
|
28317
28304
|
{
|
|
@@ -28328,9 +28315,9 @@ const BalanceSheetView = ({
|
|
|
28328
28315
|
{
|
|
28329
28316
|
type: "panel",
|
|
28330
28317
|
ref: containerRef,
|
|
28331
|
-
header: /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.
|
|
28332
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28333
|
-
/* @__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: [
|
|
28334
28321
|
withExpandAllButton && /* @__PURE__ */ jsxRuntime.jsx(BalanceSheetExpandAllButton, { view }),
|
|
28335
28322
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28336
28323
|
BalanceSheetDownloadButton,
|
|
@@ -28340,7 +28327,7 @@ const BalanceSheetView = ({
|
|
|
28340
28327
|
}
|
|
28341
28328
|
)
|
|
28342
28329
|
] })
|
|
28343
|
-
] }) }),
|
|
28330
|
+
] }) }) }) }),
|
|
28344
28331
|
children: !data || isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `Layer__${COMPONENT_NAME$9}__loader-container`, children: /* @__PURE__ */ jsxRuntime.jsx(Loader, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
28345
28332
|
BalanceSheetTable,
|
|
28346
28333
|
{
|
|
@@ -28622,17 +28609,17 @@ const StatementOfCashFlowView = ({
|
|
|
28622
28609
|
{
|
|
28623
28610
|
type: "panel",
|
|
28624
28611
|
ref: containerRef,
|
|
28625
|
-
header: /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.
|
|
28626
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28627
|
-
/* @__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(
|
|
28628
28615
|
CashflowStatementDownloadButton,
|
|
28629
28616
|
{
|
|
28630
28617
|
startDate: dateRange.startDate,
|
|
28631
28618
|
endDate: dateRange.endDate,
|
|
28632
28619
|
iconOnly: view === "mobile"
|
|
28633
28620
|
}
|
|
28634
|
-
)
|
|
28635
|
-
] }) }),
|
|
28621
|
+
)
|
|
28622
|
+
] }) }) }) }),
|
|
28636
28623
|
children: !data || isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `Layer__${COMPONENT_NAME$8}__loader-container`, children: /* @__PURE__ */ jsxRuntime.jsx(Loader, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
28637
28624
|
StatementOfCashFlowTable,
|
|
28638
28625
|
{
|
package/dist/esm/index.mjs
CHANGED
|
@@ -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.122
|
|
211
|
+
const version = "0.1.122";
|
|
212
212
|
const pkg = {
|
|
213
213
|
version
|
|
214
214
|
};
|
|
@@ -12385,7 +12385,7 @@ const DownloadButton$1 = ({
|
|
|
12385
12385
|
text = "Download",
|
|
12386
12386
|
retryText = "Retry",
|
|
12387
12387
|
errorText = "Download failed. Check connection and retry in few seconds.",
|
|
12388
|
-
variant =
|
|
12388
|
+
variant = ButtonVariant.secondary,
|
|
12389
12389
|
disabled = false
|
|
12390
12390
|
}) => {
|
|
12391
12391
|
if (requestFailed) {
|
|
@@ -12570,31 +12570,34 @@ const MonthPicker = ({
|
|
|
12570
12570
|
}, [onChange]);
|
|
12571
12571
|
const inputValue = format(date.toDate(), truncateMonth ? MONTH_YEAR_FORMAT_SHORT : MONTH_YEAR_FORMAT);
|
|
12572
12572
|
const additionalAriaProps = !showLabel && { "aria-label": label };
|
|
12573
|
-
|
|
12574
|
-
|
|
12575
|
-
/* @__PURE__ */
|
|
12576
|
-
|
|
12577
|
-
|
|
12578
|
-
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
{
|
|
12591
|
-
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
|
|
12597
|
-
|
|
12573
|
+
const inputId = useId();
|
|
12574
|
+
return /* @__PURE__ */ jsxs(VStack, { children: [
|
|
12575
|
+
showLabel && /* @__PURE__ */ jsx(Label, { pbe: "3xs", size: "sm", htmlFor: inputId, children: label }),
|
|
12576
|
+
/* @__PURE__ */ jsxs(DialogTrigger, { isOpen: isPopoverOpen, onOpenChange: setPopoverOpen, children: [
|
|
12577
|
+
/* @__PURE__ */ jsxs(
|
|
12578
|
+
InputGroup$1,
|
|
12579
|
+
{
|
|
12580
|
+
ref: triggerRef,
|
|
12581
|
+
slot: "input",
|
|
12582
|
+
className: classNames("Layer__MonthPicker__InputGroup", { "Layer__MonthPicker__InputGroup--truncated": truncateMonth }),
|
|
12583
|
+
onClick: () => setPopoverOpen(true),
|
|
12584
|
+
children: [
|
|
12585
|
+
/* @__PURE__ */ jsx(Input$1, __spreadProps(__spreadValues({ inset: true }, additionalAriaProps), { value: inputValue, readOnly: true, id: inputId })),
|
|
12586
|
+
/* @__PURE__ */ jsx(PickerDropdownIndicator, { onClick: () => setPopoverOpen(true) })
|
|
12587
|
+
]
|
|
12588
|
+
}
|
|
12589
|
+
),
|
|
12590
|
+
/* @__PURE__ */ jsx(ResponsivePopover, { triggerRef, children: /* @__PURE__ */ jsx(Dialog$1, { children: /* @__PURE__ */ jsx(
|
|
12591
|
+
MonthCalendar,
|
|
12592
|
+
{
|
|
12593
|
+
date,
|
|
12594
|
+
onChange: onChangeMonth,
|
|
12595
|
+
minDate,
|
|
12596
|
+
maxDate,
|
|
12597
|
+
variant: value
|
|
12598
|
+
}
|
|
12599
|
+
) }) })
|
|
12600
|
+
] })
|
|
12598
12601
|
] });
|
|
12599
12602
|
};
|
|
12600
12603
|
const SmallLoader = ({ size = 28 }) => {
|
|
@@ -23233,7 +23236,7 @@ function useGlobalDatePickerBounds() {
|
|
|
23233
23236
|
const maxDate = useMemo(() => endOfDay(/* @__PURE__ */ new Date()), []);
|
|
23234
23237
|
return useMemo(() => ({ minDate, maxDate }), [minDate, maxDate]);
|
|
23235
23238
|
}
|
|
23236
|
-
const GlobalMonthPicker = ({ truncateMonth }) => {
|
|
23239
|
+
const GlobalMonthPicker = ({ truncateMonth, showLabel = false }) => {
|
|
23237
23240
|
const { minDate, maxDate } = useGlobalDatePickerBounds();
|
|
23238
23241
|
const { setMonth } = useGlobalDateRangeActions();
|
|
23239
23242
|
const { date } = useGlobalDate({ dateSelectionMode: "month" });
|
|
@@ -23246,8 +23249,8 @@ const GlobalMonthPicker = ({ truncateMonth }) => {
|
|
|
23246
23249
|
return /* @__PURE__ */ jsx(
|
|
23247
23250
|
MonthPicker,
|
|
23248
23251
|
{
|
|
23249
|
-
label: "
|
|
23250
|
-
showLabel
|
|
23252
|
+
label: "Month",
|
|
23253
|
+
showLabel,
|
|
23251
23254
|
date: dateZdt,
|
|
23252
23255
|
onChange,
|
|
23253
23256
|
minDate: minDateZdt,
|
|
@@ -23701,8 +23704,8 @@ const DetailedChart = ({
|
|
|
23701
23704
|
] }) }) })
|
|
23702
23705
|
] });
|
|
23703
23706
|
};
|
|
23704
|
-
const HeaderCol = ({ className, children, style, noPadding = false }) => {
|
|
23705
|
-
const dataProperties = toDataProperties({ "no-padding": noPadding });
|
|
23707
|
+
const HeaderCol = ({ className, children, style, noPadding = false, fluid = false }) => {
|
|
23708
|
+
const dataProperties = toDataProperties({ "no-padding": noPadding, fluid });
|
|
23706
23709
|
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({}, dataProperties), { className: classNames("Layer__header__col", className), style, children }));
|
|
23707
23710
|
};
|
|
23708
23711
|
const DetailReportBreadcrumb = ({
|
|
@@ -24822,7 +24825,7 @@ const DateSelectionComboBox = () => {
|
|
|
24822
24825
|
}, [setDateRange]);
|
|
24823
24826
|
const inputId = useId();
|
|
24824
24827
|
return /* @__PURE__ */ jsxs(VStack, { children: [
|
|
24825
|
-
/* @__PURE__ */ jsx(Label, { size: "
|
|
24828
|
+
/* @__PURE__ */ jsx(Label, { pbe: "3xs", size: "sm", htmlFor: inputId, children: "Report period" }),
|
|
24826
24829
|
/* @__PURE__ */ jsx(
|
|
24827
24830
|
ComboBox,
|
|
24828
24831
|
{
|
|
@@ -24875,7 +24878,7 @@ const GlobalDateRangePicker = () => {
|
|
|
24875
24878
|
/* @__PURE__ */ jsx(
|
|
24876
24879
|
DatePicker,
|
|
24877
24880
|
{
|
|
24878
|
-
label: "Start
|
|
24881
|
+
label: "Start date",
|
|
24879
24882
|
date: localStartDate,
|
|
24880
24883
|
onChange: onChangeStartDate,
|
|
24881
24884
|
minDate: minStartDate,
|
|
@@ -24883,17 +24886,13 @@ const GlobalDateRangePicker = () => {
|
|
|
24883
24886
|
isInvalid: startDateInvalid,
|
|
24884
24887
|
errorText: startDateErrorText,
|
|
24885
24888
|
onBlur: onBlurStartDate,
|
|
24886
|
-
slotProps: {
|
|
24887
|
-
Label: {
|
|
24888
|
-
size: "2xs"
|
|
24889
|
-
}
|
|
24890
|
-
}
|
|
24889
|
+
slotProps: { Label: { size: "sm", pbe: "3xs" } }
|
|
24891
24890
|
}
|
|
24892
24891
|
),
|
|
24893
24892
|
/* @__PURE__ */ jsx(
|
|
24894
24893
|
DatePicker,
|
|
24895
24894
|
{
|
|
24896
|
-
label: "End
|
|
24895
|
+
label: "End date",
|
|
24897
24896
|
date: localEndDate,
|
|
24898
24897
|
onChange: onChangeEndDate,
|
|
24899
24898
|
minDate: minEndDate,
|
|
@@ -24901,11 +24900,7 @@ const GlobalDateRangePicker = () => {
|
|
|
24901
24900
|
isInvalid: endDateInvalid,
|
|
24902
24901
|
errorText: endDateErrorText,
|
|
24903
24902
|
onBlur: onBlurEndDate,
|
|
24904
|
-
slotProps: {
|
|
24905
|
-
Label: {
|
|
24906
|
-
size: "2xs"
|
|
24907
|
-
}
|
|
24908
|
-
}
|
|
24903
|
+
slotProps: { Label: { size: "sm", pbe: "3xs" } }
|
|
24909
24904
|
}
|
|
24910
24905
|
)
|
|
24911
24906
|
] });
|
|
@@ -24927,7 +24922,7 @@ const DateRangeSelection = () => {
|
|
|
24927
24922
|
};
|
|
24928
24923
|
const CombinedDateRangeSelection = ({ mode }) => {
|
|
24929
24924
|
if (mode === "month") {
|
|
24930
|
-
return /* @__PURE__ */ jsx(GlobalMonthPicker, {});
|
|
24925
|
+
return /* @__PURE__ */ jsx(GlobalMonthPicker, { showLabel: true });
|
|
24931
24926
|
}
|
|
24932
24927
|
return /* @__PURE__ */ jsx(DateRangeSelection, {});
|
|
24933
24928
|
};
|
|
@@ -25192,17 +25187,22 @@ const DateGroupByComboBox = ({ value, onValueChange }) => {
|
|
|
25192
25187
|
const onSelectedValueChange = useCallback((option) => {
|
|
25193
25188
|
onValueChange((option == null ? void 0 : option.value) || null);
|
|
25194
25189
|
}, [onValueChange]);
|
|
25195
|
-
|
|
25196
|
-
|
|
25197
|
-
{
|
|
25198
|
-
|
|
25199
|
-
|
|
25200
|
-
|
|
25201
|
-
|
|
25202
|
-
|
|
25203
|
-
|
|
25204
|
-
|
|
25205
|
-
|
|
25190
|
+
const inputId = useId();
|
|
25191
|
+
return /* @__PURE__ */ jsxs(VStack, { className: "Layer__DateGroupByComboBox__Container", children: [
|
|
25192
|
+
/* @__PURE__ */ jsx(Label, { pbe: "3xs", size: "sm", htmlFor: inputId, children: "Group by" }),
|
|
25193
|
+
/* @__PURE__ */ jsx(
|
|
25194
|
+
ComboBox,
|
|
25195
|
+
{
|
|
25196
|
+
className: "Layer__DateGroupByComboBox",
|
|
25197
|
+
options: options$3,
|
|
25198
|
+
onSelectedValueChange,
|
|
25199
|
+
selectedValue: selectedOption,
|
|
25200
|
+
isSearchable: false,
|
|
25201
|
+
isClearable: false,
|
|
25202
|
+
inputId
|
|
25203
|
+
}
|
|
25204
|
+
)
|
|
25205
|
+
] });
|
|
25206
25206
|
};
|
|
25207
25207
|
const MultiSelect = ({
|
|
25208
25208
|
name,
|
|
@@ -25252,6 +25252,10 @@ const MultiSelect = ({
|
|
|
25252
25252
|
/* @__PURE__ */ jsx(DeprecatedTooltipContent, { className: "Layer__tooltip", children: errorMessage })
|
|
25253
25253
|
] });
|
|
25254
25254
|
};
|
|
25255
|
+
const toSelectOption = (opt) => ({
|
|
25256
|
+
value: JSON.stringify(opt.tagFilterConfig),
|
|
25257
|
+
label: opt.displayName
|
|
25258
|
+
});
|
|
25255
25259
|
const selectStyles = {
|
|
25256
25260
|
valueContainer: (styles) => {
|
|
25257
25261
|
return __spreadProps(__spreadValues({}, styles), {
|
|
@@ -25259,49 +25263,43 @@ const selectStyles = {
|
|
|
25259
25263
|
});
|
|
25260
25264
|
}
|
|
25261
25265
|
};
|
|
25262
|
-
const
|
|
25266
|
+
const CompareTagsMultiSelect = () => {
|
|
25263
25267
|
const {
|
|
25264
|
-
setSelectedCompareOptions,
|
|
25265
25268
|
compareOptions,
|
|
25266
25269
|
selectedCompareOptions,
|
|
25270
|
+
setSelectedCompareOptions
|
|
25271
|
+
} = useContext(ProfitAndLossComparisonContext);
|
|
25272
|
+
const inputId = useId();
|
|
25273
|
+
return /* @__PURE__ */ jsxs(VStack, { className: "Layer__CompareTagsMultiSelect__Container", children: [
|
|
25274
|
+
/* @__PURE__ */ jsx(Label, { pbe: "3xs", size: "sm", htmlFor: inputId, children: "Compare by" }),
|
|
25275
|
+
/* @__PURE__ */ jsx(
|
|
25276
|
+
MultiSelect,
|
|
25277
|
+
{
|
|
25278
|
+
inputId,
|
|
25279
|
+
options: compareOptions.map(toSelectOption),
|
|
25280
|
+
onChange: setSelectedCompareOptions,
|
|
25281
|
+
defaultValue: selectedCompareOptions == null ? void 0 : selectedCompareOptions.map(toSelectOption),
|
|
25282
|
+
value: selectedCompareOptions.map(toSelectOption),
|
|
25283
|
+
placeholder: "Select tags",
|
|
25284
|
+
styles: selectStyles,
|
|
25285
|
+
className: "Layer__CompareTagsMultiSelect"
|
|
25286
|
+
}
|
|
25287
|
+
)
|
|
25288
|
+
] });
|
|
25289
|
+
};
|
|
25290
|
+
const ProfitAndLossCompareOptions = () => {
|
|
25291
|
+
const {
|
|
25267
25292
|
comparisonConfig,
|
|
25268
25293
|
comparisonPeriodMode,
|
|
25269
25294
|
setComparisonPeriodMode
|
|
25270
25295
|
} = useContext(ProfitAndLossComparisonContext);
|
|
25271
25296
|
const { dateSelectionMode } = useContext(ProfitAndLossContext);
|
|
25272
|
-
const tagComparisonSelectOptions = compareOptions.map(
|
|
25273
|
-
(tagComparisonOption) => {
|
|
25274
|
-
return {
|
|
25275
|
-
value: JSON.stringify(tagComparisonOption.tagFilterConfig),
|
|
25276
|
-
label: tagComparisonOption.displayName
|
|
25277
|
-
};
|
|
25278
|
-
}
|
|
25279
|
-
);
|
|
25280
25297
|
if (!comparisonConfig) {
|
|
25281
25298
|
return null;
|
|
25282
25299
|
}
|
|
25283
|
-
return /* @__PURE__ */ jsxs(HStack, { align: "
|
|
25300
|
+
return /* @__PURE__ */ jsxs(HStack, { align: "end", gap: "xs", children: [
|
|
25284
25301
|
dateSelectionMode === "full" && /* @__PURE__ */ jsx(DateGroupByComboBox, { value: comparisonPeriodMode, onValueChange: setComparisonPeriodMode }),
|
|
25285
|
-
/* @__PURE__ */ jsx(
|
|
25286
|
-
MultiSelect,
|
|
25287
|
-
{
|
|
25288
|
-
options: tagComparisonSelectOptions,
|
|
25289
|
-
onChange: (values) => setSelectedCompareOptions(values),
|
|
25290
|
-
defaultValue: selectedCompareOptions == null ? void 0 : selectedCompareOptions.map((option) => ({
|
|
25291
|
-
value: JSON.stringify(option.tagFilterConfig),
|
|
25292
|
-
label: option.displayName
|
|
25293
|
-
})),
|
|
25294
|
-
value: selectedCompareOptions.map((tagComparisonOption) => {
|
|
25295
|
-
return {
|
|
25296
|
-
value: JSON.stringify(tagComparisonOption.tagFilterConfig),
|
|
25297
|
-
label: tagComparisonOption.displayName
|
|
25298
|
-
};
|
|
25299
|
-
}),
|
|
25300
|
-
placeholder: "Select views",
|
|
25301
|
-
styles: selectStyles,
|
|
25302
|
-
className: "Layer__ProfitAndLoss__TagMultiSelect"
|
|
25303
|
-
}
|
|
25304
|
-
)
|
|
25302
|
+
/* @__PURE__ */ jsx(CompareTagsMultiSelect, {})
|
|
25305
25303
|
] });
|
|
25306
25304
|
};
|
|
25307
25305
|
const defaultValue = {
|
|
@@ -25934,29 +25932,22 @@ const ProfitAndLossReport = ({
|
|
|
25934
25932
|
const header = useMemo(() => {
|
|
25935
25933
|
if (hideHeader) return null;
|
|
25936
25934
|
return /* @__PURE__ */ jsxs(Header, { children: [
|
|
25937
|
-
/* @__PURE__ */
|
|
25938
|
-
/* @__PURE__ */ jsxs(
|
|
25935
|
+
/* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { fluid: true, children: /* @__PURE__ */ jsxs(HStack, { pb: "sm", align: "end", fluid: true, gap: "xs", justify: "space-between", children: [
|
|
25936
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", children: [
|
|
25939
25937
|
/* @__PURE__ */ jsx(CombinedDateRangeSelection, { mode: dateSelectionMode }),
|
|
25940
25938
|
view === "desktop" && useComparisonPnl && /* @__PURE__ */ jsx(ProfitAndLossCompareOptions, {})
|
|
25941
25939
|
] }),
|
|
25942
|
-
/* @__PURE__ */ jsx(
|
|
25940
|
+
/* @__PURE__ */ jsx(
|
|
25943
25941
|
ProfitAndLossDownloadButton,
|
|
25944
25942
|
{
|
|
25945
25943
|
stringOverrides: stringOverrides == null ? void 0 : stringOverrides.downloadButton,
|
|
25946
25944
|
moneyFormat: csvMoneyFormat
|
|
25947
25945
|
}
|
|
25948
|
-
)
|
|
25949
|
-
] }),
|
|
25950
|
-
view !== "desktop" && useComparisonPnl && /* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { children: /* @__PURE__ */ jsx(ProfitAndLossCompareOptions, {}) }) })
|
|
25946
|
+
)
|
|
25947
|
+
] }) }) }),
|
|
25948
|
+
view !== "desktop" && useComparisonPnl && /* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { fluid: true, children: /* @__PURE__ */ jsx(HStack, { pb: "sm", fluid: true, children: /* @__PURE__ */ jsx(ProfitAndLossCompareOptions, {}) }) }) })
|
|
25951
25949
|
] });
|
|
25952
|
-
}, [
|
|
25953
|
-
csvMoneyFormat,
|
|
25954
|
-
dateSelectionMode,
|
|
25955
|
-
hideHeader,
|
|
25956
|
-
stringOverrides == null ? void 0 : stringOverrides.downloadButton,
|
|
25957
|
-
useComparisonPnl,
|
|
25958
|
-
view
|
|
25959
|
-
]);
|
|
25950
|
+
}, [csvMoneyFormat, dateSelectionMode, hideHeader, stringOverrides == null ? void 0 : stringOverrides.downloadButton, useComparisonPnl, view]);
|
|
25960
25951
|
return /* @__PURE__ */ jsx(InAppLinkProvider, { renderInAppLink, children: /* @__PURE__ */ jsx(View, { type: "panel", header, children: selectedLineItem ? /* @__PURE__ */ jsx(
|
|
25961
25952
|
ProfitAndLossDetailReport,
|
|
25962
25953
|
{
|
|
@@ -26648,7 +26639,7 @@ const ExpandCollapseButton = ({
|
|
|
26648
26639
|
Button$1,
|
|
26649
26640
|
{
|
|
26650
26641
|
onClick: () => onClick(!expanded),
|
|
26651
|
-
variant: variant ? variant :
|
|
26642
|
+
variant: variant ? variant : ButtonVariant.secondary,
|
|
26652
26643
|
className: classNames(
|
|
26653
26644
|
iconOnly ? "Layer__expand-collpase-all-rows-btn--sm" : "Layer__expand-collpase-all-rows-btn",
|
|
26654
26645
|
className
|
|
@@ -26770,7 +26761,7 @@ const GlobalDatePicker = () => {
|
|
|
26770
26761
|
return /* @__PURE__ */ jsx(
|
|
26771
26762
|
DatePicker,
|
|
26772
26763
|
{
|
|
26773
|
-
label: "Effective
|
|
26764
|
+
label: "Effective date",
|
|
26774
26765
|
date: localDate,
|
|
26775
26766
|
onChange,
|
|
26776
26767
|
minDate: minDateZdt,
|
|
@@ -26778,11 +26769,7 @@ const GlobalDatePicker = () => {
|
|
|
26778
26769
|
isInvalid,
|
|
26779
26770
|
errorText,
|
|
26780
26771
|
onBlur,
|
|
26781
|
-
slotProps: {
|
|
26782
|
-
Label: {
|
|
26783
|
-
size: "2xs"
|
|
26784
|
-
}
|
|
26785
|
-
}
|
|
26772
|
+
slotProps: { Label: { size: "sm", pbe: "3xs" } }
|
|
26786
26773
|
}
|
|
26787
26774
|
);
|
|
26788
26775
|
};
|
|
@@ -26803,7 +26790,7 @@ const DateSelection = () => {
|
|
|
26803
26790
|
};
|
|
26804
26791
|
const CombinedDateSelection = ({ mode }) => {
|
|
26805
26792
|
if (mode === "month") {
|
|
26806
|
-
return /* @__PURE__ */ jsx(GlobalMonthPicker, {});
|
|
26793
|
+
return /* @__PURE__ */ jsx(GlobalMonthPicker, { showLabel: true });
|
|
26807
26794
|
}
|
|
26808
26795
|
return /* @__PURE__ */ jsx(DateSelection, {});
|
|
26809
26796
|
};
|
|
@@ -26832,10 +26819,10 @@ const BalanceSheetView = ({
|
|
|
26832
26819
|
{
|
|
26833
26820
|
type: "panel",
|
|
26834
26821
|
ref: containerRef,
|
|
26835
|
-
header: /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */
|
|
26836
|
-
/* @__PURE__ */ jsx(
|
|
26837
|
-
withExpandAllButton && /* @__PURE__ */ jsx(
|
|
26838
|
-
] }) }),
|
|
26822
|
+
header: /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { fluid: true, children: /* @__PURE__ */ jsxs(HStack, { pb: "sm", align: "end", gap: "xs", justify: "space-between", fluid: true, children: [
|
|
26823
|
+
/* @__PURE__ */ jsx(CombinedDateSelection, { mode: dateSelectionMode }),
|
|
26824
|
+
withExpandAllButton && /* @__PURE__ */ jsx(BalanceSheetExpandAllButton, { view })
|
|
26825
|
+
] }) }) }) }),
|
|
26839
26826
|
children: !data || isLoading ? /* @__PURE__ */ jsx("div", { className: `Layer__${COMPONENT_NAME$9}__loader-container`, children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsx(
|
|
26840
26827
|
BalanceSheetTable,
|
|
26841
26828
|
{
|
|
@@ -26852,9 +26839,9 @@ const BalanceSheetView = ({
|
|
|
26852
26839
|
{
|
|
26853
26840
|
type: "panel",
|
|
26854
26841
|
ref: containerRef,
|
|
26855
|
-
header: /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */
|
|
26856
|
-
/* @__PURE__ */ jsx(
|
|
26857
|
-
/* @__PURE__ */ jsxs(
|
|
26842
|
+
header: /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { fluid: true, children: /* @__PURE__ */ jsxs(HStack, { pb: "sm", align: "end", gap: "xs", justify: "space-between", fluid: true, children: [
|
|
26843
|
+
/* @__PURE__ */ jsx(CombinedDateSelection, { mode: dateSelectionMode }),
|
|
26844
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", children: [
|
|
26858
26845
|
withExpandAllButton && /* @__PURE__ */ jsx(BalanceSheetExpandAllButton, { view }),
|
|
26859
26846
|
/* @__PURE__ */ jsx(
|
|
26860
26847
|
BalanceSheetDownloadButton,
|
|
@@ -26864,7 +26851,7 @@ const BalanceSheetView = ({
|
|
|
26864
26851
|
}
|
|
26865
26852
|
)
|
|
26866
26853
|
] })
|
|
26867
|
-
] }) }),
|
|
26854
|
+
] }) }) }) }),
|
|
26868
26855
|
children: !data || isLoading ? /* @__PURE__ */ jsx("div", { className: `Layer__${COMPONENT_NAME$9}__loader-container`, children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsx(
|
|
26869
26856
|
BalanceSheetTable,
|
|
26870
26857
|
{
|
|
@@ -27146,17 +27133,17 @@ const StatementOfCashFlowView = ({
|
|
|
27146
27133
|
{
|
|
27147
27134
|
type: "panel",
|
|
27148
27135
|
ref: containerRef,
|
|
27149
|
-
header: /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */
|
|
27150
|
-
/* @__PURE__ */ jsx(
|
|
27151
|
-
/* @__PURE__ */ jsx(
|
|
27136
|
+
header: /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { fluid: true, children: /* @__PURE__ */ jsxs(HStack, { pb: "sm", align: "end", fluid: true, gap: "xs", justify: "space-between", children: [
|
|
27137
|
+
/* @__PURE__ */ jsx(CombinedDateRangeSelection, { mode: dateSelectionMode }),
|
|
27138
|
+
/* @__PURE__ */ jsx(
|
|
27152
27139
|
CashflowStatementDownloadButton,
|
|
27153
27140
|
{
|
|
27154
27141
|
startDate: dateRange.startDate,
|
|
27155
27142
|
endDate: dateRange.endDate,
|
|
27156
27143
|
iconOnly: view === "mobile"
|
|
27157
27144
|
}
|
|
27158
|
-
)
|
|
27159
|
-
] }) }),
|
|
27145
|
+
)
|
|
27146
|
+
] }) }) }) }),
|
|
27160
27147
|
children: !data || isLoading ? /* @__PURE__ */ jsx("div", { className: `Layer__${COMPONENT_NAME$8}__loader-container`, children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsx(
|
|
27161
27148
|
StatementOfCashFlowTable,
|
|
27162
27149
|
{
|
package/dist/index.css
CHANGED
|
@@ -1320,6 +1320,9 @@
|
|
|
1320
1320
|
padding-right: 0;
|
|
1321
1321
|
padding-left: 0;
|
|
1322
1322
|
}
|
|
1323
|
+
.Layer__header__col[data-fluid=true] {
|
|
1324
|
+
flex: 1 1;
|
|
1325
|
+
}
|
|
1323
1326
|
::placeholder {
|
|
1324
1327
|
color: var(--input-placeholder-color);
|
|
1325
1328
|
}
|
|
@@ -4851,9 +4854,6 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
4851
4854
|
align-items: stretch;
|
|
4852
4855
|
background-color: white;
|
|
4853
4856
|
}
|
|
4854
|
-
:is(.Layer__input-tooltip:has(.Layer__ProfitAndLoss__TagMultiSelect)) {
|
|
4855
|
-
flex: 1;
|
|
4856
|
-
}
|
|
4857
4857
|
.Layer__profit-and-loss__main-panel {
|
|
4858
4858
|
flex: 1;
|
|
4859
4859
|
}
|
|
@@ -9198,6 +9198,13 @@ header.Layer__profit-and-loss-detailed-charts__header--tablet {
|
|
|
9198
9198
|
}.Layer__DateGroupByComboBox__Container {
|
|
9199
9199
|
inline-size: 12rem;
|
|
9200
9200
|
max-inline-size: 12rem;
|
|
9201
|
+
}.Layer__CompareTagsMultiSelect__Container {
|
|
9202
|
+
min-inline-size: 12rem;
|
|
9203
|
+
max-inline-size: 20rem;
|
|
9204
|
+
}
|
|
9205
|
+
|
|
9206
|
+
:is(.Layer__input-tooltip:has(.Layer__CompareTagsMultiSelect)) {
|
|
9207
|
+
flex: 1;
|
|
9201
9208
|
}.Layer__panel {
|
|
9202
9209
|
display: flex;
|
|
9203
9210
|
flex: 1;
|
package/dist/index.d.ts
CHANGED
|
@@ -505,9 +505,12 @@ declare interface GeneralLedgerStringOverrides {
|
|
|
505
505
|
|
|
506
506
|
export declare const GeneralLedgerView: ({ title, showTitle, showTags, showCustomerVendor, stringOverrides, chartOfAccountsOptions, renderInAppLink, }: GeneralLedgerProps) => JSX_2.Element;
|
|
507
507
|
|
|
508
|
-
export declare const GlobalMonthPicker: ({ truncateMonth }:
|
|
508
|
+
export declare const GlobalMonthPicker: ({ truncateMonth, showLabel }: GlobalMonthPickerProps) => JSX_2.Element;
|
|
509
|
+
|
|
510
|
+
declare type GlobalMonthPickerProps = {
|
|
509
511
|
truncateMonth?: boolean;
|
|
510
|
-
|
|
512
|
+
showLabel?: boolean;
|
|
513
|
+
};
|
|
511
514
|
|
|
512
515
|
/**
|
|
513
516
|
* Configuration for the hero/main content section of the Landing Page page
|